From a680dd147939c4879cb61a46279ad8ba446f8b8b Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 4 Jun 2010 13:46:22 +0200 Subject: changehid: #i111874# remove SmartId, make HID of type rtl::OString, fill in dummies for all explicit help ids --- sw/source/ui/chrdlg/swuiccoll.cxx | 3 +- sw/source/ui/config/mailconfigpage.cxx | 6 +- sw/source/ui/config/optload.cxx | 3 +- sw/source/ui/dbui/addresslistdialog.cxx | 6 +- sw/source/ui/dbui/dbtree.cxx | 3 +- sw/source/ui/dbui/mailmergechildwindow.cxx | 9 ++- sw/source/ui/dbui/mailmergewizard.cxx | 6 +- sw/source/ui/dbui/mmaddressblockpage.cxx | 9 ++- sw/source/ui/dbui/mmgreetingspage.cxx | 48 ++++++++++----- sw/source/ui/dbui/selectdbtabledialog.cxx | 6 +- sw/source/ui/dialog/swdlgfact.cxx | 4 +- sw/source/ui/dialog/uiregionsw.cxx | 6 +- sw/source/ui/docvw/edtwin.cxx | 3 +- sw/source/ui/docvw/srcedtw.cxx | 3 +- sw/source/ui/envelp/envlop1.cxx | 6 +- sw/source/ui/envelp/label1.cxx | 21 ++++--- sw/source/ui/fldui/FldRefTreeListBox.cxx | 3 +- sw/source/ui/fldui/flddinf.cxx | 3 +- sw/source/ui/fldui/fldedt.cxx | 6 +- sw/source/ui/fldui/fldtdlg.cxx | 6 +- sw/source/ui/frmdlg/column.cxx | 3 +- sw/source/ui/index/cnttab.cxx | 15 +++-- sw/source/ui/index/swuiidxmrk.cxx | 98 ++++++++++++++++++++---------- sw/source/ui/lingu/olmenu.cxx | 15 +++-- sw/source/ui/misc/glosbib.cxx | 3 +- sw/source/ui/misc/glossary.cxx | 3 +- sw/source/ui/misc/insrule.cxx | 3 +- sw/source/ui/misc/num.cxx | 3 +- sw/source/ui/misc/outline.cxx | 3 +- sw/source/ui/misc/redlndlg.cxx | 3 +- sw/source/ui/ribbar/inputwin.cxx | 3 +- sw/source/ui/ribbar/workctrl.cxx | 6 +- sw/source/ui/shells/textsh1.cxx | 9 ++- sw/source/ui/uiview/pview.cxx | 9 ++- sw/source/ui/uiview/viewmdi.cxx | 9 ++- sw/source/ui/uno/unomod.cxx | 10 ++- sw/source/ui/utlui/content.cxx | 3 +- sw/source/ui/utlui/glbltree.cxx | 39 ++++++++---- sw/source/ui/utlui/navipi.cxx | 18 ++++-- 39 files changed, 279 insertions(+), 136 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx index 7fb20bf3f8..c2c231544c 100644 --- a/sw/source/ui/chrdlg/swuiccoll.cxx +++ b/sw/source/ui/chrdlg/swuiccoll.cxx @@ -114,7 +114,8 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet) aTbLinks.SetTabs( &nTabs[0], MAP_APPFONT ); aTbLinks.Resize(); // OS: Hack fuer richtige Selektion aTbLinks.SetSpaceBetweenEntries( 0 ); - aTbLinks.SetHelpId(HID_COND_COLL_TABLIST); + // FIXME: HELPID + aTbLinks.SetHelpId(""/*HID_COND_COLL_TABLIST*/); SfxStyleFamilies aFamilies(SW_RES(DLG_STYLE_DESIGNER)); const SfxStyleFamilyItem* pFamilyItem = 0; diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index e8752bd08f..a14f36e60e 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -325,10 +325,12 @@ SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pPare aSz.Width()/2, HIB_LEFT | HIB_VCENTER ); - m_aStatusHB.SetHelpId(HID_MM_TESTACCOUNTSETTINGS_HB ); + // FIXME: HELPID + m_aStatusHB.SetHelpId(""/*HID_MM_TESTACCOUNTSETTINGS_HB*/ ); m_aStatusHB.Show(); - m_aStatusLB.SetHelpId(HID_MM_TESTACCOUNTSETTINGS_TLB); + // FIXME: HELPID + m_aStatusLB.SetHelpId(""/*HID_MM_TESTACCOUNTSETTINGS_TLB*/); static long nTabs[] = {2, 0, aSz.Width()/2 }; m_aStatusLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aStatusLB.SetSelectionMode( SINGLE_SELECTION ); diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 808ad95fcd..9da19b6aed 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -499,7 +499,8 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet ) aLbLevel.SelectEntryPos( nLvl < MAXLEVEL ? nLvl + 1 : 0 ); aEdDelim.SetText( sDelim ); - aCheckLB.SetHelpId(HID_OPTCAPTION_CLB); + // FIXME: HELPID + aCheckLB.SetHelpId(""/*HID_OPTCAPTION_CLB*/); FreeResource(); diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index c543cf702c..8068f422ba 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -214,10 +214,12 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) : m_aListHB.InsertItem( ITEMID_TABLE, m_sTable, aSz.Width()/2, HIB_LEFT | HIB_VCENTER | HIB_FIXED | HIB_FIXEDPOS /*| HIB_CLICKABLE | HIB_UPARROW */); - m_aListHB.SetHelpId(HID_MM_ADDRESSLIST_HB ); + // FIXME: HELPID + m_aListHB.SetHelpId(""/*HID_MM_ADDRESSLIST_HB*/ ); m_aListHB.Show(); - m_aListLB.SetHelpId(HID_MM_ADDRESSLIST_TLB); + // FIXME: HELPID + m_aListLB.SetHelpId(""/*HID_MM_ADDRESSLIST_TLB*/); static long nTabs[] = {2, 0, aSz.Width()/2 }; m_aListLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aListLB.SetSelectionMode( SINGLE_SELECTION ); diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx index 4b31760592..b219fb90d1 100644 --- a/sw/source/ui/dbui/dbtree.cxx +++ b/sw/source/ui/dbui/dbtree.cxx @@ -236,7 +236,8 @@ SwDBTreeList::SwDBTreeList(Window *pParent, const ResId& rResId, bShowColumns (bShowCol), pImpl(new SwDBTreeList_Impl(pSh)) { - SetHelpId(HID_DB_SELECTION_TLB); + // FIXME: HELPID + SetHelpId(""/*HID_DB_SELECTION_TLB*/); if (IsVisible()) InitTreeList(); diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx index e03b129034..84e1fe18ec 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.cxx +++ b/sw/source/ui/dbui/mailmergechildwindow.cxx @@ -384,7 +384,8 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf m_nStatusHeight = m_aSeparatorFL.GetPosPixel().Y() - m_aStatusLB.GetPosPixel().Y(); String sTask(SW_RES(ST_TASK)); String sStatus(SW_RES(ST_STATUS)); - m_aStatusLB.SetHelpId(HID_MM_SENDMAILS_STATUSLB); + // FIXME: HELPID + m_aStatusLB.SetHelpId(""/*HID_MM_SENDMAILS_STATUSLB*/); FreeResource(); @@ -413,10 +414,12 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf m_aStatusHB.InsertItem( ITEMID_STATUS, sStatus, nPos2, HIB_LEFT | HIB_VCENTER ); - m_aStatusHB.SetHelpId(HID_MM_ADDRESSLIST_HB ); + // FIXME: HELPID + m_aStatusHB.SetHelpId(""/*HID_MM_ADDRESSLIST_HB*/ ); m_aStatusHB.Show(); - m_aStatusLB.SetHelpId(HID_MM_MAILSTATUS_TLB); + // FIXME: HELPID + m_aStatusLB.SetHelpId(""/*HID_MM_MAILSTATUS_TLB*/); static long nTabs[] = {3, 0, nPos1, aSz.Width() }; m_aStatusLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aStatusLB.SetSelectionMode( SINGLE_SELECTION ); diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index fd601bdfb1..4b59880a6a 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -89,8 +89,10 @@ SwMailMergeWizard::SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rItem enableButtons(WZB_FINISH, sal_False); m_pFinish->SetText(m_sFinish); - m_pNextPage->SetHelpId(HID_MM_NEXT_PAGE); - m_pPrevPage->SetHelpId(HID_MM_PREV_PAGE); + // FIXME: HELPID + m_pNextPage->SetHelpId(""/*HID_MM_NEXT_PAGE*/); + // FIXME: HELPID + m_pPrevPage->SetHelpId(""/*HID_MM_PREV_PAGE*/); //#i51949# no output type page visible if e-Mail is not supported if(rItem.IsMailAvailable()) diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index d179e02e51..eda1caf58a 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -1070,7 +1070,8 @@ SwAssignFieldsControl::SwAssignFieldsControl( m_nFirstYPos(0) { SetStyle(GetStyle()|WB_TABSTOP|WB_DIALOGCONTROL); - SetHelpId(HID_MM_ASSIGN_FIELDS); + // FIXME: HELPID + SetHelpId(""/*HID_MM_ASSIGN_FIELDS*/); long nHBHeight = m_aHeaderHB.CalcWindowSizePixel().Height(); Size aOutputSize(GetOutputSize()); m_aHeaderHB.SetSizePixel( @@ -1106,7 +1107,8 @@ SwAssignFieldsControl::SwAssignFieldsControl( sLabel.Insert(rHeader, 1); pNewText->SetText(sLabel); ListBox* pNewLB = new ListBox(&m_aWindow, ResId(LB_FIELDS, *rResId.GetResMgr())); - pNewLB->SetHelpId( HID_MM_HEADER_0 + i ); + // FIXME: HELPID + pNewLB->SetHelpId( ""/*HID_MM_HEADER_0 + i*/ ); pNewLB->SelectEntryPos(0); for(sal_Int32 nField = 0; nField < aFields.getLength(); ++nField) pNewLB->InsertEntry(pFields[nField]); @@ -1440,7 +1442,8 @@ DDListBox::DDListBox(SwCustomizeAddressBlockDialog* pParent, const ResId rResId) SetSelectionMode( SINGLE_SELECTION ); SetDragDropMode( SV_DRAGDROP_CTRL_COPY ); EnableAsyncDrag(TRUE); - SetHelpId(HID_MM_CUSTOMFIELDS); + // FIXME: HELPID + SetHelpId(""/*HID_MM_CUSTOMFIELDS*/); // expand selection to the complete width of the ListBox SetHighlightRange(); Show(); diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index 4e287a5a28..f928830e82 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -308,14 +308,22 @@ SwMailMergeGreetingsPage::SwMailMergeGreetingsPage( SwMailMergeWizard* _pParent) m_pNeutralCB = &m_aNeutralCB; m_bIsTabPage = true; - m_pPersonalizedCB->SetHelpId( HID_MM_GREETINGS_CB_PERSONALIZED); - m_pFemaleLB->SetHelpId( HID_MM_GREETINGS_LB_FEMALE ); - m_pFemalePB->SetHelpId( HID_MM_GREETINGS_PB_FEMALE ); - m_pMaleLB->SetHelpId( HID_MM_GREETINGS_LB_MALE ); - m_pMalePB->SetHelpId( HID_MM_GREETINGS_PB_MALE ); - m_pFemaleColumnLB->SetHelpId( HID_MM_GREETINGS_LB_FEMALECOLUMN); - m_pFemaleFieldCB->SetHelpId( HID_MM_GREETINGS_CB_FEMALEFIELD ); - m_pNeutralCB->SetHelpId( HID_MM_GREETINGS_CB_NEUTRAL ); + // FIXME: HELPID + m_pPersonalizedCB->SetHelpId( ""/*HID_MM_GREETINGS_CB_PERSONALIZED*/); + // FIXME: HELPID + m_pFemaleLB->SetHelpId( ""/*HID_MM_GREETINGS_LB_FEMALE*/ ); + // FIXME: HELPID + m_pFemalePB->SetHelpId( ""/*HID_MM_GREETINGS_PB_FEMALE*/ ); + // FIXME: HELPID + m_pMaleLB->SetHelpId( ""/*HID_MM_GREETINGS_LB_MALE*/ ); + // FIXME: HELPID + m_pMalePB->SetHelpId( ""/*HID_MM_GREETINGS_PB_MALE*/ ); + // FIXME: HELPID + m_pFemaleColumnLB->SetHelpId( ""/*HID_MM_GREETINGS_LB_FEMALECOLUMN*/); + // FIXME: HELPID + m_pFemaleFieldCB->SetHelpId( ""/*HID_MM_GREETINGS_CB_FEMALEFIELD*/ ); + // FIXME: HELPID + m_pNeutralCB->SetHelpId( ""/*HID_MM_GREETINGS_CB_NEUTRAL*/ ); FreeResource(); m_aGreetingLineCB.SetClickHdl(LINK(this, SwMailMergeGreetingsPage, ContainsHdl_Impl)); @@ -524,14 +532,22 @@ SwMailBodyDialog::SwMailBodyDialog(Window* pParent, SwMailMergeWizard* _pWizard) m_pNeutralCB = &m_aNeutralCB; m_bIsTabPage = false; - m_pPersonalizedCB->SetHelpId( HID_MM_BODY_CB_PERSONALIZED ); - m_pFemaleLB->SetHelpId( HID_MM_BODY_LB_FEMALE ); - m_pFemalePB->SetHelpId( HID_MM_BODY_PB_FEMALE ); - m_pMaleLB->SetHelpId( HID_MM_BODY_LB_MALE ); - m_pMalePB->SetHelpId( HID_MM_BODY_PB_MALE ); - m_pFemaleColumnLB->SetHelpId( HID_MM_BODY_LB_FEMALECOLUMN ); - m_pFemaleFieldCB->SetHelpId( HID_MM_BODY_CB_FEMALEFIELD ); - m_pNeutralCB->SetHelpId( HID_MM_BODY_CB_NEUTRAL ); + // FIXME: HELPID + m_pPersonalizedCB->SetHelpId( ""/*HID_MM_BODY_CB_PERSONALIZED*/ ); + // FIXME: HELPID + m_pFemaleLB->SetHelpId( ""/*HID_MM_BODY_LB_FEMALE*/ ); + // FIXME: HELPID + m_pFemalePB->SetHelpId( ""/*HID_MM_BODY_PB_FEMALE*/ ); + // FIXME: HELPID + m_pMaleLB->SetHelpId( ""/*HID_MM_BODY_LB_MALE*/ ); + // FIXME: HELPID + m_pMalePB->SetHelpId( ""/*HID_MM_BODY_PB_MALE*/ ); + // FIXME: HELPID + m_pFemaleColumnLB->SetHelpId( ""/*HID_MM_BODY_LB_FEMALECOLUMN*/ ); + // FIXME: HELPID + m_pFemaleFieldCB->SetHelpId( ""/*HID_MM_BODY_CB_FEMALEFIELD*/ ); + // FIXME: HELPID + m_pNeutralCB->SetHelpId( ""/*HID_MM_BODY_CB_NEUTRAL*/ ); FreeResource(); m_aGreetingLineCB.SetClickHdl(LINK(this, SwMailBodyDialog, ContainsHdl_Impl)); diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 51277a1fed..bae83b5bff 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -103,12 +103,14 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(Window* pParent, m_aTableHB.InsertItem( 2, m_sType, aSz.Width()/2, HIB_LEFT | HIB_VCENTER /*| HIB_CLICKABLE | HIB_UPARROW */); - m_aTableHB.SetHelpId(HID_MM_ADDRESSLIST_HB ); + // FIXME: HELPID + m_aTableHB.SetHelpId(""/*HID_MM_ADDRESSLIST_HB*/ ); m_aTableHB.Show(); static long nTabs[] = {3, 0, aSz.Width()/2, aSz.Width() }; m_aTableLB.SetTabs(&nTabs[0], MAP_PIXEL); - m_aTableLB.SetHelpId(HID_MM_SELECTDBTABLEDDIALOG_LISTBOX); + // FIXME: HELPID + m_aTableLB.SetHelpId(""/*HID_MM_SELECTDBTABLEDDIALOG_LISTBOX*/); m_aTableLB.SetWindowBits( WB_CLIPCHILDREN ); m_aTableLB.SetSpaceBetweenEntries(3); m_aTableLB.SetSelectionMode( SINGLE_SELECTION ); diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 9af9dfbd0b..5a344b3afc 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -453,7 +453,9 @@ String AbstractInsFootNoteDlg_Impl::GetStr() } void AbstractInsFootNoteDlg_Impl::SetHelpId( ULONG nHelpId ) { - pDlg->SetHelpId( nHelpId ); + // FIXME: HELPID + (void)nHelpId; + pDlg->SetHelpId( ""/*nHelpId*/ ); } void AbstractInsFootNoteDlg_Impl::SetText( const XubString& rStr ) { diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 440457f0b1..33a50933d4 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -157,7 +157,8 @@ public: SwTestPasswdDlg(Window* pParent) : SfxPasswordDialog(pParent) { - SetHelpId(HID_DLG_PASSWD_SECTION); + // FIXME: HELPID + SetHelpId(""/*HID_DLG_PASSWD_SECTION*/); } }; @@ -430,7 +431,8 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh ) aSubRegionED.AddEventListener( LINK( this, SwEditRegionDlg, SubRegionEventHdl )); aSubRegionED.EnableAutocomplete( sal_True, sal_True ); - aTree.SetHelpId(HID_REGION_TREE); + // FIXME: HELPID + aTree.SetHelpId(""/*HID_REGION_TREE*/); aTree.SetSelectionMode( MULTIPLE_SELECTION ); aTree.SetWindowBits(WB_HASBUTTONSATROOT|WB_CLIPCHILDREN|WB_HSCROLL); aTree.SetSpaceBetweenEntries(0); diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 9945b90086..ad0ec29dec 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -4558,7 +4558,8 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView): nKS_NUMDOWN_Count(0), // #i23725# nKS_NUMINDENTINC_Count(0) // #i23725# { - SetHelpId(HID_EDIT_WIN); + // FIXME: HELPID + SetHelpId(""/*HID_EDIT_WIN*/); EnableChildTransparentMode(); SetDialogControlFlags( WINDOW_DLGCTRL_RETURN | WINDOW_DLGCTRL_WANTFOCUS ); diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx index 2ea48e2a7e..748da4fae0 100644 --- a/sw/source/ui/docvw/srcedtw.cxx +++ b/sw/source/ui/docvw/srcedtw.cxx @@ -253,7 +253,8 @@ SwSrcEditWindow::SwSrcEditWindow( Window* pParent, SwSrcView* pParentView ) : bDoSyntaxHighlight(TRUE), bHighlighting(FALSE) { - SetHelpId(HID_SOURCE_EDITWIN); + // FIXME: HELPID + SetHelpId(""/*HID_SOURCE_EDITWIN*/); CreateTextEngine(); pSourceViewConfig->AddListener(this); } diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 12b0f1f38f..890cbd0585 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -173,12 +173,14 @@ SwEnvDlg::SwEnvDlg(Window* pParent, const SfxItemSet& rSet, FreeResource(); GetOKButton().SetText(String(SW_RES(STR_BTN_NEWDOC))); - GetOKButton().SetHelpId(HID_ENVELOP_PRINT); + // FIXME: HELPID + GetOKButton().SetHelpId(""/*HID_ENVELOP_PRINT*/); GetOKButton().SetHelpText(aEmptyStr); // Damit generierter Hilfetext verwendet wird if (GetUserButton()) { GetUserButton()->SetText(bInsert ? sInsert : sChange); - GetUserButton()->SetHelpId(HID_ENVELOP_INSERT); + // FIXME: HELPID + GetUserButton()->SetHelpId(""/*HID_ENVELOP_INSERT*/); } AddTabPage(TP_ENV_ENV, SwEnvPage ::Create, 0); diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index 05c2cf90be..f4e508efd2 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -143,7 +143,8 @@ SwLabDlg::SwLabDlg(Window* pParent, const SfxItemSet& rSet, FreeResource(); GetOKButton().SetText(String(SW_RES(STR_BTN_NEW_DOC))); - GetOKButton().SetHelpId(HID_LABEL_INSERT); + // FIXME: HELPID + GetOKButton().SetHelpId(""/*HID_LABEL_INSERT*/); GetOKButton().SetHelpText(aEmptyStr); // Damit generierter Hilfetext verwendet wird AddTabPage(TP_LAB_LAB, m_bLabel ? sFormat : sMedium ,SwLabPage ::Create, 0, sal_False, 0); @@ -345,11 +346,16 @@ void lcl_ChgYPos(Window& rWin, long nDiff) void SwLabPage::SetToBusinessCard() { - SetHelpId(HID_BUSINESS_FMT_PAGE); - aContButton.SetHelpId(HID_BUSINESS_FMT_PAGE_CONT); - aSheetButton.SetHelpId(HID_BUSINESS_FMT_PAGE_SHEET); - aMakeBox.SetHelpId(HID_BUSINESS_FMT_PAGE_BRAND); - aTypeBox.SetHelpId(HID_BUSINESS_FMT_PAGE_TYPE); + // FIXME: HELPID + SetHelpId(""/*HID_BUSINESS_FMT_PAGE*/); + // FIXME: HELPID + aContButton.SetHelpId(""/*HID_BUSINESS_FMT_PAGE_CONT*/); + // FIXME: HELPID + aSheetButton.SetHelpId(""/*HID_BUSINESS_FMT_PAGE_SHEET*/); + // FIXME: HELPID + aMakeBox.SetHelpId(""/*HID_BUSINESS_FMT_PAGE_BRAND*/); + // FIXME: HELPID + aTypeBox.SetHelpId(""/*HID_BUSINESS_FMT_PAGE_TYPE*/); m_bLabel = sal_False; aWritingText.Hide(); aAddrBox.Hide(); @@ -727,7 +733,8 @@ SwVisitingCardPage::SwVisitingCardPage(Window* pParent, const SfxItemSet& rSet) aAutoTextLB.SetWindowBits( WB_HSCROLL ); aAutoTextLB.SetSpaceBetweenEntries(0); aAutoTextLB.SetSelectionMode( SINGLE_SELECTION ); - aAutoTextLB.SetHelpId(HID_BUSINESS_CARD_CONTENT); + // FIXME: HELPID + aAutoTextLB.SetHelpId(""/*HID_BUSINESS_CARD_CONTENT*/); SetExchangeSupport(); aAutoTextLB.SetSelectHdl(LINK(this, SwVisitingCardPage, AutoTextSelectHdl)); diff --git a/sw/source/ui/fldui/FldRefTreeListBox.cxx b/sw/source/ui/fldui/FldRefTreeListBox.cxx index 3d81ea70b3..677e3de2ee 100644 --- a/sw/source/ui/fldui/FldRefTreeListBox.cxx +++ b/sw/source/ui/fldui/FldRefTreeListBox.cxx @@ -37,7 +37,8 @@ SwFldRefTreeListBox::SwFldRefTreeListBox( Window* pParent, const ResId& rResId) : SvTreeListBox( pParent, rResId ) { - SetHelpId( HID_REFSELECTION_TOOLTIP ); + // FIXME: HELPID + SetHelpId( ""/*HID_REFSELECTION_TOOLTIP*/ ); } SwFldRefTreeListBox::~SwFldRefTreeListBox() diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index dabb6b91e5..4e8fd4d00b 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -87,7 +87,8 @@ SwFldDokInfPage::SwFldDokInfPage(Window* pWindow, const SfxItemSet& rCoreSet ) : { FreeResource(); - aTypeTLB.SetHelpId(HID_FIELD_DINF_TYPE); + // FIXME: HELPID + aTypeTLB.SetHelpId(""/*HID_FIELD_DINF_TYPE*/); aTypeTLB.SetSelectionMode(SINGLE_SELECTION); aTypeTLB.SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); // Font nicht setzen, damit der Font des Controls uebernommen wird! diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index 76f0fbcfc7..e8609a961f 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -141,7 +141,8 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) : aNextBT.SetClickHdl(LINK(this, SwFldEditDlg, NextPrevHdl)); aAddressBT.SetClickHdl(LINK(this, SwFldEditDlg, AddressHdl)); - aAddressBT.SetHelpId(HID_FLDEDT_ADDRESS); + // FIXME: HELPID + aAddressBT.SetHelpId(""/*HID_FLDEDT_ADDRESS*/); Init(); } @@ -247,7 +248,8 @@ SfxTabPage* SwFldEditDlg::CreatePage(USHORT nGroup) break; } - pTabPage->SetHelpId(nHelpId); + // FIXME: HELPID + pTabPage->SetHelpId(""/*nHelpId*/); static_cast(pTabPage)->SetWrtShell(pSh); SetTabPage(pTabPage); diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index 7aa6cb0ad7..ae7df048ac 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -84,11 +84,13 @@ SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent) RemoveResetButton(); GetOKButton().SetText(String(SW_RES(STR_FLD_INSERT))); - GetOKButton().SetHelpId(HID_FIELD_INSERT); + // FIXME: HELPID + GetOKButton().SetHelpId(""/*HID_FIELD_INSERT*/); GetOKButton().SetHelpText(aEmptyStr); // Damit generierter Hilfetext verwendet wird GetCancelButton().SetText(String(SW_RES(STR_FLD_CLOSE))); - GetCancelButton().SetHelpId(HID_FIELD_CLOSE); + // FIXME: HELPID + GetCancelButton().SetHelpId(""/*HID_FIELD_CLOSE*/); GetCancelButton().SetHelpText(aEmptyStr); // Damit generierter Hilfetext verwendet wird FreeResource(); diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 79f727aa08..7310c882b2 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -505,7 +505,8 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet) FreeResource(); SetExchangeSupport(); - aDefaultVS.SetHelpId(HID_COLUMN_VALUESET); + // FIXME: HELPID + aDefaultVS.SetHelpId(""/*HID_COLUMN_VALUESET*/); aDefaultVS.SetColCount( 5 ); aDefaultVS.SetStyle( aDefaultVS.GetStyle() | WB_ITEMBORDER diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 5d9a390600..46f06f3930 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1036,7 +1036,8 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS aFromObjCLB.InsertEntry(rNames.GetString(i)); aFromObjCLB.SetEntryData( i, (void*)rNames.GetValue(i) ); } - aFromObjCLB.SetHelpId(HID_OLE_CHECKLB); + // FIXME: HELPID + aFromObjCLB.SetHelpId(""/*HID_OLE_CHECKLB*/); SetExchangeSupport(); aTypeLB.SetSelectHdl(LINK(this, SwTOXSelectTabPage, TOXTypeHdl)); @@ -1791,7 +1792,8 @@ public: bNextControl(sal_False), m_pParent( pTokenWin ) { - SetHelpId( HID_TOX_ENTRY_EDIT ); + // FIXME: HELPID + SetHelpId( ""/*HID_TOX_ENTRY_EDIT*/ ); } virtual void KeyInput( const KeyEvent& rKEvt ); @@ -1876,7 +1878,8 @@ public: bNextControl(sal_False), m_pParent(pTokenWin) { - SetHelpId(HID_TOX_ENTRY_BUTTON); + // FIXME: HELPID + SetHelpId(""/*HID_TOX_ENTRY_BUTTON*/); } virtual void KeyInput( const KeyEvent& rKEvt ); @@ -2128,7 +2131,8 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet aLevelLB.SetSpaceBetweenEntries(0); aLevelLB.SetSelectionMode( SINGLE_SELECTION ); aLevelLB.SetHighlightRange(); // select full width - aLevelLB.SetHelpId(HID_INSERT_INDEX_ENTRY_LEVEL_LB); + // FIXME: HELPID + aLevelLB.SetHelpId(""/*HID_INSERT_INDEX_ENTRY_LEVEL_LB*/); aLevelLB.Show(); aLastTOXType.eType = (TOXTypes)USHRT_MAX; @@ -3094,7 +3098,8 @@ SwTokenWindow::SwTokenWindow(SwTOXEntryTabPage* pParent, const ResId& rResId) : m_pParent(pParent) { SetStyle(GetStyle()|WB_TABSTOP|WB_DIALOGCONTROL); - SetHelpId(HID_TOKEN_WINDOW); + // FIXME: HELPID + SetHelpId(""/*HID_TOKEN_WINDOW*/); for(sal_uInt16 i = 0; i < TOKEN_END; i++) { sal_uInt16 nTextId = STR_BUTTON_TEXT_START + i; diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index be034b3909..6ac18e7e01 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -179,27 +179,47 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent, SetStyle(GetStyle()|WB_DIALOGCONTROL); FreeResource(); - aOKBT .SetHelpId(HID_INSERT_IDX_MRK_OK ); - aCancelBT .SetHelpId(HID_INSERT_IDX_MRK_CLOSE ); - aDelBT .SetHelpId(HID_INSERT_IDX_MRK_DELETE ); - aNewBT .SetHelpId(HID_INSERT_IDX_MRK_NEW ); - aPrevBT .SetHelpId(HID_INSERT_IDX_MRK_PREV ); - aPrevSameBT .SetHelpId(HID_INSERT_IDX_MRK_PREV_SAME ); - aNextBT .SetHelpId(HID_INSERT_IDX_MRK_NEXT ); - aNextSameBT .SetHelpId(HID_INSERT_IDX_MRK_NEXT_SAME ); - aTypeDCB .SetHelpId(HID_INSERT_IDX_MRK_TYPE ); - aEntryED .SetHelpId(HID_INSERT_IDX_MRK_ENTRY ); - aKeyDCB .SetHelpId(HID_INSERT_IDX_MRK_PRIM_KEY ); - aKey2DCB .SetHelpId(HID_INSERT_IDX_MRK_SEC_KEY ); - aLevelED .SetHelpId(HID_INSERT_IDX_MRK_LEVEL ); - aMainEntryCB .SetHelpId(HID_INSERT_IDX_MRK_MAIN_ENTRY); - aApplyToAllCB .SetHelpId(HID_INSERT_IDX_MRK_APPLY_ALL ); - aPhoneticED0 .SetHelpId(HID_INSERT_IDX_MRK_PHONETIC_READING ); - aPhoneticED1 .SetHelpId(HID_INSERT_IDX_MRK_PHONETIC_READING ); - aPhoneticED2 .SetHelpId(HID_INSERT_IDX_MRK_PHONETIC_READING ); - - aSearchCaseSensitiveCB.SetHelpId( HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE ); - aSearchCaseWordOnlyCB.SetHelpId( HID_INSERT_IDX_MRK_SRCH_WORDONLY ); + // FIXME: HELPID + aOKBT .SetHelpId(""/*HID_INSERT_IDX_MRK_OK*/ ); + // FIXME: HELPID + aCancelBT .SetHelpId(""/*HID_INSERT_IDX_MRK_CLOSE*/ ); + // FIXME: HELPID + aDelBT .SetHelpId(""/*HID_INSERT_IDX_MRK_DELETE*/ ); + // FIXME: HELPID + aNewBT .SetHelpId(""/*HID_INSERT_IDX_MRK_NEW*/ ); + // FIXME: HELPID + aPrevBT .SetHelpId(""/*HID_INSERT_IDX_MRK_PREV*/ ); + // FIXME: HELPID + aPrevSameBT .SetHelpId(""/*HID_INSERT_IDX_MRK_PREV_SAME*/ ); + // FIXME: HELPID + aNextBT .SetHelpId(""/*HID_INSERT_IDX_MRK_NEXT*/ ); + // FIXME: HELPID + aNextSameBT .SetHelpId(""/*HID_INSERT_IDX_MRK_NEXT_SAME*/ ); + // FIXME: HELPID + aTypeDCB .SetHelpId(""/*HID_INSERT_IDX_MRK_TYPE*/ ); + // FIXME: HELPID + aEntryED .SetHelpId(""/*HID_INSERT_IDX_MRK_ENTRY*/ ); + // FIXME: HELPID + aKeyDCB .SetHelpId(""/*HID_INSERT_IDX_MRK_PRIM_KEY*/ ); + // FIXME: HELPID + aKey2DCB .SetHelpId(""/*HID_INSERT_IDX_MRK_SEC_KEY*/ ); + // FIXME: HELPID + aLevelED .SetHelpId(""/*HID_INSERT_IDX_MRK_LEVEL*/ ); + // FIXME: HELPID + aMainEntryCB .SetHelpId(""/*HID_INSERT_IDX_MRK_MAIN_ENTRY*/); + // FIXME: HELPID + aApplyToAllCB .SetHelpId(""/*HID_INSERT_IDX_MRK_APPLY_ALL*/ ); + // FIXME: HELPID + aPhoneticED0 .SetHelpId(""/*HID_INSERT_IDX_MRK_PHONETIC_READING*/ ); + // FIXME: HELPID + aPhoneticED1 .SetHelpId(""/*HID_INSERT_IDX_MRK_PHONETIC_READING*/ ); + // FIXME: HELPID + aPhoneticED2 .SetHelpId(""/*HID_INSERT_IDX_MRK_PHONETIC_READING*/ ); + + // FIXME: HELPID + aSearchCaseSensitiveCB.SetHelpId( ""/*HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE*/ ); + // FIXME: HELPID + aSearchCaseWordOnlyCB.SetHelpId( ""/*HID_INSERT_IDX_MRK_SRCH_WORDONLY*/ ); GetParent()->SetText( SW_RESSTR( bNewMark ? STR_IDXMRK_INSERT : STR_IDXMRK_EDIT)); @@ -1275,21 +1295,30 @@ SwAuthMarkDlg::SwAuthMarkDlg( Window *pParent, SetStyle(GetStyle()|WB_DIALOGCONTROL); FreeResource(); - aFromComponentRB.SetHelpId(HID_AUTH_MARK_DLG_FROM_COMP_RB); - aFromDocContentRB.SetHelpId(HID_AUTH_MARK_DLG_FROM_DOC_RB ); - aEntryED.SetHelpId(HID_AUTH_MARK_DLG_ID_LISTBOX ); - aEntryLB.SetHelpId(HID_AUTH_MARK_DLG_ID_LISTBOX ); + // FIXME: HELPID + aFromComponentRB.SetHelpId(""/*HID_AUTH_MARK_DLG_FROM_COMP_RB*/); + // FIXME: HELPID + aFromDocContentRB.SetHelpId(""/*HID_AUTH_MARK_DLG_FROM_DOC_RB*/ ); + // FIXME: HELPID + aEntryED.SetHelpId(""/*HID_AUTH_MARK_DLG_ID_LISTBOX*/ ); + // FIXME: HELPID + aEntryLB.SetHelpId(""/*HID_AUTH_MARK_DLG_ID_LISTBOX*/ ); aFromComponentRB.Show(bNewEntry); aFromDocContentRB.Show(bNewEntry); aFromComponentRB.Check(bIsFromComponent); aFromDocContentRB.Check(!bIsFromComponent); - aOKBT .SetHelpId(HID_INSERT_AUTH_MRK_OK ); - aCancelBT .SetHelpId(HID_INSERT_AUTH_MRK_CLOSE); - aEntryED .SetHelpId(HID_INSERT_AUTH_MRK_ENTRY ); - aCreateEntryPB .SetHelpId(HID_INSERT_AUTH_MRK_CREATE_ENTRY ); - aEditEntryPB .SetHelpId(HID_INSERT_AUTH_MRK_EDIT_ENTRY ); + // FIXME: HELPID + aOKBT .SetHelpId(""/*HID_INSERT_AUTH_MRK_OK*/ ); + // FIXME: HELPID + aCancelBT .SetHelpId(""/*HID_INSERT_AUTH_MRK_CLOSE*/); + // FIXME: HELPID + aEntryED .SetHelpId(""/*HID_INSERT_AUTH_MRK_ENTRY*/ ); + // FIXME: HELPID + aCreateEntryPB .SetHelpId(""/*HID_INSERT_AUTH_MRK_CREATE_ENTRY*/ ); + // FIXME: HELPID + aEditEntryPB .SetHelpId(""/*HID_INSERT_AUTH_MRK_EDIT_ENTRY*/ ); aOKBT.SetClickHdl(LINK(this,SwAuthMarkDlg, InsertHdl)); aCancelBT.SetClickHdl(LINK(this,SwAuthMarkDlg, CloseHdl)); @@ -1741,7 +1770,8 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pTypeListBox->SetPosPixel(bLeft ? aTR1 : aTR2); pTypeListBox->Show(); pTypeListBox->SetSelectHdl(LINK(this, SwCreateAuthEntryDlg_Impl, EnableHdl)); - pTypeListBox->SetHelpId(aCurInfo.nHelpId); + // FIXME: HELPID + pTypeListBox->SetHelpId(""/*aCurInfo.nHelpId*/); } else if(AUTH_FIELD_IDENTIFIER == aCurInfo.nToxField && !m_bNewEntryMode) @@ -1769,7 +1799,8 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pIdentifierBox->SetSizePixel(aTmp); pIdentifierBox->SetPosPixel(bLeft ? aTR1 : aTR2); pIdentifierBox->Show(); - pIdentifierBox->SetHelpId(aCurInfo.nHelpId); + // FIXME: HELPID + pIdentifierBox->SetHelpId(""/*aCurInfo.nHelpId*/); } else { @@ -1780,7 +1811,8 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pEdits[nIndex]->SetPosPixel(bLeft ? aTR1 : aTR2); pEdits[nIndex]->SetText(pFields[aCurInfo.nToxField]); pEdits[nIndex]->Show(); - pEdits[nIndex]->SetHelpId(aCurInfo.nHelpId); + // FIXME: HELPID + pEdits[nIndex]->SetHelpId(""/*aCurInfo.nHelpId*/); if(AUTH_FIELD_IDENTIFIER == aCurInfo.nToxField) { pEdits[nIndex]->SetModifyHdl(LINK(this, SwCreateAuthEntryDlg_Impl, ShortNameHdl)); diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 02a342e02f..413d018900 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -447,13 +447,15 @@ bGrammarResults(false) { const String aEntry = aSuggestions[ i ]; InsertItem( nPos, aEntry, 0, i ); - SetHelpId( nPos, HID_LINGU_REPLACE); + // FIXME: HELPID + SetHelpId( nPos, ""/*HID_LINGU_REPLACE*/); if (aSuggestionImageUrl.getLength() > 0) SetItemImage( nPos, aImage ); pMenu->InsertItem( nId, aEntry ); - pMenu->SetHelpId( nPos, HID_LINGU_AUTOCORR); + // FIXME: HELPID + pMenu->SetHelpId( nPos, ""/*HID_LINGU_AUTOCORR*/); } } @@ -462,7 +464,8 @@ bGrammarResults(false) SetItemText( MN_SPELLING, aSpellingAndGrammar ); USHORT nItemPos = GetItemPos( MN_IGNORE ); InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos ); - SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION); + // FIXME: HELPID + SetHelpId( MN_IGNORE_SELECTION, ""/*HID_LINGU_IGNORE_SELECTION*/); EnableItem( MN_AUTOCORR, bEnable ); @@ -632,7 +635,8 @@ aInfo16( SW_RES(IMG_INFO_16) ) { const String aEntry = aSuggestions[ i ]; InsertItem( nItemId, aEntry, 0, nPos++ ); - SetHelpId( nItemId, HID_LINGU_REPLACE ); + // FIXME: HELPID + SetHelpId( nItemId, ""/*HID_LINGU_REPLACE*/ ); if (aSuggestionImageUrl.getLength() > 0) SetItemImage( nItemId, aImage ); @@ -647,7 +651,8 @@ aInfo16( SW_RES(IMG_INFO_16) ) SetItemText( MN_SPELLING, aSpellingAndGrammar ); USHORT nItemPos = GetItemPos( MN_IGNORE ); InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos ); - SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION); + // FIXME: HELPID + SetHelpId( MN_IGNORE_SELECTION, ""/*HID_LINGU_IGNORE_SELECTION*/); EnableItem( MN_AUTOCORR, false ); diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 5374ddd2e2..89160943c3 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -105,7 +105,8 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, 0, 160 }; - aGroupTLB.SetHelpId(HID_GLOS_GROUP_TREE); + // FIXME: HELPID + aGroupTLB.SetHelpId(""/*HID_GLOS_GROUP_TREE*/); aGroupTLB.SetTabs( &nTabs[0], MAP_APPFONT ); aGroupTLB.SetWindowBits(WB_HSCROLL|WB_CLIPCHILDREN|WB_SORT); aGroupTLB.SetSelectHdl(LINK(this, SwGlossaryGroupDlg, SelectHdl)); diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index faec81b639..142f9a16bc 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -293,7 +293,8 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame, if( bIsDocReadOnly ) aInsertBtn.Enable(sal_False); aNameED.GrabFocus(); - aCategoryBox.SetHelpId(HID_MD_GLOS_CATEGORY); + // FIXME: HELPID + aCategoryBox.SetHelpId(""/*HID_MD_GLOS_CATEGORY*/); aCategoryBox.SetWindowBits(WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL|WB_VSCROLL|WB_CLIPCHILDREN|WB_SORT); aCategoryBox.GetModel()->SetSortMode(SortAscending); aCategoryBox.SetHighlightRange(); // ueber volle Breite selektieren diff --git a/sw/source/ui/misc/insrule.cxx b/sw/source/ui/misc/insrule.cxx index c508f83dd2..29acacd9dc 100644 --- a/sw/source/ui/misc/insrule.cxx +++ b/sw/source/ui/misc/insrule.cxx @@ -77,7 +77,8 @@ SwInsertGrfRulerDlg::SwInsertGrfRulerDlg( Window* pParent ) : // Grafiknamen ermitteln GalleryExplorer::BeginLocking(GALLERY_THEME_RULERS); GalleryExplorer::FillObjList( GALLERY_THEME_RULERS, aGrfNames ); - pExampleVS->SetHelpId(HID_VS_RULER); + // FIXME: HELPID + pExampleVS->SetHelpId(""/*HID_VS_RULER*/); Color aColor(COL_WHITE); pExampleVS->InsertItem( 1, 1); pExampleVS->SetItemText( 1, sSimple); diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 2e9e318c76..b5e6adf248 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -1064,7 +1064,8 @@ SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(Window* pParent, { FreeResource(); GetUserButton()->SetText(sRemoveText); - GetUserButton()->SetHelpId(HID_NUM_RESET); + // FIXME: HELPID + GetUserButton()->SetHelpId(""/*HID_NUM_RESET*/); GetUserButton()->SetClickHdl(LINK(this, SwSvxNumBulletTabDialog, RemoveNumberingHdl)); if(!rWrtSh.GetCurNumRule()) GetUserButton()->Enable(FALSE); diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index d0bc7b5b38..e0116a8daf 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -239,7 +239,8 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent, // <-- PushButton* pUserButton = GetUserButton(); pUserButton->SetText(SW_RES(ST_FORM)); - pUserButton->SetHelpId(HID_OUTLINE_FORM); + // FIXME: HELPID + pUserButton->SetHelpId(""/*HID_OUTLINE_FORM*/); pUserButton->SetClickHdl(LINK(this, SwOutlineTabDialog, FormHdl)); FreeResource(); diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx index e2b7e6a151..ac732491c9 100644 --- a/sw/source/ui/misc/redlndlg.cxx +++ b/sw/source/ui/misc/redlndlg.cxx @@ -244,7 +244,8 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) : bRedlnAutoFmt (bAutoFmt), bInhibitActivate( false ) { - aTabPagesCTRL.SetHelpId(HID_REDLINE_CTRL); + // FIXME: HELPID + aTabPagesCTRL.SetHelpId(""/*HID_REDLINE_CTRL*/); pTPView = aTabPagesCTRL.GetViewPage(); pTable = pTPView->GetTableControl(); diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx index 174634af48..826c58373e 100644 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -90,7 +90,8 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) InsertSeparator ( 1 ); InsertSeparator (); InsertWindow( ED_FORMULA, &aEdit); - SetHelpId(ED_FORMULA, HID_EDIT_FORMULA); + // FIXME: HELPID + SetHelpId(ED_FORMULA, ""/*HID_EDIT_FORMULA*/); BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); SetItemImage( FN_FORMULA_CALC, pManager->GetImage(FN_FORMULA_CALC, bHC )); diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx index bb69819b8d..274be3fd1b 100644 --- a/sw/source/ui/ribbar/workctrl.cxx +++ b/sw/source/ui/ribbar/workctrl.cxx @@ -492,7 +492,8 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr { USHORT i; - aToolBox.SetHelpId(HID_NAVI_VS); + // FIXME: HELPID + aToolBox.SetHelpId(""/*HID_NAVI_VS*/); aToolBox.SetLineCount( 2 ); aToolBox.SetOutStyle(TOOLBOX_STYLE_FLAT); for( i = 0; i < NID_COUNT; i++) @@ -508,7 +509,8 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr nTbxBits = TIB_CHECKABLE; } aToolBox.InsertItem(nNaviId, sText, nTbxBits); - aToolBox.SetHelpId( nNaviId, aNavigationHelpIds[i] ); + // FIXME: HELPID + aToolBox.SetHelpId( nNaviId, ""/*aNavigationHelpIds[i]*/ ); } ApplyImageList(); aToolBox.InsertBreak(NID_COUNT/2); diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 195f8228f9..e053213524 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -274,11 +274,14 @@ short lcl_AskRedlineMode(Window *pWin) BUTTONDIALOG_FOCUSBUTTON; aQBox.AddButton(String(SW_RES(STR_REDLINE_ACCEPT_ALL)), RET_OK, nBtnFlags); - aQBox.GetPushButton( RET_OK )->SetHelpId(HID_AUTOFORMAT_ACCEPT); + // FIXME: HELPID + aQBox.GetPushButton( RET_OK )->SetHelpId(""/*HID_AUTOFORMAT_ACCEPT*/); aQBox.AddButton(String(SW_RES(STR_REDLINE_REJECT_ALL)), RET_CANCEL, BUTTONDIALOG_CANCELBUTTON); - aQBox.GetPushButton( RET_CANCEL )->SetHelpId(HID_AUTOFORMAT_REJECT ); + // FIXME: HELPID + aQBox.GetPushButton( RET_CANCEL )->SetHelpId(""/*HID_AUTOFORMAT_REJECT*/ ); aQBox.AddButton(String(SW_RES(STR_REDLINE_EDIT)), 2, 0); - aQBox.GetPushButton( 2 )->SetHelpId(HID_AUTOFORMAT_EDIT_CHG); + // FIXME: HELPID + aQBox.GetPushButton( 2 )->SetHelpId(""/*HID_AUTOFORMAT_EDIT_CHG*/); aQBox.SetButtonHelpText( RET_OK, aEmptyStr ); return aQBox.Execute(); diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 6f10283478..fbd3334221 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -728,7 +728,8 @@ SwPagePreViewWin::SwPagePreViewWin( Window *pParent, SwPagePreView& rPView ) maPaintedPreviewDocRect( Rectangle(0,0,0,0) ) { SetOutDevViewType( OUTDEV_VIEWTYPE_PRINTPREVIEW ); //#106611# - SetHelpId(HID_PAGEPREVIEW); + // FIXME: HELPID + SetHelpId(""/*HID_PAGEPREVIEW*/); SetFillColor( GetBackground().GetColor() ); SetLineColor( GetBackground().GetColor()); SetMapMode( MapMode(MAP_TWIP) ); @@ -1937,9 +1938,11 @@ int SwPagePreView::_CreateScrollbar( BOOL bHori ) { pPageUpBtn = new ImageButton(pMDI, SW_RES( BTN_PAGEUP ) ); - pPageUpBtn->SetHelpId(FN_PAGEUP); + // FIXME: HELPID + pPageUpBtn->SetHelpId(""/*FN_PAGEUP*/); pPageDownBtn = new ImageButton(pMDI, SW_RES( BTN_PAGEDOWN ) ); - pPageDownBtn->SetHelpId(FN_PAGEDOWN); + // FIXME: HELPID + pPageDownBtn->SetHelpId(""/*FN_PAGEDOWN*/); Link aLk( LINK( this, SwPagePreView, BtnPage ) ); pPageUpBtn->SetClickHdl( aLk ); pPageDownBtn->SetClickHdl( aLk ); diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx index f8212d8724..a11322f682 100644 --- a/sw/source/ui/uiview/viewmdi.cxx +++ b/sw/source/ui/uiview/viewmdi.cxx @@ -343,12 +343,15 @@ void SwView::CreatePageButtons(BOOL bShow) { Window *pMDI = &GetViewFrame()->GetWindow(); pPageUpBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEUP ), TRUE ); - pPageUpBtn->SetHelpId(HID_SCRL_PAGEUP); + // FIXME: HELPID + pPageUpBtn->SetHelpId(""/*HID_SCRL_PAGEUP*/); pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), FALSE ); - pPageDownBtn->SetHelpId(HID_SCRL_PAGEDOWN); + // FIXME: HELPID + pPageDownBtn->SetHelpId(""/*HID_SCRL_PAGEDOWN*/); Reference< XFrame > xFrame = GetViewFrame()->GetFrame().GetFrameInterface(); pNaviBtn = new SwNaviImageButton(pMDI, xFrame ); - pNaviBtn->SetHelpId(HID_SCRL_NAVI); + // FIXME: HELPID + pNaviBtn->SetHelpId(""/*HID_SCRL_NAVI*/); Link aLk( LINK( this, SwView, BtnPage ) ); pPageUpBtn->SetClickHdl( aLk ); pPageDownBtn->SetClickHdl( aLk ); diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index 50c19caaac..e19a82e430 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -800,13 +800,16 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c if ( ! ( rValue >>= sHelpURL ) ) throw IllegalArgumentException(); SwEditWin &rEditWin = pView->GetEditWin(); + // FIXME: HELPID + #if 0 OUString sPrefix = sHelpURL.copy ( 0, 4 ); // Make sure we have a valid string...should be in the format HID:12345 if ( ! sPrefix.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "HID:" ) ) ) throw IllegalArgumentException (); OUString sNumber = sHelpURL.copy ( 4 ); sal_uInt32 nHelpId = sNumber.toInt32(); - rEditWin.SetHelpId ( nHelpId ); + #endif + rEditWin.SetHelpId ( rtl::OUStringToOString( sHelpURL, RTL_TEXTENCODING_UTF8 ) /*nHelpId*/ ); } else throw UnknownPropertyException(); @@ -985,9 +988,14 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u { bBool = sal_False; OUStringBuffer sHelpURL; + // FIXME: HELPID + #if 0 sHelpURL.appendAscii ( "HID:" ); SwEditWin &rEditWin = pView->GetEditWin(); sHelpURL.append ( static_cast < sal_Int32 > ( rEditWin.GetHelpId() ) ); + #endif + SwEditWin &rEditWin = pView->GetEditWin(); + sHelpURL.append( rtl::OStringToOUString( rEditWin.GetHelpId(), RTL_TEXTENCODING_UTF8 ) ); rValue <<= sHelpURL.makeStringAndClear(); } else diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index 418d9ace33..6216af69e0 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -933,7 +933,8 @@ SwContentTree::SwContentTree(Window* pParent, const ResId& rResId) : { sal_uInt16 i; - SetHelpId(HID_NAVIGATOR_TREELIST); + // FIXME: HELPID + SetHelpId(""/*HID_NAVIGATOR_TREELIST*/); SetNodeDefaultImages(); SetDoubleClickHdl(LINK(this, SwContentTree, ContentDoubleClickHdl)); diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx index 31789382ec..c9b43ce81f 100644 --- a/sw/source/ui/utlui/glbltree.cxx +++ b/sw/source/ui/utlui/glbltree.cxx @@ -206,7 +206,8 @@ SwGlobalTree::SwGlobalTree(Window* pParent, const ResId& rResId) : { aContextStrings[i] = SW_RESSTR(i+ ST_GLOBAL_CONTEXT_FIRST); } - SetHelpId(HID_NAVIGATOR_GLOB_TREELIST); + // FIXME: HELPID + SetHelpId(""/*HID_NAVIGATOR_GLOB_TREELIST*/); SelectHdl(); SetDoubleClickHdl(LINK(this, SwGlobalTree, DoubleClickHdl)); EnableContextMenuHandling(); @@ -381,34 +382,44 @@ PopupMenu* SwGlobalTree::CreateContextMenu() for (USHORT i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++) { pSubPop2->InsertItem( i, aContextStrings[ST_UPDATE_SEL - ST_GLOBAL_CONTEXT_FIRST - CTX_UPDATE_SEL+ i] ); - pSubPop2->SetHelpId(i, aHelpForMenu[i]); + // FIXME: HELPID + pSubPop2->SetHelpId(i, ""/*aHelpForMenu[i]*/); } pSubPop2->EnableItem(CTX_UPDATE_SEL, 0 != (nEnableFlags & ENABLE_UPDATE_SEL)); pSubPop1->InsertItem(CTX_INSERT_ANY_INDEX, aContextStrings[ST_INDEX - ST_GLOBAL_CONTEXT_FIRST]); - pSubPop1->SetHelpId(CTX_INSERT_ANY_INDEX, aHelpForMenu[CTX_INSERT_ANY_INDEX]); + // FIXME: HELPID + pSubPop1->SetHelpId(CTX_INSERT_ANY_INDEX, ""/*aHelpForMenu[CTX_INSERT_ANY_INDEX]*/); pSubPop1->InsertItem(CTX_INSERT_FILE, aContextStrings[ST_FILE - ST_GLOBAL_CONTEXT_FIRST]); - pSubPop1->SetHelpId(CTX_INSERT_FILE, aHelpForMenu[CTX_INSERT_FILE]); + // FIXME: HELPID + pSubPop1->SetHelpId(CTX_INSERT_FILE, ""/*aHelpForMenu[CTX_INSERT_FILE]*/); pSubPop1->InsertItem(CTX_INSERT_NEW_FILE, aContextStrings[ST_NEW_FILE - ST_GLOBAL_CONTEXT_FIRST]); - pSubPop1->SetHelpId(CTX_INSERT_NEW_FILE, aHelpForMenu[CTX_INSERT_NEW_FILE]); + // FIXME: HELPID + pSubPop1->SetHelpId(CTX_INSERT_NEW_FILE, ""/*aHelpForMenu[CTX_INSERT_NEW_FILE]*/); pSubPop1->InsertItem(CTX_INSERT_TEXT, aContextStrings[ST_TEXT - ST_GLOBAL_CONTEXT_FIRST]); - pSubPop1->SetHelpId(CTX_INSERT_TEXT, aHelpForMenu[CTX_INSERT_TEXT]); + // FIXME: HELPID + pSubPop1->SetHelpId(CTX_INSERT_TEXT, ""/*aHelpForMenu[CTX_INSERT_TEXT]*/); pPop->InsertItem(CTX_UPDATE, aContextStrings[ST_UPDATE - ST_GLOBAL_CONTEXT_FIRST]); - pPop->SetHelpId(CTX_UPDATE, aHelpForMenu[CTX_UPDATE]); + // FIXME: HELPID + pPop->SetHelpId(CTX_UPDATE, ""/*aHelpForMenu[CTX_UPDATE]*/); pPop->InsertItem(CTX_EDIT, aContextStrings[ST_EDIT_CONTENT - ST_GLOBAL_CONTEXT_FIRST]); - pPop->SetHelpId(CTX_EDIT, aHelpForMenu[CTX_EDIT]); + // FIXME: HELPID + pPop->SetHelpId(CTX_EDIT, ""/*aHelpForMenu[CTX_EDIT]*/); if(nEnableFlags&ENABLE_EDIT_LINK) { pPop->InsertItem(CTX_EDIT_LINK, aContextStrings[ST_EDIT_LINK - ST_GLOBAL_CONTEXT_FIRST]); - pPop->SetHelpId(CTX_EDIT_LINK, aHelpForMenu[CTX_EDIT_LINK]); + // FIXME: HELPID + pPop->SetHelpId(CTX_EDIT_LINK, ""/*aHelpForMenu[CTX_EDIT_LINK]*/); } pPop->InsertItem(CTX_INSERT, aContextStrings[ST_INSERT - ST_GLOBAL_CONTEXT_FIRST]); - pPop->SetHelpId(CTX_INSERT, aHelpForMenu[CTX_INSERT]); + // FIXME: HELPID + pPop->SetHelpId(CTX_INSERT, ""/*aHelpForMenu[CTX_INSERT]*/); pPop->InsertSeparator() ; pPop->InsertItem(CTX_DELETE, aContextStrings[ST_DELETE - ST_GLOBAL_CONTEXT_FIRST]); - pPop->SetHelpId(CTX_DELETE, aHelpForMenu[CTX_DELETE]); + // FIXME: HELPID + pPop->SetHelpId(CTX_DELETE, ""/*aHelpForMenu[CTX_DELETE]*/); //evtl. disablen pSubPop1->EnableItem(CTX_INSERT_ANY_INDEX, 0 != (nEnableFlags & ENABLE_INSERT_IDX )); @@ -439,7 +450,8 @@ void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox) for (USHORT i = CTX_INSERT_ANY_INDEX; i <= CTX_INSERT_TEXT; i++) { pMenu->InsertItem( i, aContextStrings[ST_INDEX - ST_GLOBAL_CONTEXT_FIRST - CTX_INSERT_ANY_INDEX + i] ); - pMenu->SetHelpId(i, aHelpForMenu[i] ); + // FIXME: HELPID + pMenu->SetHelpId(i, ""/*aHelpForMenu[i]*/ ); } pMenu->EnableItem(CTX_INSERT_ANY_INDEX, 0 != (nEnableFlags & ENABLE_INSERT_IDX )); // pMenu->EnableItem(CTX_INSERT_CNTIDX, 0 != (nEnableFlags & ENABLE_INSERT_IDX )); @@ -459,7 +471,8 @@ void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox) for (USHORT i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++) { pMenu->InsertItem( i, aContextStrings[ST_UPDATE_SEL - ST_GLOBAL_CONTEXT_FIRST - CTX_UPDATE_SEL+ i] ); - pMenu->SetHelpId(i, aHelpForMenu[i] ); + // FIXME: HELPID + pMenu->SetHelpId(i, ""/*aHelpForMenu[i]*/ ); } pMenu->EnableItem(CTX_UPDATE_SEL, 0 != (nEnableFlags & ENABLE_UPDATE_SEL)); pMenu->SetSelectHdl(LINK(this, SwGlobalTree, PopupHdl)); diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 55276b7e33..74800bbaef 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -433,7 +433,8 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox ) for (USHORT i = 0; i <= REGION_MODE_EMBEDDED; i++) { pMenu->InsertItem( i + 1, aContextArr[i] ); - pMenu->SetHelpId(i + 1, HID_NAVI_DRAG_HYP + i); + // FIXME: HELPID + pMenu->SetHelpId(i + 1, ""/*HID_NAVI_DRAG_HYP + i*/); /*HID_NAVI_DRAG_HYP HID_NAVI_DRAG_LINK HID_NAVI_DRAG_COPY */ @@ -456,7 +457,8 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox ) for (USHORT i = 101; i <= 100 + MAXLEVEL; i++) { pMenu->InsertItem( i, String::CreateFromInt32(i - 100) ); - pMenu->SetHelpId( i, HID_NAVI_OUTLINES ); + // FIXME: HELPID + pMenu->SetHelpId( i, ""/*HID_NAVI_OUTLINES*/ ); } pMenu->CheckItem( aContentTree.GetOutlineLevel() + 100 ); pMenu->SetSelectHdl(LINK(this, SwNavigationPI, MenuSelectHdl)); @@ -792,9 +794,12 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, GetCreateView(); InitImageList(); - aContentToolBox.SetHelpId(HID_NAVIGATOR_TOOLBOX ); - aGlobalToolBox.SetHelpId(HID_NAVIGATOR_GLOBAL_TOOLBOX); - aDocListBox.SetHelpId(HID_NAVIGATOR_LISTBOX ); + // FIXME: HELPID + aContentToolBox.SetHelpId(""/*HID_NAVIGATOR_TOOLBOX*/ ); + // FIXME: HELPID + aGlobalToolBox.SetHelpId(""/*HID_NAVIGATOR_GLOBAL_TOOLBOX*/); + // FIXME: HELPID + aDocListBox.SetHelpId(""/*HID_NAVIGATOR_LISTBOX*/ ); nDocLBIniHeight = aDocListBox.GetSizePixel().Height(); nZoomOutInit = nZoomOut = Resource::ReadShortRes(); @@ -821,7 +826,8 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, aContentToolBox.InsertSeparator(4); aContentToolBox.InsertWindow( FN_PAGENUMBER, pEdit, 0, 4); aContentToolBox.InsertSeparator(4); - aContentToolBox.SetHelpId(FN_PAGENUMBER, HID_NAVI_TBX16); + // FIXME: HELPID + aContentToolBox.SetHelpId(FN_PAGENUMBER, ""/*HID_NAVI_TBX16*/); aContentToolBox.ShowItem( FN_PAGENUMBER ); for( USHORT i = 0; i <= REGION_MODE_EMBEDDED; i++ ) -- cgit v1.2.3 From 50a2f65083c5d2436199ae30219000a781eabc40 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 10 Jul 2010 18:21:24 +0200 Subject: CWS changehid: #i111874#: change code to support HelpIds as byte strings --- starmath/inc/dialog.hxx | 2 +- starmath/inc/smcommands.h | 68 + starmath/inc/smmod.hxx | 1 - starmath/inc/starmath.hrc | 584 ++++----- starmath/source/dialog.cxx | 11 +- starmath/source/edit.cxx | 3 +- starmath/source/smmod.cxx | 11 - starmath/source/smres.src | 93 +- starmath/source/view.cxx | 6 +- sw/inc/helpid.h | 1879 ++++++++++++++-------------- sw/inc/swabstdlg.hxx | 2 +- sw/inc/swcommands.h | 434 +++++++ sw/source/ui/app/docsh2.cxx | 38 +- sw/source/ui/app/mn.src | 155 ++- sw/source/ui/chrdlg/swbreak.src | 2 +- sw/source/ui/chrdlg/swuiccoll.cxx | 3 +- sw/source/ui/config/mailconfigpage.cxx | 6 +- sw/source/ui/config/optload.cxx | 3 +- sw/source/ui/dbui/addresslistdialog.cxx | 6 +- sw/source/ui/dbui/dbtree.cxx | 3 +- sw/source/ui/dbui/mailmergechildwindow.cxx | 9 +- sw/source/ui/dbui/mailmergewizard.cxx | 6 +- sw/source/ui/dbui/mmaddressblockpage.cxx | 28 +- sw/source/ui/dbui/mmgreetingspage.cxx | 48 +- sw/source/ui/dbui/selectdbtabledialog.cxx | 6 +- sw/source/ui/dialog/regionsw.src | 2 +- sw/source/ui/dialog/swdlgfact.cxx | 6 +- sw/source/ui/dialog/swdlgfact.hxx | 2 +- sw/source/ui/dialog/uiregionsw.cxx | 6 +- sw/source/ui/dochdl/selglos.src | 2 +- sw/source/ui/docvw/docvw.src | 22 +- sw/source/ui/docvw/edtwin.cxx | 3 +- sw/source/ui/docvw/srcedtw.cxx | 3 +- sw/source/ui/envelp/envlop1.cxx | 6 +- sw/source/ui/envelp/envprt.src | 12 +- sw/source/ui/envelp/label1.cxx | 21 +- sw/source/ui/envelp/mailmrge.src | 2 +- sw/source/ui/fldui/FldRefTreeListBox.cxx | 3 +- sw/source/ui/fldui/flddinf.cxx | 3 +- sw/source/ui/fldui/fldedt.cxx | 21 +- sw/source/ui/fldui/fldtdlg.cxx | 6 +- sw/source/ui/frmdlg/column.cxx | 3 +- sw/source/ui/inc/ribbar.hrc | 3 - sw/source/ui/inc/swmn_tmpl.hrc | 47 +- sw/source/ui/index/cnttab.cxx | 15 +- sw/source/ui/index/idxmrk.src | 12 +- sw/source/ui/index/multmrk.src | 2 +- sw/source/ui/index/swuiidxmrk.cxx | 101 +- sw/source/ui/lingu/olmenu.cxx | 15 +- sw/source/ui/misc/bookmark.src | 2 +- sw/source/ui/misc/glosbib.cxx | 3 +- sw/source/ui/misc/glossary.cxx | 3 +- sw/source/ui/misc/glossary.src | 2 +- sw/source/ui/misc/insrule.cxx | 3 +- sw/source/ui/misc/num.cxx | 3 +- sw/source/ui/misc/outline.cxx | 3 +- sw/source/ui/misc/redlndlg.cxx | 3 +- sw/source/ui/misc/srtdlg.src | 2 +- sw/source/ui/ribbar/inputwin.cxx | 3 +- sw/source/ui/ribbar/inputwin.src | 12 +- sw/source/ui/ribbar/makefile.mk | 1 - sw/source/ui/ribbar/tblctrl.src | 94 -- sw/source/ui/ribbar/workctrl.cxx | 8 +- sw/source/ui/ribbar/workctrl.src | 147 +-- sw/source/ui/shells/shells.src | 834 ------------ sw/source/ui/shells/tabsh.cxx | 3 +- sw/source/ui/shells/textsh1.cxx | 13 +- sw/source/ui/table/colwd.src | 2 +- sw/source/ui/table/convert.src | 2 +- sw/source/ui/table/instable.src | 2 +- sw/source/ui/table/mergetbl.src | 2 +- sw/source/ui/table/rowht.src | 2 +- sw/source/ui/table/splittbl.src | 2 +- sw/source/ui/uiview/pview.cxx | 9 +- sw/source/ui/uiview/pview.src | 88 -- sw/source/ui/uiview/view.src | 154 --- sw/source/ui/uiview/viewdlg2.cxx | 4 +- sw/source/ui/uiview/viewmdi.cxx | 9 +- sw/source/ui/uno/unomod.cxx | 13 +- sw/source/ui/utlui/content.cxx | 3 +- sw/source/ui/utlui/glbltree.cxx | 41 +- sw/source/ui/utlui/navipi.cxx | 27 +- sw/source/ui/web/web.src | 252 ---- sw/source/ui/wrtsh/wrtsh1.cxx | 7 +- 84 files changed, 2128 insertions(+), 3355 deletions(-) create mode 100644 starmath/inc/smcommands.h create mode 100644 sw/inc/swcommands.h delete mode 100644 sw/source/ui/ribbar/tblctrl.src (limited to 'sw/source') diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index 3e5ec1d296..89c5e2a5a9 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -257,7 +257,7 @@ class SmDistanceDialog : public ModalDialog DECL_LINK(CheckBoxClickHdl, CheckBox *); using Window::SetHelpId; - void SetHelpId(MetricField &rField, ULONG nHelpId); + void SetHelpId(MetricField &rField, const rtl::OString& sHelpId); void SetCategory(USHORT Category); void ApplyImages(); diff --git a/starmath/inc/smcommands.h b/starmath/inc/smcommands.h new file mode 100644 index 0000000000..d2f08c55f4 --- /dev/null +++ b/starmath/inc/smcommands.h @@ -0,0 +1,68 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef SM_SNCOMMANDS_HRC +#define SM_SMCOMMANDS_HRC + +#define CMD_SID_ADJUST ".uno:Adjust" +#define CMD_SID_ALIGN ".uno:ChangeAlignment" +#define CMD_SID_DISTANCE ".uno:ChangeDistance" +#define CMD_SID_FONT ".uno:ChangeFont" +#define CMD_SID_FONTSIZE ".uno:ChangeFontSize" +#define CMD_SID_CMDBOXWINDOW ".uno:CommandWindow" +#define CMD_SID_PREFERENCES ".uno:Preferences" +#define CMD_SID_TEXT ".uno:ConfigName" +#define CMD_SID_COPYOBJECT ".uno:CopyObject" +#define CMD_SID_DRAW ".uno:Draw" +#define CMD_SID_FITINWINDOW ".uno:FitInWindow" +#define CMD_SID_FORMULACURSOR ".uno:FormelCursor" +#define CMD_SID_GAPHIC_SM ".uno:Graphic" +#define CMD_SID_INSERTCOMMAND ".uno:InsertCommand" +#define CMD_SID_INSERTTEXT ".uno:InsertConfigName" +#define CMD_SID_INSERT_FORMULA ".uno:InsertFormula" +#define CMD_SID_LOADSYMBOLS ".uno:LoadSymbols" +#define CMD_SID_MODIFYSTATUS ".uno:ModifyStatus" +#define CMD_SID_NEXTERR ".uno:NextError" +#define CMD_SID_NEXTMARK ".uno:NextMark" +#define CMD_SID_PASTEOBJECT ".uno:PasteObject" +#define CMD_SID_PREVERR ".uno:PrevError" +#define CMD_SID_PREVMARK ".uno:PrevMark" +#define CMD_SID_AUTO_REDRAW ".uno:RedrawAutomatic" +#define CMD_SID_SAVESYMBOLS ".uno:SaveSymbols" +#define CMD_SID_GETEDITTEXT ".uno:SetPaperSize" +#define CMD_SID_SYMBOLS_CATALOGUE ".uno:SymbolCatalogue" +#define CMD_SID_SYMBOLS ".uno:Symbols" +#define CMD_SID_TEXTMODE ".uno:Textmode" +#define CMD_SID_TEXTSTATUS ".uno:TextStatus" +#define CMD_SID_TOOLBOXWINDOW ".uno:ToolBowWindow" +#define CMD_SID_TOOLBOX ".uno:ToolBox" +#define CMD_SID_VIEW100 ".uno:View100" +#define CMD_SID_VIEW200 ".uno:View200" +#define CMD_SID_VIEW050 ".uno:View50" +#define CMD_SID_ZOOMIN ".uno:ZoomIn" +#define CMD_SID_ZOOMOUT ".uno:ZoomOut" + +#endif diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx index 9956f81dfe..ab3fe14e2f 100644 --- a/starmath/inc/smmod.hxx +++ b/starmath/inc/smmod.hxx @@ -131,7 +131,6 @@ class SmModule : public SfxModule, utl::ConfigurationListener SvtSysLocale *pSysLocale; VirtualDevice *pVirtualDev; - virtual void FillStatusBar(StatusBar &rBar); void _CreateSysLocale() const; void _CreateVirtualDev() const; diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc index 456964a07e..da48e02a37 100644 --- a/starmath/inc/starmath.hrc +++ b/starmath/inc/starmath.hrc @@ -456,298 +456,298 @@ #define MN_SUB_SENDTO (RID_APP_START + 3120) -#define HID_SMA_OPTIONSDIALOG (HID_SMA_START + 1) -#define HID_SMA_FONTDIALOG (HID_SMA_START + 2) -#define HID_SMA_FONTSIZEDIALOG (HID_SMA_START + 3) -#define HID_SMA_FONTTYPEDIALOG (HID_SMA_START + 4) -#define HID_SMA_DISTANCEDIALOG (HID_SMA_START + 5) -#define HID_SMA_ALIGNDIALOG (HID_SMA_START + 6) -#define HID_SMA_PRINTOPTIONPAGE (HID_SMA_START + 7) -#define HID_SMA_SYMBOLDIALOG (HID_SMA_START + 8) -#define HID_SMA_SYMDEFINEDIALOG (HID_SMA_START + 9) -#define HID_SMA_EXTRAOPTIONPAGE (HID_SMA_START + 10) -#define HID_SMA_DOCSAVEQUERY (HID_SMA_START + 11) -#define HID_SMA_OBJECTSAVEQUERY (HID_SMA_START + 12) -#define HID_SMA_DEFAULTSAVEQUERY (HID_SMA_START + 13) -#define HID_SMA_ILLEGALOBJECTERROR (HID_SMA_START + 14) -#define HID_SMA_ILLEGALFILEERROR (HID_SMA_START + 15) -#define HID_SMA_WRITESYMBOLERROR (HID_SMA_START + 16) -#define HID_SMA_READSYMBOLERROR (HID_SMA_START + 17) -#define HID_SMA_NOMATHTYPEFACEWARNING (HID_SMA_START + 18) -#define HID_SMA_OBJECTNAME (HID_SMA_START + 19) -#define HID_SMA_VIEWNAME (HID_SMA_START + 20) -#define HID_SMA_UNDOEDITNAME (HID_SMA_START + 21) -#define HID_SMA_UNDOFORMATNAME (HID_SMA_START + 22) -#define HID_SMA_APPICO (HID_SMA_START + 23) -#define HID_SMA_DOCICO (HID_SMA_START + 24) -#define HID_SMA_TMPICO (HID_SMA_START + 25) -#define HID_SMA_COMMANDMENU (HID_SMA_START + 26) -#define HID_SMA_VIEWMENU (HID_SMA_START + 27) -#define HID_SMA_DISTANCEMENU (HID_SMA_START + 28) -#define HID_SMA_FONTMENU (HID_SMA_START + 29) -#define HID_SMA_STARTUPWINDOW (HID_SMA_START + 30) -#define HID_SMA_TOOLBOXWINDOW (HID_SMA_START + 31) -#define HID_SMA_CMDBOXWINDOW (HID_SMA_START + 32) -#define HID_SMA_UPDATEOBJECT (HID_SMA_START + 33) -#define HID_SMA_FONTREGULAR (HID_SMA_START + 34) -#define HID_SMA_FONTITALIC (HID_SMA_START + 35) -#define HID_SMA_FONTBOLD (HID_SMA_START + 36) -#define HID_SMA_PRINTOPTION (HID_SMA_START + 37) -#define HID_SMA_DOCUMENTSTR (HID_SMA_START + 38) -#define HID_SMA_SYMBOLFILESSTR (HID_SMA_START + 39) -#define HID_SMA_ALLFILESSTR (HID_SMA_START + 40) -#define HID_SMA_CREATORSTR (HID_SMA_START + 41) -#define HID_SMA_FILESMFTYP (HID_SMA_START + 42) -#define HID_SMA_FILESYMTYP (HID_SMA_START + 43) -#define HID_SMA_WIN_DOCUMENT (HID_SMA_START + 44) -#define HID_SMA_COMMAND_WIN_EDIT (HID_SMA_START + 45) - -#define HID_SMA_PLUSX (HID_SMA_START + 50) -#define HID_SMA_MINUSX (HID_SMA_START + 51) -#define HID_SMA_PLUSMINUSX (HID_SMA_START + 52) -#define HID_SMA_MINUSPLUSX (HID_SMA_START + 53) -#define HID_SMA_NEGX (HID_SMA_START + 54) -#define HID_SMA_XPLUSY (HID_SMA_START + 55) -#define HID_SMA_XMINUSY (HID_SMA_START + 56) -#define HID_SMA_XCDOTY (HID_SMA_START + 57) -#define HID_SMA_XTIMESY (HID_SMA_START + 58) -#define HID_SMA_XSYMTIMESY (HID_SMA_START + 59) -#define HID_SMA_XSYMDIVIDEY (HID_SMA_START + 60) -#define HID_SMA_XDIVY (HID_SMA_START + 61) -#define HID_SMA_XOVERY (HID_SMA_START + 62) -#define HID_SMA_XODIVIDEY (HID_SMA_START + 63) -#define HID_SMA_XODOTY (HID_SMA_START + 64) -#define HID_SMA_XOMINUSY (HID_SMA_START + 65) -#define HID_SMA_XOPLUSY (HID_SMA_START + 66) -#define HID_SMA_XOTIMESY (HID_SMA_START + 67) -#define HID_SMA_XANDY (HID_SMA_START + 68) -#define HID_SMA_XORY (HID_SMA_START + 69) -#define HID_SMA_XEQY (HID_SMA_START + 70) -#define HID_SMA_XNEQY (HID_SMA_START + 71) -#define HID_SMA_XLTY (HID_SMA_START + 72) -#define HID_SMA_XGTY (HID_SMA_START + 73) -#define HID_SMA_XLEY (HID_SMA_START + 74) -#define HID_SMA_XGEY (HID_SMA_START + 75) -#define HID_SMA_XLESLANTY (HID_SMA_START + 76) -#define HID_SMA_XGESLANTY (HID_SMA_START + 77) -#define HID_SMA_XLLY (HID_SMA_START + 78) -#define HID_SMA_XGGY (HID_SMA_START + 79) -#define HID_SMA_XDEFY (HID_SMA_START + 80) -#define HID_SMA_XEQUIVY (HID_SMA_START + 81) -#define HID_SMA_XAPPROXY (HID_SMA_START + 82) -#define HID_SMA_XSIMY (HID_SMA_START + 83) -#define HID_SMA_XSIMEQY (HID_SMA_START + 84) -#define HID_SMA_XPROPY (HID_SMA_START + 85) -#define HID_SMA_XORTHOY (HID_SMA_START + 86) -#define HID_SMA_XPARALLELY (HID_SMA_START + 87) -#define HID_SMA_XTOWARDY (HID_SMA_START + 88) -#define HID_SMA_XTRANSLY (HID_SMA_START + 89) -#define HID_SMA_XTRANSRY (HID_SMA_START + 90) -#define HID_SMA_XINY (HID_SMA_START + 91) -#define HID_SMA_XNOTINY (HID_SMA_START + 92) -#define HID_SMA_XOWNSY (HID_SMA_START + 93) -#define HID_SMA_XUNIONY (HID_SMA_START + 94) -#define HID_SMA_XINTERSECTIONY (HID_SMA_START + 95) -#define HID_SMA_XSETMINUSY (HID_SMA_START + 96) -#define HID_SMA_XSLASHY (HID_SMA_START + 97) -#define HID_SMA_XSUBSETY (HID_SMA_START + 98) -#define HID_SMA_XSUBSETEQY (HID_SMA_START + 99) -#define HID_SMA_XSUPSETY (HID_SMA_START + 100) -#define HID_SMA_XSUPSETEQY (HID_SMA_START + 101) -#define HID_SMA_XNSUBSETY (HID_SMA_START + 102) -#define HID_SMA_XNSUBSETEQY (HID_SMA_START + 103) -#define HID_SMA_XNSUPSETY (HID_SMA_START + 104) -#define HID_SMA_XNSUPSETEQY (HID_SMA_START + 105) -#define HID_SMA_ABSX (HID_SMA_START + 106) -#define HID_SMA_FACTX (HID_SMA_START + 107) -#define HID_SMA_SQRTX (HID_SMA_START + 108) -#define HID_SMA_NROOTXY (HID_SMA_START + 109) -#define HID_SMA_EX (HID_SMA_START + 110) -#define HID_SMA_EXPX (HID_SMA_START + 111) -#define HID_SMA_LNX (HID_SMA_START + 112) -#define HID_SMA_LOGX (HID_SMA_START + 113) -#define HID_SMA_SINX (HID_SMA_START + 114) -#define HID_SMA_COSX (HID_SMA_START + 115) -#define HID_SMA_TANX (HID_SMA_START + 116) -#define HID_SMA_COTX (HID_SMA_START + 117) -#define HID_SMA_ARCSINX (HID_SMA_START + 118) -#define HID_SMA_ARCCOSX (HID_SMA_START + 119) -#define HID_SMA_ARCTANX (HID_SMA_START + 120) -#define HID_SMA_ARCCOTX (HID_SMA_START + 121) -#define HID_SMA_SINHX (HID_SMA_START + 122) -#define HID_SMA_COSHX (HID_SMA_START + 123) -#define HID_SMA_TANHX (HID_SMA_START + 124) -#define HID_SMA_COTHX (HID_SMA_START + 125) -#define HID_SMA_ARSINHX (HID_SMA_START + 126) -#define HID_SMA_ARCOSHX (HID_SMA_START + 127) -#define HID_SMA_ARTANHX (HID_SMA_START + 128) -#define HID_SMA_ARCOTHX (HID_SMA_START + 129) -#define HID_SMA_SUMX (HID_SMA_START + 130) -#define HID_SMA_PRODX (HID_SMA_START + 131) -#define HID_SMA_COPRODX (HID_SMA_START + 132) -#define HID_SMA_LIMX (HID_SMA_START + 133) -#define HID_SMA_LIMINFX (HID_SMA_START + 134) -#define HID_SMA_LIMSUPX (HID_SMA_START + 135) -#define HID_SMA_EXISTS (HID_SMA_START + 136) -#define HID_SMA_FORALL (HID_SMA_START + 137) -#define HID_SMA_NABLA (HID_SMA_START + 138) -#define HID_SMA_INTX (HID_SMA_START + 139) -#define HID_SMA_IINTX (HID_SMA_START + 140) -#define HID_SMA_IIINTX (HID_SMA_START + 141) -#define HID_SMA_LINTX (HID_SMA_START + 142) -#define HID_SMA_LLINTX (HID_SMA_START + 143) -#define HID_SMA_LLLINTX (HID_SMA_START + 144) -#define HID_SMA_FROMX (HID_SMA_START + 145) -#define HID_SMA_TOX (HID_SMA_START + 146) -#define HID_SMA_FROMXTOY (HID_SMA_START + 147) -#define HID_SMA_XCIRCY (HID_SMA_START + 148) -#define HID_SMA_XDIVIDESY (HID_SMA_START + 149) -#define HID_SMA_XNDIVIDESY (HID_SMA_START + 150) -#define HID_SMA_DLARROW (HID_SMA_START + 151) -#define HID_SMA_DLRARROW (HID_SMA_START + 152) -#define HID_SMA_DRARROW (HID_SMA_START + 153) - -#define HID_SMA_MISC_CAT (HID_SMA_START + 154) -#define HID_SMA_UNBINOPS_CAT (HID_SMA_START + 155) -#define HID_SMA_RELATIONS_CAT (HID_SMA_START + 156) -#define HID_SMA_SETOPERATIONS_CAT (HID_SMA_START + 157) -#define HID_SMA_FUNCTIONS_CAT (HID_SMA_START + 158) -#define HID_SMA_OPERATORS_CAT (HID_SMA_START + 159) -#define HID_SMA_ATTRIBUTES_CAT (HID_SMA_START + 160) -#define HID_SMA_BRACKETS_CAT (HID_SMA_START + 161) -#define HID_SMA_FORMAT_CAT (HID_SMA_START + 162) - -#define HID_SMA_OPERATOR_WIN (HID_SMA_START + 163) -#define HID_SMA_UNBINOPS_TBX (HID_SMA_START + 164) -#define HID_SMA_RELATIONS_TBX (HID_SMA_START + 165) -#define HID_SMA_SETOPERATIONS_TBX (HID_SMA_START + 166) -#define HID_SMA_FUNCTIONS_TBX (HID_SMA_START + 167) -#define HID_SMA_OPERATORS_TBX (HID_SMA_START + 168) -#define HID_SMA_ATTRIBUTES_TBX (HID_SMA_START + 169) -#define HID_SMA_BRACKETS_TBX (HID_SMA_START + 170) -#define HID_SMA_FORMAT_TBX (HID_SMA_START + 171) -#define HID_SMA_SELECTION_TBX (HID_SMA_START + 172) -#define HID_SMA_COMMAND_WIN (HID_SMA_START + 173) -#define HID_SMA_MISC_MENU (HID_SMA_START + 174) -#define HID_SMA_FUNCTIONSOTHER1_MENU (HID_SMA_START + 175) - -#define HID_SMA_ACUTEX (HID_SMA_START + 180) -#define HID_SMA_BARX (HID_SMA_START + 181) -#define HID_SMA_BREVEX (HID_SMA_START + 182) -#define HID_SMA_CHECKX (HID_SMA_START + 183) -#define HID_SMA_CIRCLEX (HID_SMA_START + 184) -#define HID_SMA_DOTX (HID_SMA_START + 185) -#define HID_SMA_DDOTX (HID_SMA_START + 186) -#define HID_SMA_DDDOTX (HID_SMA_START + 187) -#define HID_SMA_GRAVEX (HID_SMA_START + 188) -#define HID_SMA_HATX (HID_SMA_START + 189) -#define HID_SMA_TILDEX (HID_SMA_START + 190) -#define HID_SMA_VECX (HID_SMA_START + 191) -#define HID_SMA_UNDERLINEX (HID_SMA_START + 192) -#define HID_SMA_OVERLINEX (HID_SMA_START + 193) -#define HID_SMA_OVERSTRIKEX (HID_SMA_START + 194) -#define HID_SMA_PHANTOMX (HID_SMA_START + 195) -#define HID_SMA_BOLDX (HID_SMA_START + 196) -#define HID_SMA_ITALX (HID_SMA_START + 197) -#define HID_SMA_SIZEXY (HID_SMA_START + 198) -#define HID_SMA_FONTXY (HID_SMA_START + 199) -#define HID_SMA_COLORX (HID_SMA_START + 200) -#define HID_SMA_LRGROUPX (HID_SMA_START + 201) -#define HID_SMA_LRPARENTX (HID_SMA_START + 202) -#define HID_SMA_LRBRACKETX (HID_SMA_START + 203) -#define HID_SMA_LRBRACEX (HID_SMA_START + 204) -#define HID_SMA_LRANGLEX (HID_SMA_START + 205) -#define HID_SMA_LRCEILX (HID_SMA_START + 206) -#define HID_SMA_LRFLOORX (HID_SMA_START + 207) -#define HID_SMA_LRLINEX (HID_SMA_START + 208) -#define HID_SMA_LRDLINEX (HID_SMA_START + 209) -#define HID_SMA_SLRPARENTX (HID_SMA_START + 210) -#define HID_SMA_SLRBRACKETX (HID_SMA_START + 211) -#define HID_SMA_SLRBRACEX (HID_SMA_START + 212) -#define HID_SMA_SLRANGLEX (HID_SMA_START + 213) -#define HID_SMA_SLRCEILX (HID_SMA_START + 214) -#define HID_SMA_SLRFLOORX (HID_SMA_START + 215) -#define HID_SMA_SLRLINEX (HID_SMA_START + 216) -#define HID_SMA_SLRDLINEX (HID_SMA_START + 217) -#define HID_SMA_RSUBX (HID_SMA_START + 218) -#define HID_SMA_RSUPX (HID_SMA_START + 219) -#define HID_SMA_LSUBX (HID_SMA_START + 220) -#define HID_SMA_LSUPX (HID_SMA_START + 221) -#define HID_SMA_SBLANK (HID_SMA_START + 222) -#define HID_SMA_BLANK (HID_SMA_START + 223) -#define HID_SMA_NEWLINE (HID_SMA_START + 224) -#define HID_SMA_BINOMXY (HID_SMA_START + 225) -#define HID_SMA_STACK (HID_SMA_START + 226) -#define HID_SMA_MATRIX (HID_SMA_START + 227) -#define HID_SMA_ALIGNLX (HID_SMA_START + 228) -#define HID_SMA_ALIGNCX (HID_SMA_START + 229) -#define HID_SMA_ALIGNRX (HID_SMA_START + 230) -#define HID_SMA_ALEPH (HID_SMA_START + 231) -#define HID_SMA_EMPTYSET (HID_SMA_START + 232) -#define HID_SMA_RE (HID_SMA_START + 233) -#define HID_SMA_IM (HID_SMA_START + 234) -#define HID_SMA_INFINITY (HID_SMA_START + 235) -#define HID_SMA_PARTIAL (HID_SMA_START + 236) -#define HID_SMA_WP (HID_SMA_START + 237) -#define HID_SMA_DOTSAXIS (HID_SMA_START + 238) -#define HID_SMA_DOTSUP (HID_SMA_START + 239) -#define HID_SMA_DOTSDOWN (HID_SMA_START + 240) -#define HID_SMA_DOTSLOW (HID_SMA_START + 241) -#define HID_SMA_DOTSVERT (HID_SMA_START + 242) - -#define HID_SMA_SETN (HID_SMA2_START + 1) -#define HID_SMA_SETZ (HID_SMA2_START + 2) -#define HID_SMA_SETQ (HID_SMA2_START + 3) -#define HID_SMA_SETR (HID_SMA2_START + 4) -#define HID_SMA_SETC (HID_SMA2_START + 5) -#define HID_SMA_WIDEHATX (HID_SMA2_START + 6) -#define HID_SMA_WIDETILDEX (HID_SMA2_START + 7) -#define HID_SMA_WIDEVECX (HID_SMA2_START + 8) -#define HID_SMA_CSUBX (HID_SMA2_START + 9) -#define HID_SMA_CSUPX (HID_SMA2_START + 10) -#define HID_SMA_HBAR (HID_SMA2_START + 11) -#define HID_SMA_LAMBDABAR (HID_SMA2_START + 12) -#define HID_SMA_LEFTARROW (HID_SMA2_START + 13) -#define HID_SMA_RIGHTARROW (HID_SMA2_START + 14) -#define HID_SMA_UPARROW (HID_SMA2_START + 15) -#define HID_SMA_DOWNARROW (HID_SMA2_START + 16) - -#define HID_SMA_DEFAULT_DIST (HID_SMA2_START + 17) -#define HID_SMA_LINE_DIST (HID_SMA2_START + 18) -#define HID_SMA_ROOT_DIST (HID_SMA2_START + 19) -#define HID_SMA_SUP_DIST (HID_SMA2_START + 20) -#define HID_SMA_SUB_DIST (HID_SMA2_START + 21) -#define HID_SMA_NUMERATOR_DIST (HID_SMA2_START + 22) -#define HID_SMA_DENOMINATOR_DIST (HID_SMA2_START + 23) -#define HID_SMA_FRACLINE_EXCWIDTH (HID_SMA2_START + 24) -#define HID_SMA_FRACLINE_LINEWIDTH (HID_SMA2_START + 25) -#define HID_SMA_UPPERLIMIT_DIST (HID_SMA2_START + 26) -#define HID_SMA_LOWERLIMIT_DIST (HID_SMA2_START + 27) -#define HID_SMA_BRACKET_EXCHEIGHT (HID_SMA2_START + 28) -#define HID_SMA_BRACKET_DIST (HID_SMA2_START + 29) -#define HID_SMA_MATRIXROW_DIST (HID_SMA2_START + 30) -#define HID_SMA_MATRIXCOL_DIST (HID_SMA2_START + 31) -#define HID_SMA_ATTRIBUT_DIST (HID_SMA2_START + 32) -#define HID_SMA_INTERATTRIBUT_DIST (HID_SMA2_START + 33) -#define HID_SMA_OPERATOR_EXCHEIGHT (HID_SMA2_START + 34) -#define HID_SMA_OPERATOR_DIST (HID_SMA2_START + 35) -#define HID_SMA_LEFTBORDER_DIST (HID_SMA2_START + 36) -#define HID_SMA_RIGHTBORDER_DIST (HID_SMA2_START + 37) -#define HID_SMA_UPPERBORDER_DIST (HID_SMA2_START + 38) -#define HID_SMA_LOWERBORDER_DIST (HID_SMA2_START + 39) -#define HID_SMA_SCALE_ALL_BRACKETS (HID_SMA2_START + 40) -#define HID_SMA_BRACKET_EXCHEIGHT2 (HID_SMA2_START + 41) -#define HID_SMA_LMRANGLEXY (HID_SMA2_START + 42) -#define HID_SMA_SLMRANGLEXY (HID_SMA2_START + 43) -#define HID_SMA_XWIDESLASHY (HID_SMA2_START + 44) -#define HID_SMA_XWIDEBSLASHY (HID_SMA2_START + 45) -#define HID_SMA_XOVERBRACEY (HID_SMA2_START + 46) -#define HID_SMA_XUNDERBRACEY (HID_SMA2_START + 47) -#define HID_SMA_LRDBRACKETX (HID_SMA2_START + 48) -#define HID_SMA_SLRDBRACKETX (HID_SMA2_START + 49) - -#define HID_SMA_CONTROL_SYMBOLSET_VIEW (HID_SMA2_START + 50) -#define HID_SMA_CONTROL_FONTCHAR_VIEW (HID_SMA2_START + 51) +#define HID_SMA_OPTIONSDIALOG "STARMATH_HID_SMA_OPTIONSDIALOG" +#define HID_SMA_FONTDIALOG "STARMATH_HID_SMA_FONTDIALOG" +#define HID_SMA_FONTSIZEDIALOG "STARMATH_HID_SMA_FONTSIZEDIALOG" +#define HID_SMA_FONTTYPEDIALOG "STARMATH_HID_SMA_FONTTYPEDIALOG" +#define HID_SMA_DISTANCEDIALOG "STARMATH_HID_SMA_DISTANCEDIALOG" +#define HID_SMA_ALIGNDIALOG "STARMATH_HID_SMA_ALIGNDIALOG" +#define HID_SMA_PRINTOPTIONPAGE "STARMATH_HID_SMA_PRINTOPTIONPAGE" +#define HID_SMA_SYMBOLDIALOG "STARMATH_HID_SMA_SYMBOLDIALOG" +#define HID_SMA_SYMDEFINEDIALOG "STARMATH_HID_SMA_SYMDEFINEDIALOG" +#define HID_SMA_EXTRAOPTIONPAGE "STARMATH_HID_SMA_EXTRAOPTIONPAGE" +#define HID_SMA_DOCSAVEQUERY "STARMATH_HID_SMA_DOCSAVEQUERY" +#define HID_SMA_OBJECTSAVEQUERY "STARMATH_HID_SMA_OBJECTSAVEQUERY" +#define HID_SMA_DEFAULTSAVEQUERY "STARMATH_HID_SMA_DEFAULTSAVEQUERY" +#define HID_SMA_ILLEGALOBJECTERROR "STARMATH_HID_SMA_ILLEGALOBJECTERROR" +#define HID_SMA_ILLEGALFILEERROR "STARMATH_HID_SMA_ILLEGALFILEERROR" +#define HID_SMA_WRITESYMBOLERROR "STARMATH_HID_SMA_WRITESYMBOLERROR" +#define HID_SMA_READSYMBOLERROR "STARMATH_HID_SMA_READSYMBOLERROR" +#define HID_SMA_NOMATHTYPEFACEWARNING "STARMATH_HID_SMA_NOMATHTYPEFACEWARNING" +#define HID_SMA_OBJECTNAME "STARMATH_HID_SMA_OBJECTNAME" +#define HID_SMA_VIEWNAME "STARMATH_HID_SMA_VIEWNAME" +#define HID_SMA_UNDOEDITNAME "STARMATH_HID_SMA_UNDOEDITNAME" +#define HID_SMA_UNDOFORMATNAME "STARMATH_HID_SMA_UNDOFORMATNAME" +#define HID_SMA_APPICO "STARMATH_HID_SMA_APPICO" +#define HID_SMA_DOCICO "STARMATH_HID_SMA_DOCICO" +#define HID_SMA_TMPICO "STARMATH_HID_SMA_TMPICO" +#define HID_SMA_COMMANDMENU "STARMATH_HID_SMA_COMMANDMENU" +#define HID_SMA_VIEWMENU "STARMATH_HID_SMA_VIEWMENU" +#define HID_SMA_DISTANCEMENU "STARMATH_HID_SMA_DISTANCEMENU" +#define HID_SMA_FONTMENU "STARMATH_HID_SMA_FONTMENU" +#define HID_SMA_STARTUPWINDOW "STARMATH_HID_SMA_STARTUPWINDOW" +#define HID_SMA_TOOLBOXWINDOW "STARMATH_HID_SMA_TOOLBOXWINDOW" +#define HID_SMA_CMDBOXWINDOW "STARMATH_HID_SMA_CMDBOXWINDOW" +#define HID_SMA_UPDATEOBJECT "STARMATH_HID_SMA_UPDATEOBJECT" +#define HID_SMA_FONTREGULAR "STARMATH_HID_SMA_FONTREGULAR" +#define HID_SMA_FONTITALIC "STARMATH_HID_SMA_FONTITALIC" +#define HID_SMA_FONTBOLD "STARMATH_HID_SMA_FONTBOLD" +#define HID_SMA_PRINTOPTION "STARMATH_HID_SMA_PRINTOPTION" +#define HID_SMA_DOCUMENTSTR "STARMATH_HID_SMA_DOCUMENTSTR" +#define HID_SMA_SYMBOLFILESSTR "STARMATH_HID_SMA_SYMBOLFILESSTR" +#define HID_SMA_ALLFILESSTR "STARMATH_HID_SMA_ALLFILESSTR" +#define HID_SMA_CREATORSTR "STARMATH_HID_SMA_CREATORSTR" +#define HID_SMA_FILESMFTYP "STARMATH_HID_SMA_FILESMFTYP" +#define HID_SMA_FILESYMTYP "STARMATH_HID_SMA_FILESYMTYP" +#define HID_SMA_WIN_DOCUMENT "STARMATH_HID_SMA_WIN_DOCUMENT" +#define HID_SMA_COMMAND_WIN_EDIT "STARMATH_HID_SMA_COMMAND_WIN_EDIT" + +#define HID_SMA_PLUSX "STARMATH_HID_SMA_PLUSX" +#define HID_SMA_MINUSX "STARMATH_HID_SMA_MINUSX" +#define HID_SMA_PLUSMINUSX "STARMATH_HID_SMA_PLUSMINUSX" +#define HID_SMA_MINUSPLUSX "STARMATH_HID_SMA_MINUSPLUSX" +#define HID_SMA_NEGX "STARMATH_HID_SMA_NEGX" +#define HID_SMA_XPLUSY "STARMATH_HID_SMA_XPLUSY" +#define HID_SMA_XMINUSY "STARMATH_HID_SMA_XMINUSY" +#define HID_SMA_XCDOTY "STARMATH_HID_SMA_XCDOTY" +#define HID_SMA_XTIMESY "STARMATH_HID_SMA_XTIMESY" +#define HID_SMA_XSYMTIMESY "STARMATH_HID_SMA_XSYMTIMESY" +#define HID_SMA_XSYMDIVIDEY "STARMATH_HID_SMA_XSYMDIVIDEY" +#define HID_SMA_XDIVY "STARMATH_HID_SMA_XDIVY" +#define HID_SMA_XOVERY "STARMATH_HID_SMA_XOVERY" +#define HID_SMA_XODIVIDEY "STARMATH_HID_SMA_XODIVIDEY" +#define HID_SMA_XODOTY "STARMATH_HID_SMA_XODOTY" +#define HID_SMA_XOMINUSY "STARMATH_HID_SMA_XOMINUSY" +#define HID_SMA_XOPLUSY "STARMATH_HID_SMA_XOPLUSY" +#define HID_SMA_XOTIMESY "STARMATH_HID_SMA_XOTIMESY" +#define HID_SMA_XANDY "STARMATH_HID_SMA_XANDY" +#define HID_SMA_XORY "STARMATH_HID_SMA_XORY" +#define HID_SMA_XEQY "STARMATH_HID_SMA_XEQY" +#define HID_SMA_XNEQY "STARMATH_HID_SMA_XNEQY" +#define HID_SMA_XLTY "STARMATH_HID_SMA_XLTY" +#define HID_SMA_XGTY "STARMATH_HID_SMA_XGTY" +#define HID_SMA_XLEY "STARMATH_HID_SMA_XLEY" +#define HID_SMA_XGEY "STARMATH_HID_SMA_XGEY" +#define HID_SMA_XLESLANTY "STARMATH_HID_SMA_XLESLANTY" +#define HID_SMA_XGESLANTY "STARMATH_HID_SMA_XGESLANTY" +#define HID_SMA_XLLY "STARMATH_HID_SMA_XLLY" +#define HID_SMA_XGGY "STARMATH_HID_SMA_XGGY" +#define HID_SMA_XDEFY "STARMATH_HID_SMA_XDEFY" +#define HID_SMA_XEQUIVY "STARMATH_HID_SMA_XEQUIVY" +#define HID_SMA_XAPPROXY "STARMATH_HID_SMA_XAPPROXY" +#define HID_SMA_XSIMY "STARMATH_HID_SMA_XSIMY" +#define HID_SMA_XSIMEQY "STARMATH_HID_SMA_XSIMEQY" +#define HID_SMA_XPROPY "STARMATH_HID_SMA_XPROPY" +#define HID_SMA_XORTHOY "STARMATH_HID_SMA_XORTHOY" +#define HID_SMA_XPARALLELY "STARMATH_HID_SMA_XPARALLELY" +#define HID_SMA_XTOWARDY "STARMATH_HID_SMA_XTOWARDY" +#define HID_SMA_XTRANSLY "STARMATH_HID_SMA_XTRANSLY" +#define HID_SMA_XTRANSRY "STARMATH_HID_SMA_XTRANSRY" +#define HID_SMA_XINY "STARMATH_HID_SMA_XINY" +#define HID_SMA_XNOTINY "STARMATH_HID_SMA_XNOTINY" +#define HID_SMA_XOWNSY "STARMATH_HID_SMA_XOWNSY" +#define HID_SMA_XUNIONY "STARMATH_HID_SMA_XUNIONY" +#define HID_SMA_XINTERSECTIONY "STARMATH_HID_SMA_XINTERSECTIONY" +#define HID_SMA_XSETMINUSY "STARMATH_HID_SMA_XSETMINUSY" +#define HID_SMA_XSLASHY "STARMATH_HID_SMA_XSLASHY" +#define HID_SMA_XSUBSETY "STARMATH_HID_SMA_XSUBSETY" +#define HID_SMA_XSUBSETEQY "STARMATH_HID_SMA_XSUBSETEQY" +#define HID_SMA_XSUPSETY "STARMATH_HID_SMA_XSUPSETY" +#define HID_SMA_XSUPSETEQY "STARMATH_HID_SMA_XSUPSETEQY" +#define HID_SMA_XNSUBSETY "STARMATH_HID_SMA_XNSUBSETY" +#define HID_SMA_XNSUBSETEQY "STARMATH_HID_SMA_XNSUBSETEQY" +#define HID_SMA_XNSUPSETY "STARMATH_HID_SMA_XNSUPSETY" +#define HID_SMA_XNSUPSETEQY "STARMATH_HID_SMA_XNSUPSETEQY" +#define HID_SMA_ABSX "STARMATH_HID_SMA_ABSX" +#define HID_SMA_FACTX "STARMATH_HID_SMA_FACTX" +#define HID_SMA_SQRTX "STARMATH_HID_SMA_SQRTX" +#define HID_SMA_NROOTXY "STARMATH_HID_SMA_NROOTXY" +#define HID_SMA_EX "STARMATH_HID_SMA_EX" +#define HID_SMA_EXPX "STARMATH_HID_SMA_EXPX" +#define HID_SMA_LNX "STARMATH_HID_SMA_LNX" +#define HID_SMA_LOGX "STARMATH_HID_SMA_LOGX" +#define HID_SMA_SINX "STARMATH_HID_SMA_SINX" +#define HID_SMA_COSX "STARMATH_HID_SMA_COSX" +#define HID_SMA_TANX "STARMATH_HID_SMA_TANX" +#define HID_SMA_COTX "STARMATH_HID_SMA_COTX" +#define HID_SMA_ARCSINX "STARMATH_HID_SMA_ARCSINX" +#define HID_SMA_ARCCOSX "STARMATH_HID_SMA_ARCCOSX" +#define HID_SMA_ARCTANX "STARMATH_HID_SMA_ARCTANX" +#define HID_SMA_ARCCOTX "STARMATH_HID_SMA_ARCCOTX" +#define HID_SMA_SINHX "STARMATH_HID_SMA_SINHX" +#define HID_SMA_COSHX "STARMATH_HID_SMA_COSHX" +#define HID_SMA_TANHX "STARMATH_HID_SMA_TANHX" +#define HID_SMA_COTHX "STARMATH_HID_SMA_COTHX" +#define HID_SMA_ARSINHX "STARMATH_HID_SMA_ARSINHX" +#define HID_SMA_ARCOSHX "STARMATH_HID_SMA_ARCOSHX" +#define HID_SMA_ARTANHX "STARMATH_HID_SMA_ARTANHX" +#define HID_SMA_ARCOTHX "STARMATH_HID_SMA_ARCOTHX" +#define HID_SMA_SUMX "STARMATH_HID_SMA_SUMX" +#define HID_SMA_PRODX "STARMATH_HID_SMA_PRODX" +#define HID_SMA_COPRODX "STARMATH_HID_SMA_COPRODX" +#define HID_SMA_LIMX "STARMATH_HID_SMA_LIMX" +#define HID_SMA_LIMINFX "STARMATH_HID_SMA_LIMINFX" +#define HID_SMA_LIMSUPX "STARMATH_HID_SMA_LIMSUPX" +#define HID_SMA_EXISTS "STARMATH_HID_SMA_EXISTS" +#define HID_SMA_FORALL "STARMATH_HID_SMA_FORALL" +#define HID_SMA_NABLA "STARMATH_HID_SMA_NABLA" +#define HID_SMA_INTX "STARMATH_HID_SMA_INTX" +#define HID_SMA_IINTX "STARMATH_HID_SMA_IINTX" +#define HID_SMA_IIINTX "STARMATH_HID_SMA_IIINTX" +#define HID_SMA_LINTX "STARMATH_HID_SMA_LINTX" +#define HID_SMA_LLINTX "STARMATH_HID_SMA_LLINTX" +#define HID_SMA_LLLINTX "STARMATH_HID_SMA_LLLINTX" +#define HID_SMA_FROMX "STARMATH_HID_SMA_FROMX" +#define HID_SMA_TOX "STARMATH_HID_SMA_TOX" +#define HID_SMA_FROMXTOY "STARMATH_HID_SMA_FROMXTOY" +#define HID_SMA_XCIRCY "STARMATH_HID_SMA_XCIRCY" +#define HID_SMA_XDIVIDESY "STARMATH_HID_SMA_XDIVIDESY" +#define HID_SMA_XNDIVIDESY "STARMATH_HID_SMA_XNDIVIDESY" +#define HID_SMA_DLARROW "STARMATH_HID_SMA_DLARROW" +#define HID_SMA_DLRARROW "STARMATH_HID_SMA_DLRARROW" +#define HID_SMA_DRARROW "STARMATH_HID_SMA_DRARROW" + +#define HID_SMA_MISC_CAT "STARMATH_HID_SMA_MISC_CAT" +#define HID_SMA_UNBINOPS_CAT "STARMATH_HID_SMA_UNBINOPS_CAT" +#define HID_SMA_RELATIONS_CAT "STARMATH_HID_SMA_RELATIONS_CAT" +#define HID_SMA_SETOPERATIONS_CAT "STARMATH_HID_SMA_SETOPERATIONS_CAT" +#define HID_SMA_FUNCTIONS_CAT "STARMATH_HID_SMA_FUNCTIONS_CAT" +#define HID_SMA_OPERATORS_CAT "STARMATH_HID_SMA_OPERATORS_CAT" +#define HID_SMA_ATTRIBUTES_CAT "STARMATH_HID_SMA_ATTRIBUTES_CAT" +#define HID_SMA_BRACKETS_CAT "STARMATH_HID_SMA_BRACKETS_CAT" +#define HID_SMA_FORMAT_CAT "STARMATH_HID_SMA_FORMAT_CAT" + +#define HID_SMA_OPERATOR_WIN "STARMATH_HID_SMA_OPERATOR_WIN" +#define HID_SMA_UNBINOPS_TBX "STARMATH_HID_SMA_UNBINOPS_TBX" +#define HID_SMA_RELATIONS_TBX "STARMATH_HID_SMA_RELATIONS_TBX" +#define HID_SMA_SETOPERATIONS_TBX "STARMATH_HID_SMA_SETOPERATIONS_TBX" +#define HID_SMA_FUNCTIONS_TBX "STARMATH_HID_SMA_FUNCTIONS_TBX" +#define HID_SMA_OPERATORS_TBX "STARMATH_HID_SMA_OPERATORS_TBX" +#define HID_SMA_ATTRIBUTES_TBX "STARMATH_HID_SMA_ATTRIBUTES_TBX" +#define HID_SMA_BRACKETS_TBX "STARMATH_HID_SMA_BRACKETS_TBX" +#define HID_SMA_FORMAT_TBX "STARMATH_HID_SMA_FORMAT_TBX" +#define HID_SMA_SELECTION_TBX "STARMATH_HID_SMA_SELECTION_TBX" +#define HID_SMA_COMMAND_WIN "STARMATH_HID_SMA_COMMAND_WIN" +#define HID_SMA_MISC_MENU "STARMATH_HID_SMA_MISC_MENU" +#define HID_SMA_FUNCTIONSOTHER1_MENU "STARMATH_HID_SMA_FUNCTIONSOTHER1_MENU" + +#define HID_SMA_ACUTEX "STARMATH_HID_SMA_ACUTEX" +#define HID_SMA_BARX "STARMATH_HID_SMA_BARX" +#define HID_SMA_BREVEX "STARMATH_HID_SMA_BREVEX" +#define HID_SMA_CHECKX "STARMATH_HID_SMA_CHECKX" +#define HID_SMA_CIRCLEX "STARMATH_HID_SMA_CIRCLEX" +#define HID_SMA_DOTX "STARMATH_HID_SMA_DOTX" +#define HID_SMA_DDOTX "STARMATH_HID_SMA_DDOTX" +#define HID_SMA_DDDOTX "STARMATH_HID_SMA_DDDOTX" +#define HID_SMA_GRAVEX "STARMATH_HID_SMA_GRAVEX" +#define HID_SMA_HATX "STARMATH_HID_SMA_HATX" +#define HID_SMA_TILDEX "STARMATH_HID_SMA_TILDEX" +#define HID_SMA_VECX "STARMATH_HID_SMA_VECX" +#define HID_SMA_UNDERLINEX "STARMATH_HID_SMA_UNDERLINEX" +#define HID_SMA_OVERLINEX "STARMATH_HID_SMA_OVERLINEX" +#define HID_SMA_OVERSTRIKEX "STARMATH_HID_SMA_OVERSTRIKEX" +#define HID_SMA_PHANTOMX "STARMATH_HID_SMA_PHANTOMX" +#define HID_SMA_BOLDX "STARMATH_HID_SMA_BOLDX" +#define HID_SMA_ITALX "STARMATH_HID_SMA_ITALX" +#define HID_SMA_SIZEXY "STARMATH_HID_SMA_SIZEXY" +#define HID_SMA_FONTXY "STARMATH_HID_SMA_FONTXY" +#define HID_SMA_COLORX "STARMATH_HID_SMA_COLORX" +#define HID_SMA_LRGROUPX "STARMATH_HID_SMA_LRGROUPX" +#define HID_SMA_LRPARENTX "STARMATH_HID_SMA_LRPARENTX" +#define HID_SMA_LRBRACKETX "STARMATH_HID_SMA_LRBRACKETX" +#define HID_SMA_LRBRACEX "STARMATH_HID_SMA_LRBRACEX" +#define HID_SMA_LRANGLEX "STARMATH_HID_SMA_LRANGLEX" +#define HID_SMA_LRCEILX "STARMATH_HID_SMA_LRCEILX" +#define HID_SMA_LRFLOORX "STARMATH_HID_SMA_LRFLOORX" +#define HID_SMA_LRLINEX "STARMATH_HID_SMA_LRLINEX" +#define HID_SMA_LRDLINEX "STARMATH_HID_SMA_LRDLINEX" +#define HID_SMA_SLRPARENTX "STARMATH_HID_SMA_SLRPARENTX" +#define HID_SMA_SLRBRACKETX "STARMATH_HID_SMA_SLRBRACKETX" +#define HID_SMA_SLRBRACEX "STARMATH_HID_SMA_SLRBRACEX" +#define HID_SMA_SLRANGLEX "STARMATH_HID_SMA_SLRANGLEX" +#define HID_SMA_SLRCEILX "STARMATH_HID_SMA_SLRCEILX" +#define HID_SMA_SLRFLOORX "STARMATH_HID_SMA_SLRFLOORX" +#define HID_SMA_SLRLINEX "STARMATH_HID_SMA_SLRLINEX" +#define HID_SMA_SLRDLINEX "STARMATH_HID_SMA_SLRDLINEX" +#define HID_SMA_RSUBX "STARMATH_HID_SMA_RSUBX" +#define HID_SMA_RSUPX "STARMATH_HID_SMA_RSUPX" +#define HID_SMA_LSUBX "STARMATH_HID_SMA_LSUBX" +#define HID_SMA_LSUPX "STARMATH_HID_SMA_LSUPX" +#define HID_SMA_SBLANK "STARMATH_HID_SMA_SBLANK" +#define HID_SMA_BLANK "STARMATH_HID_SMA_BLANK" +#define HID_SMA_NEWLINE "STARMATH_HID_SMA_NEWLINE" +#define HID_SMA_BINOMXY "STARMATH_HID_SMA_BINOMXY" +#define HID_SMA_STACK "STARMATH_HID_SMA_STACK" +#define HID_SMA_MATRIX "STARMATH_HID_SMA_MATRIX" +#define HID_SMA_ALIGNLX "STARMATH_HID_SMA_ALIGNLX" +#define HID_SMA_ALIGNCX "STARMATH_HID_SMA_ALIGNCX" +#define HID_SMA_ALIGNRX "STARMATH_HID_SMA_ALIGNRX" +#define HID_SMA_ALEPH "STARMATH_HID_SMA_ALEPH" +#define HID_SMA_EMPTYSET "STARMATH_HID_SMA_EMPTYSET" +#define HID_SMA_RE "STARMATH_HID_SMA_RE" +#define HID_SMA_IM "STARMATH_HID_SMA_IM" +#define HID_SMA_INFINITY "STARMATH_HID_SMA_INFINITY" +#define HID_SMA_PARTIAL "STARMATH_HID_SMA_PARTIAL" +#define HID_SMA_WP "STARMATH_HID_SMA_WP" +#define HID_SMA_DOTSAXIS "STARMATH_HID_SMA_DOTSAXIS" +#define HID_SMA_DOTSUP "STARMATH_HID_SMA_DOTSUP" +#define HID_SMA_DOTSDOWN "STARMATH_HID_SMA_DOTSDOWN" +#define HID_SMA_DOTSLOW "STARMATH_HID_SMA_DOTSLOW" +#define HID_SMA_DOTSVERT "STARMATH_HID_SMA_DOTSVERT" + +#define HID_SMA_SETN "STARMATH_HID_SMA_SETN" +#define HID_SMA_SETZ "STARMATH_HID_SMA_SETZ" +#define HID_SMA_SETQ "STARMATH_HID_SMA_SETQ" +#define HID_SMA_SETR "STARMATH_HID_SMA_SETR" +#define HID_SMA_SETC "STARMATH_HID_SMA_SETC" +#define HID_SMA_WIDEHATX "STARMATH_HID_SMA_WIDEHATX" +#define HID_SMA_WIDETILDEX "STARMATH_HID_SMA_WIDETILDEX" +#define HID_SMA_WIDEVECX "STARMATH_HID_SMA_WIDEVECX" +#define HID_SMA_CSUBX "STARMATH_HID_SMA_CSUBX" +#define HID_SMA_CSUPX "STARMATH_HID_SMA_CSUPX" +#define HID_SMA_HBAR "STARMATH_HID_SMA_HBAR" +#define HID_SMA_LAMBDABAR "STARMATH_HID_SMA_LAMBDABAR" +#define HID_SMA_LEFTARROW "STARMATH_HID_SMA_LEFTARROW" +#define HID_SMA_RIGHTARROW "STARMATH_HID_SMA_RIGHTARROW" +#define HID_SMA_UPARROW "STARMATH_HID_SMA_UPARROW" +#define HID_SMA_DOWNARROW "STARMATH_HID_SMA_DOWNARROW" + +#define HID_SMA_DEFAULT_DIST "STARMATH_HID_SMA_DEFAULT_DIST" +#define HID_SMA_LINE_DIST "STARMATH_HID_SMA_LINE_DIST" +#define HID_SMA_ROOT_DIST "STARMATH_HID_SMA_ROOT_DIST" +#define HID_SMA_SUP_DIST "STARMATH_HID_SMA_SUP_DIST" +#define HID_SMA_SUB_DIST "STARMATH_HID_SMA_SUB_DIST" +#define HID_SMA_NUMERATOR_DIST "STARMATH_HID_SMA_NUMERATOR_DIST" +#define HID_SMA_DENOMINATOR_DIST "STARMATH_HID_SMA_DENOMINATOR_DIST" +#define HID_SMA_FRACLINE_EXCWIDTH "STARMATH_HID_SMA_FRACLINE_EXCWIDTH" +#define HID_SMA_FRACLINE_LINEWIDTH "STARMATH_HID_SMA_FRACLINE_LINEWIDTH" +#define HID_SMA_UPPERLIMIT_DIST "STARMATH_HID_SMA_UPPERLIMIT_DIST" +#define HID_SMA_LOWERLIMIT_DIST "STARMATH_HID_SMA_LOWERLIMIT_DIST" +#define HID_SMA_BRACKET_EXCHEIGHT "STARMATH_HID_SMA_BRACKET_EXCHEIGHT" +#define HID_SMA_BRACKET_DIST "STARMATH_HID_SMA_BRACKET_DIST" +#define HID_SMA_MATRIXROW_DIST "STARMATH_HID_SMA_MATRIXROW_DIST" +#define HID_SMA_MATRIXCOL_DIST "STARMATH_HID_SMA_MATRIXCOL_DIST" +#define HID_SMA_ATTRIBUT_DIST "STARMATH_HID_SMA_ATTRIBUT_DIST" +#define HID_SMA_INTERATTRIBUT_DIST "STARMATH_HID_SMA_INTERATTRIBUT_DIST" +#define HID_SMA_OPERATOR_EXCHEIGHT "STARMATH_HID_SMA_OPERATOR_EXCHEIGHT" +#define HID_SMA_OPERATOR_DIST "STARMATH_HID_SMA_OPERATOR_DIST" +#define HID_SMA_LEFTBORDER_DIST "STARMATH_HID_SMA_LEFTBORDER_DIST" +#define HID_SMA_RIGHTBORDER_DIST "STARMATH_HID_SMA_RIGHTBORDER_DIST" +#define HID_SMA_UPPERBORDER_DIST "STARMATH_HID_SMA_UPPERBORDER_DIST" +#define HID_SMA_LOWERBORDER_DIST "STARMATH_HID_SMA_LOWERBORDER_DIST" +#define HID_SMA_SCALE_ALL_BRACKETS "STARMATH_HID_SMA_SCALE_ALL_BRACKETS" +#define HID_SMA_BRACKET_EXCHEIGHT2 "STARMATH_HID_SMA_BRACKET_EXCHEIGHT2" +#define HID_SMA_LMRANGLEXY "STARMATH_HID_SMA_LMRANGLEXY" +#define HID_SMA_SLMRANGLEXY "STARMATH_HID_SMA_SLMRANGLEXY" +#define HID_SMA_XWIDESLASHY "STARMATH_HID_SMA_XWIDESLASHY" +#define HID_SMA_XWIDEBSLASHY "STARMATH_HID_SMA_XWIDEBSLASHY" +#define HID_SMA_XOVERBRACEY "STARMATH_HID_SMA_XOVERBRACEY" +#define HID_SMA_XUNDERBRACEY "STARMATH_HID_SMA_XUNDERBRACEY" +#define HID_SMA_LRDBRACKETX "STARMATH_HID_SMA_LRDBRACKETX" +#define HID_SMA_SLRDBRACKETX "STARMATH_HID_SMA_SLRDBRACKETX" + +#define HID_SMA_CONTROL_SYMBOLSET_VIEW "STARMATH_HID_SMA_CONTROL_SYMBOLSET_VIEW" +#define HID_SMA_CONTROL_FONTCHAR_VIEW "STARMATH_HID_SMA_CONTROL_FONTCHAR_VIEW" #define BMP_ARROW_RIGHT 1 diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 9a2f8f4c4a..eaa032d259 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -764,7 +764,7 @@ IMPL_LINK( SmDistanceDialog, CheckBoxClickHdl, CheckBox *, pCheckBox ) } -void SmDistanceDialog::SetHelpId(MetricField &rField, ULONG nHelpId) +void SmDistanceDialog::SetHelpId(MetricField &rField, const rtl::OString& sHelpId) { //! HelpID's die auf diese Weise explizit gesetzt werden, muessen im //! util Verzeichnis im File "hidother.src" mit Hilfe von "hidspecial" @@ -775,9 +775,7 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, ULONG nHelpId) DBG_ASSERT(aEmptyText.Len() == 0, "Sm: Ooops..."); #endif - // FIXME: HELPID - (void)nHelpId; - rField.SetHelpId(""/*nHelpId*/); + rField.SetHelpId(sHelpId); rField.SetHelpText(aEmptyText); // since MetricField inherits from SpinField which has a sub Edit field @@ -786,8 +784,7 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, ULONG nHelpId) Edit *pSubEdit = rField.GetSubEdit(); if (pSubEdit) { - // FIXME: HELPID - pSubEdit->SetHelpId(""/*nHelpId*/); + pSubEdit->SetHelpId(sHelpId); pSubEdit->SetHelpText(aEmptyText); } } @@ -805,7 +802,7 @@ void SmDistanceDialog::SetCategory(USHORT nCategory) #if OSL_DEBUG_LEVEL > 1 DBG_ASSERT(NOCATEGORIES == 10, "Sm : Array passt nicht zu Anzahl der Kategorien"); #endif - ULONG __READONLY_DATA aCatMf2Hid[10][4] = + const char* __READONLY_DATA aCatMf2Hid[10][4] = { { HID_SMA_DEFAULT_DIST, HID_SMA_LINE_DIST, HID_SMA_ROOT_DIST, 0 }, { HID_SMA_SUP_DIST, HID_SMA_SUB_DIST , 0, 0 }, diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index 2a35a5362f..20e9b35a55 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -107,8 +107,7 @@ SmEditWindow::SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin ) : pVScrollBar (0), pScrollBox (0) { - // FIXME: HELPID - SetHelpId(""/*HID_SMA_COMMAND_WIN_EDIT*/); + SetHelpId(HID_SMA_COMMAND_WIN_EDIT); SetMapMode(MAP_PIXEL); // Even RTL languages don't use RTL for math diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx index 7009a912c7..8467139018 100644 --- a/starmath/source/smmod.cxx +++ b/starmath/source/smmod.cxx @@ -336,17 +336,6 @@ void SmModule::GetState(SfxItemSet &rSet) } } -void SmModule::FillStatusBar(StatusBar &rBar) -{ - rBar.InsertItem(SID_TEXTSTATUS, 300, SIB_LEFT | SIB_IN); - rBar.InsertItem(SID_ATTR_ZOOM, rBar.GetTextWidth(C2S(" 100% "))); - rBar.InsertItem(SID_MODIFYSTATUS, rBar.GetTextWidth(C2S(" * "))); - rBar.InsertItem( SID_SIGNATURE, XmlSecStatusBarControl::GetDefItemWidth( rBar ), SIB_USERDRAW ); - // FIXME: HELPID - rBar.SetHelpId(SID_SIGNATURE, ""/*SID_SIGNATURE*/); - -} - /* -----------------15.02.99 12:45------------------- * * --------------------------------------------------*/ diff --git a/starmath/source/smres.src b/starmath/source/smres.src index ae6bb31fd0..da1fd2f009 100644 --- a/starmath/source/smres.src +++ b/starmath/source/smres.src @@ -31,6 +31,7 @@ #include "starmath.hrc" #include "dialog.hrc" #include "toolbox.hrc" +#include "smcommands.h" #define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x0000; Blue = 0xff00; } #define IMAGE_STDBTN_COLOR_HC IMAGE_STDBTN_COLOR @@ -109,7 +110,7 @@ ModalDialog RID_FONTSIZEDIALOG Moveable = TRUE ; OutputSize = TRUE ; SVLook = TRUE ; - HelpID = SID_FONTSIZE ; + HelpId = CMD_SID_FONTSIZE ; Size = MAP_APPFONT ( 171 , 120 ) ; Text [ en-US ] = "Font Sizes" ; FixedText 1 @@ -269,7 +270,7 @@ ModalDialog RID_FONTTYPEDIALOG { OutputSize = TRUE ; SVLook = TRUE ; - HelpID = SID_FONT ; + HelpId = CMD_SID_FONT ; Size = MAP_APPFONT ( 282 , 153 ) ; Text [ en-US ] = "Fonts" ; Moveable = TRUE ; @@ -425,7 +426,7 @@ ModalDialog RID_DISTANCEDIALOG Moveable = TRUE ; OutputSize = TRUE ; SVLook = TRUE ; - HelpID = SID_DISTANCE ; + HelpId = CMD_SID_DISTANCE ; Size = MAP_APPFONT ( 240 , 90 ) ; Text [ en-US ] = "Spacing" ; FixedText 1 @@ -919,7 +920,7 @@ ModalDialog RID_ALIGNDIALOG Moveable = TRUE ; OutputSize = TRUE ; SVLook = TRUE ; - HelpID = SID_ALIGN ; + HelpId = CMD_SID_ALIGN ; Size = MAP_APPFONT ( 139 , 66 ) ; Text [ en-US ] = "Alignment" ; RadioButton 1 @@ -1402,37 +1403,37 @@ Menu RID_VIEWMENU MenuItem { Identifier = SID_VIEW050 ; - HelpID = SID_VIEW050 ; + HelpId = CMD_SID_VIEW050 ; Text [ en-US ] = "~View 50%" ; }; MenuItem { Identifier = SID_VIEW100 ; - HelpID = SID_VIEW100 ; + HelpId = CMD_SID_VIEW100 ; Text [ en-US ] = "View ~100%" ; }; MenuItem { Identifier = SID_VIEW200 ; - HelpID = SID_VIEW200 ; + HelpId = CMD_SID_VIEW200 ; Text [ en-US ] = "View ~200%" ; }; MenuItem { Identifier = SID_ZOOMIN ; - HelpID = SID_ZOOMIN ; + HelpId = CMD_SID_ZOOMIN ; Text [ en-US ] = "~Zoom In" ; }; MenuItem { Identifier = SID_ZOOMOUT ; - HelpID = SID_ZOOMOUT ; + HelpId = CMD_SID_ZOOMOUT ; Text [ en-US ] = "Zoom ~Out" ; }; MenuItem { Identifier = SID_ADJUST ; - HelpID = SID_ADJUST ; + HelpId = CMD_SID_ADJUST ; Text [ en-US ] = "~Display All" ; }; MenuItem @@ -1442,7 +1443,7 @@ Menu RID_VIEWMENU MenuItem { Identifier = SID_DRAW ; - HelpID = SID_DRAW ; + HelpId = CMD_SID_DRAW ; Text [ en-US ] = "U~pdate" ; }; }; @@ -3478,76 +3479,6 @@ String RID_ERR_RIGHTEXPECTED Text [ en-US ] = "'RIGHT' expected" ; }; -#include "menu.src" - -ToolBox RID_MATH_TOOLBOX -{ - HelpId = RID_MATH_TOOLBOX ; - Customize = TRUE ; - LineSpacing = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - Scroll = TRUE ; - HideWhenDeactivate = TRUE ; - Border = TRUE ; - SVLook = TRUE ; - Align = BOXALIGN_LEFT ; - Size = MAP_APPFONT ( 0 , 0 ) ; - MenuStrings = TRUE ; - ItemList = - { - ToolBoxItem - { - Identifier = SID_ZOOMIN ; - HelpID = SID_ZOOMIN ; - Text [ en-US ] = "Zoom In" ; - }; - ToolBoxItem - { - Identifier = SID_ZOOMOUT ; - HelpID = SID_ZOOMOUT ; - Text [ en-US ] = "Zoom Out" ; - }; - ToolBoxItem - { - Identifier = SID_VIEW100 ; - HelpID = SID_VIEW100 ; - Text [ en-US ] = "Zoom 100%" ; - }; - ToolBoxItem - { - Identifier = SID_ADJUST ; - HelpID = SID_ADJUST ; - Text [ en-US ] = "Entire Formula" ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_DRAW ; - HelpID = SID_DRAW ; - Text [ en-US ] = "Refresh" ; - }; - ToolBoxItem - { - Identifier = SID_FORMULACURSOR ; - HelpID = SID_FORMULACURSOR ; - Text [ en-US ] = "Formula Cursor"; - }; - ToolBoxItem - { - Identifier = SID_SYMBOLS_CATALOGUE ; - HelpID = SID_SYMBOLS_CATALOGUE ; - Text [ en-US ] = "Symbols" ; - }; - }; -}; - String RID_MATH_TOOLBOX { Text [ en-US ] = "Main Toolbar" ; diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 570d6f485f..d8d6c657b0 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -111,10 +111,8 @@ SmGraphicWindow::SmGraphicWindow(SmViewShell* pShell): SetTotalSize(); - // FIXME: HELPID - SetHelpId(""/*HID_SMA_WIN_DOCUMENT*/); - // FIXME: HELPID - SetUniqueId(""/*HID_SMA_WIN_DOCUMENT*/); + SetHelpId(HID_SMA_WIN_DOCUMENT); + SetUniqueId(HID_SMA_WIN_DOCUMENT); } SmGraphicWindow::~SmGraphicWindow() diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h index 0ff576a0cc..f4c365252a 100644 --- a/sw/inc/helpid.h +++ b/sw/inc/helpid.h @@ -28,956 +28,971 @@ #include #endif +#include "swcommands.h" +#include +#include + #define HID_BASE HID_APP_START -#define HID_BIB_BASE (HID_BASE + 1) -#define HID_DBSEL (HID_BASE + 2) -#define HID_DBEDIT (HID_BASE + 3) -#define HID_PRINT_OPTION (HID_BASE + 4) -#define HID_MERGE_PRINTMONITOR (HID_BASE + 5) -#define HID_FLD_INPUT (HID_BASE + 6) -#define HID_CONFIG_MISC (HID_BASE + 7) -#define HID_CONFIG_PATH (HID_BASE + 8) -#define HID_CONFIG_TB (HID_BASE + 9) -#define HID_PG_FOOTNOTE (HID_BASE + 10) -#define HID_FORMAT_GRAPHIC (HID_BASE + 11) -#define HID_FILTERSTATUS (HID_BASE + 12) -#define HID_DOCINFO_EDT (HID_BASE + 13) -#define HID_DBLOGON (HID_BASE + 14) -#define HID_MAC_ASSIGN (HID_BASE + 15) -#define HID_CONFIG_MN (HID_BASE + 16) -#define HID_PAPERSIZE (HID_BASE + 17) -#define HID_PASSWD (HID_BASE + 18) -#define HID_SPELLING_OPTIONS (HID_BASE + 19) -#define HID_HYPHENATE_OPTIONS (HID_BASE + 20) -#define HID_FORMAT_COLUMN (HID_BASE + 21) -#define HID_CONFIG_SAVE (HID_BASE + 22) -#define HID_NUM_NAMES (HID_BASE + 23) -#define HID_SYMBOL_SELECT (HID_BASE + 24) -#define HID_CONFIG_KY (HID_BASE + 25) -#define HID_LINKEDIT (HID_BASE + 26) -#define HID_GRAPHIC_PREVIEW (HID_BASE + 28) -#define HID_DICTIONARY (HID_BASE + 29) -#define HID_SET_STYLE (HID_BASE + 30) -#define HID_RIBBONBAR (HID_BASE + 31) -#define HID_STATUSLINE (HID_BASE + 32) -#define HID_DOCBAR (HID_BASE + 33) -#define HID_VRULER (HID_BASE + 34) -#define HID_MAKRO_WINDOW (HID_BASE + 35) -#define HID_ENVELOP_FORMAT (HID_BASE + 37) -#define HID_ENVELOP_PRINTER (HID_BASE + 38) - -#define HID_HEADER_FOOTER_DLG (HID_BASE + 39) -#define HID_GRID_DLG (HID_BASE + 40) -#define HID_USER_ADDRESS_DLG (HID_BASE + 41) -#define HID_SELECT_FAX_DLG (HID_BASE + 42) - -#define HID_LABEL_FORMAT (HID_BASE + 43) -#define HID_BRSORT (HID_BASE + 44) -#define HID_BRSEEK (HID_BASE + 45) -#define HID_BRCFG (HID_BASE + 46) - -#define HID_FORMEDT_CONTENT (HID_BASE + 47) -#define HID_FORMEDT_USER (HID_BASE + 48) -#define HID_FORMEDT_INDEX (HID_BASE + 49) - -#define HID_SCRL_PAGEUP (HID_BASE + 50) -#define HID_SCRL_PAGEDOWN (HID_BASE + 51) - -#define HID_DRAW_WIN (HID_BASE + 52) -#define HID_EDIT_WIN (HID_BASE + 53) - -#define HID_INSERT_CTRL (HID_BASE + 54) // TbxControl Einfuegen -#define HID_INSERT_OBJ_CTRL (HID_BASE + 55) -#define HID_INSERT_FIELD_CTRL (HID_BASE + 56) - -#define HID_SOURCEVIEW (HID_BASE + 57) -#define HID_TBL_OPT_CTRL (HID_BASE + 58) -#define HID_AUTOFORMAT_CLB (HID_BASE + 59) - -#define HID_SCRL_NAVI (HID_BASE + 60) -#define HID_NAVI_DRAG_HYP (HID_BASE + 61) -#define HID_NAVI_DRAG_LINK (HID_BASE + 62) -#define HID_NAVI_DRAG_COPY (HID_BASE + 63) -#define HID_NAVI_OUTLINES (HID_BASE + 64) - -#define HID_AUTOFORMAT_EXEC (HID_BASE + 65) -#define HID_AUTOFORMAT_CLOSE (HID_BASE + 66) - -#define HID_PAGEPREVIEW (HID_BASE + 67) -#define HID_SOURCE_EDITWIN (HID_BASE + 68) +#define HID_BIB_BASE "SW_HID_BIB_BASE" +#define HID_DBSEL "SW_HID_DBSEL" +#define HID_DBEDIT "SW_HID_DBEDIT" +#define HID_PRINT_OPTION "SW_HID_PRINT_OPTION" +#define HID_MERGE_PRINTMONITOR "SW_HID_MERGE_PRINTMONITOR" +#define HID_FLD_INPUT "SW_HID_FLD_INPUT" +#define HID_CONFIG_MISC "SW_HID_CONFIG_MISC" +#define HID_CONFIG_PATH "SW_HID_CONFIG_PATH" +#define HID_CONFIG_TB "SW_HID_CONFIG_TB" +#define HID_PG_FOOTNOTE "SW_HID_PG_FOOTNOTE" +#define HID_FORMAT_GRAPHIC "SW_HID_FORMAT_GRAPHIC" +#define HID_FILTERSTATUS "SW_HID_FILTERSTATUS" +#define HID_DOCINFO_EDT "SW_HID_DOCINFO_EDT" +#define HID_DBLOGON "SW_HID_DBLOGON" +#define HID_MAC_ASSIGN "SW_HID_MAC_ASSIGN" +#define HID_CONFIG_MN "SW_HID_CONFIG_MN" +#define HID_PAPERSIZE "SW_HID_PAPERSIZE" +#define HID_PASSWD "SW_HID_PASSWD" +#define HID_SPELLING_OPTIONS "SW_HID_SPELLING_OPTIONS" +#define HID_HYPHENATE_OPTIONS "SW_HID_HYPHENATE_OPTIONS" +#define HID_FORMAT_COLUMN "SW_HID_FORMAT_COLUMN" +#define HID_CONFIG_SAVE "SW_HID_CONFIG_SAVE" +#define HID_NUM_NAMES "SW_HID_NUM_NAMES" +#define HID_SYMBOL_SELECT "SW_HID_SYMBOL_SELECT" +#define HID_CONFIG_KY "SW_HID_CONFIG_KY" +#define HID_LINKEDIT "SW_HID_LINKEDIT" +#define HID_GRAPHIC_PREVIEW "SW_HID_GRAPHIC_PREVIEW" +#define HID_DICTIONARY "SW_HID_DICTIONARY" +#define HID_SET_STYLE "SW_HID_SET_STYLE" +#define HID_RIBBONBAR "SW_HID_RIBBONBAR" +#define HID_STATUSLINE "SW_HID_STATUSLINE" +#define HID_DOCBAR "SW_HID_DOCBAR" +#define HID_VRULER "SW_HID_VRULER" +#define HID_MAKRO_WINDOW "SW_HID_MAKRO_WINDOW" +#define HID_ENVELOP_FORMAT "SW_HID_ENVELOP_FORMAT" +#define HID_ENVELOP_PRINTER "SW_HID_ENVELOP_PRINTER" + +#define HID_HEADER_FOOTER_DLG "SW_HID_HEADER_FOOTER_DLG" +#define HID_GRID_DLG "SW_HID_GRID_DLG" +#define HID_USER_ADDRESS_DLG "SW_HID_USER_ADDRESS_DLG" +#define HID_SELECT_FAX_DLG "SW_HID_SELECT_FAX_DLG" + +#define HID_LABEL_FORMAT "SW_HID_LABEL_FORMAT" +#define HID_BRSORT "SW_HID_BRSORT" +#define HID_BRSEEK "SW_HID_BRSEEK" +#define HID_BRCFG "SW_HID_BRCFG" + +#define HID_FORMEDT_CONTENT "SW_HID_FORMEDT_CONTENT" +#define HID_FORMEDT_USER "SW_HID_FORMEDT_USER" +#define HID_FORMEDT_INDEX "SW_HID_FORMEDT_INDEX" + +#define HID_SCRL_PAGEUP "SW_HID_SCRL_PAGEUP" +#define HID_SCRL_PAGEDOWN "SW_HID_SCRL_PAGEDOWN" + +#define HID_DRAW_WIN "SW_HID_DRAW_WIN" +#define HID_EDIT_WIN "SW_HID_EDIT_WIN" + +#define HID_INSERT_CTRL "SW_HID_INSERT_CTRL" // TbxControl Einfuegen +#define HID_INSERT_OBJ_CTRL "SW_HID_INSERT_OBJ_CTRL" +#define HID_INSERT_FIELD_CTRL "SW_HID_INSERT_FIELD_CTRL" + +#define HID_SOURCEVIEW "SW_HID_SOURCEVIEW" +#define HID_TBL_OPT_CTRL "SW_HID_TBL_OPT_CTRL" +#define HID_AUTOFORMAT_CLB "SW_HID_AUTOFORMAT_CLB" + +#define HID_SCRL_NAVI "SW_HID_SCRL_NAVI" +#define HID_NAVI_DRAG_HYP "SW_HID_NAVI_DRAG_HYP" +#define HID_NAVI_DRAG_LINK "SW_HID_NAVI_DRAG_LINK" +#define HID_NAVI_DRAG_COPY "SW_HID_NAVI_DRAG_COPY" +#define HID_NAVI_OUTLINES "SW_HID_NAVI_OUTLINES" + +#define HID_AUTOFORMAT_EXEC "SW_HID_AUTOFORMAT_EXEC" +#define HID_AUTOFORMAT_CLOSE "SW_HID_AUTOFORMAT_CLOSE" + +#define HID_PAGEPREVIEW "SW_HID_PAGEPREVIEW" +#define HID_SOURCE_EDITWIN "SW_HID_SOURCE_EDITWIN" // Dialog Help-IDs ********************************************************** -#define HID_CONVERT_FROM (HID_BASE + 200) -#define HID_CONVERT_TO (HID_BASE + 201) -#define HID_EDIT_POSTIT (HID_BASE + 202) -#define HID_INSERT_CHART (HID_BASE + 203) -#define HID_PAGE_PREVIEW (HID_BASE + 204) -#define HID_INSERT_HYPERLINK (HID_BASE + 205) -#define HID_NAVIGATOR_TREELIST (HID_BASE + 206) -#define HID_DLG_CAPTION (HID_BASE + 207) -#define HID_DLG_GLOSS_DECIDE (HID_BASE + 208) -#define HID_NAVIGATOR_TOOLBOX (HID_BASE + 209) -#define HID_NAVIGATOR_LISTBOX (HID_BASE + 210) -#define HID_NUM_BULLET_DLG (HID_BASE + 211) -#define HID_VS_SINGLENUM (HID_BASE + 212) -#define HID_VS_NUM (HID_BASE + 213) -#define HID_VS_BULLET (HID_BASE + 214) -#define HID_VS_NUMBMP (HID_BASE + 215) -#define HID_VS_RULER (HID_BASE + 216) -#define HID_RULER_DIALOG (HID_BASE + 217) -#define HID_INSERT_ABSTRACT (HID_BASE + 218) -#define HID_NAVI_TBX1 (HID_BASE + 219) -#define HID_NAVI_TBX2 (HID_BASE + 220) -#define HID_NAVI_TBX3 (HID_BASE + 221) -#define HID_NAVI_TBX4 (HID_BASE + 222) -#define HID_NAVI_TBX5 (HID_BASE + 223) -#define HID_NAVI_TBX6 (HID_BASE + 224) -#define HID_NAVI_TBX7 (HID_BASE + 225) -#define HID_NAVI_TBX8 (HID_BASE + 226) -#define HID_NAVI_TBX9 (HID_BASE + 227) -#define HID_NAVI_TBX10 (HID_BASE + 228) -#define HID_NAVI_TBX11 (HID_BASE + 229) -#define HID_NAVI_TBX12 (HID_BASE + 230) -#define HID_NAVI_TBX13 (HID_BASE + 231) -#define HID_NAVI_TBX14 (HID_BASE + 232) -#define HID_NAVI_TBX15 (HID_BASE + 233) -#define HID_NAVI_VS (HID_BASE + 234) -#define HID_NUM_FORMAT_BTN (HID_BASE + 235) -#define HID_PPREV_ZOOM (HID_BASE + 236) -#define HID_NAVI_TBX16 (HID_BASE + 237) -#define HID_LTEMPL_TEXT (HID_BASE + 238) -#define HID_LTEMPL_FRAME (HID_BASE + 239) -#define HID_LTEMPL_PAGE (HID_BASE + 240) -#define HID_LTEMPL_OVERRIDE (HID_BASE + 241) -#define HID_LTEMPL_TEMPLATES (HID_BASE + 242) -#define HID_NAVI_TBX17 (HID_BASE + 243) -#define HID_NAVI_TBX18 (HID_BASE + 244) -#define HID_NAVI_TBX19 (HID_BASE + 245) -#define HID_NAVI_TBX20 (HID_BASE + 246) -#define HID_NAVI_TBX21 (HID_BASE + 247) -#define HID_NAVI_TBX22 (HID_BASE + 248) -#define HID_NAVI_TBX23 (HID_BASE + 249) -#define HID_NAVI_TBX24 (HID_BASE + 250) -#define HID_NAVIGATOR_GLOBAL_TOOLBOX (HID_BASE + 251) -#define HID_NAVIGATOR_GLOB_TREELIST (HID_BASE + 252) -#define HID_GLOS_GROUP_TREE (HID_BASE + 253) -#define HID_GLBLTREE_UPDATE (HID_BASE + 254) -#define HID_GLBLTREE_INSERT (HID_BASE + 255) -#define HID_GLBLTREE_EDIT (HID_BASE + 256) -#define HID_GLBLTREE_DEL (HID_BASE + 257) -#define HID_GLBLTREE_INS_IDX (HID_BASE + 258) -#define HID_GLBLTREE_INS_CNTIDX (HID_BASE + 259) -#define HID_GLBLTREE_INS_USRIDX (HID_BASE + 260) -#define HID_GLBLTREE_INS_FILE (HID_BASE + 261) -#define HID_GLBLTREE_INS_NEW_FILE (HID_BASE + 262) -#define HID_GLBLTREE_INS_TEXT (HID_BASE + 263) -#define HID_GLBLTREE_UPD_SEL (HID_BASE + 264) -#define HID_GLBLTREE_UPD_IDX (HID_BASE + 265) -#define HID_GLBLTREE_UPD_LINK (HID_BASE + 266) -#define HID_GLBLTREEUPD_ALL (HID_BASE + 267) -#define HID_NUM_OUTL_NAMED_NUMS (HID_BASE + 268) -#define HID_NUM_OUTL_NUM_SAVEAS (HID_BASE + 269) -#define HID_NUM_NAMED_NUMS (HID_BASE + 270) -#define HID_NUM_NUM_SAVEAS (HID_BASE + 271) -#define HID_NUM_STD_NUMBER (HID_BASE + 272) -#define HID_NUM_DEL_NUMBER (HID_BASE + 273) -#define HID_NUM_STD_BULLET (HID_BASE + 274) -#define HID_NUM_DEL_BULLET (HID_BASE + 275) -#define HID_NAVI_CONTENT (HID_BASE + 276) -#define HID_NAVI_GLOBAL (HID_BASE + 277) -#define HID_LTEMPL_NUMBERING (HID_BASE + 278) -#define HID_FLDVAR_APPLY (HID_BASE + 279) -#define HID_FLDVAR_DELETE (HID_BASE + 280) -#define HID_FLDEDT_ADDRESS (HID_BASE + 281) -#define HID_SORT_ACTION (HID_BASE + 282) -#define HID_SORT_AUTHOR (HID_BASE + 283) -#define HID_SORT_DATE (HID_BASE + 284) -#define HID_SORT_COMMENT (HID_BASE + 285) -#define HID_SW_SORT_POSITION (HID_BASE + 286) -#define HID_SYNC_BTN (HID_BASE + 287) -#define HID_EDIT_COMMENT (HID_BASE + 288) -#define HID_SEL_TEMPLATE (HID_BASE + 289) -#define HID_DLG_SEQUENCE_OPTION (HID_BASE + 290) -#define HID_DLG_FLDEDT_NEXT (HID_BASE + 291) -#define HID_DLG_FLDEDT_PREV (HID_BASE + 292) -#define HID_DLG_FLDEDT_ADDRESS (HID_BASE + 293) -#define HID_DLG_PRV_PRT_OPTIONS (HID_BASE + 294) - -#define HID_FILEDLG_CHARDLG (HID_BASE + 295) -#define HID_FILEDLG_LOADTEMPLATE (HID_BASE + 296) -#define HID_FILEDLG_ROMENU (HID_BASE + 297) -#define HID_FILEDLG_MAILMRGE1 (HID_BASE + 298) -#define HID_FILEDLG_MAILMRGE2 (HID_BASE + 299) -#define HID_FILEDLG_FRMPAGE (HID_BASE + 300) -#define HID_FILEDLG_SRCVIEW (HID_BASE + 301) -#define HID_FILEDLG_WIZDOKU (HID_BASE + 302) -#define HID_PREVIEW_ZOOM (HID_BASE + 303) - -#define HID_REDLINE_AUTOFMT_ACCEPT (HID_BASE + 304) -#define HID_MULTI_TOX_DLG (HID_BASE + 305) -#define HID_ASCII_FILTER (HID_BASE + 306) -#define HID_GLBLTREE_EDIT_LINK (HID_BASE + 307) -#define HID_FORMAT_NAME_OBJECT_NAME (HID_BASE + 308)// #100286# -#define HID_REFSELECTION_TOOLTIP (HID_BASE + 309) // #i83479# +#define HID_CONVERT_FROM "SW_HID_CONVERT_FROM" +#define HID_CONVERT_TO "SW_HID_CONVERT_TO" +#define HID_EDIT_POSTIT "SW_HID_EDIT_POSTIT" +#define HID_INSERT_CHART "SW_HID_INSERT_CHART" +#define HID_PAGE_PREVIEW "SW_HID_PAGE_PREVIEW" +#define HID_INSERT_HYPERLINK "SW_HID_INSERT_HYPERLINK" +#define HID_NAVIGATOR_TREELIST "SW_HID_NAVIGATOR_TREELIST" +#define HID_DLG_CAPTION "SW_HID_DLG_CAPTION" +#define HID_DLG_GLOSS_DECIDE "SW_HID_DLG_GLOSS_DECIDE" +#define HID_NAVIGATOR_TOOLBOX "SW_HID_NAVIGATOR_TOOLBOX" +#define HID_NAVIGATOR_LISTBOX "SW_HID_NAVIGATOR_LISTBOX" +#define HID_NUM_BULLET_DLG "SW_HID_NUM_BULLET_DLG" +#define HID_VS_SINGLENUM "SW_HID_VS_SINGLENUM" +#define HID_VS_NUM "SW_HID_VS_NUM" +#define HID_VS_BULLET "SW_HID_VS_BULLET" +#define HID_VS_NUMBMP "SW_HID_VS_NUMBMP" +#define HID_VS_RULER "SW_HID_VS_RULER" +#define HID_RULER_DIALOG "SW_HID_RULER_DIALOG" +#define HID_INSERT_ABSTRACT "SW_HID_INSERT_ABSTRACT" +#define HID_NAVI_TBX1 "SW_HID_NAVI_TBX1" +#define HID_NAVI_TBX2 "SW_HID_NAVI_TBX2" +#define HID_NAVI_TBX3 "SW_HID_NAVI_TBX3" +#define HID_NAVI_TBX4 "SW_HID_NAVI_TBX4" +#define HID_NAVI_TBX5 "SW_HID_NAVI_TBX5" +#define HID_NAVI_TBX6 "SW_HID_NAVI_TBX6" +#define HID_NAVI_TBX7 "SW_HID_NAVI_TBX7" +#define HID_NAVI_TBX8 "SW_HID_NAVI_TBX8" +#define HID_NAVI_TBX9 "SW_HID_NAVI_TBX9" +#define HID_NAVI_TBX10 "SW_HID_NAVI_TBX10" +#define HID_NAVI_TBX11 "SW_HID_NAVI_TBX11" +#define HID_NAVI_TBX12 "SW_HID_NAVI_TBX12" +#define HID_NAVI_TBX13 "SW_HID_NAVI_TBX13" +#define HID_NAVI_TBX14 "SW_HID_NAVI_TBX14" +#define HID_NAVI_TBX15 "SW_HID_NAVI_TBX15" +#define HID_NAVI_VS "SW_HID_NAVI_VS" +#define HID_NUM_FORMAT_BTN "SW_HID_NUM_FORMAT_BTN" +#define HID_PPREV_ZOOM "SW_HID_PPREV_ZOOM" +#define HID_NAVI_TBX16 "SW_HID_NAVI_TBX16" +#define HID_LTEMPL_TEXT "SW_HID_LTEMPL_TEXT" +#define HID_LTEMPL_FRAME "SW_HID_LTEMPL_FRAME" +#define HID_LTEMPL_PAGE "SW_HID_LTEMPL_PAGE" +#define HID_LTEMPL_OVERRIDE "SW_HID_LTEMPL_OVERRIDE" +#define HID_LTEMPL_TEMPLATES "SW_HID_LTEMPL_TEMPLATES" +#define HID_NAVI_TBX17 "SW_HID_NAVI_TBX17" +#define HID_NAVI_TBX18 "SW_HID_NAVI_TBX18" +#define HID_NAVI_TBX19 "SW_HID_NAVI_TBX19" +#define HID_NAVI_TBX20 "SW_HID_NAVI_TBX20" +#define HID_NAVI_TBX21 "SW_HID_NAVI_TBX21" +#define HID_NAVI_TBX22 "SW_HID_NAVI_TBX22" +#define HID_NAVI_TBX23 "SW_HID_NAVI_TBX23" +#define HID_NAVI_TBX24 "SW_HID_NAVI_TBX24" +#define HID_NAVIGATOR_GLOBAL_TOOLBOX "SW_HID_NAVIGATOR_GLOBAL_TOOLBOX" +#define HID_NAVIGATOR_GLOB_TREELIST "SW_HID_NAVIGATOR_GLOB_TREELIST" +#define HID_GLOS_GROUP_TREE "SW_HID_GLOS_GROUP_TREE" +#define HID_GLBLTREE_UPDATE "SW_HID_GLBLTREE_UPDATE" +#define HID_GLBLTREE_INSERT "SW_HID_GLBLTREE_INSERT" +#define HID_GLBLTREE_EDIT "SW_HID_GLBLTREE_EDIT" +#define HID_GLBLTREE_DEL "SW_HID_GLBLTREE_DEL" +#define HID_GLBLTREE_INS_IDX "SW_HID_GLBLTREE_INS_IDX" +#define HID_GLBLTREE_INS_CNTIDX "SW_HID_GLBLTREE_INS_CNTIDX" +#define HID_GLBLTREE_INS_USRIDX "SW_HID_GLBLTREE_INS_USRIDX" +#define HID_GLBLTREE_INS_FILE "SW_HID_GLBLTREE_INS_FILE" +#define HID_GLBLTREE_INS_NEW_FILE "SW_HID_GLBLTREE_INS_NEW_FILE" +#define HID_GLBLTREE_INS_TEXT "SW_HID_GLBLTREE_INS_TEXT" +#define HID_GLBLTREE_UPD_SEL "SW_HID_GLBLTREE_UPD_SEL" +#define HID_GLBLTREE_UPD_IDX "SW_HID_GLBLTREE_UPD_IDX" +#define HID_GLBLTREE_UPD_LINK "SW_HID_GLBLTREE_UPD_LINK" +#define HID_GLBLTREEUPD_ALL "SW_HID_GLBLTREEUPD_ALL" +#define HID_NUM_OUTL_NAMED_NUMS "SW_HID_NUM_OUTL_NAMED_NUMS" +#define HID_NUM_OUTL_NUM_SAVEAS "SW_HID_NUM_OUTL_NUM_SAVEAS" +#define HID_NUM_NAMED_NUMS "SW_HID_NUM_NAMED_NUMS" +#define HID_NUM_NUM_SAVEAS "SW_HID_NUM_NUM_SAVEAS" +#define HID_NUM_STD_NUMBER "SW_HID_NUM_STD_NUMBER" +#define HID_NUM_DEL_NUMBER "SW_HID_NUM_DEL_NUMBER" +#define HID_NUM_STD_BULLET "SW_HID_NUM_STD_BULLET" +#define HID_NUM_DEL_BULLET "SW_HID_NUM_DEL_BULLET" +#define HID_NAVI_CONTENT "SW_HID_NAVI_CONTENT" +#define HID_NAVI_GLOBAL "SW_HID_NAVI_GLOBAL" +#define HID_LTEMPL_NUMBERING "SW_HID_LTEMPL_NUMBERING" +#define HID_FLDVAR_APPLY "SW_HID_FLDVAR_APPLY" +#define HID_FLDVAR_DELETE "SW_HID_FLDVAR_DELETE" +#define HID_FLDEDT_ADDRESS "SW_HID_FLDEDT_ADDRESS" +#define HID_SORT_ACTION "SW_HID_SORT_ACTION" +#define HID_SORT_AUTHOR "SW_HID_SORT_AUTHOR" +#define HID_SORT_DATE "SW_HID_SORT_DATE" +#define HID_SORT_COMMENT "SW_HID_SORT_COMMENT" +#define HID_SW_SORT_POSITION "SW_HID_SW_SORT_POSITION" +#define HID_SYNC_BTN "SW_HID_SYNC_BTN" +#define HID_EDIT_COMMENT "SW_HID_EDIT_COMMENT" +#define HID_SEL_TEMPLATE "SW_HID_SEL_TEMPLATE" +#define HID_DLG_SEQUENCE_OPTION "SW_HID_DLG_SEQUENCE_OPTION" +#define HID_DLG_FLDEDT_NEXT "SW_HID_DLG_FLDEDT_NEXT" +#define HID_DLG_FLDEDT_PREV "SW_HID_DLG_FLDEDT_PREV" +#define HID_DLG_FLDEDT_ADDRESS "SW_HID_DLG_FLDEDT_ADDRESS" +#define HID_DLG_PRV_PRT_OPTIONS "SW_HID_DLG_PRV_PRT_OPTIONS" + +#define HID_FILEDLG_CHARDLG "SW_HID_FILEDLG_CHARDLG" +#define HID_FILEDLG_LOADTEMPLATE "SW_HID_FILEDLG_LOADTEMPLATE" +#define HID_FILEDLG_ROMENU "SW_HID_FILEDLG_ROMENU" +#define HID_FILEDLG_MAILMRGE1 "SW_HID_FILEDLG_MAILMRGE1" +#define HID_FILEDLG_MAILMRGE2 "SW_HID_FILEDLG_MAILMRGE2" +#define HID_FILEDLG_FRMPAGE "SW_HID_FILEDLG_FRMPAGE" +#define HID_FILEDLG_SRCVIEW "SW_HID_FILEDLG_SRCVIEW" +#define HID_FILEDLG_WIZDOKU "SW_HID_FILEDLG_WIZDOKU" +#define HID_PREVIEW_ZOOM "SW_HID_PREVIEW_ZOOM" + +#define HID_REDLINE_AUTOFMT_ACCEPT "SW_HID_REDLINE_AUTOFMT_ACCEPT" +#define HID_MULTI_TOX_DLG "SW_HID_MULTI_TOX_DLG" +#define HID_ASCII_FILTER "SW_HID_ASCII_FILTER" +#define HID_GLBLTREE_EDIT_LINK "SW_HID_GLBLTREE_EDIT_LINK" +#define HID_FORMAT_NAME_OBJECT_NAME "SW_HID_FORMAT_NAME_OBJECT_NAME"// #100286# +#define HID_REFSELECTION_TOOLTIP "SW_HID_REFSELECTION_TOOLTIP" // #i83479# // TabPage Help-IDs ********************************************************* -#define HID_DROPCAPS (HID_BASE + 400) -#define HID_FRM_EXT (HID_BASE + 401) -#define HID_FRM_STD (HID_BASE + 402) -#define HID_GRF_EXT (HID_BASE + 403) -#define HID_COLUMN (HID_BASE + 404) -#define HID_DOC_STAT (HID_BASE + 405) -#define HID_MACROASSIGN (HID_BASE + 406) -#define HID_FOOTNOTE_PAGE (HID_BASE + 407) -#define HID_OPTDOCDISP_PAGE (HID_BASE + 408) -#define HID_OPTGRID_PAGE (HID_BASE + 409) -#define HID_OPTTEST_PAGE (HID_BASE + 410) -#define HID_OPTPRINT_PAGE (HID_BASE + 411) -#define HID_FORMAT_TABLE (HID_BASE + 412) -#define HID_TABLE_COLUMN (HID_BASE + 413) -#define HID_LAB_LAB (HID_BASE + 414) -#define HID_LAB_PRT (HID_BASE + 415) -#define HID_ENV_PRT (HID_BASE + 416) -#define HID_LAB_FMT (HID_BASE + 417) -#define HID_ENV_ENV (HID_BASE + 418) -#define HID_ENV_FMT (HID_BASE + 419) -#define HID_FRM_URL (HID_BASE + 421) -#define HID_CHAR_URL (HID_BASE + 422) -#define HID_CONTENT_OPT (HID_BASE + 423) -#define HID_LAYOUT_OPT (HID_BASE + 424) -#define HID_STD_FONT (HID_BASE + 425) -#define HID_COND_COLL (HID_BASE + 426) -#define HID_FRM_ADD (HID_BASE + 427) -#define HID_TABLE_TEXTFLOW (HID_BASE + 428) -#define HID_AUTOFMT_BY_INPUT (HID_BASE + 429) -#define HID_AUTOFMT_APPLY (HID_BASE + 430) -#define HID_OPTTABLE_PAGE (HID_BASE + 431) -#define HID_PICK_SINGLE_NUM (HID_BASE + 432) -#define HID_PICK_BULLET (HID_BASE + 433) -#define HID_PICK_NUM (HID_BASE + 434) -#define HID_PICK_BMP (HID_BASE + 435) - -#define HID_FLD_DB (HID_BASE + 437) -#define HID_FLD_DOKINF (HID_BASE + 438) -#define HID_FLD_VAR (HID_BASE + 439) -#define HID_FLD_DOK (HID_BASE + 440) -#define HID_FLD_FUNC (HID_BASE + 441) -#define HID_FLD_REF (HID_BASE + 442) -#define HID_OPTSHDWCRSR (HID_BASE + 443) -#define HID_NUM_OPTIONS (HID_BASE + 444) -#define HID_NUM_POSITION (HID_BASE + 445) -#define HID_NUMPARA (HID_BASE + 446) -#define HID_FOOTNOTE_OPTIONS (HID_BASE + 447) -#define HID_ENDNOTE_OPTIONS (HID_BASE + 448) -#define HID_REDLINE_OPT (HID_BASE + 449) -#define HID_LINENUMBERING (HID_BASE + 450) -#define HID_REDLINE_ACCEPT (HID_BASE + 451) -#define HID_EDIT_FLD_DB (HID_BASE + 452) -#define HID_EDIT_FLD_DOKINF (HID_BASE + 453) -#define HID_EDIT_FLD_VAR (HID_BASE + 454) -#define HID_EDIT_FLD_DOK (HID_BASE + 455) -#define HID_EDIT_FLD_FUNC (HID_BASE + 456) -#define HID_EDIT_FLD_REF (HID_BASE + 457) -#define HID_REDLINE_CTRL (HID_BASE + 458) -#define HID_TP_OUTLINE_NUM (HID_BASE + 459) -#define HID_OPTINSERT_PAGE (HID_BASE + 460) -#define HID_OPTCAPTION_PAGE (HID_BASE + 461) -#define HID_OPTLOAD_PAGE (HID_BASE + 462) -#define HID_INSERT_TOX_PAGE (HID_BASE + 463) -#define HID_TOX_FORM_ENTRY_PAGE (HID_BASE + 464) -#define HID_TOX_FORM_STYLES_PAGE (HID_BASE + 465) -#define HID_INSERT_TOX_TABDLG (HID_BASE + 466) -#define HID_INSERT_SECTION_PAGE (HID_BASE + 467) -#define HID_INSERT_SECTION_DLG (HID_BASE + 468) -#define HID_SECTION_PROPERTIES_DLG (HID_BASE + 469) -#define HID_RENAME_XNAMED (HID_BASE + 470) -#define HID_TP_TOX_SELECT (HID_BASE + 471) -#define HID_TP_TOX_ENTRY (HID_BASE + 472) -#define HID_TOX_STYLES_PAGE (HID_BASE + 473) -#define HID_TP_VISITING_CARDS (HID_BASE + 474) -#define HID_DLG_ADD_IDX_STYLES (HID_BASE + 475) -#define HID_ADD_STYLES_TLB (HID_BASE + 476) -#define HID_OLE_CHECKLB (HID_BASE + 477) -#define HID_DLG_CREATE_AUTH_ENTRY (HID_BASE + 478) -#define HID_TP_PRIVATE_DATA (HID_BASE + 479) - -#define HID_TP_BUSINESS_DATA (HID_BASE + 480) -#define HID_SECTION_FTNENDNOTES_PAGE (HID_BASE + 481) -#define HID_TEXTGRID_PAGE (HID_BASE + 482) -#define HID_OPTCOMPATIBILITY_PAGE (HID_BASE + 483) -#define HID_COMPATIBILITY_OPTIONS_BOX (HID_BASE + 484) +#define HID_DROPCAPS "SW_HID_DROPCAPS" +#define HID_FRM_EXT "SW_HID_FRM_EXT" +#define HID_FRM_STD "SW_HID_FRM_STD" +#define HID_GRF_EXT "SW_HID_GRF_EXT" +#define HID_COLUMN "SW_HID_COLUMN" +#define HID_DOC_STAT "SW_HID_DOC_STAT" +#define HID_MACROASSIGN "SW_HID_MACROASSIGN" +#define HID_FOOTNOTE_PAGE "SW_HID_FOOTNOTE_PAGE" +#define HID_OPTDOCDISP_PAGE "SW_HID_OPTDOCDISP_PAGE" +#define HID_OPTGRID_PAGE "SW_HID_OPTGRID_PAGE" +#define HID_OPTTEST_PAGE "SW_HID_OPTTEST_PAGE" +#define HID_OPTPRINT_PAGE "SW_HID_OPTPRINT_PAGE" +#define HID_FORMAT_TABLE "SW_HID_FORMAT_TABLE" +#define HID_TABLE_COLUMN "SW_HID_TABLE_COLUMN" +#define HID_LAB_LAB "SW_HID_LAB_LAB" +#define HID_LAB_PRT "SW_HID_LAB_PRT" +#define HID_ENV_PRT "SW_HID_ENV_PRT" +#define HID_LAB_FMT "SW_HID_LAB_FMT" +#define HID_ENV_ENV "SW_HID_ENV_ENV" +#define HID_ENV_FMT "SW_HID_ENV_FMT" +#define HID_FRM_URL "SW_HID_FRM_URL" +#define HID_CHAR_URL "SW_HID_CHAR_URL" +#define HID_CONTENT_OPT "SW_HID_CONTENT_OPT" +#define HID_LAYOUT_OPT "SW_HID_LAYOUT_OPT" +#define HID_STD_FONT "SW_HID_STD_FONT" +#define HID_COND_COLL "SW_HID_COND_COLL" +#define HID_FRM_ADD "SW_HID_FRM_ADD" +#define HID_TABLE_TEXTFLOW "SW_HID_TABLE_TEXTFLOW" +#define HID_AUTOFMT_BY_INPUT "SW_HID_AUTOFMT_BY_INPUT" +#define HID_AUTOFMT_APPLY "SW_HID_AUTOFMT_APPLY" +#define HID_OPTTABLE_PAGE "SW_HID_OPTTABLE_PAGE" +#define HID_PICK_SINGLE_NUM "SW_HID_PICK_SINGLE_NUM" +#define HID_PICK_BULLET "SW_HID_PICK_BULLET" +#define HID_PICK_NUM "SW_HID_PICK_NUM" +#define HID_PICK_BMP "SW_HID_PICK_BMP" + +#define HID_FLD_DB "SW_HID_FLD_DB" +#define HID_FLD_DOKINF "SW_HID_FLD_DOKINF" +#define HID_FLD_VAR "SW_HID_FLD_VAR" +#define HID_FLD_DOK "SW_HID_FLD_DOK" +#define HID_FLD_FUNC "SW_HID_FLD_FUNC" +#define HID_FLD_REF "SW_HID_FLD_REF" +#define HID_OPTSHDWCRSR "SW_HID_OPTSHDWCRSR" +#define HID_NUM_OPTIONS "SW_HID_NUM_OPTIONS" +#define HID_NUM_POSITION "SW_HID_NUM_POSITION" +#define HID_NUMPARA "SW_HID_NUMPARA" +#define HID_FOOTNOTE_OPTIONS "SW_HID_FOOTNOTE_OPTIONS" +#define HID_ENDNOTE_OPTIONS "SW_HID_ENDNOTE_OPTIONS" +#define HID_REDLINE_OPT "SW_HID_REDLINE_OPT" +#define HID_LINENUMBERING "SW_HID_LINENUMBERING" +#define HID_REDLINE_ACCEPT "SW_HID_REDLINE_ACCEPT" +#define HID_EDIT_FLD_DB "SW_HID_EDIT_FLD_DB" +#define HID_EDIT_FLD_DOKINF "SW_HID_EDIT_FLD_DOKINF" +#define HID_EDIT_FLD_VAR "SW_HID_EDIT_FLD_VAR" +#define HID_EDIT_FLD_DOK "SW_HID_EDIT_FLD_DOK" +#define HID_EDIT_FLD_FUNC "SW_HID_EDIT_FLD_FUNC" +#define HID_EDIT_FLD_REF "SW_HID_EDIT_FLD_REF" +#define HID_REDLINE_CTRL "SW_HID_REDLINE_CTRL" +#define HID_TP_OUTLINE_NUM "SW_HID_TP_OUTLINE_NUM" +#define HID_OPTINSERT_PAGE "SW_HID_OPTINSERT_PAGE" +#define HID_OPTCAPTION_PAGE "SW_HID_OPTCAPTION_PAGE" +#define HID_OPTLOAD_PAGE "SW_HID_OPTLOAD_PAGE" +#define HID_INSERT_TOX_PAGE "SW_HID_INSERT_TOX_PAGE" +#define HID_TOX_FORM_ENTRY_PAGE "SW_HID_TOX_FORM_ENTRY_PAGE" +#define HID_TOX_FORM_STYLES_PAGE "SW_HID_TOX_FORM_STYLES_PAGE" +#define HID_INSERT_TOX_TABDLG "SW_HID_INSERT_TOX_TABDLG" +#define HID_INSERT_SECTION_PAGE "SW_HID_INSERT_SECTION_PAGE" +#define HID_INSERT_SECTION_DLG "SW_HID_INSERT_SECTION_DLG" +#define HID_SECTION_PROPERTIES_DLG "SW_HID_SECTION_PROPERTIES_DLG" +#define HID_RENAME_XNAMED "SW_HID_RENAME_XNAMED" +#define HID_TP_TOX_SELECT "SW_HID_TP_TOX_SELECT" +#define HID_TP_TOX_ENTRY "SW_HID_TP_TOX_ENTRY" +#define HID_TOX_STYLES_PAGE "SW_HID_TOX_STYLES_PAGE" +#define HID_TP_VISITING_CARDS "SW_HID_TP_VISITING_CARDS" +#define HID_DLG_ADD_IDX_STYLES "SW_HID_DLG_ADD_IDX_STYLES" +#define HID_ADD_STYLES_TLB "SW_HID_ADD_STYLES_TLB" +#define HID_OLE_CHECKLB "SW_HID_OLE_CHECKLB" +#define HID_DLG_CREATE_AUTH_ENTRY "SW_HID_DLG_CREATE_AUTH_ENTRY" +#define HID_TP_PRIVATE_DATA "SW_HID_TP_PRIVATE_DATA" + +#define HID_TP_BUSINESS_DATA "SW_HID_TP_BUSINESS_DATA" +#define HID_SECTION_FTNENDNOTES_PAGE "SW_HID_SECTION_FTNENDNOTES_PAGE" +#define HID_TEXTGRID_PAGE "SW_HID_TEXTGRID_PAGE" +#define HID_OPTCOMPATIBILITY_PAGE "SW_HID_OPTCOMPATIBILITY_PAGE" +#define HID_COMPATIBILITY_OPTIONS_BOX "SW_HID_COMPATIBILITY_OPTIONS_BOX" // AutoPilot Help-IDs ********************************************************* -#define HID_LETTER_PAGE1 (HID_BASE + 501) -#define HID_LETTER_PAGE2 (HID_BASE + 502) -#define HID_LETTER_PAGE3 (HID_BASE + 503) -#define HID_LETTER_PAGE4 (HID_BASE + 504) -#define HID_LETTER_PAGE5 (HID_BASE + 505) -#define HID_LETTER_PAGE6 (HID_BASE + 506) -#define HID_LETTER_PAGE7 (HID_BASE + 507) -#define HID_LETTER_PAGE8 (HID_BASE + 508) -#define HID_LETTER_PAGE9 (HID_BASE + 509) - -#define HID_FAX_PAGE1 (HID_BASE + 511) -#define HID_FAX_PAGE2 (HID_BASE + 512) -#define HID_FAX_PAGE3 (HID_BASE + 513) -#define HID_FAX_PAGE4 (HID_BASE + 514) -#define HID_FAX_PAGE5 (HID_BASE + 515) -#define HID_FAX_PAGE6 (HID_BASE + 516) -#define HID_FAX_PAGE7 (HID_BASE + 517) -#define HID_FAX_PAGE8 (HID_BASE + 518) - -#define HID_MEMO_PAGE1 (HID_BASE + 521) -#define HID_MEMO_PAGE2 (HID_BASE + 522) -#define HID_MEMO_PAGE3 (HID_BASE + 523) -#define HID_MEMO_PAGE4 (HID_BASE + 524) -#define HID_MEMO_PAGE5 (HID_BASE + 525) - -#define HID_AGENDA_PAGE1 (HID_BASE + 531) -#define HID_AGENDA_PAGE2 (HID_BASE + 532) -#define HID_AGENDA_PAGE3 (HID_BASE + 533) -#define HID_AGENDA_PAGE4 (HID_BASE + 534) -#define HID_AGENDA_PAGE5 (HID_BASE + 535) -#define HID_AGENDA_PAGE6 (HID_BASE + 536) - -#define HID_AUTOPILOT_NEXT (HID_BASE + 537) -#define HID_AUTOPILOT_PREV (HID_BASE + 538) -#define HID_AUTOPILOT_OK (HID_BASE + 539) +#define HID_LETTER_PAGE1 "SW_HID_LETTER_PAGE1" +#define HID_LETTER_PAGE2 "SW_HID_LETTER_PAGE2" +#define HID_LETTER_PAGE3 "SW_HID_LETTER_PAGE3" +#define HID_LETTER_PAGE4 "SW_HID_LETTER_PAGE4" +#define HID_LETTER_PAGE5 "SW_HID_LETTER_PAGE5" +#define HID_LETTER_PAGE6 "SW_HID_LETTER_PAGE6" +#define HID_LETTER_PAGE7 "SW_HID_LETTER_PAGE7" +#define HID_LETTER_PAGE8 "SW_HID_LETTER_PAGE8" +#define HID_LETTER_PAGE9 "SW_HID_LETTER_PAGE9" + +#define HID_FAX_PAGE1 "SW_HID_FAX_PAGE1" +#define HID_FAX_PAGE2 "SW_HID_FAX_PAGE2" +#define HID_FAX_PAGE3 "SW_HID_FAX_PAGE3" +#define HID_FAX_PAGE4 "SW_HID_FAX_PAGE4" +#define HID_FAX_PAGE5 "SW_HID_FAX_PAGE5" +#define HID_FAX_PAGE6 "SW_HID_FAX_PAGE6" +#define HID_FAX_PAGE7 "SW_HID_FAX_PAGE7" +#define HID_FAX_PAGE8 "SW_HID_FAX_PAGE8" + +#define HID_MEMO_PAGE1 "SW_HID_MEMO_PAGE1" +#define HID_MEMO_PAGE2 "SW_HID_MEMO_PAGE2" +#define HID_MEMO_PAGE3 "SW_HID_MEMO_PAGE3" +#define HID_MEMO_PAGE4 "SW_HID_MEMO_PAGE4" +#define HID_MEMO_PAGE5 "SW_HID_MEMO_PAGE5" + +#define HID_AGENDA_PAGE1 "SW_HID_AGENDA_PAGE1" +#define HID_AGENDA_PAGE2 "SW_HID_AGENDA_PAGE2" +#define HID_AGENDA_PAGE3 "SW_HID_AGENDA_PAGE3" +#define HID_AGENDA_PAGE4 "SW_HID_AGENDA_PAGE4" +#define HID_AGENDA_PAGE5 "SW_HID_AGENDA_PAGE5" +#define HID_AGENDA_PAGE6 "SW_HID_AGENDA_PAGE6" + +#define HID_AUTOPILOT_NEXT "SW_HID_AUTOPILOT_NEXT" +#define HID_AUTOPILOT_PREV "SW_HID_AUTOPILOT_PREV" +#define HID_AUTOPILOT_OK "SW_HID_AUTOPILOT_OK" // HelpIds fuers Menue ***************************************************** -#define HID_MN_SUB_TBLROW (HID_BASE + 600) -#define HID_MN_SUB_TBLCOL (HID_BASE + 601) -#define HID_MN_SUB_AUTOFORMAT (HID_BASE + 602) -#define HID_MN_SUB_TOOLBAR (HID_BASE + 603) -#define HID_MN_SUB_FIELD (HID_BASE + 604) -#define HID_MN_SUB_GRAPHIC (HID_BASE + 605) -#define HID_MN_SUB_TEMPLATES (HID_BASE + 606) -#define HID_MN_SUB_ARRANGE (HID_BASE + 607) -#define HID_MN_SUB_SPELLING (HID_BASE + 608) -#define HID_MN_SUB_UPDATE (HID_BASE + 609) -#define HID_MN_SUB_MIRROR (HID_BASE + 610) -#define HID_MN_SUB_ALIGN (HID_BASE + 611) -#define HID_MN_SUB_OPTIONS (HID_BASE + 612) - -#define HID_MN_CALC_PHD (HID_BASE + 613) -#define HID_MN_CALC_SQRT (HID_BASE + 614) -#define HID_MN_CALC_OR (HID_BASE + 615) -#define HID_MN_CALC_XOR (HID_BASE + 616) -#define HID_MN_CALC_AND (HID_BASE + 617) -#define HID_MN_CALC_NOT (HID_BASE + 618) -#define HID_MN_CALC_EQ (HID_BASE + 619) -#define HID_MN_CALC_NEQ (HID_BASE + 620) -#define HID_MN_CALC_LEQ (HID_BASE + 621) -#define HID_MN_CALC_GEQ (HID_BASE + 622) -#define HID_MN_CALC_LES (HID_BASE + 623) -#define HID_MN_CALC_GRE (HID_BASE + 624) -#define HID_MN_CALC_SUM (HID_BASE + 625) -#define HID_MN_CALC_MEAN (HID_BASE + 626) -#define HID_MN_CALC_MIN (HID_BASE + 627) -#define HID_MN_CALC_MAX (HID_BASE + 628) -#define HID_MN_CALC_SIN (HID_BASE + 629) -#define HID_MN_CALC_COS (HID_BASE + 630) -#define HID_MN_CALC_TAN (HID_BASE + 631) -#define HID_MN_CALC_ASIN (HID_BASE + 632) -#define HID_MN_CALC_ACOS (HID_BASE + 633) -#define HID_MN_CALC_ATAN (HID_BASE + 634) -#define HID_MN_CALC_POW (HID_BASE + 635) -#define HID_MN_CALC_LISTSEP (HID_BASE + 636) -#define HID_MN_POP_OPS (HID_BASE + 637) -#define HID_MN_POP_STATISTICS (HID_BASE + 638) -#define HID_MN_POP_FUNC (HID_BASE + 639) -#define HID_MN_RSC_END (HID_BASE + 640) -#define HID_MN_CALC_ROUND (HID_BASE + 641) -#define HID_MN_SUB_MACRO (HID_BASE + 642) - -#define HID_MN_READONLY_SAVEGRAPHIC (HID_BASE + 645) -#define HID_MN_READONLY_GRAPHICTOGALLERY (HID_BASE + 646) -#define HID_MN_READONLY_TOGALLERYLINK (HID_BASE + 647) -#define HID_MN_READONLY_TOGALLERYCOPY (HID_BASE + 648) -#define HID_MN_READONLY_SAVEBACKGROUND (HID_BASE + 649) -#define HID_MN_READONLY_BACKGROUNDTOGALLERY (HID_BASE + 650) -#define HID_MN_READONLY_COPYLINK (HID_BASE + 651) -#define HID_MN_READONLY_COPYGRAPHIC (HID_BASE + 652) -#define HID_MN_READONLY_LOADGRAPHIC (HID_BASE + 653) -#define HID_MN_READONLY_GRAPHICOFF (HID_BASE + 654) -#define HID_MN_READONLY_PLUGINOFF (HID_BASE + 655) - -#define HID_MD_GLOS_DEFINE (HID_BASE + 656) -#define HID_MD_GLOS_REPLACE (HID_BASE + 657) -#define HID_MD_GLOS_RENAME (HID_BASE + 658) -#define HID_MD_GLOS_DELETE (HID_BASE + 659) -#define HID_MD_GLOS_EDIT (HID_BASE + 660) -#define HID_MD_GLOS_MACRO (HID_BASE + 661) -#define HID_LINGU_ADD_WORD (HID_BASE + 662) -#define HID_LINGU_IGNORE_WORD (HID_BASE + 663) -#define HID_LINGU_SPELLING_DLG (HID_BASE + 664) -#define HID_LINGU_AUTOCORR (HID_BASE + 665) -#define HID_LINGU_REPLACE (HID_BASE + 666) -#define HID_MD_GLOS_CATEGORY (HID_BASE + 667) -#define HID_REGION_TREE (HID_BASE + 668) -#define HID_LINGU_WORD_LANGUAGE (HID_BASE + 669) -#define HID_LINGU_PARA_LANGUAGE (HID_BASE + 670) -#define HID_MD_GLOS_DEFINE_TEXT (HID_BASE + 671) -#define HID_DLG_PASSWD_SECTION (HID_BASE + 672) -#define HID_MD_COPY_TO_CLIPBOARD (HID_BASE + 673) -#define HID_MD_GLOS_IMPORT (HID_BASE + 674) -#define HID_SMARTTAG_MAIN (HID_BASE + 675) // SMARTTAGS -#define HID_LINGU_IGNORE_SELECTION (HID_BASE + 676) // grammar check context menu +#define HID_MN_SUB_TBLROW "SW_HID_MN_SUB_TBLROW" +#define HID_MN_SUB_TBLCOL "SW_HID_MN_SUB_TBLCOL" +#define HID_MN_SUB_AUTOFORMAT "SW_HID_MN_SUB_AUTOFORMAT" +#define HID_MN_SUB_TOOLBAR "SW_HID_MN_SUB_TOOLBAR" +#define HID_MN_SUB_FIELD "SW_HID_MN_SUB_FIELD" +#define HID_MN_SUB_GRAPHIC "SW_HID_MN_SUB_GRAPHIC" +#define HID_MN_SUB_TEMPLATES "SW_HID_MN_SUB_TEMPLATES" +#define HID_MN_SUB_ARRANGE "SW_HID_MN_SUB_ARRANGE" +#define HID_MN_SUB_SPELLING "SW_HID_MN_SUB_SPELLING" +#define HID_MN_SUB_UPDATE "SW_HID_MN_SUB_UPDATE" +#define HID_MN_SUB_MIRROR "SW_HID_MN_SUB_MIRROR" +#define HID_MN_SUB_ALIGN "SW_HID_MN_SUB_ALIGN" +#define HID_MN_SUB_OPTIONS "SW_HID_MN_SUB_OPTIONS" + +#define HID_MN_CALC_PHD "SW_HID_MN_CALC_PHD" +#define HID_MN_CALC_SQRT "SW_HID_MN_CALC_SQRT" +#define HID_MN_CALC_OR "SW_HID_MN_CALC_OR" +#define HID_MN_CALC_XOR "SW_HID_MN_CALC_XOR" +#define HID_MN_CALC_AND "SW_HID_MN_CALC_AND" +#define HID_MN_CALC_NOT "SW_HID_MN_CALC_NOT" +#define HID_MN_CALC_EQ "SW_HID_MN_CALC_EQ" +#define HID_MN_CALC_NEQ "SW_HID_MN_CALC_NEQ" +#define HID_MN_CALC_LEQ "SW_HID_MN_CALC_LEQ" +#define HID_MN_CALC_GEQ "SW_HID_MN_CALC_GEQ" +#define HID_MN_CALC_LES "SW_HID_MN_CALC_LES" +#define HID_MN_CALC_GRE "SW_HID_MN_CALC_GRE" +#define HID_MN_CALC_SUM "SW_HID_MN_CALC_SUM" +#define HID_MN_CALC_MEAN "SW_HID_MN_CALC_MEAN" +#define HID_MN_CALC_MIN "SW_HID_MN_CALC_MIN" +#define HID_MN_CALC_MAX "SW_HID_MN_CALC_MAX" +#define HID_MN_CALC_SIN "SW_HID_MN_CALC_SIN" +#define HID_MN_CALC_COS "SW_HID_MN_CALC_COS" +#define HID_MN_CALC_TAN "SW_HID_MN_CALC_TAN" +#define HID_MN_CALC_ASIN "SW_HID_MN_CALC_ASIN" +#define HID_MN_CALC_ACOS "SW_HID_MN_CALC_ACOS" +#define HID_MN_CALC_ATAN "SW_HID_MN_CALC_ATAN" +#define HID_MN_CALC_POW "SW_HID_MN_CALC_POW" +#define HID_MN_CALC_LISTSEP "SW_HID_MN_CALC_LISTSEP" +#define HID_MN_POP_OPS "SW_HID_MN_POP_OPS" +#define HID_MN_POP_STATISTICS "SW_HID_MN_POP_STATISTICS" +#define HID_MN_POP_FUNC "SW_HID_MN_POP_FUNC" +#define HID_MN_RSC_END "SW_HID_MN_RSC_END" +#define HID_MN_CALC_ROUND "SW_HID_MN_CALC_ROUND" +#define HID_MN_SUB_MACRO "SW_HID_MN_SUB_MACRO" + +#define HID_MN_READONLY_SAVEGRAPHIC "SW_HID_MN_READONLY_SAVEGRAPHIC" +#define HID_MN_READONLY_GRAPHICTOGALLERY "SW_HID_MN_READONLY_GRAPHICTOGALLERY" +#define HID_MN_READONLY_TOGALLERYLINK "SW_HID_MN_READONLY_TOGALLERYLINK" +#define HID_MN_READONLY_TOGALLERYCOPY "SW_HID_MN_READONLY_TOGALLERYCOPY" +#define HID_MN_READONLY_SAVEBACKGROUND "SW_HID_MN_READONLY_SAVEBACKGROUND" +#define HID_MN_READONLY_BACKGROUNDTOGALLERY "SW_HID_MN_READONLY_BACKGROUNDTOGALLERY" +#define HID_MN_READONLY_COPYLINK "SW_HID_MN_READONLY_COPYLINK" +#define HID_MN_READONLY_COPYGRAPHIC "SW_HID_MN_READONLY_COPYGRAPHIC" +#define HID_MN_READONLY_LOADGRAPHIC "SW_HID_MN_READONLY_LOADGRAPHIC" +#define HID_MN_READONLY_GRAPHICOFF "SW_HID_MN_READONLY_GRAPHICOFF" +#define HID_MN_READONLY_PLUGINOFF "SW_HID_MN_READONLY_PLUGINOFF" + +#define HID_MD_GLOS_DEFINE "SW_HID_MD_GLOS_DEFINE" +#define HID_MD_GLOS_REPLACE "SW_HID_MD_GLOS_REPLACE" +#define HID_MD_GLOS_RENAME "SW_HID_MD_GLOS_RENAME" +#define HID_MD_GLOS_DELETE "SW_HID_MD_GLOS_DELETE" +#define HID_MD_GLOS_EDIT "SW_HID_MD_GLOS_EDIT" +#define HID_MD_GLOS_MACRO "SW_HID_MD_GLOS_MACRO" +#define HID_LINGU_ADD_WORD "SW_HID_LINGU_ADD_WORD" +#define HID_LINGU_IGNORE_WORD "SW_HID_LINGU_IGNORE_WORD" +#define HID_LINGU_SPELLING_DLG "SW_HID_LINGU_SPELLING_DLG" +#define HID_LINGU_AUTOCORR "SW_HID_LINGU_AUTOCORR" +#define HID_LINGU_REPLACE "SW_HID_LINGU_REPLACE" +#define HID_MD_GLOS_CATEGORY "SW_HID_MD_GLOS_CATEGORY" +#define HID_REGION_TREE "SW_HID_REGION_TREE" +#define HID_LINGU_WORD_LANGUAGE "SW_HID_LINGU_WORD_LANGUAGE" +#define HID_LINGU_PARA_LANGUAGE "SW_HID_LINGU_PARA_LANGUAGE" +#define HID_MD_GLOS_DEFINE_TEXT "SW_HID_MD_GLOS_DEFINE_TEXT" +#define HID_DLG_PASSWD_SECTION "SW_HID_DLG_PASSWD_SECTION" +#define HID_MD_COPY_TO_CLIPBOARD "SW_HID_MD_COPY_TO_CLIPBOARD" +#define HID_MD_GLOS_IMPORT "SW_HID_MD_GLOS_IMPORT" +#define HID_SMARTTAG_MAIN "SW_HID_SMARTTAG_MAIN" // SMARTTAGS +#define HID_LINGU_IGNORE_SELECTION "SW_HID_LINGU_IGNORE_SELECTION" // grammar check context menu // Weiter Help-IDs ********************************************************** -#define HID_CLOSE_FILE (HID_BASE + 1001) -#define HID_LAUNCH_REGISTRY (HID_BASE + 1002) -#define HID_MERGE_FILE (HID_BASE + 1003) -#define HID_MERGE_FILE_DLG (HID_BASE + 1004) -#define HID_NEW_FILE (HID_BASE + 1005) -#define HID_OPEN_FILE (HID_BASE + 1007) -#define HID_OPEN_LASTVERSION (HID_BASE + 1009) -#define HID_PRINT_FILE (HID_BASE + 1010) -#define HID_PRINT_FILE_OPTIONS (HID_BASE + 1011) -#define HID_SAVE_FILE_AS (HID_BASE + 1012) -#define HID_SAVE_FILE (HID_BASE + 1013) -#define HID_SETUP_PRINTER_DLG (HID_BASE + 1015) -#define HID_EXIT (HID_BASE + 1017) -#define HID_CREATE_DOCUMENT (HID_BASE + 1019) -#define HID_DOCSTAT_DLG (HID_BASE + 1020) -#define HID_LOAD_TEMPLATE_DLG (HID_BASE + 1021) -#define HID_SAVE_ALL (HID_BASE + 1023) -#define HID_NEW_FILE_DEFAULT (HID_BASE + 1024) -#define HID_PRINT_FILE_DEFAULT (HID_BASE + 1025) -#define HID_FAX (HID_BASE + 1028) -#define HID_SELECT_DATABASE (HID_BASE + 1030) -#define HID_DOC_INFO_DLG (HID_BASE + 1031) -#define HID_DOC_MGR_DLG (HID_BASE + 1032) -#define HID_OPTCAPTION_CLB (HID_BASE + 1033) - -#define HID_COPY (HID_BASE + 1102) -#define HID_CUT (HID_BASE + 1103) -#define HID_EDIT_FIELD (HID_BASE + 1104) -#define HID_EDIT_FILE_INFO_DLG (HID_BASE + 1107) -#define HID_EDIT_LINK_DLG (HID_BASE + 1109) -#define HID_EDIT_OBJECT (HID_BASE + 1110) -#define HID_GOTO (HID_BASE + 1111) -#define HID_SET_FIELD_VALUE (HID_BASE + 1112) -#define HID_PASTE (HID_BASE + 1113) -#define HID_REDO (HID_BASE + 1116) -#define HID_SEARCH (HID_BASE + 1117) -#define HID_REPLACE (HID_BASE + 1118) -#define HID_SELECT_ALL (HID_BASE + 1119) -#define HID_UNDO (HID_BASE + 1120) -#define HID_REPEAT (HID_BASE + 1122) -#define HID_BUFFER_UPDATE (HID_BASE + 1124) -#define HID_UPDATE_FIELDS (HID_BASE + 1126) -#define HID_EXECUTE_MACROFIELD (HID_BASE + 1127) -#define HID_EDIT_FORMULA (HID_BASE + 1128) -#define HID_CALC_TABLE (HID_BASE + 1129) -#define HID_NUM_BULLET_DOWN (HID_BASE + 1130) -#define HID_NUM_BULLET_UP (HID_BASE + 1131) -#define HID_NUM_BULLET_PREV (HID_BASE + 1132) -#define HID_NUM_BULLET_NEXT (HID_BASE + 1133) -#define HID_NUM_BULLET_MOVEUP (HID_BASE + 1134) -#define HID_NUM_BULLET_MOVEDOWN (HID_BASE + 1135) -#define HID_NUM_BULLET_NONUM (HID_BASE + 1136) -#define HID_NUM_BULLET_OFF (HID_BASE + 1137) -#define HID_NUM_BULLET_ON (HID_BASE + 1138) -#define HID_NUM_BULLET_OUTLINE_DOWN (HID_BASE + 1139) -#define HID_NUM_BULLET_OUTLINE_UP (HID_BASE + 1140) -#define HID_NUM_BULLET_OUTLINE_MOVEUP (HID_BASE + 1141) -#define HID_NUM_BULLET_OUTLINE_MOVEDOWN (HID_BASE + 1142) -#define HID_UPDATE_INPUTFIELDS (HID_BASE + 1143) -#define HID_NUM_NUMBERING_ON (HID_BASE + 1144) -#define HID_REPEAT_SEARCH (HID_BASE + 1150) -#define HID_REPAGINATE (HID_BASE + 1161) - -#define HID_REFRESH_VIEW (HID_BASE + 1201) -#define HID_RIBBON (HID_BASE + 1210) -#define HID_RULER (HID_BASE + 1211) -#define HID_STATUSBAR (HID_BASE + 1212) -#define HID_TOOLBOX (HID_BASE + 1213) -#define HID_VIEW_BOUNDS (HID_BASE + 1214) -#define HID_VIEW_FIELDS (HID_BASE + 1215) -#define HID_VLINEAL (HID_BASE + 1216) -#define HID_VSCROLLBAR (HID_BASE + 1217) -#define HID_HSCROLLBAR (HID_BASE + 1218) -#define HID_VIEW_META_CHARS (HID_BASE + 1224) -#define HID_VIEW_MARKS (HID_BASE + 1225) -#define HID_VIEW_FIELDNAME (HID_BASE + 1226) -#define HID_VIEW_TABLEGRID (HID_BASE + 1227) -#define HID_ZOOM (HID_BASE + 1231) - -#define HID_DELETE_BOOKMARK (HID_BASE + 1301) -#define HID_INSERT_BREAK (HID_BASE + 1303) -#define HID_INSERT_COLUMN_BREAK (HID_BASE + 1305) -#define HID_INSERT_FILE (HID_BASE + 1309) -#define HID_INSERT_FOOTNOTE (HID_BASE + 1311) -#define HID_INSERT_GRAFIC (HID_BASE + 1315) -#define HID_INSERT_LINEBREAK (HID_BASE + 1318) -#define HID_INSERT_MERGEFIELD_DLG (HID_BASE + 1320) -#define HID_INSERT_OBJECT_DLG (HID_BASE + 1322) -#define HID_INSERT_PAGEBREAK (HID_BASE + 1323) -#define HID_INSERT_RECORD (HID_BASE + 1326) -#define HID_MERGE_RECORD (HID_BASE + 1327) -#define HID_INSERT_SYMBOL (HID_BASE + 1328) -#define HID_INSERT_STRING (HID_BASE + 1331) -#define HID_INSERT_COLS (HID_BASE + 1332) -#define HID_INSERT_FRAME_INTERACT (HID_BASE + 1333) -#define HID_INSERT_FRAME (HID_BASE + 1334) -#define HID_INSERT_IDX_ENTRY (HID_BASE + 1340) -#define HID_INSERT_USERIDX_ENTRY (HID_BASE + 1341) -#define HID_INSERT_CNTNTIDX_ENTRY (HID_BASE + 1342) -#define HID_INSERT_SOFT_HYPHEN (HID_BASE + 1350) -#define HID_INSERT_HARD_SPACE (HID_BASE + 1351) - -#define HID_SET_FONT (HID_BASE + 1401) -#define HID_SET_FONT_SIZE (HID_BASE + 1402) -#define HID_GROW_FONT_SIZE (HID_BASE + 1403) -#define HID_SHRINK_FONT_SIZE (HID_BASE + 1404) -#define HID_SET_BOLD (HID_BASE + 1405) -#define HID_SET_ITALIC (HID_BASE + 1406) -#define HID_SET_SHADOW (HID_BASE + 1407) -#define HID_SET_OUTLINE (HID_BASE + 1408) -#define HID_SET_UNDERLINE (HID_BASE + 1409) -#define HID_SET_STRIKEOUT (HID_BASE + 1410) -#define HID_SET_SUPER_SCRIPT (HID_BASE + 1411) -#define HID_SET_SUB_SCRIPT (HID_BASE + 1412) -#define HID_SET_COLOR (HID_BASE + 1413) -#define HID_SET_CASEMAP (HID_BASE + 1414) -#define HID_SET_LANGUAGE (HID_BASE + 1415) -#define HID_SET_KERNING (HID_BASE + 1416) -#define HID_INDENT_TO_TABSTOP (HID_BASE + 1417) -#define HID_SET_LEFT_PARA (HID_BASE + 1418) -#define HID_SET_RIGHT_PARA (HID_BASE + 1419) -#define HID_SET_CENTER_PARA (HID_BASE + 1420) -#define HID_SET_JUSTIFY_PARA (HID_BASE + 1421) -#define HID_SET_LINE_SPACE_1 (HID_BASE + 1422) -#define HID_SET_LINE_SPACE_15 (HID_BASE + 1423) -#define HID_SET_LINE_SPACE_2 (HID_BASE + 1424) -#define HID_FLIP_HORZ_GRAFIC (HID_BASE + 1425) -#define HID_FLIP_VERT_GRAFIC (HID_BASE + 1426) -#define HID_SET_ADJUST (HID_BASE + 1428) -#define HID_SET_LRMARGIN (HID_BASE + 1429) -#define HID_SET_ULMARGIN (HID_BASE + 1430) -#define HID_UNINDENT_TO_TABSTOP (HID_BASE + 1431) -#define HID_SET_HYPHEN_ZONE (HID_BASE + 1432) -#define HID_SET_PAGE_BREAK (HID_BASE + 1433) -#define HID_SET_KEEP_TOGETHER (HID_BASE + 1434) -#define HID_SET_WIDOW (HID_BASE + 1436) -#define HID_SET_ORPHAN (HID_BASE + 1437) -#define HID_FORMAT_SHADOW (HID_BASE + 1438) -#define HID_FORMAT_BORDER (HID_BASE + 1439) -#define HID_FORMAT_CHAR_DLG (HID_BASE + 1441) -#define HID_FORMAT_PARA_DLG (HID_BASE + 1443) -#define HID_FORMAT_TAB (HID_BASE + 1444) -#define HID_FORMAT_TAB_DLG (HID_BASE + 1445) -#define HID_FORMAT_BORDER_DLG (HID_BASE + 1447) -#define HID_FORMAT_BACKGROUND (HID_BASE + 1448) -#define HID_FORMAT_BACKGROUND_DLG (HID_BASE + 1450) -#define HID_FORMAT_PAGE (HID_BASE + 1451) -#define HID_FORMAT_PAGE_DLG (HID_BASE + 1452) -#define HID_FORMAT_DROPCAPS (HID_BASE + 1454) -#define HID_FORMAT_FRAME_DLG (HID_BASE + 1456) -#define HID_FORMAT_GRAFIC_DLG (HID_BASE + 1458) -#define HID_FORMAT_TABLE_DLG (HID_BASE + 1460) -#define HID_NEW_STYLE_BY_EXAMPLE (HID_BASE + 1462) -#define HID_UPDATE_STYLE_BY_EXAMPLE (HID_BASE + 1463) -#define HID_STYLE_SHEET_FRAME_DLG (HID_BASE + 1464) -#define HID_STYLE_SHEET_DOC_DLG (HID_BASE + 1465) -#define HID_FORMAT_RESET (HID_BASE + 1469) -#define HID_FRAME_TO_TOP (HID_BASE + 1470) -#define HID_FRAME_TO_BOTTOM (HID_BASE + 1471) -#define HID_FRAME_NOWRAP (HID_BASE + 1472) -#define HID_FRAME_WRAP (HID_BASE + 1473) -#define HID_FRAME_WRAPTHRU (HID_BASE + 1474) -#define HID_FRAME_ALIGN_HORZ_LEFT (HID_BASE + 1475) -#define HID_FRAME_ALIGN_HORZ_RIGHT (HID_BASE + 1476) -#define HID_FRAME_ALIGN_HORZ_CENTER (HID_BASE + 1477) -#define HID_FRAME_ALIGN_VERT_TOP (HID_BASE + 1478) -#define HID_FRAME_ALIGN_VERT_BOTTOM (HID_BASE + 1479) -#define HID_FRAME_ALIGN_VERT_CENTER (HID_BASE + 1480) -#define HID_SET_FRM_SIZE (HID_BASE + 1481) -#define HID_SET_FRM_POSITION (HID_BASE + 1482) -#define HID_SET_FRM_ANCHOR (HID_BASE + 1483) -#define HID_SET_FRM_WRAP (HID_BASE + 1484) -#define HID_SET_FRM_DIST (HID_BASE + 1485) -#define HID_SET_FRM_OPTIONS (HID_BASE + 1486) -#define HID_SET_GRF_MIRROR (HID_BASE + 1488) -#define HID_SET_TABLE_WIDTH (HID_BASE + 1489) -#define HID_SET_TABLE_ALIGN (HID_BASE + 1490) -#define HID_SET_CHAR_STYLE (HID_BASE + 1491) -#define HID_SET_PARA_STYLE (HID_BASE + 1492) -#define HID_SET_PAGE_STYLE (HID_BASE + 1493) -#define HID_SET_FRM_MACRO (HID_BASE + 1494) -#define HID_SET_FRM_COLUMNS (HID_BASE + 1495) -#define HID_SET_FRM_COLUMN_WIDTH (HID_BASE + 1496) -#define HID_UPDATE_STYLES_DIRECT (HID_BASE + 1497) - -#define HID_TABLE_INSERT_ROW (HID_BASE + 1501) -#define HID_TABLE_DELETE_ROW (HID_BASE + 1503) -#define HID_TABLE_DELETE_COL (HID_BASE + 1504) -#define HID_TABLE_MERGE_CELLS (HID_BASE + 1506) -#define HID_AUTOFMT_TABLE (HID_BASE + 1507) -#define HID_SWDLG_STRINPUT (HID_BASE + 1508) -#define HID_TABLE_SET_ULSPACE (HID_BASE + 1509) -#define HID_TABLE_SET_GRID (HID_BASE + 1510) -#define HID_TABLE_SET_SHADOW (HID_BASE + 1511) -#define HID_TABLE_SELECT_ROW (HID_BASE + 1513) -#define HID_TABLE_SELECT_COL (HID_BASE + 1514) -#define HID_TABLE_SELECT_ALL (HID_BASE + 1515) -#define HID_TABLE_SET_READ_ONLY_CELLS (HID_BASE + 1517) -#define HID_TABLE_UNSET_READ_ONLY_CELLS (HID_BASE + 1519) -#define HID_PAGE_STYLE_SET_COLS (HID_BASE + 1538) -#define HID_SET_PROP_LINE_SPACE (HID_BASE + 1540) -#define HID_SET_ABS_LINE_SPACE (HID_BASE + 1541) - -#define HID_SPELLING_DLG (HID_BASE + 1601) -#define HID_THESAURUS_DLG (HID_BASE + 1604) -#define HID_HYPHENATE_OPT_DLG (HID_BASE + 1607) -#define HID_SORTING (HID_BASE + 1613) -#define HID_SORTING_DLG (HID_BASE + 1614) -#define HID_CALCULATE (HID_BASE + 1615) -#define HID_RECORD_MACRO_DLG (HID_BASE + 1622) -#define HID_PLAY_MACRO_DLG (HID_BASE + 1624) -#define HID_CONFIG_DLG (HID_BASE + 1627) -#define HID_EXPAND_GLOSSARY (HID_BASE + 1628) -#define HID_RENAME_GLOSSARY (HID_BASE + 1629) -#define HID_CONFIG_MENU (HID_BASE + 1630) -#define HID_CONFIG_KEY (HID_BASE + 1631) -#define HID_ASSIGN_LOCAL_MACRO_DLG (HID_BASE + 1632) -#define HID_COMPILE_MACRO (HID_BASE + 1633) -#define HID_CONFIG_VIEWOPTIONS (HID_BASE + 1635) -#define HID_CONFIG_COLORS (HID_BASE + 1636) -#define HID_INSERT_GLOSSARY (HID_BASE + 1640) -#define HID_AUTO_CORRECT (HID_BASE + 1649) -#define HID_AUTO_CORRECT_DLG (HID_BASE + 1650) -#define HID_HELP_PI (HID_BASE + 1655) -#define HID_NAVIGATION_PI (HID_BASE + 1656) -#define HID_TEMPLATE_PI (HID_BASE + 1657) -#define HID_ADDR_PI (HID_BASE + 1658) -#define HID_NAVIGATION_PI_GOTO_PAGE (HID_BASE + 1659) -#define HID_LETTER_WIZZARD (HID_BASE + 1660) -#define HID_FAX_WIZZARD (HID_BASE + 1661) -#define HID_MEMO_WIZZARD (HID_BASE + 1662) -#define HID_AGENDA_WIZZARD (HID_BASE + 1663) - -#define HID_NEW_WINDOW (HID_BASE + 1701) -#define HID_ARRANGE_ALL_WIN (HID_BASE + 1702) -#define HID_ARRANGE_CASCADE_WIN (HID_BASE + 1703) -#define HID_ARRANGE_HORZ_WIN (HID_BASE + 1704) -#define HID_ARRANGE_VERT_WIN (HID_BASE + 1705) - -#define HID_SHOW_HELP_INDEX (HID_BASE + 1802) -#define HID_SHOW_KEYBOARD_HELP (HID_BASE + 1803) -#define HID_SHOW_HELP_MANUAL (HID_BASE + 1804) -#define HID_SHOW_UPDATE_HELP (HID_BASE + 1805) - -#define HID_CHAR_LEFT (HID_BASE + 1901) -#define HID_CHAR_RIGHT (HID_BASE + 1902) -#define HID_LINE_UP (HID_BASE + 1903) -#define HID_LINE_DOWN (HID_BASE + 1904) -#define HID_START_OF_LINE (HID_BASE + 1905) -#define HID_END_OF_LINE (HID_BASE + 1906) -#define HID_START_OF_DOCUMENT (HID_BASE + 1907) -#define HID_END_OF_DOCUMENT (HID_BASE + 1908) -#define HID_START_OF_NEXT_PAGE (HID_BASE + 1909) -#define HID_END_OF_NEXT_PAGE (HID_BASE + 1910) -#define HID_START_OF_PREV_PAGE (HID_BASE + 1911) -#define HID_END_OF_PREV_PAGE (HID_BASE + 1912) -#define HID_START_OF_PAGE (HID_BASE + 1913) -#define HID_END_OF_PAGE (HID_BASE + 1914) -#define HID_START_OF_COLUMN (HID_BASE + 1917) -#define HID_END_OF_COLUMN (HID_BASE + 1918) -#define HID_START_OF_PARA (HID_BASE + 1919) -#define HID_END_OF_PARA (HID_BASE + 1920) -#define HID_NEXT_WORD (HID_BASE + 1921) -#define HID_PREV_WORD (HID_BASE + 1922) -#define HID_NEXT_SENT (HID_BASE + 1923) -#define HID_PREV_SENT (HID_BASE + 1924) -#define HID_DELETE (HID_BASE + 1925) -#define HID_BACKSPACE (HID_BASE + 1926) -#define HID_DELETE_SENT (HID_BASE + 1927) -#define HID_DELETE_BACK_SENT (HID_BASE + 1928) -#define HID_DELETE_WORD (HID_BASE + 1929) -#define HID_DELETE_BACK_WORD (HID_BASE + 1930) -#define HID_DELETE_LINE (HID_BASE + 1931) -#define HID_DELETE_BACK_LINE (HID_BASE + 1932) -#define HID_DELETE_PARA (HID_BASE + 1933) -#define HID_DELETE_BACK_PARA (HID_BASE + 1934) -#define HID_DELETE_WHOLE_LINE (HID_BASE + 1935) -#define HID_SET_INS_MODE (HID_BASE + 1936) -#define HID_PAGEUP (HID_BASE + 1937) -#define HID_PAGEDOWN (HID_BASE + 1938) -#define HID_SET_ADD_MODE (HID_BASE + 1939) -#define HID_SET_EXT_MODE (HID_BASE + 1940) -#define HID_ESCAPE (HID_BASE + 1941) -#define HID_SELECT_WORD (HID_BASE + 1943) -#define HID_START_TABLE (HID_BASE + 1947) -#define HID_END_TABLE (HID_BASE + 1948) -#define HID_NEXT_TABLE (HID_BASE + 1949) -#define HID_PREV_TABLE (HID_BASE + 1950) -#define HID_START_OF_NEXT_COLUMN (HID_BASE + 1951) -#define HID_END_OF_NEXT_COLUMN (HID_BASE + 1952) -#define HID_START_OF_PREV_COLUMN (HID_BASE + 1953) -#define HID_END_OF_PREV_COLUMN (HID_BASE + 1954) -#define HID_FOOTNOTE_TO_ANCHOR (HID_BASE + 1955) -#define HID_NEXT_FOOTNOTE (HID_BASE + 1956) -#define HID_PREV_FOOTNOTE (HID_BASE + 1957) -#define HID_CNTNT_TO_NEXT_FRAME (HID_BASE + 1958) -#define HID_FRAME_TO_ANCHOR (HID_BASE + 1959) -#define HID_TO_HEADER (HID_BASE + 1960) -#define HID_TO_FOOTER (HID_BASE + 1961) -#define HID_IDX_MARK_TO_IDX (HID_BASE + 1962) - -#define HID_ENVELOP (HID_BASE + 2050) -#define HID_LABEL (HID_BASE + 2051) -#define HID_ENVELOP_PRINT (HID_BASE + 2052) - -#define HID_NAVIGATION_IMGBTN (HID_BASE + 2054) -#define HID_ENVELOP_INSERT (HID_BASE + 2055) - -#define HID_WEBTOOLS_TOOLBOX (HID_BASE + 2056) -#define HID_WEBTEXT_TOOLBOX (HID_BASE + 2057) -#define HID_WEBFRAME_TOOLBOX (HID_BASE + 2058) -#define HID_TEXT_TOOLBOX (HID_BASE + 2059) -#define HID_TABLE_TOOLBOX (HID_BASE + 2060) -#define HID_FRAME_TOOLBOX (HID_BASE + 2061) -#define HID_GRAFIK_TOOLBOX (HID_BASE + 2062) -#define HID_OLE_TOOLBOX (HID_BASE + 2063) -#define HID_DRAW_TOOLBOX (HID_BASE + 2064) -#define HID_BEZIER_TOOLBOX (HID_BASE + 2066) -#define HID_DRAW_TEXT_TOOLBOX (HID_BASE + 2067) -#define HID_NUM_TOOLBOX (HID_BASE + 2068) -#define HID_TOOLS_TOOLBOX (HID_BASE + 2069) -#define HID_SRCVIEW_TOOLBOX (HID_BASE + 2070) - -#define HID_LABEL_INSERT (HID_BASE + 2071) -#define HID_CALC_TOOLBOX (HID_BASE + 2072) -#define HID_PVIEW_TOOLBOX (HID_BASE + 2073) - -#define HID_FIELD_INSERT (HID_BASE + 2074) -#define HID_FIELD_CLOSE (HID_BASE + 2075) - -#define HID_COND_COLL_TABLIST (HID_BASE + 2076) - -#define HID_DB_SELECTION_TLB (HID_BASE + 2077) -#define HID_FIELD_DINF_TYPE (HID_BASE + 2078) - -#define HID_DRAWFORM_TOOLBOX (HID_BASE + 2079) -#define HID_SELECT_TEMPLATE (HID_BASE + 2080) - -#define HID_AP_INSERT_DB_SEL (HID_BASE + 2081) -#define HID_WEBGRAPHIC_TOOLBOX (HID_BASE + 2082) -#define HID_OUTLINE_FORM (HID_BASE + 2083) -#define HID_NUM_RESET (HID_BASE + 2084) - -#define HID_AUTOFORMAT_REJECT (HID_BASE + 2085) -#define HID_AUTOFORMAT_ACCEPT (HID_BASE + 2086) -#define HID_AUTOFORMAT_EDIT_CHG (HID_BASE + 2087) +#define HID_CLOSE_FILE "SW_HID_CLOSE_FILE" +#define HID_LAUNCH_REGISTRY "SW_HID_LAUNCH_REGISTRY" +#define HID_MERGE_FILE "SW_HID_MERGE_FILE" +#define HID_MERGE_FILE_DLG "SW_HID_MERGE_FILE_DLG" +#define HID_NEW_FILE "SW_HID_NEW_FILE" +#define HID_OPEN_FILE "SW_HID_OPEN_FILE" +#define HID_OPEN_LASTVERSION "SW_HID_OPEN_LASTVERSION" +#define HID_PRINT_FILE "SW_HID_PRINT_FILE" +#define HID_PRINT_FILE_OPTIONS "SW_HID_PRINT_FILE_OPTIONS" +#define HID_SAVE_FILE_AS "SW_HID_SAVE_FILE_AS" +#define HID_SAVE_FILE "SW_HID_SAVE_FILE" +#define HID_SETUP_PRINTER_DLG "SW_HID_SETUP_PRINTER_DLG" +#define HID_EXIT "SW_HID_EXIT" +#define HID_CREATE_DOCUMENT "SW_HID_CREATE_DOCUMENT" +#define HID_DOCSTAT_DLG "SW_HID_DOCSTAT_DLG" +#define HID_LOAD_TEMPLATE_DLG "SW_HID_LOAD_TEMPLATE_DLG" +#define HID_SAVE_ALL "SW_HID_SAVE_ALL" +#define HID_NEW_FILE_DEFAULT "SW_HID_NEW_FILE_DEFAULT" +#define HID_PRINT_FILE_DEFAULT "SW_HID_PRINT_FILE_DEFAULT" +#define HID_FAX "SW_HID_FAX" +#define HID_SELECT_DATABASE "SW_HID_SELECT_DATABASE" +#define HID_DOC_INFO_DLG "SW_HID_DOC_INFO_DLG" +#define HID_DOC_MGR_DLG "SW_HID_DOC_MGR_DLG" +#define HID_OPTCAPTION_CLB "SW_HID_OPTCAPTION_CLB" + +#define HID_COPY "SW_HID_COPY" +#define HID_CUT "SW_HID_CUT" +#define HID_EDIT_FIELD "SW_HID_EDIT_FIELD" +#define HID_EDIT_FILE_INFO_DLG "SW_HID_EDIT_FILE_INFO_DLG" +#define HID_EDIT_LINK_DLG "SW_HID_EDIT_LINK_DLG" +#define HID_EDIT_OBJECT "SW_HID_EDIT_OBJECT" +#define HID_GOTO "SW_HID_GOTO" +#define HID_SET_FIELD_VALUE "SW_HID_SET_FIELD_VALUE" +#define HID_PASTE "SW_HID_PASTE" +#define HID_REDO "SW_HID_REDO" +#define HID_SEARCH "SW_HID_SEARCH" +#define HID_REPLACE "SW_HID_REPLACE" +#define HID_SELECT_ALL "SW_HID_SELECT_ALL" +#define HID_UNDO "SW_HID_UNDO" +#define HID_REPEAT "SW_HID_REPEAT" +#define HID_BUFFER_UPDATE "SW_HID_BUFFER_UPDATE" +#define HID_UPDATE_FIELDS "SW_HID_UPDATE_FIELDS" +#define HID_EXECUTE_MACROFIELD "SW_HID_EXECUTE_MACROFIELD" +#define HID_EDIT_FORMULA "SW_HID_EDIT_FORMULA" +#define HID_CALC_TABLE "SW_HID_CALC_TABLE" +#define HID_NUM_BULLET_DOWN "SW_HID_NUM_BULLET_DOWN" +#define HID_NUM_BULLET_UP "SW_HID_NUM_BULLET_UP" +#define HID_NUM_BULLET_PREV "SW_HID_NUM_BULLET_PREV" +#define HID_NUM_BULLET_NEXT "SW_HID_NUM_BULLET_NEXT" +#define HID_NUM_BULLET_MOVEUP "SW_HID_NUM_BULLET_MOVEUP" +#define HID_NUM_BULLET_MOVEDOWN "SW_HID_NUM_BULLET_MOVEDOWN" +#define HID_NUM_BULLET_NONUM "SW_HID_NUM_BULLET_NONUM" +#define HID_NUM_BULLET_OFF "SW_HID_NUM_BULLET_OFF" +#define HID_NUM_BULLET_ON "SW_HID_NUM_BULLET_ON" +#define HID_NUM_BULLET_OUTLINE_DOWN "SW_HID_NUM_BULLET_OUTLINE_DOWN" +#define HID_NUM_BULLET_OUTLINE_UP "SW_HID_NUM_BULLET_OUTLINE_UP" +#define HID_NUM_BULLET_OUTLINE_MOVEUP "SW_HID_NUM_BULLET_OUTLINE_MOVEUP" +#define HID_NUM_BULLET_OUTLINE_MOVEDOWN "SW_HID_NUM_BULLET_OUTLINE_MOVEDOWN" +#define HID_UPDATE_INPUTFIELDS "SW_HID_UPDATE_INPUTFIELDS" +#define HID_NUM_NUMBERING_ON "SW_HID_NUM_NUMBERING_ON" +#define HID_REPEAT_SEARCH "SW_HID_REPEAT_SEARCH" +#define HID_REPAGINATE "SW_HID_REPAGINATE" + +#define HID_REFRESH_VIEW "SW_HID_REFRESH_VIEW" +#define HID_RIBBON "SW_HID_RIBBON" +#define HID_RULER "SW_HID_RULER" +#define HID_STATUSBAR "SW_HID_STATUSBAR" +#define HID_TOOLBOX "SW_HID_TOOLBOX" +#define HID_VIEW_BOUNDS "SW_HID_VIEW_BOUNDS" +#define HID_VIEW_FIELDS "SW_HID_VIEW_FIELDS" +#define HID_VLINEAL "SW_HID_VLINEAL" +#define HID_VSCROLLBAR "SW_HID_VSCROLLBAR" +#define HID_HSCROLLBAR "SW_HID_HSCROLLBAR" +#define HID_VIEW_META_CHARS "SW_HID_VIEW_META_CHARS" +#define HID_VIEW_MARKS "SW_HID_VIEW_MARKS" +#define HID_VIEW_FIELDNAME "SW_HID_VIEW_FIELDNAME" +#define HID_VIEW_TABLEGRID "SW_HID_VIEW_TABLEGRID" +#define HID_ZOOM "SW_HID_ZOOM" + +#define HID_DELETE_BOOKMARK "SW_HID_DELETE_BOOKMARK" +#define HID_INSERT_BREAK "SW_HID_INSERT_BREAK" +#define HID_INSERT_COLUMN_BREAK "SW_HID_INSERT_COLUMN_BREAK" +#define HID_INSERT_FILE "SW_HID_INSERT_FILE" +#define HID_INSERT_FOOTNOTE "SW_HID_INSERT_FOOTNOTE" +#define HID_INSERT_GRAFIC "SW_HID_INSERT_GRAFIC" +#define HID_INSERT_LINEBREAK "SW_HID_INSERT_LINEBREAK" +#define HID_INSERT_MERGEFIELD_DLG "SW_HID_INSERT_MERGEFIELD_DLG" +#define HID_INSERT_OBJECT_DLG "SW_HID_INSERT_OBJECT_DLG" +#define HID_INSERT_PAGEBREAK "SW_HID_INSERT_PAGEBREAK" +#define HID_INSERT_RECORD "SW_HID_INSERT_RECORD" +#define HID_MERGE_RECORD "SW_HID_MERGE_RECORD" +#define HID_INSERT_SYMBOL "SW_HID_INSERT_SYMBOL" +#define HID_INSERT_STRING "SW_HID_INSERT_STRING" +#define HID_INSERT_COLS "SW_HID_INSERT_COLS" +#define HID_INSERT_FRAME_INTERACT "SW_HID_INSERT_FRAME_INTERACT" +#define HID_INSERT_FRAME "SW_HID_INSERT_FRAME" +#define HID_INSERT_IDX_ENTRY "SW_HID_INSERT_IDX_ENTRY" +#define HID_INSERT_USERIDX_ENTRY "SW_HID_INSERT_USERIDX_ENTRY" +#define HID_INSERT_CNTNTIDX_ENTRY "SW_HID_INSERT_CNTNTIDX_ENTRY" +#define HID_INSERT_SOFT_HYPHEN "SW_HID_INSERT_SOFT_HYPHEN" +#define HID_INSERT_HARD_SPACE "SW_HID_INSERT_HARD_SPACE" + +#define HID_SET_FONT "SW_HID_SET_FONT" +#define HID_SET_FONT_SIZE "SW_HID_SET_FONT_SIZE" +#define HID_GROW_FONT_SIZE "SW_HID_GROW_FONT_SIZE" +#define HID_SHRINK_FONT_SIZE "SW_HID_SHRINK_FONT_SIZE" +#define HID_SET_BOLD "SW_HID_SET_BOLD" +#define HID_SET_ITALIC "SW_HID_SET_ITALIC" +#define HID_SET_SHADOW "SW_HID_SET_SHADOW" +#define HID_SET_OUTLINE "SW_HID_SET_OUTLINE" +#define HID_SET_UNDERLINE "SW_HID_SET_UNDERLINE" +#define HID_SET_STRIKEOUT "SW_HID_SET_STRIKEOUT" +#define HID_SET_SUPER_SCRIPT "SW_HID_SET_SUPER_SCRIPT" +#define HID_SET_SUB_SCRIPT "SW_HID_SET_SUB_SCRIPT" +#define HID_SET_COLOR "SW_HID_SET_COLOR" +#define HID_SET_CASEMAP "SW_HID_SET_CASEMAP" +#define HID_SET_LANGUAGE "SW_HID_SET_LANGUAGE" +#define HID_SET_KERNING "SW_HID_SET_KERNING" +#define HID_INDENT_TO_TABSTOP "SW_HID_INDENT_TO_TABSTOP" +#define HID_SET_LEFT_PARA "SW_HID_SET_LEFT_PARA" +#define HID_SET_RIGHT_PARA "SW_HID_SET_RIGHT_PARA" +#define HID_SET_CENTER_PARA "SW_HID_SET_CENTER_PARA" +#define HID_SET_JUSTIFY_PARA "SW_HID_SET_JUSTIFY_PARA" +#define HID_SET_LINE_SPACE_1 "SW_HID_SET_LINE_SPACE_1" +#define HID_SET_LINE_SPACE_15 "SW_HID_SET_LINE_SPACE_15" +#define HID_SET_LINE_SPACE_2 "SW_HID_SET_LINE_SPACE_2" +#define HID_FLIP_HORZ_GRAFIC "SW_HID_FLIP_HORZ_GRAFIC" +#define HID_FLIP_VERT_GRAFIC "SW_HID_FLIP_VERT_GRAFIC" +#define HID_SET_ADJUST "SW_HID_SET_ADJUST" +#define HID_SET_LRMARGIN "SW_HID_SET_LRMARGIN" +#define HID_SET_ULMARGIN "SW_HID_SET_ULMARGIN" +#define HID_UNINDENT_TO_TABSTOP "SW_HID_UNINDENT_TO_TABSTOP" +#define HID_SET_HYPHEN_ZONE "SW_HID_SET_HYPHEN_ZONE" +#define HID_SET_PAGE_BREAK "SW_HID_SET_PAGE_BREAK" +#define HID_SET_KEEP_TOGETHER "SW_HID_SET_KEEP_TOGETHER" +#define HID_SET_WIDOW "SW_HID_SET_WIDOW" +#define HID_SET_ORPHAN "SW_HID_SET_ORPHAN" +#define HID_FORMAT_SHADOW "SW_HID_FORMAT_SHADOW" +#define HID_FORMAT_BORDER "SW_HID_FORMAT_BORDER" +#define HID_FORMAT_CHAR_DLG "SW_HID_FORMAT_CHAR_DLG" +#define HID_FORMAT_PARA_DLG "SW_HID_FORMAT_PARA_DLG" +#define HID_FORMAT_TAB "SW_HID_FORMAT_TAB" +#define HID_FORMAT_TAB_DLG "SW_HID_FORMAT_TAB_DLG" +#define HID_FORMAT_BORDER_DLG "SW_HID_FORMAT_BORDER_DLG" +#define HID_FORMAT_BACKGROUND "SW_HID_FORMAT_BACKGROUND" +#define HID_FORMAT_BACKGROUND_DLG "SW_HID_FORMAT_BACKGROUND_DLG" +#define HID_FORMAT_PAGE "SW_HID_FORMAT_PAGE" +#define HID_FORMAT_PAGE_DLG "SW_HID_FORMAT_PAGE_DLG" +#define HID_FORMAT_DROPCAPS "SW_HID_FORMAT_DROPCAPS" +#define HID_FORMAT_FRAME_DLG "SW_HID_FORMAT_FRAME_DLG" +#define HID_FORMAT_GRAFIC_DLG "SW_HID_FORMAT_GRAFIC_DLG" +#define HID_FORMAT_TABLE_DLG "SW_HID_FORMAT_TABLE_DLG" +#define HID_NEW_STYLE_BY_EXAMPLE "SW_HID_NEW_STYLE_BY_EXAMPLE" +#define HID_UPDATE_STYLE_BY_EXAMPLE "SW_HID_UPDATE_STYLE_BY_EXAMPLE" +#define HID_STYLE_SHEET_FRAME_DLG "SW_HID_STYLE_SHEET_FRAME_DLG" +#define HID_STYLE_SHEET_DOC_DLG "SW_HID_STYLE_SHEET_DOC_DLG" +#define HID_FORMAT_RESET "SW_HID_FORMAT_RESET" +#define HID_FRAME_TO_TOP "SW_HID_FRAME_TO_TOP" +#define HID_FRAME_TO_BOTTOM "SW_HID_FRAME_TO_BOTTOM" +#define HID_FRAME_NOWRAP "SW_HID_FRAME_NOWRAP" +#define HID_FRAME_WRAP "SW_HID_FRAME_WRAP" +#define HID_FRAME_WRAPTHRU "SW_HID_FRAME_WRAPTHRU" +#define HID_FRAME_ALIGN_HORZ_LEFT "SW_HID_FRAME_ALIGN_HORZ_LEFT" +#define HID_FRAME_ALIGN_HORZ_RIGHT "SW_HID_FRAME_ALIGN_HORZ_RIGHT" +#define HID_FRAME_ALIGN_HORZ_CENTER "SW_HID_FRAME_ALIGN_HORZ_CENTER" +#define HID_FRAME_ALIGN_VERT_TOP "SW_HID_FRAME_ALIGN_VERT_TOP" +#define HID_FRAME_ALIGN_VERT_BOTTOM "SW_HID_FRAME_ALIGN_VERT_BOTTOM" +#define HID_FRAME_ALIGN_VERT_CENTER "SW_HID_FRAME_ALIGN_VERT_CENTER" +#define HID_SET_FRM_SIZE "SW_HID_SET_FRM_SIZE" +#define HID_SET_FRM_POSITION "SW_HID_SET_FRM_POSITION" +#define HID_SET_FRM_ANCHOR "SW_HID_SET_FRM_ANCHOR" +#define HID_SET_FRM_WRAP "SW_HID_SET_FRM_WRAP" +#define HID_SET_FRM_DIST "SW_HID_SET_FRM_DIST" +#define HID_SET_FRM_OPTIONS "SW_HID_SET_FRM_OPTIONS" +#define HID_SET_GRF_MIRROR "SW_HID_SET_GRF_MIRROR" +#define HID_SET_TABLE_WIDTH "SW_HID_SET_TABLE_WIDTH" +#define HID_SET_TABLE_ALIGN "SW_HID_SET_TABLE_ALIGN" +#define HID_SET_CHAR_STYLE "SW_HID_SET_CHAR_STYLE" +#define HID_SET_PARA_STYLE "SW_HID_SET_PARA_STYLE" +#define HID_SET_PAGE_STYLE "SW_HID_SET_PAGE_STYLE" +#define HID_SET_FRM_MACRO "SW_HID_SET_FRM_MACRO" +#define HID_SET_FRM_COLUMNS "SW_HID_SET_FRM_COLUMNS" +#define HID_SET_FRM_COLUMN_WIDTH "SW_HID_SET_FRM_COLUMN_WIDTH" +#define HID_UPDATE_STYLES_DIRECT "SW_HID_UPDATE_STYLES_DIRECT" + +#define HID_TABLE_INSERT_ROW "SW_HID_TABLE_INSERT_ROW" +#define HID_TABLE_DELETE_ROW "SW_HID_TABLE_DELETE_ROW" +#define HID_TABLE_DELETE_COL "SW_HID_TABLE_DELETE_COL" +#define HID_TABLE_MERGE_CELLS "SW_HID_TABLE_MERGE_CELLS" +#define HID_AUTOFMT_TABLE "SW_HID_AUTOFMT_TABLE" +#define HID_SWDLG_STRINPUT "SW_HID_SWDLG_STRINPUT" +#define HID_TABLE_SET_ULSPACE "SW_HID_TABLE_SET_ULSPACE" +#define HID_TABLE_SET_GRID "SW_HID_TABLE_SET_GRID" +#define HID_TABLE_SET_SHADOW "SW_HID_TABLE_SET_SHADOW" +#define HID_TABLE_SELECT_ROW "SW_HID_TABLE_SELECT_ROW" +#define HID_TABLE_SELECT_COL "SW_HID_TABLE_SELECT_COL" +#define HID_TABLE_SELECT_ALL "SW_HID_TABLE_SELECT_ALL" +#define HID_TABLE_SET_READ_ONLY_CELLS "SW_HID_TABLE_SET_READ_ONLY_CELLS" +#define HID_TABLE_UNSET_READ_ONLY_CELLS "SW_HID_TABLE_UNSET_READ_ONLY_CELLS" +#define HID_PAGE_STYLE_SET_COLS "SW_HID_PAGE_STYLE_SET_COLS" +#define HID_SET_PROP_LINE_SPACE "SW_HID_SET_PROP_LINE_SPACE" +#define HID_SET_ABS_LINE_SPACE "SW_HID_SET_ABS_LINE_SPACE" + +#define HID_SPELLING_DLG "SW_HID_SPELLING_DLG" +#define HID_THESAURUS_DLG "SW_HID_THESAURUS_DLG" +#define HID_HYPHENATE_OPT_DLG "SW_HID_HYPHENATE_OPT_DLG" +#define HID_SORTING "SW_HID_SORTING" +#define HID_SORTING_DLG "SW_HID_SORTING_DLG" +#define HID_CALCULATE "SW_HID_CALCULATE" +#define HID_RECORD_MACRO_DLG "SW_HID_RECORD_MACRO_DLG" +#define HID_PLAY_MACRO_DLG "SW_HID_PLAY_MACRO_DLG" +#define HID_CONFIG_DLG "SW_HID_CONFIG_DLG" +#define HID_EXPAND_GLOSSARY "SW_HID_EXPAND_GLOSSARY" +#define HID_RENAME_GLOSSARY "SW_HID_RENAME_GLOSSARY" +#define HID_CONFIG_MENU "SW_HID_CONFIG_MENU" +#define HID_CONFIG_KEY "SW_HID_CONFIG_KEY" +#define HID_ASSIGN_LOCAL_MACRO_DLG "SW_HID_ASSIGN_LOCAL_MACRO_DLG" +#define HID_COMPILE_MACRO "SW_HID_COMPILE_MACRO" +#define HID_CONFIG_VIEWOPTIONS "SW_HID_CONFIG_VIEWOPTIONS" +#define HID_CONFIG_COLORS "SW_HID_CONFIG_COLORS" +#define HID_INSERT_GLOSSARY "SW_HID_INSERT_GLOSSARY" +#define HID_AUTO_CORRECT "SW_HID_AUTO_CORRECT" +#define HID_AUTO_CORRECT_DLG "SW_HID_AUTO_CORRECT_DLG" +#define HID_HELP_PI "SW_HID_HELP_PI" +#define HID_NAVIGATION_PI "SW_HID_NAVIGATION_PI" +#define HID_TEMPLATE_PI "SW_HID_TEMPLATE_PI" +#define HID_ADDR_PI "SW_HID_ADDR_PI" +#define HID_NAVIGATION_PI_GOTO_PAGE "SW_HID_NAVIGATION_PI_GOTO_PAGE" +#define HID_LETTER_WIZZARD "SW_HID_LETTER_WIZZARD" +#define HID_FAX_WIZZARD "SW_HID_FAX_WIZZARD" +#define HID_MEMO_WIZZARD "SW_HID_MEMO_WIZZARD" +#define HID_AGENDA_WIZZARD "SW_HID_AGENDA_WIZZARD" + +#define HID_NEW_WINDOW "SW_HID_NEW_WINDOW" +#define HID_ARRANGE_ALL_WIN "SW_HID_ARRANGE_ALL_WIN" +#define HID_ARRANGE_CASCADE_WIN "SW_HID_ARRANGE_CASCADE_WIN" +#define HID_ARRANGE_HORZ_WIN "SW_HID_ARRANGE_HORZ_WIN" +#define HID_ARRANGE_VERT_WIN "SW_HID_ARRANGE_VERT_WIN" + +#define HID_SHOW_HELP_INDEX "SW_HID_SHOW_HELP_INDEX" +#define HID_SHOW_KEYBOARD_HELP "SW_HID_SHOW_KEYBOARD_HELP" +#define HID_SHOW_HELP_MANUAL "SW_HID_SHOW_HELP_MANUAL" +#define HID_SHOW_UPDATE_HELP "SW_HID_SHOW_UPDATE_HELP" + +#define HID_CHAR_LEFT "SW_HID_CHAR_LEFT" +#define HID_CHAR_RIGHT "SW_HID_CHAR_RIGHT" +#define HID_LINE_UP "SW_HID_LINE_UP" +#define HID_LINE_DOWN "SW_HID_LINE_DOWN" +#define HID_START_OF_LINE "SW_HID_START_OF_LINE" +#define HID_END_OF_LINE "SW_HID_END_OF_LINE" +#define HID_START_OF_DOCUMENT "SW_HID_START_OF_DOCUMENT" +#define HID_END_OF_DOCUMENT "SW_HID_END_OF_DOCUMENT" +#define HID_START_OF_NEXT_PAGE "SW_HID_START_OF_NEXT_PAGE" +#define HID_END_OF_NEXT_PAGE "SW_HID_END_OF_NEXT_PAGE" +#define HID_START_OF_PREV_PAGE "SW_HID_START_OF_PREV_PAGE" +#define HID_END_OF_PREV_PAGE "SW_HID_END_OF_PREV_PAGE" +#define HID_START_OF_PAGE "SW_HID_START_OF_PAGE" +#define HID_END_OF_PAGE "SW_HID_END_OF_PAGE" +#define HID_START_OF_COLUMN "SW_HID_START_OF_COLUMN" +#define HID_END_OF_COLUMN "SW_HID_END_OF_COLUMN" +#define HID_START_OF_PARA "SW_HID_START_OF_PARA" +#define HID_END_OF_PARA "SW_HID_END_OF_PARA" +#define HID_NEXT_WORD "SW_HID_NEXT_WORD" +#define HID_PREV_WORD "SW_HID_PREV_WORD" +#define HID_NEXT_SENT "SW_HID_NEXT_SENT" +#define HID_PREV_SENT "SW_HID_PREV_SENT" +#define HID_DELETE "SW_HID_DELETE" +#define HID_BACKSPACE "SW_HID_BACKSPACE" +#define HID_DELETE_SENT "SW_HID_DELETE_SENT" +#define HID_DELETE_BACK_SENT "SW_HID_DELETE_BACK_SENT" +#define HID_DELETE_WORD "SW_HID_DELETE_WORD" +#define HID_DELETE_BACK_WORD "SW_HID_DELETE_BACK_WORD" +#define HID_DELETE_LINE "SW_HID_DELETE_LINE" +#define HID_DELETE_BACK_LINE "SW_HID_DELETE_BACK_LINE" +#define HID_DELETE_PARA "SW_HID_DELETE_PARA" +#define HID_DELETE_BACK_PARA "SW_HID_DELETE_BACK_PARA" +#define HID_DELETE_WHOLE_LINE "SW_HID_DELETE_WHOLE_LINE" +#define HID_SET_INS_MODE "SW_HID_SET_INS_MODE" +#define HID_PAGEUP "SW_HID_PAGEUP" +#define HID_PAGEDOWN "SW_HID_PAGEDOWN" +#define HID_SET_ADD_MODE "SW_HID_SET_ADD_MODE" +#define HID_SET_EXT_MODE "SW_HID_SET_EXT_MODE" +#define HID_ESCAPE "SW_HID_ESCAPE" +#define HID_SELECT_WORD "SW_HID_SELECT_WORD" +#define HID_START_TABLE "SW_HID_START_TABLE" +#define HID_END_TABLE "SW_HID_END_TABLE" +#define HID_NEXT_TABLE "SW_HID_NEXT_TABLE" +#define HID_PREV_TABLE "SW_HID_PREV_TABLE" +#define HID_START_OF_NEXT_COLUMN "SW_HID_START_OF_NEXT_COLUMN" +#define HID_END_OF_NEXT_COLUMN "SW_HID_END_OF_NEXT_COLUMN" +#define HID_START_OF_PREV_COLUMN "SW_HID_START_OF_PREV_COLUMN" +#define HID_END_OF_PREV_COLUMN "SW_HID_END_OF_PREV_COLUMN" +#define HID_FOOTNOTE_TO_ANCHOR "SW_HID_FOOTNOTE_TO_ANCHOR" +#define HID_NEXT_FOOTNOTE "SW_HID_NEXT_FOOTNOTE" +#define HID_PREV_FOOTNOTE "SW_HID_PREV_FOOTNOTE" +#define HID_CNTNT_TO_NEXT_FRAME "SW_HID_CNTNT_TO_NEXT_FRAME" +#define HID_FRAME_TO_ANCHOR "SW_HID_FRAME_TO_ANCHOR" +#define HID_TO_HEADER "SW_HID_TO_HEADER" +#define HID_TO_FOOTER "SW_HID_TO_FOOTER" +#define HID_IDX_MARK_TO_IDX "SW_HID_IDX_MARK_TO_IDX" + +#define HID_ENVELOP "SW_HID_ENVELOP" +#define HID_LABEL "SW_HID_LABEL" +#define HID_ENVELOP_PRINT "SW_HID_ENVELOP_PRINT" + +#define HID_NAVIGATION_IMGBTN "SW_HID_NAVIGATION_IMGBTN" +#define HID_ENVELOP_INSERT "SW_HID_ENVELOP_INSERT" + +#define HID_WEBTOOLS_TOOLBOX "SW_HID_WEBTOOLS_TOOLBOX" +#define HID_WEBTEXT_TOOLBOX "SW_HID_WEBTEXT_TOOLBOX" +#define HID_WEBFRAME_TOOLBOX "SW_HID_WEBFRAME_TOOLBOX" +#define HID_TEXT_TOOLBOX "SW_HID_TEXT_TOOLBOX" +#define HID_TABLE_TOOLBOX "SW_HID_TABLE_TOOLBOX" +#define HID_FRAME_TOOLBOX "SW_HID_FRAME_TOOLBOX" +#define HID_GRAFIK_TOOLBOX "SW_HID_GRAFIK_TOOLBOX" +#define HID_OLE_TOOLBOX "SW_HID_OLE_TOOLBOX" +#define HID_DRAW_TOOLBOX "SW_HID_DRAW_TOOLBOX" +#define HID_BEZIER_TOOLBOX "SW_HID_BEZIER_TOOLBOX" +#define HID_DRAW_TEXT_TOOLBOX "SW_HID_DRAW_TEXT_TOOLBOX" +#define HID_NUM_TOOLBOX "SW_HID_NUM_TOOLBOX" +#define HID_TOOLS_TOOLBOX "SW_HID_TOOLS_TOOLBOX" +#define HID_SRCVIEW_TOOLBOX "SW_HID_SRCVIEW_TOOLBOX" + +#define HID_LABEL_INSERT "SW_HID_LABEL_INSERT" +#define HID_CALC_TOOLBOX "SW_HID_CALC_TOOLBOX" +#define HID_PVIEW_TOOLBOX "SW_HID_PVIEW_TOOLBOX" + +#define HID_FIELD_INSERT "SW_HID_FIELD_INSERT" +#define HID_FIELD_CLOSE "SW_HID_FIELD_CLOSE" + +#define HID_COND_COLL_TABLIST "SW_HID_COND_COLL_TABLIST" + +#define HID_DB_SELECTION_TLB "SW_HID_DB_SELECTION_TLB" +#define HID_FIELD_DINF_TYPE "SW_HID_FIELD_DINF_TYPE" + +#define HID_DRAWFORM_TOOLBOX "SW_HID_DRAWFORM_TOOLBOX" +#define HID_SELECT_TEMPLATE "SW_HID_SELECT_TEMPLATE" + +#define HID_AP_INSERT_DB_SEL "SW_HID_AP_INSERT_DB_SEL" +#define HID_WEBGRAPHIC_TOOLBOX "SW_HID_WEBGRAPHIC_TOOLBOX" +#define HID_OUTLINE_FORM "SW_HID_OUTLINE_FORM" +#define HID_NUM_RESET "SW_HID_NUM_RESET" + +#define HID_AUTOFORMAT_REJECT "SW_HID_AUTOFORMAT_REJECT" +#define HID_AUTOFORMAT_ACCEPT "SW_HID_AUTOFORMAT_ACCEPT" +#define HID_AUTOFORMAT_EDIT_CHG "SW_HID_AUTOFORMAT_EDIT_CHG" //insert index/entries/Pattern buttons and edits -#define HID_TOX_ENTRY_BUTTON (HID_BASE + 2088) -#define HID_TOX_ENTRY_EDIT (HID_BASE + 2089) - -#define HID_DLG_NEW_USER_IDX (HID_BASE + 2090) -#define HID_INSERT_IDX_MRK_OK (HID_BASE + 2091) -#define HID_INSERT_IDX_MRK_CLOSE (HID_BASE + 2092) -#define HID_INSERT_AUTH_MRK_OK (HID_BASE + 2093) -#define HID_INSERT_AUTH_MRK_CLOSE (HID_BASE + 2094) -#define HID_INSERT_IDX_MRK_DELETE (HID_BASE + 2095) -#define HID_INSERT_IDX_MRK_NEW (HID_BASE + 2096) -#define HID_INSERT_IDX_MRK_PREV (HID_BASE + 2097) -#define HID_INSERT_IDX_MRK_PREV_SAME (HID_BASE + 2098) -#define HID_INSERT_IDX_MRK_NEXT (HID_BASE + 2099) -#define HID_INSERT_IDX_MRK_NEXT_SAME (HID_BASE + 2100) -#define HID_INSERT_IDX_MRK_TYPE (HID_BASE + 2101) -#define HID_INSERT_IDX_MRK_ENTRY (HID_BASE + 2102) -#define HID_INSERT_IDX_MRK_PRIM_KEY (HID_BASE + 2103) -#define HID_INSERT_IDX_MRK_SEC_KEY (HID_BASE + 2104) -#define HID_INSERT_IDX_MRK_LEVEL (HID_BASE + 2105) -#define HID_INSERT_IDX_MRK_MAIN_ENTRY (HID_BASE + 2106) -#define HID_INSERT_IDX_MRK_APPLY_ALL (HID_BASE + 2107) -#define HID_INSERT_AUTH_MRK_ENTRY (HID_BASE + 2108) -#define HID_INSERT_AUTH_MRK_CREATE_ENTRY (HID_BASE + 2109) -#define HID_INSERT_AUTH_MRK_EDIT_ENTRY (HID_BASE + 2110) -#define HID_TOKEN_WINDOW (HID_BASE + 2111) - -#define HID_AUTH_FIELD_IDENTIFIER (HID_BASE + 2112 ) -#define HID_AUTH_FIELD_AUTHORITY_TYPE (HID_BASE + 2113 ) -#define HID_AUTH_FIELD_ADDRESS (HID_BASE + 2114 ) -#define HID_AUTH_FIELD_ANNOTE (HID_BASE + 2115 ) -#define HID_AUTH_FIELD_AUTHOR (HID_BASE + 2116 ) -#define HID_AUTH_FIELD_BOOKTITLE (HID_BASE + 2117 ) -#define HID_AUTH_FIELD_CHAPTER (HID_BASE + 2118 ) -#define HID_AUTH_FIELD_EDITION (HID_BASE + 2119 ) -#define HID_AUTH_FIELD_EDITOR (HID_BASE + 2120 ) -#define HID_AUTH_FIELD_HOWPUBLISHED (HID_BASE + 2121 ) -#define HID_AUTH_FIELD_INSTITUTION (HID_BASE + 2122 ) -#define HID_AUTH_FIELD_JOURNAL (HID_BASE + 2123 ) -#define HID_AUTH_FIELD_MONTH (HID_BASE + 2124 ) -#define HID_AUTH_FIELD_NOTE (HID_BASE + 2125 ) -#define HID_AUTH_FIELD_NUMBER (HID_BASE + 2126 ) -#define HID_AUTH_FIELD_ORGANIZATIONS (HID_BASE + 2127 ) -#define HID_AUTH_FIELD_PAGES (HID_BASE + 2128 ) -#define HID_AUTH_FIELD_PUBLISHER (HID_BASE + 2129 ) -#define HID_AUTH_FIELD_SCHOOL (HID_BASE + 2130 ) -#define HID_AUTH_FIELD_SERIES (HID_BASE + 2131 ) -#define HID_AUTH_FIELD_TITLE (HID_BASE + 2132 ) -#define HID_AUTH_FIELD_REPORT_TYPE (HID_BASE + 2133 ) -#define HID_AUTH_FIELD_VOLUME (HID_BASE + 2134 ) -#define HID_AUTH_FIELD_YEAR (HID_BASE + 2135 ) -#define HID_AUTH_FIELD_URL (HID_BASE + 2136 ) -#define HID_AUTH_FIELD_CUSTOM1 (HID_BASE + 2137 ) -#define HID_AUTH_FIELD_CUSTOM2 (HID_BASE + 2138 ) -#define HID_AUTH_FIELD_CUSTOM3 (HID_BASE + 2139 ) -#define HID_AUTH_FIELD_CUSTOM4 (HID_BASE + 2140 ) -#define HID_AUTH_FIELD_CUSTOM5 (HID_BASE + 2141 ) -#define HID_AUTH_FIELD_ISBN (HID_BASE + 2142 ) - -#define HID_AUTH_MARK_DLG_FROM_COMP_RB (HID_BASE + 2143 ) -#define HID_AUTH_MARK_DLG_FROM_DOC_RB (HID_BASE + 2144 ) -#define HID_AUTH_MARK_DLG_ID_LISTBOX (HID_BASE + 2145 ) - -#define HID_INSERT_INDEX_ENTRY_LEVEL_LB (HID_BASE + 2146 ) -#define HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE (HID_BASE + 2147 ) -#define HID_INSERT_IDX_MRK_SRCH_WORDONLY (HID_BASE + 2148 ) -#define HID_DLG_CREATE_AUTOMARK (HID_BASE + 2149 ) -#define HID_BUSINESS_CARD_CONTENT (HID_BASE + 2150 ) -#define HID_SAVE_LABEL_DLG (HID_BASE + 2151 ) -#define HID_BUSINESS_FMT_PAGE (HID_BASE + 2152 ) -#define HID_BUSINESS_FMT_PAGE_CONT (HID_BASE + 2153 ) -#define HID_BUSINESS_FMT_PAGE_SHEET (HID_BASE + 2154 ) -#define HID_BUSINESS_FMT_PAGE_BRAND (HID_BASE + 2155 ) -#define HID_BUSINESS_FMT_PAGE_TYPE (HID_BASE + 2156 ) -#define HID_SEND_MASTER_DIALOG (HID_BASE + 2157 ) -#define HID_SEND_MASTER_CTRL_PUSHBUTTON_OK (HID_BASE + 2158 ) -#define HID_SEND_MASTER_CTRL_PUSHBUTTON_CANCEL (HID_BASE + 2159 ) -#define HID_SEND_MASTER_CTRL_LISTBOX_FILTER (HID_BASE + 2160 ) -#define HID_SEND_MASTER_CTRL_CONTROL_FILEVIEW (HID_BASE + 2161 ) -#define HID_SEND_MASTER_CTRL_EDIT_FILEURL (HID_BASE + 2162 ) -#define HID_SEND_MASTER_CTRL_CHECKBOX_AUTOEXTENSION (HID_BASE + 2163 ) -#define HID_SEND_MASTER_CTRL_LISTBOX_TEMPLATE (HID_BASE + 2164 ) -#define HID_SEND_MASTER_CTRL_DUMMY (HID_BASE + 2165 ) - -#define HID_SEND_HTML_DIALOG (HID_BASE + 2166 ) -#define HID_SEND_HTML_CTRL_PUSHBUTTON_OK (HID_BASE + 2167 ) -#define HID_SEND_HTML_CTRL_PUSHBUTTON_CANCEL (HID_BASE + 2168 ) -#define HID_SEND_HTML_CTRL_LISTBOX_FILTER (HID_BASE + 2169 ) -#define HID_SEND_HTML_CTRL_CONTROL_FILEVIEW (HID_BASE + 2170 ) -#define HID_SEND_HTML_CTRL_EDIT_FILEURL (HID_BASE + 2171 ) -#define HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION (HID_BASE + 2172 ) -#define HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE (HID_BASE + 2173 ) -#define HID_SEND_HTML_CTRL_DUMMY (HID_BASE + 2174 ) - -#define HID_INSERT_IDX_MRK_PHONETIC_READING (HID_BASE + 2175 ) -#define HID_COLUMN_VALUESET (HID_BASE + 2176 ) -#define HID_PVIEW_ZOOM_LB (HID_BASE + 2177 ) -#define HID_MAIL_MERGE_SELECT (HID_BASE + 2178 ) -#define HID_MAIL_MERGE_CREATE_FROM (HID_BASE + 2179 ) -#define HID_MAIL_MERGE_INSERT_FIELDS (HID_BASE + 2180 ) -#define HID_PRINT_AS_MERGE (HID_BASE + 2181 ) -#define HID_MERGE_SOURCE_UNAVAILABLE (HID_BASE + 2182 ) -#define HID_DATA_SOURCES_UNAVAILABLE (HID_BASE + 2183 ) -#define HID_MODULE_TOOLBOX (HID_BASE + 2184 ) -#define HID_SECTION_INDENTS_PAGE (HID_BASE + 2185 ) - -#define HID_FLD_DROPDOWN (HID_BASE + 2186 ) -#define HID_MM_DOCSELECTPAGE (HID_BASE + 2187 ) -#define HID_MM_OUTPUTTYPEPAGE (HID_BASE + 2188 ) -#define HID_MM_ADDRESSBLOCKPAGE (HID_BASE + 2189 ) -#define HID_MM_GREETINGSPAGE (HID_BASE + 2190 ) -#define HID_MM_PREPAREMERGEPAGE (HID_BASE + 2191 ) -#define HID_MM_MERGEPAGE (HID_BASE + 2192 ) -#define HID_MM_OUTPUTPAGE (HID_BASE + 2193 ) -#define HID_MM_ADDRESSLISTDIALOG (HID_BASE + 2194 ) -#define HID_MM_SELECTDBTABLEDDIALOG (HID_BASE + 2195 ) -#define HID_MM_SELECTDBTABLEDDIALOG_LISTBOX (HID_BASE + 2196 ) -#define HID_MM_DBTABLEPREVIEWDIALOG (HID_BASE + 2197 ) -#define HID_MM_CREATEADDRESSLIST (HID_BASE + 2198 ) -#define HID_MM_FIND_ENTRY (HID_BASE + 2199 ) -#define HID_MM_ADD_RENAME_ENTRY (HID_BASE + 2200 ) -#define HID_MM_CUSTOMIZE_ADDRESS_LIST (HID_BASE + 2201 ) -#define HID_MM_CUSTOMIZEADDRESSBLOCK (HID_BASE + 2202 ) -#define HID_MM_SELECTADDRESSBLOCK (HID_BASE + 2203 ) -#define HID_MM_ASSIGNFIELDS (HID_BASE + 2204 ) -#define HID_MM_MAILNOTINSTALLED (HID_BASE + 2205 ) -#define HID_MM_LAYOUT_PAGE (HID_BASE + 2206 ) -#define HID_MM_COPYTO (HID_BASE + 2207 ) -#define HID_MM_ADDRESSLIST_HB (HID_BASE + 2208 ) -#define HID_MM_ADDRESSLIST_TLB (HID_BASE + 2209 ) -#define HID_TP_MAILCONFIG (HID_BASE + 2210 ) -#define HID_MM_TESTACCOUNTSETTINGS (HID_BASE + 2211 ) -#define HID_MM_TESTACCOUNTSETTINGS_TLB (HID_BASE + 2212 ) -#define HID_MM_TESTACCOUNTSETTINGS_HB (HID_BASE + 2213 ) -#define HID_MM_MAILBODY (HID_BASE + 2214 ) -#define HID_MM_SENDMAILS (HID_BASE + 2215 ) -#define HID_MM_SENDMAILS_STATUSLB (HID_BASE + 2216 ) -#define HID_MAILMERGECHILD (HID_BASE + 2217 ) -#define HID_MM_CUSTOMFIELDS (HID_BASE + 2218 ) -#define HID_DLG_WORDCOUNT (HID_BASE + 2219 ) -#define HID_MM_MAILSTATUS_TLB (HID_BASE + 2220 ) -#define HID_RETURN_TO_MAILMERGE (HID_BASE + 2221 ) -#define HID_MM_SAVEWARNING (HID_BASE + 2222 ) -#define HID_MM_QUERY (HID_BASE + 2223 ) -#define HID_MM_SENDWARNING (HID_BASE + 2224 ) -#define HID_MM_SERVERAUTHENTICATION (HID_BASE + 2225 ) - -#define HID_MEDIA_TOOLBOX (HID_BASE + 2227) -#define HID_NID_TBL (HID_BASE + 2228) -#define HID_NID_FRM (HID_BASE + 2229) -#define HID_NID_GRF (HID_BASE + 2230) -#define HID_NID_OLE (HID_BASE + 2231) -#define HID_NID_PGE (HID_BASE + 2232) -#define HID_NID_OUTL (HID_BASE + 2233) -#define HID_NID_MARK (HID_BASE + 2234) -#define HID_NID_DRW (HID_BASE + 2235) -#define HID_NID_CTRL (HID_BASE + 2236) -#define HID_NID_PREV (HID_BASE + 2237) -#define HID_NID_REG (HID_BASE + 2238) -#define HID_NID_BKM (HID_BASE + 2239) -#define HID_NID_SEL (HID_BASE + 2240) -#define HID_NID_FTN (HID_BASE + 2241) -#define HID_NID_POSTIT (HID_BASE + 2242) -#define HID_NID_SRCH_REP (HID_BASE + 2243) -#define HID_NID_INDEX_ENTRY (HID_BASE + 2244) -#define HID_NID_TABLE_FORMULA (HID_BASE + 2245) -#define HID_NID_TABLE_FORMULA_ERROR (HID_BASE + 2246) -#define HID_NID_NEXT (HID_BASE + 2247) -#define HID_MM_NEXT_PAGE (HID_BASE + 2248) -#define HID_MM_PREV_PAGE (HID_BASE + 2249) -#define HID_MM_GREETINGS_CB_PERSONALIZED (HID_BASE + 2250) -#define HID_MM_GREETINGS_LB_FEMALE (HID_BASE + 2251) -#define HID_MM_GREETINGS_PB_FEMALE (HID_BASE + 2252) -#define HID_MM_GREETINGS_LB_MALE (HID_BASE + 2253) -#define HID_MM_GREETINGS_PB_MALE (HID_BASE + 2254) -#define HID_MM_GREETINGS_LB_FEMALECOLUMN (HID_BASE + 2255) -#define HID_MM_GREETINGS_CB_FEMALEFIELD (HID_BASE + 2256) -#define HID_MM_GREETINGS_CB_NEUTRAL (HID_BASE + 2257) -#define HID_MM_BODY_CB_PERSONALIZED (HID_BASE + 2258) -#define HID_MM_BODY_LB_FEMALE (HID_BASE + 2259) -#define HID_MM_BODY_PB_FEMALE (HID_BASE + 2260) -#define HID_MM_BODY_LB_MALE (HID_BASE + 2261) -#define HID_MM_BODY_PB_MALE (HID_BASE + 2262) -#define HID_MM_BODY_LB_FEMALECOLUMN (HID_BASE + 2263) -#define HID_MM_BODY_CB_FEMALEFIELD (HID_BASE + 2264) -#define HID_MM_BODY_CB_NEUTRAL (HID_BASE + 2265) -#define HID_MM_ASSIGN_FIELDS (HID_BASE + 2266) -#define HID_MM_HEADER_0 (HID_BASE + 2267) -#define HID_MM_HEADER_1 (HID_BASE + 2268) -#define HID_MM_HEADER_2 (HID_BASE + 2269) -#define HID_MM_HEADER_3 (HID_BASE + 2270) -#define HID_MM_HEADER_4 (HID_BASE + 2271) -#define HID_MM_HEADER_5 (HID_BASE + 2272) -#define HID_MM_HEADER_6 (HID_BASE + 2273) -#define HID_MM_HEADER_7 (HID_BASE + 2274) -#define HID_MM_HEADER_8 (HID_BASE + 2275) -#define HID_MM_HEADER_9 (HID_BASE + 2276) -#define HID_MM_HEADER_10 (HID_BASE + 2277) -#define HID_MM_HEADER_11 (HID_BASE + 2278) -#define HID_MM_HEADER_12 (HID_BASE + 2279) -#define HID_MM_HEADER_13 (HID_BASE + 2280) +#define HID_TOX_ENTRY_BUTTON "SW_HID_TOX_ENTRY_BUTTON" +#define HID_TOX_ENTRY_EDIT "SW_HID_TOX_ENTRY_EDIT" + +#define HID_DLG_NEW_USER_IDX "SW_HID_DLG_NEW_USER_IDX" +#define HID_INSERT_IDX_MRK_OK "SW_HID_INSERT_IDX_MRK_OK" +#define HID_INSERT_IDX_MRK_CLOSE "SW_HID_INSERT_IDX_MRK_CLOSE" +#define HID_INSERT_AUTH_MRK_OK "SW_HID_INSERT_AUTH_MRK_OK" +#define HID_INSERT_AUTH_MRK_CLOSE "SW_HID_INSERT_AUTH_MRK_CLOSE" +#define HID_INSERT_IDX_MRK_DELETE "SW_HID_INSERT_IDX_MRK_DELETE" +#define HID_INSERT_IDX_MRK_NEW "SW_HID_INSERT_IDX_MRK_NEW" +#define HID_INSERT_IDX_MRK_PREV "SW_HID_INSERT_IDX_MRK_PREV" +#define HID_INSERT_IDX_MRK_PREV_SAME "SW_HID_INSERT_IDX_MRK_PREV_SAME" +#define HID_INSERT_IDX_MRK_NEXT "SW_HID_INSERT_IDX_MRK_NEXT" +#define HID_INSERT_IDX_MRK_NEXT_SAME "SW_HID_INSERT_IDX_MRK_NEXT_SAME" +#define HID_INSERT_IDX_MRK_TYPE "SW_HID_INSERT_IDX_MRK_TYPE" +#define HID_INSERT_IDX_MRK_ENTRY "SW_HID_INSERT_IDX_MRK_ENTRY" +#define HID_INSERT_IDX_MRK_PRIM_KEY "SW_HID_INSERT_IDX_MRK_PRIM_KEY" +#define HID_INSERT_IDX_MRK_SEC_KEY "SW_HID_INSERT_IDX_MRK_SEC_KEY" +#define HID_INSERT_IDX_MRK_LEVEL "SW_HID_INSERT_IDX_MRK_LEVEL" +#define HID_INSERT_IDX_MRK_MAIN_ENTRY "SW_HID_INSERT_IDX_MRK_MAIN_ENTRY" +#define HID_INSERT_IDX_MRK_APPLY_ALL "SW_HID_INSERT_IDX_MRK_APPLY_ALL" +#define HID_INSERT_AUTH_MRK_ENTRY "SW_HID_INSERT_AUTH_MRK_ENTRY" +#define HID_INSERT_AUTH_MRK_CREATE_ENTRY "SW_HID_INSERT_AUTH_MRK_CREATE_ENTRY" +#define HID_INSERT_AUTH_MRK_EDIT_ENTRY "SW_HID_INSERT_AUTH_MRK_EDIT_ENTRY" +#define HID_TOKEN_WINDOW "SW_HID_TOKEN_WINDOW" + +#define HID_AUTH_FIELD_IDENTIFIER "SW_HID_AUTH_FIELD_IDENTIFIER" +#define HID_AUTH_FIELD_AUTHORITY_TYPE "SW_HID_AUTH_FIELD_AUTHORITY_TYPE" +#define HID_AUTH_FIELD_ADDRESS "SW_HID_AUTH_FIELD_ADDRESS" +#define HID_AUTH_FIELD_ANNOTE "SW_HID_AUTH_FIELD_ANNOTE" +#define HID_AUTH_FIELD_AUTHOR "SW_HID_AUTH_FIELD_AUTHOR" +#define HID_AUTH_FIELD_BOOKTITLE "SW_HID_AUTH_FIELD_BOOKTITLE" +#define HID_AUTH_FIELD_CHAPTER "SW_HID_AUTH_FIELD_CHAPTER" +#define HID_AUTH_FIELD_EDITION "SW_HID_AUTH_FIELD_EDITION" +#define HID_AUTH_FIELD_EDITOR "SW_HID_AUTH_FIELD_EDITOR" +#define HID_AUTH_FIELD_HOWPUBLISHED "SW_HID_AUTH_FIELD_HOWPUBLISHED" +#define HID_AUTH_FIELD_INSTITUTION "SW_HID_AUTH_FIELD_INSTITUTION" +#define HID_AUTH_FIELD_JOURNAL "SW_HID_AUTH_FIELD_JOURNAL" +#define HID_AUTH_FIELD_MONTH "SW_HID_AUTH_FIELD_MONTH" +#define HID_AUTH_FIELD_NOTE "SW_HID_AUTH_FIELD_NOTE" +#define HID_AUTH_FIELD_NUMBER "SW_HID_AUTH_FIELD_NUMBER" +#define HID_AUTH_FIELD_ORGANIZATIONS "SW_HID_AUTH_FIELD_ORGANIZATIONS" +#define HID_AUTH_FIELD_PAGES "SW_HID_AUTH_FIELD_PAGES" +#define HID_AUTH_FIELD_PUBLISHER "SW_HID_AUTH_FIELD_PUBLISHER" +#define HID_AUTH_FIELD_SCHOOL "SW_HID_AUTH_FIELD_SCHOOL" +#define HID_AUTH_FIELD_SERIES "SW_HID_AUTH_FIELD_SERIES" +#define HID_AUTH_FIELD_TITLE "SW_HID_AUTH_FIELD_TITLE" +#define HID_AUTH_FIELD_REPORT_TYPE "SW_HID_AUTH_FIELD_REPORT_TYPE" +#define HID_AUTH_FIELD_VOLUME "SW_HID_AUTH_FIELD_VOLUME" +#define HID_AUTH_FIELD_YEAR "SW_HID_AUTH_FIELD_YEAR" +#define HID_AUTH_FIELD_URL "SW_HID_AUTH_FIELD_URL" +#define HID_AUTH_FIELD_CUSTOM1 "SW_HID_AUTH_FIELD_CUSTOM1" +#define HID_AUTH_FIELD_CUSTOM2 "SW_HID_AUTH_FIELD_CUSTOM2" +#define HID_AUTH_FIELD_CUSTOM3 "SW_HID_AUTH_FIELD_CUSTOM3" +#define HID_AUTH_FIELD_CUSTOM4 "SW_HID_AUTH_FIELD_CUSTOM4" +#define HID_AUTH_FIELD_CUSTOM5 "SW_HID_AUTH_FIELD_CUSTOM5" +#define HID_AUTH_FIELD_ISBN "SW_HID_AUTH_FIELD_ISBN" + +#define HID_AUTH_MARK_DLG_FROM_COMP_RB "SW_HID_AUTH_MARK_DLG_FROM_COMP_RB" +#define HID_AUTH_MARK_DLG_FROM_DOC_RB "SW_HID_AUTH_MARK_DLG_FROM_DOC_RB" +#define HID_AUTH_MARK_DLG_ID_LISTBOX "SW_HID_AUTH_MARK_DLG_ID_LISTBOX" + +#define HID_INSERT_INDEX_ENTRY_LEVEL_LB "SW_HID_INSERT_INDEX_ENTRY_LEVEL_LB" +#define HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE "SW_HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE" +#define HID_INSERT_IDX_MRK_SRCH_WORDONLY "SW_HID_INSERT_IDX_MRK_SRCH_WORDONLY" +#define HID_DLG_CREATE_AUTOMARK "SW_HID_DLG_CREATE_AUTOMARK" +#define HID_BUSINESS_CARD_CONTENT "SW_HID_BUSINESS_CARD_CONTENT" +#define HID_SAVE_LABEL_DLG "SW_HID_SAVE_LABEL_DLG" +#define HID_BUSINESS_FMT_PAGE "SW_HID_BUSINESS_FMT_PAGE" +#define HID_BUSINESS_FMT_PAGE_CONT "SW_HID_BUSINESS_FMT_PAGE_CONT" +#define HID_BUSINESS_FMT_PAGE_SHEET "SW_HID_BUSINESS_FMT_PAGE_SHEET" +#define HID_BUSINESS_FMT_PAGE_BRAND "SW_HID_BUSINESS_FMT_PAGE_BRAND" +#define HID_BUSINESS_FMT_PAGE_TYPE "SW_HID_BUSINESS_FMT_PAGE_TYPE" +#define HID_SEND_MASTER_DIALOG "SW_HID_SEND_MASTER_DIALOG" +#define HID_SEND_MASTER_CTRL_PUSHBUTTON_OK "SW_HID_SEND_MASTER_CTRL_PUSHBUTTON_OK" +#define HID_SEND_MASTER_CTRL_PUSHBUTTON_CANCEL "SW_HID_SEND_MASTER_CTRL_PUSHBUTTON_CANCEL" +#define HID_SEND_MASTER_CTRL_LISTBOX_FILTER "SW_HID_SEND_MASTER_CTRL_LISTBOX_FILTER" +#define HID_SEND_MASTER_CTRL_CONTROL_FILEVIEW "SW_HID_SEND_MASTER_CTRL_CONTROL_FILEVIEW" +#define HID_SEND_MASTER_CTRL_EDIT_FILEURL "SW_HID_SEND_MASTER_CTRL_EDIT_FILEURL" +#define HID_SEND_MASTER_CTRL_CHECKBOX_AUTOEXTENSION "SW_HID_SEND_MASTER_CTRL_CHECKBOX_AUTOEXTENSION" +#define HID_SEND_MASTER_CTRL_LISTBOX_TEMPLATE "SW_HID_SEND_MASTER_CTRL_LISTBOX_TEMPLATE" +#define HID_SEND_MASTER_CTRL_DUMMY "SW_HID_SEND_MASTER_CTRL_DUMMY" + +#define HID_SEND_HTML_DIALOG "SW_HID_SEND_HTML_DIALOG" +#define HID_SEND_HTML_CTRL_PUSHBUTTON_OK "SW_HID_SEND_HTML_CTRL_PUSHBUTTON_OK" +#define HID_SEND_HTML_CTRL_PUSHBUTTON_CANCEL "SW_HID_SEND_HTML_CTRL_PUSHBUTTON_CANCEL" +#define HID_SEND_HTML_CTRL_LISTBOX_FILTER "SW_HID_SEND_HTML_CTRL_LISTBOX_FILTER" +#define HID_SEND_HTML_CTRL_CONTROL_FILEVIEW "SW_HID_SEND_HTML_CTRL_CONTROL_FILEVIEW" +#define HID_SEND_HTML_CTRL_EDIT_FILEURL "SW_HID_SEND_HTML_CTRL_EDIT_FILEURL" +#define HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION "SW_HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION" +#define HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE "SW_HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE" +#define HID_SEND_HTML_CTRL_DUMMY "SW_HID_SEND_HTML_CTRL_DUMMY" + +#define HID_INSERT_IDX_MRK_PHONETIC_READING "SW_HID_INSERT_IDX_MRK_PHONETIC_READING" +#define HID_COLUMN_VALUESET "SW_HID_COLUMN_VALUESET" +#define HID_PVIEW_ZOOM_LB "SW_HID_PVIEW_ZOOM_LB" +#define HID_MAIL_MERGE_SELECT "SW_HID_MAIL_MERGE_SELECT" +#define HID_MAIL_MERGE_CREATE_FROM "SW_HID_MAIL_MERGE_CREATE_FROM" +#define HID_MAIL_MERGE_INSERT_FIELDS "SW_HID_MAIL_MERGE_INSERT_FIELDS" +#define HID_PRINT_AS_MERGE "SW_HID_PRINT_AS_MERGE" +#define HID_MERGE_SOURCE_UNAVAILABLE "SW_HID_MERGE_SOURCE_UNAVAILABLE" +#define HID_DATA_SOURCES_UNAVAILABLE "SW_HID_DATA_SOURCES_UNAVAILABLE" +#define HID_MODULE_TOOLBOX "SW_HID_MODULE_TOOLBOX" +#define HID_SECTION_INDENTS_PAGE "SW_HID_SECTION_INDENTS_PAGE" + +#define HID_FLD_DROPDOWN "SW_HID_FLD_DROPDOWN" +#define HID_MM_DOCSELECTPAGE "SW_HID_MM_DOCSELECTPAGE" +#define HID_MM_OUTPUTTYPEPAGE "SW_HID_MM_OUTPUTTYPEPAGE" +#define HID_MM_ADDRESSBLOCKPAGE "SW_HID_MM_ADDRESSBLOCKPAGE" +#define HID_MM_GREETINGSPAGE "SW_HID_MM_GREETINGSPAGE" +#define HID_MM_PREPAREMERGEPAGE "SW_HID_MM_PREPAREMERGEPAGE" +#define HID_MM_MERGEPAGE "SW_HID_MM_MERGEPAGE" +#define HID_MM_OUTPUTPAGE "SW_HID_MM_OUTPUTPAGE" +#define HID_MM_ADDRESSLISTDIALOG "SW_HID_MM_ADDRESSLISTDIALOG" +#define HID_MM_SELECTDBTABLEDDIALOG "SW_HID_MM_SELECTDBTABLEDDIALOG" +#define HID_MM_SELECTDBTABLEDDIALOG_LISTBOX "SW_HID_MM_SELECTDBTABLEDDIALOG_LISTBOX" +#define HID_MM_DBTABLEPREVIEWDIALOG "SW_HID_MM_DBTABLEPREVIEWDIALOG" +#define HID_MM_CREATEADDRESSLIST "SW_HID_MM_CREATEADDRESSLIST" +#define HID_MM_FIND_ENTRY "SW_HID_MM_FIND_ENTRY" +#define HID_MM_ADD_RENAME_ENTRY "SW_HID_MM_ADD_RENAME_ENTRY" +#define HID_MM_CUSTOMIZE_ADDRESS_LIST "SW_HID_MM_CUSTOMIZE_ADDRESS_LIST" +#define HID_MM_CUSTOMIZEADDRESSBLOCK "SW_HID_MM_CUSTOMIZEADDRESSBLOCK" +#define HID_MM_SELECTADDRESSBLOCK "SW_HID_MM_SELECTADDRESSBLOCK" +#define HID_MM_ASSIGNFIELDS "SW_HID_MM_ASSIGNFIELDS" +#define HID_MM_MAILNOTINSTALLED "SW_HID_MM_MAILNOTINSTALLED" +#define HID_MM_LAYOUT_PAGE "SW_HID_MM_LAYOUT_PAGE" +#define HID_MM_COPYTO "SW_HID_MM_COPYTO" +#define HID_MM_ADDRESSLIST_HB "SW_HID_MM_ADDRESSLIST_HB" +#define HID_MM_ADDRESSLIST_TLB "SW_HID_MM_ADDRESSLIST_TLB" +#define HID_TP_MAILCONFIG "SW_HID_TP_MAILCONFIG" +#define HID_MM_TESTACCOUNTSETTINGS "SW_HID_MM_TESTACCOUNTSETTINGS" +#define HID_MM_TESTACCOUNTSETTINGS_TLB "SW_HID_MM_TESTACCOUNTSETTINGS_TLB" +#define HID_MM_TESTACCOUNTSETTINGS_HB "SW_HID_MM_TESTACCOUNTSETTINGS_HB" +#define HID_MM_MAILBODY "SW_HID_MM_MAILBODY" +#define HID_MM_SENDMAILS "SW_HID_MM_SENDMAILS" +#define HID_MM_SENDMAILS_STATUSLB "SW_HID_MM_SENDMAILS_STATUSLB" +#define HID_MAILMERGECHILD "SW_HID_MAILMERGECHILD" +#define HID_MM_CUSTOMFIELDS "SW_HID_MM_CUSTOMFIELDS" +#define HID_DLG_WORDCOUNT "SW_HID_DLG_WORDCOUNT" +#define HID_MM_MAILSTATUS_TLB "SW_HID_MM_MAILSTATUS_TLB" +#define HID_RETURN_TO_MAILMERGE "SW_HID_RETURN_TO_MAILMERGE" +#define HID_MM_SAVEWARNING "SW_HID_MM_SAVEWARNING" +#define HID_MM_QUERY "SW_HID_MM_QUERY" +#define HID_MM_SENDWARNING "SW_HID_MM_SENDWARNING" +#define HID_MM_SERVERAUTHENTICATION "SW_HID_MM_SERVERAUTHENTICATION" + +#define HID_MEDIA_TOOLBOX "SW_HID_MEDIA_TOOLBOX" +#define HID_NID_TBL "SW_HID_NID_TBL" +#define HID_NID_FRM "SW_HID_NID_FRM" +#define HID_NID_GRF "SW_HID_NID_GRF" +#define HID_NID_OLE "SW_HID_NID_OLE" +#define HID_NID_PGE "SW_HID_NID_PGE" +#define HID_NID_OUTL "SW_HID_NID_OUTL" +#define HID_NID_MARK "SW_HID_NID_MARK" +#define HID_NID_DRW "SW_HID_NID_DRW" +#define HID_NID_CTRL "SW_HID_NID_CTRL" +#define HID_NID_PREV "SW_HID_NID_PREV" +#define HID_NID_REG "SW_HID_NID_REG" +#define HID_NID_BKM "SW_HID_NID_BKM" +#define HID_NID_SEL "SW_HID_NID_SEL" +#define HID_NID_FTN "SW_HID_NID_FTN" +#define HID_NID_POSTIT "SW_HID_NID_POSTIT" +#define HID_NID_SRCH_REP "SW_HID_NID_SRCH_REP" +#define HID_NID_INDEX_ENTRY "SW_HID_NID_INDEX_ENTRY" +#define HID_NID_TABLE_FORMULA "SW_HID_NID_TABLE_FORMULA" +#define HID_NID_TABLE_FORMULA_ERROR "SW_HID_NID_TABLE_FORMULA_ERROR" +#define HID_NID_NEXT "SW_HID_NID_NEXT" +#define HID_MM_NEXT_PAGE "SW_HID_MM_NEXT_PAGE" +#define HID_MM_PREV_PAGE "SW_HID_MM_PREV_PAGE" +#define HID_MM_GREETINGS_CB_PERSONALIZED "SW_HID_MM_GREETINGS_CB_PERSONALIZED" +#define HID_MM_GREETINGS_LB_FEMALE "SW_HID_MM_GREETINGS_LB_FEMALE" +#define HID_MM_GREETINGS_PB_FEMALE "SW_HID_MM_GREETINGS_PB_FEMALE" +#define HID_MM_GREETINGS_LB_MALE "SW_HID_MM_GREETINGS_LB_MALE" +#define HID_MM_GREETINGS_PB_MALE "SW_HID_MM_GREETINGS_PB_MALE" +#define HID_MM_GREETINGS_LB_FEMALECOLUMN "SW_HID_MM_GREETINGS_LB_FEMALECOLUMN" +#define HID_MM_GREETINGS_CB_FEMALEFIELD "SW_HID_MM_GREETINGS_CB_FEMALEFIELD" +#define HID_MM_GREETINGS_CB_NEUTRAL "SW_HID_MM_GREETINGS_CB_NEUTRAL" +#define HID_MM_BODY_CB_PERSONALIZED "SW_HID_MM_BODY_CB_PERSONALIZED" +#define HID_MM_BODY_LB_FEMALE "SW_HID_MM_BODY_LB_FEMALE" +#define HID_MM_BODY_PB_FEMALE "SW_HID_MM_BODY_PB_FEMALE" +#define HID_MM_BODY_LB_MALE "SW_HID_MM_BODY_LB_MALE" +#define HID_MM_BODY_PB_MALE "SW_HID_MM_BODY_PB_MALE" +#define HID_MM_BODY_LB_FEMALECOLUMN "SW_HID_MM_BODY_LB_FEMALECOLUMN" +#define HID_MM_BODY_CB_FEMALEFIELD "SW_HID_MM_BODY_CB_FEMALEFIELD" +#define HID_MM_BODY_CB_NEUTRAL "SW_HID_MM_BODY_CB_NEUTRAL" +#define HID_MM_ASSIGN_FIELDS "SW_HID_MM_ASSIGN_FIELDS" +#define HID_MM_HEADER_0 "SW_HID_MM_HEADER_0" +#define HID_MM_HEADER_1 "SW_HID_MM_HEADER_1" +#define HID_MM_HEADER_2 "SW_HID_MM_HEADER_2" +#define HID_MM_HEADER_3 "SW_HID_MM_HEADER_3" +#define HID_MM_HEADER_4 "SW_HID_MM_HEADER_4" +#define HID_MM_HEADER_5 "SW_HID_MM_HEADER_5" +#define HID_MM_HEADER_6 "SW_HID_MM_HEADER_6" +#define HID_MM_HEADER_7 "SW_HID_MM_HEADER_7" +#define HID_MM_HEADER_8 "SW_HID_MM_HEADER_8" +#define HID_MM_HEADER_9 "SW_HID_MM_HEADER_9" +#define HID_MM_HEADER_10 "SW_HID_MM_HEADER_10" +#define HID_MM_HEADER_11 "SW_HID_MM_HEADER_11" +#define HID_MM_HEADER_12 "SW_HID_MM_HEADER_12" +#define HID_MM_HEADER_13 "SW_HID_MM_HEADER_13" + +#define HID_ITM_HOR_LEFT "SW_HID_ITM_HOR_LEFT" +#define HID_ITM_HOR_CNTR "SW_HID_ITM_HOR_CNTR" +#define HID_ITM_HOR_RGHT "SW_HID_ITM_HOR_RGHT" +#define HID_ITM_VER_LEFT "SW_HID_ITM_VER_LEFT" +#define HID_ITM_VER_CNTR "SW_HID_ITM_VER_CNTR" +#define HID_ITM_VER_RGHT "SW_HID_ITM_VER_RGHT" + +#define HID_TBX_FORMULA_CALC "SW_HID_TBX_FORMULA_CALC" +#define HID_TBX_FORMULA_CANCEL "SW_HID_TBX_FORMULA_CANCEL" +#define HID_TBX_FORMULA_APPLY "SW_HID_TBX_FORMULA_APPLY" diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 1c2198981a..343c170ffa 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -127,7 +127,7 @@ public: virtual BOOL IsEndNote() = 0; virtual String GetStr() = 0; //from class Window - virtual void SetHelpId( ULONG nHelpId ) = 0; + virtual void SetHelpId( const rtl::OString& sHelpId ) = 0; virtual void SetText( const XubString& rStr ) = 0; }; diff --git a/sw/inc/swcommands.h b/sw/inc/swcommands.h new file mode 100644 index 0000000000..8d3fe63b75 --- /dev/null +++ b/sw/inc/swcommands.h @@ -0,0 +1,434 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef SW_SWCOMMANDS_HRC +#define SW_SWCOMMANDS_HRC + +#define CMD_SID_CREATE_SW_DRAWVIEW ".uno:CreateSWDrawView" +#define CMD_FN_REDLINE_ACCEPT ".uno:AcceptTrackedChanges" +#define CMD_FN_REDLINE_ON ".uno:TrackChanges" +#define CMD_FN_ADD_UNKNOWN ".uno:AddAllUnknownWords" +#define CMD_FN_FRAME_ALIGN_VERT_BOTTOM ".uno:AlignBottom" +#define CMD_FN_FRAME_ALIGN_VERT_CHAR_BOTTOM ".uno:AlignCharBottom" +#define CMD_FN_FRAME_ALIGN_VERT_CHAR_TOP ".uno:AlignCharTop" +#define CMD_FN_FRAME_ALIGN_HORZ_CENTER ".uno:AlignHorizontalCenter" +#define CMD_FN_FRAME_ALIGN_HORZ_LEFT ".uno:AlignLeft" +#define CMD_FN_FRAME_ALIGN_HORZ_RIGHT ".uno:AlignRight" +#define CMD_FN_FRAME_ALIGN_VERT_ROW_BOTTOM ".uno:AlignRowBottom" +#define CMD_FN_FRAME_ALIGN_VERT_ROW_TOP ".uno:AlignRowTop" +#define CMD_FN_FRAME_ALIGN_VERT_TOP ".uno:AlignTop" +#define CMD_FN_FRAME_ALIGN_VERT_CENTER ".uno:AlignVerticalCenter" +#define CMD_FN_FRAME_ALIGN_VERT_CHAR_CENTER ".uno:AlignVerticalCharCenter" +#define CMD_FN_FRAME_ALIGN_VERT_ROW_CENTER ".uno:AlignVerticalRowCenter" +#define CMD_FN_EDIT_AUTH_ENTRY_DLG ".uno:AuthoritiesEntryDialog" +#define CMD_FN_AUTOFORMAT_APPLY ".uno:AutoFormatApply" +#define CMD_FN_AUTOFORMAT_REDLINE_APPLY ".uno:AutoFormatRedlineApply" +#define CMD_FN_TABLE_AUTOSUM ".uno:AutoSum" +#define CMD_SID_ATTR_CHAR_COLOR_BACKGROUND ".uno:BackColor" +#define CMD_FN_FORMAT_BACKGROUND_DLG ".uno:BackgroundDialog" +#define CMD_FN_BACKSPACE ".uno:SwBackspace" +#define CMD_FN_FORMAT_BORDER_DLG ".uno:BorderDialog" +#define CMD_FN_NUMBER_BULLETS ".uno:BulletsAndNumberingDialog" +#define CMD_FN_CALC_TABLE ".uno:Calc" +#define CMD_FN_CALCULATE ".uno:CalculateSel" +#define CMD_FN_TABLE_VERT_BOTTOM ".uno:CellVertBottom" +#define CMD_FN_TABLE_VERT_CENTER ".uno:CellVertCenter" +#define CMD_FN_TABLE_VERT_NONE ".uno:CellVertTop" +#define CMD_FN_FRAME_CHAIN ".uno:ChainFrames" +#define CMD_FN_CHANGE_DBFIELD ".uno:ChangeDatabaseField" +#define CMD_FN_NUMBERING_OUTLINE_DLG ".uno:ChapterNumberingDialog" +#define CMD_SID_ATTR_CHAR_COLOR_BACKGROUND_EXT ".uno:CharBackgroundExt" +#define CMD_SID_ATTR_CHAR_COLOR_EXT ".uno:CharColorExt" +#define CMD_FN_CHAR_LEFT_SEL ".uno:CharLeftSel" +#define CMD_FN_CHAR_RIGHT_SEL ".uno:CharRightSel" +#define CMD_FN_CLOSE_PAGEPREVIEW ".uno:ClosePreview" +#define CMD_FN_REDLINE_COMMENT ".uno:CommentChangeTracking" +#define CMD_FN_VIEW_META_CHARS ".uno:ControlCodes" +#define CMD_FN_CONVERT_TEXT_TABLE ".uno:ConvertTableText" +#define CMD_FN_ABSTRACT_NEWDOC ".uno:CreateAbstract" +#define CMD_FN_DEC_INDENT_OFFSET ".uno:DecrementIndentValue" +#define CMD_FN_NUM_BULLET_DOWN ".uno:DecrementLevel" +#define CMD_FN_NUM_BULLET_OUTLINE_DOWN ".uno:DecrementSubLevels" +#define CMD_FN_TABLE_DELETE_COL ".uno:DeleteColumns" +#define CMD_FN_TABLE_DELETE_ROW ".uno:DeleteRows" +#define CMD_FN_DELETE_WHOLE_LINE ".uno:DelLine" +#define CMD_FN_DELETE_LINE ".uno:DelToEndOfLine" +#define CMD_FN_DELETE_PARA ".uno:DelToEndOfPara" +#define CMD_FN_DELETE_SENT ".uno:DelToEndOfSentence" +#define CMD_FN_DELETE_WORD ".uno:DelToEndOfWord" +#define CMD_FN_DELETE_BACK_LINE ".uno:DelToStartOfLine" +#define CMD_FN_DELETE_BACK_PARA ".uno:DelToStartOfPara" +#define CMD_FN_DELETE_BACK_SENT ".uno:DelToStartOfSentence" +#define CMD_FN_DELETE_BACK_WORD ".uno:DelToStartOfWord" +#define CMD_FN_TABLE_BALANCE_CELLS ".uno:DistributeColumns" +#define CMD_FN_TABLE_BALANCE_ROWS ".uno:DistributeRows" +#define CMD_FN_EDIT_CURRENT_TOX ".uno:EditCurIndex" +#define CMD_FN_GLOSSARY_DLG ".uno:EditGlossary" +#define CMD_FN_EDIT_HYPERLINK ".uno:EditHyperlink" +#define CMD_FN_EDIT_REGION ".uno:EditRegion" +#define CMD_FN_END_OF_DOCUMENT_SEL ".uno:EndOfDocumentSel" +#define CMD_FN_END_OF_LINE_SEL ".uno:EndOfLineSel" +#define CMD_FN_END_OF_PARA_SEL ".uno:EndOfParaSel" +#define CMD_FN_TABLE_SELECT_COL ".uno:EntireColumn" +#define CMD_FN_TABLE_SELECT_ROW ".uno:EntireRow" +#define CMD_FN_ESCAPE ".uno:Escape" +#define CMD_FN_EXECUTE_MACROFIELD ".uno:ExecuteMacroField" +#define CMD_FN_EXPAND_GLOSSARY ".uno:ExpandGlossary" +#define CMD_FN_EDIT_FIELD ".uno:FieldDialog" +#define CMD_FN_VIEW_FIELDNAME ".uno:Fieldnames" +#define CMD_FN_VIEW_FIELDS ".uno:Fields" +#define CMD_FN_FLIP_HORZ_GRAFIC ".uno:FlipHorizontal" +#define CMD_FN_FLIP_VERT_GRAFIC ".uno:FlipVertical" +#define CMD_SID_ATTR_CHAR_COLOR2 ".uno:FontColor" +#define CMD_FN_FORMAT_FOOTNOTE_DLG ".uno:FootnoteDialog" +#define CMD_FN_EDIT_FOOTNOTE ".uno:EditFootnote" +#define CMD_FN_FORMAT_COLUMN ".uno:FormatColumns" +#define CMD_FN_FORMAT_DROPCAPS ".uno:FormatDropcap" +#define CMD_FN_FORMAT_FRAME_DLG ".uno:FrameDialog" +#define CMD_FN_LINE_DOWN ".uno:GoDown" +#define CMD_FN_CHAR_LEFT ".uno:GoLeft" +#define CMD_FN_CHAR_RIGHT ".uno:GoRight" +#define CMD_FN_FRAME_TO_ANCHOR ".uno:GoToAnchor" +#define CMD_FN_END_TABLE ".uno:GoToEnd" +#define CMD_FN_END_OF_COLUMN ".uno:GoToEndOfColumn" +#define CMD_FN_END_OF_DOCUMENT ".uno:GoToEndOfDoc" +#define CMD_FN_END_OF_LINE ".uno:GoToEndOfLine" +#define CMD_FN_END_OF_NEXT_COLUMN ".uno:GoToEndOfNextColumn" +#define CMD_FN_END_OF_NEXT_PAGE ".uno:GoToEndOfNextPage" +#define CMD_FN_END_OF_NEXT_PAGE_SEL ".uno:GoToEndOfNextPageSel" +#define CMD_FN_END_OF_PAGE ".uno:GoToEndOfPage" +#define CMD_FN_END_OF_PAGE_SEL ".uno:GoToEndOfPageSel" +#define CMD_FN_END_OF_PARA ".uno:GoToEndOfPara" +#define CMD_FN_END_OF_PREV_COLUMN ".uno:GoToEndOfPrevColumn" +#define CMD_FN_END_OF_PREV_PAGE ".uno:GoToEndOfPrevPage" +#define CMD_FN_END_OF_PREV_PAGE_SEL ".uno:GoToEndOfPrevPageSel" +#define CMD_FN_NEXT_TOXMARK ".uno:GotoNextIndexMark" +#define CMD_FN_GOTO_NEXT_INPUTFLD ".uno:GotoNextInputField" +#define CMD_FN_GOTO_NEXT_OBJ ".uno:GotoNextObject" +#define CMD_FN_NEXT_PARA ".uno:GoToNextPara" +#define CMD_FN_GOTO_NEXT_MARK ".uno:GotoNextPlacemarker" +#define CMD_FN_NEXT_SENT ".uno:GoToNextSentence" +#define CMD_FN_NEXT_SENT_SEL ".uno:GotoNextSentenceSel" +#define CMD_FN_NEXT_TBLFML ".uno:GotoNextTableFormula" +#define CMD_FN_NEXT_WORD ".uno:GoToNextWord" +#define CMD_FN_NEXT_TBLFML_ERR ".uno:GotoNextWrongTableFormula" +#define CMD_FN_NAVIGATION_PI_GOTO_PAGE ".uno:GotoPage" +#define CMD_FN_PREV_TOXMARK ".uno:GotoPrevIndexMark" +#define CMD_FN_GOTO_PREV_INPUTFLD ".uno:GotoPrevInputField" +#define CMD_FN_GOTO_PREV_OBJ ".uno:GotoPrevObject" +#define CMD_FN_PREV_PARA ".uno:GoToPrevPara" +#define CMD_FN_GOTO_PREV_MARK ".uno:GotoPrevPlacemarker" +#define CMD_FN_PREV_SENT ".uno:GoToPrevSentence" +#define CMD_FN_PREV_SENT_SEL ".uno:GotoPrevSentenceSel" +#define CMD_FN_PREV_TBLFML ".uno:GotoPrevTableFormula" +#define CMD_FN_PREV_WORD ".uno:GoToPrevWord" +#define CMD_FN_PREV_TBLFML_ERR ".uno:GotoPrevWrongTableFormula" +#define CMD_FN_START_TABLE ".uno:GoToStartOfTable" +#define CMD_FN_START_OF_COLUMN ".uno:GoToStartOfColumn" +#define CMD_FN_START_OF_DOCUMENT ".uno:GoToStartOfDoc" +#define CMD_FN_START_OF_LINE ".uno:GoToStartOfLine" +#define CMD_FN_START_OF_NEXT_COLUMN ".uno:GoToStartOfNextColumn" +#define CMD_FN_START_OF_NEXT_PAGE ".uno:GoToStartOfNextPage" +#define CMD_FN_START_OF_NEXT_PAGE_SEL ".uno:GoToStartOfNextPageSel" +#define CMD_FN_START_OF_PAGE ".uno:GoToStartOfPage" +#define CMD_FN_START_OF_PAGE_SEL ".uno:GoToStartOfPageSel" +#define CMD_FN_START_OF_PARA ".uno:GoToStartOfPara" +#define CMD_FN_START_OF_PREV_COLUMN ".uno:GoToStartOfPrevColumn" +#define CMD_FN_START_OF_PREV_PAGE ".uno:GoToStartOfPrevPage" +#define CMD_FN_START_OF_PREV_PAGE_SEL ".uno:GoToStartOfPrevPageSel" +#define CMD_FN_LINE_UP ".uno:GoUp" +#define CMD_FN_VIEW_GRAPHIC ".uno:Graphic" +#define CMD_FN_FORMAT_GRAFIC_DLG ".uno:GraphicDialog" +#define CMD_FN_SAVE_GRAPHIC ".uno:SaveGraphic" +#define CMD_FN_GROW_FONT_SIZE ".uno:Grow" +#define CMD_FN_HSCROLLBAR ".uno:HScroll" +#define CMD_SID_HTML_MODE ".uno:HtmlMode" +#define CMD_FN_HYPHENATE_OPT_DLG ".uno:Hyphenate" +#define CMD_FN_INC_INDENT_OFFSET ".uno:IncrementIndentValue" +#define CMD_FN_NUM_BULLET_UP ".uno:IncrementLevel" +#define CMD_FN_NUM_BULLET_OUTLINE_UP ".uno:IncrementSubLevels" +#define CMD_FN_EDIT_IDX_ENTRY_DLG ".uno:IndexEntryDialog" +#define CMD_FN_IDX_MARK_TO_IDX ".uno:IndexMarkToIndex" +#define CMD_FN_POSTIT ".uno:InsertAnnotation" +#define CMD_FN_INSERT_FLD_AUTHOR ".uno:InsertAuthorField" +#define CMD_FN_INSERT_AUTH_ENTRY_DLG ".uno:InsertAuthoritiesEntry" +#define CMD_FN_INSERT_BOOKMARK ".uno:InsertBookmark" +#define CMD_FN_INSERT_BREAK_DLG ".uno:InsertBreak" +#define CMD_FN_INSERT_CAPTION ".uno:InsertCaptionDialog" +#define CMD_FN_INSERT_COLUMN_BREAK ".uno:InsertColumnBreak" +#define CMD_FN_TABLE_INSERT_COL_DLG ".uno:InsertColumnDialog" +#define CMD_FN_TABLE_INSERT_COL ".uno:InsertColumns" +#define CMD_FN_INSERT_REGION ".uno:InsertSection" +#define CMD_FN_INSERT_CTRL ".uno:InsertCtrl" +#define CMD_FN_INSERT_FLD_DATE ".uno:InsertDateField" +#define CMD_FN_INSERT_ENDNOTE ".uno:InsertEndnote" +#define CMD_FN_ENVELOP ".uno:InsertEnvelope" +#define CMD_FN_INSERT_FIELD ".uno:InsertField" +#define CMD_FN_INSERT_FIELD_CTRL ".uno:InsertFieldCtrl" +#define CMD_FN_INSERT_FOOTNOTE_DLG ".uno:InsertFootnoteDialog" +#define CMD_FN_INSERT_FOOTNOTE ".uno:InsertFootnote" +#define CMD_FN_EDIT_FORMULA ".uno:InsertFormula" +#define CMD_FN_INSERT_FRAME ".uno:InsertFrame" +#define CMD_FN_INSERT_FRAME_INTERACT ".uno:InsertFrameInteract" +#define CMD_FN_INSERT_FRAME_INTERACT_NOCOL ".uno:InsertFrameInteractNoColumns" +#define CMD_FN_INSERT_HRULER ".uno:InsertGraphicRuler" +#define CMD_FN_INSERT_HYPERLINK ".uno:InsertHyperlinkDlg" +#define CMD_FN_INSERT_IDX_ENTRY_DLG ".uno:InsertIndexesEntry" +#define CMD_FN_INSERT_LINEBREAK ".uno:InsertLinebreak" +#define CMD_FN_INSERT_MULTI_TOX ".uno:InsertMultiIndex" +#define CMD_FN_NUM_BULLET_NONUM ".uno:InsertNeutralParagraph" +#define CMD_FN_INSERT_OBJ_CTRL ".uno:InsertObjCtrl" +#define CMD_FN_INSERT_OBJECT_DLG ".uno:InsertObjectDialog" +#define CMD_FN_INSERT_SMA ".uno:InsertObjectStarMath" +#define CMD_FN_INSERT_PAGEBREAK ".uno:InsertPagebreak" +#define CMD_FN_INSERT_FLD_PGCOUNT ".uno:InsertPageCountField" +#define CMD_FN_INSERT_PAGEFOOTER ".uno:InsertPageFooter" +#define CMD_FN_INSERT_PAGEHEADER ".uno:InsertPageHeader" +#define CMD_FN_INSERT_FLD_PGNUMBER ".uno:InsertPageNumberField" +#define CMD_FN_INSERT_BREAK ".uno:InsertPara" +#define CMD_FN_INSERT_REF_FIELD ".uno:InsertReferenceField" +#define CMD_FN_TABLE_INSERT_ROW_DLG ".uno:InsertRowDialog" +#define CMD_FN_TABLE_INSERT_ROW ".uno:InsertRows" +#define CMD_FN_JAVAEDIT ".uno:InsertScript" +#define CMD_FN_INSERT_TABLE ".uno:InsertTable" +#define CMD_FN_INSERT_FLD_TIME ".uno:InsertTimeField" +#define CMD_FN_INSERT_FLD_TITLE ".uno:InsertTitleField" +#define CMD_FN_INSERT_FLD_TOPIC ".uno:InsertTopicField" +#define CMD_FN_NUM_BULLET_NEXT ".uno:JumpDownThisLevel" +#define CMD_FN_END_DOC_DIRECT ".uno:JumpToEndOfDoc" +#define CMD_FN_TO_FOOTER ".uno:JumpToFooter" +#define CMD_FN_FOOTNOTE_TO_ANCHOR ".uno:JumpToFootnoteOrAnchor" +#define CMD_FN_TO_HEADER ".uno:JumpToHeader" +#define CMD_FN_NEXT_BOOKMARK ".uno:JumpToNextBookmark" +#define CMD_FN_NEXT_FOOTNOTE ".uno:JumpToNextFootnote" +#define CMD_FN_CNTNT_TO_NEXT_FRAME ".uno:JumpToNextFrame" +#define CMD_FN_GOTO_NEXT_REGION ".uno:JumpToNextRegion" +#define CMD_FN_NEXT_TABLE ".uno:JumpToNextTable" +#define CMD_FN_PREV_BOOKMARK ".uno:JumpToPrevBookmark" +#define CMD_FN_PREV_FOOTNOTE ".uno:JumpToPrevFootnote" +#define CMD_FN_GOTO_PREV_REGION ".uno:JumpToPrevRegion" +#define CMD_FN_PREV_TABLE ".uno:JumpToPrevTable" +#define CMD_FN_GOTO_REFERENCE ".uno:JumpToReference" +#define CMD_FN_START_DOC_DIRECT ".uno:JumpToStartOfDoc" +#define CMD_FN_NUM_BULLET_PREV ".uno:JumpUpThisLevel" +#define CMD_FN_LINE_DOWN_SEL ".uno:LineDownSel" +#define CMD_FN_LINE_NUMBERING_DLG ".uno:LineNumberingDialog" +#define CMD_FN_LINE_UP_SEL ".uno:LineUpSel" +#define CMD_FN_EDIT_LINK_DLG ".uno:LinkDialog" +#define CMD_SID_TEMPLATE_LOAD ".uno:LoadStyles" +#define CMD_FN_VIEW_MARKS ".uno:Marks" +#define CMD_FN_TABLE_MERGE_CELLS ".uno:MergeCells" +#define CMD_FN_QRY_MERGE ".uno:MergeDialog" +#define CMD_FN_MAILMERGE_WIZARD ".uno:MailMergeWizard" +#define CMD_FN_TABLE_MERGE_TABLE ".uno:MergeTable" +#define CMD_FN_FORMAT_APPLY_HEAD1 ".uno:ApplyStyleHead1" +#define CMD_FN_FORMAT_APPLY_HEAD2 ".uno:ApplyStyleHead2" +#define CMD_FN_FORMAT_APPLY_HEAD3 ".uno:ApplyStyleHead3" +#define CMD_FN_FORMAT_APPLY_DEFAULT ".uno:ApplyStyleDefault" +#define CMD_FN_FORMAT_APPLY_TEXTBODY ".uno:ApplyStyleTextbody" +#define CMD_FN_GRAPHIC_MIRROR_ON_EVEN_PAGES ".uno:MirrorGraphicOnEvenPages" +#define CMD_FN_FRAME_MIRROR_ON_EVEN_PAGES ".uno:MirrorOnEvenPages" +#define CMD_FN_NUM_BULLET_MOVEDOWN ".uno:MoveDown" +#define CMD_FN_NUM_BULLET_OUTLINE_MOVEDOWN ".uno:MoveDownSubItems" +#define CMD_FN_NUM_BULLET_MOVEUP ".uno:MoveUp" +#define CMD_FN_NUM_BULLET_OUTLINE_MOVEUP ".uno:MoveUpSubItems" +#define CMD_FN_TITLE_DESCRIPTION_SHAPE ".uno:ObjectTitleDescription" +#define CMD_FN_NAME_SHAPE ".uno:NameGroup" +#define CMD_FN_NEW_GLOBAL_DOC ".uno:NewGlobalDoc" +#define CMD_FN_NEW_HTML_DOC ".uno:NewHtmlDoc" +#define CMD_FN_NUMBER_FORMAT ".uno:NumberFormat" +#define CMD_FN_NUMBER_CURRENCY ".uno:NumberFormatCurrency" +#define CMD_FN_NUMBER_DATE ".uno:NumberFormatDate" +#define CMD_FN_NUMBER_TWODEC ".uno:NumberFormatDecimal" +#define CMD_FN_NUMBER_PERCENT ".uno:NumberFormatPercent" +#define CMD_FN_NUMBER_SCIENTIFIC ".uno:NumberFormatScientific" +#define CMD_FN_NUMBER_STANDARD ".uno:NumberFormatStandard" +#define CMD_FN_NUMBER_TIME ".uno:NumberFormatTime" +#define CMD_FN_NUMBER_NEWSTART ".uno:NumberingStart" +#define CMD_FN_NUM_OR_NONUM ".uno:NumberOrNoNumber" +#define CMD_FN_FRAME_DOWN ".uno:ObjectBackOne" +#define CMD_FN_FRAME_UP ".uno:ObjectForwardOne" +#define CMD_FN_AUTOFORMAT_AUTO ".uno:OnlineAutoFormat" +#define CMD_FN_OPTIMIZE_TABLE ".uno:OptimizeTable" +#define CMD_FN_FORMAT_PAGE_COLUMN_DLG ".uno:PageColumnDialog" +#define CMD_FN_FORMAT_PAGE_DLG ".uno:PageDialog" +#define CMD_FN_PAGEDOWN ".uno:PageDown" +#define CMD_FN_PAGEDOWN_SEL ".uno:PageDownSel" +#define CMD_FN_CHANGE_PAGENUM ".uno:PageOffset" +#define CMD_FN_SET_PAGE_STYLE ".uno:PageStyleApply" +#define CMD_FN_STAT_TEMPLATE ".uno:PageStyleName" +#define CMD_FN_PAGEUP ".uno:PageUp" +#define CMD_FN_PAGEUP_SEL ".uno:PageUpSel" +#define CMD_FN_PREVIEW_ZOOM ".uno:PreviewZoom" +#define CMD_FN_PRINT_LAYOUT ".uno:PrintLayout" +#define CMD_FN_PRINT_PAGEPREVIEW ".uno:PrintPagePreView" +#define CMD_FN_TABLE_SET_READ_ONLY_CELLS ".uno:Protect" +#define CMD_FN_REDLINE_PROTECT ".uno:ProtectTraceChangeMode" +#define CMD_FN_REFRESH_VIEW ".uno:RefreshView" +#define CMD_FN_NUM_BULLET_OFF ".uno:RemoveBullets" +#define CMD_FN_REMOVE_CUR_TOX ".uno:RemoveTableOf" +#define CMD_FN_REPAGINATE ".uno:Repaginate" +#define CMD_FN_REPEAT_SEARCH ".uno:RepeatSearch" +#define CMD_FN_FORMAT_RESET ".uno:ResetAttributes" +#define CMD_FN_TABLE_UNSET_READ_ONLY ".uno:ResetTableProtection" +#define CMD_FN_RULER ".uno:Ruler" +#define CMD_FN_QRY_INSERT ".uno:SbaInsert" +#define CMD_FN_QRY_INSERT_FIELD ".uno:SbaInsertField" +#define CMD_FN_QRY_MERGE_FIELD ".uno:SbaMerge" +#define CMD_FN_SCROLL_NAVIGATION ".uno:ScrollNavigation" +#define CMD_FN_SCROLL_NEXT_PREV ".uno:ScrollNextPrev" +#define CMD_FN_TABLE_SELECT_ALL ".uno:SelectTable" +#define CMD_FN_STAT_SELMODE ".uno:SelectionMode" +#define CMD_FN_SELECT_PARA ".uno:SelectText" +#define CMD_FN_SELECT_WORD ".uno:SelectWord" +#define CMD_FN_ABSTRACT_STARIMPRESS ".uno:SendAbstractToStarImpress" +#define CMD_FN_OUTLINE_TO_CLIPBOARD ".uno:SendOutlineToClipboard" +#define CMD_FN_OUTLINE_TO_IMPRESS ".uno:SendOutlineToStarImpress" +#define CMD_FN_TOOL_ANKER_AT_CHAR ".uno:SetAnchorAtChar" +#define CMD_FN_TOOL_ANKER_CHAR ".uno:SetAnchorToChar" +#define CMD_FN_TOOL_ANKER_FRAME ".uno:SetAnchorToFrame" +#define CMD_FN_TOOL_ANKER_PAGE ".uno:SetAnchorToPage" +#define CMD_FN_TOOL_ANKER_PARAGRAPH ".uno:SetAnchorToPara" +#define CMD_FN_TABLE_SET_COL_WIDTH ".uno:SetColumnWidth" +#define CMD_FN_SET_EXT_MODE ".uno:SetExtSelection" +#define CMD_FN_SET_ADD_MODE ".uno:SetMultiSelection" +#define CMD_FN_TABLE_ADJUST_CELLS ".uno:SetOptimalColumnWidth" +#define CMD_FN_TABLE_OPTIMAL_HEIGHT ".uno:SetOptimalRowHeight" +#define CMD_FN_TABLE_SET_ROW_HEIGHT ".uno:SetRowHeight" +#define CMD_FN_SHADOWCURSOR ".uno:ShadowCursor" +#define CMD_FN_SHIFT_BACKSPACE ".uno:ShiftBackspace" +#define CMD_FN_SHOW_MULTIPLE_PAGES ".uno:ShowMultiplePages" +#define CMD_FN_VIEW_NOTES ".uno:ShowAnnotations" +#define CMD_FN_VIEW_HIDDEN_PARA ".uno:ShowHiddenParagraphs" +#define CMD_FN_REDLINE_SHOW ".uno:ShowTrackedChanges" +#define CMD_FN_SHOW_TWO_PAGES ".uno:ShowTwoPages" +#define CMD_FN_SHOW_BOOKVIEW ".uno:ShowBookview" +#define CMD_FN_SHRINK_FONT_SIZE ".uno:Shrink" +#define CMD_FN_SORTING_DLG ".uno:SortDialog" +#define CMD_FN_TABLE_SPLIT_CELLS ".uno:SplitCell" +#define CMD_FN_TABLE_SPLIT_TABLE ".uno:SplitTable" +#define CMD_FN_AUTO_CORRECT ".uno:StartAutoCorrect" +#define CMD_FN_START_OF_DOCUMENT_SEL ".uno:StartOfDocumentSel" +#define CMD_FN_START_OF_LINE_SEL ".uno:StartOfLineSel" +#define CMD_FN_START_OF_PARA_SEL ".uno:StartOfParaSel" +#define CMD_FN_STAT_BOOKMARK ".uno:StateBookmark" +#define CMD_FN_STAT_PAGE ".uno:StatePageNumber" +#define CMD_FN_STAT_ZOOM ".uno:StateZoom" +#define CMD_FN_SET_SUB_SCRIPT ".uno:SubScript" +#define CMD_FN_SET_SUPER_SCRIPT ".uno:SuperScript" +#define CMD_FN_SBA_BRW_INSERT ".uno:SwBrwInsert" +#define CMD_FN_SBA_BRW_MERGE ".uno:SwMailMerge" +#define CMD_FN_SBA_BRW_UPDATE ".uno:SwUpdate" +#define CMD_FN_SYNC_LABELS ".uno:SynchronizeLabelsDlg" +#define CMD_FN_VIEW_TABLEGRID ".uno:TableBoundaries" +#define CMD_FN_FORMAT_TABLE_DLG ".uno:TableDialog" +#define CMD_FN_TABLE_MODE_FIX ".uno:TableModeFix" +#define CMD_FN_TABLE_MODE_FIX_PROP ".uno:TableModeFixProp" +#define CMD_FN_TABLE_MODE_VARIABLE ".uno:TableModeVariable" +#define CMD_FN_NUM_FORMAT_TABLE_DLG ".uno:TableNumberFormatDialog" +#define CMD_FN_SET_MODOPT_TBLNUMFMT ".uno:TableNumberRecognition" +#define CMD_FN_DRAWTEXT_ATTR_DLG ".uno:TextAttributes" +#define CMD_FN_DRAW_WRAP_DLG ".uno:TextWrap" +#define CMD_FN_THESAURUS_DLG ".uno:ThesaurusDialog" +#define CMD_FN_TOOL_ANKER ".uno:ToggleAnchorType" +#define CMD_FN_TOOL_HIERARCHIE ".uno:ToggleObjectLayer" +#define CMD_FN_UNDERLINE_DOUBLE ".uno:UnderlineDouble" +#define CMD_FN_FRAME_UNCHAIN ".uno:UnhainFrames" +#define CMD_FN_TABLE_UNSET_READ_ONLY_CELLS ".uno:UnsetCellsReadOnly" +#define CMD_FN_UPDATE_ALL ".uno:UpdateAll" +#define CMD_FN_UPDATE_TOX ".uno:UpdateAllIndexes" +#define CMD_FN_UPDATE_ALL_LINKS ".uno:UpdateAllLinks" +#define CMD_FN_UPDATE_CHARTS ".uno:UpdateCharts" +#define CMD_FN_UPDATE_CUR_TOX ".uno:UpdateCurIndex" +#define CMD_FN_UPDATE_FIELDS ".uno:UpdateFields" +#define CMD_FN_UPDATE_INPUTFIELDS ".uno:UpdateInputFields" +#define CMD_FN_VIEW_BOUNDS ".uno:ViewBounds" +#define CMD_FN_VLINEAL ".uno:VRuler" +#define CMD_FN_VSCROLLBAR ".uno:VScroll" +#define CMD_FN_PREV_WORD_SEL ".uno:WordLeftSel" +#define CMD_FN_NEXT_WORD_SEL ".uno:WordRightSel" +#define CMD_FN_WRAP_ANCHOR_ONLY ".uno:WrapAnchorOnly" +#define CMD_FN_FRAME_WRAP_CONTOUR ".uno:WrapContour" +#define CMD_FN_FRAME_WRAP_IDEAL ".uno:WrapIdeal" +#define CMD_FN_FRAME_WRAP_LEFT ".uno:WrapLeft" +#define CMD_FN_FRAME_NOWRAP ".uno:WrapOff" +#define CMD_FN_FRAME_WRAP ".uno:WrapOn" +#define CMD_FN_FRAME_WRAP_RIGHT ".uno:WrapRight" +#define CMD_FN_FRAME_WRAPTHRU ".uno:WrapThrough" +#define CMD_FN_FRAME_WRAPTHRU_TRANSP ".uno:WrapThroughTransparent" +#define CMD_FN_INSERT_STRING ".uno:InsertText" +#define CMD_SID_ATTR_PARA_NUMRULE ".uno:NumRule" +#define CMD_SID_ATTR_PARA_OUTLINE_LEVEL ".uno:OutlineLevel" +#define CMD_FN_NUMBER_NEWSTART_AT ".uno:NumNewStartAt" +#define CMD_FN_FORMAT_LINENUMBER ".uno:LineNumber" +#define CMD_SID_ATTR_PARA_PAGENUM ".uno:PageNumber" +#define CMD_SID_ATTR_PARA_REGISTER ".uno:RegisterTrue" +#define CMD_FN_TO_FOOTNOTE_AREA ".uno:JumpToFootnoteArea" +#define CMD_FN_TXTATR_INET ".uno:HyperlinkAttributes" +#define CMD_FN_INSERT_GLOSSARY ".uno:InsertGlossary" +#define CMD_FN_NEW_GLOSSARY ".uno:NewGlossary" +#define CMD_FN_SET_ACT_GLOSSARY ".uno:SetActGlossaryGroup" +#define CMD_FN_DELETE_BOOKMARK ".uno:DeleteBookmark" +#define CMD_FN_DROP_TEXT ".uno:SetDropCapText" +#define CMD_FN_DROP_CHAR_STYLE_NAME ".uno:SetDropCapCharStyleName" +#define CMD_FN_READONLY_SELECTION_MODE ".uno:SelectTextMode" +#define CMD_FN_INSERT_DBFIELD ".uno:InsertDBField" +#define CMD_FN_GOTO_NEXT_CELL ".uno:JumpToNextCell" +#define CMD_FN_GOTO_PREV_CELL ".uno:JumpToPrevCell" +#define CMD_FN_INSERT_FIELD_DATA_ONLY ".uno:InsertFieldDataOnly" +#define CMD_SID_ATTR_BRUSH_ROW ".uno:TableRowBackground" +#define CMD_SID_ATTR_BRUSH_TABLE ".uno:TableBackground" +#define CMD_FN_TABLE_ROW_SPLIT ".uno:RowSplit" +#define CMD_FN_MAILMERGE_CHILDWINDOW ".uno:MailmergeChildWindow" +#define CMD_FN_WORDCOUNT_DIALOG ".uno:WordCountDialog" +#define CMD_FN_MAILMERGE_SENDMAIL_CHILDWINDOW ".uno:SendMailChildWindow" +#define CMD_FN_TABLE_DELETE_TABLE ".uno:DeleteTable" +#define CMD_FN_TABLE_SELECT_CELL ".uno:EntireCell" +#define CMD_FN_CONVERT_TABLE_TO_TEXT ".uno:ConvertTableToText" +#define CMD_FN_CONVERT_TEXT_TO_TABLE ".uno:ConvertTextToTable" +#define CMD_FN_TABLE_HEADLINE_REPEAT ".uno:HeadingRowsRepeat" +#define CMD_FN_TABLE_SORT_DIALOG ".uno:TableSort" +#define CMD_FN_XFORMS_DESIGN_MODE ".uno:SwitchXFormsDesignMode" +#define CMD_FN_REMOVE_DIRECT_CHAR_FORMATS ".uno:RemoveDirectCharFormats" +#define CMD_FN_NUM_CONTINUE ".uno:ContinueNumbering" +#define CMD_FN_SELECTION_MODE_DEFAULT ".uno:SelectionModeDefault" +#define CMD_FN_DELETE_NOTE ".uno:DeleteNote" +#define CMD_FN_REPLY ".uno:ReplyNote" +#define CMD_FN_DELETE_COMMENT ".uno:DeleteComment" +#define CMD_FN_DELETE_NOTE_AUTHOR ".uno:DeleteAuthor" +#define CMD_FN_DELETE_ALL_NOTES ".uno:DeleteAllNotes" +#define CMD_FN_HIDE_NOTE ".uno:HideNote" +#define CMD_FN_HIDE_NOTE_AUTHOR ".uno:HideAuthor" +#define CMD_SID_ATTR_VIEWLAYOUT ".uno:ViewLayout" +#define CMD_FN_HIDE_ALL_NOTES ".uno:HideAllNotes" +#define CMD_FN_SELECTION_MODE_BLOCK ".uno:SelectionModeBlock" +#define CMD_FN_SPELL_GRAMMAR_DIALOG ".uno:SpellingAndGrammarDialog" +#define CMD_FN_REDLINE_ACCEPT_DIRECT ".uno:AcceptTracedChange" +#define CMD_FN_REDLINE_REJECT_DIRECT ".uno:RejectTracedChange" +#define CMD_FN_REMOVE_HYPERLINK ".uno:RemoveHyperlink" +#define CMD_FN_COPY_HYPERLINK_LOCATION ".uno:CopyHyperlinkLocation" + +#endif diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index cea9d745d7..6b10c86a37 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1200,7 +1200,7 @@ void SwDocShell::Execute(SfxRequest& rReq) if ( !aFileName.Len() ) { FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_AUTOEXTENSION_TEMPLATE, 0 ); - //set HelpIds + const sal_Int16 nControlIds[] = { CommonFilePickerElementIds::PUSHBUTTON_OK, CommonFilePickerElementIds::PUSHBUTTON_CANCEL, @@ -1211,15 +1211,33 @@ void SwDocShell::Execute(SfxRequest& rReq) ExtendedFilePickerElementIds::LISTBOX_TEMPLATE, 0 }; - sal_Int32 nHelpIds[8]; - sal_Int32 nStartHelpId = - bCreateHtml ? - HID_SEND_HTML_CTRL_PUSHBUTTON_OK : HID_SEND_MASTER_CTRL_PUSHBUTTON_OK ; - for(int nHelp = 0; nHelp < 7; nHelp++) - nHelpIds[nHelp] = nStartHelpId++; - nHelpIds[7] = 0; - - aDlgHelper.SetControlHelpIds( nControlIds, nHelpIds ); + + const char* aHTMLHelpIds[] = + { + HID_SEND_HTML_CTRL_PUSHBUTTON_OK, + HID_SEND_HTML_CTRL_PUSHBUTTON_CANCEL, + HID_SEND_HTML_CTRL_LISTBOX_FILTER, + HID_SEND_HTML_CTRL_CONTROL_FILEVIEW, + HID_SEND_HTML_CTRL_EDIT_FILEURL, + HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION, + HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE, + "" + }; + + const char* aMasterHelpIds[] = + { + HID_SEND_MASTER_CTRL_PUSHBUTTON_OK, + HID_SEND_MASTER_CTRL_PUSHBUTTON_CANCEL, + HID_SEND_MASTER_CTRL_LISTBOX_FILTER, + HID_SEND_MASTER_CTRL_CONTROL_FILEVIEW, + HID_SEND_MASTER_CTRL_EDIT_FILEURL, + HID_SEND_MASTER_CTRL_CHECKBOX_AUTOEXTENSION, + HID_SEND_MASTER_CTRL_LISTBOX_TEMPLATE, + "" + }; + + const char** pHelpIds = bCreateHtml ? aHTMLHelpIds : aMasterHelpIds; + aDlgHelper.SetControlHelpIds( nControlIds, pHelpIds ); // aDlgHelper.SetDialogHelpId( bCreateHtml ? HID_SEND_HTML_DIALOG : HID_SEND_MASTER_DIALOG ); uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker(); diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src index a0351700ff..aa8b9d4dd3 100644 --- a/sw/source/ui/app/mn.src +++ b/sw/source/ui/app/mn.src @@ -28,6 +28,7 @@ #include "swmn.hrc" +#include "helpid.h" /*------------------------------------------------------------------------ Beschreibung: Menu Window @@ -37,7 +38,7 @@ MenuItem\ {\ Identifier = FN_INSERT_CAPTION ;\ - HelpID = FN_INSERT_CAPTION ;\ + HelpId = CMD_FN_INSERT_CAPTION ;\ Text [ en-US ] = "~Caption..." ;\ }; @@ -45,31 +46,30 @@ MenuItem\ {\ Identifier = FN_FORMAT_TABLE_DLG ; \ - HelpID = FN_FORMAT_TABLE_DLG ; \ + HelpId = CMD_FN_FORMAT_TABLE_DLG ; \ Text [ en-US ] = "~Table..." ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_MERGE_TABLE ; \ - HelpID = FN_TABLE_MERGE_TABLE ; \ + HelpId = CMD_FN_TABLE_MERGE_TABLE ; \ Text [ en-US ] = "Merge Tables";\ };\ MenuItem\ {\ Identifier = FN_TABLE_SPLIT_TABLE ; \ - HelpID = FN_TABLE_SPLIT_TABLE ; \ + HelpId = CMD_FN_TABLE_SPLIT_TABLE ; \ Text [ en-US ] = "~Split Table" ; \ };\ MenuItem\ {\ Identifier = FN_NUM_FORMAT_TABLE_DLG ; \ - HelpID = FN_NUM_FORMAT_TABLE_DLG ; \ + HelpId = CMD_FN_NUM_FORMAT_TABLE_DLG ; \ Text [ en-US ] = "N~umber Format..." ; \ };\ MenuItem\ {\ Identifier = MN_CELL ; \ - HelpID = MN_CELL ; \ Command = ".uno:CellMenu" ; \ /* ### ACHTUNG: Neuer Text in Resource? Ze~lle : Zelle */\ Text [ en-US ] = "~Cell" ; \ @@ -81,46 +81,46 @@ MenuItem\ {\ Identifier = FN_TABLE_MERGE_CELLS ; \ - HelpID = FN_TABLE_MERGE_CELLS ; \ + HelpId = CMD_FN_TABLE_MERGE_CELLS ; \ Text [ en-US ] = "~Merge" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_SPLIT_CELLS ; \ - HelpID = FN_TABLE_SPLIT_CELLS ; \ + HelpId = CMD_FN_TABLE_SPLIT_CELLS ; \ Text [ en-US ] = "~Split..." ; \ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_TABLE_VERT_NONE ; \ - HelpID = FN_TABLE_VERT_NONE ; \ + HelpId = CMD_FN_TABLE_VERT_NONE ; \ Text [ en-US ] = "~Top" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_VERT_CENTER ; \ - HelpID = FN_TABLE_VERT_CENTER ; \ + HelpId = CMD_FN_TABLE_VERT_CENTER ; \ Text [ en-US ] = "C~enter" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_VERT_BOTTOM ; \ - HelpID = FN_TABLE_VERT_BOTTOM ; \ + HelpId = CMD_FN_TABLE_VERT_BOTTOM ; \ Text [ en-US ] = "~Bottom" ; \ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_TABLE_SET_READ_ONLY_CELLS ; \ - HelpID = FN_TABLE_SET_READ_ONLY_CELLS ; \ + HelpId = CMD_FN_TABLE_SET_READ_ONLY_CELLS ; \ /* ### ACHTUNG: Neuer Text in Resource? ~Schützen : ~Sch³tzen */\ Text [ en-US ] = "~Protect" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_UNSET_READ_ONLY_CELLS ; \ - HelpID = FN_TABLE_UNSET_READ_ONLY_CELLS ; \ + HelpId = CMD_FN_TABLE_UNSET_READ_ONLY_CELLS ; \ Text [ en-US ] = "~Unprotect" ; \ };\ };\ @@ -143,27 +143,27 @@ MenuItem\ {\ Identifier = FN_TABLE_SET_ROW_HEIGHT ; \ - HelpID = FN_TABLE_SET_ROW_HEIGHT ; \ + HelpId = CMD_FN_TABLE_SET_ROW_HEIGHT ; \ /* ### ACHTUNG: Neuer Text in Resource? ~Höhe... : ~H÷he... */\ Text [ en-US ] = "~Height..." ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_ROW_SPLIT;\ - HelpID = FN_TABLE_ROW_SPLIT ; \ + HelpId = CMD_FN_TABLE_ROW_SPLIT ; \ Text [ en-US ] = "Allow Row to Break A~cross Pages and Columns" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_OPTIMAL_HEIGHT ; \ - HelpID = FN_TABLE_OPTIMAL_HEIGHT ; \ + HelpId = CMD_FN_TABLE_OPTIMAL_HEIGHT ; \ /* ### ACHTUNG: Neuer Text in Resource? ~Optimale Höhe : ~Optimale H÷he */\ Text [ en-US ] = "~Optimal Height" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_BALANCE_ROWS ; \ - HelpID = FN_TABLE_BALANCE_ROWS ; \ + HelpId = CMD_FN_TABLE_BALANCE_ROWS ; \ /* ### ACHTUNG: Neuer Text in Resource? Gleichmäßig ~verteilen : Gleichmõ˜ig ~verteilen */\ Text [ en-US ] = "Space ~Equally" ; \ };\ @@ -171,7 +171,7 @@ MenuItem\ {\ Identifier = FN_TABLE_SELECT_ROW ; \ - HelpID = FN_TABLE_SELECT_ROW ; \ + HelpId = CMD_FN_TABLE_SELECT_ROW ; \ /* ### ACHTUNG: Neuer Text in Resource? Ausw~ählen : Auswählen */\ /* ### ACHTUNG: Neuer Text in Resource? Ausw~ählen : Ausw~õhlen */\ Text [ en-US ] = "~Select" ; \ @@ -179,14 +179,14 @@ MenuItem\ {\ Identifier = FN_TABLE_INSERT_ROW_DLG ; \ - HelpID = FN_TABLE_INSERT_ROW_DLG ; \ + HelpId = CMD_FN_TABLE_INSERT_ROW_DLG ; \ /* ### ACHTUNG: Neuer Text in Resource? ~Einfügen... : ~Einf³gen... */\ Text [ en-US ] = "~Insert..." ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_DELETE_ROW ; \ - HelpID = FN_TABLE_DELETE_ROW ; \ + HelpId = CMD_FN_TABLE_DELETE_ROW ; \ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */\ Text [ en-US ] = "~Delete" ; \ };\ @@ -207,19 +207,19 @@ MenuItem\ {\ Identifier = FN_TABLE_SET_COL_WIDTH ; \ - HelpID = FN_TABLE_SET_COL_WIDTH ; \ + HelpId = CMD_FN_TABLE_SET_COL_WIDTH ; \ Text [ en-US ] = "~Width..." ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_ADJUST_CELLS ; \ - HelpID = FN_TABLE_ADJUST_CELLS ; \ + HelpId = CMD_FN_TABLE_ADJUST_CELLS ; \ Text [ en-US ] = "~Optimal Width " ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_BALANCE_CELLS ; \ - HelpID = FN_TABLE_BALANCE_CELLS ; \ + HelpId = CMD_FN_TABLE_BALANCE_CELLS ; \ /* ### ACHTUNG: Neuer Text in Resource? Gleichmäßig ~verteilen : Gleichmõ˜ig ~verteilen */\ Text [ en-US ] = "Space ~Equally" ; \ };\ @@ -227,7 +227,7 @@ MenuItem\ {\ Identifier = FN_TABLE_SELECT_COL ; \ - HelpID = FN_TABLE_SELECT_COL ; \ + HelpId = CMD_FN_TABLE_SELECT_COL ; \ /* ### ACHTUNG: Neuer Text in Resource? Ausw~ählen : Auswählen */\ /* ### ACHTUNG: Neuer Text in Resource? Ausw~ählen : Ausw~õhlen */\ Text [ en-US ] = "~Select" ; \ @@ -235,14 +235,14 @@ MenuItem\ {\ Identifier = FN_TABLE_INSERT_COL_DLG ; \ - HelpID = FN_TABLE_INSERT_COL_DLG ; \ + HelpId = CMD_FN_TABLE_INSERT_COL_DLG ; \ /* ### ACHTUNG: Neuer Text in Resource? ~Einfügen... : ~Einf³gen... */\ Text [ en-US ] = "~Insert..." ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_DELETE_COL ; \ - HelpID = FN_TABLE_DELETE_COL ; \ + HelpId = CMD_FN_TABLE_DELETE_COL ; \ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */\ Text [ en-US ] = "~Delete" ; \ };\ @@ -264,7 +264,7 @@ MenuItem\ {\ Identifier = FN_DRAWTEXT_ATTR_DLG ; \ - HelpID = FN_DRAWTEXT_ATTR_DLG ; \ + HelpId = CMD_FN_DRAWTEXT_ATTR_DLG ; \ Text [ en-US ] = "Te~xt..." ; \ }; @@ -272,7 +272,7 @@ MenuItem\ {\ Identifier = FN_NAME_SHAPE ; \ - HelpID = FN_NAME_SHAPE ; \ + HelpId = CMD_FN_NAME_SHAPE ; \ Text [ en-US ] = "Name..." ; \ }; @@ -281,7 +281,7 @@ MenuItem\ {\ Identifier = FN_TITLE_DESCRIPTION_SHAPE; \ - HelpID = FN_TITLE_DESCRIPTION_SHAPE; \ + HelpId = CMD_FN_TITLE_DESCRIPTION_SHAPE; \ Text [ en-US ] = "Description..." ; \ }; @@ -289,7 +289,7 @@ MenuItem\ {\ Identifier = FN_FORMAT_FRAME_DLG ; \ - HelpID = FN_FORMAT_FRAME_DLG ; \ + HelpId = CMD_FN_FORMAT_FRAME_DLG ; \ Text [ en-US ] = "~Frame..." ; \ }; @@ -344,13 +344,13 @@ MenuItem\ {\ Identifier = FN_FRAME_UP ; \ - HelpID = FN_FRAME_UP ; \ + HelpId = CMD_FN_FRAME_UP ; \ Text [ en-US ] = "Bring ~Forward" ; \ };\ MenuItem\ {\ Identifier = FN_FRAME_DOWN ; \ - HelpID = FN_FRAME_DOWN ; \ + HelpId = CMD_FN_FRAME_DOWN ; \ Text [ en-US ] = "Send Back~ward" ; \ }; @@ -430,45 +430,45 @@ MenuItem\ {\ Identifier = FN_REPLY ;\ - HelpID = FN_DELETE_NOTE ;\ + HelpId = CMD_FN_DELETE_NOTE ;\ Text [ en-US ] = "Reply" ;\ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_DELETE_NOTE ;\ - HelpID = FN_DELETE_NOTE ;\ + HelpId = CMD_FN_DELETE_NOTE ;\ Text [ en-US ] = "Delete ~Comment" ;\ };\ MenuItem\ {\ Identifier = FN_DELETE_NOTE_AUTHOR ;\ - HelpID = FN_DELETE_NOTE_AUTHOR ;\ + HelpId = CMD_FN_DELETE_NOTE_AUTHOR ;\ Text [ en-US ] = "Delete ~All Comments by $1" ;\ };\ MenuItem\ {\ Identifier = FN_DELETE_ALL_NOTES ;\ - HelpID = FN_DELETE_ALL_NOTES ;\ + HelpId = CMD_FN_DELETE_ALL_NOTES ;\ Text [ en-US ] = "~Delete All Comments" ;\ };\ /* MenuItem\ {\ Identifier = FN_HIDE_NOTE ;\ - HelpID = FN_HIDE_NOTE ;\ + HelpId = CMD_FN_HIDE_NOTE ;\ Text [ en-US ] = "~Hide comment" ;\ };\ MenuItem\ {\ Identifier = FN_HIDE_NOTE_AUTHOR ;\ - HelpID = FN_HIDE_NOTE_AUTHOR ;\ + HelpId = CMD_FN_HIDE_NOTE_AUTHOR ;\ Text [ en-US ] = "Hide ~author" ;\ };\ MenuItem\ {\ Identifier = FN_HIDE_ALL_NOTES ;\ - HelpID = FN_HIDE_ALL_NOTES ;\ + HelpId = CMD_FN_HIDE_ALL_NOTES ;\ Text [ en-US ] = "Hide all ~comments" ;\ }; */ @@ -513,13 +513,13 @@ Menu MN_TAB_POPUPMENU MenuItem { Identifier = FN_VIEW_TABLEGRID ; - HelpID = FN_VIEW_TABLEGRID ; + HelpId = CMD_FN_VIEW_TABLEGRID ; Text [ en-US ] = "Table Boundaries" ; }; MenuItem { Identifier = FN_SET_MODOPT_TBLNUMFMT ; - HelpID = FN_SET_MODOPT_TBLNUMFMT ; + HelpId = CMD_FN_SET_MODOPT_TBLNUMFMT ; Text [ en-US ] = "~Number Recognition"; }; SEPARATOR ; @@ -531,7 +531,7 @@ Menu MN_TAB_POPUPMENU MenuItem\ {\ Identifier = FN_FRAME_WRAP_CONTOUR ; \ - HelpID = FN_FRAME_WRAP_CONTOUR ; \ + HelpId = CMD_FN_FRAME_WRAP_CONTOUR ; \ Text [ en-US ] = "~Contour" ; \ }; @@ -539,7 +539,7 @@ Menu MN_TAB_POPUPMENU MenuItem\ {\ Identifier = SID_CONTOUR_DLG ; \ - HelpID = SID_CONTOUR_DLG ; \ + HelpId = CMD_SID_CONTOUR_DLG ; \ Text [ en-US ] = "~Edit Contour..." ; \ }; @@ -550,7 +550,6 @@ Menu MN_TAB_POPUPMENU MenuItem\ {\ Identifier = MN_WRAP ; \ - HelpID = MN_WRAP ; \ Command = ".uno:WrapMenu" ; \ Text [ en-US ] = "~Wrap" ; \ SubMenu = Menu\ @@ -561,35 +560,35 @@ Menu MN_TAB_POPUPMENU {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_NOWRAP ; \ - HelpID = FN_FRAME_NOWRAP ; \ + HelpId = CMD_FN_FRAME_NOWRAP ; \ Text [ en-US ] = "~No Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAP ; \ - HelpID = FN_FRAME_WRAP ; \ + HelpId = CMD_FN_FRAME_WRAP ; \ Text [ en-US ] = "~Page Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAP_IDEAL ; \ - HelpID = FN_FRAME_WRAP_IDEAL ; \ + HelpId = CMD_FN_FRAME_WRAP_IDEAL ; \ Text [ en-US ] = "~Optimal Page Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAPTHRU ; \ - HelpID = FN_FRAME_WRAPTHRU ; \ + HelpId = CMD_FN_FRAME_WRAPTHRU ; \ Text [ en-US ] = "~Wrap Through" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAPTHRU_TRANSP ; \ - HelpID = FN_FRAME_WRAPTHRU_TRANSP ; \ + HelpId = CMD_FN_FRAME_WRAPTHRU_TRANSP ; \ Text [ en-US ] = "In ~Background" ; \ };\ SEPARATOR ; \ @@ -598,7 +597,7 @@ Menu MN_TAB_POPUPMENU MenuItem\ {\ Identifier = FN_WRAP_ANCHOR_ONLY ; \ - HelpID = FN_WRAP_ANCHOR_ONLY ; \ + HelpId = CMD_FN_WRAP_ANCHOR_ONLY ; \ Text [ en-US ] = "~First Paragraph" ; \ };\ };\ @@ -616,7 +615,6 @@ String MN_DRAW_POPUPMENU MenuItem\ {\ Identifier = MN_WRAP ; \ - HelpID = MN_WRAP ; \ Command = ".uno:WrapMenu" ; \ SubMenu = Menu\ {\ @@ -626,35 +624,35 @@ String MN_DRAW_POPUPMENU {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_NOWRAP ; \ - HelpID = FN_FRAME_NOWRAP ; \ + HelpId = CMD_FN_FRAME_NOWRAP ; \ Text [ en-US ] = "~No Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAP ; \ - HelpID = FN_FRAME_WRAP ; \ + HelpId = CMD_FN_FRAME_WRAP ; \ Text [ en-US ] = "~Page Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAP_IDEAL ; \ - HelpID = FN_FRAME_WRAP_IDEAL ; \ + HelpId = CMD_FN_FRAME_WRAP_IDEAL ; \ Text [ en-US ] = "~Optimal Page Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAPTHRU ; \ - HelpID = FN_FRAME_WRAPTHRU ; \ + HelpId = CMD_FN_FRAME_WRAPTHRU ; \ Text [ en-US ] = "~Wrap Through" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAPTHRU_TRANSP ; \ - HelpID = FN_FRAME_WRAPTHRU_TRANSP ; \ + HelpId = CMD_FN_FRAME_WRAPTHRU_TRANSP ; \ Text [ en-US ] = "In ~Background" ; \ };\ SEPARATOR ; \ @@ -662,14 +660,14 @@ String MN_DRAW_POPUPMENU MenuItem\ {\ Identifier = FN_WRAP_ANCHOR_ONLY ; \ - HelpID = FN_WRAP_ANCHOR_ONLY ; \ + HelpId = CMD_FN_WRAP_ANCHOR_ONLY ; \ Text [ en-US ] = "~First Paragraph" ; \ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_DRAW_WRAP_DLG ; \ - HelpID = FN_DRAW_WRAP_DLG ; \ + HelpId = CMD_FN_DRAW_WRAP_DLG ; \ Text [ en-US ] = "~Edit..." ; \ };\ };\ @@ -687,7 +685,7 @@ String MN_DRAW_POPUPMENU MenuItem\ {\ Identifier = FN_TOOL_ANKER_FRAME ; \ - HelpID = FN_TOOL_ANKER_FRAME ; \ + HelpId = CMD_FN_TOOL_ANKER_FRAME ; \ Text [ en-US ] = "To ~Frame" ; \ }; @@ -695,7 +693,7 @@ String MN_DRAW_POPUPMENU MenuItem\ {\ Identifier = FN_TOOL_ANKER ; \ - HelpID = FN_TOOL_ANKER ; \ + HelpId = CMD_FN_TOOL_ANKER ; \ Command = ".uno:AnchorMenu" ; \ Text [ en-US ] = "An~chor" ; \ SubMenu = Menu\ @@ -705,25 +703,25 @@ String MN_DRAW_POPUPMENU MenuItem\ {\ Identifier = FN_TOOL_ANKER_PAGE ; \ - HelpID = FN_TOOL_ANKER_PAGE ; \ + HelpId = CMD_FN_TOOL_ANKER_PAGE ; \ Text [ en-US ] = "To P~age" ; \ };\ MenuItem\ {\ Identifier = FN_TOOL_ANKER_PARAGRAPH ; \ - HelpID = FN_TOOL_ANKER_PARAGRAPH ; \ + HelpId = CMD_FN_TOOL_ANKER_PARAGRAPH ; \ Text [ en-US ] = "To ~Paragraph" ; \ };\ MenuItem\ {\ Identifier = FN_TOOL_ANKER_AT_CHAR ; \ - HelpID = FN_TOOL_ANKER_AT_CHAR ; \ + HelpId = CMD_FN_TOOL_ANKER_AT_CHAR ; \ Text [ en-US ] = "To ~Character" ; \ };\ MenuItem\ {\ Identifier = FN_TOOL_ANKER_CHAR ; \ - HelpID = FN_TOOL_ANKER_CHAR ; \ + HelpId = CMD_FN_TOOL_ANKER_CHAR ; \ Text [ en-US ] = "As C~haracter" ; \ };\ MN_AT_FRAME\ @@ -813,7 +811,7 @@ Menu MN_DRWTXT_POPUPMENU MenuItem\ {\ Identifier = FN_DELETE_COMMENT ;\ - HelpID = FN_DELETE_COMMENT ;\ + HelpId = CMD_FN_DELETE_COMMENT ;\ Text [ en-US ] = "Delete ~Changes Note" ;\ };\ @@ -898,7 +896,6 @@ String MN_GRF_POPUPMENU MenuItem\ {\ Identifier = MN_FORMAT_FRM_HORZ ; \ - HelpID = MN_FORMAT_FRM_HORZ ; \ Command = ".uno:AlignFrameMenu" ; \ SubMenu = Menu\ {\ @@ -907,38 +904,38 @@ String MN_GRF_POPUPMENU MenuItem\ {\ Identifier = FN_FRAME_ALIGN_HORZ_LEFT ; \ - HelpID = FN_FRAME_ALIGN_HORZ_LEFT ; \ + HelpId = CMD_FN_FRAME_ALIGN_HORZ_LEFT ; \ Text [ en-US ] = "~Left" ; \ };\ MenuItem\ {\ Identifier = FN_FRAME_ALIGN_HORZ_CENTER ; \ - HelpID = FN_FRAME_ALIGN_HORZ_CENTER ; \ + HelpId = CMD_FN_FRAME_ALIGN_HORZ_CENTER ; \ Text [ en-US ] = "~Centered" ; \ };\ MenuItem\ {\ Identifier = FN_FRAME_ALIGN_HORZ_RIGHT ; \ - HelpID = FN_FRAME_ALIGN_HORZ_RIGHT ; \ + HelpId = CMD_FN_FRAME_ALIGN_HORZ_RIGHT ; \ Text [ en-US ] = "~Right" ; \ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_FRAME_ALIGN_VERT_TOP ; \ - HelpID = FN_FRAME_ALIGN_VERT_TOP ; \ + HelpId = CMD_FN_FRAME_ALIGN_VERT_TOP ; \ Text [ en-US ] = "Base at ~Top" ; \ };\ MenuItem\ {\ Identifier = FN_FRAME_ALIGN_VERT_CENTER ; \ - HelpID = FN_FRAME_ALIGN_VERT_CENTER ; \ + HelpId = CMD_FN_FRAME_ALIGN_VERT_CENTER ; \ Text [ en-US ] = "Base in ~Middle" ; \ };\ MenuItem\ {\ Identifier = FN_FRAME_ALIGN_VERT_BOTTOM ; \ - HelpID = FN_FRAME_ALIGN_VERT_BOTTOM ; \ + HelpId = CMD_FN_FRAME_ALIGN_VERT_BOTTOM ; \ Text [ en-US ] = "Base at ~Bottom" ; \ };\ };\ @@ -961,13 +958,13 @@ Menu MN_GRF_POPUPMENU MenuItem { Identifier = FN_FORMAT_GRAFIC_DLG ; - HelpID = FN_FORMAT_GRAFIC_DLG ; + HelpId = CMD_FN_FORMAT_GRAFIC_DLG ; Text [ en-US ] = "~Picture..." ; }; MenuItem { Identifier = FN_SAVE_GRAPHIC; - HelpID = FN_SAVE_GRAPHIC; + HelpId = CMD_FN_SAVE_GRAPHIC; Text [ en-US ] = "Save Graphics..." ; }; MN_FRM_CAPTION_ITEM @@ -998,7 +995,7 @@ Menu MN_OLE_POPUPMENU MenuItem { Identifier = FN_FORMAT_FRAME_DLG ; - HelpID = FN_FORMAT_FRAME_DLG ; + HelpId = CMD_FN_FORMAT_FRAME_DLG ; Text [ en-US ] = "Object..." ; }; MN_FRM_CAPTION_ITEM @@ -1040,13 +1037,13 @@ Menu MN_PPREVIEW_POPUPMENU MenuItem { Identifier = FN_PAGEUP ; - HelpID = FN_PAGEUP ; + HelpId = CMD_FN_PAGEUP ; Text [ en-US ] = "Previous Page" ; }; MenuItem { Identifier = FN_PAGEDOWN ; - HelpID = FN_PAGEDOWN ; + HelpId = CMD_FN_PAGEDOWN ; /* ### ACHTUNG: Neuer Text in Resource? Nächste Seite : Nõchste Seite */ Text [ en-US ] = "Next Page" ; }; @@ -1059,14 +1056,14 @@ Menu MN_PPREVIEW_POPUPMENU MenuItem { Identifier = FN_PRINT_PAGEPREVIEW ; - HelpID = FN_PRINT_PAGEPREVIEW ; + HelpId = CMD_FN_PRINT_PAGEPREVIEW ; Text [ en-US ] = "Print" ; }; SEPARATOR ; MenuItem { Identifier = SID_PRINTPREVIEW; - HelpID = SID_PRINTPREVIEW; + HelpId = CMD_SID_PRINTPREVIEW; Text [ en-US ] = "Close Preview" ; }; }; diff --git a/sw/source/ui/chrdlg/swbreak.src b/sw/source/ui/chrdlg/swbreak.src index c626278748..d2c42fba0d 100644 --- a/sw/source/ui/chrdlg/swbreak.src +++ b/sw/source/ui/chrdlg/swbreak.src @@ -32,7 +32,7 @@ // #define DLG_BREAK 256 ModalDialog DLG_BREAK { - HelpID = FN_INSERT_BREAK_DLG ; + HelpID = CMD_FN_INSERT_BREAK_DLG ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 161 , 114 ) ; diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx index c2c231544c..7fb20bf3f8 100644 --- a/sw/source/ui/chrdlg/swuiccoll.cxx +++ b/sw/source/ui/chrdlg/swuiccoll.cxx @@ -114,8 +114,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet) aTbLinks.SetTabs( &nTabs[0], MAP_APPFONT ); aTbLinks.Resize(); // OS: Hack fuer richtige Selektion aTbLinks.SetSpaceBetweenEntries( 0 ); - // FIXME: HELPID - aTbLinks.SetHelpId(""/*HID_COND_COLL_TABLIST*/); + aTbLinks.SetHelpId(HID_COND_COLL_TABLIST); SfxStyleFamilies aFamilies(SW_RES(DLG_STYLE_DESIGNER)); const SfxStyleFamilyItem* pFamilyItem = 0; diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index a14f36e60e..e8752bd08f 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -325,12 +325,10 @@ SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pPare aSz.Width()/2, HIB_LEFT | HIB_VCENTER ); - // FIXME: HELPID - m_aStatusHB.SetHelpId(""/*HID_MM_TESTACCOUNTSETTINGS_HB*/ ); + m_aStatusHB.SetHelpId(HID_MM_TESTACCOUNTSETTINGS_HB ); m_aStatusHB.Show(); - // FIXME: HELPID - m_aStatusLB.SetHelpId(""/*HID_MM_TESTACCOUNTSETTINGS_TLB*/); + m_aStatusLB.SetHelpId(HID_MM_TESTACCOUNTSETTINGS_TLB); static long nTabs[] = {2, 0, aSz.Width()/2 }; m_aStatusLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aStatusLB.SetSelectionMode( SINGLE_SELECTION ); diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 9da19b6aed..808ad95fcd 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -499,8 +499,7 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet ) aLbLevel.SelectEntryPos( nLvl < MAXLEVEL ? nLvl + 1 : 0 ); aEdDelim.SetText( sDelim ); - // FIXME: HELPID - aCheckLB.SetHelpId(""/*HID_OPTCAPTION_CLB*/); + aCheckLB.SetHelpId(HID_OPTCAPTION_CLB); FreeResource(); diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index 8068f422ba..c543cf702c 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -214,12 +214,10 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) : m_aListHB.InsertItem( ITEMID_TABLE, m_sTable, aSz.Width()/2, HIB_LEFT | HIB_VCENTER | HIB_FIXED | HIB_FIXEDPOS /*| HIB_CLICKABLE | HIB_UPARROW */); - // FIXME: HELPID - m_aListHB.SetHelpId(""/*HID_MM_ADDRESSLIST_HB*/ ); + m_aListHB.SetHelpId(HID_MM_ADDRESSLIST_HB ); m_aListHB.Show(); - // FIXME: HELPID - m_aListLB.SetHelpId(""/*HID_MM_ADDRESSLIST_TLB*/); + m_aListLB.SetHelpId(HID_MM_ADDRESSLIST_TLB); static long nTabs[] = {2, 0, aSz.Width()/2 }; m_aListLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aListLB.SetSelectionMode( SINGLE_SELECTION ); diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx index b219fb90d1..4b31760592 100644 --- a/sw/source/ui/dbui/dbtree.cxx +++ b/sw/source/ui/dbui/dbtree.cxx @@ -236,8 +236,7 @@ SwDBTreeList::SwDBTreeList(Window *pParent, const ResId& rResId, bShowColumns (bShowCol), pImpl(new SwDBTreeList_Impl(pSh)) { - // FIXME: HELPID - SetHelpId(""/*HID_DB_SELECTION_TLB*/); + SetHelpId(HID_DB_SELECTION_TLB); if (IsVisible()) InitTreeList(); diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx index 84e1fe18ec..e03b129034 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.cxx +++ b/sw/source/ui/dbui/mailmergechildwindow.cxx @@ -384,8 +384,7 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf m_nStatusHeight = m_aSeparatorFL.GetPosPixel().Y() - m_aStatusLB.GetPosPixel().Y(); String sTask(SW_RES(ST_TASK)); String sStatus(SW_RES(ST_STATUS)); - // FIXME: HELPID - m_aStatusLB.SetHelpId(""/*HID_MM_SENDMAILS_STATUSLB*/); + m_aStatusLB.SetHelpId(HID_MM_SENDMAILS_STATUSLB); FreeResource(); @@ -414,12 +413,10 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf m_aStatusHB.InsertItem( ITEMID_STATUS, sStatus, nPos2, HIB_LEFT | HIB_VCENTER ); - // FIXME: HELPID - m_aStatusHB.SetHelpId(""/*HID_MM_ADDRESSLIST_HB*/ ); + m_aStatusHB.SetHelpId(HID_MM_ADDRESSLIST_HB ); m_aStatusHB.Show(); - // FIXME: HELPID - m_aStatusLB.SetHelpId(""/*HID_MM_MAILSTATUS_TLB*/); + m_aStatusLB.SetHelpId(HID_MM_MAILSTATUS_TLB); static long nTabs[] = {3, 0, nPos1, aSz.Width() }; m_aStatusLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aStatusLB.SetSelectionMode( SINGLE_SELECTION ); diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index 4b59880a6a..fd601bdfb1 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -89,10 +89,8 @@ SwMailMergeWizard::SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rItem enableButtons(WZB_FINISH, sal_False); m_pFinish->SetText(m_sFinish); - // FIXME: HELPID - m_pNextPage->SetHelpId(""/*HID_MM_NEXT_PAGE*/); - // FIXME: HELPID - m_pPrevPage->SetHelpId(""/*HID_MM_PREV_PAGE*/); + m_pNextPage->SetHelpId(HID_MM_NEXT_PAGE); + m_pPrevPage->SetHelpId(HID_MM_PREV_PAGE); //#i51949# no output type page visible if e-Mail is not supported if(rItem.IsMailAvailable()) diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index eda1caf58a..079805643e 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -1070,8 +1070,7 @@ SwAssignFieldsControl::SwAssignFieldsControl( m_nFirstYPos(0) { SetStyle(GetStyle()|WB_TABSTOP|WB_DIALOGCONTROL); - // FIXME: HELPID - SetHelpId(""/*HID_MM_ASSIGN_FIELDS*/); + SetHelpId(HID_MM_ASSIGN_FIELDS); long nHBHeight = m_aHeaderHB.CalcWindowSizePixel().Height(); Size aOutputSize(GetOutputSize()); m_aHeaderHB.SetSizePixel( @@ -1098,6 +1097,25 @@ SwAssignFieldsControl::SwAssignFieldsControl( uno::Sequence< ::rtl::OUString> aAssignments = rConfigItem.GetColumnAssignment( rConfigItem.GetCurrentDBData() ); Link aMatchHdl = LINK(this, SwAssignFieldsControl, MatchHdl_Impl); Link aFocusHdl = LINK(this, SwAssignFieldsControl, GotFocusHdl_Impl); + + static const char* aHIDs[] = + { + HID_MM_HEADER_0, + HID_MM_HEADER_1, + HID_MM_HEADER_2, + HID_MM_HEADER_3, + HID_MM_HEADER_4, + HID_MM_HEADER_5, + HID_MM_HEADER_6, + HID_MM_HEADER_7, + HID_MM_HEADER_8, + HID_MM_HEADER_9, + HID_MM_HEADER_10, + HID_MM_HEADER_11, + HID_MM_HEADER_12, + HID_MM_HEADER_13 + }; + //fill the controls for(USHORT i = 0; i < rHeaders.Count(); ++i) { @@ -1107,8 +1125,7 @@ SwAssignFieldsControl::SwAssignFieldsControl( sLabel.Insert(rHeader, 1); pNewText->SetText(sLabel); ListBox* pNewLB = new ListBox(&m_aWindow, ResId(LB_FIELDS, *rResId.GetResMgr())); - // FIXME: HELPID - pNewLB->SetHelpId( ""/*HID_MM_HEADER_0 + i*/ ); + pNewLB->SetHelpId( aHIDs[i] ); pNewLB->SelectEntryPos(0); for(sal_Int32 nField = 0; nField < aFields.getLength(); ++nField) pNewLB->InsertEntry(pFields[nField]); @@ -1442,8 +1459,7 @@ DDListBox::DDListBox(SwCustomizeAddressBlockDialog* pParent, const ResId rResId) SetSelectionMode( SINGLE_SELECTION ); SetDragDropMode( SV_DRAGDROP_CTRL_COPY ); EnableAsyncDrag(TRUE); - // FIXME: HELPID - SetHelpId(""/*HID_MM_CUSTOMFIELDS*/); + SetHelpId(HID_MM_CUSTOMFIELDS); // expand selection to the complete width of the ListBox SetHighlightRange(); Show(); diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index f928830e82..4e287a5a28 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -308,22 +308,14 @@ SwMailMergeGreetingsPage::SwMailMergeGreetingsPage( SwMailMergeWizard* _pParent) m_pNeutralCB = &m_aNeutralCB; m_bIsTabPage = true; - // FIXME: HELPID - m_pPersonalizedCB->SetHelpId( ""/*HID_MM_GREETINGS_CB_PERSONALIZED*/); - // FIXME: HELPID - m_pFemaleLB->SetHelpId( ""/*HID_MM_GREETINGS_LB_FEMALE*/ ); - // FIXME: HELPID - m_pFemalePB->SetHelpId( ""/*HID_MM_GREETINGS_PB_FEMALE*/ ); - // FIXME: HELPID - m_pMaleLB->SetHelpId( ""/*HID_MM_GREETINGS_LB_MALE*/ ); - // FIXME: HELPID - m_pMalePB->SetHelpId( ""/*HID_MM_GREETINGS_PB_MALE*/ ); - // FIXME: HELPID - m_pFemaleColumnLB->SetHelpId( ""/*HID_MM_GREETINGS_LB_FEMALECOLUMN*/); - // FIXME: HELPID - m_pFemaleFieldCB->SetHelpId( ""/*HID_MM_GREETINGS_CB_FEMALEFIELD*/ ); - // FIXME: HELPID - m_pNeutralCB->SetHelpId( ""/*HID_MM_GREETINGS_CB_NEUTRAL*/ ); + m_pPersonalizedCB->SetHelpId( HID_MM_GREETINGS_CB_PERSONALIZED); + m_pFemaleLB->SetHelpId( HID_MM_GREETINGS_LB_FEMALE ); + m_pFemalePB->SetHelpId( HID_MM_GREETINGS_PB_FEMALE ); + m_pMaleLB->SetHelpId( HID_MM_GREETINGS_LB_MALE ); + m_pMalePB->SetHelpId( HID_MM_GREETINGS_PB_MALE ); + m_pFemaleColumnLB->SetHelpId( HID_MM_GREETINGS_LB_FEMALECOLUMN); + m_pFemaleFieldCB->SetHelpId( HID_MM_GREETINGS_CB_FEMALEFIELD ); + m_pNeutralCB->SetHelpId( HID_MM_GREETINGS_CB_NEUTRAL ); FreeResource(); m_aGreetingLineCB.SetClickHdl(LINK(this, SwMailMergeGreetingsPage, ContainsHdl_Impl)); @@ -532,22 +524,14 @@ SwMailBodyDialog::SwMailBodyDialog(Window* pParent, SwMailMergeWizard* _pWizard) m_pNeutralCB = &m_aNeutralCB; m_bIsTabPage = false; - // FIXME: HELPID - m_pPersonalizedCB->SetHelpId( ""/*HID_MM_BODY_CB_PERSONALIZED*/ ); - // FIXME: HELPID - m_pFemaleLB->SetHelpId( ""/*HID_MM_BODY_LB_FEMALE*/ ); - // FIXME: HELPID - m_pFemalePB->SetHelpId( ""/*HID_MM_BODY_PB_FEMALE*/ ); - // FIXME: HELPID - m_pMaleLB->SetHelpId( ""/*HID_MM_BODY_LB_MALE*/ ); - // FIXME: HELPID - m_pMalePB->SetHelpId( ""/*HID_MM_BODY_PB_MALE*/ ); - // FIXME: HELPID - m_pFemaleColumnLB->SetHelpId( ""/*HID_MM_BODY_LB_FEMALECOLUMN*/ ); - // FIXME: HELPID - m_pFemaleFieldCB->SetHelpId( ""/*HID_MM_BODY_CB_FEMALEFIELD*/ ); - // FIXME: HELPID - m_pNeutralCB->SetHelpId( ""/*HID_MM_BODY_CB_NEUTRAL*/ ); + m_pPersonalizedCB->SetHelpId( HID_MM_BODY_CB_PERSONALIZED ); + m_pFemaleLB->SetHelpId( HID_MM_BODY_LB_FEMALE ); + m_pFemalePB->SetHelpId( HID_MM_BODY_PB_FEMALE ); + m_pMaleLB->SetHelpId( HID_MM_BODY_LB_MALE ); + m_pMalePB->SetHelpId( HID_MM_BODY_PB_MALE ); + m_pFemaleColumnLB->SetHelpId( HID_MM_BODY_LB_FEMALECOLUMN ); + m_pFemaleFieldCB->SetHelpId( HID_MM_BODY_CB_FEMALEFIELD ); + m_pNeutralCB->SetHelpId( HID_MM_BODY_CB_NEUTRAL ); FreeResource(); m_aGreetingLineCB.SetClickHdl(LINK(this, SwMailBodyDialog, ContainsHdl_Impl)); diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index bae83b5bff..51277a1fed 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -103,14 +103,12 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(Window* pParent, m_aTableHB.InsertItem( 2, m_sType, aSz.Width()/2, HIB_LEFT | HIB_VCENTER /*| HIB_CLICKABLE | HIB_UPARROW */); - // FIXME: HELPID - m_aTableHB.SetHelpId(""/*HID_MM_ADDRESSLIST_HB*/ ); + m_aTableHB.SetHelpId(HID_MM_ADDRESSLIST_HB ); m_aTableHB.Show(); static long nTabs[] = {3, 0, aSz.Width()/2, aSz.Width() }; m_aTableLB.SetTabs(&nTabs[0], MAP_PIXEL); - // FIXME: HELPID - m_aTableLB.SetHelpId(""/*HID_MM_SELECTDBTABLEDDIALOG_LISTBOX*/); + m_aTableLB.SetHelpId(HID_MM_SELECTDBTABLEDDIALOG_LISTBOX); m_aTableLB.SetWindowBits( WB_CLIPCHILDREN ); m_aTableLB.SetSpaceBetweenEntries(3); m_aTableLB.SetSelectionMode( SINGLE_SELECTION ); diff --git a/sw/source/ui/dialog/regionsw.src b/sw/source/ui/dialog/regionsw.src index e0da42f07f..b7b1a4639a 100644 --- a/sw/source/ui/dialog/regionsw.src +++ b/sw/source/ui/dialog/regionsw.src @@ -87,7 +87,7 @@ *************************************************************************/ ModalDialog MD_EDIT_REGION { - HelpID = FN_EDIT_REGION ; + HelpID = CMD_FN_EDIT_REGION ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 316 , 185 ) ; diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 5a344b3afc..284b26135a 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -451,11 +451,9 @@ String AbstractInsFootNoteDlg_Impl::GetStr() { return pDlg->GetStr(); } -void AbstractInsFootNoteDlg_Impl::SetHelpId( ULONG nHelpId ) +void AbstractInsFootNoteDlg_Impl::SetHelpId( const rtl::OString& sHelpId ) { - // FIXME: HELPID - (void)nHelpId; - pDlg->SetHelpId( ""/*nHelpId*/ ); + pDlg->SetHelpId( sHelpId ); } void AbstractInsFootNoteDlg_Impl::SetText( const XubString& rStr ) { diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 8c3355bb6b..f31e35e05a 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -283,7 +283,7 @@ class AbstractInsFootNoteDlg_Impl : public AbstractInsFootNoteDlg virtual BOOL IsEndNote(); virtual String GetStr(); //from class Window - virtual void SetHelpId( ULONG nHelpId ); + virtual void SetHelpId( const rtl::OString& sHelpId ); virtual void SetText( const XubString& rStr ); }; //for SwInsFootNoteDlg end diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 33a50933d4..440457f0b1 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -157,8 +157,7 @@ public: SwTestPasswdDlg(Window* pParent) : SfxPasswordDialog(pParent) { - // FIXME: HELPID - SetHelpId(""/*HID_DLG_PASSWD_SECTION*/); + SetHelpId(HID_DLG_PASSWD_SECTION); } }; @@ -431,8 +430,7 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh ) aSubRegionED.AddEventListener( LINK( this, SwEditRegionDlg, SubRegionEventHdl )); aSubRegionED.EnableAutocomplete( sal_True, sal_True ); - // FIXME: HELPID - aTree.SetHelpId(""/*HID_REGION_TREE*/); + aTree.SetHelpId(HID_REGION_TREE); aTree.SetSelectionMode( MULTIPLE_SELECTION ); aTree.SetWindowBits(WB_HASBUTTONSATROOT|WB_CLIPCHILDREN|WB_HSCROLL); aTree.SetSpaceBetweenEntries(0); diff --git a/sw/source/ui/dochdl/selglos.src b/sw/source/ui/dochdl/selglos.src index 81162518c1..b398a3a7e3 100644 --- a/sw/source/ui/dochdl/selglos.src +++ b/sw/source/ui/dochdl/selglos.src @@ -33,7 +33,7 @@ // #define DLG_SEL_GLOS 256 ModalDialog DLG_SEL_GLOS { - HelpID = FN_EXPAND_GLOSSARY ; + HelpID = CMD_FN_EXPAND_GLOSSARY ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 220 , 100 ) ; diff --git a/sw/source/ui/docvw/docvw.src b/sw/source/ui/docvw/docvw.src index dcd0f98103..459b673cb1 100644 --- a/sw/source/ui/docvw/docvw.src +++ b/sw/source/ui/docvw/docvw.src @@ -36,56 +36,56 @@ Menu MN_READONLY_POPUP MenuItem { Identifier = MN_READONLY_OPENURL ; - HelpID = SID_OPENDOC ; + HelpId = CMD_SID_OPENDOC ; Text [ en-US ] = "~Open" ; }; MenuItem { Identifier = MN_READONLY_OPENURLNEW ; - HelpID = SID_OPENDOC ; + HelpId = CMD_SID_OPENDOC ; Text [ en-US ] = "Open in New Window" ; }; MenuItem { Identifier = MN_READONLY_EDITDOC ; - HelpID = SID_EDITDOC ; + HelpId = CMD_SID_EDITDOC ; Text [ en-US ] = "~Edit" ; }; MenuItem { Identifier = MN_READONLY_SELECTION_MODE ; - HelpID = FN_READONLY_SELECTION_MODE ; + HelpId = CMD_FN_READONLY_SELECTION_MODE ; Text [ en-US ] = "Select Text"; }; MenuItem { Identifier = MN_READONLY_RELOAD; - HelpID = SID_RELOAD; + HelpId = CMD_SID_RELOAD; Text [ en-US ] = "Re~load"; }; MenuItem { Identifier = MN_READONLY_RELOAD_FRAME; - HelpID = SID_RELOAD; + HelpId = CMD_SID_RELOAD; Text [ en-US ] = "Reload Frame"; }; MenuItem { Identifier = MN_READONLY_SOURCEVIEW ; - HelpID = HID_SOURCEVIEW ; + HelpId = HID_SOURCEVIEW ; Text [ en-US ] = "HT~ML Source" ; }; SEPARATOR MenuItem { Identifier = MN_READONLY_BROWSE_BACKWARD ; - HelpID = SID_BROWSE_BACKWARD ; + HelpId = CMD_SID_BROWSE_BACKWARD ; Text [ en-US ] = "Backwards" ; }; MenuItem { Identifier = MN_READONLY_BROWSE_FORWARD ; - HelpID = SID_BROWSE_FORWARD ; + HelpId = CMD_SID_BROWSE_FORWARD ; Text [ en-US ] = "~Forward" ; }; SEPARATOR @@ -190,14 +190,14 @@ Menu MN_READONLY_POPUP MenuItem { Identifier = SID_WIN_FULLSCREEN; - HelpID = SID_WIN_FULLSCREEN; + HelpId = CMD_SID_WIN_FULLSCREEN; Text [ en-US ] = "Leave Full-Screen Mode" ; }; SEPARATOR MenuItem { Identifier = MN_READONLY_COPY ; - HelpID = SID_COPY; + HelpId = CMD_SID_COPY; Text [ en-US ] = "~Copy" ; }; }; diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index ad0ec29dec..9945b90086 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -4558,8 +4558,7 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView): nKS_NUMDOWN_Count(0), // #i23725# nKS_NUMINDENTINC_Count(0) // #i23725# { - // FIXME: HELPID - SetHelpId(""/*HID_EDIT_WIN*/); + SetHelpId(HID_EDIT_WIN); EnableChildTransparentMode(); SetDialogControlFlags( WINDOW_DLGCTRL_RETURN | WINDOW_DLGCTRL_WANTFOCUS ); diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx index 748da4fae0..2ea48e2a7e 100644 --- a/sw/source/ui/docvw/srcedtw.cxx +++ b/sw/source/ui/docvw/srcedtw.cxx @@ -253,8 +253,7 @@ SwSrcEditWindow::SwSrcEditWindow( Window* pParent, SwSrcView* pParentView ) : bDoSyntaxHighlight(TRUE), bHighlighting(FALSE) { - // FIXME: HELPID - SetHelpId(""/*HID_SOURCE_EDITWIN*/); + SetHelpId(HID_SOURCE_EDITWIN); CreateTextEngine(); pSourceViewConfig->AddListener(this); } diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 890cbd0585..12b0f1f38f 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -173,14 +173,12 @@ SwEnvDlg::SwEnvDlg(Window* pParent, const SfxItemSet& rSet, FreeResource(); GetOKButton().SetText(String(SW_RES(STR_BTN_NEWDOC))); - // FIXME: HELPID - GetOKButton().SetHelpId(""/*HID_ENVELOP_PRINT*/); + GetOKButton().SetHelpId(HID_ENVELOP_PRINT); GetOKButton().SetHelpText(aEmptyStr); // Damit generierter Hilfetext verwendet wird if (GetUserButton()) { GetUserButton()->SetText(bInsert ? sInsert : sChange); - // FIXME: HELPID - GetUserButton()->SetHelpId(""/*HID_ENVELOP_INSERT*/); + GetUserButton()->SetHelpId(HID_ENVELOP_INSERT); } AddTabPage(TP_ENV_ENV, SwEnvPage ::Create, 0); diff --git a/sw/source/ui/envelp/envprt.src b/sw/source/ui/envelp/envprt.src index 25a92fcda2..d7c2d24733 100644 --- a/sw/source/ui/envelp/envprt.src +++ b/sw/source/ui/envelp/envprt.src @@ -49,32 +49,32 @@ TabPage TP_ENV_PRT ToolBoxItem { Identifier = ITM_HOR_LEFT ; - HelpID = ITM_HOR_LEFT ; + HelpID = HID_ITM_HOR_LEFT ; }; ToolBoxItem { Identifier = ITM_HOR_CNTR ; - HelpID = ITM_HOR_CNTR ; + HelpID = HID_ITM_HOR_CNTR ; }; ToolBoxItem { Identifier = ITM_HOR_RGHT ; - HelpID = ITM_HOR_RGHT ; + HelpID = HID_ITM_HOR_RGHT ; }; ToolBoxItem { Identifier = ITM_VER_LEFT ; - HelpID = ITM_VER_LEFT ; + HelpID = HID_ITM_VER_LEFT ; }; ToolBoxItem { Identifier = ITM_VER_CNTR ; - HelpID = ITM_VER_CNTR ; + HelpID = HID_ITM_VER_CNTR ; }; ToolBoxItem { Identifier = ITM_VER_RGHT ; - HelpID = ITM_VER_RGHT ; + HelpID = HID_ITM_VER_RGHT ; }; }; }; diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index f4e508efd2..05c2cf90be 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -143,8 +143,7 @@ SwLabDlg::SwLabDlg(Window* pParent, const SfxItemSet& rSet, FreeResource(); GetOKButton().SetText(String(SW_RES(STR_BTN_NEW_DOC))); - // FIXME: HELPID - GetOKButton().SetHelpId(""/*HID_LABEL_INSERT*/); + GetOKButton().SetHelpId(HID_LABEL_INSERT); GetOKButton().SetHelpText(aEmptyStr); // Damit generierter Hilfetext verwendet wird AddTabPage(TP_LAB_LAB, m_bLabel ? sFormat : sMedium ,SwLabPage ::Create, 0, sal_False, 0); @@ -346,16 +345,11 @@ void lcl_ChgYPos(Window& rWin, long nDiff) void SwLabPage::SetToBusinessCard() { - // FIXME: HELPID - SetHelpId(""/*HID_BUSINESS_FMT_PAGE*/); - // FIXME: HELPID - aContButton.SetHelpId(""/*HID_BUSINESS_FMT_PAGE_CONT*/); - // FIXME: HELPID - aSheetButton.SetHelpId(""/*HID_BUSINESS_FMT_PAGE_SHEET*/); - // FIXME: HELPID - aMakeBox.SetHelpId(""/*HID_BUSINESS_FMT_PAGE_BRAND*/); - // FIXME: HELPID - aTypeBox.SetHelpId(""/*HID_BUSINESS_FMT_PAGE_TYPE*/); + SetHelpId(HID_BUSINESS_FMT_PAGE); + aContButton.SetHelpId(HID_BUSINESS_FMT_PAGE_CONT); + aSheetButton.SetHelpId(HID_BUSINESS_FMT_PAGE_SHEET); + aMakeBox.SetHelpId(HID_BUSINESS_FMT_PAGE_BRAND); + aTypeBox.SetHelpId(HID_BUSINESS_FMT_PAGE_TYPE); m_bLabel = sal_False; aWritingText.Hide(); aAddrBox.Hide(); @@ -733,8 +727,7 @@ SwVisitingCardPage::SwVisitingCardPage(Window* pParent, const SfxItemSet& rSet) aAutoTextLB.SetWindowBits( WB_HSCROLL ); aAutoTextLB.SetSpaceBetweenEntries(0); aAutoTextLB.SetSelectionMode( SINGLE_SELECTION ); - // FIXME: HELPID - aAutoTextLB.SetHelpId(""/*HID_BUSINESS_CARD_CONTENT*/); + aAutoTextLB.SetHelpId(HID_BUSINESS_CARD_CONTENT); SetExchangeSupport(); aAutoTextLB.SetSelectHdl(LINK(this, SwVisitingCardPage, AutoTextSelectHdl)); diff --git a/sw/source/ui/envelp/mailmrge.src b/sw/source/ui/envelp/mailmrge.src index f87f08478a..5e77d797fa 100644 --- a/sw/source/ui/envelp/mailmrge.src +++ b/sw/source/ui/envelp/mailmrge.src @@ -41,7 +41,7 @@ ModalDialog DLG_MAILMERGE _MAIL_MERGE_STRING_ Moveable = TRUE ; Sizeable = TRUE; - HelpID = FN_QRY_MERGE ; + HelpID = CMD_FN_QRY_MERGE ; Window WIN_BEAMER { Pos = MAP_APPFONT ( 6 , 3 ) ; diff --git a/sw/source/ui/fldui/FldRefTreeListBox.cxx b/sw/source/ui/fldui/FldRefTreeListBox.cxx index 677e3de2ee..3d81ea70b3 100644 --- a/sw/source/ui/fldui/FldRefTreeListBox.cxx +++ b/sw/source/ui/fldui/FldRefTreeListBox.cxx @@ -37,8 +37,7 @@ SwFldRefTreeListBox::SwFldRefTreeListBox( Window* pParent, const ResId& rResId) : SvTreeListBox( pParent, rResId ) { - // FIXME: HELPID - SetHelpId( ""/*HID_REFSELECTION_TOOLTIP*/ ); + SetHelpId( HID_REFSELECTION_TOOLTIP ); } SwFldRefTreeListBox::~SwFldRefTreeListBox() diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 4e8fd4d00b..dabb6b91e5 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -87,8 +87,7 @@ SwFldDokInfPage::SwFldDokInfPage(Window* pWindow, const SfxItemSet& rCoreSet ) : { FreeResource(); - // FIXME: HELPID - aTypeTLB.SetHelpId(""/*HID_FIELD_DINF_TYPE*/); + aTypeTLB.SetHelpId(HID_FIELD_DINF_TYPE); aTypeTLB.SetSelectionMode(SINGLE_SELECTION); aTypeTLB.SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); // Font nicht setzen, damit der Font des Controls uebernommen wird! diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index e8609a961f..832dabf344 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -141,8 +141,7 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) : aNextBT.SetClickHdl(LINK(this, SwFldEditDlg, NextPrevHdl)); aAddressBT.SetClickHdl(LINK(this, SwFldEditDlg, AddressHdl)); - // FIXME: HELPID - aAddressBT.SetHelpId(""/*HID_FLDEDT_ADDRESS*/); + aAddressBT.SetHelpId(HID_FLDEDT_ADDRESS); Init(); } @@ -196,21 +195,21 @@ SfxTabPage* SwFldEditDlg::CreatePage(USHORT nGroup) { // TabPage erzeugen SfxTabPage* pTabPage = 0; - USHORT nHelpId = 0; + const char* pHelpId = 0; switch (nGroup) { case GRP_DOC: pTabPage = SwFldDokPage::Create(this, *(SfxItemSet*)0); - nHelpId = HID_EDIT_FLD_DOK; + pHelpId = HID_EDIT_FLD_DOK; break; case GRP_FKT: pTabPage = SwFldFuncPage::Create(this, *(SfxItemSet*)0); - nHelpId = HID_EDIT_FLD_FUNC; + pHelpId = HID_EDIT_FLD_FUNC; break; case GRP_REF: pTabPage = SwFldRefPage::Create(this, *(SfxItemSet*)0); - nHelpId = HID_EDIT_FLD_REF; + pHelpId = HID_EDIT_FLD_REF; break; case GRP_REG: { @@ -234,22 +233,22 @@ SfxTabPage* SwFldEditDlg::CreatePage(USHORT nGroup) // } pSet->Put( SfxUnoAnyItem( SID_DOCINFO, uno::makeAny(xUDProps) ) ); pTabPage = SwFldDokInfPage::Create(this, *pSet); - nHelpId = HID_EDIT_FLD_DOKINF; + pHelpId = HID_EDIT_FLD_DOKINF; break; } case GRP_DB: pTabPage = SwFldDBPage::Create(this, *(SfxItemSet*)0); static_cast(pTabPage)->SetWrtShell(*pSh); - nHelpId = HID_EDIT_FLD_DB; + pHelpId = HID_EDIT_FLD_DB; break; case GRP_VAR: pTabPage = SwFldVarPage::Create(this, *(SfxItemSet*)0); - nHelpId = HID_EDIT_FLD_VAR; + pHelpId = HID_EDIT_FLD_VAR; break; } - // FIXME: HELPID - pTabPage->SetHelpId(""/*nHelpId*/); + + pTabPage->SetHelpId(pHelpId); static_cast(pTabPage)->SetWrtShell(pSh); SetTabPage(pTabPage); diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index ae7df048ac..7aa6cb0ad7 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -84,13 +84,11 @@ SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent) RemoveResetButton(); GetOKButton().SetText(String(SW_RES(STR_FLD_INSERT))); - // FIXME: HELPID - GetOKButton().SetHelpId(""/*HID_FIELD_INSERT*/); + GetOKButton().SetHelpId(HID_FIELD_INSERT); GetOKButton().SetHelpText(aEmptyStr); // Damit generierter Hilfetext verwendet wird GetCancelButton().SetText(String(SW_RES(STR_FLD_CLOSE))); - // FIXME: HELPID - GetCancelButton().SetHelpId(""/*HID_FIELD_CLOSE*/); + GetCancelButton().SetHelpId(HID_FIELD_CLOSE); GetCancelButton().SetHelpText(aEmptyStr); // Damit generierter Hilfetext verwendet wird FreeResource(); diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 7310c882b2..79f727aa08 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -505,8 +505,7 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet) FreeResource(); SetExchangeSupport(); - // FIXME: HELPID - aDefaultVS.SetHelpId(""/*HID_COLUMN_VALUESET*/); + aDefaultVS.SetHelpId(HID_COLUMN_VALUESET); aDefaultVS.SetColCount( 5 ); aDefaultVS.SetStyle( aDefaultVS.GetStyle() | WB_ITEMBORDER diff --git a/sw/source/ui/inc/ribbar.hrc b/sw/source/ui/inc/ribbar.hrc index 892261512a..301acb1ddc 100644 --- a/sw/source/ui/inc/ribbar.hrc +++ b/sw/source/ui/inc/ribbar.hrc @@ -69,10 +69,7 @@ #define MN_CALC_POPUP (RC_RIBBAR_BEGIN + 22) #define MN_NUMNAMES_POPUP (RC_RIBBAR_BEGIN + 23) -#define RID_INSERT_CTRL (RC_RIBBAR_BEGIN + 24) -#define RID_INSERT_OBJ_CTRL (RC_RIBBAR_BEGIN + 25) #define RID_INSERT_FIELD_CTRL (RC_RIBBAR_BEGIN + 26) -#define RID_TBL_OPT_CTRL (RC_RIBBAR_BEGIN + 27) #define RID_BEZIER_WIN (RC_RIBBAR_BEGIN + 28) #define RID_SCROLL_NAVI_TBX (RC_RIBBAR_BEGIN + 29) #define RID_SCROLL_NAVIGATION_WIN (RC_RIBBAR_BEGIN + 30) diff --git a/sw/source/ui/inc/swmn_tmpl.hrc b/sw/source/ui/inc/swmn_tmpl.hrc index ff71288bcc..201a02a8a8 100644 --- a/sw/source/ui/inc/swmn_tmpl.hrc +++ b/sw/source/ui/inc/swmn_tmpl.hrc @@ -57,7 +57,7 @@ MenuItem\ {\ Identifier = FN_FORMAT_PAGE_DLG ; \ - HelpID = FN_FORMAT_PAGE_DLG ; \ + HelpId = CMD_FN_FORMAT_PAGE_DLG ; \ Text [ en-US ] = "Pa~ge..." ; \ }; @@ -74,7 +74,6 @@ MenuItem\ {\ Identifier = MN_FORMAT_STYLE ; \ - HelpID = MN_FORMAT_STYLE ; \ Command = ".uno:StyleMenu" ; \ Text [ en-US ] = "St~yle" ; \ SubMenu = Menu\ @@ -113,13 +112,13 @@ MenuItem\ {\ Identifier = FN_SET_SUPER_SCRIPT ; \ - HelpID = FN_SET_SUPER_SCRIPT ; \ + HelpId = CMD_FN_SET_SUPER_SCRIPT ; \ Text [ en-US ] = "Superscript" ; \ };\ MenuItem\ {\ Identifier = FN_SET_SUB_SCRIPT ; \ - HelpID = FN_SET_SUB_SCRIPT ; \ + HelpId = CMD_FN_SET_SUB_SCRIPT ; \ Text [ en-US ] = "Subscript" ; \ };\ };\ @@ -128,7 +127,6 @@ MenuItem\ {\ Identifier = MN_FORMAT_ALGN ; \ - HelpID = MN_FORMAT_ALGN ; \ Command = ".uno:AlignTextMenu" ; \ Text [ en-US ] = "A~lignment" ; \ RadioCheck = TRUE ; \ @@ -154,7 +152,7 @@ MenuItem\ {\ Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \ - HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; \ + HelpId = CMD_SID_ATTR_PARA_ADJUST_BLOCK ; \ RadioCheck = TRUE ; \ Text [ en-US ] = "Justified" ; \ };\ @@ -164,7 +162,6 @@ MenuItem\ {\ Identifier = MN_FORMAT_LINESPACE ; \ - HelpID = MN_FORMAT_LINESPACE ; \ Command = ".uno:LineSpacingMenu" ; \ Text [ en-US ] = "Line Spacing" ; \ _MenuItemFlags = MIB_RADIOCHECK ; \ @@ -209,21 +206,21 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem \ { \ Identifier = FN_EDIT_FIELD ; \ - HelpID = FN_EDIT_FIELD ; \ + HelpId = CMD_FN_EDIT_FIELD ; \ Text [ en-US ] = "Fields..." ; \ }; #define _MN_EDIT_FOOTNOTE \ MenuItem \ { \ Identifier = FN_EDIT_FOOTNOTE ; \ - HelpID = FN_EDIT_FOOTNOTE ; \ + HelpId = CMD_FN_EDIT_FOOTNOTE ; \ Text [ en-US ] = "Footnote/Endnote~..." ; \ }; #define _MN_EDIT_IDX_ENTRY_DLG \ MenuItem \ { \ Identifier = FN_EDIT_IDX_ENTRY_DLG ; \ - HelpID = FN_EDIT_IDX_ENTRY_DLG ; \ + HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG ; \ Text [ en-US ] = "Inde~x Entry..." ; \ }; @@ -231,13 +228,13 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem \ { \ Identifier = FN_REDLINE_ACCEPT_DIRECT; \ - HelpID = FN_REDLINE_ACCEPT_DIRECT ; \ + HelpId = CMD_FN_REDLINE_ACCEPT_DIRECT ; \ Text [ en-US ] = "Accept Change" ; \ };\ MenuItem \ { \ Identifier = FN_REDLINE_REJECT_DIRECT ; \ - HelpID = FN_REDLINE_REJECT_DIRECT ; \ + HelpId = CMD_FN_REDLINE_REJECT_DIRECT ; \ Text [ en-US ] = "Reject Change" ; \ }; \ SEPARATOR ; @@ -245,7 +242,7 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem \ { \ Identifier = FN_EDIT_AUTH_ENTRY_DLG ; \ - HelpID = FN_EDIT_AUTH_ENTRY_DLG ; \ + HelpId = CMD_FN_EDIT_AUTH_ENTRY_DLG ; \ Text [ en-US ] = "~Bibliography Entry..."; \ }; \ SEPARATOR ; @@ -258,19 +255,19 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem \ { \ Identifier = FN_EDIT_HYPERLINK ; \ - HelpID = FN_EDIT_HYPERLINK ; \ + HelpId = CMD_FN_EDIT_HYPERLINK ; \ Text [ en-US ] = "Edit Hyperlink..."; \ }; \ MenuItem \ { \ Identifier = FN_COPY_HYPERLINK_LOCATION; \ - HelpID = FN_COPY_HYPERLINK_LOCATION; \ + HelpId = CMD_FN_COPY_HYPERLINK_LOCATION; \ Text [ en-US ] = "Copy Hyperlink ~Location"; \ }; \ MenuItem \ { \ Identifier = FN_REMOVE_HYPERLINK ; \ - HelpID = FN_REMOVE_HYPERLINK ; \ + HelpId = CMD_FN_REMOVE_HYPERLINK ; \ Text [ en-US ] = "Remo~ve Hyperlink"; \ }; @@ -284,7 +281,7 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem\ {\ Identifier = FN_EDIT_HYPERLINK ; \ - HelpID = FN_EDIT_HYPERLINK ; \ + HelpId = CMD_FN_EDIT_HYPERLINK ; \ Text [ en-US ] = "~Edit Hyperlink" ; \ }; @@ -307,7 +304,7 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem\ {\ Identifier = FN_FORMAT_RESET ; \ - HelpID = FN_FORMAT_RESET ; \ + HelpId = CMD_FN_FORMAT_RESET ; \ Text [ en-US ] = "~Default Formatting" ; \ }; @@ -316,25 +313,25 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem \ { \ Identifier = FN_NUMBER_NEWSTART; \ - HelpId = FN_NUMBER_NEWSTART; \ + HelpId = CMD_FN_NUMBER_NEWSTART; \ Text[ en-US ] = "Restart Numbering"; \ }; \ MenuItem \ { \ Identifier = FN_NUM_CONTINUE; \ - HelpId = FN_NUM_CONTINUE; \ + HelpId = CMD_FN_NUM_CONTINUE; \ Text[ en-US ] = "Continue previous numbering"; \ }; \ MenuItem \ { \ Identifier = FN_NUM_BULLET_UP; \ - HelpId = FN_NUM_BULLET_UP; \ + HelpId = CMD_FN_NUM_BULLET_UP; \ Text[ en-US ] = "Up One Level"; \ }; \ MenuItem \ { \ Identifier = FN_NUM_BULLET_DOWN; \ - HelpId = FN_NUM_BULLET_DOWN; \ + HelpId = CMD_FN_NUM_BULLET_DOWN; \ Text[ en-US ] = "Down One Level"; \ }; @@ -357,19 +354,19 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem \ { \ Identifier = FN_UPDATE_CUR_TOX ; \ - HelpID = FN_UPDATE_CUR_TOX ; \ + HelpId = CMD_FN_UPDATE_CUR_TOX ; \ Text [ en-US ] = "~Update Index/Table"; \ }; \ MenuItem \ { \ Identifier = FN_EDIT_CURRENT_TOX; \ - HelpID = FN_EDIT_CURRENT_TOX; \ + HelpId = CMD_FN_EDIT_CURRENT_TOX; \ Text [ en-US ] = "~Edit Index/Table"; \ }; \ MenuItem \ { \ Identifier = FN_REMOVE_CUR_TOX; \ - HelpID = FN_REMOVE_CUR_TOX; \ + HelpId = CMD_FN_REMOVE_CUR_TOX; \ Text [ en-US ] = "Delete Index/Table"; \ }; \ SEPARATOR ; diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 46f06f3930..5d9a390600 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1036,8 +1036,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS aFromObjCLB.InsertEntry(rNames.GetString(i)); aFromObjCLB.SetEntryData( i, (void*)rNames.GetValue(i) ); } - // FIXME: HELPID - aFromObjCLB.SetHelpId(""/*HID_OLE_CHECKLB*/); + aFromObjCLB.SetHelpId(HID_OLE_CHECKLB); SetExchangeSupport(); aTypeLB.SetSelectHdl(LINK(this, SwTOXSelectTabPage, TOXTypeHdl)); @@ -1792,8 +1791,7 @@ public: bNextControl(sal_False), m_pParent( pTokenWin ) { - // FIXME: HELPID - SetHelpId( ""/*HID_TOX_ENTRY_EDIT*/ ); + SetHelpId( HID_TOX_ENTRY_EDIT ); } virtual void KeyInput( const KeyEvent& rKEvt ); @@ -1878,8 +1876,7 @@ public: bNextControl(sal_False), m_pParent(pTokenWin) { - // FIXME: HELPID - SetHelpId(""/*HID_TOX_ENTRY_BUTTON*/); + SetHelpId(HID_TOX_ENTRY_BUTTON); } virtual void KeyInput( const KeyEvent& rKEvt ); @@ -2131,8 +2128,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet aLevelLB.SetSpaceBetweenEntries(0); aLevelLB.SetSelectionMode( SINGLE_SELECTION ); aLevelLB.SetHighlightRange(); // select full width - // FIXME: HELPID - aLevelLB.SetHelpId(""/*HID_INSERT_INDEX_ENTRY_LEVEL_LB*/); + aLevelLB.SetHelpId(HID_INSERT_INDEX_ENTRY_LEVEL_LB); aLevelLB.Show(); aLastTOXType.eType = (TOXTypes)USHRT_MAX; @@ -3098,8 +3094,7 @@ SwTokenWindow::SwTokenWindow(SwTOXEntryTabPage* pParent, const ResId& rResId) : m_pParent(pParent) { SetStyle(GetStyle()|WB_TABSTOP|WB_DIALOGCONTROL); - // FIXME: HELPID - SetHelpId(""/*HID_TOKEN_WINDOW*/); + SetHelpId(HID_TOKEN_WINDOW); for(sal_uInt16 i = 0; i < TOKEN_END; i++) { sal_uInt16 nTextId = STR_BUTTON_TEXT_START + i; diff --git a/sw/source/ui/index/idxmrk.src b/sw/source/ui/index/idxmrk.src index 6a4ce1934d..bafa022fe1 100644 --- a/sw/source/ui/index/idxmrk.src +++ b/sw/source/ui/index/idxmrk.src @@ -275,7 +275,7 @@ ModalDialog DLG_EDIT_IDXMARK Moveable = TRUE ; Closeable = TRUE; Sizeable = FALSE ; - HelpID = FN_EDIT_IDX_ENTRY_DLG; + HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG; SVLook = TRUE ; #define IDX_WIN_WIDTH IDX_WIN_WIDTH_NORMAL Size = MAP_APPFONT ( IDX_WIN_WIDTH , 118 ) ; @@ -294,7 +294,7 @@ ModalDialog DLG_EDIT_IDXMARK_CJK Moveable = TRUE ; Closeable = TRUE; Sizeable = FALSE ; - HelpID = FN_EDIT_IDX_ENTRY_DLG; + HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG; SVLook = TRUE ; #define IDX_WIN_WIDTH IDX_WIN_WIDTH_CJK Size = MAP_APPFONT ( IDX_WIN_WIDTH , 118 ) ; @@ -315,7 +315,7 @@ ModelessDialog DLG_INSIDXMARK Sizeable = FALSE ; Hide = TRUE ; // Zoomable = TRUE ; - HelpID = FN_INSERT_IDX_ENTRY_DLG; + HelpId = CMD_FN_INSERT_IDX_ENTRY_DLG; SVLook = TRUE ; #define IDX_WIN_WIDTH IDX_WIN_WIDTH_NORMAL Size = MAP_APPFONT ( IDX_WIN_WIDTH , 138) ; @@ -336,7 +336,7 @@ ModelessDialog DLG_INSIDXMARK_CJK Closeable = TRUE; Sizeable = FALSE ; // Zoomable = TRUE ; - HelpID = FN_INSERT_IDX_ENTRY_DLG; + HelpId = CMD_FN_INSERT_IDX_ENTRY_DLG; SVLook = TRUE ; #define IDX_WIN_WIDTH IDX_WIN_WIDTH_CJK Size = MAP_APPFONT ( IDX_WIN_WIDTH , 138) ; @@ -523,7 +523,7 @@ ModalDialog DLG_EDIT_AUTHMARK Moveable = TRUE ; Closeable = TRUE ; Sizeable = FALSE ; - HelpID = FN_EDIT_AUTH_ENTRY_DLG; + HelpId = CMD_FN_EDIT_AUTH_ENTRY_DLG; SVLook = TRUE ; Size = MAP_APPFONT ( 218 , 118 ) ; #define RADIO_BUTTON_HEIGHT 0 @@ -536,7 +536,7 @@ ModelessDialog DLG_INSAUTHMARK Closeable = TRUE ; Sizeable = FALSE ; // Zoomable = TRUE ; - HelpID = FN_INSERT_AUTH_ENTRY_DLG; + HelpId = CMD_FN_INSERT_AUTH_ENTRY_DLG; SVLook = TRUE ; #define RADIO_BUTTON_HEIGHT 30 Size = MAP_APPFONT ( 218 , 118 + RADIO_BUTTON_HEIGHT) ; diff --git a/sw/source/ui/index/multmrk.src b/sw/source/ui/index/multmrk.src index 83db407d1a..358dcba124 100644 --- a/sw/source/ui/index/multmrk.src +++ b/sw/source/ui/index/multmrk.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_MULTMRK { - HelpID = FN_EDIT_IDX_ENTRY_DLG ; + HelpID = CMD_FN_EDIT_IDX_ENTRY_DLG ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 220 , 95 ) ; diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 6ac18e7e01..5253673c72 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -179,47 +179,27 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent, SetStyle(GetStyle()|WB_DIALOGCONTROL); FreeResource(); - // FIXME: HELPID - aOKBT .SetHelpId(""/*HID_INSERT_IDX_MRK_OK*/ ); - // FIXME: HELPID - aCancelBT .SetHelpId(""/*HID_INSERT_IDX_MRK_CLOSE*/ ); - // FIXME: HELPID - aDelBT .SetHelpId(""/*HID_INSERT_IDX_MRK_DELETE*/ ); - // FIXME: HELPID - aNewBT .SetHelpId(""/*HID_INSERT_IDX_MRK_NEW*/ ); - // FIXME: HELPID - aPrevBT .SetHelpId(""/*HID_INSERT_IDX_MRK_PREV*/ ); - // FIXME: HELPID - aPrevSameBT .SetHelpId(""/*HID_INSERT_IDX_MRK_PREV_SAME*/ ); - // FIXME: HELPID - aNextBT .SetHelpId(""/*HID_INSERT_IDX_MRK_NEXT*/ ); - // FIXME: HELPID - aNextSameBT .SetHelpId(""/*HID_INSERT_IDX_MRK_NEXT_SAME*/ ); - // FIXME: HELPID - aTypeDCB .SetHelpId(""/*HID_INSERT_IDX_MRK_TYPE*/ ); - // FIXME: HELPID - aEntryED .SetHelpId(""/*HID_INSERT_IDX_MRK_ENTRY*/ ); - // FIXME: HELPID - aKeyDCB .SetHelpId(""/*HID_INSERT_IDX_MRK_PRIM_KEY*/ ); - // FIXME: HELPID - aKey2DCB .SetHelpId(""/*HID_INSERT_IDX_MRK_SEC_KEY*/ ); - // FIXME: HELPID - aLevelED .SetHelpId(""/*HID_INSERT_IDX_MRK_LEVEL*/ ); - // FIXME: HELPID - aMainEntryCB .SetHelpId(""/*HID_INSERT_IDX_MRK_MAIN_ENTRY*/); - // FIXME: HELPID - aApplyToAllCB .SetHelpId(""/*HID_INSERT_IDX_MRK_APPLY_ALL*/ ); - // FIXME: HELPID - aPhoneticED0 .SetHelpId(""/*HID_INSERT_IDX_MRK_PHONETIC_READING*/ ); - // FIXME: HELPID - aPhoneticED1 .SetHelpId(""/*HID_INSERT_IDX_MRK_PHONETIC_READING*/ ); - // FIXME: HELPID - aPhoneticED2 .SetHelpId(""/*HID_INSERT_IDX_MRK_PHONETIC_READING*/ ); - - // FIXME: HELPID - aSearchCaseSensitiveCB.SetHelpId( ""/*HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE*/ ); - // FIXME: HELPID - aSearchCaseWordOnlyCB.SetHelpId( ""/*HID_INSERT_IDX_MRK_SRCH_WORDONLY*/ ); + aOKBT .SetHelpId(HID_INSERT_IDX_MRK_OK ); + aCancelBT .SetHelpId(HID_INSERT_IDX_MRK_CLOSE ); + aDelBT .SetHelpId(HID_INSERT_IDX_MRK_DELETE ); + aNewBT .SetHelpId(HID_INSERT_IDX_MRK_NEW ); + aPrevBT .SetHelpId(HID_INSERT_IDX_MRK_PREV ); + aPrevSameBT .SetHelpId(HID_INSERT_IDX_MRK_PREV_SAME ); + aNextBT .SetHelpId(HID_INSERT_IDX_MRK_NEXT ); + aNextSameBT .SetHelpId(HID_INSERT_IDX_MRK_NEXT_SAME ); + aTypeDCB .SetHelpId(HID_INSERT_IDX_MRK_TYPE ); + aEntryED .SetHelpId(HID_INSERT_IDX_MRK_ENTRY ); + aKeyDCB .SetHelpId(HID_INSERT_IDX_MRK_PRIM_KEY ); + aKey2DCB .SetHelpId(HID_INSERT_IDX_MRK_SEC_KEY ); + aLevelED .SetHelpId(HID_INSERT_IDX_MRK_LEVEL ); + aMainEntryCB .SetHelpId(HID_INSERT_IDX_MRK_MAIN_ENTRY); + aApplyToAllCB .SetHelpId(HID_INSERT_IDX_MRK_APPLY_ALL ); + aPhoneticED0 .SetHelpId(HID_INSERT_IDX_MRK_PHONETIC_READING ); + aPhoneticED1 .SetHelpId(HID_INSERT_IDX_MRK_PHONETIC_READING ); + aPhoneticED2 .SetHelpId(HID_INSERT_IDX_MRK_PHONETIC_READING ); + + aSearchCaseSensitiveCB.SetHelpId( HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE ); + aSearchCaseWordOnlyCB.SetHelpId( HID_INSERT_IDX_MRK_SRCH_WORDONLY ); GetParent()->SetText( SW_RESSTR( bNewMark ? STR_IDXMRK_INSERT : STR_IDXMRK_EDIT)); @@ -1224,8 +1204,9 @@ public: struct TextInfo { sal_uInt16 nToxField; - sal_uInt16 nHelpId; + const char* pHelpId; }; + static const TextInfo aTextInfoArr[] = { {AUTH_FIELD_IDENTIFIER, HID_AUTH_FIELD_IDENTIFIER }, @@ -1295,30 +1276,21 @@ SwAuthMarkDlg::SwAuthMarkDlg( Window *pParent, SetStyle(GetStyle()|WB_DIALOGCONTROL); FreeResource(); - // FIXME: HELPID - aFromComponentRB.SetHelpId(""/*HID_AUTH_MARK_DLG_FROM_COMP_RB*/); - // FIXME: HELPID - aFromDocContentRB.SetHelpId(""/*HID_AUTH_MARK_DLG_FROM_DOC_RB*/ ); - // FIXME: HELPID - aEntryED.SetHelpId(""/*HID_AUTH_MARK_DLG_ID_LISTBOX*/ ); - // FIXME: HELPID - aEntryLB.SetHelpId(""/*HID_AUTH_MARK_DLG_ID_LISTBOX*/ ); + aFromComponentRB.SetHelpId(HID_AUTH_MARK_DLG_FROM_COMP_RB); + aFromDocContentRB.SetHelpId(HID_AUTH_MARK_DLG_FROM_DOC_RB ); + aEntryED.SetHelpId(HID_AUTH_MARK_DLG_ID_LISTBOX ); + aEntryLB.SetHelpId(HID_AUTH_MARK_DLG_ID_LISTBOX ); aFromComponentRB.Show(bNewEntry); aFromDocContentRB.Show(bNewEntry); aFromComponentRB.Check(bIsFromComponent); aFromDocContentRB.Check(!bIsFromComponent); - // FIXME: HELPID - aOKBT .SetHelpId(""/*HID_INSERT_AUTH_MRK_OK*/ ); - // FIXME: HELPID - aCancelBT .SetHelpId(""/*HID_INSERT_AUTH_MRK_CLOSE*/); - // FIXME: HELPID - aEntryED .SetHelpId(""/*HID_INSERT_AUTH_MRK_ENTRY*/ ); - // FIXME: HELPID - aCreateEntryPB .SetHelpId(""/*HID_INSERT_AUTH_MRK_CREATE_ENTRY*/ ); - // FIXME: HELPID - aEditEntryPB .SetHelpId(""/*HID_INSERT_AUTH_MRK_EDIT_ENTRY*/ ); + aOKBT .SetHelpId(HID_INSERT_AUTH_MRK_OK ); + aCancelBT .SetHelpId(HID_INSERT_AUTH_MRK_CLOSE); + aEntryED .SetHelpId(HID_INSERT_AUTH_MRK_ENTRY ); + aCreateEntryPB .SetHelpId(HID_INSERT_AUTH_MRK_CREATE_ENTRY ); + aEditEntryPB .SetHelpId(HID_INSERT_AUTH_MRK_EDIT_ENTRY ); aOKBT.SetClickHdl(LINK(this,SwAuthMarkDlg, InsertHdl)); aCancelBT.SetClickHdl(LINK(this,SwAuthMarkDlg, CloseHdl)); @@ -1770,8 +1742,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pTypeListBox->SetPosPixel(bLeft ? aTR1 : aTR2); pTypeListBox->Show(); pTypeListBox->SetSelectHdl(LINK(this, SwCreateAuthEntryDlg_Impl, EnableHdl)); - // FIXME: HELPID - pTypeListBox->SetHelpId(""/*aCurInfo.nHelpId*/); + pTypeListBox->SetHelpId(aCurInfo.pHelpId); } else if(AUTH_FIELD_IDENTIFIER == aCurInfo.nToxField && !m_bNewEntryMode) @@ -1799,8 +1770,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pIdentifierBox->SetSizePixel(aTmp); pIdentifierBox->SetPosPixel(bLeft ? aTR1 : aTR2); pIdentifierBox->Show(); - // FIXME: HELPID - pIdentifierBox->SetHelpId(""/*aCurInfo.nHelpId*/); + pIdentifierBox->SetHelpId(aCurInfo.pHelpId); } else { @@ -1811,8 +1781,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pEdits[nIndex]->SetPosPixel(bLeft ? aTR1 : aTR2); pEdits[nIndex]->SetText(pFields[aCurInfo.nToxField]); pEdits[nIndex]->Show(); - // FIXME: HELPID - pEdits[nIndex]->SetHelpId(""/*aCurInfo.nHelpId*/); + pEdits[nIndex]->SetHelpId(aCurInfo.pHelpId); if(AUTH_FIELD_IDENTIFIER == aCurInfo.nToxField) { pEdits[nIndex]->SetModifyHdl(LINK(this, SwCreateAuthEntryDlg_Impl, ShortNameHdl)); diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 413d018900..02a342e02f 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -447,15 +447,13 @@ bGrammarResults(false) { const String aEntry = aSuggestions[ i ]; InsertItem( nPos, aEntry, 0, i ); - // FIXME: HELPID - SetHelpId( nPos, ""/*HID_LINGU_REPLACE*/); + SetHelpId( nPos, HID_LINGU_REPLACE); if (aSuggestionImageUrl.getLength() > 0) SetItemImage( nPos, aImage ); pMenu->InsertItem( nId, aEntry ); - // FIXME: HELPID - pMenu->SetHelpId( nPos, ""/*HID_LINGU_AUTOCORR*/); + pMenu->SetHelpId( nPos, HID_LINGU_AUTOCORR); } } @@ -464,8 +462,7 @@ bGrammarResults(false) SetItemText( MN_SPELLING, aSpellingAndGrammar ); USHORT nItemPos = GetItemPos( MN_IGNORE ); InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos ); - // FIXME: HELPID - SetHelpId( MN_IGNORE_SELECTION, ""/*HID_LINGU_IGNORE_SELECTION*/); + SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION); EnableItem( MN_AUTOCORR, bEnable ); @@ -635,8 +632,7 @@ aInfo16( SW_RES(IMG_INFO_16) ) { const String aEntry = aSuggestions[ i ]; InsertItem( nItemId, aEntry, 0, nPos++ ); - // FIXME: HELPID - SetHelpId( nItemId, ""/*HID_LINGU_REPLACE*/ ); + SetHelpId( nItemId, HID_LINGU_REPLACE ); if (aSuggestionImageUrl.getLength() > 0) SetItemImage( nItemId, aImage ); @@ -651,8 +647,7 @@ aInfo16( SW_RES(IMG_INFO_16) ) SetItemText( MN_SPELLING, aSpellingAndGrammar ); USHORT nItemPos = GetItemPos( MN_IGNORE ); InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos ); - // FIXME: HELPID - SetHelpId( MN_IGNORE_SELECTION, ""/*HID_LINGU_IGNORE_SELECTION*/); + SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION); EnableItem( MN_AUTOCORR, false ); diff --git a/sw/source/ui/misc/bookmark.src b/sw/source/ui/misc/bookmark.src index 9ca4254eb6..3cbef13472 100644 --- a/sw/source/ui/misc/bookmark.src +++ b/sw/source/ui/misc/bookmark.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_INSERT_BOOKMARK { - HelpID = FN_INSERT_BOOKMARK ; + HelpID = CMD_FN_INSERT_BOOKMARK ; OUTPUTSIZE = TRUE ; Size = MAP_APPFONT ( 179 , 96 ) ; /* ### ACHTUNG: Neuer Text in Resource? Textmarke einfügen : Textmarke einf³gen */ diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 89160943c3..5374ddd2e2 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -105,8 +105,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, 0, 160 }; - // FIXME: HELPID - aGroupTLB.SetHelpId(""/*HID_GLOS_GROUP_TREE*/); + aGroupTLB.SetHelpId(HID_GLOS_GROUP_TREE); aGroupTLB.SetTabs( &nTabs[0], MAP_APPFONT ); aGroupTLB.SetWindowBits(WB_HSCROLL|WB_CLIPCHILDREN|WB_SORT); aGroupTLB.SetSelectHdl(LINK(this, SwGlossaryGroupDlg, SelectHdl)); diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 142f9a16bc..faec81b639 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -293,8 +293,7 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame, if( bIsDocReadOnly ) aInsertBtn.Enable(sal_False); aNameED.GrabFocus(); - // FIXME: HELPID - aCategoryBox.SetHelpId(""/*HID_MD_GLOS_CATEGORY*/); + aCategoryBox.SetHelpId(HID_MD_GLOS_CATEGORY); aCategoryBox.SetWindowBits(WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL|WB_VSCROLL|WB_CLIPCHILDREN|WB_SORT); aCategoryBox.GetModel()->SetSortMode(SortAscending); aCategoryBox.SetHighlightRange(); // ueber volle Breite selektieren diff --git a/sw/source/ui/misc/glossary.src b/sw/source/ui/misc/glossary.src index 12d6ab9e81..3ff9050164 100644 --- a/sw/source/ui/misc/glossary.src +++ b/sw/source/ui/misc/glossary.src @@ -32,7 +32,7 @@ // #define DLG_GLOSSARY 256 ModalDialog DLG_GLOSSARY { - HelpID = FN_GLOSSARY_DLG ; + HelpID = CMD_FN_GLOSSARY_DLG ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 375 , 164 ) ; diff --git a/sw/source/ui/misc/insrule.cxx b/sw/source/ui/misc/insrule.cxx index 29acacd9dc..c508f83dd2 100644 --- a/sw/source/ui/misc/insrule.cxx +++ b/sw/source/ui/misc/insrule.cxx @@ -77,8 +77,7 @@ SwInsertGrfRulerDlg::SwInsertGrfRulerDlg( Window* pParent ) : // Grafiknamen ermitteln GalleryExplorer::BeginLocking(GALLERY_THEME_RULERS); GalleryExplorer::FillObjList( GALLERY_THEME_RULERS, aGrfNames ); - // FIXME: HELPID - pExampleVS->SetHelpId(""/*HID_VS_RULER*/); + pExampleVS->SetHelpId(HID_VS_RULER); Color aColor(COL_WHITE); pExampleVS->InsertItem( 1, 1); pExampleVS->SetItemText( 1, sSimple); diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index b5e6adf248..2e9e318c76 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -1064,8 +1064,7 @@ SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(Window* pParent, { FreeResource(); GetUserButton()->SetText(sRemoveText); - // FIXME: HELPID - GetUserButton()->SetHelpId(""/*HID_NUM_RESET*/); + GetUserButton()->SetHelpId(HID_NUM_RESET); GetUserButton()->SetClickHdl(LINK(this, SwSvxNumBulletTabDialog, RemoveNumberingHdl)); if(!rWrtSh.GetCurNumRule()) GetUserButton()->Enable(FALSE); diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index e0116a8daf..d0bc7b5b38 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -239,8 +239,7 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent, // <-- PushButton* pUserButton = GetUserButton(); pUserButton->SetText(SW_RES(ST_FORM)); - // FIXME: HELPID - pUserButton->SetHelpId(""/*HID_OUTLINE_FORM*/); + pUserButton->SetHelpId(HID_OUTLINE_FORM); pUserButton->SetClickHdl(LINK(this, SwOutlineTabDialog, FormHdl)); FreeResource(); diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx index ac732491c9..e2b7e6a151 100644 --- a/sw/source/ui/misc/redlndlg.cxx +++ b/sw/source/ui/misc/redlndlg.cxx @@ -244,8 +244,7 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) : bRedlnAutoFmt (bAutoFmt), bInhibitActivate( false ) { - // FIXME: HELPID - aTabPagesCTRL.SetHelpId(""/*HID_REDLINE_CTRL*/); + aTabPagesCTRL.SetHelpId(HID_REDLINE_CTRL); pTPView = aTabPagesCTRL.GetViewPage(); pTable = pTPView->GetTableControl(); diff --git a/sw/source/ui/misc/srtdlg.src b/sw/source/ui/misc/srtdlg.src index 8a1eb3a3ee..6e6b3c5d34 100644 --- a/sw/source/ui/misc/srtdlg.src +++ b/sw/source/ui/misc/srtdlg.src @@ -32,7 +32,7 @@ ModalDialog DLG_SORTING { - HelpID = FN_SORTING_DLG ; + HelpID = CMD_FN_SORTING_DLG ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 268 , 193 ) ; diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx index 826c58373e..174634af48 100644 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -90,8 +90,7 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) InsertSeparator ( 1 ); InsertSeparator (); InsertWindow( ED_FORMULA, &aEdit); - // FIXME: HELPID - SetHelpId(ED_FORMULA, ""/*HID_EDIT_FORMULA*/); + SetHelpId(ED_FORMULA, HID_EDIT_FORMULA); BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); SetItemImage( FN_FORMULA_CALC, pManager->GetImage(FN_FORMULA_CALC, bHC )); diff --git a/sw/source/ui/ribbar/inputwin.src b/sw/source/ui/ribbar/inputwin.src index e8f8fa58f5..24ae9a48bc 100644 --- a/sw/source/ui/ribbar/inputwin.src +++ b/sw/source/ui/ribbar/inputwin.src @@ -44,7 +44,7 @@ ToolBox RID_TBX_FORMULA ToolBoxItem { Identifier = FN_FORMULA_CALC ; - HelpID = FN_FORMULA_CALC ; + HelpId = HID_TBX_FORMULA_CALC ; DropDown = TRUE ; Text [ en-US ] = "Formula" ; /* ### ACHTUNG: Neuer Text in Resource? Formel auswählen : Formel auswõhlen */ @@ -52,14 +52,14 @@ ToolBox RID_TBX_FORMULA ToolBoxItem { Identifier = FN_FORMULA_CANCEL ; - HelpID = FN_FORMULA_CANCEL ; + HelpId = HID_TBX_FORMULA_CANCEL ; Text [ en-US ] = "Cancel" ; /* ### ACHTUNG: Neuer Text in Resource? Formel nicht übenehmen : Formel nicht ³benehmen */ }; ToolBoxItem { Identifier = FN_FORMULA_APPLY ; - HelpID = FN_FORMULA_APPLY ; + HelpId = HID_TBX_FORMULA_APPLY ; /* ### ACHTUNG: Neuer Text in Resource? Übernehmen : šbernehmen */ Text [ en-US ] = "Apply" ; /* ### ACHTUNG: Neuer Text in Resource? Formel einfügen : Formel einf³gen */ @@ -287,21 +287,21 @@ String STR_TBL_FORMULA ToolBoxItem\ {\ Identifier = FN_FORMULA_CALC ; \ - HelpID = FN_FORMULA_CALC ; \ + HelpID = HID_TBX_FORMULA_CALC ; \ Text [ en-US ] = "Formula" ; \ /* ### ACHTUNG: Neuer Text in Resource? Formel auswählen : Formel auswõhlen */\ };\ ToolBoxItem\ {\ Identifier = FN_FORMULA_CANCEL ; \ - HelpID = FN_FORMULA_CANCEL ; \ + HelpId = HID_TBX_FORMULA_CANCEL ; \ Text [ en-US ] = "Cancel" ; \ /* ### ACHTUNG: Neuer Text in Resource? Formel nicht übenehmen : Formel nicht ³benehmen */\ };\ ToolBoxItem\ {\ Identifier = FN_FORMULA_APPLY ; \ - HelpID = FN_FORMULA_APPLY ; \ + HelpID = HID_TBX_FORMULA_APPLY ; \ /* ### ACHTUNG: Neuer Text in Resource? Übernehmen : šbernehmen */\ Text [ en-US ] = "Apply" ; \ /* ### ACHTUNG: Neuer Text in Resource? Formel einfügen : Formel einf³gen */\ diff --git a/sw/source/ui/ribbar/makefile.mk b/sw/source/ui/ribbar/makefile.mk index 72acc79307..3a9edfee23 100644 --- a/sw/source/ui/ribbar/makefile.mk +++ b/sw/source/ui/ribbar/makefile.mk @@ -42,7 +42,6 @@ SRS1NAME=$(TARGET) SRC1FILES = \ tbxanchr.src \ inputwin.src \ - tblctrl.src \ workctrl.src SLOFILES = \ diff --git a/sw/source/ui/ribbar/tblctrl.src b/sw/source/ui/ribbar/tblctrl.src deleted file mode 100644 index afc5949983..0000000000 --- a/sw/source/ui/ribbar/tblctrl.src +++ /dev/null @@ -1,94 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "tblctrl.hrc" -#include "helpid.h" -#include "cmdid.h" -FloatingWindow RID_TBL_OPT_CTRL -{ - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - HelpID = HID_TBL_OPT_CTRL ; - ToolBox TBX_OPTIMIZE_TABLE - { - MenuStrings = TRUE ; - SVLook = TRUE ; - HelpID = 1 ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_TABLE_BALANCE_CELLS ; - HelpID = FN_TABLE_BALANCE_CELLS ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_BALANCE_ROWS ; - HelpID = FN_TABLE_BALANCE_ROWS ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_OPTIMAL_HEIGHT ; - HelpID = FN_TABLE_OPTIMAL_HEIGHT ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_ADJUST_CELLS ; - HelpID = FN_TABLE_ADJUST_CELLS ; - }; - }; - }; - Text [ en-US ] = "Optimize" ; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx index 274be3fd1b..313265e853 100644 --- a/sw/source/ui/ribbar/workctrl.cxx +++ b/sw/source/ui/ribbar/workctrl.cxx @@ -454,7 +454,7 @@ static USHORT __READONLY_DATA aNavigationInsertIds[ NAVI_ENTRIES ] = NID_TABLE_FORMULA_ERROR, NID_NEXT }; -static USHORT __READONLY_DATA aNavigationHelpIds[ NAVI_ENTRIES ] = +static const char* __READONLY_DATA aNavigationHelpIds[ NAVI_ENTRIES ] = { // -- first line HID_NID_TBL, @@ -492,8 +492,7 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr { USHORT i; - // FIXME: HELPID - aToolBox.SetHelpId(""/*HID_NAVI_VS*/); + aToolBox.SetHelpId(HID_NAVI_VS); aToolBox.SetLineCount( 2 ); aToolBox.SetOutStyle(TOOLBOX_STYLE_FLAT); for( i = 0; i < NID_COUNT; i++) @@ -509,8 +508,7 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr nTbxBits = TIB_CHECKABLE; } aToolBox.InsertItem(nNaviId, sText, nTbxBits); - // FIXME: HELPID - aToolBox.SetHelpId( nNaviId, ""/*aNavigationHelpIds[i]*/ ); + aToolBox.SetHelpId( nNaviId, aNavigationHelpIds[i] ); } ApplyImageList(); aToolBox.InsertBreak(NID_COUNT/2); diff --git a/sw/source/ui/ribbar/workctrl.src b/sw/source/ui/ribbar/workctrl.src index c50da95313..3cb93cb585 100644 --- a/sw/source/ui/ribbar/workctrl.src +++ b/sw/source/ui/ribbar/workctrl.src @@ -32,138 +32,9 @@ #include #endif #include "workctrl.hrc" -#include "workctrl.hrc" #include "helpid.h" #include "cmdid.h" -FloatingWindow RID_INSERT_CTRL -{ - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - HelpID = HID_INSERT_CTRL ; - /* ### ACHTUNG: Neuer Text in Resource? Einfügen : Einf³gen */ - ToolBox TBX_INSERT - { - MenuStrings = TRUE ; - SVLook = TRUE ; - HelpID = 1 ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_INSERT_FRAME_INTERACT_NOCOL ; - HelpID = FN_INSERT_FRAME_INTERACT_NOCOL ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_FRAME_INTERACT ; - HelpID = FN_INSERT_FRAME_INTERACT ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_INSERT_GRAPHIC ; - HelpID = SID_INSERT_GRAPHIC ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_TABLE ; - HelpID = FN_INSERT_TABLE ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_INSERTDOC ; - HelpID = SID_INSERTDOC ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_FOOTNOTE ; - HelpID = FN_INSERT_FOOTNOTE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_ENDNOTE ; - HelpID = FN_INSERT_ENDNOTE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_SYMBOL ; - HelpID = FN_INSERT_SYMBOL ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_REGION ; - HelpID = FN_INSERT_REGION; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_IDX_ENTRY_DLG ; - HelpID = FN_INSERT_IDX_ENTRY_DLG ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_BOOKMARK ; - HelpID = FN_INSERT_BOOKMARK ; - RadioCheck = TRUE ; - }; - }; - }; - Text [ en-US ] = "Insert" ; -}; -FloatingWindow RID_INSERT_OBJ_CTRL -{ - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - HelpID = HID_INSERT_OBJ_CTRL ; - /* ### ACHTUNG: Neuer Text in Resource? Objekt einfügen : Objekt einf³gen */ - ToolBox TBX_OBJ_INSERT - { - MenuStrings = TRUE ; - SVLook = TRUE ; - HelpID = 1 ; - ItemList = - { - ToolBoxItem - { - Identifier = SID_INSERT_DIAGRAM ; - HelpID = SID_INSERT_DIAGRAM ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_SMA ; - HelpID = FN_INSERT_SMA ; - }; - ToolBoxItem - { - Identifier = SID_INSERT_FLOATINGFRAME ; - HelpID = SID_INSERT_FLOATINGFRAME ; - }; - ToolBoxItem - { - Identifier = SID_INSERT_OBJECT ; - HelpID = SID_INSERT_OBJECT ; - }; - ToolBoxItem - { - Identifier = SID_INSERT_PLUGIN ; - HelpID = SID_INSERT_PLUGIN ; - }; -#ifdef SOLAR_JAVA - ToolBoxItem - { - Identifier = SID_INSERT_APPLET ; - HelpID = SID_INSERT_APPLET ; - }; -#endif - }; - }; - Text [ en-US ] = "Insert Object" ; -}; + Menu RID_INSERT_FIELD_CTRL { ItemList = @@ -171,45 +42,45 @@ Menu RID_INSERT_FIELD_CTRL MenuItem { Identifier = FN_INSERT_FLD_DATE ; - HelpID = FN_INSERT_FLD_DATE ; + HelpId = CMD_FN_INSERT_FLD_DATE ; Text [ en-US ] = "Date" ; }; MenuItem { Identifier = FN_INSERT_FLD_TIME ; - HelpID = FN_INSERT_FLD_TIME ; + HelpId = CMD_FN_INSERT_FLD_TIME ; Text [ en-US ] = "Time" ; }; //#ifndef MN_SW_WEB MenuItem { Identifier = FN_INSERT_FLD_PGNUMBER ; - HelpID = FN_INSERT_FLD_PGNUMBER ; + HelpId = CMD_FN_INSERT_FLD_PGNUMBER ; Text [ en-US ] = "Page Number" ; }; MenuItem { Identifier = FN_INSERT_FLD_PGCOUNT ; - HelpID = FN_INSERT_FLD_PGCOUNT ; + HelpId = CMD_FN_INSERT_FLD_PGCOUNT ; Text [ en-US ] = "Page Count" ; }; MenuItem { Identifier = FN_INSERT_FLD_TOPIC ; - HelpID = FN_INSERT_FLD_TOPIC ; + HelpId = CMD_FN_INSERT_FLD_TOPIC ; Text [ en-US ] = "Subject" ; }; MenuItem { Identifier = FN_INSERT_FLD_TITLE ; - HelpID = FN_INSERT_FLD_TITLE ; + HelpId = CMD_FN_INSERT_FLD_TITLE ; Text [ en-US ] = "Title" ; }; //#endif MenuItem { Identifier = FN_INSERT_FLD_AUTHOR ; - HelpID = FN_INSERT_FLD_AUTHOR ; + HelpId = CMD_FN_INSERT_FLD_AUTHOR ; Text [ en-US ] = "Author" ; }; MenuItem @@ -219,7 +90,7 @@ Menu RID_INSERT_FIELD_CTRL MenuItem { Identifier = FN_INSERT_FIELD ; - HelpID = FN_INSERT_FIELD ; + HelpId = CMD_FN_INSERT_FIELD ; Text [ en-US ] = "Other..." ; }; }; diff --git a/sw/source/ui/shells/shells.src b/sw/source/ui/shells/shells.src index 42b3b0029a..76b4580800 100644 --- a/sw/source/ui/shells/shells.src +++ b/sw/source/ui/shells/shells.src @@ -156,880 +156,46 @@ String RID_TEXT_TOOLBOX Text [ en-US ] = "Text Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_TEXT_TOOLBOX -{ - HelpID = HID_TEXT_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - HideWhenDeactivate = TRUE ; - LineSpacing = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FONT - MN_TEXT1(TRUE) - MN_TEXT1_BLOCK - MN_TEXT_LTR_RTL - MN_TEXT_LINESPACE - MN_TEXT2 - MN_TEXT_BACKGROUND - MN_TEXT_DIALOGS(TRUE) - }; - Scroll = TRUE ; -}; String RID_TABLE_TOOLBOX { Text [ en-US ] = "Table Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_TABLE_TOOLBOX -{ - HelpID = HID_TABLE_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - Scroll = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FONT - ToolBoxItem - { - Identifier = FN_TABLE_AUTOSUM ; - HelpID = FN_TABLE_AUTOSUM ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_MODE_FIX ; - HelpID = FN_TABLE_MODE_FIX ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_MODE_FIX_PROP ; - HelpID = FN_TABLE_MODE_FIX_PROP ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_MODE_VARIABLE ; - HelpID = FN_TABLE_MODE_VARIABLE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_MERGE_CELLS ; - HelpID = FN_TABLE_MERGE_CELLS ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_SPLIT_CELLS ; - HelpID = FN_TABLE_SPLIT_CELLS ; - }; - ToolBoxItem - { - DropDown = TRUE ; - Identifier = FN_OPTIMIZE_TABLE ; - HelpID = FN_OPTIMIZE_TABLE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_INSERT_ROW ; - HelpID = FN_TABLE_INSERT_ROW ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_INSERT_COL ; - HelpID = FN_TABLE_INSERT_COL ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_DELETE_ROW ; - HelpID = FN_TABLE_DELETE_ROW ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_DELETE_COL ; - HelpID = FN_TABLE_DELETE_COL ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_SELECT_ALL; - HelpID = FN_TABLE_SELECT_ALL; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_TABLE_SELECT_COL; - HelpID = FN_TABLE_SELECT_COL; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_TABLE_SELECT_ROW; - HelpID = FN_TABLE_SELECT_ROW; - Hide = TRUE; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_VERT_NONE; - HelpID = FN_TABLE_VERT_NONE; - RadioCheck = TRUE; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_TABLE_VERT_CENTER; - HelpID = FN_TABLE_VERT_CENTER; - RadioCheck = TRUE; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_TABLE_VERT_BOTTOM; - HelpID = FN_TABLE_VERT_BOTTOM; - RadioCheck = TRUE; - Hide = TRUE; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_BORDER - }; - ToolBoxItem - { - ITEM_TOOLBAR_FRAME_LINESTYLE - }; - ToolBoxItem - { - ITEM_TOOLBAR_FRAME_LINECOLOR - Hide = TRUE; - }; - ToolBoxItem - { - ITEM_TOOLBAR_BACKGROUND_COLOR - }; - }; -}; String RID_FRAME_TOOLBOX { Text [ en-US ] = "Frame Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_FRAME_TOOLBOX -{ - HelpID = HID_FRAME_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - MenuStrings = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - Hide = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FRAME_WRAP - MN_FRAME1 - MN_FRAME2 - MN_FRAME3 - MN_LINESTYLE - MN_BACKGROUND_COLOR - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_FRAME - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_FRAME_CHAIN ; - HelpID = FN_FRAME_CHAIN ; - }; - ToolBoxItem - { - Identifier = FN_FRAME_UNCHAIN ; - HelpID = FN_FRAME_UNCHAIN ; - }; - }; - Scroll = TRUE ; -}; String RID_GRAFIK_TOOLBOX { Text [ en-US ] = "Graphics Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_GRAFIK_TOOLBOX -{ - HelpID = HID_GRAFIK_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - MenuStrings = TRUE ; - Customize = TRUE ; - Hide = TRUE ; - ItemList = - { - ToolBoxItem - { - Identifier = SID_GRFFILTER; - HelpID = SID_GRFFILTER; - DropDown = TRUE ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_MODE; - HelpID = SID_ATTR_GRAF_MODE; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_RED; - HelpID = SID_ATTR_GRAF_RED; - }; - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_GREEN; - HelpID = SID_ATTR_GRAF_GREEN; - }; - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_BLUE; - HelpID = SID_ATTR_GRAF_BLUE; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_LUMINANCE; - HelpID = SID_ATTR_GRAF_LUMINANCE; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_CONTRAST; - HelpID = SID_ATTR_GRAF_CONTRAST; - }; - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_GAMMA; - HelpID = SID_ATTR_GRAF_GAMMA; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_TRANSPARENCE; - HelpID = SID_ATTR_GRAF_TRANSPARENCE; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = FN_FLIP_VERT_GRAFIC ; - HelpID = FN_FLIP_VERT_GRAFIC ; - }; - ToolBoxItem - { - Identifier = FN_FLIP_HORZ_GRAFIC ; - HelpID = FN_FLIP_HORZ_GRAFIC ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_GRAFIK - }; - Scroll = TRUE ; -}; String RID_OLE_TOOLBOX { Text [ en-US ] = "Object" ; Text [ x-comment ] = " "; }; -ToolBox RID_OLE_TOOLBOX -{ - HelpID = HID_OLE_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - Scroll = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FRAME_WRAP - MN_CONTOUR - MN_FRAME1 - MN_FRAME2 - MN_FRAME3 - MN_LINESTYLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_OLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - }; -}; String RID_DRAW_TOOLBOX { Text [ en-US ] = "Draw Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_DRAW_TOOLBOX -{ - HelpID = HID_DRAW_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - ItemList = - { - ToolBoxItem - { - Identifier = SID_BEZIER_EDIT ; - HelpID = SID_BEZIER_EDIT ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_ATTRIBUTES_LINE ; - HelpID = SID_ATTRIBUTES_LINE ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_LINEEND_STYLE - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_LINE_STYLE - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_LINE_WIDTH - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_LINE_COLOR - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_ATTRIBUTES_AREA ; - HelpID = SID_ATTRIBUTES_AREA ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_FILL_STYLE - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_OBJECT_ROTATE - }; - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_FRAME_NOWRAP ; - HelpID = FN_FRAME_NOWRAP ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAP ; - HelpID = FN_FRAME_WRAP ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAP_IDEAL ; - HelpID = FN_FRAME_WRAP_IDEAL ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAP_LEFT ; - HelpID = FN_FRAME_WRAP_LEFT ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAP_RIGHT ; - HelpID = FN_FRAME_WRAP_RIGHT ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAPTHRU ; - HelpID = FN_FRAME_WRAPTHRU ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAP_CONTOUR ; - HelpID = FN_FRAME_WRAP_CONTOUR ; - Hide = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_OBJECT_HEAVEN ; - HelpID = SID_OBJECT_HEAVEN ; - }; - ToolBoxItem - { - Identifier = SID_OBJECT_HELL ; - HelpID = SID_OBJECT_HELL ; - }; - MN_LAYER - MN_GRID( HIDE=TRUE ) - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_OBJECT_ALIGN ; - HelpID = SID_OBJECT_ALIGN ; - DropDown = TRUE ; - }; - }; - Scroll = TRUE ; -}; String RID_BEZIER_TOOLBOX { Text [ en-US ] = "Bézier Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_BEZIER_TOOLBOX -{ - HelpID = HID_BEZIER_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - ItemList = - { - ToolBoxItem - { - Identifier = SID_BEZIER_EDIT ; - HelpID = SID_BEZIER_EDIT ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_MOVE ; - HelpID = SID_BEZIER_MOVE ; - RadioCheck = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_INSERT ; - HelpID = SID_BEZIER_INSERT ; - RadioCheck = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_DELETE ; - HelpID = SID_BEZIER_DELETE ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_CUTLINE ; - HelpID = SID_BEZIER_CUTLINE ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_CONVERT ; - HelpID = SID_BEZIER_CONVERT ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_EDGE ; - HelpID = SID_BEZIER_EDGE ; - RadioCheck = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_SMOOTH ; - HelpID = SID_BEZIER_SMOOTH ; - RadioCheck = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_SYMMTR ; - HelpID = SID_BEZIER_SYMMTR ; - RadioCheck = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_CLOSE ; - HelpID = SID_BEZIER_CLOSE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_ELIMINATE_POINTS ; - HelpID = SID_BEZIER_ELIMINATE_POINTS ; - }; - }; - Scroll = TRUE ; -}; String RID_DRAW_TEXT_TOOLBOX { Text [ en-US ] = "Text Object Bar/Graphics" ; Text [ x-comment ] = " "; }; -ToolBox RID_DRAW_TEXT_TOOLBOX -{ - HelpID = HID_DRAW_TEXT_TOOLBOX ; - Border = TRUE ; - Customize = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - ItemList = - { - MN_FONT - MN_TEXT1(FALSE) - MN_TEXT1_BLOCK - MN_TEXT_LINESPACE - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_CHAR_COLOR - Hide = TRUE; - }; - MN_TEXT_LTR_RTL - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - }; - - MN_TEXT_DIALOGS(FALSE) - }; - ItemList[ ar ] = - { - MN_FONT - MN_TEXT1_RTL(FALSE) - MN_TEXT1_BLOCK - MN_TEXT_LINESPACE - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_CHAR_COLOR - Hide = TRUE; - }; - MN_TEXT_RTL_LTR - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - }; - - MN_TEXT_DIALOGS(FALSE) - }; - ItemList[ he ] = - { - MN_FONT - MN_TEXT1_RTL(FALSE) - MN_TEXT1_BLOCK - MN_TEXT_LINESPACE - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_CHAR_COLOR - Hide = TRUE; - }; - MN_TEXT_RTL_LTR - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - }; - - MN_TEXT_DIALOGS(FALSE) - }; - Scroll = TRUE ; -}; String RID_NUM_TOOLBOX { Text [ en-US ] = "Numbering Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_NUM_TOOLBOX -{ - HelpID = HID_NUM_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FONT - ToolBoxItem - { - Identifier = FN_NUM_BULLET_OFF ; - HelpID = FN_NUM_BULLET_OFF ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_UP ; - HelpID = FN_NUM_BULLET_UP ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_DOWN ; - HelpID = FN_NUM_BULLET_DOWN ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_OUTLINE_UP ; - HelpID = FN_NUM_BULLET_OUTLINE_UP ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_OUTLINE_DOWN ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_NONUM ; - HelpID = FN_NUM_BULLET_NONUM ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_MOVEUP ; - HelpID = FN_NUM_BULLET_MOVEUP ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_MOVEDOWN ; - HelpID = FN_NUM_BULLET_MOVEDOWN ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_OUTLINE_MOVEUP ; - HelpID = FN_NUM_BULLET_OUTLINE_MOVEUP ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_OUTLINE_MOVEDOWN ; - HelpID = FN_NUM_BULLET_OUTLINE_MOVEDOWN ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_NUMBER_NEWSTART ; - HelpID = FN_NUMBER_NEWSTART ; - }; - ToolBoxItem - { - Identifier = FN_NUMBER_BULLETS ; - HelpID = FN_NUMBER_BULLETS ; - }; - }; - Scroll = TRUE ; -}; String STR_SHELLNAME_TEXT { Text [ en-US ] = "Text" ; diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx index 3e17c83893..486737089d 100644 --- a/sw/source/ui/shells/tabsh.cxx +++ b/sw/source/ui/shells/tabsh.cxx @@ -961,10 +961,11 @@ void SwTableShell::Execute(SfxRequest &rReq) case FN_TABLE_INSERT_COL_DLG: case FN_TABLE_INSERT_ROW_DLG: { + const SfxSlot* pSlot = GetStaticInterface()->GetSlot(nSlot); if ( FN_TABLE_INSERT_ROW_DLG != nSlot || !rSh.IsInRepeatedHeadline()) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ::std::auto_ptr pDlg( pFact ? pFact->CreateSvxInsRowColDlg( GetView().GetWindow(), nSlot == FN_TABLE_INSERT_COL_DLG, nSlot) : 0); + ::std::auto_ptr pDlg( pFact ? pFact->CreateSvxInsRowColDlg( GetView().GetWindow(), nSlot == FN_TABLE_INSERT_COL_DLG, pSlot->GetCommand() ) : 0); if( pDlg.get() && (pDlg->Execute() == 1) ) { diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index e053213524..1da7ce0106 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -124,7 +124,7 @@ #include #include #include - +#include #include using namespace ::com::sun::star; @@ -274,14 +274,11 @@ short lcl_AskRedlineMode(Window *pWin) BUTTONDIALOG_FOCUSBUTTON; aQBox.AddButton(String(SW_RES(STR_REDLINE_ACCEPT_ALL)), RET_OK, nBtnFlags); - // FIXME: HELPID - aQBox.GetPushButton( RET_OK )->SetHelpId(""/*HID_AUTOFORMAT_ACCEPT*/); + aQBox.GetPushButton( RET_OK )->SetHelpId(HID_AUTOFORMAT_ACCEPT); aQBox.AddButton(String(SW_RES(STR_REDLINE_REJECT_ALL)), RET_CANCEL, BUTTONDIALOG_CANCELBUTTON); - // FIXME: HELPID - aQBox.GetPushButton( RET_CANCEL )->SetHelpId(""/*HID_AUTOFORMAT_REJECT*/ ); + aQBox.GetPushButton( RET_CANCEL )->SetHelpId(HID_AUTOFORMAT_REJECT ); aQBox.AddButton(String(SW_RES(STR_REDLINE_EDIT)), 2, 0); - // FIXME: HELPID - aQBox.GetPushButton( 2 )->SetHelpId(""/*HID_AUTOFORMAT_EDIT_CHG*/); + aQBox.GetPushButton( 2 )->SetHelpId(HID_AUTOFORMAT_EDIT_CHG); aQBox.SetButtonHelpText( RET_OK, aEmptyStr ); return aQBox.Execute(); @@ -441,7 +438,7 @@ void SwTextShell::Execute(SfxRequest &rReq) AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE, GetView().GetWindow(), rWrtSh, FALSE ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); - pDlg->SetHelpId(nSlot); + pDlg->SetHelpId(GetStaticInterface()->GetSlot(nSlot)->GetCommand()); if ( pDlg->Execute() == RET_OK ) { USHORT nId = pDlg->IsEndNote() ? FN_INSERT_ENDNOTE : FN_INSERT_FOOTNOTE; diff --git a/sw/source/ui/table/colwd.src b/sw/source/ui/table/colwd.src index cd34b41bd5..7c3dd9c547 100644 --- a/sw/source/ui/table/colwd.src +++ b/sw/source/ui/table/colwd.src @@ -32,7 +32,7 @@ // #define DLG_COL_WIDTH 256 ModalDialog DLG_COL_WIDTH { - HelpID = FN_TABLE_SET_COL_WIDTH ; + HelpID = CMD_FN_TABLE_SET_COL_WIDTH ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 159 , 60 ) ; diff --git a/sw/source/ui/table/convert.src b/sw/source/ui/table/convert.src index 50baa2bb9a..317a9d43ac 100644 --- a/sw/source/ui/table/convert.src +++ b/sw/source/ui/table/convert.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_CONV_TEXT_TABLE { - HelpID = FN_CONVERT_TEXT_TABLE ; + HelpID = CMD_FN_CONVERT_TEXT_TABLE ; OUTPUTSIZE = TRUE ; Size = MAP_APPFONT ( 203 , 169 ) ; Text [ en-US ] = "Convert Table to Text" ; diff --git a/sw/source/ui/table/instable.src b/sw/source/ui/table/instable.src index 3930bb36ab..ef3a5ceb50 100644 --- a/sw/source/ui/table/instable.src +++ b/sw/source/ui/table/instable.src @@ -32,7 +32,7 @@ // #define DLG_INSERT_TABLE 256 ModalDialog DLG_INSERT_TABLE { - HelpID = FN_INSERT_TABLE ; + HelpID = CMD_FN_INSERT_TABLE ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 280 , 166 ) ; diff --git a/sw/source/ui/table/mergetbl.src b/sw/source/ui/table/mergetbl.src index 97ef9cb2cd..dac3e66d1b 100644 --- a/sw/source/ui/table/mergetbl.src +++ b/sw/source/ui/table/mergetbl.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_MERGE_TABLE { - HelpID = FN_TABLE_MERGE_TABLE ; + HelpID = CMD_FN_TABLE_MERGE_TABLE ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 207 , 57 ) ; diff --git a/sw/source/ui/table/rowht.src b/sw/source/ui/table/rowht.src index ea3ac27474..23194a76a7 100644 --- a/sw/source/ui/table/rowht.src +++ b/sw/source/ui/table/rowht.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_ROW_HEIGHT { - HelpID = FN_TABLE_SET_ROW_HEIGHT ; + HelpID = CMD_FN_TABLE_SET_ROW_HEIGHT ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 157 , 60 ) ; diff --git a/sw/source/ui/table/splittbl.src b/sw/source/ui/table/splittbl.src index e58d64ab96..a1bc6100de 100644 --- a/sw/source/ui/table/splittbl.src +++ b/sw/source/ui/table/splittbl.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_SPLIT_TABLE { - HelpID = FN_TABLE_SPLIT_TABLE ; + HelpID = CMD_FN_TABLE_SPLIT_TABLE ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 207 , 76 ) ; diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index fbd3334221..d2a4bc0c59 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -728,8 +728,7 @@ SwPagePreViewWin::SwPagePreViewWin( Window *pParent, SwPagePreView& rPView ) maPaintedPreviewDocRect( Rectangle(0,0,0,0) ) { SetOutDevViewType( OUTDEV_VIEWTYPE_PRINTPREVIEW ); //#106611# - // FIXME: HELPID - SetHelpId(""/*HID_PAGEPREVIEW*/); + SetHelpId(HID_PAGEPREVIEW); SetFillColor( GetBackground().GetColor() ); SetLineColor( GetBackground().GetColor()); SetMapMode( MapMode(MAP_TWIP) ); @@ -1938,11 +1937,9 @@ int SwPagePreView::_CreateScrollbar( BOOL bHori ) { pPageUpBtn = new ImageButton(pMDI, SW_RES( BTN_PAGEUP ) ); - // FIXME: HELPID - pPageUpBtn->SetHelpId(""/*FN_PAGEUP*/); + pPageUpBtn->SetHelpId(GetStaticInterface()->GetSlot(FN_PAGEUP)->GetCommand()); pPageDownBtn = new ImageButton(pMDI, SW_RES( BTN_PAGEDOWN ) ); - // FIXME: HELPID - pPageDownBtn->SetHelpId(""/*FN_PAGEDOWN*/); + pPageDownBtn->SetHelpId(GetStaticInterface()->GetSlot(FN_PAGEDOWN)->GetCommand()); Link aLk( LINK( this, SwPagePreView, BtnPage ) ); pPageUpBtn->SetClickHdl( aLk ); pPageDownBtn->SetClickHdl( aLk ); diff --git a/sw/source/ui/uiview/pview.src b/sw/source/ui/uiview/pview.src index 57fb35d27a..f77e9781aa 100644 --- a/sw/source/ui/uiview/pview.src +++ b/sw/source/ui/uiview/pview.src @@ -371,94 +371,6 @@ String RID_PVIEW_TOOLBOX { Text [ en-US ] = "Page Preview" ; }; -ToolBox RID_PVIEW_TOOLBOX -{ - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - HelpID = HID_PVIEW_TOOLBOX ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_PAGEUP ; - HelpID = FN_PAGEUP ; - }; - ToolBoxItem - { - Identifier = FN_PAGEDOWN ; - HelpID = FN_PAGEDOWN ; - }; - ToolBoxItem - { - Identifier = FN_START_OF_DOCUMENT ; - HelpID = FN_START_OF_DOCUMENT ; - }; - ToolBoxItem - { - Identifier = FN_END_OF_DOCUMENT ; - HelpID = FN_END_OF_DOCUMENT ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = FN_SHOW_TWO_PAGES ; - HelpID = FN_SHOW_TWO_PAGES ; - }; - ToolBoxItem - { - Identifier = FN_SHOW_MULTIPLE_PAGES ; - HelpID = FN_SHOW_MULTIPLE_PAGES ; - DropDown = TRUE; - }; - ToolBoxItem - { - Identifier = FN_SHOW_BOOKVIEW ; - HelpID = FN_SHOW_BOOKVIEW ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = SID_ZOOM_OUT; - HelpID = SID_ZOOM_OUT ; - }; - ToolBoxItem - { - Identifier = SID_ZOOM_IN; - HelpID = SID_ZOOM_IN ; - }; - ToolBoxItem - { - Identifier = FN_PREVIEW_ZOOM; - HelpID = HID_PREVIEW_ZOOM ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = SID_WIN_FULLSCREEN ; - HelpID = SID_WIN_FULLSCREEN ; - }; - ToolBoxItem - { - Identifier = FN_PRINT_PAGEPREVIEW ; - HelpID = FN_PRINT_PAGEPREVIEW ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = FN_CLOSE_PAGEPREVIEW; - HelpID = SID_PRINTPREVIEW; - }; - }; - Scroll = TRUE ; -}; diff --git a/sw/source/ui/uiview/view.src b/sw/source/ui/uiview/view.src index 0667bf5c35..e006ee71ae 100644 --- a/sw/source/ui/uiview/view.src +++ b/sw/source/ui/uiview/view.src @@ -196,160 +196,6 @@ String MN_SRCVIEW_POPUPMENU Text [ en-US ] = "HTML source" ; }; -ToolBox RID_TOOLS_TOOLBOX -{ - HelpID = HID_TOOLS_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Scroll = TRUE ; - Align = BOXALIGN_LEFT ; - Hide = TRUE ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_INSERT_CTRL ; - HelpID = HID_INSERT_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_FIELD_CTRL ; - HelpID = HID_INSERT_FIELD_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_OBJ_CTRL ; - HelpID = HID_INSERT_OBJ_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_INSERT_DRAW - }; - ToolBoxItem - { - ITEM_FORM_CONFIG - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_GLOSSARY_DLG ; - HelpID = FN_GLOSSARY_DLG ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_CAPTION; - HelpID = FN_INSERT_CAPTION ; - Hide = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_IDX_ENTRY_DLG; - HelpId = FN_INSERT_IDX_ENTRY_DLG; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_INSERT_REF_FIELD; - HelpID = FN_INSERT_REF_FIELD ; - Hide = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_SHADOWCURSOR ; - HelpID = FN_SHADOWCURSOR ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_SPELL_GRAMMAR_DIALOG; - HelpID = FN_SPELL_GRAMMAR_DIALOG; - }; - ToolBoxItem - { - ITEM_TOOLBAR_AUTOSPELL_CHECK - }; - ToolBoxItem - { - Identifier = FN_HYPHENATE_OPT_DLG; - HelpID = FN_HYPHENATE_OPT_DLG; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_THESAURUS_DLG; - HelpID = FN_THESAURUS_DLG; - Hide = TRUE; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_SEARCH_DLG ; - HelpID = SID_SEARCH_DLG ; - }; - ToolBoxItem - { - Identifier = SID_VIEW_DATA_SOURCE_BROWSER ; - HelpID = SID_VIEW_DATA_SOURCE_BROWSER ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_ATTR_ZOOM; - HelpID = SID_ATTR_ZOOM ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_VIEW_META_CHARS ; - HelpID = FN_VIEW_META_CHARS ; - }; - ToolBoxItem - { - Identifier = FN_VIEW_FIELDNAME ; - HelpID = FN_VIEW_FIELDNAME ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_VIEW_GRAPHIC ; - HelpID = FN_VIEW_GRAPHIC ; - }; - ToolBoxItem - { - Identifier = SID_BROWSER_MODE ; - HelpID = SID_BROWSER_MODE ; - }; - }; -}; Menu MN_SRCVIEW_POPUPMENU { ItemList = diff --git a/sw/source/ui/uiview/viewdlg2.cxx b/sw/source/ui/uiview/viewdlg2.cxx index 27f017c517..8388df1566 100644 --- a/sw/source/ui/uiview/viewdlg2.cxx +++ b/sw/source/ui/uiview/viewdlg2.cxx @@ -31,7 +31,7 @@ #include #include - +#include #include #include @@ -92,7 +92,7 @@ void SwView::ExecDlgExt(SfxRequest &rReq) pMDI, *pWrtShell, TRUE ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); - pDlg->SetHelpId(FN_EDIT_FOOTNOTE); + pDlg->SetHelpId(GetStaticInterface()->GetSlot(FN_EDIT_FOOTNOTE)->GetCommand()); pDlg->SetText( SW_RESSTR(STR_EDIT_FOOTNOTE) ); pDlg->Execute(); delete pDlg; diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx index a11322f682..f8212d8724 100644 --- a/sw/source/ui/uiview/viewmdi.cxx +++ b/sw/source/ui/uiview/viewmdi.cxx @@ -343,15 +343,12 @@ void SwView::CreatePageButtons(BOOL bShow) { Window *pMDI = &GetViewFrame()->GetWindow(); pPageUpBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEUP ), TRUE ); - // FIXME: HELPID - pPageUpBtn->SetHelpId(""/*HID_SCRL_PAGEUP*/); + pPageUpBtn->SetHelpId(HID_SCRL_PAGEUP); pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), FALSE ); - // FIXME: HELPID - pPageDownBtn->SetHelpId(""/*HID_SCRL_PAGEDOWN*/); + pPageDownBtn->SetHelpId(HID_SCRL_PAGEDOWN); Reference< XFrame > xFrame = GetViewFrame()->GetFrame().GetFrameInterface(); pNaviBtn = new SwNaviImageButton(pMDI, xFrame ); - // FIXME: HELPID - pNaviBtn->SetHelpId(""/*HID_SCRL_NAVI*/); + pNaviBtn->SetHelpId(HID_SCRL_NAVI); Link aLk( LINK( this, SwView, BtnPage ) ); pPageUpBtn->SetClickHdl( aLk ); pPageDownBtn->SetClickHdl( aLk ); diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index e19a82e430..0c68263482 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -800,16 +800,12 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c if ( ! ( rValue >>= sHelpURL ) ) throw IllegalArgumentException(); SwEditWin &rEditWin = pView->GetEditWin(); - // FIXME: HELPID - #if 0 OUString sPrefix = sHelpURL.copy ( 0, 4 ); // Make sure we have a valid string...should be in the format HID:12345 if ( ! sPrefix.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "HID:" ) ) ) throw IllegalArgumentException (); - OUString sNumber = sHelpURL.copy ( 4 ); - sal_uInt32 nHelpId = sNumber.toInt32(); - #endif - rEditWin.SetHelpId ( rtl::OUStringToOString( sHelpURL, RTL_TEXTENCODING_UTF8 ) /*nHelpId*/ ); + OUString aID = sHelpURL.copy ( 4 ); + rEditWin.SetHelpId ( rtl::OUStringToOString( aID, RTL_TEXTENCODING_UTF8 ) ); } else throw UnknownPropertyException(); @@ -988,13 +984,8 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u { bBool = sal_False; OUStringBuffer sHelpURL; - // FIXME: HELPID - #if 0 sHelpURL.appendAscii ( "HID:" ); SwEditWin &rEditWin = pView->GetEditWin(); - sHelpURL.append ( static_cast < sal_Int32 > ( rEditWin.GetHelpId() ) ); - #endif - SwEditWin &rEditWin = pView->GetEditWin(); sHelpURL.append( rtl::OStringToOUString( rEditWin.GetHelpId(), RTL_TEXTENCODING_UTF8 ) ); rValue <<= sHelpURL.makeStringAndClear(); } diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index 6216af69e0..418d9ace33 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -933,8 +933,7 @@ SwContentTree::SwContentTree(Window* pParent, const ResId& rResId) : { sal_uInt16 i; - // FIXME: HELPID - SetHelpId(""/*HID_NAVIGATOR_TREELIST*/); + SetHelpId(HID_NAVIGATOR_TREELIST); SetNodeDefaultImages(); SetDoubleClickHdl(LINK(this, SwContentTree, ContentDoubleClickHdl)); diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx index c9b43ce81f..3280dffb97 100644 --- a/sw/source/ui/utlui/glbltree.cxx +++ b/sw/source/ui/utlui/glbltree.cxx @@ -117,7 +117,7 @@ using ::rtl::OUString; #define GLBL_TABPOS_SUB 5 const SfxObjectShell* SwGlobalTree::pShowShell = 0; -static const USHORT __FAR_DATA aHelpForMenu[] = +static const char* __FAR_DATA aHelpForMenu[] = { 0, // HID_GLBLTREE_UPDATE, //CTX_UPDATE @@ -206,8 +206,7 @@ SwGlobalTree::SwGlobalTree(Window* pParent, const ResId& rResId) : { aContextStrings[i] = SW_RESSTR(i+ ST_GLOBAL_CONTEXT_FIRST); } - // FIXME: HELPID - SetHelpId(""/*HID_NAVIGATOR_GLOB_TREELIST*/); + SetHelpId(HID_NAVIGATOR_GLOB_TREELIST); SelectHdl(); SetDoubleClickHdl(LINK(this, SwGlobalTree, DoubleClickHdl)); EnableContextMenuHandling(); @@ -382,44 +381,34 @@ PopupMenu* SwGlobalTree::CreateContextMenu() for (USHORT i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++) { pSubPop2->InsertItem( i, aContextStrings[ST_UPDATE_SEL - ST_GLOBAL_CONTEXT_FIRST - CTX_UPDATE_SEL+ i] ); - // FIXME: HELPID - pSubPop2->SetHelpId(i, ""/*aHelpForMenu[i]*/); + pSubPop2->SetHelpId(i, aHelpForMenu[i]); } pSubPop2->EnableItem(CTX_UPDATE_SEL, 0 != (nEnableFlags & ENABLE_UPDATE_SEL)); pSubPop1->InsertItem(CTX_INSERT_ANY_INDEX, aContextStrings[ST_INDEX - ST_GLOBAL_CONTEXT_FIRST]); - // FIXME: HELPID - pSubPop1->SetHelpId(CTX_INSERT_ANY_INDEX, ""/*aHelpForMenu[CTX_INSERT_ANY_INDEX]*/); + pSubPop1->SetHelpId(CTX_INSERT_ANY_INDEX, aHelpForMenu[CTX_INSERT_ANY_INDEX]); pSubPop1->InsertItem(CTX_INSERT_FILE, aContextStrings[ST_FILE - ST_GLOBAL_CONTEXT_FIRST]); - // FIXME: HELPID - pSubPop1->SetHelpId(CTX_INSERT_FILE, ""/*aHelpForMenu[CTX_INSERT_FILE]*/); + pSubPop1->SetHelpId(CTX_INSERT_FILE, aHelpForMenu[CTX_INSERT_FILE]); pSubPop1->InsertItem(CTX_INSERT_NEW_FILE, aContextStrings[ST_NEW_FILE - ST_GLOBAL_CONTEXT_FIRST]); - // FIXME: HELPID - pSubPop1->SetHelpId(CTX_INSERT_NEW_FILE, ""/*aHelpForMenu[CTX_INSERT_NEW_FILE]*/); + pSubPop1->SetHelpId(CTX_INSERT_NEW_FILE, aHelpForMenu[CTX_INSERT_NEW_FILE]); pSubPop1->InsertItem(CTX_INSERT_TEXT, aContextStrings[ST_TEXT - ST_GLOBAL_CONTEXT_FIRST]); - // FIXME: HELPID - pSubPop1->SetHelpId(CTX_INSERT_TEXT, ""/*aHelpForMenu[CTX_INSERT_TEXT]*/); + pSubPop1->SetHelpId(CTX_INSERT_TEXT, aHelpForMenu[CTX_INSERT_TEXT]); pPop->InsertItem(CTX_UPDATE, aContextStrings[ST_UPDATE - ST_GLOBAL_CONTEXT_FIRST]); - // FIXME: HELPID - pPop->SetHelpId(CTX_UPDATE, ""/*aHelpForMenu[CTX_UPDATE]*/); + pPop->SetHelpId(CTX_UPDATE, aHelpForMenu[CTX_UPDATE]); pPop->InsertItem(CTX_EDIT, aContextStrings[ST_EDIT_CONTENT - ST_GLOBAL_CONTEXT_FIRST]); - // FIXME: HELPID - pPop->SetHelpId(CTX_EDIT, ""/*aHelpForMenu[CTX_EDIT]*/); + pPop->SetHelpId(CTX_EDIT, aHelpForMenu[CTX_EDIT]); if(nEnableFlags&ENABLE_EDIT_LINK) { pPop->InsertItem(CTX_EDIT_LINK, aContextStrings[ST_EDIT_LINK - ST_GLOBAL_CONTEXT_FIRST]); - // FIXME: HELPID - pPop->SetHelpId(CTX_EDIT_LINK, ""/*aHelpForMenu[CTX_EDIT_LINK]*/); + pPop->SetHelpId(CTX_EDIT_LINK, aHelpForMenu[CTX_EDIT_LINK]); } pPop->InsertItem(CTX_INSERT, aContextStrings[ST_INSERT - ST_GLOBAL_CONTEXT_FIRST]); - // FIXME: HELPID - pPop->SetHelpId(CTX_INSERT, ""/*aHelpForMenu[CTX_INSERT]*/); + pPop->SetHelpId(CTX_INSERT, aHelpForMenu[CTX_INSERT]); pPop->InsertSeparator() ; pPop->InsertItem(CTX_DELETE, aContextStrings[ST_DELETE - ST_GLOBAL_CONTEXT_FIRST]); - // FIXME: HELPID - pPop->SetHelpId(CTX_DELETE, ""/*aHelpForMenu[CTX_DELETE]*/); + pPop->SetHelpId(CTX_DELETE, aHelpForMenu[CTX_DELETE]); //evtl. disablen pSubPop1->EnableItem(CTX_INSERT_ANY_INDEX, 0 != (nEnableFlags & ENABLE_INSERT_IDX )); @@ -450,8 +439,7 @@ void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox) for (USHORT i = CTX_INSERT_ANY_INDEX; i <= CTX_INSERT_TEXT; i++) { pMenu->InsertItem( i, aContextStrings[ST_INDEX - ST_GLOBAL_CONTEXT_FIRST - CTX_INSERT_ANY_INDEX + i] ); - // FIXME: HELPID - pMenu->SetHelpId(i, ""/*aHelpForMenu[i]*/ ); + pMenu->SetHelpId(i, aHelpForMenu[i] ); } pMenu->EnableItem(CTX_INSERT_ANY_INDEX, 0 != (nEnableFlags & ENABLE_INSERT_IDX )); // pMenu->EnableItem(CTX_INSERT_CNTIDX, 0 != (nEnableFlags & ENABLE_INSERT_IDX )); @@ -471,8 +459,7 @@ void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox) for (USHORT i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++) { pMenu->InsertItem( i, aContextStrings[ST_UPDATE_SEL - ST_GLOBAL_CONTEXT_FIRST - CTX_UPDATE_SEL+ i] ); - // FIXME: HELPID - pMenu->SetHelpId(i, ""/*aHelpForMenu[i]*/ ); + pMenu->SetHelpId(i, aHelpForMenu[i] ); } pMenu->EnableItem(CTX_UPDATE_SEL, 0 != (nEnableFlags & ENABLE_UPDATE_SEL)); pMenu->SetSelectHdl(LINK(this, SwGlobalTree, PopupHdl)); diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 74800bbaef..a6ee436e38 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -429,15 +429,17 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox ) case FN_DROP_REGION: { + static const char* aHIDs[] = + { + HID_NAVI_DRAG_HYP, + HID_NAVI_DRAG_LINK, + HID_NAVI_DRAG_COPY, + }; PopupMenu *pMenu = new PopupMenu; for (USHORT i = 0; i <= REGION_MODE_EMBEDDED; i++) { pMenu->InsertItem( i + 1, aContextArr[i] ); - // FIXME: HELPID - pMenu->SetHelpId(i + 1, ""/*HID_NAVI_DRAG_HYP + i*/); - /*HID_NAVI_DRAG_HYP - HID_NAVI_DRAG_LINK - HID_NAVI_DRAG_COPY */ + pMenu->SetHelpId(i + 1, aHIDs[i]); } pMenu->CheckItem( nRegionMode + 1 ); pMenu->SetSelectHdl(LINK(this, SwNavigationPI, MenuSelectHdl)); @@ -457,8 +459,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox ) for (USHORT i = 101; i <= 100 + MAXLEVEL; i++) { pMenu->InsertItem( i, String::CreateFromInt32(i - 100) ); - // FIXME: HELPID - pMenu->SetHelpId( i, ""/*HID_NAVI_OUTLINES*/ ); + pMenu->SetHelpId( i, HID_NAVI_OUTLINES ); } pMenu->CheckItem( aContentTree.GetOutlineLevel() + 100 ); pMenu->SetSelectHdl(LINK(this, SwNavigationPI, MenuSelectHdl)); @@ -794,12 +795,9 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, GetCreateView(); InitImageList(); - // FIXME: HELPID - aContentToolBox.SetHelpId(""/*HID_NAVIGATOR_TOOLBOX*/ ); - // FIXME: HELPID - aGlobalToolBox.SetHelpId(""/*HID_NAVIGATOR_GLOBAL_TOOLBOX*/); - // FIXME: HELPID - aDocListBox.SetHelpId(""/*HID_NAVIGATOR_LISTBOX*/ ); + aContentToolBox.SetHelpId(HID_NAVIGATOR_TOOLBOX ); + aGlobalToolBox.SetHelpId(HID_NAVIGATOR_GLOBAL_TOOLBOX); + aDocListBox.SetHelpId(HID_NAVIGATOR_LISTBOX ); nDocLBIniHeight = aDocListBox.GetSizePixel().Height(); nZoomOutInit = nZoomOut = Resource::ReadShortRes(); @@ -826,8 +824,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, aContentToolBox.InsertSeparator(4); aContentToolBox.InsertWindow( FN_PAGENUMBER, pEdit, 0, 4); aContentToolBox.InsertSeparator(4); - // FIXME: HELPID - aContentToolBox.SetHelpId(FN_PAGENUMBER, ""/*HID_NAVI_TBX16*/); + aContentToolBox.SetHelpId(FN_PAGENUMBER, HID_NAVI_TBX16); aContentToolBox.ShowItem( FN_PAGENUMBER ); for( USHORT i = 0; i <= REGION_MODE_EMBEDDED; i++ ) diff --git a/sw/source/ui/web/web.src b/sw/source/ui/web/web.src index 8485ae0e80..b647d83311 100644 --- a/sw/source/ui/web/web.src +++ b/sw/source/ui/web/web.src @@ -65,124 +65,6 @@ String RID_WEBTOOLS_TOOLBOX { Text [ en-US ] = "Main Toolbar/Web" ; }; -ToolBox RID_WEBTOOLS_TOOLBOX -{ - HelpID = HID_WEBTOOLS_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Scroll = TRUE ; - Hide = TRUE ; - Align = BOXALIGN_LEFT ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_INSERT_CTRL ; - HelpID = HID_INSERT_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_FIELD_CTRL ; - HelpID = HID_INSERT_FIELD_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_DRAW_TEXT_MARQUEE ; - HelpID = SID_DRAW_TEXT_MARQUEE ; - }; - ToolBoxItem - { - Identifier = SID_FM_CONFIG ; - HelpID = SID_FM_CONFIG; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_GLOSSARY_DLG ; - HelpID = FN_GLOSSARY_DLG ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_SPELL_GRAMMAR_DIALOG; - HelpID = FN_SPELL_GRAMMAR_DIALOG; - }; - ToolBoxItem - { - ITEM_TOOLBAR_AUTOSPELL_CHECK - }; - ToolBoxItem - { - Identifier = FN_HYPHENATE_OPT_DLG; - HelpID = FN_HYPHENATE_OPT_DLG; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_THESAURUS_DLG; - HelpID = FN_THESAURUS_DLG; - Hide = TRUE; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_SEARCH_DLG ; - HelpID = SID_SEARCH_DLG ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_ATTR_ZOOM; - HelpID = SID_ATTR_ZOOM ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_VIEW_META_CHARS ; - HelpID = FN_VIEW_META_CHARS ; - }; - ToolBoxItem - { - Identifier = FN_VIEW_GRAPHIC ; - HelpID = FN_VIEW_GRAPHIC ; - }; - ToolBoxItem - { - Identifier = FN_PRINT_LAYOUT ; - HelpID = FN_PRINT_LAYOUT ; - }; - ToolBoxItem - { - Identifier = SID_SOURCEVIEW ; - HelpID = HID_SOURCEVIEW ; - }; - }; -}; /************************************************************************* Textleiste *************************************************************************/ @@ -190,152 +72,18 @@ String RID_WEBTEXT_TOOLBOX { Text [ en-US ] = "Text Object Bar/Web" ; }; -ToolBox RID_WEBTEXT_TOOLBOX -{ - HelpID = HID_WEBTEXT_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - Hide = TRUE ; - HideWhenDeactivate = TRUE ; - LineSpacing = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FONT - MN_TEXT1(TRUE) - MN_TEXT_LTR_RTL - MN_TEXT_LINESPACE - MN_TEXT2 - MN_TEXT_BACKGROUND - MN_TEXT_DIALOGS(TRUE) - }; - Scroll = TRUE ; -}; String RID_WEBFRAME_TOOLBOX { Text [ en-US ] = "Frame Object Bar/Web" ; }; -ToolBox RID_WEBFRAME_TOOLBOX -{ - HelpID = HID_WEBFRAME_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - Hide = TRUE ; - LineSpacing = TRUE ; - MenuStrings = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - ItemList = - { - MN_FRAME_WRAP_WEB - MN_FRAME1 - MN_FRAME3 - MN_LINESTYLE - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - MN_BACKGROUND_COLOR - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_FRAME - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - }; - }; - Scroll = TRUE ; -}; String RID_WEBGRAPHIC_TOOLBOX { Text [ en-US ] = "Graphics Object Bar/Web" ; }; -ToolBox RID_WEBGRAPHIC_TOOLBOX -{ - HelpID = HID_WEBGRAPHIC_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - MenuStrings = TRUE ; - Customize = TRUE ; - Hide = TRUE ; - ItemList = - { - MN_FRAME_WRAP_WEB - MN_FRAME1 - MN_FRAME3 - MN_LINESTYLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_GRAFIK - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - }; - Scroll = TRUE ; -}; String RID_WEBOLE_TOOLBOX { Text [ en-US ] = "Object/Web" ; }; -ToolBox RID_WEBOLE_TOOLBOX -{ - HelpID = HID_OLE_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - Scroll = TRUE ; - ItemList = - { - MN_FRAME_WRAP_WEB - MN_FRAME1 - MN_FRAME3 - MN_LINESTYLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_OLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - }; -}; /************************************************************************* *************************************************************************/ diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index cf7aa90faa..bb8e56ba6f 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -123,6 +123,7 @@ #include #include "PostItMgr.hxx" +#include using namespace sw::mark; using namespace com::sun::star; @@ -466,9 +467,13 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName pReq->AppendItem(SfxBoolItem(FN_PARAM_5, pDescriptor->HasFrameBorder())); }*/ { + SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool(); + const SfxSlot* pSlot = pSlotPool->GetSlot(nSlotId); + rtl::OString aCmd(".uno:"); + aCmd += pSlot->GetUnoName(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractInsertObjectDialog* pDlg = - pFact->CreateInsertObjectDialog( GetWin(), nSlotId, xStor, &aServerList ); + pFact->CreateInsertObjectDialog( GetWin(), rtl::OUString( aCmd, aCmd.getLength(), RTL_TEXTENCODING_UTF8 ), xStor, &aServerList ); if ( pDlg ) { pDlg->Execute(); -- cgit v1.2.3 From 80f8ea3c08d1e59f22d6f0ee59163943f043124e Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 19 Jul 2010 22:04:23 +0200 Subject: CWS changehid: remove code dealing with obsolete SID_INSERT_APPLET --- sw/sdi/_textsh.sdi | 6 ------ sw/source/ui/shells/textsh.cxx | 41 ++--------------------------------------- sw/source/ui/wrtsh/wrtsh1.cxx | 10 ---------- 3 files changed, 2 insertions(+), 55 deletions(-) (limited to 'sw/source') diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi index a895cc5307..4acda5767b 100644 --- a/sw/sdi/_textsh.sdi +++ b/sw/sdi/_textsh.sdi @@ -325,12 +325,6 @@ interface BaseText StateMethod = StateInsert ; DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; ] - SID_INSERT_APPLET // status(final|play) - [ - ExecMethod = ExecInsert ; - StateMethod = StateInsert ; - DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; - ] FN_INSERT_TABLE // status(final|play) [ ExecMethod = ExecInsert ; diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index e437de58d4..39b156cee1 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -282,7 +282,6 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) break; case SID_INSERT_OBJECT: case SID_INSERT_PLUGIN: - case SID_INSERT_APPLET: { SFX_REQUEST_ARG( rReq, pNameItem, SfxGlobalNameItem, SID_INSERT_OBJECT, sal_False ); SvGlobalName *pName = NULL; @@ -298,8 +297,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) SFX_REQUEST_ARG( rReq, pCommandsItem, SfxStringItem, FN_PARAM_3, sal_False ); //TODO/LATER: recording currently not working, need code for Commandlist svt::EmbeddedObjectRef xObj; - if((SID_INSERT_APPLET == nSlot || SID_INSERT_PLUGIN) - && (pClassItem || pClassLocationItem || pCommandsItem)) + if( pClassItem || pClassLocationItem || pCommandsItem ) { String sClass; String sClassLocation; @@ -315,36 +313,6 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) aCommandList.AppendCommands( pCommandsItem->GetValue(), &nTemp ); } - if(SID_INSERT_APPLET == nSlot) - { - SwApplet_Impl aApplImpl( rSh.GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); - String sBaseURL; - SfxMedium* pMedium = GetView().GetDocShell()->GetMedium(); - if(pMedium) - sBaseURL = pMedium->GetURLObject().GetMainURL(INetURLObject::NO_DECODE); - - aApplImpl.CreateApplet(sClass, aEmptyStr, FALSE, sClassLocation, sBaseURL ); - aApplImpl.FinishApplet(); - xObj.Assign( aApplImpl.GetApplet(), embed::Aspects::MSOLE_CONTENT ); - if( aCommandList.Count() ) - { - uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY ); - if ( xSet.is() ) - { - uno::Sequence < beans::PropertyValue > aSeq; - aCommandList.FillSequence( aSeq ); - try - { - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("AppletCommands"), uno::makeAny( aSeq ) ); - } - catch ( uno::Exception& ) - { - } - } - } - } - else { comphelper::EmbeddedObjectContainer aCnt; ::rtl::OUString sName; @@ -851,13 +819,8 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) case SID_INSERT_FLOATINGFRAME: case SID_INSERT_OBJECT: case SID_INSERT_PLUGIN: - case SID_INSERT_APPLET: { - if( -#ifndef SOLAR_JAVA - nWhich == SID_INSERT_APPLET || -#endif - eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden ) + if( eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden ) { rSet.DisableItem( nWhich ); } diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index dac2fabd43..701646f5cd 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -443,16 +443,6 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName pReq->AppendItem(SfxStringItem(FN_PARAM_2, pURL->GetMainURL(INetURLObject::NO_DECODE))); pReq->AppendItem(SfxStringItem(FN_PARAM_3 , aDlg.GetCommands())); } */ - case SID_INSERT_APPLET: - /* - if(pReq) - { - SvAppletObjectRef xApplet ( xIPObj ); - if(xApplet.Is()) - pReq->AppendItem(SfxStringItem(FN_PARAM_1 , xApplet->GetCodeBase())); - pReq->AppendItem(SfxStringItem(FN_PARAM_2 , aDlg.GetClass())); - pReq->AppendItem(SfxStringItem(FN_PARAM_3 , aDlg.GetCommands())); - }*/ case SID_INSERT_FLOATINGFRAME: /* if(pReq && xFloatingFrame.Is()) -- cgit v1.2.3 From b2d5d3c532818c7bb5ce7a00ed03fa8a7165a2a9 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 20 Jul 2010 14:50:49 +0200 Subject: CWS changehid: #i111784#: consolidate usage of HID schema; remove unused SetDialogHelpId methods --- sw/source/ui/app/docsh2.cxx | 2 -- sw/source/ui/uno/unomod.cxx | 13 ++++++------- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 6b10c86a37..f6d7b8f2e2 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1238,8 +1238,6 @@ void SwDocShell::Execute(SfxRequest& rReq) const char** pHelpIds = bCreateHtml ? aHTMLHelpIds : aMasterHelpIds; aDlgHelper.SetControlHelpIds( nControlIds, pHelpIds ); -// aDlgHelper.SetDialogHelpId( bCreateHtml ? HID_SEND_HTML_DIALOG : HID_SEND_MASTER_DIALOG ); - uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker(); const SfxFilter* pFlt; diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index 0c68263482..888a57f636 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -799,13 +799,12 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c OUString sHelpURL; if ( ! ( rValue >>= sHelpURL ) ) throw IllegalArgumentException(); - SwEditWin &rEditWin = pView->GetEditWin(); - OUString sPrefix = sHelpURL.copy ( 0, 4 ); - // Make sure we have a valid string...should be in the format HID:12345 - if ( ! sPrefix.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "HID:" ) ) ) + + INetURLObject aHID( sHelpURL ); + if ( aHID.GetProtocol() == INET_PROT_HID ) + pView->GetEditWin().SetHelpId( rtl::OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 ) ); + else throw IllegalArgumentException (); - OUString aID = sHelpURL.copy ( 4 ); - rEditWin.SetHelpId ( rtl::OUStringToOString( aID, RTL_TEXTENCODING_UTF8 ) ); } else throw UnknownPropertyException(); @@ -984,7 +983,7 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u { bBool = sal_False; OUStringBuffer sHelpURL; - sHelpURL.appendAscii ( "HID:" ); + sHelpURL.appendAscii ( INET_HID_SCHEME ); SwEditWin &rEditWin = pView->GetEditWin(); sHelpURL.append( rtl::OStringToOUString( rEditWin.GetHelpId(), RTL_TEXTENCODING_UTF8 ) ); rValue <<= sHelpURL.makeStringAndClear(); -- cgit v1.2.3 From 71447cd5051d6dba583348718cd4e93de388eb3f Mon Sep 17 00:00:00 2001 From: Frank Sch?nheit Date: Fri, 23 Oct 2009 09:46:03 +0200 Subject: step 0 of an UNOization of the css.form.(X)FormController implementation: move the API to css.form.runtime, so we can later add new API chunks without breaking compatibility of the existing API in css.form --- sw/source/filter/html/htmlform.cxx | 3 +++ sw/source/ui/inc/unotxvw.hxx | 2 +- sw/source/ui/uno/unotxvw.cxx | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 7a0449db96..716013933c 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -76,6 +76,9 @@ #include #include #include +#include +#include +#include #include #include #include diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx index 7062a4b78e..4ba57a5c20 100644 --- a/sw/source/ui/inc/unotxvw.hxx +++ b/sw/source/ui/inc/unotxvw.hxx @@ -109,7 +109,7 @@ public: virtual void SAL_CALL removeSelectionChangeListener(const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener > & xListener) throw( ::com::sun::star::uno::RuntimeException ); // XFormLayerAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > SAL_CALL getFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& Form ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > SAL_CALL getFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& Form ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL isFormDesignMode( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setFormDesignMode( ::sal_Bool DesignMode ) throw (::com::sun::star::uno::RuntimeException); diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index de8bcd61ee..d532e2633b 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -721,7 +721,7 @@ uno::Reference< awt::XControl > SwXTextView::getControl(const uno::Reference< a /*-- 08.03.07 13:55------------------------------------------------------ -----------------------------------------------------------------------*/ -uno::Reference< form::XFormController > SAL_CALL SwXTextView::getFormController( const uno::Reference< form::XForm >& _Form ) throw (RuntimeException) +uno::Reference< form::runtime::XFormController > SAL_CALL SwXTextView::getFormController( const uno::Reference< form::XForm >& _Form ) throw (RuntimeException) { ::vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -731,7 +731,7 @@ uno::Reference< form::XFormController > SAL_CALL SwXTextView::getFormController( Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : NULL; DBG_ASSERT( pFormShell && pDrawView && pWindow, "SwXTextView::GetControl: how could I?" ); - uno::Reference< form::XFormController > xController; + uno::Reference< form::runtime::XFormController > xController; if ( pFormShell && pDrawView && pWindow ) xController = pFormShell->GetFormController( _Form, *pDrawView, *pWindow ); return xController; -- cgit v1.2.3 From 3af2713f15735beba3f9e58061b3eca5037211d2 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Fri, 30 Oct 2009 09:44:02 +0000 Subject: #cmcfixes65: #i106472# fix ww8 aliasing --- sw/source/filter/ww8/wrtww8.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index f945c0ad62..64d40dafab 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3510,7 +3510,6 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) const sal_uInt8 aFldData[] = { - 0,0,0,0, // len of struct 0x44,0, // the start of "next" data 0,0,0,0,0,0,0,0,0,0, // PIC-Structure! /10 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // | /16 @@ -3518,7 +3517,8 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // | /16 0,0,0,0, // / /4 }; - int slen = sizeof( aFldData ) + sal_uInt32 slen=sizeof(sal_uInt32) + + sizeof(aFldData) + sizeof( aFldHeader ) + 2*ffname.getLength() + 4 + 2*ffdeftext.getLength() + 4 @@ -3527,12 +3527,11 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) + 2*ffstattext.getLength() + 4 + 2*ffentrymcr.getLength() + 4 + 2*ffexitmcr.getLength() + 4; -#ifdef OSL_BIGENDIAN - slen = SWAPLONG( slen ); -#endif // OSL_BIGENDIAN - *( (sal_uInt32 *)aFldData ) = slen; + + *pDataStrm << slen; + int len = sizeof( aFldData ); - OSL_ENSURE( len == 0x44, "SwWW8Writer::WriteFormData(..) - wrong aFldData length" ); + OSL_ENSURE( len == 0x44-sizeof(sal_uInt32), "SwWW8Writer::WriteFormData(..) - wrong aFldData length" ); pDataStrm->Write( aFldData, len ); len = sizeof( aFldHeader ); -- cgit v1.2.3 From de95839da04c70e4bd39d771b2805a990dd97a56 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Fri, 6 Nov 2009 11:03:40 +0000 Subject: cmcfixes66: #i106674# fix remaining new[]/delete mismatches --- sw/source/core/doc/doccomp.cxx | 4 ++-- sw/source/filter/ww1/w1class.cxx | 2 +- sw/source/filter/ww1/w1filter.cxx | 4 ++-- sw/source/filter/ww8/ww8par.cxx | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 5fa7731fcb..58e3cccc6f 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -428,7 +428,7 @@ Compare::Compare( ULONG nDiff, CompareData& rData1, CompareData& rData2 ) SetDiscard( rData2, pDiscard2, pCount1 ); // die Arrays koennen wir wieder vergessen - delete pCount1; delete pCount2; + delete [] pCount1; delete [] pCount2; CheckDiscard( rData1.GetLineCount(), pDiscard1 ); CheckDiscard( rData2.GetLineCount(), pDiscard2 ); @@ -437,7 +437,7 @@ Compare::Compare( ULONG nDiff, CompareData& rData1, CompareData& rData2 ) pMD2 = new MovedData( rData2, pDiscard2 ); // die Arrays koennen wir wieder vergessen - delete pDiscard1; delete pDiscard2; + delete [] pDiscard1; delete [] pDiscard2; } { diff --git a/sw/source/filter/ww1/w1class.cxx b/sw/source/filter/ww1/w1class.cxx index 7fb33d4529..a137ca479f 100644 --- a/sw/source/filter/ww1/w1class.cxx +++ b/sw/source/filter/ww1/w1class.cxx @@ -257,7 +257,7 @@ Ww1StyleSheet::Ww1StyleSheet(Ww1Fib& _rFib) DBG_ASSERT(cbStshf==0, "Ww1StyleSheet"); bOK = cbStshf == 0; } - delete del; + delete [] del; } USHORT Ww1StyleSheet::ReadNames( BYTE*& p, USHORT& rnCountBytes ) diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx index 60cc3b95e3..29490aa1e3 100644 --- a/sw/source/filter/ww1/w1filter.cxx +++ b/sw/source/filter/ww1/w1filter.cxx @@ -1899,11 +1899,11 @@ void Ww1Picture::WriteBmp(SvStream& rOut) nSize -= sizeof(BYTE); } if(rOut.Write(pBuf, padx) != padx){ - delete pBuf; + delete [] pBuf; goto error; } } - delete pBuf; + delete [] pBuf; } #else for (j=0;nSize>0&&jRead(pIn, nUnencryptedHdr); aDecryptMain.Write(pIn, nUnencryptedHdr); - delete pIn; + delete [] pIn; DecryptXOR(aCtx, *pStrm, aDecryptMain); -- cgit v1.2.3 From a086a99bb514c48f660469e635a003c2e3730a8a Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Mon, 9 Nov 2009 12:48:11 +0000 Subject: #b6898803# ensure to read only as many TCs as are there --- sw/source/filter/ww8/ww8par2.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 635a2b7e6a..7e81a73f68 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -1170,6 +1170,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS) pS++; short nLen = (INT16)SVBT16ToShort( pS - 2 ); // nicht schoen + BYTE nCols = *pS; // Anzahl der Zellen short nOldCols = nWwCols; @@ -1200,7 +1201,11 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS) setcelldefaults(pTCs,nCols); } - if( nFileCols ) + short nColsToRead = nFileCols; + if (nColsToRead > nCols) + nColsToRead = nCols; + + if( nColsToRead ) { // lies TCs ein @@ -1216,9 +1221,9 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS) if( bVer67 ) { WW8_TCellVer6* pTc = (WW8_TCellVer6*)pT; - for(i=0; iaBits1Ver6 ); pAktTC->bFirstMerged = ( ( aBits1 & 0x01 ) != 0 ); @@ -1248,7 +1253,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS) else { WW8_TCellVer8* pTc = (WW8_TCellVer8*)pT; - for (int k = 0; k < nFileCols; ++k, ++pAktTC, ++pTc ) + for (int k = 0; k < nColsToRead; ++k, ++pAktTC, ++pTc ) { UINT16 aBits1 = SVBT16ToShort( pTc->aBits1Ver8 ); pAktTC->bFirstMerged = ( ( aBits1 & 0x0001 ) != 0 ); -- cgit v1.2.3 From a6d9bf75466bea8206673fd11273aed7eecaeb7c Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Wed, 11 Nov 2009 15:00:58 +0000 Subject: #b6898803# WW8TabBandDesc::ProcessSprmTSetBRC: check bounds --- sw/source/filter/ww8/ww8par2.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 7e81a73f68..b737fc1102 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -1301,6 +1301,12 @@ void WW8TabBandDesc::ProcessSprmTSetBRC(bool bVer67, const BYTE* pParamsTSetBRC) BYTE nitcLim = pParamsTSetBRC[1];// (last col to be changed)+1 BYTE nFlag = *(pParamsTSetBRC+2); + if (nitcFirst >= nWwCols) + return; + + if (nitcLim > nWwCols) + nitcLim = nWwCols; + bool bChangeRight = (nFlag & 0x08) ? true : false; bool bChangeBottom = (nFlag & 0x04) ? true : false; bool bChangeLeft = (nFlag & 0x02) ? true : false; -- cgit v1.2.3 From eaee7cb9d25bb09e320d236daaf9cac82cf74336 Mon Sep 17 00:00:00 2001 From: Oliver Specht Date: Fri, 13 Nov 2009 08:30:06 +0000 Subject: #i106730# load styles from source, not from working document --- sw/source/ui/dbui/dbmgr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index ef1bc3375c..36b79871f4 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -3298,7 +3298,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, } if(nDocNo == 1 || bPageStylesWithHeaderFooter) { - pTargetView->GetDocShell()->_LoadStyles( *pWorkView->GetDocShell(), sal_True ); + pTargetView->GetDocShell()->_LoadStyles( *rSourceView.GetDocShell(), sal_True ); } if(nDocNo > 1) { -- cgit v1.2.3 From 9d91d92be52821c81d8e971927fdbb5682bf6353 Mon Sep 17 00:00:00 2001 From: Oliver Düsterhoff Date: Fri, 13 Nov 2009 09:32:21 +0000 Subject: #i106218# method - consider that the outline style itself is set at the parent paragraph style of one of the to the outline style assigned paragraph styles. --- sw/source/core/doc/docfmt.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 3151e2f291..2f091671f0 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -2669,18 +2669,18 @@ namespace docfunc if ( !pParentTxtFmtColl ) continue; - // --> OD 2007-12-07 #i77708# - // consider that explicitly no list style is set - empty string - // at numrule item. -// const SwNumRuleItem& rDirectItem = pParentTxtFmtColl->GetNumRule(); -// if ( rDirectItem.GetValue().Len() != 0 ) if ( SFX_ITEM_SET == pParentTxtFmtColl->GetItemState( RES_PARATR_NUMRULE ) ) { - bRet = true; - break; + // --> OD 2009-11-12 #i106218# + // consider that the outline style is set + const SwNumRuleItem& rDirectItem = pParentTxtFmtColl->GetNumRule(); + if ( rDirectItem.GetValue() != rDoc.GetOutlineNumRule()->GetName() ) + { + bRet = true; + break; + } + // <-- } - // <-- - } } -- cgit v1.2.3 From 65379cb3ab345cee576cff0db9c106a72615cf5d Mon Sep 17 00:00:00 2001 From: mst Date: Mon, 16 Nov 2009 12:33:38 +0000 Subject: #i106930#: thints.cxx: isNestedAny: new empty hints at start/end _not_ nested --- sw/qa/complex/writer/TextPortionEnumerationTest.java | 13 +++++++++++++ sw/source/core/txtnode/thints.cxx | 6 ++++-- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java index aec77b891a..a07b3cccad 100755 --- a/sw/qa/complex/writer/TextPortionEnumerationTest.java +++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java @@ -2099,6 +2099,19 @@ public class TextPortionEnumerationTest extends ComplexTestCase .appendChild( url4.dup().appendChild( new TextNode("7") ) ) .appendChild( new TextNode("89") ); doTest(root, false); + // empty + TreeNode url6 = new HyperlinkNode( mkName("url") ); + inserter.insertRange( new Range(7, 7, url6) ); + root = new TreeNode() + .appendChild( url2.dup().appendChild( new TextNode("12") ) ) + .appendChild( url1.dup().appendChild( new TextNode("3") ) ) + .appendChild( url4.dup().appendChild( new TextNode("4") ) ) + .appendChild( url5.dup().appendChild( new TextNode("56") ) ) + .appendChild( url4.dup().appendChild( new TextNode("7") ) ) +// this one gets eaten, but we still need to test inserting it (#i106930#) +// .appendChild( url6.dup().appendChild( new TextNode("") ) ) + .appendChild( new TextNode("89") ); + doTest(root, false); } public void testRangeHyperlinkRuby() throws Exception diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 8aa1e690dd..a09a7ccec5 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -153,12 +153,14 @@ bool isOverlap(const xub_StrLen nStart1, const xub_StrLen nEnd1, || ((nStart1 < nStart2) && (nStart2 < nEnd1) && (nEnd1 < nEnd2)); // (2) } +/// #i106930#: now asymmetric: empty hint1 is _not_ nested, but empty hint2 is static bool isNestedAny(const xub_StrLen nStart1, const xub_StrLen nEnd1, const xub_StrLen nStart2, const xub_StrLen nEnd2) { - return (nStart1 == nStart2) // in this case ends do not matter - || ((nStart1 < nStart2) ? (nEnd1 >= nEnd2) : (nEnd1 <= nEnd2)); + return ((nStart1 == nStart2) || (nEnd1 == nEnd2)) + ? (nStart1 != nEnd1) // same start/end: nested except if hint1 empty + : ((nStart1 < nStart2) ? (nEnd1 >= nEnd2) : (nEnd1 <= nEnd2)); } static -- cgit v1.2.3 From 9a32e4c31c714f03f2c2753dcaa0c7c73fd6dd16 Mon Sep 17 00:00:00 2001 From: C?dric Bosdonnat Date: Mon, 16 Nov 2009 16:49:18 +0100 Subject: cbosdo01: migrating from SVN to HG. --- sw/inc/comcore.hrc | 3 ++- sw/source/core/edit/autofmt.cxx | 9 +++++++-- sw/source/ui/utlui/utlui.src | 4 ++++ 3 files changed, 13 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/comcore.hrc b/sw/inc/comcore.hrc index 826081455f..9122841e9d 100644 --- a/sw/inc/comcore.hrc +++ b/sw/inc/comcore.hrc @@ -115,8 +115,9 @@ #define STR_AUTOFMTREDL_SET_TMPL_HEADLINE 18 #define STR_AUTOFMTREDL_SET_NUMBULET 19 #define STR_AUTOFMTREDL_DEL_MORELINES 20 +#define STR_AUTOFMTREDL_NON_BREAK_SPACE 21 // !!!!!!!!!!!!!!!!!!!!!!!!!! das Ende immer richtig setzen !!!!!!!!!!!! -#define STR_AUTOFMTREDL_END 21 +#define STR_AUTOFMTREDL_END 22 #endif diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 9622075cd1..255b225332 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -319,6 +319,7 @@ void SwAutoFormat::_SetRedlineTxt( USHORT nActionId ) case STR_AUTOFMTREDL_FRACTION: case STR_AUTOFMTREDL_DASH: case STR_AUTOFMTREDL_ORDINAL: + case STR_AUTOFMTREDL_NON_BREAK_SPACE: nSeqNo = ++nRedlAutoFmtSeqId; break; } @@ -1885,7 +1886,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos ) !aFlags.bCptlSttSntnc && !aFlags.bCptlSttWrd && !aFlags.bChgFracionSymbol && !aFlags.bChgOrdinalNumber && !aFlags.bChgToEnEmDash && !aFlags.bSetINetAttr && - !aFlags.bChgWeightUnderl) ) + !aFlags.bChgWeightUnderl && !aFlags.bAddNonBrkSpace) ) return; const String* pTxt = &pAktTxtNd->GetTxt(); @@ -1894,7 +1895,8 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos ) BOOL bGetLanguage = aFlags.bChgOrdinalNumber || aFlags.bChgToEnEmDash || aFlags.bSetINetAttr || - aFlags.bCptlSttWrd || aFlags.bCptlSttSntnc; + aFlags.bCptlSttWrd || aFlags.bCptlSttSntnc || + aFlags.bAddNonBrkSpace; aDelPam.DeleteMark(); @@ -2123,6 +2125,9 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos ) ( aFlags.bChgToEnEmDash && SetRedlineTxt( STR_AUTOFMTREDL_DASH ) && pATst->FnChgToEnEmDash( aACorrDoc, *pTxt, nSttPos, nPos, eLang ) ) || + ( aFlags.bAddNonBrkSpace && + SetRedlineTxt( STR_AUTOFMTREDL_NON_BREAK_SPACE ) && + pATst->FnAddNonBrkSpace( aACorrDoc, *pTxt, nSttPos, nPos, eLang ) ) || ( aFlags.bSetINetAttr && ( nPos == pTxt->Len() || IsSpace( pTxt->GetChar( nPos )) ) && SetRedlineTxt( STR_AUTOFMTREDL_DETECT_URL ) && diff --git a/sw/source/ui/utlui/utlui.src b/sw/source/ui/utlui/utlui.src index 7a45772630..3aad027851 100644 --- a/sw/source/ui/utlui/utlui.src +++ b/sw/source/ui/utlui/utlui.src @@ -122,6 +122,10 @@ Resource RID_SHELLRES_AUTOFMTSTRS { Text [ en-US ] = "Combine paragraphs"; }; + String STR_AUTOFMTREDL_NON_BREAK_SPACE +1 + { + Text [ en-US ] = "Add non breaking space"; + }; }; -- cgit v1.2.3 From 6312d237395a04db7e5e53838c299c8823524f67 Mon Sep 17 00:00:00 2001 From: C?dric Bosdonnat Date: Tue, 17 Nov 2009 12:33:55 +0100 Subject: cbosdo02: field patch to upstream applied --- sw/inc/IDocumentMarkAccess.hxx | 7 ++ sw/inc/IMark.hxx | 23 +++- sw/inc/crsrsh.hxx | 5 +- sw/inc/editsh.hxx | 4 + sw/inc/hintids.hxx | 6 +- sw/inc/pam.hxx | 1 + sw/inc/unoobj.hxx | 12 +-- sw/source/core/crsr/bookmrk.cxx | 122 +++++++++++++++++++-- sw/source/core/crsr/crossrefbookmark.cxx | 2 +- sw/source/core/crsr/crstrvl.cxx | 11 ++ sw/source/core/crsr/pam.cxx | 38 +++++-- sw/source/core/doc/docbm.cxx | 60 +++++++++-- sw/source/core/edit/edtox.cxx | 22 ++++ sw/source/core/inc/MarkManager.hxx | 10 ++ sw/source/core/inc/bookmrk.hxx | 43 +++++--- sw/source/core/inc/crossrefbookmark.hxx | 6 +- sw/source/core/text/inftxt.cxx | 57 ++++++---- sw/source/core/text/portxt.cxx | 116 +++++++++++++++----- sw/source/core/unocore/unobkm.cxx | 104 ++++++++++-------- sw/source/filter/ww8/wrtw8nds.cxx | 111 +++++++++++++++---- sw/source/filter/ww8/wrtww8.cxx | 59 ++++++++-- sw/source/filter/ww8/wrtww8.hxx | 2 + sw/source/filter/ww8/ww8par.cxx | 34 ++---- sw/source/filter/ww8/ww8par.hxx | 42 ++++---- sw/source/filter/ww8/ww8par3.cxx | 179 ++++++++++++++++--------------- sw/source/filter/ww8/ww8par5.cxx | 107 +++++++++++++++++- sw/source/ui/docvw/edtwin.cxx | 32 +++++- sw/source/ui/inc/view.hxx | 4 +- sw/source/ui/inc/wrtsh.hxx | 4 + sw/source/ui/uiview/viewling.cxx | 136 +++++++++++++++++++++++ sw/source/ui/wrtsh/wrtsh1.cxx | 8 ++ sw/source/ui/wrtsh/wrtsh2.cxx | 7 ++ 32 files changed, 1057 insertions(+), 317 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx index e31eec0131..0625e016b2 100644 --- a/sw/inc/IDocumentMarkAccess.hxx +++ b/sw/inc/IDocumentMarkAccess.hxx @@ -86,6 +86,13 @@ class IDocumentMarkAccess const ::rtl::OUString& rProposedName, MarkType eMark) =0; + virtual sw::mark::IFieldmark* makeFieldBookmark( const SwPaM& rPaM, + const rtl::OUString& rName, + const rtl::OUString& rType) = 0; + virtual sw::mark::IFieldmark* makeNoTextFieldBookmark( const SwPaM& rPaM, + const rtl::OUString& rName, + const rtl::OUString& rType) = 0; + /** Returns a mark in the document for a paragraph. If there is none, a mark will be created. diff --git a/sw/inc/IMark.hxx b/sw/inc/IMark.hxx index 8507b1d2eb..5143843cab 100644 --- a/sw/inc/IMark.hxx +++ b/sw/inc/IMark.hxx @@ -51,12 +51,12 @@ namespace sw { namespace mark { public: //getters - virtual const SwPosition& GetMarkPos() const =0; + virtual SwPosition& GetMarkPos() const =0; // GetOtherMarkPos() is only guaranteed to return a valid // reference if IsExpanded() returned true - virtual const SwPosition& GetOtherMarkPos() const =0; - virtual const SwPosition& GetMarkStart() const =0; - virtual const SwPosition& GetMarkEnd() const =0; + virtual SwPosition& GetOtherMarkPos() const =0; + virtual SwPosition& GetMarkStart() const =0; + virtual SwPosition& GetMarkEnd() const =0; virtual const ::rtl::OUString& GetName() const =0; virtual bool IsExpanded() const =0; virtual bool IsCoveringPosition(const SwPosition& rPos) const =0; @@ -79,6 +79,9 @@ namespace sw { namespace mark { return GetMarkEnd() < rPos; } bool EndsAfter(const SwPosition& rPos) const { return GetMarkEnd() > rPos; } + + // Use for debugging purpose + virtual rtl::OUString toString( ) const = 0; }; class IBookmark @@ -95,13 +98,25 @@ namespace sw { namespace mark : virtual public IMark { public: + typedef std::pair< ::rtl::OUString, ::rtl::OUString > ParamPair_t; + //getters virtual ::rtl::OUString GetFieldname() const =0; virtual ::rtl::OUString GetFieldHelptext() const =0; + virtual void addParam( rtl::OUString rParamName, + rtl::OUString rParamValue, + bool bReplaceExisting = true ) = 0; + virtual void addParam( const char* paramName, int value ) = 0; + virtual void addParams( std::vector& params ) = 0; + virtual int getNumOfParams() const = 0; + virtual ParamPair_t getParam( int pos ) const = 0; + virtual ParamPair_t getParam( const char *name, const char *defaultValue = NULL ) const = 0; + //setters virtual void SetFieldname(const ::rtl::OUString& rFieldname) =0; virtual void SetFieldHelptext(const ::rtl::OUString& rFieldHelptext) =0; + virtual void invalidate( ) = 0; }; class ICheckboxFieldmark diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 692184be2d..157b404cfd 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -45,6 +45,7 @@ #include #include #include +#include // einige Forward Deklarationen @@ -110,7 +111,8 @@ struct SwContentAtPos SW_REFMARK = 0x0100, SW_NUMLABEL = 0x0200, // #i23726# SW_CONTENT_CHECK = 0x0400, // --> FME 2005-05-13 #i43742# <-- - SW_SMARTTAG = 0x0800 + SW_SMARTTAG = 0x0800, + SW_FORMCTRL = 0x1000 #ifndef PRODUCT ,SW_CURR_ATTRS = 0x4000 // nur zum Debuggen ,SW_TABLEBOXVALUE = 0x8000 // nur zum Debuggen @@ -122,6 +124,7 @@ struct SwContentAtPos const SfxPoolItem* pAttr; const SwRedline* pRedl; SwCntntNode * pNode; // #i23726# + const sw::mark::IFieldmark* pFldmark; } aFnd; int nDist; // #i23726# diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index e858334fd5..4ff021b6ee 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -415,6 +416,9 @@ public: const SwTOXType* GetTOXType(TOXTypes eTyp, USHORT nId) const; void InsertTOXType(const SwTOXType& rTyp); + // new field stuff + BOOL UpdateField(sw::mark::IFieldmark &fieldBM); + //AutoMark file const String& GetTOIAutoMarkURL() const; void SetTOIAutoMarkURL(const String& rSet); diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx index f3dcb30d01..4181183546 100644 --- a/sw/inc/hintids.hxx +++ b/sw/inc/hintids.hxx @@ -44,12 +44,8 @@ #define CH_TXT_ATR_FIELDEND ((sal_Unicode)0x05) #define CH_TXT_ATR_SUBST_FIELDSTART ("[") #define CH_TXT_ATR_SUBST_FIELDEND ("]") -//#define CH_TXT_ATR_FORMELEMENT ((sal_Unicode)'#') #define CH_TXT_ATR_FORMELEMENT ((sal_Unicode)0x06) -/* -#define FIELD_BOOKMARK_PREFIX "__" -#define FIELD_FORM_BOOKMARK_PREFIX "__FORM" -*/ + /* * Hier kommen erst mal die enums fuer die Hints */ diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index 1a1cb98b52..30427864a9 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -272,6 +272,7 @@ public: DECL_FIXEDMEMPOOL_NEWDEL(SwPaM); String GetTxt() const; + void Invalidate(); }; diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx index e2e8b02dde..1b58d7c7da 100644 --- a/sw/inc/unoobj.hxx +++ b/sw/inc/unoobj.hxx @@ -671,13 +671,13 @@ class SwXFieldmark : public SwXFieldmark_BASE SwXFieldmark(bool isReplacementObject, ::sw::mark::IMark* pBkm = 0, SwDoc* pDoc = 0); virtual void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual ::rtl::OUString SAL_CALL getDescription(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::sal_Int16 SAL_CALL getType( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int16 SAL_CALL getRes( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getFieldType(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setFieldType( const ::rtl::OUString& description ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setType( ::sal_Int16 fieldType ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setRes( ::sal_Int16 res ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setDescription( const ::rtl::OUString& description ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL getParamCount( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getParamName(::sal_Int16 i) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::rtl::OUString SAL_CALL getParamValue(::sal_Int16 i) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addParam( const ::rtl::OUString& name, const ::rtl::OUString& value, ::sal_Bool replaceExisting ) throw (::com::sun::star::uno::RuntimeException); }; /*-----------------23.02.98 10:45------------------- diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 8918058c31..eaee9a5a76 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -77,20 +77,20 @@ namespace const sal_Unicode aStartMark, const sal_Unicode aEndMark) { - const SwPosition& rStart = pField->GetMarkStart(); - const SwPosition& rEnd = pField->GetMarkEnd(); + SwPosition& rStart = pField->GetMarkStart(); + SwPosition& rEnd = pField->GetMarkEnd(); SwTxtNode const * const pStartTxtNode = io_pDoc->GetNodes()[rStart.nNode]->GetTxtNode(); SwTxtNode const * const pEndTxtNode = io_pDoc->GetNodes()[rEnd.nNode]->GetTxtNode(); const sal_Unicode ch_start=pStartTxtNode->GetTxt().GetChar(rStart.nContent.GetIndex()); const sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar(rEnd.nContent.GetIndex()-1); - const SwPaM aStartPaM(rStart); - const SwPaM aEndPaM(rEnd); + SwPaM aStartPaM(rStart); + SwPaM aEndPaM(rEnd); io_pDoc->StartUndo(UNDO_UI_REPLACE, NULL); if(ch_start != aStartMark) { io_pDoc->InsertString(aStartPaM, aStartMark); } - if(aEndMark && ch_end != aEndMark) + if ( aEndMark && ( ch_end != aEndMark ) && ( rStart != rEnd ) ) { io_pDoc->InsertString(aEndPaM, aEndMark); } @@ -114,6 +114,11 @@ namespace sw { namespace mark } } + bool MarkBase::IsCoveringPosition(const SwPosition& rPos) const + { + return GetMarkStart() <= rPos && rPos <= GetMarkEnd(); + } + void MarkBase::SetMarkPos(const SwPosition& rNewPos) { ::boost::scoped_ptr(new SwPosition(rNewPos)).swap(m_pPos1); @@ -126,6 +131,17 @@ namespace sw { namespace mark //lcl_FixPosition(*m_pPos2); } + rtl::OUString MarkBase::toString( ) const + { + rtl::OUStringBuffer buf; + buf.appendAscii( "Mark: ( Name, [ Node1, Index1 ] ): ( " ); + buf.append( m_aName ).appendAscii( ", [ " ); + buf.append( sal_Int32( GetMarkPos().nNode.GetIndex( ) ) ).appendAscii( ", " ); + buf.append( sal_Int32( GetMarkPos().nContent.GetIndex( ) ) ).appendAscii( " ] )" ); + + return buf.makeStringAndClear( ); + } + MarkBase::~MarkBase() { } @@ -267,6 +283,96 @@ namespace sw { namespace mark if(!IsExpanded()) SetOtherMarkPos(GetMarkPos()); } + + rtl::OUString Fieldmark::toString( ) const + { + rtl::OUStringBuffer buf; + buf.appendAscii( "Fieldmark: ( Name, Type, [ Nd1, Id1 ], [ Nd2, Id2 ] ): ( " ); + buf.append( m_aName ).appendAscii( ", " ); + buf.append( m_aFieldname ).appendAscii( ", [ " ); + buf.append( sal_Int32( GetMarkPos().nNode.GetIndex( ) ) ).appendAscii( ", " ); + buf.append( sal_Int32( GetMarkPos( ).nContent.GetIndex( ) ) ).appendAscii( " ], [" ); + buf.append( sal_Int32( GetOtherMarkPos().nNode.GetIndex( ) ) ).appendAscii( ", " ); + buf.append( sal_Int32( GetOtherMarkPos( ).nContent.GetIndex( ) ) ).appendAscii( " ] ) " ); + + return buf.makeStringAndClear( ); + } + + void Fieldmark::addParam( ::rtl::OUString paramName, + ::rtl::OUString paramValue, + bool replaceExisting ) + { + if ( replaceExisting ) + { + bool replaced = false; + const int len = m_params.size( ); + for ( int i = 0; i < len; i++ ) + { + if ( m_params[i].first.compareTo( paramName ) == 0 ) + { + m_params[i] = ParamPair_t( paramName, paramValue ); + replaced = true; + } + } + if ( !replaced ) + { + m_params.push_back( ParamPair_t( paramName, paramValue ) ); + } + } + else + { + m_params.push_back( ParamPair_t( paramName, paramValue ) ); + } + } + + void Fieldmark::addParam( const char *paramName, int value ) + { + rtl::OUString sName = rtl::OUString::createFromAscii( paramName ); + rtl::OUString sValue =::rtl::OUString::valueOf( ( sal_Int32 ) value ); + addParam( sName, sValue ); + } + + void Fieldmark::addParams( std::vector < ParamPair_t > ¶ms ) + { + for ( std::vector < ParamPair_t >::iterator i = params.begin( ); + i != params.end( ); i++ ) + { + m_params.push_back( *i ); + } + } + + int Fieldmark::getNumOfParams( ) const + { + return m_params.size( ); + } + + Fieldmark::ParamPair_t Fieldmark::getParam( int pos ) const + { + return m_params[pos]; + } + + Fieldmark::ParamPair_t Fieldmark::getParam( const char *name, + const char *defaultValue ) const + { + for ( std::vector < ParamPair_t >::iterator i = const_cast< Fieldmark* >( this )->m_params.begin( ); + i != m_params.end( ); i++ ) + { + if ( i->first.compareToAscii( name ) == 0 ) + { + return *i; + } + } + return ParamPair_t( rtl::OUString( ), + ( defaultValue ? + rtl::OUString::createFromAscii( defaultValue ) : + rtl::OUString( ) ) ); + } + + void Fieldmark::invalidate( ) + { + SwPaM aPaM( this->GetMarkPos(), this->GetOtherMarkPos() ); + aPaM.Invalidate(); + } const ::rtl::OUString Fieldmark::our_sNamePrefix = ::rtl::OUString::createFromAscii("__Fieldmark__"); @@ -285,7 +391,11 @@ namespace sw { namespace mark void CheckboxFieldmark::InitDoc(SwDoc* const io_pDoc) { - lcl_AssureFieldMarksSet(this, io_pDoc, CH_TXT_ATR_FIELDSTART, CH_TXT_ATR_FIELDEND); + lcl_AssureFieldMarksSet(this, io_pDoc, CH_TXT_ATR_FORMELEMENT, CH_TXT_ATR_FIELDEND); + + // For some reason the end mark is moved from 1 by the Insert: we don't + // want this for checkboxes + this->GetMarkEnd( ).nContent--; } void CheckboxFieldmark::SetChecked(bool checked) diff --git a/sw/source/core/crsr/crossrefbookmark.cxx b/sw/source/core/crsr/crossrefbookmark.cxx index 8ae112a783..0a8929d007 100644 --- a/sw/source/core/crsr/crossrefbookmark.cxx +++ b/sw/source/core/crsr/crossrefbookmark.cxx @@ -67,7 +67,7 @@ namespace sw { namespace mark MarkBase::SetMarkPos(rNewPos); } - const SwPosition& CrossRefBookmark::GetOtherMarkPos() const + SwPosition& CrossRefBookmark::GetOtherMarkPos() const { OSL_PRECOND(false, "" diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index d788c1e66e..15e3dafc75 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1175,6 +1175,17 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, } } + if( !bRet && SwContentAtPos::SW_FORMCTRL & rCntntAtPos.eCntntAtPos ) + { + IDocumentMarkAccess* pMarksAccess = GetDoc()->getIDocumentMarkAccess( ); + sw::mark::IFieldmark* pFldBookmark = pMarksAccess->getFieldmarkFor( aPos ); + if( bCrsrFoundExact && pTxtNd && pFldBookmark) { + rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FORMCTRL; + rCntntAtPos.aFnd.pFldmark = pFldBookmark; + bRet=TRUE; + } + } + if( !bRet && SwContentAtPos::SW_FTN & rCntntAtPos.eCntntAtPos ) { if( aTmpState.bFtnNoInfo ) diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index d80f1a2465..e8bb96ed82 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -56,6 +56,7 @@ #include // #111827# #include +#include // fuer den dummen ?MSC-? Compiler inline xub_StrLen GetSttOrEnd( BOOL bCondition, const SwCntntNode& rNd ) @@ -827,16 +828,21 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const } //FIXME FieldBk // TODO: Form Protection when Enhanced Fields are enabled -// if( !bRet ) -// { -// const SwDoc *pDoc=GetDoc(); -// SwBookmark *pA = ( pDoc && pPoint ? pDoc->getFieldmarkFor( *pPoint ) : NULL ); -// SwBookmark *pB = ( pDoc && pMark ? pDoc->getFieldmarkFor( *pMark ) : pA ); -// bRet = ( pA != pB ); -// bool bProtectForm = pDoc->get( IDocumentSettingAccess::PROTECT_FORM ); -// if( bProtectForm ) -// bRet |= ( pA==NULL || pB==NULL ); -// } + if (!bRet) { + const SwDoc *pDoc = GetDoc(); + sw::mark::IMark* pA = NULL; + sw::mark::IMark* pB = NULL; + if ( pDoc ) + { + const IDocumentMarkAccess* pMarksAccess = pDoc->getIDocumentMarkAccess( ); + pA = GetPoint() ? pMarksAccess->getFieldmarkFor( *GetPoint( ) ) : NULL; + pB = GetMark( ) ? pMarksAccess->getFieldmarkFor( *GetMark( ) ) : pA; + bRet = ( pA != pB ); + } + bool bProtectForm = pDoc->get( IDocumentSettingAccess::PROTECT_FORM ); + if ( bProtectForm ) + bRet |= ( pA == NULL || pB == NULL ); + } return bRet; } @@ -1223,6 +1229,18 @@ BOOL SwPaM::Overlap(const SwPaM & a, const SwPaM & b) return !(*b.End() <= *a.Start() || *a.End() <= *b.End()); } +void SwPaM::Invalidate() +{ + const SwNode *_pNd=this->GetNode(); + const SwTxtNode *_pTxtNd=(_pNd!=NULL?_pNd->GetTxtNode():NULL); + if (_pTxtNd!=NULL) { + //pretent we've added a char to force layout to recalc the portion... + SwInsChr aHint(_pTxtNd->GetIndex()); + SwModify *_pModify=(SwModify*)_pTxtNd; + _pModify->Modify( 0, &aHint); + } +} + BOOL SwPaM::LessThan(const SwPaM & a, const SwPaM & b) { return (*a.Start() < *b.Start()) || (*a.Start() == *b.Start() && *a.End() < *b.End()); diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 80973abeca..86924a5d95 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -66,6 +67,23 @@ #include #include +static void lcl_docbm_FixPosition( SwPosition& rPos ) +{ + // make sure the position has 1) the proper node, and 2) a proper index + SwTxtNode* pTxtNode = rPos.nNode.GetNode().GetTxtNode(); + + if( rPos.nContent.GetIndex() > ( pTxtNode == NULL ? 0 : pTxtNode->Len() ) ) + { + DBG_ERROR( "illegal position" ); + xub_StrLen nLen = rPos.nContent.GetIndex(); + if( pTxtNode == NULL ) + nLen = 0; + else if( nLen >= pTxtNode->Len() ) + nLen = pTxtNode->Len(); + rPos.nContent.Assign( pTxtNode, nLen ); + } +} + using namespace ::std; using namespace ::boost; @@ -309,6 +327,17 @@ namespace sw { namespace mark : m_pDoc(&rDoc) { } + void MarkManager::dumpFieldmarks( ) const + { + const_iterator_t pIt = m_vFieldmarks.begin( ); + for ( ; pIt != m_vFieldmarks.end( ); pIt++ ) + { + rtl::OUString str = ( *pIt )->toString( ); + fprintf( stderr, "%s\n", + rtl::OUStringToOString( str, RTL_TEXTENCODING_UTF8 ).getStr( ) ); + } + } + ::sw::mark::IMark* MarkManager::makeMark(const SwPaM& rPaM, const ::rtl::OUString& rName, const IDocumentMarkAccess::MarkType eType) @@ -414,6 +443,30 @@ namespace sw { namespace mark return pMark.get(); } + ::sw::mark::IFieldmark* MarkManager::makeFieldBookmark( const SwPaM& rPaM, + const rtl::OUString& rName, + const rtl::OUString& rType ) + { + sw::mark::IMark* pMark = makeMark( rPaM, rName, + IDocumentMarkAccess::TEXT_FIELDMARK ); + sw::mark::IFieldmark* pFieldMark = dynamic_cast( pMark ); + pFieldMark->SetFieldname( rType ); + + return pFieldMark; + } + + ::sw::mark::IFieldmark* MarkManager::makeNoTextFieldBookmark( const SwPaM& rPaM, + const rtl::OUString& rName, + const rtl::OUString& rType) + { + sw::mark::IMark* pMark = makeMark( rPaM, rName, + IDocumentMarkAccess::CHECKBOX_FIELDMARK ); + sw::mark::IFieldmark* pFieldMark = dynamic_cast( pMark ); + pFieldMark->SetFieldname( rType ); + + return pFieldMark; + } + ::sw::mark::IMark* MarkManager::getMarkForTxtNode(const SwTxtNode& rTxtNode, const IDocumentMarkAccess::MarkType eType) { @@ -767,12 +820,7 @@ namespace sw { namespace mark { const_iterator_t pFieldmark = find_if( m_vFieldmarks.begin(), - // we do not need to check marks starting behind the positon - lower_bound( - m_vFieldmarks.begin(), - m_vFieldmarks.end(), - rPos, - bind(&IMark::StartsAfter, _1, _2)), + m_vFieldmarks.end( ), bind(&IMark::IsCoveringPosition, _1, rPos)); if(pFieldmark == m_vFieldmarks.end()) return NULL; return dynamic_cast(pFieldmark->get()); diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index c4b81facd8..4f7df558e1 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -60,6 +60,9 @@ #ifndef _STATSTR_HRC #include #endif +#include +#include + using namespace ::com::sun::star; using namespace ::com::sun::star::i18n; @@ -235,6 +238,25 @@ BOOL SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet ) return bRet; } +BOOL SwEditShell::UpdateField( sw::mark::IFieldmark &fieldBM) +{ +// SwDocShell* pDocSh = pDoc->GetDocShell(); + //@TODO implement me...; add undo etc... + if ( pDoc && fieldBM.IsExpanded( ) ) { + SwPosition aSttPos = fieldBM.GetMarkStart( ); + aSttPos.nContent++; + + SwPosition aEndPos = fieldBM.GetMarkEnd( ); + aEndPos.nContent--; + + SwPaM aPaM( aSttPos, aEndPos ); + pDoc->DeleteRange(aPaM); + pDoc->InsertString(aPaM, String::CreateFromAscii("Implement me ;-)") ); + } + return TRUE; +} + + /*-------------------------------------------------------------------- Beschreibung: Aktuelles Verzeichnis vor oder in dem der Cursor steht diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx index 605b15d67c..878a3b8a0e 100644 --- a/sw/source/core/inc/MarkManager.hxx +++ b/sw/source/core/inc/MarkManager.hxx @@ -43,8 +43,18 @@ namespace sw { namespace mark public: MarkManager(/*[in/out]*/ SwDoc& rDoc); + void dumpFieldmarks( ) const; + // IDocumentMarkAccess virtual ::sw::mark::IMark* makeMark(const SwPaM& rPaM, const ::rtl::OUString& rName, IDocumentMarkAccess::MarkType eMark); + + virtual sw::mark::IFieldmark* makeFieldBookmark( const SwPaM& rPaM, + const rtl::OUString& rName, + const rtl::OUString& rType); + virtual sw::mark::IFieldmark* makeNoTextFieldBookmark( const SwPaM& rPaM, + const rtl::OUString& rName, + const rtl::OUString& rType); + virtual ::sw::mark::IMark* getMarkForTxtNode(const SwTxtNode& rTxtNode, IDocumentMarkAccess::MarkType eMark); virtual void repositionMark(::sw::mark::IMark* io_pMark, const SwPaM& rPaM); diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx index 415deffa24..dffeafe594 100644 --- a/sw/source/core/inc/bookmrk.hxx +++ b/sw/source/core/inc/bookmrk.hxx @@ -48,26 +48,31 @@ namespace sw { namespace mark { public: //getters - virtual const SwPosition& GetMarkPos() const + virtual SwPosition& GetMarkPos() const { return *m_pPos1; } virtual const ::rtl::OUString& GetName() const { return m_aName; } - virtual bool IsCoveringPosition(const SwPosition& rPos) const - { return GetMarkStart() <= rPos && rPos <= GetMarkEnd(); }; - virtual const SwPosition& GetOtherMarkPos() const + virtual bool IsCoveringPosition(const SwPosition& rPos) const; + virtual SwPosition& GetOtherMarkPos() const { OSL_PRECOND(IsExpanded(), " - I have no other Pos set." ); return *m_pPos2; } - virtual const SwPosition& GetMarkStart() const + virtual SwPosition& GetMarkStart() const { - if(!m_pPos2 /* !IsExpanded()*/) return *m_pPos1; - return *m_pPos1 < *m_pPos2 ? *m_pPos1 : *m_pPos2; + if( !IsExpanded() ) return GetMarkPos( ); + if ( GetMarkPos( ) < GetOtherMarkPos( ) ) + return GetMarkPos(); + else + return GetOtherMarkPos( ); } - virtual const SwPosition& GetMarkEnd() const + virtual SwPosition& GetMarkEnd() const { - if(!m_pPos2 /* !IsExpanded()*/ ) return *m_pPos1; - return *m_pPos1 > *m_pPos2 ? *m_pPos1 : *m_pPos2; + if( !IsExpanded() ) return GetMarkPos(); + if ( GetMarkPos( ) > GetOtherMarkPos( ) ) + return GetMarkPos( ); + else + return GetOtherMarkPos( ); } virtual bool IsExpanded() const { return m_pPos2; } @@ -80,6 +85,8 @@ namespace sw { namespace mark virtual void ClearOtherMarkPos() { m_pPos2.reset(); } + virtual rtl::OUString toString( ) const; + virtual void Swap() { if(m_pPos2) @@ -183,18 +190,30 @@ namespace sw { namespace mark { public: Fieldmark(const SwPaM& rPaM); - + // getters ::rtl::OUString GetFieldname() const { return m_aFieldname; } ::rtl::OUString GetFieldHelptext() const { return m_aFieldHelptext; } + + void addParam( rtl::OUString rParamName, + rtl::OUString rParamValue, + bool bReplaceExisting = true ); + void addParam( const char* paramName, int value ); + void addParams(std::vector& params); + int getNumOfParams() const; + ParamPair_t getParam(int pos) const; + ParamPair_t getParam(const char *name, const char *defaultValue) const; // setters void SetFieldname(const ::rtl::OUString& aFieldname) { m_aFieldname = aFieldname; } void SetFieldHelptext(const ::rtl::OUString& aFieldHelptext) { m_aFieldHelptext = aFieldHelptext; } + void invalidate( ); + + virtual rtl::OUString toString( ) const; private: //int fftype; // Type: 0 = Text, 1 = Check Box, 2 = List //bool ffprot; @@ -202,7 +221,7 @@ namespace sw { namespace mark ::rtl::OUString m_aFieldname; ::rtl::OUString m_aFieldHelptext; static const ::rtl::OUString our_sNamePrefix; - + std::vector m_params; }; class TextFieldmark diff --git a/sw/source/core/inc/crossrefbookmark.hxx b/sw/source/core/inc/crossrefbookmark.hxx index d175b2130d..e560a29146 100644 --- a/sw/source/core/inc/crossrefbookmark.hxx +++ b/sw/source/core/inc/crossrefbookmark.hxx @@ -48,10 +48,10 @@ namespace sw { namespace mark const ::rtl::OUString& rPrefix); // getters - virtual const SwPosition& GetOtherMarkPos() const; - virtual const SwPosition& GetMarkStart() const + virtual SwPosition& GetOtherMarkPos() const; + virtual SwPosition& GetMarkStart() const { return *m_pPos1; } - virtual const SwPosition& GetMarkEnd() const + virtual SwPosition& GetMarkEnd() const { return *m_pPos1; } virtual bool IsExpanded() const { return false; } diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index b27a551ff7..bb7dddc7a7 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1145,27 +1145,30 @@ void SwTxtPaintInfo::DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) { SwRect aIntersect; CalcRect( rPor, &aIntersect, 0 ); - if ( aIntersect.HasArea() ) { - if (OnWin()) { - OutputDevice* pOutDev = (OutputDevice*)GetOut(); - pOutDev->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); - pOutDev->SetLineColor( Color(220, 233, 245)); - pOutDev->SetFillColor( Color(220, 233, 245)); - pOutDev->DrawRect( aIntersect.SVRect() ); - pOutDev->Pop(); - } - const int delta=10; - Rectangle r(aIntersect.Left()+delta, aIntersect.Top()+delta, aIntersect.Right()-delta, aIntersect.Bottom()-delta); - pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); - pOut->SetLineColor( Color(0, 0, 0)); - pOut->SetFillColor(); - pOut->DrawRect( r ); - if (checked) { - pOut->DrawLine(r.TopLeft(), r.BottomRight()); - pOut->DrawLine(r.TopRight(), r.BottomLeft()); + if ( aIntersect.HasArea() ) + { + if (OnWin() && SwViewOption::IsFieldShadings() && + !GetOpt().IsPagePreview()) + { + OutputDevice* pOut_ = (OutputDevice*)GetOut(); + pOut_->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); + pOut_->SetFillColor( SwViewOption::GetFieldShadingsColor() ); + pOut_->SetLineColor(); + pOut_->DrawRect( aIntersect.SVRect() ); + pOut_->Pop(); + } + const int delta=10; + Rectangle r(aIntersect.Left()+delta, aIntersect.Top()+delta, aIntersect.Right()-delta, aIntersect.Bottom()-delta); + pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); + pOut->SetLineColor( Color(0, 0, 0)); + pOut->SetFillColor(); + pOut->DrawRect( r ); + if (checked) { + pOut->DrawLine(r.TopLeft(), r.BottomRight()); + pOut->DrawLine(r.TopRight(), r.BottomLeft()); + } pOut->Pop(); } - } } /************************************************************************* @@ -1219,14 +1222,22 @@ void SwTxtPaintInfo::_DrawBackBrush( const SwLinePortion &rPor ) const } } bool bIsStartMark=(1==GetLen() && CH_TXT_ATR_FIELDSTART==GetTxt().GetChar(GetIdx())); - if(pFieldmark) OSL_TRACE("Found Fieldmark"); + if(pFieldmark) { + OSL_TRACE("Found Fieldmark"); +#if DEBUG + rtl::OUString str = pFieldmark->toString( ); + fprintf( stderr, "%s\n", rtl::OUStringToOString( str, RTL_TEXTENCODING_UTF8 ).getStr( ) ); +#endif + } if(bIsStartMark) OSL_TRACE("Found StartMark"); - if (OnWin() && (pFieldmark!=NULL || bIsStartMark)) + if (OnWin() && (pFieldmark!=NULL || bIsStartMark) && + SwViewOption::IsFieldShadings() && + !GetOpt().IsPagePreview()) { OutputDevice* pOutDev = (OutputDevice*)GetOut(); pOutDev->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); - pOutDev->SetLineColor( Color(220, 233, 245)); - pOutDev->SetFillColor( Color(220, 233, 245)); + pOutDev->SetFillColor( SwViewOption::GetFieldShadingsColor() ); + pOutDev->SetLineColor( ); pOutDev->DrawRect( aIntersect.SVRect() ); pOutDev->Pop(); } diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 6eeb5492e2..9f19b728b6 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -55,11 +55,13 @@ #include #include #include +#include #if OSL_DEBUG_LEVEL > 1 const sal_Char *GetLangName( const MSHORT nLang ); #endif +using namespace ::sw::mark; using namespace ::com::sun::star; using namespace ::com::sun::star::i18n::ScriptType; @@ -769,9 +771,10 @@ void SwHolePortion::HandlePortion( SwPortionHandler& rPH ) const rPH.Text( GetLen(), GetWhichPor() ); } -void SwFieldMarkPortion::Paint( const SwTxtPaintInfo & rInf) const +void SwFieldMarkPortion::Paint( const SwTxtPaintInfo & /*rInf*/) const { - SwTxtPortion::Paint(rInf); + // These shouldn't be painted! + // SwTxtPortion::Paint(rInf); } sal_Bool SwFieldMarkPortion::Format( SwTxtFormatInfo & ) @@ -781,38 +784,95 @@ sal_Bool SwFieldMarkPortion::Format( SwTxtFormatInfo & ) return ret; } +namespace ecma { + static int getCurrentListIndex( IFieldmark* pBM, + ::rtl::OUString *currentText = NULL ) + { + int currentIndex = pBM->getParam( ECMA_FORMDROPDOWN_RESULT, "0" ).second.toInt32(); + int idx = 0; + for( int i = 0; i < pBM->getNumOfParams(); i++ ) + { + IFieldmark::ParamPair_t p = pBM->getParam( i ); + if ( p.first.compareToAscii( ECMA_FORMDROPDOWN_LISTENTRY ) == 0 ) + { + if ( idx == currentIndex ) + { + if ( currentText!=NULL ) *currentText=p.second; + break; + } + else + idx++; + } + } + return idx; + } +} /* ecma */ //FIXME Fieldbk -//void SwFieldFormPortion::Paint( const SwTxtPaintInfo& rInf ) const -void SwFieldFormPortion::Paint( const SwTxtPaintInfo& ) const +void SwFieldFormPortion::Paint( const SwTxtPaintInfo& rInf ) const { -// SwTxtNode *pNd=const_cast(rInf.GetTxtFrm()->GetTxtNode()); -// const SwDoc *doc=pNd->GetDoc(); -// SwIndex aIndex( pNd, rInf.GetIdx() ); -// SwPosition aPosition(*pNd, aIndex); -// pMark = dynamic_cast< doc->getFieldmarkFor(aPosition); -// OSL_ENSURE(pMark, -// "SwFieldFormPortion::Paint(..)" -// " - Where is my form field bookmark???"); - -// bool checked=(pBM!=NULL?pBM->IsChecked():false); -// rInf.DrawCheckBox(*this , checked); -} + SwTxtNode* pNd = const_cast(rInf.GetTxtFrm()->GetTxtNode()); + const SwDoc *doc=pNd->GetDoc(); + SwIndex aIndex( pNd, rInf.GetIdx() ); + SwPosition aPosition(*pNd, aIndex); -sal_Bool SwFieldFormPortion::Format( SwTxtFormatInfo &rInf ) -{ - sal_Bool ret=0; -// ret=SwTxtPortion::Format(rInf); + IFieldmark* pBM = doc->getIDocumentMarkAccess( )->getFieldmarkFor( aPosition ); - Width(rInf.GetTxtHeight()); - Height(rInf.GetTxtHeight()); - SetAscent(rInf.GetAscent()); - //int h=rInf.GetTxtHeight(); + OSL_ENSURE( pBM, + "SwFieldFormPortion::Paint(..)" + " - Where is my form field bookmark???"); -/* - Height(100); - SetAscent(100); -*/ + if ( pBM != NULL ) + { + if ( pBM->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ) ) + { // a checkbox... + bool checked = pBM->getParam( ECMA_FORMCHECKBOX_CHECKED ).second.compareToAscii("on") == 0; + rInf.DrawCheckBox( *this , checked); + } + else if ( pBM->GetFieldname( ).equalsAscii( ECMA_FORMDROPDOWN ) ) + { // a list... + rtl::OUString aTxt; + rInf.DrawViewOpt( *this, POR_FLD ); + rInf.DrawText( aTxt, *this, 0, aTxt.getLength(), false ); + } + else + { + assert(0); // unknown type... + } + } +} + +sal_Bool SwFieldFormPortion::Format( SwTxtFormatInfo & rInf ) +{ + sal_Bool ret = 0; + SwTxtNode *pNd = const_cast < SwTxtNode * >( rInf.GetTxtFrm( )->GetTxtNode( ) ); + const SwDoc *doc = pNd->GetDoc( ); + SwIndex aIndex( pNd, rInf.GetIdx( ) ); + SwPosition aPosition( *pNd, aIndex ); + IFieldmark *pBM = doc->getIDocumentMarkAccess( )->getFieldmarkFor( aPosition ); + ASSERT( pBM != NULL, "Where is my form field bookmark???" ); + if ( pBM != NULL ) + { + if ( pBM->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ) ) + { + Width( rInf.GetTxtHeight( ) ); + Height( rInf.GetTxtHeight( ) ); + SetAscent( rInf.GetAscent( ) ); + } + else if ( pBM->GetFieldname( ).equalsAscii( ECMA_FORMDROPDOWN ) ) + { + ::rtl::OUString aTxt; + ecma::getCurrentListIndex( pBM, &aTxt ); + SwPosSize aPosSize = rInf.GetTxtSize( aTxt ); + Width( aPosSize.Width( ) ); + Height( aPosSize.Height( ) ); + SetAscent( rInf.GetAscent( ) ); + } + else + { + assert( 0 ); // unknown type... + } + } return ret; } diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index 11ea44de5f..61d1557d3c 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: unobkm.cxx,v $ - * $Revision: 1.17 $ + * $Revision: 1.16 $ * * This file is part of OpenOffice.org. * @@ -49,6 +49,7 @@ #include +using namespace ::sw::mark; using namespace ::com::sun::star; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; @@ -357,66 +358,85 @@ SwXFieldmark::SwXFieldmark(bool _isReplacementObject, ::sw::mark::IMark* pBkm, S , isReplacementObject(_isReplacementObject) { } -void SwXFieldmark::attachToRange(const uno::Reference< text::XTextRange > & xTextRange) +void SwXFieldmark::attachToRange( const uno::Reference < text::XTextRange >& xTextRange ) throw( lang::IllegalArgumentException, uno::RuntimeException ) { - attachToRangeEx(xTextRange, (isReplacementObject?IDocumentMarkAccess::CHECKBOX_FIELDMARK:IDocumentMarkAccess::TEXT_FIELDMARK)); + attachToRangeEx( xTextRange, + ( isReplacementObject ? IDocumentMarkAccess::CHECKBOX_FIELDMARK : IDocumentMarkAccess::TEXT_FIELDMARK ) ); } -::rtl::OUString SwXFieldmark::getDescription(void) throw( ::com::sun::star::uno::RuntimeException ) +::rtl::OUString SwXFieldmark::getFieldType( void ) + throw( ::com::sun::star::uno::RuntimeException ) { - vos::OGuard aGuard(Application::GetSolarMutex()); -// TODO implement... -// if(!GetBookmark()) - ::sw::mark::IFieldmark const * const pMark = - dynamic_cast< ::sw::mark::IFieldmark const * const>(GetBookmark()); - if(!pMark) - throw uno::RuntimeException(); - return pMark->GetFieldHelptext(); + vos::OGuard aGuard( Application::GetSolarMutex( ) ); + IMark* pMark = const_cast< IMark* >( GetBookmark( ) ); + IFieldmark *pBkm = dynamic_cast< IFieldmark* > ( pMark ); + if ( pBkm ) + return pBkm->GetFieldname( ); + else + throw uno::RuntimeException( ); } -::sal_Int16 SAL_CALL SwXFieldmark::getType() throw (::com::sun::star::uno::RuntimeException) +void SwXFieldmark::setFieldType( const::rtl::OUString & fieldType ) + throw( ::com::sun::star::uno::RuntimeException ) { - vos::OGuard aGuard(Application::GetSolarMutex()); - ::sw::mark::ICheckboxFieldmark const * const pAsCheckbox = - dynamic_cast< ::sw::mark::ICheckboxFieldmark const * const>(GetBookmark()); - if(pAsCheckbox) - return 1; - return 0; + vos::OGuard aGuard( Application::GetSolarMutex( ) ); + IMark* pMark = const_cast< IMark* >( GetBookmark( ) ); + IFieldmark *pBkm = dynamic_cast< IFieldmark* >( pMark ); + if ( pBkm ) + pBkm->SetFieldname( fieldType ); + else + throw uno::RuntimeException( ); } -::sal_Int16 SAL_CALL SwXFieldmark::getRes() throw (::com::sun::star::uno::RuntimeException) +sal_Int16 SwXFieldmark::getParamCount( ) + throw( ::com::sun::star::uno::RuntimeException ) { - vos::OGuard aGuard(Application::GetSolarMutex()); - ::sw::mark::ICheckboxFieldmark const * const pAsCheckbox = - dynamic_cast< ::sw::mark::ICheckboxFieldmark const * const>(GetBookmark()); - if(pAsCheckbox && pAsCheckbox->IsChecked()) - return 1; - return 0; + vos::OGuard aGuard( Application::GetSolarMutex( ) ); + IMark* pMark = const_cast< IMark* >( GetBookmark( ) ); + IFieldmark *pBkm = dynamic_cast< IFieldmark* >( pMark ); + if ( pBkm ) + return pBkm->getNumOfParams( ); + else + throw uno::RuntimeException( ); } -//FIXME Remove Method -void SAL_CALL SwXFieldmark::setType( ::sal_Int16 ) throw (::com::sun::star::uno::RuntimeException) +rtl::OUString SwXFieldmark::getParamName( sal_Int16 i ) + throw( ::com::sun::star::uno::RuntimeException ) { - vos::OGuard aGuard(Application::GetSolarMutex()); - throw uno::RuntimeException(); + vos::OGuard aGuard( Application::GetSolarMutex( ) ); + IMark* pMark = const_cast< IMark* >( GetBookmark( ) ); + IFieldmark *pBkm = dynamic_cast< IFieldmark* >( pMark ); + if ( pBkm ) + return pBkm->getParam( i ).first; + else + throw uno::RuntimeException( ); } -//FIXME Remove Method -void SAL_CALL SwXFieldmark::setRes( ::sal_Int16 ) throw (::com::sun::star::uno::RuntimeException) +::rtl::OUString SwXFieldmark::getParamValue( ::sal_Int16 i ) + throw( ::com::sun::star::uno::RuntimeException ) { - vos::OGuard aGuard(Application::GetSolarMutex()); - throw uno::RuntimeException(); + vos::OGuard aGuard( Application::GetSolarMutex( ) ); + IMark* pMark = const_cast< IMark* >( GetBookmark( ) ); + IFieldmark *pBkm = dynamic_cast< IFieldmark* >( pMark ); + if ( pBkm ) + return pBkm->getParam( i ).second; + else + throw uno::RuntimeException( ); } -void SAL_CALL SwXFieldmark::setDescription( const ::rtl::OUString& description ) - throw (::com::sun::star::uno::RuntimeException) +void SwXFieldmark::addParam( const ::rtl::OUString & name, + const ::rtl::OUString & value, + sal_Bool replaceExisting ) + throw( ::com::sun::star::uno::RuntimeException ) { - vos::OGuard aGuard(Application::GetSolarMutex()); - const ::sw::mark::IFieldmark* pMark = - dynamic_cast(GetBookmark()); - if(pMark) - const_cast< ::sw::mark::IFieldmark*>(pMark)->SetFieldHelptext(description); + vos::OGuard aGuard( Application::GetSolarMutex( ) ); + IMark* pMark = const_cast< IMark* >( GetBookmark( ) ); + IFieldmark *pBkm = dynamic_cast< IFieldmark* >( pMark ); + if ( pBkm ) + pBkm->addParam( const_cast< rtl::OUString& >( name ), + const_cast< rtl::OUString& >( value ), + replaceExisting ); else - throw uno::RuntimeException(); + throw uno::RuntimeException( ); } diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 7ef0640ed1..a154949402 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -110,8 +110,48 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::i18n; using namespace sw::util; using namespace sw::types; +using namespace sw::mark; using namespace nsFieldFlags; + +static String lcl_getFieldCode( const IFieldmark* pFieldmark ) { + ASSERT(pFieldmark!=NULL, "where is my fieldmark???"); + if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMTEXT ) ) { + return String::CreateFromAscii(" FORMTEXT "); + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMDROPDOWN ) ) { + return String::CreateFromAscii(" FORMDROPDOWN "); + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ) ) { + return String::CreateFromAscii(" FORMCHECKBOX "); + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_TOC ) ) { + return String::CreateFromAscii(" TOC "); + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_HYPERLINK ) ) { + return String::CreateFromAscii(" HYPERLINK "); + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_PAGEREF ) ) { + return String::CreateFromAscii(" PAGEREF "); + } else { + return pFieldmark->GetFieldname(); + } +} + +ww::eField lcl_getFieldId( const IFieldmark* pFieldmark ) { + ASSERT(pFieldmark!=NULL, "where is my fieldmark???"); + if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMTEXT ) ) { + return ww::eFORMTEXT; + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMDROPDOWN ) ) { + return ww::eFORMDROPDOWN; + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ) ) { + return ww::eFORMCHECKBOX; + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_TOC ) ) { + return ww::eTOC; + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_HYPERLINK ) ) { + return ww::eHYPERLINK; + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_PAGEREF ) ) { + return ww::ePAGEREF; + } else { + return ww::eUNKNOWN; + } +} + /* */ MSWordAttrIter::MSWordAttrIter( MSWordExportBase& rExport ) @@ -262,22 +302,40 @@ SwAttrIter::SwAttrIter(MSWordExportBase& rWr, const SwTxtNode& rTxtNd) : nAktSwPos = SearchNext(1); } +xub_StrLen lcl_getMinPos( xub_StrLen pos1, xub_StrLen pos2 ) +{ + xub_StrLen min = STRING_NOTFOUND; + if ( pos1 == STRING_NOTFOUND && pos2 != STRING_NOTFOUND ) + min = pos2; + else if ( pos2 == STRING_NOTFOUND && pos1 != STRING_NOTFOUND ) + min = pos1; + else if ( pos2 != STRING_NOTFOUND && pos2 != STRING_NOTFOUND ) + { + if ( pos1 < pos2 ) + min = pos1; + else + min = pos2; + } + + return min; +} + xub_StrLen SwAttrIter::SearchNext( xub_StrLen nStartPos ) { xub_StrLen nPos; xub_StrLen nMinPos = STRING_MAXLEN; + xub_StrLen i=0; + const String aTxt = rNd.GetTxt(); - xub_StrLen pos = aTxt.Search(CH_TXT_ATR_FIELDSTART, nStartPos); - if( pos==STRING_NOTFOUND ) - { - pos = aTxt.Search(CH_TXT_ATR_FIELDEND, nStartPos); - if( pos==STRING_NOTFOUND ) - pos = aTxt.Search(CH_TXT_ATR_FORMELEMENT, nStartPos); - } - if( pos!=STRING_NOTFOUND ) - nMinPos=pos; + xub_StrLen fieldEndPos = aTxt.Search(CH_TXT_ATR_FIELDEND, nStartPos); + xub_StrLen fieldStartPos = aTxt.Search(CH_TXT_ATR_FIELDSTART, nStartPos); + xub_StrLen formElementPos = aTxt.Search(CH_TXT_ATR_FORMELEMENT, nStartPos); - xub_StrLen i=0; + xub_StrLen pos = lcl_getMinPos( fieldEndPos, fieldStartPos ); + pos = lcl_getMinPos( pos, formElementPos ); + + if (pos!=STRING_NOTFOUND) + nMinPos=pos; // first the redline, then the attributes if( pCurRedline ) @@ -1695,12 +1753,14 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" ); - if ( pFieldmark ) - AppendBookmark( pFieldmark->GetName(), true ); - OutputField( NULL, ww::eFORMTEXT, String::CreateFromAscii( " FORMTEXT " ), WRITEFIELD_START | WRITEFIELD_CMD_START ); - if ( pFieldmark ) + if ( pFieldmark->GetFieldname().equalsAscii( ECMA_FORMTEXT ) ) + AppendBookmark( pFieldmark->GetName(), false ); + OutputField( NULL, lcl_getFieldId( pFieldmark ), lcl_getFieldCode( pFieldmark ), WRITEFIELD_START | WRITEFIELD_CMD_START ); + if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMTEXT ) ) WriteFormData( *pFieldmark ); - OutputField( NULL, ww::eFORMTEXT, String(), WRITEFIELD_CMD_END ); + else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_HYPERLINK ) ) + WriteHyperlinkData( *pFieldmark ); + OutputField( NULL, lcl_getFieldId( pFieldmark ), String(), WRITEFIELD_CMD_END ); } else if ( ch == CH_TXT_ATR_FIELDEND ) { @@ -1708,8 +1768,8 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" ); - OutputField( NULL, ww::eFORMTEXT, String(), WRITEFIELD_CLOSE ); - if ( pFieldmark ) + OutputField( NULL, lcl_getFieldId( pFieldmark ), String(), WRITEFIELD_CLOSE ); + if ( pFieldmark->GetFieldname().equalsAscii( ECMA_FORMTEXT ) ) AppendBookmark( pFieldmark->GetName(), false ); } else if ( ch == CH_TXT_ATR_FORMELEMENT ) @@ -1718,13 +1778,18 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" ); - if ( pFieldmark ) - AppendBookmark( pFieldmark->GetName(), true ); - OutputField( NULL, ww::eFORMCHECKBOX, String::CreateFromAscii( " FORMCHECKBOX " ), WRITEFIELD_START | WRITEFIELD_CMD_START ); - if ( pFieldmark ) + bool isEcma = pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMDROPDOWN ) || + pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ); + + if ( isEcma ) + AppendBookmark( pFieldmark->GetName(), 0 ); + OutputField( NULL, lcl_getFieldId( pFieldmark ), + lcl_getFieldCode( pFieldmark ), + WRITEFIELD_START | WRITEFIELD_CMD_START ); + if ( isEcma ) WriteFormData( *pFieldmark ); - OutputField( NULL, ww::eFORMCHECKBOX, String(), WRITEFIELD_CMD_END | WRITEFIELD_CLOSE ); - if ( pFieldmark ) + OutputField( NULL, lcl_getFieldId( pFieldmark ), String(), WRITEFIELD_CLOSE ); + if ( isEcma ) AppendBookmark( pFieldmark->GetName(), false ); } nLen -= static_cast< USHORT >( ofs ); diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index f945c0ad62..a28a640f70 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -105,6 +105,7 @@ #include "ww8attributeoutput.hxx" #include +#include #include #include @@ -3466,11 +3467,20 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) const ::sw::mark::IFieldmark* pFieldmark = &rFieldmark; const ::sw::mark::ICheckboxFieldmark* pAsCheckbox = dynamic_cast< const ::sw::mark::ICheckboxFieldmark* >( pFieldmark ); + + ASSERT(rFieldmark.GetFieldname().equalsAscii( ECMA_FORMTEXT ) || rFieldmark.GetFieldname().equalsAscii( ECMA_FORMDROPDOWN ) || rFieldmark.GetFieldname().equalsAscii( ECMA_FORMCHECKBOX ), "Unknown field type!!!"); + if ( ! ( rFieldmark.GetFieldname().equalsAscii( ECMA_FORMTEXT ) || + rFieldmark.GetFieldname().equalsAscii( ECMA_FORMDROPDOWN ) || + rFieldmark.GetFieldname().equalsAscii( ECMA_FORMCHECKBOX ) ) ) + return; + int type = 0; // TextFieldmark if ( pAsCheckbox ) type = 1; + if ( rFieldmark.GetFieldname().equalsAscii( ECMA_FORMDROPDOWN ) ) + type=2; - const ::rtl::OUString ffname = rFieldmark.GetFieldname(); + const String ffname = rFieldmark.getParam("name").second; ULONG nDataStt = pDataStrm->Tell(); pChpPlc->AppendFkpEntry(Strm().Tell()); @@ -3492,14 +3502,27 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) sal_uInt8 aFldHeader[] = { 0xFF, 0xFF, 0xFF, 0xFF, // Unicode Marker... - 0, 0, 0, 0//, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0 //, 0, 0 }; aFldHeader[4] |= (type & 0x03); int ffres = 0; // rFieldmark.GetFFRes(); if ( pAsCheckbox && pAsCheckbox->IsChecked() ) ffres = 1; + else if ( type == 2 ) + ffres = rFieldmark.getParam( ECMA_FORMDROPDOWN_RESULT, "0" ).second.toInt32(); aFldHeader[4] |= ( (ffres<<2) & 0x7C ); + + std::vector< ::rtl::OUString > aListItems; + if (type==2) + { + aFldHeader[5] |= 0x80; // ffhaslistbox + for ( int i = 0; i < rFieldmark.getNumOfParams() ; i++ ) + { + if (rFieldmark.getParam(i).first.compareToAscii(ECMA_FORMDROPDOWN_LISTENTRY)==0) + aListItems.push_back(rFieldmark.getParam(i).second); + } + } const ::rtl::OUString ffdeftext; const ::rtl::OUString ffformat; @@ -3508,6 +3531,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) const ::rtl::OUString ffentrymcr; const ::rtl::OUString ffexitmcr; + const sal_uInt8 aFldData[] = { 0,0,0,0, // len of struct @@ -3520,13 +3544,22 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) }; int slen = sizeof( aFldData ) + sizeof( aFldHeader ) - + 2*ffname.getLength() + 4 + + 2*ffname.Len() + 4 + 2*ffdeftext.getLength() + 4 + 2*ffformat.getLength() + 4 + 2*ffhelptext.getLength() + 4 + 2*ffstattext.getLength() + 4 + 2*ffentrymcr.getLength() + 4 + 2*ffexitmcr.getLength() + 4; + if ( type==2 ) { + slen += 2; // for 0xFF, 0xFF + slen += 4; // for num of list items + const int items = aListItems.size(); + for( int i = 0; i < items; i++ ) { + rtl::OUString item = aListItems[i]; + slen += 2 * item.getLength() + 2; + } + } #ifdef OSL_BIGENDIAN slen = SWAPLONG( slen ); #endif // OSL_BIGENDIAN @@ -3537,6 +3570,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) len = sizeof( aFldHeader ); OSL_ENSURE( len == 8, "SwWW8Writer::WriteFormData(..) - wrong aFldHeader length" ); + pDataStrm->Write( aFldHeader, len ); SwWW8Writer::WriteString_xstz( *pDataStrm, ffname, true ); // Form field name @@ -3551,11 +3585,20 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) SwWW8Writer::WriteString_xstz( *pDataStrm, String( ffstattext ), true ); SwWW8Writer::WriteString_xstz( *pDataStrm, String( ffentrymcr ), true ); SwWW8Writer::WriteString_xstz( *pDataStrm, String( ffexitmcr ), true ); -// if (type==2) { -// // 0xFF, 0xFF -// // sal_uInt32 number of strings -// // (sal_uInt16 len; sal_uInt16 unicode char[len])*num of strings -// } + if (type==2) { + *pDataStrm<<(sal_uInt16)0xFFFF; + const int items=aListItems.size(); + *pDataStrm<<(sal_uInt32)items; + for(int i=0;imaApos); maOldFieldStack.swap(pRdr->maFieldStack); - maFieldCtxStack.swap(pRdr->maNewFieldCtxStack); } void WW8ReaderSave::Restore( SwWW8ImplReader* pRdr ) @@ -1559,7 +1558,6 @@ void WW8ReaderSave::Restore( SwWW8ImplReader* pRdr ) pRdr->pPlcxMan->RestoreAllPLCFx(maPLCFxSave); pRdr->maApos.swap(maOldApos); pRdr->maFieldStack.swap(maOldFieldStack); - pRdr->maNewFieldCtxStack.swap(maFieldCtxStack); } void SwWW8ImplReader::Read_HdFtFtnText( const SwNodeIndex* pSttIdx, @@ -2672,29 +2670,6 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) case 0x15: if( !bSpec ) // Juristenparagraph cInsert = '\xa7'; - else - { - // 0x15 is special --> so it's our field end mark...; - // hmmm what about field marks not handled by us??, maybe a problem with nested fields; - // probably an area of bugs... [well release quick and release often....] - if (!maNewFieldCtxStack.empty() && pPaM!=NULL && pPaM->GetPoint()!=NULL) - { - ::boost::scoped_ptr pFieldCtx(maNewFieldCtxStack.back()); - maNewFieldCtxStack.pop_back(); - SwPosition aEndPos = *pPaM->GetPoint(); - SwPaM aFldPam(pFieldCtx->GetPtNode(), pFieldCtx->GetPtCntnt(), aEndPos.nNode, aEndPos.nContent.GetIndex()); - IDocumentMarkAccess* const pMarkAccess = rDoc.getIDocumentMarkAccess(); - ::sw::mark::IFieldmark* pFieldmark = - dynamic_cast< ::sw::mark::IFieldmark*>(pMarkAccess->makeMark( - aFldPam, - pFieldCtx->GetBookmarkName(), - IDocumentMarkAccess::TEXT_FIELDMARK)); - OSL_ENSURE(pFieldmark!=NULL, - "hmmm; why was the bookmark not created?"); - if (pFieldmark) - pFieldCtx->SetCurrentFieldParamsTo(pFieldmark); - } - } break; case 0x9: cInsert = '\x9'; // Tab @@ -3506,7 +3481,14 @@ void wwSectionManager::InsertSegments() bool bInsertSection = (aIter != aStart) ? (aIter->IsContinous() && bThisAndPreviousAreCompatible): false; bool bInsertPageDesc = !bInsertSection; - bool bProtected = !bUseEnhFields && SectionIsProtected(*aIter); // do we really need this ?? I guess I have a different logic in editshell which disales this... + bool bProtected = SectionIsProtected(*aIter); // do we really need this ?? I guess I have a different logic in editshell which disales this... + if (bUseEnhFields && mrReader.pWDop->fProtEnabled && aIter->IsNotProtected()) { + // here we have the special case that the whole document is protected, with the execption of this section. + // I want to address this when I do the section rework, so for the moment we disable the overall protection then... + mrReader.rDoc.set(IDocumentSettingAccess::PROTECT_FORM, false ); + } + + if (bInsertPageDesc) { /* diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index a377602b87..9dc3b0362f 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -60,6 +60,8 @@ #include "ww8glsy.hxx" #include "wrtww8.hxx" #include "../inc/msfilter.hxx" +#include +#include class SwDoc; class SwPaM; @@ -362,6 +364,8 @@ namespace sw Position(const SwPosition &rPos); Position(const Position &rPos); operator SwPosition() const; + SwNodeIndex GetPtNode() { return maPtNode; }; + xub_StrLen GetPtCntnt() { return mnPtCntnt; }; }; } } @@ -369,36 +373,30 @@ namespace sw class FieldEntry { public: - sw::hack::Position maStartPos; - sal_uInt16 mnFieldId; - FieldEntry(SwPosition &rPos, sal_uInt16 nFieldId) throw(); - FieldEntry(const FieldEntry &rOther) throw(); - FieldEntry &operator=(const FieldEntry &rOther) throw(); - void Swap(FieldEntry &rOther) throw(); -}; + typedef ::std::vector Params_t; -class WW8NewFieldCtx -{ private: - SwNodeIndex maPtNode; - xub_StrLen mnPtCntnt; ::rtl::OUString msBookmarkName; ::rtl::OUString msMarkType; - typedef ::std::pair< ::rtl::OUString, ::rtl::OUString> Param_t; - typedef ::std::vector< Param_t > Params_t; Params_t maParams; - SwPaM * mpPaM; public: - WW8NewFieldCtx(SwPosition &aStartPos, ::rtl::OUString sBookmarkName, ::rtl::OUString sMarkType); - ~WW8NewFieldCtx(); + sw::hack::Position maStartPos; + sal_uInt16 mnFieldId; + FieldEntry(SwPosition &rPos, sal_uInt16 nFieldId) throw(); + FieldEntry(const FieldEntry &rOther) throw(); + FieldEntry &operator=(const FieldEntry &rOther) throw(); + void Swap(FieldEntry &rOther) throw(); + + SwNodeIndex GetPtNode() { return maStartPos.GetPtNode(); }; + xub_StrLen GetPtCntnt() { return maStartPos.GetPtCntnt(); }; - SwNodeIndex GetPtNode() { return maPtNode; }; - xub_StrLen GetPtCntnt() { return mnPtCntnt; }; ::rtl::OUString GetBookmarkName(); - ::rtl::OUString GetMarkType(); + ::rtl::OUString GetBookmarkType(); + void SetBookmarkName(::rtl::OUString bookmarkName); + void SetBookmarkType(::rtl::OUString bookmarkType); void AddParam(::rtl::OUString name, ::rtl::OUString value); - void SetCurrentFieldParamsTo(::sw::mark::IFieldmark* pFieldmark); + Params_t &getParams(); }; @@ -434,7 +432,6 @@ private: bool mbWasParaEnd; bool mbHasBorder; bool mbFirstPara; - std::deque maFieldCtxStack; public: WW8ReaderSave(SwWW8ImplReader* pRdr, WW8_CP nStart=-1); void Restore(SwWW8ImplReader* pRdr); @@ -889,9 +886,6 @@ private: std::deque maFieldStack; typedef std::deque::const_iterator mycFieldIter; - typedef std::deque WW8NewFieldCtxStack_t; - WW8NewFieldCtxStack_t maNewFieldCtxStack; - /* A stack of open footnotes. Should only be one in it at any time. */ diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 4e1ec2fcfd..3de6a4004d 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -96,66 +96,14 @@ #include #include +#include #include using namespace com::sun::star; using namespace sw::util; using namespace sw::types; - -WW8NewFieldCtx::WW8NewFieldCtx(SwPosition &aStartPos, ::rtl::OUString sBookmarkName, ::rtl::OUString sMarkType) - : maPtNode(aStartPos.nNode) - , mnPtCntnt(aStartPos.nContent.GetIndex()) - , msBookmarkName(sBookmarkName) - , msMarkType(sMarkType) - , mpPaM(NULL) -{ -} - - -WW8NewFieldCtx::~WW8NewFieldCtx() -{ - if (mpPaM) delete mpPaM; -} - -::rtl::OUString WW8NewFieldCtx::GetBookmarkName() -{ - return msBookmarkName; -} - -::rtl::OUString WW8NewFieldCtx::GetMarkType() -{ - return msMarkType; -} - -void WW8NewFieldCtx::AddParam(::rtl::OUString name, ::rtl::OUString value) -{ - maParams.push_back( Param_t(name, value) ); -} - -void WW8NewFieldCtx::SetCurrentFieldParamsTo(::sw::mark::IFieldmark* pFieldmark) -{ - for(Params_t::iterator i=maParams.begin();i!=maParams.end();i++) - { - ::rtl::OUString aName=i->first; - ::rtl::OUString aValue=i->second; - if(aName.compareToAscii("Description")==0) - { - pFieldmark->SetFieldHelptext(aValue); - } - else if(aName.compareToAscii("Name")==0) - { - pFieldmark->SetFieldname(aValue); - } - else if(aName.compareToAscii("Result")==0) - { - ::sw::mark::ICheckboxFieldmark* pAsCheckbox = - dynamic_cast< ::sw::mark::ICheckboxFieldmark* >(pFieldmark); - if(pAsCheckbox) - pAsCheckbox->SetChecked(aValue.toInt32()==0); - } - } -} +using namespace sw::mark; //----------------------------------------- // UNO-Controls @@ -233,10 +181,10 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr ) if (aBookmarkName.Len()>0) { - WW8NewFieldCtx *pFieldCtx=new WW8NewFieldCtx(*pPaM->GetPoint(), aBookmarkName, ::rtl::OUString::createFromAscii("ecma.office-open-xml.field.FORMTEXT")); - maNewFieldCtxStack.push_back(pFieldCtx); - pFieldCtx->AddParam(::rtl::OUString::createFromAscii("Description"), aFormula.sToolTip); - pFieldCtx->AddParam(::rtl::OUString::createFromAscii("Name"), aFormula.sTitle); + maFieldStack.back().SetBookmarkName(aBookmarkName); + maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ECMA_FORMTEXT)); + maFieldStack.back().AddParam(::rtl::OUString::createFromAscii("Description"), aFormula.sToolTip); + maFieldStack.back().AddParam(::rtl::OUString::createFromAscii("Name"), aFormula.sTitle); } return FLD_TEXT; } @@ -279,19 +227,22 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr ) aBookmarkName=pB->GetUniqueBookmarkName(aFormula.sTitle); } - if (aBookmarkName.Len()>0) { - ::sw::mark::ICheckboxFieldmark* pFieldmark = - dynamic_cast< ::sw::mark::ICheckboxFieldmark*>(rDoc.getIDocumentMarkAccess()->makeMark( - *pPaM, - aBookmarkName, - IDocumentMarkAccess::CHECKBOX_FIELDMARK)); - OSL_ENSURE(pFieldmark, - "hmmm; why was the bookmark not created?"); - if(pFieldmark) - { - pFieldmark->SetFieldname(aFormula.sTitle); - pFieldmark->SetFieldHelptext(aFormula.sToolTip); - pFieldmark->SetChecked(aFormula.nChecked!=0); + if (aBookmarkName.Len()>0) + { + IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( ); + IFieldmark* pFieldmark = dynamic_cast( pMarksAccess->makeNoTextFieldBookmark( + *pPaM, aBookmarkName, + rtl::OUString::createFromAscii( ECMA_FORMCHECKBOX ) ) ); + ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?"); + if (pFieldmark!=NULL) { + pFieldmark->addParam( + rtl::OUString::createFromAscii(ECMA_FORMCHECKBOX_NAME), + rtl::OUString( aFormula.sTitle ) ); + pFieldmark->addParam( + rtl::OUString::createFromAscii(ECMA_FORMCHECKBOX_HELPTEXT), aFormula.sToolTip); + pFieldmark->addParam( + rtl::OUString::createFromAscii(ECMA_FORMCHECKBOX_CHECKED), + ::rtl::OUString::createFromAscii(aFormula.nChecked!=0?"on":"off")); // set field data here... } } @@ -306,24 +257,75 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr) if (0x01 == rStr.GetChar(writer_cast(pF->nLCode-1))) ImportFormulaControl(aFormula,pF->nSCode+pF->nLCode-1, WW8_CT_DROPDOWN); - SwDropDownField aFld( - (SwDropDownFieldType*)rDoc.GetSysFldType(RES_DROPDOWN)); + const SvtFilterOptions* pOpt = SvtFilterOptions::Get(); + sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields()); + + if (!bUseEnhFields) + { + SwDropDownField aFld((SwDropDownFieldType*)rDoc.GetSysFldType(RES_DROPDOWN)); - aFld.SetName(aFormula.sTitle); - aFld.SetHelp(aFormula.sHelp); - aFld.SetToolTip(aFormula.sToolTip); + aFld.SetName(aFormula.sTitle); + aFld.SetHelp(aFormula.sHelp); + aFld.SetToolTip(aFormula.sToolTip); - if (!aFormula.maListEntries.empty()) - { - aFld.SetItems(aFormula.maListEntries); - int nIndex = aFormula.fDropdownIndex < aFormula.maListEntries.size() - ? aFormula.fDropdownIndex : 0; - aFld.SetSelectedItem(aFormula.maListEntries[nIndex]); + if (!aFormula.maListEntries.empty()) + { + aFld.SetItems(aFormula.maListEntries); + int nIndex = aFormula.fDropdownIndex < aFormula.maListEntries.size() ? aFormula.fDropdownIndex : 0; + aFld.SetSelectedItem(aFormula.maListEntries[nIndex]); + } + + rDoc.InsertPoolItem(*pPaM, SwFmtFld(aFld), 0); + return FLD_OK; } + else + { + //@TODO fix: copy pasting here!!!!!!!!!!!!!! + //REVIEW: don't let this throught.... sometime I forget to get rid of my proof of concept stuff. Please kindly remind me!!!!! + + String aBookmarkName; + WW8PLCFx_Book* pB = pPlcxMan->GetBook(); + if (pB!=NULL) + { + WW8_CP currentCP=pF->nSCode; + WW8_CP currentLen=pF->nLen; + + USHORT bkmFindIdx; + String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx); - rDoc.InsertPoolItem(*pPaM, SwFmtFld(aFld), 0); + if (aBookmarkFind.Len()>0) + { + pB->SetStatus(bkmFindIdx, BOOK_FIELD); // mark as consumed by field + if (aBookmarkFind.Len()>0) + aBookmarkName=aBookmarkFind; + } + } - return FLD_OK; + if (pB!=NULL && aBookmarkName.Len()==0) + aBookmarkName=pB->GetUniqueBookmarkName(aFormula.sTitle); + + if (aBookmarkName.Len()>0) + { + IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( ); + IFieldmark *pFieldmark = dynamic_cast( + pMarksAccess->makeNoTextFieldBookmark( *pPaM, aBookmarkName, + ::rtl::OUString::createFromAscii( ECMA_FORMDROPDOWN ) ) ); + ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?"); + if ( pFieldmark != NULL ) + { + rtl::OUString sListEntry=rtl::OUString::createFromAscii( ECMA_FORMDROPDOWN_LISTENTRY ); + std::vector::iterator it = aFormula.maListEntries.begin(); + for( ; it != aFormula.maListEntries.end(); it++ ) + pFieldmark->addParam(sListEntry, *it, false); + + int nIndex = aFormula.fDropdownIndex < aFormula.maListEntries.size() ? aFormula.fDropdownIndex : 0; + pFieldmark->addParam(ECMA_FORMDROPDOWN_RESULT, nIndex); + // set field data here... + } + } + + return FLD_OK; + } } void SwWW8ImplReader::DeleteFormImpl() @@ -2140,11 +2142,18 @@ bool SwWW8ImplReader::ImportFormulaControl(WW8FormulaControl &aFormula, if((aPic.lcb > 0x3A) && !pDataStream->GetError() ) { - pDataStream->Seek( nPicLocFc + aPic.cbHeader ); +#if 0 // some debug fun; remove this later... int len=aPic.lcb-aPic.cbHeader; char *pBuf=(char*)malloc(len); pDataStream->Read( pBuf, len); + static int _h=0; + char fname[255]; + sprintf(fname, "data%03i.data", _h++); + FILE *out=fopen(fname, "wb"); + fwrite(pBuf, len, 1, out); + fclose(out); pDataStream->Seek( nPicLocFc + aPic.cbHeader ); +#endif aFormula.FormulaRead(nWhich,pDataStream); bRet = true; } diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 3cded67e9f..845a4c1afb 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -88,22 +88,26 @@ #include #include #include - +#include #include "ww8scan.hxx" // WW8FieldDesc #include "ww8par.hxx" #include "ww8par2.hxx" #include "writerhelper.hxx" #include "fields.hxx" +#include #include // #i24377# +//#define WW_NATIVE_TOC 0 + #define MAX_FIELDLEN 64000 #define WW8_TOX_LEVEL_DELIM ':' using namespace ::com::sun::star; using namespace sw::util; +using namespace sw::mark; using namespace std; // #i24377# using namespace nsSwDocInfoSubType; @@ -328,9 +332,11 @@ long SwWW8ImplReader::Read_Book(WW8PLCFManResult*) //"_Toc*" and "_Hlt*" are unnecessary const String* pName = pB->GetName(); +#if !defined(WW_NATIVE_TOC) if( !pName || pName->EqualsIgnoreCaseAscii( "_Toc", 0, 4 ) || pName->EqualsIgnoreCaseAscii( "_Hlt", 0, 4 ) ) return 0; +#endif //JP 16.11.98: ToUpper darf auf keinen Fall gemacht werden, weil der //Bookmark- name ein Hyperlink-Ziel sein kann! @@ -672,6 +678,9 @@ sal_uInt16 SwWW8ImplReader::End_Field() if (!pF || !pF->EndPosIsFieldEnd()) return nRet; + const SvtFilterOptions* pOpt = SvtFilterOptions::Get(); + sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields()); + ASSERT(!maFieldStack.empty(), "Empty field stack\n"); if (!maFieldStack.empty()) { @@ -683,9 +692,40 @@ sal_uInt16 SwWW8ImplReader::End_Field() nRet = maFieldStack.back().mnFieldId; switch (nRet) { + case 70: + if (bUseEnhFields && pPaM!=NULL && pPaM->GetPoint()!=NULL) { + SwPosition aEndPos = *pPaM->GetPoint(); + SwPaM aFldPam( maFieldStack.back().GetPtNode(), maFieldStack.back().GetPtCntnt(), aEndPos.nNode, aEndPos.nContent.GetIndex()); + IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( ); + IFieldmark *pFieldmark = dynamic_cast( pMarksAccess->makeFieldBookmark( + aFldPam, maFieldStack.back().GetBookmarkName(), ::rtl::OUString::createFromAscii(ECMA_FORMTEXT ) ) ); + ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?"); + if (pFieldmark!=NULL) { + pFieldmark->addParams(maFieldStack.back().getParams()); + } + } + break; +#if defined(WW_NATIVE_TOC) + case 8: // TOX_INDEX + case 13: // TOX_CONTENT + case 88: // HYPERLINK + case 37: // REF + if (pPaM!=NULL && pPaM->GetPoint()!=NULL) { + + SwPosition aEndPos = *pPaM->GetPoint(); + SwPaM aFldPam( maFieldStack.back().GetPtNode(), maFieldStack.back().GetPtCntnt(), aEndPos.nNode, aEndPos.nContent.GetIndex()); + SwFieldBookmark *pFieldmark=(SwFieldBookmark*)rDoc.makeFieldBookmark(aFldPam, maFieldStack.back().GetBookmarkName(), maFieldStack.back().GetBookmarkType()); + ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?"); + if (pFieldmark!=NULL) { + pFieldmark->addParams(maFieldStack.back().getParams()); + } + } + break; +#else case 88: pCtrlStck->SetAttr(*pPaM->GetPoint(),RES_TXTATR_INETFMT); break; +#endif case 36: case 68: //Move outside the section associated with this type of field @@ -703,6 +743,10 @@ bool AcceptableNestedField(sal_uInt16 nFieldCode) { switch (nFieldCode) { +#if defined(WW_NATIVE_TOC) + case 8: // allow recursive field in TOC... + case 13: // allow recursive field in TOC... +#endif case 36: case 68: case 79: @@ -741,6 +785,36 @@ FieldEntry &FieldEntry::operator=(const FieldEntry &rOther) throw() return *this; } +::rtl::OUString FieldEntry::GetBookmarkName() +{ + return msBookmarkName; +} + +::rtl::OUString FieldEntry::GetBookmarkType() +{ + return msMarkType; +} + +void FieldEntry::SetBookmarkName(::rtl::OUString bookmarkName) +{ + msBookmarkName=bookmarkName; +} + +void FieldEntry::SetBookmarkType(::rtl::OUString bookmarkType) +{ + msMarkType=bookmarkType; +} + +void FieldEntry::AddParam(::rtl::OUString name, ::rtl::OUString value) +{ + maParams.push_back( IFieldmark::ParamPair_t( name, value ) ); +} + +FieldEntry::Params_t &FieldEntry::getParams() { + return maParams; +} + + // Read_Field liest ein Feld ein oder, wenn es nicht gelesen werden kann, // wird 0 zurueckgegeben, so dass das Feld vom Aufrufer textuell gelesen wird. // Returnwert: Gesamtlaenge des Feldes ( zum UEberlesen ) @@ -2070,6 +2144,17 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, String& rStr ) String sName(GetMappedBookmark(sOrigName)); +#if defined(WW_NATIVE_TOC) + if (1) { + ::rtl::OUString aBookmarkName=::rtl::OUString::createFromAscii("_REF"); + maFieldStack.back().SetBookmarkName(aBookmarkName); + maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ECMA_PAGEREF)); + maFieldStack.back().AddParam(rtl::OUString(), sName); + return FLD_TEXT; + } +#endif + + SwGetRefField aFld( (SwGetRefFieldType*)rDoc.GetSysFldType( RES_GETREFFLD ), sName, REF_BOOKMARK, 0, REF_PAGE ); @@ -2768,6 +2853,16 @@ USHORT lcl_GetMaxValidWordTOCLevel(const SwForm &rForm) eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr ) { +#if defined(WW_NATIVE_TOC) + if (1) { + ::rtl::OUString aBookmarkName=::rtl::OUString::createFromAscii("_TOC"); + maFieldStack.back().SetBookmarkName(aBookmarkName); + maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ECMA_TOC)); +// maFieldStack.back().AddParam(::rtl::OUString::createFromAscii("Description"), aFormula.sToolTip); + return FLD_TEXT; + } +#endif + if (pF->nLRes < 3) return FLD_TEXT; // ignore (#i25440#) @@ -3286,6 +3381,16 @@ eF_ResT SwWW8ImplReader::Read_F_Shape(WW8FieldDesc* /*pF*/, String& /*rStr*/) eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, String& rStr ) { +#if defined(WW_NATIVE_TOC) + if (1) { + ::rtl::OUString aBookmarkName=::rtl::OUString::createFromAscii("_HYPERLINK"); + maFieldStack.back().SetBookmarkName(aBookmarkName); + maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ECMA_HYPERLINK)); +// maFieldStack.back().AddParam(::rtl::OUString::createFromAscii("Description"), aFormula.sToolTip); + return FLD_TEXT; + } +#endif + String sURL, sTarget, sMark; bool bDataImport = false; //HYPERLINk "filename" [switches] diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 0f45470c91..40206e17f9 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -151,6 +151,7 @@ #include #include +#include #include "PostItMgr.hxx" #include "postit.hxx" @@ -160,6 +161,7 @@ //#define TEST_FOR_BUG91313 #endif +using namespace sw::mark; using namespace ::com::sun::star; /*-------------------------------------------------------------------- @@ -4187,7 +4189,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) SwContentAtPos aCntntAtPos( SwContentAtPos::SW_CLICKFIELD | SwContentAtPos::SW_INETATTR | - SwContentAtPos::SW_SMARTTAG ); + SwContentAtPos::SW_SMARTTAG | SwContentAtPos::SW_FORMCTRL); if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, TRUE ) ) { @@ -4208,7 +4210,33 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if ( bExecSmarttags && SwSmartTagMgr::Get().IsSmartTagsEnabled() ) rView.ExecSmartTagPopup( aDocPt ); } - else // if ( SwContentAtPos::SW_INETATTR == aCntntAtPos.eCntntAtPos ) + else if ( SwContentAtPos::SW_FORMCTRL == aCntntAtPos.eCntntAtPos ) + { + ASSERT( aCntntAtPos.aFnd.pFldmark != NULL, "where is my field ptr???"); + if ( aCntntAtPos.aFnd.pFldmark != NULL) + { + IFieldmark *fieldBM = const_cast< IFieldmark* > ( aCntntAtPos.aFnd.pFldmark ); + SwDocShell* pDocSh = rView.GetDocShell(); + SwDoc *pDoc=pDocSh->GetDoc(); + if (fieldBM->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ) ) + { + bool isChecked = fieldBM->getParam( ECMA_FORMCHECKBOX_CHECKED ).second.compareToAscii("on") == 0; + isChecked = !isChecked; // swap it... + fieldBM->addParam( + rtl::OUString::createFromAscii( ECMA_FORMCHECKBOX_CHECKED ), + rtl::OUString::createFromAscii( isChecked?"on":"off" ) ); + fieldBM->invalidate(); + rSh.InvalidateWindows( rView.GetVisArea() ); + } else if (fieldBM->GetFieldname().equalsAscii( ECMA_FORMDROPDOWN) ) { + rView.ExecFieldPopup( aDocPt, fieldBM ); + fieldBM->invalidate(); + rSh.InvalidateWindows( rView.GetVisArea() ); + } else { + // unknown type.. + } + } + } + else // if ( SwContentAtPos::SW_INETATTR == aCntntAtPos.eCntntAtPos ) { if ( bExecHyperlinks ) rSh.ClickToINetAttr( *(SwFmtINetFmt*)aCntntAtPos.aFnd.pAttr, nFilter ); diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 459346df23..75e5b6ee4f 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -42,6 +42,7 @@ #include #include #include +#include class SwBaseShell; class Button; @@ -94,6 +95,7 @@ struct SwConversionArgs; class Graphic; class GraphicFilter; class SwPostItMgr; +class SwFieldBookmark; namespace com{ namespace sun { namespace star { namespace view{ class XSelectionSupplier; } @@ -465,7 +467,7 @@ public: DECL_LINK( SpellError, LanguageType * ); BOOL ExecSpellPopup( const Point& rPt ); - + BOOL ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM ); // SMARTTAGS BOOL ExecSmartTagPopup( const Point& rPt ); diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx index b3929abdcc..b60c5ae71a 100644 --- a/sw/source/ui/inc/wrtsh.hxx +++ b/sw/source/ui/inc/wrtsh.hxx @@ -35,6 +35,7 @@ #include #include #include +#include class Window; class OutputDevice; @@ -322,6 +323,9 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)(); void InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0); BOOL UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0); + // new fields + BOOL UpdateField( sw::mark::IFieldmark &fieldBM); + // Numerierung und Bullets /** Turns on numbering or bullets. diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index 304457a828..e4e0449774 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -114,9 +114,12 @@ #include #include +#include +#include #include +using namespace sw::mark; using ::rtl::OUString; using namespace ::com::sun::star; using namespace ::com::sun::star::beans; @@ -931,3 +934,136 @@ sal_Bool SwView::ExecSmartTagPopup( const Point& rPt ) return bRet; } + + +class SwFieldPopup : public PopupMenu +{ +public: + SwFieldPopup() { + InsertItem(1, ::rtl::OUString::createFromAscii("Hello")); + } +}; + +class SwFieldListBox : public ListBox +{ +public: + SwFieldListBox(Window* pParent) : ListBox(pParent /*, WB_DROPDOWN*/) { + } + + void *GetImplWin() { + return NULL; //FIXME!!! +// return mpImplWin; + } + +protected: + virtual void LoseFocus() { +// printf("ListBox: lose focus!!\n"); + ListBox::LoseFocus(); + } + + virtual void Select() { +// printf("SELECT!!! IsTravelSelect=%i\n", IsTravelSelect()); + ListBox::Select(); + } +}; + +class SwFieldDialog : public Dialog +{ +private: + SwFieldListBox aListBox; + Edit aText; + int selection; + + DECL_LINK( MyListBoxHandler, ListBox * ); + +public: + SwFieldDialog(Window* parent, IFieldmark *fieldBM) : Dialog(parent, WB_BORDER | WB_SYSTEMWINDOW | WB_NOSHADOW ), aListBox(this), aText(this, WB_RIGHT | WB_READONLY), selection(-1) { + + assert(fieldBM!=NULL); + if (fieldBM!=NULL) { + int items=fieldBM->getNumOfParams(); + for(int i=0;igetParam(i); + if (p.first.compareToAscii(ECMA_FORMDROPDOWN_LISTENTRY)==0) { + aListBox.InsertEntry(p.second); + } + } + } + Size lbSize=aListBox.GetOptimalSize(WINDOWSIZE_PREFERRED); + lbSize.Width()+=50; + lbSize.Height()+=20; + aListBox.SetSizePixel(lbSize); + aListBox.SetSelectHdl( LINK( this, SwFieldDialog, MyListBoxHandler ) ); + aListBox.Show(); + aText.SetText(rtl::OUString::createFromAscii("Cancel")); + Size tSize=aText.GetOptimalSize(WINDOWSIZE_PREFERRED); + aText.SetSizePixel(Size(lbSize.Width(), tSize.Height())); + aText.SetPosPixel(Point(0, lbSize.Height())); + aText.Show(); + SetSizePixel(Size(lbSize.Width(), lbSize.Height()+tSize.Height())); +// SetSizePixel(Size(200, 200)); + } + + int getSelection() { + return selection; + } +protected: + /* + virtual void LoseFocus() { + printf("lose focus!!\n"); + Dialog::LoseFocus(); + printf("close:\n"); + EndDialog(8); + } + */ + + virtual long PreNotify( NotifyEvent& rNEvt ) { + if (rNEvt.GetType() == EVENT_LOSEFOCUS && aListBox.GetImplWin()==rNEvt.GetWindow()) { + EndDialog(8); + return 1; + } + if (rNEvt.GetType() == EVENT_KEYINPUT) { +// printf("PreNotify::KEYINPUT\n"); + } + return Dialog::PreNotify(rNEvt); + } +}; + +IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox ) +{ +// printf("### DROP DOWN SELECT... IsTravelSelect=%i\n", pBox->IsTravelSelect()); + if (pBox->IsTravelSelect()) { + return 0; + } else { + this->selection=pBox->GetSelectEntryPos(); + EndDialog(9); //@TODO have meaningfull returns... + return 1; + } +} + + +BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM ) +{ + sal_Bool bRet = sal_False; + const sal_Bool bOldViewLock = pWrtShell->IsViewLocked(); + pWrtShell->LockView( sal_True ); + pWrtShell->Push(); + + bRet=sal_True; + const Point aPixPos = GetEditWin().LogicToPixel( rPt ); + + SwFieldDialog aFldDlg(pEditWin, fieldBM); + aFldDlg.SetPosPixel(pEditWin->OutputToScreenPixel(aPixPos)); + + short ret=aFldDlg.Execute(); + int selection=aFldDlg.getSelection(); + if (selection>=0) { + fieldBM->addParam(ECMA_FORMDROPDOWN_RESULT, selection); + } + + pWrtShell->Pop( sal_False ); + pWrtShell->LockView( bOldViewLock ); + + return bRet; +} + diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 6294722f46..50eaca3fd0 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -112,6 +112,7 @@ #include #include #include +#include // -> #111827# #include @@ -126,6 +127,7 @@ #include "PostItMgr.hxx" +using namespace sw::mark; using namespace com::sun::star; #define COMMON_INI_LIST \ @@ -1754,6 +1756,12 @@ SwWrtShell::SwWrtShell( SwWrtShell& rSh, Window *_pWin, SwView &rShell ) SetSfxViewShell( (SfxViewShell *)&rShell ); SetFlyMacroLnk( LINK(this, SwWrtShell, ExecFlyMac) ); + + // place the cursor on the first field... + IFieldmark *pBM = NULL; + if ( IsFormProtected() && ( pBM = GetFieldmarkAfter( ) ) !=NULL ) { + GotoFieldmark(pBM); + } } diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx index 0927372db9..12309648ae 100644 --- a/sw/source/ui/wrtsh/wrtsh2.cxx +++ b/sw/source/ui/wrtsh/wrtsh2.cxx @@ -242,6 +242,13 @@ BOOL SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet) return bResult; } +BOOL SwWrtShell::UpdateField( sw::mark::IFieldmark &fieldBM ) +{ + return SwEditShell::UpdateField(fieldBM); +} + + + // ein Klick aus das angegebene Feld. Der Cursor steht auf diesem. // Fuehre die vor definierten Aktionen aus. -- cgit v1.2.3 From 40c49e519043b828400a67ee30d8883b4b6af318 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 20 Nov 2009 15:30:25 +0100 Subject: [CWS autorecovery] introduced status SfxFrame::InsertDocument which encapsulates a usage pattern comprised of the old InsertDocument/CreateViewFrame pair --- sw/source/ui/app/apphdl.cxx | 9 ++------- sw/source/ui/app/applab.cxx | 21 ++++++--------------- 2 files changed, 8 insertions(+), 22 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index f4b4a4838d..9618817ce9 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -965,13 +965,8 @@ void NewXForms( SfxRequest& rReq ) { const SfxPoolItem* pFrameItem = NULL; pArgs->GetItemState( SID_DOCFRAME, FALSE, &pFrameItem ); - if( pFrameItem != NULL ) - { - SfxFrame* pFrame = - static_cast( pFrameItem )->GetFrame(); - DBG_ASSERT( pFrame != NULL, "no frame?" ); - pFrame->InsertDocument( xDocSh ); - } + SfxFrame* pFrame = pFrameItem ? dynamic_cast< const SfxFrameItem& >( *pFrameItem ).GetFrame() : NULL; + SfxFrame::InsertDocument( *xDocSh, pFrame ); } // set return value diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index 889b131c14..d06356c6e6 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -243,19 +243,10 @@ static sal_uInt16 nBCTitleNo = 0; if(pArgs) pArgs->GetItemState(SID_DOCFRAME, FALSE, &pFrameItem); - SfxViewFrame* pFrame = 0; - if( pFrameItem ) - { - SfxFrame* pFr = ((const SfxFrameItem*)pFrameItem)->GetFrame(); - xDocSh->PutItem(SfxBoolItem(SID_HIDDEN, TRUE)); - pFr->InsertDocument(xDocSh); - pFrame = pFr->GetCurrentViewFrame(); - } - else - { - pFrame = SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE ); - } - SwView *pNewView = (SwView*) pFrame->GetViewShell(); + SfxFrame* pFrame = pFrameItem ? dynamic_cast< const SfxFrameItem& >( *pFrameItem ).GetFrame() : NULL; + SfxViewFrame* pViewFrame = SfxFrame::InsertDocument( *xDocSh, pFrame, 0, true ); + + SwView *pNewView = (SwView*) pViewFrame->GetViewShell(); pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird. // Dokumenttitel setzen @@ -272,7 +263,7 @@ static sal_uInt16 nBCTitleNo = 0; } xDocSh->SetTitle( aTmp ); - pFrame->GetFrame()->Appear(); + pViewFrame->GetFrame()->Appear(); // Shell ermitteln SwWrtShell *pSh = pNewView->GetWrtShellPtr(); @@ -474,7 +465,7 @@ static sal_uInt16 nBCTitleNo = 0; if( rItem.bSynchron ) { - SfxDispatcher* pDisp = pFrame->GetDispatcher(); + SfxDispatcher* pDisp = pViewFrame->GetDispatcher(); ASSERT(pDisp, "Heute kein Dispatcher am Frame?"); pDisp->Execute(FN_SYNC_LABELS, SFX_CALLMODE_ASYNCHRON); } -- cgit v1.2.3 From d7a7f58fafa5fe50547328c90423adb04be4cd61 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Mon, 23 Nov 2009 10:22:50 +0100 Subject: cbosdo02: fixes of compiler warning on Linux, Mac OS X Intel and Solaris Sparc --- sw/inc/pam.hxx | 2 +- sw/source/core/crsr/bookmrk.cxx | 2 +- sw/source/core/crsr/makefile.mk | 1 + sw/source/core/crsr/pam.cxx | 2 +- sw/source/core/doc/docbm.cxx | 17 ----------------- sw/source/filter/ww8/wrtww8.cxx | 2 +- sw/source/ui/docvw/edtwin.cxx | 4 ++-- sw/source/ui/uiview/viewling.cxx | 2 +- 8 files changed, 8 insertions(+), 24 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index 30427864a9..6209e23a28 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -272,7 +272,7 @@ public: DECL_FIXEDMEMPOOL_NEWDEL(SwPaM); String GetTxt() const; - void Invalidate(); + void InvalidatePaM(); }; diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index eaee9a5a76..021622e95d 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -371,7 +371,7 @@ namespace sw { namespace mark void Fieldmark::invalidate( ) { SwPaM aPaM( this->GetMarkPos(), this->GetOtherMarkPos() ); - aPaM.Invalidate(); + aPaM.InvalidatePaM(); } const ::rtl::OUString Fieldmark::our_sNamePrefix = ::rtl::OUString::createFromAscii("__Fieldmark__"); diff --git a/sw/source/core/crsr/makefile.mk b/sw/source/core/crsr/makefile.mk index 57cb499dec..5d450e82ac 100644 --- a/sw/source/core/crsr/makefile.mk +++ b/sw/source/core/crsr/makefile.mk @@ -51,6 +51,7 @@ CDEFS+=-Dmydebug EXCEPTIONSFILES= \ $(SLO)$/crbm.obj \ $(SLO)$/crsrsh.obj \ + $(SLO)$/bookmrk.obj \ $(SLO)$/viscrs.obj SLOFILES = \ diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index e8bb96ed82..1dbdbc487a 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -1229,7 +1229,7 @@ BOOL SwPaM::Overlap(const SwPaM & a, const SwPaM & b) return !(*b.End() <= *a.Start() || *a.End() <= *b.End()); } -void SwPaM::Invalidate() +void SwPaM::InvalidatePaM() { const SwNode *_pNd=this->GetNode(); const SwTxtNode *_pTxtNd=(_pNd!=NULL?_pNd->GetTxtNode():NULL); diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 86924a5d95..fb539b0a76 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -67,23 +67,6 @@ #include #include -static void lcl_docbm_FixPosition( SwPosition& rPos ) -{ - // make sure the position has 1) the proper node, and 2) a proper index - SwTxtNode* pTxtNode = rPos.nNode.GetNode().GetTxtNode(); - - if( rPos.nContent.GetIndex() > ( pTxtNode == NULL ? 0 : pTxtNode->Len() ) ) - { - DBG_ERROR( "illegal position" ); - xub_StrLen nLen = rPos.nContent.GetIndex(); - if( pTxtNode == NULL ) - nLen = 0; - else if( nLen >= pTxtNode->Len() ) - nLen = pTxtNode->Len(); - rPos.nContent.Assign( pTxtNode, nLen ); - } -} - using namespace ::std; using namespace ::boost; diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index a28a640f70..8482de623d 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3596,7 +3596,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) } } -void WW8Export::WriteHyperlinkData( const sw::mark::IFieldmark& rFieldmark ) +void WW8Export::WriteHyperlinkData( const sw::mark::IFieldmark& /*rFieldmark*/ ) { //@TODO implement me !!! } diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 40206e17f9..be68ef18d4 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -4216,8 +4216,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if ( aCntntAtPos.aFnd.pFldmark != NULL) { IFieldmark *fieldBM = const_cast< IFieldmark* > ( aCntntAtPos.aFnd.pFldmark ); - SwDocShell* pDocSh = rView.GetDocShell(); - SwDoc *pDoc=pDocSh->GetDoc(); + //SwDocShell* pDocSh = rView.GetDocShell(); + //SwDoc *pDoc=pDocSh->GetDoc(); if (fieldBM->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ) ) { bool isChecked = fieldBM->getParam( ECMA_FORMCHECKBOX_CHECKED ).second.compareToAscii("on") == 0; diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index e4e0449774..dee97a6f01 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -1055,7 +1055,7 @@ BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM ) SwFieldDialog aFldDlg(pEditWin, fieldBM); aFldDlg.SetPosPixel(pEditWin->OutputToScreenPixel(aPixPos)); - short ret=aFldDlg.Execute(); + /*short ret=*/aFldDlg.Execute(); int selection=aFldDlg.getSelection(); if (selection>=0) { fieldBM->addParam(ECMA_FORMDROPDOWN_RESULT, selection); -- cgit v1.2.3 From 87076af594200b4c4228e4844e0e21de92b1551c Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Mon, 23 Nov 2009 12:20:40 +0100 Subject: cbosdo02: Use instead of , because class has been already removed (in some other cws) --- sw/source/core/crsr/pam.cxx | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 1dbdbc487a..6861ab2ec4 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -869,14 +869,14 @@ SwCntntNode* GetNode( SwPaM & rPam, BOOL& rbFirst, SwMoveFn fnMove, pNd = rPam.GetCntntNode(); if( pNd ) { - if( - ( + if( + ( 0 == ( pFrm = pNd->GetFrm()) || ( !bInReadOnly && pFrm->IsProtected() ) || - (pFrm->IsTxtFrm() && ((SwTxtFrm*)pFrm)->IsHiddenNow()) + (pFrm->IsTxtFrm() && ((SwTxtFrm*)pFrm)->IsHiddenNow()) ) || ( !bInReadOnly && pNd->FindSectionNode() && - pNd->FindSectionNode()->GetSection().IsProtect() + pNd->FindSectionNode()->GetSection().IsProtect() ) ) { @@ -1224,7 +1224,7 @@ String SwPaM::GetTxt() const return aResult; } -BOOL SwPaM::Overlap(const SwPaM & a, const SwPaM & b) +BOOL SwPaM::Overlap(const SwPaM & a, const SwPaM & b) { return !(*b.End() <= *a.Start() || *a.End() <= *b.End()); } @@ -1233,15 +1233,17 @@ void SwPaM::InvalidatePaM() { const SwNode *_pNd=this->GetNode(); const SwTxtNode *_pTxtNd=(_pNd!=NULL?_pNd->GetTxtNode():NULL); - if (_pTxtNd!=NULL) { - //pretent we've added a char to force layout to recalc the portion... - SwInsChr aHint(_pTxtNd->GetIndex()); - SwModify *_pModify=(SwModify*)_pTxtNd; - _pModify->Modify( 0, &aHint); + if (_pTxtNd!=NULL) + { + // pretent that the PaM marks inserted text to recalc the portion... + SwInsTxt aHint( Start()->nContent.GetIndex(), + End()->nContent.GetIndex() - Start()->nContent.GetIndex() + 1 ); + SwModify *_pModify=(SwModify*)_pTxtNd; + _pModify->Modify( 0, &aHint); } } BOOL SwPaM::LessThan(const SwPaM & a, const SwPaM & b) { - return (*a.Start() < *b.Start()) || (*a.Start() == *b.Start() && *a.End() < *b.End()); + return (*a.Start() < *b.Start()) || (*a.Start() == *b.Start() && *a.End() < *b.End()); } -- cgit v1.2.3 From fd9bc9f8f6337c7765de63aee20f5bcec124c1f4 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Mon, 23 Nov 2009 12:21:42 +0100 Subject: cbosdo02: fix compiler warning for Windows --- sw/source/core/crsr/bookmrk.cxx | 14 ++++++++------ sw/source/core/text/portxt.cxx | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 16 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 021622e95d..60d0fec7a1 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -116,7 +116,7 @@ namespace sw { namespace mark bool MarkBase::IsCoveringPosition(const SwPosition& rPos) const { - return GetMarkStart() <= rPos && rPos <= GetMarkEnd(); + return GetMarkStart() <= rPos && rPos <= GetMarkEnd(); } void MarkBase::SetMarkPos(const SwPosition& rNewPos) @@ -283,8 +283,8 @@ namespace sw { namespace mark if(!IsExpanded()) SetOtherMarkPos(GetMarkPos()); } - - rtl::OUString Fieldmark::toString( ) const + + rtl::OUString Fieldmark::toString( ) const { rtl::OUStringBuffer buf; buf.appendAscii( "Fieldmark: ( Name, Type, [ Nd1, Id1 ], [ Nd2, Id2 ] ): ( " ); @@ -363,13 +363,15 @@ namespace sw { namespace mark } } return ParamPair_t( rtl::OUString( ), - ( defaultValue ? + ( defaultValue ? rtl::OUString::createFromAscii( defaultValue ) : rtl::OUString( ) ) ); } void Fieldmark::invalidate( ) { + // @TODO: Does exist a better solution to trigger a format of the + // fieldmark portion? If yes, please use it. SwPaM aPaM( this->GetMarkPos(), this->GetOtherMarkPos() ); aPaM.InvalidatePaM(); } @@ -393,7 +395,7 @@ namespace sw { namespace mark { lcl_AssureFieldMarksSet(this, io_pDoc, CH_TXT_ATR_FORMELEMENT, CH_TXT_ATR_FIELDEND); - // For some reason the end mark is moved from 1 by the Insert: we don't + // For some reason the end mark is moved from 1 by the Insert: we don't // want this for checkboxes this->GetMarkEnd( ).nContent--; } diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 9f19b728b6..094053bdb6 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -785,12 +785,12 @@ sal_Bool SwFieldMarkPortion::Format( SwTxtFormatInfo & ) } namespace ecma { - static int getCurrentListIndex( IFieldmark* pBM, + static int getCurrentListIndex( IFieldmark* pBM, ::rtl::OUString *currentText = NULL ) { int currentIndex = pBM->getParam( ECMA_FORMDROPDOWN_RESULT, "0" ).second.toInt32(); int idx = 0; - for( int i = 0; i < pBM->getNumOfParams(); i++ ) + for( int i = 0; i < pBM->getNumOfParams(); i++ ) { IFieldmark::ParamPair_t p = pBM->getParam( i ); if ( p.first.compareToAscii( ECMA_FORMDROPDOWN_LISTENTRY ) == 0 ) @@ -799,11 +799,11 @@ namespace ecma { { if ( currentText!=NULL ) *currentText=p.second; break; - } + } else idx++; - } - } + } + } return idx; } } /* ecma */ @@ -822,20 +822,20 @@ void SwFieldFormPortion::Paint( const SwTxtPaintInfo& rInf ) const "SwFieldFormPortion::Paint(..)" " - Where is my form field bookmark???"); - if ( pBM != NULL ) + if ( pBM != NULL ) { if ( pBM->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ) ) { // a checkbox... bool checked = pBM->getParam( ECMA_FORMCHECKBOX_CHECKED ).second.compareToAscii("on") == 0; rInf.DrawCheckBox( *this , checked); - } + } else if ( pBM->GetFieldname( ).equalsAscii( ECMA_FORMDROPDOWN ) ) { // a list... rtl::OUString aTxt; rInf.DrawViewOpt( *this, POR_FLD ); - rInf.DrawText( aTxt, *this, 0, aTxt.getLength(), false ); - } - else + rInf.DrawText( aTxt, *this, 0, 0/*aTxt.getLength()*/, false ); + } + else { assert(0); // unknown type... } -- cgit v1.2.3 From 6f50942569e5cc630356afbd256d0610c4832cf2 Mon Sep 17 00:00:00 2001 From: Oliver Specht Date: Mon, 23 Nov 2009 13:09:49 +0000 Subject: #i107064# copy styles in SwDoc::CreateCopy() --- sw/source/core/doc/docnew.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'sw/source') diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index eb208db2e7..70a86d9388 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -1353,6 +1353,7 @@ SwDoc* SwDoc::CreateCopy() const ResetModified(); */ + pRet->ReplaceStyles( *(SwDoc*)this ); //copy content pRet->Paste( *this ); return pRet; -- cgit v1.2.3 From 073be1787a78ab451d3c4f8e4f44e75446ae1c0a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 23 Nov 2009 14:38:46 +0100 Subject: [CWS autorecovery] removed SfxCancellable/SfxCancelManager, and (part of) its transitive closure No real-life use cases for this exist anymore, since nowadays document loading happens synchronously all the time. --- sw/inc/ndgrf.hxx | 4 ---- sw/source/core/graphic/ndgrf.cxx | 9 --------- sw/source/filter/html/htmlgrin.cxx | 1 - 3 files changed, 14 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx index fcef33fdba..942cda61a5 100644 --- a/sw/inc/ndgrf.hxx +++ b/sw/inc/ndgrf.hxx @@ -211,10 +211,6 @@ public: BOOL GetFileFilterNms( String* pFileNm, String* pFilterNm ) const; void ReleaseLink(); - // Prioritaet beim Laden der Grafik setzen. Geht nur, wenn der Link - // ein FileObject gesetzt hat - void SetTransferPriority( USHORT nPrio ); - // Skalieren einer Image-Map: Die Image-Map wird um den Faktor // zwischen Grafik-Groesse und Rahmen-Groesse vergroessert/verkleinert void ScaleImageMap(); diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 6626da2420..f9528578ab 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -674,15 +674,6 @@ void SwGrfNode::SetTwipSize( const Size& rSz ) } } - // Prioritaet beim Laden der Grafik setzen. Geht nur, wenn der Link - // ein FileObject gesetzt hat -void SwGrfNode::SetTransferPriority( USHORT nPrio ) -{ - if( refLink.Is() && refLink->GetObj() ) - SvxLinkManager::SetTransferPriority( *refLink, nPrio ); -} - - void SwGrfNode::ScaleImageMap() { if( !nGrfSize.Width() || !nGrfSize.Height() ) diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 688ed149a5..f68f7ccc3e 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -809,7 +809,6 @@ IMAGE_SETEVENT: // gleich (synchron) angepasst wird (war bug #40983#) if( bRequestGrfNow ) { - pGrfNd->SetTransferPriority( SFX_TFPRIO_VISIBLE_LOWRES_GRAPHIC ); pGrfNd->SwapIn(); } -- cgit v1.2.3 From 7494b24f28a3f87d8d234ffd82bee9fc6c195b8c Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 23 Nov 2009 20:48:33 +0100 Subject: [CWS autorecovery] while we are at it .... SID_BROWSE_STOP is dead, for a long time now ... --- sw/source/ui/docvw/docvw.hrc | 2 +- sw/source/ui/docvw/docvw.src | 6 ------ sw/source/ui/docvw/romenu.cxx | 2 -- 3 files changed, 1 insertion(+), 9 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/docvw/docvw.hrc b/sw/source/ui/docvw/docvw.hrc index 09b6e42f14..1d56aff4a3 100644 --- a/sw/source/ui/docvw/docvw.hrc +++ b/sw/source/ui/docvw/docvw.hrc @@ -37,7 +37,7 @@ #define MN_READONLY_OPENURL (RC_DOCVW_BEGIN + 2) #define MN_READONLY_OPENURLNEW (RC_DOCVW_BEGIN + 3) #define MN_READONLY_EDITDOC (RC_DOCVW_BEGIN + 4) -#define MN_READONLY_BROWSE_STOP (RC_DOCVW_BEGIN + 5) + // FREE, formerly known as MN_READONLY_BROWSE_STOP #define MN_READONLY_BROWSE_BACKWARD (RC_DOCVW_BEGIN + 6) #define MN_READONLY_BROWSE_FORWARD (RC_DOCVW_BEGIN + 7) #define MN_READONLY_SELECTION_MODE (RC_DOCVW_BEGIN + 8) diff --git a/sw/source/ui/docvw/docvw.src b/sw/source/ui/docvw/docvw.src index 74da4994c7..832c70517d 100644 --- a/sw/source/ui/docvw/docvw.src +++ b/sw/source/ui/docvw/docvw.src @@ -80,12 +80,6 @@ Menu MN_READONLY_POPUP }; SEPARATOR MenuItem - { - Identifier = MN_READONLY_BROWSE_STOP ; - HelpID = SID_BROWSE_STOP ; - Text [ en-US ] = "~Stop" ; - }; - MenuItem { Identifier = MN_READONLY_BROWSE_BACKWARD ; HelpID = SID_BROWSE_BACKWARD ; diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx index 7bd6e7f501..e230b8581e 100644 --- a/sw/source/ui/docvw/romenu.cxx +++ b/sw/source/ui/docvw/romenu.cxx @@ -226,7 +226,6 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : Check( MN_READONLY_EDITDOC, SID_EDITDOC, rDis ); Check( MN_READONLY_SELECTION_MODE, FN_READONLY_SELECTION_MODE, rDis ); Check( MN_READONLY_SOURCEVIEW, SID_SOURCEVIEW, rDis ); - Check( MN_READONLY_BROWSE_STOP, SID_BROWSE_STOP, rDis ); Check( MN_READONLY_BROWSE_BACKWARD, SID_BROWSE_BACKWARD,rDis ); Check( MN_READONLY_BROWSE_FORWARD, SID_BROWSE_FORWARD, rDis ); #ifdef WNT @@ -318,7 +317,6 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId ) rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(SID_RELOAD); break; - case MN_READONLY_BROWSE_STOP: nExecId = SID_BROWSE_STOP; break; case MN_READONLY_BROWSE_BACKWARD: nExecId = SID_BROWSE_BACKWARD;break; case MN_READONLY_BROWSE_FORWARD: nExecId = SID_BROWSE_FORWARD; break; case MN_READONLY_SOURCEVIEW: nExecId = SID_SOURCEVIEW; break; -- cgit v1.2.3 From c644a369218509feedb0e5e2a3863cac65ebab83 Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Tue, 24 Nov 2009 11:34:17 +0100 Subject: dba33d: #i104949# show cell value when set field text nodes exits --- sw/source/core/table/swtable.cxx | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index caffe6edbf..8d0c21db65 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -50,6 +50,8 @@ #include #include #include +#include +#include #include #include #include // fuer RedlineTbl() @@ -101,6 +103,8 @@ SV_IMPL_REF( SwServerObject ) #define COLFUZZY 20 +void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol, + BOOL bChgAlign,ULONG nNdPos ); //---------------------------------- class SwTableBox_Impl @@ -2087,11 +2091,16 @@ void SwTable::SetHTMLTableLayout( SwHTMLTableLayout *p ) pHTMLLayout = p; } - void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol, BOOL bChgAlign ) { ULONG nNdPos = rBox.IsValidNumTxtNd( TRUE ); + ChgTextToNum( rBox,rTxt,pCol,bChgAlign,nNdPos); +} +void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol, + BOOL bChgAlign,ULONG nNdPos ) +{ + if( ULONG_MAX != nNdPos ) { SwDoc* pDoc = rBox.GetFrmFmt()->GetDoc(); @@ -2159,6 +2168,8 @@ void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol, for( n = 0; n < rOrig.Len() && '\x9' == rOrig.GetChar( n ); ++n ) ; + for( ; n < rOrig.Len() && '\x01' == rOrig.GetChar( n ); ++n ) + ; SwIndex aIdx( pTNd, n ); for( n = rOrig.Len(); n && '\x9' == rOrig.GetChar( --n ); ) ; @@ -2637,6 +2648,14 @@ ULONG SwTableBox::IsValidNumTxtNd( BOOL bCheckAttr ) const *pAttr->GetStart() || *pAttr->GetAnyEnd() < rTxt.Len() ) { + if ( pAttr->Which() == RES_TXTATR_FIELD ) + { + const SwField* pField = pAttr->GetFld().GetFld(); + if ( pField && pField->GetTypeId() == TYP_SETFLD ) + { + continue; + } + } nPos = ULONG_MAX; break; } @@ -2691,7 +2710,7 @@ void SwTableBox::ActualiseValueBox() const String& rTxt = pSttNd->GetNodes()[ nNdPos ]->GetTxtNode()->GetTxt(); if( rTxt != sNewTxt ) - ChgTextToNum( *this, sNewTxt, pCol, FALSE ); + ChgTextToNum( *this, sNewTxt, pCol, FALSE ,nNdPos); } } } -- cgit v1.2.3 From 918280b45598a4edddfaf75dc3cefe8c037857c6 Mon Sep 17 00:00:00 2001 From: Oliver Düsterhoff Date: Wed, 25 Nov 2009 13:26:13 +0000 Subject: #i107143# method - pass placeholder property to created instance --- sw/source/core/text/porfld.cxx | 7 ++++++- sw/source/core/text/porfld.hxx | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 8fcdbca8e7..913ca9e393 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -82,8 +82,13 @@ SwFldPortion *SwFldPortion::Clone( const XubString &rExpand ) const { SwFont *pNewFnt; if( 0 != ( pNewFnt = pFnt ) ) + { pNewFnt = new SwFont( *pFnt ); - SwFldPortion* pClone = new SwFldPortion( rExpand, pNewFnt ); + } + // --> OD 2009-11-25 #i107143# + // pass placeholder property to created instance. + SwFldPortion* pClone = new SwFldPortion( rExpand, pNewFnt, bPlaceHolder ); + // <-- pClone->SetNextOffset( nNextOffset ); pClone->m_bNoLength = this->m_bNoLength; return pClone; diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx index 2292a27b78..5f52d45631 100644 --- a/sw/source/core/text/porfld.hxx +++ b/sw/source/core/text/porfld.hxx @@ -60,7 +60,7 @@ protected: sal_Bool bAnimated : 1; // wird von SwGrfNumPortion benutzt sal_Bool bNoPaint : 1; // wird von SwGrfNumPortion benutzt sal_Bool bReplace : 1; // wird von SwGrfNumPortion benutzt - sal_Bool bPlaceHolder : 1; + const sal_Bool bPlaceHolder : 1; sal_Bool m_bNoLength : 1; // HACK for meta suffix (no CH_TXTATR) inline void SetFont( SwFont *pNew ) { pFnt = pNew; } -- cgit v1.2.3 From 8701a6f06954c015c3f494b0c9ea6deac9a1afce Mon Sep 17 00:00:00 2001 From: C?dric Bosdonnat Date: Wed, 25 Nov 2009 14:41:44 +0100 Subject: cbosdo01: Implemented i#107083. --- sw/source/core/edit/autofmt.cxx | 7 ++----- sw/source/ui/docvw/edtwin.cxx | 4 ++-- sw/source/ui/shells/textsh.cxx | 2 +- sw/source/ui/wrtsh/wrtsh1.cxx | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 8c3181d08e..d1c7e51e21 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -1895,7 +1895,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos ) if( aFlags.bAFmtByInput || (!aFlags.bAutoCorrect && !aFlags.bReplaceQuote && !aFlags.bCptlSttSntnc && !aFlags.bCptlSttWrd && - !aFlags.bChgFracionSymbol && !aFlags.bChgOrdinalNumber && + !aFlags.bChgOrdinalNumber && !aFlags.bChgToEnEmDash && !aFlags.bSetINetAttr && !aFlags.bChgWeightUnderl && !aFlags.bAddNonBrkSpace) ) return; @@ -2127,10 +2127,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos ) ? pAktTxtNd->GetLang( nSttPos ) : LANGUAGE_SYSTEM; - if( ( aFlags.bChgFracionSymbol && - SetRedlineTxt( STR_AUTOFMTREDL_FRACTION ) && - pATst->FnChgFractionSymbol( aACorrDoc, *pTxt, nSttPos, nPos ) ) || - ( aFlags.bChgOrdinalNumber && + if( ( aFlags.bChgOrdinalNumber && SetRedlineTxt( STR_AUTOFMTREDL_ORDINAL ) && pATst->FnChgOrdinalNumber( aACorrDoc, *pTxt, nSttPos, nPos, eLang ) ) || ( aFlags.bChgToEnEmDash && diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 0f45470c91..f12a691208 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -2285,7 +2285,7 @@ KEYINPUT_CHECKTABLE_INSDEL: else if( !aKeyEvent.GetRepeat() && pACorr && bIsAutoCorrectChar && pACfg->IsAutoFmtByInput() && pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | - ChgFractionSymbol | ChgOrdinalNumber | + ChgOrdinalNumber | ChgToEnEmDash | SetINetAttr | Autocorrect ) && '\"' != aCh && '\'' != aCh && '*' != aCh && '_' != aCh && @@ -2317,7 +2317,7 @@ KEYINPUT_CHECKTABLE_INSDEL: { if( pACorr && pACfg->IsAutoFmtByInput() && pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | - ChgFractionSymbol | ChgOrdinalNumber | + ChgOrdinalNumber | ChgToEnEmDash | SetINetAttr | Autocorrect ) && !rSh.HasReadonlySel() ) diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 965b0f5d32..6f47c3153c 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -202,7 +202,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) SvxAutoCorrect* pACorr = pACfg->GetAutoCorrect(); if( pACorr && pACfg->IsAutoFmtByInput() && pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | - ChgFractionSymbol | ChgOrdinalNumber | + AddNonBrkSpace | ChgOrdinalNumber | ChgToEnEmDash | SetINetAttr | Autocorrect )) rSh.AutoCorrect( *pACorr, cIns ); else diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 6294722f46..5741d677c0 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -160,7 +160,7 @@ SvxAutoCorrect* lcl_IsAutoCorr() { SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get()->GetAutoCorrect(); if( pACorr && !pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | - ChgFractionSymbol | ChgOrdinalNumber | + AddNonBrkSpace | ChgOrdinalNumber | ChgToEnEmDash | SetINetAttr | Autocorrect )) pACorr = 0; return pACorr; -- cgit v1.2.3 From 7e2e68a52533661cc184873f9e754f958ba7f264 Mon Sep 17 00:00:00 2001 From: Oliver Specht Date: Fri, 27 Nov 2009 13:45:30 +0000 Subject: #i101821# find correct frame and SwPageFrame to print (or PDF export) selections --- sw/source/core/view/vprint.cxx | 59 ++++++++++++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 13 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index 3ae5a3b5ba..af51815c87 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -776,16 +776,32 @@ SwDoc * ViewShell::CreatePrtDoc( SfxPrinter* pPrt, SfxObjectShellRef &rDocShellR pActCrsr = dynamic_cast(pActCrsr->GetPrev()); } - // Die Y-Position der ersten Selektion - const Point aSelPoint = pFESh->IsTableMode() ? - pFESh->GetTableCrsr()->GetSttPos() : - pFirstCrsr->GetSttPos(); + Point aSelPoint; + if( pFESh->IsTableMode() ) + { + SwShellTableCrsr* pShellTblCrsr = pFESh->GetTableCrsr(); + + const SwCntntNode* pCntntNode = pShellTblCrsr->GetNode()->GetCntntNode(); + const SwCntntFrm *pCntntFrm = pCntntNode ? pCntntNode->GetFrm( 0, pShellTblCrsr->Start() ) : 0; + if( pCntntFrm ) + { + SwRect aCharRect; + SwCrsrMoveState aTmpState( MV_NONE ); + pCntntFrm->GetCharRect( aCharRect, *pShellTblCrsr->Start(), &aTmpState ); + aSelPoint = Point( aCharRect.Left(), aCharRect.Top() ); + } + } + else + { + aSelPoint = pFirstCrsr->GetSttPos(); + } const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aSelPoint ); + ASSERT( pPage, "no page found!" ); - // und ihren Seitendescribtor - const SwPageDesc* pPageDesc = pPrtDoc->FindPageDescByName( - pPage->GetPageDesc()->GetName() ); + // get page descriptor - fall back to the first one if pPage could not be found + const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDescByName( + pPage->GetPageDesc()->GetName() ) : &pPrtDoc->_GetPageDesc( (sal_uInt16)0 ); if( !pFESh->IsTableMode() && pActCrsr->HasMark() ) { // Am letzten Absatz die Absatzattribute richten: @@ -868,15 +884,32 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) // Die Y-Position der ersten Selektion // Die Y-Position der ersten Selektion - const Point aSelPoint = pFESh->IsTableMode() ? - pFESh->GetTableCrsr()->GetSttPos() : - pFirstCrsr->GetSttPos(); + Point aSelPoint; + if( pFESh->IsTableMode() ) + { + SwShellTableCrsr* pShellTblCrsr = pFESh->GetTableCrsr(); + + const SwCntntNode* pCntntNode = pShellTblCrsr->GetNode()->GetCntntNode(); + const SwCntntFrm *pCntntFrm = pCntntNode ? pCntntNode->GetFrm( 0, pShellTblCrsr->Start() ) : 0; + if( pCntntFrm ) + { + SwRect aCharRect; + SwCrsrMoveState aTmpState( MV_NONE ); + pCntntFrm->GetCharRect( aCharRect, *pShellTblCrsr->Start(), &aTmpState ); + aSelPoint = Point( aCharRect.Left(), aCharRect.Top() ); + } + } + else + { + aSelPoint = pFirstCrsr->GetSttPos(); + } const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aSelPoint ); + ASSERT( pPage, "no page found!" ); - // und ihren Seitendescribtor - const SwPageDesc* pPageDesc = pPrtDoc->FindPageDescByName( - pPage->GetPageDesc()->GetName() ); + // get page descriptor - fall back to the first one if pPage could not be found + const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDescByName( + pPage->GetPageDesc()->GetName() ) : &pPrtDoc->_GetPageDesc( (sal_uInt16)0 ); if( !pFESh->IsTableMode() && pActCrsr->HasMark() ) { // Am letzten Absatz die Absatzattribute richten: -- cgit v1.2.3 From 50080bc9a4be286da9022c274e838eaf97d5c8b0 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 30 Nov 2009 12:56:04 +0100 Subject: [CWS autorecovery] merged SfxTopViewFrame into SfxViewFrame SfxTopViewFrame was the only class deriving from the abstract class SfxViewFrame, so both can effectively be treated as one class. This change was done to make subsequent refactorings easier. --- sw/source/ui/app/docsh2.cxx | 6 +++--- sw/source/ui/app/swwait.cxx | 8 ++++---- sw/source/ui/uiview/pview.cxx | 6 ++---- sw/source/ui/uno/unomailmerge.cxx | 2 +- sw/source/ui/uno/unotxdoc.cxx | 6 ++---- 5 files changed, 12 insertions(+), 16 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 1b0a0c1c0e..f4bbaa1da6 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1800,15 +1800,15 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView ) // Currently there can be only one view (layout) if the document is viewed in Web layout // So if there are more views we are in print layout and for toggling to Web layout all other views must be closed - SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, 0, FALSE); + SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, FALSE); do { if( pTmpFrm != pTempView->GetViewFrame() ) { pTmpFrm->DoClose(); - pTmpFrm = SfxViewFrame::GetFirst(this, 0, FALSE); + pTmpFrm = SfxViewFrame::GetFirst(this, FALSE); } else - pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, 0, FALSE); + pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, FALSE); } while ( pTmpFrm ); diff --git a/sw/source/ui/app/swwait.cxx b/sw/source/ui/app/swwait.cxx index 83a2968c89..00ae6d1f6f 100644 --- a/sw/source/ui/app/swwait.cxx +++ b/sw/source/ui/app/swwait.cxx @@ -41,25 +41,25 @@ void SwDocShell::EnterWait( BOOL bLockDispatcher ) { - SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, 0, FALSE ); + SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, FALSE ); while ( pFrame ) { pFrame->GetWindow().EnterWait(); if ( bLockDispatcher ) pFrame->GetDispatcher()->Lock( TRUE ); - pFrame = SfxViewFrame::GetNext( *pFrame, this, 0, FALSE ); + pFrame = SfxViewFrame::GetNext( *pFrame, this, FALSE ); } } void SwDocShell::LeaveWait( BOOL bLockDispatcher ) { - SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, 0, FALSE ); + SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, FALSE ); while ( pFrame ) { pFrame->GetWindow().LeaveWait(); if ( bLockDispatcher ) pFrame->GetDispatcher()->Lock( FALSE ); - pFrame = SfxViewFrame::GetNext( *pFrame, this, 0, FALSE ); + pFrame = SfxViewFrame::GetNext( *pFrame, this, FALSE ); } } diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 385cfdeee0..0cfa3bb7db 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -1909,10 +1909,8 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): delete pPageDownBtn; /* SfxObjectShell* pDocSh = GetDocShell(); - TypeId aType = TYPE( SfxTopViewFrame ); - - for( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocSh, aType ); - pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDocSh, aType ) ) + for( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocSh ); + pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDocSh ) ) if( pFrame != GetViewFrame() ) { // es gibt noch eine weitere Sicht auf unser Dokument, also diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index ce1e099e83..b0be5b2368 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -627,7 +627,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( aCurSelection = aTranslated; } - SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, 0, FALSE); + SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, FALSE); SwView *pView = PTR_CAST( SwView, pFrame->GetViewShell() ); if (!pView) throw RuntimeException(); diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 3f9e2b0b12..d195e83ab1 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -185,7 +185,6 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell ) { // check if the view frame still exists SfxViewFrame* pFound = SfxViewFrame::GetFirst( pDocShell, - 0, FALSE ); while(pFound) { @@ -196,7 +195,6 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell ) } pFound = SfxViewFrame::GetNext( *pFound, pDocShell, - 0, FALSE ); } } @@ -2691,7 +2689,7 @@ SfxViewShell * SwXTextDocument::GuessViewShell() SfxViewShell *pView = 0; SwView *pSwView = 0; SwPagePreView *pSwPagePreView = 0; - SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, 0, sal_False ); + SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, sal_False ); while (pFrame) { pView = pFrame->GetViewShell(); @@ -2700,7 +2698,7 @@ SfxViewShell * SwXTextDocument::GuessViewShell() break; if (!pSwPagePreView) pSwPagePreView = dynamic_cast< SwPagePreView * >(pView); - pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, 0, sal_False ); + pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, sal_False ); } return pSwView ? pSwView : dynamic_cast< SwView * >(pSwPagePreView); -- cgit v1.2.3 From a876f97cd1bd9f37ff3aff42617c92ce9a8e7521 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 30 Nov 2009 12:56:04 +0100 Subject: [CWS autorecovery] forgot to remove some includes --- sw/inc/pch/precompiled_sw.hxx | 1 - sw/source/ui/uiview/pview.cxx | 1 - sw/source/ui/uiview/view2.cxx | 1 - 3 files changed, 3 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 0a43d2c73d..fac4fdbfe3 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -597,7 +597,6 @@ #include "sfx2/tabdlg.hxx" #include "sfx2/tbxctrl.hxx" #include "sfx2/templdlg.hxx" -#include "sfx2/topfrm.hxx" #include "sfx2/tplpitem.hxx" #include "sfx2/viewfac.hxx" #include "sfx2/viewfrm.hxx" diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 0cfa3bb7db..b60f7b942b 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -46,7 +46,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 493daabe92..e5b0e1eb4d 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -90,7 +90,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3 From f9b05106f631191686ee5e09a3c486c6e64835c1 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 30 Nov 2009 12:56:05 +0100 Subject: [CWS autorecovery] removed some dead/unused stuff SID_BACKTOWEBTOP, some SFX_VIEW_* flags, some SFXFRAME_* flags, all BROWSE_* flags --- sw/source/ui/uiview/pview.cxx | 3 +-- sw/source/ui/uiview/srcview.cxx | 4 +--- sw/source/ui/uiview/view.cxx | 12 ++---------- 3 files changed, 4 insertions(+), 15 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index b60f7b942b..7e84c7f4c7 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -129,8 +129,7 @@ SFX_IMPL_INTERFACE(SwPagePreView, SfxViewShell, SW_RES(RID_PVIEW_TOOLBOX)) TYPEINIT1(SwPagePreView,SfxViewShell) -#define SWVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST|SFX_VIEW_OPTIMIZE_EACH| \ - SFX_VIEW_CAN_PRINT|SFX_VIEW_HAS_PRINTOPTIONS ) +#define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT|SFX_VIEW_HAS_PRINTOPTIONS ) #define MIN_PREVIEW_ZOOM 25 #define MAX_PREVIEW_ZOOM 600 diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index 5653071d84..a567977347 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -114,9 +114,7 @@ using ::rtl::OUString; using ::com::sun::star::util::SearchOptions; -#define SWSRCVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST| \ - SFX_VIEW_OBJECTSIZE_EMBEDDED| \ - SFX_VIEW_CAN_PRINT|\ +#define SWSRCVIEWFLAGS ( SFX_VIEW_CAN_PRINT|\ SFX_VIEW_NO_NEWWINDOW ) #define SRC_SEARCHOPTIONS (0xFFFF & ~(SEARCH_OPTIONS_FORMAT|SEARCH_OPTIONS_FAMILIES|SEARCH_OPTIONS_SEARCH_ALL)) diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 191ff8ac0d..d070f3e6df 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -131,14 +131,9 @@ using ::rtl::OUStringBuffer; extern sal_Bool bNoInterrupt; // in mainwn.cxx -#define SWVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST| \ - SFX_VIEW_OBJECTSIZE_EMBEDDED| \ - SFX_VIEW_CAN_PRINT| \ +#define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT| \ SFX_VIEW_HAS_PRINTOPTIONS) -//MA 06. Nov. 95: Each raus in Absprache mit MI wg. Bug 21523 -// SFX_VIEW_OPTIMIZE_EACH| - /*-------------------------------------------------------------------- Beschreibung: Statics --------------------------------------------------------------------*/ @@ -932,10 +927,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) if( SFX_CREATE_MODE_EMBEDDED != pDocSh->GetCreateMode() ) aBrwsBorder = GetMargin(); - if( _pFrame->GetFrameType() & SFXFRAME_INTERNAL ) - pWrtShell->SetFrameView( aBrwsBorder ); - else - pWrtShell->SetBrowseBorder( aBrwsBorder ); + pWrtShell->SetBrowseBorder( aBrwsBorder ); // Im CTOR duerfen keine Shell wechsel erfolgen, die muessen ueber // den Timer "zwischen gespeichert" werden. Sonst raeumt der SFX -- cgit v1.2.3 From eea817a9705c6cc07547edaccb5830d5d4340ceb Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 30 Nov 2009 13:30:52 +0100 Subject: #i10000# --- sw/source/ui/uiview/view.cxx | 7 ------- 1 file changed, 7 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index d070f3e6df..a12dd60de9 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -998,13 +998,6 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) pWrtShell->SetReadOnlyAvailable( aUsrPref.IsCursorInProtectedArea() ); pWrtShell->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions()); - if( UseObjectSize() ) - { - //Damit der Sfx _rechtzeitig weiss_, wie gross die sheet::Border sind. - SvBorder aTmp; - CalcAndSetBorderPixel( aTmp, sal_True ); - } - if( pWrtShell->GetDoc()->IsUpdateExpFld() ) { SET_CURR_SHELL( pWrtShell ); -- cgit v1.2.3 From bcd8c77b0ea4fc78391e4e61f16f8897ff03065d Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Tue, 1 Dec 2009 08:03:58 +0000 Subject: CWS-TOOLING: integrate CWS hb32showstoppers2 2009-11-05 14:28:58 +0100 hbrinkm r277370 : CWS-TOOLING: rebase CWS hb32showstoppers2 to branches/OOO320@277262 (milestone: OOO320:m3) 2009-11-04 16:04:47 +0100 hbrinkm r277357 : #i102434# write background color/shadow like WW8 does 2009-11-03 12:22:27 +0100 os r277319 : #i106515# call to LeaveDrawCreate() moved from SwWrtShell::UnSelectFrame() to SwPostItMgr::AssureStdModeAtShell() 2009-10-30 14:58:39 +0100 hbrinkm r277272 : #i103374# set default style on table row ends 2009-10-30 13:19:38 +0100 hbrinkm r277265 : #i106057# applied here because otherwise saving DOCs crashes 2009-10-28 13:50:44 +0100 hbrinkm r277240 : applied patch for OOO320_m2 #i105052# debugging code #i102420# rewritten debug output for SwNodes. #i105052# debugging code sw/source/filter/ww8/wrtww8.cxx: MSWordExportBase::WriteText: Keep track of nodes already exported and assert when a node is exported for the second time. sw/source/filter/ww8/WW8TableInfo.cxx: WW8TableNodeInfo::setNext: Announce from where to where the next pointer points. #i105052# save pointer to next SwNode in WW8TableNodeInfo merged DEV300_m60 #i105653# applied patch #i105941# crash on initialization fixed merged changes from hb32showstoppers 2009-10-27 16:39:40 +0100 mst r277223 : #i106349#: SwBaseShell::ExecUndo(): do not access members after dying --- sw/source/core/unocore/unoparagraph.cxx | 3 +- sw/source/filter/ww8/WW8TableInfo.cxx | 38 ++++++++++++-- sw/source/filter/ww8/WW8TableInfo.hxx | 3 ++ sw/source/filter/ww8/wrtww8.cxx | 93 ++++++++++++++++++++++++--------- sw/source/filter/ww8/ww8atr.cxx | 4 +- sw/source/ui/docvw/PostItMgr.cxx | 1 + sw/source/ui/shells/basesh.cxx | 5 +- sw/source/ui/wrtsh/select.cxx | 1 - 8 files changed, 114 insertions(+), 34 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 89032a3b20..812b81e928 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -293,7 +293,6 @@ void SAL_CALL SwXParagraph::SetPropertyValues_Impl( const OUString* pPropertyNames = rPropertyNames.getConstArray(); const uno::Any* pValues = rValues.getConstArray(); const SfxItemPropertyMap* pMap = m_pPropSet->getPropertyMap(); - OUString sTmp; SwParaSelection aParaSel( & aCursor ); for(sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++) { @@ -306,7 +305,7 @@ void SAL_CALL SwXParagraph::SetPropertyValues_Impl( throw beans::PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); SwXTextCursor::SetPropertyValue(aCursor, *m_pPropSet, - sTmp, pValues[nProp]); + pPropertyNames[nProp], pValues[nProp]); } } } diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index 022b3d045b..965d997955 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -161,7 +161,8 @@ WW8TableNodeInfo::WW8TableNodeInfo(const SwNode * pNode) : mnDepth(0), mpNode(pNode), - mpNext(NULL) + mpNext(NULL), + mpNextNode(NULL) { } @@ -190,9 +191,7 @@ WW8TableNodeInfo::~WW8TableNodeInfo() } #ifdef DEBUG -//!! does not compile with debug=t -> unresolved external (dbg_out), -//!! sommeone who knows what he wants to get should fix this -// sResult += dbg_out(*mpNode); + sResult += dbg_out(*mpNode); #endif sResult +=""; @@ -247,6 +246,17 @@ void WW8TableNodeInfo::setTable(const SwTable * pTable) void WW8TableNodeInfo::setNext(WW8TableNodeInfo * pNext) { mpNext = pNext; + +#ifdef DEBUG + ::std::clog << "" << toString() << "" + << pNext->toString() << "" + << ::std::endl; +#endif +} + +void WW8TableNodeInfo::setNextNode(SwNode * pNode) +{ + mpNode = pNode; } void WW8TableNodeInfo::setCell(sal_uInt32 nCell) @@ -287,6 +297,11 @@ WW8TableNodeInfo * WW8TableNodeInfo::getNext() const return mpNext; } +SwNode * WW8TableNodeInfo::getNextNode() const +{ + return mpNextNode; +} + bool WW8TableNodeInfo::isEndOfLine() const { return getInnerForDepth(mnDepth)->isEndOfLine(); @@ -362,6 +377,14 @@ void WW8TableInfo::processSwTable(const SwTable * pTable) pPrev = processTableLine(pTable, pLine, n, 1, pPrev); } + if (pPrev != NULL) + { + SwTableNode * pTableNode = pTable->GetTableNode(); + SwEndNode * pEndNode = pTableNode->EndOfSectionNode(); + + pPrev->setNextNode(pEndNode); + } + #ifdef DEBUG ::std::clog << "" << ::std::endl; #endif @@ -602,6 +625,13 @@ const SwNode * WW8TableInfo::getNextNode(const SwNode * pNode) if (pNextInfo != NULL) pResult = pNextInfo->getNode(); + else + { + SwNode * pNextNode = pNodeInfo->getNextNode(); + + if (pNextNode != NULL) + pResult = pNextNode; + } } return pResult; diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index b5eee16dd6..0db4637465 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -97,6 +97,7 @@ private: const SwNode * mpNode; Inners_t mInners; WW8TableNodeInfo * mpNext; + SwNode * mpNextNode; public: typedef boost::shared_ptr Pointer_t; @@ -112,6 +113,7 @@ public: void setCell(sal_uInt32 nCell); void setRow(sal_uInt32 nRow); void setNext(WW8TableNodeInfo * pNext); + void setNextNode(SwNode * pNode); sal_uInt32 getDepth() const; bool isEndOfLine() const; @@ -120,6 +122,7 @@ public: const SwTableBox * getTableBox() const; const SwTable * getTable() const; WW8TableNodeInfo * getNext() const; + SwNode * getNextNode() const; const Inners_t & getInners() const; const WW8TableNodeInfoInner::Pointer_t getFirstInner() const; diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 66c9e9ef46..953f128751 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2370,37 +2370,45 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t if ( m_rWW8Export.bWrtWW8 ) { + sal_uInt32 aSprmIds[] = {NS_sprm::LN_TCellShd, NS_sprm::LN_TCellShadow}; + sal_uInt8 nBoxes0 = rTabBoxes.Count(); if (nBoxes0 > 21) nBoxes0 = 21; - m_rWW8Export.InsUInt16( NS_sprm::LN_TCellShd ); - m_rWW8Export.pO->Insert( static_cast(nBoxes0 * 10), m_rWW8Export.pO->Count() ); - - for ( sal_uInt8 n = 0; n < nBoxes0; n++ ) + for (sal_uInt32 m = 0; m < 2; m++) { - const SwTableBox * pBox1 = rTabBoxes[n]; - const SwFrmFmt * pFrmFmt = pBox1->GetFrmFmt(); - const SfxPoolItem * pI = NULL; - Color aColor; + m_rWW8Export.InsUInt16( aSprmIds[m] ); + m_rWW8Export.pO->Insert( static_cast(nBoxes0 * 10), + m_rWW8Export.pO->Count() ); - if ( SFX_ITEM_ON == pFrmFmt->GetAttrSet().GetItemState( RES_BACKGROUND, false, &pI ) ) + for ( sal_uInt8 n = 0; n < nBoxes0; n++ ) { - aColor = dynamic_cast(pI)->GetColor(); + const SwTableBox * pBox1 = rTabBoxes[n]; + const SwFrmFmt * pFrmFmt = pBox1->GetFrmFmt(); + const SfxPoolItem * pI = NULL; + Color aColor; + + if ( SFX_ITEM_ON == + pFrmFmt->GetAttrSet(). + GetItemState( RES_BACKGROUND, false, &pI ) ) + { + aColor = dynamic_cast(pI)->GetColor(); + } + else + aColor = COL_AUTO; + + WW8SHDLong aSHD; + aSHD.setCvFore( 0xFF000000 ); + + sal_uInt32 nBgColor = aColor.GetColor(); + if ( nBgColor == COL_AUTO ) + aSHD.setCvBack( 0xFF000000 ); + else + aSHD.setCvBack( wwUtility::RGBToBGR( nBgColor ) ); + + aSHD.Write( m_rWW8Export ); } - else - aColor = COL_AUTO; - - WW8SHDLong aSHD; - aSHD.setCvFore( 0xFF000000 ); - - sal_uInt32 nBgColor = aColor.GetColor(); - if ( nBgColor == COL_AUTO ) - aSHD.setCvBack( 0xFF000000 ); - else - aSHD.setCvBack( wwUtility::RGBToBGR( nBgColor ) ); - - aSHD.Write( m_rWW8Export ); } } } @@ -2415,11 +2423,24 @@ void WW8Export::SectionBreaksAndFrames( const SwTxtNode& rNode ) OutWW6FlyFrmsInCntnt( rNode ); } +#ifdef DEBUG +struct SwNodeHash +{ + size_t operator()(SwNode * pNode) const { return reinterpret_cast(pNode); } +}; + +typedef ::std::hash_set SwNodeHashSet; +typedef ::std::deque SwNodeDeque; +#endif + void MSWordExportBase::WriteText() { #ifdef DEBUG ::std::clog << "" << ::std::endl; -// ::std::clog << dbg_out(pCurPam->GetDoc()->GetNodes()) << ::std::endl; + ::std::clog << dbg_out(pCurPam->GetDoc()->GetNodes()) << ::std::endl; + + SwNodeHashSet aNodeSet; + SwNodeDeque aNodeDeque; #endif while( pCurPam->GetPoint()->nNode < pCurPam->GetMark()->nNode || @@ -2428,6 +2449,29 @@ void MSWordExportBase::WriteText() { SwNode * pNd = pCurPam->GetNode(); +#ifdef DEBUG + if (aNodeSet.find(pNd) == aNodeSet.end()) + { + aNodeSet.insert(pNd); + aNodeDeque.push_back(pNd); + } + else + { + ::std::clog << "" << dbg_out(*pNd) + << "" << ::std::endl; + + SwNodeDeque::const_iterator aEnd = aNodeDeque.end(); + + for (SwNodeDeque::const_iterator aIt = aNodeDeque.begin(); + aIt != aEnd; aIt++) + { + ::std::clog << dbg_out(**aIt) << ::std::endl; + } + + ::std::clog << "" << ::std::endl; + } +#endif + if ( pNd->IsTxtNode() ) SectionBreaksAndFrames( *pNd->GetTxtNode() ); @@ -3600,6 +3644,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer #endif TableRowEnd(pNodeInfoInner->getDepth()); + ShortToSVBT16(0, nStyle); m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style # TableInfoRow(pNodeInfoInner); m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(), diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index e379e44a65..f9117f8c13 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -966,7 +966,7 @@ void WW8AttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTe TableRowEnd( pTextNodeInfoInner->getDepth() ); SVBT16 nSty; - ShortToSVBT16( m_rWW8Export.nStyleBeforeFly, nSty ); + ShortToSVBT16( 0, nSty ); m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style # TableInfoRow( pTextNodeInfoInner ); m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(), @@ -1559,7 +1559,7 @@ bool WW8Export::TransBrush(const Color& rCol, WW8_SHD& rShd) rShd = WW8_SHD(); // alles Nullen : transparent else { - rShd.SetFore( 8); + rShd.SetFore( 0); rShd.SetBack( TransCol( rCol ) ); rShd.SetStyle( bWrtWW8, 0 ); } diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 9862ace5cd..6681e755f1 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -1941,6 +1941,7 @@ void SwPostItMgr::AssureStdModeAtShell() { mpWrtShell->UnSelectFrm(); mpWrtShell->LeaveSelFrmMode(); + mpWrtShell->GetView().LeaveDrawCreate(); mpWrtShell->EnterStdMode(); mpWrtShell->DrawSelChanged(); diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 84b6f53a57..a32d3e1f1b 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -517,6 +517,9 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq) if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pItem )) nCnt = ((SfxUInt16Item*)pItem)->GetValue(); + // #i106349#: save pointer: undo/redo may delete the shell, i.e., this! + SfxViewFrame *const pViewFrame( GetView().GetViewFrame() ); + switch( nId ) { case SID_UNDO: @@ -538,7 +541,7 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq) DBG_ERROR("falscher Dispatcher"); } - GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False); + if (pViewFrame) { pViewFrame->GetBindings().InvalidateAll(sal_False); } } /*-------------------------------------------------------------------- diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx index 21f1882f9e..da9e898de6 100644 --- a/sw/source/ui/wrtsh/select.cxx +++ b/sw/source/ui/wrtsh/select.cxx @@ -343,7 +343,6 @@ void SwWrtShell::UnSelectFrm() // Rahmenselektion aufheben mit garantiert ungueltiger Position Point aPt(LONG_MIN, LONG_MIN); SelectObj(aPt, 0); - GetView().LeaveDrawCreate(); SwTransferable::ClearSelection( *this ); } -- cgit v1.2.3 From 1ba4b47a91b4e5de7835f10e55122ded2a9ed477 Mon Sep 17 00:00:00 2001 From: C?dric Bosdonnat Date: Wed, 2 Dec 2009 09:12:26 +0100 Subject: [cbosdo03]Applied the patches to upstream These patches are fixing docx import problems like: * Page breaks added at wrong places * Additionnal paragraphs added at the end of some sections * Hierarchy of numbering properties wasn't working nicely --- sw/inc/unoobj.hxx | 6 +++- sw/source/core/unocore/unotext.cxx | 65 +++++++++++++++++++++++--------------- 2 files changed, 44 insertions(+), 27 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx index e2e8b02dde..53f75bae34 100644 --- a/sw/inc/unoobj.hxx +++ b/sw/inc/unoobj.hxx @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include @@ -204,7 +205,8 @@ class SwXText : public ::com::sun::star::lang::XTypeProvider, public ::com::sun::star::text::XRelativeTextContentRemove, public ::com::sun::star::beans::XPropertySet, public ::com::sun::star::lang::XUnoTunnel, - public ::com::sun::star::text::XTextAppendAndConvert + public ::com::sun::star::text::XTextAppendAndConvert, + public ::com::sun::star::text::XTextCopy { SwDoc* pDoc; BOOL bObjectValid; @@ -296,6 +298,8 @@ public: const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& TableProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + //XTextCopy + virtual void SAL_CALL copyText( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCopy >& xSource ) throw (::com::sun::star::uno::RuntimeException); // virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor()throw(::com::sun::star::uno::RuntimeException); diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 0373d8877a..25d95d7035 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -68,6 +68,7 @@ #include +using namespace std; using namespace ::com::sun::star; using ::rtl::OUString; @@ -148,6 +149,7 @@ uno::Any SAL_CALL SwXText::queryInterface( const uno::Type& rType ) throw(uno::R const uno::Type& rXTextConvert = ::getCppuType((uno::Reference< text::XTextConvert >*)0); const uno::Type& rXTextAppend = ::getCppuType((uno::Reference< text::XTextAppend >*)0); const uno::Type& rXTextAppendAndConvert = ::getCppuType((uno::Reference< text::XTextAppendAndConvert >*)0); + const uno::Type& rXTextCopy = ::getCppuType((uno::Reference< text::XTextCopy >*)0); uno::Any aRet; if(rType == rXTextType) @@ -225,6 +227,11 @@ uno::Any SAL_CALL SwXText::queryInterface( const uno::Type& rType ) throw(uno::R uno::Reference< XTextContentAppend > xRet = this; aRet.setValue(&xRet, rXTextContentAppend ); } + else if(rType == rXTextCopy ) + { + uno::Reference< XTextCopy > xRet = this; + aRet.setValue(&xRet, rXTextCopy ); + } return aRet; } /* -----------------------------15.03.00 17:42-------------------------------- @@ -270,8 +277,8 @@ void SwXText::insertString(const uno::Reference< text::XTextRange >& xTextRange, sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); } - if(pRange && pRange->GetDoc() == GetDoc() || - pCursor && pCursor->GetDoc() == GetDoc()) + if( ( pRange && pRange->GetDoc() == GetDoc() ) || + ( pCursor && pCursor->GetDoc() == GetDoc() ) ) { const SwStartNode* pOwnStartNode = GetStartNode(); if(pCursor) @@ -1787,6 +1794,36 @@ bool lcl_SimilarPosition( sal_Int32 nPos1, sal_Int32 nPos2 ) return abs( nPos1 - nPos2 ) < COL_POS_FUZZY; } +void SwXText::copyText( + const uno::Reference< text::XTextCopy >& xSource ) + throw ( uno::RuntimeException ) +{ +#if DEBUG + clog << "TODO - SwXText::copyText()" << endl; +#endif + uno::Reference< lang::XUnoTunnel > xTTunnel( xSource, uno::UNO_QUERY_THROW ); + SwXText* pText = 0; + pText = reinterpret_cast< SwXText* >( + sal::static_int_cast< sal_IntPtr >( xTTunnel->getSomething( SwXText::getUnoTunnelId()) )); + + + uno::Reference< text::XText > xText( xSource, uno::UNO_QUERY_THROW ); + uno::Reference< text::XTextCursor > xCursor = xText->createTextCursor( ); + xCursor->gotoEnd( sal_True ); + + uno::Reference< lang::XUnoTunnel > xTunnel( xCursor, uno::UNO_QUERY_THROW ); + + OTextCursorHelper* pCursor = 0; + pCursor = reinterpret_cast< OTextCursorHelper* >( + sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); + if ( pCursor ) + { + SwNodeIndex rNdIndex( *GetStartNode( ), 1 ); + SwPosition rPos( rNdIndex ); + pDoc->CopyRange( *pCursor->GetPaM( ), rPos, false ); + } +} + uno::Reference< text::XTextTable > SwXText::convertToTable( const uno::Sequence< uno::Sequence< uno::Sequence< uno::Reference< text::XTextRange > > > >& rTableRanges, const uno::Sequence< uno::Sequence< uno::Sequence< beans::PropertyValue > > >& rCellProperties, @@ -2153,30 +2190,6 @@ uno::Reference< text::XTextTable > SwXText::convertToTable( { (void)rBounds; } - - - bool bIllegalException = false; - bool bRuntimeException = false; - ::rtl::OUString sMessage; - pDoc->StartUndo(UNDO_START, NULL); - pDoc->EndUndo(UNDO_START, NULL); - if( bIllegalException || bRuntimeException ) - { - SwUndoIter aUndoIter( pFirstPaM.get(), UNDO_EMPTY ); - pDoc->Undo(aUndoIter); - if(bIllegalException) - { - lang::IllegalArgumentException aEx; - aEx.Message = sMessage; - throw aEx; - } - else //if(bRuntimeException) - { - uno::RuntimeException aEx; - aEx.Message = sMessage; - throw aEx; - } - } return xRet; } -- cgit v1.2.3 From 7c16af625fdcc44386d41ca9add5e04ee50decde Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Wed, 2 Dec 2009 18:23:45 +0100 Subject: bosdo02: #i33737# implementing Fieldmark parameters as XNameContainer --- sw/inc/IMark.hxx | 20 +-- sw/inc/unoobj.hxx | 39 ++++- sw/source/core/crsr/bookmrk.cxx | 76 +--------- sw/source/core/doc/docbm.cxx | 10 +- sw/source/core/inc/bookmrk.hxx | 38 +++-- sw/source/core/text/portxt.cxx | 87 +++++------ sw/source/core/unocore/unobkm.cxx | 179 +++++++++++++--------- sw/source/filter/ww8/wrtww8.cxx | 36 +++-- sw/source/filter/ww8/ww8par.hxx | 50 +++---- sw/source/filter/ww8/ww8par3.cxx | 52 ++++--- sw/source/filter/ww8/ww8par5.cxx | 22 ++- sw/source/ui/docvw/edtwin.cxx | 305 +++++++++++++++++++------------------- sw/source/ui/uiview/viewling.cxx | 20 ++- 13 files changed, 466 insertions(+), 468 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/IMark.hxx b/sw/inc/IMark.hxx index b6bdc3092b..b90b0cd3e6 100644 --- a/sw/inc/IMark.hxx +++ b/sw/inc/IMark.hxx @@ -34,6 +34,7 @@ #include #include #include +#include #ifndef SW_DECL_SWSERVEROBJECT_DEFINED #define SW_DECL_SWSERVEROBJECT_DEFINED @@ -80,8 +81,7 @@ namespace sw { namespace mark bool EndsAfter(const SwPosition& rPos) const { return GetMarkEnd() > rPos; } - // Use for debugging purpose - virtual rtl::OUString toString( ) const = 0; + virtual rtl::OUString ToString( ) const =0; }; class IBookmark @@ -98,25 +98,17 @@ namespace sw { namespace mark : virtual public IMark { public: - typedef std::pair< ::rtl::OUString, ::rtl::OUString > ParamPair_t; - + typedef ::std::map< ::rtl::OUString, ::com::sun::star::uno::Any> parameter_map_t; //getters virtual ::rtl::OUString GetFieldname() const =0; virtual ::rtl::OUString GetFieldHelptext() const =0; - - virtual void addParam( rtl::OUString rParamName, - rtl::OUString rParamValue, - bool bReplaceExisting = true ) = 0; - virtual void addParam( const char* paramName, int value ) = 0; - virtual void addParams( std::vector& params ) = 0; - virtual int getNumOfParams() const = 0; - virtual ParamPair_t getParam( int pos ) const = 0; - virtual ParamPair_t getParam( const char *name, const char *defaultValue = NULL ) const = 0; + virtual parameter_map_t* GetParameters() =0; + virtual const parameter_map_t* GetParameters() const =0; //setters virtual void SetFieldname(const ::rtl::OUString& rFieldname) =0; virtual void SetFieldHelptext(const ::rtl::OUString& rFieldHelptext) =0; - virtual void invalidate( ) = 0; + virtual void Invalidate() = 0; }; class ICheckboxFieldmark diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx index 1b58d7c7da..10e143602f 100644 --- a/sw/inc/unoobj.hxx +++ b/sw/inc/unoobj.hxx @@ -655,12 +655,41 @@ class SwXBookmark const ::sw::mark::IMark* GetBookmark() const { return m_pRegisteredBookmark; } - ::sw::mark::IMark* GetBookmark() + ::sw::mark::IMark* GetBookmark() { return m_pRegisteredBookmark; } SwDoc* GetDoc() { return m_pDoc; } }; + +class SwXFieldmarkParameters + : public ::cppu::WeakImplHelper1< ::com::sun::star::container::XNameContainer> + , private SwClient +{ + public: + SwXFieldmarkParameters(::sw::mark::IFieldmark* const pFieldmark) + { + pFieldmark->Add(this); + } + + // XNameContainer + virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeByName( const ::rtl::OUString& Name ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + // XNameReplace + virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + // XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException); + //SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + private: + ::sw::mark::IFieldmark::parameter_map_t* getCoreParameters() throw (::com::sun::star::uno::RuntimeException); +}; + typedef cppu::ImplInheritanceHelper1< SwXBookmark, ::com::sun::star::text::XFormField > SwXFieldmark_BASE; class SwXFieldmark : public SwXFieldmark_BASE @@ -672,12 +701,8 @@ class SwXFieldmark : public SwXFieldmark_BASE virtual void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); virtual ::rtl::OUString SAL_CALL getFieldType(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setFieldType( const ::rtl::OUString& description ) throw (::com::sun::star::uno::RuntimeException); - - virtual ::sal_Int16 SAL_CALL getParamCount( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getParamName(::sal_Int16 i) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::rtl::OUString SAL_CALL getParamValue(::sal_Int16 i) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL addParam( const ::rtl::OUString& name, const ::rtl::OUString& value, ::sal_Bool replaceExisting ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setFieldType(const ::rtl::OUString& description ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > SAL_CALL getParameters( ) throw (::com::sun::star::uno::RuntimeException); }; /*-----------------23.02.98 10:45------------------- diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 60d0fec7a1..df7b52b6be 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -131,7 +131,7 @@ namespace sw { namespace mark //lcl_FixPosition(*m_pPos2); } - rtl::OUString MarkBase::toString( ) const + rtl::OUString MarkBase::ToString( ) const { rtl::OUStringBuffer buf; buf.appendAscii( "Mark: ( Name, [ Node1, Index1 ] ): ( " ); @@ -284,7 +284,7 @@ namespace sw { namespace mark SetOtherMarkPos(GetMarkPos()); } - rtl::OUString Fieldmark::toString( ) const + rtl::OUString Fieldmark::ToString( ) const { rtl::OUStringBuffer buf; buf.appendAscii( "Fieldmark: ( Name, Type, [ Nd1, Id1 ], [ Nd2, Id2 ] ): ( " ); @@ -298,77 +298,7 @@ namespace sw { namespace mark return buf.makeStringAndClear( ); } - void Fieldmark::addParam( ::rtl::OUString paramName, - ::rtl::OUString paramValue, - bool replaceExisting ) - { - if ( replaceExisting ) - { - bool replaced = false; - const int len = m_params.size( ); - for ( int i = 0; i < len; i++ ) - { - if ( m_params[i].first.compareTo( paramName ) == 0 ) - { - m_params[i] = ParamPair_t( paramName, paramValue ); - replaced = true; - } - } - if ( !replaced ) - { - m_params.push_back( ParamPair_t( paramName, paramValue ) ); - } - } - else - { - m_params.push_back( ParamPair_t( paramName, paramValue ) ); - } - } - - void Fieldmark::addParam( const char *paramName, int value ) - { - rtl::OUString sName = rtl::OUString::createFromAscii( paramName ); - rtl::OUString sValue =::rtl::OUString::valueOf( ( sal_Int32 ) value ); - addParam( sName, sValue ); - } - - void Fieldmark::addParams( std::vector < ParamPair_t > ¶ms ) - { - for ( std::vector < ParamPair_t >::iterator i = params.begin( ); - i != params.end( ); i++ ) - { - m_params.push_back( *i ); - } - } - - int Fieldmark::getNumOfParams( ) const - { - return m_params.size( ); - } - - Fieldmark::ParamPair_t Fieldmark::getParam( int pos ) const - { - return m_params[pos]; - } - - Fieldmark::ParamPair_t Fieldmark::getParam( const char *name, - const char *defaultValue ) const - { - for ( std::vector < ParamPair_t >::iterator i = const_cast< Fieldmark* >( this )->m_params.begin( ); - i != m_params.end( ); i++ ) - { - if ( i->first.compareToAscii( name ) == 0 ) - { - return *i; - } - } - return ParamPair_t( rtl::OUString( ), - ( defaultValue ? - rtl::OUString::createFromAscii( defaultValue ) : - rtl::OUString( ) ) ); - } - - void Fieldmark::invalidate( ) + void Fieldmark::Invalidate( ) { // @TODO: Does exist a better solution to trigger a format of the // fieldmark portion? If yes, please use it. diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index fb539b0a76..ca61b460b0 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -312,12 +312,12 @@ namespace sw { namespace mark void MarkManager::dumpFieldmarks( ) const { - const_iterator_t pIt = m_vFieldmarks.begin( ); - for ( ; pIt != m_vFieldmarks.end( ); pIt++ ) + const_iterator_t pIt = m_vFieldmarks.begin(); + for (; pIt != m_vFieldmarks.end( ); pIt++) { - rtl::OUString str = ( *pIt )->toString( ); - fprintf( stderr, "%s\n", - rtl::OUStringToOString( str, RTL_TEXTENCODING_UTF8 ).getStr( ) ); + rtl::OUString str = (*pIt)->ToString(); + OSL_TRACE("%s\n", + ::rtl::OUStringToOString(str, RTL_TEXTENCODING_UTF8).getStr()); } } diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx index dffeafe594..f42d82ee09 100644 --- a/sw/source/core/inc/bookmrk.hxx +++ b/sw/source/core/inc/bookmrk.hxx @@ -36,6 +36,7 @@ #include #include +#include struct SwPosition; // fwd Decl. wg. UI class SwDoc; @@ -85,7 +86,7 @@ namespace sw { namespace mark virtual void ClearOtherMarkPos() { m_pPos2.reset(); } - virtual rtl::OUString toString( ) const; + virtual rtl::OUString ToString( ) const; virtual void Swap() { @@ -190,38 +191,35 @@ namespace sw { namespace mark { public: Fieldmark(const SwPaM& rPaM); - + // getters - ::rtl::OUString GetFieldname() const + virtual ::rtl::OUString GetFieldname() const { return m_aFieldname; } - ::rtl::OUString GetFieldHelptext() const + virtual ::rtl::OUString GetFieldHelptext() const { return m_aFieldHelptext; } - - void addParam( rtl::OUString rParamName, - rtl::OUString rParamValue, - bool bReplaceExisting = true ); - void addParam( const char* paramName, int value ); - void addParams(std::vector& params); - int getNumOfParams() const; - ParamPair_t getParam(int pos) const; - ParamPair_t getParam(const char *name, const char *defaultValue) const; + + virtual IFieldmark::parameter_map_t* GetParameters() + { return &m_vParams; } + + virtual const IFieldmark::parameter_map_t* GetParameters() const + { return &m_vParams; } // setters - void SetFieldname(const ::rtl::OUString& aFieldname) + virtual void SetFieldname(const ::rtl::OUString& aFieldname) { m_aFieldname = aFieldname; } - void SetFieldHelptext(const ::rtl::OUString& aFieldHelptext) + virtual void SetFieldHelptext(const ::rtl::OUString& aFieldHelptext) { m_aFieldHelptext = aFieldHelptext; } - void invalidate( ); - - virtual rtl::OUString toString( ) const; + + virtual void Invalidate(); + virtual rtl::OUString ToString() const; private: //int fftype; // Type: 0 = Text, 1 = Check Box, 2 = List //bool ffprot; - ::rtl::OUString m_aFieldname; ::rtl::OUString m_aFieldHelptext; + IFieldmark::parameter_map_t m_vParams; + static const ::rtl::OUString our_sNamePrefix; - std::vector m_params; }; class TextFieldmark diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 094053bdb6..6662d0d704 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -37,16 +37,16 @@ #ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_ #include #endif -#include // CH_TXTATR -#include // ASSERT +#include // CH_TXTATR +#include // ASSERT #include #include #include #include -#include // SwTxtGuess, Zeilenumbruch +#include // SwTxtGuess, Zeilenumbruch #include #include // pLastTab-> -#include // SwFldPortion +#include // SwFldPortion #include #include #include @@ -232,7 +232,7 @@ USHORT lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr, } /************************************************************************* - * class SwTxtPortion + * class SwTxtPortion *************************************************************************/ SwTxtPortion::SwTxtPortion( const SwLinePortion &rPortion ) @@ -242,7 +242,7 @@ SwTxtPortion::SwTxtPortion( const SwLinePortion &rPortion ) } /************************************************************************* - * SwTxtPortion::BreakCut() + * SwTxtPortion::BreakCut() *************************************************************************/ void SwTxtPortion::BreakCut( SwTxtFormatInfo &rInf, const SwTxtGuess &rGuess ) @@ -291,7 +291,7 @@ void SwTxtPortion::BreakCut( SwTxtFormatInfo &rInf, const SwTxtGuess &rGuess ) } /************************************************************************* - * SwTxtPortion::BreakUnderflow() + * SwTxtPortion::BreakUnderflow() *************************************************************************/ void SwTxtPortion::BreakUnderflow( SwTxtFormatInfo &rInf ) @@ -305,7 +305,7 @@ void SwTxtPortion::BreakUnderflow( SwTxtFormatInfo &rInf ) } /************************************************************************* - * SwTxtPortion::_Format() + * SwTxtPortion::_Format() *************************************************************************/ sal_Bool lcl_HasContent( const SwFldPortion& rFld, SwTxtFormatInfo &rInf ) @@ -354,7 +354,7 @@ sal_Bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf ) // C2 break iterator does not found a possible line break at all: // ==> line break - // case A: line not yet full + // case A: line not yet full if ( !bFull ) { Width( aGuess.BreakWidth() ); @@ -445,7 +445,7 @@ sal_Bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf ) Insert( pNew ); } } - else // case C2, last exit + else // case C2, last exit BreakCut( rInf, aGuess ); } // breakPos < index or no breakpos at all @@ -456,9 +456,9 @@ sal_Bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf ) aGuess.BreakPos() != rInf.GetLineStart() && ( !bFirstPor || rInf.GetFly() || rInf.GetLast()->IsFlyPortion() || rInf.IsFirstMulti() ) && - ( !rInf.GetLast()->IsBlankPortion() || ((SwBlankPortion*) + ( !rInf.GetLast()->IsBlankPortion() || ((SwBlankPortion*) rInf.GetLast())->MayUnderFlow( rInf, rInf.GetIdx()-1, sal_True ))) - { // case C1 (former BreakUnderflow()) + { // case C1 (former BreakUnderflow()) BreakUnderflow( rInf ); } else @@ -470,7 +470,7 @@ sal_Bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf ) } /************************************************************************* - * virtual SwTxtPortion::Format() + * virtual SwTxtPortion::Format() *************************************************************************/ @@ -499,7 +499,7 @@ sal_Bool SwTxtPortion::Format( SwTxtFormatInfo &rInf ) } /************************************************************************* - * virtual SwTxtPortion::FormatEOL() + * virtual SwTxtPortion::FormatEOL() *************************************************************************/ // Format end of line @@ -544,7 +544,7 @@ void SwTxtPortion::FormatEOL( SwTxtFormatInfo &rInf ) } /************************************************************************* - * virtual SwTxtPortion::GetCrsrOfst() + * virtual SwTxtPortion::GetCrsrOfst() *************************************************************************/ @@ -556,7 +556,7 @@ xub_StrLen SwTxtPortion::GetCrsrOfst( const KSHORT nOfst ) const } /************************************************************************* - * virtual SwTxtPortion::GetTxtSize() + * virtual SwTxtPortion::GetTxtSize() *************************************************************************/ // Das GetTxtSize() geht davon aus, dass die eigene Laenge korrekt ist @@ -566,7 +566,7 @@ SwPosSize SwTxtPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const } /************************************************************************* - * virtual SwTxtPortion::Paint() + * virtual SwTxtPortion::Paint() *************************************************************************/ @@ -610,7 +610,7 @@ void SwTxtPortion::Paint( const SwTxtPaintInfo &rInf ) const } /************************************************************************* - * virtual SwTxtPortion::GetExpTxt() + * virtual SwTxtPortion::GetExpTxt() *************************************************************************/ @@ -621,7 +621,7 @@ sal_Bool SwTxtPortion::GetExpTxt( const SwTxtSizeInfo &, XubString & ) const } /************************************************************************* - * xub_StrLen SwTxtPortion::GetSpaceCnt() + * xub_StrLen SwTxtPortion::GetSpaceCnt() * long SwTxtPortion::CalcSpacing() * sind fuer den Blocksatz zustaendig und ermitteln die Anzahl der Blanks * und den daraus resultierenden zusaetzlichen Zwischenraum @@ -660,7 +660,7 @@ xub_StrLen SwTxtPortion::GetSpaceCnt( const SwTxtSizeInfo &rInf, long SwTxtPortion::CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) const { - xub_StrLen nCnt = 0; + xub_StrLen nCnt = 0; if ( InExpGrp() ) { @@ -718,7 +718,7 @@ void SwTxtPortion::HandlePortion( SwPortionHandler& rPH ) const } /************************************************************************* - * class SwHolePortion + * class SwHolePortion *************************************************************************/ @@ -735,7 +735,7 @@ SwHolePortion::SwHolePortion( const SwTxtPortion &rPor ) SwLinePortion *SwHolePortion::Compress() { return this; } /************************************************************************* - * virtual SwHolePortion::Paint() + * virtual SwHolePortion::Paint() *************************************************************************/ @@ -752,7 +752,7 @@ void SwHolePortion::Paint( const SwTxtPaintInfo &rInf ) const } /************************************************************************* - * virtual SwHolePortion::Format() + * virtual SwHolePortion::Format() *************************************************************************/ @@ -785,26 +785,26 @@ sal_Bool SwFieldMarkPortion::Format( SwTxtFormatInfo & ) } namespace ecma { - static int getCurrentListIndex( IFieldmark* pBM, - ::rtl::OUString *currentText = NULL ) + static sal_Int32 getCurrentListIndex( IFieldmark* pBM, + ::rtl::OUString* io_pCurrentText = NULL ) { - int currentIndex = pBM->getParam( ECMA_FORMDROPDOWN_RESULT, "0" ).second.toInt32(); - int idx = 0; - for( int i = 0; i < pBM->getNumOfParams(); i++ ) + const IFieldmark::parameter_map_t* const pParameters = pBM->GetParameters(); + sal_Int32 nCurrentIdx = 0; + const IFieldmark::parameter_map_t::const_iterator pResult = pParameters->find(::rtl::OUString::createFromAscii(ECMA_FORMDROPDOWN_RESULT)); + if(pResult != pParameters->end()) + pResult->second >>= nCurrentIdx; + if(io_pCurrentText) { - IFieldmark::ParamPair_t p = pBM->getParam( i ); - if ( p.first.compareToAscii( ECMA_FORMDROPDOWN_LISTENTRY ) == 0 ) + const IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ECMA_FORMDROPDOWN_LISTENTRY)); + if(pListEntries != pParameters->end()) { - if ( idx == currentIndex ) - { - if ( currentText!=NULL ) *currentText=p.second; - break; - } - else - idx++; + uno::Sequence< ::rtl::OUString > vListEntries; + pListEntries->second >>= vListEntries; + if(nCurrentIdx < vListEntries.getLength()) + *io_pCurrentText = vListEntries[nCurrentIdx]; } } - return idx; + return nCurrentIdx; } } /* ecma */ @@ -826,18 +826,19 @@ void SwFieldFormPortion::Paint( const SwTxtPaintInfo& rInf ) const { if ( pBM->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ) ) { // a checkbox... - bool checked = pBM->getParam( ECMA_FORMCHECKBOX_CHECKED ).second.compareToAscii("on") == 0; - rInf.DrawCheckBox( *this , checked); + ICheckboxFieldmark* pCheckboxFm = dynamic_cast< ICheckboxFieldmark* >(pBM); + bool checked = pCheckboxFm->IsChecked(); + rInf.DrawCheckBox(*this, checked); } else if ( pBM->GetFieldname( ).equalsAscii( ECMA_FORMDROPDOWN ) ) { // a list... - rtl::OUString aTxt; - rInf.DrawViewOpt( *this, POR_FLD ); + rtl::OUString aTxt; + rInf.DrawViewOpt( *this, POR_FLD ); rInf.DrawText( aTxt, *this, 0, 0/*aTxt.getLength()*/, false ); } else { - assert(0); // unknown type... + assert(0); // unknown type... } } } diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index 61d1557d3c..7b22307103 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -353,90 +353,135 @@ void SwXBookmark::removeVetoableChangeListener(const OUString& /*PropertyName*/, throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) { } -SwXFieldmark::SwXFieldmark(bool _isReplacementObject, ::sw::mark::IMark* pBkm, SwDoc* pDc) - : SwXFieldmark_BASE(pBkm, pDc) - , isReplacementObject(_isReplacementObject) -{ } -void SwXFieldmark::attachToRange( const uno::Reference < text::XTextRange >& xTextRange ) - throw( lang::IllegalArgumentException, uno::RuntimeException ) +void SwXFieldmarkParameters::insertByName(const OUString& aName, const Any& aElement) + throw (IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException) { - attachToRangeEx( xTextRange, - ( isReplacementObject ? IDocumentMarkAccess::CHECKBOX_FIELDMARK : IDocumentMarkAccess::TEXT_FIELDMARK ) ); + vos::OGuard aGuard(Application::GetSolarMutex()); + IFieldmark::parameter_map_t* pParameters = getCoreParameters(); + if(pParameters->find(aName) != pParameters->end()) + throw ElementExistException(); + if(aElement.getValueType() != getElementType()) + throw IllegalArgumentException(); + (*pParameters)[aName] = aElement; } -::rtl::OUString SwXFieldmark::getFieldType( void ) - throw( ::com::sun::star::uno::RuntimeException ) +void SwXFieldmarkParameters::removeByName(const OUString& aName) + throw (NoSuchElementException, WrappedTargetException, RuntimeException) { - vos::OGuard aGuard( Application::GetSolarMutex( ) ); - IMark* pMark = const_cast< IMark* >( GetBookmark( ) ); - IFieldmark *pBkm = dynamic_cast< IFieldmark* > ( pMark ); - if ( pBkm ) - return pBkm->GetFieldname( ); - else - throw uno::RuntimeException( ); + vos::OGuard aGuard(Application::GetSolarMutex()); + if(!getCoreParameters()->erase(aName)) + throw NoSuchElementException(); } -void SwXFieldmark::setFieldType( const::rtl::OUString & fieldType ) - throw( ::com::sun::star::uno::RuntimeException ) +void SwXFieldmarkParameters::replaceByName(const OUString& aName, const Any& aElement) + throw (IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException) { - vos::OGuard aGuard( Application::GetSolarMutex( ) ); - IMark* pMark = const_cast< IMark* >( GetBookmark( ) ); - IFieldmark *pBkm = dynamic_cast< IFieldmark* >( pMark ); - if ( pBkm ) - pBkm->SetFieldname( fieldType ); - else - throw uno::RuntimeException( ); + vos::OGuard aGuard(Application::GetSolarMutex()); + IFieldmark::parameter_map_t* pParameters = getCoreParameters(); + IFieldmark::parameter_map_t::iterator pEntry = pParameters->find(aName); + if(pEntry == pParameters->end()) + throw NoSuchElementException(); + pEntry->second = aElement; } -sal_Int16 SwXFieldmark::getParamCount( ) - throw( ::com::sun::star::uno::RuntimeException ) +Any SwXFieldmarkParameters::getByName(const OUString& aName) + throw (NoSuchElementException, WrappedTargetException, RuntimeException) { - vos::OGuard aGuard( Application::GetSolarMutex( ) ); - IMark* pMark = const_cast< IMark* >( GetBookmark( ) ); - IFieldmark *pBkm = dynamic_cast< IFieldmark* >( pMark ); - if ( pBkm ) - return pBkm->getNumOfParams( ); - else - throw uno::RuntimeException( ); + vos::OGuard aGuard(Application::GetSolarMutex()); + IFieldmark::parameter_map_t* pParameters = getCoreParameters(); + IFieldmark::parameter_map_t::iterator pEntry = pParameters->find(aName); + if(pEntry == pParameters->end()) + throw NoSuchElementException(); + return makeAny(pEntry->second); } -rtl::OUString SwXFieldmark::getParamName( sal_Int16 i ) - throw( ::com::sun::star::uno::RuntimeException ) +Sequence SwXFieldmarkParameters::getElementNames() + throw (RuntimeException) { - vos::OGuard aGuard( Application::GetSolarMutex( ) ); - IMark* pMark = const_cast< IMark* >( GetBookmark( ) ); - IFieldmark *pBkm = dynamic_cast< IFieldmark* >( pMark ); - if ( pBkm ) - return pBkm->getParam( i ).first; - else - throw uno::RuntimeException( ); + vos::OGuard aGuard(Application::GetSolarMutex()); + IFieldmark::parameter_map_t* pParameters = getCoreParameters(); + Sequence vResult(pParameters->size()); + OUString* pOutEntry = vResult.getArray(); + for(IFieldmark::parameter_map_t::iterator pEntry = pParameters->begin(); pEntry!=pParameters->end(); ++pEntry, ++pOutEntry) + *pOutEntry = pEntry->first; + return vResult; } -::rtl::OUString SwXFieldmark::getParamValue( ::sal_Int16 i ) - throw( ::com::sun::star::uno::RuntimeException ) +::sal_Bool SwXFieldmarkParameters::hasByName(const OUString& aName) + throw (RuntimeException) { - vos::OGuard aGuard( Application::GetSolarMutex( ) ); - IMark* pMark = const_cast< IMark* >( GetBookmark( ) ); - IFieldmark *pBkm = dynamic_cast< IFieldmark* >( pMark ); - if ( pBkm ) - return pBkm->getParam( i ).second; - else - throw uno::RuntimeException( ); + vos::OGuard aGuard(Application::GetSolarMutex()); + IFieldmark::parameter_map_t* pParameters = getCoreParameters(); + return (pParameters->find(aName) != pParameters->end()); } -void SwXFieldmark::addParam( const ::rtl::OUString & name, - const ::rtl::OUString & value, - sal_Bool replaceExisting ) - throw( ::com::sun::star::uno::RuntimeException ) +Type SwXFieldmarkParameters::getElementType() + throw (RuntimeException) { - vos::OGuard aGuard( Application::GetSolarMutex( ) ); - IMark* pMark = const_cast< IMark* >( GetBookmark( ) ); - IFieldmark *pBkm = dynamic_cast< IFieldmark* >( pMark ); - if ( pBkm ) - pBkm->addParam( const_cast< rtl::OUString& >( name ), - const_cast< rtl::OUString& >( value ), - replaceExisting ); - else - throw uno::RuntimeException( ); + return ::cppu::UnoType::get(); +} + +::sal_Bool SwXFieldmarkParameters::hasElements() + throw (RuntimeException) +{ + vos::OGuard aGuard(Application::GetSolarMutex()); + return !getCoreParameters()->empty(); +} + +void SwXFieldmarkParameters::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) +{ + ClientModify(this, pOld, pNew); +} + + +IFieldmark::parameter_map_t* SwXFieldmarkParameters::getCoreParameters() + throw (RuntimeException) +{ + const IFieldmark* pFieldmark = dynamic_cast< const IFieldmark* >(GetRegisteredIn()); + if(!pFieldmark) + throw RuntimeException(); + return const_cast< IFieldmark* >(pFieldmark)->GetParameters(); +} + +SwXFieldmark::SwXFieldmark(bool _isReplacementObject, ::sw::mark::IMark* pBkm, SwDoc* pDc) + : SwXFieldmark_BASE(pBkm, pDc) + , isReplacementObject(_isReplacementObject) +{ } + +void SwXFieldmark::attachToRange( const uno::Reference < text::XTextRange >& xTextRange ) + throw(IllegalArgumentException, RuntimeException) +{ + attachToRangeEx( xTextRange, + ( isReplacementObject ? IDocumentMarkAccess::CHECKBOX_FIELDMARK : IDocumentMarkAccess::TEXT_FIELDMARK ) ); +} + +::rtl::OUString SwXFieldmark::getFieldType(void) + throw(RuntimeException) +{ + vos::OGuard aGuard(Application::GetSolarMutex()); + const IFieldmark *pBkm = dynamic_cast(GetBookmark()); + if(!pBkm) + throw RuntimeException(); + return pBkm->GetFieldname(); +} + +void SwXFieldmark::setFieldType(const::rtl::OUString & fieldType) + throw(RuntimeException) +{ + vos::OGuard aGuard(Application::GetSolarMutex()); + IFieldmark *pBkm = dynamic_cast(GetBookmark()); + if(!pBkm) + throw RuntimeException(); + pBkm->SetFieldname(fieldType); +} + +Reference SwXFieldmark::getParameters() + throw (RuntimeException) +{ + vos::OGuard aGuard(Application::GetSolarMutex()); + IFieldmark *pBkm = dynamic_cast(GetBookmark()); + if(!pBkm) + throw uno::RuntimeException(); + return Reference(new SwXFieldmarkParameters(pBkm)); } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 8482de623d..4f0a16439f 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -97,7 +97,7 @@ #include #include #include - +#include #include #include "writerhelper.hxx" @@ -3469,7 +3469,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) ASSERT(rFieldmark.GetFieldname().equalsAscii( ECMA_FORMTEXT ) || rFieldmark.GetFieldname().equalsAscii( ECMA_FORMDROPDOWN ) || rFieldmark.GetFieldname().equalsAscii( ECMA_FORMCHECKBOX ), "Unknown field type!!!"); - if ( ! ( rFieldmark.GetFieldname().equalsAscii( ECMA_FORMTEXT ) || + if ( ! ( rFieldmark.GetFieldname().equalsAscii( ECMA_FORMTEXT ) || rFieldmark.GetFieldname().equalsAscii( ECMA_FORMDROPDOWN ) || rFieldmark.GetFieldname().equalsAscii( ECMA_FORMCHECKBOX ) ) ) return; @@ -3480,7 +3480,10 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) if ( rFieldmark.GetFieldname().equalsAscii( ECMA_FORMDROPDOWN ) ) type=2; - const String ffname = rFieldmark.getParam("name").second; + ::sw::mark::IFieldmark::parameter_map_t::const_iterator pNameParameter = rFieldmark.GetParameters()->find(::rtl::OUString::createFromAscii("name")); + ::rtl::OUString ffname; + if(pNameParameter != rFieldmark.GetParameters()->end()) + pNameParameter->second >>= ffname; ULONG nDataStt = pDataStrm->Tell(); pChpPlc->AppendFkpEntry(Strm().Tell()); @@ -3499,28 +3502,37 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) pChpPlc->AppendFkpEntry( Strm().Tell(), sizeof( aArr1 ), aArr1 ); - sal_uInt8 aFldHeader[] = + sal_uInt8 aFldHeader[] = { 0xFF, 0xFF, 0xFF, 0xFF, // Unicode Marker... 0, 0, 0, 0, 0, 0 //, 0, 0 }; aFldHeader[4] |= (type & 0x03); - int ffres = 0; // rFieldmark.GetFFRes(); + sal_Int32 ffres = 0; // rFieldmark.GetFFRes(); if ( pAsCheckbox && pAsCheckbox->IsChecked() ) ffres = 1; else if ( type == 2 ) - ffres = rFieldmark.getParam( ECMA_FORMDROPDOWN_RESULT, "0" ).second.toInt32(); + { + ::sw::mark::IFieldmark::parameter_map_t::const_iterator pResParameter = rFieldmark.GetParameters()->find(::rtl::OUString::createFromAscii(ECMA_FORMDROPDOWN)); + if(pResParameter != rFieldmark.GetParameters()->end()) + pResParameter->second >>= ffres; + else + ffres = 0; + } aFldHeader[4] |= ( (ffres<<2) & 0x7C ); - + std::vector< ::rtl::OUString > aListItems; - if (type==2) + if (type==2) { aFldHeader[5] |= 0x80; // ffhaslistbox - for ( int i = 0; i < rFieldmark.getNumOfParams() ; i++ ) + const ::sw::mark::IFieldmark::parameter_map_t* const pParameters = rFieldmark.GetParameters(); + ::sw::mark::IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ECMA_FORMDROPDOWN_LISTENTRY)); + if(pListEntries != pParameters->end()) { - if (rFieldmark.getParam(i).first.compareToAscii(ECMA_FORMDROPDOWN_LISTENTRY)==0) - aListItems.push_back(rFieldmark.getParam(i).second); + uno::Sequence< ::rtl::OUString > vListEntries; + pListEntries->second >>= vListEntries; + copy(::comphelper::stl_begin(vListEntries), ::comphelper::stl_end(vListEntries), back_inserter(aListItems)); } } @@ -3544,7 +3556,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) }; int slen = sizeof( aFldData ) + sizeof( aFldHeader ) - + 2*ffname.Len() + 4 + + 2*ffname.getLength() + 4 + 2*ffdeftext.getLength() + 4 + 2*ffformat.getLength() + 4 + 2*ffhelptext.getLength() + 4 diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 9dc3b0362f..c1ce31d30d 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -364,39 +364,35 @@ namespace sw Position(const SwPosition &rPos); Position(const Position &rPos); operator SwPosition() const; - SwNodeIndex GetPtNode() { return maPtNode; }; - xub_StrLen GetPtCntnt() { return mnPtCntnt; }; + SwNodeIndex GetPtNode() { return maPtNode; }; + xub_StrLen GetPtCntnt() { return mnPtCntnt; }; }; } } class FieldEntry { -public: - typedef ::std::vector Params_t; - -private: - ::rtl::OUString msBookmarkName; - ::rtl::OUString msMarkType; - Params_t maParams; - -public: - sw::hack::Position maStartPos; - sal_uInt16 mnFieldId; - FieldEntry(SwPosition &rPos, sal_uInt16 nFieldId) throw(); - FieldEntry(const FieldEntry &rOther) throw(); - FieldEntry &operator=(const FieldEntry &rOther) throw(); - void Swap(FieldEntry &rOther) throw(); - - SwNodeIndex GetPtNode() { return maStartPos.GetPtNode(); }; - xub_StrLen GetPtCntnt() { return maStartPos.GetPtCntnt(); }; - - ::rtl::OUString GetBookmarkName(); - ::rtl::OUString GetBookmarkType(); - void SetBookmarkName(::rtl::OUString bookmarkName); - void SetBookmarkType(::rtl::OUString bookmarkType); - void AddParam(::rtl::OUString name, ::rtl::OUString value); - Params_t &getParams(); + private: + ::rtl::OUString msBookmarkName; + ::rtl::OUString msMarkType; + ::sw::mark::IFieldmark::parameter_map_t maParams; + + public: + sw::hack::Position maStartPos; + sal_uInt16 mnFieldId; + FieldEntry(SwPosition &rPos, sal_uInt16 nFieldId) throw(); + FieldEntry(const FieldEntry &rOther) throw(); + FieldEntry &operator=(const FieldEntry &rOther) throw(); + void Swap(FieldEntry &rOther) throw(); + + SwNodeIndex GetPtNode() { return maStartPos.GetPtNode(); }; + xub_StrLen GetPtCntnt() { return maStartPos.GetPtCntnt(); }; + + ::rtl::OUString GetBookmarkName(); + ::rtl::OUString GetBookmarkType(); + void SetBookmarkName(::rtl::OUString bookmarkName); + void SetBookmarkType(::rtl::OUString bookmarkType); + ::sw::mark::IFieldmark::parameter_map_t& getParameters(); }; diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 3de6a4004d..526c033a0e 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -61,6 +61,7 @@ #include #include #include +#include #include #include @@ -99,6 +100,7 @@ #include #include +#include using namespace com::sun::star; using namespace sw::util; @@ -183,8 +185,8 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr ) if (aBookmarkName.Len()>0) { maFieldStack.back().SetBookmarkName(aBookmarkName); maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ECMA_FORMTEXT)); - maFieldStack.back().AddParam(::rtl::OUString::createFromAscii("Description"), aFormula.sToolTip); - maFieldStack.back().AddParam(::rtl::OUString::createFromAscii("Name"), aFormula.sTitle); + maFieldStack.back().getParameters()[::rtl::OUString::createFromAscii("Description")] = uno::makeAny(::rtl::OUString(aFormula.sToolTip)); + maFieldStack.back().getParameters()[::rtl::OUString::createFromAscii("Name")] = uno::makeAny(::rtl::OUString(aFormula.sTitle)); } return FLD_TEXT; } @@ -203,7 +205,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr ) sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields()); if (!bUseEnhFields) { - pFormImpl->InsertFormula(aFormula); + pFormImpl->InsertFormula(aFormula); return FLD_OK; } else { String aBookmarkName; @@ -215,7 +217,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr ) USHORT bkmFindIdx; String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx); - if (aBookmarkFind.Len()>0) { + if (aBookmarkFind.Len()>0) { pB->SetStatus(bkmFindIdx, BOOK_FIELD); // mark as consumed by field if (aBookmarkFind.Len()>0) { aBookmarkName=aBookmarkFind; @@ -227,22 +229,20 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr ) aBookmarkName=pB->GetUniqueBookmarkName(aFormula.sTitle); } - if (aBookmarkName.Len()>0) + if (aBookmarkName.Len()>0) { IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( ); IFieldmark* pFieldmark = dynamic_cast( pMarksAccess->makeNoTextFieldBookmark( - *pPaM, aBookmarkName, + *pPaM, aBookmarkName, rtl::OUString::createFromAscii( ECMA_FORMCHECKBOX ) ) ); ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?"); if (pFieldmark!=NULL) { - pFieldmark->addParam( - rtl::OUString::createFromAscii(ECMA_FORMCHECKBOX_NAME), - rtl::OUString( aFormula.sTitle ) ); - pFieldmark->addParam( - rtl::OUString::createFromAscii(ECMA_FORMCHECKBOX_HELPTEXT), aFormula.sToolTip); - pFieldmark->addParam( - rtl::OUString::createFromAscii(ECMA_FORMCHECKBOX_CHECKED), - ::rtl::OUString::createFromAscii(aFormula.nChecked!=0?"on":"off")); + IFieldmark::parameter_map_t* const pParameters = pFieldmark->GetParameters(); + ICheckboxFieldmark* pCheckboxFm = dynamic_cast(pFieldmark); + (*pParameters)[::rtl::OUString::createFromAscii(ECMA_FORMCHECKBOX_NAME)] = uno::makeAny(::rtl::OUString(aFormula.sTitle)); + (*pParameters)[::rtl::OUString::createFromAscii(ECMA_FORMCHECKBOX_HELPTEXT)] = uno::makeAny(::rtl::OUString(aFormula.sToolTip)); + if(pCheckboxFm) + pCheckboxFm->SetChecked(aFormula.nChecked); // set field data here... } } @@ -259,8 +259,8 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr) const SvtFilterOptions* pOpt = SvtFilterOptions::Get(); sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields()); - - if (!bUseEnhFields) + + if (!bUseEnhFields) { SwDropDownField aFld((SwDropDownFieldType*)rDoc.GetSysFldType(RES_DROPDOWN)); @@ -282,14 +282,14 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr) { //@TODO fix: copy pasting here!!!!!!!!!!!!!! //REVIEW: don't let this throught.... sometime I forget to get rid of my proof of concept stuff. Please kindly remind me!!!!! - + String aBookmarkName; WW8PLCFx_Book* pB = pPlcxMan->GetBook(); - if (pB!=NULL) + if (pB!=NULL) { WW8_CP currentCP=pF->nSCode; WW8_CP currentLen=pF->nLen; - + USHORT bkmFindIdx; String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx); @@ -307,19 +307,17 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr) if (aBookmarkName.Len()>0) { IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( ); - IFieldmark *pFieldmark = dynamic_cast( + IFieldmark *pFieldmark = dynamic_cast( pMarksAccess->makeNoTextFieldBookmark( *pPaM, aBookmarkName, ::rtl::OUString::createFromAscii( ECMA_FORMDROPDOWN ) ) ); ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?"); if ( pFieldmark != NULL ) { - rtl::OUString sListEntry=rtl::OUString::createFromAscii( ECMA_FORMDROPDOWN_LISTENTRY ); - std::vector::iterator it = aFormula.maListEntries.begin(); - for( ; it != aFormula.maListEntries.end(); it++ ) - pFieldmark->addParam(sListEntry, *it, false); - - int nIndex = aFormula.fDropdownIndex < aFormula.maListEntries.size() ? aFormula.fDropdownIndex : 0; - pFieldmark->addParam(ECMA_FORMDROPDOWN_RESULT, nIndex); + uno::Sequence< ::rtl::OUString > vListEntries(aFormula.maListEntries.size()); + copy(aFormula.maListEntries.begin(), aFormula.maListEntries.end(), ::comphelper::stl_begin(vListEntries)); + (*pFieldmark->GetParameters())[::rtl::OUString::createFromAscii(ECMA_FORMDROPDOWN_LISTENTRY)] = uno::makeAny(vListEntries); + sal_Int32 nIndex = aFormula.fDropdownIndex < aFormula.maListEntries.size() ? aFormula.fDropdownIndex : 0; + (*pFieldmark->GetParameters())[::rtl::OUString::createFromAscii(ECMA_FORMDROPDOWN_RESULT)] = uno::makeAny(nIndex); // set field data here... } } diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 845a4c1afb..36cbd94ff3 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -701,7 +701,8 @@ sal_uInt16 SwWW8ImplReader::End_Field() aFldPam, maFieldStack.back().GetBookmarkName(), ::rtl::OUString::createFromAscii(ECMA_FORMTEXT ) ) ); ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?"); if (pFieldmark!=NULL) { - pFieldmark->addParams(maFieldStack.back().getParams()); + const IFieldmark::parameter_map_t& pParametersToAdd = maFieldStack.back().getParameters(); + pFieldmark->GetParameters()->insert(pParametersToAdd.begin(), pParametersToAdd.end()); } } break; @@ -711,17 +712,18 @@ sal_uInt16 SwWW8ImplReader::End_Field() case 88: // HYPERLINK case 37: // REF if (pPaM!=NULL && pPaM->GetPoint()!=NULL) { - + SwPosition aEndPos = *pPaM->GetPoint(); SwPaM aFldPam( maFieldStack.back().GetPtNode(), maFieldStack.back().GetPtCntnt(), aEndPos.nNode, aEndPos.nContent.GetIndex()); SwFieldBookmark *pFieldmark=(SwFieldBookmark*)rDoc.makeFieldBookmark(aFldPam, maFieldStack.back().GetBookmarkName(), maFieldStack.back().GetBookmarkType()); ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?"); if (pFieldmark!=NULL) { - pFieldmark->addParams(maFieldStack.back().getParams()); + const IFieldmark::parameter_map_t& pParametersToAdd = maFieldStack.back().getParameters(); + pFieldmark->GetParameters()->insert(pParameters.begin(), pParameters.end()); } } - break; -#else + break; +#else case 88: pCtrlStck->SetAttr(*pPaM->GetPoint(),RES_TXTATR_INETFMT); break; @@ -805,12 +807,8 @@ void FieldEntry::SetBookmarkType(::rtl::OUString bookmarkType) msMarkType=bookmarkType; } -void FieldEntry::AddParam(::rtl::OUString name, ::rtl::OUString value) -{ - maParams.push_back( IFieldmark::ParamPair_t( name, value ) ); -} -FieldEntry::Params_t &FieldEntry::getParams() { +::sw::mark::IFieldmark::parameter_map_t& FieldEntry::getParameters() { return maParams; } @@ -2706,8 +2704,8 @@ bool SwWW8ImplReader::AddExtraOutlinesAsExtraStyles(SwTOXBase& rBase) sal_uInt16 nStyleLevel = rSI.nOutlineLevel; sal_uInt16 nMaxLevel = rBase.GetLevel(); if ( - //nStyleLevel != pFmt->GetOutlineLevel() && //#outline level,zhaojianwei - nStyleLevel != (pFmt->GetAttrOutlineLevel()-1) && //<-end,zhaojianwei + //nStyleLevel != pFmt->GetOutlineLevel() && //#outline level,zhaojianwei + nStyleLevel != (pFmt->GetAttrOutlineLevel()-1) && //<-end,zhaojianwei nStyleLevel < nMaxLevel ) { diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index be68ef18d4..0aae7c0f6f 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -165,11 +165,11 @@ using namespace sw::mark; using namespace ::com::sun::star; /*-------------------------------------------------------------------- - Beschreibung: Globals + Beschreibung: Globals --------------------------------------------------------------------*/ static bool bInputLanguageSwitched = false; -extern BOOL bNoInterrupt; // in mainwn.cxx +extern BOOL bNoInterrupt; // in mainwn.cxx //Normalerweise wird im MouseButtonUp eine Selektion aufgehoben wenn die //Selektion nicht gerade aufgezogen wird. Leider wird im MouseButtonDown @@ -177,27 +177,27 @@ extern BOOL bNoInterrupt; // in mainwn.cxx //komplett abgeschlossen und kann deshalb im Up nicht mehr unterschieden //werden. Um dies Aufzuloese wird bHoldSelection im Down gesetzt und im //Up ausgewertet. -static BOOL bHoldSelection = FALSE; +static BOOL bHoldSelection = FALSE; -BOOL bFrmDrag = FALSE; -BOOL bValidCrsrPos = FALSE; -BOOL bModePushed = FALSE; -BOOL bDDTimerStarted = FALSE; -BOOL bFlushCharBuffer = FALSE; -BOOL SwEditWin::bReplaceQuote = FALSE; -BOOL bDDINetAttr = FALSE; -SdrHdlKind eSdrMoveHdl = HDL_USER; +BOOL bFrmDrag = FALSE; +BOOL bValidCrsrPos = FALSE; +BOOL bModePushed = FALSE; +BOOL bDDTimerStarted = FALSE; +BOOL bFlushCharBuffer = FALSE; +BOOL SwEditWin::bReplaceQuote = FALSE; +BOOL bDDINetAttr = FALSE; +SdrHdlKind eSdrMoveHdl = HDL_USER; -QuickHelpData* SwEditWin::pQuickHlpData = 0; +QuickHelpData* SwEditWin::pQuickHlpData = 0; -long SwEditWin::nDDStartPosY = 0; -long SwEditWin::nDDStartPosX = 0; -Color SwEditWin::aTextBackColor(COL_YELLOW); -Color SwEditWin::aTextColor(COL_RED); -BOOL SwEditWin::bTransparentBackColor = FALSE; // Hintergrund nicht transparent +long SwEditWin::nDDStartPosY = 0; +long SwEditWin::nDDStartPosX = 0; +Color SwEditWin::aTextBackColor(COL_YELLOW); +Color SwEditWin::aTextColor(COL_RED); +BOOL SwEditWin::bTransparentBackColor = FALSE; // Hintergrund nicht transparent -extern BOOL bExecuteDrag; +extern BOOL bExecuteDrag; SfxShell* lcl_GetShellFromDispatcher( SwView& rView, TypeId nType ); @@ -235,7 +235,7 @@ struct QuickHelpData void Start( SwWrtShell& rSh, USHORT nWrdLen ); void Stop( SwWrtShell& rSh ); - BOOL HasCntnt() const { return aArr.Count() && 0 != nLen; } + BOOL HasCntnt() const { return aArr.Count() && 0 != nLen; } void Inc( BOOL bEndLess ) { @@ -252,7 +252,7 @@ struct QuickHelpData /*-------------------------------------------------------------------- - Beschreibung: Minimale Bewegung Zittern vermeiden + Beschreibung: Minimale Bewegung Zittern vermeiden --------------------------------------------------------------------*/ #define HIT_PIX 2 /* Hit-Toleranz in Pixel */ @@ -288,7 +288,7 @@ inline BOOL IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt ) } /*-------------------------------------------------------------------- - Beschreibung: Pointer umschalten + Beschreibung: Pointer umschalten --------------------------------------------------------------------*/ @@ -305,7 +305,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier ) delete pUserMarker; pUserMarker = 0L; } -// rSh.SwCrsrShell::UnSetVisCrsr( rLPt ); +// rSh.SwCrsrShell::UnSetVisCrsr( rLPt ); eStyle = POINTER_NOTALLOWED; } else @@ -378,7 +378,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier ) // Removed ExecHyperlink option. //BOOL bExecHyperlinks = rSh.GetViewOptions()->IsExecHyperlinks() ^ - // (nModifier == KEY_MOD2 ? TRUE : FALSE); + // (nModifier == KEY_MOD2 ? TRUE : FALSE); BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly(); if ( !bExecHyperlinks ) { @@ -590,7 +590,7 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG ) if( aOldVis == rVisArea && !rSh.IsStartOfDoc() && !rSh.IsEndOfDoc() ) { //JP 11.10.2001 Bug 72294 - take the center point of VisArea to - // decide in which direction the user want. + // decide in which direction the user want. if( aModPt.Y() < ( rVisArea.Top() + rVisArea.Height() / 2 ) ) rSh.Up( TRUE, 1 ); else @@ -644,7 +644,7 @@ inline void SwEditWin::EnterArea() } /*------------------------------------------------------------------------ - Beschreibung: Modus fuer Rahmen einfuegen + Beschreibung: Modus fuer Rahmen einfuegen ------------------------------------------------------------------------*/ @@ -661,7 +661,7 @@ void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect ) { SetSdrDrawMode( eSdrObjectKind ); -/* if (GetDrawFuncPtr()) +/* if (GetDrawFuncPtr()) GetDrawFuncPtr()->Deactivate();*/ if (bObjSelect) @@ -674,7 +674,7 @@ void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect ) if (bObjSelect) rView.GetDrawFuncPtr()->Activate( SID_OBJECT_SELECT ); else - rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< USHORT >(eSdrObjectKind) ); // don't know if this is useful at all; but it keeps functionality as it was... + rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< USHORT >(eSdrObjectKind) ); // don't know if this is useful at all; but it keeps functionality as it was... bInsFrm = FALSE; nInsFrmColCount = 1; } @@ -688,7 +688,7 @@ void SwEditWin::StopInsFrm() rView.GetDrawFuncPtr()->Deactivate(); rView.SetDrawFuncPtr(NULL); } - rView.LeaveDrawCreate(); // Konstruktionsmode verlassen + rView.LeaveDrawCreate(); // Konstruktionsmode verlassen bInsFrm = FALSE; nInsFrmColCount = 1; } @@ -725,7 +725,7 @@ BOOL SwEditWin::IsInputSequenceCheckingRequired( const String &rText, const SwPa /*-------------------------------------------------------------------- - Beschreibung: Der Character Buffer wird in das Dokument eingefuegt + Beschreibung: Der Character Buffer wird in das Dokument eingefuegt --------------------------------------------------------------------*/ @@ -814,7 +814,7 @@ void SwEditWin::FlushInBuffer() ++nTmpPos; } } - aInBuffer = aNewText.copy( aOldText.getLength() ); // copy new text to be inserted to buffer + aInBuffer = aNewText.copy( aOldText.getLength() ); // copy new text to be inserted to buffer } } @@ -1252,7 +1252,7 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) } /*-------------------------------------------------------------------- - Beschreibung: KeyEvents + Beschreibung: KeyEvents --------------------------------------------------------------------*/ @@ -1385,7 +1385,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) if( pMacro ) { String sRet; - SbxArrayRef xArgs = new SbxArray; + SbxArrayRef xArgs = new SbxArray; SbxVariableRef xVar = new SbxVariable; xVar->PutString( pFlyFmt->GetName() ); xArgs->Put( &xVar, 1 ); @@ -1503,12 +1503,12 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) switch( eKeyState ) { case KS_CheckKey: - eKeyState = KS_KeyToView; // default weiter zur View + eKeyState = KS_KeyToView; // default weiter zur View #ifndef PRODUCT //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // JP 19.01.99: zum Umschalten des Cursor Verhaltens in ReadOnly - // Bereichen + // Bereichen if( 0x7210 == rKeyCode.GetFullCode() ) rSh.SetReadOnlyAvailable( !rSh.IsReadOnlyAvailable() ); else @@ -1521,7 +1521,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) !rSh.HasReadonlySel() ) { // in der Tabelle am Anfang der Zelle ein '=' -> - // EditZeile aufrufen (F2-Funktionalitaet) + // EditZeile aufrufen (F2-Funktionalitaet) rSh.Push(); if( !rSh.MoveSection( fnSectionCurr, fnSectionStart) && !rSh.IsTableBoxTextFormat() ) @@ -1594,12 +1594,12 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) eFlyState = KS_Fly_Change; nDir = MOVE_DOWN_SMALL; goto KEYINPUT_CHECKTABLE; -// case KEY_UP | KEY_MOD2 | KEY_SHIFT: -// eKeyState = KS_ColTopBig; -// goto KEYINPUT_CHECKTABLE; -// case KEY_DOWN | KEY_MOD2 | KEY_SHIFT: -// eKeyState = KS_ColTopSmall; -// goto KEYINPUT_CHECKTABLE; +// case KEY_UP | KEY_MOD2 | KEY_SHIFT: +// eKeyState = KS_ColTopBig; +// goto KEYINPUT_CHECKTABLE; +// case KEY_DOWN | KEY_MOD2 | KEY_SHIFT: +// eKeyState = KS_ColTopSmall; +// goto KEYINPUT_CHECKTABLE; case KEY_UP | KEY_MOD2 | KEY_MOD1: eKeyState = KS_CellBottomSmall; @@ -1745,7 +1745,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } break; - case KEY_RETURN: // Return + case KEY_RETURN: // Return if( !rSh.HasReadonlySel() ) { const int nSelectionType = rSh.GetSelectionType(); @@ -1781,7 +1781,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } break; - case KEY_RETURN | KEY_MOD2: // ALT-Return + case KEY_RETURN | KEY_MOD2: // ALT-Return if( !rSh.HasReadonlySel() && !rSh.IsSttPara() && rSh.GetCurNumRule() ) eKeyState = KS_NoNum; else if( rSh.CanSpecialInsert() ) @@ -1991,8 +1991,8 @@ KEYINPUT_CHECKTABLE_INSDEL: if( rSh.IsSttOfPara() && !rSh.HasReadonlySel() ) { SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); - //if( pColl && 0 < pColl->GetOutlineLevel() && //#outline level,zhaojianwei - // MAXLEVEL - 1 >= pColl->GetOutlineLevel() ) + //if( pColl && 0 < pColl->GetOutlineLevel() && //#outline level,zhaojianwei + // MAXLEVEL - 1 >= pColl->GetOutlineLevel() ) if( pColl && pColl->IsAssignedToListLevelOfOutlineStyle() && 0 < pColl->GetAssignedOutlineStyleLevel()) @@ -2144,7 +2144,7 @@ KEYINPUT_CHECKTABLE_INSDEL: else { // OS 22.09.95: Da der Sfx Acceleratoren nur aufruft, wenn sie beim letzten -// Statusupdate enabled wurden, muss copy ggf. von uns +// Statusupdate enabled wurden, muss copy ggf. von uns // 'gewaltsam' gerufen werden. if( rKeyCode.GetFunction() == KEYFUNC_COPY ) GetView().GetViewFrame()->GetBindings().Execute(SID_COPY); @@ -2216,7 +2216,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } break; case KS_InsTab: - if( rView.ISA( SwWebView )) //Kein Tabulator fuer Web! + if( rView.ISA( SwWebView )) //Kein Tabulator fuer Web! { // Bug 56196 - dann sollte der weiter gereicht werden. Window::KeyInput( aKeyEvent ); @@ -2310,7 +2310,7 @@ KEYINPUT_CHECKTABLE_INSDEL: else { InfoBox( this, SW_RES( MSG_READONLY_CONTENT )).Execute(); - // ??? Window::KeyInput( aKeyEvent ); + // ??? Window::KeyInput( aKeyEvent ); eKeyState = KS_Ende; } break; @@ -2335,8 +2335,8 @@ KEYINPUT_CHECKTABLE_INSDEL: { USHORT nSlotId = 0; FlushInBuffer(); -//??? if( bFlushCharBuffer ) -//??? FlushInBuffer( &rSh ); +//??? if( bFlushCharBuffer ) +//??? FlushInBuffer( &rSh ); switch( eKeyState ) { case KS_SpecialInsert: @@ -2412,8 +2412,8 @@ KEYINPUT_CHECKTABLE_INSDEL: rSh.SplitNode( TRUE ); break; -// case KS_NumOrNoNum: -// break; +// case KS_NumOrNoNum: +// break; case KS_NextObject: case KS_PrevObject: if(rSh.GotoObj( KS_NextObject == eKeyState, GOTOOBJ_GOTO_ANY)) @@ -2479,40 +2479,40 @@ KEYINPUT_CHECKTABLE_INSDEL: } break; - case KS_ColLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; - case KS_ColRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; - case KS_ColLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_LEFT, pModOpt->GetTblHMove() ); break; - case KS_ColRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_RIGHT, pModOpt->GetTblHMove() ); break; -// case KS_ColTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; - case KS_ColBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; -// case KS_ColTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_TOP, pModOpt->GetTblVMove() ); break; - case KS_ColBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_BOTTOM, pModOpt->GetTblVMove() ); break; - case KS_CellLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; - case KS_CellRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; - case KS_CellLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_LEFT, pModOpt->GetTblHMove() ); break; - case KS_CellRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_RIGHT, pModOpt->GetTblHMove() ); break; - case KS_CellTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; - case KS_CellBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; - case KS_CellTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_TOP, pModOpt->GetTblVMove() ); break; - case KS_CellBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_BOTTOM, pModOpt->GetTblVMove() ); break; + case KS_ColLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; + case KS_ColRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; + case KS_ColLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_LEFT, pModOpt->GetTblHMove() ); break; + case KS_ColRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_RIGHT, pModOpt->GetTblHMove() ); break; +// case KS_ColTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; + case KS_ColBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; +// case KS_ColTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_TOP, pModOpt->GetTblVMove() ); break; + case KS_ColBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_BOTTOM, pModOpt->GetTblVMove() ); break; + case KS_CellLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; + case KS_CellRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; + case KS_CellLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_LEFT, pModOpt->GetTblHMove() ); break; + case KS_CellRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_RIGHT, pModOpt->GetTblHMove() ); break; + case KS_CellTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; + case KS_CellBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; + case KS_CellTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_TOP, pModOpt->GetTblVMove() ); break; + case KS_CellBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_BOTTOM, pModOpt->GetTblVMove() ); break; //--------------- - case KS_InsDel_ColLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_ColRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_ColLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_LEFT, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_ColRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_RIGHT, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_ColTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_ColBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_ColTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_TOP, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_ColBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_BOTTOM, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_CellLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_CellRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_CellLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_LEFT, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_CellRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_RIGHT, pModOpt->GetTblHInsert() ); break; - case KS_InsDel_CellTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_CellBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_CellTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_TOP, pModOpt->GetTblVInsert() ); break; - case KS_InsDel_CellBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_BOTTOM, pModOpt->GetTblVInsert() ); break; + case KS_InsDel_ColLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; + case KS_InsDel_ColRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; + case KS_InsDel_ColLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_LEFT, pModOpt->GetTblHInsert() ); break; + case KS_InsDel_ColRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_COL_RIGHT, pModOpt->GetTblHInsert() ); break; + case KS_InsDel_ColTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; + case KS_InsDel_ColBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; + case KS_InsDel_ColTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_TOP, pModOpt->GetTblVInsert() ); break; + case KS_InsDel_ColBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_ROW_BOTTOM, pModOpt->GetTblVInsert() ); break; + case KS_InsDel_CellLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; + case KS_InsDel_CellRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHInsert() ); break; + case KS_InsDel_CellLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_LEFT, pModOpt->GetTblHInsert() ); break; + case KS_InsDel_CellRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_RIGHT, pModOpt->GetTblHInsert() ); break; + case KS_InsDel_CellTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; + case KS_InsDel_CellBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVInsert() ); break; + case KS_InsDel_CellTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_TOP, pModOpt->GetTblVInsert() ); break; + case KS_InsDel_CellBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_FLAG_INSDEL|nsTblChgWidthHeightType::WH_CELL_BOTTOM, pModOpt->GetTblVInsert() ); break; //--------------- case KS_TblColCellInsDel: rSh.SetColRowWidthHeight( eTblChgMode, nTblChgSize ); @@ -2570,7 +2570,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } /*-------------------------------------------------------------------- - Beschreibung: MouseEvents + Beschreibung: MouseEvents --------------------------------------------------------------------*/ @@ -2651,7 +2651,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) pQuickHlpData->bChkInsBlank = FALSE; if( rSh.FinishOLEObj() ) - return; //InPlace beenden und der Klick zaehlt nicht mehr + return; //InPlace beenden und der Klick zaehlt nicht mehr SET_CURR_SHELL( &rSh ); @@ -3252,7 +3252,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } } else - { if ( rSh.SelectObj( aDocPos ) ) + { if ( rSh.SelectObj( aDocPos ) ) { rSh.EnterSelFrmMode( &aDocPos ); SwEditWin::nDDStartPosY = aDocPos.Y(); @@ -3351,7 +3351,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) int nTmpSetCrsr = 0; - { // nur temp. Move-Kontext aufspannen, da sonst die + { // nur temp. Move-Kontext aufspannen, da sonst die // Abfrage auf die Inhaltsform nicht funktioniert!!! MV_KONTEXT( &rSh ); nTmpSetCrsr = (rSh.*rSh.fnSetCrsr)(&aDocPos,bOnlyText); @@ -3384,8 +3384,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // nicht mehr hier zuruecksetzen, damit -- falls durch MouseMove // bei gedrueckter Ctrl-Taste eine Mehrfachselektion erfolgen soll, // im Drag nicht die vorherige Selektion aufgehoben wird. -// if(bModePushed) -// rSh.PopMode(FALSE); +// if(bModePushed) +// rSh.PopMode(FALSE); break; } } @@ -3395,7 +3395,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } /*-------------------------------------------------------------------- - Beschreibung: MouseMove + Beschreibung: MouseMove --------------------------------------------------------------------*/ @@ -3483,7 +3483,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) Point aDD( SwEditWin::nDDStartPosX, SwEditWin::nDDStartPosY ); aDD = LogicToPixel( aDD ); Rectangle aRect( aDD.X()-3, aDD.Y()-3, aDD.X()+3, aDD.Y()+3 ); - if ( !aRect.IsInside( aPixPt ) ) // MA 23. May. 95: Tatterschutz. + if ( !aRect.IsInside( aPixPt ) ) // MA 23. May. 95: Tatterschutz. StopDDTimer( &rSh, aDocPt ); } @@ -3620,10 +3620,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) pAnchorMarker->ChgHdl( pHdl ); if( aNew.X() || aNew.Y() ) { - pAnchorMarker->SetPos( aNew ); - pAnchorMarker->SetLastPos( aDocPt ); - //OLMpSdrView->RefreshAllIAOManagers(); - } + pAnchorMarker->SetPos( aNew ); + pAnchorMarker->SetLastPos( aDocPt ); + //OLMpSdrView->RefreshAllIAOManagers(); + } } else { @@ -3673,7 +3673,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) // geht es los? if( HDL_USER == eSdrMoveHdl ) { - SdrHdl* pHdl = pSdrView->PickHandle( aSttPt ); + SdrHdl* pHdl = pSdrView->PickHandle( aSttPt ); eSdrMoveHdl = pHdl ? pHdl->GetKind() : HDL_MOVE; } @@ -3685,14 +3685,14 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) 0 != ( pMacro = pFlyFmt->GetMacro().GetMacroTable(). Get( nEvent )) && // oder nur z.B. alle 20 Twip bescheid sagen? -// ( 20 > Abs( aRszMvHdlPt.X() - aDocPt.X() ) || -// 20 > Abs( aRszMvHdlPt.Y() - aDocPt.Y() ) ) +// ( 20 > Abs( aRszMvHdlPt.X() - aDocPt.X() ) || +// 20 > Abs( aRszMvHdlPt.Y() - aDocPt.Y() ) ) aRszMvHdlPt != aDocPt ) { aRszMvHdlPt = aDocPt; USHORT nPos = 0; String sRet; - SbxArrayRef xArgs = new SbxArray; + SbxArrayRef xArgs = new SbxArray; SbxVariableRef xVar = new SbxVariable; xVar->PutString( pFlyFmt->GetName() ); xArgs->Put( &xVar, ++nPos ); @@ -3905,7 +3905,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) } /*-------------------------------------------------------------------- - Beschreibung: Button Up + Beschreibung: Button Up --------------------------------------------------------------------*/ @@ -3922,7 +3922,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) DELETEZ( pRowColumnSelectionStart ); SdrHdlKind eOldSdrMoveHdl = eSdrMoveHdl; - eSdrMoveHdl = HDL_USER; // fuer die MoveEvents - wieder zuruecksetzen + eSdrMoveHdl = HDL_USER; // fuer die MoveEvents - wieder zuruecksetzen // sicherheitshalber zuruecksetzen Bug 27900 rView.SetTabColFromDoc( FALSE ); @@ -3945,9 +3945,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if ( !bMBPressed ) { // OS 25.02.97 Undo fuer die Giesskann ist bereits im CommandHdl -//JP 29.09.95: so sollte es sein!!! if(pApplyTempl->bUndo) -// if( pApplyTempl && MOUSE_RIGHT == rMEvt.GetModifier() + rMEvt.GetButtons() ) -// rSh.Do( SwWrtShell::UNDO ); +//JP 29.09.95: so sollte es sein!!! if(pApplyTempl->bUndo) +// if( pApplyTempl && MOUSE_RIGHT == rMEvt.GetModifier() + rMEvt.GetButtons() ) +// rSh.Do( SwWrtShell::UNDO ); return; } @@ -3979,7 +3979,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) { if ( rView.GetDrawFuncPtr()->MouseButtonUp( rMEvt ) ) { - if (rView.GetDrawFuncPtr()) // Koennte im MouseButtonUp zerstoert worden sein + if (rView.GetDrawFuncPtr()) // Koennte im MouseButtonUp zerstoert worden sein { rView.GetDrawFuncPtr()->Deactivate(); @@ -4013,7 +4013,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) rView.AttrChangedNotify( &rSh ); } else if (rMEvt.GetButtons() == MOUSE_RIGHT && rSh.IsDrawCreate()) - rView.GetDrawFuncPtr()->BreakCreate(); // Zeichnen abbrechen + rView.GetDrawFuncPtr()->BreakCreate(); // Zeichnen abbrechen bNoInterrupt = FALSE; ReleaseMouse(); @@ -4088,7 +4088,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) const Point aSttPt( PixelToLogic( aStartPos ) ); aRszMvHdlPt = aDocPt; USHORT nPos = 0; - SbxArrayRef xArgs = new SbxArray; + SbxArrayRef xArgs = new SbxArray; SbxVariableRef xVar = new SbxVariable; xVar->PutString( pFlyFmt->GetName() ); xArgs->Put( &xVar, ++nPos ); @@ -4139,7 +4139,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if( bHoldSelection ) { //JP 27.04.99: Bug 65389 - das EndDrag sollte auf jedenfall - // gerufen werden. + // gerufen werden. bHoldSelection = FALSE; (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE ); } @@ -4149,7 +4149,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) { const BOOL bTmpNoInterrupt = bNoInterrupt; bNoInterrupt = FALSE; - { // nur temp. Move-Kontext aufspannen, da sonst die + { // nur temp. Move-Kontext aufspannen, da sonst die // Abfrage auf die Inhaltsform nicht funktioniert!!! MV_KONTEXT( &rSh ); const Point aDocPos( PixelToLogic( aStartPos ) ); @@ -4165,7 +4165,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) // Internetfield? --> Link-Callen (DocLaden!!) //JP 18.10.96: Bug 32437 - -// if( !rSh.HasSelection() ) +// if( !rSh.HasSelection() ) if( !bInSel ) { USHORT nFilter = URLLOAD_NOFILTER; @@ -4213,23 +4213,20 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) else if ( SwContentAtPos::SW_FORMCTRL == aCntntAtPos.eCntntAtPos ) { ASSERT( aCntntAtPos.aFnd.pFldmark != NULL, "where is my field ptr???"); - if ( aCntntAtPos.aFnd.pFldmark != NULL) + if ( aCntntAtPos.aFnd.pFldmark != NULL) { IFieldmark *fieldBM = const_cast< IFieldmark* > ( aCntntAtPos.aFnd.pFldmark ); //SwDocShell* pDocSh = rView.GetDocShell(); //SwDoc *pDoc=pDocSh->GetDoc(); - if (fieldBM->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ) ) + if (fieldBM->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ) ) { - bool isChecked = fieldBM->getParam( ECMA_FORMCHECKBOX_CHECKED ).second.compareToAscii("on") == 0; - isChecked = !isChecked; // swap it... - fieldBM->addParam( - rtl::OUString::createFromAscii( ECMA_FORMCHECKBOX_CHECKED ), - rtl::OUString::createFromAscii( isChecked?"on":"off" ) ); - fieldBM->invalidate(); + ICheckboxFieldmark* pCheckboxFm = dynamic_cast(fieldBM); + pCheckboxFm->SetChecked(!pCheckboxFm->IsChecked()); + pCheckboxFm->Invalidate(); rSh.InvalidateWindows( rView.GetVisArea() ); } else if (fieldBM->GetFieldname().equalsAscii( ECMA_FORMDROPDOWN) ) { rView.ExecFieldPopup( aDocPt, fieldBM ); - fieldBM->invalidate(); + fieldBM->Invalidate(); rSh.InvalidateWindows( rView.GetVisArea() ); } else { // unknown type.. @@ -4474,7 +4471,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) /*-------------------------------------------------------------------- - Beschreibung: Vorlage anwenden + Beschreibung: Vorlage anwenden --------------------------------------------------------------------*/ @@ -4529,7 +4526,7 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl) } /*-------------------------------------------------------------------- - Beschreibung: ctor + Beschreibung: ctor --------------------------------------------------------------------*/ @@ -4588,7 +4585,7 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView): aTemplateTimer.SetTimeoutHdl(LINK(this, SwEditWin, TemplateTimerHdl)); //JP 16.12.98: temporaere Loesung!!! Sollte bei jeder Cursorbewegung - // den Font von der akt. einfuege Position setzen! + // den Font von der akt. einfuege Position setzen! if( !rMyView.GetDocShell()->IsReadOnly() ) { Font aFont; @@ -4620,7 +4617,7 @@ SwEditWin::~SwEditWin() /****************************************************************************** - * Beschreibung: DrawTextEditMode einschalten + * Beschreibung: DrawTextEditMode einschalten ******************************************************************************/ @@ -4640,7 +4637,7 @@ void SwEditWin::EnterDrawTextMode( const Point& aDocPos ) } /****************************************************************************** - * Beschreibung: DrawMode einschalten + * Beschreibung: DrawMode einschalten ******************************************************************************/ @@ -4650,7 +4647,7 @@ BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos) SwWrtShell &rSh = rView.GetWrtShell(); SdrView *pSdrView = rSh.GetDrawView(); -// if ( GetDrawFuncPtr() && (aActHitType == SDRHIT_NONE || rSh.IsDrawCreate()) ) +// if ( GetDrawFuncPtr() && (aActHitType == SDRHIT_NONE || rSh.IsDrawCreate()) ) if ( rView.GetDrawFuncPtr() ) { if (rSh.IsDrawCreate()) @@ -4685,19 +4682,19 @@ BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos) } /****************************************************************************** - * Beschreibung: + * Beschreibung: ******************************************************************************/ BOOL SwEditWin::IsDrawSelMode() { -// return (IsFrmAction() == FALSE && GetSdrDrawMode() == OBJ_NONE); +// return (IsFrmAction() == FALSE && GetSdrDrawMode() == OBJ_NONE); return IsObjectSelect(); } /****************************************************************************** - * Beschreibung: + * Beschreibung: ******************************************************************************/ @@ -4714,7 +4711,7 @@ void SwEditWin::GetFocus() } /****************************************************************************** - * Beschreibung: + * Beschreibung: ******************************************************************************/ @@ -4729,7 +4726,7 @@ void SwEditWin::LoseFocus() } /****************************************************************************** - * Beschreibung: + * Beschreibung: ******************************************************************************/ @@ -4758,7 +4755,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) return; } - BOOL bCallBase = TRUE; + BOOL bCallBase = TRUE; switch ( rCEvt.GetCommand() ) { @@ -4856,32 +4853,32 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) switch ( pCData->GetCommand() ) { - case DICTATIONCOMMAND_NEWPARAGRAPH: nSlotId = FN_INSERT_BREAK; break; - case DICTATIONCOMMAND_NEWLINE: nSlotId = FN_INSERT_LINEBREAK; break; - case DICTATIONCOMMAND_LEFT: nSlotId = FN_PREV_WORD; break; - case DICTATIONCOMMAND_RIGHT: nSlotId = FN_NEXT_WORD; break; - case DICTATIONCOMMAND_UP: nSlotId = FN_LINE_UP; break; - case DICTATIONCOMMAND_DOWN: nSlotId = FN_LINE_DOWN; break; - case DICTATIONCOMMAND_UNDO: nSlotId = SID_UNDO; break; - case DICTATIONCOMMAND_REPEAT: nSlotId = SID_REPEAT; break; - case DICTATIONCOMMAND_DEL: nSlotId = FN_DELETE_BACK_WORD; break; - - case DICTATIONCOMMAND_BOLD_ON: nSlotId = SID_ATTR_CHAR_WEIGHT; + case DICTATIONCOMMAND_NEWPARAGRAPH: nSlotId = FN_INSERT_BREAK; break; + case DICTATIONCOMMAND_NEWLINE: nSlotId = FN_INSERT_LINEBREAK; break; + case DICTATIONCOMMAND_LEFT: nSlotId = FN_PREV_WORD; break; + case DICTATIONCOMMAND_RIGHT: nSlotId = FN_NEXT_WORD; break; + case DICTATIONCOMMAND_UP: nSlotId = FN_LINE_UP; break; + case DICTATIONCOMMAND_DOWN: nSlotId = FN_LINE_DOWN; break; + case DICTATIONCOMMAND_UNDO: nSlotId = SID_UNDO; break; + case DICTATIONCOMMAND_REPEAT: nSlotId = SID_REPEAT; break; + case DICTATIONCOMMAND_DEL: nSlotId = FN_DELETE_BACK_WORD; break; + + case DICTATIONCOMMAND_BOLD_ON: nSlotId = SID_ATTR_CHAR_WEIGHT; pItem = new SvxWeightItem( WEIGHT_BOLD, RES_CHRATR_WEIGHT ); break; - case DICTATIONCOMMAND_BOLD_OFF: nSlotId = SID_ATTR_CHAR_WEIGHT; + case DICTATIONCOMMAND_BOLD_OFF: nSlotId = SID_ATTR_CHAR_WEIGHT; pItem = new SvxWeightItem( WEIGHT_NORMAL, RES_CHRATR_WEIGHT ); break; - case DICTATIONCOMMAND_UNDERLINE_ON: nSlotId = SID_ATTR_CHAR_UNDERLINE; + case DICTATIONCOMMAND_UNDERLINE_ON: nSlotId = SID_ATTR_CHAR_UNDERLINE; pItem = new SvxUnderlineItem( UNDERLINE_SINGLE, RES_CHRATR_WEIGHT ); break; case DICTATIONCOMMAND_UNDERLINE_OFF:nSlotId = SID_ATTR_CHAR_UNDERLINE; pItem = new SvxUnderlineItem( UNDERLINE_NONE, RES_CHRATR_UNDERLINE ); break; - case DICTATIONCOMMAND_ITALIC_ON: nSlotId = SID_ATTR_CHAR_POSTURE; + case DICTATIONCOMMAND_ITALIC_ON: nSlotId = SID_ATTR_CHAR_POSTURE; pItem = new SvxPostureItem( ITALIC_NORMAL, RES_CHRATR_POSTURE ); break; - case DICTATIONCOMMAND_ITALIC_OFF: nSlotId = SID_ATTR_CHAR_POSTURE; + case DICTATIONCOMMAND_ITALIC_OFF: nSlotId = SID_ATTR_CHAR_POSTURE; pItem = new SvxPostureItem( ITALIC_NONE, RES_CHRATR_POSTURE ); break; case DICTATIONCOMMAND_NUMBERING_ON: @@ -5495,13 +5492,13 @@ void SwEditWin::SetChainMode( BOOL bOn ) uno::Reference< ::com::sun::star::accessibility::XAccessible > SwEditWin::CreateAccessible() { - vos::OGuard aGuard(Application::GetSolarMutex()); // this should have + vos::OGuard aGuard(Application::GetSolarMutex()); // this should have // happend already!!! SwWrtShell *pSh = rView.GetWrtShellPtr(); ASSERT( pSh, "no writer shell, no accessible object" ); uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc; - if( pSh ) + if( pSh ) xAcc = pSh->CreateAccessible(); return xAcc; @@ -5514,7 +5511,7 @@ void QuickHelpData::Move( QuickHelpData& rCpy ) // Pointer verschieben aArr.Insert( &rCpy.aArr ); rCpy.aArr.Remove( (USHORT)0, rCpy.aArr.Count() ); -// nTipId = rCpy.nTipId; +// nTipId = rCpy.nTipId; bClear = rCpy.bClear; nLen = rCpy.nLen; nCurArrPos = rCpy.nCurArrPos; @@ -5610,8 +5607,8 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord ) if( rWord.Len() + 1 < sStr.Len() && //!!! UNICODE: fehlendes interface -// pIntl->CompareEqual( rWord, sStr.Copy( 0, rWord.Len() ), -// INTN_COMPARE_IGNORECASE ) ) +// pIntl->CompareEqual( rWord, sStr.Copy( 0, rWord.Len() ), +// INTN_COMPARE_IGNORECASE ) ) COMPARE_EQUAL == rWord.CompareIgnoreCaseToAscii( sStr, rWord.Len() )) { @@ -5634,8 +5631,8 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord ) { const String& rS = rACLst[ nStt ]; //JP 16.06.99: Bug 66927 - only if the count of chars - // from the suggest greater as the - // actual word + // from the suggest greater as the + // actual word if( rS.Len() > rWord.Len() ) { String* pNew = new String( rS ); diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index dee97a6f01..e917499c73 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -981,12 +981,18 @@ public: assert(fieldBM!=NULL); if (fieldBM!=NULL) { - int items=fieldBM->getNumOfParams(); - for(int i=0;igetParam(i); - if (p.first.compareToAscii(ECMA_FORMDROPDOWN_LISTENTRY)==0) { - aListBox.InsertEntry(p.second); - } + const IFieldmark::parameter_map_t* const pParameters = fieldBM->GetParameters(); + IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ECMA_FORMDROPDOWN_LISTENTRY)); + if(pListEntries != pParameters->end()) + { + Sequence< ::rtl::OUString> vListEntries; + pListEntries->second >>= vListEntries; + for( ::rtl::OUString* pCurrent = vListEntries.getArray(); + pCurrent != vListEntries.getArray() + vListEntries.getLength(); + ++pCurrent) + { + aListBox.InsertEntry(*pCurrent); + } } } Size lbSize=aListBox.GetOptimalSize(WINDOWSIZE_PREFERRED); @@ -1058,7 +1064,7 @@ BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM ) /*short ret=*/aFldDlg.Execute(); int selection=aFldDlg.getSelection(); if (selection>=0) { - fieldBM->addParam(ECMA_FORMDROPDOWN_RESULT, selection); + (*fieldBM->GetParameters())[::rtl::OUString::createFromAscii(ECMA_FORMDROPDOWN_RESULT)] = makeAny(selection); } pWrtShell->Pop( sal_False ); -- cgit v1.2.3 From 378274350ec308391815b94f89e98a7d8af7ca4f Mon Sep 17 00:00:00 2001 From: Oliver Specht Date: Thu, 3 Dec 2009 09:21:21 +0000 Subject: #i107401# page number of page bound frames fixed --- sw/source/core/doc/docnew.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index eb208db2e7..5cbe5c4b04 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -1417,7 +1417,7 @@ void SwDoc::Paste( const SwDoc& rSource ) SwFmtAnchor aAnchor( rCpyFmt.GetAnchor() ); if( FLY_PAGE == aAnchor.GetAnchorId() ) { - aAnchor.SetPageNum( aAnchor.GetPageNum() + /*nStartPageNumber - */1 ); + aAnchor.SetPageNum( aAnchor.GetPageNum() /*+ nStartPageNumber - */); } else continue; -- cgit v1.2.3 From 83ec2dbbfc2739e22eaf74b0fa56ed4172d67e02 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Thu, 3 Dec 2009 17:24:39 +0000 Subject: cmcfixes68: #i107420# remove trivial warnings from sw with newer gcc --- sw/source/core/unocore/unotext.cxx | 4 ++-- sw/source/ui/uiview/srcview.cxx | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 0373d8877a..3876f861b2 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -270,8 +270,8 @@ void SwXText::insertString(const uno::Reference< text::XTextRange >& xTextRange, sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); } - if(pRange && pRange->GetDoc() == GetDoc() || - pCursor && pCursor->GetDoc() == GetDoc()) + if( (pRange && pRange->GetDoc() == GetDoc()) || + (pCursor && pCursor->GetDoc() == GetDoc()) ) { const SwStartNode* pOwnStartNode = GetStartNode(); if(pCursor) diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index 5653071d84..b4a12b6e26 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -717,6 +717,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, if(!bApi) + { if(bNotFoundMessage) { InfoBox( 0, SW_RES(MSG_NOT_FOUND)).Execute(); @@ -728,6 +729,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, pTextView->SetSelection( TextSelection( aPaM, aPaM ) ); StartSearchAndReplace( rSearchItem, FALSE, FALSE, TRUE ); } + } } return nFound; } -- cgit v1.2.3 From d8ecc584a68e326b162307ffa9e55de8c6348260 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 4 Dec 2009 10:11:06 +0100 Subject: autorecovery: another client of InsertDocument_Impl died ... SfxFrame::InsertDocument has been replaced with SfxViewFrame::LoadDocument, which now uses the UNO loader to load the existing document into a frame, instead of going the direct (non-UNO-, pure-SFX-) way --- sw/source/ui/app/apphdl.cxx | 13 +++---------- sw/source/ui/app/applab.cxx | 10 ++-------- 2 files changed, 5 insertions(+), 18 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 9618817ce9..896eef6b08 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -958,16 +958,9 @@ void NewXForms( SfxRequest& rReq ) // initialize XForms static_cast( &xDocSh )->GetDoc()->initXForms( true ); - // put document into frame - const SfxItemSet* pArgs = rReq.GetArgs(); - DBG_ASSERT( pArgs, "no arguments in SfxRequest"); - if( pArgs != NULL ) - { - const SfxPoolItem* pFrameItem = NULL; - pArgs->GetItemState( SID_DOCFRAME, FALSE, &pFrameItem ); - SfxFrame* pFrame = pFrameItem ? dynamic_cast< const SfxFrameItem& >( *pFrameItem ).GetFrame() : NULL; - SfxFrame::InsertDocument( *xDocSh, pFrame ); - } + // load document into frame + SFX_REQUEST_ARG( rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE ); + SfxViewFrame::LoadDocument( *xDocSh, pFrameItem ); // set return value rReq.SetReturnValue( SfxVoidItem( rReq.GetSlot() ) ); diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index d06356c6e6..116af5cf29 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -237,14 +237,8 @@ static sal_uInt16 nBCTitleNo = 0; pDocSh->getIDocumentDeviceAccess()->setJobsetup(pPrt->GetJobSetup()); } - const SfxItemSet *pArgs = rReq.GetArgs(); - DBG_ASSERT( pArgs, "no arguments in SfxRequest"); - const SfxPoolItem* pFrameItem = 0; - if(pArgs) - pArgs->GetItemState(SID_DOCFRAME, FALSE, &pFrameItem); - - SfxFrame* pFrame = pFrameItem ? dynamic_cast< const SfxFrameItem& >( *pFrameItem ).GetFrame() : NULL; - SfxViewFrame* pViewFrame = SfxFrame::InsertDocument( *xDocSh, pFrame, 0, true ); + SFX_REQUEST_ARG( rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE ); + SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocument( *xDocSh, pFrameItem ); SwView *pNewView = (SwView*) pViewFrame->GetViewShell(); pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird. -- cgit v1.2.3 From f68dddc18fac5c2d2bf1c896c1d64b49219401eb Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 4 Dec 2009 21:29:53 +0100 Subject: autorecovery: replace some calls to SfxViewFrame::CreateViewFrame with calls to the (newly introduced) SfxViewFrame::LoadHiddenDocument This way, we got rid of some more clients of InsertDocument_Impl. Final goal is to remove SfxViewFrame::CreateViewFrame completely, so the UNO loader is the only (indirect) client of InsertDocument_Impl. --- sw/source/core/doc/docglbl.cxx | 4 ++-- sw/source/filter/html/htmlform.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index 1d39e35de2..3ace780db7 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -326,7 +326,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, pDoc->GetSpzFrmFmts()->Count() ) { /* SfxViewFrame* pFrame = */ - SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE ); + SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); } xDocSh->DoSaveAs( *pTmpMed ); xDocSh->DoSaveCompleted( pTmpMed ); @@ -672,7 +672,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel ) pDoc->GetSpzFrmFmts()->Count() ) { /* SfxViewFrame* pFrame = */ - SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE ); + SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); } xDocSh->DoSaveAs( *pTmpMed ); xDocSh->DoSaveCompleted( pTmpMed ); diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 7a0449db96..3145b14859 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -732,7 +732,7 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha bRemoveHidden = ( pHiddenItem == NULL || !pHiddenItem->GetValue() ); } - pTempViewFrame = SfxViewFrame::CreateViewFrame( *pDocSh, 0, sal_True ); + pTempViewFrame = SfxViewFrame::LoadHiddenDocument( *pDocSh, 0 ); CallStartAction(); pDoc->GetEditShell( &pVSh ); } -- cgit v1.2.3 From 41846803bef982ee934a3e7f396dac0d46732399 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 4 Dec 2009 22:09:14 +0100 Subject: autorecovery: rename SfxViewFrame's LoadDocument to LoadDocumentIntoFrame, and introduce a new LoadDocument, which does not take any frame-like argument. Makes writing code easier (and more explicit) for clients which do not have a frame, but want to load non-hidden. --- sw/source/ui/app/apphdl.cxx | 2 +- sw/source/ui/app/applab.cxx | 2 +- sw/source/ui/app/docsh2.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 896eef6b08..ca919cf99e 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -960,7 +960,7 @@ void NewXForms( SfxRequest& rReq ) // load document into frame SFX_REQUEST_ARG( rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE ); - SfxViewFrame::LoadDocument( *xDocSh, pFrameItem ); + SfxViewFrame::LoadDocumentIntoFrame( *xDocSh, pFrameItem ); // set return value rReq.SetReturnValue( SfxVoidItem( rReq.GetSlot() ) ); diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index 116af5cf29..cb4a62a1f1 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -238,7 +238,7 @@ static sal_uInt16 nBCTitleNo = 0; } SFX_REQUEST_ARG( rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE ); - SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocument( *xDocSh, pFrameItem ); + SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *xDocSh, pFrameItem ); SwView *pNewView = (SwView*) pViewFrame->GetViewShell(); pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird. diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index f4bbaa1da6..70205e3dcb 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1061,7 +1061,7 @@ void SwDocShell::Execute(SfxRequest& rReq) else { // Neues Dokument erzeugen. - SfxViewFrame *pFrame = SfxViewFrame::CreateViewFrame( *xDocSh, 0 ); + SfxViewFrame *pFrame = SfxViewFrame::LoadDocument( *xDocSh, 0 ); SwView *pCurrView = (SwView*) pFrame->GetViewShell(); // Dokumenttitel setzen -- cgit v1.2.3 From fc07df1e7b5db6666556f22c570f41c632f6335b Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 5 Dec 2009 19:50:44 +0100 Subject: merge to m67 --- sw/source/filter/ww8/wrtww8.cxx | 58 +++++------------------------------------ 1 file changed, 7 insertions(+), 51 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index e5073b1479..a650399f78 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2372,82 +2372,43 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t if ( m_rWW8Export.bWrtWW8 ) { sal_uInt32 aSprmIds[] = {NS_sprm::LN_TCellShd, NS_sprm::LN_TCellShadow}; - sal_uInt8 nBoxes0 = rTabBoxes.Count(); if (nBoxes0 > 21) nBoxes0 = 21; -<<<<<<< local - m_rWW8Export.InsUInt16( NS_sprm::LN_TCellShd ); - m_rWW8Export.pO->Insert( static_cast(nBoxes0 * 10), m_rWW8Export.pO->Count() ); - - for ( sal_uInt8 n = 0; n < nBoxes0; n++ ) -======= for (sal_uInt32 m = 0; m < 2; m++) ->>>>>>> other { -<<<<<<< local - const SwTableBox * pBox1 = rTabBoxes[n]; - const SwFrmFmt * pFrmFmt = pBox1->GetFrmFmt(); - const SfxPoolItem * pI = NULL; - Color aColor; -======= m_rWW8Export.InsUInt16( aSprmIds[m] ); m_rWW8Export.pO->Insert( static_cast(nBoxes0 * 10), m_rWW8Export.pO->Count() ); ->>>>>>> other -<<<<<<< local - if ( SFX_ITEM_ON == pFrmFmt->GetAttrSet().GetItemState( RES_BACKGROUND, false, &pI ) ) -======= for ( sal_uInt8 n = 0; n < nBoxes0; n++ ) ->>>>>>> other { -<<<<<<< local - aColor = dynamic_cast(pI)->GetColor(); -======= const SwTableBox * pBox1 = rTabBoxes[n]; const SwFrmFmt * pFrmFmt = pBox1->GetFrmFmt(); const SfxPoolItem * pI = NULL; Color aColor; - + if ( SFX_ITEM_ON == - pFrmFmt->GetAttrSet(). - GetItemState( RES_BACKGROUND, false, &pI ) ) + pFrmFmt->GetAttrSet(). + GetItemState( RES_BACKGROUND, false, &pI ) ) { aColor = dynamic_cast(pI)->GetColor(); } else aColor = COL_AUTO; - + WW8SHDLong aSHD; aSHD.setCvFore( 0xFF000000 ); - + sal_uInt32 nBgColor = aColor.GetColor(); if ( nBgColor == COL_AUTO ) aSHD.setCvBack( 0xFF000000 ); else aSHD.setCvBack( wwUtility::RGBToBGR( nBgColor ) ); - + aSHD.Write( m_rWW8Export ); ->>>>>>> other } -<<<<<<< local - else - aColor = COL_AUTO; - - WW8SHDLong aSHD; - aSHD.setCvFore( 0xFF000000 ); - - sal_uInt32 nBgColor = aColor.GetColor(); - if ( nBgColor == COL_AUTO ) - aSHD.setCvBack( 0xFF000000 ); - else - aSHD.setCvBack( wwUtility::RGBToBGR( nBgColor ) ); - - aSHD.Write( m_rWW8Export ); -======= ->>>>>>> other } } } @@ -2752,7 +2713,6 @@ void WW8Export::WriteFkpPlcUsw() // <-- { ::std::vector aStrings; - ::ww8::StringVector_t & aSttbStrings = pSttbfAssoc->getStrings(); ::ww8::StringVector_t::const_iterator aItEnd = aSttbStrings.end(); for (::ww8::StringVector_t::const_iterator aIt = aSttbStrings.begin(); @@ -2765,14 +2725,12 @@ void WW8Export::WriteFkpPlcUsw() WriteAsStringTable(aStrings, pFib->fcSttbfAssoc, pFib->lcbSttbfAssoc); } - } Strm().Seek( 0 ); // Reclaim stored FIB data from document. ::ww8::WW8FibData * pFibData = dynamic_cast (pDoc->getExternalData(::sw::FIB).get()); - // --> OD 2009-10-19 #i106057# if ( pFibData ) // <-- @@ -2784,6 +2742,7 @@ void WW8Export::WriteFkpPlcUsw() } pFib->Write( Strm() ); // FIB + } void WW8Export::StoreDoc1() @@ -3695,10 +3654,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer #endif TableRowEnd(pNodeInfoInner->getDepth()); -<<<<<<< local -======= ShortToSVBT16(0, nStyle); ->>>>>>> other m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style # TableInfoRow(pNodeInfoInner); m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(), -- cgit v1.2.3 From 1a8c5d1171488fa7829a44c318c14a26e0182473 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 7 Dec 2009 10:25:08 +0100 Subject: dtardon01: #i107466#: add missing includes in nonproduct build --- sw/source/filter/ww8/wrtw8nds.cxx | 4 ++++ sw/source/filter/ww8/wrtww8gr.cxx | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 7ef0640ed1..f656e2eec7 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -38,6 +38,10 @@ #include #include #include +#if OSL_DEBUG_LEVEL > 0 +# include +#endif + #include #include #include diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index ed3d1b3b7e..12a5d43140 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -33,6 +33,10 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */ +#if OSL_DEBUG_LEVEL > 0 +# include +#endif + #include #include #include -- cgit v1.2.3 From ea2f60a8d167bd4bbe19f16cb25e3145c0de1b03 Mon Sep 17 00:00:00 2001 From: Oliver Düsterhoff Date: Mon, 7 Dec 2009 13:59:17 +0000 Subject: #i107365# method - take care of transparent child windows after direct paint. --- sw/source/core/view/viewsh.cxx | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index c0a45fbb4e..6701b415a5 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -376,6 +376,37 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd ) // #i75172# end DrawingLayer paint DLPostPaint2(true); } + + // --> OD 2009-12-03 #i107365# + // Direct paint has been performed. Thus, take care of + // transparent child windows. + if ( GetWin() ) + { + Window& rWindow = *(GetWin()); + if(rWindow.IsChildTransparentModeEnabled() && rWindow.GetChildCount()) + { + const Rectangle aRectanglePixel(rWindow.LogicToPixel(aRect.SVRect())); + + for ( sal_uInt16 a(0); a < rWindow.GetChildCount(); a++ ) + { + Window* pCandidate = rWindow.GetChild(a); + + if ( pCandidate && pCandidate->IsPaintTransparent() ) + { + const Rectangle aCandidatePosSizePixel( + pCandidate->GetPosPixel(), + pCandidate->GetSizePixel()); + + if ( aCandidatePosSizePixel.IsOver(aRectanglePixel) ) + { + pCandidate->Invalidate( INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN ); + pCandidate->Update(); + } + } + } + } + } + // <-- } delete pVout; -- cgit v1.2.3 From 5abc942386c640b807af61eee4a985c35ffc4cbe Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 8 Dec 2009 15:18:29 +0100 Subject: some more fixes after resync --- sw/source/ui/vba/vbaaddins.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/vba/vbaaddins.cxx b/sw/source/ui/vba/vbaaddins.cxx index a450a1b6f2..351bda2830 100644 --- a/sw/source/ui/vba/vbaaddins.cxx +++ b/sw/source/ui/vba/vbaaddins.cxx @@ -30,7 +30,7 @@ #include "vbaaddins.hxx" #include "vbaaddin.hxx" #include -#include +#include #include #include -- cgit v1.2.3 From e3027071a205af3b4aa0961e7fcadcdb3b1c7bf9 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Tue, 8 Dec 2009 17:15:57 +0100 Subject: cbosdo02: #i33737# removing unused defines, moving remaining ones into vnd.oasis.opendocument namespace ---------------- cbosdo02: #i33737# renaming defines from ECMA to ODF ---------------- cbosdo02: #i33737# removing ecma namespace ---------------- cbosdo02: #i33737# removing ecma var ---------------- cbosdo02: #i33737# ecma -> odf ---------------- cbosdo02: #i33737# ecma -> odf HG: Enter commit message. Lines beginning with 'HG:' are removed. HG: Remove all lines to abort the collapse operation. --- sw/source/core/doc/docbm.cxx | 2 +- sw/source/core/edit/edtox.cxx | 2 +- sw/source/core/text/portxt.cxx | 20 ++++++++--------- sw/source/filter/ww8/wrtw8nds.cxx | 46 +++++++++++++++++++-------------------- sw/source/filter/ww8/wrtww8.cxx | 16 +++++++------- sw/source/filter/ww8/ww8par.hxx | 2 +- sw/source/filter/ww8/ww8par3.cxx | 16 +++++++------- sw/source/filter/ww8/ww8par5.cxx | 8 +++---- sw/source/ui/docvw/edtwin.cxx | 6 ++--- sw/source/ui/uiview/viewling.cxx | 6 ++--- 10 files changed, 62 insertions(+), 62 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index ca61b460b0..973b677351 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index 4f7df558e1..c2a3edcabe 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -61,7 +61,7 @@ #include #endif #include -#include +#include using namespace ::com::sun::star; diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 6662d0d704..424827c5cb 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -55,7 +55,7 @@ #include #include #include -#include +#include #if OSL_DEBUG_LEVEL > 1 const sal_Char *GetLangName( const MSHORT nLang ); @@ -784,18 +784,18 @@ sal_Bool SwFieldMarkPortion::Format( SwTxtFormatInfo & ) return ret; } -namespace ecma { +namespace { static sal_Int32 getCurrentListIndex( IFieldmark* pBM, ::rtl::OUString* io_pCurrentText = NULL ) { const IFieldmark::parameter_map_t* const pParameters = pBM->GetParameters(); sal_Int32 nCurrentIdx = 0; - const IFieldmark::parameter_map_t::const_iterator pResult = pParameters->find(::rtl::OUString::createFromAscii(ECMA_FORMDROPDOWN_RESULT)); + const IFieldmark::parameter_map_t::const_iterator pResult = pParameters->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_RESULT)); if(pResult != pParameters->end()) pResult->second >>= nCurrentIdx; if(io_pCurrentText) { - const IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ECMA_FORMDROPDOWN_LISTENTRY)); + const IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY)); if(pListEntries != pParameters->end()) { uno::Sequence< ::rtl::OUString > vListEntries; @@ -806,7 +806,7 @@ namespace ecma { } return nCurrentIdx; } -} /* ecma */ +} //FIXME Fieldbk void SwFieldFormPortion::Paint( const SwTxtPaintInfo& rInf ) const @@ -824,13 +824,13 @@ void SwFieldFormPortion::Paint( const SwTxtPaintInfo& rInf ) const if ( pBM != NULL ) { - if ( pBM->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ) ) + if ( pBM->GetFieldname( ).equalsAscii( ODF_FORMCHECKBOX ) ) { // a checkbox... ICheckboxFieldmark* pCheckboxFm = dynamic_cast< ICheckboxFieldmark* >(pBM); bool checked = pCheckboxFm->IsChecked(); rInf.DrawCheckBox(*this, checked); } - else if ( pBM->GetFieldname( ).equalsAscii( ECMA_FORMDROPDOWN ) ) + else if ( pBM->GetFieldname( ).equalsAscii( ODF_FORMDROPDOWN ) ) { // a list... rtl::OUString aTxt; rInf.DrawViewOpt( *this, POR_FLD ); @@ -854,16 +854,16 @@ sal_Bool SwFieldFormPortion::Format( SwTxtFormatInfo & rInf ) ASSERT( pBM != NULL, "Where is my form field bookmark???" ); if ( pBM != NULL ) { - if ( pBM->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ) ) + if ( pBM->GetFieldname( ).equalsAscii( ODF_FORMCHECKBOX ) ) { Width( rInf.GetTxtHeight( ) ); Height( rInf.GetTxtHeight( ) ); SetAscent( rInf.GetAscent( ) ); } - else if ( pBM->GetFieldname( ).equalsAscii( ECMA_FORMDROPDOWN ) ) + else if ( pBM->GetFieldname( ).equalsAscii( ODF_FORMDROPDOWN ) ) { ::rtl::OUString aTxt; - ecma::getCurrentListIndex( pBM, &aTxt ); + getCurrentListIndex( pBM, &aTxt ); SwPosSize aPosSize = rInf.GetTxtSize( aTxt ); Width( aPosSize.Width( ) ); Height( aPosSize.Height( ) ); diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index a154949402..1bc4336d7b 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -116,17 +116,17 @@ using namespace nsFieldFlags; static String lcl_getFieldCode( const IFieldmark* pFieldmark ) { ASSERT(pFieldmark!=NULL, "where is my fieldmark???"); - if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMTEXT ) ) { + if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMTEXT ) ) { return String::CreateFromAscii(" FORMTEXT "); - } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMDROPDOWN ) ) { + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMDROPDOWN ) ) { return String::CreateFromAscii(" FORMDROPDOWN "); - } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ) ) { + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMCHECKBOX ) ) { return String::CreateFromAscii(" FORMCHECKBOX "); - } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_TOC ) ) { + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_TOC ) ) { return String::CreateFromAscii(" TOC "); - } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_HYPERLINK ) ) { + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_HYPERLINK ) ) { return String::CreateFromAscii(" HYPERLINK "); - } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_PAGEREF ) ) { + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_PAGEREF ) ) { return String::CreateFromAscii(" PAGEREF "); } else { return pFieldmark->GetFieldname(); @@ -135,17 +135,17 @@ static String lcl_getFieldCode( const IFieldmark* pFieldmark ) { ww::eField lcl_getFieldId( const IFieldmark* pFieldmark ) { ASSERT(pFieldmark!=NULL, "where is my fieldmark???"); - if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMTEXT ) ) { + if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMTEXT ) ) { return ww::eFORMTEXT; - } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMDROPDOWN ) ) { + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMDROPDOWN ) ) { return ww::eFORMDROPDOWN; - } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ) ) { + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMCHECKBOX ) ) { return ww::eFORMCHECKBOX; - } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_TOC ) ) { + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_TOC ) ) { return ww::eTOC; - } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_HYPERLINK ) ) { + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_HYPERLINK ) ) { return ww::eHYPERLINK; - } else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_PAGEREF ) ) { + } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_PAGEREF ) ) { return ww::ePAGEREF; } else { return ww::eUNKNOWN; @@ -1753,12 +1753,12 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" ); - if ( pFieldmark->GetFieldname().equalsAscii( ECMA_FORMTEXT ) ) + if ( pFieldmark->GetFieldname().equalsAscii( ODF_FORMTEXT ) ) AppendBookmark( pFieldmark->GetName(), false ); OutputField( NULL, lcl_getFieldId( pFieldmark ), lcl_getFieldCode( pFieldmark ), WRITEFIELD_START | WRITEFIELD_CMD_START ); - if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMTEXT ) ) + if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMTEXT ) ) WriteFormData( *pFieldmark ); - else if ( pFieldmark->GetFieldname( ).equalsAscii( ECMA_HYPERLINK ) ) + else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_HYPERLINK ) ) WriteHyperlinkData( *pFieldmark ); OutputField( NULL, lcl_getFieldId( pFieldmark ), String(), WRITEFIELD_CMD_END ); } @@ -1769,7 +1769,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" ); OutputField( NULL, lcl_getFieldId( pFieldmark ), String(), WRITEFIELD_CLOSE ); - if ( pFieldmark->GetFieldname().equalsAscii( ECMA_FORMTEXT ) ) + if ( pFieldmark->GetFieldname().equalsAscii( ODF_FORMTEXT ) ) AppendBookmark( pFieldmark->GetName(), false ); } else if ( ch == CH_TXT_ATR_FORMELEMENT ) @@ -1778,18 +1778,18 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" ); - bool isEcma = pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMDROPDOWN ) || - pFieldmark->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ); + bool isDropdownOrCheckbox = pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMDROPDOWN ) || + pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMCHECKBOX ); - if ( isEcma ) + if ( isDropdownOrCheckbox ) AppendBookmark( pFieldmark->GetName(), 0 ); - OutputField( NULL, lcl_getFieldId( pFieldmark ), - lcl_getFieldCode( pFieldmark ), + OutputField( NULL, lcl_getFieldId( pFieldmark ), + lcl_getFieldCode( pFieldmark ), WRITEFIELD_START | WRITEFIELD_CMD_START ); - if ( isEcma ) + if ( isDropdownOrCheckbox ) WriteFormData( *pFieldmark ); OutputField( NULL, lcl_getFieldId( pFieldmark ), String(), WRITEFIELD_CLOSE ); - if ( isEcma ) + if ( isDropdownOrCheckbox ) AppendBookmark( pFieldmark->GetName(), false ); } nLen -= static_cast< USHORT >( ofs ); diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 4f0a16439f..927c8389fb 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -105,7 +105,7 @@ #include "ww8attributeoutput.hxx" #include -#include +#include #include #include @@ -3468,16 +3468,16 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) const ::sw::mark::ICheckboxFieldmark* pAsCheckbox = dynamic_cast< const ::sw::mark::ICheckboxFieldmark* >( pFieldmark ); - ASSERT(rFieldmark.GetFieldname().equalsAscii( ECMA_FORMTEXT ) || rFieldmark.GetFieldname().equalsAscii( ECMA_FORMDROPDOWN ) || rFieldmark.GetFieldname().equalsAscii( ECMA_FORMCHECKBOX ), "Unknown field type!!!"); - if ( ! ( rFieldmark.GetFieldname().equalsAscii( ECMA_FORMTEXT ) || - rFieldmark.GetFieldname().equalsAscii( ECMA_FORMDROPDOWN ) || - rFieldmark.GetFieldname().equalsAscii( ECMA_FORMCHECKBOX ) ) ) + ASSERT(rFieldmark.GetFieldname().equalsAscii( ODF_FORMTEXT ) || rFieldmark.GetFieldname().equalsAscii( ODF_FORMDROPDOWN ) || rFieldmark.GetFieldname().equalsAscii( ODF_FORMCHECKBOX ), "Unknown field type!!!"); + if ( ! ( rFieldmark.GetFieldname().equalsAscii( ODF_FORMTEXT ) || + rFieldmark.GetFieldname().equalsAscii( ODF_FORMDROPDOWN ) || + rFieldmark.GetFieldname().equalsAscii( ODF_FORMCHECKBOX ) ) ) return; int type = 0; // TextFieldmark if ( pAsCheckbox ) type = 1; - if ( rFieldmark.GetFieldname().equalsAscii( ECMA_FORMDROPDOWN ) ) + if ( rFieldmark.GetFieldname().equalsAscii( ODF_FORMDROPDOWN ) ) type=2; ::sw::mark::IFieldmark::parameter_map_t::const_iterator pNameParameter = rFieldmark.GetParameters()->find(::rtl::OUString::createFromAscii("name")); @@ -3514,7 +3514,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) ffres = 1; else if ( type == 2 ) { - ::sw::mark::IFieldmark::parameter_map_t::const_iterator pResParameter = rFieldmark.GetParameters()->find(::rtl::OUString::createFromAscii(ECMA_FORMDROPDOWN)); + ::sw::mark::IFieldmark::parameter_map_t::const_iterator pResParameter = rFieldmark.GetParameters()->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN)); if(pResParameter != rFieldmark.GetParameters()->end()) pResParameter->second >>= ffres; else @@ -3527,7 +3527,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) { aFldHeader[5] |= 0x80; // ffhaslistbox const ::sw::mark::IFieldmark::parameter_map_t* const pParameters = rFieldmark.GetParameters(); - ::sw::mark::IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ECMA_FORMDROPDOWN_LISTENTRY)); + ::sw::mark::IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY)); if(pListEntries != pParameters->end()) { uno::Sequence< ::rtl::OUString > vListEntries; diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index c1ce31d30d..837c35cd88 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -60,7 +60,7 @@ #include "ww8glsy.hxx" #include "wrtww8.hxx" #include "../inc/msfilter.hxx" -#include +#include #include class SwDoc; diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 526c033a0e..7558a60447 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -97,7 +97,7 @@ #include #include -#include +#include #include #include @@ -184,7 +184,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr ) if (aBookmarkName.Len()>0) { maFieldStack.back().SetBookmarkName(aBookmarkName); - maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ECMA_FORMTEXT)); + maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_FORMTEXT)); maFieldStack.back().getParameters()[::rtl::OUString::createFromAscii("Description")] = uno::makeAny(::rtl::OUString(aFormula.sToolTip)); maFieldStack.back().getParameters()[::rtl::OUString::createFromAscii("Name")] = uno::makeAny(::rtl::OUString(aFormula.sTitle)); } @@ -234,13 +234,13 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr ) IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( ); IFieldmark* pFieldmark = dynamic_cast( pMarksAccess->makeNoTextFieldBookmark( *pPaM, aBookmarkName, - rtl::OUString::createFromAscii( ECMA_FORMCHECKBOX ) ) ); + rtl::OUString::createFromAscii( ODF_FORMCHECKBOX ) ) ); ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?"); if (pFieldmark!=NULL) { IFieldmark::parameter_map_t* const pParameters = pFieldmark->GetParameters(); ICheckboxFieldmark* pCheckboxFm = dynamic_cast(pFieldmark); - (*pParameters)[::rtl::OUString::createFromAscii(ECMA_FORMCHECKBOX_NAME)] = uno::makeAny(::rtl::OUString(aFormula.sTitle)); - (*pParameters)[::rtl::OUString::createFromAscii(ECMA_FORMCHECKBOX_HELPTEXT)] = uno::makeAny(::rtl::OUString(aFormula.sToolTip)); + (*pParameters)[::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_NAME)] = uno::makeAny(::rtl::OUString(aFormula.sTitle)); + (*pParameters)[::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_HELPTEXT)] = uno::makeAny(::rtl::OUString(aFormula.sToolTip)); if(pCheckboxFm) pCheckboxFm->SetChecked(aFormula.nChecked); // set field data here... @@ -309,15 +309,15 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr) IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( ); IFieldmark *pFieldmark = dynamic_cast( pMarksAccess->makeNoTextFieldBookmark( *pPaM, aBookmarkName, - ::rtl::OUString::createFromAscii( ECMA_FORMDROPDOWN ) ) ); + ::rtl::OUString::createFromAscii( ODF_FORMDROPDOWN ) ) ); ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?"); if ( pFieldmark != NULL ) { uno::Sequence< ::rtl::OUString > vListEntries(aFormula.maListEntries.size()); copy(aFormula.maListEntries.begin(), aFormula.maListEntries.end(), ::comphelper::stl_begin(vListEntries)); - (*pFieldmark->GetParameters())[::rtl::OUString::createFromAscii(ECMA_FORMDROPDOWN_LISTENTRY)] = uno::makeAny(vListEntries); + (*pFieldmark->GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY)] = uno::makeAny(vListEntries); sal_Int32 nIndex = aFormula.fDropdownIndex < aFormula.maListEntries.size() ? aFormula.fDropdownIndex : 0; - (*pFieldmark->GetParameters())[::rtl::OUString::createFromAscii(ECMA_FORMDROPDOWN_RESULT)] = uno::makeAny(nIndex); + (*pFieldmark->GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_RESULT)] = uno::makeAny(nIndex); // set field data here... } } diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 36cbd94ff3..1443414447 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -698,7 +698,7 @@ sal_uInt16 SwWW8ImplReader::End_Field() SwPaM aFldPam( maFieldStack.back().GetPtNode(), maFieldStack.back().GetPtCntnt(), aEndPos.nNode, aEndPos.nContent.GetIndex()); IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( ); IFieldmark *pFieldmark = dynamic_cast( pMarksAccess->makeFieldBookmark( - aFldPam, maFieldStack.back().GetBookmarkName(), ::rtl::OUString::createFromAscii(ECMA_FORMTEXT ) ) ); + aFldPam, maFieldStack.back().GetBookmarkName(), ::rtl::OUString::createFromAscii(ODF_FORMTEXT ) ) ); ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?"); if (pFieldmark!=NULL) { const IFieldmark::parameter_map_t& pParametersToAdd = maFieldStack.back().getParameters(); @@ -2146,7 +2146,7 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, String& rStr ) if (1) { ::rtl::OUString aBookmarkName=::rtl::OUString::createFromAscii("_REF"); maFieldStack.back().SetBookmarkName(aBookmarkName); - maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ECMA_PAGEREF)); + maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_PAGEREF)); maFieldStack.back().AddParam(rtl::OUString(), sName); return FLD_TEXT; } @@ -2855,7 +2855,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr ) if (1) { ::rtl::OUString aBookmarkName=::rtl::OUString::createFromAscii("_TOC"); maFieldStack.back().SetBookmarkName(aBookmarkName); - maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ECMA_TOC)); + maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_TOC)); // maFieldStack.back().AddParam(::rtl::OUString::createFromAscii("Description"), aFormula.sToolTip); return FLD_TEXT; } @@ -3383,7 +3383,7 @@ eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, String& rStr ) if (1) { ::rtl::OUString aBookmarkName=::rtl::OUString::createFromAscii("_HYPERLINK"); maFieldStack.back().SetBookmarkName(aBookmarkName); - maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ECMA_HYPERLINK)); + maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_HYPERLINK)); // maFieldStack.back().AddParam(::rtl::OUString::createFromAscii("Description"), aFormula.sToolTip); return FLD_TEXT; } diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 0aae7c0f6f..08a37cf6e8 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -151,7 +151,7 @@ #include #include -#include +#include #include "PostItMgr.hxx" #include "postit.hxx" @@ -4218,13 +4218,13 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) IFieldmark *fieldBM = const_cast< IFieldmark* > ( aCntntAtPos.aFnd.pFldmark ); //SwDocShell* pDocSh = rView.GetDocShell(); //SwDoc *pDoc=pDocSh->GetDoc(); - if (fieldBM->GetFieldname( ).equalsAscii( ECMA_FORMCHECKBOX ) ) + if (fieldBM->GetFieldname( ).equalsAscii( ODF_FORMCHECKBOX ) ) { ICheckboxFieldmark* pCheckboxFm = dynamic_cast(fieldBM); pCheckboxFm->SetChecked(!pCheckboxFm->IsChecked()); pCheckboxFm->Invalidate(); rSh.InvalidateWindows( rView.GetVisArea() ); - } else if (fieldBM->GetFieldname().equalsAscii( ECMA_FORMDROPDOWN) ) { + } else if (fieldBM->GetFieldname().equalsAscii( ODF_FORMDROPDOWN) ) { rView.ExecFieldPopup( aDocPt, fieldBM ); fieldBM->Invalidate(); rSh.InvalidateWindows( rView.GetVisArea() ); diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index e917499c73..4abf331c49 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -115,7 +115,7 @@ #include #include -#include +#include #include @@ -982,7 +982,7 @@ public: assert(fieldBM!=NULL); if (fieldBM!=NULL) { const IFieldmark::parameter_map_t* const pParameters = fieldBM->GetParameters(); - IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ECMA_FORMDROPDOWN_LISTENTRY)); + IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY)); if(pListEntries != pParameters->end()) { Sequence< ::rtl::OUString> vListEntries; @@ -1064,7 +1064,7 @@ BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM ) /*short ret=*/aFldDlg.Execute(); int selection=aFldDlg.getSelection(); if (selection>=0) { - (*fieldBM->GetParameters())[::rtl::OUString::createFromAscii(ECMA_FORMDROPDOWN_RESULT)] = makeAny(selection); + (*fieldBM->GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_RESULT)] = makeAny(selection); } pWrtShell->Pop( sal_False ); -- cgit v1.2.3 From 1ddcad855b579765d873ac920d2866c9d11bb4df Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 9 Dec 2009 10:11:48 +0100 Subject: autorecovery: substituted some more usages of SfxViewFrame::CreateViewFrame with their new equivalents --- sw/source/ui/app/appenv.cxx | 2 +- sw/source/ui/dbui/dbmgr.cxx | 14 +++++++------- sw/source/ui/dbui/mmoutputpage.cxx | 4 ++-- sw/source/ui/misc/glshell.cxx | 2 +- sw/source/ui/uno/unomailmerge.cxx | 2 +- sw/source/ui/uno/unotxdoc.cxx | 4 ++-- sw/source/ui/uno/unotxvw.cxx | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx index e300e0d322..934bc95249 100644 --- a/sw/source/ui/app/appenv.cxx +++ b/sw/source/ui/app/appenv.cxx @@ -210,7 +210,7 @@ static USHORT nTitleNo = 0; // Neues Dokument erzeugen (kein Show!) SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xDocSh->DoInitNew( 0 ); - pFrame = SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE ); + pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); pNewView = (SwView*) pFrame->GetViewShell(); pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird. pSh = pNewView->GetWrtShellPtr(); diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index ef1bc3375c..1116648198 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1327,7 +1327,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, // create a target docshell to put the merged document into xTargetDocShell = new SwDocShell( SFX_CREATE_MODE_STANDARD ); xTargetDocShell->DoInitNew( 0 ); - SfxViewFrame* pTargetFrame = SfxViewFrame::CreateViewFrame( *xTargetDocShell, 0, TRUE ); + SfxViewFrame* pTargetFrame = SfxViewFrame::LoadHiddenDocument( *xTargetDocShell, 0 ); SwView* pTargetView = static_cast( pTargetFrame->GetViewShell() ); @@ -1447,7 +1447,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, if (xWorkDocSh->DoLoad(pWorkMed)) { //create a view frame for the document - SfxViewFrame* pWorkFrame = SfxViewFrame::CreateViewFrame( *xWorkDocSh, 0, TRUE ); + SfxViewFrame* pWorkFrame = SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 ); //request the layout calculation SwWrtShell& rWorkShell = static_cast< SwView* >(pWorkFrame->GetViewShell())->GetWrtShell(); @@ -2892,7 +2892,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, pWorkMed->SetFilter( pSfxFlt ); if( xWorkDocSh->DoLoad(pWorkMed) ) { - SfxViewFrame *pFrame = SfxViewFrame::CreateViewFrame( *xWorkDocSh, 0, TRUE ); + SfxViewFrame *pFrame = SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 ); SwView *pView = (SwView*) pFrame->GetViewShell(); pView->AttrChangedNotify( &pView->GetWrtShell() );//Damit SelectShell gerufen wird. //set the current DBMgr @@ -3183,7 +3183,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, // create a target docshell to put the merged document into SfxObjectShellRef xTargetDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTargetDocShell->DoInitNew( 0 ); - SfxViewFrame* pTargetFrame = SfxViewFrame::CreateViewFrame( *xTargetDocShell, 0, TRUE ); + SfxViewFrame* pTargetFrame = SfxViewFrame::LoadHiddenDocument( *xTargetDocShell, 0 ); //the created window has to be located at the same position as the source window Window& rTargetWindow = pTargetFrame->GetFrame()->GetWindow(); @@ -3244,7 +3244,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, xWorkDocSh->DoInitNew(); } //create a ViewFrame - SwView* pWorkView = static_cast< SwView* >( SfxViewFrame::CreateViewFrame( *xWorkDocSh, 0, sal_True )->GetViewShell() ); + SwView* pWorkView = static_cast< SwView* >( SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 )->GetViewShell() ); SwWrtShell& rWorkShell = pWorkView->GetWrtShell(); pWorkView->AttrChangedNotify( &rWorkShell );//Damit SelectShell gerufen wird. @@ -3255,8 +3255,8 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, pWorkDoc->EmbedAllLinks(); if(UNDO_UI_DELETE_INVISIBLECNTNT == rWorkShell.GetUndoIds()) rWorkShell.Undo(); - // #i69485# lock fields to prevent access to the result set while calculating layout - rWorkShell.LockExpFlds(); + // #i69485# lock fields to prevent access to the result set while calculating layout + rWorkShell.LockExpFlds(); // create a layout rWorkShell.CalcLayout(); rWorkShell.UnlockExpFlds(); diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index eb1f75d579..cf13e09115 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -858,7 +858,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) //now extract a document from the target document SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTempDocShell->DoInitNew( 0 ); - SfxViewFrame* pTempFrame = SfxViewFrame::CreateViewFrame( *xTempDocShell, 0, TRUE ); + SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); // pTempFrame->GetFrame()->Appear(); SwView* pTempView = static_cast( pTempFrame->GetViewShell() ); pTargetView->GetWrtShell().StartAction(); @@ -1244,7 +1244,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) //now extract a document from the target document SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTempDocShell->DoInitNew( 0 ); - SfxViewFrame* pTempFrame = SfxViewFrame::CreateViewFrame( *xTempDocShell, 0, TRUE ); + SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); // pTempFrame->GetFrame()->Appear(); SwView* pTempView = static_cast( pTempFrame->GetViewShell() ); pTargetView->GetWrtShell().StartAction(); diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx index 4156650fdc..4575a7ecc2 100644 --- a/sw/source/ui/misc/glshell.cxx +++ b/sw/source/ui/misc/glshell.cxx @@ -309,7 +309,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS } // Dokumenttitel setzen - SfxViewFrame* pFrame = SfxViewFrame::CreateViewFrame( *xDocSh, nViewId, !bShow ); + SfxViewFrame* pFrame = bShow ? SfxViewFrame::LoadDocument( *xDocSh, nViewId ) : SfxViewFrame::LoadHiddenDocument( *xDocSh, nViewId ); String aDocTitle(SW_RES( STR_GLOSSARY )); aDocTitle += ' '; aDocTitle += sLongName; diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index b0be5b2368..085f1c29fc 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -429,7 +429,7 @@ SwXMailMerge::SwXMailMerge() : SwDocShell *pDocShell = new SwDocShell( SFX_CREATE_MODE_STANDARD ); xDocSh = pDocShell; xDocSh->DoInitNew( 0 ); - SfxViewFrame *pFrame = SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE ); + SfxViewFrame *pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); SwView *pView = (SwView*) pFrame->GetViewShell(); pView->AttrChangedNotify( &pView->GetWrtShell() );//Damit SelectShell gerufen wird. diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index d195e83ab1..9b0c9689b6 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -1194,7 +1194,7 @@ void SwXTextDocument::printPages(const Sequence< beans::PropertyValue >& xOption ::vos::OGuard aGuard(Application::GetSolarMutex()); if(IsValid()) { - SfxViewFrame* pFrame = SfxViewFrame::CreateViewFrame( *pDocShell, 7, sal_True ); + SfxViewFrame* pFrame = SfxViewFrame::LoadHiddenDocument( *pDocShell, 7 ); SfxRequest aReq(FN_PRINT_PAGEPREVIEW, SFX_CALLMODE_SYNCHRON, pDocShell->GetDoc()->GetAttrPool()); aReq.AppendItem(SfxBoolItem(FN_PRINT_PAGEPREVIEW, sal_True)); @@ -2619,7 +2619,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( if( !pWrtShell ) { //create a hidden view to be able to export as PDF also in print preview - m_pHiddenViewFrame = SfxViewFrame::CreateViewFrame( *pRenderDocShell, 2, TRUE ); + m_pHiddenViewFrame = SfxViewFrame::LoadHiddenDocument( *pRenderDocShell, 2 ); SwView* pSwView = (SwView*) m_pHiddenViewFrame->GetViewShell(); pWrtShell = pSwView->GetWrtShellPtr(); } diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index de8bcd61ee..c9ca789634 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -930,7 +930,7 @@ SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ SfxObjectShellRef xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) ); xDocSh->DoInitNew( 0 ); pOldSh->FillPrtDoc(pDocSh->GetDoc(), pPrt); - SfxViewFrame* pDocFrame = SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE ); + SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); SwView* pDocView = (SwView*) pDocFrame->GetViewShell(); pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//Damit SelectShell gerufen wird. SwWrtShell* pSh = pDocView->GetWrtShellPtr(); -- cgit v1.2.3 From c64b5129ca638fa4eadd628201972fd31bcf4b16 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 10 Dec 2009 18:09:38 +0100 Subject: #i107450#: remove SdrObject dependency from OutlinerForwarder; EditEnginePool for ItempropertySet of EditObjects; split unoprov.hxx+cxx --- sw/source/core/fields/textapi.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/fields/textapi.cxx b/sw/source/core/fields/textapi.cxx index ff794a0b6b..287dc5a051 100755 --- a/sw/source/core/fields/textapi.cxx +++ b/sw/source/core/fields/textapi.cxx @@ -57,7 +57,7 @@ static const SvxItemPropertySet* ImplGetSvxTextPortionPropertySet() {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {0,0,0,0,0,0} }; - static SvxItemPropertySet aSvxTextPortionPropertySet( aSvxTextPortionPropertyMap ); + static SvxItemPropertySet aSvxTextPortionPropertySet( aSvxTextPortionPropertyMap, EditEngine::GetGlobalItemPool() ); return &aSvxTextPortionPropertySet; } -- cgit v1.2.3 From 2985a108121bbc95634bb2b8aa8f953b0c0b1407 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 10 Dec 2009 18:36:58 +0100 Subject: #i107450#: move GetLanguageString to class SvtLanguageTable --- sw/source/ui/uiview/viewling.cxx | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index 92a6cc8fcb..1ae9f90c76 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -61,16 +61,10 @@ #include #include // fuer SpellPointer #include -#ifndef _VIEW_HXX #include -#endif #include -#ifndef _BASESH_HXX #include -#endif -#ifndef _DOCSH_HXX #include // CheckSpellChanges -#endif #include // Viewoptions #include // fuer Undo-Ids #include // Trennung @@ -80,18 +74,10 @@ #include #include -#ifndef _CMDID_H #include -#endif -#ifndef _GLOBALS_HRC #include -#endif -#ifndef _COMCORE_HRC #include // STR_MULT_INTERACT_SPELL_WARN -#endif -#ifndef _VIEW_HRC #include -#endif #include #include @@ -112,7 +98,7 @@ #include #include "stmenu.hxx" // PopupMenu for smarttags #include - +#include #include #include @@ -418,7 +404,7 @@ IMPL_LINK( SwView, SpellError, LanguageType *, pLang ) while( pWrtShell->ActionPend() ); } LanguageType eLang = pLang ? *pLang : LANGUAGE_NONE; - String aErr(::GetLanguageString( eLang ) ); + String aErr(SvtLanguageTable::GetLanguageString( eLang ) ); SwEditWin &rEditWin = GetEditWin(); #if OSL_DEBUG_LEVEL > 1 -- cgit v1.2.3 From 0f49dd1c9fc65d81d8c5389b374097e2061c0adb Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 10 Dec 2009 19:12:58 +0100 Subject: #i107450#: move ThesaurusDialog and HyphenWordDialog to cui --- sw/source/ui/uiview/viewling.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index 1ae9f90c76..e8002bf6e8 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -55,7 +55,7 @@ #include #include #include -#include +#include #include #include #include @@ -600,7 +600,7 @@ void SwView::StartThesaurus() pWrtShell->GetSelTxt() : pWrtShell->GetCurWord(); Reference< XThesaurus > xThes( ::GetThesaurus() ); - SvxThesaurusDialog *pDlg = NULL; + AbstractThesaurusDialog *pDlg = NULL; if ( !xThes.is() || !xThes->hasLocale( SvxCreateLocale( eLang ) ) ) { @@ -611,7 +611,8 @@ void SwView::StartThesaurus() // create dialog { //Scope for SwWait-Object SwWait aWait( *GetDocShell(), sal_True ); - pDlg = new SvxThesaurusDialog( &GetEditWin(), + SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); + pDlg = pFact->CreateThesaurusDialog( &GetEditWin(), xThes, aTmp, eLang ); } @@ -637,12 +638,12 @@ void SwView::StartThesaurus() else aWinTop.Y() = aBtmPos.Y(); - Size aSz = pDlg->GetSizePixel(); + Size aSz = pDlg->GetWindow()->GetSizePixel(); if ( aWinBtm.Y() - aWinTop.Y() > aSz.Height() ) { aWinTop.X() = ( aWinTop.X() + aWinBtm.X() - aSz.Width() ) / 2; aWinTop.Y() = ( aWinTop.Y() + aWinBtm.Y() - aSz.Height() ) / 2; - pDlg->SetPosPixel( aWinTop ); + pDlg->GetWindow()->SetPosPixel( aWinTop ); } } -- cgit v1.2.3 From 09bbacfb2b0fc65e5760f3d10dad20cc6f902b98 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 10 Dec 2009 23:06:35 +0100 Subject: #i107450#: move SvxSearchIten to svl --- sw/source/ui/app/apphdl.cxx | 2 +- sw/source/ui/app/docsh.cxx | 2 +- sw/source/ui/dbui/mmmergepage.cxx | 2 +- sw/source/ui/docvw/PostItMgr.cxx | 2 +- sw/source/ui/misc/glshell.cxx | 2 +- sw/source/ui/shells/basesh.cxx | 2 +- sw/source/ui/shells/beziersh.cxx | 2 +- sw/source/ui/shells/drawsh.cxx | 2 +- sw/source/ui/shells/drformsh.cxx | 2 +- sw/source/ui/shells/drwbassh.cxx | 2 +- sw/source/ui/shells/frmsh.cxx | 2 +- sw/source/ui/shells/grfsh.cxx | 2 +- sw/source/ui/shells/listsh.cxx | 2 +- sw/source/ui/shells/mediash.cxx | 2 +- sw/source/ui/shells/slotadd.cxx | 2 +- sw/source/ui/shells/tabsh.cxx | 2 +- sw/source/ui/shells/textsh.cxx | 2 +- sw/source/ui/uiview/pview.cxx | 2 +- sw/source/ui/uiview/srcview.cxx | 2 +- sw/source/ui/uiview/view0.cxx | 2 +- sw/source/ui/uiview/viewmdi.cxx | 2 +- sw/source/ui/uiview/viewsrch.cxx | 2 +- sw/source/ui/web/wdocsh.cxx | 2 +- sw/source/ui/web/wformsh.cxx | 2 +- sw/source/ui/web/wfrmsh.cxx | 2 +- sw/source/ui/web/wgrfsh.cxx | 2 +- sw/source/ui/web/wlistsh.cxx | 2 +- sw/source/ui/web/wolesh.cxx | 2 +- sw/source/ui/web/wtabsh.cxx | 2 +- sw/source/ui/web/wtextsh.cxx | 2 +- sw/source/ui/web/wview.cxx | 2 +- 31 files changed, 31 insertions(+), 31 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index c9ca781e7c..94bd82f24e 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index 8cb2cdb66c..e3a3426a3c 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/dbui/mmmergepage.cxx b/sw/source/ui/dbui/mmmergepage.cxx index a8a0f48c27..0b16d5ae28 100644 --- a/sw/source/ui/dbui/mmmergepage.cxx +++ b/sw/source/ui/dbui/mmmergepage.cxx @@ -42,7 +42,7 @@ #endif #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 17673cd387..ceaba698f6 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -67,7 +67,7 @@ #include #include -#include +#include #include diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx index f213ebe967..0cbb7cdc7d 100644 --- a/sw/source/ui/misc/glshell.cxx +++ b/sw/source/ui/misc/glshell.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 993772ad76..41ce780ed1 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -63,7 +63,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/beziersh.cxx b/sw/source/ui/shells/beziersh.cxx index c370ebdfbe..a0b7f087ed 100644 --- a/sw/source/ui/shells/beziersh.cxx +++ b/sw/source/ui/shells/beziersh.cxx @@ -34,7 +34,7 @@ #include "cmdid.h" #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx index cd2c4c6a17..688ccbc4c0 100644 --- a/sw/source/ui/shells/drawsh.cxx +++ b/sw/source/ui/shells/drawsh.cxx @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/drformsh.cxx b/sw/source/ui/shells/drformsh.cxx index 6ec599bc6d..0d2d36eb13 100644 --- a/sw/source/ui/shells/drformsh.cxx +++ b/sw/source/ui/shells/drformsh.cxx @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx index 2b5aa3db2a..e7da5ec681 100644 --- a/sw/source/ui/shells/drwbassh.cxx +++ b/sw/source/ui/shells/drwbassh.cxx @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 06f5231665..494765b9e9 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx index b820b319a5..91af49e3e4 100644 --- a/sw/source/ui/shells/grfsh.cxx +++ b/sw/source/ui/shells/grfsh.cxx @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/listsh.cxx b/sw/source/ui/shells/listsh.cxx index c5190449dd..9a32de7f41 100644 --- a/sw/source/ui/shells/listsh.cxx +++ b/sw/source/ui/shells/listsh.cxx @@ -46,7 +46,7 @@ #include #include #include -#include +#include // --> FME 2005-01-04 #i35572# #include diff --git a/sw/source/ui/shells/mediash.cxx b/sw/source/ui/shells/mediash.cxx index 3688b33269..3f4235fd34 100644 --- a/sw/source/ui/shells/mediash.cxx +++ b/sw/source/ui/shells/mediash.cxx @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/slotadd.cxx b/sw/source/ui/shells/slotadd.cxx index 6668f61d12..c41571aa19 100644 --- a/sw/source/ui/shells/slotadd.cxx +++ b/sw/source/ui/shells/slotadd.cxx @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx index 0ce16da163..e792398a3c 100644 --- a/sw/source/ui/shells/tabsh.cxx +++ b/sw/source/ui/shells/tabsh.cxx @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 79bc6334e3..21337fbc44 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index f55f2cf637..e85be040b7 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index 07cfce2d2e..b2737dc3b6 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -65,7 +65,7 @@ #include #include #include -#include +#include #include #include #include "svx/unolingu.hxx" diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx index bf8bf5a2b6..c0f23314a3 100644 --- a/sw/source/ui/uiview/view0.cxx +++ b/sw/source/ui/uiview/view0.cxx @@ -36,7 +36,7 @@ #include "hintids.hxx" #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx index 7fdf5789ad..0de9b8a2cd 100644 --- a/sw/source/ui/uiview/viewmdi.cxx +++ b/sw/source/ui/uiview/viewmdi.cxx @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #ifndef _VIEW_HXX diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx index 85c965ee65..57b206d449 100644 --- a/sw/source/ui/uiview/viewsrch.cxx +++ b/sw/source/ui/uiview/viewsrch.cxx @@ -46,7 +46,7 @@ #endif #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/web/wdocsh.cxx b/sw/source/ui/web/wdocsh.cxx index 1615188977..47b9e4b3fd 100644 --- a/sw/source/ui/web/wdocsh.cxx +++ b/sw/source/ui/web/wdocsh.cxx @@ -34,7 +34,7 @@ -#include +#include #include #ifndef _SVX_SVXIDS_HRC //autogen #include diff --git a/sw/source/ui/web/wformsh.cxx b/sw/source/ui/web/wformsh.cxx index 82a2e6a7e2..3debbdb08f 100644 --- a/sw/source/ui/web/wformsh.cxx +++ b/sw/source/ui/web/wformsh.cxx @@ -38,7 +38,7 @@ #ifndef _SVX_SVXIDS_HRC #include #endif -#include +#include #include #include #include diff --git a/sw/source/ui/web/wfrmsh.cxx b/sw/source/ui/web/wfrmsh.cxx index c1fe63132f..4f6d9bd5bf 100644 --- a/sw/source/ui/web/wfrmsh.cxx +++ b/sw/source/ui/web/wfrmsh.cxx @@ -36,7 +36,7 @@ #include "hintids.hxx" #include #include -#include //*** +#include //*** #include "swtypes.hxx" #include "cmdid.h" diff --git a/sw/source/ui/web/wgrfsh.cxx b/sw/source/ui/web/wgrfsh.cxx index 19f0b6f544..8f95a890ed 100644 --- a/sw/source/ui/web/wgrfsh.cxx +++ b/sw/source/ui/web/wgrfsh.cxx @@ -33,7 +33,7 @@ #include -#include +#include #include #include diff --git a/sw/source/ui/web/wlistsh.cxx b/sw/source/ui/web/wlistsh.cxx index 754ab85ff5..606f0be1b6 100644 --- a/sw/source/ui/web/wlistsh.cxx +++ b/sw/source/ui/web/wlistsh.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include "cmdid.h" diff --git a/sw/source/ui/web/wolesh.cxx b/sw/source/ui/web/wolesh.cxx index cc5bdb73d8..96eb3293fe 100644 --- a/sw/source/ui/web/wolesh.cxx +++ b/sw/source/ui/web/wolesh.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include "wrtsh.hxx" #include "view.hxx" diff --git a/sw/source/ui/web/wtabsh.cxx b/sw/source/ui/web/wtabsh.cxx index 5576216dd6..2b92a7f4cb 100644 --- a/sw/source/ui/web/wtabsh.cxx +++ b/sw/source/ui/web/wtabsh.cxx @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include "cmdid.h" diff --git a/sw/source/ui/web/wtextsh.cxx b/sw/source/ui/web/wtextsh.cxx index f380ee6f3f..ef11d2f192 100644 --- a/sw/source/ui/web/wtextsh.cxx +++ b/sw/source/ui/web/wtextsh.cxx @@ -36,7 +36,7 @@ #include "hintids.hxx" #include #include -#include //*** +#include //*** #include #ifndef _SVX_SVXIDS_HRC //autogen #include diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx index e86558c2ad..c5eea6727c 100644 --- a/sw/source/ui/web/wview.cxx +++ b/sw/source/ui/web/wview.cxx @@ -33,7 +33,7 @@ #include -#include +#include #include #include #include -- cgit v1.2.3 From 4c5330937056063f2e6d3de0e1f73e983edaa0c5 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 10 Dec 2009 23:58:52 +0100 Subject: SvxBrushItem does not use sfx code anymore --- sw/source/core/layout/paintfrm.cxx | 10 ++++------ sw/source/core/text/porfld.cxx | 5 ++--- sw/source/ui/docvw/romenu.cxx | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 06f3f34f60..64abb6fd58 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1639,8 +1639,7 @@ void lcl_DrawGraphic( const SvxBrushItem& rBrush, OutputDevice *pOut, //Hier kein Link, wir wollen die Grafik synchron laden! ((SvxBrushItem&)rBrush).SetDoneLink( Link() ); - GraphicObject *pGrf = (GraphicObject*)rBrush.GetGraphicObject( - GETOBJSHELL() ); + GraphicObject *pGrf = (GraphicObject*)rBrush.GetGraphicObject(); /// OD 17.10.2002 #103876# - outsourcing drawing of background with a background color. ::lcl_DrawGraphicBackgrd( rBrush, pOut, aAlignedGrfRect, *pGrf, bGrfNum, bBackgrdAlreadyDrawn ); @@ -1687,7 +1686,7 @@ void MA_FASTCALL DrawGraphic( const SvxBrushItem *pBrush, ((SvxBrushItem*)pBrush)->SetDoneLink( STATIC_LINK( rSh.GetDoc(), SwDoc, BackgroundDone ) ); SfxObjectShell &rObjSh = *GETOBJSHELL(); - const Graphic* pGrf = pBrush->GetGraphic( &rObjSh ); + const Graphic* pGrf = pBrush->GetGraphic(); if( pGrf && GRAPHIC_NONE != pGrf->GetType() ) { ePos = pBrush->GetGraphicPos(); @@ -1767,7 +1766,7 @@ void MA_FASTCALL DrawGraphic( const SvxBrushItem *pBrush, // OD 17.10.2002 #103876# - draw background of tiled graphic // before drawing tiled graphic in loop // determine graphic object - GraphicObject* pGraphicObj = const_cast< GraphicObject* >(pBrush->GetGraphicObject( GETOBJSHELL() )); + GraphicObject* pGraphicObj = const_cast< GraphicObject* >(pBrush->GetGraphicObject()); // calculate aligned paint rectangle SwRect aAlignedPaintRect = rOut; ::SwAlignRect( aAlignedPaintRect, &rSh ); @@ -1857,8 +1856,7 @@ void MA_FASTCALL DrawGraphic( const SvxBrushItem *pBrush, (ePos != GPOS_TILED) && (ePos != GPOS_AREA) ) { - GraphicObject *pGrf = (GraphicObject*)pBrush->GetGraphicObject( - GETOBJSHELL() ); + GraphicObject *pGrf = (GraphicObject*)pBrush->GetGraphicObject(); if ( bConsiderBackgroundTransparency ) { GraphicAttr pGrfAttr = pGrf->GetAttr(); diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 913ca9e393..ee7c20ab40 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -828,7 +828,7 @@ SwBulletPortion::SwBulletPortion( const xub_Unicode cBullet, // --> OD 2008-01-23 #newlistlevelattrs# SwGrfNumPortion::SwGrfNumPortion( - SwFrm *pFrm, + SwFrm*, const XubString& rGraphicFollowedBy, const SvxBrushItem* pGrfBrush, const SwFmtVertOrient* pGrfOrient, const Size& rGrfSize, @@ -845,8 +845,7 @@ SwGrfNumPortion::SwGrfNumPortion( if( pGrfBrush ) { *pBrush = *pGrfBrush; - SwDocShell *pSh = pFrm->GetShell()->GetDoc()->GetDocShell(); - const Graphic* pGraph = pGrfBrush->GetGraphic( pSh ); + const Graphic* pGraph = pGrfBrush->GetGraphic(); if( pGraph ) SetAnimated( pGraph->IsAnimated() ); else diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx index 8d8451188f..5c1f9a015d 100644 --- a/sw/source/ui/docvw/romenu.cxx +++ b/sw/source/ui/docvw/romenu.cxx @@ -408,7 +408,7 @@ String SwReadOnlyPopup::SaveGraphic( USHORT nId ) if ( pItem->GetGraphicLink() ) sGrfName = *pItem->GetGraphicLink(); ((SvxBrushItem*)pItem)->SetDoneLink( Link() ); - const Graphic *pGrf = pItem->GetGraphic( rView.GetDocShell() ); + const Graphic *pGrf = pItem->GetGraphic(); if ( pGrf ) { aGraphic = *pGrf; -- cgit v1.2.3 From 9d0e488e07b35c9774ff8b6d2c24b8d2513fbae5 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 11 Dec 2009 16:20:25 +0100 Subject: cbosdo02: #i33737# odf export ---------------- cbosdo02: #i33737# odf export ---------------- cbosdo02: #i33737# odf import ---------------- cbosdo02: #i33737# fixing uno sequence for field parameters HG: Enter commit message. Lines beginning with 'HG:' are removed. HG: Remove all lines to abort the collapse operation. --- sw/source/core/crsr/bookmrk.cxx | 16 +++++++++++++--- sw/source/core/inc/bookmrk.hxx | 11 ----------- sw/source/core/text/inftxt.cxx | 8 ++++---- sw/source/core/unocore/unobkm.cxx | 6 ++---- sw/source/filter/ww8/wrtw8nds.cxx | 3 ++- 5 files changed, 21 insertions(+), 23 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index df7b52b6be..dd467185a9 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -44,11 +44,13 @@ #include #include #include +#include SV_IMPL_REF( SwServerObject ) using namespace ::sw::mark; +using namespace ::com::sun::star::uno; namespace { @@ -329,10 +331,18 @@ namespace sw { namespace mark // want this for checkboxes this->GetMarkEnd( ).nContent--; } - void CheckboxFieldmark::SetChecked(bool checked) - { m_isChecked = checked; } + { + (*GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_RESULT)] = makeAny(checked); + } bool CheckboxFieldmark::IsChecked() const - { return m_isChecked; } + { + bool bResult = false; + parameter_map_t::const_iterator pResult = GetParameters()->find(::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_RESULT)); + if(pResult != GetParameters()->end()) + pResult->second >>= bResult; + return bResult; + } + }} diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx index f42d82ee09..7f4256daf8 100644 --- a/sw/source/core/inc/bookmrk.hxx +++ b/sw/source/core/inc/bookmrk.hxx @@ -109,7 +109,6 @@ namespace sw { namespace mark class NavigatorReminder : public MarkBase - , virtual public IMark { public: NavigatorReminder(const SwPaM& rPaM); @@ -213,8 +212,6 @@ namespace sw { namespace mark virtual void Invalidate(); virtual rtl::OUString ToString() const; private: - //int fftype; // Type: 0 = Text, 1 = Check Box, 2 = List - //bool ffprot; ::rtl::OUString m_aFieldname; ::rtl::OUString m_aFieldHelptext; IFieldmark::parameter_map_t m_vParams; @@ -228,9 +225,6 @@ namespace sw { namespace mark public: TextFieldmark(const SwPaM& rPaM); virtual void InitDoc(SwDoc* const io_pDoc); - private: - //int fftypetxt; // Type of text field: 0 = Regular text, 1 = Number, 2 = Date, 3 = Current date, 4 = Current time, 5 = Calculation - //int ffmaxlen; // Number of characters for text field. Zero means unlimited. }; class CheckboxFieldmark @@ -242,11 +236,6 @@ namespace sw { namespace mark virtual void InitDoc(SwDoc* const io_pDoc); bool IsChecked() const; void SetChecked(bool checked); - private: - bool m_isChecked; - //bool ffsize; // 0 = Auto, 1=Exact (see ffhps) - //bool ffrecalc; - //int ffhps; // Check box size (half-point sizes). }; }} diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index bb7dddc7a7..7f4ab2f106 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1225,18 +1225,18 @@ void SwTxtPaintInfo::_DrawBackBrush( const SwLinePortion &rPor ) const if(pFieldmark) { OSL_TRACE("Found Fieldmark"); #if DEBUG - rtl::OUString str = pFieldmark->toString( ); + rtl::OUString str = pFieldmark->ToString( ); fprintf( stderr, "%s\n", rtl::OUStringToOString( str, RTL_TEXTENCODING_UTF8 ).getStr( ) ); #endif } if(bIsStartMark) OSL_TRACE("Found StartMark"); - if (OnWin() && (pFieldmark!=NULL || bIsStartMark) && - SwViewOption::IsFieldShadings() && + if (OnWin() && (pFieldmark!=NULL || bIsStartMark) && + SwViewOption::IsFieldShadings() && !GetOpt().IsPagePreview()) { OutputDevice* pOutDev = (OutputDevice*)GetOut(); pOutDev->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); - pOutDev->SetFillColor( SwViewOption::GetFieldShadingsColor() ); + pOutDev->SetFillColor( SwViewOption::GetFieldShadingsColor() ); pOutDev->SetLineColor( ); pOutDev->DrawRect( aIntersect.SVRect() ); pOutDev->Pop(); diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index 7b22307103..e34d15ad88 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -361,8 +361,6 @@ void SwXFieldmarkParameters::insertByName(const OUString& aName, const Any& aEle IFieldmark::parameter_map_t* pParameters = getCoreParameters(); if(pParameters->find(aName) != pParameters->end()) throw ElementExistException(); - if(aElement.getValueType() != getElementType()) - throw IllegalArgumentException(); (*pParameters)[aName] = aElement; } @@ -393,7 +391,7 @@ Any SwXFieldmarkParameters::getByName(const OUString& aName) IFieldmark::parameter_map_t::iterator pEntry = pParameters->find(aName); if(pEntry == pParameters->end()) throw NoSuchElementException(); - return makeAny(pEntry->second); + return pEntry->second; } Sequence SwXFieldmarkParameters::getElementNames() @@ -419,7 +417,7 @@ Sequence SwXFieldmarkParameters::getElementNames() Type SwXFieldmarkParameters::getElementType() throw (RuntimeException) { - return ::cppu::UnoType::get(); + return ::cppu::UnoType< ::cppu::UnoVoidType>::get(); } ::sal_Bool SwXFieldmarkParameters::hasElements() diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 1bc4336d7b..ebb98cb1ec 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -106,6 +106,7 @@ #include #include + using namespace ::com::sun::star; using namespace ::com::sun::star::i18n; using namespace sw::util; @@ -149,7 +150,7 @@ ww::eField lcl_getFieldId( const IFieldmark* pFieldmark ) { return ww::ePAGEREF; } else { return ww::eUNKNOWN; - } + } } /* */ -- cgit v1.2.3 From 66eae5174f1ef2ea7f8df9aae122faf8e9886059 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 11 Dec 2009 19:06:46 +0100 Subject: cbosdo02: #i33737# formatting --- sw/inc/crsrsh.hxx | 130 +++++++++++++++++++------------------- sw/source/core/crsr/pam.cxx | 106 +++++++++++++++---------------- sw/source/core/unocore/unobkm.cxx | 2 +- sw/source/filter/ww8/ww8par3.cxx | 12 ---- 4 files changed, 119 insertions(+), 131 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 157b404cfd..2b3e63f56f 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -34,13 +34,13 @@ #include #include #include "swdllapi.h" -#include // fuer SWPOSDOC -#include // fuer ViewShell -#include // fuer SwClient -#include // fuer die CursorShell Typen -#include // fuer die CursorMove-Staties -#include // SwTOXSearchDir -#include //SwTblSearchType +#include // fuer SWPOSDOC +#include // fuer ViewShell +#include // fuer SwClient +#include // fuer die CursorShell Typen +#include // fuer die CursorMove-Staties +#include // SwTOXSearchDir +#include //SwTblSearchType #include #include #include @@ -112,10 +112,10 @@ struct SwContentAtPos SW_NUMLABEL = 0x0200, // #i23726# SW_CONTENT_CHECK = 0x0400, // --> FME 2005-05-13 #i43742# <-- SW_SMARTTAG = 0x0800, - SW_FORMCTRL = 0x1000 + SW_FORMCTRL = 0x1000 #ifndef PRODUCT - ,SW_CURR_ATTRS = 0x4000 // nur zum Debuggen - ,SW_TABLEBOXVALUE = 0x8000 // nur zum Debuggen + ,SW_CURR_ATTRS = 0x4000 // nur zum Debuggen + ,SW_TABLEBOXVALUE = 0x8000 // nur zum Debuggen #endif } eCntntAtPos; @@ -168,45 +168,45 @@ public: // public, damit defaultet werden kann !! /* ein enum fuer den Aufruf von UpdateCrsr */ enum CrsrFlag { - UPDOWN = (1 << 0), // Up/Down auf Spalte halten - SCROLLWIN = (1 << 1), // Window Scrollen - CHKRANGE = (1 << 2), // ueberpruefen von ueberlappenden PaM's - NOCALRECT = (1 << 3), // CharRect nicht neu berechnen - READONLY = (1 << 4) // Sichtbar machen trotz Readonly + UPDOWN = (1 << 0), // Up/Down auf Spalte halten + SCROLLWIN = (1 << 1), // Window Scrollen + CHKRANGE = (1 << 2), // ueberpruefen von ueberlappenden PaM's + NOCALRECT = (1 << 3), // CharRect nicht neu berechnen + READONLY = (1 << 4) // Sichtbar machen trotz Readonly }; private: - SwRect aCharRect; // Char-SRectangle auf dem der Cursor steht - Point aCrsrHeight; // Hohe&Offset von sichtbaren Cursor - Point aOldRBPos; // Right/Bottom von letzter VisArea + SwRect aCharRect; // Char-SRectangle auf dem der Cursor steht + Point aCrsrHeight; // Hohe&Offset von sichtbaren Cursor + Point aOldRBPos; // Right/Bottom von letzter VisArea // (wird im Invalidate vom Cursor benutzt) // um event. Macro was anhaengt auszufuehren. - Link aFlyMacroLnk; // Link will be called, if the Crsr is set + Link aFlyMacroLnk; // Link will be called, if the Crsr is set // into a fly. A macro can be then becalled - Link aChgLnk; // link will be called by every attribut/ + Link aChgLnk; // link will be called by every attribut/ // format changes at cursor position. - Link aGrfArrivedLnk; // Link calls to UI if a grafik is arrived + Link aGrfArrivedLnk; // Link calls to UI if a grafik is arrived - SwShellCrsr* pCurCrsr; // der aktuelle Cursor - SwShellCrsr* pCrsrStk; // Stack fuer den Cursor + SwShellCrsr* pCurCrsr; // der aktuelle Cursor + SwShellCrsr* pCrsrStk; // Stack fuer den Cursor SwVisCrsr *pVisCrsr; // der Sichtbare-Cursor IBlockCursor *pBlockCrsr; // interface of cursor for block (=rectangular) selection - SwShellTableCrsr* pTblCrsr; // Tabellen-Crsr; nur in Tabellen, wenn + SwShellTableCrsr* pTblCrsr; // Tabellen-Crsr; nur in Tabellen, wenn // die Selection ueber 2 Spalten liegt - SwNodeIndex* pBoxIdx; // fuers erkennen der veraenderten - SwTableBox* pBoxPtr; // Tabellen-Zelle + SwNodeIndex* pBoxIdx; // fuers erkennen der veraenderten + SwTableBox* pBoxPtr; // Tabellen-Zelle - long nUpDownX; // versuche den Cursor bei Up/Down immer in + long nUpDownX; // versuche den Cursor bei Up/Down immer in // der gleichen Spalte zu bewegen long nLeftFrmPos; - ULONG nAktNode; // save CursorPos at Start-Action + ULONG nAktNode; // save CursorPos at Start-Action xub_StrLen nAktCntnt; USHORT nAktNdTyp; bool bAktSelection; @@ -218,8 +218,8 @@ private: * Cursorbewegungen (ueber Find()) realisiert werden. */ USHORT nCrsrMove; - USHORT nBasicActionCnt; // Actions, die vom Basic geklammert wurden - CrsrMoveState eMvState; // Status fuers Crsr-Travelling - GetCrsrOfst + USHORT nBasicActionCnt; // Actions, die vom Basic geklammert wurden + CrsrMoveState eMvState; // Status fuers Crsr-Travelling - GetCrsrOfst // --> OD 2008-04-02 #refactorlists# String sMarkedListId; @@ -227,27 +227,27 @@ private: // <-- BOOL bHasFocus : 1; // Shell ist in einem Window "aktiv" - BOOL bSVCrsrVis : 1; // SV-Cursor Un-/Sichtbar - BOOL bChgCallFlag : 1; // Attributaenderung innerhalb von + BOOL bSVCrsrVis : 1; // SV-Cursor Un-/Sichtbar + BOOL bChgCallFlag : 1; // Attributaenderung innerhalb von // Start- und EndAction - BOOL bVisPortChgd : 1; // befindet sich im VisPortChg-Aufruf + BOOL bVisPortChgd : 1; // befindet sich im VisPortChg-Aufruf // (wird im Invalidate vom Cursor benutzt) - BOOL bCallChgLnk : 1; // Flag fuer abgeleitete Klassen: + BOOL bCallChgLnk : 1; // Flag fuer abgeleitete Klassen: // TRUE -> ChgLnk callen // Zugriff nur ueber SwChgLinkFlag - BOOL bAllProtect : 1; // Flag fuer Bereiche + BOOL bAllProtect : 1; // Flag fuer Bereiche // TRUE -> alles geschuetzt / versteckt - BOOL bInCMvVisportChgd : 1; // Flag fuer CrsrMoves + BOOL bInCMvVisportChgd : 1; // Flag fuer CrsrMoves // TRUE -> die Sicht wurde verschoben - BOOL bGCAttr : 1; // TRUE -> es existieren nichtaufgespannte Attr. - BOOL bIgnoreReadonly : 1; // TRUE -> Beim naechsten EndAction trotz + BOOL bGCAttr : 1; // TRUE -> es existieren nichtaufgespannte Attr. + BOOL bIgnoreReadonly : 1; // TRUE -> Beim naechsten EndAction trotz // Readonly den Crsr sichtbar machen. - BOOL bSelTblCells : 1; // TRUE -> Zellen uebers InputWin selektieren - BOOL bAutoUpdateCells : 1; // TRUE -> Zellen werden autoformatiert - BOOL bBasicHideCrsr : 1; // TRUE -> HideCrsr vom Basic + BOOL bSelTblCells : 1; // TRUE -> Zellen uebers InputWin selektieren + BOOL bAutoUpdateCells : 1; // TRUE -> Zellen werden autoformatiert + BOOL bBasicHideCrsr : 1; // TRUE -> HideCrsr vom Basic BOOL bSetCrsrInReadOnly : 1;// TRUE -> Cursor darf in ReadOnly-Bereiche - BOOL bOverwriteCrsr : 1; // TRUE -> show Overwrite Crsr + BOOL bOverwriteCrsr : 1; // TRUE -> show Overwrite Crsr // OD 11.02.2003 #100556# - flag to allow/avoid execution of marcos (default: true) bool mbMacroExecAllowed : 1; @@ -352,11 +352,11 @@ public: SwPaM* GetCrsr( BOOL bMakeTblCrsr = TRUE ) const; inline SwCursor* GetSwCrsr( BOOL bMakeTblCrsr = TRUE ) const; // nur den akt. Cursor returnen - SwShellCrsr* _GetCrsr() { return pCurCrsr; } - const SwShellCrsr* _GetCrsr() const { return pCurCrsr; } + SwShellCrsr* _GetCrsr() { return pCurCrsr; } + const SwShellCrsr* _GetCrsr() const { return pCurCrsr; } // uebergebenen Cursor anzeigen - fuer UNO - void SetSelection(const SwPaM& rCrsr); + void SetSelection(const SwPaM& rCrsr); // alle Cursor aus den ContentNodes entfernen und auf 0 setzen. // Wurde aus der FEShell hierher verschoben. @@ -372,7 +372,7 @@ public: void EndAction( const BOOL bIdleEnd = FALSE ); // Basiscursortravelling - long GetUpDownX() const { return nUpDownX; } + long GetUpDownX() const { return nUpDownX; } BOOL Left( USHORT nCnt, USHORT nMode, BOOL bAllowVisual = FALSE ) { return LeftRight( TRUE, nCnt, nMode, bAllowVisual ); } @@ -412,8 +412,8 @@ public: // Positionieren des Cursors // returnt - // CRSR_POSCHG: wenn der ob der SPoint vom Layout korrigiert wurde. - // CRSR_POSOLD: wenn der Crsr nicht veraendert wurde + // CRSR_POSCHG: wenn der ob der SPoint vom Layout korrigiert wurde. + // CRSR_POSOLD: wenn der Crsr nicht veraendert wurde int SetCrsr( const Point &rPt, BOOL bOnlyText = FALSE, bool bBlock = true ); @@ -448,18 +448,18 @@ public: void SwapPam(); BOOL ChgCurrPam( const Point & rPt, - BOOL bTstOnly = TRUE, //Nur testen, nicht setzen - BOOL bTstHit = FALSE ); //Nur genaue Treffer + BOOL bTstOnly = TRUE, //Nur testen, nicht setzen + BOOL bTstHit = FALSE ); //Nur genaue Treffer void KillPams(); // erzeuge eine Kopie vom Cursor und speicher diese im Stack void Push(); /* * Loescht einen Cursor (gesteuert durch bOldCrsr) - * - vom Stack oder ( bOldCrsr = TRUE ) - * - den aktuellen und der auf dem Stack stehende wird zum aktuellen + * - vom Stack oder ( bOldCrsr = TRUE ) + * - den aktuellen und der auf dem Stack stehende wird zum aktuellen * - * Return: es war auf dem Stack noch einer vorhanden + * Return: es war auf dem Stack noch einer vorhanden */ BOOL Pop( BOOL bOldCrsr = TRUE ); /* @@ -514,7 +514,7 @@ public: // Methoden fuer aFlyMacroLnk void SetFlyMacroLnk( const Link& rLnk ) { aFlyMacroLnk = rLnk; } - const Link& GetFlyMacroLnk() const { return aFlyMacroLnk; } + const Link& GetFlyMacroLnk() const { return aFlyMacroLnk; } // Methoden geben/aendern den Link fuer die Attribut/Format-Aenderungen void SetChgLnk( const Link &rLnk ) { aChgLnk = rLnk; } @@ -648,8 +648,8 @@ public: BOOL MakeOutlineSel( USHORT nSttPos, USHORT nEndPos, BOOL bWithChilds = FALSE ); - BOOL GotoNextOutline(); // naechster Node mit Outline-Num. - BOOL GotoPrevOutline(); // vorheriger Node mit Outline-Num. + BOOL GotoNextOutline(); // naechster Node mit Outline-Num. + BOOL GotoPrevOutline(); // vorheriger Node mit Outline-Num. /** Delivers the current shell cursor @@ -682,14 +682,14 @@ public: SwShellTableCrsr* GetTableCrsr() { return pTblCrsr; } USHORT UpdateTblSelBoxes(); - BOOL GotoFtnTxt(); // springe aus dem Content zur Fussnote - BOOL GotoFtnAnchor(); // springe aus der Fussnote zum Anker + BOOL GotoFtnTxt(); // springe aus dem Content zur Fussnote + BOOL GotoFtnAnchor(); // springe aus der Fussnote zum Anker BOOL GotoPrevFtnAnchor(); BOOL GotoNextFtnAnchor(); - BOOL GotoFlyAnchor(); // springe aus dem Rahmen zum Anker - BOOL GotoHeaderTxt(); // springe aus dem Content zum Header - BOOL GotoFooterTxt(); // springe aus dem Content zum Footer + BOOL GotoFlyAnchor(); // springe aus dem Rahmen zum Anker + BOOL GotoHeaderTxt(); // springe aus dem Content zum Header + BOOL GotoFooterTxt(); // springe aus dem Content zum Footer // springe in den Header/Footer des angegebenen oder akt. PageDesc BOOL SetCrsrInHdFt( USHORT nDescNo = USHRT_MAX, BOOL bInHeader = TRUE ); @@ -701,7 +701,7 @@ public: BOOL GotoNextTOXBase( const String* = 0 ); // springe zum vorherigen Verzeichnis [mit dem Namen] BOOL GotoPrevTOXBase( const String* = 0 ); - BOOL GotoTOXMarkBase(); // springe zum Verzeichnis vom TOXMark + BOOL GotoTOXMarkBase(); // springe zum Verzeichnis vom TOXMark // springe zum naechsten (vorherigen) Verzeichniseintrag BOOL GotoNxtPrvTOXMark( BOOL bNext = TRUE ); // Zur naechsten/ vorherigen Verzeichnismarke dieses Typs traveln @@ -785,7 +785,7 @@ public: BOOL ChgCrsrTimerFlag( BOOL bTimerOn = TRUE ); #endif - BOOL BasicActionPend() const { return nBasicActionCnt != nStartAction; } + BOOL BasicActionPend() const { return nBasicActionCnt != nStartAction; } // springe zum benannten Bereich BOOL GotoRegion( const String& rName ); @@ -834,9 +834,9 @@ public: virtual void NewCoreSelection(); void SetSelTblCells( BOOL bFlag ) { bSelTblCells = bFlag; } - BOOL IsSelTblCells() const { return bSelTblCells; } + BOOL IsSelTblCells() const { return bSelTblCells; } - BOOL IsAutoUpdateCells() const { return bAutoUpdateCells; } + BOOL IsAutoUpdateCells() const { return bAutoUpdateCells; } void SetAutoUpdateCells( BOOL bFlag ) { bAutoUpdateCells = bFlag; } BOOL GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode, diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 6861ab2ec4..1df549ae4c 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -66,11 +66,11 @@ inline xub_StrLen GetSttOrEnd( BOOL bCondition, const SwCntntNode& rNd ) /************************************************************************* |* -|* SwPosition +|* SwPosition |* -|* Beschreibung PAM.DOC -|* Ersterstellung VB 4.3.91 -|* Letzte Aenderung VB 4.3.91 +|* Beschreibung PAM.DOC +|* Ersterstellung VB 4.3.91 +|* Letzte Aenderung VB 4.3.91 |* *************************************************************************/ @@ -288,7 +288,7 @@ BOOL lcl_ChkOneRange( CHKSECTION eSec, BOOL bChkSections, pNd = pNd->StartOfSectionNode(); if( pNd == rNds[ nEnd ]->StartOfSectionNode() ) - return TRUE; // der gleiche StartNode, die selbe Section + return TRUE; // der gleiche StartNode, die selbe Section // steht schon auf einem GrundSection Node ? Fehler !!! if( !pNd->StartOfSectionIndex() ) @@ -332,7 +332,7 @@ BOOL CheckNodesRange( const SwNodeIndex& rStt, return lcl_ChkOneRange( eSec, bChkSection, rNds.GetEndOfRedlines(), nStt, nEnd ); - return FALSE; // liegt irgendwo dazwischen, FEHLER + return FALSE; // liegt irgendwo dazwischen, FEHLER } @@ -387,11 +387,11 @@ SwCntntNode* GoPreviousNds( SwNodeIndex * pIdx, BOOL bChk ) /************************************************************************* |* -|* SwPointAndMark +|* SwPointAndMark |* -|* Beschreibung PAM.DOC -|* Ersterstellung VB 4.3.91 -|* Letzte Aenderung JP 6.5.91 +|* Beschreibung PAM.DOC +|* Ersterstellung VB 4.3.91 +|* Letzte Aenderung JP 6.5.91 |* *************************************************************************/ @@ -579,20 +579,20 @@ BOOL SwPaM::Move( SwMoveFn fnMove, SwGoInDoc fnGo ) /************************************************************************* |* -|* void SwPaM::MakeRegion( SwMoveFn, SwPaM*, const SwPaM* ) +|* void SwPaM::MakeRegion( SwMoveFn, SwPaM*, const SwPaM* ) |* -|* Beschreibung Setzt den 1. SwPaM auf den uebergebenen SwPaM -|* oder setzt auf den Anfang oder Ende vom Document. -|* SPoint bleibt auf der Position stehen, GetMark aendert -|* sich entsprechend ! +|* Beschreibung Setzt den 1. SwPaM auf den uebergebenen SwPaM +|* oder setzt auf den Anfang oder Ende vom Document. +|* SPoint bleibt auf der Position stehen, GetMark aendert +|* sich entsprechend ! |* -|* Parameter SwDirection gibt an, ob an Anfang / Ende -|* SwPaM * der zu setzende Bereich -|* const SwPaM& der enventuell vorgegeben Bereich -|* Return-Werte SwPaM* der entsprehend neu gesetzte Bereich +|* Parameter SwDirection gibt an, ob an Anfang / Ende +|* SwPaM * der zu setzende Bereich +|* const SwPaM& der enventuell vorgegeben Bereich +|* Return-Werte SwPaM* der entsprehend neu gesetzte Bereich |* -|* Ersterstellung JP 26.04.91 -|* Letzte Aenderung JP 26.04.91 +|* Ersterstellung JP 26.04.91 +|* Letzte Aenderung JP 26.04.91 |* *************************************************************************/ @@ -603,17 +603,17 @@ SwPaM* SwPaM::MakeRegion( SwMoveFn fnMove, const SwPaM * pOrigRg ) if( pOrigRg == 0 ) { pPam = new SwPaM( *m_pPoint ); - pPam->SetMark(); // setze Anfang fest - pPam->Move( fnMove, fnGoSection); // an Anfang / Ende vom Node + pPam->SetMark(); // setze Anfang fest + pPam->Move( fnMove, fnGoSection); // an Anfang / Ende vom Node // stelle SPoint wieder auf alte Position, GetMark auf das "Ende" pPam->Exchange(); } else { - pPam = new SwPaM( *(SwPaM*)pOrigRg ); // die Suchregion ist vorgegeben + pPam = new SwPaM( *(SwPaM*)pOrigRg ); // die Suchregion ist vorgegeben // sorge dafuer, dass SPoint auf dem "echten" StartPunkt steht - // FORWARD --> SPoint immer kleiner als GetMark + // FORWARD --> SPoint immer kleiner als GetMark // BACKWARD --> SPoint immer groesser als GetMark if( (pPam->GetMark()->*fnMove->fnCmpOp)( *pPam->GetPoint() ) ) pPam->Exchange(); @@ -774,7 +774,7 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const if( nSttIdx <= nIdx && nEndIdx >= nIdx && rCntnt.GetCntntIdx()->GetNode().GetNodes().IsDocNodes() ) { -/* // ist es keine gelinkte Section, dann kann sie auch +/* // ist es keine gelinkte Section, dann kann sie auch // nicht mitselektiert werden const SwSection& rSect = *pFmt->GetSection(); if( CONTENT_SECTION == rSect.GetType() ) @@ -791,8 +791,8 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const #ifdef CHECK_CELL_READONLY //JP 22.01.99: bisher wurden Tabelle, die in der Text-Selektion standen -// nicht beachtet. Wollte man das haben, dann muss dieser -// Code freigeschaltet werden +// nicht beachtet. Wollte man das haben, dann muss dieser +// Code freigeschaltet werden if( !bRet ) { @@ -828,25 +828,25 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const } //FIXME FieldBk // TODO: Form Protection when Enhanced Fields are enabled - if (!bRet) { - const SwDoc *pDoc = GetDoc(); + if (!bRet) { + const SwDoc *pDoc = GetDoc(); sw::mark::IMark* pA = NULL; sw::mark::IMark* pB = NULL; if ( pDoc ) { const IDocumentMarkAccess* pMarksAccess = pDoc->getIDocumentMarkAccess( ); - pA = GetPoint() ? pMarksAccess->getFieldmarkFor( *GetPoint( ) ) : NULL; - pB = GetMark( ) ? pMarksAccess->getFieldmarkFor( *GetMark( ) ) : pA; - bRet = ( pA != pB ); + pA = GetPoint() ? pMarksAccess->getFieldmarkFor( *GetPoint( ) ) : NULL; + pB = GetMark( ) ? pMarksAccess->getFieldmarkFor( *GetMark( ) ) : pA; + bRet = ( pA != pB ); } - bool bProtectForm = pDoc->get( IDocumentSettingAccess::PROTECT_FORM ); - if ( bProtectForm ) - bRet |= ( pA == NULL || pB == NULL ); - } + bool bProtectForm = pDoc->get( IDocumentSettingAccess::PROTECT_FORM ); + if ( bProtectForm ) + bRet |= ( pA == NULL || pB == NULL ); + } return bRet; } -//-------------------- Suche nach Formaten( FormatNamen ) ----------------- +//-------------------- Suche nach Formaten( FormatNamen ) ----------------- // die Funktion gibt in Suchrichtung den folgenden Node zurueck. // Ist in der Richtung keiner mehr vorhanden oder ist dieser ausserhalb @@ -885,7 +885,7 @@ SwCntntNode* GetNode( SwPaM & rPam, BOOL& rbFirst, SwMoveFn fnMove, } } - if( !pNd ) // steht Cursor auf keinem ContentNode ? + if( !pNd ) // steht Cursor auf keinem ContentNode ? { SwPosition aPos( *rPam.GetPoint() ); BOOL bSrchForward = fnMove == fnMoveForward; @@ -894,7 +894,7 @@ SwCntntNode* GetNode( SwPaM & rPam, BOOL& rbFirst, SwMoveFn fnMove, // zum naechsten / vorherigen ContentNode // Funktioniert noch alles, wenn die Uerbpruefung vom ueberspringen der // Sektions herausgenommen wird ?? -// if( (*fnMove->fnNds)( rNodes, &aPos.nNode ) ) +// if( (*fnMove->fnNds)( rNodes, &aPos.nNode ) ) while( TRUE ) { pNd = bSrchForward @@ -913,19 +913,19 @@ SwCntntNode* GetNode( SwPaM & rPam, BOOL& rbFirst, SwMoveFn fnMove, ( pFrm->IsTxtFrm() && ((SwTxtFrm*)pFrm)->IsHiddenNow() ) ) -// rNodes[ rNodes.EndOfAutotext ]->StartOfSection().GetIndex() -// < aPos.nNode.GetIndex() && aPos.nNode.GetIndex() -// < rNodes.EndOfAutotext.GetIndex() && -// 0 == ( pFrm = pNd->GetFrm()) && -// pFrm->IsProtected() ) +// rNodes[ rNodes.EndOfAutotext ]->StartOfSection().GetIndex() +// < aPos.nNode.GetIndex() && aPos.nNode.GetIndex() +// < rNodes.EndOfAutotext.GetIndex() && +// 0 == ( pFrm = pNd->GetFrm()) && +// pFrm->IsProtected() ) { pNd = 0; - continue; // suche weiter + continue; // suche weiter } *(SwPosition*)rPam.GetPoint() = aPos; } else - pNd = 0; // kein gueltiger Node + pNd = 0; // kein gueltiger Node break; } break; @@ -1117,14 +1117,14 @@ BOOL GoNextPara( SwPaM & rPam, SwPosPara aPosPara ) BOOL GoCurrSection( SwPaM & rPam, SwMoveFn fnMove ) { SwPosition& rPos = *rPam.GetPoint(); - SwPosition aSavePos( rPos ); // eine Vergleichsposition + SwPosition aSavePos( rPos ); // eine Vergleichsposition SwNodes& rNds = aSavePos.nNode.GetNodes(); (rNds.*fnMove->fnSection)( &rPos.nNode ); SwCntntNode *pNd; if( 0 == ( pNd = rPos.nNode.GetNode().GetCntntNode()) && 0 == ( pNd = (*fnMove->fnNds)( &rPos.nNode, TRUE )) ) { - rPos = aSavePos; // Cusror nicht veraendern + rPos = aSavePos; // Cusror nicht veraendern return FALSE; } @@ -1137,14 +1137,14 @@ BOOL GoCurrSection( SwPaM & rPam, SwMoveFn fnMove ) BOOL GoNextSection( SwPaM & rPam, SwMoveFn fnMove ) { SwPosition& rPos = *rPam.GetPoint(); - SwPosition aSavePos( rPos ); // eine Vergleichsposition + SwPosition aSavePos( rPos ); // eine Vergleichsposition SwNodes& rNds = aSavePos.nNode.GetNodes(); rNds.GoEndOfSection( &rPos.nNode ); // kein weiterer ContentNode vorhanden ? if( !GoInCntnt( rPam, fnMoveForward ) ) { - rPos = aSavePos; // Cusror nicht veraendern + rPos = aSavePos; // Cusror nicht veraendern return FALSE; } (rNds.*fnMove->fnSection)( &rPos.nNode ); @@ -1158,14 +1158,14 @@ BOOL GoNextSection( SwPaM & rPam, SwMoveFn fnMove ) BOOL GoPrevSection( SwPaM & rPam, SwMoveFn fnMove ) { SwPosition& rPos = *rPam.GetPoint(); - SwPosition aSavePos( rPos ); // eine Vergleichsposition + SwPosition aSavePos( rPos ); // eine Vergleichsposition SwNodes& rNds = aSavePos.nNode.GetNodes(); rNds.GoStartOfSection( &rPos.nNode ); // kein weiterer ContentNode vorhanden ? if( !GoInCntnt( rPam, fnMoveBackward )) { - rPos = aSavePos; // Cusror nicht veraendern + rPos = aSavePos; // Cusror nicht veraendern return FALSE; } (rNds.*fnMove->fnSection)( &rPos.nNode ); diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index e34d15ad88..ea032b5e4d 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: unobkm.cxx,v $ - * $Revision: 1.16 $ + * $Revision: 1.17 $ * * This file is part of OpenOffice.org. * diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 7558a60447..fd7319fd45 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2140,18 +2140,6 @@ bool SwWW8ImplReader::ImportFormulaControl(WW8FormulaControl &aFormula, if((aPic.lcb > 0x3A) && !pDataStream->GetError() ) { -#if 0 // some debug fun; remove this later... - int len=aPic.lcb-aPic.cbHeader; - char *pBuf=(char*)malloc(len); - pDataStream->Read( pBuf, len); - static int _h=0; - char fname[255]; - sprintf(fname, "data%03i.data", _h++); - FILE *out=fopen(fname, "wb"); - fwrite(pBuf, len, 1, out); - fclose(out); - pDataStream->Seek( nPicLocFc + aPic.cbHeader ); -#endif aFormula.FormulaRead(nWhich,pDataStream); bRet = true; } -- cgit v1.2.3 From 1b9ac1bb9faeae8b6c6b3e13722dcf91aac00f22 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 12 Dec 2009 20:01:15 +0100 Subject: #i107450#: changes caused by header cleanup in svx --- sw/source/core/inc/textapi.hxx | 4 ++++ sw/source/ui/uno/unotxvw.cxx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/inc/textapi.hxx b/sw/source/core/inc/textapi.hxx index 722c5e4122..51f07077c9 100755 --- a/sw/source/core/inc/textapi.hxx +++ b/sw/source/core/inc/textapi.hxx @@ -31,6 +31,10 @@ #include #include #include +#include +#include +#include +#include class SwDoc; diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index de8bcd61ee..07e31ca6bb 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -77,7 +77,7 @@ #include #include #include - +#include #include #include -- cgit v1.2.3 From 993fb863ac25cf69f666a653f2fe47396d7d9585 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Mon, 14 Dec 2009 11:28:36 +0100 Subject: #i10000# resolve conflict --- sw/source/core/fields/docufld.cxx | 6 ------ 1 file changed, 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index c2c6280613..039da17af4 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -1153,11 +1153,6 @@ String SwDocInfoField::Expand() const ::rtl::OUString sVal; uno::Reference < script::XTypeConverter > xConverter( comphelper::getProcessServiceFactory() ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.script.Converter")), uno::UNO_QUERY ); -<<<<<<< local - uno::Any aNew = xConverter->convertToSimpleType( aAny, uno::TypeClass_STRING ); - aNew >>= sVal; - const_cast(this)->aContent = sVal; -======= util::Date aDate; util::DateTime aDateTime; util::Duration aDuration; @@ -1193,7 +1188,6 @@ String SwDocInfoField::Expand() const aNew >>= sVal; } ((SwDocInfoField*)this)->aContent = sVal; ->>>>>>> other } } } -- cgit v1.2.3 From abc27d2bfde5c73afacc8c5155f43839c21adb0e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 14 Dec 2009 12:55:05 +0100 Subject: autorecovery: replace some SfxFrameItem occurences by SfxUnoFrameItem As a consequence, replace some occurences of SfxFrame with XFrame. This allows getting rid of yet some more Sfx code in the (SFX) doc loader. Also, it prevents premature creations of SfxFrame instances during loading, since now the frame is really created when it is needed only. --- sw/source/ui/app/apphdl.cxx | 2 +- sw/source/ui/app/applab.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index ca919cf99e..295f27339b 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -959,7 +959,7 @@ void NewXForms( SfxRequest& rReq ) static_cast( &xDocSh )->GetDoc()->initXForms( true ); // load document into frame - SFX_REQUEST_ARG( rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE ); + SFX_REQUEST_ARG( rReq, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE ); SfxViewFrame::LoadDocumentIntoFrame( *xDocSh, pFrameItem ); // set return value diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index cb4a62a1f1..40ac8b9eb7 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -237,7 +237,7 @@ static sal_uInt16 nBCTitleNo = 0; pDocSh->getIDocumentDeviceAccess()->setJobsetup(pPrt->GetJobSetup()); } - SFX_REQUEST_ARG( rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE ); + SFX_REQUEST_ARG( rReq, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE ); SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *xDocSh, pFrameItem ); SwView *pNewView = (SwView*) pViewFrame->GetViewShell(); -- cgit v1.2.3 From 4eaa047a4f4b550b400171d04ba59476e2450235 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Mon, 14 Dec 2009 12:25:38 +0000 Subject: #161286# applied patch and solved crash --- sw/source/filter/ww8/ww8graf.cxx | 5 ++-- sw/source/filter/ww8/ww8par.cxx | 15 ++++++----- sw/source/filter/ww8/ww8par2.cxx | 31 ++++++++++++++-------- sw/source/filter/ww8/ww8scan.cxx | 55 ++++++++++++++++++++++++++++------------ sw/source/filter/ww8/ww8scan.hxx | 2 ++ 5 files changed, 73 insertions(+), 35 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 0553267d12..e1c5b25092 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -506,14 +506,15 @@ ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd ) // ItemSet gestopft. void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl ) { - if( nColl < nColls && pCollA[nColl].pFmt && pCollA[nColl].bColl ) + SwWW8StyInf * pStyInf = GetStyle(nColl); + if( pStyInf != NULL && pStyInf->pFmt && pStyInf->bColl ) { const SfxPoolItem* pItem; for( USHORT i = POOLATTR_BEGIN; i < POOLATTR_END; i++ ) { //If we are set in the source and not set in the destination //then add it in. - if ( SFX_ITEM_SET == pCollA[nColl].pFmt->GetItemState( + if ( SFX_ITEM_SET == pStyInf->pFmt->GetItemState( i, true, &pItem ) ) { SfxItemPool *pEditPool = rS.GetPool(); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 2ae8a362ea..ebd7d2a770 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -989,7 +989,7 @@ const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos, SfxItemState eState = SFX_ITEM_DEFAULT; if (const SfxItemSet *pSet = pNd->GetpSwAttrSet()) eState = pSet->GetItemState(RES_LR_SPACE, false); - if (eState != SFX_ITEM_SET) + if (eState != SFX_ITEM_SET && rReader.pCollA != NULL) pItem = &(rReader.pCollA[rReader.nAktColl].maWordLR); } @@ -2163,7 +2163,7 @@ CharSet SwWW8ImplReader::GetCurrentCharSet() eSrcCharSet = maFontSrcCharSets.top(); if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && (nCharFmt != -1)) eSrcCharSet = pCollA[nCharFmt].GetCharSet(); - if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) + if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && StyleExists(nAktColl)) eSrcCharSet = pCollA[nAktColl].GetCharSet(); if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) { // patch from cmc for #i52786# @@ -2221,10 +2221,13 @@ CharSet SwWW8ImplReader::GetCurrentCJKCharSet() { if (!maFontSrcCJKCharSets.empty()) eSrcCharSet = maFontSrcCJKCharSets.top(); - if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && (nCharFmt != -1)) - eSrcCharSet = pCollA[nCharFmt].GetCJKCharSet(); - if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) - eSrcCharSet = pCollA[nAktColl].GetCJKCharSet(); + if (pCollA != NULL) + { + if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && (nCharFmt != -1)) + eSrcCharSet = pCollA[nCharFmt].GetCJKCharSet(); + if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) + eSrcCharSet = pCollA[nAktColl].GetCJKCharSet(); + } if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) { // patch from cmc for #i52786# /* diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 65912eb6b6..04e75b06a1 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -827,7 +827,8 @@ void SwWW8ImplReader::Read_ANLevelNo( USHORT, const BYTE* pData, short nLen ) { // nur fuer SwTxtFmtColl, nicht CharFmt // WW: 0 = no Numbering - if (pCollA[nAktColl].bColl && *pData) + SwWW8StyInf * pColl = GetStyle(nAktColl); + if (pColl != NULL && pColl->bColl && *pData) { // Bereich WW:1..9 -> SW:0..8 keine Aufzaehlung / Nummerierung @@ -861,12 +862,16 @@ void SwWW8ImplReader::Read_ANLevelNo( USHORT, const BYTE* pData, short nLen ) void SwWW8ImplReader::Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen ) // Sprm 12 { - if( !pAktColl || nLen <= 0 // nur bei Styledef - || !pCollA[nAktColl].bColl // CharFmt -> ignorieren - || ( nIniFlags & WW8FL_NO_OUTLINE ) ){ - nSwNumLevel = 0xff; - return; + { + SwWW8StyInf * pStyInf = GetStyle(nAktColl); + if( !pAktColl || nLen <= 0 // nur bei Styledef + || (pStyInf && !pStyInf->bColl) // CharFmt -> ignorieren + || ( nIniFlags & WW8FL_NO_OUTLINE ) ){ + nSwNumLevel = 0xff; + return; + } } + if( nSwNumLevel <= MAXLEVEL // Bereich WW:1..9 -> SW:0..8 && nSwNumLevel <= 9 ){ // keine Aufzaehlung / Nummerierung @@ -892,7 +897,10 @@ void SwWW8ImplReader::Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen ) SwNumRule* pNR = GetStyRule(); SetAnld(pNR, (WW8_ANLD*)pData, 0, false); pAktColl->SetFmtAttr( SwNumRuleItem( pNR->GetName() ) ); - pCollA[nAktColl].bHasStyNumRule = true; + + SwWW8StyInf * pStyInf = GetStyle(nAktColl); + if (pStyInf != NULL) + pStyInf->bHasStyNumRule = true; } } @@ -1007,9 +1015,10 @@ void SwWW8ImplReader::StartAnl(const BYTE* pSprm13) } } - if (!sNumRule.Len() && pCollA[nAktColl].bHasStyNumRule) + SwWW8StyInf * pStyInf = GetStyle(nAktColl); + if (!sNumRule.Len() && pStyInf->bHasStyNumRule) { - sNumRule = pCollA[nAktColl].pFmt->GetNumRule().GetValue(); + sNumRule = pStyInf->pFmt->GetNumRule().GetValue(); pNumRule = rDoc.FindNumRulePtr(sNumRule); if (!pNumRule) sNumRule.Erase(); @@ -3918,8 +3927,8 @@ WW8RStyle::WW8RStyle(WW8Fib& _rFib, SwWW8ImplReader* pI) : WW8Style(*pI->pTableStream, _rFib), maSprmParser(_rFib.GetFIBVersion()), pIo(pI), pStStrm(pI->pTableStream), pStyRule(0), nWwNumLevel(0) { - pIo->pCollA = new SwWW8StyInf[ cstd ]; // Style-UEbersetzung WW->SW pIo->nColls = cstd; + pIo->pCollA = cstd ? new SwWW8StyInf[ cstd ] : NULL; // Style-UEbersetzung WW->SW } void WW8RStyle::Set1StyleDefaults() @@ -4691,7 +4700,7 @@ void WW8RStyle::Import() // // fuer z.B. Tabellen wird ein immer gueltiger Std-Style gebraucht - if( pIo->pCollA[0].pFmt && pIo->pCollA[0].bColl && pIo->pCollA[0].bValid ) + if( pIo->StyleExists(0) && pIo->pCollA[0].pFmt && pIo->pCollA[0].bColl && pIo->pCollA[0].bValid ) pIo->pDfltTxtFmtColl = (SwTxtFmtColl*)pIo->pCollA[0].pFmt; else pIo->pDfltTxtFmtColl = pIo->rDoc.GetDfltTxtFmtColl(); diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index d559608d86..5c8cc8ffd3 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -2281,22 +2281,48 @@ WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct, void WW8PLCF::ReadPLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF ) { + bool failure = false; + // Pointer auf Pos-Array pPLCF_PosArray = new WW8_CP[ ( nPLCF + 3 ) / 4 ]; sal_Size nOldPos = pSt->Tell(); pSt->Seek( nFilePos ); - pSt->Read( pPLCF_PosArray, nPLCF ); + failure = pSt->GetError(); + + if (!failure) + { + pSt->Read( pPLCF_PosArray, nPLCF ); + failure = pSt->GetError(); + } + + if (!failure) + { #ifdef OSL_BIGENDIAN - for( nIdx = 0; nIdx <= nIMax; nIdx++ ) - pPLCF_PosArray[nIdx] = SWAPLONG( pPLCF_PosArray[nIdx] ); - nIdx = 0; + for( nIdx = 0; nIdx <= nIMax; nIdx++ ) + pPLCF_PosArray[nIdx] = SWAPLONG( pPLCF_PosArray[nIdx] ); + nIdx = 0; #endif // OSL_BIGENDIAN - // Pointer auf Inhalts-Array - pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1]; + // Pointer auf Inhalts-Array + pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1]; + } pSt->Seek( nOldPos ); + + ASSERT( !failure, "Document has corrupt PLCF, ignoring it" ); + + if (failure) + MakeFailedPLCF(); +} + +void WW8PLCF::MakeFailedPLCF() +{ + nIMax = 0; + delete[] pPLCF_PosArray; + pPLCF_PosArray = new INT32[2]; + pPLCF_PosArray[0] = pPLCF_PosArray[1] = WW8_CP_MAX; + pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1]; } void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN ) @@ -2359,13 +2385,7 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN ) ASSERT( !failure, "Document has corrupt PLCF, ignoring it" ); if (failure) - { - nIMax = 0; - delete[] pPLCF_PosArray; - pPLCF_PosArray = new INT32[2]; - pPLCF_PosArray[0] = pPLCF_PosArray[1] = WW8_CP_MAX; - pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1]; - } + MakeFailedPLCF(); } bool WW8PLCF::SeekPos(WW8_CP nPos) @@ -6240,8 +6260,11 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib ) rSt.Seek( rFib.fcSttbfffn ); + INT32 nFFn = rFib.lcbSttbfffn - 2; + // allocate Font Array - BYTE* pA = new BYTE[ rFib.lcbSttbfffn - 2 ]; + BYTE* pA = new BYTE[ nFFn ]; + memset(pA, 0, nFFn); WW8_FFN* p = (WW8_FFN*)pA; ww::WordVersion eVersion = rFib.GetFIBVersion(); @@ -6258,13 +6281,13 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib ) rSt.SeekRel( 2 ); // read all font information - rSt.Read( pA, rFib.lcbSttbfffn - 2 ); + nFFn = rSt.Read( pA, nFFn ); if( eVersion < ww::eWW8 ) { // try to figure out how many fonts are defined here nMax = 0; - long nLeft = rFib.lcbSttbfffn - 2; + long nLeft = nFFn; for(;;) { short nNextSiz; diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index 9d3d0af1f6..107bde4aa4 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -295,6 +295,8 @@ private: machen wir uns hiermit einen PLC: */ void GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN ); + + void MakeFailedPLCF(); public: WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct, WW8_CP nStartPos = -1 ); -- cgit v1.2.3 From 4baf372accf56bcd46ffac705d58a8d5a6865660 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Tue, 15 Dec 2009 10:44:59 +0100 Subject: dtardon01: #i107683#: remove duplicate code --- sw/source/ui/uiview/view.cxx | 5 ----- 1 file changed, 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 191ff8ac0d..b00030d7bc 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -1418,11 +1418,6 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > pValue->Value >>= bSelectedFrame; bGotIsSelectedFrame = sal_True; } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsSelectedFrame" ) ) ) - { - pValue->Value >>= bSelectedFrame; - bGotIsSelectedFrame = sal_True; - } pValue++; } if (bGotVisibleBottom) -- cgit v1.2.3 From 254884761fd8c0e1e7b6bbbb2b6e7c16241a9788 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 15 Dec 2009 21:55:40 +0100 Subject: #i107706#: liquidate goodies module --- sw/inc/ndgrf.hxx | 2 +- sw/inc/pch/precompiled_sw.hxx | 4 ++-- sw/source/core/graphic/grfatr.cxx | 2 +- sw/source/core/layout/atrfrm.cxx | 2 +- sw/source/filter/xml/xmlbrsh.cxx | 2 +- sw/source/ui/config/modcfg.cxx | 2 +- sw/source/ui/dbui/dbmgr.cxx | 2 +- sw/source/ui/envelp/mailmrge.cxx | 2 +- sw/source/ui/utlui/attrdesc.cxx | 2 +- sw/util/makefile.mk | 2 -- 10 files changed, 10 insertions(+), 12 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx index fcef33fdba..b8450de23e 100644 --- a/sw/inc/ndgrf.hxx +++ b/sw/inc/ndgrf.hxx @@ -30,7 +30,7 @@ #ifndef _NDGRF_HXX #define _NDGRF_HXX #include -#include +#include #include // --> OD, MAV 2005-08-17 #i53025# #include diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index e8aadd472a..b029304b38 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -514,8 +514,8 @@ #include "framework/interaction.hxx" -#include "goodies/grfmgr.hxx" -#include "goodies/mailenum.hxx" +#include "svtools/grfmgr.hxx" +#include "svl/mailenum.hxx" #include "i18npool/lang.h" #include "i18npool/mslangid.hxx" diff --git a/sw/source/core/graphic/grfatr.cxx b/sw/source/core/graphic/grfatr.cxx index 66c1fd5f64..f2674d0565 100644 --- a/sw/source/core/graphic/grfatr.cxx +++ b/sw/source/core/graphic/grfatr.cxx @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 394303d743..b1b147f06f 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -108,7 +108,7 @@ /// include definition of class SvxBrushItem and GraphicObject /// in order to determine, if background is transparent. #include -#include +#include #ifndef _CMDID_H #include diff --git a/sw/source/filter/xml/xmlbrsh.cxx b/sw/source/filter/xml/xmlbrsh.cxx index fc2b637d0d..0342053314 100644 --- a/sw/source/filter/xml/xmlbrsh.cxx +++ b/sw/source/filter/xml/xmlbrsh.cxx @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx index fa89402682..d2dec9a594 100644 --- a/sw/source/ui/config/modcfg.cxx +++ b/sw/source/ui/config/modcfg.cxx @@ -36,7 +36,7 @@ #include #include #include -#include +#include #ifndef _SVX_SVXIDS_HRC //autogen #include #endif diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 6573946433..ad1377b9f2 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -77,7 +77,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index f24625638c..be2e890a92 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx index a25d2c801d..9cc2c2ddbb 100644 --- a/sw/source/ui/utlui/attrdesc.cxx +++ b/sw/source/ui/utlui/attrdesc.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk index fc1ff731b4..52cae5a57a 100644 --- a/sw/util/makefile.mk +++ b/sw/util/makefile.mk @@ -107,7 +107,6 @@ SHL1STDLIBS+= \ $(SFXLIB) \ $(XMLOFFLIB) \ $(BASICLIB) \ - $(GOODIESLIB) \ $(BASEGFXLIB) \ $(DRAWINGLAYERLIB) \ $(SVTOOLLIB) \ @@ -325,7 +324,6 @@ SHL4STDLIBS= \ $(SVXCORELIB) \ $(MSFILTERLIB) \ $(SFXLIB) \ - $(GOODIESLIB) \ $(BASEGFXLIB) \ $(SVTOOLLIB) \ $(TKLIB) \ -- cgit v1.2.3 From f6a8ea5495d3e3fc4368e706c3447db59fb144a7 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 15 Dec 2009 23:07:57 +0100 Subject: autorecovery: SfxViewFrame's SfxFrame is a reference now, no pointer (it can never be NULL) --- starmath/source/view.cxx | 6 +++--- sw/source/ui/app/appenv.cxx | 2 +- sw/source/ui/app/apphdl.cxx | 10 +++++----- sw/source/ui/app/applab.cxx | 2 +- sw/source/ui/app/docsh2.cxx | 2 +- sw/source/ui/app/swmodul1.cxx | 2 +- sw/source/ui/dbui/dbmgr.cxx | 6 +++--- sw/source/ui/dbui/mailmergewizard.cxx | 2 +- sw/source/ui/dbui/mmoutputpage.cxx | 6 +++--- sw/source/ui/dialog/macassgn.cxx | 2 +- sw/source/ui/docvw/edtdd.cxx | 2 +- sw/source/ui/docvw/edtwin.cxx | 2 +- sw/source/ui/docvw/romenu.cxx | 2 +- sw/source/ui/fldui/fldedt.cxx | 2 +- sw/source/ui/fmtui/tmpdlg.cxx | 2 +- sw/source/ui/frmdlg/frmdlg.cxx | 2 +- sw/source/ui/lingu/olmenu.cxx | 6 +++--- sw/source/ui/misc/glossary.cxx | 2 +- sw/source/ui/misc/glshell.cxx | 2 +- sw/source/ui/misc/insfnote.cxx | 2 +- sw/source/ui/misc/srtdlg.cxx | 2 +- sw/source/ui/shells/annotsh.cxx | 2 +- sw/source/ui/shells/basesh.cxx | 6 +++--- sw/source/ui/shells/drwtxtsh.cxx | 2 +- sw/source/ui/shells/tabsh.cxx | 2 +- sw/source/ui/shells/textsh.cxx | 2 +- sw/source/ui/shells/txtattr.cxx | 2 +- sw/source/ui/uiview/pview.cxx | 4 ++-- sw/source/ui/uiview/view.cxx | 12 ++++++------ sw/source/ui/uiview/view2.cxx | 2 +- sw/source/ui/uiview/viewling.cxx | 5 ++--- sw/source/ui/uiview/viewmdi.cxx | 6 +++--- sw/source/ui/uiview/viewport.cxx | 8 ++++---- sw/source/ui/uno/unodispatch.cxx | 3 +-- sw/source/ui/utlui/navipi.cxx | 2 +- sw/source/ui/utlui/numfmtlb.cxx | 2 +- sw/source/ui/utlui/uitool.cxx | 2 +- sw/source/ui/wrtsh/wrtsh1.cxx | 2 +- 38 files changed, 64 insertions(+), 66 deletions(-) (limited to 'sw/source') diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 78ed7ab5bf..d659b75493 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -354,7 +354,7 @@ void SmGraphicWindow::KeyInput(const KeyEvent& rKEvt) void SmGraphicWindow::Command(const CommandEvent& rCEvt) { BOOL bCallBase = TRUE; - if ( !pViewShell->GetViewFrame()->GetFrame()->IsInPlace() ) + if ( !pViewShell->GetViewFrame()->GetFrame().IsInPlace() ) { switch ( rCEvt.GetCommand() ) { @@ -1640,7 +1640,7 @@ void SmViewShell::Execute(SfxRequest& rReq) case SID_ATTR_ZOOM: { - if ( !GetViewFrame()->GetFrame()->IsInPlace() ) + if ( !GetViewFrame()->GetFrame().IsInPlace() ) { //CHINA001 SvxZoomDialog *pDlg = 0; AbstractSvxZoomDialog *pDlg = 0; @@ -1767,7 +1767,7 @@ void SmViewShell::GetState(SfxItemSet &rSet) case SID_ZOOMIN: case SID_ZOOMOUT: case SID_FITINWINDOW: - if ( GetViewFrame()->GetFrame()->IsInPlace() ) + if ( GetViewFrame()->GetFrame().IsInPlace() ) rSet.DisableItem( nWh ); break; diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx index 934bc95249..dc2be8ca28 100644 --- a/sw/source/ui/app/appenv.cxx +++ b/sw/source/ui/app/appenv.cxx @@ -520,7 +520,7 @@ static USHORT nTitleNo = 0; if (nMode == ENV_NEWDOC) { - pFrame->GetFrame()->Appear(); + pFrame->GetFrame().Appear(); if ( rItem.aAddrText.indexOf('<') >= 0 ) { diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 295f27339b..d0d9ad9a74 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -243,7 +243,7 @@ SwView* lcl_LoadDoc(SwView* pView, const String& rURL) if( pViewShell->ISA(SwView) ) { pNewView = PTR_CAST(SwView,pViewShell); - pNewView->GetViewFrame()->GetFrame()->Appear(); + pNewView->GetViewFrame()->GetFrame().Appear(); } else { @@ -477,7 +477,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM { SwView* pTargetView = m_pMMConfig->GetTargetView(); uno::Reference< frame::XFrame > xFrame = - m_pView->GetViewFrame()->GetFrame()->GetFrameInterface(); + m_pView->GetViewFrame()->GetFrame().GetFrameInterface(); xFrame->getContainerWindow()->setVisible(sal_False); DBG_ASSERT(pTargetView, "No target view has been created"); if(pTargetView) @@ -523,7 +523,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM { m_pView2Close = pTargetView; pTargetView->GetViewFrame()->GetTopViewFrame()->GetWindow().Hide(); - pSourceView->GetViewFrame()->GetFrame()->AppearWithUpdate(); + pSourceView->GetViewFrame()->GetFrame().AppearWithUpdate(); // the current view has be be set when the target is destroyed m_pView = pSourceView; m_pMMConfig->SetTargetView(0); @@ -562,7 +562,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM if(pDocShell->HasName() && !pDocShell->IsModified()) m_pMMConfig->GetSourceView()->GetViewFrame()->DoClose(); else - m_pMMConfig->GetSourceView()->GetViewFrame()->GetFrame()->Appear(); + m_pMMConfig->GetSourceView()->GetViewFrame()->GetFrame().Appear(); } ExecutionFinished( true ); break; @@ -596,7 +596,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, CancelHdl, AbstractMailMergeWizard*, EMPTY m_pMMConfig->SetTargetView(0); } if(m_pMMConfig->GetSourceView()) - m_pMMConfig->GetSourceView()->GetViewFrame()->GetFrame()->AppearWithUpdate(); + m_pMMConfig->GetSourceView()->GetViewFrame()->GetFrame().AppearWithUpdate(); m_pMMConfig->Commit(); delete m_pMMConfig; diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index 40ac8b9eb7..8ab8457033 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -257,7 +257,7 @@ static sal_uInt16 nBCTitleNo = 0; } xDocSh->SetTitle( aTmp ); - pViewFrame->GetFrame()->Appear(); + pViewFrame->GetFrame().Appear(); // Shell ermitteln SwWrtShell *pSh = pNewView->GetWrtShellPtr(); diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 70205e3dcb..d7cb08986a 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -710,7 +710,7 @@ void SwDocShell::Execute(SfxRequest& rReq) bOnly = FALSE; else if( IS_TYPE( SwPagePreView, pTmpFrm->GetViewShell())) { - pTmpFrm->GetFrame()->Appear(); + pTmpFrm->GetFrame().Appear(); bFound = TRUE; } if( bFound && !bOnly ) diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx index 50e28709d4..5b944740be 100644 --- a/sw/source/ui/app/swmodul1.cxx +++ b/sw/source/ui/app/swmodul1.cxx @@ -358,7 +358,7 @@ SwChapterNumRules* SwModule::GetChapterNumRules() void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, BOOL /*bOnlyIfAvailable*/) { - Reference xFrame = rView.GetViewFrame()->GetFrame()->GetFrameInterface(); + Reference xFrame = rView.GetViewFrame()->GetFrame().GetFrameInterface(); Reference xDP(xFrame, uno::UNO_QUERY); uno::Reference xBeamerFrame = xFrame->findFrame( diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 1116648198..3807b1e628 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -3186,11 +3186,11 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, SfxViewFrame* pTargetFrame = SfxViewFrame::LoadHiddenDocument( *xTargetDocShell, 0 ); //the created window has to be located at the same position as the source window - Window& rTargetWindow = pTargetFrame->GetFrame()->GetWindow(); - Window& rSourceWindow = rSourceView.GetViewFrame()->GetFrame()->GetWindow(); + Window& rTargetWindow = pTargetFrame->GetFrame().GetWindow(); + Window& rSourceWindow = rSourceView.GetViewFrame()->GetFrame().GetWindow(); rTargetWindow.SetPosPixel(rSourceWindow.GetPosPixel()); -// pTargetFrame->GetFrame()->Appear(); +// pTargetFrame->GetFrame().Appear(); SwView* pTargetView = static_cast( pTargetFrame->GetViewShell() ); rMMConfig.SetTargetView(pTargetView); //initiate SelectShell() to create sub shells diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index 6df323da4a..567df5c495 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -310,7 +310,7 @@ void SwMailMergeWizard::CreateTargetDocument() MergeDocuments( m_rConfigItem, *GetSwView() ); m_rConfigItem.SetMergeDone(); if( m_rConfigItem.GetTargetView() ) - m_rConfigItem.GetTargetView()->GetViewFrame()->GetFrame()->Appear(); + m_rConfigItem.GetTargetView()->GetViewFrame()->GetFrame().Appear(); } /*-- 23.08.2004 08:51:36--------------------------------------------------- diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index cf13e09115..db8f1e6d02 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -695,7 +695,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveStartHdl_Impl, PushButton*, pButton) { SfxViewFrame* pSourceViewFrm = pSourceView->GetViewFrame(); uno::Reference< frame::XFrame > xFrame = - pSourceViewFrm->GetFrame()->GetFrameInterface(); + pSourceViewFrm->GetFrame().GetFrameInterface(); xFrame->getContainerWindow()->setVisible(sal_True); pSourceViewFrm->GetDispatcher()->Execute(SID_SAVEDOC, SFX_CALLMODE_SYNCHRON); xFrame->getContainerWindow()->setVisible(sal_False); @@ -859,7 +859,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTempDocShell->DoInitNew( 0 ); SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); -// pTempFrame->GetFrame()->Appear(); +// pTempFrame->GetFrame().Appear(); SwView* pTempView = static_cast( pTempFrame->GetViewShell() ); pTargetView->GetWrtShell().StartAction(); SwgReaderOption aOpt; @@ -1245,7 +1245,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTempDocShell->DoInitNew( 0 ); SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); -// pTempFrame->GetFrame()->Appear(); +// pTempFrame->GetFrame().Appear(); SwView* pTempView = static_cast( pTempFrame->GetViewShell() ); pTargetView->GetWrtShell().StartAction(); SwgReaderOption aOpt; diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx index 9a06a311e1..13a81598b9 100644 --- a/sw/source/ui/dialog/macassgn.cxx +++ b/sw/source/ui/dialog/macassgn.cxx @@ -152,7 +152,7 @@ BOOL SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh, SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pMacroDlg = pFact->CreateSfxDialog( pParent, aSet, - rSh.GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), + rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), SID_EVENTCONFIG ); if ( pMacroDlg && pMacroDlg->Execute() == RET_OK ) { diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx index 82577b37ae..1675f51dc9 100644 --- a/sw/source/ui/docvw/edtdd.cxx +++ b/sw/source/ui/docvw/edtdd.cxx @@ -518,7 +518,7 @@ IMPL_LINK( SwEditWin, DDHandler, Timer *, EMPTYARG ) ReleaseMouse(); bFrmDrag = FALSE; - if ( rView.GetViewFrame() && rView.GetViewFrame()->GetFrame() ) + if ( rView.GetViewFrame() ) { bExecuteDrag = TRUE; StartExecuteDrag(); diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 0f45470c91..7129bcb217 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -4710,7 +4710,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) { SwWrtShell &rSh = rView.GetWrtShell(); - if ( !rView.GetViewFrame() || !rView.GetViewFrame()->GetFrame() ) + if ( !rView.GetViewFrame() ) { //Wenn der ViewFrame in Kuerze stirbt kein Popup mehr! Window::Command(rCEvt); diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx index e230b8581e..3c0ec8b1fb 100644 --- a/sw/source/ui/docvw/romenu.cxx +++ b/sw/source/ui/docvw/romenu.cxx @@ -218,7 +218,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : else EnableItem( MN_READONLY_LOADGRAPHIC, FALSE ); - BOOL bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame()->GetParentFrame(); + BOOL bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame(); EnableItem( MN_READONLY_RELOAD_FRAME, bReloadFrame ); EnableItem( MN_READONLY_RELOAD, !bReloadFrame); diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index 2826df5dd0..f9115988fd 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -410,7 +410,7 @@ IMPL_LINK( SwFldEditDlg, AddressHdl, PushButton *, EMPTYARG ) DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( this, aSet, - pSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), + pSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RC_DLG_ADDR ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if(RET_OK == pDlg->Execute()) diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index 026a59ade1..3102313345 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -570,7 +570,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) SfxAllItemSet aNewSet(*aSet.GetPool()); aNewSet.Put( SwMacroAssignDlg::AddEvents(MACASSGN_ALLFRM) ); if ( pWrtShell ) - rPage.SetFrame( pWrtShell->GetView().GetViewFrame()->GetFrame()->GetFrameInterface() ); + rPage.SetFrame( pWrtShell->GetView().GetViewFrame()->GetFrame().GetFrameInterface() ); rPage.PageCreated(aNewSet); break; } diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index b484810ed9..278697e3bd 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -196,7 +196,7 @@ void SwFrmDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) aNewSet.Put( SwMacroAssignDlg::AddEvents( DLG_FRM_GRF == m_nDlgType ? MACASSGN_GRAPHIC : DLG_FRM_OLE == m_nDlgType ? MACASSGN_OLE : MACASSGN_FRMURL ) ); if ( m_pWrtShell ) - rPage.SetFrame( m_pWrtShell->GetView().GetViewFrame()->GetFrame()->GetFrameInterface() ); + rPage.SetFrame( m_pWrtShell->GetView().GetViewFrame()->GetFrame().GetFrameInterface() ); rPage.PageCreated(aNewSet); break; } diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 46394469a0..d1d74d8ef8 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -279,7 +279,7 @@ USHORT SwSpellPopup::fillLangPopupMenu( //6--all languages used in current document uno::Reference< com::sun::star::frame::XModel > xModel; - uno::Reference< com::sun::star::frame::XController > xController( pWrtSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface()->getController(), uno::UNO_QUERY ); + uno::Reference< com::sun::star::frame::XController > xController( pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface()->getController(), uno::UNO_QUERY ); if ( xController.is() ) xModel = xController->getModel(); @@ -580,7 +580,7 @@ bGrammarResults(false) nNumLanguageDocEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, 2 ); EnableItem( MN_LANGUAGE_ALL_TEXT, true ); */ - uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface(); + uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(); Image rImg = ::GetImage( xFrame, ::rtl::OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False, Application::GetSettings().GetStyleSettings().GetHighContrastMode() ); @@ -714,7 +714,7 @@ aInfo16( SW_RES(IMG_INFO_16) ) nNumLanguageDocEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, 2 ); EnableItem( MN_LANGUAGE_ALL_TEXT, true ); */ - uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface(); + uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(); Image rImg = ::GetImage( xFrame, ::rtl::OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False, Application::GetSettings().GetStyleSettings().GetHighContrastMode() ); diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 89a37a86e7..a99ec57c05 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -661,7 +661,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn ) const SfxPoolItem* pItem; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pMacroDlg = pFact->CreateSfxDialog( this, aSet, - pSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), SID_EVENTCONFIG ); + pSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(), SID_EVENTCONFIG ); if ( pMacroDlg && pMacroDlg->Execute() == RET_OK && SFX_ITEM_SET == pMacroDlg->GetOutputItemSet()->GetItemState( RES_FRMMACRO, sal_False, &pItem ) ) { diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx index 4575a7ecc2..927115f774 100644 --- a/sw/source/ui/misc/glshell.cxx +++ b/sw/source/ui/misc/glshell.cxx @@ -346,7 +346,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS xDocSh->GetDoc()->DoUndo( bDoesUndo ); xDocSh->GetDoc()->ResetModified(); if ( bShow ) - pFrame->GetFrame()->Appear(); + pFrame->GetFrame().Appear(); delete pGroup; } diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index e0f21b11cf..72feadb807 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -176,7 +176,7 @@ IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( this, aAllSet, - rSh.GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); + rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); if (RET_OK == pDlg->Execute()) { SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, FALSE ); diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 52c7686dc9..1439368639 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -396,7 +396,7 @@ IMPL_LINK( SwSortDlg, DelimCharHdl, PushButton*, EMPTYARG ) SfxAllItemSet aSet( rSh.GetAttrPool() ); aSet.Put( SfxInt32Item( SID_ATTR_CHAR, GetDelimChar() ) ); SfxAbstractDialog* pMap = pFact->CreateSfxDialog( &aDelimPB, aSet, - rSh.GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); + rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); if( RET_OK == pMap->Execute() ) { SFX_ITEMSET_ARG( pMap->GetOutputItemSet(), pItem, SfxInt32Item, SID_ATTR_CHAR, FALSE ); diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 68b8e87c3b..d3ec548ee8 100755 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -1557,7 +1557,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) // Wenn Zeichen selektiert ist kann es angezeigt werden SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet, - rView.GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); + rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); USHORT nResult = pDlg->Execute(); if( nResult == RET_OK ) diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 84b6f53a57..3282277038 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -2548,7 +2548,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) SvxBrushItem aBrush(RES_BACKGROUND); rSh.GetBoxBackground( aBrush ); pDlg = pFact->CreateSfxDialog( pMDI, aSet, - rView.GetViewFrame()->GetFrame()->GetFrameInterface(), + rView.GetViewFrame()->GetFrame().GetFrameInterface(), RC_SWDLG_BACKGROUND ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); aSet.Put( aBrush ); @@ -2567,7 +2567,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) rSh.GetFlyFrmAttr( aSet ); pDlg = pFact->CreateSfxDialog( pMDI, aSet, - rView.GetViewFrame()->GetFrame()->GetFrameInterface(), + rView.GetViewFrame()->GetFrame().GetFrameInterface(), RC_SWDLG_BACKGROUND ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if ( pDlg->Execute() == RET_OK ) @@ -2582,7 +2582,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) rSh.GetCurAttr( aSet ); pDlg = pFact->CreateSfxDialog( pMDI, aSet, - rView.GetViewFrame()->GetFrame()->GetFrameInterface(), + rView.GetViewFrame()->GetFrame().GetFrameInterface(), RC_SWDLG_BACKGROUND ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if ( pDlg->Execute() == RET_OK ) diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index ad6ab1d2e7..6366fd2e0f 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -816,7 +816,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) // Wenn Zeichen selektiert ist kann es angezeigt werden SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet, - rView.GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); + rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); USHORT nResult = pDlg->Execute(); if( nResult == RET_OK ) { diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx index 577ea95c64..07b482510a 100644 --- a/sw/source/ui/shells/tabsh.cxx +++ b/sw/source/ui/shells/tabsh.cxx @@ -736,7 +736,7 @@ void SwTableShell::Execute(SfxRequest &rReq) DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( GetView().GetWindow(),aCoreSet, - pView->GetViewFrame()->GetFrame()->GetFrameInterface(), + pView->GetViewFrame()->GetFrame().GetFrameInterface(), RC_DLG_SWNUMFMTDLG ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 965b0f5d32..ace99561a6 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -1149,7 +1149,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( GetView().GetWindow(), aAllSet, - GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); + GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); if( RET_OK == pDlg->Execute() ) { SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE ); diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx index fc64a6c132..3b47b45980 100644 --- a/sw/source/ui/shells/txtattr.cxx +++ b/sw/source/ui/shells/txtattr.cxx @@ -564,7 +564,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq) DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( GetView().GetWindow(), aSet, - rSh.GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), DLG_SWDROPCAPS ); + rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), DLG_SWDROPCAPS ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if (pDlg->Execute() == RET_OK) { diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 7e84c7f4c7..56891e4e15 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -1822,7 +1822,7 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): pPageUpBtn(0), pPageDownBtn(0), pScrollFill(new ScrollBarBox( &pViewFrame->GetWindow(), - pViewFrame->GetFrame()->GetParentFrame() ? 0 : WB_SIZEABLE )), + pViewFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )), mnPageCount( 0 ), // OD 09.01.2003 #106334# mbResetFormDesignMode( false ), @@ -1913,7 +1913,7 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): { // es gibt noch eine weitere Sicht auf unser Dokument, also // aktiviere dieses - pFrame->GetFrame()->Appear(); + pFrame->GetFrame().Appear(); break; } */} diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index a12dd60de9..5377b7c297 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -173,7 +173,7 @@ inline SfxDispatcher &SwView::GetDispatcher() void SwView::ImpSetVerb( int nSelType ) { sal_Bool bResetVerbs = bVerbsActive; - if ( !GetViewFrame()->GetFrame()->IsInPlace() && + if ( !GetViewFrame()->GetFrame().IsInPlace() && (nsSelectionType::SEL_OLE|nsSelectionType::SEL_GRF) & nSelType ) { if ( !pWrtShell->IsSelObjProtected(FLYPROTECT_CONTENT) ) @@ -755,7 +755,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) pFormShell(0), pHScrollbar(0), pVScrollbar(0), - pScrollFill(new ScrollBarBox( &_pFrame->GetWindow(), _pFrame->GetFrame()->GetParentFrame() ? 0 : WB_SIZEABLE )), + pScrollFill(new ScrollBarBox( &_pFrame->GetWindow(), _pFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )), pHRuler( new SvxRuler(&GetViewFrame()->GetWindow(), pEditWin, SVXRULER_SUPPORT_TABS | SVXRULER_SUPPORT_PARAGRAPH_MARGINS | @@ -939,7 +939,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) pVRuler->SetActive( sal_True ); SfxViewFrame* pViewFrame = GetViewFrame(); - if( pViewFrame->GetFrame()->GetParentFrame()) + if( pViewFrame->GetFrame().GetParentFrame()) { aUsrPref.SetViewHRuler(sal_False); aUsrPref.SetViewVRuler(sal_False); @@ -1046,10 +1046,10 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) /*uno::Reference< awt::XWindow > aTmpRef; - _pFrame->GetFrame()->GetFrameInterface()->setComponent( aTmpRef, + _pFrame->GetFrame().GetFrameInterface()->setComponent( aTmpRef, pViewImpl->GetUNOObject_Impl());*/ - uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame()->GetFrameInterface(); + uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame().GetFrameInterface(); uno::Reference< frame::XFrame > xBeamerFrame = xFrame->findFrame( OUString::createFromAscii("_beamer"), frame::FrameSearchFlag::CHILDREN); @@ -1611,7 +1611,7 @@ void SwView::ShowCursor( FASTBOOL bOn ) ErrCode SwView::DoVerb( long nVerb ) { - if ( !GetViewFrame()->GetFrame()->IsInPlace() ) + if ( !GetViewFrame()->GetFrame().IsInPlace() ) { SwWrtShell &rSh = GetWrtShell(); const int nSel = rSh.GetSelectionType(); diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index e5b0e1eb4d..accca46e7a 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -1051,7 +1051,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq) if(bQuery) { SfxViewFrame* pTmpFrame = GetViewFrame(); - SfxHelp::OpenHelpAgent( pTmpFrame->GetFrame(), HID_MAIL_MERGE_SELECT ); + SfxHelp::OpenHelpAgent( &pTmpFrame->GetFrame(), HID_MAIL_MERGE_SELECT ); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); AbstractMailMergeCreateFromDlg* pDlg = pFact->CreateMailMergeCreateFromDlg( DLG_MERGE_CREATE, diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index 304457a828..3a300182fe 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -842,10 +842,9 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt) else { SfxViewFrame *pSfxViewFrame = GetViewFrame(); - SfxFrame *pSfxFrame = pSfxViewFrame? pSfxViewFrame->GetFrame() : 0; uno::Reference< frame::XFrame > xFrame; - if (pSfxFrame) - xFrame = pSfxFrame->GetFrameInterface(); + if ( pSfxViewFrame ) + xFrame = pSfxViewFrame->GetFrame().GetFrameInterface(); com::sun::star::util::URL aURL; uno::Reference< frame::XDispatchProvider > xDispatchProvider( xFrame, UNO_QUERY ); uno::Reference< lang::XMultiServiceFactory > xMgr( utl::getProcessServiceFactory(), uno::UNO_QUERY ); diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx index 7fdf5789ad..5a7a298b4d 100644 --- a/sw/source/ui/uiview/viewmdi.cxx +++ b/sw/source/ui/uiview/viewmdi.cxx @@ -181,7 +181,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, nFac = Max( long( MINZOOM ), nFac ); SwViewOption aOpt( *pOpt ); - if ( !GetViewFrame()->GetFrame()->IsInPlace() ) + if ( !GetViewFrame()->GetFrame().IsInPlace() ) { //MasterUsrPrefs updaten UND DANACH die ViewOptions der aktuellen //View updaten. @@ -264,7 +264,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly ) ACT_KONTEXT(pWrtShell); - if ( !GetViewFrame()->GetFrame()->IsInPlace() && !bViewOnly ) + if ( !GetViewFrame()->GetFrame().IsInPlace() && !bViewOnly ) { const BOOL bWeb = 0 != PTR_CAST(SwWebView, this); SwMasterUsrPref *pUsrPref = (SwMasterUsrPref*)SW_MOD()->GetUsrPref(bWeb); @@ -350,7 +350,7 @@ void SwView::CreatePageButtons(BOOL bShow) pPageUpBtn->SetHelpId(HID_SCRL_PAGEUP); pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), FALSE ); pPageDownBtn->SetHelpId(HID_SCRL_PAGEDOWN); - Reference< XFrame > xFrame = GetViewFrame()->GetFrame()->GetFrameInterface(); + Reference< XFrame > xFrame = GetViewFrame()->GetFrame().GetFrameInterface(); pNaviBtn = new SwNaviImageButton(pMDI, xFrame ); pNaviBtn->SetHelpId(HID_SCRL_NAVI); Link aLk( LINK( this, SwView, BtnPage ) ); diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx index 708372d35d..5fcd9f4433 100644 --- a/sw/source/ui/uiview/viewport.cxx +++ b/sw/source/ui/uiview/viewport.cxx @@ -224,7 +224,7 @@ aDocSz = rSz; SetVisArea( aNewVisArea, FALSE ); if ( UpdateScrollbars() && !bInOuterResizePixel && !bInInnerResizePixel && - !GetViewFrame()->GetFrame()->IsInPlace()) + !GetViewFrame()->GetFrame().IsInPlace()) OuterResizePixel( Point(), GetViewFrame()->GetWindow().GetOutputSizePixel() ); } @@ -358,7 +358,7 @@ void SwView::SetVisArea( const Point &rPt, BOOL bUpdateScrollbar ) void SwView::CheckVisArea() { pHScrollbar->SetAuto( pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) && - !GetViewFrame()->GetFrame()->IsInPlace() ); + !GetViewFrame()->GetFrame().IsInPlace() ); if ( IsDocumentBorder() ) { if ( aVisArea.Left() != DOCUMENTBORDER || @@ -735,7 +735,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar ) { // JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE, // so we dont must do it agin. -// if(!GetViewFrame()->GetFrame()->IsInPlace()) +// if(!GetViewFrame()->GetFrame().IsInPlace()) // S F X_BINDINGS().Update(FN_STAT_PAGE); //QuickHelp: @@ -1056,7 +1056,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize ) Size aSz( rSize ); SvBorder aBorder; CalcAndSetBorderPixel( aBorder, TRUE ); - if ( GetViewFrame()->GetFrame()->IsInPlace() ) + if ( GetViewFrame()->GetFrame().IsInPlace() ) { Size aViewSize( aSz ); Point aViewPos( rOfst ); diff --git a/sw/source/ui/uno/unodispatch.cxx b/sw/source/ui/uno/unodispatch.cxx index 44b82239b1..81359b690f 100644 --- a/sw/source/ui/uno/unodispatch.cxx +++ b/sw/source/ui/uno/unodispatch.cxx @@ -59,8 +59,7 @@ const sal_Char* cInternalDBChangeNotification = ".uno::Writer/DataSourceChanged" SwXDispatchProviderInterceptor::SwXDispatchProviderInterceptor(SwView& rVw) : m_pView(&rVw) { - SfxFrame* pFrame = m_pView->GetViewFrame()->GetFrame(); - uno::Reference< frame::XFrame> xUnoFrame = pFrame->GetFrameInterface(); + uno::Reference< frame::XFrame> xUnoFrame = m_pView->GetViewFrame()->GetFrame().GetFrameInterface(); m_xIntercepted = uno::Reference< frame::XDispatchProviderInterception>(xUnoFrame, uno::UNO_QUERY); if(m_xIntercepted.is()) { diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 4de16c64fa..502958b27d 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -503,7 +503,7 @@ void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus { // SfxBindings& rBind = GetCreateView()->GetViewFrame()->GetBindings(); // rBind.ENTERREGISTRATIONS(); - Reference< XFrame > xFrame = GetCreateView()->GetViewFrame()->GetFrame()->GetFrameInterface(); + Reference< XFrame > xFrame = GetCreateView()->GetViewFrame()->GetFrame().GetFrameInterface(); SwScrollNaviPopup* pPopup = new SwScrollNaviPopup(FN_SCROLL_NAVIGATION, xFrame ); diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx index d6ea01d58b..e4bd3c7a03 100644 --- a/sw/source/ui/utlui/numfmtlb.cxx +++ b/sw/source/ui/utlui/numfmtlb.cxx @@ -438,7 +438,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox ) DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( this, aCoreSet, - GetView()->GetViewFrame()->GetFrame()->GetFrameInterface(), + GetView()->GetViewFrame()->GetFrame().GetFrameInterface(), RC_DLG_SWNUMFMTDLG ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx index e9dcc6785a..4658ee86ca 100644 --- a/sw/source/ui/utlui/uitool.cxx +++ b/sw/source/ui/utlui/uitool.cxx @@ -759,7 +759,7 @@ bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, USHORT nId } if(sCommand.Len()) { - uno::Reference< frame::XFrame > xFrame = rViewFrame.GetFrame()->GetFrameInterface(); + uno::Reference< frame::XFrame > xFrame = rViewFrame.GetFrame().GetFrameInterface(); uno::Reference < frame::XDispatchProvider > xProv( xFrame, uno::UNO_QUERY ); util::URL aURL; aURL.Complete = sCommand; diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 6294722f46..d3ff54648d 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -645,7 +645,7 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm void SwWrtShell::LaunchOLEObj( long nVerb ) { if ( GetCntType() == CNT_OLE && - !GetView().GetViewFrame()->GetFrame()->IsInPlace() ) + !GetView().GetViewFrame()->GetFrame().IsInPlace() ) { svt::EmbeddedObjectRef& xRef = GetOLEObject(); ASSERT( xRef.is(), "OLE not found" ); -- cgit v1.2.3 From 822b273c153cfbb886184fd01ecf40eb06426218 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 15 Dec 2009 23:31:21 +0100 Subject: autorecovery: Sfx(View)Frame::GetTopFrame now also returning a SfxFrame& instead of an SfxFrame* --- sw/source/ui/chrdlg/chardlg.cxx | 4 ++-- sw/source/ui/shells/basesh.cxx | 2 +- sw/source/ui/shells/frmsh.cxx | 2 +- sw/source/ui/shells/grfsh.cxx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 033d96e955..bd9b17e46a 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -244,8 +244,8 @@ SwCharURLPage::SwCharURLPage( Window* pParent, ::FillCharStyleListBox(aNotVisitedLB, pView->GetDocShell()); TargetList* pList = new TargetList; - const SfxFrame* pFrame = pView->GetViewFrame()->GetTopFrame(); - pFrame->GetTargetList(*pList); + const SfxFrame& rFrame = pView->GetViewFrame()->GetTopFrame(); + rFrame.GetTargetList(*pList); USHORT nCount = (USHORT)pList->Count(); if( nCount ) { diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 3282277038..0bec8d4784 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -192,7 +192,7 @@ void lcl_UpdateIMapDlg( SwWrtShell& rSh ) void* pEditObj = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType ? rSh.GetIMapInventor() : 0; TargetList* pList = new TargetList; - rSh.GetView().GetViewFrame()->GetTopFrame()->GetTargetList(*pList); + rSh.GetView().GetViewFrame()->GetTopFrame().GetTargetList(*pList); SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 57f2babbfb..37abb3a976 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -453,7 +453,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, FALSE, &pItem) == SFX_ITEM_SET) nDefPage = ((SfxUInt16Item *)pItem)->GetValue(); - aSet.Put(SfxFrameItem( SID_DOCFRAME, GetView().GetViewFrame()->GetTopFrame())); + aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame())); FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView())); SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric) )); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx index e0e5ec9178..7669b3561b 100644 --- a/sw/source/ui/shells/grfsh.cxx +++ b/sw/source/ui/shells/grfsh.cxx @@ -228,7 +228,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) aSet.Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, aUsrPref.IsKeepRatio())); aSet.Put(SfxBoolItem( SID_ATTR_GRAF_KEEP_ZOOM, aUsrPref.IsGrfKeepZoom())); - aSet.Put(SfxFrameItem( SID_DOCFRAME, GetView().GetViewFrame()->GetTopFrame())); + aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame())); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); -- cgit v1.2.3 From d54d39baf193e6ef41e131cfee656ebaf52f639d Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Thu, 17 Dec 2009 12:17:52 +0100 Subject: #i100000# corrected includes --- sw/source/core/fields/docufld.cxx | 8 ++++---- sw/source/ui/fldui/flddinf.cxx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 039da17af4..daf8e04387 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -61,10 +61,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 4dec023a6f..47f10db6fb 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -59,7 +60,6 @@ #ifndef _VIEW_HXX #include #endif -#include #include #include #include -- cgit v1.2.3 From 251ca43a018bfb0e011b787a3af47fa299b4eff7 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 18 Dec 2009 09:48:23 +0100 Subject: autorecovery: removed a few unused slot IDs --- sw/sdi/_docsh.sdi | 4 ---- sw/source/ui/app/docsh2.cxx | 12 ------------ 2 files changed, 16 deletions(-) (limited to 'sw/source') diff --git a/sw/sdi/_docsh.sdi b/sw/sdi/_docsh.sdi index cf71e18bd8..901a72104c 100644 --- a/sw/sdi/_docsh.sdi +++ b/sw/sdi/_docsh.sdi @@ -78,10 +78,6 @@ interface BaseTextDocument : OfficeDocument ExecMethod = Execute ; ] - SID_MAIL_PREPAREEXPORT - [ - ExecMethod = Execute ; - ] SID_MAIL_EXPORT_FINISHED [ ExecMethod = Execute; diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index d7cb08986a..4936b57525 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1203,18 +1203,6 @@ void SwDocShell::Execute(SfxRequest& rReq) } break; - case SID_MAIL_PREPAREEXPORT: - { - //pWrtShell is not set in page preview - if(pWrtShell) - pWrtShell->StartAllAction(); - pDoc->UpdateFlds( NULL, false ); - pDoc->EmbedAllLinks(); - pDoc->RemoveInvisibleContent(); - if(pWrtShell) - pWrtShell->EndAllAction(); - } - break; case SID_MAIL_EXPORT_FINISHED: { if(pWrtShell) -- cgit v1.2.3 From 5abca2ffe9e74fe129d7944d03b0eed208d0f4ab Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 18 Dec 2009 12:34:33 +0100 Subject: autorecovery: ensure that unsaved XML forms are properly recovered, by properly respecting the 'Hidden' load parameter --- sw/source/ui/app/apphdl.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index d0d9ad9a74..f6a7c959b7 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -959,8 +959,7 @@ void NewXForms( SfxRequest& rReq ) static_cast( &xDocSh )->GetDoc()->initXForms( true ); // load document into frame - SFX_REQUEST_ARG( rReq, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE ); - SfxViewFrame::LoadDocumentIntoFrame( *xDocSh, pFrameItem ); + SfxViewFrame::DisplayNewDocument( *xDocSh, rReq ); // set return value rReq.SetReturnValue( SfxVoidItem( rReq.GetSlot() ) ); -- cgit v1.2.3 From b22cd7e3217cfdf63d6f26cbd4cabb9533d9e546 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 18 Dec 2009 13:44:13 +0100 Subject: autorecovery: oops, *this* version of LoadDocumentIntoFrame was just removed --- sw/source/ui/app/applab.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index 8ab8457033..76d80ba4ea 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -237,8 +237,7 @@ static sal_uInt16 nBCTitleNo = 0; pDocSh->getIDocumentDeviceAccess()->setJobsetup(pPrt->GetJobSetup()); } - SFX_REQUEST_ARG( rReq, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE ); - SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *xDocSh, pFrameItem ); + SfxViewFrame* pViewFrame = SfxViewFrame::DisplayNewDocument( *xDocSh, rReq ); SwView *pNewView = (SwView*) pViewFrame->GetViewShell(); pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird. -- cgit v1.2.3 From 324e47537525469ce47d7591717aa58c0e03128f Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Mon, 28 Dec 2009 13:49:39 +0100 Subject: sw33bf02: #i105535# method - handle unexpected situation for to-frame anchored fly frames - Save determination of content node for to-frame anchored fly frame - If no fly frame for to-frame anchored fly frame is found, fallback to to-paragraph anchored fly frame. --- sw/source/core/layout/atrfrm.cxx | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 394303d743..9d5cdf17c5 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -2718,10 +2718,23 @@ void SwFlyFrmFmt::MakeFrms() //die Suche vom StartNode zum FrameFormat sein. SwNodeIndex aIdx( aAnchorAttr.GetCntntAnchor()->nNode ); SwCntntNode *pCNd = GetDoc()->GetNodes().GoNext( &aIdx ); - SwClientIter aIter( *pCNd ); - if ( aIter.First( TYPE(SwFrm) ) ) - pModify = pCNd; - else + // --> OD 2009-12-28 #i105535# + if ( pCNd == 0 ) + { + pCNd = aAnchorAttr.GetCntntAnchor()->nNode.GetNode().GetCntntNode(); + } + if ( pCNd ) + // <-- + { + SwClientIter aIter( *pCNd ); + if ( aIter.First( TYPE(SwFrm) ) ) + { + pModify = pCNd; + } + } + // --> OD 2009-12-28 #i105535# + if ( pModify == 0 ) + // <-- { const SwNodeIndex &rIdx = aAnchorAttr.GetCntntAnchor()->nNode; SwSpzFrmFmts& rFmts = *GetDoc()->GetSpzFrmFmts(); @@ -2793,7 +2806,24 @@ void SwFlyFrmFmt::MakeFrms() !((SwCntntFrm*)pFrm)->IsFollow(); if ( FLY_AT_FLY == aAnchorAttr.GetAnchorId() && !pFrm->IsFlyFrm() ) - pFrm = pFrm->FindFlyFrm(); + { + // --> OD 2009-12-28 #i105535# + // fallback to anchor type at-paragraph, if no fly frame is found. +// pFrm = pFrm->FindFlyFrm(); + SwFrm* pFlyFrm = pFrm->FindFlyFrm(); + if ( pFlyFrm ) + { + pFrm = pFlyFrm; + } + else + { + aAnchorAttr.SetType( FLY_AT_CNTNT ); + SetFmtAttr( aAnchorAttr ); + MakeFrms(); + return; + } + // <-- + } if( pFrm->GetDrawObjs() ) { -- cgit v1.2.3 From 4f679da1d5d6983368a1dc91f84ec6ddf3ab8184 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Mon, 28 Dec 2009 13:53:06 +0100 Subject: sw33bf02: #i105535# method - no update of anchor attribute for frame styles. --- sw/source/ui/app/docst.cxx | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx index 67828f5471..551be4df6d 100644 --- a/sw/source/ui/app/docst.cxx +++ b/sw/source/ui/app/docst.cxx @@ -548,7 +548,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam } pDStyle->GetCollection()->SetDerivedFrom( pColl ); pDStyle->PresetParent( rParent ); - + //#outline level,add by zhaojianwei /*When a new paragraph style is created based on a "to outline style assigned" paragraph style, the outline level attribute and the list @@ -559,7 +559,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam SwNumRuleItem aItem(aEmptyStr); pDStyle->GetCollection()->SetFmtAttr( aItem ); pDStyle->GetCollection()->SetAttrOutlineLevel( 0 ); - } + } //<-end,zhaojianwei } @@ -1019,18 +1019,10 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* pCurrWrtShell->StartAllAction(); pCurrWrtShell->GetFlyFrmAttr( aSet ); - // JP 10.06.98: nur automatische Orientierungen uebernehmen -/* #61359# jetzt auch wieder alle Orientierungen - * const SfxPoolItem* pItem; - if( SFX_ITEM_SET == aSet.GetItemState( RES_VERT_ORIENT, - FALSE, &pItem ) && - text::VertOrientation::NONE == ((SwFmtVertOrient*)pItem)->GetVertOrient()) - aSet.ClearItem( RES_VERT_ORIENT ); - - if( SFX_ITEM_SET == aSet.GetItemState( RES_HORI_ORIENT, - FALSE, &pItem ) && - text::HoriOrientation::NONE == ((SwFmtHoriOrient*)pItem)->GetHoriOrient()) - aSet.ClearItem( RES_HORI_ORIENT );*/ + // --> OD 2009-12-28 #i105535# + // no update of anchor attribute + aSet.ClearItem( RES_ANCHOR ); + // <-- pFrm->SetFmtAttr( aSet ); -- cgit v1.2.3 From c8925aff07a7c58ecba36aebdb2e0e8714f77269 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Mon, 28 Dec 2009 14:51:02 +0100 Subject: sw33bf02: #i104291# method - adjustments avoid overflow. --- sw/source/core/text/txtfrm.cxx | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 0efd87ef72..491fd46a1a 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -633,23 +633,34 @@ void SwTxtFrm::HideAndShowObjects() *************************************************************************/ xub_StrLen SwTxtFrm::FindBrk( const XubString &rTxt, - const xub_StrLen nStart, const xub_StrLen nEnd ) const + const xub_StrLen nStart, + const xub_StrLen nEnd ) const { - xub_StrLen nFound = nStart; + // --> OD 2009-12-28 #i104291# - applying patch to avoid overflow. + unsigned long nFound = nStart; const xub_StrLen nEndLine = Min( nEnd, rTxt.Len() ); // Wir ueberlesen erst alle Blanks am Anfang der Zeile (vgl. Bug 2235). - while( nFound <= nEndLine && ' ' == rTxt.GetChar( nFound ) ) - ++nFound; + while( nFound <= nEndLine && + ' ' == rTxt.GetChar( static_cast(nFound) ) ) + { + nFound++; + } // Eine knifflige Sache mit den TxtAttr-Dummy-Zeichen (hier "$"): // "Dr.$Meyer" am Anfang der zweiten Zeile. Dahinter ein Blank eingegeben // und das Wort rutscht nicht in die erste Zeile, obwohl es ginge. // Aus diesem Grund nehmen wir das Dummy-Zeichen noch mit. - while( nFound <= nEndLine && ' ' != rTxt.GetChar( nFound ) ) - ++nFound; + while( nFound <= nEndLine && + ' ' != rTxt.GetChar( static_cast(nFound) ) ) + { + nFound++; + } - return nFound; + return nFound <= STRING_LEN + ? static_cast(nFound) + : STRING_LEN; + // <-- } /************************************************************************* -- cgit v1.2.3 From b69932b642c5d8049802e406fc0b8a5463cf3629 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 29 Dec 2009 09:19:13 +0100 Subject: sw33bf02: #i104750 removal of "scrolling instead of painting optimization" --- sw/inc/viewsh.hxx | 7 - sw/source/core/crsr/crsrsh.cxx | 9 +- sw/source/core/doc/notxtfrm.cxx | 69 +-- sw/source/core/inc/layact.hxx | 6 - sw/source/core/inc/scrrect.hxx | 128 ---- sw/source/core/inc/txtfrm.hxx | 3 - sw/source/core/inc/viewimp.hxx | 63 +- sw/source/core/layout/layact.cxx | 485 +-------------- sw/source/core/layout/paintfrm.cxx | 2 +- sw/source/core/layout/tabfrm.cxx | 3 - sw/source/core/text/frmpaint.cxx | 68 -- sw/source/core/view/makefile.mk | 7 +- sw/source/core/view/scrrect.cxx | 1195 ------------------------------------ sw/source/core/view/viewimp.cxx | 19 +- sw/source/core/view/viewsh.cxx | 58 +- 15 files changed, 66 insertions(+), 2056 deletions(-) delete mode 100644 sw/source/core/inc/scrrect.hxx delete mode 100644 sw/source/core/view/scrrect.cxx (limited to 'sw/source') diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index afff32a04d..103482b9c5 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -183,9 +183,6 @@ class SW_DLLPUBLIC ViewShell : public Ring SW_DLLPRIVATE sal_Bool CheckInvalidForPaint( const SwRect & );//Direkt Paint oder lieber //eine Aktion ausloesen. - SW_DLLPRIVATE void Scroll(); //Scrollen wenn sich aus der LayAction Scrollmoeglichkeiten - //ergaben. - SW_DLLPRIVATE void PrepareForPrint( const SwPrtOptions &rOptions ); SW_DLLPRIVATE void ImplApplyViewOptions( const SwViewOption &rOpt ); @@ -233,11 +230,7 @@ public: void ChgHyphenation() { Reformat(); } void ChgNumberDigits(); - //Methoden fuer Paint- und Scrollrects, die auf allen Shells im - //Ring arbeiten. sal_Bool AddPaintRect( const SwRect &rRect ); - void AddScrollRect( const SwFrm *pFrm, const SwRect &rRect, long nOffs ); - void SetNoNextScroll(); void InvalidateWindows( const SwRect &rRect ); diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index efb7c6bd76..819527666b 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -1773,13 +1773,6 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd ) } } - //Ggf. gescrollten Bereicht korrigieren (Alignment). - //Nur wenn gescrollt wurde, und wenn keine Selektion existiert. - if( pFrm && Imp()->IsScrolled() && - pShellCrsr->GetNext() == pShellCrsr && !pShellCrsr->HasMark() ) - Imp()->RefreshScrolledArea( aCharRect ); - - eMvState = MV_NONE; // Status fuers Crsr-Travelling - GetCrsrOfst if( pFrm && Imp()->IsAccessible() ) diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index a5c058bb4f..3aa5151d9b 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -298,14 +298,6 @@ void SwNoTxtFrm::Paint( const SwRect &rRect ) const // <-- StopAnimation(); - if ( pSh->Imp()->IsPaintInScroll() && pSh->GetWin() && rRect != Frm() && - HasAnimation() ) - { - pSh->GetWin()->Invalidate( Frm().SVRect() ); - return; - } - - SfxProgress::EnterLock(); //Keine Progress-Reschedules im Paint (SwapIn) OutputDevice *pOut = pSh->GetOut(); @@ -802,29 +794,30 @@ void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) void lcl_correctlyAlignRect( SwRect& rAlignedGrfArea, const SwRect& rInArea, OutputDevice* pOut ) { + if(!pOut) return; - Rectangle aPxRect = pOut->LogicToPixel( rInArea.SVRect() ); - Rectangle aNewPxRect( aPxRect ); - while( aNewPxRect.Left() < aPxRect.Left() ) - { - rAlignedGrfArea.Left( rAlignedGrfArea.Left()+1 ); - aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() ); - } - while( aNewPxRect.Top() < aPxRect.Top() ) - { - rAlignedGrfArea.Top( rAlignedGrfArea.Top()+1 ); - aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() ); - } - while( aNewPxRect.Bottom() > aPxRect.Bottom() ) - { - rAlignedGrfArea.Bottom( rAlignedGrfArea.Bottom()-1 ); - aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() ); - } - while( aNewPxRect.Right() > aPxRect.Right() ) - { - rAlignedGrfArea.Right( rAlignedGrfArea.Right()-1 ); - aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() ); + Rectangle aPxRect = pOut->LogicToPixel( rInArea.SVRect() ); + Rectangle aNewPxRect( aPxRect ); + while( aNewPxRect.Left() < aPxRect.Left() ) + { + rAlignedGrfArea.Left( rAlignedGrfArea.Left()+1 ); + aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() ); + } + while( aNewPxRect.Top() < aPxRect.Top() ) + { + rAlignedGrfArea.Top( rAlignedGrfArea.Top()+1 ); + aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() ); + } + while( aNewPxRect.Bottom() > aPxRect.Bottom() ) + { + rAlignedGrfArea.Bottom( rAlignedGrfArea.Bottom()-1 ); + aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() ); + } + while( aNewPxRect.Right() > aPxRect.Right() ) + { + rAlignedGrfArea.Right( rAlignedGrfArea.Right()-1 ); + aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() ); } } @@ -846,7 +839,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons pOut->GetConnectMetaFile(); const bool bIsChart = pOLENd && ChartPrettyPainter::IsChart( pOLENd->GetOLEObj().GetObject() ); - + /// OD 25.09.2002 #99739# - calculate aligned rectangle from parameter . /// Use aligned rectangle instead of in /// the following code. @@ -861,14 +854,14 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons ::SwAlignGrfRect( &aAlignedGrfArea, *pOut ); } else //if( bIsChart ) - { - //#i78025# charts own borders are not completely visible - //the above pixel correction is not correct - at least not for charts - //so a different pixel correction is choosen here - //this might be a good idea for all other OLE objects also, - //but as I cannot oversee the consequences I fix it only for charts for now - lcl_correctlyAlignRect( aAlignedGrfArea, rGrfArea, pOut ); - } + { + //#i78025# charts own borders are not completely visible + //the above pixel correction is not correct - at least not for charts + //so a different pixel correction is choosen here + //this might be a good idea for all other OLE objects also, + //but as I cannot oversee the consequences I fix it only for charts for now + lcl_correctlyAlignRect( aAlignedGrfArea, rGrfArea, pOut ); + } if( pGrfNd ) { diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx index 439c2e8b28..0d14afe60b 100644 --- a/sw/source/core/inc/layact.hxx +++ b/sw/source/core/inc/layact.hxx @@ -108,14 +108,8 @@ class SwLayAction // OD 14.04.2003 #106346# - new flag for content formatting on interrupt. sal_Bool mbFormatCntntOnInterrupt; - // --> OD 2004-06-14 #i28701# - new flag, indicating, if scrolling is - // allowed during page format - bool mbScrollingAllowed; - #ifdef _LAYACT_CXX - void _AddScrollRect( const SwCntntFrm *, const SwPageFrm *, - const SwTwips, const SwTwips ); void PaintCntnt( const SwCntntFrm *, const SwPageFrm *, const SwRect &rOldRect, long nOldBottom ); BOOL PaintWithoutFlys( const SwRect &, const SwCntntFrm *, diff --git a/sw/source/core/inc/scrrect.hxx b/sw/source/core/inc/scrrect.hxx deleted file mode 100644 index e3827e1d17..0000000000 --- a/sw/source/core/inc/scrrect.hxx +++ /dev/null @@ -1,128 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: scrrect.hxx,v $ - * $Revision: 1.6 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SCRRECT_HXX -#define _SCRRECT_HXX - -#include -#include "swrect.hxx" -#include - -class SwStripe -{ - SwTwips nY; - SwTwips nHeight; -public: - inline SwStripe( SwTwips nPos, SwTwips nHght ) - : nY( nPos ), nHeight( nHght ) {} - inline SwTwips GetY() const { return nY; } - inline SwTwips& Y() { return nY; } - inline SwTwips GetHeight() const { return nHeight; } - inline SwTwips& Height() { return nHeight; } - inline SwTwips GetBottom() const { return nHeight ? nY + nHeight - 1 : nY; } - inline BOOL operator<( const SwStripe &rTst ) const - { return nY < rTst.nY || ( nY == rTst.nY && nHeight > rTst.nHeight ); } - inline BOOL operator==( const SwStripe& rTst ) const - { return nY == rTst.nY && nHeight == rTst.nHeight; } -}; - -SV_DECL_VARARR( SwStripeArr, SwStripe, 1, 4 ) - -class SwStripes : public SwStripeArr, public SwStripe -{ - SwTwips nMin; // Left minimum - SwTwips nMax; // Right maximum -public: - SwStripes( SwTwips nPos, SwTwips nSize, SwTwips nMn, SwTwips nMx ) - : SwStripe( nPos, nSize ), nMin( nMn ), nMax( nMx ) {} - SwStripes& Plus( const SwStripes& rOther, BOOL bVert ); - BOOL Recalc( BOOL bVert ); - - inline SwTwips GetMin() const { return nMin; } - inline SwTwips GetMax() const { return nMax; } - inline void SetMin( const SwTwips nNew ) { nMin = nNew; } - inline void SetMax( const SwTwips nNew ) { nMax = nNew; } - inline void ChkMin( const SwTwips nNew ) { if( nNew < nMin ) nMin = nNew; } - inline void ChkMax( const SwTwips nNew ) { if( nNew > nMax ) nMax = nNew; } - inline SwTwips GetRight() const { return nMax > nMin ? nMax - 1 : nMax; } - inline SwTwips GetWidth() const { return nMax - nMin; } -}; - -class SwScrollColumn -{ - SwTwips nX; - SwTwips nWidth; - SwTwips nOffs; - BOOL bVertical; -public: - inline SwScrollColumn( SwTwips nPos, SwTwips nSz, SwTwips nOff, BOOL bVert ) - : nX( nPos ), nWidth( nSz ), nOffs( nOff ), bVertical( bVert ) {} - inline SwScrollColumn( const SwScrollColumn& rCol ) - : nX( rCol.nX ), nWidth( rCol.nWidth ), - nOffs( rCol.nOffs ), bVertical( rCol.bVertical ) {} - BOOL IsVertical() const { return bVertical; } - inline BOOL operator<( const SwScrollColumn &rTst ) const - { return bVertical < rTst.bVertical || ( bVertical == rTst.bVertical && - ( nX < rTst.nX || ( nX == rTst.nX && ( nWidth < rTst.nWidth || - ( nWidth == rTst.nWidth && nOffs < rTst.nOffs ) ) ) ) ); } - inline BOOL operator==( const SwScrollColumn &rTst ) const - { return bVertical == rTst.bVertical && nX == rTst.nX && - nWidth == rTst.nWidth && nOffs == rTst.nOffs;} - inline SwTwips GetX() const { return nX; } - inline SwTwips GetWidth() const { return nWidth; } - inline SwTwips GetOffs() const { return nOffs; } - inline void ClrOffs() { nOffs = 0; } - inline SwTwips GetRight() const { return nWidth ? nX + nWidth - 1 : nX; } -}; - -typedef SwStripes* SwStripesPtr; -SV_DECL_PTRARR_SORT(SwScrollStripes, SwStripesPtr, 1, 4) - -class SwScrollArea : public SwScrollColumn, public SwScrollStripes -{ -public: - void SmartInsert( SwStripes* pStripes ); - void Add( SwScrollArea *pScroll ); - inline SwScrollArea( const SwScrollColumn &rCol, SwStripes* pStripes ) - : SwScrollColumn( rCol ) - { Insert( pStripes ); } - BOOL Compress(); -}; - -typedef SwScrollArea* SwScrollAreaPtr; -SV_DECL_PTRARR_SORT(SScrAreas,SwScrollAreaPtr,1,2) - -class SwScrollAreas : public SScrAreas -{ -public: - void InsertCol( const SwScrollColumn &rCol, SwStripes *pStripes ); -}; - - -#endif //_SCRRECT_HXX diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index a704ea2b33..aa5b0f2fa8 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -49,7 +49,6 @@ class SwBorderAttrs; class SwFrmFmt; class OutputDevice; class SwTestFormat; -class SwStripes; struct SwCrsrMoveState; struct SwFillData; class SwPortionHandler; @@ -547,8 +546,6 @@ public: // Stoppt Animationen innerhalb von Numerierungen void StopAnimation( OutputDevice *pOut ); - void CriticalLines(const OutputDevice& rOut,SwStripes &rStripes,long nOffs); - // visit all portions for Accessibility void VisitPortions( SwPortionHandler& rPH ) const; diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx index e4735c0e5c..c9a3aa813e 100644 --- a/sw/source/core/inc/viewimp.hxx +++ b/sw/source/core/inc/viewimp.hxx @@ -45,7 +45,6 @@ class ViewShell; class SwFlyFrm; class SwViewOption; class SwRegionRects; -class SwScrollAreas; class SwFrm; class SwLayAction; class SwLayIdle; @@ -88,8 +87,6 @@ class SwViewImp SwPageFrm *pFirstVisPage;//Zeigt immer auf die erste sichtbare Seite. SwRegionRects *pRegion; //Sammler fuer Paintrects aus der LayAction. - SwScrollAreas *pScrollRects; //Sammler fuer Scrollrects aus der LayAction. - SwScrollAreas *pScrolledArea;//Sammler der gescrollten Rechtecke. SwLayAction *pLayAct; //Ist gesetzt wenn ein Action-Objekt existiert //Wird vom SwLayAction-CTor ein- und vom DTor @@ -101,17 +98,11 @@ class SwViewImp mutable const SdrObject * pSdrObjCached; mutable String sSdrObjCachedComment; - AutoTimer aScrollTimer; //Fuer das Aufraeumen nach dem Scrollen. - BOOL bFirstPageInvalid :1; //Pointer auf erste Seite ungueltig? - BOOL bNextScroll :1; //Scroll in der folgenden EndAction erlaubt? - BOOL bScroll :1; //Scroll in der aktuellen EndAction erlaubt? - BOOL bScrolled :1; //Wurde gescrolled? Dann im Idle aufraeumen. //BOOL bResetXorVisibility:1; //StartAction/EndAction //HMHBOOL bShowHdlPaint :1; //LockPaint/UnlockPaint BOOL bResetHdlHiddenPaint:1;// -- "" -- - BOOL bPaintInScroll :1; //Paint (Update() im ScrollHdl der ViewShell BOOL bSmoothUpdate :1; //Meber fuer SmoothScroll BOOL bStopSmooth :1; @@ -146,21 +137,6 @@ class SwViewImp void SetFirstVisPage(); //Neue Ermittlung der ersten sichtbaren Seite - void ResetNextScroll() { bNextScroll = FALSE; } - void SetNextScroll() { bNextScroll = TRUE; } - void SetScroll() { bScroll = TRUE; } - void ResetScrolled() { bScrolled = FALSE; } - void SetScrolled() { bScrolled = TRUE; } - - SwScrollAreas *GetScrollRects() { return pScrollRects; } - void FlushScrolledArea(); - BOOL _FlushScrolledArea( SwRect& rRect ); - BOOL FlushScrolledArea( SwRect& rRect ) - { if( !pScrolledArea ) return FALSE; return _FlushScrolledArea( rRect ); } - void _ScrolledRect( const SwRect& rRect, long nOffs ); - void ScrolledRect( const SwRect& rRect, long nOffs ) - { if( pScrolledArea ) _ScrolledRect( rRect, nOffs ); } - void StartAction(); //Henkel Anzeigen und verstecken. void EndAction(); //gerufen von ViewShell::ImplXXXAction void LockPaint(); //dito, gerufen von ViewShell::ImplLockPaint @@ -226,32 +202,9 @@ public: inline SwPageFrm *GetFirstVisPage(); void SetFirstVisPageInvalid() { bFirstPageInvalid = TRUE; } - //SS'en fuer Paint- und Scrollrects. BOOL AddPaintRect( const SwRect &rRect ); - void AddScrollRect( const SwFrm *pFrm, const SwRect &rRect, long nOffs ); - void MoveScrollArea(); SwRegionRects *GetRegion() { return pRegion; } - void DelRegions(); //Loescht Scroll- und PaintRects - - //Handler fuer das Refresh von gescrollten Bereichen (Korrektur des - //Alignments). Ruft das Refresh mit der ScrolledArea. - //RefreshScrolledArea kann z.B. beim Setzen des Crsr genutzt werden, es - //wird nur der Anteil des Rect refreshed, der mit der ScrolledArea - //ueberlappt. Das 'reingereichte Rechteck wird veraendert! - void RestartScrollTimer() { aScrollTimer.Start(); } - DECL_LINK( RefreshScrolledHdl, Timer * ); - void _RefreshScrolledArea( const SwRect &rRect ); - void RefreshScrolledArea( SwRect &rRect ); - - //Wird vom Layout ggf. waehrend einer Action gerufen, wenn der - //Verdacht besteht, dass es etwas drunter und drueber geht. - void ResetScroll() { bScroll = FALSE; } - - BOOL IsNextScroll() const { return bNextScroll; } - BOOL IsScroll() const { return bScroll; } - BOOL IsScrolled() const { return bScrolled; } - - BOOL IsPaintInScroll() const { return bPaintInScroll; } + void DelRegion(); // neues Interface fuer StarView Drawing inline BOOL HasDrawView() const { return 0 != pDrawView; } @@ -365,20 +318,6 @@ public: void FireAccessibleEvents(); }; -//Kann auf dem Stack angelegt werden, wenn etwas ausgegeben oder -//gescrolled wird. Handles und sontiges vom Drawing werden im CTor -//gehidet und im DTor wieder sichtbar gemacht. -//AW 06-Sep99: Hiding of handles is no longer necessary, removed -//class SwSaveHdl -//{ -// SwViewImp *pImp; -// BOOL bXorVis; -//public: -// SwSaveHdl( SwViewImp *pImp ); -// ~SwSaveHdl(); -//}; - - inline SwPageFrm *SwViewImp::GetFirstVisPage() { if ( bFirstPageInvalid ) diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 5eb767a656..4cea4ba668 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -372,149 +372,6 @@ void SwLayAction::PaintCntnt( const SwCntntFrm *pCnt, } } -/************************************************************************* -|* -|* SwLayAction::_AddScrollRect() -|* -|* Ersterstellung MA 04. Mar. 94 -|* Letzte Aenderung MA 04. Mar. 94 -|* -|*************************************************************************/ -BOOL MA_FASTCALL lcl_IsOverObj( const SwFrm *pFrm, const SwPageFrm *pPage, - const SwRect &rRect1, const SwRect &rRect2, - const SwLayoutFrm *pLay ) -{ - const SwSortedObjs &rObjs = *pPage->GetSortedObjs(); - const SwFlyFrm *pSelfFly = pFrm->FindFlyFrm(); - const BOOL bInCnt = pSelfFly && pSelfFly->IsFlyInCntFrm() ? TRUE : FALSE; - - for ( sal_uInt32 j = 0; j < rObjs.Count(); ++j ) - { - // --> OD 2004-07-07 #i28701# - consider changed type of entries - const SwAnchoredObject* pAnchoredObj = rObjs[j]; - const SwRect aRect( pAnchoredObj->GetObjRect() ); - if ( !rRect1.IsOver( aRect ) && !rRect2.IsOver( aRect ) ) - continue; //Keine Ueberlappung, der naechste. - - const SwFlyFrm *pFly = pAnchoredObj->ISA(SwFlyFrm) - ? static_cast(pAnchoredObj) : 0; - - //Wenn der Rahmen innerhalb des LayFrm verankert ist, so darf er - //mitgescrollt werden, wenn er nicht seitlich aus dem Rechteck - //herausschaut. - if ( pLay && pFly && pFly->IsLowerOf( pLay ) ) - { - if ( pFly->Frm().Left() < rRect1.Left() || - pFly->Frm().Right()> rRect1.Right() ) - return TRUE; - continue; - } - - if ( !pSelfFly ) //Nur wenn der Frm in einem Fly steht kann - return TRUE; //es Einschraenkungen geben. - - if ( !pFly ) //Keine Einschraenkung fuer Zeichenobjekte. - return TRUE; - - if ( pFly != pSelfFly ) - { - //Flys unter dem eigenen nur dann abziehen, wenn sie innerhalb des - //eigenen stehen. - //Fuer inhaltsgebundene Flys alle Flys abziehen fuer die gilt, dass - //pSelfFly nicht innerhalb von ihnen steht. - if ( bInCnt ) - { - const SwFlyFrm *pTmp = pSelfFly->GetAnchorFrm()->FindFlyFrm(); - while ( pTmp ) - { - if ( pTmp == pFly ) - return FALSE; - else - pTmp = pTmp->GetAnchorFrm()->FindFlyFrm(); - } - } else if ( pAnchoredObj->GetDrawObj()->GetOrdNum() < - pSelfFly->GetVirtDrawObj()->GetOrdNum() ) - { - const SwFlyFrm *pTmp = pFly; - do - { if ( pTmp == pSelfFly ) - return TRUE; - else - pTmp = pTmp->GetAnchorFrm()->FindFlyFrm(); - } while ( pTmp ); - } else - return TRUE; - } - } - return FALSE; -} - -void SwLayAction::_AddScrollRect( const SwCntntFrm *pCntnt, - const SwPageFrm *pPage, - const SwTwips nOfst, - const SwTwips nOldBottom ) -{ - // --> OD 2004-07-01 #i28701# - determine, if scrolling is allowed. - bool bScroll = mbScrollingAllowed; - SwRect aPaintRect( pCntnt->PaintArea() ); - SWRECTFN( pCntnt ) - - // --> OD 2007-11-27 #notes2# - // if sidebar for notes is present, no scrolling is allowed - if ( bScroll ) - { - const SwPostItMgr* pPostItMgr = pImp->GetShell()->GetPostItMgr(); - if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) - { - bScroll = false; - } - } - // <-- - - //Wenn altes oder neues Rechteck mit einem Fly ueberlappen, in dem der - //Cntnt nicht selbst steht, so ist nichts mit Scrollen. - if ( bScroll && pPage->GetSortedObjs() ) - { - SwRect aRect( aPaintRect ); - if( bVert ) - aPaintRect.Pos().X() += nOfst; - else - aPaintRect.Pos().Y() -= nOfst; - - if ( ::lcl_IsOverObj( pCntnt, pPage, aPaintRect, aRect, 0 ) ) - bScroll = false; - - if( bVert ) - aPaintRect.Pos().X() -= nOfst; - else - aPaintRect.Pos().Y() += nOfst; - } - if ( bScroll && pPage->GetFmt()->GetBackground().GetGraphicPos() != GPOS_NONE ) - bScroll = false; - - if ( bScroll ) - { - if( aPaintRect.HasArea() ) - pImp->GetShell()->AddScrollRect( pCntnt, aPaintRect, nOfst ); - if ( pCntnt->IsRetouche() && !pCntnt->GetNext() ) - { - SwRect aRect( pCntnt->GetUpper()->PaintArea() ); - (aRect.*fnRect->fnSetTop)( (pCntnt->*fnRect->fnGetPrtBottom)() ); - if ( !pImp->GetShell()->AddPaintRect( aRect ) ) - pCntnt->ResetRetouche(); - } - pCntnt->ResetCompletePaint(); - } - else if( aPaintRect.HasArea() ) - { - if( bVert ) - aPaintRect.Pos().X() += nOfst; - else - aPaintRect.Pos().Y() -= nOfst; - PaintCntnt( pCntnt, pPage, aPaintRect, nOldBottom ); - } -} - /************************************************************************* |* |* SwLayAction::SwLayAction() @@ -541,8 +398,6 @@ SwLayAction::SwLayAction( SwRootFrm *pRt, SwViewImp *pI ) : bUpdateExpFlds = bBrowseActionStop = bActionInProgress = FALSE; // OD 14.04.2003 #106346# - init new flag . mbFormatCntntOnInterrupt = sal_False; - // --> OD 2004-06-14 #i28701# - mbScrollingAllowed = true; pImp->pLayAct = this; //Anmelden } @@ -657,8 +512,6 @@ void SwLayAction::Action() pRoot->ResetTurboFlag(); pRoot->ResetTurbo(); - if ( IsInput() ) - pImp->GetShell()->SetNoNextScroll(); SetCheckPages( TRUE ); bActionInProgress = FALSE; @@ -738,34 +591,6 @@ class NotifyLayoutOfPageInProgress }; // <-- -// --> OD 2004-06-14 #i28701# - local method to determine, if scrolling during -// the format of the given page is allowed. -// Scrolling isn't allowed, if the wrapping style of floating screen objects -// is considered on object positioning and to-paragraph/to-character anchored -// floating screen objects are registered at the page. -bool lcl_ScrollingAllowed( const SwPageFrm& _rPageFrm ) -{ - bool bRetScrollAllowed = true; - - if ( _rPageFrm.GetSortedObjs() && - _rPageFrm.GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION) ) - { - const SwSortedObjs* pObjs = _rPageFrm.GetSortedObjs(); - sal_uInt32 i = 0; - for ( ; i < pObjs->Count(); ++i ) - { - SwAnchoredObject* pObj = (*pObjs)[i]; - if ( pObj->ConsiderObjWrapInfluenceOnObjPos() ) - { - bRetScrollAllowed = false; - break; - } - } - } - - return bRetScrollAllowed; -} - void SwLayAction::InternalAction() { ASSERT( pRoot->Lower()->IsPageFrm(), ":-( Keine Seite unterhalb der Root."); @@ -867,8 +692,6 @@ void SwLayAction::InternalAction() // { NotifyLayoutOfPageInProgress aLayoutOfPageInProgress( *pPage ); - // --> OD 2004-07-01 #i28701# - determine, if scrolling is allowed. - mbScrollingAllowed = lcl_ScrollingAllowed( *pPage ); while ( !IsInterrupt() && !IsNextCycle() && ((IS_FLYS && IS_INVAFLY) || pPage->IsInvalid()) ) @@ -1841,219 +1664,6 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) return bChanged || bTabChanged; } -BOOL MA_FASTCALL lcl_AreLowersScrollable( const SwLayoutFrm *pLay ) -{ - const SwFrm *pLow = pLay->Lower(); - while ( pLow ) - { - if ( pLow->IsCompletePaint() || !pLow->IsValid() || pLow->IsCoveredCell() ) - return FALSE; - if ( pLow->IsLayoutFrm() && !::lcl_AreLowersScrollable( (SwLayoutFrm*)pLow )) - return FALSE; - pLow = pLow->GetNext(); - } - return TRUE; -} - -SwLayoutFrm * MA_FASTCALL lcl_IsTabScrollable( SwTabFrm *pTab ) -{ - //returnt die erste unveraenderte Zeile, oder 0 wenn nicht - //gescrollt werden darf. - if ( !pTab->IsCompletePaint() ) - { - SwLayoutFrm *pUnchgdRow = 0; - SwLayoutFrm *pRow = (SwLayoutFrm*)pTab->Lower(); - while ( pRow ) - { - if ( ::lcl_AreLowersScrollable( pRow ) ) - { - if ( !pUnchgdRow ) - pUnchgdRow = pRow; - } - else - { - pUnchgdRow = 0; - } - - pRow = (SwLayoutFrm*)pRow->GetNext(); - } - return pUnchgdRow; - } - return 0; -} - -// OD 2004-05-11 #i28701# -void lcl_ValidateLowerObjs( SwFrm* pFrm, - const SwTwips nOfst, - SwPageFrm *pPage, - bool bResetOnly ); - -// OD 2004-05-11 #i28701# - correction: floating screen objects, which are -// anchored at-fly, have also been to be considered. -void MA_FASTCALL lcl_ValidateLowers( SwLayoutFrm *pLay, const SwTwips nOfst, - SwLayoutFrm *pRow, SwPageFrm *pPage, - BOOL bResetOnly ) -{ - pLay->ResetCompletePaint(); - - // OD 2004-05-11 #i28701# - consider floating screen objects, which are - // anchored at-fly. - if ( pLay->IsFlyFrm() ) - { - ::lcl_ValidateLowerObjs( pLay, nOfst, pPage, bResetOnly ); - } - - SwFrm *pLow = pRow ? pRow : pLay->Lower(); - SwRootFrm *pRootFrm = 0; - - while ( pLow ) - { - if ( !bResetOnly ) - { - SwRect aOldFrm( pLow->Frm() ); - pLow->Frm().Pos().Y() += nOfst; - if( pLow->IsAccessibleFrm() ) - { - if( !pRootFrm ) - pRootFrm = pPage->FindRootFrm(); - if( pRootFrm && pRootFrm->IsAnyShellAccessible() && - pRootFrm->GetCurrShell() ) - { - pRootFrm->GetCurrShell()->Imp()->MoveAccessibleFrm( pLow, aOldFrm ); - } - } - } - if ( pLow->IsLayoutFrm() ) - { - ::lcl_ValidateLowers( (SwLayoutFrm*)pLow, nOfst, 0, pPage, bResetOnly); - } - else - { - pLow->ResetCompletePaint(); - // OD 2004-05-11 #i28701# - use new local helper method - // - ::lcl_ValidateLowerObjs( pLow, nOfst, pPage, bResetOnly); - } - if ( !bResetOnly ) - pLow->Calc(); //#55435# Stabil halten. - pLow = pLow->GetNext(); - } -} - -// OD 2004-05-11 #i28701# - helper method for to -// 'ValidateLowers' for floating screen objects -void lcl_ValidateLowerObjs( SwFrm* pFrm, - const SwTwips nOfst, - SwPageFrm *pPage, - bool bResetOnly ) -{ - if ( pFrm->GetDrawObjs() ) - { - // --> OD 2004-10-15 #i26945# - consider layout direction - SWRECTFN( pFrm ) - // <-- - for ( USHORT i = 0; i < pFrm->GetDrawObjs()->Count(); ++i ) - { - SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i]; - // --> OD 2004-10-08 #i26945# - check, if the anchor frame, which - // contains the anchor position, is the given frame - if ( pAnchoredObj->GetAnchorFrmContainingAnchPos() != pFrm ) - { - continue; - } - if ( pAnchoredObj->ISA(SwFlyFrm) ) - { - SwFlyFrm *pFly = static_cast(pAnchoredObj); - if ( !bResetOnly ) - { - // --> OD 2004-10-15 #i26945# - // - consider layout direction - // - consider condition for direct move - const bool bNoDirectMove = - WEIT_WECH == pFly->Frm().Top() || - pFly->ConsiderObjWrapInfluenceOnObjPos(); - if ( !bNoDirectMove ) - { - (pFly->Frm().*fnRect->fnSubTop)( -nOfst ); - (pFly->Frm().*fnRect->fnAddBottom)( nOfst ); - } - // <-- - pFly->GetVirtDrawObj()->SetRectsDirty(); - // --> OD 2004-08-17 - also notify view of - // instance, which represents the Writer fly frame in the - // drawing layer - pFly->GetVirtDrawObj()->SetChanged(); - // <-- - if ( pFly->IsFlyInCntFrm() ) - ((SwFlyInCntFrm*)pFly)->AddRefOfst( nOfst ); - // --> OD 2004-10-15 #i26945# - consider at-character - // anchored Writer fly frames - else if( pFly->IsAutoPos() ) - { - pFly->AddLastCharY( nOfst ); - // OD 2004-05-18 #i28701# - follow-up of #i22341# - // has also been adjusted. - pFly->AddLastTopOfLineY( nOfst ); - } - // <-- - } - ::lcl_ValidateLowers( pFly, nOfst, 0, pPage, bResetOnly); - } - // --> OD 2004-10-15 #i26945# - consider drawing objects - else - { - if ( !bResetOnly ) - { - pAnchoredObj->AddLastCharY( nOfst ); - pAnchoredObj->AddLastTopOfLineY( nOfst ); - } - } - // <-- - pAnchoredObj->InvalidateObjPos(); - } - } -} - -void MA_FASTCALL lcl_AddScrollRectTab( SwTabFrm *pTab, SwLayoutFrm *pRow, - const SwRect &rRect, - const SwTwips nOfst) -{ - // --> OD 2007-11-27 #notes2# - // if sidebar for notes is present, no scrolling is allowed - const SwPageFrm* pPage = pTab->FindPageFrm(); - ASSERT( pPage, " - no page frame found at table frame -> crash" ); - ViewShell* pSh = pPage->GetShell(); - if ( pSh ) - { - const SwPostItMgr* pPostItMgr = pSh->GetPostItMgr(); - if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) - { - return; - } - } - // <-- - //Wenn altes oder neues Rechteck mit einem Fly ueberlappen, in dem der - //Frm nicht selbst steht, so ist nichts mit Scrollen. - SwRect aRect( rRect ); - // OD 04.11.2002 #104100# - not needed. - if( pTab->IsVertical() ) - aRect.Pos().X() -= nOfst; - else - aRect.Pos().Y() += nOfst; - if ( pPage->GetSortedObjs() ) - { - if ( ::lcl_IsOverObj( pTab, pPage, rRect, aRect, pTab ) ) - return; - } - if ( pPage->GetFmt()->GetBackground().GetGraphicPos() != GPOS_NONE ) - return; - - if ( pSh ) - pSh->AddScrollRect( pTab, aRect, nOfst ); - ::lcl_ValidateLowers( pTab, nOfst, pRow, pTab->FindPageFrm(), - pTab->IsLowersFormatted() ); -} - // OD 31.10.2002 #104100# // NOTE: no adjustments for vertical layout support necessary BOOL CheckPos( SwFrm *pFrm ) @@ -2096,76 +1706,27 @@ BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect ) if ( !pTab->IsValid() || pTab->IsCompletePaint() || pTab->IsComplete() ) { if ( pTab->GetPrev() && !pTab->GetPrev()->IsValid() ) - pTab->GetPrev()->SetCompletePaint(); - - //Potenzielles Scrollrect ist die ganze Tabelle. Da bereits ein - //Wachstum innerhalb der Tabelle - und damit der Tabelle selbst - - //stattgefunden haben kann, muss die untere Kante durch die - //Unterkante der letzten Zeile bestimmt werden. - SwLayoutFrm* pRow = 0L; - SwRect aScrollRect( pTab->PaintArea() ); - // --> OD 2004-07-01 #i28701# - check, if scrolling is allowed. - if ( mbScrollingAllowed && - ( IsPaint() || bAddRect ) ) { - pRow = static_cast(pTab->GetLastLower()); - // OD 31.10.2002 #104100# - vertical layout support - (aScrollRect.*fnRect->fnSetBottom)( (pRow->Frm().*fnRect->fnGetBottom)() ); - //Die Oberkante wird ggf. durch die erste unveraenderte Zeile bestimmt. - pRow = ::lcl_IsTabScrollable( pTab ); - if ( pRow && pRow != pTab->Lower() ) - // OD 31.10.2002 #104100# - vertical layout support - (aScrollRect.*fnRect->fnSetTop)( (pRow->Frm().*fnRect->fnGetTop)() ); + pTab->GetPrev()->SetCompletePaint(); } - const SwFrm *pOldUp = pTab->GetUpper(); - - SwRect aOldRect( pTab->Frm() ); + const SwRect aOldRect( pTab->Frm() ); pTab->SetLowersFormatted( FALSE ); pTab->Calc(); if ( aOldRect != pTab->Frm() ) + { bChanged = TRUE; - SwRect aPaintFrm = pTab->PaintArea(); + } + const SwRect aPaintFrm = pTab->PaintArea(); if ( IsPaint() && bAddRect ) { - // --> OD 2004-07-01 #i28701# - check, if scrolling is allowed - if ( mbScrollingAllowed && - pRow && pOldUp == pTab->GetUpper() && - pTab->Frm().SSize() == aOldRect.SSize() && - // OD 31.10.2002 #104100# - vertical layout support - (pTab->Frm().*fnRect->fnGetLeft)() == (aOldRect.*fnRect->fnGetLeft)() && - pTab->IsAnLower( pRow ) ) - { - SwTwips nOfst; - if ( pRow->GetPrev() ) - { - if ( pRow->GetPrev()->IsValid() || - ::CheckPos( pRow->GetPrev() ) ) - { - // OD 31.10.2002 #104100# - vertical layout support - nOfst = -(pRow->Frm().*fnRect->fnTopDist)( (pRow->GetPrev()->Frm().*fnRect->fnGetBottom)() ); - } - else - nOfst = 0; - } - else - // OD 31.10.2002 #104100# - vertical layout support - nOfst = (pTab->Frm().*fnRect->fnTopDist)( (aOldRect.*fnRect->fnGetTop)() ); - - if ( nOfst ) - { - ::lcl_AddScrollRectTab( pTab, pRow, aScrollRect, nOfst ); - bPainted = TRUE; - } - } - // OD 01.11.2002 #104100# - add condition Frm().HasArea()> - if ( !pTab->IsCompletePaint() && pTab->IsComplete() && + if ( !pTab->IsCompletePaint() && + pTab->IsComplete() && ( pTab->Frm().SSize() != pTab->Prt().SSize() || // OD 31.10.2002 #104100# - vertical layout support - (pTab->*fnRect->fnGetLeftMargin)() - ) && + (pTab->*fnRect->fnGetLeftMargin)() ) && pTab->Frm().HasArea() ) { @@ -2481,13 +2042,6 @@ void SwLayAction::_FormatCntnt( const SwCntntFrm *pCntnt, SWRECTFN( pCntnt ) if ( !bDrawObjsOnly && IsPaint() ) { - const BOOL bPosOnly = !pCntnt->GetValidPosFlag() && - !pCntnt->IsCompletePaint() && - pCntnt->GetValidSizeFlag() && - pCntnt->GetValidPrtAreaFlag() && - ( !pCntnt->IsTxtFrm() || - !((SwTxtFrm*)pCntnt)->HasAnimation() ); - const SwFrm *pOldUp = pCntnt->GetUpper(); const SwRect aOldRect( pCntnt->UnionFrm() ); const long nOldBottom = (pCntnt->*fnRect->fnGetPrtBottom)(); pCntnt->OptCalc(); @@ -2495,23 +2049,10 @@ void SwLayAction::_FormatCntnt( const SwCntntFrm *pCntnt, return; if( (*fnRect->fnYDiff)( (pCntnt->Frm().*fnRect->fnGetBottom)(), (aOldRect.*fnRect->fnGetBottom)() ) < 0 ) - pCntnt->SetRetouche(); - const SwRect aNewRect( pCntnt->UnionFrm() ); - if ( bPosOnly && - (aNewRect.*fnRect->fnGetTop)() != (aOldRect.*fnRect->fnGetTop)() && - !pCntnt->IsInTab() && !pCntnt->IsInSct() && - ( !pCntnt->GetPrev() || !pCntnt->GetPrev()->IsTabFrm() ) && - pOldUp == pCntnt->GetUpper() && - (aNewRect.*fnRect->fnGetLeft)() == (aOldRect.*fnRect->fnGetLeft)() && - aNewRect.SSize() == aOldRect.SSize() - ) { - _AddScrollRect( pCntnt, pPage, (*fnRect->fnYDiff)( - (pCntnt->Frm().*fnRect->fnGetTop)(), - (aOldRect.*fnRect->fnGetTop)() ), nOldBottom ); + pCntnt->SetRetouche(); } - else - PaintCntnt( pCntnt, pCntnt->FindPageFrm(), aOldRect, nOldBottom); + PaintCntnt( pCntnt, pCntnt->FindPageFrm(), aOldRect, nOldBottom); } else { @@ -2910,7 +2451,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) : { --pSh->nStartAction; - if ( pSh->Imp()->GetRegion() || pSh->Imp()->GetScrollRects() ) + if ( pSh->Imp()->GetRegion() ) bActions = TRUE; else { @@ -2956,9 +2497,9 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) : //fix(18176): SwViewImp *pViewImp = pSh->Imp(); BOOL bUnlock = FALSE; - if ( pViewImp->GetRegion() || pViewImp->GetScrollRects() ) + if ( pViewImp->GetRegion() ) { - pViewImp->DelRegions(); + pViewImp->DelRegion(); //Fuer Repaint mit virtuellem Device sorgen. pSh->LockPaint(); diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 06f3f34f60..fc0f501a9b 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2809,7 +2809,7 @@ void SwRootFrm::Paint( const SwRect& rRect ) const aAction.Action(); ((SwRootFrm*)this)->ResetTurboFlag(); if ( !pSh->ActionPend() ) - pSh->Imp()->DelRegions(); + pSh->Imp()->DelRegion(); } SwRect aRect( rRect ); diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 2041797e54..0878159c63 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -2795,9 +2795,6 @@ void SwTabFrm::MakeAll() } else if ( GetFollow() == GetNext() ) ((SwTabFrm*)GetFollow())->MoveFwd( TRUE, FALSE ); - ViewShell *pSh; - if ( 0 != (pSh = GetShell()) ) - pSh->Imp()->ResetScroll(); } continue; } diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index f796f0f957..5570768f97 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -62,7 +62,6 @@ #include // SwRedlineItr #include // SW_MOD #include // SwTabFrm (Redlining) -#include #include // --> FME 2004-06-08 #i12836# enhanced pdf export @@ -751,70 +750,3 @@ void SwTxtFrm::Paint( const SwRect &rRect ) const } } -void SwTxtFrm::CriticalLines( const OutputDevice& rOut, SwStripes &rStripes, - long nOffs) -{ - ASSERT( ! IsVertical() || ! IsSwapped(), - "SwTxtFrm::CriticalLines with swapped frame" ); - SWRECTFN( this ) - long nFrmHeight; - - GetFormatted(); - if( HasPara() ) - { - const long nTopMargin = (this->*fnRect->fnGetTopMargin)(); - SwStripe aStripe( (Frm().*fnRect->fnGetTop)(), nTopMargin ); - if ( nTopMargin ) - { - rStripes.Insert( aStripe, rStripes.Count() ); - // OD 06.11.2002 #104171#,#103931# - consider vertical layout - if ( bVert ) - aStripe.Y() -= nTopMargin; - else - // OD 06.11.2002 #104171#,#103931# - *add* top margin to Y. - aStripe.Y() += nTopMargin; - } - SwLineLayout* pLay = GetPara(); - do - { - SwTwips nBase = aStripe.GetY() + - ( bVert ? -pLay->GetAscent() : pLay->GetAscent() ); - - long nLogToPixBase, nLogToPixSum, nLogToPixOffs; - - if ( bVert ) - { - nLogToPixBase = rOut.LogicToPixel( Point( nBase, 0 ) ).X(); - nLogToPixSum = rOut.LogicToPixel( Point( nBase + nOffs, 0 ) ).X(); - nLogToPixOffs = -rOut.LogicToPixel( Size( nOffs, 0 ) ).Width(); - } - else - { - nLogToPixBase = rOut.LogicToPixel( Point( 0, nBase ) ).Y(); - nLogToPixSum = rOut.LogicToPixel( Point( 0, nBase - nOffs ) ).Y(); - nLogToPixOffs = rOut.LogicToPixel( Size( 0, nOffs ) ).Height(); - } - - if( nLogToPixBase != nLogToPixSum + nLogToPixOffs ) - { - aStripe.Height() = pLay->GetRealHeight(); - rStripes.Insert( aStripe, rStripes.Count() ); - } - aStripe.Y() += ( bVert ? -pLay->GetRealHeight() : - pLay->GetRealHeight() ); - pLay = pLay->GetNext(); - } while( pLay ); - - const long nBottomMargin = (this->*fnRect->fnGetBottomMargin)(); - if( nBottomMargin ) - { - - aStripe.Height() = nBottomMargin; - rStripes.Insert( aStripe, rStripes.Count() ); - } - } - else if( 0 != (nFrmHeight = (Frm().*fnRect->fnGetHeight)() )) - rStripes.Insert( SwStripe( (Frm().*fnRect->fnGetTop)(), nFrmHeight ), - rStripes.Count() ); -} - diff --git a/sw/source/core/view/makefile.mk b/sw/source/core/view/makefile.mk index 56cfb7d6ed..86b8871f96 100644 --- a/sw/source/core/view/makefile.mk +++ b/sw/source/core/view/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -44,7 +44,6 @@ ENABLE_EXCEPTIONS=TRUE # --- Files -------------------------------------------------------- SLOFILES = \ - $(SLO)$/scrrect.obj \ $(SLO)$/vdraw.obj \ $(SLO)$/viewimp.obj \ $(SLO)$/viewsh.obj \ @@ -52,10 +51,10 @@ SLOFILES = \ $(SLO)$/vnew.obj \ $(SLO)$/vprint.obj \ $(SLO)$/pagepreviewlayout.obj - + EXCEPTIONSFILES = \ $(SLO)$/pagepreviewlayout.obj - + # --- Targets ------------------------------------------------------- diff --git a/sw/source/core/view/scrrect.cxx b/sw/source/core/view/scrrect.cxx deleted file mode 100644 index 87b718425d..0000000000 --- a/sw/source/core/view/scrrect.cxx +++ /dev/null @@ -1,1195 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: scrrect.cxx,v $ - * $Revision: 1.23 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - - -#include -#include -#include -#include -#include // SwScrollRect, SwScrollRects -// OD 18.02.2003 #107562# - for -#include -#ifndef _CURSOR_HXX //autogen -#include -#endif -#include -#ifndef _APP_HXX //autogen -#include -#endif -#include -#include "crsrsh.hxx" -#include "rootfrm.hxx" -#include "pagefrm.hxx" - -// OD 12.11.2002 #96272# - include declaration for -#include "setmapvirtdev.hxx" -#include - -// #i75172# -#include "dview.hxx" - -DBG_NAME(RefreshTimer) - -SV_IMPL_VARARR(SwStripeArr,SwStripe); -SV_IMPL_OP_PTRARR_SORT(SwScrollStripes, SwStripesPtr); -SV_IMPL_OP_PTRARR_SORT(SScrAreas, SwScrollAreaPtr); - -/***************************************************************************** -|* -|* ViewShell::AddScrollRect() -|* -|* Creation MA 07. Mar. 94 -|* Last change AMA 20. July 00 -|* -|* Description -|* ViewShell::AddScrollRect(..) passes a registration from a scrolling frame or -|* rectangle to all ViewShells and SwViewImps respectively. -|* -******************************************************************************/ - -void ViewShell::AddScrollRect( const SwFrm *pFrm, const SwRect &rRect, - long nOfs ) -{ - ASSERT( pFrm, "Where is my friend, the frame?" ); - BOOL bScrollOn = TRUE; - -#ifdef NOSCROLL - //Auch im Product per speziellem Compilat abschaltbar. - bScrollOn = FALSE; -#endif - - if( bScrollOn && Imp()->IsScroll() && nOfs <= SHRT_MAX && nOfs >= SHRT_MIN ) - { - ViewShell *pSh = this; - do - { - pSh->Imp()->AddScrollRect( pFrm, rRect, nOfs ); - pSh = (ViewShell*)pSh->GetNext(); - } while ( pSh != this ); - } - else - AddPaintRect( rRect ); -} - -/****************************************************************************** -|* -|* ViewShell::Scroll() -|* -|* Ersterstellung MA 07. Mar. 94 -|* Last change AMA 21. July 00 -|* -|* Description -|* ViewShell::Scroll() scrolls all rectangles in the pScrollRects-list and -|* transfers the critical lines by calling SwViewImp::MoveScrollArea(..). -|* -******************************************************************************/ -#include -#include - -void ViewShell::Scroll() -{ - SwScrollAreas *pScrollRects = Imp()->GetScrollRects(); - if ( pScrollRects ) - { - bPaintWorks = FALSE; - ASSERT( pScrollRects->Count(), "ScrollRects ohne ScrollRects." ); - - //Abgleichen der Region mit den Scroll-Bereichen!!! - //Wenn eines der Scroll-Rechtecke ungueltig wird, so muss - //der PaintMode wahrscheinlich auf PAINT_BACKGROUND umgeschaltet - //werden. - - //Auf die Richtung kommt es an: - //- Bei einem pos. Ofst muss von hinten nach vorn gescrollt werden. - //- Bei einem neg. Ofst muss von vorn nach hinten gescrollt werden. - BOOL bPositive = (*pScrollRects)[0]->GetOffs() > 0; - if( (*pScrollRects)[0]->IsVertical() ) - bPositive = !bPositive; - int i = bPositive ? pScrollRects->Count()-1 : 0; - - for ( ; bPositive ? - i >= 0 : - i < (int)pScrollRects->Count(); - bPositive ? - --i : - ++i ) - { - const SwScrollArea &rScroll = *(*pScrollRects)[ sal::static_int_cast(i) ]; - if( rScroll.Count() ) - { - int j = bPositive ? rScroll.Count()-1 : 0; - for ( ; bPositive ? j >= 0 : j < (int)rScroll.Count(); - bPositive ? --j : ++j ) - { - const SwStripes& rStripes = *rScroll[ sal::static_int_cast(j) ]; - if( rScroll.IsVertical() ) - { - Rectangle aRectangle( rStripes.GetY() - - rStripes.GetHeight() + rScroll.GetOffs(), - rStripes.GetMin(), - rStripes.GetY() + rScroll.GetOffs(), - rStripes.GetMax() ); - // OD 18.02.2003 #107562# - align rectangle for scrolling - SwRect aAlignedScrollRect( aRectangle ); - ::SwAlignRect( aAlignedScrollRect, this ); - - // #i68597# when scrolling, let DrawingLayer know about refreshed areas, - // even when no DL objects are in the area. This is needed to allow - // fully buffered overlay. - const Rectangle aSourceRect(aAlignedScrollRect.SVRect()); - const Rectangle aTargetRect( - aSourceRect.Left() - rScroll.GetOffs(), aSourceRect.Top(), - aSourceRect.Right() - rScroll.GetOffs(), aSourceRect.Bottom()); - - if(GetWin()) - { - // SCROLL_NOWINDOWINVALIDATE okay since AddPaintRect below adds the to-be-invalidated region - GetWin()->Scroll( -rScroll.GetOffs(), 0, aSourceRect, SCROLL_CHILDREN | SCROLL_NOWINDOWINVALIDATE ); - } - - // #i68597# if buffered overlay, the buffered content needs to be scrolled directly - { - SdrPaintWindow* pPaintWindow = GetDrawView()->GetPaintWindow(0); - - if(pPaintWindow) - { - sdr::overlay::OverlayManager* pOverlayManager = pPaintWindow->GetOverlayManager(); - - if(pOverlayManager) - { - pOverlayManager->copyArea(aTargetRect.TopLeft(), aSourceRect.TopLeft(), aSourceRect.GetSize()); - } - } - } - - SwRect aRect( aRectangle ); - Imp()->ScrolledRect( aRect, -rScroll.GetOffs() ); - if ( bPositive ) - aRect.Right( aRect.Left() + rScroll.GetOffs()-1 ); - else - aRect.Left( aRect.Right() - rScroll.GetOffs() ); - Imp()->AddPaintRect( aRect ); - } - else - { - Rectangle aRectangle( rStripes.GetMin(), - rStripes.GetY() - rScroll.GetOffs(), - rStripes.GetRight(), - rStripes.GetBottom() - rScroll.GetOffs() ); - // OD 18.02.2003 #107562# - use aligned rectangle for scrolling - SwRect aAlignedScrollRect( aRectangle ); - ::SwAlignRect( aAlignedScrollRect, this ); - - // #i68597# when scrolling, let DrawingLayer know about refreshed areas, - // even when no DL objects are in the area. This is needed to allow - // fully buffered overlay. - const Rectangle aSourceRect(aAlignedScrollRect.SVRect()); - const Rectangle aTargetRect( - aSourceRect.Left(), aSourceRect.Top() + rScroll.GetOffs(), - aSourceRect.Right(), aSourceRect.Bottom() + rScroll.GetOffs()); - - if(GetWin()) - { - // SCROLL_NOWINDOWINVALIDATE okay since AddPaintRect below adds the to-be-invalidated region - GetWin()->Scroll( 0, rScroll.GetOffs(), aSourceRect, SCROLL_CHILDREN | SCROLL_NOWINDOWINVALIDATE ); - } - - // #i68597# if buffered overlay, the buffered content needs to be scrolled directly - { - SdrPaintWindow* pPaintWindow = GetDrawView()->GetPaintWindow(0); - - if(pPaintWindow) - { - sdr::overlay::OverlayManager* pOverlayManager = pPaintWindow->GetOverlayManager(); - - if(pOverlayManager) - { - pOverlayManager->copyArea(aTargetRect.TopLeft(), aSourceRect.TopLeft(), aSourceRect.GetSize()); - } - } - } - - SwRect aRect( aRectangle ); - Imp()->ScrolledRect( aRect, rScroll.GetOffs() ); - if ( bPositive ) - aRect.Bottom( aRect.Top() + rScroll.GetOffs()-1 ); - else - aRect.Top( aRect.Bottom() + rScroll.GetOffs() ); - Imp()->AddPaintRect( aRect ); - } - } - } - } - if ( !Imp()->IsScrolled() ) - Imp()->SetScrolled(); - - Imp()->MoveScrollArea(); - bPaintWorks = TRUE; - } -} - -/****************************************************************************** -|* -|* ViewShell::SetNoNextScroll() -|* -|* Ersterstellung MA 08. Mar. 94 -|* Letzte Aenderung MA 08. Mar. 94 -|* -******************************************************************************/ - -void ViewShell::SetNoNextScroll() -{ - ViewShell *pSh = this; - do - { pSh->Imp()->ResetNextScroll(); - pSh = (ViewShell*)pSh->GetNext(); - - } while ( pSh != this ); -} - -/****************************************************************************** -|* -|* SwViewImp::AddScrollRect() -|* -|* Ersterstellung MA 07. Mar. 94 -|* Last change AMA 21. July 00 -|* -|* Adds a scrollable rectangle and his critical lines to the list. -|* -******************************************************************************/ - -void SwViewImp::AddScrollRect( const SwFrm *pFrm, const SwRect &rRect, - long nOffs ) -{ - ASSERT( nOffs != 0, "Scrollen ohne Ofst." ); - SwRect aRect( rRect ); - BOOL bVert = pFrm->IsVertical(); - if( bVert ) - aRect.Pos().X() += nOffs; - else - aRect.Pos().Y() -= nOffs; - if( aRect.IsOver( pSh->VisArea() ) ) - { - ASSERT( pSh->GetWin(), "Scrolling without outputdevice" ); - aRect._Intersection( pSh->VisArea() ); - SwStripes *pStr; - if ( !pScrollRects ) - pScrollRects = new SwScrollAreas; - if( bVert ) - { - aRect.Pos().X() -= nOffs; - pStr = new SwStripes( aRect.Right(), aRect.Width(), - aRect.Top(), aRect.Bottom() ); - if( pFrm->IsTxtFrm() ) - ((SwTxtFrm*)pFrm)->CriticalLines(*pSh->GetWin(), *pStr, nOffs ); - else - pStr->Insert( SwStripe( aRect.Right(), aRect.Width() ), 0 ); - pScrollRects->InsertCol( SwScrollColumn( pFrm->Frm().Top(), - pFrm->Frm().Height(), nOffs, bVert ), pStr); - } - else - { - aRect.Pos().Y() += nOffs; - pStr = new SwStripes( aRect.Top(), aRect.Height(), - aRect.Left(), aRect.Right() ); - if( pFrm->IsTxtFrm() ) - ((SwTxtFrm*)pFrm)->CriticalLines(*pSh->GetWin(), *pStr, nOffs ); - else - pStr->Insert( SwStripe( aRect.Top(), aRect.Height() ), 0 ); - pScrollRects->InsertCol( SwScrollColumn( pFrm->Frm().Left(), - pFrm->Frm().Width(), nOffs, bVert ), pStr ); - } - } - else - AddPaintRect( rRect ); -} - -/****************************************************************************** -|* -|* SwViewImp::MoveScrollArea() -|* -|* Creation AMA 10. July 00 -|* Last change AMA 21. July 00 -|* -|* Transfers the areas after scrolling to the scrolled list, but only those -|* parts with critical lines. -|* -******************************************************************************/ - -void SwViewImp::MoveScrollArea() -{ - if( !pScrolledArea ) - pScrolledArea = new SwScrollAreas; - for( USHORT nIdx = 0; nIdx < pScrollRects->Count(); ++nIdx ) - { - SwScrollArea *pScr = (*pScrollRects)[ nIdx ]; - if( pScr->Compress() ) - delete pScr; - else - { - USHORT nIndx; - if( pScrolledArea->Seek_Entry( pScr, &nIndx ) ) - pScrolledArea->GetObject(nIndx)->Add( pScr ); - else - pScrolledArea->Insert( pScr ); - } - } - delete pScrollRects; - pScrollRects = NULL; -} - -/****************************************************************************** -|* -|* SwViewImp::FlushScrolledArea() -|* -|* Creation AMA 10. July 00 -|* Last change AMA 21. July 00 -|* -|* Flushes the scrolled critical lines, that is transfer them to AddPaintRect() -|* and remove them from the list. -|* -******************************************************************************/ - -void SwViewImp::FlushScrolledArea() -{ - USHORT nCount = pScrolledArea->Count(); - while( nCount ) - { - SwScrollArea* pScroll = (*pScrolledArea)[--nCount]; - USHORT nCnt = pScroll->Count(); - while( nCnt ) - { - SwStripes* pStripes = (*pScroll)[--nCnt]; - if( pScroll->IsVertical() ) - { - SwRect aRect( 0, pStripes->GetMin(), 0, pStripes->GetWidth() ); - for( USHORT i = 0; i < pStripes->Count(); ++i ) - { - long nWidth = (*pStripes)[i].GetHeight(); - aRect.Left( (*pStripes)[i].GetY() - nWidth + 1 ); - aRect.Width( nWidth ); - AddPaintRect( aRect ); - } - } - { - SwRect aRect( pStripes->GetMin(), 0, pStripes->GetWidth(), 0 ); - for( USHORT i = 0; i < pStripes->Count(); ++i ) - { - aRect.Top( (*pStripes)[i].GetY() ); - aRect.Height( (*pStripes)[i].GetHeight() ); - AddPaintRect( aRect ); - } - } - pScroll->Remove( nCnt ); - delete pStripes; - } - pScrolledArea->Remove( nCount ); - delete pScroll; - } - delete pScrolledArea; - pScrolledArea = NULL; -} - -/****************************************************************************** -|* -|* SwViewImp::_FlushScrolledArea(..) -|* -|* Creation AMA 10. July 00 -|* Last change AMA 21. July 00 -|* -|* The critical lines, which overlaps with the given rectangle, will be united -|* with the rectangle and removed from the list. -|* -******************************************************************************/ - -BOOL SwViewImp::_FlushScrolledArea( SwRect& rRect ) -{ - BOOL bRet = FALSE; - for( USHORT i = pScrolledArea->Count(); i; ) - { - SwScrollArea* pScroll = (*pScrolledArea)[--i]; - for( USHORT j = pScroll->Count(); j; ) - { - SwStripes* pStripes = (*pScroll)[--j]; - if( pStripes->Count() ) - { - if( pScroll->IsVertical() ) - { - SwRect aRect( pStripes->GetY() - pStripes->GetHeight(), - pStripes->GetMin(), pStripes->GetHeight(), - pStripes->GetWidth() ); - if( rRect.IsOver( aRect ) ) - { - for( USHORT nI = pStripes->Count(); nI; ) - { - long nWidth = (*pStripes)[--nI].GetHeight(); - aRect.Left( (*pStripes)[nI].GetY() - nWidth + 1 ); - aRect.Width( nWidth ); - if( rRect.IsOver( aRect ) ) - { - rRect.Union( aRect ); - bRet = TRUE; - pStripes->Remove( nI ); - nI = pStripes->Count(); - } - } - } - } - else - { - SwRect aRect( pStripes->GetMin(), pStripes->GetY(), - pStripes->GetWidth(), pStripes->GetHeight() ); - if( rRect.IsOver( aRect ) ) - { - for( USHORT nI = pStripes->Count(); nI; ) - { - aRect.Top( (*pStripes)[--nI].GetY() ); - aRect.Height( (*pStripes)[nI].GetHeight() ); - if( rRect.IsOver( aRect ) ) - { - rRect.Union( aRect ); - bRet = TRUE; - pStripes->Remove( nI ); - nI = pStripes->Count(); - } - } - } - } - } - if( !pStripes->Count() ) - { - pScroll->Remove( j ); - delete pStripes; - } - } - if( !pScroll->Count() ) - { - pScrolledArea->Remove( pScroll ); - delete pScroll; - } - } - if( !pScrolledArea->Count() ) - { - DELETEZ( pScrolledArea ); - SetNextScroll(); - } - return bRet; -} - -/****************************************************************************** -|* -|* SwViewImp::RefreshScrolledHdl(..) -|* -|* Creation MA 06. Oct. 94 -|* Last change AMA 21. July 00 -|* -|* Every timerstop one of the critical lines will be painted. -|* -******************************************************************************/ - -IMPL_LINK( SwViewImp, RefreshScrolledHdl, Timer *, EMPTYARG ) -{ - DBG_PROFSTART( RefreshTimer ); - - if ( !IsScrolled() ) - { DBG_PROFSTOP( RefreshTimer ); - return 0; - } - - SET_CURR_SHELL( GetShell() ); - - //Kein Refresh wenn eine Selektion besteht. - if ( GetShell()->IsA( TYPE(SwCrsrShell) ) && - (((SwCrsrShell*)GetShell())->HasSelection() || - ((SwCrsrShell*)GetShell())->GetCrsrCnt() > 1)) - { - DBG_PROFSTOP( RefreshTimer ); - return 0; - } - - if( pScrolledArea ) - { - const SwRect aRect( GetShell()->VisArea() ); - BOOL bNoRefresh = GetShell()->IsA( TYPE(SwCrsrShell) ) && - ( ((SwCrsrShell*)GetShell())->HasSelection() || - ((SwCrsrShell*)GetShell())->GetCrsrCnt() > 1 ); - if( pScrolledArea->Count() ) - { - SwScrollArea* pScroll = pScrolledArea->GetObject(0); - ASSERT( pScroll->Count(), "Empty scrollarea" ); - // OD 21.10.2003 #112616# - for savety reason: - // react, if precondition named in assertion isn't hold - if ( pScroll->Count() ) - { - SwStripes* pStripes = pScroll->GetObject(0); - // OD 20.10.2003 #112616# - consider also first stripe - ASSERT( pStripes->Count(), "Empty scrollstripes" ); - // OD 21.10.2003 #112616# - for savety reason: - // react, if precondition named in assertion isn't hold - if ( pStripes->Count() ) - { - const SwStripe &rStripe = pStripes->GetObject(0); - SwRect aTmpRect = pScroll->IsVertical() ? - SwRect( rStripe.GetY() - rStripe.GetHeight(), pScroll->GetX(), - rStripe.GetHeight(), pScroll->GetWidth() ) : - SwRect( pScroll->GetX(), rStripe.GetY(), - pScroll->GetWidth(), rStripe.GetHeight() ); - if( aTmpRect.IsOver( aRect ) ) - { - // SwSaveHdl aSaveHdl( this ); - if( !bNoRefresh ) - _RefreshScrolledArea( aTmpRect ); - } - // OD 20.10.2003 #112616# - consider also first stripe - pStripes->Remove( 0 ); - } - if( pStripes->Count() < 1 ) - { - pScroll->Remove( USHORT(0) ); - delete pStripes; - } - } - if( !pScroll->Count() ) - { - pScrolledArea->Remove( pScroll ); - delete pScroll; - } - } - if( !pScrolledArea->Count() ) - { - delete pScrolledArea; - pScrolledArea = 0; - } - } - - //All done? - if( !pScrolledArea || !pScrolledArea->Count() - ) - { - ResetScrolled(); - SetNextScroll(); - aScrollTimer.Stop(); - } - - DBG_PROFSTOP( RefreshTimer ); - return 0; -} - -/****************************************************************************** -|* -|* SwViewImp::_ScrolledRect(..) -|* -|* Creation AMA 20. July 00 -|* Last change AMA 21. July 00 -|* -|* handles the problem of scrolled criticals lines, when they are a part of -|* a scrolling area again. In this case, their rectangle has to move to the -|* right position. -|* -******************************************************************************/ - -void SwViewImp::_ScrolledRect( const SwRect& rRect, long nOffs ) -{ - for( USHORT i = pScrolledArea->Count(); i; ) - { - SwScrollArea* pScroll = (*pScrolledArea)[--i]; - ASSERT( pScroll->Count() == 1, "Missing scrollarea compression 1" ); - SwStripes* pStripes = (*pScroll)[0]; - if( pStripes->Count() ) - { - SwRect aRect = pScroll->IsVertical() ? - SwRect( pStripes->GetY() - pStripes->GetHeight(), - pStripes->GetMin(), pStripes->GetHeight(), - pStripes->GetWidth() ) : - SwRect( pStripes->GetMin(), pStripes->GetY(), - pStripes->GetWidth(), pStripes->GetHeight() ); - - if( rRect.IsOver( aRect ) ) - { - BOOL bRecalc = FALSE; - for( USHORT nI = pStripes->Count(); nI; ) - { - if( pScroll->IsVertical() ) - { - long nWidth = (*pStripes)[--nI].GetHeight(); - aRect.Left( (*pStripes)[nI].GetY() - nWidth + 1 ); - aRect.Width( nWidth ); - } - else - { - aRect.Top( (*pStripes)[--nI].GetY() ); - aRect.Height( (*pStripes)[nI].GetHeight() ); - } - if( rRect.IsInside( aRect ) ) - { - (*pStripes)[nI].Y() += nOffs; - bRecalc = TRUE; - } - } - if( bRecalc ) - pStripes->Recalc( pScroll->IsVertical() ); - } - } - } -} - -/****************************************************************************** -|* -|* SwViewImp::_RefreshScrolledArea() -|* -******************************************************************************/ - -//Berechnen der Hoehe fuer das virtuelle Device, Breite und maximaler -//Speicherbedarf sind vorgegeben. -#define MAXKB 180L - -static void lcl_CalcVirtHeight( OutputDevice *pOut, Size &rSz ) -{ - char nBytes; - const ULONG nColorCount = pOut->GetColorCount(); - if( 256 >= nColorCount ) // 2^8 - nBytes = 1; - else - if( USHRT_MAX >= nColorCount ) // 2^16 - nBytes = 2; - else - if( 16777216 >= nColorCount ) // 2^24 - nBytes = 3; - else - nBytes = 4; // 2^n - - rSz = pOut->LogicToPixel( rSz ); - - long nKB = MAXKB * 1000; - nKB /= nBytes; - if ( rSz.Width() > 0 ) - rSz.Height() = nKB / rSz.Width(); - else - rSz.Height() = nKB; - - rSz = pOut->PixelToLogic( rSz ); -} - -void SwViewImp::_RefreshScrolledArea( const SwRect &rRect ) -{ - SwRect aScRect( rRect ); - aScRect.Intersection( GetShell()->VisArea() ); - - if( aScRect.IsEmpty() ) - return; - - BOOL bShowCrsr = FALSE; - Window *pWin = GetShell()->GetWin(); - if ( pWin && pWin->GetCursor() && pWin->GetCursor()->IsVisible() ) - { - bShowCrsr = TRUE; - pWin->GetCursor()->Hide(); - } - - //Virtuelles Device erzeugen und einstellen. - // --> OD 2007-08-16 #i80720# - // rename variable to - OutputDevice* pCurrentOut = GetShell()->GetOut(); - VirtualDevice *pVout = new VirtualDevice( *pCurrentOut ); - MapMode aMapMode( pCurrentOut->GetMapMode() ); - pVout->SetMapMode( aMapMode ); - Size aSize( aScRect.Width(), 0 ); - lcl_CalcVirtHeight( pCurrentOut, aSize ); - if ( aSize.Height() > aScRect.Height() ) - aSize.Height() = aScRect.Height() + 50; - - //unten in der Schleife lassen wir die Rechtecke ein wenig ueberlappen, - //das muss auch bei der Groesse beruecksichtigt werden. - aSize = pCurrentOut->LogicToPixel( aSize ); - aSize.Width() += 4; aSize.Height() += 4; - aSize = pCurrentOut->PixelToLogic( aSize ); - // <-- - - const SwRootFrm* pLayout = GetShell()->GetLayout(); - - // #i75172# Avoid VDev if PreRendering is active - static bool bDoNotUseVDev(GetDrawView()->IsBufferedOutputAllowed()); - - // --> OD 2007-08-16 #i80720# - // Enlarge paint rectangle also in case that "own" virtual device - // isn't used. Refactor code a little bit to achieve this. - const bool bApplyVDev = !bDoNotUseVDev && pVout->SetOutputSize( aSize ); - - { - if ( bApplyVDev ) - { - // --> OD 2007-08-16 #i80720# - // rename variable to - pVout->SetLineColor( pCurrentOut->GetLineColor() ); - pVout->SetFillColor( pCurrentOut->GetFillColor() ); - // <-- - } - - // #i72754# start Pre/PostPaint encapsulation before pOut is changed to the buffering VDev - const Region aRepaintRegion(aScRect.SVRect()); - GetShell()->DLPrePaint2(aRepaintRegion); - - //Virtuelles Device in die ViewShell 'selektieren' - // --> OD 2007-08-16 #i80720# - // remember current output device at this place - OutputDevice* pOldOut = GetShell()->GetOut(); - // <-- - if ( bApplyVDev ) - { - GetShell()->pOut = pVout; - } - - const SwFrm *pPg = GetFirstVisPage(); - do - { - SwRect aRect( pPg->Frm() ); - if ( aRect.IsOver( aScRect ) ) - { - aRect._Intersection( aScRect ); - do - { - Rectangle aTmp( aRect.SVRect() ); - long nTmp = aTmp.Top() + aSize.Height(); - if ( aTmp.Bottom() > nTmp ) - aTmp.Bottom() = nTmp; - - aTmp = pOldOut->LogicToPixel( aTmp ); - if( aRect.Top() > pPg->Frm().Top() ) - aTmp.Top() -= 2; - if( aRect.Top() + aRect.Height() < pPg->Frm().Top() - + pPg->Frm().Height() ) - aTmp.Bottom() += 2; - if( aRect.Left() > pPg->Frm().Left() ) - aTmp.Left() -= 2; - if( aRect.Left() + aRect.Width() < pPg->Frm().Left() - + pPg->Frm().Width() ) - aTmp.Right() += 2; - aTmp = pOldOut->PixelToLogic( aTmp ); - SwRect aTmp2( aTmp ); - - if ( bApplyVDev ) - { - // OD 12.11.2002 #96272# - use method to set mapping - //Point aOrigin( aTmp2.Pos() ); - //aOrigin.X() = -aOrigin.X(); aOrigin.Y() = -aOrigin.Y(); - //aMapMode.SetOrigin( aOrigin ); - ::SetMappingForVirtDev( aTmp2.Pos(), &aMapMode, pOldOut, pVout ); - pVout->SetMapMode( aMapMode ); - } - - pLayout->Paint( aTmp2 ); - if ( bApplyVDev ) - { - pOldOut->DrawOutDev( aTmp2.Pos(), aTmp2.SSize(), - aTmp2.Pos(), aTmp2.SSize(), *pVout ); - } - - aRect.Top( aRect.Top() + aSize.Height() ); - aScRect.Top( aRect.Top() ); - - } while ( aRect.Height() > 0 ); - } - pPg = pPg->GetNext(); - - } while ( pPg && pPg->Frm().IsOver( GetShell()->VisArea() ) ); - - if ( bApplyVDev ) - { - GetShell()->pOut = pOldOut; - } - delete pVout; - - // #i72754# end Pre/PostPaint encapsulation when pOut is back and content is painted - GetShell()->DLPostPaint2(true); - } - // <-- - - if ( bShowCrsr ) - pWin->GetCursor()->Show(); -} - -/****************************************************************************** -|* -|* SwViewImp::RefreshScrolledArea() -|* -|* Ersterstellung MA 06. Oct. 94 -|* Letzte Aenderung MA 19. Apr. 95 -|* -******************************************************************************/ - -void SwViewImp::RefreshScrolledArea( SwRect &rRect ) -{ - // --> OD 2007-07-24 #123003# - make code robust - // avoid recursive call - static bool bRunning( false ); - - if ( bRunning ) - { - ASSERT( false, " - recursive method call - please inform OD" ); - return; - } - // <-- - - //1. Wird auch von der CrsrShell gerufen, um ggf. den Bereich, in den der - //Crsr gesetzt wird (Absatz, ganze Zeile bei einer Tabelle) aufzufrischen. - //Allerdings kann es dann natuerlich sein, dass das Rechteck ueberhaupt - //nicht mit aufzufrischenden Bereichen ueberlappt. - //2. Kein Refresh wenn eine Selektion besteht. - if( (GetShell()->IsA( TYPE(SwCrsrShell) ) && - (((SwCrsrShell*)GetShell())->HasSelection() || - ((SwCrsrShell*)GetShell())->GetCrsrCnt() > 1))) - { - return; - } - - // --> OD 2007-07-27 #123003# - bRunning = true; - // <-- - - if( pScrolledArea && pScrolledArea->Count() && - !( ( GetShell()->IsA( TYPE(SwCrsrShell) ) && - ( ((SwCrsrShell*)GetShell())->HasSelection() || - ((SwCrsrShell*)GetShell())->GetCrsrCnt() > 1) ) ) ) - { - for( USHORT i = pScrolledArea->Count(); i; ) - { - SwScrollArea* pScroll = (*pScrolledArea)[--i]; - for( USHORT j = pScroll->Count(); j; ) - { - SwStripes* pStripes = (*pScroll)[--j]; - if( pStripes->Count() ) - { - SwRect aRect = pScroll->IsVertical() ? - SwRect( pStripes->GetY() - pStripes->GetHeight(), - pStripes->GetMin(), pStripes->GetHeight(), - pStripes->GetWidth() ) : - SwRect( pStripes->GetMin(), pStripes->GetY(), - pStripes->GetWidth(), pStripes->GetHeight() ); - if( rRect.IsOver( aRect ) ) - { - for( USHORT nI = pStripes->Count(); nI; ) - { - if( pScroll->IsVertical() ) - { - long nWidth = (*pStripes)[--nI].GetHeight(); - aRect.Left( (*pStripes)[nI].GetY() -nWidth +1 ); - aRect.Width( nWidth ); - } - else - { - aRect.Top( (*pStripes)[--nI].GetY() ); - aRect.Height( (*pStripes)[nI].GetHeight() ); - } - if( rRect.IsOver( aRect ) ) - { - pStripes->Remove( nI ); - _RefreshScrolledArea( aRect ); - } - } - } - } - if( !pStripes->Count() ) - { - pScroll->Remove( j ); - delete pStripes; - } - } - if( !pScroll->Count() ) - { - pScrolledArea->Remove( pScroll ); - delete pScroll; - } - //Ist da jemand ungeduldig? - //Nur Mouse und Keyboard, weil wir sonst von jeder billigen - //Uhr unterbrochen werden. - if( GetpApp()->AnyInput( INPUT_MOUSEANDKEYBOARD ) ) - break; - } - } - - //All done? - if( !pScrolledArea || !pScrolledArea->Count() ) - { - ResetScrolled(); - SetNextScroll(); - aScrollTimer.Stop(); - } - - // --> OD 2007-07-24 #123003# - bRunning = false; - // <-- -} - -SwStripes& SwStripes::Plus( const SwStripes& rOther, BOOL bVert ) -{ - if( !Count() ) - { - Insert( &rOther, 0 ); - SetMin( rOther.GetMin() ); - SetMax( rOther.GetMax() ); - return *this; - } - - long nCnt = rOther.Count(); - if( nCnt ) - { - ChkMin( rOther.GetMin() ); - ChkMax( rOther.GetMax() ); - USHORT nStart = 0; - if( bVert ) - for( USHORT nIdx = 0; nIdx < nCnt; ++nIdx ) - { - const SwStripe& rAdd = rOther[ nIdx ]; - long nBottom = rAdd.GetY() - rAdd.GetHeight(); - USHORT nCount = Count(); - USHORT nTmpY = nStart; - while( nTmpY < nCount ) - { - SwStripe& rChk = GetObject( nTmpY ); - if( rChk.GetY() - rChk.GetHeight() < rAdd.GetY() ) - break; - else - ++nTmpY; - } - USHORT nB = nTmpY; - while( nB < nCount ) - { - const SwStripe& rChk = GetObject( nB ); - if( rChk.GetY() <= nBottom ) - break; - else - ++nB; - } - nStart = nTmpY; - if( nTmpY == nB ) - Insert( rAdd, nTmpY ); - else - { - long nChkBottom = rAdd.GetY() - rAdd.GetHeight();; - const SwStripe& rChkB = GetObject( nB - 1 ); - long nTmp = rChkB.GetY() - rChkB.GetHeight(); - if( nTmp < nChkBottom ) - nChkBottom = nTmp; - SwStripe& rChk = GetObject( nTmpY ); - if( rAdd.GetY() > rChk.GetY() ) - rChk.Y() = rAdd.GetY(); - rChk.Height() = rChk.GetY() - nChkBottom; - nChkBottom = nB - nTmpY - 1; - if( nChkBottom ) - Remove( nTmpY + 1, (USHORT)nChkBottom ); - } - } - else - { - for( USHORT nIdx = 0; nIdx < nCnt; ++nIdx ) - { - const SwStripe& rAdd = rOther[ nIdx ]; - long nBottom = rAdd.GetY() + rAdd.GetHeight(); - USHORT nCount = Count(); - USHORT nTmpY = nStart; - while( nTmpY < nCount ) - { - SwStripe& rChk = GetObject( nTmpY ); - if( rChk.GetY() + rChk.GetHeight() > rAdd.GetY() ) - break; - else - ++nTmpY; - } - USHORT nB = nTmpY; - while( nB < nCount ) - { - const SwStripe& rChk = GetObject( nB ); - if( rChk.GetY() >= nBottom ) - break; - else - ++nB; - } - nStart = nTmpY; - if( nTmpY == nB ) - Insert( rAdd, nTmpY ); - else - { - long nChkBottom = rAdd.GetY() + rAdd.GetHeight();; - const SwStripe& rChkB = GetObject( nB - 1 ); - long nTmp = rChkB.GetY() + rChkB.GetHeight(); - if( nTmp > nChkBottom ) - nChkBottom = nTmp; - SwStripe& rChk = GetObject( nTmpY ); - if( rAdd.GetY() < rChk.GetY() ) - rChk.Y() = rAdd.GetY(); - rChk.Height() = nChkBottom - rChk.GetY(); - nChkBottom = nB - nTmpY - 1; - if( nChkBottom ) - Remove( nTmpY + 1, (USHORT)nChkBottom ); - } - } - } - } - return *this; -} - -BOOL SwStripes::Recalc( BOOL bVert ) -{ - if( !Count() ) - return TRUE; - Y() = GetObject(0).GetY(); - if( bVert ) - { - long nTmpMin = GetObject(0).GetY() - GetObject(0).Height(); - for( USHORT nIdx = 1; nIdx < Count(); ) - { - const SwStripe& rStr = GetObject(nIdx++); - if( GetY() < rStr.GetY() ) - Y() = rStr.GetY(); - if( nTmpMin > rStr.GetY() - rStr.GetHeight() ) - nTmpMin = rStr.GetY() - rStr.GetHeight(); - } - Height() = GetY() - nTmpMin; - } - else - { - long nTmpMax = GetObject(0).GetY() + GetObject(0).Height(); - for( USHORT nIdx = 1; nIdx < Count(); ) - { - const SwStripe& rStr = GetObject(nIdx++); - if( GetY() > rStr.GetY() ) - Y() = rStr.GetY(); - if( nTmpMax < rStr.GetY() + rStr.GetHeight() ) - nTmpMax = rStr.GetY() + rStr.GetHeight(); - } - Height() = nTmpMax - GetY(); - } - return FALSE; -} - -BOOL SwScrollArea::Compress() -{ - if( !Count() ) - return TRUE; - for( USHORT nIdx = Count() - 1; nIdx > 0; --nIdx ) - { - GetObject(0)->Plus( *GetObject(nIdx), IsVertical() ); - delete GetObject( nIdx ); - Remove( nIdx, 1 ); - } - ClrOffs(); - return GetObject(0)->Recalc( IsVertical() ); -} - -void SwScrollArea::Add( SwScrollArea *pScroll ) -{ - ASSERT( pScroll->Count() == 1, "Missing scrollarea compression 2" ); - ASSERT( Count() == 1, "Missing scrollarea compression 3" ); - GetObject(0)->Plus( *pScroll->GetObject(0), IsVertical() ); - GetObject(0)->Recalc( IsVertical() ); - delete pScroll->GetObject( 0 ); - pScroll->Remove( (USHORT)0, 1 ); - delete pScroll; -} - -/****************************************************************************** -|* -|* SwScrollAreas::Insert(..) -|* -******************************************************************************/ - -void SwScrollAreas::InsertCol( const SwScrollColumn &rCol, - SwStripes *pStripes ) -{ - SwScrollArea *pTmp = new SwScrollArea( rCol, pStripes ); - USHORT nIdx; - if( Seek_Entry( pTmp, &nIdx ) ) - { - GetObject( nIdx )->SmartInsert( pStripes ); - delete pTmp; - } - else - Insert( pTmp ); -} - - -void SwScrollArea::SmartInsert( SwStripes* pStripes ) -{ - ASSERT( pStripes, "Insert empty scrollstripe?" ); - BOOL bNotInserted = TRUE; - if( IsVertical() ) - for( USHORT nIdx = 0; nIdx < Count() && bNotInserted; ) - { - SwStripes* pTmp = GetObject( nIdx++ ); - if( pTmp->GetY() - pTmp->GetHeight() == pStripes->GetY() ) - { - pTmp->Height() += pStripes->GetHeight(); - pTmp->ChkMin( pStripes->GetMin() ); - pTmp->ChkMax( pStripes->GetMax() ); - if( pStripes->Count() ) - pTmp->Insert( (SwStripeArr*)pStripes, pTmp->Count(), 0 ); - bNotInserted = FALSE; - } - else if( pTmp->GetY() == pStripes->GetY() - pStripes->GetHeight() ) - { - pTmp->Height() += pStripes->GetHeight(); - pTmp->Y() = pStripes->GetY(); - pTmp->ChkMin( pStripes->GetMin() ); - pTmp->ChkMax( pStripes->GetMax() ); - if( pStripes->Count() ) - pTmp->Insert( (SwStripeArr*)pStripes, 0, 0 ); - bNotInserted = FALSE; - } - } - else - for( USHORT nIdx = 0; nIdx < Count() && bNotInserted; ) - { - SwStripes* pTmp = GetObject( nIdx++ ); - if( pTmp->GetY() + pTmp->GetHeight() == pStripes->GetY() ) - { - pTmp->Height() += pStripes->GetHeight(); - pTmp->ChkMin( pStripes->GetMin() ); - pTmp->ChkMax( pStripes->GetMax() ); - if( pStripes->Count() ) - pTmp->Insert( (SwStripeArr*)pStripes, pTmp->Count(), 0 ); - bNotInserted = FALSE; - } - else if( pTmp->GetY() == pStripes->GetY() + pStripes->GetHeight() ) - { - pTmp->Height() += pStripes->GetHeight(); - pTmp->Y() = pStripes->GetY(); - pTmp->ChkMin( pStripes->GetMin() ); - pTmp->ChkMax( pStripes->GetMax() ); - if( pStripes->Count() ) - pTmp->Insert( (SwStripeArr*)pStripes, 0, 0 ); - bNotInserted = FALSE; - } - } - if( !bNotInserted || !Insert( pStripes ) ) - delete pStripes; -} diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx index 5eb6ba17a2..2045e4df3b 100644 --- a/sw/source/core/view/viewimp.cxx +++ b/sw/source/core/view/viewimp.cxx @@ -32,7 +32,6 @@ #include "precompiled_sw.hxx" -#include "scrrect.hxx" #include "crsrsh.hxx" #include "rootfrm.hxx" #include "pagefrm.hxx" @@ -129,8 +128,6 @@ SwViewImp::SwViewImp( ViewShell *pParent ) : pSdrPageView( 0 ), pFirstVisPage( 0 ), pRegion( 0 ), - pScrollRects( 0 ), - pScrolledArea( 0 ), pLayAct( 0 ), pIdleAct( 0 ), pAccMap( 0 ), @@ -141,13 +138,9 @@ SwViewImp::SwViewImp( ViewShell *pParent ) : { //bResetXorVisibility = //HMHbShowHdlPaint = - bResetHdlHiddenPaint = bScrolled = - bPaintInScroll = bSmoothUpdate = bStopSmooth = bStopPrt = FALSE; - bFirstPageInvalid = bScroll = bNextScroll = TRUE; - - aScrollTimer.SetTimeout( 1500 ); - aScrollTimer.SetTimeoutHdl( LINK( this, SwViewImp, RefreshScrolledHdl)); - aScrollTimer.Stop(); + bResetHdlHiddenPaint = + bSmoothUpdate = bStopSmooth = bStopPrt = FALSE; + bFirstPageInvalid = TRUE; } /****************************************************************************** @@ -172,8 +165,7 @@ SwViewImp::~SwViewImp() delete pDrawView; - DelRegions(); - delete pScrolledArea; + DelRegion(); ASSERT( !pLayAct, "Have action for the rest of your life." ); ASSERT( !pIdleAct,"Be idle for the rest of your life." ); @@ -188,10 +180,9 @@ SwViewImp::~SwViewImp() |* ******************************************************************************/ -void SwViewImp::DelRegions() +void SwViewImp::DelRegion() { DELETEZ(pRegion); - DELETEZ(pScrollRects); } /****************************************************************************** diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 7d280ff1b6..7c5b44a00f 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -219,28 +219,18 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd ) Imp()->StartAction(); if ( Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea() ) - Imp()->DelRegions(); + Imp()->DelRegion(); const BOOL bExtraData = ::IsExtraData( GetDoc() ); if ( !bIdleEnd ) { - if ( Imp()->IsNextScroll() && !bExtraData ) - Imp()->SetScroll(); - else - { - if ( bExtraData ) - Imp()->bScroll = FALSE; - Imp()->SetNextScroll(); - Imp()->ResetScroll(); - } SwLayAction aAction( GetLayout(), Imp() ); aAction.SetComplete( FALSE ); if ( nLockPaint ) aAction.SetPaint( FALSE ); aAction.SetInputType( INPUT_KEYBOARD ); aAction.Action(); - Imp()->SetScroll(); } if ( bIsShellForCheckViewLayout ) @@ -249,8 +239,9 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd ) //Wenn wir selbst keine Paints erzeugen, so warten wir auf das Paint //vom System. Dann ist das Clipping korrekt gesetzt; Beispiel: verschieben //eines DrawObjektes. - if ( Imp()->GetRegion() || Imp()->GetScrollRects() || - aInvalidRect.HasArea() || bExtraData ) + if ( Imp()->GetRegion() || + aInvalidRect.HasArea() || + bExtraData ) { if ( !nLockPaint ) { @@ -274,15 +265,10 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd ) // Mitte eine Selektion und mit einem anderen Cursor an linken // rechten Rand springen. Ohne ShowCrsr verschwindet die // Selektion - BOOL bShowCrsr = (pRegion || Imp()->GetScrollRects()) && - IsA( TYPE(SwCrsrShell) ); + BOOL bShowCrsr = pRegion && IsA( TYPE(SwCrsrShell) ); if( bShowCrsr ) ((SwCrsrShell*)this)->HideCrsrs(); - Scroll(); - if ( bPaintsFromSystem && Imp()->pScrolledArea ) - Imp()->FlushScrolledArea(); - if ( pRegion ) { SwRootFrm* pLayout = GetLayout(); @@ -411,14 +397,14 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd ) delete pVout; delete pRegion; - Imp()->DelRegions(); + Imp()->DelRegion(); } if( bShowCrsr ) ((SwCrsrShell*)this)->ShowCrsrs( TRUE ); } else { - Imp()->DelRegions(); + Imp()->DelRegion(); bPaintWorks = TRUE; } } @@ -438,13 +424,6 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd ) UISizeNotify(); ++nStartAction; -#ifdef DBG_UTIL - // test option 'No Scroll' suppresses the automatic repair of the scrolled area - if ( !GetViewOptions()->IsTest8() ) -#endif - if ( Imp()->IsScrolled() ) - Imp()->RestartScrollTimer(); - if( Imp()->IsAccessible() ) Imp()->FireAccessibleEvents(); } @@ -1199,12 +1178,10 @@ void ViewShell::VisPortChgd( const SwRect &rRect) //vom RootFrm::Paint erzeugt worden sein. if ( !bInEndAction && Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea() ) - Imp()->DelRegions(); + Imp()->DelRegion(); SET_CURR_SHELL( this ); - //SwSaveHdl aSaveHdl( Imp() ); - bool bScrolled = false; SwPostItMgr* pPostItMgr = GetPostItMgr(); @@ -1334,9 +1311,7 @@ void ViewShell::VisPortChgd( const SwRect &rRect) Imp()->GetDrawView()->VisAreaChanged( GetWin() ); Imp()->GetDrawView()->SetActualWin( GetWin() ); } - Imp()->bPaintInScroll = TRUE; GetWin()->Update(); - Imp()->bPaintInScroll = FALSE; if ( !bScrolled && pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) pPostItMgr->CorrectPositions(); @@ -1836,9 +1811,8 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect ) //nicht ankommen. //Ergo: Alles selbst machen (siehe ImplEndAction()) if ( Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea()) - Imp()->DelRegions(); + Imp()->DelRegion(); - Imp()->ResetScroll(); SwLayAction aAction( GetLayout(), Imp() ); aAction.SetComplete( FALSE ); // We increment the action counter to avoid a recursive call of actions @@ -1864,7 +1838,7 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect ) } if ( bStop ) { - Imp()->DelRegions(); + Imp()->DelRegion(); pRegion = 0; } } @@ -1909,7 +1883,7 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect ) } else bRet = FALSE; - Imp()->DelRegions(); + Imp()->DelRegion(); } else bRet = FALSE; @@ -1960,17 +1934,7 @@ void ViewShell::Paint(const Rectangle &rRect) { if( GetWin() && GetWin()->IsVisible() ) { - //Wenn mit dem Paint ein Bereich betroffen ist, der vorher gescrolled - //wurde, so wiederholen wir das Paint mit dem Gesamtbereich. Nur so - //koennen wir sicherstellen, das (nicht mal kurzfristig) durch das Paint - //keine Alignmentfehler sichtbar werden. SwRect aRect( rRect ); - if ( Imp()->IsScrolled() && Imp()->FlushScrolledArea( aRect ) ) - { - GetWin()->Invalidate( aRect.SVRect() ); - return; - } - if ( bPaintInProgress ) //Schutz gegen doppelte Paints! { GetWin()->Invalidate( rRect ); -- cgit v1.2.3 From e55aaf94572f41b2502e9d82d4439045c1d831a3 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 29 Dec 2009 11:44:13 +0100 Subject: sw33bf02: #i105901# method - skip character cells for all script types --- sw/source/core/txtnode/fntcache.cxx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 2b30826062..fa40051bf2 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -2420,21 +2420,18 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf ) sal_uInt16 nItrMode = i18n::CharacterIteratorMode::SKIPCELL; sal_Int32 nDone = 0; LanguageType aLang = LANGUAGE_NONE; - sal_Bool bSkipCell = sal_False; + bool bSkipCharacterCells = false; xub_StrLen nIdx = rInf.GetIdx(); xub_StrLen nLastIdx = nIdx; const xub_StrLen nEnd = rInf.GetIdx() + rInf.GetLen(); - // skip character cells for complex scripts - // --> OD 2009-10-14 #i105571# - skip also character cells for CJK - if ( rInf.GetFont() && - ( SW_CTL == rInf.GetFont()->GetActual() || - SW_CJK == rInf.GetFont()->GetActual() ) && - pBreakIt->GetBreakIter().is() ) + // --> OD 2009-12-29 #i105901# + // skip character cells for all script types + if ( pBreakIt->GetBreakIter().is() ) // <-- { aLang = rInf.GetFont()->GetLanguage(); - bSkipCell = sal_True; + bSkipCharacterCells = true; } while ( ( nRight < long( rInf.GetOfst() ) ) && ( nIdx < nEnd ) ) @@ -2445,7 +2442,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf ) // go to next character (cell). nLastIdx = nIdx; - if ( bSkipCell ) + if ( bSkipCharacterCells ) { nIdx = (xub_StrLen)pBreakIt->GetBreakIter()->nextCharacters( rInf.GetText(), nIdx, pBreakIt->GetLocale( aLang ), nItrMode, 1, nDone ); -- cgit v1.2.3 From 00e4fdf12826a930f9ef66de860292a5059aeffd Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 30 Dec 2009 15:04:27 +0100 Subject: sw33bf02: #i89920# Improvement of selection of objects in background --- sw/source/core/draw/dflyobj.cxx | 31 ++++++++------ sw/source/core/frmedt/feshview.cxx | 86 +++++++++++++++++++++++++++----------- sw/source/core/inc/dflyobj.hxx | 3 +- sw/source/ui/docvw/edtwin.cxx | 23 +++++----- 4 files changed, 94 insertions(+), 49 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index ce2c6067f3..43bf479218 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -305,9 +305,9 @@ namespace drawinglayer } // end of namespace drawinglayer ////////////////////////////////////////////////////////////////////////////////////// -// AW: own sdr::contact::ViewContact (VC) sdr::contact::ViewObjectContact (VOC) needed -// since offset is defined different from SdrVirtObj's sdr::contact::ViewContactOfVirtObj. -// For paint, that offset is used by setting at the OutputDevice; for primitives this is +// AW: own sdr::contact::ViewContact (VC) sdr::contact::ViewObjectContact (VOC) needed +// since offset is defined different from SdrVirtObj's sdr::contact::ViewContactOfVirtObj. +// For paint, that offset is used by setting at the OutputDevice; for primitives this is // not possible since we have no OutputDevice, but define the geometry itself. namespace sdr @@ -328,7 +328,7 @@ namespace sdr { } virtual ~VCOfSwVirtFlyDrawObj(); - + // access to SwVirtFlyDrawObj SwVirtFlyDrawObj& GetSwVirtFlyDrawObj() const { @@ -357,7 +357,7 @@ namespace sdr { const drawinglayer::primitive2d::Primitive2DReference xPrimitive( new drawinglayer::primitive2d::SwVirtFlyDrawObjPrimitive( - GetSwVirtFlyDrawObj(), + GetSwVirtFlyDrawObj(), aOuterRange)); xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xPrimitive, 1); @@ -388,8 +388,8 @@ basegfx::B2DRange SwVirtFlyDrawObj::getOuterBound() const { const Rectangle aOuterRectangle(pFlyFrame->Frm().Pos(), pFlyFrame->Frm().SSize()); - if(!aOuterRectangle.IsEmpty() - && RECT_EMPTY != aOuterRectangle.Right() + if(!aOuterRectangle.IsEmpty() + && RECT_EMPTY != aOuterRectangle.Right() && RECT_EMPTY != aOuterRectangle.Bottom()) { aOuterRange.expand(basegfx::B2DTuple(aOuterRectangle.Left(), aOuterRectangle.Top())); @@ -414,8 +414,8 @@ basegfx::B2DRange SwVirtFlyDrawObj::getInnerBound() const { const Rectangle aInnerRectangle(pFlyFrame->Frm().Pos() + pFlyFrame->Prt().Pos(), pFlyFrame->Prt().SSize()); - if(!aInnerRectangle.IsEmpty() - && RECT_EMPTY != aInnerRectangle.Right() + if(!aInnerRectangle.IsEmpty() + && RECT_EMPTY != aInnerRectangle.Right() && RECT_EMPTY != aInnerRectangle.Bottom()) { aInnerRange.expand(basegfx::B2DTuple(aInnerRectangle.Left(), aInnerRectangle.Top())); @@ -501,7 +501,7 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject() const if(bDrawObject) { - if(!pFlyFrm->IsFlyInCntFrm()) + if(!pFlyFrm->IsFlyInCntFrm()) { // it is also necessary to restore the VCL MapMode from ViewInformation since e.g. // the VCL PixelRenderer resets it at the used OutputDevice. Unfortunately, this @@ -510,10 +510,10 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject() const pOut->Push(PUSH_MAPMODE); pOut->SetMapMode(pShell->getPrePostMapMode()); - + // paint the FlyFrame (use standard VCL-Paint) pFlyFrm->Paint(GetFlyFrm()->Frm()); - + pOut->Pop(); } } @@ -566,6 +566,11 @@ const Rectangle& __EXPORT SwVirtFlyDrawObj::GetCurrentBoundRect() const return aOutRect; } +const Rectangle& __EXPORT SwVirtFlyDrawObj::GetLastBoundRect() const +{ + return GetCurrentBoundRect(); +} + void __EXPORT SwVirtFlyDrawObj::RecalcBoundRect() { diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index e8c849cee0..4d0ff4e36b 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -1185,9 +1185,7 @@ bool SwFEShell::IsObjSelectable( const Point& rPt ) } // #107513# -// Test if there is a draw object at that position and if it should be selected. -// The 'should' is aimed at Writer text fly frames which may be in front of -// the draw object. +// Test if there is a object at that position and if it should be selected. sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) { SET_CURR_SHELL(this); @@ -1204,39 +1202,79 @@ sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) bRet = pDrawView->PickObj(rPt, pDrawView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMARKABLE); pDrawView->SetHitTolerancePixel(nOld); - if(bRet && pObj) + if ( bRet && pObj ) { const IDocumentDrawModelAccess* pIDDMA = getIDocumentDrawModelAccess(); - if( pObj->GetLayer() == pIDDMA->GetHellId() ) + // --> OD 2009-12-30 #i89920# + // Do not select object in background which is overlapping this text + // at the given position. + bool bObjInBackground( false ); { - const SwFrm *pPageFrm = GetLayout()->Lower(); - while( pPageFrm && !pPageFrm->Frm().IsInside( rPt ) ) + if ( pObj->GetLayer() == pIDDMA->GetHellId() ) { - if ( rPt.Y() < pPageFrm->Frm().Top() ) - pPageFrm = 0; - else - pPageFrm = pPageFrm->GetNext(); + const SwAnchoredObject* pAnchoredObj = ::GetUserCall( pObj )->GetAnchoredObj( pObj ); + const SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt(); + const SwFmtSurround& rSurround = rFmt.GetSurround(); + if ( rSurround.GetSurround() == SURROUND_THROUGHT ) + { + bObjInBackground = true; + } } + } + if ( bObjInBackground ) + { + const SwPageFrm* pPageFrm = GetLayout()->GetPageAtPos( rPt ); if( pPageFrm ) { - SwRect aTmp( pPageFrm->Prt() ); - aTmp += pPageFrm->Frm().Pos(); - if( aTmp.IsInside( rPt ) ) - return sal_False; + const SwCntntFrm* pCntntFrm( pPageFrm->ContainsCntnt() ); + while ( pCntntFrm ) + { + if ( pCntntFrm->UnionFrm().IsInside( rPt ) ) + { + const SwTxtFrm* pTxtFrm = + dynamic_cast(pCntntFrm); + if ( pTxtFrm ) + { + SwPosition* pPos = + new SwPosition( *(pTxtFrm->GetTxtNode()) ); + Point aTmpPt( rPt ); + if ( pTxtFrm->GetKeyCrsrOfst( pPos, aTmpPt ) ) + { + SwRect aCharRect; + if ( pTxtFrm->GetCharRect( aCharRect, *pPos ) ) + { + if ( aCharRect.IsOver( SwRect( pObj->GetLastBoundRect() ) ) ) + { + bRet = sal_False; + } + } + } + } + else + { + bRet = sal_False; + } + break; + } + + pCntntFrm = pCntntFrm->GetNextCntntFrm(); + } } } - - const SdrPage* pPage = pIDDMA->GetDrawModel()->GetPage(0); - // --> FME 2005-04-18 #i20965# Use GetOrdNum() instead of GetOrdNumDirect() - // because ordnums might be wrong - for(sal_uInt32 a(pObj->GetOrdNum() + 1); bRet && a < pPage->GetObjCount(); a++) - { // <-- - SdrObject *pCandidate = pPage->GetObj(a); - if(pCandidate->ISA(SwVirtFlyDrawObj) && ((SwVirtFlyDrawObj*)pCandidate)->GetCurrentBoundRect().IsInside(rPt)) + if ( bRet ) + { + const SdrPage* pPage = pIDDMA->GetDrawModel()->GetPage(0); + for(sal_uInt32 a(pObj->GetOrdNum() + 1); bRet && a < pPage->GetObjCount(); a++) { - bRet = sal_False; + SdrObject *pCandidate = pPage->GetObj(a); + + if (pCandidate->ISA(SwVirtFlyDrawObj) && + ( (SwVirtFlyDrawObj*)pCandidate)->GetCurrentBoundRect().IsInside(rPt) ) + { + bRet = sal_False; + } } } } diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx index 7f178d3ae8..c352c931ac 100644 --- a/sw/source/core/inc/dflyobj.hxx +++ b/sw/source/core/inc/dflyobj.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -100,6 +100,7 @@ public: //Wir nehemen die Groessenbehandlung vollstaendig selbst in die Hand. virtual const Rectangle& GetCurrentBoundRect() const; + virtual const Rectangle& GetLastBoundRect() const; virtual void RecalcBoundRect(); virtual void RecalcSnapRect(); virtual const Rectangle& GetSnapRect() const; diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index a548726ad7..8774e0d730 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -2882,7 +2882,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) !bExecDrawTextLink) { // #107513# - // Test if there is a draw object at that position and if it should be selected. + // Test if there is a object at that position and if it should be selected. sal_Bool bShould = rSh.ShouldObjectBeSelected(aDocPos); if(bShould) @@ -3153,7 +3153,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( rSh.IsSelFrmMode() ) rSh.SelectObj(aDocPos, SW_ADD_SELECT | SW_ENTER_GROUP); else - { if ( rSh.SelectObj( aDocPos, SW_ADD_SELECT | SW_ENTER_GROUP ) ) + { + if ( rSh.SelectObj( aDocPos, SW_ADD_SELECT | SW_ENTER_GROUP ) ) { rSh.EnterSelFrmMode( &aDocPos ); SwEditWin::nDDStartPosY = aDocPos.Y(); @@ -3366,11 +3367,16 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bNoInterrupt = bTmpNoInterrupt; } - if( !bOverURLGrf && !bOnlyText ) + if ( !bOverURLGrf && !bOnlyText ) { - const int nSelType = rSh.GetSelectionType(); - if( nSelType == nsSelectionType::SEL_OLE || - nSelType == nsSelectionType::SEL_GRF ) + const SelectionType nSelType = rSh.GetSelectionType(); + // --> OD 2009-12-30 #i89920# + // Check in general, if an object is selectable at given position. + // Thus, also text fly frames in background become selectable via Ctrl-Click. + if ( nSelType & nsSelectionType::SEL_OLE || + nSelType & nsSelectionType::SEL_GRF || + rSh.IsObjSelectable( aDocPos ) ) + // <-- { MV_KONTEXT( &rSh ); if( !rSh.IsFrmSelected() ) @@ -3379,11 +3385,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bCallBase = FALSE; } } - // nicht mehr hier zuruecksetzen, damit -- falls durch MouseMove - // bei gedrueckter Ctrl-Taste eine Mehrfachselektion erfolgen soll, - // im Drag nicht die vorherige Selektion aufgehoben wird. -// if(bModePushed) -// rSh.PopMode(FALSE); break; } } -- cgit v1.2.3 From ca5a7ae15c3385c869d57f48bdb6b6a1fed89dc2 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 30 Dec 2009 15:07:06 +0100 Subject: sw33bf02: #i89920# method - adjustment of object's attributes - renaming of method. - setting object's wrapping style to WRAP_THROUGH. - bringing object into foreground. --- sw/inc/fesh.hxx | 8 ++--- sw/source/core/crsr/crstrvl.cxx | 6 ++-- sw/source/core/frmedt/fefly1.cxx | 73 ++++++++++++++++------------------------ sw/source/ui/dochdl/swdtflvr.cxx | 16 +++++---- sw/source/ui/shells/grfshex.cxx | 4 +-- sw/source/ui/uiview/viewdraw.cxx | 14 ++++---- 6 files changed, 54 insertions(+), 67 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 9673b41855..aab25a8b4b 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -539,10 +539,10 @@ public: const SfxItemSet* pFlyAttrSet = 0, const SfxItemSet* pGrfAttrSet = 0, SwFrmFmt* = 0 ); - //Einfuegen eines DrawObjectes. Das Object muss bereits im DrawModel - // angemeldet sein. - void Insert( SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet = 0, - SwFrmFmt* = 0, const Point* = 0 ); + + // Insertion of a drawing object which have to be already inserted in the DrawModel + void InsertDrawObj( SdrObject& rDrawObj, + const Point& rInsertPosition ); BOOL ReplaceSdrObj( const String& rGrfName, const String& rFltName, const Graphic* pGrf = 0 ); diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index a39ccb99c9..c3e2b116ec 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1008,9 +1008,9 @@ BOOL SwCrsrShell::IsPageAtPos( const Point &rPt ) const } BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, - SwContentAtPos& rCntntAtPos, - BOOL bSetCrsr, - SwRect* pFldRect ) + SwContentAtPos& rCntntAtPos, + BOOL bSetCrsr, + SwRect* pFldRect ) { SET_CURR_SHELL( this ); BOOL bRet = FALSE; diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 70ee872744..499b151c18 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -75,9 +75,11 @@ // --> OD 2006-03-06 #125892# #include // <-- - #include - +// --> OD 2009-12-29 #i89920# +#include +#include +// <-- using ::rtl::OUString; using namespace ::com::sun::star; @@ -899,67 +901,50 @@ SwFlyFrmFmt* SwFEShell::InsertObject( const svt::EmbeddedObjectRef& xObj, } -void SwFEShell::Insert( SdrObject& rDrawObj, - const SfxItemSet* pFlyAttrSet, - SwFrmFmt* pFrmFmt, const Point* pPt ) +void SwFEShell::InsertDrawObj( SdrObject& rDrawObj, + const Point& rInsertPosition ) { - SwDrawFrmFmt* pFmt = 0; SET_CURR_SHELL( this ); - if( pPt ) - { - SfxItemSet* pSet = 0; - const SfxPoolItem* pItem; - if( !pFlyAttrSet || - !pFlyAttrSet->GetItemState( RES_ANCHOR, sal_False, &pItem ) || - FLY_PAGE != ((SwFmtAnchor*)pItem)->GetAnchorId() ) - { - pSet = new SfxItemSet( GetDoc()->GetAttrPool(), aFrmFmtSetRange ); - pSet->Put( SwFmtAnchor( FLY_AT_CNTNT )); - pFlyAttrSet = pSet; - } + SfxItemSet rFlyAttrSet( GetDoc()->GetAttrPool(), aFrmFmtSetRange ); + rFlyAttrSet.Put( SwFmtAnchor( FLY_AT_CNTNT )); + // --> OD 2009-12-29 #i89920# + rFlyAttrSet.Put( SwFmtSurround( SURROUND_THROUGHT ) ); + rDrawObj.SetLayer( getIDocumentDrawModelAccess()->GetHeavenId() ); + // <-- + // find anchor position + SwPaM aPam( pDoc->GetNodes() ); + { SwCrsrMoveState aState( MV_SETONLYTEXT ); - SwPaM aPam( pDoc->GetNodes() ); - Point aTmpPt( *pPt ); + Point aTmpPt( rInsertPosition ); getIDocumentLayoutAccess()->GetRootFrm()->GetCrsrOfst( aPam.GetPoint(), aTmpPt, &aState ); - SwFrm* pFrm = aPam.GetCntntNode()->GetFrm( 0, 0, sal_False ); - const Point aRelPos( pPt->X() - pFrm->Frm().Left(), - pPt->Y() - pFrm->Frm().Top() ); - // OD 2004-04-05 #i26791# - direct object positioning for + const SwFrm* pFrm = aPam.GetCntntNode()->GetFrm( 0, 0, sal_False ); + const Point aRelPos( rInsertPosition.X() - pFrm->Frm().Left(), + rInsertPosition.Y() - pFrm->Frm().Top() ); rDrawObj.SetRelativePos( aRelPos ); - ::lcl_FindAnchorPos( *GetDoc(), *pPt, *pFrm, *(SfxItemSet*)pFlyAttrSet ); - pFmt = GetDoc()->Insert( aPam, rDrawObj, pFlyAttrSet, pFrmFmt ); - if( pSet ) - delete pSet; - } - else - { - StartAllAction(); - FOREACHPAM_START( this ) - pFmt = GetDoc()->Insert(*PCURCRSR, rDrawObj, - pFlyAttrSet, pFrmFmt ); - ASSERT( pFmt, "Doc->Insert(sdrobj) failed." ); - - FOREACHPAM_END() - EndAllAction(); + ::lcl_FindAnchorPos( *GetDoc(), rInsertPosition, *pFrm, rFlyAttrSet ); } + // insert drawing object into the document creating a new instance + SwDrawFrmFmt* pFmt = GetDoc()->Insert( aPam, rDrawObj, &rFlyAttrSet, 0 ); - // --> OD 2005-01-07 #i40085# - follow-up of #i35635# // move object to visible layer SwContact* pContact = static_cast(rDrawObj.GetUserCall()); if ( pContact ) { pContact->MoveObjToVisibleLayer( &rDrawObj ); } - // <-- - if( pFmt ) - // das DrawObject selektieren + if ( pFmt ) + { + // select drawing object Imp()->GetDrawView()->MarkObj( &rDrawObj, Imp()->GetPageView(), - sal_False, sal_False ); + sal_False, sal_False ); + } else + { GetLayout()->SetAssertFlyPages(); + } } /*********************************************************************** diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index a1589281d5..b487e4286f 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -2658,7 +2658,9 @@ int SwTransferable::_PasteDBData( TransferableDataHelper& rData, if(pFmView) { const OXFormsDescriptor &rDesc = OXFormsTransferable::extractDescriptor(rData); if(0 != (pObj = pFmView->CreateXFormsControl(rDesc))) - rSh.SwFEShell::Insert( *pObj, 0, 0, pDragPt ); + { + rSh.SwFEShell::InsertDrawObj( *pObj, *pDragPt ); + } } } else if( nWh ) @@ -2719,7 +2721,7 @@ int SwTransferable::_PasteDBData( TransferableDataHelper& rData, if (pFmView && bHaveColumnDescriptor) { if ( 0 != (pObj = pFmView->CreateFieldControl( OColumnTransferable::extractColumnDescriptor(rData) ) ) ) - rSh.SwFEShell::Insert( *pObj, 0, 0, pDragPt ); + rSh.SwFEShell::InsertDrawObj( *pObj, *pDragPt ); } } nRet = 1; @@ -3658,7 +3660,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh ) } else { - // creating a temp. bookmark without undo + // creating a temp. bookmark without undo BOOL bUndo = rSh.DoesUndo(); rSh.DoUndo( FALSE ); BOOL bIsModified = rSh.IsModified(); @@ -3668,7 +3670,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh ) ::rtl::OUString(), ::rtl::OUString(), IDocumentMarkAccess::DDE_BOOKMARK); - if(pMark) + if(pMark) { sName = pMark->GetName(); bDelBookmrk = TRUE; @@ -3776,8 +3778,8 @@ BOOL SwTrnsfrDdeLink::WriteData( SvStream& rStrm ) } ::rtl::OUString sMarkName = pMark->GetName(); - // remove mark - pServerObject->SetNoServer(); // this removes the connection between SwServerObject and mark + // remove mark + pServerObject->SetNoServer(); // this removes the connection between SwServerObject and mark // N.B. ppMark was not loaded from file and cannot have xml:id pMarkAccess->deleteMark(ppMark); diff --git a/sw/source/ui/shells/grfshex.cxx b/sw/source/ui/shells/grfshex.cxx index 8cf626538a..b57a480cd3 100644 --- a/sw/source/ui/shells/grfshex.cxx +++ b/sw/source/ui/shells/grfshex.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -161,7 +161,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest& rReq ) pObj->setURL( aURL ); rSh.EnterStdMode(); - rSh.SwFEShell::Insert( *pObj, 0, 0, &aPos ); + rSh.SwFEShell::InsertDrawObj( *pObj, aPos ); bRet = true; if( pWindow ) diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx index 9ab1df6a91..c3fad37703 100644 --- a/sw/source/ui/uiview/viewdraw.cxx +++ b/sw/source/ui/uiview/viewdraw.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -174,7 +174,7 @@ void SwView::ExecDraw(SfxRequest& rReq) // TODO: unmark all other pWrtShell->EnterStdMode(); - pWrtShell->SwFEShell::Insert( *pObj, 0, 0, &aStartPos ); + pWrtShell->SwFEShell::InsertDrawObj( *pObj, aStartPos ); } } } @@ -221,7 +221,7 @@ void SwView::ExecDraw(SfxRequest& rReq) aSize = Size( 2835, 2835 ); pWrtShell->EnterStdMode(); - pWrtShell->SwFEShell::Insert( *pObj, 0, 0, &aPos ); + pWrtShell->SwFEShell::InsertDrawObj( *pObj, aPos ); rReq.Ignore (); } } @@ -246,8 +246,8 @@ void SwView::ExecDraw(SfxRequest& rReq) } //deselect if same shape is selected again (but different custom shapes do have same slot id) - if ( bDeselect || (nSlotId == nDrawSfxId && - (!pStringItem || (pStringItem->GetValue() == sDrawCustom)) + if ( bDeselect || (nSlotId == nDrawSfxId && + (!pStringItem || (pStringItem->GetValue() == sDrawCustom)) && (nSlotId != SID_DRAW_CS_ID) ) ) { if (GetDrawFuncPtr()) @@ -421,7 +421,7 @@ void SwView::ExitDraw() NoRotate(); if(pShell) - { + { //#126062 # the shell may be invalid at close/reload/SwitchToViewShell SfxDispatcher* pDispatch = GetViewFrame()->GetDispatcher(); USHORT nIdx = 0; @@ -431,7 +431,7 @@ void SwView::ExitDraw() pTest = pDispatch->GetShell(nIdx++); } while( pTest && pTest != this && pTest != pShell); - if(pTest == pShell && + if(pTest == pShell && // don't call LeaveSelFrmMode() etc. for the below, // because objects may still be selected: !pShell->ISA(SwDrawBaseShell) && -- cgit v1.2.3 From 7b78e9126eeaefa7861e27df70373ff23d84e2e4 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 30 Dec 2009 17:20:32 +0100 Subject: sw33bf02: #i107447# method - do not reflect reset of flag in return value on normal cursor move. --- sw/source/core/crsr/crsrsh.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 819527666b..f5bbfb5632 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -395,10 +395,18 @@ BOOL SwCrsrShell::LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode, else { const BOOL bSkipHidden = !GetViewOptions()->IsShowHiddenChar(); - bRet = SetInFrontOfLabel( FALSE ); + // --> OD 2009-12-30 #i107447# + // To avoid loop the reset of flag is no longer + // reflected in the return value . + const bool bResetOfInFrontOfLabel = SetInFrontOfLabel( FALSE ); bRet = pShellCrsr->LeftRight( bLeft, nCnt, nMode, bVisualAllowed, - bSkipHidden, - !IsOverwriteCrsr() ) || bRet; + bSkipHidden, !IsOverwriteCrsr() ); + if ( !bRet && bLeft && bResetOfInFrontOfLabel ) + { + // undo reset of flag + SetInFrontOfLabel( TRUE ); + } + // <-- } if( bRet ) -- cgit v1.2.3 From 5500b981549618958eea837abd3714e4679173bf Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 31 Dec 2009 09:33:47 +0100 Subject: sw33bf02: #i89920# adjustment of fix due to compiler warning --- sw/source/core/frmedt/feshview.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 4d0ff4e36b..44c8d18474 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -1240,10 +1240,10 @@ sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) Point aTmpPt( rPt ); if ( pTxtFrm->GetKeyCrsrOfst( pPos, aTmpPt ) ) { - SwRect aCharRect; - if ( pTxtFrm->GetCharRect( aCharRect, *pPos ) ) + SwRect aCursorCharRect; + if ( pTxtFrm->GetCharRect( aCursorCharRect, *pPos ) ) { - if ( aCharRect.IsOver( SwRect( pObj->GetLastBoundRect() ) ) ) + if ( aCursorCharRect.IsOver( SwRect( pObj->GetLastBoundRect() ) ) ) { bRet = sal_False; } -- cgit v1.2.3 From ae588b3d6e7a2765d6104e4db1a4b4b39f419a22 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 31 Dec 2009 10:05:48 +0100 Subject: sw33bf02: #i106906# method - lock view during action to avoid jump to cursor --- sw/source/ui/app/docsh.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sw/source') diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index 8cb2cdb66c..75f52cf50a 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -767,6 +767,10 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) if ( pWrtShell ) { SwWait aWait( *this, TRUE ); + // --> OD 2009-12-31 #i106906# + const sal_Bool bFormerLockView = pWrtShell->IsViewLocked(); + pWrtShell->LockView( sal_True ); + // <-- pWrtShell->StartAllAction(); pWrtShell->Push(); SwWriter aWrt( rMedium, *pWrtShell, TRUE ); @@ -777,6 +781,9 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) { pWrtShell->Pop(FALSE); pWrtShell->EndAllAction(); + // --> OD 2009-12-31 #i106906# + pWrtShell->LockView( bFormerLockView ); + // <-- } } else -- cgit v1.2.3 From 8b9dd0a5db623cdc91d3f8151ff8297a4c726b16 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 31 Dec 2009 10:59:35 +0100 Subject: sw33bf02: #i106452# method - check page description not only in situations with sections --- sw/source/core/layout/flowfrm.cxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 4968601e7a..5f903055a9 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -513,10 +513,10 @@ BOOL SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling, pParent->pLower = pStart; else //Modified for #i100782#,04/03/2009 - //If the pParent has more than 1 child nodes, former design will - //ignore them directly without any collection work. It will make some - //dangling pointers. This lead the crash... - //The new design will find the last child of pParent in loop way, and + //If the pParent has more than 1 child nodes, former design will + //ignore them directly without any collection work. It will make some + //dangling pointers. This lead the crash... + //The new design will find the last child of pParent in loop way, and //add the pStart after the last child. // pParent->Lower()->pNext = pStart; { @@ -2130,13 +2130,15 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways ) // OD 30.10.2002 #97265# - no in online layout if ( !pNewPage->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ) { - //Bei Sections kann es passieren, das wir gleich in den Follow geflutscht - //sind. Dadurch wird nicht vom GetLeaf fuer die richtige Seite gesorgt. - //Das muessen wir fuer diesen Fall pruefen. - if ( !bSamePage && pNewUpper->IsInSct() && + // --> OD 2009-12-31 #i106452# + // check page description not only in situation with sections. + if ( !bSamePage && ( rThis.GetAttrSet()->GetPageDesc().GetPageDesc() || pOldPage->GetPageDesc()->GetFollow() != pNewPage->GetPageDesc() ) ) + { SwFrm::CheckPageDescs( pNewPage, FALSE ); + } + // <-- } } return bSamePage; -- cgit v1.2.3 From c2edfcc456b5f43ff16f2f1214d42d619ecabb07 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Mon, 4 Jan 2010 13:30:37 +0100 Subject: sw33bf02: #i105243# Output of graphic in Writer with corresponding PDF handling --- sw/source/core/doc/notxtfrm.cxx | 10 ++++++---- sw/source/core/layout/paintfrm.cxx | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 3aa5151d9b..7c0c1cb9f4 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -909,8 +909,9 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons else if( rGrfObj.IsCached( pOut, aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(), &aGrfAttr )) { - rGrfObj.Draw( pOut, aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(), - &aGrfAttr ); + rGrfObj.DrawWithPDFHandling( *pOut, + aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(), + &aGrfAttr ); bContinue = FALSE; } } @@ -949,8 +950,9 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons 0, GRFMGR_DRAW_STANDARD, pVout ); } else - rGrfObj.Draw( pOut, aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(), - &aGrfAttr ); + rGrfObj.DrawWithPDFHandling( *pOut, + aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(), + &aGrfAttr ); } else { diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index fc0f501a9b..c453befa14 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1649,7 +1649,7 @@ void lcl_DrawGraphic( const SvxBrushItem& rBrush, OutputDevice *pOut, /// Because for drawing a graphic left-top-corner and size coordinations are /// used, these coordinations have to be determined on pixel level. ::SwAlignGrfRect( &aAlignedGrfRect, *pOut ); - pGrf->Draw( pOut, aAlignedGrfRect.Pos(), aAlignedGrfRect.SSize() ); + pGrf->DrawWithPDFHandling( *pOut, aAlignedGrfRect.Pos(), aAlignedGrfRect.SSize() ); if ( bNotInside ) pOut->Pop(); -- cgit v1.2.3 From 44e79cbc0edd76da5f4ecea2ab1c1e5669daf301 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Mon, 4 Jan 2010 12:57:09 +0000 Subject: exchgcmtdoc2: #i98634#: export writer change-comment as normal msword comment --- sw/source/filter/ww8/wrtw8sty.cxx | 63 ++++++++++++++++++++++------- sw/source/filter/ww8/wrtww8.cxx | 6 +-- sw/source/filter/ww8/wrtww8.hxx | 28 +++++++++---- sw/source/filter/ww8/ww8atr.cxx | 22 +++++++++- sw/source/filter/ww8/ww8attributeoutput.hxx | 3 +- sw/source/filter/ww8/ww8par.cxx | 5 ++- sw/source/filter/ww8/ww8scan.cxx | 11 ++--- 7 files changed, 103 insertions(+), 35 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index c6f6ce0b02..935bf36f00 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -72,6 +72,7 @@ #include #include #include +#include #include @@ -1856,13 +1857,48 @@ void WW8_WrPlcFtnEdn::Append( WW8_CP nCp, const SwFmtFtn& rFtn ) aCntnt.Insert( p, aCntnt.Count() ); } -void WW8_WrPlcPostIt::Append( WW8_CP nCp, const SwPostItField& rPostIt ) +WW8_Annotation::WW8_Annotation(const SwPostItField* pPostIt) +{ + mpRichText = pPostIt->GetTextObject(); + if (!mpRichText) + msSimpleText = pPostIt->GetTxt(); + msOwner = pPostIt->GetPar1(); + maDateTime = DateTime(pPostIt->GetDate(), pPostIt->GetTime()); +} + +WW8_Annotation::WW8_Annotation(const SwRedlineData* pRedline) : mpRichText(0) +{ + msSimpleText = pRedline->GetComment(); + msOwner = SW_MOD()->GetRedlineAuthor(pRedline->GetAuthor()); + maDateTime = pRedline->GetTimeStamp(); +} + +void WW8_WrPlcAnnotations::Append( WW8_CP nCp, const SwPostItField *pPostIt ) { aCps.Insert( nCp, aCps.Count() ); - void* p = (void*)&rPostIt; + WW8_Annotation* p = new WW8_Annotation(pPostIt); aCntnt.Insert( p, aCntnt.Count() ); } +void WW8_WrPlcAnnotations::Append( WW8_CP nCp, const SwRedlineData *pRedline ) +{ + maProcessedRedlines.insert(pRedline); + aCps.Insert( nCp, aCps.Count() ); + WW8_Annotation* p = new WW8_Annotation(pRedline); + aCntnt.Insert( p, aCntnt.Count() ); +} + +bool WW8_WrPlcAnnotations::IsNewRedlineComment( const SwRedlineData *pRedline ) +{ + return maProcessedRedlines.find(pRedline) == maProcessedRedlines.end(); +} + +WW8_WrPlcAnnotations::~WW8_WrPlcAnnotations() +{ + for( USHORT n=0; n < aCntnt.Count(); n++ ) + delete (WW8_Annotation*)aCntnt[n]; +} + bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp, WW8_CP& rCount ) { @@ -1882,13 +1918,13 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp, // Anfaenge fuer PlcfAtnTxt pTxtPos->Append( rWrt.Fc2Cp( rWrt.Strm().Tell() )); - const SwPostItField& rPFld = *(SwPostItField*)aCntnt[ i ]; rWrt.WritePostItBegin(); - if (const OutlinerParaObject* pOutliner = rPFld.GetTextObject()) - rWrt.WriteOutliner(*pOutliner, nTTyp); + const WW8_Annotation& rAtn = *(const WW8_Annotation*)aCntnt[i]; + if (rAtn.mpRichText) + rWrt.WriteOutliner(*rAtn.mpRichText, nTTyp); else { - String sTxt(rPFld.GetTxt()); + String sTxt(rAtn.msSimpleText); sTxt.SearchAndReplaceAll(0x0A, 0x0B); rWrt.WriteStringAsPara( sTxt ); } @@ -2015,8 +2051,8 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp, // then write first the GrpXstAtnOwners for ( i = 0; i < nLen; ++i ) { - const SwPostItField& rPFld = *(SwPostItField*)aCntnt[ i ]; - aStrArr.push_back(rPFld.GetPar1()); + const WW8_Annotation& rAtn = *(const WW8_Annotation*)aCntnt[i]; + aStrArr.push_back(rAtn.msOwner); } //sort and remove duplicates @@ -2054,10 +2090,9 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp, { for( i = 0; i < nLen; ++i ) { - const SwPostItField& rPFld = *(SwPostItField*)aCntnt[ i ]; + const WW8_Annotation& rAtn = *(const WW8_Annotation*)aCntnt[i]; - sal_uInt32 nDTTM = - sw::ms::DateTime2DTTM(DateTime(rPFld.GetDate(),rPFld.GetTime())); + sal_uInt32 nDTTM = sw::ms::DateTime2DTTM(rAtn.maDateTime); SwWW8Writer::WriteLong( *rWrt.pTableStrm, nDTTM ); SwWW8Writer::WriteShort( *rWrt.pTableStrm, 0 ); @@ -2137,12 +2172,12 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp, { for ( i = 0; i < nLen; ++i ) { - const SwPostItField& rPFld = *(SwPostItField*)aCntnt[ i ]; + const WW8_Annotation& rAtn = *(const WW8_Annotation*)aCntnt[i]; //aStrArr is sorted myiter aIter = ::std::lower_bound(aStrArr.begin(), - aStrArr.end(), rPFld.GetPar1()); - ASSERT(aIter != aStrArr.end() && *aIter == rPFld.GetPar1(), + aStrArr.end(), rAtn.msOwner); + ASSERT(aIter != aStrArr.end() && *aIter == rAtn.msOwner, "Impossible"); sal_uInt16 nFndPos = static_cast< sal_uInt16 >(aIter - aStrArr.begin()); String sAuthor(*aIter); diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index a650399f78..b6e7c4d76d 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3039,7 +3039,7 @@ void WW8Export::ExportDocument_Impl() pFtn = new WW8_WrPlcFtnEdn( TXT_FTN ); // Footnotes pEdn = new WW8_WrPlcFtnEdn( TXT_EDN ); // Endnotes - pAtn = new WW8_WrPlcPostIt; // PostIts + pAtn = new WW8_WrPlcAnnotations; // PostIts pTxtBxs = new WW8_WrPlcTxtBoxes( TXT_TXTBOX ); pHFTxtBxs = new WW8_WrPlcTxtBoxes( TXT_HFTXTBOX ); @@ -3448,7 +3448,7 @@ void WW8_WrPlcFtnEdn::WritePlc( WW8Export& rWrt ) const } -bool WW8_WrPlcPostIt::WriteTxt( WW8Export& rWrt ) +bool WW8_WrPlcAnnotations::WriteTxt( WW8Export& rWrt ) { bool bRet = WriteGenericTxt( rWrt, TXT_ATN, rWrt.pFib->ccpAtn ); rWrt.pFldAtn->Finish( rWrt.Fc2Cp( rWrt.Strm().Tell() ), @@ -3457,7 +3457,7 @@ bool WW8_WrPlcPostIt::WriteTxt( WW8Export& rWrt ) return bRet; } -void WW8_WrPlcPostIt::WritePlc( WW8Export& rWrt ) const +void WW8_WrPlcAnnotations::WritePlc( WW8Export& rWrt ) const { WriteGenericPlc( rWrt, TXT_ATN, rWrt.pFib->fcPlcfandTxt, rWrt.pFib->lcbPlcfandTxt, rWrt.pFib->fcPlcfandRef, diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 9a7686c228..dee667b1a1 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -109,7 +109,7 @@ class WW8_WrPlcFld; class WW8_WrMagicTable; class WW8_WrPlcFtnEdn; class WW8_WrPlcPn; -class WW8_WrPlcPostIt; +class WW8_WrPlcAnnotations; class MSWordSections; class WW8_WrPlcTxtBoxes; class WW8_WrPct; // Verwaltung @@ -488,7 +488,7 @@ public: WW8_WrPlcPn* pChpPlc; MSWordAttrIter* pChpIter; MSWordStyles* pStyles; - WW8_WrPlcPostIt* pAtn; + WW8_WrPlcAnnotations* pAtn; WW8_WrPlcTxtBoxes *pTxtBxs, *pHFTxtBxs; const sw::Frame *mpParentFrame; //If set we are exporting content inside @@ -1149,16 +1149,30 @@ public: void Append( WW8_CP nCp, const SwFmtFtn& rFtn ); }; -class WW8_WrPlcPostIt : public WW8_WrPlcSubDoc // Doppel-Plc fuer PostIts +struct WW8_Annotation +{ + const OutlinerParaObject* mpRichText; + String msSimpleText; + String msOwner; + DateTime maDateTime; + WW8_Annotation(const SwPostItField* pPostIt); + WW8_Annotation(const SwRedlineData* pRedline); +}; + +class WW8_WrPlcAnnotations : public WW8_WrPlcSubDoc // Doppel-Plc fuer PostIts { private: //No copying - WW8_WrPlcPostIt(const WW8_WrPlcPostIt&); - WW8_WrPlcPostIt& operator=(WW8_WrPlcPostIt&); + WW8_WrPlcAnnotations(const WW8_WrPlcAnnotations&); + WW8_WrPlcAnnotations& operator=(WW8_WrPlcAnnotations&); + std::set maProcessedRedlines; public: - WW8_WrPlcPostIt() {} + WW8_WrPlcAnnotations() {} + ~WW8_WrPlcAnnotations(); - void Append( WW8_CP nCp, const SwPostItField& rPostIt ); + void Append( WW8_CP nCp, const SwPostItField* pPostIt ); + void Append( WW8_CP nCp, const SwRedlineData* pRedLine ); + bool IsNewRedlineComment( const SwRedlineData* pRedLine ); bool WriteTxt( WW8Export& rWrt ); void WritePlc( WW8Export& rWrt ) const; }; diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index afc8a436d8..7d95e8eda4 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -982,6 +982,24 @@ void WW8AttributeOutput::StartRunProperties() m_nFieldResults = pCurrentFields ? pCurrentFields->ResultCount() : 0; } + +void WW8AttributeOutput::StartRun( const SwRedlineData* pRedlineData ) +{ + if (pRedlineData) + { + const String &rComment = pRedlineData->GetComment(); + //Only possible to export to main text + if (rComment.Len() && (m_rWW8Export.nTxtTyp == TXT_MAINTEXT)) + { + if (m_rWW8Export.pAtn->IsNewRedlineComment(pRedlineData)) + { + m_rWW8Export.pAtn->Append( m_rWW8Export.Fc2Cp( m_rWW8Export.Strm().Tell() ), pRedlineData ); + m_rWW8Export.WritePostItBegin( m_rWW8Export.pO ); + } + } + } +} + void WW8AttributeOutput::EndRunProperties( const SwRedlineData* pRedlineData ) { Redline( pRedlineData ); @@ -2555,8 +2573,8 @@ void WW8AttributeOutput::SetField( const SwField& rFld, ww::eField eType, const void WW8AttributeOutput::PostitField( const SwField* pFld ) { - const SwPostItField& rPFld = *(SwPostItField*)pFld; - m_rWW8Export.pAtn->Append( m_rWW8Export.Fc2Cp( m_rWW8Export.Strm().Tell() ), rPFld ); + const SwPostItField *pPFld = (const SwPostItField*)pFld; + m_rWW8Export.pAtn->Append( m_rWW8Export.Fc2Cp( m_rWW8Export.Strm().Tell() ), pPFld ); m_rWW8Export.WritePostItBegin( m_rWW8Export.pO ); } diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx index 608dfc17d2..f0fcfce991 100644 --- a/sw/source/filter/ww8/ww8attributeoutput.hxx +++ b/sw/source/filter/ww8/ww8attributeoutput.hxx @@ -57,8 +57,7 @@ public: /// Start of the text run. /// - /// No-op for binary filters. - virtual void StartRun( const SwRedlineData* /*pRedlineData*/ ) {} + virtual void StartRun( const SwRedlineData* pRedlineData ); /// End of the text run. /// diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 2ae8a362ea..30c3eb109a 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -57,9 +57,8 @@ #include // SvxLRSpaceItem #include #include -// --> OD 2005-02-28 #i43427# #include -// <-- +#include #include #include #include @@ -1630,7 +1629,9 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes) sTxt, aDate ); aPostIt.SetTextObject(pOutliner); + pCtrlStck->NewAttr(*pPaM->GetPoint(), SvxCharHiddenItem(false, RES_CHRATR_HIDDEN)); rDoc.InsertPoolItem(*pPaM, SwFmtFld(aPostIt), 0); + pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_CHRATR_HIDDEN); return 0; } diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index d559608d86..ffe0bc936a 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -4390,15 +4390,16 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp, pBkm = &aD[1]; pEdn = &aD[2]; pFtn = &aD[3]; + pAnd = &aD[4]; - - pPcd = ( pBase->pPLCFx_PCD ) ? &aD[4] : 0; + pPcd = ( pBase->pPLCFx_PCD ) ? &aD[5] : 0; //pPcdA index == pPcd index + 1 - pPcdA = ( pBase->pPLCFx_PCDAttrs ) ? &aD[5] : 0; - pChp = &aD[6]; - pAnd = &aD[7]; + pPcdA = ( pBase->pPLCFx_PCDAttrs ) ? &aD[6] : 0; + + pChp = &aD[7]; pPap = &aD[8]; pSep = &aD[9]; + pSep->pPLCFx = pBase->pSepPLCF; pFtn->pPLCFx = pBase->pFtnPLCF; pEdn->pPLCFx = pBase->pEdnPLCF; -- cgit v1.2.3 From abceac051f4586fb5ea52ebeac484e61a078e428 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 5 Jan 2010 14:19:09 +0100 Subject: sw33bf02: #b6884103# correct consideration of actual indent when starting new list. --- sw/inc/ndtxt.hxx | 4 ++++ sw/source/core/txtnode/ndtxt.cxx | 45 ++++++++++++++++++++++++++++++++++++++++ sw/source/ui/wrtsh/wrtsh1.cxx | 11 ++++++---- 3 files changed, 56 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 37aa87b202..6f77c48da7 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -484,6 +484,10 @@ public: */ BOOL GetFirstLineOfsWithNum( short& rFirstOffset ) const; + // --> OD 2010-01-05 #b6884103# + SwTwips GetAdditionalIndentForStartingNewList() const; + // <-- + // --> OD 2008-12-02 #i96772# void ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpaceItem ) const; // <-- diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 218cdfb9a8..766c4a20cb 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -2889,6 +2889,51 @@ BOOL SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const return bRet; } +// --> OD 2010-01-05 #b6884103# +SwTwips SwTxtNode::GetAdditionalIndentForStartingNewList() const +{ + SwTwips nAdditionalIndent = 0; + + const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L; + if ( pRule ) + { + const SwNumFmt& rFmt = pRule->Get(static_cast(GetActualListLevel())); + if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) + { + nAdditionalIndent = GetSwAttrSet().GetLRSpace().GetLeft(); + + if (getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING)) + { + nAdditionalIndent = nAdditionalIndent - + GetSwAttrSet().GetLRSpace().GetTxtFirstLineOfst(); + } + } + else if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + { + if ( AreListLevelIndentsApplicable() ) + { + nAdditionalIndent = rFmt.GetIndentAt() + rFmt.GetFirstLineIndent(); + } + else + { + nAdditionalIndent = GetSwAttrSet().GetLRSpace().GetLeft(); + if (getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING)) + { + nAdditionalIndent = nAdditionalIndent - + GetSwAttrSet().GetLRSpace().GetTxtFirstLineOfst(); + } + } + } + } + else + { + nAdditionalIndent = GetSwAttrSet().GetLRSpace().GetLeft(); + } + + return nAdditionalIndent; +} +// <-- + // --> OD 2008-12-02 #i96772# void SwTxtNode::ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpaceItem ) const { diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index f372bebac0..7406e8803c 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -1379,10 +1379,13 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) if ( pTxtNode && ePosAndSpaceMode == SvxNumberFormat::LABEL_ALIGNMENT ) { - short nTxtNodeFirstLineOffset( 0 ); - pTxtNode->GetFirstLineOfsWithNum( nTxtNodeFirstLineOffset ); - const SwTwips nTxtNodeIndent = pTxtNode->GetLeftMarginForTabCalculation() + - nTxtNodeFirstLineOffset; + // --> OD 2010-01-05 #b6884103# +// short nTxtNodeFirstLineOffset( 0 ); +// pTxtNode->GetFirstLineOfsWithNum( nTxtNodeFirstLineOffset ); +// const SwTwips nTxtNodeIndent = pTxtNode->GetLeftMarginForTabCalculation() + +// nTxtNodeFirstLineOffset; + const SwTwips nTxtNodeIndent = pTxtNode->GetAdditionalIndentForStartingNewList(); + // <-- if ( ( nTxtNodeIndent + nWidthOfTabs ) != 0 ) { const SwTwips nIndentChange = nTxtNodeIndent + nWidthOfTabs; -- cgit v1.2.3 From 523dff273f291ee6655e1f0084ccb306dacf6b34 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 5 Jan 2010 14:44:36 +0100 Subject: autorecovery: method - no call of method for window of zero size. --- sw/source/ui/uiview/pview.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 56891e4e15..8bbd974433 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -2090,8 +2090,11 @@ void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize ) //Aufruf der DocSzChgd-Methode der Scrollbars ist noetig, da vom maximalen //Scrollrange immer die halbe Hoehe der VisArea abgezogen wird. - if ( pVScrollbar ) - ScrollDocSzChg(); + if ( pVScrollbar && + aTmpSize.Width() > 0 && aTmpSize.Height() > 0 ) + { + ScrollDocSzChg(); + } } /*-------------------------------------------------------------------- -- cgit v1.2.3 From c592b6900187bb5066dfca1250664ac638863b1c Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 5 Jan 2010 16:37:36 +0100 Subject: swunolocking1: #i107171#: fix crash caused by SwXParagraph::attachToText(): register at the text node, not at an uno cursor. --- sw/inc/unoobj.hxx | 2 +- sw/source/core/unocore/unoparagraph.cxx | 7 ++++--- sw/source/core/unocore/unotext.cxx | 24 ++++++++++++++---------- 3 files changed, 19 insertions(+), 14 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx index e2e8b02dde..4e9511647d 100644 --- a/sw/inc/unoobj.hxx +++ b/sw/inc/unoobj.hxx @@ -1283,7 +1283,7 @@ public: static SwXParagraph* GetImplementation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xRef ); //falls es mal als Service erzeugt werden kann //void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - void attachToText(SwXText* pParent, SwUnoCrsr* pCrsr); + void attachToText(SwXText & rParent, SwTxtNode & rTxtNode); }; /* -----------------23.03.99 12:57------------------- * diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 812b81e928..c947c4181f 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -226,14 +226,15 @@ SwXParagraph::~SwXParagraph() /* -----------------------------11.07.00 14:48-------------------------------- ---------------------------------------------------------------------------*/ -void SwXParagraph::attachToText(SwXText* pParent, SwUnoCrsr* pCrsr) +void +SwXParagraph::attachToText(SwXText & rParent, SwTxtNode & rTxtNode) { DBG_ASSERT(m_bIsDescriptor, "Paragraph is not a descriptor"); if(m_bIsDescriptor) { m_bIsDescriptor = FALSE; - pCrsr->Add(this); - xParentText = pParent; + rTxtNode.Add(this); + xParentText = &rParent; if(m_sText.getLength()) { try { setString(m_sText); } diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 0373d8877a..c654b5ec6f 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -662,7 +662,7 @@ void SwXText::insertTextContentBefore( SwXTextSection* pXSection = SwXTextSection::GetImplementation( xSuccessor ); SwXTextTable* pXTable = SwXTextTable::GetImplementation(xSuccessor ); SwFrmFmt* pTableFmt = pXTable ? pXTable->GetFrmFmt() : 0; - SwUnoCrsr* pUnoCrsr = 0; + SwTxtNode * pTxtNode = 0; if(pTableFmt && pTableFmt->GetDoc() == GetDoc()) { SwTable* pTable = SwTable::FindTable( pTableFmt ); @@ -671,7 +671,7 @@ void SwXText::insertTextContentBefore( SwNodeIndex aTblIdx( *pTblNode, -1 ); SwPosition aBefore(aTblIdx); bRet = GetDoc()->AppendTxtNode( aBefore ); - pUnoCrsr = GetDoc()->CreateUnoCrsr( aBefore, FALSE); + pTxtNode = aBefore.nNode.GetNode().GetTxtNode(); } else if(pXSection && pXSection->GetFmt() && @@ -683,13 +683,15 @@ void SwXText::insertTextContentBefore( SwNodeIndex aSectIdx( *pSectNode, -1 ); SwPosition aBefore(aSectIdx); bRet = GetDoc()->AppendTxtNode( aBefore ); - pUnoCrsr = GetDoc()->CreateUnoCrsr( aBefore, FALSE); + pTxtNode = aBefore.nNode.GetNode().GetTxtNode(); } - if(!bRet) + if (!bRet || !pTxtNode) + { throw lang::IllegalArgumentException(); + } else { - pPara->attachToText(this, pUnoCrsr); + pPara->attachToText(*this, *pTxtNode); } } @@ -708,11 +710,11 @@ void SwXText::insertTextContentAfter( if(!pPara || !pPara->IsDescriptor() || !xPredecessor.is()) throw lang::IllegalArgumentException(); - SwUnoCrsr* pUnoCrsr = 0; SwXTextSection* pXSection = SwXTextSection::GetImplementation( xPredecessor ); SwXTextTable* pXTable = SwXTextTable::GetImplementation(xPredecessor ); SwFrmFmt* pTableFmt = pXTable ? pXTable->GetFrmFmt() : 0; sal_Bool bRet = sal_False; + SwTxtNode * pTxtNode = 0; if(pTableFmt && pTableFmt->GetDoc() == GetDoc()) { SwTable* pTable = SwTable::FindTable( pTableFmt ); @@ -721,7 +723,7 @@ void SwXText::insertTextContentAfter( SwEndNode* pTableEnd = pTblNode->EndOfSectionNode(); SwPosition aTableEnd(*pTableEnd); bRet = GetDoc()->AppendTxtNode( aTableEnd ); - pUnoCrsr = GetDoc()->CreateUnoCrsr( aTableEnd, FALSE); + pTxtNode = aTableEnd.nNode.GetNode().GetTxtNode(); } else if(pXSection && pXSection->GetFmt() && @@ -732,13 +734,15 @@ void SwXText::insertTextContentAfter( SwEndNode* pEnd = pSectNode->EndOfSectionNode(); SwPosition aEnd(*pEnd); bRet = GetDoc()->AppendTxtNode( aEnd ); - pUnoCrsr = GetDoc()->CreateUnoCrsr( aEnd, FALSE); + pTxtNode = aEnd.nNode.GetNode().GetTxtNode(); } - if(!bRet) + if (!bRet || !pTxtNode) + { throw lang::IllegalArgumentException(); + } else { - pPara->attachToText(this, pUnoCrsr); + pPara->attachToText(*this, *pTxtNode); } } /* -----------------------------10.07.00 15:40-------------------------------- -- cgit v1.2.3 From c4c159aeb1de2c69953cbee6ae5a9d7aff2e6fe2 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 5 Jan 2010 16:37:36 +0100 Subject: swunolocking1: #i106930#: thints.cxx: tweak isNestedAny() a bit with the fix for i106930, inserting a nesting hint without extent never overrides an existing hint; but overriding is actually desirable in the corner case where the existing hint is _also_ empty. [the unoapi test sw.SwXTextTableCursor relies on this] --- sw/source/core/txtnode/thints.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index a09a7ccec5..ee2ac11a99 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -159,7 +159,8 @@ bool isNestedAny(const xub_StrLen nStart1, const xub_StrLen nEnd1, const xub_StrLen nStart2, const xub_StrLen nEnd2) { return ((nStart1 == nStart2) || (nEnd1 == nEnd2)) - ? (nStart1 != nEnd1) // same start/end: nested except if hint1 empty + // same start/end: nested except if hint1 empty and hint2 not empty + ? (nStart1 != nEnd1) || (nStart2 == nEnd2) : ((nStart1 < nStart2) ? (nEnd1 >= nEnd2) : (nEnd1 <= nEnd2)); } -- cgit v1.2.3 From d86261f90c1a54a48caa3526b592f07f0fbe1c67 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 5 Jan 2010 16:37:41 +0100 Subject: swunolocking1: swtypes.hxx: rename frame anchor types enum RndStdIds: rename frame anchor types (FLY_*) to be more intuitive. [note the completely ridiculous number of files that care about anchor types] --- sw/inc/dcontact.hxx | 10 +-- sw/inc/fmtanchr.hxx | 4 +- sw/inc/swtypes.hxx | 10 +-- sw/source/core/access/accframe.cxx | 6 +- sw/source/core/access/accfrmobj.cxx | 6 +- sw/source/core/doc/doc.cxx | 4 +- sw/source/core/doc/docbm.cxx | 33 +++++--- sw/source/core/doc/docdraw.cxx | 10 +-- sw/source/core/doc/docedt.cxx | 38 ++++----- sw/source/core/doc/docfly.cxx | 52 ++++++------ sw/source/core/doc/docglbl.cxx | 22 +++-- sw/source/core/doc/doclay.cxx | 98 ++++++++++++---------- sw/source/core/doc/docnew.cxx | 2 +- sw/source/core/doc/docsort.cxx | 19 ++--- sw/source/core/doc/poolfmt.cxx | 18 ++-- sw/source/core/doc/tblcpy.cxx | 12 +-- sw/source/core/docnode/ndcopy.cxx | 47 +++++------ sw/source/core/docnode/ndtbl.cxx | 19 +++-- sw/source/core/docnode/node.cxx | 6 +- sw/source/core/docnode/swbaslnk.cxx | 30 +++---- sw/source/core/draw/dcontact.cxx | 26 ++---- sw/source/core/draw/dview.cxx | 14 ++-- sw/source/core/edit/autofmt.cxx | 2 +- sw/source/core/fields/expfld.cxx | 15 ++-- sw/source/core/frmedt/fecopy.cxx | 73 ++++++++-------- sw/source/core/frmedt/fefly1.cxx | 84 +++++++++++-------- sw/source/core/frmedt/feshview.cxx | 24 +++--- sw/source/core/frmedt/fews.cxx | 18 ++-- sw/source/core/frmedt/tblsel.cxx | 9 +- sw/source/core/inc/flyfrm.hxx | 8 +- sw/source/core/layout/anchoreddrawobject.cxx | 16 ++-- sw/source/core/layout/anchoredobject.cxx | 12 +-- sw/source/core/layout/atrfrm.cxx | 75 +++++++++-------- sw/source/core/layout/calcmove.cxx | 6 +- sw/source/core/layout/flowfrm.cxx | 2 +- sw/source/core/layout/fly.cxx | 19 +++-- sw/source/core/layout/flycnt.cxx | 2 +- sw/source/core/layout/flylay.cxx | 9 +- sw/source/core/layout/flypos.cxx | 8 +- sw/source/core/layout/frmtool.cxx | 27 +++--- sw/source/core/layout/laycache.cxx | 11 ++- sw/source/core/layout/objectformatter.cxx | 2 +- sw/source/core/layout/objectformattertxtfrm.cxx | 6 +- sw/source/core/layout/pagechg.cxx | 12 ++- sw/source/core/layout/sortedobjsimpl.cxx | 41 +++++---- sw/source/core/layout/tabfrm.cxx | 8 +- sw/source/core/layout/wsfrm.cxx | 10 +-- .../tocntntanchoredobjectposition.cxx | 6 +- sw/source/core/text/EnhancedPDFExportHelper.cxx | 12 +-- sw/source/core/text/itratr.cxx | 6 +- sw/source/core/text/porfly.cxx | 5 +- sw/source/core/text/txtfly.cxx | 50 +++++------ sw/source/core/text/txtfrm.cxx | 20 ++--- sw/source/core/txtnode/atrflyin.cxx | 10 ++- sw/source/core/txtnode/thints.cxx | 8 +- sw/source/core/undo/rolbck.cxx | 2 +- sw/source/core/undo/unattr.cxx | 16 ++-- sw/source/core/undo/undel.cxx | 4 +- sw/source/core/undo/undobj.cxx | 6 +- sw/source/core/undo/undobj1.cxx | 91 ++++++++++++-------- sw/source/core/undo/undraw.cxx | 37 ++++---- sw/source/core/undo/untbl.cxx | 10 +-- sw/source/core/undo/untblk.cxx | 16 ++-- sw/source/core/unocore/unodraw.cxx | 46 ++++++---- sw/source/core/unocore/unoframe.cxx | 23 ++--- sw/source/core/unocore/unoobj2.cxx | 3 +- sw/source/core/view/vdraw.cxx | 9 +- sw/source/filter/basflt/shellio.cxx | 19 +++-- sw/source/filter/html/css1atr.cxx | 10 +-- sw/source/filter/html/htmlcss1.cxx | 13 +-- sw/source/filter/html/htmldraw.cxx | 14 ++-- sw/source/filter/html/htmlfly.cxx | 20 ++--- sw/source/filter/html/htmlforw.cxx | 7 +- sw/source/filter/html/htmlgrin.cxx | 30 +++---- sw/source/filter/html/htmlplug.cxx | 8 +- sw/source/filter/html/swhtml.cxx | 36 ++++---- sw/source/filter/inc/fltshell.hxx | 12 ++- sw/source/filter/rtf/rtfatr.cxx | 20 ++--- sw/source/filter/rtf/rtffly.cxx | 17 ++-- sw/source/filter/rtf/swparrtf.cxx | 28 ++----- sw/source/filter/rtf/wrtrtf.cxx | 7 +- sw/source/filter/ww1/fltshell.cxx | 13 ++- sw/source/filter/ww1/w1sprm.cxx | 10 +-- sw/source/filter/ww8/writerhelper.cxx | 2 +- sw/source/filter/ww8/wrtw8esh.cxx | 16 ++-- sw/source/filter/ww8/wrtw8nds.cxx | 13 +-- sw/source/filter/ww8/wrtww8.cxx | 2 +- sw/source/filter/ww8/wrtww8gr.cxx | 6 +- sw/source/filter/ww8/ww8atr.cxx | 8 +- sw/source/filter/ww8/ww8glsy.cxx | 13 ++- sw/source/filter/ww8/ww8graf.cxx | 20 ++--- sw/source/filter/ww8/ww8graf2.cxx | 8 +- sw/source/filter/ww8/ww8par.cxx | 2 +- sw/source/filter/ww8/ww8par2.cxx | 13 +-- sw/source/filter/ww8/ww8par4.cxx | 8 +- sw/source/filter/ww8/ww8par5.cxx | 8 +- sw/source/filter/ww8/ww8par6.cxx | 24 ++---- sw/source/filter/xml/xmltexti.cxx | 5 +- sw/source/ui/app/appenv.cxx | 20 +---- sw/source/ui/app/applab.cxx | 18 +--- sw/source/ui/dbui/mmlayoutpage.cxx | 6 +- sw/source/ui/dialog/regionsw.cxx | 23 +---- sw/source/ui/docvw/edtwin.cxx | 25 ++---- sw/source/ui/frmdlg/column.cxx | 2 +- sw/source/ui/frmdlg/frmmgr.cxx | 27 +++--- sw/source/ui/frmdlg/frmpage.cxx | 60 +++++++------ sw/source/ui/frmdlg/wrap.cxx | 54 +++++++----- sw/source/ui/ribbar/conrect.cxx | 11 +-- sw/source/ui/ribbar/drawbase.cxx | 3 +- sw/source/ui/shells/basesh.cxx | 58 +++++++------ sw/source/ui/shells/drwbassh.cxx | 12 ++- sw/source/ui/shells/textdrw.cxx | 6 -- sw/source/ui/shells/textidx.cxx | 6 +- sw/source/ui/shells/textsh.cxx | 12 +-- sw/source/ui/uiview/view2.cxx | 19 ----- sw/source/ui/uiview/viewtab.cxx | 4 +- sw/source/ui/utlui/attrdesc.cxx | 8 +- sw/source/ui/wrtsh/select.cxx | 6 -- 118 files changed, 1007 insertions(+), 1150 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx index 8860f0e38f..0f5ca9b9b3 100644 --- a/sw/inc/dcontact.hxx +++ b/sw/inc/dcontact.hxx @@ -191,11 +191,11 @@ public: } RndStdIds GetAnchorId() const { return GetAnchorFmt().GetAnchorId(); } - bool ObjAnchoredAtPage() const { return GetAnchorId() == FLY_PAGE; } - bool ObjAnchoredAtFly() const { return GetAnchorId() == FLY_AT_FLY; } - bool ObjAnchoredAtPara() const { return GetAnchorId() == FLY_AT_CNTNT; } - bool ObjAnchoredAtChar() const { return GetAnchorId() == FLY_AUTO_CNTNT; } - bool ObjAnchoredAsChar() const { return GetAnchorId() == FLY_IN_CNTNT; } + bool ObjAnchoredAtPage() const { return GetAnchorId() == FLY_AT_PAGE; } + bool ObjAnchoredAtFly() const { return GetAnchorId() == FLY_AT_FLY; } + bool ObjAnchoredAtPara() const { return GetAnchorId() == FLY_AT_PARA; } + bool ObjAnchoredAtChar() const { return GetAnchorId() == FLY_AT_CHAR; } + bool ObjAnchoredAsChar() const { return GetAnchorId() == FLY_AS_CHAR; } const SwPosition& GetCntntAnchor() const { diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx index 82841835db..80f35111ef 100644 --- a/sw/inc/fmtanchr.hxx +++ b/sw/inc/fmtanchr.hxx @@ -55,7 +55,7 @@ class SW_DLLPUBLIC SwFmtAnchor: public SfxPoolItem static sal_uInt32 mnOrderCounter; public: - SwFmtAnchor( RndStdIds eRnd = FLY_PAGE, USHORT nPageNum = 0 ); + SwFmtAnchor( RndStdIds eRnd = FLY_AT_PAGE, USHORT nPageNum = 0 ); SwFmtAnchor( const SwFmtAnchor &rCpy ); ~SwFmtAnchor(); @@ -86,7 +86,7 @@ public: }; inline const SwFmtAnchor &SwAttrSet::GetAnchor(BOOL bInP) const - { return (const SwFmtAnchor&)Get( RES_ANCHOR,bInP); } + { return static_cast(Get(RES_ANCHOR, bInP)); } inline const SwFmtAnchor &SwFmt::GetAnchor(BOOL bInP) const { return aSet.GetAnchor(bInP); } diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx index 7bc90a4e76..70bebb09fe 100644 --- a/sw/inc/swtypes.hxx +++ b/sw/inc/swtypes.hxx @@ -166,11 +166,11 @@ const short lOutlineMinTextDistance = 216; // 0.15 inch = 0.38 cm //Schnittstellen Bedeutung haben (SwDoc). enum RndStdIds { - FLY_AT_CNTNT, //Absatzgebundener Rahmen - FLY_IN_CNTNT, //Zeichengebundener Rahmen - FLY_PAGE, //Seitengebundener Rahmen - FLY_AT_FLY, //Rahmengebundener Rahmen ( LAYER_IMPL ) - FLY_AUTO_CNTNT, //Automatisch positionierter, absatzgebundener Rahmen + FLY_AT_PARA, // anchored at paragraph + FLY_AS_CHAR, // anchored as character + FLY_AT_PAGE, // anchored at page + FLY_AT_FLY, // anchored at frame + FLY_AT_CHAR, // anchored at character //Der Rest wird nur fuer SS benutzt. RND_STD_HEADER, RND_STD_FOOTER, diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx index ce6c2ad0e1..573383b7c7 100644 --- a/sw/source/core/access/accframe.cxx +++ b/sw/source/core/access/accframe.cxx @@ -438,7 +438,7 @@ const SwFrm *SwAccessibleFrame::GetParent( const SwFrmOrObj& rFrmOrObj, const SwFlyFrm *pFly = static_cast< const SwFlyFrm *>( pFrm ); if( pFly->IsFlyInCntFrm() ) { - // For FLY_IN_CNTNT the parent is the anchor + // For FLY_AS_CHAR the parent is the anchor aParent = pFly->GetAnchorFrm(); ASSERT( aParent.IsAccessible( bInPagePreview ), "parent is not accessible" ); @@ -471,9 +471,9 @@ const SwFrm *SwAccessibleFrame::GetParent( const SwFrmOrObj& rFrmOrObj, { const SwFrmFmt *pFrmFmt = pContact->GetFmt(); ASSERT( pFrmFmt, "frame format is missing" ); - if( pFrmFmt && FLY_IN_CNTNT == pFrmFmt->GetAnchor().GetAnchorId() ) + if (pFrmFmt && FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId()) { - // For FLY_IN_CNTNT the parent is the anchor + // For FLY_AS_CHAR the parent is the anchor aParent = pContact->GetAnchorFrm(); ASSERT( aParent.IsAccessible( bInPagePreview ), "parent is not accessible" ); diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx index 3102cc958e..88b6b0e8b8 100644 --- a/sw/source/core/access/accfrmobj.cxx +++ b/sw/source/core/access/accfrmobj.cxx @@ -59,8 +59,10 @@ sal_Bool SwFrmOrObj::IsBoundAsChar() const else { const SwFrmFmt *pFrmFmt = pObj ? ::FindFrmFmt( pObj ) : 0; - return pFrmFmt ? static_cast(FLY_IN_CNTNT == pFrmFmt->GetAnchor().GetAnchorId()) - : sal_False; + return (pFrmFmt) + ? static_cast(FLY_AS_CHAR == + pFrmFmt->GetAnchor().GetAnchorId()) + : sal_False; } } diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 252ab069c1..c52b387ba9 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -95,9 +95,7 @@ #include #include #include -#ifndef _CMDID_H #include // fuer den dflt - Printer in SetJob -#endif #ifndef _STATSTR_HRC #include // StatLine-String #endif @@ -923,7 +921,7 @@ SwFlyFrmFmt* SwDoc::_InsNoTxtNode( const SwPosition& rPos, SwNoTxtNode* pNode, SwFlyFrmFmt *pFmt = 0; if( pNode ) { - pFmt = _MakeFlySection( rPos, *pNode, FLY_AT_CNTNT, + pFmt = _MakeFlySection( rPos, *pNode, FLY_AT_PARA, pFlyAttrSet, pFrmFmt ); if( pGrfAttrSet ) pNode->SetAttr( *pGrfAttrSet ); diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 80973abeca..5af1944799 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -1259,7 +1259,6 @@ void _SaveCntntIdx(SwDoc* pDoc, SwCntntNode *pNode = pDoc->GetNodes()[nNode]->GetCntntNode(); if( pNode ) { - const SwPosition* pAPos; SwFrm* pFrm = pNode->GetFrm(); #if OSL_DEBUG_LEVEL > 1 @@ -1277,16 +1276,18 @@ void _SaveCntntIdx(SwDoc* pDoc, SwAnchoredObject* pObj = rDObj[ --n ]; const SwFrmFmt& rFmt = pObj->GetFrmFmt(); const SwFmtAnchor& rAnchor = rFmt.GetAnchor(); - if( ( ( nSaveFly && FLY_AT_CNTNT == rAnchor.GetAnchorId() ) || - FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) && - ( 0 != ( pAPos = rAnchor.GetCntntAnchor() ) ) ) + SwPosition const*const pAPos = rAnchor.GetCntntAnchor(); + if ( pAPos && + ( ( nSaveFly && + FLY_AT_PARA == rAnchor.GetAnchorId() ) || + ( FLY_AT_CHAR == rAnchor.GetAnchorId() ) ) ) { aSave.SetType( 0x2000 ); aSave.SetContent( pAPos->nContent.GetIndex() ); OSL_ENSURE( nNode == pAPos->nNode.GetIndex(), "_SaveCntntIdx: Wrong Node-Index" ); - if( FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) + if ( FLY_AT_CHAR == rAnchor.GetAnchorId() ) { if( nCntnt <= aSave.GetContent() ) { @@ -1321,14 +1322,14 @@ void _SaveCntntIdx(SwDoc* pDoc, continue; const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); - if( ( FLY_AT_CNTNT == rAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) && - 0 != ( pAPos = rAnchor.GetCntntAnchor()) && - nNode == pAPos->nNode.GetIndex() ) + SwPosition const*const pAPos = rAnchor.GetCntntAnchor(); + if ( pAPos && ( nNode == pAPos->nNode.GetIndex() ) && + ( FLY_AT_PARA == rAnchor.GetAnchorId() || + FLY_AT_CHAR == rAnchor.GetAnchorId() ) ) { aSave.SetType( 0x2000 ); aSave.SetContent( pAPos->nContent.GetIndex() ); - if( FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) + if ( FLY_AT_CHAR == rAnchor.GetAnchorId() ) { if( nCntnt <= aSave.GetContent() ) { @@ -1444,11 +1445,15 @@ void _RestoreCntntIdx(SwDoc* pDoc, SwFmtAnchor aNew( rFlyAnchor ); SwPosition aNewPos( *rFlyAnchor.GetCntntAnchor() ); aNewPos.nNode = *pCNd; - if( FLY_AUTO_CNTNT == rFlyAnchor.GetAnchorId() ) + if ( FLY_AT_CHAR == rFlyAnchor.GetAnchorId() ) + { aNewPos.nContent.Assign( pCNd, aSave.GetContent() + nOffset ); + } else + { aNewPos.nContent.Assign( 0, 0 ); + } aNew.SetAnchor( &aNewPos ); pFrmFmt->SetFmtAttr( aNew ); } @@ -1608,11 +1613,15 @@ void _RestoreCntntIdx(SvULongs& rSaveArr, SwFmtAnchor aNew( rFlyAnchor ); SwPosition aNewPos( *rFlyAnchor.GetCntntAnchor() ); aNewPos.nNode = rNd; - if( FLY_AUTO_CNTNT == rFlyAnchor.GetAnchorId() ) + if ( FLY_AT_CHAR == rFlyAnchor.GetAnchorId() ) + { aNewPos.nContent.Assign( pCNd, Min( aSave.GetContent(), nLen ) ); + } else + { aNewPos.nContent.Assign( 0, 0 ); + } aNew.SetAnchor( &aNewPos ); pFrmFmt->SetFmtAttr( aNew ); } diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index 3befc37ff3..a73f274b48 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -32,9 +32,7 @@ #include "precompiled_sw.hxx" #include #include -#ifndef _OUTDEV_HXX //autogen #include -#endif #include #include #include @@ -46,22 +44,16 @@ #include #include -#ifndef _SVDOMEAS_HXX #include -#endif #include #include #include #include #include #include -#ifndef _SWHINTS_HXX #include -#endif #include -#ifndef _DOCSH_HXX #include -#endif #include //Damit der RootDtor gerufen wird. #include #include // fuer MakeDrawView @@ -481,7 +473,7 @@ BOOL SwDoc::DeleteSelection( SwDrawView& rDrawView ) SwDrawContact *pC = (SwDrawContact*)GetUserCall(pObj); SwDrawFrmFmt *pFrmFmt = (SwDrawFrmFmt*)pC->GetFmt(); if( pFrmFmt && - FLY_IN_CNTNT == pFrmFmt->GetAnchor().GetAnchorId() ) + FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId() ) { rDrawView.MarkObj( pObj, rDrawView.Imp().GetPageView(), TRUE ); --i; diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index f741f2fc04..3cde597133 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -220,17 +220,15 @@ void _RestFlyInRange( _SaveFlyArr & rArr, const SwNodeIndex& rSttIdx, void _SaveFlyInRange( const SwNodeRange& rRg, _SaveFlyArr& rArr ) { - SwFrmFmt* pFmt; - const SwFmtAnchor* pAnchor; - const SwPosition* pAPos; SwSpzFrmFmts& rFmts = *rRg.aStart.GetNode().GetDoc()->GetSpzFrmFmts(); for( sal_uInt16 n = 0; n < rFmts.Count(); ++n ) { - pFmt = (SwFrmFmt*)rFmts[n]; - pAnchor = &pFmt->GetAnchor(); - if( ( FLY_AT_CNTNT == pAnchor->GetAnchorId() || - FLY_AUTO_CNTNT == pAnchor->GetAnchorId() ) && - 0 != ( pAPos = pAnchor->GetCntntAnchor() ) && + SwFrmFmt *const pFmt = static_cast(rFmts[n]); + SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); + SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); + if (pAPos && + ((FLY_AT_PARA == pAnchor->GetAnchorId()) || + (FLY_AT_CHAR == pAnchor->GetAnchorId())) && rRg.aStart <= pAPos->nNode && pAPos->nNode < rRg.aEnd ) { _SaveFly aSave( pAPos->nNode.GetIndex() - rRg.aStart.GetIndex(), @@ -260,7 +258,6 @@ void _SaveFlyInRange( const SwPaM& rPam, const SwNodeIndex& rInsPos, pPos->nContent == rEndNdIdx.GetNode().GetCntntNode()->Len() )) ? 0 : 1; - const SwPosition* pAPos; const SwNodeIndex* pCntntIdx; for( sal_uInt16 n = 0; n < rFmts.Count(); ++n ) @@ -268,9 +265,10 @@ void _SaveFlyInRange( const SwPaM& rPam, const SwNodeIndex& rInsPos, sal_Bool bInsPos = sal_False; pFmt = (SwFrmFmt*)rFmts[n]; pAnchor = &pFmt->GetAnchor(); - if( ( FLY_AT_CNTNT == pAnchor->GetAnchorId() || - FLY_AUTO_CNTNT == pAnchor->GetAnchorId() ) && - 0 != ( pAPos = pAnchor->GetCntntAnchor() ) && + const SwPosition* pAPos = pAnchor->GetCntntAnchor(); + if (pAPos && + ((FLY_AT_PARA == pAnchor->GetAnchorId()) || + (FLY_AT_CHAR == pAnchor->GetAnchorId())) && // nicht verschieben, wenn die InsPos im CntntBereich vom Fly ist ( 0 == ( pCntntIdx = pFmt->GetCntnt().GetCntntIdx() ) || !( *pCntntIdx < rInsPos && @@ -317,14 +315,14 @@ void DelFlyInRange( const SwNodeIndex& rMkNdIdx, SwDoc* pDoc = rMkNdIdx.GetNode().GetDoc(); SwSpzFrmFmts& rTbl = *pDoc->GetSpzFrmFmts(); - const SwPosition* pAPos; for ( sal_uInt16 i = rTbl.Count(); i; ) { SwFrmFmt *pFmt = rTbl[--i]; const SwFmtAnchor &rAnch = pFmt->GetAnchor(); - if( ( rAnch.GetAnchorId() == FLY_AT_CNTNT || - rAnch.GetAnchorId() == FLY_AUTO_CNTNT ) && - 0 != ( pAPos = rAnch.GetCntntAnchor() ) && + SwPosition const*const pAPos = rAnch.GetCntntAnchor(); + if (pAPos && + ((rAnch.GetAnchorId() == FLY_AT_PARA) || + (rAnch.GetAnchorId() == FLY_AT_CHAR)) && ( bDelFwrd ? rMkNdIdx < pAPos->nNode && pAPos->nNode <= rPtNdIdx : rPtNdIdx <= pAPos->nNode && pAPos->nNode < rMkNdIdx )) @@ -2620,14 +2618,14 @@ bool SwDoc::DelFullPara( SwPaM& rPam ) // was ist mit Fly's ?? { // stehen noch FlyFrames rum, loesche auch diese - const SwPosition* pAPos; for( sal_uInt16 n = 0; n < GetSpzFrmFmts()->Count(); ++n ) { SwFrmFmt* pFly = (*GetSpzFrmFmts())[n]; const SwFmtAnchor* pAnchor = &pFly->GetAnchor(); - if( ( FLY_AT_CNTNT == pAnchor->GetAnchorId() || - FLY_AUTO_CNTNT == pAnchor->GetAnchorId() ) && - 0 != ( pAPos = pAnchor->GetCntntAnchor() ) && + SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); + if (pAPos && + ((FLY_AT_PARA == pAnchor->GetAnchorId()) || + (FLY_AT_CHAR == pAnchor->GetAnchorId())) && aRg.aStart <= pAPos->nNode && pAPos->nNode <= aRg.aEnd ) { DelLayoutFmt( pFly ); diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index e0645fcdc1..4f8f40af3e 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -181,7 +181,7 @@ Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch, if( rDoc.GetRootFrm() ) switch( rAnch.GetAnchorId() ) { - case FLY_IN_CNTNT: + case FLY_AS_CHAR: if( pFlyFmt && rAnch.GetCntntAnchor() ) { const SwFrm* pOld = ((SwFlyFrmFmt*)pFlyFmt)->GetFrm( &aRet, FALSE ); @@ -190,8 +190,8 @@ Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch, } break; - case FLY_AT_CNTNT: - case FLY_AUTO_CNTNT: // LAYER_IMPL + case FLY_AT_PARA: + case FLY_AT_CHAR: // LAYER_IMPL if( rAnch.GetCntntAnchor() ) { const SwPosition *pPos = rAnch.GetCntntAnchor(); @@ -213,7 +213,7 @@ Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch, } break; - case FLY_PAGE: + case FLY_AT_PAGE: { USHORT nPgNum = rAnch.GetPageNum(); const SwPageFrm *pPage = (SwPageFrm*)rDoc.GetRootFrm()->Lower(); @@ -249,9 +249,11 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms // ist der neue ein gueltiger Anker? if( !aNewAnch.GetCntntAnchor() && (FLY_AT_FLY == nNew || - FLY_AT_CNTNT == nNew || FLY_IN_CNTNT == nNew || - FLY_AUTO_CNTNT == nNew )) + (FLY_AT_PARA == nNew) || (FLY_AS_CHAR == nNew) || + (FLY_AT_CHAR == nNew) )) + { return IGNOREANCHOR; + } if( nOld == nNew ) return DONTMAKEFRMS; @@ -264,7 +266,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms //doppeltes hiden waere so eine art Show! rFmt.DelFrms(); - if( FLY_IN_CNTNT == nOld ) + if ( FLY_AS_CHAR == nOld ) { //Bei InCntnt's wird es spannend: Das TxtAttribut muss vernichtet //werden. Leider reisst dies neben den Frms auch noch das Format mit @@ -295,7 +297,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms const SfxPoolItem* pItem; switch( nNew ) { - case FLY_IN_CNTNT: + case FLY_AS_CHAR: //Wenn keine Positionsattribute hereinkommen, dann muss dafuer //gesorgt werden, das keine unerlaubte automatische Ausrichtung //bleibt. @@ -326,10 +328,10 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms } break; - case FLY_AT_CNTNT: - case FLY_AUTO_CNTNT: // LAYER_IMPL + case FLY_AT_PARA: + case FLY_AT_CHAR: // LAYER_IMPL case FLY_AT_FLY: // LAYER_IMPL - case FLY_PAGE: + case FLY_AT_PAGE: { //Wenn keine Positionsattribute hereinschneien korrigieren wir //die Position so, dass die Dokumentkoordinaten des Flys erhalten @@ -345,7 +347,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms if( text::HoriOrientation::NONE == aOldH.GetHoriOrient() && ( !pItem || aOldH.GetPos() == ((SwFmtHoriOrient*)pItem)->GetPos() )) { - SwTwips nPos = FLY_IN_CNTNT == nOld ? 0 : aOldH.GetPos(); + SwTwips nPos = (FLY_AS_CHAR == nOld) ? 0 : aOldH.GetPos(); nPos += aOldAnchorPos.X() - aNewAnchorPos.X(); if( pItem ) @@ -367,7 +369,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms if( text::VertOrientation::NONE == aOldV.GetVertOrient() && (!pItem || aOldV.GetPos() == ((SwFmtVertOrient*)pItem)->GetPos() ) ) { - SwTwips nPos = FLY_IN_CNTNT == nOld ? 0 : aOldV.GetPos(); + SwTwips nPos = (FLY_AS_CHAR == nOld) ? 0 : aOldV.GetPos(); nPos += aOldAnchorPos.Y() - aNewAnchorPos.Y(); if( pItem ) { @@ -698,7 +700,7 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, // xub_StrLen nIndx = STRING_NOTFOUND; const SwPosition* pOldAsCharAnchorPos( 0L ); const RndStdIds eOldAnchorType = pContact->GetAnchorId(); - if ( !_bSameOnly && eOldAnchorType == FLY_IN_CNTNT ) + if ( !_bSameOnly && eOldAnchorType == FLY_AS_CHAR ) { pOldAsCharAnchorPos = new SwPosition( pContact->GetCntntAnchor() ); } @@ -713,8 +715,8 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, switch ( _eAnchorType ) { - case FLY_AT_CNTNT: - case FLY_AUTO_CNTNT: + case FLY_AT_PARA: + case FLY_AT_CHAR: { const Point aNewPoint = pOldAnchorFrm && ( pOldAnchorFrm->IsVertical() || @@ -768,10 +770,10 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, break; } - aNewAnch.SetType( FLY_PAGE ); + aNewAnch.SetType( FLY_AT_PAGE ); // no break } - case FLY_PAGE: + case FLY_AT_PAGE: { pNewAnchorFrm = GetRootFrm()->Lower(); while ( pNewAnchorFrm && !pNewAnchorFrm->Frm().IsInside( aPt ) ) @@ -782,7 +784,7 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, aNewAnch.SetPageNum( ((SwPageFrm*)pNewAnchorFrm)->GetPhyPageNum()); } break; - case FLY_IN_CNTNT: + case FLY_AS_CHAR: if( _bSameOnly ) // Positions/Groessenaenderung { if( !pOldAnchorFrm ) @@ -805,7 +807,7 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, bUnmark = ( 0 != i ); Point aPoint( aPt ); aPoint.X() -= 1; // nicht im DrawObj landen!! - aNewAnch.SetType( FLY_IN_CNTNT ); + aNewAnch.SetType( FLY_AS_CHAR ); SwPosition aPos( *((SwCntntFrm*)pNewAnchorFrm)->GetNode() ); if ( pNewAnchorFrm->Frm().IsInside( aPoint ) ) { @@ -839,7 +841,7 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, ASSERT( !this, "unexpected AnchorId." ); } - if ( (FLY_IN_CNTNT != _eAnchorType) && + if ( (FLY_AS_CHAR != _eAnchorType) && pNewAnchorFrm && ( !_bSameOnly || pNewAnchorFrm != pOldAnchorFrm ) ) { @@ -949,8 +951,8 @@ int SwDoc::Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest ) const SwFmtAnchor& rAnchor = (*GetSpzFrmFmts())[ n ]->GetAnchor(); ULONG nTstSttNd; // OD 11.12.2003 #i20622# - to-frame anchored objects are allowed. - if ( ( rAnchor.GetAnchorId() == FLY_AT_CNTNT || - rAnchor.GetAnchorId() == FLY_AUTO_CNTNT ) && + if ( ((rAnchor.GetAnchorId() == FLY_AT_PARA) || + (rAnchor.GetAnchorId() == FLY_AT_CHAR)) && 0 != rAnchor.GetCntntAnchor() && nFlySttNd <= ( nTstSttNd = rAnchor.GetCntntAnchor()->nNode.GetIndex() ) && @@ -971,9 +973,9 @@ int SwDoc::Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest ) &rDstAnchor = rDest.GetAnchor(); ULONG nEndOfExtras = GetNodes().GetEndOfExtras().GetIndex(); BOOL bAllowed = FALSE; - if( FLY_PAGE == rSrcAnchor.GetAnchorId() ) + if ( FLY_AT_PAGE == rSrcAnchor.GetAnchorId() ) { - if( FLY_PAGE == rDstAnchor.GetAnchorId() || + if ( (FLY_AT_PAGE == rDstAnchor.GetAnchorId()) || ( rDstAnchor.GetCntntAnchor() && rDstAnchor.GetCntntAnchor()->nNode.GetIndex() > nEndOfExtras )) bAllowed = TRUE; diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index 1d39e35de2..a57b60c370 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -49,12 +49,8 @@ #include #include #include -#ifndef _DOCSH_HXX #include -#endif -#ifndef _GLOBDOC_HXX #include -#endif #include #include // fuer die UndoIds #include @@ -371,14 +367,15 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, CorrAbs( aSIdx, aEIdx, *aTmp.GetPoint(), TRUE); // stehen noch FlyFrames rum, loesche auch diese - const SwPosition* pAPos; for( USHORT n = 0; n < GetSpzFrmFmts()->Count(); ++n ) { SwFrmFmt* pFly = (*GetSpzFrmFmts())[n]; const SwFmtAnchor* pAnchor = &pFly->GetAnchor(); - if( ( FLY_AT_CNTNT == pAnchor->GetAnchorId() || - FLY_AUTO_CNTNT == pAnchor->GetAnchorId() ) && - 0 != ( pAPos = pAnchor->GetCntntAnchor() ) && + SwPosition const*const pAPos = + pAnchor->GetCntntAnchor(); + if (pAPos && + ((FLY_AT_PARA == pAnchor->GetAnchorId()) || + (FLY_AT_CHAR == pAnchor->GetAnchorId())) && aSIdx <= pAPos->nNode && pAPos->nNode < aEIdx ) { @@ -717,14 +714,15 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel ) CorrAbs( aSIdx, aEIdx, *aTmp.GetPoint(), TRUE); // stehen noch FlyFrames rum, loesche auch diese - const SwPosition* pAPos; for( USHORT n = 0; n < GetSpzFrmFmts()->Count(); ++n ) { SwFrmFmt* pFly = (*GetSpzFrmFmts())[n]; const SwFmtAnchor* pAnchor = &pFly->GetAnchor(); - if( ( FLY_AT_CNTNT == pAnchor->GetAnchorId() || - FLY_AUTO_CNTNT == pAnchor->GetAnchorId() ) && - 0 != ( pAPos = pAnchor->GetCntntAnchor() ) && + SwPosition const*const pAPos = + pAnchor->GetCntntAnchor(); + if (pAPos && + ((FLY_AT_PARA == pAnchor->GetAnchorId()) || + (FLY_AT_CHAR == pAnchor->GetAnchorId())) && aSIdx <= pAPos->nNode && pAPos->nNode < aEIdx ) { diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index fe244d4957..a77487654b 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -68,9 +68,7 @@ #include #include #include -#ifndef _FRMCNCT_HXX //autogen #include -#endif #include #include #include @@ -85,9 +83,7 @@ #include #include #include -#ifndef _DOCSH_HXX #include -#endif #include #include #include @@ -213,13 +209,12 @@ SwFrmFmt *SwDoc::MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet ) break; #ifndef PRODUCT - case FLY_PAGE: - case FLY_AUTO_CNTNT: + case FLY_AT_PAGE: + case FLY_AT_CHAR: case FLY_AT_FLY: - case FLY_AT_CNTNT: - case FLY_IN_CNTNT: - ASSERT( !this, - "neue Schnittstelle benutzen: SwDoc::MakeFlySection!" ); + case FLY_AT_PARA: + case FLY_AS_CHAR: + ASSERT( false, "use new interface instead: SwDoc::MakeFlySection!" ); break; #endif @@ -358,7 +353,7 @@ void SwDoc::DelLayoutFmt( SwFrmFmt *pFmt ) // ggfs. bei Zeichengebundenen Flys das Zeichen loeschen const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); - if( FLY_IN_CNTNT == rAnchor.GetAnchorId() && rAnchor.GetCntntAnchor()) + if ((FLY_AS_CHAR == rAnchor.GetAnchorId()) && rAnchor.GetCntntAnchor()) { const SwPosition* pPos = rAnchor.GetCntntAnchor(); SwTxtNode *pTxtNd = pPos->nNode.GetNode().GetTxtNode(); @@ -422,9 +417,9 @@ SwFrmFmt *SwDoc::CopyLayoutFmt( const SwFrmFmt& rSource, static_cast( rSource.FindContactObj() ); bMayNotCopy = - ( FLY_AT_CNTNT == rNewAnchor.GetAnchorId() || - FLY_AT_FLY == rNewAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == rNewAnchor.GetAnchorId() ) && + ((FLY_AT_PARA == rNewAnchor.GetAnchorId()) || + (FLY_AT_FLY == rNewAnchor.GetAnchorId()) || + (FLY_AT_CHAR == rNewAnchor.GetAnchorId())) && rNewAnchor.GetCntntAnchor() && IsInHeaderFooter( rNewAnchor.GetCntntAnchor()->nNode ) && pDrawContact != NULL && @@ -551,7 +546,7 @@ SwFrmFmt *SwDoc::CopyLayoutFmt( const SwFrmFmt& rSource, } } - if( bSetTxtFlyAtt && FLY_IN_CNTNT == rNewAnchor.GetAnchorId() ) + if (bSetTxtFlyAtt && (FLY_AS_CHAR == rNewAnchor.GetAnchorId())) { const SwPosition* pPos = rNewAnchor.GetCntntAnchor(); SwFmtFlyCnt aFmt( pDest ); @@ -660,7 +655,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos, RndStdIds eAnchorId = pAnchor ? pAnchor->GetAnchorId() : pFmt->GetAnchor().GetAnchorId(); if( !pAnchor || - (FLY_PAGE != pAnchor->GetAnchorId() && + ((FLY_AT_PAGE != pAnchor->GetAnchorId()) && //Nur Page und nicht: // FLY_AT_CNTNT == pAnchor->GetAnchorId() || // FLY_IN_CNTNT == pAnchor->GetAnchorId() || @@ -670,7 +665,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos, { // dann setze ihn, wird im Undo gebraucht SwFmtAnchor aAnch( pFmt->GetAnchor() ); - if( pAnchor && FLY_AT_FLY == pAnchor->GetAnchorId() ) + if (pAnchor && (FLY_AT_FLY == pAnchor->GetAnchorId())) { SwPosition aPos( *rAnchPos.nNode.GetNode().FindFlyStartNode() ); aAnch.SetAnchor( &aPos ); @@ -683,7 +678,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos, aAnch.SetType( eRequestId ); eAnchorId = aAnch.GetAnchorId(); - if ( FLY_PAGE != eAnchorId ) + if ( FLY_AT_PAGE != eAnchorId ) //Nur Page und nicht: // if( FLY_AT_CNTNT == eAnchorId || FLY_IN_CNTNT == eAnchorId || // FLY_AT_FLY == eAnchorId || FLY_AUTO_CNTNT == eAnchorId ) @@ -694,7 +689,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos, else eAnchorId = pFmt->GetAnchor().GetAnchorId(); - if( FLY_IN_CNTNT == eAnchorId ) + if ( FLY_AS_CHAR == eAnchorId ) { xub_StrLen nStt = rAnchPos.nContent.GetIndex(); SwTxtNode * pTxtNode = rAnchPos.nNode.GetNode().GetTxtNode(); @@ -751,7 +746,7 @@ SwFlyFrmFmt* SwDoc::MakeFlySection( RndStdIds eAnchorType, { SwFlyFrmFmt* pFmt = 0; sal_Bool bCallMake = sal_True; - if( !pAnchorPos && FLY_PAGE != eAnchorType ) + if ( !pAnchorPos && (FLY_AT_PAGE != eAnchorType) ) { const SwFmtAnchor* pAnch; if( (pFlySet && SFX_ITEM_SET == pFlySet->GetItemState( @@ -759,9 +754,14 @@ SwFlyFrmFmt* SwDoc::MakeFlySection( RndStdIds eAnchorType, ( pFrmFmt && SFX_ITEM_SET == pFrmFmt->GetItemState( RES_ANCHOR, sal_True, (const SfxPoolItem**)&pAnch )) ) { - if( FLY_PAGE != pAnch->GetAnchorId() && - 0 == ( pAnchorPos = pAnch->GetCntntAnchor() ) ) - bCallMake = sal_False; + if ( (FLY_AT_PAGE != pAnch->GetAnchorId()) ) + { + pAnchorPos = pAnch->GetCntntAnchor(); + if (pAnchorPos) + { + bCallMake = sal_False; + } + } } } @@ -944,7 +944,7 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg, // Anker noch nicht gesetzt ? // DrawObjecte duerfen niemals in Kopf-/Fusszeilen landen. - sal_Bool bIsAtCntnt = FLY_PAGE != eAnchorId; + const bool bIsAtCntnt = (FLY_AT_PAGE != eAnchorId); // FLY_AT_CNTNT == eAnchorId || FLY_IN_CNTNT == eAnchorId || // FLY_AT_FLY == eAnchorId || FLY_AUTO_CNTNT == eAnchorId; @@ -966,7 +966,7 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg, ::CheckControlLayer( &rDrawObj ) && IsInHeaderFooter( *pChkIdx ) ) { - pFmt->SetFmtAttr( SwFmtAnchor( eAnchorId = FLY_PAGE ) ); + pFmt->SetFmtAttr( SwFmtAnchor( eAnchorId = FLY_AT_PAGE ) ); } else if( !pAnchor || (bIsAtCntnt && !pAnchor->GetCntntAnchor() )) { @@ -981,10 +981,10 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg, else { aAnch.SetAnchor( rRg.GetPoint() ); - if( FLY_PAGE == eAnchorId ) + if ( FLY_AT_PAGE == eAnchorId ) { eAnchorId = rDrawObj.ISA( SdrUnoObj ) - ? FLY_IN_CNTNT : FLY_AT_CNTNT; + ? FLY_AS_CHAR : FLY_AT_PARA; aAnch.SetType( eAnchorId ); } } @@ -992,7 +992,7 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg, } // bei als Zeichen gebundenen Draws das Attribut im Absatz setzen - if( FLY_IN_CNTNT == eAnchorId ) + if ( FLY_AS_CHAR == eAnchorId ) { xub_StrLen nStt = rRg.GetPoint()->nContent.GetIndex(); SwFmtFlyCnt aFmt( pFmt ); @@ -1063,7 +1063,7 @@ sal_Bool TstFlyRange( const SwPaM* pPam, const SwPosition* pFlyPos, const SwPosition* pPaMEnd = pTmp->End(); const sal_uInt32 nPamStartIndex = pPaMStart->nNode.GetIndex(); const sal_uInt32 nPamEndIndex = pPaMEnd->nNode.GetIndex(); - if(FLY_AT_CNTNT == nAnchorId) + if (FLY_AT_PARA == nAnchorId) bOk = (nPamStartIndex < nFlyIndex && nPamEndIndex > nFlyIndex) || (((nPamStartIndex == nFlyIndex) && (pPaMStart->nContent.GetIndex() == 0)) && (nPamEndIndex > nFlyIndex)); @@ -1091,7 +1091,6 @@ void SwDoc::GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts, const SwPaM* pCmpRange, sal_Bool bDrawAlso ) const { SwPosFlyFrm *pFPos = 0; - const SwPosition* pAPos; SwFrmFmt *pFly; // erstmal alle Absatzgebundenen einsammeln @@ -1103,10 +1102,11 @@ void SwDoc::GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts, if( bFlyFmt || bDrawFmt ) { const SwFmtAnchor& rAnchor = pFly->GetAnchor(); - if( ( FLY_AT_CNTNT == rAnchor.GetAnchorId() || - FLY_AT_FLY == rAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) && - 0 != ( pAPos = rAnchor.GetCntntAnchor()) ) + SwPosition const*const pAPos = rAnchor.GetCntntAnchor(); + if (pAPos && + ((FLY_AT_PARA == rAnchor.GetAnchorId()) || + (FLY_AT_FLY == rAnchor.GetAnchorId()) || + (FLY_AT_CHAR == rAnchor.GetAnchorId()))) { if( pCmpRange && !TstFlyRange( pCmpRange, pAPos, rAnchor.GetAnchorId() )) @@ -1140,9 +1140,9 @@ void SwDoc::GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts, continue; const SwFmtAnchor& rAnchor = pFly->GetAnchor(); - if( FLY_AT_CNTNT != rAnchor.GetAnchorId() && - FLY_AT_FLY != rAnchor.GetAnchorId() && - FLY_AUTO_CNTNT != rAnchor.GetAnchorId() ) + if ((FLY_AT_PARA != rAnchor.GetAnchorId()) && + (FLY_AT_FLY != rAnchor.GetAnchorId()) && + (FLY_AT_CHAR != rAnchor.GetAnchorId())) { const SwCntntFrm * pCntntFrm = pPage->FindFirstBodyCntnt(); if ( !pCntntFrm ) @@ -1387,7 +1387,7 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co //loesen wir vorher die Verbindung zwischen Attribut und Format. const SwFmtAnchor& rAnchor = pNewFmt->GetAnchor(); - if( FLY_IN_CNTNT == rAnchor.GetAnchorId() ) + if ( FLY_AS_CHAR == rAnchor.GetAnchorId() ) { const SwPosition *pPos = rAnchor.GetCntntAnchor(); SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode(); @@ -1433,7 +1433,7 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co pNewSet->Put( SvxULSpaceItem(RES_UL_SPACE) ); //Der Alte ist absatzgebunden, und zwar am Absatz im neuen. - SwFmtAnchor aAnch( FLY_AT_CNTNT ); + SwFmtAnchor aAnch( FLY_AT_PARA ); SwNodeIndex aAnchIdx( *pNewFmt->GetCntnt().GetCntntIdx(), 1 ); pNew = aAnchIdx.GetNode().GetTxtNode(); SwPosition aPos( aAnchIdx ); @@ -1684,7 +1684,7 @@ SwFlyFrmFmt* SwDoc::InsertDrawLabel( const String &rTxt, pNewFmt->SetFmtAttr( *pNewSet ); const SwFmtAnchor& rAnchor = pNewFmt->GetAnchor(); - if( FLY_IN_CNTNT == rAnchor.GetAnchorId() ) + if ( FLY_AS_CHAR == rAnchor.GetAnchorId() ) { const SwPosition *pPos = rAnchor.GetCntntAnchor(); SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode(); @@ -1722,7 +1722,7 @@ SwFlyFrmFmt* SwDoc::InsertDrawLabel( const String &rTxt, pNewSet->Put( SwFmtHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::FRAME ) ); //Der Alte ist absatzgebunden, und zwar am Absatz im neuen. - SwFmtAnchor aAnch( FLY_AT_CNTNT ); + SwFmtAnchor aAnch( FLY_AT_PARA ); SwNodeIndex aAnchIdx( *pNewFmt->GetCntnt().GetCntntIdx(), 1 ); pNew = aAnchIdx.GetNode().GetTxtNode(); SwPosition aPos( aAnchIdx ); @@ -2095,15 +2095,17 @@ void SwDoc::SetAllUniqueFlyNames() if( bLoadedFlag ) { const SwFmtAnchor& rAnchor = pFlyFmt->GetAnchor(); - if( ( FLY_PAGE == rAnchor.GetAnchorId() && - rAnchor.GetCntntAnchor() ) || + if (((FLY_AT_PAGE == rAnchor.GetAnchorId()) && + rAnchor.GetCntntAnchor()) || // oder werden DrawObjecte rel. zu irgendetwas ausgerichtet? ( RES_DRAWFRMFMT == pFlyFmt->Which() && ( SFX_ITEM_SET == pFlyFmt->GetItemState( RES_VERT_ORIENT )|| SFX_ITEM_SET == pFlyFmt->GetItemState( RES_HORI_ORIENT ))) ) + { bLoadedFlag = sal_False; + } } } @@ -2200,9 +2202,11 @@ sal_Bool SwDoc::IsInHeaderFooter( const SwNodeIndex& rIdx ) const if( pIdx && pFlyNd == &pIdx->GetNode() ) { const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); - if( FLY_PAGE == rAnchor.GetAnchorId() || + if ((FLY_AT_PAGE == rAnchor.GetAnchorId()) || !rAnchor.GetCntntAnchor() ) + { return sal_False; + } pNd = &rAnchor.GetCntntAnchor()->nNode.GetNode(); pFlyNd = pNd->FindFlyStartNode(); @@ -2247,10 +2251,12 @@ short SwDoc::GetTextDirection( const SwPosition& rPos, { pItem = 0; const SwFmtAnchor* pAnchor = &pFlyFmt->GetAnchor(); - if( FLY_PAGE != pAnchor->GetAnchorId() && - pAnchor->GetCntntAnchor() ) + if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) && + pAnchor->GetCntntAnchor()) + { pFlyFmt = pAnchor->GetCntntAnchor()->nNode. GetNode().GetFlyFmt(); + } else pFlyFmt = 0; } diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index eb208db2e7..16d3bc4162 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -1415,7 +1415,7 @@ void SwDoc::Paste( const SwDoc& rSource ) if( bInsWithFmt ) { SwFmtAnchor aAnchor( rCpyFmt.GetAnchor() ); - if( FLY_PAGE == aAnchor.GetAnchorId() ) + if (FLY_AT_PAGE == aAnchor.GetAnchorId()) { aAnchor.SetPageNum( aAnchor.GetPageNum() + /*nStartPageNumber - */1 ); } diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index 752b146b9f..7ceaffdbda 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -48,9 +48,7 @@ #include #include #include -#ifndef _DOCSORT_HXX #include -#endif #include #include #include @@ -341,18 +339,13 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) const SwPosition *pStart = rPaM.Start(), *pEnd = rPaM.End(); // Index auf den Start der Selektion - SwFrmFmt* pFmt; - const SwFmtAnchor* pAnchor; - const SwPosition* pAPos; - USHORT n; - - for( n = 0; n < GetSpzFrmFmts()->Count(); ++n ) + for ( USHORT n = 0; n < GetSpzFrmFmts()->Count(); ++n ) { - pFmt = (SwFrmFmt*)(*GetSpzFrmFmts())[n]; - pAnchor = &pFmt->GetAnchor(); + SwFrmFmt *const pFmt = static_cast((*GetSpzFrmFmts())[n]); + SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); + SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); - if( FLY_AT_CNTNT == pAnchor->GetAnchorId() && - 0 != (pAPos = pAnchor->GetCntntAnchor() ) && + if (pAPos && (FLY_AT_PARA == pAnchor->GetAnchorId()) && pStart->nNode <= pAPos->nNode && pAPos->nNode <= pEnd->nNode ) return FALSE; } @@ -444,7 +437,7 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) DoUndo( FALSE ); - for( n = 0; n < aSortArr.Count(); ++n ) + for ( USHORT n = 0; n < aSortArr.Count(); ++n ) { SwSortTxtElement* pBox = (SwSortTxtElement*)aSortArr[n]; aStart = nBeg + n; diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx index a5419368d0..3067fc74a4 100644 --- a/sw/source/core/doc/poolfmt.cxx +++ b/sw/source/core/doc/poolfmt.cxx @@ -37,9 +37,7 @@ #include #include #include -#ifndef _SVX_TSTPITEM_HXX //autogen #include -#endif #include #include #include @@ -55,9 +53,7 @@ #include #include #include -#ifndef _SVX_EMPHITEM_HXX #include -#endif #include #include #include @@ -1303,13 +1299,13 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId ) { if ( get(IDocumentSettingAccess::BROWSE_MODE) ) { - aSet.Put( SwFmtAnchor( FLY_IN_CNTNT )); + aSet.Put( SwFmtAnchor( FLY_AS_CHAR )); aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::LINE_CENTER, text::RelOrientation::PRINT_AREA ) ); aSet.Put( SwFmtSurround( SURROUND_NONE ) ); } else { - aSet.Put( SwFmtAnchor( FLY_AT_CNTNT )); + aSet.Put( SwFmtAnchor( FLY_AT_PARA )); aSet.Put( SwFmtSurround( SURROUND_PARALLEL ) ); aSet.Put( SwFmtHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::PRINT_AREA ) ); aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::PRINT_AREA ) ); @@ -1330,7 +1326,7 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId ) case RES_POOLFRM_GRAPHIC: case RES_POOLFRM_OLE: { - aSet.Put( SwFmtAnchor( FLY_AT_CNTNT )); + aSet.Put( SwFmtAnchor( FLY_AT_PARA )); aSet.Put( SwFmtHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::FRAME )); aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME )); aSet.Put( SwFmtSurround( SURROUND_NONE )); @@ -1338,14 +1334,14 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId ) break; case RES_POOLFRM_FORMEL: { - aSet.Put( SwFmtAnchor( FLY_IN_CNTNT ) ); + aSet.Put( SwFmtAnchor( FLY_AS_CHAR ) ); aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::CHAR_CENTER, text::RelOrientation::FRAME ) ); aSet.Put( SvxLRSpaceItem( 114, 114, 0, 0, RES_LR_SPACE ) ); } break; case RES_POOLFRM_MARGINAL: { - aSet.Put( SwFmtAnchor( FLY_AT_CNTNT )); + aSet.Put( SwFmtAnchor( FLY_AT_PARA )); aSet.Put( SwFmtHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::FRAME )); aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME )); aSet.Put( SwFmtSurround( SURROUND_PARALLEL )); @@ -1358,7 +1354,7 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId ) break; case RES_POOLFRM_WATERSIGN: { - aSet.Put( SwFmtAnchor( FLY_PAGE )); + aSet.Put( SwFmtAnchor( FLY_AT_PAGE )); aSet.Put( SwFmtHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::FRAME )); aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::CENTER, text::RelOrientation::FRAME )); aSet.Put( SvxOpaqueItem( FALSE )); @@ -1368,7 +1364,7 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId ) case RES_POOLFRM_LABEL: { - aSet.Put( SwFmtAnchor( FLY_IN_CNTNT ) ); + aSet.Put( SwFmtAnchor( FLY_AS_CHAR ) ); aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ) ); aSet.Put( SvxLRSpaceItem( 114, 114, 0, 0, RES_LR_SPACE ) ); diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx index 6bca094d3e..d41ac2ddbd 100644 --- a/sw/source/core/doc/tblcpy.cxx +++ b/sw/source/core/doc/tblcpy.cxx @@ -591,14 +591,14 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox, } // stehen noch FlyFrames rum, loesche auch diese - const SwPosition* pAPos; for( USHORT n = 0; n < pDoc->GetSpzFrmFmts()->Count(); ++n ) { - SwFrmFmt* pFly = (*pDoc->GetSpzFrmFmts())[n]; - const SwFmtAnchor* pAnchor = &pFly->GetAnchor(); - if( ( FLY_AT_CNTNT == pAnchor->GetAnchorId() || - FLY_AUTO_CNTNT == pAnchor->GetAnchorId() ) && - 0 != ( pAPos = pAnchor->GetCntntAnchor() ) && + SwFrmFmt *const pFly = (*pDoc->GetSpzFrmFmts())[n]; + SwFmtAnchor const*const pAnchor = &pFly->GetAnchor(); + SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); + if (pAPos && + ((FLY_AT_PARA == pAnchor->GetAnchorId()) || + (FLY_AT_CHAR == pAnchor->GetAnchorId())) && aInsIdx <= pAPos->nNode && pAPos->nNode <= aEndNdIdx ) { pDoc->DelLayoutFmt( pFly ); diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index 60b7fe6287..6adb15c039 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -552,20 +552,18 @@ void SwTxtNode::CopyCollFmt( SwTxtNode& rDestNd ) BOOL lcl_ChkFlyFly( SwDoc* pDoc, ULONG nSttNd, ULONG nEndNd, ULONG nInsNd ) { - const SwFrmFmt* pFmt; - const SwFmtAnchor* pAnchor; - const SwPosition* pAPos; const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts(); for( USHORT n = 0; n < rFrmFmtTbl.Count(); ++n ) { - pFmt = rFrmFmtTbl[n]; - pAnchor = &pFmt->GetAnchor(); - if( 0 != ( pAPos = pAnchor->GetCntntAnchor()) && - ( FLY_IN_CNTNT == pAnchor->GetAnchorId() || - FLY_AUTO_CNTNT == pAnchor->GetAnchorId() || - FLY_AT_FLY == pAnchor->GetAnchorId() || - FLY_AT_CNTNT == pAnchor->GetAnchorId() ) && + SwFrmFmt const*const pFmt = rFrmFmtTbl[n]; + SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); + SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); + if (pAPos && + ((FLY_AS_CHAR == pAnchor->GetAnchorId()) || + (FLY_AT_CHAR == pAnchor->GetAnchorId()) || + (FLY_AT_FLY == pAnchor->GetAnchorId()) || + (FLY_AT_PARA == pAnchor->GetAnchorId())) && nSttNd <= pAPos->nNode.GetIndex() && pAPos->nNode.GetIndex() < nEndNd ) { @@ -1398,18 +1396,17 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg, SwDoc *const pDest = rStartIdx.GetNode().GetDoc(); _ZSortFlys aArr; USHORT nArrLen = GetSpzFrmFmts()->Count(); - USHORT n; - for( n = 0; n < nArrLen; ++n ) + for ( USHORT n = 0; n < nArrLen; ++n ) { - const SwFrmFmt* pFmt = (*GetSpzFrmFmts())[n]; - const SwFmtAnchor* pAnchor = &pFmt->GetAnchor(); - const SwPosition* pAPos; - bool bAtCntnt = pAnchor->GetAnchorId() == FLY_AT_CNTNT; - if ( ( bAtCntnt || - pAnchor->GetAnchorId() == FLY_AT_FLY || - pAnchor->GetAnchorId() == FLY_AUTO_CNTNT ) && - 0 != ( pAPos = pAnchor->GetCntntAnchor()) && + SwFrmFmt const*const pFmt = (*GetSpzFrmFmts())[n]; + SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); + SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); + bool bAtCntnt = (pAnchor->GetAnchorId() == FLY_AT_PARA); + if ( pAPos && + ( bAtCntnt || + (pAnchor->GetAnchorId() == FLY_AT_FLY) || + (pAnchor->GetAnchorId() == FLY_AT_CHAR)) && (( bCopyFlyAtFly && FLY_AT_FLY == pAnchor->GetAnchorId() ) ? rRg.aStart <= pAPos->nNode.GetIndex() + 1 : ( IsRedlineMove() @@ -1470,7 +1467,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg, //die Chains entsprechend aufgebaut werden koennen. SvPtrarr aNewArr( 10, 10 ); - for( n = 0; n < aArr.Count(); ++n ) + for ( USHORT n = 0; n < aArr.Count(); ++n ) { const _ZSortFly& rZSortFly = aArr[ n ]; @@ -1485,8 +1482,8 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg, // method . // Thus, the new anchor position in the destination document is found // by counting the text nodes. - if ( aAnchor.GetAnchorId() == FLY_AT_CNTNT || - aAnchor.GetAnchorId() == FLY_AUTO_CNTNT ) + if ((aAnchor.GetAnchorId() == FLY_AT_PARA) || + (aAnchor.GetAnchorId() == FLY_AT_CHAR) ) { // First, determine number of anchor text node in the copied range. // Note: The anchor text node *have* to be inside the copied range. @@ -1552,7 +1549,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg, } // <-- // die am Zeichen Flys wieder ans das vorgegebene Zeichen setzen - if ( FLY_AUTO_CNTNT == aAnchor.GetAnchorId() && + if ((FLY_AT_CHAR == aAnchor.GetAnchorId()) && pNewPos->nNode.GetNode().IsTxtNode() ) { pNewPos->nContent.Assign( (SwTxtNode*)&pNewPos->nNode.GetNode(), @@ -1592,7 +1589,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg, ASSERT( aArr.Count() == aNewArr.Count(), "Missing new Flys" ); if ( aArr.Count() == aNewArr.Count() ) { - for ( n = 0; n < aArr.Count(); ++n ) + for ( USHORT n = 0; n < aArr.Count(); ++n ) { const SwFrmFmt *pFmt = aArr[n].GetFmt(); const SwFmtChain &rChain = pFmt->GetChain(); diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index afab878b2f..18f1c50ae3 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -38,7 +38,6 @@ #endif #include - #include #include #include @@ -91,9 +90,7 @@ #include #endif #include "docsh.hxx" -#ifdef LINUX #include -#endif #include #include @@ -104,6 +101,9 @@ // --> OD 2005-12-05 #i27138# #include // <-- +#include + + #ifdef PRODUCT #define CHECK_TABLE(t) #else @@ -113,7 +113,6 @@ #define CHECK_TABLE(t) #endif #endif -#include using namespace ::com::sun::star; @@ -1684,17 +1683,19 @@ BOOL SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh, // #i28006# Fly frames have to be restored even if the table was // #alone in the section const SwSpzFrmFmts& rFlyArr = *GetDoc()->GetSpzFrmFmts(); - const SwPosition* pAPos; for( USHORT n = 0; n < rFlyArr.Count(); ++n ) { - SwFrmFmt* pFmt = (SwFrmFmt*)rFlyArr[n]; + SwFrmFmt *const pFmt = (SwFrmFmt*)rFlyArr[n]; const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); - if( ( FLY_AT_CNTNT == rAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) && - 0 != ( pAPos = rAnchor.GetCntntAnchor() ) && + SwPosition const*const pAPos = rAnchor.GetCntntAnchor(); + if (pAPos && + ((FLY_AT_PARA == rAnchor.GetAnchorId()) || + (FLY_AT_CHAR == rAnchor.GetAnchorId())) && nStt <= pAPos->nNode.GetIndex() && pAPos->nNode.GetIndex() < nEnd ) + { pFmt->MakeFrms(); + } } return TRUE; diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 69a6f68d90..94afa3dba5 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -38,9 +38,7 @@ #include // <-- #include -#ifndef _COM_SUN_STAR_I18N_CHARACTERITERATORMODE_HDL_ #include -#endif #include #include #include @@ -609,7 +607,7 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay, if( pFmt ) { const SwFmtAnchor* pAnchor = &pFmt->GetAnchor(); - if( FLY_PAGE != pAnchor->GetAnchorId() && + if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) && pAnchor->GetCntntAnchor() ) { pNd = &pAnchor->GetCntntAnchor()->nNode.GetNode(); @@ -631,7 +629,7 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay, break; } pAnchor = &pFrmFmt->GetAnchor(); - if( FLY_PAGE == pAnchor->GetAnchorId() || + if ((FLY_AT_PAGE == pAnchor->GetAnchorId()) || !pAnchor->GetCntntAnchor() ) { pFlyNd = 0; diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index 01711b931d..47961a47ea 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -31,14 +31,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include #include -#ifndef _OSL_THREAD_HXX_ #include -#endif #include #include #include @@ -492,18 +489,23 @@ void SwBaseLink::Closed() const SwNode* SwBaseLink::GetAnchor() const { - SwFrmFmt* pFmt; - if( pCntntNode && 0 != ( pFmt = pCntntNode->GetFlyFmt()) ) + if (pCntntNode) { - const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); - const SwPosition* pAPos; - if( 0 != ( pAPos = rAnchor.GetCntntAnchor()) && - ( FLY_IN_CNTNT == rAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == rAnchor.GetAnchorId() || - FLY_AT_FLY == rAnchor.GetAnchorId() || - FLY_AT_CNTNT == rAnchor.GetAnchorId() )) - return &pAPos->nNode.GetNode(); - return 0; + SwFrmFmt *const pFmt = pCntntNode->GetFlyFmt(); + if (pFmt) + { + const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); + SwPosition const*const pAPos = rAnchor.GetCntntAnchor(); + if (pAPos && + ((FLY_AS_CHAR == rAnchor.GetAnchorId()) || + (FLY_AT_CHAR == rAnchor.GetAnchorId()) || + (FLY_AT_FLY == rAnchor.GetAnchorId()) || + (FLY_AT_PARA == rAnchor.GetAnchorId()))) + { + return &pAPos->nNode.GetNode(); + } + return 0; + } } ASSERT( !this, "GetAnchor nicht ueberlagert" ); diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 93f83256a9..589b745998 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -61,9 +61,7 @@ #include #include #include -#ifndef IDOCUMENTDRAWMODELACCESS_HXX_INCLUDED #include -#endif #include #include #include @@ -80,17 +78,9 @@ #include // AW: For VCOfDrawVirtObj and stuff -#ifndef _SDR_CONTACT_VIEWCONTACTOFVIRTOBJ_HXX #include -#endif - -#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TRANSFORMPRIMITIVE2D_HXX #include -#endif - -#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFSDROBJ_HXX #include -#endif #include @@ -1958,7 +1948,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch ) switch ( pAnch->GetAnchorId() ) { - case FLY_PAGE: + case FLY_AT_PAGE: { USHORT nPgNum = pAnch->GetPageNum(); SwPageFrm *pPage = static_cast(pRoot->Lower()); @@ -1978,12 +1968,12 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch ) } break; - case FLY_AUTO_CNTNT: - case FLY_AT_CNTNT: + case FLY_AT_CHAR: + case FLY_AT_PARA: case FLY_AT_FLY: - case FLY_IN_CNTNT: + case FLY_AS_CHAR: { - if ( pAnch->GetAnchorId() == FLY_IN_CNTNT ) + if ( pAnch->GetAnchorId() == FLY_AS_CHAR ) { ClrContourCache( GetMaster() ); } @@ -2058,7 +2048,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch ) // OD 2004-01-20 #110582# - find correct follow for // as character anchored objects. - if ( pAnch->GetAnchorId() == FLY_IN_CNTNT && + if ((pAnch->GetAnchorId() == FLY_AS_CHAR) && pFrm->IsTxtFrm() ) { pFrm = lcl_GetFlyInCntntAnchor( @@ -2076,7 +2066,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch ) { // append 'virtual' drawing object SwDrawVirtObj* pDrawVirtObj = AddVirtObj(); - if ( pAnch->GetAnchorId() == FLY_IN_CNTNT ) + if ( pAnch->GetAnchorId() == FLY_AS_CHAR ) { ClrContourCache( pDrawVirtObj ); } @@ -2087,7 +2077,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch ) pDrawVirtObj->ActionChanged(); } - if ( pAnch->GetAnchorId() == FLY_IN_CNTNT ) + if ( pAnch->GetAnchorId() == FLY_AS_CHAR ) { pFrm->InvalidatePrt(); } diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index 08051aa33d..eb88a28f0e 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -34,9 +34,7 @@ #include "hintids.hxx" #include #include -#ifndef _FM_FMMODEL_HXX #include -#endif #include "swtypes.hxx" #include "pagefrm.hxx" @@ -62,8 +60,6 @@ #include -using namespace com::sun::star; - // OD 18.06.2003 #108784# //#ifndef _SVDVMARK_HXX //autogen //#include @@ -74,6 +70,10 @@ using namespace com::sun::star; #include // <-- + +using namespace com::sun::star; + + class SwSdrHdl : public SdrHdl { public: @@ -258,7 +258,7 @@ void SwDrawView::AddCustomHdl() const SwFmtAnchor &rAnchor = pFrmFmt->GetAnchor(); // <-- - if(FLY_IN_CNTNT == rAnchor.GetAnchorId()) + if (FLY_AS_CHAR == rAnchor.GetAnchorId()) return; const SwFrm* pAnch; @@ -267,7 +267,7 @@ void SwDrawView::AddCustomHdl() Point aPos(aAnchorPoint); - if ( FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) + if ( FLY_AT_CHAR == rAnchor.GetAnchorId() ) { // --> OD 2004-06-24 #i28701# - use last character rectangle saved at object // in order to avoid a format of the anchor frame @@ -1019,7 +1019,7 @@ void SwDrawView::CheckPossibilities() " - missing frame format" ); bProtect = TRUE; } - else if ( FLY_IN_CNTNT == pFrmFmt->GetAnchor().GetAnchorId() && + else if ((FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId()) && rMrkList.GetMarkCount() > 1 ) { bProtect = TRUE; diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 114ae919a1..70395b2fe4 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -386,7 +386,7 @@ BOOL SwAutoFormat::HasObjects( const SwNode& rNd ) for( USHORT n = 0; n < rFmts.Count(); ++n ) { const SwFmtAnchor& rAnchor = rFmts[ n ]->GetAnchor(); - if( FLY_PAGE != rAnchor.GetAnchorId() && + if ((FLY_AT_PAGE != rAnchor.GetAnchorId()) && rAnchor.GetCntntAnchor() && &rAnchor.GetCntntAnchor()->nNode.GetNode() == &rNd ) { diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index d620ff9f5f..4083f8092f 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -64,9 +64,7 @@ #include #include #include -#ifndef _UNOFLDMID_H #include -#endif #include using namespace ::com::sun::star; @@ -187,17 +185,20 @@ const SwTxtNode* GetBodyTxtNode( const SwDoc& rDoc, SwPosition& rPos, pLayout = (SwLayoutFrm*)((SwFlyFrm*)pLayout)->GetAnchorFrm(); continue; } - else if( FLY_AT_CNTNT == rAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == rAnchor.GetAnchorId() || - FLY_IN_CNTNT == rAnchor.GetAnchorId() ) + else if ((FLY_AT_PARA == rAnchor.GetAnchorId()) || + (FLY_AT_CHAR == rAnchor.GetAnchorId()) || + (FLY_AS_CHAR == rAnchor.GetAnchorId())) { ASSERT( rAnchor.GetCntntAnchor(), "keine gueltige Position" ); rPos = *rAnchor.GetCntntAnchor(); pTxtNode = rPos.nNode.GetNode().GetTxtNode(); - if( FLY_AT_CNTNT == rAnchor.GetAnchorId() ) - ((SwTxtNode*)pTxtNode)->MakeStartIndex( &rPos.nContent ); + if ( FLY_AT_PARA == rAnchor.GetAnchorId() ) + { + const_cast(pTxtNode)->MakeStartIndex( + &rPos.nContent ); // oder doch besser das Ende vom (Anker-)TextNode nehmen ?? // ((SwTxtNode*)pTxtNode)->MakeEndIndex( &rPos.nContent ); + } // noch nicht abbrechen, kann ja auch noch im // Header/Footer/Footnote/Fly stehen !! diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index bc66235cde..faf212862b 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -151,14 +151,16 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt ) SwFrmFmt* pFlyFmt = pFly->GetFmt(); SwFmtAnchor aAnchor( pFlyFmt->GetAnchor() ); - if ( FLY_AT_CNTNT == aAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == aAnchor.GetAnchorId() || - FLY_AT_FLY == aAnchor.GetAnchorId() || - FLY_IN_CNTNT == aAnchor.GetAnchorId() ) + if ((FLY_AT_PARA == aAnchor.GetAnchorId()) || + (FLY_AT_CHAR == aAnchor.GetAnchorId()) || + (FLY_AT_FLY == aAnchor.GetAnchorId()) || + (FLY_AS_CHAR == aAnchor.GetAnchorId())) { SwPosition aPos( aSttIdx ); - if( FLY_IN_CNTNT == aAnchor.GetAnchorId() ) + if ( FLY_AS_CHAR == aAnchor.GetAnchorId() ) + { aPos.nContent.Assign( pTxtNd, 0 ); + } aAnchor.SetAnchor( &aPos ); } pFlyFmt = pClpDoc->CopyLayoutFmt( *pFlyFmt, aAnchor, true, true ); @@ -175,7 +177,7 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt ) rSpzFrmFmts.Insert( pFlyFmt, 0 ); } - if( FLY_IN_CNTNT == aAnchor.GetAnchorId() ) + if ( FLY_AS_CHAR == aAnchor.GetAnchorId() ) { // JP 13.02.99 Bug 61863: wenn eine Rahmenselektion ins Clipboard // gestellt wird, so muss beim Pasten auch wieder @@ -206,24 +208,25 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt ) { SfxItemSet aSet( pClpDoc->GetAttrPool(), aFrmFmtSetRange ); - SwFmtAnchor aAnchor( FLY_AT_CNTNT ); + SwFmtAnchor aAnchor( FLY_AT_PARA ); aAnchor.SetAnchor( &aPos ); aSet.Put( aAnchor ); - SdrObject* pNew = pClpDoc->CloneSdrObj( *pObj, FALSE, TRUE ); + SdrObject *const pNew = + pClpDoc->CloneSdrObj( *pObj, FALSE, TRUE ); SwPaM aTemp(aPos); - pClpDoc->Insert(aTemp, *pNew, &aSet, NULL); + pClpDoc->Insert(aTemp, *pNew, &aSet, NULL); } else { SwDrawContact *pContact = (SwDrawContact*)GetUserCall( pObj ); SwFrmFmt *pFmt = pContact->GetFmt(); SwFmtAnchor aAnchor( pFmt->GetAnchor() ); - if ( FLY_AT_CNTNT == aAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == aAnchor.GetAnchorId() || - FLY_AT_FLY == aAnchor.GetAnchorId() || - FLY_IN_CNTNT == aAnchor.GetAnchorId() ) + if ((FLY_AT_PARA == aAnchor.GetAnchorId()) || + (FLY_AT_CHAR == aAnchor.GetAnchorId()) || + (FLY_AT_FLY == aAnchor.GetAnchorId()) || + (FLY_AS_CHAR == aAnchor.GetAnchorId())) { aAnchor.SetAnchor( &aPos ); } @@ -269,7 +272,9 @@ BOOL lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly, SwCntntFrm* pTmpFrm = rNd.GetCntntNode()->GetFrm( &rInsPt, 0, FALSE ); SwFlyFrm *pTmpFly = pTmpFrm->FindFlyFrm(); if( pTmpFly && bCheckFlyRecur && pFly->IsUpperOf( *pTmpFly ) ) + { bRet = FALSE; + } else if ( FLY_AT_FLY == rAnchor.GetAnchorId() ) { if( pTmpFly ) @@ -281,7 +286,7 @@ BOOL lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly, } else { - rAnchor.SetType( FLY_PAGE ); + rAnchor.SetType( FLY_AT_PAGE ); rAnchor.SetPageNum( rDestShell.GetPageNumber( rInsPt ) ); const SwFrm *pPg = pTmpFrm->FindPageFrm(); rNewPos = pPg->Frm().Pos(); @@ -329,7 +334,7 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, // in die Gruppe einfuegen, wenns aus einer betretenen Gruppe // kommt oder das Object nicht zeichengebunden ist if( pSrcDrwView->IsGroupEntered() || - FLY_IN_CNTNT != rAnchor.GetAnchorId() ) + (FLY_AS_CHAR != rAnchor.GetAnchorId()) ) { SdrObject* pNew = pDestDoc->CloneSdrObj( *pObj, bIsMove && @@ -345,10 +350,10 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, SwFmtAnchor aAnchor( rAnchor ); Point aNewAnch; - if ( FLY_AT_CNTNT == aAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == aAnchor.GetAnchorId() || - FLY_AT_FLY == aAnchor.GetAnchorId() || - FLY_IN_CNTNT == aAnchor.GetAnchorId() ) + if ((FLY_AT_PARA == aAnchor.GetAnchorId()) || + (FLY_AT_CHAR == aAnchor.GetAnchorId()) || + (FLY_AT_FLY == aAnchor.GetAnchorId()) || + (FLY_AS_CHAR == aAnchor.GetAnchorId())) { if ( this == pDestShell ) { @@ -378,7 +383,7 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, aNewAnch, FALSE ); } } - else if( FLY_PAGE == aAnchor.GetAnchorId() ) + else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() ) { aAnchor.SetPageNum( pDestShell->GetPageNumber( rInsPt ) ); const SwRootFrm* pTmpRoot = pDestShell->GetLayout(); @@ -406,7 +411,7 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, if ( pFmt ) { SdrObject* pNew = pFmt->FindSdrObject(); - if( FLY_IN_CNTNT != aAnchor.GetAnchorId() ) + if ( FLY_AS_CHAR != aAnchor.GetAnchorId() ) { Point aPos( rInsPt ); aPos -= aNewAnch; @@ -496,10 +501,10 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, bRet = TRUE; Point aNewAnch; - if ( FLY_AT_CNTNT == aAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == aAnchor.GetAnchorId() || - FLY_AT_FLY == aAnchor.GetAnchorId() || - FLY_IN_CNTNT == aAnchor.GetAnchorId() ) + if ((FLY_AT_PARA == aAnchor.GetAnchorId()) || + (FLY_AT_CHAR == aAnchor.GetAnchorId()) || + (FLY_AT_FLY == aAnchor.GetAnchorId()) || + (FLY_AS_CHAR == aAnchor.GetAnchorId())) { if ( this == pDestShell ) { @@ -537,7 +542,7 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, aNewAnch, GetDoc() == pDestShell->GetDoc()); } } - else if( FLY_PAGE == aAnchor.GetAnchorId() ) + else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() ) { aAnchor.SetPageNum( pDestShell->GetPageNumber( rInsPt ) ); const SwRootFrm* pTmpRoot = pDestShell->GetLayout(); @@ -554,7 +559,7 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, SwFrmFmt *pOldFmt = pFlyFmt; pFlyFmt = pDestShell->GetDoc()->CopyLayoutFmt( *pFlyFmt, aAnchor, true, true ); - if( FLY_IN_CNTNT != aAnchor.GetAnchorId() ) + if ( FLY_AS_CHAR != aAnchor.GetAnchorId() ) { Point aPos( rInsPt ); aPos -= aNewAnch; @@ -918,7 +923,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) if( Imp()->GetDrawView()->IsGroupEntered() && RES_DRAWFRMFMT == rCpyFmt.Which() && - FLY_IN_CNTNT != rCpyFmt.GetAnchor().GetAnchorId() ) + (FLY_AS_CHAR != rCpyFmt.GetAnchor().GetAnchorId()) ) { const SdrObject* pSdrObj = rCpyFmt.FindSdrObject(); if( pSdrObj ) @@ -966,9 +971,9 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) if( bInsWithFmt ) { SwFmtAnchor aAnchor( rCpyFmt.GetAnchor() ); - if( FLY_AT_CNTNT == aAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == aAnchor.GetAnchorId() || - FLY_IN_CNTNT == aAnchor.GetAnchorId() ) + if ((FLY_AT_PARA == aAnchor.GetAnchorId()) || + (FLY_AT_CHAR == aAnchor.GetAnchorId()) || + (FLY_AS_CHAR == aAnchor.GetAnchorId())) { SwPosition* pPos = PCURCRSR->GetPoint(); // #108784# allow shapes (no controls) in header/footer @@ -979,7 +984,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) aAnchor.SetAnchor( pPos ); } - else if( FLY_PAGE == aAnchor.GetAnchorId() ) + else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() ) { aAnchor.SetPageNum( GetPhyPageNum() ); } @@ -1091,7 +1096,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) if( bInsWithFmt ) { SwFmtAnchor aAnchor( rCpyFmt.GetAnchor() ); - if( FLY_PAGE == aAnchor.GetAnchorId() ) + if ( FLY_AT_PAGE == aAnchor.GetAnchorId() ) { aAnchor.SetPageNum( aAnchor.GetPageNum() + nStartPageNumber - 1 ); } @@ -1199,7 +1204,7 @@ BOOL SwFEShell::PastePages( SwFEShell& rToFill, USHORT nStartPage, USHORT nEndPa { const SwFrmFmt& rCpyFmt = *(*GetDoc()->GetSpzFrmFmts())[i]; SwFmtAnchor aAnchor( rCpyFmt.GetAnchor() ); - if( FLY_PAGE == aAnchor.GetAnchorId() && + if ((FLY_AT_PAGE == aAnchor.GetAnchorId()) && aAnchor.GetPageNum() >= nStartPage && aAnchor.GetPageNum() <= nEndPage) { aAnchor.SetPageNum( aAnchor.GetPageNum() - nStartPage + 1); diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 640a49f13d..430962ff4e 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -113,7 +113,7 @@ sal_Bool lcl_SetNewFlyPos( const SwNode& rNode, SwFmtAnchor& rAnchor, const SwPageFrm *pPg = pCFrm ? pCFrm->FindPageFrm() : 0; rAnchor.SetPageNum( pPg ? pPg->GetPhyPageNum() : 1 ); - rAnchor.SetType( FLY_PAGE ); + rAnchor.SetType( FLY_AT_PAGE ); } return bRet; } @@ -130,9 +130,9 @@ BOOL lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm, Point aTmpPnt( rPt ); switch( nNew ) { - case FLY_IN_CNTNT: // sollte der nicht auch mit hinein? - case FLY_AT_CNTNT: - case FLY_AUTO_CNTNT: // LAYER_IMPL + case FLY_AS_CHAR: // sollte der nicht auch mit hinein? + case FLY_AT_PARA: + case FLY_AT_CHAR: // LAYER_IMPL { //Ausgehend von der linken oberen Ecke des Fly den //dichtesten CntntFrm suchen. @@ -146,7 +146,7 @@ BOOL lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm, } SwPosition aPos( *((SwCntntFrm*)pNewAnch)->GetNode() ); - if( FLY_AUTO_CNTNT == nNew || FLY_IN_CNTNT == nNew ) + if ((FLY_AT_CHAR == nNew) || (FLY_AS_CHAR == nNew)) { // es muss ein TextNode gefunden werden, denn nur in diesen // ist ein Inhaltsgebundene Frames zu verankern @@ -186,10 +186,10 @@ BOOL lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm, } } - aNewAnch.SetType( nNew = FLY_PAGE ); + aNewAnch.SetType( nNew = FLY_AT_PAGE ); // no break - case FLY_PAGE: + case FLY_AT_PAGE: pNewAnch = rFrm.FindPageFrm(); aNewAnch.SetPageNum( pNewAnch->GetPhyPageNum() ); break; @@ -219,8 +219,8 @@ sal_Bool lcl_ChkAndSetNewAnchor( const SwFlyFrm& rFly, SfxItemSet& rSet ) SwDoc* pDoc = (SwDoc*)rFmt.GetDoc(); #ifndef PRODUCT - ASSERT( !(nNew == FLY_PAGE && - (FLY_AT_CNTNT==nOld || FLY_AUTO_CNTNT==nOld || FLY_IN_CNTNT==nOld ) && + ASSERT( !(nNew == FLY_AT_PAGE && + (FLY_AT_PARA==nOld || FLY_AT_CHAR==nOld || FLY_AS_CHAR==nOld ) && pDoc->IsInHeaderFooter( rOldAnch.GetCntntAnchor()->nNode )), "Unerlaubter Ankerwechsel in Head/Foot." ); #endif @@ -441,7 +441,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt ) SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt(); RndStdIds nAnchorId = rFmt.GetAnchor().GetAnchorId(); - if ( FLY_IN_CNTNT == nAnchorId ) + if ( FLY_AS_CHAR == nAnchorId ) return aRet; sal_Bool bFlyFrame = pObj->ISA(SwVirtFlyDrawObj); @@ -462,8 +462,10 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt ) pOldAnch = pFly->GetAnchorFrm(); if( !pOldAnch ) return aRet; - if( FLY_PAGE != nAnchorId ) + if ( FLY_AT_PAGE != nAnchorId ) + { pFooterOrHeader = pCntnt->FindFooterOrHeader(); + } } // OD 26.06.2003 #108784# - set also for drawing // objects, but not for control objects. @@ -489,14 +491,18 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt ) const SwFrm *pNewAnch; if( pTxtFrm ) { - if( FLY_PAGE == nAnchorId ) + if ( FLY_AT_PAGE == nAnchorId ) + { pNewAnch = pTxtFrm->FindPageFrm(); + } else { pNewAnch = ::FindAnchor( pTxtFrm, rAbsPos ); if( FLY_AT_FLY == nAnchorId ) // LAYER_IMPL + { pNewAnch = pNewAnch->FindFlyFrm(); + } } } else @@ -522,19 +528,19 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt ) { aRet = pNewAnch->GetFrmAnchorPos( ::HasWrap( pObj ) ); - if( bMoveIt || nAnchorId == FLY_AUTO_CNTNT ) + if ( bMoveIt || (nAnchorId == FLY_AT_CHAR) ) { SwFmtAnchor aAnch( rFmt.GetAnchor() ); switch ( nAnchorId ) { - case FLY_AT_CNTNT: + case FLY_AT_PARA: { SwPosition *pPos = (SwPosition*)aAnch.GetCntntAnchor(); pPos->nNode = *pTxtFrm->GetNode(); pPos->nContent.Assign(0,0); break; } - case FLY_PAGE: + case FLY_AT_PAGE: { aAnch.SetPageNum( ((const SwPageFrm*)pNewAnch)-> GetPhyPageNum() ); @@ -547,7 +553,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt ) aAnch.SetAnchor( &aPos ); break; } - case FLY_AUTO_CNTNT: + case FLY_AT_CHAR: { SwPosition *pPos = (SwPosition*)aAnch.GetCntntAnchor(); Point aTmpPnt( rAbsPos ); @@ -666,21 +672,25 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali RndStdIds eRndId = rAnch.GetAnchorId(); switch( eRndId ) { - case FLY_PAGE: + case FLY_AT_PAGE: if( !rAnch.GetPageNum() ) //HotFix: Bug in UpdateByExample rAnch.SetPageNum( 1 ); break; case FLY_AT_FLY: - case FLY_AT_CNTNT: - case FLY_AUTO_CNTNT: - case FLY_IN_CNTNT: + case FLY_AT_PARA: + case FLY_AT_CHAR: + case FLY_AS_CHAR: if( !bAnchValid ) { if( FLY_AT_FLY != eRndId ) + { rAnch.SetAnchor( &rPos ); + } else if( lcl_SetNewFlyPos( rPos.nNode.GetNode(), rAnch, aPt ) ) - eRndId = FLY_PAGE; + { + eRndId = FLY_AT_PAGE; + } } break; @@ -698,7 +708,7 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali SwFmtVertOrient aOldV; SwFmtHoriOrient aOldH; - if( FLY_PAGE != eRndId ) + if ( FLY_AT_PAGE != eRndId ) { // erstmal als mit Seitenbindung, Absatz/Zeichenbindung erst wenn // alles verschoben ist. Dann ist die Position gueltig! @@ -706,7 +716,7 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali // umsetzen, damit diese beim Umanker NICHT // korrigiert wird pOldAnchor = new SwFmtAnchor( rAnch ); - ((SfxItemSet&)rSet).Put( SwFmtAnchor( FLY_PAGE, 1 ) ); + const_cast(rSet).Put( SwFmtAnchor( FLY_AT_PAGE, 1 ) ); const SfxPoolItem* pItem; if( SFX_ITEM_SET == rSet.GetItemState( RES_HORI_ORIENT, sal_False, &pItem ) @@ -741,8 +751,10 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali const SwFrm* pAnch = ::FindAnchor( GetLayout(), aPt, sal_False ); SwPosition aPos( *((SwCntntFrm*)pAnch)->GetNode() ); - if( FLY_IN_CNTNT == eRndId ) + if ( FLY_AS_CHAR == eRndId ) + { aPos.nContent.Assign( ((SwCntntFrm*)pAnch)->GetNode(), 0 ); + } pOldAnchor->SetAnchor( &aPos ); // das verschieben von TabelleSelektion ist noch nicht @@ -818,9 +830,9 @@ void SwFEShell::Insert( const String& rGrfName, const String& rFltName, SwFmtAnchor* pAnchor = (SwFmtAnchor*)pItem; switch( pAnchor->GetAnchorId()) { - case FLY_AT_CNTNT: - case FLY_AUTO_CNTNT: // LAYER_IMPL - case FLY_IN_CNTNT: + case FLY_AT_PARA: + case FLY_AT_CHAR: // LAYER_IMPL + case FLY_AS_CHAR: if( !pAnchor->GetCntntAnchor() ) { pAnchor->SetAnchor( pCursor->GetPoint() ); @@ -833,7 +845,7 @@ void SwFEShell::Insert( const String& rGrfName, const String& rFltName, *pAnchor, GetCrsrDocPos() ); } break; - case FLY_PAGE: + case FLY_AT_PAGE: if( !pAnchor->GetPageNum() ) { pAnchor->SetPageNum( pCursor->GetPageNum( @@ -912,10 +924,10 @@ void SwFEShell::Insert( SdrObject& rDrawObj, const SfxPoolItem* pItem; if( !pFlyAttrSet || !pFlyAttrSet->GetItemState( RES_ANCHOR, sal_False, &pItem ) || - FLY_PAGE != ((SwFmtAnchor*)pItem)->GetAnchorId() ) + (FLY_AT_PAGE != ((SwFmtAnchor*)pItem)->GetAnchorId())) { pSet = new SfxItemSet( GetDoc()->GetAttrPool(), aFrmFmtSetRange ); - pSet->Put( SwFmtAnchor( FLY_AT_CNTNT )); + pSet->Put( SwFmtAnchor( FLY_AT_PARA )); pFlyAttrSet = pSet; } @@ -978,8 +990,10 @@ void SwFEShell::GetPageObjs( SvPtrarr& rFillArr ) for( sal_uInt16 n = 0; n < pDoc->GetSpzFrmFmts()->Count(); ++n ) { pFmt = (const SwFrmFmt*)(*pDoc->GetSpzFrmFmts())[n]; - if( FLY_PAGE == pFmt->GetAnchor().GetAnchorId() ) + if (FLY_AT_PAGE == pFmt->GetAnchor().GetAnchorId()) + { rFillArr.Insert( (VoidPtr)pFmt, rFillArr.Count() ); + } } } @@ -1010,7 +1024,7 @@ void SwFEShell::SetPageObjsNewPage( SvPtrarr& rFillArr, int nOffset ) { // FlyFmt ist noch gueltig, also behandeln SwFmtAnchor aNewAnchor( pFmt->GetAnchor() ); - if( FLY_PAGE != aNewAnchor.GetAnchorId() || + if ((FLY_AT_PAGE != aNewAnchor.GetAnchorId()) || 0 >= ( nNewPage = aNewAnchor.GetPageNum() + nOffset ) ) // chaos::Anchor wurde veraendert oder ungueltige SeitenNummer, // also nicht veraendern !! @@ -1086,12 +1100,12 @@ sal_Bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const SwFmtAnchor* pAnchor = (SwFmtAnchor*)pItem; RndStdIds eType = pAnchor->GetAnchorId(); - if( FLY_PAGE != eType ) + if ( FLY_AT_PAGE != eType ) { // OD 12.11.2003 #i22341# - content anchor of anchor item is needed. // Thus, don't overwrite anchor item by default contructed anchor item. //rSet.Put( SwFmtAnchor( eType ) ); - if( FLY_IN_CNTNT == eType ) + if ( FLY_AS_CHAR == eType ) { rSet.ClearItem( RES_OPAQUE ); rSet.ClearItem( RES_SURROUND ); @@ -1828,7 +1842,7 @@ ObjCntType SwFEShell::GetObjCntType( const SdrObject& rObj ) const " - missing frame format" ); eType = OBJCNT_NONE; } - else if ( FLY_IN_CNTNT != pFrmFmt->GetAnchor().GetAnchorId() ) + else if ( FLY_AS_CHAR != pFrmFmt->GetAnchor().GetAnchorId() ) { eType = OBJCNT_GROUPOBJ; } diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index e8c849cee0..d7e0e4e02e 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -326,7 +326,7 @@ sal_Bool SwFEShell::MoveAnchor( USHORT nDir ) SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt(); SwFmtAnchor aAnch( rFmt.GetAnchor() ); RndStdIds nAnchorId = aAnch.GetAnchorId(); - if ( FLY_IN_CNTNT == nAnchorId ) + if ( FLY_AS_CHAR == nAnchorId ) return sal_False; if( pOld->IsVertical() ) { @@ -348,7 +348,7 @@ sal_Bool SwFEShell::MoveAnchor( USHORT nDir ) } } switch ( nAnchorId ) { - case FLY_PAGE: + case FLY_AT_PAGE: { ASSERT( pOld->IsPageFrm(), "Wrong anchor, page exspected." ); if( SW_MOVE_UP == nDir ) @@ -362,7 +362,7 @@ sal_Bool SwFEShell::MoveAnchor( USHORT nDir ) } break; } - case FLY_AUTO_CNTNT: + case FLY_AT_CHAR: { ASSERT( pOld->IsCntntFrm(), "Wrong anchor, page exspected." ); if( SW_MOVE_LEFT == nDir || SW_MOVE_RIGHT == nDir ) @@ -396,7 +396,7 @@ sal_Bool SwFEShell::MoveAnchor( USHORT nDir ) } } } // no break! - case FLY_AT_CNTNT: + case FLY_AT_PARA: { ASSERT( pOld->IsCntntFrm(), "Wrong anchor, page exspected." ); if( SW_MOVE_UP == nDir ) @@ -1652,7 +1652,7 @@ BOOL SwFEShell::ImpEndCreate() if( bCharBound ) { - aAnch.SetType( FLY_IN_CNTNT ); + aAnch.SetType( FLY_AS_CHAR ); aAnch.SetAnchor( &aPos ); } } @@ -1719,7 +1719,7 @@ BOOL SwFEShell::ImpEndCreate() bAtPage = true; else { - aAnch.SetType( FLY_AT_CNTNT ); + aAnch.SetType( FLY_AT_PARA ); aAnch.SetAnchor( &aPos ); } } @@ -1728,7 +1728,7 @@ BOOL SwFEShell::ImpEndCreate() { pPage = pAnch->FindPageFrm(); - aAnch.SetType( FLY_PAGE ); + aAnch.SetType( FLY_AT_PAGE ); aAnch.SetPageNum( pPage->GetPhyPageNum() ); pAnch = pPage; // die Page wird jetzt zum Anker } @@ -1871,7 +1871,7 @@ BOOL SwFEShell::ImpEndCreate() // <-- if( bCharBound ) { - ASSERT( aAnch.GetAnchorId() == FLY_IN_CNTNT, "wrong AnchorType" ); + ASSERT( aAnch.GetAnchorId() == FLY_AS_CHAR, "wrong AnchorType" ); SwTxtNode *pNd = aAnch.GetCntntAnchor()->nNode.GetNode().GetTxtNode(); SwFmtFlyCnt aFmt( pFmt ); pNd->InsertItem(aFmt, @@ -2256,7 +2256,7 @@ BOOL SwFEShell::IsGroupSelected() // --> FME 2004-12-08 #i38505# No ungroup allowed for 3d objects !pObj->Is3DObj() && // <-- - FLY_IN_CNTNT != ((SwDrawContact*)GetUserCall(pObj))-> + FLY_AS_CHAR != ((SwDrawContact*)GetUserCall(pObj))-> GetFmt()->GetAnchor().GetAnchorId() ) { return TRUE; @@ -2302,7 +2302,7 @@ bool SwFEShell::IsGroupAllowed() const " - missing frame format" ); bIsGroupAllowed = false; } - else if ( FLY_IN_CNTNT == pFrmFmt->GetAnchor().GetAnchorId() ) + else if ( FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId() ) { bIsGroupAllowed = false; } @@ -2619,7 +2619,7 @@ BOOL SwFEShell::IsAlignPossible() const SdrObject *pO = Imp()->GetDrawView()->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj(); SwDrawContact *pC = (SwDrawContact*)GetUserCall(pO); //only as character bound drawings can be aligned - bRet = pC->GetFmt()->GetAnchor().GetAnchorId() == FLY_IN_CNTNT; + bRet = (pC->GetFmt()->GetAnchor().GetAnchorId() == FLY_AS_CHAR); } if ( bRet ) return Imp()->GetDrawView()->IsAlignPossible(); @@ -2664,7 +2664,7 @@ void SwFEShell::CheckUnboundObjects() { pAnch = ::FindAnchor( pPage, aPt, TRUE ); SwPosition aPos( *((SwCntntFrm*)pAnch)->GetNode() ); - aAnch.SetType( FLY_AT_CNTNT ); + aAnch.SetType( FLY_AT_PARA ); aAnch.SetAnchor( &aPos ); ((SwRect&)GetCharRect()).Pos() = aPt; } diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 4485ba99f6..fd2939fc27 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -31,11 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include -//#ifndef _SVDVMARK_HXX //autogen -//#include -//#endif #include #include #include @@ -71,8 +67,10 @@ // OD 2004-03-29 #i26791# #include + using namespace com::sun::star; + TYPEINIT1(SwFEShell,SwEditShell) /*********************************************************************** @@ -780,12 +778,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, BOOL bVertic = FALSE; BOOL bRTL = FALSE; - if( FLY_PAGE == _nAnchorId || FLY_AT_FLY == _nAnchorId ) // LAYER_IMPL + if ((FLY_AT_PAGE == _nAnchorId) || (FLY_AT_FLY == _nAnchorId)) // LAYER_IMPL { const SwFrm* pTmp = pFrm; // OD 06.11.2003 #i22305# - if ( FLY_PAGE == _nAnchorId || - ( FLY_AT_FLY == _nAnchorId && !_bFollowTextFlow ) ) + if ((FLY_AT_PAGE == _nAnchorId) || + ((FLY_AT_FLY == _nAnchorId) && !_bFollowTextFlow)) { pFrm = pPage; } @@ -906,7 +904,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, aPos = (pFrm->Frm().*fnRect->fnGetPos)(); // OD 08.09.2003 #i17567#, #108749#, #110354# - allow negative positions // for fly frames anchor to paragraph/to character. - if ( _nAnchorId == FLY_AT_CNTNT || _nAnchorId == FLY_AUTO_CNTNT ) + if ((_nAnchorId == FLY_AT_PARA) || (_nAnchorId == FLY_AT_CHAR)) { // The rectangle, the fly frame can be positioned in, is determined // horizontally by the frame area of the horizontal environment @@ -985,7 +983,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, // fly frame). Thus, assure this. const SwTxtFrm* pTxtFrm( dynamic_cast(pFrm) ); if ( pTxtFrm && - _nAnchorId == FLY_AUTO_CNTNT && + (_nAnchorId == FLY_AT_CHAR) && ( _eVertRelOrient == text::RelOrientation::CHAR || _eVertRelOrient == text::RelOrientation::TEXT_LINE ) ) { @@ -1032,7 +1030,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, // position ( respectively ), if object is // anchored to character and horizontal aligned at character. if ( pTxtFrm && - _nAnchorId == FLY_AUTO_CNTNT && + (_nAnchorId == FLY_AT_CHAR) && _eHoriRelOrient == text::RelOrientation::CHAR ) { SwTwips nLeft = 0L; diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 26eed5bdf8..6979478c33 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -30,6 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include #include #include @@ -984,11 +985,11 @@ BOOL IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam ) for( USHORT n = 0; n < rFmts.Count(); ++n ) { - const SwPosition* pAPos; const SwFmtAnchor& rAnchor = rFmts[n]->GetAnchor(); - if( ( FLY_AT_CNTNT == rAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) && - 0 != ( pAPos = rAnchor.GetCntntAnchor() ) && + const SwPosition* pAPos = rAnchor.GetCntntAnchor(); + if (pAPos && + ((FLY_AT_PARA == rAnchor.GetAnchorId()) || + (FLY_AT_CHAR == rAnchor.GetAnchorId())) && nSttIdx <= ( nIdx = pAPos->nNode.GetIndex() ) && nIdx < nEndIdx ) { diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx index 8312125fc6..ed19901729 100644 --- a/sw/source/core/inc/flyfrm.hxx +++ b/sw/source/core/inc/flyfrm.hxx @@ -109,10 +109,10 @@ protected: //(CheckClip) nur das Format aufgerufen wird; //nicht aber die Breite anhand der Attribute //wieder bestimmt wird. - BOOL bInCnt :1; // FLY_IN_CNTNT, als Zeichen verankert - BOOL bAtCnt :1; // FLY_AT_CNTNT, am Absatz verankert - BOOL bLayout :1; // FLY_PAGE, FLY_AT_FLY, an Seite oder Rahmen - BOOL bAutoPosition :1; // FLY_AUTO_CNTNT, im Text verankerter Rahmen + BOOL bInCnt :1; // FLY_AS_CHAR, anchored as character + BOOL bAtCnt :1; // FLY_AT_PARA, anchored at paragraph + BOOL bLayout :1; // FLY_AT_PAGE, FLY_AT_FLY, at page or at frame + BOOL bAutoPosition :1; // FLY_AT_CHAR, anchored at character BOOL bNoShrink :1; // temporary forbud of shrinking to avoid loops BOOL bLockDeleteContent :1; // If the flag is set, the content of the // fly frame is not deleted if moved to diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx index e2376f3d8e..7762216928 100644 --- a/sw/source/core/layout/anchoreddrawobject.cxx +++ b/sw/source/core/layout/anchoreddrawobject.cxx @@ -37,12 +37,8 @@ #include #include #include -#ifndef _TOCNTNTANCHOROBJECTPOSITION_HXX #include -#endif -#ifndef _TOLAYOUTANCHOROBJECTPOSITION_HXX #include -#endif #include #include // --> OD 2004-08-12 #i32795# @@ -357,7 +353,7 @@ void SwAnchoredDrawObject::MakeObjPos() // determine relative position of drawing object and set it switch ( pDrawContact->GetAnchorId() ) { - case FLY_IN_CNTNT: + case FLY_AS_CHAR: { // indicate that position will be valid after positioning is performed mbValidPos = true; @@ -365,15 +361,15 @@ void SwAnchoredDrawObject::MakeObjPos() // during the format of its anchor frame - see } break; - case FLY_AT_CNTNT: - case FLY_AUTO_CNTNT: + case FLY_AT_PARA: + case FLY_AT_CHAR: { // --> OD 2004-08-12 #i32795# - move intrinsic positioning to // helper method <_MakeObjPosAnchoredAtPara()> _MakeObjPosAnchoredAtPara(); } break; - case FLY_PAGE: + case FLY_AT_PAGE: case FLY_AT_FLY: { // --> OD 2004-08-12 #i32795# - move intrinsic positioning to @@ -603,7 +599,7 @@ void SwAnchoredDrawObject::_InvalidatePage( SwPageFrm* _pPageFrm ) { // --> OD 2004-11-11 #i35007# - correct invalidation for as-character // anchored objects. - if ( GetFrmFmt().GetAnchor().GetAnchorId() == FLY_IN_CNTNT ) + if ( GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AS_CHAR ) { _pPageFrm->InvalidateFlyInCnt(); } @@ -645,7 +641,7 @@ void SwAnchoredDrawObject::InvalidateObjPos() // --> OD 2005-03-09 #i44559# - assure, that text hint is already // existing in the text frame if ( GetAnchorFrm()->ISA(SwTxtFrm) && - GetFrmFmt().GetAnchor().GetAnchorId() == FLY_IN_CNTNT ) + (GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AS_CHAR) ) { SwTxtFrm* pAnchorTxtFrm( static_cast(AnchorFrm()) ); if ( pAnchorTxtFrm->GetTxtNode()->GetpSwpHints() && diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx index eed807f6f2..25aee1b555 100644 --- a/sw/source/core/layout/anchoredobject.cxx +++ b/sw/source/core/layout/anchoredobject.cxx @@ -306,7 +306,7 @@ void SwAnchoredObject::CheckCharRectAndTopOfLine( GetAnchorFrm()->IsTxtFrm() ) { const SwFmtAnchor& rAnch = GetFrmFmt().GetAnchor(); - if ( rAnch.GetAnchorId() == FLY_AUTO_CNTNT && + if ( (rAnch.GetAnchorId() == FLY_AT_CHAR) && rAnch.GetCntntAnchor() ) { // --> OD 2004-07-14 #117380# - if requested, assure that anchor frame, @@ -540,8 +540,8 @@ bool SwAnchoredObject::ConsiderObjWrapInfluenceOnObjPos() const // <-- { const SwFmtAnchor& rAnchor = rObjFmt.GetAnchor(); - if ( ( rAnchor.GetAnchorId() == FLY_AUTO_CNTNT || - rAnchor.GetAnchorId() == FLY_AT_CNTNT ) && + if ( ((rAnchor.GetAnchorId() == FLY_AT_CHAR) || + (rAnchor.GetAnchorId() == FLY_AT_PARA)) && rObjFmt.GetSurround().GetSurround() != SURROUND_THROUGHT ) { // --> OD 2004-09-23 #i34520# - text also wraps around anchored @@ -792,7 +792,7 @@ void SwAnchoredObject::UpdateObjInSortedList() AnchorFrm()->GetDrawObjs()->Update( *this ); // update its position in the sorted object list of its page frame // note: as-character anchored object aren't registered at a page frame - if ( GetFrmFmt().GetAnchor().GetAnchorId() != FLY_IN_CNTNT ) + if ( GetFrmFmt().GetAnchor().GetAnchorId() != FLY_AS_CHAR ) { GetPageFrm()->GetSortedObjs()->Update( *this ); } @@ -859,8 +859,8 @@ SwTxtFrm* SwAnchoredObject::FindAnchorCharFrm() if ( mpAnchorFrm ) { const SwFmtAnchor& rAnch = GetFrmFmt().GetAnchor(); - if ( rAnch.GetAnchorId() == FLY_AUTO_CNTNT || - rAnch.GetAnchorId() == FLY_IN_CNTNT ) + if ((rAnch.GetAnchorId() == FLY_AT_CHAR) || + (rAnch.GetAnchorId() == FLY_AS_CHAR)) { pAnchorCharFrm = &(static_cast(AnchorFrm())-> GetFrmAtOfst( rAnch.GetCntntAnchor()->nContent.GetIndex() )); diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index e327b0bbdf..011e62014e 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -51,9 +51,7 @@ #include #include #include -#ifndef __SBX_SBXVARIABLE_HXX //autogen #include -#endif #include #include #include @@ -79,9 +77,7 @@ #include #include #include -#ifndef _FMTLINE_HXX #include -#endif #include #include #include @@ -110,18 +106,12 @@ #include #include -#ifndef _CMDID_H #include -#endif -#ifndef _UNOMID_H #include -#endif #ifndef _COMCORE_HRC #include #endif -#ifndef _SVX_SVUNDO_HXX #include // #111827# -#endif // OD 2004-05-24 #i28701# #include // --> OD 2006-03-06 #125892# @@ -1484,9 +1474,11 @@ void SwFmtAnchor::SetAnchor( const SwPosition *pPos ) delete pCntntAnchor; pCntntAnchor = pPos ? new SwPosition( *pPos ) : 0; //AM Absatz gebundene Flys sollten nie in den Absatz hineinzeigen. - if ( pCntntAnchor && ( FLY_AT_CNTNT == nAnchorId || - FLY_AT_FLY == nAnchorId )) + if (pCntntAnchor && + ((FLY_AT_PARA == nAnchorId) || (FLY_AT_FLY == nAnchorId))) + { pCntntAnchor->nContent.Assign( 0, 0 ); + } } SwFmtAnchor& SwFmtAnchor::operator=(const SwFmtAnchor& rAnchor) @@ -1543,14 +1535,23 @@ BOOL SwFmtAnchor::QueryValue( uno::Any& rVal, BYTE nMemberId ) const case MID_ANCHOR_ANCHORTYPE: text::TextContentAnchorType eRet; - switch((sal_Int16)GetAnchorId()) + switch (GetAnchorId()) { - case FLY_AUTO_CNTNT : eRet = text::TextContentAnchorType_AT_CHARACTER;break; - case FLY_PAGE : eRet = text::TextContentAnchorType_AT_PAGE; break; - case FLY_AT_FLY : eRet = text::TextContentAnchorType_AT_FRAME; break; - case FLY_IN_CNTNT : eRet = text::TextContentAnchorType_AS_CHARACTER;break; - //case FLY_AT_CNTNT : - default: eRet = text::TextContentAnchorType_AT_PARAGRAPH; + case FLY_AT_CHAR: + eRet = text::TextContentAnchorType_AT_CHARACTER; + break; + case FLY_AT_PAGE: + eRet = text::TextContentAnchorType_AT_PAGE; + break; + case FLY_AT_FLY: + eRet = text::TextContentAnchorType_AT_FRAME; + break; + case FLY_AS_CHAR: + eRet = text::TextContentAnchorType_AS_CHARACTER; + break; + //case FLY_AT_PARA: + default: + eRet = text::TextContentAnchorType_AT_PARAGRAPH; } rVal <<= eRet; break; @@ -1591,10 +1592,10 @@ BOOL SwFmtAnchor::PutValue( const uno::Any& rVal, BYTE nMemberId ) switch( SWUnoHelper::GetEnumAsInt32( rVal ) ) { case text::TextContentAnchorType_AS_CHARACTER: - eAnchor = FLY_IN_CNTNT; + eAnchor = FLY_AS_CHAR; break; case text::TextContentAnchorType_AT_PAGE: - eAnchor = FLY_PAGE; + eAnchor = FLY_AT_PAGE; if( GetPageNum() > 0 && pCntntAnchor ) { // If the anchor type is page and a valid page number @@ -1608,11 +1609,11 @@ BOOL SwFmtAnchor::PutValue( const uno::Any& rVal, BYTE nMemberId ) eAnchor = FLY_AT_FLY; break; case text::TextContentAnchorType_AT_CHARACTER: - eAnchor = FLY_AUTO_CNTNT; + eAnchor = FLY_AT_CHAR; break; //case text::TextContentAnchorType_AT_PARAGRAPH: default: - eAnchor = FLY_AT_CNTNT; + eAnchor = FLY_AT_PARA; break; } SetType( eAnchor ); @@ -1624,7 +1625,7 @@ BOOL SwFmtAnchor::PutValue( const uno::Any& rVal, BYTE nMemberId ) if((rVal >>= nVal) && nVal > 0) { SetPageNum( nVal ); - if( FLY_PAGE == GetAnchorId() && pCntntAnchor ) + if ((FLY_AT_PAGE == GetAnchorId()) && pCntntAnchor) { // If the anchor type is page and a valid page number // is set, the content paoition has to be deleted to not @@ -2597,7 +2598,7 @@ sal_Bool SwFrmFmt::IsLowerOf( const SwFrmFmt& rFmt ) const // dann mal ueber die Node-Positionen versuchen const SwFmtAnchor* pAnchor = &rFmt.GetAnchor(); - if( FLY_PAGE != pAnchor->GetAnchorId() && pAnchor->GetCntntAnchor() ) + if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) && pAnchor->GetCntntAnchor()) { const SwSpzFrmFmts& rFmts = *GetDoc()->GetSpzFrmFmts(); const SwNode* pFlyNd = pAnchor->GetCntntAnchor()->nNode.GetNode(). @@ -2616,9 +2617,11 @@ sal_Bool SwFrmFmt::IsLowerOf( const SwFrmFmt& rFmt ) const return sal_True; pAnchor = &pFmt->GetAnchor(); - if( FLY_PAGE == pAnchor->GetAnchorId() || + if ((FLY_AT_PAGE == pAnchor->GetAnchorId()) || !pAnchor->GetCntntAnchor() ) + { return sal_False; + } pFlyNd = pAnchor->GetCntntAnchor()->nNode.GetNode(). FindFlyStartNode(); @@ -2702,11 +2705,13 @@ void SwFlyFrmFmt::MakeFrms() SwFmtAnchor aAnchorAttr( GetAnchor() ); switch( aAnchorAttr.GetAnchorId() ) { - case FLY_IN_CNTNT: - case FLY_AT_CNTNT: - case FLY_AUTO_CNTNT: + case FLY_AS_CHAR: + case FLY_AT_PARA: + case FLY_AT_CHAR: if( aAnchorAttr.GetCntntAnchor() ) + { pModify = aAnchorAttr.GetCntntAnchor()->nNode.GetNode().GetCntntNode(); + } break; case FLY_AT_FLY: @@ -2739,7 +2744,7 @@ void SwFlyFrmFmt::MakeFrms() } break; - case FLY_PAGE: + case FLY_AT_PAGE: { sal_uInt16 nPgNum = aAnchorAttr.GetPageNum(); SwPageFrm *pPage = (SwPageFrm*)GetDoc()->GetRootFrm()->Lower(); @@ -2822,12 +2827,12 @@ void SwFlyFrmFmt::MakeFrms() pFly = new SwFlyLayFrm( this, pFrm ); break; - case FLY_AT_CNTNT: - case FLY_AUTO_CNTNT: + case FLY_AT_PARA: + case FLY_AT_CHAR: pFly = new SwFlyAtCntFrm( this, pFrm ); break; - case FLY_IN_CNTNT: + case FLY_AS_CHAR: pFly = new SwFlyInCntFrm( this, pFrm ); break; default: @@ -3026,8 +3031,8 @@ SwHandleAnchorNodeChg::SwHandleAnchorNodeChg( SwFlyFrmFmt& _rFlyFrmFmt, mbAnchorNodeChanged( false ) { const RndStdIds nNewAnchorType( _rNewAnchorFmt.GetAnchorId() ); - if ( ( nNewAnchorType == FLY_AT_CNTNT || - nNewAnchorType == FLY_AUTO_CNTNT ) && + if ( ((nNewAnchorType == FLY_AT_PARA) || + (nNewAnchorType == FLY_AT_CHAR)) && _rNewAnchorFmt.GetCntntAnchor() && _rNewAnchorFmt.GetCntntAnchor()->nNode.GetNode().GetCntntNode() ) { diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index bb73a85bbc..ac438bf36c 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -46,9 +46,7 @@ #include #include -#ifndef _OUTDEV_HXX //autogen #include -#endif #include #include #include @@ -1014,10 +1012,12 @@ BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) rFmt.GetFrmSize().GetWidthPercent() ) continue; - if ( FLY_IN_CNTNT == rFmt.GetAnchor().GetAnchorId() ) + if ( FLY_AS_CHAR == rFmt.GetAnchor().GetAnchorId() ) + { nMinWidth = Max( nMinWidth, bFly ? rFmt.GetFrmSize().GetWidth() : pObj->GetObjRect().Width() ); + } // <-- } diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 4968601e7a..1073421e01 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -366,7 +366,7 @@ BYTE SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect ) //denn dann weiche ich ihm nicht aus. if ( ::IsFrmInSameKontext( pAnchor, &rThis ) ) { - if ( rFmt.GetAnchor().GetAnchorId() == FLY_AT_CNTNT ) + if ( rFmt.GetAnchor().GetAnchorId() == FLY_AT_PARA ) { // Den Index des anderen erhalten wir immer ueber das Ankerattr. ULONG nTmpIndex = rFmt.GetAnchor().GetCntntAnchor()->nNode.GetIndex(); diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 8899002e4e..cce759e58f 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -33,9 +33,7 @@ #include "hintids.hxx" #include #include -#ifndef _GRAPH_HXX //autogen #include -#endif #include #include #include @@ -1182,7 +1180,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos ) // --> OD 2004-11-12 #i34948# - handle also at-page and at-fly anchored // Writer fly frames const RndStdIds eAnchorType = GetFrmFmt().GetAnchor().GetAnchorId(); - if ( eAnchorType == FLY_PAGE ) + if ( eAnchorType == FLY_AT_PAGE ) { aVert.SetVertOrient( text::VertOrientation::NONE ); aVert.SetRelationOrient( text::RelOrientation::PAGE_FRAME ); @@ -1235,7 +1233,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos ) SwFmtHoriOrient aHori( pFmt->GetHoriOrient() ); // --> OD 2004-11-12 #i34948# - handle also at-page and at-fly anchored // Writer fly frames - if ( eAnchorType == FLY_PAGE ) + if ( eAnchorType == FLY_AT_PAGE ) { aHori.SetHoriOrient( text::HoriOrientation::NONE ); aHori.SetRelationOrient( text::RelOrientation::PAGE_FRAME ); @@ -1645,11 +1643,17 @@ void CalcCntnt( SwLayoutFrm *pLay, { // Bei autopositionierten hilft manchmal nur // noch, auf Durchlauf zu schalten - if( rFmt.GetAnchor().GetAnchorId() == FLY_AUTO_CNTNT && - SURROUND_PARALLEL == aAttr.GetSurround() ) + if ((rFmt.GetAnchor().GetAnchorId() == + FLY_AT_CHAR) && + (SURROUND_PARALLEL == + aAttr.GetSurround())) + { aAttr.SetSurround( SURROUND_THROUGHT ); + } else + { aAttr.SetSurround( SURROUND_PARALLEL ); + } rFmt.LockModify(); rFmt.SetFmtAttr( aAttr ); rFmt.UnlockModify(); @@ -2313,7 +2317,8 @@ void SwFrm::InvalidateObjs( const bool _bInvaPosOnly, { SwAnchoredObject* pAnchoredObj = (*GetDrawObjs())[i]; if ( _bNoInvaOfAsCharAnchoredObjs && - pAnchoredObj->GetFrmFmt().GetAnchor().GetAnchorId() == FLY_IN_CNTNT ) + (pAnchoredObj->GetFrmFmt().GetAnchor().GetAnchorId() + == FLY_AS_CHAR) ) { continue; } diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 1fadf0378f..ece6233db2 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -90,7 +90,7 @@ SwFlyAtCntFrm::SwFlyAtCntFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) : SwFlyFreeFrm( pFmt, pAnch ) { bAtCnt = TRUE; - bAutoPosition = FLY_AUTO_CNTNT == pFmt->GetAnchor().GetAnchorId(); + bAutoPosition = (FLY_AT_CHAR == pFmt->GetAnchor().GetAnchorId()); } // --> OD 2004-06-29 #i28701# diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index 85d8ac89c1..b36cd2c176 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -600,7 +600,7 @@ void SwFlyLayFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ) SwPageFrm *pOldPage = GetPageFrm(); AnchorFrm()->RemoveFly( this ); - if( FLY_PAGE == pAnch->GetAnchorId() ) + if ( FLY_AT_PAGE == pAnch->GetAnchorId() ) { USHORT nPgNum = pAnch->GetPageNum(); SwRootFrm *pRoot = FindRootFrm(); @@ -955,7 +955,7 @@ void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj ) _rNewObj.DrawObj()->SetOrdNum( nNewNum ); } - if ( FLY_IN_CNTNT == _rNewObj.GetFrmFmt().GetAnchor().GetAnchorId() ) + if ( FLY_AS_CHAR == _rNewObj.GetFrmFmt().GetAnchor().GetAnchorId() ) { return; } @@ -999,7 +999,8 @@ void SwPageFrm::RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj ) } if ( GetUpper() ) { - if ( FLY_IN_CNTNT != _rToRemoveObj.GetFrmFmt().GetAnchor().GetAnchorId() ) + if (FLY_AS_CHAR != + _rToRemoveObj.GetFrmFmt().GetAnchor().GetAnchorId()) { ((SwRootFrm*)GetUpper())->SetSuperfluous(); InvalidatePage(); @@ -1333,7 +1334,7 @@ BOOL CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, BOOL bMove ) const SwDrawContact *pC = (const SwDrawContact*)GetUserCall(pSdrObj); const SwFrmFmt *pFmt = (const SwFrmFmt*)pC->GetFmt(); const SwFmtAnchor &rAnch = pFmt->GetAnchor(); - if ( FLY_IN_CNTNT == rAnch.GetAnchorId() ) + if ( FLY_AS_CHAR == rAnch.GetAnchorId() ) { const SwFrm* pAnchorFrm = pC->GetAnchorFrm( pSdrObj ); if( !pAnchorFrm ) diff --git a/sw/source/core/layout/flypos.cxx b/sw/source/core/layout/flypos.cxx index 3800fcf03f..27571f6527 100644 --- a/sw/source/core/layout/flypos.cxx +++ b/sw/source/core/layout/flypos.cxx @@ -57,8 +57,10 @@ SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrmFmt* pFmt, { BOOL bFnd = FALSE; const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); - if( FLY_PAGE == rAnchor.GetAnchorId() ) + if (FLY_AT_PAGE == rAnchor.GetAnchorId()) + { pNdIdx = new SwNodeIndex( rIdx ); + } else if( pFmt->GetDoc()->GetRootFrm() ) { SwClientIter aIter( (SwFmt&)*pFmt ); @@ -88,8 +90,10 @@ SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrmFmt* pFmt, SwPosFlyFrm::~SwPosFlyFrm() { const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); - if( FLY_PAGE == rAnchor.GetAnchorId() ) + if (FLY_AT_PAGE == rAnchor.GetAnchorId()) + { delete pNdIdx; + } } BOOL SwPosFlyFrm::operator==( const SwPosFlyFrm& ) diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 756269cd03..6c89d2b20c 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1033,9 +1033,11 @@ SwCntntNotify::~SwCntntNotify() SwFrmFmt *pFmt = (*pTbl)[i]; const SwFmtAnchor &rAnch = pFmt->GetAnchor(); - if ( FLY_PAGE != rAnch.GetAnchorId() && - FLY_AT_CNTNT != rAnch.GetAnchorId() ) + if ((FLY_AT_PAGE != rAnch.GetAnchorId()) && + (FLY_AT_PARA != rAnch.GetAnchorId())) + { continue; //#60878# nicht etwa zeichengebundene. + } BOOL bCheckPos = FALSE; if ( rAnch.GetCntntAnchor() ) @@ -1047,7 +1049,7 @@ SwCntntNotify::~SwCntntNotify() if ( rAnch.GetCntntAnchor()->nNode == *pIdx ) { bCheckPos = TRUE; - if ( FLY_PAGE == rAnch.GetAnchorId() ) + if (FLY_AT_PAGE == rAnch.GetAnchorId()) { ASSERT( false, " - to page anchored object with content position. Please inform OD." ); SwFmtAnchor aAnch( rAnch ); @@ -1097,7 +1099,7 @@ SwCntntNotify::~SwCntntNotify() { SwAnchoredObject* pAnchoredObj = (*pObjs)[i]; if ( pAnchoredObj->GetFrmFmt().GetAnchor().GetAnchorId() - == FLY_AUTO_CNTNT ) + == FLY_AT_CHAR ) { pAnchoredObj->CheckCharRectAndTopOfLine( !pMasterFrm->IsEmpty() ); } @@ -1135,11 +1137,11 @@ void AppendObjs( const SwSpzFrmFmts *pTbl, ULONG nIndex, // OD 23.06.2003 #108784# - append also drawing objects anchored // as character. const bool bDrawObjInCntnt = bSdrObj && - rAnch.GetAnchorId() == FLY_IN_CNTNT; + (rAnch.GetAnchorId() == FLY_AS_CHAR); if( bFlyAtFly || - rAnch.GetAnchorId() == FLY_AT_CNTNT || - rAnch.GetAnchorId() == FLY_AUTO_CNTNT || + (rAnch.GetAnchorId() == FLY_AT_PARA) || + (rAnch.GetAnchorId() == FLY_AT_CHAR) || bDrawObjInCntnt ) { SdrObject* pSdrObj = 0; @@ -1227,7 +1229,7 @@ bool lcl_InHeaderOrFooter( SwFrmFmt& _rFmt ) const SwFmtAnchor& rAnch = _rFmt.GetAnchor(); - if ( rAnch.GetAnchorId() != FLY_PAGE ) + if (rAnch.GetAnchorId() != FLY_AT_PAGE) { bRetVal = _rFmt.GetDoc()->IsInHeaderFooter( rAnch.GetCntntAnchor()->nNode ); } @@ -1256,10 +1258,13 @@ void AppendAllObjs( const SwSpzFrmFmts *pTbl ) SwFrmFmt *pFmt = (SwFrmFmt*)aCpy[ USHORT(i) ]; const SwFmtAnchor &rAnch = pFmt->GetAnchor(); BOOL bRemove = FALSE; - if ( rAnch.GetAnchorId() == FLY_PAGE || rAnch.GetAnchorId() == FLY_IN_CNTNT ) + if ((rAnch.GetAnchorId() == FLY_AT_PAGE) || + (rAnch.GetAnchorId() == FLY_AS_CHAR)) + { //Seitengebunde sind bereits verankert, zeichengebundene //will ich hier nicht. bRemove = TRUE; + } else if ( FALSE == (bRemove = ::lcl_ObjConnected( pFmt )) || ::lcl_InHeaderOrFooter( *pFmt ) ) { @@ -2578,7 +2583,7 @@ void MA_FASTCALL lcl_RemoveObjsFromPage( SwFrm* _pFrm ) // --> OD 2004-11-29 #115759# - remove also drawing objects from page else if ( pObj->ISA(SwAnchoredDrawObject) ) { - if ( pObj->GetFrmFmt().GetAnchor().GetAnchorId() != FLY_IN_CNTNT ) + if (pObj->GetFrmFmt().GetAnchor().GetAnchorId() != FLY_AS_CHAR) { pObj->GetPageFrm()->RemoveDrawObjFromPage( *(static_cast(pObj)) ); @@ -2746,7 +2751,7 @@ void MA_FASTCALL lcl_AddObjsToPage( SwFrm* _pFrm, SwPageFrm* _pPage ) // --> OD 2004-11-29 #115759# - remove also drawing objects from page else if ( pObj->ISA(SwAnchoredDrawObject) ) { - if ( pObj->GetFrmFmt().GetAnchor().GetAnchorId() != FLY_IN_CNTNT ) + if (pObj->GetFrmFmt().GetAnchor().GetAnchorId() != FLY_AS_CHAR) { pObj->InvalidateObjPos(); _pPage->AppendDrawObjToPage( diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index aff3c4e07e..c4038bc414 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -63,17 +63,16 @@ #include // --> OD 2006-03-22 #b6375613# #include -#ifndef _DOCSH_HXX #include -#endif #include #include +#include + + using namespace ::com::sun::star; // <-- -#include - SV_IMPL_PTRARR( SwPageFlyCache, SwFlyCachePtr ) /*-----------------28.5.2001 10:06------------------ @@ -696,8 +695,8 @@ bool lcl_HasTextFrmAnchoredObjs( SwTxtFrm* p_pTxtFrm ) SwFrmFmt *pFmt = (SwFrmFmt*)(*pSpzFrmFmts)[i]; const SwFmtAnchor &rAnch = pFmt->GetAnchor(); if ( rAnch.GetCntntAnchor() && - ( rAnch.GetAnchorId() == FLY_AT_CNTNT || - rAnch.GetAnchorId() == FLY_AUTO_CNTNT ) && + ((rAnch.GetAnchorId() == FLY_AT_PARA) || + (rAnch.GetAnchorId() == FLY_AT_CHAR)) && rAnch.GetCntntAnchor()->nNode.GetIndex() == p_pTxtFrm->GetTxtNode()->GetIndex() ) { diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx index ded11f9796..a89e2cd07e 100644 --- a/sw/source/core/layout/objectformatter.cxx +++ b/sw/source/core/layout/objectformatter.cxx @@ -338,7 +338,7 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj ) // check, if only as-character anchored object have to be formatted, and // check the anchor type if ( FormatOnlyAsCharAnchored() && - !_rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_IN_CNTNT ) + !(_rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AS_CHAR) ) { return; } diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx index 2967d8a97a..c1956e4b22 100644 --- a/sw/source/core/layout/objectformattertxtfrm.cxx +++ b/sw/source/core/layout/objectformattertxtfrm.cxx @@ -136,7 +136,7 @@ bool SwObjectFormatterTxtFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, // check, if only as-character anchored object have to be formatted, and // check the anchor type if ( FormatOnlyAsCharAnchored() && - !_rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_IN_CNTNT ) + !(_rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AS_CHAR) ) { return true; } @@ -656,8 +656,8 @@ bool SwObjectFormatterTxtFrm::CheckMovedFwdCondition( // which will be on the next page. if ( !bAnchorIsMovedForward && _bAnchoredAtMasterBeforeFormatAnchor && - ( _rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AUTO_CNTNT || - _rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AT_CNTNT ) ) + ((_rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AT_CHAR) || + (_rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AT_PARA))) { SwFrm* pAnchorFrm = _rAnchoredObj.GetAnchorFrmContainingAnchPos(); ASSERT( pAnchorFrm->IsTxtFrm(), diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index cf45cba307..c36cb678a5 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -46,9 +46,7 @@ #include #include #include -#ifndef _DOCSH_HXX #include -#endif #include "viewimp.hxx" #include "pagefrm.hxx" @@ -408,7 +406,7 @@ void MA_FASTCALL lcl_MakeObjs( const SwSpzFrmFmts &rTbl, SwPageFrm *pPage ) { if( rAnch.GetCntntAnchor() ) { - if( FLY_PAGE == rAnch.GetAnchorId() ) + if (FLY_AT_PAGE == rAnch.GetAnchorId()) { SwFmtAnchor aAnch( rAnch ); aAnch.SetAnchor( 0 ); @@ -1659,7 +1657,7 @@ void SwRootFrm::AssertPageFlys( SwPageFrm *pPage ) SwFrmFmt& rFmt = (*pPage->GetSortedObjs())[i]->GetFrmFmt(); const SwFmtAnchor &rAnch = rFmt.GetAnchor(); const USHORT nPg = rAnch.GetPageNum(); - if ( rAnch.GetAnchorId() == FLY_PAGE && + if ((rAnch.GetAnchorId() == FLY_AT_PAGE) && nPg != pPage->GetPhyPageNum() ) { //Das er auf der falschen Seite steht muss noch nichts @@ -1834,11 +1832,11 @@ void SwRootFrm::ImplCalcBrowseWidth() long nWidth = 0; switch ( rFmt.GetAnchor().GetAnchorId() ) { - case FLY_IN_CNTNT: + case FLY_AS_CHAR: nWidth = bFly ? rFmt.GetFrmSize().GetWidth() : pAnchoredObj->GetObjRect().Width(); break; - case FLY_AT_CNTNT: + case FLY_AT_PARA: { // --> FME 2004-09-13 #i33170# // Reactivated old code because @@ -2007,7 +2005,7 @@ void lcl_MoveAllLowerObjs( SwFrm* pFrm, const Point& rOffset ) // all except from the as character anchored objects are moved // when processing the page frame: - const bool bAsChar = rAnchor.GetAnchorId() == FLY_IN_CNTNT; + const bool bAsChar = (rAnchor.GetAnchorId() == FLY_AS_CHAR); if ( !bPage && !bAsChar ) continue; diff --git a/sw/source/core/layout/sortedobjsimpl.cxx b/sw/source/core/layout/sortedobjsimpl.cxx index bd4e128dc4..024e35a355 100644 --- a/sw/source/core/layout/sortedobjsimpl.cxx +++ b/sw/source/core/layout/sortedobjsimpl.cxx @@ -41,17 +41,14 @@ #include #include #include -#ifndef IDOCUMENTDRAWMODELACCESS_HXX_INCLUDED #include -#endif + using namespace ::com::sun::star; typedef std::vector< SwAnchoredObject* >::iterator tIter; typedef std::vector< SwAnchoredObject* >::const_iterator tConstIter; -using namespace ::com::sun::star; - SwSortedObjsImpl::SwSortedObjsImpl() { @@ -96,36 +93,36 @@ struct ObjAnchorOrder const SwFmtAnchor* pAnchorNew = &(rFmtNew.GetAnchor()); // check for to-page anchored objects - if ( pAnchorListed->GetAnchorId() == FLY_PAGE && - pAnchorNew->GetAnchorId() != FLY_PAGE ) + if ((pAnchorListed->GetAnchorId() == FLY_AT_PAGE) && + (pAnchorNew ->GetAnchorId() != FLY_AT_PAGE)) { return true; } - else if ( pAnchorListed->GetAnchorId() != FLY_PAGE && - pAnchorNew->GetAnchorId() == FLY_PAGE ) + else if ((pAnchorListed->GetAnchorId() != FLY_AT_PAGE) && + (pAnchorNew ->GetAnchorId() == FLY_AT_PAGE)) { return false; } - else if ( pAnchorListed->GetAnchorId() == FLY_PAGE && - pAnchorNew->GetAnchorId() == FLY_PAGE ) + else if ((pAnchorListed->GetAnchorId() == FLY_AT_PAGE) && + (pAnchorNew ->GetAnchorId() == FLY_AT_PAGE)) { return pAnchorListed->GetOrder() < pAnchorNew->GetOrder(); } // Both objects aren't anchored to page. // Thus, check for to-fly anchored objects - if ( pAnchorListed->GetAnchorId() == FLY_AT_FLY && - pAnchorNew->GetAnchorId() != FLY_AT_FLY ) + if ((pAnchorListed->GetAnchorId() == FLY_AT_FLY) && + (pAnchorNew ->GetAnchorId() != FLY_AT_FLY)) { return true; } - else if ( pAnchorListed->GetAnchorId() != FLY_AT_FLY && - pAnchorNew->GetAnchorId() == FLY_AT_FLY ) + else if ((pAnchorListed->GetAnchorId() != FLY_AT_FLY) && + (pAnchorNew ->GetAnchorId() == FLY_AT_FLY)) { return false; } - else if ( pAnchorListed->GetAnchorId() == FLY_AT_FLY && - pAnchorNew->GetAnchorId() == FLY_AT_FLY ) + else if ((pAnchorListed->GetAnchorId() == FLY_AT_FLY) && + (pAnchorNew ->GetAnchorId() == FLY_AT_FLY)) { return pAnchorListed->GetOrder() < pAnchorNew->GetOrder(); } @@ -144,21 +141,21 @@ struct ObjAnchorOrder // --> OD 2006-11-29 #???# - objects have to be ordered by anchor node position // Thus, compare content anchor node positions and anchor type, // if not anchored at-paragraph - if ( pAnchorListed->GetAnchorId() != FLY_AT_CNTNT && - pAnchorNew->GetAnchorId() != FLY_AT_CNTNT && + if ((pAnchorListed->GetAnchorId() != FLY_AT_PARA) && + (pAnchorNew ->GetAnchorId() != FLY_AT_PARA) && pCntntAnchorListed && pCntntAnchorNew ) { if ( pCntntAnchorListed->nContent != pCntntAnchorNew->nContent ) { return pCntntAnchorListed->nContent < pCntntAnchorNew->nContent; } - else if ( pAnchorListed->GetAnchorId() == FLY_AUTO_CNTNT && - pAnchorNew->GetAnchorId() == FLY_IN_CNTNT ) + else if ((pAnchorListed->GetAnchorId() == FLY_AT_CHAR) && + (pAnchorNew ->GetAnchorId() == FLY_AS_CHAR)) { return true; } - else if ( pAnchorListed->GetAnchorId() == FLY_IN_CNTNT && - pAnchorNew->GetAnchorId() == FLY_AUTO_CNTNT ) + else if ((pAnchorListed->GetAnchorId() == FLY_AS_CHAR) && + (pAnchorNew ->GetAnchorId() == FLY_AT_CHAR)) { return false; } diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 0ba077e799..a7459e4818 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -57,9 +57,7 @@ // --> collapsing borders FME 2005-05-27 #i29550# #include // <-- -#ifndef _OUTDEV_HXX //autogen #include -#endif #include #include #include @@ -340,7 +338,7 @@ void lcl_InvalidateLowerObjs( SwLayoutFrm& _rLayoutFrm, pAnchoredObj->ClearCharRectAndTopOfLine(); pAnchoredObj->SetCurrRelPos( Point( 0, 0 ) ); if ( pAnchoredObj->GetFrmFmt().GetAnchor().GetAnchorId() - == FLY_IN_CNTNT ) + == FLY_AS_CHAR ) { pAnchoredObj->AnchorFrm() ->Prepare( PREP_FLY_ATTR_CHG, @@ -4194,7 +4192,7 @@ long MA_FASTCALL CalcHeightWidthFlys( const SwFrm *pFrm ) // the text flow have to be considered. const SwFrmFmt& rFrmFmt = pAnchoredObj->GetFrmFmt(); const bool bConsiderObj = - rFrmFmt.GetAnchor().GetAnchorId() != FLY_IN_CNTNT && + (rFrmFmt.GetAnchor().GetAnchorId() != FLY_AS_CHAR) && pAnchoredObj->GetObjRect().Top() != WEIT_WECH && rFrmFmt.GetFollowTextFlow().GetValue() && pAnchoredObj->GetPageFrm() == pTmp->FindPageFrm(); @@ -5222,7 +5220,7 @@ BOOL lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, BOOL bInva ) !( pTabFrm->IsFollow() && pTabFrm->FindMaster()->IsRebuildLastLine() ) && !pAnchoredObj->GetFrmFmt().GetAnchor().GetAnchorId() - == FLY_IN_CNTNT ) + == FLY_AS_CHAR ) { SwPageFrm* pPageFrm = pAnchoredObj->GetPageFrm(); SwPageFrm* pPageOfAnchor = pFrm->FindPageFrm(); diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index d00d3e3459..07eb1d2410 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -35,9 +35,7 @@ #include #include #include -#ifndef _OUTDEV_HXX #include -#endif #include #include #include @@ -52,9 +50,7 @@ #include #include #include -#ifndef _DOCSH_HXX #include -#endif #include #include #include @@ -81,8 +77,10 @@ // OD 2004-05-24 #i28701# #include + using namespace ::com::sun::star; + /************************************************************************* |* |* SwFrm::SwFrm() @@ -3999,8 +3997,8 @@ void SwRootFrm::InvalidateAllObjPos() { SwAnchoredObject* pAnchoredObj = rObjs[i]; const SwFmtAnchor& rAnch = pAnchoredObj->GetFrmFmt().GetAnchor(); - if ( rAnch.GetAnchorId() != FLY_AT_CNTNT && - rAnch.GetAnchorId() != FLY_AUTO_CNTNT ) + if ((rAnch.GetAnchorId() != FLY_AT_PARA) && + (rAnch.GetAnchorId() != FLY_AT_CHAR)) { // only to paragraph and to character anchored objects are considered. continue; diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index b052e2e652..f1e317dac4 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -47,13 +47,9 @@ #include #include #include -#ifndef _SVX_SVDOBJ_HXX #include -#endif #include -#ifndef _ENVIRONMENTOFANCHOREDOBJECT #include -#endif #include #include #include @@ -209,7 +205,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() { // if object is at-character anchored, determine character-rectangle // and frame, position has to be oriented at. - mbAnchorToChar = FLY_AUTO_CNTNT == rFrmFmt.GetAnchor().GetAnchorId(); + mbAnchorToChar = (FLY_AT_CHAR == rFrmFmt.GetAnchor().GetAnchorId()); if ( mbAnchorToChar ) { const SwFmtAnchor& rAnch = rFrmFmt.GetAnchor(); diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index d6241c775f..77fd669521 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -31,15 +31,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" #include -#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_ #include -#endif #include #include -#ifndef _OUTDEV_HXX #include -#endif #include #include #include @@ -370,9 +366,9 @@ bool SwTaggedPDFHelper::CheckReopenTag() { const SwFmtAnchor& rAnchor = static_cast(&rFrm)->GetFmt()->GetAnchor(); - if ( FLY_AT_CNTNT == rAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == rAnchor.GetAnchorId() || - FLY_PAGE == rAnchor.GetAnchorId() ) + if ((FLY_AT_PARA == rAnchor.GetAnchorId()) || + (FLY_AT_CHAR == rAnchor.GetAnchorId()) || + (FLY_AT_PAGE == rAnchor.GetAnchorId())) { pKeyFrm = static_cast(rFrm).GetAnchorFrm(); bContinue = true; @@ -1814,7 +1810,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // --> FME 2005-05-09 #i44368# Links in Header/Footer const SwFmtAnchor &rAnch = pFrmFmt->GetAnchor(); - if ( FLY_PAGE != rAnch.GetAnchorId() ) + if (FLY_AT_PAGE != rAnch.GetAnchorId()) { const SwPosition* pPosition = rAnch.GetCntntAnchor(); if ( pPosition && pDoc->IsInHeaderFooter( pPosition->nNode ) ) diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index 09be2bd798..b02f0310e4 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -461,10 +461,8 @@ sal_Bool lcl_MinMaxNode( const SwFrmFmtPtr& rpNd, void* pArgs ) const SwFmtAnchor& rFmtA = ((SwFrmFmt*)rpNd)->GetAnchor(); bool bCalculate = false; - if ( - (FLY_AT_CNTNT == rFmtA.GetAnchorId()) || - (FLY_AUTO_CNTNT == rFmtA.GetAnchorId()) - ) + if ((FLY_AT_PARA == rFmtA.GetAnchorId()) || + (FLY_AT_CHAR == rFmtA.GetAnchorId())) { bCalculate = true; } diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx index f690c3064b..c8fba54dbc 100644 --- a/sw/source/core/text/porfly.cxx +++ b/sw/source/core/text/porfly.cxx @@ -39,9 +39,7 @@ #include "frmfmt.hxx" // SwFrmFmt #include "viewsh.hxx" -#ifndef _OUTDEV_HXX //autogen #include -#endif #include #include #include @@ -57,6 +55,7 @@ // OD 2004-05-24 #i28701# #include + /************************************************************************* * class SwFlyPortion * @@ -178,7 +177,7 @@ void SwTxtFrm::MoveFlyInCnt( SwTxtFrm *pNew, xub_StrLen nStart, xub_StrLen nEnd // entries SwAnchoredObject* pAnchoredObj = (*pObjs)[i]; const SwFmtAnchor& rAnch = pAnchoredObj->GetFrmFmt().GetAnchor(); - if ( rAnch.GetAnchorId() == FLY_IN_CNTNT ) + if (rAnch.GetAnchorId() == FLY_AS_CHAR) { const SwPosition* pPos = rAnch.GetCntntAnchor(); xub_StrLen nIdx = pPos->nContent.GetIndex(); diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index f263deb90c..bea44790dc 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -31,12 +31,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#ifndef _OUTDEV_HXX //autogen #include -#endif -#ifndef _VIRDEV_HXX //autogen #include -#endif #include "viewsh.hxx" #include "pagefrm.hxx" @@ -61,14 +57,9 @@ #include "flyfrms.hxx" #include "fmtcnct.hxx" // SwFmtChain #include // SwMultiPortion -#ifdef VERT_DISTANCE -#include -#endif #include -#ifndef _TXTRANGE_HXX //autogen #include -#endif #include #include // --> OD 2004-06-16 #i28701# @@ -83,30 +74,26 @@ #include #include #include -#ifndef IDOCUMENTDRAWMODELACCESS_HXX_INCLUDED #include -#endif #include #include #include -#ifndef _TXTRANGE_HXX //autogen #include -#endif #include #include #include #include - +#include "doc.hxx" #ifndef PRODUCT #include "viewopt.hxx" // SwViewOptions, nur zum Testen (Test2) #endif -#include "doc.hxx" #ifdef VERT_DISTANCE #include #endif + using namespace ::com::sun::star; /***************************************************************************** @@ -1006,8 +993,8 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf ) // --> OD 2006-08-15 #i68520# GetMaster() == pFly->GetAnchorFrm() || // <-- - ( FLY_AT_CNTNT != rAnchor.GetAnchorId() && - FLY_AUTO_CNTNT != rAnchor.GetAnchorId() + ((FLY_AT_PARA != rAnchor.GetAnchorId()) && + (FLY_AT_CHAR != rAnchor.GetAnchorId()) ) ) && // --> OD 2006-08-15 #i68520# @@ -1176,7 +1163,7 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj, const SwFrmFmt& rFrmFmt = _pAnchoredObj->GetFrmFmt(); const SwFmtAnchor& rNewA = rFrmFmt.GetAnchor(); // <-- - if ( FLY_PAGE == rNewA.GetAnchorId() ) + if (FLY_AT_PAGE == rNewA.GetAnchorId()) { if ( bInFtn ) return sal_False; @@ -1225,23 +1212,25 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj, // If is anchored as character, its content // does not wrap around pNew - if( FLY_IN_CNTNT == rCurrA.GetAnchorId() ) + if (FLY_AS_CHAR == rCurrA.GetAnchorId()) return sal_False; // If pNew is anchored to page and does not wrap around pNew // If both pNew and are anchored to page, we can do // some more checks - if( FLY_PAGE == rNewA.GetAnchorId() ) + if (FLY_AT_PAGE == rNewA.GetAnchorId()) { - if( FLY_PAGE == rCurrA.GetAnchorId() ) + if (FLY_AT_PAGE == rCurrA.GetAnchorId()) + { bEvade = sal_True; + } else return sal_False; } - else if( FLY_PAGE == rCurrA.GetAnchorId() ) + else if (FLY_AT_PAGE == rCurrA.GetAnchorId()) return sal_False; // Seitengebundene weichen nur seitengeb. aus - else if( FLY_AT_FLY == rNewA.GetAnchorId() ) + else if (FLY_AT_FLY == rNewA.GetAnchorId()) bEvade = sal_True; // Nicht seitengeb. weichen Rahmengeb. aus else if( FLY_AT_FLY == rCurrA.GetAnchorId() ) return sal_False; // Rahmengebundene weichen abs.geb. nicht aus @@ -1285,8 +1274,9 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj, // --> OD 2004-10-06 #i26945# const SwFmtAnchor& rNewA = _pAnchoredObj->GetFrmFmt().GetAnchor(); // <-- - ASSERT( FLY_IN_CNTNT != rNewA.GetAnchorId(), "Don't call GetTop with a FlyInCntFrm" ); - if( FLY_PAGE == rNewA.GetAnchorId() ) + ASSERT( FLY_AS_CHAR != rNewA.GetAnchorId(), + "Don't call GetTop with a FlyInCntFrm" ); + if (FLY_AT_PAGE == rNewA.GetAnchorId()) return sal_True; // Seitengebundenen wird immer ausgewichen. // Wenn absatzgebundene Flys in einem FlyCnt gefangen sind, so @@ -2015,8 +2005,8 @@ sal_Bool SwTxtFly::ForEach( const SwRect &rRect, SwRect* pRect, sal_Bool bAvoid // --> OD 2006-08-15 #i68520# GetMaster() == pAnchoredObj->GetAnchorFrm() || // <-- - ( FLY_AT_CNTNT != rAnchor.GetAnchorId() && - FLY_AUTO_CNTNT != rAnchor.GetAnchorId() ) ) ) + ((FLY_AT_PARA != rAnchor.GetAnchorId()) && + (FLY_AT_CHAR != rAnchor.GetAnchorId())) ) ) || aRect.Top() == WEIT_WECH ) continue; } @@ -2442,9 +2432,11 @@ SwSurround SwTxtFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredO if( rFlyFmt.IsAnchorOnly() && pAnchoredObj->GetAnchorFrm() != GetMaster() ) { const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); - if ( FLY_AT_CNTNT == rAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) + if ((FLY_AT_PARA == rAnchor.GetAnchorId()) || + (FLY_AT_CHAR == rAnchor.GetAnchorId())) + { return SURROUND_NONE; + } } // Beim Durchlauf und Nowrap wird smart ignoriert. diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 8da2cbf4fb..aadb27e4b6 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -65,9 +65,7 @@ #include #include #include -#ifndef _FMTLINE_HXX #include -#endif #include // SwTxtFrm #include // SwSectFrm #include // DBG_LOOP @@ -76,9 +74,7 @@ #include #include // GetLineSpace benutzt pLastFont #include -#ifndef _LINEINFO_HXX #include -#endif #include // OD 2004-01-15 #110582# #include @@ -101,6 +97,7 @@ extern const sal_Char *GetPrepName( const enum PrepareHint ePrep ); #endif + TYPEINIT1( SwTxtFrm, SwCntntFrm ); // Switches width and height of the text frame @@ -487,7 +484,7 @@ bool lcl_HideObj( const SwTxtFrm& _rFrm, { bool bRet( true ); - if ( _eAnchorType == FLY_AUTO_CNTNT ) + if (_eAnchorType == FLY_AT_CHAR) { const IDocumentSettingAccess* pIDSA = _rFrm.GetTxtNode()->getIDocumentSettingAccess(); if ( !pIDSA->get(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING) && @@ -560,8 +557,9 @@ void SwTxtFrm::HideAndShowObjects() // under certain conditions const RndStdIds eAnchorType( pContact->GetAnchorId() ); const xub_StrLen nObjAnchorPos = pContact->GetCntntAnchorIndex().GetIndex(); - if ( eAnchorType != FLY_AUTO_CNTNT || - lcl_HideObj( *this, eAnchorType, nObjAnchorPos, (*GetDrawObjs())[i] ) ) + if ((eAnchorType != FLY_AT_CHAR) || + lcl_HideObj( *this, eAnchorType, nObjAnchorPos, + (*GetDrawObjs())[i] )) { pContact->MoveObjToInvisibleLayer( pObj ); } @@ -588,12 +586,12 @@ void SwTxtFrm::HideAndShowObjects() const RndStdIds eAnchorType( pContact->GetAnchorId() ); // <-- - if ( eAnchorType == FLY_AT_CNTNT ) + if (eAnchorType == FLY_AT_PARA) { pContact->MoveObjToVisibleLayer( pObj ); } - else if ( eAnchorType == FLY_AUTO_CNTNT || - eAnchorType == FLY_IN_CNTNT ) + else if ((eAnchorType == FLY_AT_CHAR) || + (eAnchorType == FLY_AS_CHAR)) { xub_StrLen nHiddenStart; xub_StrLen nHiddenEnd; @@ -1704,7 +1702,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid, // --> OD 2004-07-16 #i28701# - consider all // to-character anchored objects if ( pAnchoredObj->GetFrmFmt().GetAnchor().GetAnchorId() - == FLY_AUTO_CNTNT ) + == FLY_AT_CHAR ) { bFormat = sal_True; break; diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx index 92cbc614d6..e4c5d0f10a 100644 --- a/sw/source/core/txtnode/atrflyin.cxx +++ b/sw/source/core/txtnode/atrflyin.cxx @@ -124,8 +124,8 @@ void SwTxtFlyCnt::CopyFlyFmt( SwDoc* pDoc ) BOOL bUndo = pDoc->DoesUndo(); pDoc->DoUndo( FALSE ); SwFmtAnchor aAnchor( pFmt->GetAnchor() ); - if( FLY_PAGE != aAnchor.GetAnchorId() && - pDoc != pFmt->GetDoc() ) // Unterschiedliche Docs? + if ((FLY_AT_PAGE != aAnchor.GetAnchorId()) && + (pDoc != pFmt->GetDoc())) // different documents? { // JP 03.06.96: dann sorge dafuer, das der koperierte Anker auf // gueltigen Content zeigt! Die Umsetzung auf die @@ -137,8 +137,10 @@ void SwTxtFlyCnt::CopyFlyFmt( SwDoc* pDoc ) SwPosition* pPos = (SwPosition*)aAnchor.GetCntntAnchor(); pPos->nNode = aIdx; - if( FLY_IN_CNTNT == aAnchor.GetAnchorId() ) + if (FLY_AS_CHAR == aAnchor.GetAnchorId()) + { pPos->nContent.Assign( pCNd, 0 ); + } else { pPos->nContent.Assign( 0, 0 ); @@ -181,7 +183,7 @@ void SwTxtFlyCnt::SetAnchor( const SwTxtNode *pNode ) else aPos.nNode = aAnchor.GetCntntAnchor()->nNode; - aAnchor.SetType( FLY_IN_CNTNT ); // defaulten !! + aAnchor.SetType( FLY_AS_CHAR ); // default! aAnchor.SetAnchor( &aPos ); // beim Ankerwechsel werden immer alle FlyFrms vom Attribut geloescht diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index ee2ac11a99..d0e13ea32c 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1270,11 +1270,15 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) InsertText( c, aIdx, nInsertFlags ); nInsMode |= nsSetAttrMode::SETATTR_NOTXTATRCHR; - if( pAnchor && FLY_IN_CNTNT == pAnchor->GetAnchorId() && + if (pAnchor && + (FLY_AS_CHAR == pAnchor->GetAnchorId()) && pAnchor->GetCntntAnchor() && pAnchor->GetCntntAnchor()->nNode == *this && pAnchor->GetCntntAnchor()->nContent == aIdx ) - ((SwIndex&)pAnchor->GetCntntAnchor()->nContent)--; + { + const_cast( + pAnchor->GetCntntAnchor()->nContent)--; + } } pFly->SetAnchor( this ); diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index 72da13fe5a..1ab0e90993 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -922,7 +922,7 @@ SwHistoryChangeFlyAnchor::SwHistoryChangeFlyAnchor( SwFrmFmt& rFmt ) : SwHistoryHint( HSTRY_CHGFLYANCHOR ) , m_rFmt( rFmt ) , m_nOldNodeIndex( rFmt.GetAnchor().GetCntntAnchor()->nNode.GetIndex() ) - , m_nOldContentIndex( ( FLY_AUTO_CNTNT == rFmt.GetAnchor().GetAnchorId() ) + , m_nOldContentIndex( (FLY_AT_CHAR == rFmt.GetAnchor().GetAnchorId()) ? rFmt.GetAnchor().GetCntntAnchor()->nContent.GetIndex() : STRING_MAXLEN ) { diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index 512c7c1afe..6c5ca25ee4 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -462,10 +462,10 @@ void SwUndoFmtAttr::SaveFlyAnchor( bool bSvDrwPt ) xub_StrLen nCntnt = 0; switch( rAnchor.GetAnchorId() ) { - case FLY_IN_CNTNT: - case FLY_AUTO_CNTNT: + case FLY_AS_CHAR: + case FLY_AT_CHAR: nCntnt = rAnchor.GetCntntAnchor()->nContent.GetIndex(); - case FLY_AT_CNTNT: + case FLY_AT_PARA: case FLY_AT_FLY: m_nNodeIndex = rAnchor.GetCntntAnchor()->nNode.GetIndex(); break; @@ -489,7 +489,7 @@ bool SwUndoFmtAttr::RestoreFlyAnchor( SwUndoIter& rIter ) static_cast( m_pOldSet->Get( RES_ANCHOR, FALSE ) ); SwFmtAnchor aNewAnchor( rAnchor.GetAnchorId() ); - if( FLY_PAGE != rAnchor.GetAnchorId() ) + if (FLY_AT_PAGE != rAnchor.GetAnchorId()) { SwNode* pNd = pDoc->GetNodes()[ m_nNodeIndex ]; @@ -505,8 +505,8 @@ bool SwUndoFmtAttr::RestoreFlyAnchor( SwUndoIter& rIter ) } SwPosition aPos( *pNd ); - if( FLY_IN_CNTNT == rAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) + if ((FLY_AS_CHAR == rAnchor.GetAnchorId()) || + (FLY_AT_CHAR == rAnchor.GetAnchorId())) { aPos.nContent.Assign( (SwTxtNode*)pNd, rAnchor.GetPageNum() ); if ( aPos.nContent.GetIndex() > @@ -549,7 +549,7 @@ bool SwUndoFmtAttr::RestoreFlyAnchor( SwUndoIter& rIter ) const SwFmtAnchor &rOldAnch = pFrmFmt->GetAnchor(); // --> OD 2006-03-13 #i54336# // Consider case, that as-character anchored object has moved its anchor position. - if ( FLY_IN_CNTNT == rOldAnch.GetAnchorId() ) + if (FLY_AS_CHAR == rOldAnch.GetAnchorId()) // <-- { //Bei InCntnt's wird es spannend: Das TxtAttribut muss vernichtet @@ -613,7 +613,7 @@ bool SwUndoFmtAttr::RestoreFlyAnchor( SwUndoIter& rIter ) SwFmtFrmSize( ATT_VAR_SIZE, aDrawOldPt.X(), aDrawOldPt.Y() ) ); } - if( FLY_IN_CNTNT == aNewAnchor.GetAnchorId() ) + if (FLY_AS_CHAR == aNewAnchor.GetAnchorId()) { const SwPosition* pPos = aNewAnchor.GetCntntAnchor(); SwTxtNode* pTxtNd = pPos->nNode.GetNode().GetTxtNode(); diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 1ebc3a084f..df8eaf2a0a 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -81,7 +81,7 @@ void lcl_MakeAutoFrms( const SwSpzFrmFmts& rSpzArr, ULONG nMovedIndex ) { pFmt = (SwFlyFrmFmt*)rSpzArr[n]; pAnchor = &pFmt->GetAnchor(); - if( pAnchor->GetAnchorId() == FLY_AUTO_CNTNT ) + if (pAnchor->GetAnchorId() == FLY_AT_CHAR) { const SwPosition* pAPos = pAnchor->GetCntntAnchor(); if( pAPos && nMovedIndex == pAPos->nNode.GetIndex() ) @@ -632,7 +632,7 @@ void lcl_ReAnchorAtCntntFlyFrames( const SwSpzFrmFmts& rSpzArr, SwPosition &rPos { pFmt = (SwFlyFrmFmt*)rSpzArr[n]; pAnchor = &pFmt->GetAnchor(); - if( pAnchor->GetAnchorId() == FLY_AT_CNTNT ) + if (pAnchor->GetAnchorId() == FLY_AT_PARA) { pAPos = pAnchor->GetCntntAnchor(); if( pAPos && nOldIdx == pAPos->nNode.GetIndex() ) diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 9338e5fbc5..71f98b82a5 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -593,7 +593,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark, pAnchor = &pFmt->GetAnchor(); switch( pAnchor->GetAnchorId() ) { - case FLY_IN_CNTNT: + case FLY_AS_CHAR: if( 0 != (pAPos = pAnchor->GetCntntAnchor() ) && (( nsDelCntntType::DELCNT_CHKNOCNTNT & nDelCntntType ) ? ( pStt->nNode <= pAPos->nNode && @@ -611,7 +611,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark, n = n >= rSpzArr.Count() ? rSpzArr.Count() : n+1; } break; - case FLY_AT_CNTNT: + case FLY_AT_PARA: { pAPos = pAnchor->GetCntntAnchor(); if( pAPos ) @@ -660,7 +660,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark, } } break; - case FLY_AUTO_CNTNT: + case FLY_AT_CHAR: if( 0 != (pAPos = pAnchor->GetCntntAnchor() ) && ( pStt->nNode <= pAPos->nNode && pAPos->nNode <= pEnd->nNode ) ) { diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx index d9ce9b12a8..bc5effe016 100644 --- a/sw/source/core/undo/undobj1.cxx +++ b/sw/source/core/undo/undobj1.cxx @@ -93,15 +93,19 @@ void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm ) SwFmtAnchor aAnchor( (RndStdIds)nRndId ); - if( FLY_PAGE == nRndId ) + if (FLY_AT_PAGE == nRndId) + { aAnchor.SetPageNum( (USHORT)nNdPgPos ); + } else { SwPosition aNewPos( *rUndoIter.pAktPam->GetPoint() ); aNewPos.nNode = nNdPgPos; - if( FLY_IN_CNTNT == nRndId || FLY_AUTO_CNTNT == nRndId ) + if ((FLY_AS_CHAR == nRndId) || (FLY_AT_CHAR == nRndId)) + { aNewPos.nContent.Assign( aNewPos.nNode.GetNode().GetCntntNode(), nCntPos ); + } aAnchor.SetAnchor( &aNewPos ); } @@ -119,7 +123,7 @@ void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm ) // vorhanden ist! Sonst wuerde das Layout den Fly vorher // formatieren, aber keine Inhalt finden; so geschene bei // Grafiken aus dem Internet - if( FLY_IN_CNTNT == nRndId ) + if (FLY_AS_CHAR == nRndId) { // es muss mindestens das Attribut im TextNode stehen SwCntntNode* pCNd = aAnchor.GetCntntAnchor()->nNode.GetNode().GetCntntNode(); @@ -138,22 +142,22 @@ void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm ) switch( nRndId ) { - case FLY_IN_CNTNT: - case FLY_AUTO_CNTNT: + case FLY_AS_CHAR: + case FLY_AT_CHAR: { const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); nNdPgPos = rAnchor.GetCntntAnchor()->nNode.GetIndex(); nCntPos = rAnchor.GetCntntAnchor()->nContent.GetIndex(); } break; - case FLY_AT_CNTNT: + case FLY_AT_PARA: case FLY_AT_FLY: { const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); nNdPgPos = rAnchor.GetCntntAnchor()->nNode.GetIndex(); } break; - case FLY_PAGE: + case FLY_AT_PAGE: break; } bDelFmt = FALSE; @@ -193,7 +197,8 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc ) const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); const SwPosition* pPos = rAnchor.GetCntntAnchor(); // die Positionen im Nodes-Array haben sich verschoben - if( FLY_IN_CNTNT == ( nRndId = static_cast(rAnchor.GetAnchorId()) ) ) + nRndId = static_cast(rAnchor.GetAnchorId()); + if (FLY_AS_CHAR == nRndId) { nNdPgPos = pPos->nNode.GetIndex(); nCntPos = pPos->nContent.GetIndex(); @@ -210,15 +215,19 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc ) pTxtNd->EraseText( aIdx, 1 ); } } - else if( FLY_AUTO_CNTNT == nRndId ) + else if (FLY_AT_CHAR == nRndId) { nNdPgPos = pPos->nNode.GetIndex(); nCntPos = pPos->nContent.GetIndex(); } - else if( FLY_AT_CNTNT == nRndId || FLY_AT_FLY == nRndId ) + else if ((FLY_AT_PARA == nRndId) || (FLY_AT_FLY == nRndId)) + { nNdPgPos = pPos->nNode.GetIndex(); + } else + { nNdPgPos = rAnchor.GetPageNum(); + } pFrmFmt->ResetFmtAttr( RES_ANCHOR ); // Anchor loeschen @@ -240,15 +249,15 @@ SwUndoInsLayFmt::SwUndoInsLayFmt( SwFrmFmt* pFormat, ULONG nNodeIdx, xub_StrLen bDelFmt = FALSE; switch( nRndId ) { - case FLY_PAGE: + case FLY_AT_PAGE: nNdPgPos = rAnchor.GetPageNum(); break; - case FLY_AT_CNTNT: + case FLY_AT_PARA: case FLY_AT_FLY: nNdPgPos = rAnchor.GetCntntAnchor()->nNode.GetIndex(); break; - case FLY_IN_CNTNT: - case FLY_AUTO_CNTNT: + case FLY_AS_CHAR: + case FLY_AT_CHAR: { const SwPosition* pPos = rAnchor.GetCntntAnchor(); nCntPos = pPos->nContent.GetIndex(); @@ -305,13 +314,15 @@ void SwUndoInsLayFmt::Repeat( SwUndoIter& rUndoIter ) SwDoc* pDoc = &rUndoIter.GetDoc(); // erfrage und setze den Anker neu SwFmtAnchor aAnchor( pFrmFmt->GetAnchor() ); - if( FLY_AT_CNTNT == aAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == aAnchor.GetAnchorId() || - FLY_IN_CNTNT == aAnchor.GetAnchorId() ) + if ((FLY_AT_PARA == aAnchor.GetAnchorId()) || + (FLY_AT_CHAR == aAnchor.GetAnchorId()) || + (FLY_AS_CHAR == aAnchor.GetAnchorId())) { SwPosition aPos( *rUndoIter.pAktPam->GetPoint() ); - if( FLY_AT_CNTNT == aAnchor.GetAnchorId() ) + if (FLY_AT_PARA == aAnchor.GetAnchorId()) + { aPos.nContent.Assign( 0, 0 ); + } aAnchor.SetAnchor( &aPos ); } else if( FLY_AT_FLY == aAnchor.GetAnchorId() ) @@ -328,7 +339,7 @@ void SwUndoInsLayFmt::Repeat( SwUndoIter& rUndoIter ) return ; } } - else if( FLY_PAGE == aAnchor.GetAnchorId() ) + else if (FLY_AT_PAGE == aAnchor.GetAnchorId()) { aAnchor.SetPageNum( pDoc->GetRootFrm()->GetCurrPage( rUndoIter.pAktPam )); @@ -482,7 +493,7 @@ void SwUndoSetFlyFmt::GetAnchor( SwFmtAnchor& rAnchor, ULONG nNode, xub_StrLen nCntnt ) { RndStdIds nAnchorTyp = rAnchor.GetAnchorId(); - if( FLY_PAGE != nAnchorTyp ) + if (FLY_AT_PAGE != nAnchorTyp) { SwNode* pNd = pFrmFmt->GetDoc()->GetNodes()[ nNode ]; @@ -490,26 +501,34 @@ void SwUndoSetFlyFmt::GetAnchor( SwFmtAnchor& rAnchor, ? ( !pNd->IsStartNode() || SwFlyStartNode != ((SwStartNode*)pNd)->GetStartNodeType() ) : !pNd->IsTxtNode() ) - pNd = 0; // ungueltige Position + { + pNd = 0; // invalid position + } else { SwPosition aPos( *pNd ); - if( FLY_IN_CNTNT == nAnchorTyp || - FLY_AUTO_CNTNT == nAnchorTyp ) + if ((FLY_AS_CHAR == nAnchorTyp) || + (FLY_AT_CHAR == nAnchorTyp)) { - if( nCntnt > ((SwTxtNode*)pNd)->GetTxt().Len() ) - pNd = 0; // ungueltige Position + if ( nCntnt > static_cast(pNd)->GetTxt().Len() ) + { + pNd = 0; // invalid position + } else - aPos.nContent.Assign( (SwTxtNode*)pNd, nCntnt ); + { + aPos.nContent.Assign(static_cast(pNd), nCntnt); + } } - if( pNd ) + if ( pNd ) + { rAnchor.SetAnchor( &aPos ); + } } if( !pNd ) { // ungueltige Position - setze auf 1. Seite - rAnchor.SetType( FLY_PAGE ); + rAnchor.SetType( FLY_AT_PAGE ); rAnchor.SetPageNum( 1 ); } } @@ -548,7 +567,7 @@ void SwUndoSetFlyFmt::Undo( SwUndoIter& rIter ) if( bAnchorChgd ) { const SwFmtAnchor& rOldAnch = pFrmFmt->GetAnchor(); - if( FLY_IN_CNTNT == rOldAnch.GetAnchorId() ) + if (FLY_AS_CHAR == rOldAnch.GetAnchorId()) { // Bei InCntnt's wird es spannend: Das TxtAttribut muss // vernichtet werden. Leider reisst dies neben den Frms @@ -577,7 +596,7 @@ void SwUndoSetFlyFmt::Undo( SwUndoIter& rIter ) GetAnchor( aNewAnchor, nOldNode, nOldCntnt ); pFrmFmt->SetFmtAttr( aNewAnchor ); - if( FLY_IN_CNTNT == aNewAnchor.GetAnchorId() ) + if (FLY_AS_CHAR == aNewAnchor.GetAnchorId()) { SwPosition* pPos = (SwPosition*)aNewAnchor.GetCntntAnchor(); SwFmtFlyCnt aFmt( pFrmFmt ); @@ -629,10 +648,10 @@ void SwUndoSetFlyFmt::PutAttr( USHORT nWhich, const SfxPoolItem* pItem ) const SwFmtAnchor* pAnchor = (SwFmtAnchor*)pItem; switch( nOldAnchorTyp = static_cast(pAnchor->GetAnchorId()) ) { - case FLY_IN_CNTNT: - case FLY_AUTO_CNTNT: + case FLY_AS_CHAR: + case FLY_AT_CHAR: nOldCntnt = pAnchor->GetCntntAnchor()->nContent.GetIndex(); - case FLY_AT_CNTNT: + case FLY_AT_PARA: case FLY_AT_FLY: nOldNode = pAnchor->GetCntntAnchor()->nNode.GetIndex(); break; @@ -644,10 +663,10 @@ void SwUndoSetFlyFmt::PutAttr( USHORT nWhich, const SfxPoolItem* pItem ) pAnchor = (SwFmtAnchor*)&pFrmFmt->GetAnchor(); switch( nNewAnchorTyp = static_cast(pAnchor->GetAnchorId()) ) { - case FLY_IN_CNTNT: - case FLY_AUTO_CNTNT: + case FLY_AS_CHAR: + case FLY_AT_CHAR: nNewCntnt = pAnchor->GetCntntAnchor()->nContent.GetIndex(); - case FLY_AT_CNTNT: + case FLY_AT_PARA: case FLY_AT_FLY: nNewNode = pAnchor->GetCntntAnchor()->nNode.GetIndex(); break; diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx index 2b89cb1e7c..475c6dc6df 100644 --- a/sw/source/core/undo/undraw.cxx +++ b/sw/source/core/undo/undraw.cxx @@ -32,15 +32,9 @@ #include "precompiled_sw.hxx" #include - -#ifndef _RTL_MEMORY_H #include -#endif #include -#ifndef _RTL_STRING_H -#include -#endif #include #include #include @@ -61,6 +55,7 @@ #include #include + struct SwUndoGroupObjImpl { SwDrawFrmFmt* pFmt; @@ -142,15 +137,15 @@ void lcl_SendRemoveToUno( SwFmt& rFmt ) void lcl_SaveAnchor( SwFrmFmt* pFmt, ULONG& rNodePos ) { const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); - if( FLY_AT_CNTNT == rAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == rAnchor.GetAnchorId() || - FLY_AT_FLY == rAnchor.GetAnchorId() || - FLY_IN_CNTNT == rAnchor.GetAnchorId() ) + if ((FLY_AT_PARA == rAnchor.GetAnchorId()) || + (FLY_AT_CHAR == rAnchor.GetAnchorId()) || + (FLY_AT_FLY == rAnchor.GetAnchorId()) || + (FLY_AS_CHAR == rAnchor.GetAnchorId())) { rNodePos = rAnchor.GetCntntAnchor()->nNode.GetIndex(); xub_StrLen nCntntPos = 0; - if( FLY_IN_CNTNT == rAnchor.GetAnchorId() ) + if (FLY_AS_CHAR == rAnchor.GetAnchorId()) { nCntntPos = rAnchor.GetCntntAnchor()->nContent.GetIndex(); @@ -168,8 +163,10 @@ void lcl_SaveAnchor( SwFrmFmt* pFmt, ULONG& rNodePos ) pTxtNd->EraseText( aIdx, 1 ); } } - else if( FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) + else if (FLY_AT_CHAR == rAnchor.GetAnchorId()) + { nCntntPos = rAnchor.GetCntntAnchor()->nContent.GetIndex(); + } pFmt->SetFmtAttr( SwFmtAnchor( rAnchor.GetAnchorId(), nCntntPos ) ); } @@ -178,10 +175,10 @@ void lcl_SaveAnchor( SwFrmFmt* pFmt, ULONG& rNodePos ) void lcl_RestoreAnchor( SwFrmFmt* pFmt, ULONG& rNodePos ) { const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); - if( FLY_AT_CNTNT == rAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == rAnchor.GetAnchorId() || - FLY_AT_FLY == rAnchor.GetAnchorId() || - FLY_IN_CNTNT == rAnchor.GetAnchorId() ) + if ((FLY_AT_PARA == rAnchor.GetAnchorId()) || + (FLY_AT_CHAR == rAnchor.GetAnchorId()) || + (FLY_AT_FLY == rAnchor.GetAnchorId()) || + (FLY_AS_CHAR == rAnchor.GetAnchorId())) { xub_StrLen nCntntPos = rAnchor.GetPageNum(); SwNodes& rNds = pFmt->GetDoc()->GetNodes(); @@ -190,13 +187,15 @@ void lcl_RestoreAnchor( SwFrmFmt* pFmt, ULONG& rNodePos ) SwPosition aPos( aIdx ); SwFmtAnchor aTmp( rAnchor.GetAnchorId() ); - if( FLY_IN_CNTNT == rAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) + if ((FLY_AS_CHAR == rAnchor.GetAnchorId()) || + (FLY_AT_CHAR == rAnchor.GetAnchorId())) + { aPos.nContent.Assign( aIdx.GetNode().GetCntntNode(), nCntntPos ); + } aTmp.SetAnchor( &aPos ); pFmt->SetFmtAttr( aTmp ); - if( FLY_IN_CNTNT == rAnchor.GetAnchorId() ) + if (FLY_AS_CHAR == rAnchor.GetAnchorId()) { SwTxtNode *pTxtNd = aIdx.GetNode().GetTxtNode(); ASSERT( pTxtNd, "no Text Node" ); diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index ab501f9558..7e18b59a7f 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -449,12 +449,12 @@ SwUndoTblToTxt::SwUndoTblToTxt( const SwTable& rTbl, sal_Unicode cCh ) const SwSpzFrmFmts& rFrmFmtTbl = *pTblNd->GetDoc()->GetSpzFrmFmts(); for( USHORT n = 0; n < rFrmFmtTbl.Count(); ++n ) { - const SwPosition* pAPos; SwFrmFmt* pFmt = rFrmFmtTbl[ n ]; - const SwFmtAnchor* pAnchor = &pFmt->GetAnchor(); - if( 0 != ( pAPos = pAnchor->GetCntntAnchor()) && - ( FLY_AUTO_CNTNT == pAnchor->GetAnchorId() || - FLY_AT_CNTNT == pAnchor->GetAnchorId() ) && + SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); + SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); + if (pAPos && + ((FLY_AT_CHAR == pAnchor->GetAnchorId()) || + (FLY_AT_PARA == pAnchor->GetAnchorId())) && nTblStt <= pAPos->nNode.GetIndex() && pAPos->nNode.GetIndex() < nTblEnd ) { diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx index e6aad03906..fdbc7b74cf 100644 --- a/sw/source/core/undo/untblk.cxx +++ b/sw/source/core/undo/untblk.cxx @@ -69,10 +69,10 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam ) for( USHORT n = 0; n < nArrLen; ++n ) { SwFrmFmt* pFmt = (*pDoc->GetSpzFrmFmts())[n]; - const SwFmtAnchor* pAnchor = &pFmt->GetAnchor(); - const SwPosition* pAPos; - if ( pAnchor->GetAnchorId() == FLY_AT_CNTNT && - 0 != ( pAPos = pAnchor->GetCntntAnchor()) && + SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); + const SwPosition* pAPos = pAnchor->GetCntntAnchor(); + if (pAPos && + (pAnchor->GetAnchorId() == FLY_AT_PARA) && nSttNode == pAPos->nNode.GetIndex() ) { if( !pFrmFmts ) @@ -124,10 +124,10 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, BOOL bScanFlys, for( USHORT n = 0; n < nArrLen; ++n ) { SwFrmFmt* pFmt = (*pDoc->GetSpzFrmFmts())[n]; - const SwFmtAnchor* pAnchor = &pFmt->GetAnchor(); - const SwPosition* pAPos; - if( pAnchor->GetAnchorId() == FLY_AT_CNTNT && - 0 != ( pAPos = pAnchor->GetCntntAnchor()) && + SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); + SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); + if (pAPos && + (pAnchor->GetAnchorId() == FLY_AT_PARA) && nSttNode == pAPos->nNode.GetIndex() ) { if( !pFrmFmts || diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index a88f0a26c0..bd592e4120 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -163,7 +163,9 @@ public: SwFmtAnchor* GetAnchor(sal_Bool bCreate = sal_False) { if(bCreate && !pAnchor) - pAnchor = new SwFmtAnchor(FLY_IN_CNTNT); + { + pAnchor = new SwFmtAnchor(FLY_AS_CHAR); + } return pAnchor; } SwFmtHoriOrient* GetHOrient(sal_Bool bCreate = sal_False) @@ -700,7 +702,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape) SfxItemSet aSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); - SwFmtAnchor aAnchor( FLY_IN_CNTNT ); + SwFmtAnchor aAnchor( FLY_AS_CHAR ); sal_Bool bOpaque = sal_False; if( pDesc ) { @@ -781,14 +783,18 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape) { if(FLY_AT_FLY == aAnchor.GetAnchorId() && !pInternalPam->GetNode()->FindFlyStartNode()) - aAnchor.SetType(FLY_IN_CNTNT); - else if(FLY_PAGE == aAnchor.GetAnchorId()) + { + aAnchor.SetType(FLY_AS_CHAR); + } + else if (FLY_AT_PAGE == aAnchor.GetAnchorId()) + { aAnchor.SetAnchor(pInternalPam->Start()); + } } else throw uno::RuntimeException(); } - else if( aAnchor.GetAnchorId() != FLY_PAGE && pDoc->GetRootFrm() ) + else if ((aAnchor.GetAnchorId() != FLY_AT_PAGE) && pDoc->GetRootFrm()) { SwCrsrMoveState aState( MV_SETONLYTEXT ); Point aTmp(MM100_TO_TWIP(aMM100Pos.X), MM100_TO_TWIP(aMM100Pos.Y)); @@ -800,7 +806,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape) } else { - aAnchor.SetType(FLY_PAGE); + aAnchor.SetType(FLY_AT_PAGE); // --> OD 2004-08-18 #i32349# - adjustment of vertical positioning // attributes no longer needed, because its already got a default. @@ -853,8 +859,11 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference< for ( sal_uInt16 i = 0; !bFlyInCnt && i < rMarkList.GetMarkCount(); ++i ) { const SdrObject *pObj = rMarkList.GetMark( i )->GetMarkedSdrObj(); - if ( FLY_IN_CNTNT == ::FindFrmFmt( (SdrObject*)pObj )->GetAnchor().GetAnchorId() ) + if (FLY_AS_CHAR == ::FindFrmFmt(const_cast( + pObj))->GetAnchor().GetAnchorId()) + { bFlyInCnt = sal_True; + } } if( bFlyInCnt ) throw uno::RuntimeException(); @@ -864,7 +873,9 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference< pDoc->StartUndo( UNDO_START, NULL ); SwDrawContact* pContact = pDoc->GroupSelection( *pPage->GetDrawView() ); - pDoc->ChgAnchor( pPage->GetDrawView()->GetMarkedObjectList(), FLY_AT_CNTNT/*int eAnchorId*/, + pDoc->ChgAnchor( + pPage->GetDrawView()->GetMarkedObjectList(), + FLY_AT_PARA/*int eAnchorId*/, sal_True, sal_False ); pPage->GetDrawView()->UnmarkAll(); @@ -899,7 +910,8 @@ void SwXDrawPage::ungroup(const uno::Reference< drawing::XShapeGroup > & xShapeG pDoc->StartUndo( UNDO_START, NULL ); pDoc->UnGroupSelection( *pPage->GetDrawView() ); - pDoc->ChgAnchor( pPage->GetDrawView()->GetMarkedObjectList(), FLY_AT_CNTNT/*int eAnchorId*/, + pDoc->ChgAnchor( pPage->GetDrawView()->GetMarkedObjectList(), + FLY_AT_PARA/*int eAnchorId*/, sal_True, sal_False ); pDoc->EndUndo( UNDO_END, NULL ); } @@ -1274,7 +1286,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A else if ( FN_TEXT_RANGE == pEntry->nWID ) { SwFmtAnchor aAnchor( static_cast(aSet.Get( RES_ANCHOR )) ); - if ( aAnchor.GetAnchorId() == FLY_PAGE ) + if (aAnchor.GetAnchorId() == FLY_AT_PAGE) { // set property not valid for to-page anchored shapes throw lang::IllegalArgumentException(); @@ -1287,7 +1299,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A aValue >>= xRg; if ( SwXTextRange::XTextRangeToSwPaM(*pInternalPam, xRg) ) { - if(aAnchor.GetAnchorId() == FLY_IN_CNTNT) + if (aAnchor.GetAnchorId() == FLY_AS_CHAR) { //delete old SwFmtFlyCnt //With AnchorAsCharacter the current TxtAttribute has to be deleted. @@ -1375,7 +1387,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A SwFrmFmt *pFlyFmt = FindFrmFmt( pObj ); pFlyFmt->DelFrms(); if( text::TextContentAnchorType_AS_CHARACTER != eNewAnchor && - FLY_IN_CNTNT == eOldAnchorId ) + (FLY_AS_CHAR == eOldAnchorId)) { //With AnchorAsCharacter the current TxtAttribute has to be deleted. //Tbis removes the frame format too. @@ -1398,7 +1410,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A pTxtNode->DeleteAttributes(RES_TXTATR_FLYCNT, nIdx); } else if( text::TextContentAnchorType_AT_PAGE != eNewAnchor && - FLY_PAGE == eOldAnchorId ) + (FLY_AT_PAGE == eOldAnchorId)) { SwFmtAnchor aNewAnchor( dynamic_cast< const SwFmtAnchor& >( aSet.Get( RES_ANCHOR ) ) ); //if the fly has been anchored at page then it needs to be connected @@ -1421,7 +1433,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A pFmt->SetFmtAttr(aSet); bSetAttr = false; if( text::TextContentAnchorType_AS_CHARACTER == eNewAnchor && - FLY_IN_CNTNT != eOldAnchorId ) + (FLY_AS_CHAR != eOldAnchorId)) { //the RES_TXTATR_FLYCNT needs to be added now SwTxtNode *pNd = aPam.GetNode()->GetTxtNode(); @@ -1606,7 +1618,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName) else if ( FN_TEXT_RANGE == pEntry->nWID ) { const SwFmtAnchor aAnchor = pFmt->GetAnchor(); - if ( aAnchor.GetAnchorId() == FLY_PAGE ) + if (aAnchor.GetAnchorId() == FLY_AT_PAGE) { // return nothing, because property isn't // valid for to-page anchored shapes @@ -2180,7 +2192,7 @@ uno::Reference< text::XTextRange > SwXShape::getAnchor(void) throw( uno::Runtim const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); // return an anchor for non-page bound frames // and for page bound frames that have a page no == NULL and a content position - if( rAnchor.GetAnchorId() != FLY_PAGE || + if ((rAnchor.GetAnchorId() != FLY_AT_PAGE) || (rAnchor.GetCntntAnchor() && !rAnchor.GetPageNum())) { const SwPosition &rPos = *(pFmt->GetAnchor().GetCntntAnchor()); @@ -2224,7 +2236,7 @@ void SwXShape::dispose(void) throw( uno::RuntimeException ) pObj->IsInserted() ) // <-- { - if( pFmt->GetAnchor().GetAnchorId() == FLY_IN_CNTNT ) + if (pFmt->GetAnchor().GetAnchorId() == FLY_AS_CHAR) { const SwPosition &rPos = *(pFmt->GetAnchor().GetCntntAnchor()); SwTxtNode *pTxtNode = rPos.nNode.GetNode().GetTxtNode(); diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 37f53ade45..0f3057533d 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -45,9 +45,7 @@ #include #include #include -#ifndef _DOCSH_HXX //autogen #include -#endif #include #include #include @@ -1402,7 +1400,8 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: aSet.Put(aAnchor); } } - else if(aAnchor.GetAnchorId() != FLY_PAGE && !aAnchor.GetCntntAnchor()) + else if ((aAnchor.GetAnchorId() != FLY_AT_PAGE) && + !aAnchor.GetCntntAnchor()) { SwNode& rNode = pDoc->GetNodes().GetEndOfContent(); SwPaM aPam(rNode); @@ -2023,7 +2022,7 @@ void SwXFrame::dispose(void) throw( uno::RuntimeException ) ( pObj->GetUserCall() && !static_cast(pObj->GetUserCall())->IsInDTOR() ) ) ) { - if( pFmt->GetAnchor().GetAnchorId() == FLY_IN_CNTNT ) + if (pFmt->GetAnchor().GetAnchorId() == FLY_AS_CHAR) { const SwPosition &rPos = *(pFmt->GetAnchor().GetCntntAnchor()); SwTxtNode *pTxtNode = rPos.nNode.GetNode().GetTxtNode(); @@ -2049,7 +2048,7 @@ uno::Reference< text::XTextRange > SwXFrame::getAnchor(void) throw( uno::Runtim const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); // return an anchor for non-page bound frames // and for page bound frames that have a page no == NULL and a content position - if( rAnchor.GetAnchorId() != FLY_PAGE || + if ((rAnchor.GetAnchorId() != FLY_AT_PAGE) || (rAnchor.GetCntntAnchor() && !rAnchor.GetPageNum())) { const SwPosition &rPos = *(rAnchor.GetCntntAnchor()); @@ -2128,7 +2127,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan } const SfxPoolItem* pItem; - RndStdIds eAnchorId = FLY_AT_CNTNT; + RndStdIds eAnchorId = FLY_AT_PARA; if(SFX_ITEM_SET == aFrmSet.GetItemState(RES_ANCHOR, sal_False, &pItem) ) { eAnchorId = ((const SwFmtAnchor*)pItem)->GetAnchorId(); @@ -2136,10 +2135,10 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan !aPam.GetNode()->FindFlyStartNode()) { //rahmengebunden geht nur dort, wo ein Rahmen ist! - SwFmtAnchor aAnchor(FLY_AT_CNTNT); + SwFmtAnchor aAnchor(FLY_AT_PARA); aFrmSet.Put(aAnchor); } - else if( FLY_PAGE == eAnchorId && + else if ((FLY_AT_PAGE == eAnchorId) && 0 == ((const SwFmtAnchor*)pItem)->GetPageNum() ) { SwFmtAnchor aAnchor( *((const SwFmtAnchor*)pItem) ); @@ -2162,10 +2161,10 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan SwFmtAnchor* pAnchorItem = 0; // the frame is inserted bound to page // to prevent conflicts if the to-be-anchored position is part of the to-be-copied text - if(eAnchorId != FLY_PAGE) + if (eAnchorId != FLY_AT_PAGE) { pAnchorItem = static_cast(aFrmSet.Get(RES_ANCHOR).Clone()); - aFrmSet.Put( SwFmtAnchor( FLY_PAGE, 1 )); + aFrmSet.Put( SwFmtAnchor( FLY_AT_PAGE, 1 )); } pFmt = pDoc->MakeFlyAndMove( *m_pCopySource, aFrmSet, @@ -2183,8 +2182,10 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan DELETEZ( m_pCopySource ); } else - pFmt = pDoc->MakeFlySection( FLY_AT_CNTNT, aPam.GetPoint(), + { + pFmt = pDoc->MakeFlySection( FLY_AT_PARA, aPam.GetPoint(), &aFrmSet, pParentFrmFmt ); + } if(pFmt) { pFmt->Add(this); diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 0cf7fe86d7..06415a36e5 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -163,7 +163,8 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx, // gebunden sind SwDoc* pDoc = rIdx.GetNode().GetDoc(); - USHORT nChkType = static_cast< USHORT >(_bAtCharAnchoredObjs ? FLY_AUTO_CNTNT : FLY_AT_CNTNT); + USHORT nChkType = static_cast< USHORT >((_bAtCharAnchoredObjs) + ? FLY_AT_CHAR : FLY_AT_PARA); const SwCntntFrm* pCFrm; const SwCntntNode* pCNd; if( pDoc->GetRootFrm() && diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx index a0c6d78e37..94bc6beaa3 100644 --- a/sw/source/core/view/vdraw.cxx +++ b/sw/source/core/view/vdraw.cxx @@ -46,10 +46,8 @@ #include #ifndef PRODUCT -#ifndef _SVX_FMGLOB_HXX #include #endif -#endif #include "fesh.hxx" #include "pagefrm.hxx" @@ -62,9 +60,8 @@ #include "flyfrm.hxx" #include -#ifndef IDOCUMENTDRAWMODELACCESS_HXX_INCLUDED #include -#endif + /************************************************************************* |* @@ -337,8 +334,10 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz ) const SwFrm *pAnchor = ((SwDrawContact*)pCont)->GetAnchorFrm(); if ( !pAnchor || pAnchor->IsInFly() || !pAnchor->IsValid() || !pAnchor->GetUpper() || !pAnchor->FindPageFrm() || - FLY_IN_CNTNT == pCont->GetFmt()->GetAnchor().GetAnchorId() ) + (FLY_AS_CHAR == pCont->GetFmt()->GetAnchor().GetAnchorId()) ) + { continue; + } // OD 19.06.2003 #108784# - no move for drawing objects in header/footer if ( pAnchor->FindFooterOrHeader() ) diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index 3e8ae6d726..95c0296551 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -34,9 +34,7 @@ #include #include #include -#ifndef SVTOOLS_FSTATHELPER_HXX #include -#endif #include #include #include @@ -60,9 +58,7 @@ #include #include #include -#ifndef _DOCSH_HXX #include -#endif #include #include @@ -72,6 +68,7 @@ #include // <-- + using namespace ::com::sun::star; ////////////////////////////////////////////////////////////////////////// @@ -241,9 +238,9 @@ ULONG SwReader::Read( const Reader& rOptions ) { SwPosition const*const pFrameAnchor( rAnchor.GetCntntAnchor()); - if ( (FLY_PAGE == rAnchor.GetAnchorId()) + if ( (FLY_AT_PAGE == rAnchor.GetAnchorId()) || ( pFrameAnchor - && ( ( (FLY_AT_CNTNT == rAnchor.GetAnchorId()) + && ( ( (FLY_AT_PARA == rAnchor.GetAnchorId()) && ( (pUndoPam->GetPoint()->nNode == pFrameAnchor->nNode) || (pUndoPam->GetMark()->nNode == @@ -251,7 +248,7 @@ ULONG SwReader::Read( const Reader& rOptions ) ) ) // #i97570# also check frames anchored AT char - || ( (FLY_AUTO_CNTNT == rAnchor.GetAnchorId()) + || ( (FLY_AT_CHAR == rAnchor.GetAnchorId()) && !IsDestroyFrameAnchoredAtChar( *pFrameAnchor, *pUndoPam->GetPoint(), @@ -262,7 +259,7 @@ ULONG SwReader::Read( const Reader& rOptions ) ) { if( bChkHeaderFooter && - FLY_AT_CNTNT == rAnchor.GetAnchorId() && + (FLY_AT_PARA == rAnchor.GetAnchorId()) && RES_DRAWFRMFMT == pFrmFmt->Which() ) { // DrawObjecte in Kopf-/Fusszeilen ist nicht @@ -286,15 +283,19 @@ ULONG SwReader::Read( const Reader& rOptions ) pFrmFmt->DelFrms(); } - if( FLY_PAGE == rAnchor.GetAnchorId() ) + if (FLY_AT_PAGE == rAnchor.GetAnchorId()) { if( !rAnchor.GetCntntAnchor() ) + { pFrmFmt->MakeFrms(); + } else if( pCrsr ) + { // seitengebundene Flys eingefuegt, dann schalte // die Optimierungs-Flags vom SwDoc ab. Sonst // werden die Flys nicht an der Position erzeugt. pDoc->SetLoaded( FALSE ); + } } else pFrmFmt->MakeFrms(); diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 38f82babb9..8bbfce70f7 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -35,9 +35,7 @@ #include "hintids.hxx" #include -#ifndef _WRKWIN_HXX //autogen #include -#endif #include #include #include @@ -2130,8 +2128,8 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt, const SwFmtAnchor& rAnchor = rFrmFmt.GetAnchor(); switch( rAnchor.GetAnchorId() ) { - case FLY_AT_CNTNT: - case FLY_AUTO_CNTNT: + case FLY_AT_PARA: + case FLY_AT_CHAR: if( text::RelOrientation::FRAME == rHoriOri.GetRelationOrient() || text::RelOrientation::PRINT_AREA == rHoriOri.GetRelationOrient() ) { @@ -2146,7 +2144,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt, break; } - case FLY_PAGE: + case FLY_AT_PAGE: case FLY_AT_FLY: { // position @@ -2375,7 +2373,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtBackground( const SwFrmFmt& rFrmFmt ) const SwFmtAnchor& rAnchor = rFrmFmt.GetAnchor(); RndStdIds eAnchorId = rAnchor.GetAnchorId(); const SwPosition *pAnchorPos = rAnchor.GetCntntAnchor(); - if( FLY_PAGE != eAnchorId && pAnchorPos ) + if (FLY_AT_PAGE != eAnchorId && pAnchorPos) { const SwNode& rNode = pAnchorPos->nNode.GetNode(); if( rNode.IsCntntNode() ) diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index ea7c9f0ff9..d1d729bf02 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -39,17 +39,12 @@ #include #include #include -#ifndef _APP_HXX //autogen #include -#endif #include #include #include #include -#ifndef _SVX_BOXITEM_HXX //autogen - #include -#endif #include #include #include @@ -2094,7 +2089,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/, } else { - aAnchor.SetType( FLY_PAGE ); + aAnchor.SetType( FLY_AT_PAGE ); aAnchor.SetPageNum( 1 ); } nHoriPos = rPropInfo.nLeft; @@ -2102,7 +2097,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/, } else { - aAnchor.SetType( FLY_AT_CNTNT ); + aAnchor.SetType( FLY_AT_PARA ); aAnchor.SetAnchor( pPam->GetPoint() ); eVertOri = text::VertOrientation::TOP; eVertRel = text::RelOrientation::CHAR; @@ -2128,14 +2123,14 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/, xub_StrLen nCntnt = pPam->GetPoint()->nContent.GetIndex(); if( nCntnt ) { - aAnchor.SetType( FLY_AUTO_CNTNT ); + aAnchor.SetType( FLY_AT_CHAR ); pPam->Move( fnMoveBackward ); eVertOri = text::VertOrientation::CHAR_BOTTOM; eVertRel = text::RelOrientation::CHAR; } else { - aAnchor.SetType( FLY_AT_CNTNT ); + aAnchor.SetType( FLY_AT_PARA ); eVertOri = text::VertOrientation::TOP; eVertRel = text::RelOrientation::PRINT_AREA; } diff --git a/sw/source/filter/html/htmldraw.cxx b/sw/source/filter/html/htmldraw.cxx index e31acbabc0..4f7a281631 100644 --- a/sw/source/filter/html/htmldraw.cxx +++ b/sw/source/filter/html/htmldraw.cxx @@ -34,9 +34,7 @@ #include "hintids.hxx" #include -#ifndef _WRKWIN_HXX //autogen #include -#endif #include #include #include @@ -182,7 +180,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, aFrmSet.Put( aULItem ); } - SwFmtAnchor aAnchor( FLY_IN_CNTNT ); + SwFmtAnchor aAnchor( FLY_AS_CHAR ); if( SVX_CSS1_POS_ABSOLUTE == rCSS1PropInfo.ePosition && SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.eLeftType && SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.eTopType ) @@ -198,7 +196,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, } else { - aAnchor.SetType( FLY_PAGE ); + aAnchor.SetType( FLY_AT_PAGE ); } // OD 2004-04-13 #i26791# - direct positioning for pNewDrawObj->SetRelativePos( Point(rCSS1PropInfo.nLeft + nLeftSpace, @@ -208,7 +206,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, else if( SVX_ADJUST_LEFT == rCSS1PropInfo.eFloat || text::HoriOrientation::LEFT == eHoriOri ) { - aAnchor.SetType( FLY_AT_CNTNT ); + aAnchor.SetType( FLY_AT_PARA ); aFrmSet.Put( SwFmtSurround(bHidden ? SURROUND_THROUGHT : SURROUND_RIGHT) ); // OD 2004-04-13 #i26791# - direct positioning for @@ -219,10 +217,14 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, aFrmSet.Put( SwFmtVertOrient( 0, eVertOri ) ); } - if( FLY_PAGE == aAnchor.GetAnchorId() ) + if (FLY_AT_PAGE == aAnchor.GetAnchorId()) + { aAnchor.SetPageNum( 1 ); + } else if( FLY_AT_FLY != aAnchor.GetAnchorId() ) + { aAnchor.SetAnchor( pPam->GetPoint() ); + } aFrmSet.Put( aAnchor ); pDoc->Insert( *pPam, *pNewDrawObj, &aFrmSet, NULL ); diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index 880009e3a9..c1b7a20424 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -39,12 +39,8 @@ #include "hintids.hxx" #include #include -#ifndef _APP_HXX #include -#endif -#ifndef _WRKWIN_HXX //autogen #include -#endif #include #include #include @@ -338,12 +334,12 @@ void SwHTMLWriter::CollectFlyFrms() sal_Int16 eHoriRel = rFrmFmt.GetHoriOrient().GetRelationOrient(); switch( rAnchor.GetAnchorId() ) { - case FLY_PAGE: + case FLY_AT_PAGE: case FLY_AT_FLY: nMode = aHTMLOutFrmPageFlyTable[eType][nExportMode]; break; - case FLY_AT_CNTNT: + case FLY_AT_PARA: // Absatz-gebundene Rahmen werden nur dann vor den // Absatz geschrieben, wenn der Absatz einen Abstand // hat. @@ -362,7 +358,7 @@ void SwHTMLWriter::CollectFlyFrms() nMode = aHTMLOutFrmParaPrtAreaTable[eType][nExportMode]; break; - case FLY_AUTO_CNTNT: + case FLY_AT_CHAR: if( text::RelOrientation::FRAME == eHoriRel || text::RelOrientation::PRINT_AREA == eHoriRel ) nMode = aHTMLOutFrmParaPrtAreaTable[eType][nExportMode]; else @@ -594,7 +590,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, const sal_Char *pStr = 0; RndStdIds eAnchorId = rFrmFmt.GetAnchor().GetAnchorId(); if( (nFrmOpts & HTML_FRMOPT_ALIGN) && - (FLY_AT_CNTNT == eAnchorId || FLY_AUTO_CNTNT == eAnchorId) ) + ((FLY_AT_PARA == eAnchorId) || (FLY_AT_CHAR == eAnchorId)) ) { // MIB 12.3.98: Ist es nicht schlauer, absatzgebundene // Rahmen notfalls links auszurichten als sie @@ -611,7 +607,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, } if( (nFrmOpts & HTML_FRMOPT_ALIGN) && !pStr && ( (nFrmOpts & HTML_FRMOPT_S_ALIGN) == 0 || - FLY_IN_CNTNT == eAnchorId ) && + (FLY_AS_CHAR == eAnchorId) ) && SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, TRUE, &pItem )) { switch( ((SwFmtVertOrient*)pItem)->GetVertOrient() ) @@ -764,8 +760,8 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, // Umlauf fuer absatzgeb. Grafiken als
in den String // schreiben if( (nFrmOpts & HTML_FRMOPT_BRCLEAR) && - (FLY_AT_CNTNT== rFrmFmt.GetAnchor().GetAnchorId() || - FLY_AUTO_CNTNT== rFrmFmt.GetAnchor().GetAnchorId()) && + ((FLY_AT_PARA == rFrmFmt.GetAnchor().GetAnchorId()) || + (FLY_AT_CHAR == rFrmFmt.GetAnchor().GetAnchorId())) && SFX_ITEM_SET == rItemSet.GetItemState( RES_SURROUND, TRUE, &pItem )) { const SwFmtSurround* pSurround = (const SwFmtSurround*)pItem; @@ -1893,7 +1889,7 @@ SwHTMLPosFlyFrm::SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly, nOutputMode( nOutMode ) { const SwFmtAnchor& rAnchor = rPosFly.GetFmt().GetAnchor(); - if( FLY_AUTO_CNTNT==rAnchor.GetAnchorId() && + if ((FLY_AT_CHAR == rAnchor.GetAnchorId()) && HTML_POS_INSIDE == GetOutPos() ) { // Auto-gebundene Rahmen werden ein Zeichen weiter hinten diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 972a3f6246..8d2d305c23 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -45,18 +45,14 @@ #include #include #include -#ifndef _WRKWIN_HXX //autogen #include -#endif #include #include #include #include #include #include "svtools/urihelper.hxx" -#ifndef _TOOLKIT_UNOHLP_HXX #include -#endif #include #include #include @@ -81,6 +77,7 @@ #include "htmlfly.hxx" #include "htmlform.hxx" + using namespace ::com::sun::star; using ::rtl::OUString; /* */ @@ -1427,7 +1424,7 @@ void SwHTMLWriter::GetControls() const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); const SwPosition *pPos = rAnchor.GetCntntAnchor(); - if( FLY_IN_CNTNT != rAnchor.GetAnchorId() || !pPos ) + if ((FLY_AS_CHAR != rAnchor.GetAnchorId()) || !pPos) continue; const SdrObject *pSdrObj = diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 688ed149a5..cadc0f27ac 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -33,9 +33,7 @@ #include "hintids.hxx" #include -#ifndef _WRKWIN_HXX //autogen #include -#endif #include #include #include @@ -208,7 +206,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri, BOOL bDontAppend ) { BOOL bMoveBackward = FALSE; - SwFmtAnchor aAnchor( FLY_IN_CNTNT ); + SwFmtAnchor aAnchor( FLY_AS_CHAR ); sal_Int16 eVertRel = text::RelOrientation::FRAME; if( text::HoriOrientation::NONE != eHoriOri ) @@ -267,14 +265,14 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri, xub_StrLen nCntnt = pPam->GetPoint()->nContent.GetIndex(); if( nCntnt ) { - aAnchor.SetType( FLY_AUTO_CNTNT ); + aAnchor.SetType( FLY_AT_CHAR ); bMoveBackward = TRUE; eVertOri = text::VertOrientation::CHAR_BOTTOM; eVertRel = text::RelOrientation::CHAR; } else { - aAnchor.SetType( FLY_AT_CNTNT ); + aAnchor.SetType( FLY_AT_PARA ); eVertOri = text::VertOrientation::TOP; eVertRel = text::RelOrientation::PRINT_AREA; } @@ -301,7 +299,7 @@ void SwHTMLParser::RegisterFlyFrm( SwFrmFmt *pFlyFmt ) // automatisch verankerte Rahmen muessen noch um eine Position // nach vorne verschoben werden. if( RES_DRAWFRMFMT != pFlyFmt->Which() && - FLY_AT_CNTNT == pFlyFmt->GetAnchor().GetAnchorId() && + (FLY_AT_PARA == pFlyFmt->GetAnchor().GetAnchorId()) && SURROUND_THROUGHT == pFlyFmt->GetSurround().GetSurround() ) { aMoveFlyFrms.Insert( pFlyFmt, aMoveFlyFrms.Count() ); @@ -778,7 +776,7 @@ IMAGE_SETEVENT: aMacroItem.SetMacro( aEvents[ n ], *pMacro ); } - if( FLY_IN_CNTNT == pFlyFmt->GetAnchor().GetAnchorId() && + if ((FLY_AS_CHAR == pFlyFmt->GetAnchor().GetAnchorId()) && aAttrTab.pINetFmt->GetSttPara() == pPam->GetPoint()->nNode && aAttrTab.pINetFmt->GetSttCnt() == @@ -1342,20 +1340,16 @@ void SwHTMLParser::StripTrailingPara() { ULONG nNodeIdx = pPam->GetPoint()->nNode.GetIndex(); - USHORT i; - - const SwFrmFmt* pFmt; - const SwFmtAnchor* pAnchor; - const SwPosition* pAPos; const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts(); - for( i=0; iGetAnchor(); - if( 0 != ( pAPos = pAnchor->GetCntntAnchor()) && - (FLY_AT_CNTNT == pAnchor->GetAnchorId() || - FLY_AUTO_CNTNT == pAnchor->GetAnchorId()) && + SwFrmFmt const*const pFmt = rFrmFmtTbl[i]; + SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); + SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); + if (pAPos && + ((FLY_AT_PARA == pAnchor->GetAnchorId()) || + (FLY_AT_CHAR == pAnchor->GetAnchorId())) && pAPos->nNode == nNodeIdx ) return; // den Knoten duerfen wir nicht loeschen diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 27852b37ab..064866f2ca 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -33,8 +33,6 @@ #include #include - - #include "hintids.hxx" #include #define _SVSTDARR_ULONGS @@ -42,9 +40,7 @@ #include #include #include -#ifndef _WRKWIN_HXX //autogen #include -#endif #include #include #include @@ -465,7 +461,7 @@ void SwHTMLParser::InsertEmbed() } else { - SwFmtAnchor aAnchor( FLY_AT_CNTNT ); + SwFmtAnchor aAnchor( FLY_AT_PARA ); aAnchor.SetAnchor( pPam->GetPoint() ); aFrmSet.Put( aAnchor ); aFrmSet.Put( SwFmtHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::FRAME) ); @@ -1167,7 +1163,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, sOut = '\"'; } - if( FLY_AT_CNTNT == rFrmFmt.GetAnchor().GetAnchorId() && + if ((FLY_AT_PARA == rFrmFmt.GetAnchor().GetAnchorId()) && SURROUND_THROUGHT == rFrmFmt.GetSurround().GetSurround() ) { // Das Plugin ist HIDDEN diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index a883fa4207..9868404cc1 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -2837,7 +2837,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable, SwFrmFmt *pFrmFmt = aMoveFlyFrms[ --n ]; const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); - ASSERT( FLY_AT_CNTNT==rAnchor.GetAnchorId(), + ASSERT( FLY_AT_PARA == rAnchor.GetAnchorId(), "Nur Auto-Rahmen brauchen eine Spezialbehandlung" ); const SwPosition *pFlyPos = rAnchor.GetCntntAnchor(); ULONG nFlyParaIdx = pFlyPos->nNode.GetIndex(); @@ -2862,7 +2862,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable, pAttrPam->GetPoint()->nContent.Assign( pAttrPam->GetCntntNode(), aMoveFlyCnts[n] ); SwFmtAnchor aAnchor( rAnchor ); - aAnchor.SetType( FLY_AUTO_CNTNT ); + aAnchor.SetType( FLY_AT_CHAR ); aAnchor.SetAnchor( pAttrPam->GetPoint() ); pFrmFmt->SetFmtAttr( aAnchor ); @@ -4411,27 +4411,23 @@ BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly, // sonst: Der Absatz enthaelt irgendeinen Rahmen SwNodeIndex& rNodeIdx = pPam->GetPoint()->nNode; - SwFrmFmt* pFmt; - const SwFmtAnchor* pAnchor; - const SwPosition* pAPos; const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts(); - USHORT i; BOOL bFound = FALSE; - for( i=0; iGetAnchor(); + SwFrmFmt *const pFmt = rFrmFmtTbl[i]; + SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); // Ein Rahmen wurde gefunden, wenn // - er absatzgebunden ist, und // - im aktuellen Absatz verankert ist, und // - jeder absatzgebunene Rahmen zaehlt, oder // - (nur Rahmen oder umlauf zaehlen und ) der Rahmen keinen // Umlauf besitzt - - if( 0 != ( pAPos = pAnchor->GetCntntAnchor()) && - (FLY_AT_CNTNT == pAnchor->GetAnchorId() || - FLY_AUTO_CNTNT == pAnchor->GetAnchorId()) && + SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); + if (pAPos && + ((FLY_AT_PARA == pAnchor->GetAnchorId()) || + (FLY_AT_CHAR == pAnchor->GetAnchorId())) && pAPos->nNode == rNodeIdx ) { if( !(bNoSurroundOnly || bSurroundOnly) ) @@ -5073,18 +5069,16 @@ void SwHTMLParser::InsertLineBreak() SwTxtNode* pTxtNd = rNodeIdx.GetNode().GetTxtNode(); if( pTxtNd ) { - SwFrmFmt* pFmt; - const SwFmtAnchor* pAnchor; - const SwPosition* pAPos; const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts(); for( USHORT i=0; iGetAnchor(); - if( 0 != ( pAPos = pAnchor->GetCntntAnchor()) && - (FLY_AT_CNTNT == pAnchor->GetAnchorId() || - FLY_AUTO_CNTNT == pAnchor->GetAnchorId()) && + SwFrmFmt *const pFmt = rFrmFmtTbl[i]; + SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); + SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); + if (pAPos && + ((FLY_AT_PARA == pAnchor->GetAnchorId()) || + (FLY_AT_CHAR == pAnchor->GetAnchorId())) && pAPos->nNode == rNodeIdx && pFmt->GetSurround().GetSurround() != SURROUND_NONE ) { diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx index 463a4305c4..fbc2662c84 100644 --- a/sw/source/filter/inc/fltshell.hxx +++ b/sw/source/filter/inc/fltshell.hxx @@ -36,9 +36,7 @@ #include #include #include -#ifndef _KEYCOD_HXX //autogen #include -#endif #include #include #include @@ -150,12 +148,12 @@ class SW_DLLPUBLIC SwFltAnchor : public SfxPoolItem { SwFrmFmt* pFrmFmt; SwFltAnchorClient * pClient; - + public: SwFltAnchor(SwFrmFmt* pFlyFmt); SwFltAnchor(const SwFltAnchor&); virtual ~SwFltAnchor(); - + // "pure virtual Methoden" vom SfxPoolItem virtual int operator==(const SfxPoolItem&) const; virtual SfxPoolItem* Clone(SfxItemPool* = 0) const; @@ -167,10 +165,10 @@ public: class SwFltAnchorClient : public SwClient { SwFltAnchor * m_pFltAnchor; - + public: SwFltAnchorClient(SwFltAnchor * pFltAnchor); - + virtual void Modify (SfxPoolItem *pOld, SfxPoolItem *pNew); }; @@ -556,7 +554,7 @@ public: pOut->EndTable(); } // methoden zur verwaltung von Flys BOOL IsInFly() { return pOut->IsInFly(); } - BOOL BeginFly( RndStdIds eAnchor = FLY_AT_CNTNT, BOOL bAbsolutePos = FALSE ); + BOOL BeginFly( RndStdIds eAnchor = FLY_AT_PARA, BOOL bAbsolutePos = FALSE ); void SetFlyAnchor( RndStdIds eAnchor ) { pOut->SetFlyAnchor( eAnchor ); } void SetFlyXPos( short nXPos, sal_Int16 eHRel = com::sun::star::text::RelOrientation::FRAME, diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx index 9b97984126..ad8a6e1199 100644 --- a/sw/source/filter/rtf/rtfatr.cxx +++ b/sw/source/filter/rtf/rtfatr.cxx @@ -38,9 +38,7 @@ */ #include -#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_ #include -#endif #include #include #include @@ -50,9 +48,7 @@ #include #include #include -#ifndef _SVX_TSTPITEM_HXX //autogen #include -#endif #include #include #include @@ -72,16 +68,12 @@ #include #include #include -#ifndef _SVX_CNTRITEM_HXX //autogen #include -#endif #include #include #include #include -#ifndef _SVX_EMPHITEM_HXX #include -#endif #include #include #include @@ -127,9 +119,7 @@ #include #include // fuer SwPageDesc ... #include // fuer SwPageDesc ... -#ifndef _DOCSH_HXX #include -#endif #include #include #include @@ -3592,7 +3582,7 @@ static Writer& OutRTF_SwFmtVertOrient ( Writer& rWrt, const SfxPoolItem& rHt ) const char* pOrient; RndStdIds eAnchor = rRTFWrt.pFlyFmt->GetAnchor().GetAnchorId(); sal_Int16 eOrient = rFlyVert.GetRelationOrient(); - if( FLY_PAGE == eAnchor ) + if (FLY_AT_PAGE == eAnchor) { if( text::RelOrientation::PAGE_FRAME == eOrient || text::RelOrientation::FRAME == eOrient ) pOrient = OOO_STRING_SVTOOLS_RTF_PVPG; @@ -3648,7 +3638,7 @@ static Writer& OutRTF_SwFmtHoriOrient( Writer& rWrt, const SfxPoolItem& rHt ) const char* pS; RndStdIds eAnchor = rRTFWrt.pFlyFmt->GetAnchor().GetAnchorId(); sal_Int16 eOrient = rFlyHori.GetRelationOrient(); - if( FLY_PAGE == eAnchor ) + if (FLY_AT_PAGE == eAnchor) { if( text::RelOrientation::PAGE_FRAME == eOrient || text::RelOrientation::FRAME == eOrient ) pS = OOO_STRING_SVTOOLS_RTF_PHPG; @@ -3702,12 +3692,12 @@ static Writer& OutRTF_SwFmtAnchor( Writer& rWrt, const SfxPoolItem& rHt ) rRTFWrt.bOutFmtAttr = TRUE; switch( nId ) { - case FLY_PAGE: + case FLY_AT_PAGE: rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FLYPAGE; rWrt.OutULong( rAnchor.GetPageNum() ); break; - case FLY_AT_CNTNT: - case FLY_IN_CNTNT: + case FLY_AT_PARA: + case FLY_AS_CHAR: rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FLYCNTNT; break; } diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx index 706dc39b81..5c1f0debc0 100644 --- a/sw/source/filter/rtf/rtffly.cxx +++ b/sw/source/filter/rtf/rtffly.cxx @@ -64,15 +64,9 @@ #include #include #include -#ifndef __SGI_STL_DEQUE #include -#endif -#ifndef __SGI_STL_MAP #include -#endif -#ifndef __SGI_STL_UTILITY #include -#endif // --> OD 2004-06-30 #i27767# #include // <-- @@ -82,6 +76,7 @@ #include "dcontact.hxx" // <-- + using namespace ::com::sun::star; #define ANCHOR(p) ((SwFmtAnchor*)p) @@ -459,7 +454,7 @@ void SwRTFParser::SetFlysInDoc() SwFlyFrmFmt* pFmt = pDoc->MakeFlyFrmFmt( aEmptyStr, pParent ); pFmt->SetFmtAttr( pFlySave->aFlySet ); const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); - if( FLY_IN_CNTNT != rAnchor.GetAnchorId() ) + if (FLY_AS_CHAR != rAnchor.GetAnchorId()) { // korrigiere noch den Absatz, ist immer der vorhergehende ! // JP 20.09.95: wenn es diesen gibt! (DocAnfang!) @@ -568,7 +563,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet ) // RTF-Defaults setzen: // --> OD 2004-06-24 #i27767# - SwFmtAnchor aAnchor( FLY_AT_CNTNT ); + SwFmtAnchor aAnchor( FLY_AT_PARA ); SwFmtHoriOrient aHori( 0, text::HoriOrientation::LEFT, text::RelOrientation::FRAME ); SwFmtVertOrient aVert( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ); @@ -844,7 +839,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet ) switch( GetNextToken() ) { case RTF_FLY_PAGE: - aAnchor.SetType( FLY_PAGE ); + aAnchor.SetType( FLY_AT_PAGE ); aAnchor.SetPageNum( USHORT(nTokenValue)); aAnchor.SetAnchor( 0 ); break; @@ -854,7 +849,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet ) SwNodeIndex aIdx( pPam->GetPoint()->nNode ); pDoc->GetNodes().GoPrevious( &aIdx ); SwPosition aPos( aIdx ); - aAnchor.SetType( FLY_AT_CNTNT ); + aAnchor.SetType( FLY_AT_PARA ); aAnchor.SetAnchor( &aPos ); } break; @@ -1288,7 +1283,7 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf, RES_VERT_ORIENT,*/ RES_ANCHOR ); const SwPosition* pPos = pPam->GetPoint(); - SwFmtAnchor aAnchor( FLY_IN_CNTNT ); + SwFmtAnchor aAnchor( FLY_AS_CHAR ); aAnchor.SetAnchor( pPos ); aFlySet.Put( aAnchor ); aFlySet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP )); diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index 0cac44fb90..a698afb4cc 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -35,18 +35,14 @@ #include -#ifndef __RSC //autogen #include -#endif #include #include #include #include #include #include -#ifndef _SVX_TSTPITEM_HXX //autogen #include -#endif #include #include #include @@ -82,18 +78,14 @@ #include #include #include -#ifndef _SECTIOM_HXX #include -#endif #include #include #include #include #include #include -#ifndef _CMDID_H #include -#endif #ifndef _STATSTR_HRC #include // ResId fuer Statusleiste #endif @@ -471,8 +463,8 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() ) for ( USHORT nI = pFrmFmts->Count(); nI; --nI ) { const SwFmtAnchor & rAnchor = (*pFrmFmts)[ nI - 1 ]->GetAnchor(); - if ( FLY_AT_CNTNT == rAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) + if ((FLY_AT_PARA == rAnchor.GetAnchorId()) || + (FLY_AT_CHAR == rAnchor.GetAnchorId())) { const SwPosition * pObjPos = rAnchor.GetCntntAnchor(); if ( pObjPos && nNodeIdx == pObjPos->nNode.GetIndex() ) @@ -1270,14 +1262,7 @@ void SwRTFParser::ReadDrawingObject() sw::util::SetLayer aSetLayer(*pDoc); aSetLayer.SendObjectToHeaven(*pStroke); */ - /* - FLY_AT_CNTNT, //Absatzgebundener Rahmen - FLY_IN_CNTNT, //Zeichengebundener Rahmen - FLY_PAGE, //Seitengebundener Rahmen - FLY_AT_FLY, //Rahmengebundener Rahmen ( LAYER_IMPL ) - FLY_AUTO_CNTNT, //Automatisch positionierter, absatzgebundener Rahmen - */ - SwFmtAnchor aAnchor( FLY_AT_CNTNT ); + SwFmtAnchor aAnchor( FLY_AT_PARA ); aAnchor.SetAnchor( pPam->GetPoint() ); aFlySet.Put( aAnchor ); @@ -1343,7 +1328,7 @@ void SwRTFParser::InsertShpObject(SdrObject* pStroke, int _nZOrder) SwFmtFollowTextFlow aFollowTextFlow( FALSE ); aFlySet.Put( aFollowTextFlow ); - SwFmtAnchor aAnchor( FLY_AT_CNTNT ); + SwFmtAnchor aAnchor( FLY_AT_PARA ); aAnchor.SetAnchor( pPam->GetPoint() ); aFlySet.Put( aAnchor ); @@ -3710,8 +3695,9 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc ) xub_StrLen nPos = pPam->GetPoint()->nContent.GetIndex(); SfxItemSet aSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); - aSet.Put( SwFmtAnchor( FLY_IN_CNTNT )); - pHdFtFmt = pDoc->MakeFlySection( FLY_IN_CNTNT, pPam->GetPoint(), &aSet ); + aSet.Put( SwFmtAnchor( FLY_AS_CHAR )); + pHdFtFmt = pDoc->MakeFlySection( FLY_AS_CHAR, + pPam->GetPoint(), &aSet ); pTxtAttr = pPam->GetNode()->GetTxtNode()->GetTxtAttrForCharAt( nPos, RES_TXTATR_FLYCNT ); diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx index 7f2179d3ec..275f421266 100644 --- a/sw/source/filter/rtf/wrtrtf.cxx +++ b/sw/source/filter/rtf/wrtrtf.cxx @@ -46,9 +46,7 @@ #include #include #include -#ifndef _SVX_TSTPITEM_HXX //autogen #include -#endif #include #include #include @@ -85,6 +83,7 @@ #include #include + #if defined(UNX) const sal_Char SwRTFWriter::sNewLine = '\012'; #else @@ -1129,7 +1128,7 @@ bool ExportAsInline(const SwFlyFrmFmt& rFlyFrmFmt) { //if not an inline element (hack in our limitations here as to only //graphics like this!!!! - return rFlyFrmFmt.GetAnchor().GetAnchorId() == FLY_IN_CNTNT; + return rFlyFrmFmt.GetAnchor().GetAnchorId() == FLY_AS_CHAR; } void SwRTFWriter::OutRTFFlyFrms(const SwFlyFrmFmt& rFlyFrmFmt) @@ -1779,7 +1778,7 @@ short SwRTFWriter::TrueFrameDirection(const SwFrmFmt &rFlyFmt) const { pItem = 0; const SwFmtAnchor* pAnchor = &pFlyFmt2->GetAnchor(); - if( FLY_PAGE != pAnchor->GetAnchorId() && + if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) && pAnchor->GetCntntAnchor() ) { pFlyFmt2 = pAnchor->GetCntntAnchor()->nNode. diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx index bf79021866..b1d19915f4 100644 --- a/sw/source/filter/ww1/fltshell.cxx +++ b/sw/source/filter/ww1/fltshell.cxx @@ -35,9 +35,7 @@ #include #include -#ifndef _GRAPH_HXX //autogen #include -#endif #include #include #include @@ -72,13 +70,12 @@ #include // class SwSection #include // class SwSelBoxes #include -#ifndef _DOCSH_HXX #include // class SwDocSh -#endif #include #include #include + #define MAX_FIELDLEN 64000 using namespace com::sun::star; @@ -437,7 +434,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry* // Damit die Frames bei Einfuegen in existierendes Doc // erzeugt werden (erst nach Setzen des Ankers!): if(pDoc->GetRootFrm() - && FLY_AT_CNTNT == pFmt->GetAnchor().GetAnchorId()) + && (FLY_AT_PARA == pFmt->GetAnchor().GetAnchorId())) { pFmt->MakeFrms(); } @@ -1285,7 +1282,7 @@ SwFltOutBase::~SwFltOutBase() } SwFltOutBase::SwFltOutBase(SwDoc& rDocu) - : rDoc(rDocu), eFlyAnchor(FLY_AT_CNTNT), bFlyAbsPos(false) + : rDoc(rDocu), eFlyAnchor(FLY_AT_PARA), bFlyAbsPos(false) { } @@ -1702,8 +1699,8 @@ BOOL SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_CNTNT*/, ASSERT( FALSE, "SetFlyAnchor() ohne Fly" ); return; } - if( eAnchor == FLY_IN_CNTNT ){ - ASSERT( FALSE, "SetFlyAnchor( FLY_IN_CNTNT ) nicht implementiert" ); + if ( eAnchor == FLY_AS_CHAR ){ + ASSERT( FALSE, "SetFlyAnchor( FLY_AS_CHAR ) nicht implementiert" ); return; } SwFmtAnchor& rAnchor = (SwFmtAnchor&)GetFlyFrmAttr( RES_ANCHOR ); diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx index 8d3c5701b9..eceaca80dd 100644 --- a/sw/source/filter/ww1/w1sprm.cxx +++ b/sw/source/filter/ww1/w1sprm.cxx @@ -31,9 +31,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - - - #include #include @@ -46,10 +43,7 @@ #include #include #include -#ifndef _SVX_TSTPITEM_HXX //autogen #include -#endif - #include #include @@ -595,13 +589,13 @@ void Ww1SingleSprmPpc::Start( sal_Int16 eVRel; // Seite oder Seitenrand switch ( ( nPpc & 0x30 ) >> 4 ){ // Y - Bindung bestimmt Sw-Bindung - case 0: eAnchor = FLY_AT_CNTNT; // Vert Margin + case 0: eAnchor = FLY_AT_PARA; // Vert Margin eVRel = text::RelOrientation::PRINT_AREA; // if( nYPos < 0 ) // nYPos = 0; // koennen wir nicht break; /* case 1:*/ // Vert. Seite - default:eAnchor = FLY_PAGE; // Vert Page oder unknown + default:eAnchor = FLY_AT_PAGE; // Vert Page oder unknown eVRel = text::RelOrientation::FRAME; break; // 2=Vert. Paragraph, 3=Use Default } diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 861587ff6e..2fe6b50663 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -190,7 +190,7 @@ namespace sw meWriterType(eTxtBox), mpStartFrameContent(0), // --> OD 2007-04-19 #i43447# - move to initialization list - mbIsInline( (rFmt.GetAnchor().GetAnchorId() == FLY_IN_CNTNT) ) + mbIsInline( (rFmt.GetAnchor().GetAnchorId() == FLY_AS_CHAR) ) // <-- { switch (rFmt.Which()) diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index a23f68f813..7cb6aa1386 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -587,7 +587,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const //fHdr/bx/by/wr/wrk/fRcaSimple/fBelowText/fAnchorLock USHORT nFlags=0; //If nFlags isn't 0x14 its overridden by the escher properties - if( FLY_PAGE == rFmt.GetAnchor().GetAnchorId()) + if (FLY_AT_PAGE == rFmt.GetAnchor().GetAnchorId()) nFlags = 0x0000; else nFlags = 0x0014; // x-rel to text, y-rel to text @@ -2117,7 +2117,7 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri, { const RndStdIds eAnchor = _rFrmFmt.GetAnchor().GetAnchorId(); - if ( FLY_IN_CNTNT == eAnchor || FLY_AT_FLY == eAnchor ) + if ( (FLY_AS_CHAR == eAnchor) || (FLY_AT_FLY == eAnchor) ) { // no conversion for as-character or at frame anchored objects return false; @@ -2166,7 +2166,7 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri, // the fact, that the object is anchored at a paragraph, which has a "column // break before" attribute bool bConvDueToAnchoredAtColBreakPara( false ); - if ( ( eAnchor == FLY_AT_CNTNT || eAnchor == FLY_AUTO_CNTNT ) && + if ( ( (eAnchor == FLY_AT_PARA) || (eAnchor == FLY_AT_CHAR) ) && _rFrmFmt.GetAnchor().GetCntntAnchor() && _rFrmFmt.GetAnchor().GetCntntAnchor()->nNode.GetNode().IsTxtNode() ) { @@ -2403,7 +2403,7 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri, void WinwordAnchoring::SetAnchoring(const SwFrmFmt& rFmt) { const RndStdIds eAnchor = rFmt.GetAnchor().GetAnchorId(); - mbInline = (eAnchor == FLY_IN_CNTNT); + mbInline = (eAnchor == FLY_AS_CHAR); SwFmtHoriOrient rHoriOri = rFmt.GetHoriOrient(); SwFmtVertOrient rVertOri = rFmt.GetVertOrient(); @@ -2487,13 +2487,13 @@ void WinwordAnchoring::SetAnchoring(const SwFrmFmt& rFmt) case text::RelOrientation::FRAME: case text::RelOrientation::FRAME_LEFT: //:-( case text::RelOrientation::FRAME_RIGHT: //:-( - if (eAnchor == FLY_PAGE) + if (eAnchor == FLY_AT_PAGE) mnXRelTo = 1; else mnXRelTo = 2; break; case text::RelOrientation::PRINT_AREA: - if (eAnchor == FLY_PAGE) + if (eAnchor == FLY_AT_PAGE) mnXRelTo = 0; else mnXRelTo = 2; @@ -2515,13 +2515,13 @@ void WinwordAnchoring::SetAnchoring(const SwFrmFmt& rFmt) mnYRelTo = 1; break; case text::RelOrientation::PRINT_AREA: - if (eAnchor == FLY_PAGE) + if (eAnchor == FLY_AT_PAGE) mnYRelTo = 0; else mnYRelTo = 2; break; case text::RelOrientation::FRAME: - if (eAnchor == FLY_PAGE) + if (eAnchor == FLY_AT_PAGE) mnYRelTo = 1; else mnYRelTo = 2; diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 7ef0640ed1..92da903191 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -376,7 +376,7 @@ xub_StrLen SwAttrIter::SearchNext( xub_StrLen nStartPos ) if (nPos >= nStartPos && nPos <= nMinPos) nMinPos = nPos; - if (maFlyIter->GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AUTO_CNTNT) + if (maFlyIter->GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AT_CHAR) { ++nPos; if (nPos >= nStartPos && nPos <= nMinPos) @@ -1301,7 +1301,7 @@ short MSWordExportBase::TrueFrameDirection( const SwFrmFmt &rFlyFmt ) const { pItem = 0; const SwFmtAnchor* pAnchor = &pFlyFmt->GetAnchor(); - if ( FLY_PAGE != pAnchor->GetAnchorId() && + if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) && pAnchor->GetCntntAnchor() ) { pFlyFmt = pAnchor->GetCntntAnchor()->nNode.GetNode().GetFlyFmt(); @@ -1359,7 +1359,7 @@ SvxBrushItem WW8Export::TrueFrameBgBrush(const SwFrmFmt &rFlyFmt) const { pRet = 0; const SwFmtAnchor* pAnchor = &pFlyFmt->GetAnchor(); - if (FLY_PAGE != pAnchor->GetAnchorId() && + if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) && pAnchor->GetCntntAnchor()) { pFlyFmt = @@ -2497,12 +2497,13 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point aOffset -= aPageRect.Pos(); m_rWW8Export.pFlyOffset = &aOffset; - m_rWW8Export.eNewAnchorType = FLY_PAGE; + m_rWW8Export.eNewAnchorType = FLY_AT_PAGE; } m_rWW8Export.mpParentFrame = &rFmt; if ( - m_rWW8Export.bIsInTable && (FLY_PAGE != rAnch.GetAnchorId()) && + m_rWW8Export.bIsInTable && + (FLY_AT_PAGE != rAnch.GetAnchorId()) && !m_rWW8Export.pDoc->GetNodes()[ nStt ]->IsNoTxtNode() ) { @@ -2534,7 +2535,7 @@ void AttributeOutputBase::OutputFlyFrame( const sw::Frame& rFmt ) Point* pLayPos; bool bValidNdPos = false, bValidPgPos = false; - if ( FLY_PAGE == rFmt.GetFrmFmt().GetAnchor().GetAnchorId() ) + if (FLY_AT_PAGE == rFmt.GetFrmFmt().GetAnchor().GetAnchorId()) { // get the Layout Node-Position. if ( !bValidPgPos ) diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 953f128751..9fc9d23efe 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2899,7 +2899,7 @@ void MSWordExportBase::ExportDocument( bool bWriteAll ) mpParentFrame = 0; pFlyOffset = 0; - eNewAnchorType = FLY_PAGE; + eNewAnchorType = FLY_AT_PAGE; nTxtTyp = TXT_MAINTEXT; // --> OD 2007-04-19 #i43447# - removed // nFlyWidth = nFlyHeight = 0; diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index ed3d1b3b7e..b8ed5cf3e3 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -404,7 +404,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame) const SwFrmFmt &rFlyFmt = rFrame.GetFrmFmt(); const RndStdIds eAn = rFlyFmt.GetAttrSet().GetAnchor(false).GetAnchorId(); - if( eAn == FLY_IN_CNTNT ) + if (eAn == FLY_AS_CHAR) { sal_Int16 eVert = rFlyFmt.GetVertOrient().GetVertOrient(); if ((eVert == text::VertOrientation::CHAR_CENTER) || (eVert == text::VertOrientation::LINE_CENTER)) @@ -465,8 +465,8 @@ void WW8Export::OutGrf(const sw::Frame &rFrame) // Otherwise, an additional paragraph is exported for a graphic, which is // forced to be treated as inline, because it's anchored inside another frame. if ( !rFrame.IsInline() && - ( ( eAn == FLY_AT_CNTNT && ( bWrtWW8 || !bIsInTable ) ) || - eAn == FLY_PAGE ) ) + ( ((eAn == FLY_AT_PARA) && ( bWrtWW8 || !bIsInTable )) || + (eAn == FLY_AT_PAGE)) ) // <-- { WriteChar( (char)0x0d ); // umgebenden Rahmen mit CR abschliessen diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index f9117f8c13..288a415223 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -4069,15 +4069,15 @@ void WW8AttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor ) BYTE nP = 0; switch ( rAnchor.GetAnchorId() ) { - case FLY_PAGE: + case FLY_AT_PAGE: // Vert: Page | Horz: Page nP |= (1 << 4) | (2 << 6); break; // Im Fall eine Flys als Zeichen: Absatz-gebunden setzen!!! case FLY_AT_FLY: - case FLY_AUTO_CNTNT: - case FLY_AT_CNTNT: - case FLY_IN_CNTNT: + case FLY_AT_CHAR: + case FLY_AT_PARA: + case FLY_AS_CHAR: // Vert: Page | Horz: Page nP |= (2 << 4) | (0 << 6); break; diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx index fe7fb79e01..9c04cb7524 100644 --- a/sw/source/filter/ww8/ww8glsy.cxx +++ b/sw/source/filter/ww8/ww8glsy.cxx @@ -36,14 +36,10 @@ #include #include #include -#ifndef _NDTXT #include -#endif #include #include -#ifndef _DOCSH_HXX #include -#endif #include #include #include @@ -51,6 +47,7 @@ #include "ww8glsy.hxx" #include "ww8par.hxx" + WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, BYTE nVersion, SvStorage *pStg) : pGlossary(0), rStrm(refStrm), xStg(pStg), nStrings(0) @@ -82,10 +79,10 @@ bool WW8Glossary::HasBareGraphicEnd(SwDoc *pDoc,SwNodeIndex &rIdx) RES_DRAWFRMFMT != pFrmFmt->Which() ) continue; const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); - const SwPosition* pAPos; - if( ( FLY_AT_CNTNT == rAnchor.GetAnchorId() || - FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) && - 0 != ( pAPos = rAnchor.GetCntntAnchor()) && + SwPosition const*const pAPos = rAnchor.GetCntntAnchor(); + if (pAPos && + ((FLY_AT_PARA == rAnchor.GetAnchorId()) || + (FLY_AT_CHAR == rAnchor.GetAnchorId())) && rIdx == pAPos->nNode.GetIndex() ) { bRet=true; diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 4948ac5edd..cc17df6256 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -58,9 +58,7 @@ #include #include #include -#ifndef _SVX_CNTRITEM_HXX #include -#endif #include #include #include @@ -191,13 +189,13 @@ bool SwWW8ImplReader::ReadGrafStart(void* pData, short nDataSiz, } pStrm->Read(pData, nDataSiz); - RndStdIds eAnchor = (SVBT8ToByte(pDo->by) < 2) ? FLY_PAGE : FLY_AT_CNTNT; + RndStdIds eAnchor = (SVBT8ToByte(pDo->by) < 2) ? FLY_AT_PAGE : FLY_AT_PARA; rSet.Put(SwFmtAnchor(eAnchor)); nDrawXOfs2 = nDrawXOfs; nDrawYOfs2 = nDrawYOfs; - if( eAnchor == FLY_AT_CNTNT ) + if (eAnchor == FLY_AT_PARA) { if( SVBT8ToByte( pDo->bx ) == 1 ) // Pos: echt links nDrawXOfs2 = static_cast< short >(nDrawXOfs2 - maSectionManager.GetPageLeft()); @@ -2247,7 +2245,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord, { ASSERT(pRecord || pFSPA, "give me something! to work with for anchoring"); if (!pRecord && !pFSPA) - return FLY_PAGE; + return FLY_AT_PAGE; SvxMSDffImportRec aRecordFromFSPA; if (!pRecord) @@ -2298,7 +2296,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord, UINT32 nYRelTo = nCntRelTo > pRecord->nYRelTo ? pRecord->nYRelTo : 1; // --> OD 2005-03-03 #i43718# - RndStdIds eAnchor = IsInlineEscherHack() ? FLY_IN_CNTNT : FLY_AUTO_CNTNT; + RndStdIds eAnchor = IsInlineEscherHack() ? FLY_AS_CHAR : FLY_AT_CHAR; // <-- SwFmtAnchor aAnchor( eAnchor ); @@ -2462,7 +2460,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord, if ( (pFSPA->nYaTop < 0) && (eVertOri == text::VertOrientation::NONE) && - ((eAnchor == FLY_AT_CNTNT) || (eAnchor == FLY_AUTO_CNTNT)) + ((eAnchor == FLY_AT_PARA) || (eAnchor == FLY_AT_CHAR)) ) { maTracer.Log(sw::log::eNegativeVertPlacement); @@ -2845,7 +2843,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) SwFrmFmt *SwWW8ImplReader::AddAutoAnchor(SwFrmFmt *pFmt) { - if (pFmt && (pFmt->GetAnchor().GetAnchorId() != FLY_IN_CNTNT)) + if (pFmt && (pFmt->GetAnchor().GetAnchorId() != FLY_AS_CHAR)) { sal_uInt16 nTextAreaWidth = static_cast< sal_uInt16 >( maSectionManager.GetPageWidth() - maSectionManager.GetPageRight() - maSectionManager.GetPageLeft()); @@ -2860,8 +2858,10 @@ SwFrmFmt *SwWW8ImplReader::AddAutoAnchor(SwFrmFmt *pFmt) * * Leave to later and set the correct location then. */ - if ((pFmt) && (pFmt->GetAnchor().GetAnchorId() != FLY_IN_CNTNT)) + if ((pFmt) && (pFmt->GetAnchor().GetAnchorId() != FLY_AS_CHAR)) + { pAnchorStck->AddAnchor(*pPaM->GetPoint(), pFmt); + } return pFmt; } @@ -3234,7 +3234,7 @@ void SwWW8ImplReader::GrafikDtor() void SwWW8FltAnchorStack::AddAnchor(const SwPosition& rPos, SwFrmFmt *pFmt) { - ASSERT(pFmt->GetAnchor().GetAnchorId() != FLY_IN_CNTNT, + ASSERT(pFmt->GetAnchor().GetAnchorId() != FLY_AS_CHAR, "Don't use fltanchors with inline frames, slap!"); NewAttr(rPos, SwFltAnchor(pFmt)); } diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx index 0472567812..a6a19629f6 100644 --- a/sw/source/filter/ww8/ww8graf2.cxx +++ b/sw/source/filter/ww8/ww8graf2.cxx @@ -33,9 +33,7 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */ -#ifndef __SGI_STL_ITERATOR #include -#endif #include #include #include @@ -415,7 +413,7 @@ SwFlyFrmFmt* SwWW8ImplReader::MakeGrafNotInCntnt(const WW8PicDesc& rPD, // Damit die Frames bei Einfuegen in existierendes Doc erzeugt werden: if (rDoc.GetRootFrm() && - (FLY_AT_CNTNT == pFlyFmt->GetAnchor().GetAnchorId())) + (FLY_AT_PARA == pFlyFmt->GetAnchor().GetAnchorId())) { pFlyFmt->MakeFrms(); } @@ -548,9 +546,11 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, // it is anchored in content; because this anchor add // a character into the textnode. // IussueZilla task 2806 - if( FLY_IN_CNTNT == + if (FLY_AS_CHAR == pFlyFmtOfJustInsertedGraphic->GetAnchor().GetAnchorId() ) + { aFlySet.ClearItem( RES_ANCHOR ); + } pFlyFmtOfJustInsertedGraphic->SetFmtAttr( aFlySet ); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index c73394f7b4..9bb61645b4 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1648,7 +1648,7 @@ void SwWW8ImplReader::Read_HdFtTextAsHackedFrame(long nStart, long nLen, pPaM->GetPoint()->nNode = pSttIdx->GetIndex() + 1; pPaM->GetPoint()->nContent.Assign(pPaM->GetCntntNode(), 0); - SwFlyFrmFmt *pFrame = rDoc.MakeFlySection(FLY_AT_CNTNT, pPaM->GetPoint()); + SwFlyFrmFmt *pFrame = rDoc.MakeFlySection(FLY_AT_PARA, pPaM->GetPoint()); pFrame->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, nPageWidth, MINLAY)); pFrame->SetFmtAttr(SwFmtSurround(SURROUND_THROUGHT)); diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index b737fc1102..858fabd14a 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -3473,7 +3473,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp) // --> OD 2005-03-21 #i45301# - anchor nested table inside Writer fly frame // only at-character, if absolute position object attributes are available. // Thus, default anchor type is as-character anchored. - RndStdIds eAnchor( FLY_IN_CNTNT ); + RndStdIds eAnchor( FLY_AS_CHAR ); // <-- if ( nInTable ) { @@ -3505,7 +3505,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp) // <-- // --> OD 2005-03-21 #i45301# - anchor nested table Writer fly // frame at-character - eAnchor = FLY_AUTO_CNTNT; + eAnchor = FLY_AT_CHAR; // <-- } } @@ -3523,7 +3523,8 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp) "how could we be in a local apo and have no apo"); } - if ( eAnchor == FLY_AUTO_CNTNT && !maTableStack.empty() && !InEqualApo(nNewInTable) ) + if ((eAnchor == FLY_AT_CHAR) + && !maTableStack.empty() && !InEqualApo(nNewInTable) ) { pTableDesc->pParentPos = new SwPosition(*pPaM->GetPoint()); SfxItemSet aItemSet(rDoc.GetAttrPool(), @@ -3551,7 +3552,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp) if ( pTableWFlyPara && pTableSFlyPara ) { WW8FlySet aFlySet( *this, pTableWFlyPara, pTableSFlyPara, false ); - SwFmtAnchor aAnchor( FLY_AUTO_CNTNT ); + SwFmtAnchor aAnchor( FLY_AT_CHAR ); aAnchor.SetAnchor( pTableDesc->pParentPos ); aFlySet.Put( aAnchor ); pTableDesc->pFlyFmt->SetFmtAttr( aFlySet ); @@ -3606,8 +3607,8 @@ bool lcl_PamContainsFly(SwPaM & rPam) switch (pAnchor->GetAnchorId()) { - case FLY_AT_CNTNT: - case FLY_AUTO_CNTNT: + case FLY_AT_PARA: + case FLY_AT_CHAR: { const SwPosition* pAPos = pAnchor->GetCntntAnchor(); diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index f36ebeda5d..0251f12081 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -35,12 +35,8 @@ #include "writerhelper.hxx" #include -#ifndef __SGI_STL_ALGORITHM #include -#endif -#ifndef __SGI_STL_FUNCTIONAL #include -#endif #include #include #include @@ -59,9 +55,7 @@ #include #include #include -#ifndef _DOCSH_HXX #include // fuer Ole-Node -#endif #include // Progress #include #include @@ -296,7 +290,7 @@ SwFrmFmt* SwWW8ImplReader::ImportOle(const Graphic* pGrf, if (!mbNewDoc) Reader::ResetFrmFmtAttrs( *pTempSet ); - SwFmtAnchor aAnchor( FLY_IN_CNTNT ); + SwFmtAnchor aAnchor( FLY_AS_CHAR ); aAnchor.SetAnchor( pPaM->GetPoint() ); pTempSet->Put( aAnchor ); diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 3cded67e9f..df8df85699 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -45,17 +45,11 @@ #include #include -#ifndef _UCBHELPER_CONTENT_HXX_ #include -#endif -#ifndef _UCBHELPER_CONTENTBROKER_HXX_ #include -#endif #include -#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_ #include -#endif #include #include #include @@ -2216,7 +2210,7 @@ eF_ResT SwWW8ImplReader::Read_F_IncludePicture( WW8FieldDesc*, String& rStr ) */ SfxItemSet aFlySet( rDoc.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); - aFlySet.Put( SwFmtAnchor( FLY_IN_CNTNT ) ); + aFlySet.Put( SwFmtAnchor( FLY_AS_CHAR ) ); aFlySet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME )); pFlyFmtOfJustInsertedGraphic = rDoc.Insert( *pPaM, aGrfName, diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 64143da9d8..202286bde1 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -44,9 +44,7 @@ #include #include #include -#ifndef _SVX_CNTRITEM_HXX //autogen #include -#endif #include #include #include @@ -65,19 +63,13 @@ #include #include #include -#ifndef _SVX_TSTPITEM_HXX //autogen #include -#endif #include #include -#ifndef _SVX_EMPHITEM_HXX //autogen #include -#endif #include #include -#ifndef _SVX_SCRIPSPACEITEM_HXX #include -#endif #include #include #include @@ -1995,7 +1987,7 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM, nYBind = (( rWW.nSp29 & 0x30 ) >> 4); // --> OD 2005-08-24 #i53725# - absolute positioned objects have to be // anchored at-paragraph to assure its correct anchor position. - eAnchor = FLY_AT_CNTNT; + eAnchor = FLY_AT_PARA; // <-- switch (nYBind) { @@ -2287,7 +2279,7 @@ void WW8FlySet::Init(const SwWW8ImplReader& rReader, const SwPaM* pPaM) Reader::ResetFrmFmtAttrs(*this); // Abstand/Umrandung raus Put(SvxLRSpaceItem(RES_LR_SPACE)); //inline writer ole2 objects start with 0.2cm l/r - SwFmtAnchor aAnchor(FLY_IN_CNTNT); + SwFmtAnchor aAnchor(FLY_AS_CHAR); aAnchor.SetAnchor(pPaM->GetPoint()); Put(aAnchor); @@ -2519,8 +2511,10 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, pWWZOrder->InsertTextLayerObject(pOurNewObject); } - if (FLY_IN_CNTNT != pSFlyPara->eAnchor) + if (FLY_AS_CHAR != pSFlyPara->eAnchor) + { pAnchorStck->AddAnchor(*pPaM->GetPoint(),pSFlyPara->pFlyFmt); + } // merke Pos im Haupttext pSFlyPara->pMainTextPos = new SwPosition( *pPaM->GetPoint() ); @@ -3206,7 +3200,7 @@ SwFrmFmt *SwWW8ImplReader::ContainsSingleInlineGraphic(const SwPaM &rRegion) subscripting to force the graphic into a centered position on the line, so we must check when applying sub/super to see if it the subscript range contains only a single graphic, and if that graphic is anchored as - FLY_IN_CNTNT and then we can change its anchoring to centered in the line. + FLY_AS_CHAR and then we can change its anchoring to centered in the line. */ SwFrmFmt *pRet=0; SwNodeIndex aBegin(rRegion.Start()->nNode); @@ -3223,8 +3217,8 @@ SwFrmFmt *SwWW8ImplReader::ContainsSingleInlineGraphic(const SwPaM &rRegion) { const SwFmtFlyCnt& rFly = pTFlyAttr->GetFlyCnt(); SwFrmFmt *pFlyFmt = rFly.GetFrmFmt(); - if( pFlyFmt && - FLY_IN_CNTNT == pFlyFmt->GetAnchor().GetAnchorId() ) + if (pFlyFmt && + (FLY_AS_CHAR == pFlyFmt->GetAnchor().GetAnchorId())) { pRet = pFlyFmt; } @@ -3240,7 +3234,7 @@ bool SwWW8ImplReader::ConvertSubToGraphicPlacement() subscripting to force the graphic into a centered position on the line, so we must check when applying sub/super to see if it the subscript range contains only a single graphic, and if that graphic is anchored as - FLY_IN_CNTNT and then we can change its anchoring to centered in the line. + FLY_AS_CHAR and then we can change its anchoring to centered in the line. */ bool bIsGraphicPlacementHack = false; USHORT nPos; diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 160aa2286a..72fe426da2 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -47,9 +47,7 @@ #include #include #include -#ifndef _XMLOFF_TXTPRMAP_HXX #include -#endif #include #include "unocrsr.hxx" #include "unoobj.hxx" @@ -76,6 +74,7 @@ #include #include + using ::rtl::OUString; using ::rtl::OUStringBuffer; using namespace ::com::sun::star; @@ -126,7 +125,7 @@ static void lcl_putHeightAndWidth ( SfxItemSet &rItemSet, rItemSet.Put( SwFmtFrmSize( ATT_FIX_SIZE, nWidth, nHeight ) ); } - SwFmtAnchor aAnchor( FLY_AUTO_CNTNT ); + SwFmtAnchor aAnchor( FLY_AT_CHAR ); rItemSet.Put( aAnchor ); if( pTwipWidth ) diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx index e300e0d322..b31b84e86d 100644 --- a/sw/source/ui/app/appenv.cxx +++ b/sw/source/ui/app/appenv.cxx @@ -43,18 +43,12 @@ #include #include -#ifndef _APP_HXX //autogen #include -#endif -#ifndef _WRKWIN_HXX //autogen #include -#endif #include #include #include -#ifndef _MSGBOX_HXX //autogen #include -#endif #include #include #include @@ -67,21 +61,13 @@ #include #include #include -#ifndef _VIEW_HXX #include -#endif -#ifndef _DOCSH_HXX #include -#endif #include #include #include -#ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED #include -#endif -#ifndef _DBMGR_HXX #include -#endif #include #include #include @@ -91,9 +77,7 @@ #include #include -#ifndef _CMDID_H #include -#endif #ifndef _GLOBALS_HRC #include #endif @@ -478,7 +462,7 @@ static USHORT nTitleNo = 0; if (rItem.bSend) { pSh->SttEndDoc(TRUE); - aMgr.InsertFlyFrm(FLY_PAGE, + aMgr.InsertFlyFrm(FLY_AT_PAGE, Point(rItem.lSendFromLeft + lLeft, rItem.lSendFromTop + lUpper), Size (rItem.lAddrFromLeft - rItem.lSendFromLeft, 0)); @@ -494,7 +478,7 @@ static USHORT nTitleNo = 0; // Empfaenger pSh->SttEndDoc(TRUE); - aMgr.InsertFlyFrm(FLY_PAGE, + aMgr.InsertFlyFrm(FLY_AT_PAGE, Point(rItem.lAddrFromLeft + lLeft, rItem.lAddrFromTop + lUpper), Size (nPageW - rItem.lAddrFromLeft - 566, 0)); pSh->EnterSelFrmMode(); diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index 889b131c14..a90c3beeaf 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -39,15 +39,9 @@ #include -#ifndef _APP_HXX //autogen #include -#endif -#ifndef _WRKWIN_HXX //autogen #include -#endif -#ifndef _MSGBOX_HXX //autogen #include -#endif #include #include #include @@ -71,21 +65,13 @@ #include #include #include -#ifndef _VIEW_HXX #include -#endif -#ifndef _DOCSH_HXX #include -#endif #include #include #include -#ifndef _CMDID_H #include -#endif -#ifndef _DBMGR_HXX #include -#endif #include #include #include @@ -126,7 +112,7 @@ const SwFrmFmt *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem, sal_uInt16 nPhyPageNum, nVirtPageNum; rSh.GetPageNum( nPhyPageNum, nVirtPageNum ); - aSet.Put(SwFmtAnchor(bPage ? FLY_IN_CNTNT : FLY_PAGE, nPhyPageNum)); + aSet.Put(SwFmtAnchor(bPage ? FLY_AS_CHAR : FLY_AT_PAGE, nPhyPageNum)); if (!bPage) { aSet.Put(SwFmtHoriOrient(rItem.lLeft + nCol * rItem.lHDist, @@ -166,7 +152,7 @@ const SwFrmFmt *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& rItem, sal_uInt16 nPhyPageNum, nVirtPageNum; rSh.GetPageNum( nPhyPageNum, nVirtPageNum ); - aSet.Put(SwFmtAnchor(bPage ? FLY_IN_CNTNT : FLY_PAGE, nPhyPageNum)); + aSet.Put(SwFmtAnchor(bPage ? FLY_AS_CHAR : FLY_AT_PAGE, nPhyPageNum)); if (!bPage) { aSet.Put(SwFmtHoriOrient(rItem.lLeft + nCol * rItem.lHDist, diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index ea475f8bb6..c1f35143e8 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -42,9 +42,7 @@ #include #include #include -#ifndef _VIEW_HXX #include -#endif #include #include #include @@ -56,9 +54,7 @@ #include #include #include -#ifndef _DOCSH_HXX #include -#endif #include #include #include @@ -325,7 +321,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame( RES_FRM_SIZE, RES_FRM_SIZE, RES_SURROUND, RES_SURROUND, 0 ); - aSet.Put(SwFmtAnchor(FLY_PAGE, 1)); + aSet.Put(SwFmtAnchor(FLY_AT_PAGE, 1)); if(bAlignLeft) aSet.Put(SwFmtHoriOrient( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_PRINT_AREA )); else diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx index abda1181f3..c674c1070a 100644 --- a/sw/source/ui/dialog/regionsw.cxx +++ b/sw/source/ui/dialog/regionsw.cxx @@ -36,37 +36,24 @@ #include #include #include -#ifndef _MSGBOX_HXX //autogen #include -#endif #include #include #include -#ifndef _PASSWD_HXX //autogen #include -#endif #include #include #include #include -#ifndef _SVX_SIZEITEM_HXX //autogen - #include -#endif #include #include #include #include -#ifndef _BASESH_HXX #include -#endif -#ifndef _WDOCSH_HXX #include -#endif -#ifndef _VIEW_HXX #include -#endif #include #include #include // fuer Undo-Ids @@ -75,12 +62,8 @@ #include #include -#ifndef _HELPID_H #include -#endif -#ifndef _CMDID_H #include -#endif #ifndef _REGIONSW_HRC #include #endif @@ -118,7 +101,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) if (!pSet || pSet->Count()==0) { SwRect aRect; - rSh.CalcBoundRect(aRect, FLY_IN_CNTNT); + rSh.CalcBoundRect(aRect, FLY_AS_CHAR); long nWidth = aRect.Width(); aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth)); @@ -154,7 +137,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) { SwFmtCol aCol; SwRect aRect; - rSh.CalcBoundRect(aRect, FLY_IN_CNTNT); + rSh.CalcBoundRect(aRect, FLY_AS_CHAR); long nWidth = aRect.Width(); USHORT nCol = ((SfxUInt16Item *)pItem)->GetValue(); @@ -232,7 +215,7 @@ IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSection*, pSect ) SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE, 0); SwRect aRect; - pThis->CalcBoundRect(aRect, FLY_IN_CNTNT); + pThis->CalcBoundRect(aRect, FLY_AS_CHAR); long nWidth = aRect.Width(); aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth)); // Hoehe=Breite fuer konsistentere Vorschau (analog zu Bereich bearbeiten) diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 0f45470c91..4433f0ca88 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -50,16 +50,12 @@ #include #include #include -#ifndef __SBX_SBXVARIABLE_HXX //autogen #include -#endif #include #include #include #include -#ifndef _SFX_CLIENTSH_HXX #include -#endif #include #include #include @@ -69,9 +65,6 @@ #include #include #include -//#ifndef _SVDVMARK_HXX //autogen -//#include -//#endif #include #include #include @@ -128,12 +121,8 @@ #include #include -#ifndef _HELPID_H #include -#endif -#ifndef _CMDID_H #include -#endif #ifndef _DOCVW_HRC #include #endif @@ -1019,7 +1008,7 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb ) default: ASSERT( TRUE, "ChangeFly: Unknown direction." ); } BOOL bSet = FALSE; - if( FLY_IN_CNTNT == eAnchorId && ( nDir % 2 ) ) + if ((FLY_AS_CHAR == eAnchorId) && ( nDir % 2 )) { long aDiff = aTmp.Top() - aRefPoint.Y(); if( aDiff > 0 ) @@ -1064,7 +1053,8 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb ) aSet.Put( aVert ); bSet = TRUE; } - if( bWeb && FLY_AT_CNTNT == eAnchorId && ( nDir==MOVE_LEFT_SMALL || nDir==MOVE_RIGHT_BIG ) ) + if (bWeb && (FLY_AT_PARA == eAnchorId) + && ( nDir==MOVE_LEFT_SMALL || nDir==MOVE_RIGHT_BIG )) { SwFmtHoriOrient aHori( (SwFmtHoriOrient&)aSet.Get(RES_HORI_ORIENT) ); sal_Int16 eNew; @@ -1091,11 +1081,13 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb ) rSh.StartAllAction(); if( bSet ) rSh.SetFlyFrmAttr( aSet ); - BOOL bSetPos = FLY_IN_CNTNT != eAnchorId; + BOOL bSetPos = (FLY_AS_CHAR != eAnchorId); if(bSetPos && bWeb) { - if(FLY_PAGE != eAnchorId) + if (FLY_AT_PAGE != eAnchorId) + { bSetPos = FALSE; + } else { bSetPos = (::GetHtmlMode(rView.GetDocShell()) & HTMLMODE_SOME_ABS_POS) ? @@ -1185,7 +1177,8 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) BOOL bDummy; const bool bVertAnchor = rSh.IsFrmVertical( TRUE, bDummy ); const bool bHoriMove = !bVertAnchor == !( nDir % 2 ); - const bool bMoveAllowed = !bHoriMove || rSh.GetAnchorId() != FLY_IN_CNTNT; + const bool bMoveAllowed = + !bHoriMove || (rSh.GetAnchorId() != FLY_AS_CHAR); if ( bMoveAllowed ) { // <-- diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 46969d633f..7e951d1b8e 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -125,7 +125,7 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) : FreeResource(); SwRect aRect; - rWrtShell.CalcBoundRect(aRect, FLY_IN_CNTNT); + rWrtShell.CalcBoundRect(aRect, FLY_AS_CHAR); nSelectionWidth = aRect.Width(); diff --git a/sw/source/ui/frmdlg/frmmgr.cxx b/sw/source/ui/frmdlg/frmmgr.cxx index 1d649e833a..91f05dc18d 100644 --- a/sw/source/ui/frmdlg/frmmgr.cxx +++ b/sw/source/ui/frmdlg/frmmgr.cxx @@ -31,12 +31,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - - #include "cmdid.h" #include "hintids.hxx" - #include #include #include @@ -212,11 +209,11 @@ void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType, const Size &rSize, BOOL bAbs ) { - ASSERT( eAnchorType == FLY_PAGE || - eAnchorType == FLY_AT_CNTNT || - eAnchorType == FLY_AUTO_CNTNT || - eAnchorType == FLY_AT_FLY || - eAnchorType == FLY_IN_CNTNT, "Rahmentyp nicht erlaubt" ); + ASSERT( eAnchorType == FLY_AT_PAGE || + eAnchorType == FLY_AT_PARA || + eAnchorType == FLY_AT_CHAR || + eAnchorType == FLY_AT_FLY || + eAnchorType == FLY_AS_CHAR, "invalid frame type" ); if ( bAbs ) SetAbsPos( rPos ); @@ -238,8 +235,8 @@ void SwFlyFrmAttrMgr::SetAnchor( RndStdIds eId ) pOwnSh->GetPageNum( nPhyPageNum, nVirtPageNum ); aSet.Put( SwFmtAnchor( eId, nPhyPageNum ) ); - if( FLY_PAGE == eId || FLY_AT_CNTNT == eId || FLY_AUTO_CNTNT == eId - || FLY_AT_FLY == eId ) + if ((FLY_AT_PAGE == eId) || (FLY_AT_PARA == eId) || (FLY_AT_CHAR == eId) + || (FLY_AT_FLY == eId)) { SwFmtVertOrient aVertOrient( GetVertOrient() ); SwFmtHoriOrient aHoriOrient( GetHoriOrient() ); @@ -319,7 +316,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, rVal.nWidth = rVal.nHeight; rVal.nHeight = nTmp; } - if ( eAnchorType == FLY_PAGE || eAnchorType == FLY_AT_FLY ) + if ((eAnchorType == FLY_AT_PAGE) || (eAnchorType == FLY_AT_FLY)) { // MinimalPosition rVal.nMinHPos = aBoundRect.Left(); @@ -369,8 +366,8 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, } // OD 12.11.2003 #i22341# - handle to character anchored objects vertical // aligned at character or top of line in a special case - else if ( eAnchorType == FLY_AT_CNTNT || - ( eAnchorType == FLY_AUTO_CNTNT && + else if ((eAnchorType == FLY_AT_PARA) || + ((eAnchorType == FLY_AT_CHAR) && !(rVal.nVRelOrient == text::RelOrientation::CHAR) && !(rVal.nVRelOrient == text::RelOrientation::TEXT_LINE) ) ) { @@ -437,7 +434,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, // vertical aligned at character or top of line. // Note: (1) positive vertical values are positions above the top of line // (2) negative vertical values are positions below the top of line - else if ( eAnchorType == FLY_AUTO_CNTNT && + else if ( (eAnchorType == FLY_AT_CHAR) && ( rVal.nVRelOrient == text::RelOrientation::CHAR || rVal.nVRelOrient == text::RelOrientation::TEXT_LINE ) ) { @@ -484,7 +481,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, rVal.nMaxHeight = aBoundRect.Height(); } } - else if ( eAnchorType == FLY_IN_CNTNT ) + else if ( eAnchorType == FLY_AS_CHAR ) { rVal.nMinHPos = 0; rVal.nMaxHPos = 0; diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 881de1ba1e..264e0c51c9 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -37,12 +37,8 @@ #include #include -#ifndef _CMDID_H #include -#endif -#ifndef _HELPID_H #include -#endif #include #include #include @@ -68,9 +64,7 @@ #include #include #include -#ifndef _DOCSH_HXX #include -#endif #include #include #include @@ -881,10 +875,10 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) // Allgemeiner Initialisierungteil switch(rAnchor.GetAnchorId()) { - case FLY_PAGE: aAnchorAtPageRB.Check(); break; - case FLY_AT_CNTNT: aAnchorAtParaRB.Check(); break; - case FLY_AUTO_CNTNT: aAnchorAtCharRB.Check(); break; - case FLY_IN_CNTNT: aAnchorAsCharRB.Check(); break; + case FLY_AT_PAGE: aAnchorAtPageRB.Check(); break; + case FLY_AT_PARA: aAnchorAtParaRB.Check(); break; + case FLY_AT_CHAR: aAnchorAtCharRB.Check(); break; + case FLY_AS_CHAR: aAnchorAsCharRB.Check(); break; case FLY_AT_FLY: aAnchorAtFrameRB.Check();break; default:; //prevent warning } @@ -911,7 +905,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) } if( 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS)) { - if(GetAnchor() == FLY_PAGE) + if (GetAnchor() == FLY_AT_PAGE) { aAnchorAtParaRB.Check(); } @@ -1048,8 +1042,10 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet) // Vertikale Position // fuer zeichengebundene Rahmen Offset umrechenen SwTwips nY = static_cast< SwTwips >(aAtVertPosED.Denormalize(aAtVertPosED.GetValue(FUNIT_TWIP))); - if (eAnchorId == FLY_IN_CNTNT) + if (eAnchorId == FLY_AS_CHAR) + { nY *= -1; + } aVertOrient.SetPos( nY ); } pOldItem = GetOldItem(rSet, FN_VERT_ORIENT); @@ -1188,7 +1184,7 @@ void SwFrmPage::InitPos(RndStdIds eId, } BOOL bEnable = TRUE; - if ( eId == FLY_PAGE ) + if ( eId == FLY_AT_PAGE ) { pVMap = bHtmlMode ? aVPageHtmlMap : aVPageMap; pHMap = bHtmlMode ? aHPageHtmlMap : aHPageMap; @@ -1200,7 +1196,7 @@ void SwFrmPage::InitPos(RndStdIds eId, pVMap = bHtmlMode ? aVFlyHtmlMap : aVFrameMap; pHMap = bHtmlMode ? aHFlyHtmlMap : aHFrameMap; } - else if ( eId == FLY_AT_CNTNT ) + else if ( eId == FLY_AT_PARA ) { if(bHtmlMode) { @@ -1213,7 +1209,7 @@ void SwFrmPage::InitPos(RndStdIds eId, pHMap = aHParaMap; } } - else if ( eId == FLY_AUTO_CNTNT ) + else if ( eId == FLY_AT_CHAR ) { if(bHtmlMode) { @@ -1226,7 +1222,7 @@ void SwFrmPage::InitPos(RndStdIds eId, pHMap = aHCharMap; } } - else if ( eId == FLY_IN_CNTNT ) + else if ( eId == FLY_AS_CHAR ) { pVMap = bHtmlMode ? aVAsCharHtmlMap : aVAsCharMap; pHMap = 0; @@ -1257,7 +1253,7 @@ void SwFrmPage::InitPos(RndStdIds eId, FillRelLB(pVMap, nMapPos, nV, nVRel, aVertRelationLB, aVertRelationFT); // Edits init - bEnable = nH == text::HoriOrientation::NONE && eId != FLY_IN_CNTNT;//#61359# warum nicht in Formaten&& !bFormat; + bEnable = nH == text::HoriOrientation::NONE && eId != FLY_AS_CHAR; if (!bEnable) { aAtHorzPosED.SetValue( 0, FUNIT_TWIP ); @@ -1281,7 +1277,7 @@ void SwFrmPage::InitPos(RndStdIds eId, } else { - if ( eId == FLY_IN_CNTNT ) + if ( eId == FLY_AS_CHAR ) { if ( nY == LONG_MAX ) nY = 0; @@ -1608,15 +1604,23 @@ USHORT SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB ) RndStdIds SwFrmPage::GetAnchor() { - RndStdIds nRet = FLY_PAGE; + RndStdIds nRet = FLY_AT_PAGE; if(aAnchorAtParaRB.IsChecked()) - nRet = FLY_AT_CNTNT; + { + nRet = FLY_AT_PARA; + } else if(aAnchorAtCharRB.IsChecked()) - nRet = FLY_AUTO_CNTNT; + { + nRet = FLY_AT_CHAR; + } else if(aAnchorAsCharRB.IsChecked()) - nRet = FLY_IN_CNTNT; + { + nRet = FLY_AS_CHAR; + } else if(aAnchorAtFrameRB.IsChecked()) + { nRet = FLY_AT_FLY; + } return nRet; } @@ -1818,8 +1822,10 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG ) if ( aVal.nHPos != nAtHorzPosVal ) aAtHorzPosED.SetValue(aAtHorzPosED.Normalize(aVal.nHPos), FUNIT_TWIP); - SwTwips nUpperOffset = aVal.nAnchorType == FLY_IN_CNTNT ? nUpperBorder : 0; - SwTwips nLowerOffset = aVal.nAnchorType == FLY_IN_CNTNT ? nLowerBorder : 0; + const SwTwips nUpperOffset = (aVal.nAnchorType == FLY_AS_CHAR) + ? nUpperBorder : 0; + const SwTwips nLowerOffset = (aVal.nAnchorType == FLY_AS_CHAR) + ? nLowerBorder : 0; aAtVertPosED.SetMin(aAtVertPosED.Normalize(aVal.nMinVPos + nLowerOffset + nUpperOffset), FUNIT_TWIP); aAtVertPosED.SetMax(aAtVertPosED.Normalize(aVal.nMaxVPos), FUNIT_TWIP); @@ -1905,7 +1911,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) // Sonderbehandlung fuer HTML-Mode mit horz-vert-Abhaengigkeiten if(bHtmlMode && nHtmlMode&HTMLMODE_SOME_ABS_POS && - FLY_AUTO_CNTNT == (RndStdIds)GetAnchor()) + (FLY_AT_CHAR == GetAnchor())) { BOOL bSet = FALSE; if(bHori) @@ -1977,7 +1983,7 @@ IMPL_LINK( SwFrmPage, RelHdl, ListBox *, pLB ) else bAtVertPosModified = TRUE; - if(bHtmlMode && FLY_AUTO_CNTNT == (RndStdIds)GetAnchor()) // wieder Sonderbehandlung + if (bHtmlMode && (FLY_AT_CHAR == GetAnchor())) { if(bHori) { @@ -2219,7 +2225,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset) nOldV = rVert.GetVertOrient(), nOldVRel = rVert.GetRelationOrient(); - if (eAnchorId == FLY_PAGE) + if (eAnchorId == FLY_AT_PAGE) { if (nOldHRel == text::RelOrientation::FRAME) nOldHRel = text::RelOrientation::PAGE_FRAME; diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index f6ea1dd0db..36f6ed7a00 100644 --- a/sw/source/ui/frmdlg/wrap.cxx +++ b/sw/source/ui/frmdlg/wrap.cxx @@ -36,7 +36,6 @@ #endif - #include "hintids.hxx" #include #include @@ -141,7 +140,7 @@ SwWrapTabPage::SwWrapTabPage(Window *pParent, const SfxItemSet &rSet) : aWrapIL (SW_RES(IL_WRAP)), aWrapILH (SW_RES(ILH_WRAP)), - nAnchorId(FLY_AT_CNTNT), + nAnchorId(FLY_AT_PARA), nHtmlMode(0), pWrtSh(0), @@ -254,10 +253,15 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet) const SwFmtAnchor &rAnch = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR); nAnchorId = rAnch.GetAnchorId(); - if ( (nAnchorId == FLY_AT_CNTNT || nAnchorId == FLY_AUTO_CNTNT) && nSur != SURROUND_NONE ) + if (((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR)) + && (nSur != SURROUND_NONE)) + { aWrapAnchorOnlyCB.Check( rSurround.IsAnchorOnly() ); + } else + { aWrapAnchorOnlyCB.Enable( FALSE ); + } BOOL bContour = rSurround.IsContour(); aWrapOutlineCB.Check( bContour ); @@ -452,7 +456,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) // Anchor const SwFmtAnchor &rAnch = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR); nAnchorId = rAnch.GetAnchorId(); - BOOL bEnable = nAnchorId != FLY_IN_CNTNT; + BOOL bEnable = (nAnchorId != FLY_AS_CHAR); if (!bDrawMode) { @@ -521,7 +525,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) } else { - if (aVal.nAnchorType == FLY_IN_CNTNT) + if (aVal.nAnchorType == FLY_AS_CHAR) { nLeft = nRight; @@ -566,7 +570,8 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) sal_Int16 eHOrient = rHori.GetHoriOrient(); sal_Int16 eHRelOrient = rHori.GetRelationOrient(); aWrapOutlineCB.Hide(); - BOOL bAllHtmlModes = (nAnchorId == FLY_AT_CNTNT || nAnchorId == FLY_AUTO_CNTNT) && + const bool bAllHtmlModes = + ((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR)) && (eHOrient == text::HoriOrientation::RIGHT || eHOrient == text::HoriOrientation::LEFT); aWrapAnchorOnlyCB.Enable( bAllHtmlModes && nSur != SURROUND_NONE ); aWrapOutsideCB.Hide(); @@ -574,17 +579,26 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) aWrapTransparentCB.Enable( FALSE ); - aNoWrapRB.Enable( FLY_AT_CNTNT == nAnchorId ); + aNoWrapRB.Enable( FLY_AT_PARA == nAnchorId ); aWrapParallelRB.Enable( FALSE ); - aWrapLeftRB .Enable( FLY_AT_CNTNT == nAnchorId || - (FLY_AUTO_CNTNT == nAnchorId && eHOrient == text::HoriOrientation::RIGHT && eHRelOrient == text::RelOrientation::PRINT_AREA)); - aWrapRightRB .Enable( FLY_AT_CNTNT == nAnchorId || - ( FLY_AUTO_CNTNT == nAnchorId && eHOrient == text::HoriOrientation::LEFT && eHRelOrient == text::RelOrientation::PRINT_AREA)); - - aWrapThroughRB.Enable( (FLY_PAGE == nAnchorId || - (FLY_AUTO_CNTNT == nAnchorId && eHRelOrient != text::RelOrientation::PRINT_AREA) || FLY_AT_CNTNT == nAnchorId ) - && bSomeAbsPos && - eHOrient != text::HoriOrientation::RIGHT); + aWrapLeftRB .Enable + ( (FLY_AT_PARA == nAnchorId) + || ( (FLY_AT_CHAR == nAnchorId) + && (eHOrient == text::HoriOrientation::RIGHT) + && (eHRelOrient == text::RelOrientation::PRINT_AREA))); + aWrapRightRB .Enable + ( (FLY_AT_PARA == nAnchorId) + || ( (FLY_AT_CHAR == nAnchorId) + && (eHOrient == text::HoriOrientation::LEFT) + && (eHRelOrient == text::RelOrientation::PRINT_AREA))); + + aWrapThroughRB.Enable + ( ( (FLY_AT_PAGE == nAnchorId) + || ( (FLY_AT_CHAR == nAnchorId) + && (eHRelOrient != text::RelOrientation::PRINT_AREA)) + || (FLY_AT_PARA == nAnchorId)) + && bSomeAbsPos + && (eHOrient != text::HoriOrientation::RIGHT)); if(aNoWrapRB.IsChecked() && !aNoWrapRB.IsEnabled()) { if(aWrapThroughRB.IsEnabled()) @@ -624,7 +638,8 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) aIdealWrapRB.Enable( bEnable ); aWrapThroughRB.Enable( bEnable ); aWrapParallelRB.Enable( bEnable ); - aWrapAnchorOnlyCB.Enable( (nAnchorId == FLY_AT_CNTNT || nAnchorId == FLY_AUTO_CNTNT) + aWrapAnchorOnlyCB.Enable( + ((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR)) && nSur != SURROUND_NONE ); } ContourHdl(0); @@ -693,10 +708,11 @@ IMPL_LINK( SwWrapTabPage, WrapTypeHdl, ImageRadioButton *, pBtn ) { BOOL bWrapThrough = (pBtn == &aWrapThroughRB); aWrapTransparentCB.Enable( bWrapThrough && !bHtmlMode ); - bWrapThrough |= ( nAnchorId == FLY_IN_CNTNT ); + bWrapThrough |= ( nAnchorId == FLY_AS_CHAR ); aWrapOutlineCB.Enable( !bWrapThrough && pBtn != &aNoWrapRB); aWrapOutsideCB.Enable( !bWrapThrough && aWrapOutlineCB.IsChecked() ); - aWrapAnchorOnlyCB.Enable( (nAnchorId == FLY_AT_CNTNT || nAnchorId == FLY_AUTO_CNTNT) && + aWrapAnchorOnlyCB.Enable( + ((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR)) && (pBtn != &aNoWrapRB) ); ContourHdl(0); diff --git a/sw/source/ui/ribbar/conrect.cxx b/sw/source/ui/ribbar/conrect.cxx index 2bd57967d2..d676b8eaaf 100644 --- a/sw/source/ui/ribbar/conrect.cxx +++ b/sw/source/ui/ribbar/conrect.cxx @@ -43,21 +43,14 @@ #include #include #include -#ifndef _CMDID_H #include -#endif -#ifndef _VIEW_HXX #include -#endif #include #include #include -#ifndef _DRAWBASE_HXX #include -#endif -#ifndef _CONRECT_HXX #include -#endif + /************************************************************************* |* @@ -119,7 +112,7 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) case OBJ_TEXT: if( bMarquee ) { - m_pSh->ChgAnchor(FLY_IN_CNTNT); + m_pSh->ChgAnchor(FLY_AS_CHAR); if( pObj ) { diff --git a/sw/source/ui/ribbar/drawbase.cxx b/sw/source/ui/ribbar/drawbase.cxx index a9fe374f73..31c75c5699 100644 --- a/sw/source/ui/ribbar/drawbase.cxx +++ b/sw/source/ui/ribbar/drawbase.cxx @@ -344,7 +344,8 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) if ( xRecorder.is() ) { SfxRequest aReq(m_pSh->GetView().GetViewFrame(),FN_INSERT_FRAME); - aReq.AppendItem(SfxUInt16Item( FN_INSERT_FRAME, (USHORT)FLY_AT_CNTNT )); + aReq.AppendItem(SfxUInt16Item( FN_INSERT_FRAME, + static_cast(FLY_AT_PARA) )); aReq.AppendItem(SfxPointItem( FN_PARAM_1, m_pSh->GetAnchorObjDiff())); aReq.AppendItem(SvxSizeItem( FN_PARAM_2, m_pSh->GetObjSize())); aReq.Done(); diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index a32d3e1f1b..ab0b64b41a 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -100,9 +100,7 @@ #include #include #include -#ifndef _CMDID_H #include -#endif #ifndef _GLOBALS_HRC #include #endif @@ -1063,14 +1061,14 @@ void SwBaseShell::Execute(SfxRequest &rReq) case FN_TOOL_ANKER_FRAME: { RndStdIds eSet = nSlot == FN_TOOL_ANKER_PAGE - ? FLY_PAGE + ? FLY_AT_PAGE : nSlot == FN_TOOL_ANKER_PARAGRAPH - ? FLY_AT_CNTNT + ? FLY_AT_PARA : nSlot == FN_TOOL_ANKER_FRAME ? FLY_AT_FLY : nSlot == FN_TOOL_ANKER_CHAR - ? FLY_IN_CNTNT - : FLY_AUTO_CNTNT; + ? FLY_AS_CHAR + : FLY_AT_CHAR; rSh.StartUndo(); if( rSh.IsObjSelected() ) rSh.ChgAnchor( eSet ); @@ -1101,7 +1099,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) switch( eSet ) { case FLY_AT_FLY: - case FLY_PAGE: + case FLY_AT_PAGE: //Durchlauf, links oder von links, oben, von oben if(eSurround != SURROUND_THROUGHT) @@ -1114,7 +1112,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) aSet.Put(SwFmtHoriOrient(0, text::HoriOrientation::LEFT)); break; - case FLY_AT_CNTNT: + case FLY_AT_PARA: //links, von links, rechts, oben, kein Uml, li+re Umlauf, if(eSurround != SURROUND_LEFT || eSurround != SURROUND_RIGHT) aSet.Put(SwFmtSurround(SURROUND_LEFT)); @@ -1126,7 +1124,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) aSet.Put(SwFmtHoriOrient(0, text::HoriOrientation::LEFT)); break; - case FLY_AUTO_CNTNT: + case FLY_AT_CHAR: //links, von links, rechts, oben, Durchlauf if(eSurround != SURROUND_THROUGHT) aSet.Put(SwFmtSurround(SURROUND_THROUGHT)); @@ -1624,12 +1622,17 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) else rSh.GetFlyFrmAttr(aSet); RndStdIds eSet = ((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetAnchorId(); - BOOL bSet; - bSet = (nWhich == FN_TOOL_ANKER_PAGE && eSet == FLY_PAGE) || - (nWhich == FN_TOOL_ANKER_PARAGRAPH && eSet == FLY_AT_CNTNT) || - (nWhich == FN_TOOL_ANKER_FRAME && eSet == FLY_AT_FLY) || - (nWhich == FN_TOOL_ANKER_AT_CHAR && eSet == FLY_AUTO_CNTNT) || - (nWhich == FN_TOOL_ANKER_CHAR && eSet == FLY_IN_CNTNT); + const BOOL bSet = + ((nWhich == FN_TOOL_ANKER_PAGE) && + (eSet == FLY_AT_PAGE)) + || ((nWhich == FN_TOOL_ANKER_PARAGRAPH) && + (eSet == FLY_AT_PARA)) + || ((nWhich == FN_TOOL_ANKER_FRAME) && + (eSet == FLY_AT_FLY)) + || ((nWhich == FN_TOOL_ANKER_AT_CHAR) && + (eSet == FLY_AT_CHAR)) + || ((nWhich == FN_TOOL_ANKER_CHAR) && + (eSet == FLY_AS_CHAR)); if(nWhich != FN_TOOL_ANKER) { USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); @@ -1646,16 +1649,16 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) switch (eSet) { - case FLY_PAGE: + case FLY_AT_PAGE: nSlotId = FN_TOOL_ANKER_PAGE; break; - case FLY_AT_CNTNT: + case FLY_AT_PARA: nSlotId = FN_TOOL_ANKER_PARAGRAPH; break; - case FLY_IN_CNTNT: + case FLY_AS_CHAR: nSlotId = FN_TOOL_ANKER_CHAR; break; - case FLY_AUTO_CNTNT: + case FLY_AT_CHAR: nSlotId = FN_TOOL_ANKER_AT_CHAR; break; case FLY_AT_FLY: @@ -1705,15 +1708,18 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) SwSurround nSurround = rWrap.GetSurround(); BOOL bSet = FALSE; - BOOL bDisable = nAnchorType == - 1 || nAnchorType == FLY_IN_CNTNT; - BOOL bHtmlMode = 0 != ::GetHtmlMode(GetView().GetDocShell()); + bool bDisable = + (nAnchorType == - 1) || (nAnchorType == FLY_AS_CHAR); + const bool bHtmlMode = + 0 != ::GetHtmlMode(GetView().GetDocShell()); switch( nWhich ) { case FN_FRAME_NOWRAP: bDisable |= - ( nAnchorType != FLY_AT_CNTNT && - nAnchorType != FLY_AUTO_CNTNT && nAnchorType != FLY_PAGE); + ( (nAnchorType != FLY_AT_PARA) + && (nAnchorType != FLY_AT_CHAR) + && (nAnchorType != FLY_AT_PAGE)); bSet = nSurround == SURROUND_NONE; break; case FN_FRAME_WRAP: @@ -1726,7 +1732,9 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) break; case FN_FRAME_WRAPTHRU: bDisable |= (bHtmlMode || - (nAnchorType != FLY_AT_CNTNT&& nAnchorType != FLY_AUTO_CNTNT && nAnchorType != FLY_PAGE)); + ( (nAnchorType != FLY_AT_PARA) + && (nAnchorType != FLY_AT_CHAR) + && (nAnchorType != FLY_AT_PAGE))); if(bObj) bSet = nSurround == SURROUND_THROUGHT && rSh.GetLayerId(); else @@ -1766,7 +1774,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) break; case FN_WRAP_ANCHOR_ONLY: bDisable |= (bHtmlMode || - (nAnchorType != FLY_AT_CNTNT)); + (nAnchorType != FLY_AT_PARA)); bSet = rWrap.IsAnchorOnly(); break; case FN_FRAME_WRAP_LEFT: diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx index 75026e8d4e..7b3b812fc4 100644 --- a/sw/source/ui/shells/drwbassh.cxx +++ b/sw/source/ui/shells/drwbassh.cxx @@ -49,9 +49,7 @@ #include #include #include -#ifndef _CMDID_H #include -#endif #include #include #include @@ -479,7 +477,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) { // Objekte nicht aneinander ausrichten USHORT nAnchor = pSh->GetAnchorId(); - if (nAnchor == FLY_IN_CNTNT) + if (nAnchor == FLY_AS_CHAR) { sal_Int16 nVertOrient = -1; @@ -509,7 +507,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) } break; } - if (nAnchor == FLY_AT_CNTNT) + if (nAnchor == FLY_AT_PARA) break; // Absatzverankerte Rahmen nicht ausrichten } @@ -855,7 +853,7 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation pValidation->nWidth = pValidation->nHeight; pValidation->nHeight = nTmp; } - if ( eAnchorType == FLY_PAGE || eAnchorType == FLY_AT_FLY ) + if ((eAnchorType == FLY_AT_PAGE) || (eAnchorType == FLY_AT_FLY)) { // MinimalPosition pValidation->nMinHPos = aBoundRect.Left(); @@ -903,7 +901,7 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation pValidation->nMaxVPos = aBoundRect.Bottom() - pValidation->nHeight; pValidation->nMaxWidth = aBoundRect.Right() - nH; } - else if ( eAnchorType == FLY_AT_CNTNT || eAnchorType == FLY_AUTO_CNTNT ) + else if ((eAnchorType == FLY_AT_PARA) || (eAnchorType == FLY_AT_CHAR)) { if (pValidation->nHPos + pValidation->nWidth > aBoundRect.Right()) { @@ -964,7 +962,7 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation pValidation->nMaxHeight = pValidation->nMaxVPos + pValidation->nHeight - nV; pValidation->nMaxWidth = pValidation->nMaxHPos + pValidation->nWidth - nH; } - else if ( eAnchorType == FLY_IN_CNTNT ) + else if (eAnchorType == FLY_AS_CHAR) { pValidation->nMinHPos = 0; pValidation->nMaxHPos = 0; diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx index 8031028cad..622a78e195 100644 --- a/sw/source/ui/shells/textdrw.cxx +++ b/sw/source/ui/shells/textdrw.cxx @@ -39,23 +39,17 @@ #include #include -#ifndef _VIEW_HXX #include -#endif #include #include #include -#ifndef _BASESH_HXX #include -#endif #ifndef _POOLFMT_HRC #include #endif -#ifndef _DOCSH_HXX #include -#endif #include #include #include diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx index c3fb70f483..9804c49239 100644 --- a/sw/source/ui/shells/textidx.cxx +++ b/sw/source/ui/shells/textidx.cxx @@ -32,9 +32,7 @@ #include "precompiled_sw.hxx" #include -#ifndef _MSGBOX_HXX //autogen #include -#endif #include #include #include @@ -55,6 +53,8 @@ #include "swabstdlg.hxx" #include #include + + // STATIC DATA ----------------------------------------------------------- void SwTextShell::ExecIdx(SfxRequest &rReq) @@ -136,7 +136,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq) 0 ); SwWrtShell& rSh = GetShell(); SwRect aRect; - rSh.CalcBoundRect(aRect, FLY_IN_CNTNT); + rSh.CalcBoundRect(aRect, FLY_AS_CHAR); long nWidth = aRect.Width(); aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth)); diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 965b0f5d32..9188b6f177 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -39,9 +39,7 @@ #include #include -#ifndef __RSC //autogen #include -#endif #include #include #include @@ -82,9 +80,7 @@ #include #include #include -#ifndef _CMDID_H #include -#endif #ifndef _GLOBALS_HRC #include #endif @@ -112,9 +108,7 @@ #ifndef _POPUP_HRC #include #endif -#ifndef _SWERROR_H #include -#endif #include #include @@ -566,7 +560,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) aCol.Init( nCols, aCol.GetGutterWidth(), aCol.GetWishWidth() ); aMgr.SetCol( aCol ); } - aMgr.InsertFlyFrm(FLY_AT_CNTNT, aStartPos, aSize); + aMgr.InsertFlyFrm(FLY_AT_PARA, aStartPos, aSize); GetShell().EndAllAction(); GetShell().UnlockPaint(); } @@ -600,7 +594,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) Size aSize(aMgr.GetSize()); aSize.Width() = GetShell().GetAnyCurRect(RECT_PAGE_PRT).Width(); Point aPos = aMgr.GetPos(); - RndStdIds eAnchor = FLY_AT_CNTNT; + RndStdIds eAnchor = FLY_AT_PARA; if(pArgs->GetItemState(nSlot, FALSE, &pItem) == SFX_ITEM_SET) eAnchor = (RndStdIds)((SfxUInt16Item *)pItem)->GetValue(); if(pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem) == SFX_ITEM_SET) @@ -764,7 +758,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) SwFlyFrmAttrMgr aFrmMgr( TRUE, &rSh, FRMMGR_TYPE_GRF ); // am FrmMgr muessen die richtigen Parameter eingestellt werden - aFrmMgr.SetAnchor(FLY_IN_CNTNT); + aFrmMgr.SetAnchor(FLY_AS_CHAR); rSh.SplitNode( FALSE, FALSE ); rSh.SplitNode( FALSE, FALSE ); diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 493daabe92..82587eb23c 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -34,12 +34,6 @@ #include #include -// #ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_ -// #include -// #endif -// #ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_ -// #include -// #endif #include #include #include @@ -49,9 +43,6 @@ #include #include -// #ifndef _FILTER_HXX -// #include -// #endif #include #include #include @@ -69,12 +60,8 @@ #include #include #include -#ifndef _APP_HXX //autogen #include -#endif -#ifndef _WRKWIN_HXX //autogen #include -#endif #include #include #include @@ -94,9 +81,7 @@ #include #include #include -#ifndef __RSC //autogen #include -#endif #include #include #include @@ -148,10 +133,6 @@ #include #include -// #ifndef _FRMMGR_HXX -// #include -// #endif - #include //#outline level,added by zhaojianwei #include diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index 04ff2c9047..b131190e8f 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -347,7 +347,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) if(aSize.GetWidthPercent()) { SwRect aRect; - rSh.CalcBoundRect(aRect, FLY_IN_CNTNT); + rSh.CalcBoundRect(aRect, FLY_AS_CHAR); long nPrtWidth = aRect.Width(); aSize.SetWidthPercent(BYTE((nPageWidth - aLongLR.GetLeft() - aLongLR.GetRight()) * 100 /nPrtWidth)); } @@ -472,7 +472,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) if(aSize.GetHeightPercent()) { SwRect aRect; - rSh.CalcBoundRect(aRect, FLY_IN_CNTNT); + rSh.CalcBoundRect(aRect, FLY_AS_CHAR); long nPrtHeight = aRect.Height(); aSize.SetHeightPercent(BYTE(nHeight * 100 /nPrtHeight)); } diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx index ae8df6cde9..e528b954e9 100644 --- a/sw/source/ui/utlui/attrdesc.cxx +++ b/sw/source/ui/utlui/attrdesc.cxx @@ -53,9 +53,7 @@ #include #include #include -#ifndef _FMTLINE_HXX #include -#endif #include #include #include @@ -687,13 +685,13 @@ SfxItemPresentation SwFmtAnchor::GetPresentation USHORT nId = 0; switch ( GetAnchorId() ) { - case FLY_AT_CNTNT: //Absatzgebundener Rahmen + case FLY_AT_PARA: nId = STR_FLY_AT_CNTNT; break; - case FLY_IN_CNTNT: //Zeichengebundener Rahmen + case FLY_AS_CHAR: nId = STR_FLY_IN_CNTNT; break; - case FLY_PAGE: //Seitengebundener Rahmen + case FLY_AT_PAGE: nId = STR_FLY_PAGE; break; default:;//prevent warning diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx index da9e898de6..583fc6a964 100644 --- a/sw/source/ui/wrtsh/select.cxx +++ b/sw/source/ui/wrtsh/select.cxx @@ -39,15 +39,9 @@ #include #include #include -#ifndef _CMDID_H #include -#endif -#ifndef _VIEW_HXX #include -#endif -#ifndef _BASESH_HXX #include -#endif #include #include #include -- cgit v1.2.3 From 5e99d945dde76d14b2772492dd0a5874575efa10 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 5 Jan 2010 16:37:42 +0100 Subject: swunolocking1: calbck.hxx: SwClientIter constructor takes a const& parameter --- sw/inc/calbck.hxx | 5 ++--- sw/source/core/attr/calbck.cxx | 2 +- sw/source/core/inc/frmtool.hxx | 2 +- sw/source/core/layout/frmtool.cxx | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index 1f44308ff4..3c9970bfe2 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -202,7 +202,7 @@ class SwClientIter friend SwClient* SwModify::_Remove(SwClient *); // fuer Ptr-Korrektur friend void SwModify::Add(SwClient *); // nur fuer ASSERT ! - SwModify& rRoot; + SwModify const& rRoot; SwClient *pAkt, *pDelNext; // fuers Updaten der aller Iteratoren beim Einfuegen/Loeschen von // Clients, wenn der Iterator gerade draufsteht. @@ -213,11 +213,10 @@ class SwClientIter TypeId aSrchId; // fuer First/Next - suche diesen Type public: - SW_DLLPUBLIC SwClientIter( SwModify& ); + SW_DLLPUBLIC SwClientIter( SwModify const& ); SW_DLLPUBLIC ~SwClientIter(); const SwModify& GetModify() const { return rRoot; } - SwModify& GetModify() { return rRoot; } #ifndef CFRONT SwClient* operator++(int); // zum Naechsten diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index 344f11cbc2..b125f1f71c 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -463,7 +463,7 @@ BOOL SwDepend::GetInfo( SfxPoolItem& rInfo ) const /********************************************************************/ -SwClientIter::SwClientIter( SwModify& rModify ) +SwClientIter::SwClientIter( SwModify const& rModify ) : rRoot( rModify ) { // hinten einketten! diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index 199be26f58..1cb76b9255 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -141,7 +141,7 @@ const SwFrm * MA_FASTCALL FindPage( const SwRect &rRect, const SwFrm *pPage ); // JP 07.05.98: wird von SwCntntNode::GetFrm und von SwFlyFrm::GetFrm // gerufen -SwFrm* GetFrmOfModify( SwModify&, USHORT nFrmType, const Point* = 0, +SwFrm* GetFrmOfModify( SwModify const&, USHORT const nFrmType, const Point* = 0, const SwPosition *pPos = 0, const BOOL bCalcFrm = FALSE ); diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 6c89d2b20c..faa0122ba0 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -3519,8 +3519,8 @@ const SwFrm* MA_FASTCALL FindPage( const SwRect &rRect, const SwFrm *pPage ) return pPage; } -SwFrm* GetFrmOfModify( SwModify& rMod, USHORT nFrmType, const Point* pPoint, - const SwPosition *pPos, const BOOL bCalcFrm ) +SwFrm* GetFrmOfModify( SwModify const& rMod, USHORT const nFrmType, + const Point* pPoint, const SwPosition *pPos, const BOOL bCalcFrm ) { SwFrm *pMinFrm = 0, *pTmpFrm; SwRect aCalcRect; -- cgit v1.2.3 From 34fc4b7b9dfb992edd83771976845e6c9b5779e5 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 5 Jan 2010 16:37:42 +0100 Subject: swunolocking1: swtable.hxx: SwTable::FindTable() takes a const parameter --- sw/inc/swtable.hxx | 2 +- sw/source/core/table/swtable.cxx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index 92a04e4111..a49bcf6f61 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -299,7 +299,7 @@ public: virtual BOOL GetInfo( SfxPoolItem& ) const; // suche im Format nach der angemeldeten Tabelle - static SwTable* FindTable( SwFrmFmt* pFmt ); + static SwTable * FindTable( SwFrmFmt const*const pFmt ); // Struktur ein wenig aufraeumen void GCLines(); diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index caffe6edbf..0c4d018c51 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -2060,9 +2060,11 @@ BOOL SwTable::GetInfo( SfxPoolItem& rInfo ) const return TRUE; } -SwTable* SwTable::FindTable( SwFrmFmt* pFmt ) +SwTable * SwTable::FindTable( SwFrmFmt const*const pFmt ) { - return pFmt ? (SwTable*)SwClientIter( *pFmt ).First( TYPE(SwTable) ) : 0; + return (pFmt) + ? static_cast(SwClientIter(*pFmt).First( TYPE(SwTable) )) + : 0; } SwTableNode* SwTable::GetTableNode() const -- cgit v1.2.3 From a8896dfd58cedf796a62aa0b8028c9ce8d9a6320 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 5 Jan 2010 16:37:42 +0100 Subject: swunolocking1: #i105557#: remove unnecessary includes of unoobj.hxx --- sw/inc/chpfld.hxx | 4 +++- sw/inc/unochart.hxx | 10 ++++++++-- sw/inc/unofield.hxx | 8 ++++++-- sw/inc/unoidx.hxx | 15 +++++++++++++-- sw/source/core/doc/docfld.cxx | 7 +------ sw/source/core/fields/expfld.cxx | 2 +- 6 files changed, 32 insertions(+), 14 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/chpfld.hxx b/sw/inc/chpfld.hxx index 2e53c66386..992c73dcfc 100644 --- a/sw/inc/chpfld.hxx +++ b/sw/inc/chpfld.hxx @@ -32,9 +32,11 @@ #include "fldbas.hxx" + class SwFrm; +class SwCntntNode; class SwTxtNode; -#include + enum SwChapterFormat { diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx index 870b107bb6..a251851c31 100644 --- a/sw/inc/unochart.hxx +++ b/sw/inc/unochart.hxx @@ -32,6 +32,8 @@ #include #include + +#include #include #include #include @@ -48,8 +50,8 @@ #include #include #include - #include + #include //OMultiTypeInterfaceContainerHelper #include // helper for implementations #include // helper for implementations @@ -57,17 +59,21 @@ #include // helper for implementations #include +#include +#include +#include #include -#include +class SfxItemPropertySet; class SwDoc; class SwTable; class SwTableBox; class SwUnoCrsr; struct SwRangeDescriptor; class SwSelBoxes; +class SwFrmFmt; ////////////////////////////////////////////////////////////////////// diff --git a/sw/inc/unofield.hxx b/sw/inc/unofield.hxx index abbd3f9e8f..db14db8957 100644 --- a/sw/inc/unofield.hxx +++ b/sw/inc/unofield.hxx @@ -30,14 +30,18 @@ #ifndef _UNOFIELD_HXX #define _UNOFIELD_HXX -#include +#include #include #include +#include + +#include + #include -#include #include #include + class SwFieldType; class SwDoc; class SwFmtFld; diff --git a/sw/inc/unoidx.hxx b/sw/inc/unoidx.hxx index 544399d544..b9a321f87b 100644 --- a/sw/inc/unoidx.hxx +++ b/sw/inc/unoidx.hxx @@ -30,15 +30,26 @@ #ifndef _UNOIDX_HXX #define _UNOIDX_HXX +#include +#include +#include +#include +#include #include #include -#include -#include + +#include + +#include #include #include + + +class SfxItemPropertySet; class SwTOXBaseSection; class SwTOXMark; class SwTOXType; + /* -----------------07.12.98 10:08------------------- * * --------------------------------------------------*/ diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 05a3efac0e..fbe304a9a8 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -41,12 +41,8 @@ #define _SVSTDARR_ULONGS #include #endif -#ifndef _APP_HXX //autogen #include -#endif -#ifndef _APP_HXX //autogen #include -#endif #include #include #include @@ -69,14 +65,13 @@ #include #include #include -#ifndef _DBMGR_HXX #include -#endif #include #include #include #include #include +#include #ifndef _POOLFMT_HRC #include // fuer InitFldTypes #endif diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 4083f8092f..311ad59135 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -31,7 +31,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include #include @@ -41,6 +40,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3 From ee23e85cb91d97a9a6ea2b5c09c489d9e9ad669a Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 5 Jan 2010 16:37:43 +0100 Subject: swunolocking1: #i105557#: unoobj.hxx: split out unorefmark.hxx: move SwXReferenceMark from unoobj.hxx to new unorefmark.hxx. --- sw/inc/unoobj.hxx | 73 ------------ sw/inc/unorefmark.hxx | 199 +++++++++++++++++++++++++++++++ sw/source/core/unocore/unoclbck.cxx | 1 + sw/source/core/unocore/unocoll.cxx | 4 +- sw/source/core/unocore/unocrsrhelper.cxx | 2 +- sw/source/core/unocore/unoportenum.cxx | 1 + sw/source/core/unocore/unorefmk.cxx | 2 +- sw/source/core/unocore/unotext.cxx | 1 + 8 files changed, 206 insertions(+), 77 deletions(-) create mode 100644 sw/inc/unorefmark.hxx (limited to 'sw/source') diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx index 4e9511647d..939fd7d222 100644 --- a/sw/inc/unoobj.hxx +++ b/sw/inc/unoobj.hxx @@ -99,7 +99,6 @@ class SwFmtFtn; -class SwFmtRefMark; class GetCurTxtFmtColl; @@ -1416,78 +1415,6 @@ public: //SwClient virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); }; -/* -----------------27.08.98 15:11------------------- - * - * --------------------------------------------------*/ -typedef ::cppu::WeakImplHelper5 -< - ::com::sun::star::text::XTextContent, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::container::XNamed, - ::com::sun::star::lang::XUnoTunnel -> -SwRefMarkBaseClass; - -class SwXReferenceMark : public SwRefMarkBaseClass, - public SwClient -{ - SwEventListenerContainer aLstnrCntnr; - SwDoc* pDoc; - const SwFmtRefMark* pMark; - String sMarkName; - BOOL m_bIsDescriptor; - - BOOL IsValid() const {return 0 != GetRegisteredIn();} - void InsertRefMark( SwPaM& rPam, SwXTextCursor * pCursor ); -public: - SwXReferenceMark(SwDoc* pDoc, const SwFmtRefMark* pMark); - ~SwXReferenceMark(); - - TYPEINFO(); - - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - - //XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); - - //XTextContent - virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); - - //XComponent - virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); - - //XNamed - virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XPropertySet - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - //SwClient - virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); - - void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - - const SwFmtRefMark* GetMark()const {return pMark;} - const String& GetMarkName() const {return sMarkName;} - SwDoc* GetDoc() const{return pDoc;} - void Invalidate(); -}; #endif - diff --git a/sw/inc/unorefmark.hxx b/sw/inc/unorefmark.hxx new file mode 100644 index 0000000000..8a37b5655e --- /dev/null +++ b/sw/inc/unorefmark.hxx @@ -0,0 +1,199 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoobj.hxx,v $ + * + * $Revision: 1.49 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SW_UNOREFMARK_HXX +#define SW_UNOREFMARK_HXX + +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include + + +class SwDoc; +class SwPaM; +class SwFmtRefMark; +class SwXTextCursor; + + +/* -----------------27.08.98 15:11------------------- + * + * --------------------------------------------------*/ +typedef ::cppu::WeakImplHelper5 +< ::com::sun::star::lang::XUnoTunnel +, ::com::sun::star::lang::XServiceInfo +, ::com::sun::star::beans::XPropertySet +, ::com::sun::star::container::XNamed +, ::com::sun::star::text::XTextContent +> SwXReferenceMark_Base; + +class SwXReferenceMark + : public SwXReferenceMark_Base + , public SwClient +{ + +private: + + SwEventListenerContainer aLstnrCntnr; + SwDoc* pDoc; + const SwFmtRefMark* pMark; + String sMarkName; + BOOL m_bIsDescriptor; + + BOOL IsValid() const {return 0 != GetRegisteredIn();} + void InsertRefMark( SwPaM& rPam, SwXTextCursor * pCursor ); + + virtual ~SwXReferenceMark(); + +public: + + SwXReferenceMark(SwDoc * pDoc, const SwFmtRefMark * pMark); + + void attachToRange( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange >& xTextRange) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + const SwFmtRefMark* GetMark() const {return pMark;} + const String& GetMarkName() const {return sMarkName;} + SwDoc* GetDoc() const {return pDoc;} + void Invalidate(); + + TYPEINFO(); + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + + static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); + + // XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( + const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier) + throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( + const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // XComponent + virtual void SAL_CALL dispose() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener) + throw (::com::sun::star::uno::RuntimeException); + + // XPropertySet + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Any& rValue) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // XNamed + virtual ::rtl::OUString SAL_CALL getName() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setName(const ::rtl::OUString& rName) + throw (::com::sun::star::uno::RuntimeException); + + // XTextContent + virtual void SAL_CALL attach( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextRange) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL getAnchor() + throw (::com::sun::star::uno::RuntimeException); + +}; + +#endif // SW_UNOREFMARK_HXX + diff --git a/sw/source/core/unocore/unoclbck.cxx b/sw/source/core/unocore/unoclbck.cxx index 5936365594..66c0a9a2ed 100644 --- a/sw/source/core/unocore/unoclbck.cxx +++ b/sw/source/core/unocore/unoclbck.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 06bbca43e0..b78e34798e 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -31,7 +31,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include #include @@ -76,7 +75,8 @@ #include #include -#include "unometa.hxx" +#include +#include #include "docsh.hxx" diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 08c22ac8e6..07086e364d 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -32,10 +32,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 6809c389d1..49d2ca28be 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 752022c763..4a67199667 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -31,10 +31,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index c654b5ec6f..e1ec2b9ba2 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3 From d6d4da27a415b7470718ede419edfd25cde5015b Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 5 Jan 2010 16:37:43 +0100 Subject: swunolocking1: #i105557#: unoobj.hxx: split out unobookmark.hxx: move SwXBookmark, SwXFieldmark from unoobj.hxx to new unobookmark.hxx. --- sw/inc/unobookmark.hxx | 248 +++++++++++++++++++++++++++++++++ sw/inc/unoobj.hxx | 113 +-------------- sw/source/core/crsr/bookmrk.cxx | 2 +- sw/source/core/unocore/unobkm.cxx | 18 ++- sw/source/core/unocore/unocoll.cxx | 1 + sw/source/core/unocore/unoportenum.cxx | 1 + sw/source/core/unocore/unotext.cxx | 1 + sw/source/ui/uno/unotxvw.cxx | 1 + 8 files changed, 270 insertions(+), 115 deletions(-) create mode 100644 sw/inc/unobookmark.hxx (limited to 'sw/source') diff --git a/sw/inc/unobookmark.hxx b/sw/inc/unobookmark.hxx new file mode 100644 index 0000000000..2b16d78280 --- /dev/null +++ b/sw/inc/unobookmark.hxx @@ -0,0 +1,248 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoobj.hxx,v $ + * + * $Revision: 1.49 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SW_UNOBOOKMARK_HXX +#define SW_UNOBOOKMARK_HXX + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include + + +class SwDoc; + + +typedef ::cppu::ImplInheritanceHelper5 +< ::sfx2::MetadatableMixin +, ::com::sun::star::lang::XUnoTunnel +, ::com::sun::star::lang::XServiceInfo +, ::com::sun::star::beans::XPropertySet +, ::com::sun::star::container::XNamed +, ::com::sun::star::text::XTextContent +> SwXBookmark_Base; + +class SwXBookmark + : public SwXBookmark_Base + , private SwClient +{ + +private: + + SwEventListenerContainer m_aLstnrCntnr; + SwDoc* m_pDoc; + String m_aName; + ::sw::mark::IMark* m_pRegisteredBookmark; + + void registerInMark(::sw::mark::IMark* const pBkmk); + +protected: + + virtual ~SwXBookmark(); + +public: + + SwXBookmark(::sw::mark::IMark* pMark = 0, SwDoc* pDoc = 0); + + const ::sw::mark::IMark* GetBookmark() const + { return m_pRegisteredBookmark; } + ::sw::mark::IMark* GetBookmark() + { return m_pRegisteredBookmark; } + SwDoc* GetDoc() + { return m_pDoc; } + + void attachToRangeEx( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextRange, + IDocumentMarkAccess::MarkType eType) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException ); + virtual void attachToRange( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextRange) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + TYPEINFO(); + + // SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ); + + // MetadatableMixin + virtual ::sfx2::Metadatable* GetCoreObject(); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel > GetModel(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); + + // XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( + const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier) + throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( + const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // XComponent + virtual void SAL_CALL dispose() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener) + throw (::com::sun::star::uno::RuntimeException); + + // XPropertySet + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Any& rValue) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // XNamed + virtual ::rtl::OUString SAL_CALL getName() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setName(const ::rtl::OUString& rName) + throw (::com::sun::star::uno::RuntimeException); + + // XTextContent + virtual void SAL_CALL attach( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextRange) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL getAnchor() + throw (::com::sun::star::uno::RuntimeException); + +}; + +typedef cppu::ImplInheritanceHelper1< SwXBookmark, + ::com::sun::star::text::XFormField > SwXFieldmark_Base; + +class SwXFieldmark + : public SwXFieldmark_Base +{ + +private: + + bool isReplacementObject; + +public: + + SwXFieldmark(bool isReplacementObject, + ::sw::mark::IMark* pBkm = 0, SwDoc* pDoc = 0); + + virtual void attachToRange( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextRange) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + virtual ::rtl::OUString SAL_CALL getDescription() + throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL getType() + throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL getRes() + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL setDescription(const ::rtl::OUString& rDescription) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setType(::sal_Int16 fieldType) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setRes(::sal_Int16 res) + throw (::com::sun::star::uno::RuntimeException); + +}; + +#endif // SW_UNOBOOKMARK_HXX + diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx index 939fd7d222..af81696ca0 100644 --- a/sw/inc/unoobj.hxx +++ b/sw/inc/unoobj.hxx @@ -86,12 +86,11 @@ #include "TextCursorHelper.hxx" #include #include -#include #include #include -#include +#include #include #include @@ -569,116 +568,6 @@ public: }; */ -typedef ::cppu::ImplInheritanceHelper5 -< - ::sfx2::MetadatableMixin, - ::com::sun::star::text::XTextContent, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::container::XNamed, - ::com::sun::star::lang::XUnoTunnel -> -SwBookmarkBaseClass; - -class SwXBookmark - : public SwBookmarkBaseClass - , private SwClient -{ - private: - SwEventListenerContainer m_aLstnrCntnr; - SwDoc* m_pDoc; - String m_aName; - ::sw::mark::IMark* m_pRegisteredBookmark; - - void registerInMark(::sw::mark::IMark* const pBkmk) - { - if(pBkmk) - pBkmk->Add(this); - else if(m_pRegisteredBookmark) - { - m_aName = m_pRegisteredBookmark->GetName(); - m_pRegisteredBookmark->Remove(this); - } - m_pRegisteredBookmark = pBkmk; - } - - protected: - virtual ~SwXBookmark(); - public: - SwXBookmark(::sw::mark::IMark* pMark = 0, SwDoc* pDoc = 0); - - TYPEINFO(); - - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - - //XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); - - //XTextContent - virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); - - //XComponent - virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); - - //XNamed - virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setName(const rtl::OUString& rName) throw( ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XPropertySet - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - void attachToRangeEx(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange, IDocumentMarkAccess::MarkType eType) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - - //SwClient - virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ); - - // MetadatableMixin - virtual ::sfx2::Metadatable* GetCoreObject(); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::frame::XModel > GetModel(); - - const ::sw::mark::IMark* GetBookmark() const - { return m_pRegisteredBookmark; } - ::sw::mark::IMark* GetBookmark() - { return m_pRegisteredBookmark; } - SwDoc* GetDoc() - { return m_pDoc; } -}; - -typedef cppu::ImplInheritanceHelper1< SwXBookmark, ::com::sun::star::text::XFormField > SwXFieldmark_BASE; - -class SwXFieldmark : public SwXFieldmark_BASE -{ - private: - bool isReplacementObject; - public: - SwXFieldmark(bool isReplacementObject, ::sw::mark::IMark* pBkm = 0, SwDoc* pDoc = 0); - - virtual void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual ::rtl::OUString SAL_CALL getDescription(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::sal_Int16 SAL_CALL getType( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int16 SAL_CALL getRes( ) throw (::com::sun::star::uno::RuntimeException); - - virtual void SAL_CALL setType( ::sal_Int16 fieldType ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setRes( ::sal_Int16 res ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setDescription( const ::rtl::OUString& description ) throw (::com::sun::star::uno::RuntimeException); -}; - /*-----------------23.02.98 10:45------------------- --------------------------------------------------*/ diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 8918058c31..b9b7a017fb 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index 11ea44de5f..62ef29cf90 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - +#include #include #include #include @@ -74,6 +74,20 @@ namespace ******************************************************************/ TYPEINIT1(SwXBookmark, SwClient) +void SwXBookmark::registerInMark(::sw::mark::IMark* const pBkmk) +{ + if (pBkmk) + { + pBkmk->Add(this); + } + else if (m_pRegisteredBookmark) + { + m_aName = m_pRegisteredBookmark->GetName(); + m_pRegisteredBookmark->Remove(this); + } + m_pRegisteredBookmark = pBkmk; +} + const uno::Sequence< sal_Int8 > & SwXBookmark::getUnoTunnelId() { static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId(); @@ -353,7 +367,7 @@ void SwXBookmark::removeVetoableChangeListener(const OUString& /*PropertyName*/, { } SwXFieldmark::SwXFieldmark(bool _isReplacementObject, ::sw::mark::IMark* pBkm, SwDoc* pDc) - : SwXFieldmark_BASE(pBkm, pDc) + : SwXFieldmark_Base(pBkm, pDc) , isReplacementObject(_isReplacementObject) { } diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index b78e34798e..030fa2a537 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -75,6 +75,7 @@ #include #include +#include #include #include #include "docsh.hxx" diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 49d2ca28be..12c89e9c24 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index e1ec2b9ba2..c96b3b7275 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index de8bcd61ee..cbc9817217 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -77,6 +77,7 @@ #include #include #include +#include #include #include -- cgit v1.2.3 From 60db7e2d32becdf6c2bc30d75d5188c0d31aa3cd Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 5 Jan 2010 16:37:44 +0100 Subject: swunolocking1: #i105557#: unoobj.hxx: split out unoparagraph.hxx: move SwXParagraph{,Enumeration} from unoobj.hxx to new unoparagraph.hxx. move enum CursorType to unobaseclass.hxx. --- sw/inc/unobaseclass.hxx | 21 ++ sw/inc/unoobj.hxx | 201 --------------- sw/inc/unoparagraph.hxx | 439 ++++++++++++++++++++++++++++++++ sw/source/core/txtnode/ndtxt.cxx | 1 + sw/source/core/unocore/unobkm.cxx | 2 + sw/source/core/unocore/unocoll.cxx | 1 + sw/source/core/unocore/unodraw.cxx | 1 + sw/source/core/unocore/unoframe.cxx | 1 + sw/source/core/unocore/unoftn.cxx | 1 + sw/source/core/unocore/unoidx.cxx | 6 +- sw/source/core/unocore/unoobj2.cxx | 1 + sw/source/core/unocore/unoparagraph.cxx | 1 + sw/source/core/unocore/unoredline.cxx | 2 + sw/source/core/unocore/unorefmk.cxx | 1 + sw/source/core/unocore/unosect.cxx | 9 +- sw/source/core/unocore/unotbl.cxx | 7 +- sw/source/core/unocore/unotext.cxx | 3 + sw/source/ui/uno/unotxvw.cxx | 1 + 18 files changed, 484 insertions(+), 215 deletions(-) create mode 100644 sw/inc/unoparagraph.hxx (limited to 'sw/source') diff --git a/sw/inc/unobaseclass.hxx b/sw/inc/unobaseclass.hxx index 7bc5c3a19c..48c00de279 100644 --- a/sw/inc/unobaseclass.hxx +++ b/sw/inc/unobaseclass.hxx @@ -43,5 +43,26 @@ cppu::WeakImplHelper2 > SwSimpleEnumerationBaseClass; + +/* -----------------29.04.98 07:35------------------- + * + * --------------------------------------------------*/ +enum CursorType +{ + CURSOR_INVALID, + CURSOR_BODY, + CURSOR_FRAME, + CURSOR_TBLTEXT, + CURSOR_FOOTNOTE, + CURSOR_HEADER, + CURSOR_FOOTER, + CURSOR_REDLINE, + CURSOR_ALL, // for Search&Replace + CURSOR_SELECTION, // create a paragraph enumeration from + // a text range or cursor + CURSOR_SELECTION_IN_TABLE, + CURSOR_META, // meta/meta-field +}; + #endif diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx index af81696ca0..29916ee710 100644 --- a/sw/inc/unoobj.hxx +++ b/sw/inc/unoobj.hxx @@ -61,7 +61,6 @@ #include #include #include -#include #include #include #include @@ -91,7 +90,6 @@ #include #include -#include #include #include @@ -115,25 +113,6 @@ typedef ::std::deque< FrameDependSortListEntry > typedef ::std::deque< ::boost::shared_ptr > FrameDependList_t; -/* -----------------29.04.98 07:35------------------- - * - * --------------------------------------------------*/ -enum CursorType -{ - CURSOR_INVALID, - CURSOR_BODY, - CURSOR_FRAME, - CURSOR_TBLTEXT, - CURSOR_FOOTNOTE, - CURSOR_HEADER, - CURSOR_FOOTER, - CURSOR_REDLINE, - CURSOR_ALL, // fuer Search&Replace - CURSOR_SELECTION, // create a paragraph enumeration from a text range or cursor - CURSOR_SELECTION_IN_TABLE, - CURSOR_META, // meta/meta-field -}; - /* -----------------26.06.98 16:18------------------- * @@ -993,186 +972,6 @@ public: void Invalidate(); }; -/*-----------------07.04.98 08:10------------------- - ---------------------------------------------------*/ -class SwXParagraphEnumeration : public SwSimpleEnumerationBaseClass, - public SwClient -{ - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xNextPara; - - const SwTable * pOwnTable; - const SwStartNode * pOwnStartNode; // start node of the cell the enumeration - // belongs to. - // Used to restrict the movement of the - // UNO cursor to the cell and its - // embedded tables. - sal_Int32 nFirstParaStart; - sal_Int32 nLastParaEnd; - ULONG nEndIndex; - CursorType eCursorType; - BOOL bFirstParagraph; - - SwUnoCrsr* GetCrsr(){return (SwUnoCrsr*)GetRegisteredIn();} - -protected: - virtual ~SwXParagraphEnumeration(); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > SAL_CALL NextElement_Impl(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); - -public: - SwXParagraphEnumeration(SwXText* pParent, SwPosition& rPos, CursorType eType); - SwXParagraphEnumeration(SwXText* pParent, SwUnoCrsr* pCrsr, CursorType eType); - - - - //XEnumeration - virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - - //SwClient - virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); - - //non-Uno functions - - void SetOwnTable( const SwTable* pTable ) { pOwnTable = pTable; } - const SwTable* GetOwnTable() const { return pOwnTable; } - void SetOwnStartNode( const SwStartNode* pNode ) { pOwnStartNode = pNode; } - const SwStartNode* GetOwnStartNode() const { return pOwnStartNode; } -}; -/*-----------------07.04.98 08:15------------------- - ---------------------------------------------------*/ -class SwXParagraph : public cppu::ImplInheritanceHelper10 -< - ::sfx2::MetadatableMixin, - ::com::sun::star::beans::XTolerantMultiPropertySet, - ::com::sun::star::beans::XMultiPropertySet, - ::com::sun::star::text::XTextRange, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::lang::XUnoTunnel, - ::com::sun::star::beans::XPropertyState, - ::com::sun::star::container::XEnumerationAccess, - ::com::sun::star::text::XTextContent, - ::com::sun::star::container::XContentEnumerationAccess ->, - public SwClient -{ - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; - SwEventListenerContainer aLstnrCntnr; - const SfxItemPropertySet* m_pPropSet; - rtl::OUString m_sText; - sal_Int32 nSelectionStartPos; - sal_Int32 nSelectionEndPos; - BOOL m_bIsDescriptor; - - -protected: - void SAL_CALL SetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL GetPropertyValuesTolerant_Impl( - const ::com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames, - sal_Bool bDirectValuesOnly ) throw (::com::sun::star::uno::RuntimeException); - - virtual ~SwXParagraph(); -public: - SwXParagraph(); - SwXParagraph(::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const & i_xParent, SwTxtNode * i_pTxtNode, sal_Int32 nSelStart = -1, sal_Int32 nSelEnd = - 1); - - TYPEINFO(); - - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - - //XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); - - //XTolerantMultiPropertySet - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::SetPropertyTolerantFailed > SAL_CALL setPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetPropertyTolerantResult > SAL_CALL getPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL getDirectPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); - - //XMultiPropertySet -// virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); - - //XPropertySet - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //XPropertyState - virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //XTextContent - virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); - - //XComponent - virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); - - //XEnumerationAccess - war XTextPortionEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); - - //XTextRange - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XContentEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - - //MetadatableMixin - virtual ::sfx2::Metadatable* GetCoreObject(); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > - GetModel(); - - //SwClient - virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); - - BOOL IsDescriptor() const {return m_bIsDescriptor;} - - const SwTxtNode * GetTxtNode() const; - SwTxtNode * GetTxtNode(); - - static BOOL getDefaultTextContentValue(::com::sun::star::uno::Any& rAny, - const rtl::OUString& rPropertyName, USHORT nWID = 0); - static SwXParagraph* GetImplementation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xRef ); - //falls es mal als Service erzeugt werden kann - //void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - void attachToText(SwXText & rParent, SwTxtNode & rTxtNode); -}; /* -----------------23.03.99 12:57------------------- * * --------------------------------------------------*/ diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx new file mode 100644 index 0000000000..6ef62e00c1 --- /dev/null +++ b/sw/inc/unoparagraph.hxx @@ -0,0 +1,439 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoobj.hxx,v $ + * + * $Revision: 1.49 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SW_UNOPARAGRAPH_HXX +#define SW_UNOPARAGRAPH_HXX + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include + + +class SfxItemPropertySet; +struct SwPosition; +class SwUnoCrsr; +class SwStartNode; +class SwTxtNode; +class SwTable; +class SwXText; + + +/*-----------------07.04.98 08:15------------------- + +--------------------------------------------------*/ +typedef ::cppu::ImplInheritanceHelper10 +< ::sfx2::MetadatableMixin +, ::com::sun::star::lang::XUnoTunnel +, ::com::sun::star::lang::XServiceInfo +, ::com::sun::star::beans::XPropertySet +, ::com::sun::star::beans::XPropertyState +, ::com::sun::star::beans::XMultiPropertySet +, ::com::sun::star::beans::XTolerantMultiPropertySet +, ::com::sun::star::container::XEnumerationAccess +, ::com::sun::star::container::XContentEnumerationAccess +, ::com::sun::star::text::XTextContent +, ::com::sun::star::text::XTextRange +> SwXParagraph_Base; + +class SwXParagraph + : public SwXParagraph_Base + , public SwClient +{ + +private: + + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; + SwEventListenerContainer aLstnrCntnr; + const SfxItemPropertySet* m_pPropSet; + ::rtl::OUString m_sText; + sal_Int32 nSelectionStartPos; + sal_Int32 nSelectionEndPos; + BOOL m_bIsDescriptor; + +protected: + + void SAL_CALL SetPropertyValues_Impl( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Any >& rValues) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL + GetPropertyValues_Impl( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL + GetPropertyValuesTolerant_Impl( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames, + sal_Bool bDirectValuesOnly) + throw (::com::sun::star::uno::RuntimeException); + + virtual ~SwXParagraph(); + +public: + + SwXParagraph(); + SwXParagraph(::com::sun::star::uno::Reference< + ::com::sun::star::text::XText > const & i_xParent, + SwTxtNode * i_pTxtNode, + sal_Int32 nSelStart = -1, sal_Int32 nSelEnd = - 1); + + BOOL IsDescriptor() const {return m_bIsDescriptor;} + + const SwTxtNode * GetTxtNode() const; + SwTxtNode * GetTxtNode(); + + static BOOL getDefaultTextContentValue(::com::sun::star::uno::Any& rAny, + const ::rtl::OUString& rPropertyName, USHORT nWID = 0); + static SwXParagraph* GetImplementation( + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XInterface> xRef); + void attachToText(SwXText & rParent, SwTxtNode & rTxtNode); + + TYPEINFO(); + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + + // MetadatableMixin + virtual ::sfx2::Metadatable* GetCoreObject(); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > + GetModel(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); + + // XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( + const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier) + throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( + const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // XComponent + virtual void SAL_CALL dispose() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener) + throw (::com::sun::star::uno::RuntimeException); + + // XPropertySet + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Any& rValue) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // XPropertyState + virtual ::com::sun::star::beans::PropertyState SAL_CALL + getPropertyState(const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyState > SAL_CALL + getPropertyStates( + const ::com::sun::star::uno::Sequence< + ::rtl::OUString >& rPropertyNames) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyToDefault( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // XMultiPropertySet + virtual void SAL_CALL setPropertyValues( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Any >& rValues) + throw (::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > + SAL_CALL getPropertyValues( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertiesChangeListener( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertiesChangeListener >& xListener) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertiesChangeListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertiesChangeListener >& xListener) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL firePropertiesChangeEvent( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertiesChangeListener >& xListener) + throw (::com::sun::star::uno::RuntimeException); + + // XTolerantMultiPropertySet + virtual ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::SetPropertyTolerantFailed > SAL_CALL + setPropertyValuesTolerant( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Any >& rValues) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::GetPropertyTolerantResult > SAL_CALL + getPropertyValuesTolerant( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL + getDirectPropertyValuesTolerant( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames) + throw (::com::sun::star::uno::RuntimeException); + + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() + throw (::com::sun::star::uno::RuntimeException); + + // XEnumerationAccess + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::container::XEnumeration > SAL_CALL + createEnumeration() + throw (::com::sun::star::uno::RuntimeException); + + // XContentEnumerationAccess + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::container::XEnumeration > SAL_CALL + createContentEnumeration(const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getAvailableServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // XTextContent + virtual void SAL_CALL attach( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextRange) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL getAnchor() + throw (::com::sun::star::uno::RuntimeException); + + // XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > + SAL_CALL getText() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL getStart() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL getEnd() + throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getString() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setString(const ::rtl::OUString& rString) + throw (::com::sun::star::uno::RuntimeException); + +}; + + +/*-----------------07.04.98 08:10------------------- + +--------------------------------------------------*/ +class SwXParagraphEnumeration + : public SwSimpleEnumerationBaseClass + , public SwClient +{ + +private: + + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > + xParentText; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > + xNextPara; + + const SwTable * pOwnTable; + /// Start node of the cell the enumeration belongs to. + /// Used to restrict the movement of the UNO cursor to the cell and its + /// embedded tables. + const SwStartNode * pOwnStartNode; + sal_Int32 nFirstParaStart; + sal_Int32 nLastParaEnd; + ULONG nEndIndex; + CursorType eCursorType; + BOOL bFirstParagraph; + + SwUnoCrsr* GetCrsr() {return (SwUnoCrsr*)GetRegisteredIn();} + +protected: + + virtual ~SwXParagraphEnumeration(); + + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextContent > SAL_CALL + NextElement_Impl() + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + +public: + + SwXParagraphEnumeration( + SwXText* pParent, SwPosition& rPos, CursorType eType); + SwXParagraphEnumeration( + SwXText* pParent, SwUnoCrsr* pCrsr, CursorType eType); + + // non-Uno functions + + void SetOwnTable(const SwTable* pTable) + { pOwnTable = pTable; } + const SwTable* GetOwnTable() const + { return pOwnTable; } + void SetOwnStartNode(const SwStartNode* pNode) + { pOwnStartNode = pNode; } + const SwStartNode* GetOwnStartNode() const + { return pOwnStartNode; } + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( + const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // XEnumeration + virtual sal_Bool SAL_CALL hasMoreElements() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL nextElement() + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + +}; + +#endif // SW_UNOPARAGRAPH_HXX + diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 3df01632b8..92aedfd2f9 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -4972,6 +4972,7 @@ bool SwTxtNode::IsInContent() const return !GetDoc()->IsInHeaderFooter( SwNodeIndex(*this) ); } +#include #include ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XMetadatable > diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index 62ef29cf90..fbbaa5cbce 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -31,10 +31,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 030fa2a537..eeca6884f8 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -75,6 +75,7 @@ #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index bd592e4120..31049e6a92 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 0f3057533d..9afdc7e011 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -61,6 +61,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index d7a974bfb1..b97680ae79 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 41643101c1..cacad52afc 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -43,9 +43,7 @@ #include #include #include -#ifndef _CMDID_H #include -#endif #include #include #include @@ -58,18 +56,18 @@ #include #include #include +#include #include #include #include #include #include #include -#ifndef _DOCSH_HXX //autogen #include -#endif #include #include + using namespace ::com::sun::star; using ::rtl::OUString; diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 06415a36e5..a143ef1651 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -78,6 +78,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index c947c4181f..5b28bfb68d 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index d3b85ff340..67704d98ab 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -50,6 +51,7 @@ #include #include + using namespace ::com::sun::star; using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 4a67199667..0367831ee5 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 55b6fc7d0f..3ed9122c00 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -38,24 +38,21 @@ #include #include #include -#ifndef _SVX_XMLCNITEM_HXX #include -#endif #include #include #include #include #include #include +#include #include #include #include #include #include #include -#ifndef _DOCSH_HXX #include -#endif #include #include #include @@ -65,13 +62,12 @@ #include #include #include -#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPPP_ #include -#endif #include /* #109700# */ #include + using namespace ::com::sun::star; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; @@ -80,6 +76,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::beans; using ::rtl::OUString; + TYPEINIT1(SwXTextSectionClient, SwClient); /*-- 20.12.2005 09:56:33--------------------------------------------------- diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 0adf9c79ac..17f9791d87 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -33,16 +33,12 @@ #include "precompiled_sw.hxx" - - // STL includes #include #include // for DBL_MIN #include -#ifndef _CMDID_H #include -#endif #include #include #include @@ -87,6 +83,7 @@ #include #include #include +#include #include // SvNumberFormatter #include #include @@ -103,9 +100,11 @@ #include #include + using namespace ::com::sun::star; using ::rtl::OUString; + //----------------------------------------------------------------------------- // from unoobj.cxx extern void lcl_SetTxtFmtColl(const uno::Any& rAny, SwPaM& rPaM) throw (lang::IllegalArgumentException); diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index c96b3b7275..aa17a553d6 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include @@ -70,9 +71,11 @@ #include + using namespace ::com::sun::star; using ::rtl::OUString; + const sal_Char cInvalidObject[] = "this object is invalid"; /****************************************************************** * SwXText diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index cbc9817217..4b940c2fc7 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -78,6 +78,7 @@ #include #include #include +#include #include #include -- cgit v1.2.3 From e34d7f541650028c4084e16f41b74d66e8fe86df Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 5 Jan 2010 16:37:44 +0100 Subject: swunolocking1: #i105557#: unoobj.hxx: split out unosection.hxx: move SwXTextSection from unoobj.hxx to new unosection.hxx. --- sw/inc/unoframe.hxx | 1 + sw/inc/unoobj.hxx | 126 ------------ sw/inc/unosection.hxx | 337 +++++++++++++++++++++++++++++++ sw/inc/unotbl.hxx | 1 + sw/source/core/unocore/unocoll.cxx | 1 + sw/source/core/unocore/unocrsrhelper.cxx | 2 + sw/source/core/unocore/unoidx.cxx | 1 + sw/source/core/unocore/unosect.cxx | 2 +- sw/source/core/unocore/unotbl.cxx | 1 + sw/source/core/unocore/unotext.cxx | 1 + sw/source/filter/xml/xmltble.cxx | 5 +- 11 files changed, 348 insertions(+), 130 deletions(-) create mode 100644 sw/inc/unosection.hxx (limited to 'sw/source') diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx index 2775db8690..338d5963d0 100644 --- a/sw/inc/unoframe.hxx +++ b/sw/inc/unoframe.hxx @@ -32,6 +32,7 @@ #include #include +#include #include #include #include diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx index 29916ee710..86bcbc2b19 100644 --- a/sw/inc/unoobj.hxx +++ b/sw/inc/unoobj.hxx @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include @@ -58,9 +57,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -77,7 +74,6 @@ #include // helper for implementations #include // helper for implementations #include // helper for implementations -#include // helper for implementations #include #include #include @@ -754,128 +750,6 @@ public: const SwUnoCrsr* GetCursor() const { return (const SwUnoCrsr*)GetRegisteredIn(); } }; -/*-----------------09.03.98 13:57------------------- - ---------------------------------------------------*/ - -class SwXTextSection; -class SwXTextSectionClient : public SwClient -{ - friend class SwXTextSection; - SwXTextSection* m_pSection; - ::com::sun::star::uno::WeakReference< ::com::sun::star::text::XTextSection > m_xReference; - //SwClient - virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); - SwXTextSectionClient( - SwSectionFmt& rFmt, - SwXTextSection& rTextSection, - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > xSection ); - virtual ~SwXTextSectionClient(); - DECL_STATIC_LINK( SwXTextSectionClient, RemoveSectionClient_Impl, - SwXTextSectionClient* ); - -public: - TYPEINFO(); - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > GetXTextSection(); - - static ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > - CreateXTextSection(SwSectionFmt* pFmt = 0, BOOL bIndexHeader = FALSE ); - static SwXTextSectionClient* Create( - SwXTextSection& rSection, - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > xSection, - SwSectionFmt& rFmt ); -}; - -struct SwTextSectionProperties_Impl; -class SwXTextSection : public cppu::WeakImplHelper7 -< - ::com::sun::star::text::XTextSection, - ::com::sun::star::beans::XPropertyState, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::beans::XMultiPropertySet, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::container::XNamed, - ::com::sun::star::lang::XUnoTunnel ->/*, - public SwClient*/ -{ - friend class SwXTextSectionClient; - SwEventListenerContainer aLstnrCntnr; - const SfxItemPropertySet* m_pPropSet; - - BOOL m_bIsDescriptor; - BOOL m_bIndexHeader; - String m_sName; - SwTextSectionProperties_Impl* pProps; - SwXTextSectionClient* m_pClient; -protected: - void SAL_CALL SetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - SwXTextSection(sal_Bool bWithFormat, sal_Bool bIndexHeader = FALSE); - virtual ~SwXTextSection(); - void ResetClient() {m_pClient = 0;} - void SetClient( SwXTextSectionClient* pClient ){m_pClient = pClient;} - -public: - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - - //XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); - - //XTextSection - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > SAL_CALL getParentSection(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > > SAL_CALL getChildSections(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XTextContent - virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); - - //XComponent - virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); - - //XMultiPropertySet -// virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); - - //XPropertySet - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //XPropertyState - virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //XNamed - virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - - //SwClient -// virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); - - void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - - SwSectionFmt* GetFmt()const; - static SwXTextSection* GetImplementation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xRef ); -}; /*-----------------12.02.98 08:01------------------- --------------------------------------------------*/ diff --git a/sw/inc/unosection.hxx b/sw/inc/unosection.hxx new file mode 100644 index 0000000000..31d15d7010 --- /dev/null +++ b/sw/inc/unosection.hxx @@ -0,0 +1,337 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoobj.hxx,v $ + * + * $Revision: 1.49 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SW_UNOSECTION_HXX +#define SW_UNOSECTION_HXX + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include + + +class SfxItemPropertySet; +class SwSectionFmt; + + +/*-----------------09.03.98 13:57------------------- + +--------------------------------------------------*/ + +class SwXTextSection; + +class SwXTextSectionClient + : public SwClient +{ + +private: + + friend class SwXTextSection; + + SwXTextSection * m_pSection; + ::com::sun::star::uno::WeakReference< + ::com::sun::star::text::XTextSection > m_xReference; + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + + SwXTextSectionClient( + SwSectionFmt& rFmt, + SwXTextSection& rTextSection, + ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextSection > xSection); + + virtual ~SwXTextSectionClient(); + + DECL_STATIC_LINK( SwXTextSectionClient, RemoveSectionClient_Impl, + SwXTextSectionClient* ); + +public: + + TYPEINFO(); + + ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > + GetXTextSection(); + + static ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextSection > + CreateXTextSection(SwSectionFmt* pFmt = 0, BOOL bIndexHeader = FALSE); + static SwXTextSectionClient* Create( + SwXTextSection& rSection, + ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextSection > xSection, + SwSectionFmt& rFmt); +}; + + +struct SwTextSectionProperties_Impl; + +typedef ::cppu::WeakImplHelper7 +< ::com::sun::star::lang::XUnoTunnel +, ::com::sun::star::lang::XServiceInfo +, ::com::sun::star::beans::XPropertySet +, ::com::sun::star::beans::XPropertyState +, ::com::sun::star::beans::XMultiPropertySet +, ::com::sun::star::container::XNamed +, ::com::sun::star::text::XTextSection +> SwXTextSection_Base; + +class SwXTextSection + : public SwXTextSection_Base +{ + +private: + + friend class SwXTextSectionClient; + + SwEventListenerContainer aLstnrCntnr; + const SfxItemPropertySet* m_pPropSet; + + BOOL m_bIsDescriptor; + BOOL m_bIndexHeader; + String m_sName; + SwTextSectionProperties_Impl* pProps; + SwXTextSectionClient* m_pClient; + +protected: + + void SAL_CALL SetPropertyValues_Impl( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Any >& aValues) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL + GetPropertyValues_Impl( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + SwXTextSection(sal_Bool bWithFormat, sal_Bool bIndexHeader = FALSE); + + virtual ~SwXTextSection(); + + void ResetClient() { m_pClient = 0; } + void SetClient(SwXTextSectionClient* pClient) { m_pClient = pClient; } + +public: + + void attachToRange( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextRange) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + SwSectionFmt* GetFmt() const; + + static SwXTextSection* GetImplementation( + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XInterface> xRef); + + static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); + + // XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( + const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier) + throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( + const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // XComponent + virtual void SAL_CALL dispose() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener) + throw (::com::sun::star::uno::RuntimeException); + + // XPropertySet + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Any& rValue) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // XPropertyState + virtual ::com::sun::star::beans::PropertyState SAL_CALL + getPropertyState(const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyState > SAL_CALL + getPropertyStates( + const ::com::sun::star::uno::Sequence< + ::rtl::OUString >& rPropertyNames) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyToDefault( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // XMultiPropertySet + virtual void SAL_CALL setPropertyValues( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Any >& rValues) + throw (::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > + SAL_CALL getPropertyValues( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertiesChangeListener( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertiesChangeListener >& xListener) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertiesChangeListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertiesChangeListener >& xListener) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL firePropertiesChangeEvent( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertiesChangeListener >& xListener) + throw (::com::sun::star::uno::RuntimeException); + + // XNamed + virtual ::rtl::OUString SAL_CALL getName() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setName(const ::rtl::OUString& rName) + throw (::com::sun::star::uno::RuntimeException); + + // XTextContent + virtual void SAL_CALL attach( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextRange) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL getAnchor() + throw (::com::sun::star::uno::RuntimeException); + + // XTextSection + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextSection > SAL_CALL + getParentSection() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextSection > > SAL_CALL + getChildSections() + throw (::com::sun::star::uno::RuntimeException); + +}; + +#endif // SW_UNOSECTION_HXX + diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index 05983afdba..4f8e08a50a 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -31,6 +31,7 @@ #define _UNOTBL_HXX #include +#include #include #include #include diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index eeca6884f8..840e66810e 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -75,6 +75,7 @@ #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 07086e364d..34e73a0cf2 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -32,6 +32,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include + #include #include #include diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index cacad52afc..7fcde70176 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -31,6 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include #include #include diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 3ed9122c00..c377e2cb3d 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -31,7 +31,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include @@ -45,6 +44,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 17f9791d87..188e378741 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -69,6 +69,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index aa17a553d6..bc9343996f 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index 933c31be23..04f654db61 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -31,10 +31,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include +#include #include #include -#include #include #include #include @@ -44,9 +45,7 @@ #include #include #include -#ifndef _SVX_FRAMEDIRITEM_HXX #include -#endif #include #include "swtable.hxx" -- cgit v1.2.3 From acafdad9c7b6894314f13f2281054680debb752e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 5 Jan 2010 16:37:45 +0100 Subject: swunolocking1: #i105557#: unoobj.hxx: split out unotextcursor.hxx: move SwXTextCursor from unoobj.hxx to new unotextcursor.hxx. move enum SwGetPropertyStatesCaller to unotextcursor.hxx. --- sw/inc/unoobj.hxx | 222 +----------- sw/inc/unotbl.hxx | 5 + sw/inc/unotextcursor.hxx | 461 ++++++++++++++++++++++++ sw/source/core/access/accpara.cxx | 3 +- sw/source/core/edit/editsh.cxx | 2 +- sw/source/core/unocore/unobkm.cxx | 1 + sw/source/core/unocore/unocrsrhelper.cxx | 1 + sw/source/core/unocore/unodraw.cxx | 1 + sw/source/core/unocore/unofield.cxx | 1 + sw/source/core/unocore/unoframe.cxx | 1 + sw/source/core/unocore/unoftn.cxx | 1 + sw/source/core/unocore/unoidx.cxx | 1 + sw/source/core/unocore/unoobj.cxx | 2 + sw/source/core/unocore/unoobj2.cxx | 2 + sw/source/core/unocore/unoparagraph.cxx | 1 + sw/source/core/unocore/unoport.cxx | 1 + sw/source/core/unocore/unoportenum.cxx | 1 + sw/source/core/unocore/unoredline.cxx | 1 + sw/source/core/unocore/unorefmk.cxx | 1 + sw/source/core/unocore/unosect.cxx | 1 + sw/source/core/unocore/unotbl.cxx | 2 + sw/source/core/unocore/unotext.cxx | 1 + sw/source/filter/xml/XMLRedlineImportHelper.cxx | 1 + sw/source/filter/xml/xmlimp.cxx | 5 +- sw/source/filter/xml/xmltexti.cxx | 1 + sw/source/ui/uno/unoatxt.cxx | 5 +- sw/source/ui/uno/unotxdoc.cxx | 1 + sw/source/ui/uno/unotxvw.cxx | 1 + sw/source/ui/utlui/unotools.cxx | 3 +- 29 files changed, 499 insertions(+), 231 deletions(-) create mode 100644 sw/inc/unotextcursor.hxx (limited to 'sw/source') diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx index 86bcbc2b19..d26420749a 100644 --- a/sw/inc/unoobj.hxx +++ b/sw/inc/unoobj.hxx @@ -42,24 +42,16 @@ #include #include #include -#include -#include -#include -#include -#include -#include #include #include #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -77,13 +69,9 @@ #include #include #include -#include // helper for implementations -#include "TextCursorHelper.hxx" -#include #include #include -#include #include @@ -169,8 +157,8 @@ void ClientModify(SwClient* pClient, SfxPoolItem *pOld, SfxPoolItem *pNew); /* -----------------03.12.98 12:22------------------- * * --------------------------------------------------*/ +class OTextCursorHelper; class SwXTextRange; -class SwXTextCursor; class SwXText : public ::com::sun::star::lang::XTypeProvider, public ::com::sun::star::text::XTextRangeCompare, public ::com::sun::star::text::XRelativeTextContentInsert, @@ -285,214 +273,6 @@ public: CursorType GetTextType() {return eCrsrType;} }; -/* -----------------03.12.98 12:16------------------- - * - * --------------------------------------------------*/ -enum SwGetPropertyStatesCaller -{ - SW_PROPERTY_STATE_CALLER_DEFAULT, - SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION, - SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY, - SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT -}; -#define CRSR_ATTR_MODE_TABLE 1 //attributes should be applied to a table selection -#define CRSR_ATTR_MODE_DONTREPLACE 2 //attributes should be added, not replaced - -typedef cppu::WeakImplHelper12< - ::com::sun::star::text::XSentenceCursor, - ::com::sun::star::text::XWordCursor, - ::com::sun::star::text::XParagraphCursor, - ::com::sun::star::text::XRedline, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::beans::XPropertyState, - ::com::sun::star::document::XDocumentInsertable, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::util::XSortable, - ::com::sun::star::container::XContentEnumerationAccess, - ::com::sun::star::container::XEnumerationAccess, - ::com::sun::star::beans::XMultiPropertyStates - > SwXTextCursor_Base; -class SwXTextCursor : public SwXTextCursor_Base, - public SwClient, - public OTextCursorHelper -{ - SwEventListenerContainer aLstnrCntnr; - const SfxItemPropertySet* m_pPropSet; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; - SwSortOptions* pLastSortOptions; - - CursorType eType; - - // --> FME 2006-03-07 #126177# We need to track if the RemoveCursor_Impl - // user event has been posted. In this case we have to remove the user - // event in ~SwXTextCursor(). - ULONG mnUserEventId; - bool mbRemoveUserEvent; - // <-- - - DECL_STATIC_LINK( SwXTextCursor, RemoveCursor_Impl, - ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface>* ); - -protected: - virtual ~SwXTextCursor(); -public: - void DeleteAndInsert(const String& rText, const bool bForceExpandHints); - SwXTextCursor(::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent, const SwPosition& rPos, - CursorType eSet, SwDoc* pDoc, const SwPosition* pMark = 0); - SwXTextCursor(::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent, SwUnoCrsr* pSourceCrsr, CursorType eSet = CURSOR_ALL); - - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - - DECLARE_XINTERFACE() - - //XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); - - //XTextCursor - neu - virtual void SAL_CALL collapseToStart( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL collapseToEnd( ) throw(::com::sun::star::uno::RuntimeException); - virtual BOOL SAL_CALL isCollapsed( ) throw(::com::sun::star::uno::RuntimeException); - virtual BOOL SAL_CALL goLeft( sal_Int16 nCount, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual BOOL SAL_CALL goRight( sal_Int16 nCount, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL gotoStart( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL gotoEnd( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL gotoRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); - - //XWordCursor - neu - virtual BOOL SAL_CALL isStartOfWord( ) throw(::com::sun::star::uno::RuntimeException); - virtual BOOL SAL_CALL isEndOfWord( ) throw(::com::sun::star::uno::RuntimeException); - virtual BOOL SAL_CALL gotoNextWord( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual BOOL SAL_CALL gotoPreviousWord( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual BOOL SAL_CALL gotoEndOfWord( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual BOOL SAL_CALL gotoStartOfWord( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); - - //XSentenceCursor - neu - virtual BOOL SAL_CALL isStartOfSentence( ) throw(::com::sun::star::uno::RuntimeException); - virtual BOOL SAL_CALL isEndOfSentence( ) throw(::com::sun::star::uno::RuntimeException); - virtual BOOL SAL_CALL gotoNextSentence( BOOL Expand ) throw(::com::sun::star::uno::RuntimeException); - virtual BOOL SAL_CALL gotoPreviousSentence( BOOL Expand ) throw(::com::sun::star::uno::RuntimeException); - virtual BOOL SAL_CALL gotoStartOfSentence( BOOL Expand ) throw(::com::sun::star::uno::RuntimeException); - virtual BOOL SAL_CALL gotoEndOfSentence( BOOL Expand ) throw(::com::sun::star::uno::RuntimeException); - - //ParagraphCursor - neu - virtual BOOL SAL_CALL isStartOfParagraph(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL isEndOfParagraph(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL gotoStartOfParagraph(BOOL Expand) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL gotoEndOfParagraph(BOOL Expand) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL gotoNextParagraph(BOOL Expand) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL gotoPreviousParagraph(BOOL Expand) throw( ::com::sun::star::uno::RuntimeException ); - - //XRedline - virtual void SAL_CALL makeRedline( const ::rtl::OUString& RedlineType, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& RedlineProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - //XTextRange - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException ); - - //XPropertySet - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //XPropertyState - virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - static void SetPropertyValue( - SwPaM& rPaM, - const SfxItemPropertySet& rPropSet, - const rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Any& aValue, - USHORT nAttrMode = 0) - throw(::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::beans::PropertyVetoException, - ::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - static ::com::sun::star::uno::Any GetPropertyValue( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > GetPropertyStates( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames, SwGetPropertyStatesCaller eCaller = SW_PROPERTY_STATE_CALLER_DEFAULT) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - static ::com::sun::star::beans::PropertyState GetPropertyState( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - static void SetPropertyToDefault( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - static ::com::sun::star::uno::Any GetPropertyDefault( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //XDocumentInsertable - neu - virtual void SAL_CALL insertDocumentFromURL(const rtl::OUString& rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aOptions) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException ); - - //XSortable - neu - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL sort(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xDescriptor) throw( ::com::sun::star::uno::RuntimeException ); - - //XContentEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XMultiPropertyStates - //virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - - //SwClient - virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); - - virtual const SwPaM* GetPaM() const; - virtual SwPaM* GetPaM(); - virtual const SwDoc* GetDoc() const; - virtual SwDoc* GetDoc(); - SwUnoCrsr* GetCrsr(){return (SwUnoCrsr*)GetRegisteredIn();} - const SwUnoCrsr* GetCrsr()const{return (SwUnoCrsr*)GetRegisteredIn();} - - static void SetCrsrAttr(SwPaM& rPam, const SfxItemSet& rSet, USHORT nAttrMode ); - // --> OD 2006-07-12 #i63870# - // split third parameter into new parameters - // and to get better control about resulting -// static void GetCrsrAttr(SwPaM& rPam, SfxItemSet& rSet, BOOL bCurrentAttrOnly = FALSE); - static void GetCrsrAttr( SwPaM& rPam, - SfxItemSet& rSet, - BOOL bOnlyTxtAttr = FALSE, - BOOL bGetFromChrFmt = TRUE ); - // <-- - static void getTextFromPam(SwPaM& aCrsr, rtl::OUString& rBuffer); - static SwFmtColl* GetCurTxtFmtColl(SwPaM& rPam, BOOL bConditional); - - static void SelectPam(SwPaM& rCrsr, sal_Bool bExpand); - static void SetString(SwCursor& rCrsr, const rtl::OUString& rString); - - static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > - createSortDescriptor(sal_Bool bFromTable); - static sal_Bool convertSortProperties( - const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rDescriptor, - SwSortOptions& rSortOpt); - - // --> FME 2006-03-07 #126177# - void DoNotRemoveUserEvent() { mbRemoveUserEvent = false; } - // <-- - - bool IsAtEndOfMeta() const; -}; /*-----------------20.03.98 07:47------------------- --------------------------------------------------*/ diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index 4f8e08a50a..050c3a1c97 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -44,6 +45,10 @@ #include // helper for implementations #include // helper for implementations +#include +#include + + class SwTableBoxFmt; class SwTableLine; class SwTableCursor; diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx new file mode 100644 index 0000000000..ce91bd2952 --- /dev/null +++ b/sw/inc/unotextcursor.hxx @@ -0,0 +1,461 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoobj.hxx,v $ + * + * $Revision: 1.49 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SW_UNOTEXTCURSOR_HXX +#define SW_UNOTEXTCURSOR_HXX + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include +#include +#include + + +class SfxItemSet; +class SfxItemPropertySet; +class SwDoc; +struct SwPosition; +class SwCursor; +class SwUnoCrsr; +class SwFmtColl; +struct SwSortOptions; + + +/* -----------------03.12.98 12:16------------------- + * + * --------------------------------------------------*/ +enum SwGetPropertyStatesCaller +{ + SW_PROPERTY_STATE_CALLER_DEFAULT, + SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION, + SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY, + SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT +}; + +/// attributes should be applied to a table selection +#define CRSR_ATTR_MODE_TABLE 1 +/// attributes should be added, not replaced +#define CRSR_ATTR_MODE_DONTREPLACE 2 + +typedef ::cppu::WeakImplHelper12 +< ::com::sun::star::lang::XServiceInfo +, ::com::sun::star::beans::XPropertySet +, ::com::sun::star::beans::XPropertyState +, ::com::sun::star::beans::XMultiPropertyStates +, ::com::sun::star::container::XEnumerationAccess +, ::com::sun::star::container::XContentEnumerationAccess +, ::com::sun::star::util::XSortable +, ::com::sun::star::document::XDocumentInsertable +, ::com::sun::star::text::XSentenceCursor +, ::com::sun::star::text::XWordCursor +, ::com::sun::star::text::XParagraphCursor +, ::com::sun::star::text::XRedline +> SwXTextCursor_Base; + +class SwXTextCursor + : public SwXTextCursor_Base + , public SwClient + , public OTextCursorHelper +{ + +private: + + SwEventListenerContainer aLstnrCntnr; + const SfxItemPropertySet* m_pPropSet; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; + SwSortOptions* pLastSortOptions; + + CursorType eType; + + // --> FME 2006-03-07 #126177# We need to track if the RemoveCursor_Impl + // user event has been posted. In this case we have to remove the user + // event in ~SwXTextCursor(). + ULONG mnUserEventId; + bool mbRemoveUserEvent; + // <-- + + DECL_STATIC_LINK(SwXTextCursor, RemoveCursor_Impl, + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*); + +protected: + + virtual ~SwXTextCursor(); + +public: + + SwXTextCursor( + ::com::sun::star::uno::Reference< + ::com::sun::star::text::XText > xParent, + const SwPosition& rPos, + CursorType eSet, SwDoc* pDoc, const SwPosition* pMark = 0); + SwXTextCursor( + ::com::sun::star::uno::Reference< + ::com::sun::star::text::XText > xParent, + SwUnoCrsr* pSourceCrsr, CursorType eSet = CURSOR_ALL); + + SwUnoCrsr* GetCrsr() {return (SwUnoCrsr*)GetRegisteredIn();} + const SwUnoCrsr* GetCrsr() const {return (SwUnoCrsr*)GetRegisteredIn();} + + // --> FME 2006-03-07 #126177# + void DoNotRemoveUserEvent() { mbRemoveUserEvent = false; } + // <-- + + bool IsAtEndOfMeta() const; + + void DeleteAndInsert(const String& rText, + const bool bForceExpandHints); + + static void SetCrsrAttr(SwPaM& rPam, const SfxItemSet& rSet, + USHORT nAttrMode); + static void GetCrsrAttr( SwPaM& rPam, SfxItemSet& rSet, + BOOL bOnlyTxtAttr = FALSE, BOOL bGetFromChrFmt = TRUE ); + static void getTextFromPam(SwPaM& aCrsr, ::rtl::OUString& rBuffer); + static SwFmtColl* GetCurTxtFmtColl(SwPaM& rPam, BOOL bConditional); + + static void SelectPam(SwPaM& rCrsr, sal_Bool bExpand); + static void SetString(SwCursor& rCrsr, const ::rtl::OUString& rString); + + static ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue > + createSortDescriptor(sal_Bool bFromTable); + static sal_Bool convertSortProperties( + const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& rDescriptor, + SwSortOptions& rSortOpt); + + static void SetPropertyValue( + SwPaM& rPaM, + const SfxItemPropertySet& rPropSet, + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Any& aValue, + USHORT nAttrMode = 0) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Any GetPropertyValue( + SwPaM& rPaM, + const SfxItemPropertySet& rPropSet, + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyState > GetPropertyStates( + SwPaM& rPaM, + const SfxItemPropertySet& rPropSet, + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames, + SwGetPropertyStatesCaller eCaller=SW_PROPERTY_STATE_CALLER_DEFAULT) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + static ::com::sun::star::beans::PropertyState GetPropertyState( + SwPaM& rPaM, + const SfxItemPropertySet& rPropSet, + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + static void SetPropertyToDefault( + SwPaM& rPaM, + const SfxItemPropertySet& rPropSet, + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Any GetPropertyDefault( + SwPaM& rPaM, + const SfxItemPropertySet& rPropSet, + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + virtual const SwPaM* GetPaM() const; + virtual SwPaM* GetPaM(); + virtual const SwDoc* GetDoc() const; + virtual SwDoc* GetDoc(); + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + + DECLARE_XINTERFACE() + + static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); + + // XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( + const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier) + throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( + const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // XPropertySet + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Any& rValue) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // XPropertyState + virtual ::com::sun::star::beans::PropertyState SAL_CALL + getPropertyState(const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyState > SAL_CALL + getPropertyStates( + const ::com::sun::star::uno::Sequence< + ::rtl::OUString >& rPropertyNames) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyToDefault( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // XMultiPropertyStates + virtual void SAL_CALL setAllPropertiesToDefault() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertiesToDefault( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > + SAL_CALL getPropertyDefaults( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() + throw (::com::sun::star::uno::RuntimeException); + + // XEnumerationAccess + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::container::XEnumeration > SAL_CALL + createEnumeration() + throw (::com::sun::star::uno::RuntimeException); + + // XContentEnumerationAccess + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::container::XEnumeration > SAL_CALL + createContentEnumeration(const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getAvailableServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // XSortable + virtual ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue > SAL_CALL + createSortDescriptor() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL sort( + const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& xDescriptor) + throw (::com::sun::star::uno::RuntimeException); + + // XDocumentInsertable + virtual void SAL_CALL insertDocumentFromURL( + const ::rtl::OUString& rURL, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& rOptions) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::RuntimeException); + + // XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > + SAL_CALL getText() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL getStart() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL getEnd() + throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getString() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setString(const ::rtl::OUString& rString) + throw (::com::sun::star::uno::RuntimeException); + + // XTextCursor + virtual void SAL_CALL collapseToStart() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL collapseToEnd() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL isCollapsed() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL goLeft(sal_Int16 nCount, sal_Bool bExpand) + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL goRight(sal_Int16 nCount, sal_Bool bExpand) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL gotoStart(sal_Bool bExpand) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL gotoEnd(sal_Bool bExpand) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL gotoRange( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange >& xRange, + sal_Bool bExpand) + throw (::com::sun::star::uno::RuntimeException); + + // XWordCursor + virtual sal_Bool SAL_CALL isStartOfWord() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL isEndOfWord() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL gotoNextWord(sal_Bool bExpand) + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL gotoPreviousWord(sal_Bool bExpand) + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL gotoEndOfWord(sal_Bool bExpand) + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL gotoStartOfWord(sal_Bool bExpand) + throw (::com::sun::star::uno::RuntimeException); + + // XSentenceCursor + virtual sal_Bool SAL_CALL isStartOfSentence() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL isEndOfSentence() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL gotoNextSentence(sal_Bool Expand) + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL gotoPreviousSentence(sal_Bool Expand) + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL gotoStartOfSentence(sal_Bool Expand) + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL gotoEndOfSentence(sal_Bool Expand) + throw (::com::sun::star::uno::RuntimeException); + + // XParagraphCursor + virtual sal_Bool SAL_CALL isStartOfParagraph() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL isEndOfParagraph() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL gotoStartOfParagraph(sal_Bool Expand) + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL gotoEndOfParagraph(sal_Bool Expand) + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL gotoNextParagraph(sal_Bool Expand) + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL gotoPreviousParagraph(sal_Bool Expand) + throw (::com::sun::star::uno::RuntimeException); + + // XRedline + virtual void SAL_CALL makeRedline( + const ::rtl::OUString& rRedlineType, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& RedlineProperties) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + +}; + +#endif // SW_UNOTEXTCURSOR_HXX + diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index a48e36d134..57c5d9c57b 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -30,10 +30,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include #include #include #include +#include #include #include #include "fesh.hxx" @@ -63,7 +65,6 @@ #include // for GetWordBoundary // for get/setCharacterAttribute(...) #include "unocrsr.hxx" -#include "unoobj.hxx" #include "unoport.hxx" #include "doc.hxx" #include "crsskip.hxx" diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 8e79603719..56df4dac76 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -63,7 +63,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index fbbaa5cbce..ce3b47aaa0 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 34e73a0cf2..f83d0590da 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 31049e6a92..abac571c1e 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index f8dc8e5cce..79a7b4f5fd 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 9afdc7e011..cdc4929e6a 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -61,6 +61,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index b97680ae79..0483785952 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 7fcde70176..f6fe36d371 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -58,6 +58,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 5486a8a97f..3b133dad13 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -83,6 +83,7 @@ #include #include #include +#include #include #include #include @@ -118,6 +119,7 @@ #include #include #include +#include #include #include diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index a143ef1651..8e85bcef43 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -78,6 +78,7 @@ #include #include #include +#include #include #include #include @@ -123,6 +124,7 @@ #include // OD 2004-05-24 #i28701# #include +#include #include #include diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 5b28bfb68d..0dfd59ee41 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index d59d33988b..d0ba4810ce 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 12c89e9c24..0922289eee 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index 67704d98ab..e5147d8364 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 0367831ee5..14c2961fa7 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index c377e2cb3d..1064b7b88f 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 188e378741..b3c9d2297f 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -84,6 +84,7 @@ #include #include #include +#include #include #include // SvNumberFormatter #include @@ -99,6 +100,7 @@ #include #include #include +#include #include diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index bc9343996f..ea9143ca12 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index ebecc1d1bd..89f2aad1c5 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -33,6 +33,7 @@ #include "XMLRedlineImportHelper.hxx" +#include #include "unoobj.hxx" #include #include "doc.hxx" diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 666a717bc1..4e29d2765c 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -38,18 +38,15 @@ #include #include #include -#ifndef _XMLOFF_TXTIMP_HXX #include -#endif #include -#ifndef _XMLOFF_XMLTEXTSHAPEIMPORTHELPER_HXX_ #include -#endif #include #include #include #include #include +#include #include #include "unocrsr.hxx" #include diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 72fe426da2..f40ce0a5a5 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -51,6 +51,7 @@ #include #include "unocrsr.hxx" #include "unoobj.hxx" +#include "TextCursorHelper.hxx" #include "unoframe.hxx" #include "doc.hxx" #include "unocoll.hxx" diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx index 4801259cd7..3586caaba7 100644 --- a/sw/source/ui/uno/unoatxt.cxx +++ b/sw/source/ui/uno/unoatxt.cxx @@ -34,10 +34,7 @@ #define _SVSTDARR_STRINGS - -#ifndef _COM_SUN_STAR_BEANS_PropertyAttribute_HPP_ #include -#endif #include #include #include @@ -53,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -68,6 +66,7 @@ #include + SV_IMPL_REF ( SwDocShell ) using namespace ::com::sun::star; using ::rtl::OUString; diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 3f9e2b0b12..0bc2acd10b 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 4b940c2fc7..be53796ad2 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -79,6 +79,7 @@ #include #include #include +#include #include #include diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx index 1b23e3560e..a6cf3444a3 100644 --- a/sw/source/ui/utlui/unotools.cxx +++ b/sw/source/ui/utlui/unotools.cxx @@ -59,12 +59,13 @@ #include #include #include -#include +#include #include #include #include + using namespace ::com::sun::star; using ::rtl::OUString; -- cgit v1.2.3 From d639907e15b523fce7f831dfcf7fa46a5c1ec92b Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 5 Jan 2010 16:37:46 +0100 Subject: swunolocking1: #i105557#: unoobj.hxx: split out unotextrange.hxx: move SwXTextRange, SwXTextRanges from unoobj.hxx to new unotextrange.hxx. move SwUnoInternalPaM to unotextrange.hxx. --- sw/inc/unoframe.hxx | 8 +- sw/inc/unoobj.hxx | 184 ----------- sw/inc/unotbl.hxx | 9 +- sw/inc/unotextrange.hxx | 376 +++++++++++++++++++++++ sw/source/core/access/accpara.cxx | 2 +- sw/source/core/crsr/crsrsh.cxx | 2 +- sw/source/core/txtnode/fmtatr2.cxx | 2 +- sw/source/core/txtnode/ndtxt.cxx | 2 +- sw/source/core/unocore/unobkm.cxx | 2 +- sw/source/core/unocore/unodraw.cxx | 1 + sw/source/core/unocore/unofield.cxx | 1 + sw/source/core/unocore/unoflatpara.cxx | 1 + sw/source/core/unocore/unoframe.cxx | 1 + sw/source/core/unocore/unoftn.cxx | 3 +- sw/source/core/unocore/unoidx.cxx | 1 + sw/source/core/unocore/unoobj.cxx | 1 + sw/source/core/unocore/unoobj2.cxx | 1 + sw/source/core/unocore/unoparagraph.cxx | 1 + sw/source/core/unocore/unoport.cxx | 1 + sw/source/core/unocore/unoredline.cxx | 1 + sw/source/core/unocore/unorefmk.cxx | 1 + sw/source/core/unocore/unosect.cxx | 1 + sw/source/core/unocore/unotbl.cxx | 1 + sw/source/core/unocore/unotext.cxx | 1 + sw/source/filter/html/htmlform.cxx | 9 +- sw/source/filter/ww8/ww8par3.cxx | 2 +- sw/source/filter/xml/XMLRedlineImportHelper.cxx | 1 + sw/source/filter/xml/swxml.cxx | 2 +- sw/source/filter/xml/xmlimp.cxx | 1 + sw/source/filter/xml/xmltbli.cxx | 2 +- sw/source/ui/dialog/SwSpellDialogChildWindow.cxx | 6 +- sw/source/ui/uno/unoatxt.cxx | 1 + sw/source/ui/uno/unotxdoc.cxx | 1 + sw/source/ui/uno/unotxvw.cxx | 1 + 34 files changed, 423 insertions(+), 207 deletions(-) create mode 100644 sw/inc/unotextrange.hxx (limited to 'sw/source') diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx index 338d5963d0..cc87cc1ea7 100644 --- a/sw/inc/unoframe.hxx +++ b/sw/inc/unoframe.hxx @@ -31,7 +31,7 @@ #define _UNOFRAME_HXX #include -#include +#include #include #include #include @@ -43,8 +43,14 @@ #include */ +#include + +#include + + class SwDoc; class SfxItemPropertSet; + /*-----------------12.02.98 11:21------------------- --------------------------------------------------*/ diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx index d26420749a..ec90265cec 100644 --- a/sw/inc/unoobj.hxx +++ b/sw/inc/unoobj.hxx @@ -35,46 +35,35 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include -#include #include #include #include -#include -#include #include -#include #include #include #include #include #include -#include #include #include // helper for factories #include // helper for implementations -#include // helper for implementations #include // helper for implementations #include // helper for implementations #include // helper for implementations -#include #include #include #include #include -#include - #include #include @@ -110,19 +99,6 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx, FrameDependSortList_t & rFrames, const bool _bAtCharAnchoredObjs ); -/* -----------------29.04.98 07:35------------------- - * - * --------------------------------------------------*/ -class SwUnoInternalPaM : public SwPaM -{ - SwUnoInternalPaM( const SwUnoInternalPaM& ); -public: - SwUnoInternalPaM(SwDoc& rDoc); - ~SwUnoInternalPaM(); - - SwUnoInternalPaM& operator=(const SwPaM& rPaM); -}; - /*-----------------04.03.98 11:54------------------- Start/EndAction oder Start/EndAllAction --------------------------------------------------*/ @@ -149,8 +125,6 @@ class UnoActionRemoveContext /****************************************************************************** * ******************************************************************************/ -typedef com::sun::star::uno::Reference< com::sun::star::text::XTextRange > * XTextRangeRefPtr; -SV_DECL_PTRARR(XTextRangeArr, XTextRangeRefPtr, 4, 4) void ClientModify(SwClient* pClient, SfxPoolItem *pOld, SfxPoolItem *pNew); @@ -371,164 +345,6 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > CreateTextCursor(BOOL bIgnoreTables = sal_False); }; -class SW_DLLPUBLIC SwXTextRange : public cppu::WeakImplHelper8 -< - ::com::sun::star::text::XTextRange, - ::com::sun::star::lang::XUnoTunnel, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::container::XContentEnumerationAccess, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::beans::XPropertyState, - ::com::sun::star::container::XEnumerationAccess, - ::com::sun::star::text::XRedline ->, private SwClient -{ - friend class SwXText; - enum RangePosition - { - RANGE_IN_TEXT, // 'normaler' ::com::sun::star::text::TextRange - RANGE_IN_FRAME,// TextPosition wurde mit einem Rahmen angelegt, der kein Uno-Objekt besitzt - RANGE_IN_CELL, // TextPosition wurde mit einer Zelle angelegt, die kein Uno-Objekt besitzt - RANGE_IS_TABLE, // Anker einer Tabelle - RANGE_INVALID // von NewInstance erzeugt - } eRangePosition; - - SwDoc* pDoc; - SwTableBox* pBox; - const SwStartNode* pBoxStartNode; - SwDepend aObjectDepend; //Format der Tabelle oder des Rahmens anmelden - const SfxItemPropertySet* m_pPropSet; - //SwDepend aFrameDepend; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; - ::sw::mark::IMark* pMark; - - void _CreateNewBookmark(SwPaM& rPam); - //TODO: new exception type for protected content - void DeleteAndInsert(const String& rText, const bool bForceExpandHints) - throw( ::com::sun::star::uno::RuntimeException ); -protected: - virtual ~SwXTextRange(); - -public: - SwXTextRange(SwPaM& rPam, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > & rxParent, enum RangePosition eRange = RANGE_IN_TEXT); - // only for RANGE_IS_TABLE - SwXTextRange(SwFrmFmt& rTblFmt); - - TYPEINFO(); - - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - - //XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); - - //XTextRange - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException ); - - //XContentEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XPropertySet - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //XPropertyState - virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //XRedline - virtual void SAL_CALL makeRedline( const ::rtl::OUString& RedlineType, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& RedlineProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - //SwClient - virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); - BOOL GetPositions(SwPaM& rToFill) const; - const SwDoc* GetDoc() const - { return pDoc; } - SwDoc* GetDoc() - { return pDoc; } - const ::sw::mark::IMark * GetBookmark() const - { return pMark; } - - static BOOL XTextRangeToSwPaM(SwUnoInternalPaM& rToFill, - const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange); - static ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > CreateTextRangeFromPosition( - SwDoc* pDoc, - const SwPosition& rPos, const SwPosition* pMark); - static ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > CreateParentXText(SwDoc* pDoc, - const SwPosition& rPos); -}; - -/* -----------------15.05.98 08:29------------------- - * - * --------------------------------------------------*/ -typedef cppu::WeakImplHelper3 -< - ::com::sun::star::container::XIndexAccess, - ::com::sun::star::lang::XUnoTunnel, - ::com::sun::star::lang::XServiceInfo -> -SwXTextRangesBaseClass; -class SwXTextRanges : public SwXTextRangesBaseClass, - public SwClient -{ - XTextRangeArr* pRangeArr; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; - XTextRangeArr* GetRangesArray(); - SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)GetRegisteredIn(); } -protected: - virtual ~SwXTextRanges(); -public: - SwXTextRanges(); - SwXTextRanges(SwPaM* pCrsr); - - - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - - //XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) - throw(::com::sun::star::uno::RuntimeException); - - - //XIndexAccess - virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); - - //XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - - //SwClient - virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); - const SwUnoCrsr* GetCursor() const { return (const SwUnoCrsr*)GetRegisteredIn(); } -}; /*-----------------12.02.98 08:01------------------- diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index 050c3a1c97..f1770f5341 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -41,11 +41,14 @@ #include #include #include -#include // helper for implementations -#include // helper for implementations -#include // helper for implementations + +#include +#include +#include +#include #include + #include diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx new file mode 100644 index 0000000000..a7d13daf48 --- /dev/null +++ b/sw/inc/unotextrange.hxx @@ -0,0 +1,376 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoobj.hxx,v $ + * + * $Revision: 1.49 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SW_UNOTEXTRANGE_HXX +#define SW_UNOTEXTRANGE_HXX + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include + + +class String; +class SfxItemPropertySet; +class SwDoc; +class SwStartNode; +struct SwPosition; +class SwPaM; +class SwUnoCrsr; +class SwFrmFmt; +class SwTableBox; + +namespace sw { + namespace mark { + class IMark; + } +} + +/* -----------------29.04.98 07:35------------------- + * + * --------------------------------------------------*/ +class SwUnoInternalPaM + : public SwPaM +{ + +private: + SwUnoInternalPaM(const SwUnoInternalPaM&); + SwUnoInternalPaM& operator=(const SwPaM& rPaM); + +public: + SwUnoInternalPaM(SwDoc& rDoc); + virtual ~SwUnoInternalPaM(); + +}; + + +typedef ::cppu::WeakImplHelper8 +< ::com::sun::star::lang::XUnoTunnel +, ::com::sun::star::lang::XServiceInfo +, ::com::sun::star::beans::XPropertySet +, ::com::sun::star::beans::XPropertyState +, ::com::sun::star::container::XEnumerationAccess +, ::com::sun::star::container::XContentEnumerationAccess +, ::com::sun::star::text::XTextRange +, ::com::sun::star::text::XRedline +> SwXTextRange_Base; + +class SW_DLLPUBLIC SwXTextRange + : public SwXTextRange_Base + , private SwClient +{ + +private: + + friend class SwXText; + + enum RangePosition + { + RANGE_IN_TEXT, // "ordinary" ::com::sun::star::text::TextRange + RANGE_IN_FRAME, // position created with a frame that has no uno object + RANGE_IN_CELL, // position created with a cell that has no uno object + RANGE_IS_TABLE, // anchor of a table + RANGE_INVALID // created by NewInstance + } eRangePosition; + + SwDoc* pDoc; + SwTableBox* pBox; + const SwStartNode* pBoxStartNode; + SwDepend aObjectDepend; // register at format of table or frame + const SfxItemPropertySet* m_pPropSet; + //SwDepend aFrameDepend; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > + xParentText; + ::sw::mark::IMark* pMark; + + void _CreateNewBookmark(SwPaM& rPam); + //TODO: new exception type for protected content + void DeleteAndInsert(const String& rText, const bool bForceExpandHints) + throw (::com::sun::star::uno::RuntimeException); + +protected: + + virtual ~SwXTextRange(); + +public: + + SwXTextRange(SwPaM& rPam, + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XText > & xParent, + enum RangePosition eRange = RANGE_IN_TEXT); + // only for RANGE_IS_TABLE + SwXTextRange(SwFrmFmt& rTblFmt); + + BOOL GetPositions(SwPaM& rToFill) const; + const SwDoc* GetDoc() const + { return pDoc; } + SwDoc* GetDoc() + { return pDoc; } + const ::sw::mark::IMark * GetBookmark() const + { return pMark; } + + static BOOL XTextRangeToSwPaM(SwUnoInternalPaM& rToFill, + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextRange); + static ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > CreateTextRangeFromPosition( + SwDoc* pDoc, + const SwPosition& rPos, const SwPosition* pMark); + static ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > + CreateParentXText(SwDoc* pDoc, const SwPosition& rPos); + + TYPEINFO(); + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + + static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); + + // XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( + const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier) + throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( + const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // XPropertySet + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Any& rValue) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // XPropertyState + virtual ::com::sun::star::beans::PropertyState SAL_CALL + getPropertyState(const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyState > SAL_CALL + getPropertyStates( + const ::com::sun::star::uno::Sequence< + ::rtl::OUString >& rPropertyNames) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyToDefault( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() + throw (::com::sun::star::uno::RuntimeException); + + // XEnumerationAccess + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::container::XEnumeration > SAL_CALL + createEnumeration() + throw (::com::sun::star::uno::RuntimeException); + + // XContentEnumerationAccess + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::container::XEnumeration > SAL_CALL + createContentEnumeration(const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getAvailableServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > + SAL_CALL getText() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL getStart() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL getEnd() + throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getString() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setString(const ::rtl::OUString& rString) + throw (::com::sun::star::uno::RuntimeException); + + // XRedline + virtual void SAL_CALL makeRedline( + const ::rtl::OUString& rRedlineType, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& RedlineProperties) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + +}; + +/* -----------------15.05.98 08:29------------------- + * + * --------------------------------------------------*/ +typedef ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > * + XTextRangeRefPtr; +SV_DECL_PTRARR(XTextRangeArr, XTextRangeRefPtr, 4, 4) + +typedef ::cppu::WeakImplHelper3 +< ::com::sun::star::lang::XUnoTunnel +, ::com::sun::star::lang::XServiceInfo +, ::com::sun::star::container::XIndexAccess +> SwXTextRanges_Base; + +class SwXTextRanges + : public SwXTextRanges_Base + , public SwClient +{ + +private: + + XTextRangeArr* pRangeArr; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > + xParentText; + XTextRangeArr* GetRangesArray(); + SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)GetRegisteredIn(); } + +protected: + + virtual ~SwXTextRanges(); + +public: + + SwXTextRanges(); + SwXTextRanges(SwPaM* pCrsr); + + const SwUnoCrsr* GetCursor() const { + return (const SwUnoCrsr*)(GetRegisteredIn()); + } + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + + static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); + + // XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( + const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier) + throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( + const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() + throw (::com::sun::star::uno::RuntimeException); + + // XIndexAccess + virtual sal_Int32 SAL_CALL getCount() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) + throw (::com::sun::star::lang::IndexOutOfBoundsException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + +}; + +#endif // SW_UNOTEXTRANGE_HXX + diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 57c5d9c57b..c9de2c74df 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 5c6fc9a21c..674b95634d 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -66,7 +66,7 @@ #include // ...Percent() #include #include // SMARTTAGS -#include // SMARTTAGS +#include // SMARTTAGS #include #include #include diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index 3d0a043920..d1b2f35382 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -57,7 +57,7 @@ #include // for meta #include // for meta #include -#include // SwXTextRange +#include #include #include // GetNumberFormat diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 92aedfd2f9..4ed6861b54 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -4973,7 +4973,7 @@ bool SwTxtNode::IsInContent() const } #include -#include +#include ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XMetadatable > SwTxtNode::MakeUnoObject() diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index ce3b47aaa0..bf52d0c0db 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -31,12 +31,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index abac571c1e..608e175722 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 79a7b4f5fd..cde0e276dd 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index 68015384da..de481a867a 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index cdc4929e6a..da2fe60bdb 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -61,6 +61,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index 0483785952..689a73bafd 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -31,11 +31,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include #include #include +#include #include #include #include @@ -48,6 +48,7 @@ #include #include + using namespace ::com::sun::star; using ::rtl::OUString; diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index f6fe36d371..085848fcfb 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -58,6 +58,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 3b133dad13..55586df381 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -83,6 +83,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 8e85bcef43..26898f6c50 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -78,6 +78,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 0dfd59ee41..bf1c52eb09 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index d0ba4810ce..b34a4579f0 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index e5147d8364..ceeb6ac051 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 14c2961fa7..48e6159d19 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 1064b7b88f..ce78e9f4f8 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index b3c9d2297f..2e119b7339 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -84,6 +84,7 @@ #include #include #include +#include #include #include #include // SvNumberFormatter diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index ea9143ca12..fe0ff7b42b 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 7a0449db96..0691f94fcf 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -34,22 +34,16 @@ #include #include -#ifndef _WRKWIN_HXX //autogen #include -#endif #include -#ifndef _TOOLKIT_UNOHLP_HXX #include -#endif #include #include #include #include #include -#ifndef _SFXAPP_HXX #include -#endif #include #include #include @@ -84,13 +78,14 @@ #include #include #include -#include +#include #include "dcontact.hxx" #include "swcss1.hxx" #include "swhtml.hxx" #include "htmlform.hxx" + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 4e1ec2fcfd..aed92130ee 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -77,7 +77,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index 89f2aad1c5..bd535912f6 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -35,6 +35,7 @@ #include "XMLRedlineImportHelper.hxx" #include #include "unoobj.hxx" +#include #include #include "doc.hxx" #include diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index db83d59eaf..8d964ac1d8 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -72,7 +72,7 @@ #include #include #include -#include +#include #include #include diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 4e29d2765c..39f1c022e7 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -48,6 +48,7 @@ #include #include #include +#include #include "unocrsr.hxx" #include #include diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 20eb2e53ed..a50779bf1b 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -32,7 +32,6 @@ #include "precompiled_sw.hxx" - #include "hintids.hxx" #include @@ -58,6 +57,7 @@ #include "swtblfmt.hxx" #include "pam.hxx" #include "unotbl.hxx" +#include "unotextrange.hxx" #include "unocrsr.hxx" #include "cellatr.hxx" #include "swddetbl.hxx" diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx index 8969beb163..f0e72323d2 100644 --- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx @@ -30,6 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include #include #include @@ -50,21 +51,20 @@ #include #include #include -#ifndef _DOCSH_HXX #include -#endif #include #include #include #include #include #include -#include +#include #ifndef _DIALOG_HXX #include #endif #include + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::text; diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx index 3586caaba7..d9e3a2fd3a 100644 --- a/sw/source/ui/uno/unoatxt.cxx +++ b/sw/source/ui/uno/unoatxt.cxx @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 0bc2acd10b..8b04ca4038 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index be53796ad2..19f1aa0dea 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -80,6 +80,7 @@ #include #include #include +#include #include #include -- cgit v1.2.3 From 12f2040f7afef93a2f032f210ae83a7a33c31d74 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 5 Jan 2010 16:37:47 +0100 Subject: swunolocking1: #i105557#: unoobj.hxx: split out unotext.hxx etc.: move SwXText from unoobj.hxx to new unotext.hxx. move SwXBodyText, SwXHeadFootText from unoobj.hxx to new unotextbodyhf.hxx. move SwXFootnote from unoobj.hxx to new unofootnote.hxx. --- sw/inc/unofootnote.hxx | 246 ++++++++++++++++++++ sw/inc/unoframe.hxx | 18 +- sw/inc/unoobj.hxx | 326 --------------------------- sw/inc/unoredline.hxx | 4 +- sw/inc/unotbl.hxx | 13 +- sw/inc/unotext.hxx | 375 +++++++++++++++++++++++++++++++ sw/inc/unotextbodyhf.hxx | 218 ++++++++++++++++++ sw/source/core/doc/doclay.cxx | 3 +- sw/source/core/layout/atrfrm.cxx | 1 + sw/source/core/unocore/unoclbck.cxx | 2 +- sw/source/core/unocore/unocoll.cxx | 2 + sw/source/core/unocore/unocrsrhelper.cxx | 1 + sw/source/core/unocore/unodraw.cxx | 2 + sw/source/core/unocore/unoftn.cxx | 14 +- sw/source/core/unocore/unoobj2.cxx | 2 + sw/source/core/unocore/unoparagraph.cxx | 1 + sw/source/core/unocore/unoredlines.cxx | 1 + sw/source/core/unocore/unorefmk.cxx | 1 + sw/source/core/unocore/unostyle.cxx | 9 +- sw/source/core/unocore/unotext.cxx | 29 +-- sw/source/filter/xml/xmlexp.cxx | 4 +- sw/source/filter/xml/xmlfonte.cxx | 5 +- sw/source/filter/xml/xmlimp.cxx | 1 + sw/source/filter/xml/xmltexte.cxx | 5 +- sw/source/ui/uno/unoatxt.cxx | 1 + sw/source/ui/uno/unotxdoc.cxx | 1 + sw/source/ui/uno/unotxvw.cxx | 1 + 27 files changed, 914 insertions(+), 372 deletions(-) create mode 100644 sw/inc/unofootnote.hxx create mode 100644 sw/inc/unotext.hxx create mode 100644 sw/inc/unotextbodyhf.hxx (limited to 'sw/source') diff --git a/sw/inc/unofootnote.hxx b/sw/inc/unofootnote.hxx new file mode 100644 index 0000000000..d1c869404d --- /dev/null +++ b/sw/inc/unofootnote.hxx @@ -0,0 +1,246 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoobj.hxx,v $ + * + * $Revision: 1.49 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SW_UNOFOOTNOTE_HXX +#define SW_UNOFOOTNOTE_HXX + +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include + + +class SwDoc; +class SwFmtFtn; + + +/*-----------------12.02.98 08:01------------------- + +--------------------------------------------------*/ +typedef ::cppu::WeakImplHelper5 +< ::com::sun::star::lang::XUnoTunnel +, ::com::sun::star::lang::XServiceInfo +, ::com::sun::star::beans::XPropertySet +, ::com::sun::star::container::XEnumerationAccess +, ::com::sun::star::text::XFootnote +> SwXFootnote_Base; + +class SwXFootnote + : public SwXFootnote_Base + , public SwXText + , public SwClient +{ + +private: + + friend class SwXFootnotes; + + SwEventListenerContainer aLstnrCntnr; + const SwFmtFtn* pFmtFtn; + BOOL m_bIsDescriptor; + String m_sLabel; + BOOL m_bIsEndnote; + +protected: + + virtual const SwStartNode *GetStartNode() const; + + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextCursor > + createCursor() + throw (::com::sun::star::uno::RuntimeException); + + virtual ~SwXFootnote(); + +public: + + SwXFootnote(BOOL bEndnote); + SwXFootnote(SwDoc* pDoc, const SwFmtFtn& rFmt); + + void attachToRange( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextRange) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + const SwFmtFtn* FindFmt() const { return GetDoc() ? pFmtFtn : 0; } + void Invalidate(); + + TYPEINFO(); + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( + const ::com::sun::star::uno::Type& rType) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); } + virtual void SAL_CALL release() throw() { OWeakObject::release(); } + + // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > + SAL_CALL getTypes() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL + getImplementationId() + throw (::com::sun::star::uno::RuntimeException); + + static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); + + // XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( + const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier) + throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( + const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // XComponent + virtual void SAL_CALL dispose() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener) + throw (::com::sun::star::uno::RuntimeException); + + // XPropertySet + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Any& rValue) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() + throw (::com::sun::star::uno::RuntimeException); + + // XEnumerationAccess + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::container::XEnumeration > SAL_CALL + createEnumeration() + throw (::com::sun::star::uno::RuntimeException); + + // XTextContent + virtual void SAL_CALL attach( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextRange) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL getAnchor() + throw (::com::sun::star::uno::RuntimeException); + + // XFootnote + virtual ::rtl::OUString SAL_CALL getLabel() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setLabel(const ::rtl::OUString& rLabel) + throw (::com::sun::star::uno::RuntimeException); + + // XSimpleText + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextCursor > SAL_CALL + createTextCursor() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextCursor > SAL_CALL + createTextCursorByRange( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextPosition) + throw (::com::sun::star::uno::RuntimeException); + +}; + +#endif // SW_UNOFOOTNOTE_HXX + diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx index cc87cc1ea7..e48f029b00 100644 --- a/sw/inc/unoframe.hxx +++ b/sw/inc/unoframe.hxx @@ -30,26 +30,34 @@ #ifndef _UNOFRAME_HXX #define _UNOFRAME_HXX -#include #include #include +#include #include #include #include #include #include #include - /* -#include - */ +#include #include +#include #include +#include +#include +#include +#include + -class SwDoc; class SfxItemPropertSet; +class SdrObject; +class SwDoc; +class SwFmt; +class SwFlyFrmFmt; + /*-----------------12.02.98 11:21------------------- diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx index ec90265cec..227a7c9859 100644 --- a/sw/inc/unoobj.hxx +++ b/sw/inc/unoobj.hxx @@ -36,28 +36,14 @@ #include #include #include -#include #include #include #include -#include #include -#include #include -#include -#include -#include -#include -#include -#include -#include #include #include // helper for factories -#include // helper for implementations -#include // helper for implementations -#include // helper for implementations -#include // helper for implementations #include #include #include @@ -68,7 +54,6 @@ #include -class SwFmtFtn; class GetCurTxtFmtColl; @@ -128,124 +113,6 @@ class UnoActionRemoveContext void ClientModify(SwClient* pClient, SfxPoolItem *pOld, SfxPoolItem *pNew); -/* -----------------03.12.98 12:22------------------- - * - * --------------------------------------------------*/ -class OTextCursorHelper; -class SwXTextRange; -class SwXText : public ::com::sun::star::lang::XTypeProvider, - public ::com::sun::star::text::XTextRangeCompare, - public ::com::sun::star::text::XRelativeTextContentInsert, - public ::com::sun::star::text::XRelativeTextContentRemove, - public ::com::sun::star::beans::XPropertySet, - public ::com::sun::star::lang::XUnoTunnel, - public ::com::sun::star::text::XTextAppendAndConvert -{ - SwDoc* pDoc; - BOOL bObjectValid; - CursorType eCrsrType; - const SfxItemPropertySet* m_pPropSet; - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL finishOrAppendParagraph( - bool bFinish, - const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & CharacterAndParagraphProperties ) - throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - virtual void PrepareForAttach( ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > & xRange, - const SwXTextRange* const pRange, const SwPaM * const pPam); - -public: /*not protected because C++ is retarded*/ - virtual const SwStartNode *GetStartNode() const; - -public: - SwXText(SwDoc* pDc, CursorType eType); - virtual ~SwXText(); - - const SwDoc* GetDoc()const {return pDoc;} - SwDoc* GetDoc() {return pDoc;} - - // wenn ein SwXText attached wird, wird das Doc gesetzt - void SetDoc(SwDoc* pDc) - {DBG_ASSERT(!pDoc || !pDc, "Doc schon gesetzt?"); - pDoc = pDc; - bObjectValid = 0 != pDc; - } - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); - - //XText - virtual void SAL_CALL insertString(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const rtl::OUString& aString, BOOL bAbsorb) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL insertControlCharacter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, sal_Int16 nControlCharacter, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL insertTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); - - //XTextRange - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException ); - - //XTextRangeCompare - sal_Int16 SAL_CALL compareRegionStarts( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR2 ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - sal_Int16 SAL_CALL compareRegionEnds( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR2 ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - //XRelativeTextContentInsert - virtual void SAL_CALL insertTextContentBefore(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xNewContent, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xSuccessor) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL insertTextContentAfter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xNewContent, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xPredecessor) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - //XRelativeTextContentRemove - virtual void SAL_CALL removeTextContentBefore(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xSuccessor) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeTextContentAfter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xPredecessor) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - - //XPropertySet - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //XUnoTunnel - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); - - //XParagraphAppend - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL appendParagraph( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & CharacterAndParagraphProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL finishParagraph( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & CharacterAndParagraphProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - //XTextPortionAppend - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL appendTextPortion( const ::rtl::OUString& Text, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & CharacterAndParagraphProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - //XTextContentAppend - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL appendTextContent( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >& TextContent, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& CharacterAndParagraphProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - //XTextConvert - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > SAL_CALL convertToTextFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& Start, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& End, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& FrameProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextTable > SAL_CALL convertToTable( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > > > >& TableRanges, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > > >& CellProperties, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& RowProperties, - const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& TableProperties - ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - - // - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor()throw(::com::sun::star::uno::RuntimeException); - INT16 ComparePositions(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange>& xPos1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange>& xPos2) throw (com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException); - BOOL CheckForOwnMember(const SwXTextRange* pRange1, const OTextCursorHelper* pCursor1)throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual bool CheckForOwnMemberMeta(const SwXTextRange* const pRange, - const SwPaM* const pPam, bool bAbsorb) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - // - void Invalidate() {bObjectValid = sal_False;} - BOOL IsValid()const {return bObjectValid;} - - CursorType GetTextType() {return eCrsrType;} -}; /*-----------------20.03.98 07:47------------------- @@ -301,147 +168,6 @@ public: --------------------------------------------------*/ -typedef cppu::WeakAggImplHelper2 -< - ::com::sun::star::container::XEnumerationAccess, - ::com::sun::star::lang::XServiceInfo -> SwXBodyTextBaseClass; -class SwXBodyText : public SwXBodyTextBaseClass, - public SwXText -{ -protected: - virtual ~SwXBodyText(); -public: - SwXBodyText(SwDoc* pDoc); - - - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) throw(){OWeakObject::acquire();} - virtual void SAL_CALL release( ) throw(){OWeakObject::release();} - - //XAggregation - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); - - //XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); - - //XText - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException ); - - //XEnumerationAccess - frueher XParagraphEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > CreateTextCursor(BOOL bIgnoreTables = sal_False); -}; - - -/*-----------------12.02.98 08:01------------------- - ---------------------------------------------------*/ -typedef -cppu::WeakImplHelper5 -< - ::com::sun::star::text::XFootnote, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::container::XEnumerationAccess, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::lang::XUnoTunnel -> -SwXFootnoteBaseClass; -class SwXFootnote : public SwXFootnoteBaseClass, - public SwXText, - public SwClient -{ - friend class SwXFootnotes; - - SwEventListenerContainer aLstnrCntnr; - const SwFmtFtn* pFmtFtn; - BOOL m_bIsDescriptor; - String m_sLabel; - BOOL m_bIsEndnote; - -protected: - virtual const SwStartNode *GetStartNode() const; - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor()throw(::com::sun::star::uno::RuntimeException); - virtual ~SwXFootnote(); -public: - SwXFootnote(BOOL bEndnote); - SwXFootnote(SwDoc* pDoc, const SwFmtFtn& rFmt); - - - TYPEINFO(); - - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - - //XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) throw(){SwXFootnoteBaseClass::acquire();} - virtual void SAL_CALL release( ) throw(){SwXFootnoteBaseClass::release();} - - //XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); - - //XFootnote - virtual rtl::OUString SAL_CALL getLabel(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setLabel(const rtl::OUString& aLabel) throw( ::com::sun::star::uno::RuntimeException ); - - //XTextContent - virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); - - //XComponent - virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); - - //XText - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException ); - - //XEnumerationAccess - frueher XParagraphEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XPropertySet - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //SwClient - virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); - - void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - - const SwFmtFtn* FindFmt() const {return GetDoc() ? pFmtFtn : 0;} - void Invalidate(); -}; - /* -----------------23.03.99 12:57------------------- * * --------------------------------------------------*/ @@ -521,58 +247,6 @@ public: void SetSortOptions(const SwSortOptions& rSortOpt); }; */ -/* -----------------25.08.98 11:02------------------- - * - * --------------------------------------------------*/ -typedef -cppu::WeakImplHelper2 -< - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::container::XEnumerationAccess -> -SwXHeadFootTextBaseClass; -class SwXHeadFootText : public SwXHeadFootTextBaseClass, - public SwXText, - public SwClient -{ - SwFrmFmt* GetFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } - BOOL bIsHeader; -protected: - virtual const SwStartNode *GetStartNode() const; - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor()throw(::com::sun::star::uno::RuntimeException); -public: - SwXHeadFootText(SwFrmFmt& rHeadFootFmt, BOOL bHeader); - ~SwXHeadFootText(); - - TYPEINFO(); - - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) throw(){SwXHeadFootTextBaseClass::acquire();} - virtual void SAL_CALL release( ) throw(){SwXHeadFootTextBaseClass::release();} - - //XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); - - //XText - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XEnumerationAccess - frueher XParagraphEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); - - //SwClient - virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); -}; #endif diff --git a/sw/inc/unoredline.hxx b/sw/inc/unoredline.hxx index 508bbb2a7a..a2449c6f0a 100644 --- a/sw/inc/unoredline.hxx +++ b/sw/inc/unoredline.hxx @@ -31,9 +31,11 @@ #define _UNOREDLINE_HXX #include -#include +#include + class SwRedline; + /* -----------------------------19.12.00 11:35-------------------------------- ---------------------------------------------------------------------------*/ diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index f1770f5341..53fa8fb8c5 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -30,8 +30,8 @@ #ifndef _UNOTBL_HXX #define _UNOTBL_HXX -#include #include +#include #include #include #include @@ -43,22 +43,27 @@ #include #include +#include #include #include #include #include +#include #include +#include +#include -class SwTableBoxFmt; +class SwUnoCrsr; +class SwTable; +class SwTableBox; class SwTableLine; class SwTableCursor; class SwTableBoxFmt; -class SwTableLine; -class SwTableCursor; class SwChartDataProvider; +class SwFrmFmt; /* -----------------------------22.09.00 11:10-------------------------------- diff --git a/sw/inc/unotext.hxx b/sw/inc/unotext.hxx new file mode 100644 index 0000000000..499e0620da --- /dev/null +++ b/sw/inc/unotext.hxx @@ -0,0 +1,375 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoobj.hxx,v $ + * + * $Revision: 1.49 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SW_UNOTEXT_HXX +#define SW_UNOTEXT_HXX + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + + +namespace com { namespace sun { namespace star { + namespace text { + class XTextContent; + } +} } } + +class SfxItemPropertySet; +class SwDoc; +class SwStartNode; +class SwPaM; +class OTextCursorHelper; +class SwXTextRange; + + +/* -----------------03.12.98 12:22------------------- + * + * --------------------------------------------------*/ + +class SwXText + : public ::com::sun::star::lang::XTypeProvider + , public ::com::sun::star::lang::XUnoTunnel + , public ::com::sun::star::beans::XPropertySet + , public ::com::sun::star::text::XTextAppendAndConvert + , public ::com::sun::star::text::XTextRangeCompare + , public ::com::sun::star::text::XRelativeTextContentInsert + , public ::com::sun::star::text::XRelativeTextContentRemove +{ + +private: + + SwDoc* pDoc; + BOOL bObjectValid; + CursorType eCrsrType; + const SfxItemPropertySet* m_pPropSet; + + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL + finishOrAppendParagraph( + bool bFinish, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& + rCharacterAndParagraphProperties) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + virtual void PrepareForAttach( + ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xRange, + SwXTextRange const * const pRange, SwPaM const * const pPam); + +protected: + + virtual ~SwXText(); + +public: /*not protected because C++ is retarded*/ + virtual const SwStartNode *GetStartNode() const; + +public: + + SwXText(SwDoc* pDc, CursorType eType); + + const SwDoc* GetDoc() const { return pDoc; } + SwDoc* GetDoc() { return pDoc; } + + // SwDoc is set when SwXText is attached + void SetDoc(SwDoc* pDc) { + DBG_ASSERT(!pDoc || !pDc, "Doc schon gesetzt?"); + pDoc = pDc; + bObjectValid = 0 != pDc; + } + + void Invalidate() { bObjectValid = sal_False; } + BOOL IsValid() const { return bObjectValid; } + + CursorType GetTextType() { return eCrsrType; } + + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextCursor > createCursor() + throw (::com::sun::star::uno::RuntimeException); + INT16 ComparePositions( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange>& xPos1, + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange>& xPos2) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + BOOL CheckForOwnMember(const SwXTextRange* pRange1, + const OTextCursorHelper* pCursor1) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual bool CheckForOwnMemberMeta( + const SwXTextRange* const pRange, + const SwPaM* const pPam, bool bAbsorb) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( + const ::com::sun::star::uno::Type& rType) + throw (::com::sun::star::uno::RuntimeException); + + // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > + SAL_CALL getTypes() + throw (::com::sun::star::uno::RuntimeException); + + static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); + + // XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( + const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier) + throw (::com::sun::star::uno::RuntimeException); + + // XPropertySet + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Any& rValue) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > + SAL_CALL getText() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL getStart() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL getEnd() + throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getString() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setString(const ::rtl::OUString& rString) + throw (::com::sun::star::uno::RuntimeException); + + // XSimpleText + virtual void SAL_CALL insertString( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xRange, + const ::rtl::OUString& aString, sal_Bool bAbsorb) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL insertControlCharacter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xRange, + sal_Int16 nControlCharacter, sal_Bool bAbsorb) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + // XText + virtual void SAL_CALL insertTextContent( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xRange, + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextContent > & xContent, + sal_Bool bAbsorb) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeTextContent( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextContent > & xContent) + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::uno::RuntimeException); + + // XParagraphAppend + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL + appendParagraph( + const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& + rCharacterAndParagraphProperties) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL + finishParagraph( + const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& + rCharacterAndParagraphProperties) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + // XTextPortionAppend + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL + appendTextPortion( + const ::rtl::OUString& rText, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& + rCharacterAndParagraphProperties) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + // XTextContentAppend + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL + appendTextContent( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextContent >& xTextContent, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& + rCharacterAndParagraphProperties) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + // XTextConvert + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextContent > SAL_CALL + convertToTextFrame( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange >& xStart, + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange >& xEnd, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& xFrameProperties) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextTable > SAL_CALL + convertToTable( + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > > > > const& + rTableRanges, + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue > > > const& + rCellProperties, + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue > > const& + rRowProperties, + ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue > const& + rTableProperties) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + // XTextRangeCompare + sal_Int16 SAL_CALL compareRegionStarts( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange >& xR1, + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange >& xR2) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + sal_Int16 SAL_CALL compareRegionEnds( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange >& xR1, + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange >& xR2) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + // XRelativeTextContentInsert + virtual void SAL_CALL insertTextContentBefore( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextContent>& xNewContent, + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextContent>& xSuccessor) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL insertTextContentAfter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextContent>& xNewContent, + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextContent>& xPredecessor) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + // XRelativeTextContentRemove + virtual void SAL_CALL removeTextContentBefore( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextContent>& xSuccessor) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeTextContentAfter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextContent>& xPredecessor) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + +}; + +#endif // SW_UNOTEXT_HXX + diff --git a/sw/inc/unotextbodyhf.hxx b/sw/inc/unotextbodyhf.hxx new file mode 100644 index 0000000000..8e7a64c186 --- /dev/null +++ b/sw/inc/unotextbodyhf.hxx @@ -0,0 +1,218 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoobj.hxx,v $ + * + * $Revision: 1.49 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SW_UNOTEXTBODYHF_HXX +#define SW_UNOTEXTBODYHF_HXX + +#include +#include +#include + +#include + +#include +#include +#include + + +class SwDoc; +class SwFrmFmt; + + +typedef ::cppu::WeakAggImplHelper2 +< ::com::sun::star::lang::XServiceInfo +, ::com::sun::star::container::XEnumerationAccess +> SwXBodyText_Base; + +class SwXBodyText + : public SwXBodyText_Base + , public SwXText +{ + +protected: + + virtual ~SwXBodyText(); + +public: + + SwXBodyText(SwDoc* pDoc); + + ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > + CreateTextCursor(sal_Bool bIgnoreTables = sal_False); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( + const ::com::sun::star::uno::Type& rType) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); } + virtual void SAL_CALL release() throw() { OWeakObject::release(); } + + // XAggregation + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( + const ::com::sun::star::uno::Type& rType) + throw (::com::sun::star::uno::RuntimeException); + + // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > + SAL_CALL getTypes() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL + getImplementationId() + throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( + const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() + throw (::com::sun::star::uno::RuntimeException); + + // XEnumerationAccess + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::container::XEnumeration > SAL_CALL + createEnumeration() + throw (::com::sun::star::uno::RuntimeException); + + // XSimpleText + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextCursor > SAL_CALL + createTextCursor() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextCursor > SAL_CALL + createTextCursorByRange( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextPosition) + throw (::com::sun::star::uno::RuntimeException); + +}; + + +/* -----------------25.08.98 11:02------------------- + * + * --------------------------------------------------*/ +typedef ::cppu::WeakImplHelper2 +< ::com::sun::star::lang::XServiceInfo +, ::com::sun::star::container::XEnumerationAccess +> SwXHeadFootText_Base; + +class SwXHeadFootText + : public SwXHeadFootText_Base + , public SwXText + , public SwClient +{ + +private: + + SwFrmFmt* GetFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } + BOOL bIsHeader; + +protected: + + virtual const SwStartNode *GetStartNode() const; + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextCursor > + createCursor() + throw (::com::sun::star::uno::RuntimeException); + + virtual ~SwXHeadFootText(); + +public: + + SwXHeadFootText(SwFrmFmt& rHeadFootFmt, BOOL bHeader); + + TYPEINFO(); + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( + const ::com::sun::star::uno::Type& rType) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); } + virtual void SAL_CALL release() throw() { OWeakObject::release(); } + + // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > + SAL_CALL getTypes() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL + getImplementationId() + throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( + const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() + throw (::com::sun::star::uno::RuntimeException); + + // XEnumerationAccess + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::container::XEnumeration > SAL_CALL + createEnumeration() + throw (::com::sun::star::uno::RuntimeException); + + // XSimpleText + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextCursor > SAL_CALL + createTextCursor() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextCursor > SAL_CALL + createTextCursorByRange( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextPosition) + throw (::com::sun::star::uno::RuntimeException); + +}; + +#endif // SW_UNOTEXTBODYHF_HXX + diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index a77487654b..7f52ac0115 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -1880,7 +1880,8 @@ IMPL_LINK( SwDoc, DoIdleJobs, Timer *, pTimer ) BOOL bIsOnlineSpell = pSh->GetViewOptions()->IsOnlineSpell(); sal_Bool bIsAutoGrammar = sal_False; - SvtLinguConfig().GetProperty( C2U( UPN_IS_GRAMMAR_AUTO ) ) >>= bIsAutoGrammar; + SvtLinguConfig().GetProperty( ::rtl::OUString::createFromAscii( + UPN_IS_GRAMMAR_AUTO ) ) >>= bIsAutoGrammar; if (bIsOnlineSpell && bIsAutoGrammar) StartGrammarChecking( *this ); diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 011e62014e..37c75c2f71 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -99,6 +99,7 @@ #include #include #include +#include #include /// OD 22.08.2002 #99657# /// include definition of class SvxBrushItem and GraphicObject diff --git a/sw/source/core/unocore/unoclbck.cxx b/sw/source/core/unocore/unoclbck.cxx index 66c0a9a2ed..27510e63b3 100644 --- a/sw/source/core/unocore/unoclbck.cxx +++ b/sw/source/core/unocore/unoclbck.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 840e66810e..cc9b47bbb7 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -66,7 +66,9 @@ #include #include #include +#include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index f83d0590da..b55017b76e 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 608e175722..d7163f7f00 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -44,6 +45,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index 689a73bafd..f6fc715203 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -147,7 +148,7 @@ SwXFootnote::~SwXFootnote() ---------------------------------------------------------------------------*/ uno::Sequence< uno::Type > SAL_CALL SwXFootnote::getTypes( ) throw(uno::RuntimeException) { - uno::Sequence< uno::Type > aFtnTypes = SwXFootnoteBaseClass::getTypes(); + uno::Sequence< uno::Type > aFtnTypes = SwXFootnote_Base::getTypes(); uno::Sequence< uno::Type > aTextTypes = SwXText::getTypes(); long nIndex = aFtnTypes.getLength(); @@ -179,12 +180,13 @@ uno::Sequence< sal_Int8 > SAL_CALL SwXFootnote::getImplementationId( ) throw(un /* -----------------------------21.03.00 15:46-------------------------------- ---------------------------------------------------------------------------*/ -uno::Any SAL_CALL SwXFootnote::queryInterface( const uno::Type& aType ) throw(uno::RuntimeException) +uno::Any SAL_CALL SwXFootnote::queryInterface(const uno::Type& rType) +throw (uno::RuntimeException) { - uno::Any aRet = SwXFootnoteBaseClass::queryInterface(aType); - if(aRet.getValueType() == ::getCppuVoidType() ) - aRet = SwXText::queryInterface(aType); - return aRet; + const uno::Any ret = SwXFootnote_Base::queryInterface(rType); + return (ret.getValueType() == ::getCppuVoidType()) + ? SwXText::queryInterface(rType) + : ret; } /*-- 10.12.98 15:31:47--------------------------------------------------- diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 26898f6c50..44e2f82b44 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -78,6 +78,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index bf1c52eb09..b85c457cd3 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoredlines.cxx b/sw/source/core/unocore/unoredlines.cxx index e70935b55b..44f554d581 100644 --- a/sw/source/core/unocore/unoredlines.cxx +++ b/sw/source/core/unocore/unoredlines.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include "poolfmt.hxx" diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 48e6159d19..2c2b076d03 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -440,6 +440,7 @@ void SwXReferenceMark::removeVetoableChangeListener( #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 6033541f9d..24251fe230 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -31,7 +31,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include #include @@ -62,6 +61,7 @@ #include #include #include +#include #include #include #include @@ -74,16 +74,9 @@ #include #include #include -/* -#include -*/ #include -#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPPP_ #include -#endif -#ifndef _COM_SUN_STAR_BEANS_NAMEDVALUE_HPPP_ #include -#endif #include #include #include diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index fe0ff7b42b..8407089198 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -40,6 +40,8 @@ #include #include #include +#include +#include #include #include #include @@ -2272,7 +2274,7 @@ uno::Any SwXBodyText::queryAggregation( -----------------------------------------------------------------------*/ uno::Sequence< uno::Type > SwXBodyText::getTypes( ) throw(uno::RuntimeException) { - uno::Sequence< uno::Type > aTypes = SwXBodyTextBaseClass::getTypes(); + uno::Sequence< uno::Type > aTypes = SwXBodyText_Base::getTypes(); uno::Sequence< uno::Type > aTextTypes = SwXText::getTypes(); long nIndex = aTypes.getLength(); aTypes.realloc(aTypes.getLength() + aTextTypes.getLength()); @@ -2301,13 +2303,13 @@ uno::Sequence< sal_Int8 > SwXBodyText::getImplementationId( ) throw(uno::Runtim -----------------------------------------------------------------------*/ uno::Any SAL_CALL - SwXBodyText::queryInterface( const uno::Type& rType ) - throw(uno::RuntimeException) +SwXBodyText::queryInterface(const uno::Type& rType) +throw (uno::RuntimeException) { - uno::Any aRet = SwXText::queryInterface( rType ); - if(aRet.getValueType() == ::getCppuVoidType()) - aRet = SwXBodyTextBaseClass::queryInterface( rType ); - return aRet; + const uno::Any ret = SwXText::queryInterface(rType); + return (ret.getValueType() == ::getCppuVoidType()) + ? SwXBodyText_Base::queryInterface(rType) + : ret; } /* -----------------------------05.01.00 11:07-------------------------------- @@ -2504,7 +2506,7 @@ uno::Reference< text::XTextCursor > SwXHeadFootText::createCursor() throw(uno: ---------------------------------------------------------------------------*/ uno::Sequence< uno::Type > SwXHeadFootText::getTypes( ) throw(uno::RuntimeException) { - uno::Sequence< uno::Type > aHFTypes = SwXHeadFootTextBaseClass::getTypes(); + uno::Sequence< uno::Type > aHFTypes = SwXHeadFootText_Base::getTypes(); uno::Sequence< uno::Type > aTextTypes = SwXText::getTypes(); long nIndex = aHFTypes.getLength(); @@ -2538,12 +2540,13 @@ uno::Sequence< sal_Int8 > SwXHeadFootText::getImplementationId( ) throw(uno::Ru /* -----------------------------21.03.00 15:46-------------------------------- ---------------------------------------------------------------------------*/ -uno::Any SwXHeadFootText::queryInterface( const uno::Type& aType ) throw(uno::RuntimeException) +uno::Any SwXHeadFootText::queryInterface(const uno::Type& rType) +throw (uno::RuntimeException) { - uno::Any aRet = SwXHeadFootTextBaseClass::queryInterface(aType); - if(aRet.getValueType() == ::getCppuVoidType() ) - aRet = SwXText::queryInterface(aType); - return aRet; + const uno::Any ret = SwXHeadFootText_Base::queryInterface(rType); + return (ret.getValueType() == ::getCppuVoidType()) + ? SwXText::queryInterface(rType) + : ret; } /*-- 11.12.98 10:14:50--------------------------------------------------- diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 25544a79c5..577d36e480 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -31,7 +31,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include #include @@ -41,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -59,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -76,6 +75,7 @@ #include // <-- + using ::rtl::OUString; using namespace ::com::sun::star; using namespace ::com::sun::star::frame; diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx index 8ee621903f..b43419a399 100644 --- a/sw/source/filter/xml/xmlfonte.cxx +++ b/sw/source/filter/xml/xmlfonte.cxx @@ -31,15 +31,16 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include "hintids.hxx" #include #include #include -#include +//#include +#include #include #include + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::text; diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 39f1c022e7..49db3512b6 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -48,6 +48,7 @@ #include #include #include +#include #include #include "unocrsr.hxx" #include diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 254cae1f7f..40775b9f70 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -31,7 +31,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include #include @@ -44,13 +43,12 @@ #include #include #include -#ifndef _XMLOFF_TXTPRMAP_HXX #include -#endif #include #include #include +#include #include #include #include @@ -65,6 +63,7 @@ #include #include + using ::rtl::OUString; using ::rtl::OUStringBuffer; using namespace ::com::sun::star; diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx index d9e3a2fd3a..062246c88f 100644 --- a/sw/source/ui/uno/unoatxt.cxx +++ b/sw/source/ui/uno/unoatxt.cxx @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 8b04ca4038..cc994acb9c 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 19f1aa0dea..be1b453633 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3 From 36ce25102e46e594a928e106b6fa187a6108d0c9 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 5 Jan 2010 16:37:47 +0100 Subject: swunolocking1: #i105557#: unoobj.hxx: split out unoparaframeenum.hxx: move SwXParaFrameEnumeration from unoobj.hxx to new unoparaframeenum.hxx. move FrameDependSortList_t, CollectFrameAtNode to unoparaframeenum.hxx. --- sw/inc/unoobj.hxx | 68 ---------------- sw/inc/unoparaframeenum.hxx | 138 ++++++++++++++++++++++++++++++++ sw/source/core/unocore/unoobj2.cxx | 2 +- sw/source/core/unocore/unoparagraph.cxx | 2 +- sw/source/core/unocore/unoport.cxx | 1 + sw/source/core/unocore/unoportenum.cxx | 1 + 6 files changed, 142 insertions(+), 70 deletions(-) create mode 100644 sw/inc/unoparaframeenum.hxx (limited to 'sw/source') diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx index 227a7c9859..8806bf13eb 100644 --- a/sw/inc/unoobj.hxx +++ b/sw/inc/unoobj.hxx @@ -50,27 +50,10 @@ #include -#include -#include - class GetCurTxtFmtColl; -struct FrameDependSortListEntry { - xub_StrLen nIndex; - sal_uInt32 nOrder; - ::boost::shared_ptr pFrameDepend; - FrameDependSortListEntry (xub_StrLen const i_nIndex, - sal_uInt32 const i_nOrder, SwDepend * const i_pDepend) - : nIndex(i_nIndex), nOrder(i_nOrder), pFrameDepend(i_pDepend) { } -}; -typedef ::std::deque< FrameDependSortListEntry > - FrameDependSortList_t; - -typedef ::std::deque< ::boost::shared_ptr > - FrameDependList_t; - /* -----------------26.06.98 16:18------------------- * @@ -79,10 +62,6 @@ typedef ::std::deque< ::boost::shared_ptr > SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName); ::com::sun::star::uno::Sequence< sal_Int8 > CreateUnoTunnelId(); -// OD 2004-05-07 #i28701# - adjust 4th parameter -void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx, - FrameDependSortList_t & rFrames, - const bool _bAtCharAnchoredObjs ); /*-----------------04.03.98 11:54------------------- Start/EndAction oder Start/EndAllAction @@ -168,53 +147,6 @@ public: --------------------------------------------------*/ -/* -----------------23.03.99 12:57------------------- - * - * --------------------------------------------------*/ -#define PARAFRAME_PORTION_PARAGRAPH 0 -#define PARAFRAME_PORTION_CHAR 1 -#define PARAFRAME_PORTION_TEXTRANGE 2 - -class SwXParaFrameEnumeration : public cppu::WeakImplHelper2 -< - ::com::sun::star::container::XEnumeration, - ::com::sun::star::lang::XServiceInfo ->, - public SwClient -{ - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > - m_xNextObject; // created by hasMoreElements - FrameDependList_t m_Frames; - - SwUnoCrsr* GetCursor() const - {return static_cast(const_cast(GetRegisteredIn()));} - -public: - SwXParaFrameEnumeration(const SwPaM& rPaM, - sal_uInt8 nParaFrameMode, SwFrmFmt* pFmt = 0); - ~SwXParaFrameEnumeration(); - - // XEnumeration - virtual sal_Bool SAL_CALL hasMoreElements() - throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Any SAL_CALL nextElement() - throw( ::com::sun::star::container::NoSuchElementException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException ); - - // XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName() - throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) - throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL - getSupportedServiceNames() - throw( ::com::sun::star::uno::RuntimeException ); - - //SwClient - virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); -}; - /* -----------------29.09.98 09:01------------------- * diff --git a/sw/inc/unoparaframeenum.hxx b/sw/inc/unoparaframeenum.hxx new file mode 100644 index 0000000000..d05fccfed4 --- /dev/null +++ b/sw/inc/unoparaframeenum.hxx @@ -0,0 +1,138 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoobj.hxx,v $ + * + * $Revision: 1.49 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SW_UNOPARAFRAMEENUM_HXX +#define SW_UNOPARAFRAMEENUM_HXX + +#include + +#include + +#include +#include +#include + +#include + +#include +#include + + +class SwNodeIndex; +class SwPaM; +class SwUnoCrsr; +class SwFrmFmt; + + +struct FrameDependSortListEntry +{ + xub_StrLen nIndex; + sal_uInt32 nOrder; + ::boost::shared_ptr pFrameDepend; + + FrameDependSortListEntry (xub_StrLen const i_nIndex, + sal_uInt32 const i_nOrder, SwDepend * const i_pDepend) + : nIndex(i_nIndex), nOrder(i_nOrder), pFrameDepend(i_pDepend) { } +}; + +typedef ::std::deque< FrameDependSortListEntry > + FrameDependSortList_t; + +typedef ::std::deque< ::boost::shared_ptr > + FrameDependList_t; + + +// OD 2004-05-07 #i28701# - adjust 4th parameter +void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx, + FrameDependSortList_t & rFrames, + const bool _bAtCharAnchoredObjs ); + + +/* -----------------23.03.99 12:57------------------- + * + * --------------------------------------------------*/ + +#define PARAFRAME_PORTION_PARAGRAPH 0 +#define PARAFRAME_PORTION_CHAR 1 +#define PARAFRAME_PORTION_TEXTRANGE 2 + + +typedef ::cppu::WeakImplHelper2 +< ::com::sun::star::lang::XServiceInfo +, ::com::sun::star::container::XEnumeration +> SwXParaFrameEnumeration_Base; + +class SwXParaFrameEnumeration + : public SwXParaFrameEnumeration_Base + , public SwClient +{ + +private: + + ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > + m_xNextObject; // created by hasMoreElements + FrameDependList_t m_Frames; + + SwUnoCrsr* GetCursor() const + {return static_cast(const_cast(GetRegisteredIn()));} + + virtual ~SwXParaFrameEnumeration(); + +public: + + SwXParaFrameEnumeration(const SwPaM& rPaM, + sal_uInt8 nParaFrameMode, SwFrmFmt* pFmt = 0); + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( + const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // XEnumeration + virtual sal_Bool SAL_CALL hasMoreElements() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL nextElement() + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + +}; + +#endif // SW_UNOPARAFRAMEENUM_HXX + diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 44e2f82b44..92a9fff1f0 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -31,7 +31,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include #include @@ -78,6 +77,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index b85c457cd3..57f9679a24 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -31,10 +31,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index b34a4579f0..54db4b2e7b 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 0922289eee..094671f97b 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3 From 2b73f51b16209ab7b2bcc550c424fe89a4027b45 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 5 Jan 2010 16:37:49 +0100 Subject: swunolocking1: #i105557#: unoobj.hxx: move misc stuff: move GetPageDescByName_Impl from unoobj.hxx to pagedesc.hxx. move UnoActionContext, UnoActionRemoveContext, ClientModify, CreateUnoTunnelId from unoobj.hxx to unobaseclass.hxx. move UnoActionContext, UnoActionRemoveContext from unoobj.cxx to unoobj2.cxx. --- sw/inc/pagedesc.hxx | 3 ++ sw/inc/unobaseclass.hxx | 52 +++++++++++++++++++--- sw/inc/unoobj.hxx | 26 ----------- sw/inc/unoparagraph.hxx | 2 +- sw/inc/unoredlines.hxx | 5 ++- sw/inc/unotbl.hxx | 1 + sw/source/core/unocore/TextCursorHelper.cxx | 4 +- sw/source/core/unocore/unobkm.cxx | 1 - sw/source/core/unocore/unochart.cxx | 3 +- sw/source/core/unocore/unocoll.cxx | 3 +- sw/source/core/unocore/unocrsrhelper.cxx | 1 - sw/source/core/unocore/unodraw.cxx | 4 +- sw/source/core/unocore/unofield.cxx | 1 - sw/source/core/unocore/unoflatpara.cxx | 2 +- sw/source/core/unocore/unoframe.cxx | 3 +- sw/source/core/unocore/unoftn.cxx | 3 +- sw/source/core/unocore/unoidx.cxx | 2 +- sw/source/core/unocore/unoobj.cxx | 45 ------------------- sw/source/core/unocore/unoobj2.cxx | 57 ++++++++++++++++++++++++- sw/source/core/unocore/unoparagraph.cxx | 1 - sw/source/core/unocore/unoport.cxx | 3 +- sw/source/core/unocore/unoportenum.cxx | 3 +- sw/source/core/unocore/unoredline.cxx | 9 ++-- sw/source/core/unocore/unoredlines.cxx | 8 ++-- sw/source/core/unocore/unorefmk.cxx | 3 +- sw/source/core/unocore/unosect.cxx | 4 +- sw/source/core/unocore/unosett.cxx | 5 --- sw/source/core/unocore/unosrch.cxx | 7 +-- sw/source/core/unocore/unostyle.cxx | 1 - sw/source/core/unocore/unotbl.cxx | 1 - sw/source/core/unocore/unotext.cxx | 8 ++-- sw/source/filter/html/htmlforw.cxx | 2 +- sw/source/filter/ww8/ww8atr.cxx | 4 +- sw/source/filter/xml/XMLRedlineImportHelper.cxx | 1 - sw/source/filter/xml/xmlexp.cxx | 1 - sw/source/filter/xml/xmlfmt.cxx | 10 +---- sw/source/filter/xml/xmlfonte.cxx | 1 - sw/source/filter/xml/xmlimp.cxx | 2 +- sw/source/filter/xml/xmlmeta.cxx | 1 - sw/source/filter/xml/xmltble.cxx | 1 - sw/source/filter/xml/xmltexti.cxx | 2 +- sw/source/ui/app/docsh2.cxx | 35 ++------------- sw/source/ui/envelp/labelexp.cxx | 2 +- sw/source/ui/misc/glossary.cxx | 22 +--------- sw/source/ui/shells/drwtxtsh.cxx | 6 +-- sw/source/ui/shells/tabsh.cxx | 6 +-- sw/source/ui/table/chartins.cxx | 7 --- sw/source/ui/uno/SwXDocumentSettings.cxx | 6 +-- sw/source/ui/uno/unoatxt.cxx | 2 +- sw/source/ui/uno/unodispatch.cxx | 7 +-- sw/source/ui/uno/unomod.cxx | 2 +- sw/source/ui/uno/unotxdoc.cxx | 2 +- sw/source/ui/uno/unotxvw.cxx | 1 - sw/source/ui/utlui/swrenamexnameddlg.cxx | 1 - 54 files changed, 170 insertions(+), 225 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index dd80b7f94f..3c734f4d5a 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -344,4 +344,7 @@ public: operator SwPageDesc() const; // #i7983# }; + +SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName); + #endif //_PAGEDESC_HXX diff --git a/sw/inc/unobaseclass.hxx b/sw/inc/unobaseclass.hxx index 48c00de279..43418f9585 100644 --- a/sw/inc/unobaseclass.hxx +++ b/sw/inc/unobaseclass.hxx @@ -30,18 +30,22 @@ #ifndef _UNOBASECLASS_HXX #define _UNOBASECLASS_HXX -#include #include #include + #include -typedef -cppu::WeakImplHelper2 -< - ::com::sun::star::container::XEnumeration, - ::com::sun::star::lang::XServiceInfo + +class SfxPoolItem; +class SwClient; +class SwDoc; + + +typedef ::cppu::WeakImplHelper2 +< ::com::sun::star::lang::XServiceInfo +, ::com::sun::star::container::XEnumeration > -SwSimpleEnumerationBaseClass; +SwSimpleEnumeration_Base; /* -----------------29.04.98 07:35------------------- @@ -64,5 +68,39 @@ enum CursorType CURSOR_META, // meta/meta-field }; +/*-----------------04.03.98 11:54------------------- + Start/EndAction or Start/EndAllAction + -------------------------------------------------- */ +class UnoActionContext +{ + private: + SwDoc * m_pDoc; + + public: + UnoActionContext(SwDoc *const pDoc); + ~UnoActionContext(); + + void InvalidateDocument() { m_pDoc = 0; } +}; + +/* -----------------07.07.98 12:03------------------- + interrupt Actions for a little while + -------------------------------------------------- */ +class UnoActionRemoveContext +{ + private: + SwDoc *const m_pDoc; + + public: + UnoActionRemoveContext(SwDoc *const pDoc); + ~UnoActionRemoveContext(); +}; + + +::com::sun::star::uno::Sequence< sal_Int8 > CreateUnoTunnelId(); + +/// helper function for implementing SwClient::Modify +void ClientModify(SwClient* pClient, SfxPoolItem *pOld, SfxPoolItem *pNew); + #endif diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx index 8806bf13eb..98cf280617 100644 --- a/sw/inc/unoobj.hxx +++ b/sw/inc/unoobj.hxx @@ -59,38 +59,12 @@ class GetCurTxtFmtColl; * * --------------------------------------------------*/ -SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName); -::com::sun::star::uno::Sequence< sal_Int8 > CreateUnoTunnelId(); -/*-----------------04.03.98 11:54------------------- - Start/EndAction oder Start/EndAllAction ---------------------------------------------------*/ -class UnoActionContext -{ - SwDoc* pDoc; - public: - UnoActionContext(SwDoc* pDoc); - ~UnoActionContext(); - - void InvalidateDocument() {pDoc = 0;} -}; -/* -----------------07.07.98 12:03------------------- - * Actions kurzfristig unterbrechen - * --------------------------------------------------*/ -class UnoActionRemoveContext -{ - SwDoc* pDoc; - public: - UnoActionRemoveContext(SwDoc* pDoc); - ~UnoActionRemoveContext(); -}; - /****************************************************************************** * ******************************************************************************/ -void ClientModify(SwClient* pClient, SfxPoolItem *pOld, SfxPoolItem *pNew); /*-----------------20.03.98 07:47------------------- diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx index 6ef62e00c1..984786b0d1 100644 --- a/sw/inc/unoparagraph.hxx +++ b/sw/inc/unoparagraph.hxx @@ -359,7 +359,7 @@ public: --------------------------------------------------*/ class SwXParagraphEnumeration - : public SwSimpleEnumerationBaseClass + : public SwSimpleEnumeration_Base , public SwClient { diff --git a/sw/inc/unoredlines.hxx b/sw/inc/unoredlines.hxx index 8f932617f4..f87ac44188 100644 --- a/sw/inc/unoredlines.hxx +++ b/sw/inc/unoredlines.hxx @@ -78,8 +78,9 @@ public: /* -----------------------------12.01.01 14:58-------------------------------- ---------------------------------------------------------------------------*/ -class SwXRedlineEnumeration : public SwSimpleEnumerationBaseClass, - public SwClient +class SwXRedlineEnumeration + : public SwSimpleEnumeration_Base + , public SwClient { SwDoc* pDoc; USHORT nCurrentIndex; diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index 53fa8fb8c5..bc66e61c26 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -51,6 +51,7 @@ #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/TextCursorHelper.cxx b/sw/source/core/unocore/TextCursorHelper.cxx index b21587a155..6e8fb9efe4 100644 --- a/sw/source/core/unocore/TextCursorHelper.cxx +++ b/sw/source/core/unocore/TextCursorHelper.cxx @@ -30,8 +30,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include "TextCursorHelper.hxx" -#include "unoobj.hxx" +#include "unobaseclass.hxx" + using namespace ::com::sun::star; /* -----------------------------03.03.03 11:07-------------------------------- diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index bf52d0c0db..a22eb8a2b1 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 2c1cb1ceb5..ef7817ebb5 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -34,7 +34,6 @@ #include #include - #include #include #include @@ -51,7 +50,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index cc9b47bbb7..60b6897e88 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -874,7 +874,8 @@ namespace } template - class SwXFrameEnumeration : public SwSimpleEnumerationBaseClass + class SwXFrameEnumeration + : public SwSimpleEnumeration_Base { private: typedef ::std::slist< Any > frmcontainer_t; diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index b55017b76e..676c1839ad 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -36,7 +36,6 @@ #include #include -#include #include #include #include diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index d7163f7f00..67c7249571 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -443,7 +442,8 @@ uno::Reference< drawing::XShape > SwFmDrawPage::_CreateShape( SdrObject *pObj ) ****************************************************************************/ namespace { - class SwXShapesEnumeration : public SwSimpleEnumerationBaseClass + class SwXShapesEnumeration + : public SwSimpleEnumeration_Base { private: typedef ::std::slist< ::com::sun::star::uno::Any > shapescontainer_t; diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index cde0e276dd..31f4659c22 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index de481a867a..c5055394cd 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index da2fe60bdb..f4d7ea34be 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -30,6 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include #include #include @@ -60,7 +61,6 @@ #include #include #include -#include #include #include #include @@ -100,6 +100,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index f6fc715203..7c0f8adbe3 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -34,7 +34,8 @@ #include #include #include -#include + +#include #include #include #include diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 085848fcfb..904e7dfcdb 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -55,8 +55,8 @@ #include #endif #include +#include #include -#include #include #include #include diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 55586df381..8b0f76bfbe 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -82,7 +82,6 @@ #include #include #include -#include #include #include #include @@ -187,50 +186,6 @@ SwUnoInternalPaM& SwUnoInternalPaM::operator=(const SwPaM& rPaM) } return *this; } -/**************************************************************************** - ActionContext -****************************************************************************/ -UnoActionContext::UnoActionContext(SwDoc* pDc) : - pDoc(pDc) -{ - SwRootFrm* pRootFrm = pDoc->GetRootFrm(); - if(pRootFrm) - pRootFrm->StartAllAction(); -} -/*-----------------04.03.98 11:56------------------- - ---------------------------------------------------*/ -UnoActionContext::~UnoActionContext() -{ - //das Doc kann hier schon entfernt worden sein - if(pDoc) - { - SwRootFrm* pRootFrm = pDoc->GetRootFrm(); - if(pRootFrm) - pRootFrm->EndAllAction(); - } -} - -/**************************************************************************** - ActionRemoveContext -****************************************************************************/ -UnoActionRemoveContext::UnoActionRemoveContext(SwDoc* pDc) : - pDoc(pDc) -{ - SwRootFrm* pRootFrm = pDoc->GetRootFrm(); - if(pRootFrm) - pRootFrm->UnoRemoveAllActions(); -} -/* -----------------07.07.98 12:05------------------- - * - * --------------------------------------------------*/ -UnoActionRemoveContext::~UnoActionRemoveContext() -{ - SwRootFrm* pRootFrm = pDoc->GetRootFrm(); - if(pRootFrm) - pRootFrm->UnoRestoreAllActions(); - -} /*-----------------09.03.98 08:29------------------- diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 92a9fff1f0..903e97f9bc 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -76,7 +76,6 @@ #include #include #include -#include #include #include #include @@ -100,6 +99,7 @@ #include #include #include +#include #include #include #include @@ -227,6 +227,60 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx, } } +/**************************************************************************** + ActionContext +****************************************************************************/ +UnoActionContext::UnoActionContext(SwDoc *const pDoc) + : m_pDoc(pDoc) +{ + SwRootFrm *const pRootFrm = m_pDoc->GetRootFrm(); + if (pRootFrm) + { + pRootFrm->StartAllAction(); + } +} + +/*-----------------04.03.98 11:56------------------- + +--------------------------------------------------*/ +UnoActionContext::~UnoActionContext() +{ + // Doc may already have been removed here + if (m_pDoc) + { + SwRootFrm *const pRootFrm = m_pDoc->GetRootFrm(); + if (pRootFrm) + { + pRootFrm->EndAllAction(); + } + } +} + +/**************************************************************************** + ActionRemoveContext +****************************************************************************/ +UnoActionRemoveContext::UnoActionRemoveContext(SwDoc *const pDoc) + : m_pDoc(pDoc) +{ + SwRootFrm *const pRootFrm = m_pDoc->GetRootFrm(); + if (pRootFrm) + { + pRootFrm->UnoRemoveAllActions(); + } +} + +/* -----------------07.07.98 12:05------------------- + * + * --------------------------------------------------*/ +UnoActionRemoveContext::~UnoActionRemoveContext() +{ + SwRootFrm *const pRootFrm = m_pDoc->GetRootFrm(); + if (pRootFrm) + { + pRootFrm->UnoRestoreAllActions(); + } +} + /*-- 09.12.98 14:18:58--------------------------------------------------- @@ -752,6 +806,7 @@ SwDoc* SwXTextCursor::GetDoc() return GetCrsr() ? GetCrsr()->GetDoc() : 0; } + /*-- 09.12.98 14:19:03--------------------------------------------------- -----------------------------------------------------------------------*/ diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 57f9679a24..c83920d101 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -33,7 +33,6 @@ #include #include -#include #include #include #include diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index 54db4b2e7b..8ddb5a7f20 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -36,9 +36,9 @@ #include #include #include + #include #include -#include #include #include #include @@ -51,6 +51,7 @@ #include #include #include +#include #include #include diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 094671f97b..07f27201f6 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include #include @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index ceeb6ac051..bbd81aa140 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -31,15 +31,19 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include +#include +#include #include #include + #include #include "poolfmt.hxx" #include #include #include -#include +#include #include #include #include @@ -49,9 +53,6 @@ #include #include #include -#include -#include -#include using namespace ::com::sun::star; diff --git a/sw/source/core/unocore/unoredlines.cxx b/sw/source/core/unocore/unoredlines.cxx index 44f554d581..05c70eb723 100644 --- a/sw/source/core/unocore/unoredlines.cxx +++ b/sw/source/core/unocore/unoredlines.cxx @@ -31,19 +31,21 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include +#include #include #include + #include #include -#include -#include +#include #include #include "poolfmt.hxx" #include #include #include -#include + using namespace ::com::sun::star; using ::rtl::OUString; diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 2c2b076d03..42ef834cbf 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -33,7 +33,8 @@ #include #include -#include + +#include #include #include #include diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index ce78e9f4f8..c2b706250c 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -31,6 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include #include #include @@ -43,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -64,7 +64,7 @@ #include #include #include -#include +#include #include /* #109700# */ #include diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 4caa5a735e..4f20d516fe 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -61,20 +61,15 @@ #include #include #include -#ifndef _COM_SUN_STAR_BEANS_PropertyAttribute_HPP_ #include -#endif #include -#include #include #include #include #include #include #include -#ifndef _TOOLKIT_UNOHLP_HXX #include -#endif #include #include #include diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx index 8ee8e3e141..dfb21c071c 100644 --- a/sw/source/core/unocore/unosrch.cxx +++ b/sw/source/core/unocore/unosrch.cxx @@ -30,13 +30,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include "unosrch.hxx" - +#include "unosrch.hxx" #include #include #include -#include +#include +#include + #include #include #include "svx/unolingu.hxx" diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 24251fe230..1108dcf71f 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -60,7 +60,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 2e119b7339..e594ba50d6 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -83,7 +83,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 8407089198..b758f9104b 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -34,12 +34,13 @@ #include #include +#include -#include #include #include #include -#include + +#include #include #include #include @@ -68,9 +69,10 @@ #include #include #include +#include #include #include -#include + #include #include diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 8d2d305c23..a0a2b7a862 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -63,7 +63,7 @@ #include #include #include -#include + #include #include #include diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 288a415223..d03bfa5eb7 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -128,9 +128,7 @@ #include -#if OSL_DEBUG_LEVEL > 1 -# include -#endif +#include #include "writerhelper.hxx" #include "writerwordglue.hxx" #include "wrtww8.hxx" diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index bd535912f6..3cabf2e49b 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -34,7 +34,6 @@ #include "XMLRedlineImportHelper.hxx" #include -#include "unoobj.hxx" #include #include #include "doc.hxx" diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 577d36e480..e4149fa60f 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -56,7 +56,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx index ec50718350..92fa625296 100644 --- a/sw/source/filter/xml/xmlfmt.cxx +++ b/sw/source/filter/xml/xmlfmt.cxx @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -57,19 +56,11 @@ #include #include "xmlitem.hxx" #include -#ifndef _XMLOFF_TXTSTYLI_HXX #include -#endif -#ifndef _XMLOFF_TXTIMP_HXX #include -#endif -#ifndef _XMLOFF_FAMILIES_HXX #include -#endif #include -#ifndef _XMLOFF_XMLTEXTSHAPESTYLECONTEXT_HXX #include -#endif #include #include "xmlimp.hxx" #include "xmltbli.hxx" @@ -79,6 +70,7 @@ #include #include + using namespace ::com::sun::star; using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx index b43419a399..f2503ec54e 100644 --- a/sw/source/filter/xml/xmlfonte.cxx +++ b/sw/source/filter/xml/xmlfonte.cxx @@ -35,7 +35,6 @@ #include #include #include -//#include #include #include #include diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 49db3512b6..1039515a8d 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -30,6 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include #include #include @@ -47,7 +48,6 @@ #include #include #include -#include #include #include #include "unocrsr.hxx" diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx index 3bac5aa2b4..d6ebfb2d25 100644 --- a/sw/source/filter/xml/xmlmeta.cxx +++ b/sw/source/filter/xml/xmlmeta.cxx @@ -45,7 +45,6 @@ #include "docstat.hxx" #include "docsh.hxx" #include -#include #include "xmlimp.hxx" #include "xmlexp.hxx" diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index 04f654db61..0b4783e2e4 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -61,7 +61,6 @@ #include #include #include // for cTokenSeperator -#include "unoobj.hxx" #include "unotbl.hxx" #include "xmltexte.hxx" #include "xmlexp.hxx" diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index f40ce0a5a5..3373bfa75d 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -50,13 +50,13 @@ #include #include #include "unocrsr.hxx" -#include "unoobj.hxx" #include "TextCursorHelper.hxx" #include "unoframe.hxx" #include "doc.hxx" #include "unocoll.hxx" #include #include +#include #include "xmlimp.hxx" #include "xmltbli.hxx" #include "xmltexti.hxx" diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 1b0a0c1c0e..050c0bacca 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -30,30 +30,19 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#ifndef _COM_SUN_STAR_LANG_XMultiServiceFactory_HPP_ -#include -#endif -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX -#include -#endif +#include #include +#include #include #include #include -#ifndef _WRKWIN_HXX //autogen #include -#endif -#ifndef _MSGBOX_HXX //autogen #include -#endif #include #include -/* -#include -*/ #include #include #include @@ -90,51 +79,33 @@ #include #include #include -#ifndef _VIEW_HXX #include // fuer die aktuelle Sicht -#endif -#ifndef _DOCSH_HXX #include // Dokumenterzeugung -#endif #include #include #include -#ifndef _GLOBDOC_HXX #include -#endif #include -#ifndef _REDLNDLG_HXX #include -#endif #include #include #include #include -#ifndef _PVIEW_HXX #include -#endif -#ifndef _SRCVIEW_HXX #include -#endif #include #include -#ifndef _WDOCSH_HXX #include -#endif #include #include #include -#include +#include #include #include -#ifndef _CMDID_H #include -#endif #include -#ifndef _HELPID_H #include -#endif #ifndef _APP_HRC #include #endif diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx index 21a9dcf599..0b0f557bbb 100644 --- a/sw/source/ui/envelp/labelexp.cxx +++ b/sw/source/ui/envelp/labelexp.cxx @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 89a37a86e7..787a04af90 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -30,25 +30,18 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #ifdef SW_DLLIMPLEMENTATION #undef SW_DLLIMPLEMENTATION #endif - - #define _SVSTDARR_STRINGSDTOR #define _SVSTDARR_STRINGS #include -#ifndef _MENU_HXX //autogen #include -#endif -#ifndef _MSGBOX_HXX //autogen #include -#endif -#ifndef _HELP_HXX //autogen #include -#endif #ifndef _SVSTDARR_HXX #include #endif @@ -64,7 +57,6 @@ #include #include #include -#include #include #include #include @@ -75,12 +67,8 @@ #include #include #include -#ifndef _VIEW_HXX #include -#endif -#ifndef _BASESH_HXX #include -#endif #include #include #include @@ -88,20 +76,12 @@ #include #include #include -#ifndef _DOCSH_HXX #include -#endif #include -#ifndef _CMDID_H #include -#endif -#ifndef _HELPID_H #include -#endif -#ifndef _SWERROR_H #include -#endif #ifndef _GLOBALS_HRC #include #endif diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index ad6ab1d2e7..7118acd7e7 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -30,6 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include #include #include @@ -53,7 +54,6 @@ #include #include #include -#include #include #include #include @@ -67,12 +67,8 @@ #include #include -#ifndef _CMDID_H #include -#endif -#ifndef _HELPID_H #include -#endif #ifndef _GLOBALS_HRC #include #endif diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx index 577ea95c64..014d0d460c 100644 --- a/sw/source/ui/shells/tabsh.cxx +++ b/sw/source/ui/shells/tabsh.cxx @@ -108,16 +108,12 @@ #ifndef _TABLE_HRC #include #endif -#ifndef _CMDID_H #include -#endif #ifndef _GLOBALS_HRC #include #endif -#ifndef _HELPID_H #include -#endif -#include +#include #define SwTableShell #include diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx index c8a836cc43..1032536616 100644 --- a/sw/source/ui/table/chartins.cxx +++ b/sw/source/ui/table/chartins.cxx @@ -33,9 +33,7 @@ #include -#ifndef _MSGBOX_HXX //autogen #include -#endif #include #include #include @@ -45,24 +43,19 @@ #include #include #include -#ifndef _VIEW_HXX #include -#endif #include #include #include #include #include -#include #include #include #include #include -#ifndef _CMDID_H #include -#endif #ifndef _CHARTINS_HRC #include #endif diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index 60474dff99..8389d9d2f9 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -30,16 +30,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include #include #include #include -#ifndef _COMPHELPER_MASTERPROPERTSETINFO_HXX_ #include -#endif -#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPPP_ #include -#endif #include #include #include @@ -50,7 +47,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx index 062246c88f..f9b672df97 100644 --- a/sw/source/ui/uno/unoatxt.cxx +++ b/sw/source/ui/uno/unoatxt.cxx @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/uno/unodispatch.cxx b/sw/source/ui/uno/unodispatch.cxx index 44b82239b1..02e669d3b2 100644 --- a/sw/source/ui/uno/unodispatch.cxx +++ b/sw/source/ui/uno/unodispatch.cxx @@ -31,17 +31,18 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include #include +#include + #include -#include +#include #include #include #include "wrtsh.hxx" #include "dbmgr.hxx" -#include + using namespace ::com::sun::star; using namespace rtl; diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index d5315fbd33..18cccf6d7b 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index cc994acb9c..5c2c3a7e52 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index be1b453633..19f1aa0dea 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx index 288a51b7bc..d338cb6ebb 100644 --- a/sw/source/ui/utlui/swrenamexnameddlg.cxx +++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx @@ -63,7 +63,6 @@ #include #include #include -#include #include #include "swrenamexnameddlg.hxx" -- cgit v1.2.3 From c99f33185c24505704599028ca05e9fbb32167dd Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 6 Jan 2010 21:34:53 +0100 Subject: autorecovery: allow creating SFX-based documents which do not support the XDocumentRecovery interface For this purpose, the SFX document factory methods got an additional parameter respectively flag ("DocumentRecoverySupport" resp. SFXMODEL_DISABLE_DOCUMENT_RECOVERY). This flag is used by database documents to remove the interface from sub documents (aka forms/reports). In this course, some of the functionality around those SFXMODELL_* flags, previously duplicated in all applications, has been consolidated into a new SfxObjectShell constructor. --- starmath/inc/document.hxx | 2 +- starmath/source/document.cxx | 7 ++----- starmath/source/unodoc.cxx | 5 +---- sw/inc/docsh.hxx | 3 ++- sw/source/ui/app/docshini.cxx | 24 +++++++++++++++++++++--- sw/source/ui/uno/unodoc.cxx | 4 +--- 6 files changed, 28 insertions(+), 17 deletions(-) (limited to 'sw/source') diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index 3f015a924e..83d12e5674 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -170,7 +170,7 @@ public: using SotObject::GetInterface; SFX_DECL_OBJECTFACTORY(); - SmDocShell(SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED, const sal_Bool _bScriptSupport = sal_True); + SmDocShell( const sal_uInt64 i_nSfxCreationFlags ); virtual ~SmDocShell(); void LoadSymbols(); diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 78d989081d..2e92ae74b0 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -684,8 +684,8 @@ void SmDocShell::Repaint() } -SmDocShell::SmDocShell(SfxObjectCreateMode eMode,const sal_Bool _bScriptSupport) : - SfxObjectShell(eMode), +SmDocShell::SmDocShell( const sal_uInt64 i_nSfxCreationFlags ) : + SfxObjectShell( i_nSfxCreationFlags ), pTree ( 0 ), pEditEngineItemPool ( 0 ), pEditEngine ( 0 ), @@ -704,9 +704,6 @@ SmDocShell::SmDocShell(SfxObjectCreateMode eMode,const sal_Bool _bScriptSupport) StartListening(aFormat); StartListening(*pp->GetConfig()); - if ( !_bScriptSupport ) - SetHasNoBasic(); - SetModel( new SmModel(this) ); //! das hier mit new erzeugte Model brauch //! im Destruktor nicht explizit geloescht werden. //! Dies erledigt das Sfx. diff --git a/starmath/source/unodoc.cxx b/starmath/source/unodoc.cxx index e6dc669255..9914695438 100644 --- a/starmath/source/unodoc.cxx +++ b/starmath/source/unodoc.cxx @@ -64,10 +64,7 @@ uno::Reference< uno::XInterface > SAL_CALL SmDocument_createInstance( if ( !SM_MOD() ) SmDLL::Init(); - const SfxObjectCreateMode eCreateMode = ( _nCreationFlags & SFXMODEL_EMBEDDED_OBJECT ) ? SFX_CREATE_MODE_EMBEDDED : SFX_CREATE_MODE_STANDARD; - const bool bScriptSupport = ( _nCreationFlags & SFXMODEL_DISABLE_EMBEDDED_SCRIPTS ) == 0; - - SfxObjectShell* pShell = new SmDocShell( eCreateMode, bScriptSupport ); + SfxObjectShell* pShell = new SmDocShell( _nCreationFlags ); if( pShell ) return uno::Reference< uno::XInterface >( pShell->GetModel() ); diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index 62b484809e..7e12e737c7 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -154,7 +154,8 @@ public: static rtl::OUString GetEventName( sal_Int32 nId ); //Das Doc wird fuer SO-Datenaustausch benoetigt! - SwDocShell( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED, sal_Bool _bScriptingSupport = sal_True ); + SwDocShell( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED ); + SwDocShell( const sal_uInt64 i_nSfxCreationFlags ); SwDocShell( SwDoc *pDoc, SfxObjectCreateMode eMode = SFX_CREATE_MODE_STANDARD ); ~SwDocShell(); diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx index b2ce3411c4..3f62d866a1 100644 --- a/sw/source/ui/app/docshini.cxx +++ b/sw/source/ui/app/docshini.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #ifndef _OFA_MISCCFG_HXX //autogen #include #endif @@ -400,7 +401,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) --------------------------------------------------------------------*/ -SwDocShell::SwDocShell( SfxObjectCreateMode eMode, sal_Bool _bScriptingSupport ) : +SwDocShell::SwDocShell( SfxObjectCreateMode eMode ) : SfxObjectShell ( eMode ), pDoc(0), pFontList(0), @@ -411,8 +412,25 @@ SwDocShell::SwDocShell( SfxObjectCreateMode eMode, sal_Bool _bScriptingSupport ) bInUpdateFontList(false) { RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SwDocShell" ); - if ( !_bScriptingSupport ) - SetHasNoBasic(); + Init_Impl(); +} + +/*-------------------------------------------------------------------- + Beschreibung: Ctor / Dtor + --------------------------------------------------------------------*/ + + +SwDocShell::SwDocShell( const sal_uInt64 i_nSfxCreationFlags ) : + SfxObjectShell ( i_nSfxCreationFlags ), + pDoc(0), + pFontList(0), + pView( 0 ), + pWrtShell( 0 ), + pOLEChildList( 0 ), + nUpdateDocMode(document::UpdateDocMode::ACCORDING_TO_CONFIG), + bInUpdateFontList(false) +{ + RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SwDocShell" ); Init_Impl(); } diff --git a/sw/source/ui/uno/unodoc.cxx b/sw/source/ui/uno/unodoc.cxx index 23d014bf59..0ab5801733 100644 --- a/sw/source/ui/uno/unodoc.cxx +++ b/sw/source/ui/uno/unodoc.cxx @@ -69,9 +69,7 @@ uno::Reference< uno::XInterface > SAL_CALL SwTextDocument_createInstance( { ::vos::OGuard aGuard( Application::GetSolarMutex() ); SwDLL::Init(); - const SfxObjectCreateMode eCreateMode = ( _nCreationFlags & SFXMODEL_EMBEDDED_OBJECT ) ? SFX_CREATE_MODE_EMBEDDED : SFX_CREATE_MODE_STANDARD; - const bool bScriptSupport = ( _nCreationFlags & SFXMODEL_DISABLE_EMBEDDED_SCRIPTS ) == 0; - SfxObjectShell* pShell = new SwDocShell( eCreateMode, bScriptSupport ); + SfxObjectShell* pShell = new SwDocShell( _nCreationFlags ); return uno::Reference< uno::XInterface >( pShell->GetModel() ); } -- cgit v1.2.3 From af9a9a489226d83919dee2ceeaa44e7248399790 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 7 Jan 2010 09:46:58 +0100 Subject: sw33bf02: #i107834# [patch from CMC] - method keep "faked" font properties at font metric --- sw/source/core/txtnode/fntcache.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index fa40051bf2..a2fbb8ca4e 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -484,6 +484,11 @@ static sal_Char __READONLY_DATA sStandardString[] = "Dies ist der Teststring"; pScrFont = pPrtFont; FontMetric aMet = pPrt->GetFontMetric( ); + //Don't loose "faked" properties of the logical font that don't truly + //exist in the physical font metrics which vcl which fake up for us + aMet.SetWeight(pScrFont->GetWeight()); + aMet.SetItalic(pScrFont->GetItalic()); + bSymbol = RTL_TEXTENCODING_SYMBOL == aMet.GetCharSet(); if ( USHRT_MAX == nGuessedLeading ) @@ -523,6 +528,11 @@ static sal_Char __READONLY_DATA sStandardString[] = "Dies ist der Teststring"; pPrt->SetFont( aFnt2 ); aMet = pPrt->GetFontMetric( ); + //Don't loose "faked" properties of the logical font that don't + //truly exist in the physical font metrics which vcl which fake + //up for us + aMet.SetWeight(aFnt2.GetWeight()); + aMet.SetItalic(aFnt2.GetItalic()); } const XubString aStandardStr( sStandardString, -- cgit v1.2.3 From 46c1974f7f73df12255891348fbcfdb263cb6b00 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 7 Jan 2010 14:40:30 +0100 Subject: sw33bf02: #i107811# method - Assure that at-page anchored fly frames have a page num or a content anchor set. --- sw/source/core/doc/doclay.cxx | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 0ab5de60a7..255f8fc23f 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -659,14 +659,14 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos, // Anker noch nicht gesetzt ? RndStdIds eAnchorId = pAnchor ? pAnchor->GetAnchorId() : pFmt->GetAnchor().GetAnchorId(); - if( !pAnchor || - (FLY_PAGE != pAnchor->GetAnchorId() && - //Nur Page und nicht: -// FLY_AT_CNTNT == pAnchor->GetAnchorId() || -// FLY_IN_CNTNT == pAnchor->GetAnchorId() || -// FLY_AT_FLY == pAnchor->GetAnchorId() || -// FLY_AUTO_CNTNT == pAnchor->GetAnchorId() ) && - !pAnchor->GetCntntAnchor() )) + // --> OD 2010-01-07 #i107811# + // Assure that at-page anchored fly frames have a page num or a content anchor set. + if ( !pAnchor || + ( FLY_PAGE != pAnchor->GetAnchorId() && + !pAnchor->GetCntntAnchor() ) || + ( FLY_PAGE == pAnchor->GetAnchorId() && + !pAnchor->GetCntntAnchor() && + pAnchor->GetPageNum() == 0 ) ) { // dann setze ihn, wird im Undo gebraucht SwFmtAnchor aAnch( pFmt->GetAnchor() ); @@ -680,15 +680,20 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos, { if( eRequestId != aAnch.GetAnchorId() && SFX_ITEM_SET != pFmt->GetItemState( RES_ANCHOR, sal_True ) ) + { aAnch.SetType( eRequestId ); + } eAnchorId = aAnch.GetAnchorId(); - if ( FLY_PAGE != eAnchorId ) - //Nur Page und nicht: -// if( FLY_AT_CNTNT == eAnchorId || FLY_IN_CNTNT == eAnchorId || -// FLY_AT_FLY == eAnchorId || FLY_AUTO_CNTNT == eAnchorId ) + if ( FLY_PAGE != eAnchorId || + ( FLY_PAGE == eAnchorId && + ( !pAnchor || + aAnch.GetPageNum() == 0 ) ) ) + { aAnch.SetAnchor( &rAnchPos ); + } } + // <-- pFmt->SetFmtAttr( aAnch ); } else -- cgit v1.2.3 From c9d63bbaec4e1a0d0e8383d012b202eea1b8360a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 8 Jan 2010 09:39:22 +0100 Subject: autorecovery: need to compile some files (which indirectly include sfxbasemodel.hxx) with exception support --- starmath/source/makefile.mk | 1 + sw/source/ui/app/makefile.mk | 1 + sw/source/ui/shells/makefile.mk | 1 + 3 files changed, 3 insertions(+) (limited to 'sw/source') diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk index 53f6569dcf..af775dc5df 100644 --- a/starmath/source/makefile.mk +++ b/starmath/source/makefile.mk @@ -89,6 +89,7 @@ SLOFILES = \ $(SLO2FILES) EXCEPTIONSFILES = \ + $(SLO)$/register.obj \ $(SLO)$/accessibility.obj \ $(SLO)$/cfgitem.obj \ $(SLO)$/document.obj \ diff --git a/sw/source/ui/app/makefile.mk b/sw/source/ui/app/makefile.mk index d3a4cd242d..80af904aa7 100644 --- a/sw/source/ui/app/makefile.mk +++ b/sw/source/ui/app/makefile.mk @@ -73,6 +73,7 @@ SLOFILES = \ EXCEPTIONSFILES= \ $(SLO)$/docsh.obj \ $(SLO)$/docst.obj \ + $(SLO)$/docshini.obj \ $(SLO)$/swmodule.obj \ $(SLO)$/swmodul1.obj \ $(SLO)$/apphdl.obj \ diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk index 2e4a96c990..a3317235b7 100644 --- a/sw/source/ui/shells/makefile.mk +++ b/sw/source/ui/shells/makefile.mk @@ -77,6 +77,7 @@ SLOFILES = \ $(SLO)$/txtnum.obj EXCEPTIONSFILES = \ + $(SLO)$/basesh.obj \ $(SLO)$/annotsh.obj \ $(SLO)$/drwtxtsh.obj \ $(SLO)$/textsh.obj \ -- cgit v1.2.3 From 0b284b0f64bdb2f3c589368a360546b262450743 Mon Sep 17 00:00:00 2001 From: os Date: Fri, 8 Jan 2010 15:26:54 +0100 Subject: #i105734# patch applied (cmc) --- sw/source/core/swg/SwXMLSectionList.cxx | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx index 07a1781116..3fe21c2c46 100644 --- a/sw/source/core/swg/SwXMLSectionList.cxx +++ b/sw/source/core/swg/SwXMLSectionList.cxx @@ -71,18 +71,22 @@ SvXMLImportContext *SwXMLSectionList::CreateContext( { SvXMLImportContext *pContext = 0; - if (nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken ( rLocalName, XML_BODY ) || - nPrefix == XML_NAMESPACE_TEXT && - (IsXMLToken ( rLocalName, XML_P ) || - IsXMLToken ( rLocalName, XML_H ) || - IsXMLToken ( rLocalName, XML_A ) || - IsXMLToken ( rLocalName, XML_SPAN ) || - IsXMLToken ( rLocalName, XML_SECTION ) || - IsXMLToken ( rLocalName, XML_INDEX_BODY ) || - IsXMLToken ( rLocalName, XML_INDEX_TITLE )|| - IsXMLToken ( rLocalName, XML_INSERTION ) || - IsXMLToken ( rLocalName, XML_DELETION ) ) ) + if(( nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken ( rLocalName, XML_BODY )) || + ( nPrefix == XML_NAMESPACE_TEXT && + (IsXMLToken ( rLocalName, XML_P ) || + IsXMLToken ( rLocalName, XML_H ) || + IsXMLToken ( rLocalName, XML_A ) || + IsXMLToken ( rLocalName, XML_SPAN ) || + IsXMLToken ( rLocalName, XML_SECTION ) || + IsXMLToken ( rLocalName, XML_INDEX_BODY ) || + IsXMLToken ( rLocalName, XML_INDEX_TITLE )|| + IsXMLToken ( rLocalName, XML_INSERTION ) || + IsXMLToken ( rLocalName, XML_DELETION ) ) + ) + ) + { pContext = new SvXMLSectionListContext (*this, nPrefix, rLocalName, xAttrList); + } else pContext = SvXMLImport::CreateContext( nPrefix, rLocalName, xAttrList ); return pContext; -- cgit v1.2.3 From 0302a1c26de7c223d1786a0736c3029ad3340333 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:48 +0100 Subject: swunolocking1: #i105557#: unobaseclass.hxx: add XServiceInfo helpers: new functions GetSupportedServiceNamesImpl and SupportsServiceImpl. --- sw/inc/unobaseclass.hxx | 7 +++++++ sw/source/core/unocore/unoobj2.cxx | 31 +++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) (limited to 'sw/source') diff --git a/sw/inc/unobaseclass.hxx b/sw/inc/unobaseclass.hxx index dd6391554f..5c04700776 100644 --- a/sw/inc/unobaseclass.hxx +++ b/sw/inc/unobaseclass.hxx @@ -164,6 +164,13 @@ namespace sw { return 0; } + ::com::sun::star::uno::Sequence< ::rtl::OUString > + GetSupportedServiceNamesImpl( + size_t const nServices, char const*const pServices[]); + sal_Bool SupportsServiceImpl( + size_t const nServices, char const*const pServices[], + ::rtl::OUString const & rServiceName); + } // namespace sw #endif // SW_UNOBASECLASS_HXX diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 903e97f9bc..2f94bf2da6 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -146,6 +146,37 @@ using namespace ::com::sun::star::drawing; using ::rtl::OUString; +namespace sw { + +sal_Bool SupportsServiceImpl( + size_t const nServices, char const*const pServices[], + ::rtl::OUString const & rServiceName) +{ + for (size_t i = 0; i < nServices; ++i) + { + if (rServiceName.equalsAscii(pServices[i])) + { + return sal_True; + } + } + return sal_False; +} + +uno::Sequence< ::rtl::OUString > +GetSupportedServiceNamesImpl( + size_t const nServices, char const*const pServices[]) +{ + uno::Sequence< ::rtl::OUString > ret(nServices); + for (size_t i = 0; i < nServices; ++i) + { + ret[i] = C2U(pServices[i]); + } + return ret; +} + +} // namespace sw + + struct FrameDependSortListLess { bool operator() (FrameDependSortListEntry const& r1, -- cgit v1.2.3 From f5eab1cee1e4cd0561708e89d7208f8a1ceecfb5 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:49 +0100 Subject: swunolocking1: refactor Meta registration at its text node. Meta will now be registered via SwTxtMeta::ChgTxtNode(), with additional workarounds necessary in SwFmtMeta::DoCopy(). --- sw/inc/fmtmeta.hxx | 8 +++-- sw/inc/txtatr.hxx | 2 +- .../complex/writer/TextPortionEnumerationTest.java | 2 +- sw/source/core/docnode/nodes.cxx | 11 +++++-- sw/source/core/txtnode/fmtatr2.cxx | 35 ++++++++++++++++++---- sw/source/core/txtnode/thints.cxx | 7 ++++- sw/source/core/txtnode/txtatr2.cxx | 10 +++++++ 7 files changed, 60 insertions(+), 15 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx index 952181d049..6d3f63ece4 100755 --- a/sw/inc/fmtmeta.hxx +++ b/sw/inc/fmtmeta.hxx @@ -122,8 +122,8 @@ public: virtual SfxPoolItem * Clone( SfxItemPool *pPool = 0 ) const; // TYPEINFO(); - // notify clients registered at m_pMeta that this meta is being removed - void NotifyRemoval(); + /// notify clients registered at m_pMeta that this meta is being (re-)moved + void NotifyChangeTxtNode(SwTxtNode *const pTxtNode); static SwFmtMeta * CreatePoolDefault( const USHORT i_nWhich ); ::sw::Meta * GetMeta() { return m_pMeta.get(); } /// this method must be called when the hint is actually copied @@ -140,7 +140,7 @@ class Meta , public SwModify { protected: - friend class ::SwFmtMeta; // SetFmtMeta + friend class ::SwFmtMeta; // SetFmtMeta, NotifyChangeTxtNode friend class ::SwXMeta; // GetTxtNode, GetTxtAttr SwFmtMeta * m_pFmt; @@ -151,6 +151,8 @@ protected: SwFmtMeta * GetFmtMeta() const { return m_pFmt; } void SetFmtMeta( SwFmtMeta * const i_pFmt ) { m_pFmt = i_pFmt; }; + void NotifyChangeTxtNode(); + public: explicit Meta(SwFmtMeta * const i_pFmt = 0); virtual ~Meta(); diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx index 3af8e54bf6..e8163914eb 100644 --- a/sw/inc/txtatr.hxx +++ b/sw/inc/txtatr.hxx @@ -80,7 +80,7 @@ public: const xub_StrLen i_nStart, const xub_StrLen i_nEnd ); virtual ~SwTxtMeta(); - void ChgTxtNode( SwTxtNode * const pNode ) { m_pTxtNode = pNode; } + void ChgTxtNode(SwTxtNode * const pNode); SwTxtNode * GetTxtNode() const { return m_pTxtNode; } }; diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java index a07b3cccad..8110c82a6e 100755 --- a/sw/qa/complex/writer/TextPortionEnumerationTest.java +++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java @@ -3097,7 +3097,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xPortion); String type = (String) xPropSet.getPropertyValue("TextPortionType"); - assure("first: not text", type.equals("Text")); + assure("first: not text: " + type, type.equals("Text")); String txt = xPortion.getString(); assure("first: text differs: " + txt, "45".equals(txt)); } diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index dd5a91b2ba..4656d96a0b 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include @@ -350,8 +350,13 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz, case RES_TXTATR_META: case RES_TXTATR_METAFIELD: - static_cast(pAttr->GetAttr()) - .NotifyRemoval(); + { + SwTxtMeta *const pTxtMeta( + static_cast(pAttr)); + // force removal of UNO object + pTxtMeta->ChgTxtNode(0); + pTxtMeta->ChgTxtNode(pTxtNd); + } break; default: diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index d1b2f35382..066817d5b0 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -650,19 +650,28 @@ void SwFmtMeta::SetTxtAttr(SwTxtMeta * const i_pTxtAttr) } } -void SwFmtMeta::NotifyRemoval() +void SwFmtMeta::NotifyChangeTxtNode(SwTxtNode *const pTxtNode) { // N.B.: do not reset m_pTxtAttr here: see call in nodes.cxx, // where the hint is not deleted! ASSERT(m_pMeta, "NotifyRemoval: no meta ?"); if (m_pMeta) { - SwPtrMsgPoolItem aMsgHint( RES_REMOVE_UNO_OBJECT, - &static_cast(*m_pMeta) ); // cast to proper base class! - m_pMeta->Modify(&aMsgHint, &aMsgHint); + if (!pTxtNode) + { + SwPtrMsgPoolItem aMsgHint( RES_REMOVE_UNO_OBJECT, + &static_cast(*m_pMeta) ); // cast to base class! + m_pMeta->Modify(&aMsgHint, &aMsgHint); + } + else + { // do not call Modify, that would call SwXMeta::Modify! + m_pMeta->NotifyChangeTxtNode(); + } } } +// UGLY: this really awful method fixes up an inconsistent state, +// and if it is not called when copying, total chaos will undoubtedly ensue void SwFmtMeta::DoCopy(SwFmtMeta & rOriginalMeta) { ASSERT(m_pMeta, "DoCopy called for SwFmtMeta with no sw::Meta?"); @@ -673,6 +682,8 @@ void SwFmtMeta::DoCopy(SwFmtMeta & rOriginalMeta) // inserted via MakeTxtAttr! so fix it up to point at the original item // (maybe would be better to tell MakeTxtAttr that it creates a copy?) pOriginal->SetFmtMeta(&rOriginalMeta); + // force pOriginal to register in original text node! + pOriginal->NotifyChangeTxtNode(); if (RES_TXTATR_META == Which()) { m_pMeta.reset( new ::sw::Meta(this) ); @@ -685,7 +696,10 @@ void SwFmtMeta::DoCopy(SwFmtMeta & rOriginalMeta) m_pMeta = pTargetDoc->GetMetaFieldManager().makeMetaField( this, pMetaField->m_nNumberFormat, pMetaField->IsFixedLanguage() ); } + // this cannot be done in Clone: a Clone is not necessarily a copy! m_pMeta->RegisterAsCopyOf(*pOriginal); + // force copy Meta to register in target text node! + m_pMeta->NotifyChangeTxtNode(); } } @@ -718,14 +732,23 @@ SwTxtNode * Meta::GetTxtNode() const return (pTxtAttr) ? pTxtAttr->GetTxtNode() : 0; } -// SwClient -void Meta::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ) +void Meta::NotifyChangeTxtNode() { SwTxtNode * const pTxtNode( GetTxtNode() ); if (pTxtNode && (GetRegisteredIn() != pTxtNode)) { pTxtNode->Add(this); } + else if (!pTxtNode && GetRegisteredIn()) + { + const_cast(GetRegisteredIn())->Remove(this); + } +} + +// SwClient +void Meta::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ) +{ + NotifyChangeTxtNode(); SwModify::Modify(pOld, pNew); } diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index d0e13ea32c..dfb147fbbe 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -114,6 +114,11 @@ struct TxtAttrDeleter TxtAttrDeleter( SwDoc & rDoc ) : m_rPool( rDoc.GetAttrPool() ) { } void operator() (SwTxtAttr * const pAttr) { + if (RES_TXTATR_META == pAttr->Which() || + RES_TXTATR_METAFIELD == pAttr->Which()) + { + static_cast(pAttr)->ChgTxtNode(0); // prevents ASSERT + } SwTxtAttr::Destroy( pAttr, m_rPool ); } }; @@ -1178,7 +1183,7 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* pAttr ) case RES_TXTATR_META: case RES_TXTATR_METAFIELD: - static_cast(pAttr->GetAttr()).NotifyRemoval(); + static_cast(pAttr)->ChgTxtNode(0); break; default: diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx index d9d94b05b2..464af6183a 100644 --- a/sw/source/core/txtnode/txtatr2.cxx +++ b/sw/source/core/txtnode/txtatr2.cxx @@ -329,3 +329,13 @@ SwTxtMeta::~SwTxtMeta() } } +void SwTxtMeta::ChgTxtNode(SwTxtNode * const pNode) +{ + m_pTxtNode = pNode; // before Notify! + SwFmtMeta & rFmtMeta( static_cast(GetAttr()) ); + if (rFmtMeta.GetTxtAttr() == this) + { + rFmtMeta.NotifyChangeTxtNode(pNode); + } +} + -- cgit v1.2.3 From 1596aed3b26d73cf65c2c57325a1d0b958fe2b53 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:49 +0100 Subject: swunolocking1: #i105557#: fix locking for SwXMeta: move SwClient base to pImpl struct, and use UnoImplPtr to lock destructor. replace broken SwClient iteration with a WeakReference in sw::Meta. make constructor protected, and add factory function CreateXMeta. use new XUnoTunnel and XServiceInfo helpers. --- sw/inc/fmtmeta.hxx | 14 +- sw/source/core/inc/unometa.hxx | 193 +++++++++++++------------ sw/source/core/txtnode/fmtatr2.cxx | 31 +--- sw/source/core/unocore/unoportenum.cxx | 57 +++++--- sw/source/core/unocore/unorefmk.cxx | 251 ++++++++++++++++++++------------- 5 files changed, 311 insertions(+), 235 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx index 6d3f63ece4..792a7d8374 100755 --- a/sw/inc/fmtmeta.hxx +++ b/sw/inc/fmtmeta.hxx @@ -31,6 +31,8 @@ #ifndef SW_FMTMETA_HXX #define SW_FMTMETA_HXX +#include + #include #include @@ -141,7 +143,10 @@ class Meta { protected: friend class ::SwFmtMeta; // SetFmtMeta, NotifyChangeTxtNode - friend class ::SwXMeta; // GetTxtNode, GetTxtAttr + friend class ::SwXMeta; // GetTxtNode, GetTxtAttr, Get/SetXMeta + + ::com::sun::star::uno::WeakReference< + ::com::sun::star::rdf::XMetadatable> m_wXMeta; SwFmtMeta * m_pFmt; @@ -153,6 +158,13 @@ protected: void NotifyChangeTxtNode(); + ::com::sun::star::uno::WeakReference< + ::com::sun::star::rdf::XMetadatable> const& GetXMeta() const + { return m_wXMeta; } + void SetXMeta(::com::sun::star::uno::Reference< + ::com::sun::star::rdf::XMetadatable> const& xMeta) + { m_wXMeta = xMeta; } + public: explicit Meta(SwFmtMeta * const i_pFmt = 0); virtual ~Meta(); diff --git a/sw/source/core/inc/unometa.hxx b/sw/source/core/inc/unometa.hxx index 1dc1985f7d..5568aa88b5 100755 --- a/sw/source/core/inc/unometa.hxx +++ b/sw/source/core/inc/unometa.hxx @@ -31,19 +31,21 @@ #ifndef SW_UNOMETA_HXX #define SW_UNOMETA_HXX -#include "calbck.hxx" - -#include -#include -#include +#include #include #include +#include #include #include #include -#include +#include +#include + +#include + +#include typedef ::std::deque< @@ -52,42 +54,78 @@ typedef ::std::deque< class SwXTextRange; class SwPaM; -class SwTxtMeta; +class SwTxtNode; + namespace sw { class Meta; class MetaField; } -typedef -::cppu::ImplInheritanceHelper5 -< ::sfx2::MetadatableMixin -, ::com::sun::star::lang::XUnoTunnel -, ::com::sun::star::lang::XServiceInfo -, ::com::sun::star::text::XTextContent -, ::com::sun::star::text::XText -, ::com::sun::star::container::XEnumerationAccess -> SwXMetaBaseClass; +typedef ::cppu::ImplInheritanceHelper5 +< ::sfx2::MetadatableMixin +, ::com::sun::star::lang::XUnoTunnel +, ::com::sun::star::lang::XServiceInfo +, ::com::sun::star::container::XEnumerationAccess +, ::com::sun::star::text::XTextContent +, ::com::sun::star::text::XText +> SwXMeta_Base; class SwXMeta - : public SwXMetaBaseClass - , public SwClient + : public SwXMeta_Base , private ::boost::noncopyable { -private: - struct Impl; - ::std::auto_ptr m_pImpl; + +public: + + class Impl; protected: + + ::sw::UnoImplPtr m_pImpl; + + virtual void SAL_CALL AttachImpl( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextRange, + const USHORT nWhich) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual ~SwXMeta(); -public: - SwXMeta(SwDoc *const pDoc, + /// @param pDoc and pMeta != 0, but not & because of ImplInheritanceHelper + SwXMeta(SwDoc *const pDoc, ::sw::Meta *const pMeta, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText> const& xParentText, - TextRangeList_t * const pPortions, SwTxtMeta * const pHint); + TextRangeList_t const*const pPortions); + +public: + SwXMeta(SwDoc *const pDoc); - TYPEINFO(); + static ::com::sun::star::uno::Reference< + ::com::sun::star::rdf::XMetadatable > + CreateXMeta( + ::sw::Meta & rMeta, + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText> + const& xParentText = 0, + ::std::auto_ptr pPortions = + ::std::auto_ptr(0)); + + /// init params with position of the attribute content (w/out CH_TXTATR) + bool SetContentRange( + SwTxtNode *& rpNode, xub_StrLen & rStart, xub_StrLen & rEnd) const; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > + GetParentText() const; + + bool CheckForOwnMemberMeta(const SwXTextRange* const pRange, + const SwPaM* const pPam, bool bAbsorb) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + // MetadatableMixin + virtual ::sfx2::Metadatable * GetCoreObject(); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > + GetModel(); static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); @@ -118,6 +156,18 @@ public: ::com::sun::star::lang::XEventListener > & xListener) throw (::com::sun::star::uno::RuntimeException); + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() + throw (::com::sun::star::uno::RuntimeException); + + // XEnumerationAccess + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::container::XEnumeration > SAL_CALL + createEnumeration() + throw (::com::sun::star::uno::RuntimeException); + // XTextContent virtual void SAL_CALL attach( const ::com::sun::star::uno::Reference< @@ -180,72 +230,37 @@ public: throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); - // XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL getElementType() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasElements() - throw (::com::sun::star::uno::RuntimeException); - - // XEnumerationAccess - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::container::XEnumeration > SAL_CALL - createEnumeration() - throw (::com::sun::star::uno::RuntimeException); - - // MetadatableMixin - virtual ::sfx2::Metadatable * GetCoreObject(); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > - GetModel(); - - // SwClient - virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ); - - /// init params with position of the attribute content (w/out CH_TXTATR) - bool SetContentRange( - SwTxtNode *& rpNode, xub_StrLen & rStart, xub_StrLen & rEnd) const; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > - GetParentText() const; - - bool CheckForOwnMemberMeta(const SwXTextRange* const pRange, - const SwPaM* const pPam, bool bAbsorb) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - -protected: - virtual void SAL_CALL AttachImpl( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > & xTextRange, - const USHORT nWhich) - throw ( ::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException ); - -private: - inline const ::sw::Meta * GetMeta() const; - }; -typedef -::cppu::ImplInheritanceHelper2 -< SwXMeta -, ::com::sun::star::beans::XPropertySet -, ::com::sun::star::text::XTextField -> SwXMetaFieldBaseClass; +typedef ::cppu::ImplInheritanceHelper2 +< SwXMeta +, ::com::sun::star::beans::XPropertySet +, ::com::sun::star::text::XTextField +> SwXMetaField_Base; class SwXMetaField - : public SwXMetaFieldBaseClass + : public SwXMetaField_Base { + private: + virtual ~SwXMetaField(); -private: - inline const ::sw::MetaField * GetMetaField() const; + friend ::com::sun::star::uno::Reference< + ::com::sun::star::rdf::XMetadatable > + SwXMeta::CreateXMeta(::sw::Meta &, + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText> + const&, + ::std::auto_ptr pPortions); -public: - SwXMetaField(SwDoc *const pDoc, + SwXMetaField(SwDoc *const pDoc, ::sw::Meta *const pMeta, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText> const& xParentText, - TextRangeList_t * const pPortions, SwTxtMeta * const pHint); + TextRangeList_t const*const pPortions); + +public: + SwXMetaField(SwDoc *const pDoc); // XServiceInfo @@ -270,16 +285,6 @@ public: ::com::sun::star::lang::XEventListener > & xListener) throw (::com::sun::star::uno::RuntimeException); - // XTextContent - virtual void SAL_CALL attach( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > & xTextRange) - throw ( ::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > SAL_CALL getAnchor() - throw (::com::sun::star::uno::RuntimeException); - // XPropertySet virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL @@ -327,6 +332,16 @@ public: ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + // XTextContent + virtual void SAL_CALL attach( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextRange) + throw ( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL getAnchor() + throw (::com::sun::star::uno::RuntimeException); + // XTextField virtual rtl::OUString SAL_CALL getPresentation(sal_Bool bShowCommand) throw (::com::sun::star::uno::RuntimeException); diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index 066817d5b0..686b4a67af 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -57,7 +57,6 @@ #include // for meta #include // for meta #include -#include #include #include // GetNumberFormat @@ -750,6 +749,10 @@ void Meta::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ) { NotifyChangeTxtNode(); SwModify::Modify(pOld, pNew); + if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which())) + { // invalidate cached uno object + SetXMeta(uno::Reference(0)); + } } // sw::Metadatable @@ -788,31 +791,7 @@ bool Meta::IsInContent() const ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XMetadatable > Meta::MakeUnoObject() { - // re-use existing SwXMeta - SwClientIter iter( *this ); - SwClient * pClient( iter.First( TYPE( SwXMeta ) ) ); - while (pClient) { - SwXMeta *const pMeta( dynamic_cast(pClient) ); - if (pMeta && pMeta->GetCoreObject() == this) { - return pMeta; - } - pClient = iter.Next(); - } - - // create new SwXMeta - SwTxtMeta * const pTxtAttr( GetTxtAttr() ); - OSL_ENSURE(pTxtAttr, "MakeUnoObject: no text attr?"); - if (!pTxtAttr) return 0; - SwTxtNode * const pTxtNode( pTxtAttr->GetTxtNode() ); - OSL_ENSURE(pTxtNode, "MakeUnoObject: no text node?"); - if (!pTxtNode) return 0; - const SwPosition aPos(*pTxtNode, *pTxtAttr->GetStart()); - const uno::Reference xParentText( - SwXTextRange::CreateParentXText(pTxtNode->GetDoc(), aPos) ); - if (!xParentText.is()) return 0; - return (RES_TXTATR_META == m_pFmt->Which()) - ? new SwXMeta (pTxtNode->GetDoc(), xParentText, 0, pTxtAttr) - : new SwXMetaField(pTxtNode->GetDoc(), xParentText, 0, pTxtAttr); + return SwXMeta::CreateXMeta(*this); } /************************************************************************* diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 07f27201f6..2cff59cf41 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -492,6 +493,33 @@ lcl_CreateTOXMarkPortion( return pPortion; } +//----------------------------------------------------------------------------- +static uno::Reference +lcl_CreateMetaPortion( + uno::Reference const& xParent, + const SwUnoCrsr * const pUnoCrsr, + SwTxtAttr & rAttr, ::std::auto_ptr & pPortions) +{ + const uno::Reference xMeta( SwXMeta::CreateXMeta( + *static_cast(rAttr.GetAttr()).GetMeta(), + xParent, pPortions)); + SwXTextPortion * pPortion(0); + if (RES_TXTATR_META == rAttr.Which()) + { + const uno::Reference xContent(xMeta, + uno::UNO_QUERY); + pPortion = new SwXTextPortion(pUnoCrsr, xParent, PORTION_META); + pPortion->SetMeta(xContent); + } + else + { + const uno::Reference xField(xMeta, uno::UNO_QUERY); + pPortion = new SwXTextPortion(pUnoCrsr, xParent, PORTION_FIELD); + pPortion->SetTextField(xField); + } + return pPortion; +} + //----------------------------------------------------------------------------- static void lcl_ExportBookmark( @@ -692,30 +720,13 @@ lcl_ExportHints( } else { - TextRangeList_t *const pCurrentPortions(Top.first); + ::std::auto_ptr + pCurrentPortions(Top.first); rPortionStack.pop(); - SwXTextPortion * pPortion; - if (RES_TXTATR_META == nWhich) - { - SwXMeta * const pMeta = - new SwXMeta(pDoc, xParent, - pCurrentPortions, - static_cast(pAttr)); - pPortion = new SwXTextPortion( - pUnoCrsr, xParent, PORTION_META); - pPortion->SetMeta(pMeta); - } - else - { - SwXMetaField * const pMeta = - new SwXMetaField(pDoc, xParent, - pCurrentPortions, - static_cast(pAttr)); - pPortion = new SwXTextPortion( - pUnoCrsr, xParent, PORTION_FIELD); - pPortion->SetTextField(pMeta); - } - rPortionStack.top().first->push_back(pPortion); + const uno::Reference xPortion( + lcl_CreateMetaPortion(xParent, pUnoCrsr, + *pAttr, pCurrentPortions)); + rPortionStack.top().first->push_back(xPortion); } } break; diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 42ef834cbf..18a72831f8 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -493,6 +493,8 @@ public: const uno::Reference< text::XTextRange > & xTextPosition) throw (uno::RuntimeException); + SwXMeta & GetXMeta() { return m_rMeta; } + }; SwXMetaText::SwXMetaText(SwDoc & rDoc, SwXMeta & rMeta) @@ -598,8 +600,12 @@ SwXMetaText::createTextCursorByRange( // this list is created by SwXTextPortionEnumeration // the Meta listens at the SwTxtNode and throws away the cache when it changes -struct SwXMeta::Impl +class SwXMeta::Impl + : public SwClient { + +public: + SwEventListenerContainer m_ListenerContainer; ::std::auto_ptr m_pTextPortions; // 3 possible states: not attached, attached, disposed @@ -608,37 +614,132 @@ struct SwXMeta::Impl uno::Reference m_xParentText; SwXMetaText m_Text; - Impl(SwXMeta & rThis, SwDoc & rDoc, + Impl( SwXMeta & rThis, SwDoc & rDoc, + ::sw::Meta * const pMeta, uno::Reference const& xParentText, - TextRangeList_t const * const pPortions, - SwTxtMeta const * const pHint) - : m_ListenerContainer( - static_cast< ::cppu::OWeakObject* >(&rThis)) + TextRangeList_t const * const pPortions) + : SwClient(pMeta) + , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) , m_pTextPortions( pPortions ) , m_bIsDisposed( false ) - , m_bIsDescriptor( 0 == pHint ) + , m_bIsDescriptor(0 == pMeta) , m_xParentText(xParentText) , m_Text(rDoc, rThis) { } -}; -TYPEINIT1(SwXMeta, SwClient); + inline const ::sw::Meta * GetMeta() const; + // only for SwXMetaField! + inline const ::sw::MetaField * GetMetaField() const; + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); -inline const ::sw::Meta * SwXMeta::GetMeta() const +}; + +inline const ::sw::Meta * SwXMeta::Impl::GetMeta() const { return static_cast< const ::sw::Meta * >(GetRegisteredIn()); } +// SwModify +void SwXMeta::Impl::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ) +{ + m_pTextPortions.reset(); // throw away cache (SwTxtNode changed) + + ClientModify(this, pOld, pNew); + + if (!GetRegisteredIn()) // removed => dispose + { + m_ListenerContainer.Disposing(); + m_bIsDisposed = true; + m_Text.Invalidate(); + } +} + uno::Reference SwXMeta::GetParentText() const { return m_pImpl->m_xParentText; } +SwXMeta::SwXMeta(SwDoc *const pDoc, ::sw::Meta *const pMeta, + uno::Reference const& xParentText, + TextRangeList_t const*const pPortions) + : m_pImpl( new SwXMeta::Impl(*this, *pDoc, pMeta, xParentText, pPortions) ) +{ +} + +SwXMeta::SwXMeta(SwDoc *const pDoc) + : m_pImpl( new SwXMeta::Impl(*this, *pDoc, 0, 0, 0) ) +{ +} + +SwXMeta::~SwXMeta() +{ +} + +uno::Reference +SwXMeta::CreateXMeta(::sw::Meta & rMeta, + uno::Reference const& i_xParent, + ::std::auto_ptr pPortions) +{ + // re-use existing SwXMeta + // #i105557#: do not iterate over the registered clients: race condition + uno::Reference xMeta(rMeta.GetXMeta()); + if (xMeta.is()) + { + if (pPortions.get()) // set cache in the XMeta to the given portions + { + const uno::Reference xUT(xMeta, uno::UNO_QUERY); + SwXMeta *const pXMeta( + ::sw::UnoTunnelGetImplementation(xUT)); + OSL_ENSURE(pXMeta, "no pXMeta?"); + // NB: the meta must always be created with the complete content + // if SwXTextPortionEnumeration is created for a selection, + // it must be checked that the Meta is contained in the selection! + pXMeta->m_pImpl->m_pTextPortions = pPortions; + // ??? is this necessary? + if (pXMeta->m_pImpl->m_xParentText.get() != i_xParent.get()) + { + OSL_ENSURE(false, "SwXMeta with different parent?"); + pXMeta->m_pImpl->m_xParentText.set(i_xParent); + } + } + return xMeta; + } + + // create new SwXMeta + SwTxtNode * const pTxtNode( rMeta.GetTxtNode() ); + OSL_ENSURE(pTxtNode, "CreateXMeta: no text node?"); + if (!pTxtNode) { return 0; } + uno::Reference xParentText(i_xParent); + if (!xParentText.is()) + { + SwTxtMeta * const pTxtAttr( rMeta.GetTxtAttr() ); + OSL_ENSURE(pTxtAttr, "CreateXMeta: no text attr?"); + if (!pTxtAttr) { return 0; } + const SwPosition aPos(*pTxtNode, *pTxtAttr->GetStart()); + xParentText.set( + SwXTextRange::CreateParentXText(pTxtNode->GetDoc(), aPos) ); + } + if (!xParentText.is()) { return 0; } + SwXMeta *const pXMeta( (RES_TXTATR_META == rMeta.GetFmtMeta()->Which()) + ? new SwXMeta (pTxtNode->GetDoc(), &rMeta, xParentText, + pPortions.release()) // temporarily un-auto_ptr :-( + : new SwXMetaField(pTxtNode->GetDoc(), &rMeta, xParentText, + pPortions.release())); + // this is why the constructor is private: need to acquire pXMeta here + xMeta.set(pXMeta); + // in order to initialize the weak pointer cache in the core object + rMeta.SetXMeta(xMeta); + return xMeta; +} + + bool SwXMeta::SetContentRange( SwTxtNode *& rpNode, xub_StrLen & rStart, xub_StrLen & rEnd ) const { - ::sw::Meta const * const pMeta( GetMeta() ); + ::sw::Meta const * const pMeta( m_pImpl->GetMeta() ); if (pMeta) { SwTxtMeta const * const pTxtAttr( pMeta->GetTxtAttr() ); @@ -657,23 +758,6 @@ bool SwXMeta::SetContentRange( return false; } -SwXMeta::SwXMeta(SwDoc *const pDoc, - uno::Reference const& xParentText, - TextRangeList_t * const pPortions, SwTxtMeta * const pHint) - : m_pImpl( new SwXMeta::Impl(*this, *pDoc, xParentText, pPortions, pHint) ) -{ - if (pHint) - { - ::sw::Meta * const pMeta( - static_cast(pHint->GetAttr()).GetMeta() ); - ASSERT(pMeta, "SwXMeta: no meta?") - if (pMeta) - { - pMeta->Add(this); - } - } -} - bool SwXMeta::CheckForOwnMemberMeta(const SwXTextRange* const pRange, const SwPaM* const pPam, bool bAbsorb) throw (lang::IllegalArgumentException, uno::RuntimeException) @@ -744,16 +828,6 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwXTextRange* const pRange, return bForceExpandHints; } - -SwXMeta::SwXMeta(SwDoc *const pDoc) - : m_pImpl( new SwXMeta::Impl(*this, *pDoc, 0, 0, 0) ) -{ -} - -SwXMeta::~SwXMeta() -{ -} - const uno::Sequence< sal_Int8 > & SwXMeta::getUnoTunnelId() { static uno::Sequence< sal_Int8 > aSeq( ::CreateUnoTunnelId() ); @@ -765,14 +839,7 @@ sal_Int64 SAL_CALL SwXMeta::getSomething( const uno::Sequence< sal_Int8 > & i_rId ) throw (uno::RuntimeException) { - if ( i_rId.getLength() == 16 && - 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), - i_rId.getConstArray(), 16 ) ) - { - return sal::static_int_cast< sal_Int64 >( - reinterpret_cast< sal_IntPtr >(this) ); - } - return 0; + return ::sw::UnoTunnelImpl(i_rId, this); } // XServiceInfo @@ -782,21 +849,26 @@ SwXMeta::getImplementationName() throw (uno::RuntimeException) return C2U("SwXMeta"); } +static char const*const g_ServicesMeta[] = +{ + "com.sun.star.text.TextContent", + "com.sun.star.text.InContentMetadata", +}; +static const size_t g_nServicesMeta( + sizeof(g_ServicesMeta)/sizeof(g_ServicesMeta[0])); + sal_Bool SAL_CALL SwXMeta::supportsService(const ::rtl::OUString& rServiceName) throw (uno::RuntimeException) { - return rServiceName.equalsAscii("com.sun.star.text.TextContent") - || rServiceName.equalsAscii("com.sun.star.text.InContentMetadata"); + return ::sw::SupportsServiceImpl( + g_nServicesMeta, g_ServicesMeta, rServiceName); } uno::Sequence< ::rtl::OUString > SAL_CALL SwXMeta::getSupportedServiceNames() throw (uno::RuntimeException) { - uno::Sequence< ::rtl::OUString > aRet(2); - aRet[0] = C2U("com.sun.star.text.TextContent"); - aRet[1] = C2U("com.sun.star.text.InContentMetadata"); - return aRet; + return ::sw::GetSupportedServiceNamesImpl(g_nServicesMeta, g_ServicesMeta); } @@ -886,14 +958,10 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) C2S("SwXMeta::attach(): argument is no XUnoTunnel"), static_cast< ::cppu::OWeakObject* >(this), 0); } - SwXTextRange * const pRange( - reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( - SwXTextRange::getUnoTunnelId() ))) ); - OTextCursorHelper * const pCursor( pRange ? 0 : - reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( - OTextCursorHelper::getUnoTunnelId() ))) ); + SwXTextRange *const pRange( + ::sw::UnoTunnelGetImplementation(xRangeTunnel)); + OTextCursorHelper *const pCursor( (pRange) ? 0 : + ::sw::UnoTunnelGetImplementation(xRangeTunnel)); if (!pRange && !pCursor) { throw lang::IllegalArgumentException( @@ -945,7 +1013,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) static_cast< ::cppu::OWeakObject* >(this)); } - pMeta->Add(this); + pMeta->Add(m_pImpl.get()); + pMeta->SetXMeta(uno::Reference(this)); m_pImpl->m_xParentText = SwXTextRange::CreateParentXText(pDoc, *aPam.GetPoint()); @@ -1102,7 +1171,7 @@ SwXMeta::hasElements() throw (uno::RuntimeException) { vos::OGuard g(Application::GetSolarMutex()); - return GetRegisteredIn() ? sal_True : sal_False; + return m_pImpl->GetRegisteredIn() ? sal_True : sal_False; } // XEnumerationAccess @@ -1118,7 +1187,7 @@ SwXMeta::createEnumeration() throw (uno::RuntimeException) if (m_pImpl->m_bIsDescriptor) { throw uno::RuntimeException( - C2S("getAnchor(): not inserted"), + C2S("createEnumeration(): not inserted"), static_cast< ::cppu::OWeakObject* >(this)); } @@ -1147,12 +1216,12 @@ SwXMeta::createEnumeration() throw (uno::RuntimeException) // MetadatableMixin ::sfx2::Metadatable* SwXMeta::GetCoreObject() { - return const_cast< ::sw::Meta * >(GetMeta()); + return const_cast< ::sw::Meta * >(m_pImpl->GetMeta()); } uno::Reference SwXMeta::GetModel() { - ::sw::Meta const * const pMeta( GetMeta() ); + ::sw::Meta const * const pMeta( m_pImpl->GetMeta() ); if (pMeta) { SwTxtNode const * const pTxtNode( pMeta->GetTxtNode() ); @@ -1165,42 +1234,27 @@ uno::Reference SwXMeta::GetModel() return 0; } -// SwModify -void SwXMeta::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ) -{ - m_pImpl->m_pTextPortions.reset(); // throw away cache (SwTxtNode changed) - - ClientModify(this, pOld, pNew); - - if (!GetRegisteredIn()) // removed => dispose - { - m_pImpl->m_ListenerContainer.Disposing(); - m_pImpl->m_bIsDisposed = true; - m_pImpl->m_Text.Invalidate(); - } -} - /****************************************************************** * SwXMetaField ******************************************************************/ -inline const ::sw::MetaField * SwXMetaField::GetMetaField() const +inline const ::sw::MetaField * SwXMeta::Impl::GetMetaField() const { return static_cast< const ::sw::MetaField * >(GetRegisteredIn()); } -SwXMetaField::SwXMetaField(SwDoc *const pDoc, +SwXMetaField::SwXMetaField(SwDoc *const pDoc, ::sw::Meta *const pMeta, uno::Reference const& xParentText, - TextRangeList_t * const pPortions, SwTxtMeta * const pHint) - : SwXMetaFieldBaseClass(pDoc, xParentText, pPortions, pHint) + TextRangeList_t const*const pPortions) + : SwXMetaField_Base(pDoc, pMeta, xParentText, pPortions) { - ASSERT(!pHint || RES_TXTATR_METAFIELD == pHint->Which(), + ASSERT(pMeta && dynamic_cast< ::sw::MetaField* >(pMeta), "SwXMetaField created for wrong hint!"); } SwXMetaField::SwXMetaField(SwDoc *const pDoc) - : SwXMetaFieldBaseClass(pDoc) + : SwXMetaField_Base(pDoc) { } @@ -1215,23 +1269,28 @@ SwXMetaField::getImplementationName() throw (uno::RuntimeException) return C2U("SwXMetaField"); } +static char const*const g_ServicesMetaField[] = +{ + "com.sun.star.text.TextContent", + "com.sun.star.text.TextField", + "com.sun.star.text.textfield.MetadataField", +}; +static const size_t g_nServicesMetaField( + sizeof(g_ServicesMetaField)/sizeof(g_ServicesMetaField[0])); + sal_Bool SAL_CALL SwXMetaField::supportsService(const ::rtl::OUString& rServiceName) throw (uno::RuntimeException) { - return rServiceName.equalsAscii("com.sun.star.text.TextContent") - || rServiceName.equalsAscii("com.sun.star.text.TextField") - || rServiceName.equalsAscii("com.sun.star.text.textfield.MetadataField"); + return ::sw::SupportsServiceImpl( + g_nServicesMetaField, g_ServicesMetaField, rServiceName); } uno::Sequence< ::rtl::OUString > SAL_CALL SwXMetaField::getSupportedServiceNames() throw (uno::RuntimeException) { - uno::Sequence< ::rtl::OUString > aRet(3); - aRet[0] = C2U("com.sun.star.text.TextContent"); - aRet[1] = C2U("com.sun.star.text.TextField"); - aRet[2] = C2U("com.sun.star.text.textfield.MetadataField"); - return aRet; + return ::sw::GetSupportedServiceNamesImpl( + g_nServicesMetaField, g_ServicesMetaField); } // XComponent @@ -1293,7 +1352,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, vos::OGuard g(Application::GetSolarMutex()); ::sw::MetaField * const pMeta( - const_cast< ::sw::MetaField * >(GetMetaField()) ); + const_cast< ::sw::MetaField * >(m_pImpl->GetMetaField()) ); if (!pMeta) throw lang::DisposedException(); @@ -1326,7 +1385,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, { vos::OGuard g(Application::GetSolarMutex()); - ::sw::MetaField const * const pMeta( GetMetaField() ); + ::sw::MetaField const * const pMeta( m_pImpl->GetMetaField() ); if (!pMeta) throw lang::DisposedException(); -- cgit v1.2.3 From 0585ce5e4a0394d27cbf061f60a3bdc8a2697996 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:49 +0100 Subject: swunolocking1: #i105557#: fix locking for SwXReferenceMark: add Impl struct, and use UnoImplPtr to lock destructor. move all implementation details out of header, into Impl struct. disable broken SwClient iteration. add factory function CreateXReferenceMark. use new XUnoTunnel and XServiceInfo helpers. clean up the implementation a little. --- sw/inc/unorefmark.hxx | 41 +-- sw/source/core/unocore/unoclbck.cxx | 16 +- sw/source/core/unocore/unocoll.cxx | 14 +- sw/source/core/unocore/unorefmk.cxx | 516 ++++++++++++++++++++++-------------- 4 files changed, 336 insertions(+), 251 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unorefmark.hxx b/sw/inc/unorefmark.hxx index 8a37b5655e..61b6d09df0 100644 --- a/sw/inc/unorefmark.hxx +++ b/sw/inc/unorefmark.hxx @@ -40,16 +40,12 @@ #include -#include - -#include -#include +#include class SwDoc; -class SwPaM; +class SwModify; class SwFmtRefMark; -class SwXTextCursor; /* -----------------27.08.98 15:11------------------- @@ -65,41 +61,24 @@ typedef ::cppu::WeakImplHelper5 class SwXReferenceMark : public SwXReferenceMark_Base - , public SwClient { private: - SwEventListenerContainer aLstnrCntnr; - SwDoc* pDoc; - const SwFmtRefMark* pMark; - String sMarkName; - BOOL m_bIsDescriptor; - - BOOL IsValid() const {return 0 != GetRegisteredIn();} - void InsertRefMark( SwPaM& rPam, SwXTextCursor * pCursor ); + class Impl; + ::sw::UnoImplPtr m_pImpl; virtual ~SwXReferenceMark(); public: - SwXReferenceMark(SwDoc * pDoc, const SwFmtRefMark * pMark); - - void attachToRange( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange >& xTextRange) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - - const SwFmtRefMark* GetMark() const {return pMark;} - const String& GetMarkName() const {return sMarkName;} - SwDoc* GetDoc() const {return pDoc;} - void Invalidate(); - - TYPEINFO(); + SwXReferenceMark(SwDoc *const pDoc, const SwFmtRefMark *const pMark); - // SwClient - virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + static SwXReferenceMark * + CreateXReferenceMark(SwDoc & rDoc, SwFmtRefMark const& rMarkFmt); + /// may return 0 + static SwXReferenceMark * + GetReferenceMark(SwModify const& rUnoCB, SwFmtRefMark const& rMarkFmt); static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); diff --git a/sw/source/core/unocore/unoclbck.cxx b/sw/source/core/unocore/unoclbck.cxx index 27510e63b3..693aaf9674 100644 --- a/sw/source/core/unocore/unoclbck.cxx +++ b/sw/source/core/unocore/unoclbck.cxx @@ -64,21 +64,9 @@ SwUnoCallBack::~SwUnoCallBack() ---------------------------------------------------------------------------*/ SwXReferenceMark* SwUnoCallBack::GetRefMark(const SwFmtRefMark& rMark) { - SwClientIter aIter( *this ); - SwXReferenceMark* pxRefMark = (SwXReferenceMark*)aIter.First( TYPE( SwXReferenceMark )); - while(pxRefMark) - { - SwDoc* pDoc = pxRefMark->GetDoc(); - if(pDoc) - { - const SwFmtRefMark* pFmt = pDoc->GetRefMark(pxRefMark->GetMarkName()); - if(pFmt == &rMark) - return pxRefMark; - } - pxRefMark = (SwXReferenceMark*)aIter.Next( ); - } - return 0; + return SwXReferenceMark::GetReferenceMark(*this, rMark); } + /* -----------------------------05.09.00 12:38-------------------------------- ---------------------------------------------------------------------------*/ diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 60b6897e88..745d28165c 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -1946,18 +1946,10 @@ sal_Bool SwXReferenceMarks::hasElements(void) throw( uno::RuntimeException ) SwXReferenceMark* SwXReferenceMarks::GetObject( SwDoc* pDoc, const SwFmtRefMark* pMark ) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwClientIter aIter( *pDoc->GetUnoCallBack() ); - SwXReferenceMark* pxMark = (SwXReferenceMark*)aIter.First( TYPE( SwXReferenceMark )); - while(pxMark) - { - if(pxMark->GetMark() == pMark) - break; - pxMark = (SwXReferenceMark*)aIter.Next(); - } - if( !pxMark ) - pxMark = new SwXReferenceMark(pDoc, pMark); - return pxMark; + + return SwXReferenceMark::CreateXReferenceMark(*pDoc, *pMark); } + /****************************************************************** * ******************************************************************/ diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 18a72831f8..c1a59bddbb 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -47,6 +47,7 @@ #include #include + using namespace ::com::sun::star; using ::rtl::OUString; @@ -54,81 +55,191 @@ using ::rtl::OUString; * SwXReferenceMark ******************************************************************/ -/* -----------------------------13.03.00 12:15-------------------------------- +class SwXReferenceMark::Impl + : public SwClient +{ + +public: + SwEventListenerContainer m_ListenerContainer; + bool m_bIsDescriptor; + SwDoc * m_pDoc; + const SwFmtRefMark * m_pMarkFmt; + ::rtl::OUString m_sMarkName; + + Impl( SwXReferenceMark & rThis, + SwDoc *const pDoc, SwFmtRefMark const*const pRefMark) + : SwClient((pDoc) ? pDoc->GetUnoCallBack() : 0) + , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) + , m_bIsDescriptor(0 == pRefMark) + , m_pDoc(pDoc) + , m_pMarkFmt(pRefMark) + { + if (pRefMark) + { + m_sMarkName = pRefMark->GetRefName(); + } + } + + bool IsValid() const { return 0 != GetRegisteredIn(); } + void InsertRefMark( SwPaM & rPam, SwXTextCursor const*const pCursor ); + void Invalidate(); + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + +}; + +/* -----------------------------07.01.00 12:51-------------------------------- ---------------------------------------------------------------------------*/ -const uno::Sequence< sal_Int8 > & SwXReferenceMark::getUnoTunnelId() +void SwXReferenceMark::Impl::Invalidate() { - static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId(); - return aSeq; + if (IsValid()) + { + const_cast(GetRegisteredIn())->Remove(this); + } + m_ListenerContainer.Disposing(); + m_pDoc = 0; + m_pMarkFmt = 0; } -/* -----------------------------10.03.00 18:04-------------------------------- - ---------------------------------------------------------------------------*/ -sal_Int64 SAL_CALL SwXReferenceMark::getSomething( const uno::Sequence< sal_Int8 >& rId ) - throw(uno::RuntimeException) +/*-- 11.12.98 10:28:37--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void SwXReferenceMark::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) +{ + ClientModify(this, pOld, pNew); + + if (!GetRegisteredIn()) // removed => dispose + { + Invalidate(); + } + else if (pOld) + { + switch (pOld->Which()) + { + case RES_REFMARK_DELETED: + if (static_cast(m_pMarkFmt) == + static_cast(pOld)->pObject) + { + Invalidate(); + } + break; + } + } +} + + +/*-- 11.12.98 10:28:32--------------------------------------------------- + + -----------------------------------------------------------------------*/ +SwXReferenceMark::SwXReferenceMark( + SwDoc *const pDoc, SwFmtRefMark const*const pRefMark) + : m_pImpl( new SwXReferenceMark::Impl(*this, pDoc, pRefMark) ) +{ +} + +/*-- 11.12.98 10:28:33--------------------------------------------------- + + -----------------------------------------------------------------------*/ +SwXReferenceMark::~SwXReferenceMark() +{ +} + +SwXReferenceMark * +SwXReferenceMark::GetReferenceMark( + SwModify const& /*rUnoCB*/, SwFmtRefMark const& /*rMarkFmt*/) { - if( rId.getLength() == 16 - && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16 ) ) + // #i105557#: do not iterate over the registered clients: race condition + // to do this properly requires the SwXReferenceMark to register at the + // SwFmtRefMark directly, not at the unocallback +#if 0 + SwClientIter aIter( rUnoCB ); + SwXReferenceMark::Impl * pXMark = + static_cast( + aIter.First( TYPE( SwXReferenceMark::Impl ) )); + while (pXMark) { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); + if (pXMark->m_pMarkFmt == &rMarkFmt) + { + return &pXMark->m_rThis; + } + pXMark = static_cast(aIter.Next()); } +#endif return 0; } -/* -----------------------------06.04.00 16:41-------------------------------- + +SwXReferenceMark * +SwXReferenceMark::CreateXReferenceMark( + SwDoc & rDoc, SwFmtRefMark const& rMarkFmt) +{ + SwXReferenceMark *const pXMark( + GetReferenceMark(*rDoc.GetUnoCallBack(), rMarkFmt) ); + return (pXMark) + ? pXMark + : new SwXReferenceMark(&rDoc, &rMarkFmt); +} + +/* -----------------------------13.03.00 12:15-------------------------------- ---------------------------------------------------------------------------*/ -OUString SwXReferenceMark::getImplementationName(void) throw( uno::RuntimeException ) +const uno::Sequence< sal_Int8 > & SwXReferenceMark::getUnoTunnelId() { - return C2U("SwXReferenceMark"); + static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId(); + return aSeq; } -/* -----------------------------06.04.00 16:41-------------------------------- +/* -----------------------------10.03.00 18:04-------------------------------- ---------------------------------------------------------------------------*/ -BOOL SwXReferenceMark::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) +sal_Int64 SAL_CALL +SwXReferenceMark::getSomething(const uno::Sequence< sal_Int8 >& rId) +throw (uno::RuntimeException) { - return !rServiceName.compareToAscii("com.sun.star.text.ReferenceMark")|| - !rServiceName.compareToAscii("com.sun.star.text.TextContent"); + return ::sw::UnoTunnelImpl(rId, this); } /* -----------------------------06.04.00 16:41-------------------------------- ---------------------------------------------------------------------------*/ -uno::Sequence< OUString > SwXReferenceMark::getSupportedServiceNames(void) throw( uno::RuntimeException ) +OUString SAL_CALL SwXReferenceMark::getImplementationName() +throw (uno::RuntimeException) { - uno::Sequence< OUString > aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.ReferenceMark"); - pArray[1] = C2U("com.sun.star.text.TextContent"); - return aRet; + return C2U("SwXReferenceMark"); } -/*-- 11.12.98 10:28:32--------------------------------------------------- +/* -----------------------------06.04.00 16:41-------------------------------- - -----------------------------------------------------------------------*/ -TYPEINIT1(SwXReferenceMark, SwClient); + ---------------------------------------------------------------------------*/ +static char const*const g_ServicesReferenceMark[] = +{ + "com.sun.star.text.TextContent", + "com.sun.star.text.ReferenceMark", +}; +static const size_t g_nServicesReferenceMark( + sizeof(g_ServicesReferenceMark)/sizeof(g_ServicesReferenceMark[0])); -SwXReferenceMark::SwXReferenceMark(SwDoc* pDc, const SwFmtRefMark* pRefMark) : - aLstnrCntnr( (text::XTextContent*)this), - pDoc(pDc), - pMark(pRefMark), - m_bIsDescriptor(0 == pRefMark) +sal_Bool SAL_CALL +SwXReferenceMark::supportsService(const OUString& rServiceName) +throw (uno::RuntimeException) { - if(pRefMark) - sMarkName = pRefMark->GetRefName(); - if(pDoc) - pDoc->GetUnoCallBack()->Add(this); + return ::sw::SupportsServiceImpl( + g_nServicesReferenceMark, g_ServicesReferenceMark, rServiceName); } -/*-- 11.12.98 10:28:33--------------------------------------------------- +/* -----------------------------06.04.00 16:41-------------------------------- - -----------------------------------------------------------------------*/ -SwXReferenceMark::~SwXReferenceMark() + ---------------------------------------------------------------------------*/ +uno::Sequence< OUString > SAL_CALL +SwXReferenceMark::getSupportedServiceNames() +throw (uno::RuntimeException) { - + return ::sw::GetSupportedServiceNamesImpl( + g_nServicesReferenceMark, g_ServicesReferenceMark); } + /* -----------------03.11.99 14:14------------------- --------------------------------------------------*/ -void SwXReferenceMark::InsertRefMark(SwPaM& rPam, SwXTextCursor * pCursor) +void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam, + SwXTextCursor const*const pCursor) { //! in some cases when this function is called the pDoc pointer member may have become //! invalid/deleted thus we obtain the document pointer from rPaM where it should always @@ -136,12 +247,8 @@ void SwXReferenceMark::InsertRefMark(SwPaM& rPam, SwXTextCursor * pCursor) SwDoc *pDoc2 = rPam.GetDoc(); UnoActionContext aCont(pDoc2); - SwTxtAttr* pTxtAttr = 0; - SwFmtRefMark aRefMark(sMarkName); -// SfxItemSet aSet(pDoc2->GetAttrPool(), RES_TXTATR_REFMARK, RES_TXTATR_REFMARK, 0L); -// aSet.Put(aRefMark); + SwFmtRefMark aRefMark(m_sMarkName); sal_Bool bMark = *rPam.GetPoint() != *rPam.GetMark(); -// SwXTextCursor::SetCrsrAttr(rPam, aSet, 0); const bool bForceExpandHints( (!bMark && pCursor) ? pCursor->IsAtEndOfMeta() : false ); @@ -153,290 +260,309 @@ void SwXReferenceMark::InsertRefMark(SwPaM& rPam, SwXTextCursor * pCursor) pDoc2->InsertPoolItem( rPam, aRefMark, nInsertFlags ); if( bMark && *rPam.GetPoint() > *rPam.GetMark()) - rPam.Exchange(); - - if( bMark ) - pTxtAttr = rPam.GetNode()->GetTxtNode()->GetTxtAttr( - rPam.GetPoint()->nContent, RES_TXTATR_REFMARK ); - else { - pTxtAttr = rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt( - rPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_REFMARK ); + rPam.Exchange(); } + SwTxtAttr *const pTxtAttr = (bMark) + ? rPam.GetNode()->GetTxtNode()->GetTxtAttr( + rPam.GetPoint()->nContent, RES_TXTATR_REFMARK) + : rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt( + rPam.GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_REFMARK); + if(pTxtAttr) - pMark = &pTxtAttr->GetRefMark(); + { + m_pMarkFmt = &pTxtAttr->GetRefMark(); + } pDoc2->GetUnoCallBack()->Add(this); } -/* -----------------18.02.99 13:33------------------- - * - * --------------------------------------------------*/ -void SwXReferenceMark::attachToRange(const uno::Reference< text::XTextRange > & xTextRange) - throw( lang::IllegalArgumentException, uno::RuntimeException ) +/*-- 11.12.98 10:28:34--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void SAL_CALL +SwXReferenceMark::attach(const uno::Reference< text::XTextRange > & xTextRange) +throw (lang::IllegalArgumentException, uno::RuntimeException) { - if(!m_bIsDescriptor) + vos::OGuard aGuard(Application::GetSolarMutex()); + + if (!m_pImpl->m_bIsDescriptor) + { throw uno::RuntimeException(); + } uno::Reference xRangeTunnel( xTextRange, uno::UNO_QUERY); SwXTextRange* pRange = 0; OTextCursorHelper* pCursor = 0; if(xRangeTunnel.is()) { - pRange = reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) )); - pCursor = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); + pRange = ::sw::UnoTunnelGetImplementation(xRangeTunnel); + pCursor = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); } - SwDoc* pDocument = pRange ? (SwDoc*)pRange->GetDoc() : pCursor ? (SwDoc*)pCursor->GetDoc() : 0; - if(pDocument) + SwDoc *const pDocument = + (pRange) ? pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : 0); + if (!pDocument) { - SwUnoInternalPaM aPam(*pDocument); - //das muss jetzt sal_True liefern - SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange); - InsertRefMark(aPam, dynamic_cast(pCursor)); - m_bIsDescriptor = sal_False; - pDoc = pDocument; - pDoc->GetUnoCallBack()->Add(this); - } - else throw lang::IllegalArgumentException(); -} -/*-- 11.12.98 10:28:34--------------------------------------------------- + } - -----------------------------------------------------------------------*/ -void SwXReferenceMark::attach(const uno::Reference< text::XTextRange > & xTextRange) - throw( lang::IllegalArgumentException, uno::RuntimeException ) -{ - vos::OGuard aGuard(Application::GetSolarMutex()); - attachToRange( xTextRange ); + SwUnoInternalPaM aPam(*pDocument); + //das muss jetzt sal_True liefern + SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange); + m_pImpl->InsertRefMark(aPam, dynamic_cast(pCursor)); + m_pImpl->m_bIsDescriptor = sal_False; + m_pImpl->m_pDoc = pDocument; + m_pImpl->m_pDoc->GetUnoCallBack()->Add(m_pImpl.get()); } + /*-- 11.12.98 10:28:34--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextRange > SwXReferenceMark::getAnchor(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextRange > SAL_CALL +SwXReferenceMark::getAnchor() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextRange > xRet; - if(IsValid()) + + if (m_pImpl->IsValid()) { - const SwFmtRefMark* pNewMark = pDoc->GetRefMark(sMarkName); - if(pNewMark && pNewMark == pMark) + SwFmtRefMark const*const pNewMark = + m_pImpl->m_pDoc->GetRefMark(m_pImpl->m_sMarkName); + if (pNewMark && (pNewMark == m_pImpl->m_pMarkFmt)) { - const SwTxtRefMark* pTxtMark = pMark->GetTxtRefMark(); - if(pTxtMark && - &pTxtMark->GetTxtNode().GetNodes() == &pDoc->GetNodes()) + SwTxtRefMark const*const pTxtMark = + m_pImpl->m_pMarkFmt->GetTxtRefMark(); + if (pTxtMark && + (&pTxtMark->GetTxtNode().GetNodes() == + &m_pImpl->m_pDoc->GetNodes())) { - SwTxtNode& rTxtNode = (SwTxtNode&)pTxtMark->GetTxtNode(); - SwPaM* pPam = pTxtMark->GetEnd() ? - new SwPaM( rTxtNode, *pTxtMark->GetEnd(), - rTxtNode, *pTxtMark->GetStart()) : - new SwPaM( rTxtNode, *pTxtMark->GetStart()); - - - xRet = SwXTextRange::CreateTextRangeFromPosition(pDoc, - *pPam->Start(), pPam->End()); - delete pPam; + SwTxtNode const& rTxtNode = pTxtMark->GetTxtNode(); + const ::std::auto_ptr pPam( (pTxtMark->GetEnd()) + ? new SwPaM( rTxtNode, *pTxtMark->GetEnd(), + rTxtNode, *pTxtMark->GetStart()) + : new SwPaM( rTxtNode, *pTxtMark->GetStart()) ); + + return SwXTextRange::CreateTextRangeFromPosition( + m_pImpl->m_pDoc, *pPam->Start(), pPam->End()); } } } - return xRet; + return 0; } /*-- 11.12.98 10:28:35--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXReferenceMark::dispose(void) throw( uno::RuntimeException ) +void SAL_CALL SwXReferenceMark::dispose() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(IsValid()) + if (m_pImpl->IsValid()) { - const SwFmtRefMark* pNewMark = pDoc->GetRefMark(sMarkName); - if(pNewMark && pNewMark == pMark) + SwFmtRefMark const*const pNewMark = + m_pImpl->m_pDoc->GetRefMark(m_pImpl->m_sMarkName); + if (pNewMark && (pNewMark == m_pImpl->m_pMarkFmt)) { - const SwTxtRefMark* pTxtMark = pMark->GetTxtRefMark(); - if(pTxtMark && - &pTxtMark->GetTxtNode().GetNodes() == &pDoc->GetNodes()) + SwTxtRefMark const*const pTxtMark = + m_pImpl->m_pMarkFmt->GetTxtRefMark(); + if (pTxtMark && + (&pTxtMark->GetTxtNode().GetNodes() == + &m_pImpl->m_pDoc->GetNodes())) { - SwTxtNode& rTxtNode = (SwTxtNode&)pTxtMark->GetTxtNode(); + SwTxtNode const& rTxtNode = pTxtMark->GetTxtNode(); xub_StrLen nStt = *pTxtMark->GetStart(), nEnd = pTxtMark->GetEnd() ? *pTxtMark->GetEnd() : nStt + 1; SwPaM aPam( rTxtNode, nStt, rTxtNode, nEnd ); - pDoc->DeleteAndJoin( aPam ); + m_pImpl->m_pDoc->DeleteAndJoin( aPam ); } } } - else - throw uno::RuntimeException(); + else if (m_pImpl->m_bIsDescriptor) + { + m_pImpl->Invalidate(); + } } /*-- 11.12.98 10:28:35--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXReferenceMark::addEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException ) +void SAL_CALL SwXReferenceMark::addEventListener( + const uno::Reference< lang::XEventListener > & xListener) +throw (uno::RuntimeException) { - if(!GetRegisteredIn()) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->IsValid()) + { throw uno::RuntimeException(); - aLstnrCntnr.AddListener(aListener); + } + m_pImpl->m_ListenerContainer.AddListener(xListener); } /*-- 11.12.98 10:28:35--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXReferenceMark::removeEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException ) +void SAL_CALL SwXReferenceMark::removeEventListener( + const uno::Reference< lang::XEventListener > & xListener) +throw (uno::RuntimeException) { - if(!GetRegisteredIn() || !aLstnrCntnr.RemoveListener(aListener)) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->IsValid() || + !m_pImpl->m_ListenerContainer.RemoveListener(xListener)) + { throw uno::RuntimeException(); + } } /*-- 11.12.98 10:28:36--------------------------------------------------- -----------------------------------------------------------------------*/ -OUString SwXReferenceMark::getName(void) throw( uno::RuntimeException ) +OUString SAL_CALL SwXReferenceMark::getName() +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(!IsValid() || !pDoc->GetRefMark(sMarkName)) + if (!m_pImpl->IsValid() || + !m_pImpl->m_pDoc->GetRefMark(m_pImpl->m_sMarkName)) { throw uno::RuntimeException(); } - return sMarkName; + return m_pImpl->m_sMarkName; } /*-- 11.12.98 10:28:36--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXReferenceMark::setName(const OUString& Name_) throw( uno::RuntimeException ) +void SAL_CALL SwXReferenceMark::setName(const OUString& rName) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(m_bIsDescriptor) - sMarkName = String(Name_); + if (m_pImpl->m_bIsDescriptor) + { + m_pImpl->m_sMarkName = rName; + } else { - String sNewName(Name_); - if(!IsValid() || !pDoc->GetRefMark(sMarkName) || pDoc->GetRefMark(sNewName)) + if (!m_pImpl->IsValid() + || !m_pImpl->m_pDoc->GetRefMark(m_pImpl->m_sMarkName) + || m_pImpl->m_pDoc->GetRefMark(rName)) { throw uno::RuntimeException(); } - const SwFmtRefMark* pCurMark = pDoc->GetRefMark(sMarkName); - if(sNewName != sMarkName && pCurMark && pCurMark == pMark) + SwFmtRefMark const*const pCurMark = + m_pImpl->m_pDoc->GetRefMark(m_pImpl->m_sMarkName); + if ((rName != m_pImpl->m_sMarkName) + && pCurMark && (pCurMark == m_pImpl->m_pMarkFmt)) { - UnoActionContext aCont(pDoc); - const SwTxtRefMark* pTxtMark = pMark->GetTxtRefMark(); - if(pTxtMark && - &pTxtMark->GetTxtNode().GetNodes() == &pDoc->GetNodes()) + const UnoActionContext aCont(m_pImpl->m_pDoc); + SwTxtRefMark const*const pTxtMark = + m_pImpl->m_pMarkFmt->GetTxtRefMark(); + if (pTxtMark && + (&pTxtMark->GetTxtNode().GetNodes() == + &m_pImpl->m_pDoc->GetNodes())) { - SwTxtNode& rTxtNode = (SwTxtNode&)pTxtMark->GetTxtNode(); + SwTxtNode const& rTxtNode = pTxtMark->GetTxtNode(); xub_StrLen nStt = *pTxtMark->GetStart(), nEnd = pTxtMark->GetEnd() ? *pTxtMark->GetEnd() : nStt + 1; SwPaM aPam( rTxtNode, nStt, rTxtNode, nEnd ); - pDoc->DeleteAndJoin( aPam ); //! deletes the pDoc member in the SwXReferenceMark - //! The aPam will keep the correct and functional doc though + // deletes the m_pImpl->m_pDoc member in the SwXReferenceMark! + m_pImpl->m_pDoc->DeleteAndJoin( aPam ); + // The aPam will keep the correct and functional doc though - sMarkName = sNewName; + m_pImpl->m_sMarkName = rName; //create a new one - InsertRefMark( aPam, 0 ); - pDoc = aPam.GetDoc(); + m_pImpl->InsertRefMark( aPam, 0 ); + m_pImpl->m_pDoc = aPam.GetDoc(); } } } } -/* -----------------------------07.01.00 12:51-------------------------------- - - ---------------------------------------------------------------------------*/ -void SwXReferenceMark::Invalidate() -{ - if(GetRegisteredIn()) - { - ((SwModify*)GetRegisteredIn())->Remove(this); - aLstnrCntnr.Disposing(); - pDoc = 0; - pMark = 0; - } -} -/*-- 11.12.98 10:28:37--------------------------------------------------- - - -----------------------------------------------------------------------*/ -void SwXReferenceMark::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew) -{ - switch( pOld ? pOld->Which() : 0 ) - { - case RES_REMOVE_UNO_OBJECT: - case RES_OBJECTDYING: - if( (void*)GetRegisteredIn() == ((SwPtrMsgPoolItem *)pOld)->pObject ) - Invalidate(); - break; - case RES_FMT_CHG: - // wurden wir an das neue umgehaengt und wird das alte geloscht? - if( ((SwFmtChg*)pNew)->pChangedFmt == GetRegisteredIn() && - ((SwFmtChg*)pOld)->pChangedFmt->IsFmtInDTOR() ) - Invalidate(); - break; - case RES_REFMARK_DELETED: - if( (void*)pMark == ((SwPtrMsgPoolItem *)pOld)->pObject ) - Invalidate(); - break; - } -} /*-- 12.09.00 12:58:20--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< beans::XPropertySetInfo > SwXReferenceMark::getPropertySetInfo( ) throw(uno::RuntimeException) +uno::Reference< beans::XPropertySetInfo > SAL_CALL +SwXReferenceMark::getPropertySetInfo() throw (uno::RuntimeException) { + vos::OGuard g(Application::GetSolarMutex()); + static uno::Reference< beans::XPropertySetInfo > xRef = - aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH_EXTENSIONS)->getPropertySetInfo(); + aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH_EXTENSIONS) + ->getPropertySetInfo(); return xRef; } /*-- 12.09.00 12:58:20--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXReferenceMark::setPropertyValue( +void SAL_CALL SwXReferenceMark::setPropertyValue( const OUString& /*rPropertyName*/, const uno::Any& /*rValue*/ ) - throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) +throw (beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException) { throw lang::IllegalArgumentException(); } /*-- 12.09.00 12:58:20--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXReferenceMark::getPropertyValue( const OUString& rPropertyName ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) +uno::Any SAL_CALL +SwXReferenceMark::getPropertyValue(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { + // does not seem to need SolarMutex uno::Any aRet; if(!SwXParagraph::getDefaultTextContentValue(aRet, rPropertyName)) + { throw beans::UnknownPropertyException(); + } return aRet; } /*-- 12.09.00 12:58:20--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXReferenceMark::addPropertyChangeListener( - const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) +void SAL_CALL SwXReferenceMark::addPropertyChangeListener( + const OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { + OSL_ENSURE(false, + "SwXReferenceMark::addPropertyChangeListener(): not implemented"); } /*-- 12.09.00 12:58:20--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXReferenceMark::removePropertyChangeListener( - const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) +void SAL_CALL SwXReferenceMark::removePropertyChangeListener( + const OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { + OSL_ENSURE(false, + "SwXReferenceMark::removePropertyChangeListener(): not implemented"); } /*-- 12.09.00 12:58:20--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXReferenceMark::addVetoableChangeListener( const OUString& /*rPropertyName*/, - const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/ ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) +void SAL_CALL SwXReferenceMark::addVetoableChangeListener( + const OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { + OSL_ENSURE(false, + "SwXReferenceMark::addVetoableChangeListener(): not implemented"); } /*-- 12.09.00 12:58:21--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXReferenceMark::removeVetoableChangeListener( - const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/ ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) +void SAL_CALL SwXReferenceMark::removeVetoableChangeListener( + const OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { + OSL_ENSURE(false, + "SwXReferenceMark::removeVetoableChangeListener(): not implemented"); } #include -- cgit v1.2.3 From acaa72a16f3ed3c69734e9afb144bbf2bb59204f Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:50 +0100 Subject: swunolocking1: #i105557#: fix locking for SwXBookmark: add Impl struct, and use UnoImplPtr to lock destructor. move all implementation details out of header, into Impl struct. replace broken SwClient iteration with a WeakReference in sw::mark::MarkBase. make constructor protected, and add factory function CreateXBookmark. use new XUnoTunnel and XServiceInfo helpers. clean up the implementation a little. remove SwXBookmarks::GetObject(). --- sw/inc/unobookmark.hxx | 48 ++-- sw/inc/unocoll.hxx | 1 - sw/source/core/crsr/bookmrk.cxx | 30 +-- sw/source/core/inc/bookmrk.hxx | 24 +- sw/source/core/unocore/unobkm.cxx | 480 ++++++++++++++++++++++----------- sw/source/core/unocore/unocoll.cxx | 31 +-- sw/source/core/unocore/unoportenum.cxx | 15 +- sw/source/ui/uno/unotxvw.cxx | 17 +- 8 files changed, 399 insertions(+), 247 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unobookmark.hxx b/sw/inc/unobookmark.hxx index 2b16d78280..46d0054551 100644 --- a/sw/inc/unobookmark.hxx +++ b/sw/inc/unobookmark.hxx @@ -41,12 +41,10 @@ #include -#include #include +#include #include -#include -#include class SwDoc; @@ -63,33 +61,15 @@ typedef ::cppu::ImplInheritanceHelper5 class SwXBookmark : public SwXBookmark_Base - , private SwClient { private: - SwEventListenerContainer m_aLstnrCntnr; - SwDoc* m_pDoc; - String m_aName; - ::sw::mark::IMark* m_pRegisteredBookmark; - - void registerInMark(::sw::mark::IMark* const pBkmk); + class Impl; + ::sw::UnoImplPtr m_pImpl; protected: - virtual ~SwXBookmark(); - -public: - - SwXBookmark(::sw::mark::IMark* pMark = 0, SwDoc* pDoc = 0); - - const ::sw::mark::IMark* GetBookmark() const - { return m_pRegisteredBookmark; } - ::sw::mark::IMark* GetBookmark() - { return m_pRegisteredBookmark; } - SwDoc* GetDoc() - { return m_pDoc; } - void attachToRangeEx( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange, @@ -102,10 +82,26 @@ public: throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - TYPEINFO(); + const ::sw::mark::IMark* GetBookmark() const; - // SwClient - virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ); + virtual ~SwXBookmark(); + + /// @param pDoc and pMark != 0, but not & because of ImplInheritanceHelper + SwXBookmark(::sw::mark::IMark *const pMark, SwDoc *const pDoc); + +public: + + /// descriptor + SwXBookmark(); + + static ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextContent> + CreateXBookmark(SwDoc & rDoc, ::sw::mark::IMark & rBookmark); + + /// @return IMark for this, but only if it lives in pDoc + static ::sw::mark::IMark const* GetBookmarkInDoc(SwDoc const*const pDoc, + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XUnoTunnel> & xUT); // MetadatableMixin virtual ::sfx2::Metadatable* GetCoreObject(); diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx index a1d5139897..8a90e6541a 100644 --- a/sw/inc/unocoll.hxx +++ b/sw/inc/unocoll.hxx @@ -481,7 +481,6 @@ class SwXBookmarks : public SwCollectionBaseClass, virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - static SwXBookmark* GetObject( ::sw::mark::IMark& rBkm, SwDoc* pDoc); }; class SwXNumberingRulesCollection : public cppu::WeakImplHelper1 diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index b9b7a017fb..403daf4db3 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -49,6 +49,7 @@ SV_IMPL_REF( SwServerObject ) using namespace ::sw::mark; +using namespace ::com::sun::star; namespace { @@ -147,6 +148,16 @@ namespace sw { namespace mark return aResult.append(nCount++).append(sUniquePostfix).makeStringAndClear(); } + // SwClient + void MarkBase::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) + { + SwModify::Modify(pOld, pNew); + if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which())) + { // invalidate cached uno object + SetXBookmark(uno::Reference(0)); + } + } + NavigatorReminder::NavigatorReminder(const SwPaM& rPaM) : MarkBase(rPaM, our_sNamePrefix) @@ -240,24 +251,13 @@ namespace sw { namespace mark return !pDoc->IsInHeaderFooter( SwNodeIndex(GetMarkPos().nNode) ); } - ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XMetadatable > - Bookmark::MakeUnoObject() + uno::Reference< rdf::XMetadatable > Bookmark::MakeUnoObject() { - // re-use existing SwXBookmark - SwClientIter iter( *this ); - SwClient * pClient( iter.First( TYPE( SwXBookmark ) ) ); - while (pClient) { - SwXBookmark *const pBookmark( dynamic_cast(pClient) ); - if (pBookmark && pBookmark->GetCoreObject() == this) { - return pBookmark; - } - pClient = iter.Next(); - } - - // create new SwXBookmark SwDoc *const pDoc( GetMarkPos().GetDoc() ); OSL_ENSURE(pDoc, "Bookmark::MakeUnoObject: no doc?"); - return new SwXBookmark(this, pDoc); + const uno::Reference< rdf::XMetadatable> xMeta( + SwXBookmark::CreateXBookmark(*pDoc, *this), uno::UNO_QUERY); + return xMeta; } diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx index 415deffa24..c281e69b18 100644 --- a/sw/source/core/inc/bookmrk.hxx +++ b/sw/source/core/inc/bookmrk.hxx @@ -31,12 +31,20 @@ #ifndef _BOOKMRK_HXX #define _BOOKMRK_HXX -#include +#include + #include #include #include +#include + + +namespace com { namespace sun { namespace star { + namespace text { class XTextContent; } +} } } + struct SwPosition; // fwd Decl. wg. UI class SwDoc; @@ -90,6 +98,17 @@ namespace sw { namespace mark {} virtual ~MarkBase(); + + // SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ); + + const ::com::sun::star::uno::WeakReference< + ::com::sun::star::text::XTextContent> & GetXBookmark() const + { return m_wXBookmark; } + void SetXBookmark(::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextContent> const& xBkmk) + { m_wXBookmark = xBkmk; } + protected: MarkBase(const SwPaM& rPaM, const ::rtl::OUString& rName); @@ -97,6 +116,9 @@ namespace sw { namespace mark ::boost::scoped_ptr m_pPos2; ::rtl::OUString m_aName; static ::rtl::OUString GenerateNewName(const ::rtl::OUString& rPrefix); + + ::com::sun::star::uno::WeakReference< + ::com::sun::star::text::XTextContent> m_wXBookmark; }; class NavigatorReminder diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index a22eb8a2b1..24d1ccd7d6 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -34,11 +34,13 @@ #include #include #include + #include #include #include #include #include +#include #include #include #include @@ -52,13 +54,8 @@ using namespace ::com::sun::star; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::text; -using namespace ::com::sun::star::container; -using namespace ::com::sun::star::beans; using ::rtl::OUString; -using ::rtl::OUStringBuffer; + namespace { @@ -66,7 +63,7 @@ namespace { static const OUString sStart = OUString(String(SW_RES(STR_START_QUOTE))); static const OUString sEnd = OUString(String(SW_RES(STR_END_QUOTE))); - OUStringBuffer sBuf(64); + ::rtl::OUStringBuffer sBuf(64); return sBuf.append(sStart).append(rName).append(sEnd).makeStringAndClear(); } } @@ -74,184 +71,307 @@ namespace /****************************************************************** * SwXBookmark ******************************************************************/ -TYPEINIT1(SwXBookmark, SwClient) -void SwXBookmark::registerInMark(::sw::mark::IMark* const pBkmk) +class SwXBookmark::Impl + : public SwClient +{ + +public: + SwEventListenerContainer m_ListenerContainer; + SwDoc * m_pDoc; + ::sw::mark::IMark * m_pRegisteredBookmark; + ::rtl::OUString m_sMarkName; + + + Impl( SwXBookmark & rThis, + SwDoc *const pDoc, ::sw::mark::IMark *const /*pBookmark*/) + : SwClient() + , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) + , m_pDoc(pDoc) + , m_pRegisteredBookmark(0) + { + // DO NOT regiserInMark here! (because SetXBookmark would delete rThis) + } + + void registerInMark(SwXBookmark & rThis, ::sw::mark::IMark *const pBkmk); + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + +}; + +void SwXBookmark::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) +{ + ClientModify(this, pOld, pNew); + if (!GetRegisteredIn()) + { + m_pRegisteredBookmark = NULL; + m_pDoc = NULL; + m_ListenerContainer.Disposing(); + } +} + +void SwXBookmark::Impl::registerInMark(SwXBookmark & rThis, + ::sw::mark::IMark *const pBkmk) { if (pBkmk) { pBkmk->Add(this); + ::sw::mark::MarkBase *const pMarkBase( + dynamic_cast< ::sw::mark::MarkBase * >(pBkmk)); + OSL_ENSURE(pMarkBase, "registerInMark: no MarkBase?"); + if (pMarkBase) + { + const uno::Reference xBookmark(& rThis); + pMarkBase->SetXBookmark(xBookmark); + } } else if (m_pRegisteredBookmark) { - m_aName = m_pRegisteredBookmark->GetName(); + m_sMarkName = m_pRegisteredBookmark->GetName(); m_pRegisteredBookmark->Remove(this); } m_pRegisteredBookmark = pBkmk; } -const uno::Sequence< sal_Int8 > & SwXBookmark::getUnoTunnelId() + +const ::sw::mark::IMark* SwXBookmark::GetBookmark() const { - static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId(); - return aSeq; + return m_pImpl->m_pRegisteredBookmark; } -sal_Int64 SAL_CALL SwXBookmark::getSomething( const uno::Sequence< sal_Int8 >& rId ) - throw(uno::RuntimeException) +SwXBookmark::SwXBookmark(::sw::mark::IMark *const pBkmk, SwDoc *const pDoc) + : m_pImpl( new SwXBookmark::Impl(*this, pDoc, pBkmk) ) { - if( rId.getLength() == 16 - && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) +} + +SwXBookmark::SwXBookmark() + : m_pImpl( new SwXBookmark::Impl(*this, 0, 0) ) +{ +} + +SwXBookmark::~SwXBookmark() +{ +} + +uno::Reference +SwXBookmark::CreateXBookmark(SwDoc & rDoc, ::sw::mark::IMark & rBookmark) +{ + // #i105557#: do not iterate over the registered clients: race condition + ::sw::mark::MarkBase *const pMarkBase( + dynamic_cast< ::sw::mark::MarkBase * >(&rBookmark)); + OSL_ENSURE(pMarkBase, "CreateXBookmark: no MarkBase?"); + if (!pMarkBase) { return 0; } + uno::Reference xBookmark(pMarkBase->GetXBookmark()); + if (!xBookmark.is()) { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); + // FIXME: These belong in XTextFieldsSupplier + //if (dynamic_cast< ::sw::mark::TextFieldmark* >(&rBkmk)) + // pXBkmk = new SwXFieldmark(false, &rBkmk, pDoc); + //else if (dynamic_cast< ::sw::mark::CheckboxFieldmark* >(&rBkmk)) + // pXBkmk = new SwXFieldmark(true, &rBkmk, pDoc); + //else + OSL_ENSURE( + dynamic_cast< ::sw::mark::IBookmark* >(&rBookmark), + "" + "SwXBookmark requested for non-bookmark mark."); + SwXBookmark *const pXBookmark = new SwXBookmark(&rBookmark, &rDoc); + xBookmark.set(pXBookmark); + pXBookmark->m_pImpl->registerInMark(*pXBookmark, pMarkBase); + } + return xBookmark; +} + +::sw::mark::IMark const* SwXBookmark::GetBookmarkInDoc(SwDoc const*const pDoc, + const uno::Reference< lang::XUnoTunnel> & xUT) +{ + SwXBookmark *const pXBkm( + ::sw::UnoTunnelGetImplementation(xUT)); + if (pXBkm && (pDoc == pXBkm->m_pImpl->m_pDoc)) + { + return pXBkm->m_pImpl->m_pRegisteredBookmark; } return 0; } -SwXBookmark::SwXBookmark(::sw::mark::IMark* pBkmk, SwDoc* pDoc) - : m_aLstnrCntnr((text::XTextContent*)this) - , m_pDoc(pDoc) - , m_pRegisteredBookmark(NULL) +const uno::Sequence< sal_Int8 > & SwXBookmark::getUnoTunnelId() { - registerInMark(pBkmk); + static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId(); + return aSeq; } -SwXBookmark::~SwXBookmark() -{ } +sal_Int64 SAL_CALL +SwXBookmark::getSomething(const uno::Sequence< sal_Int8 >& rId) +throw (uno::RuntimeException) +{ + return ::sw::UnoTunnelImpl(rId, this); +} void SwXBookmark::attachToRangeEx( const uno::Reference< text::XTextRange > & xTextRange, IDocumentMarkAccess::MarkType eType) - throw(lang::IllegalArgumentException, uno::RuntimeException) +throw (lang::IllegalArgumentException, uno::RuntimeException) { - if(m_pRegisteredBookmark) + if (m_pImpl->m_pRegisteredBookmark) + { throw uno::RuntimeException(); + } - uno::Reference xRangeTunnel( xTextRange, uno::UNO_QUERY); + const uno::Reference xRangeTunnel( + xTextRange, uno::UNO_QUERY); SwXTextRange* pRange = 0; OTextCursorHelper* pCursor = 0; if(xRangeTunnel.is()) { + pRange = ::sw::UnoTunnelGetImplementation(xRangeTunnel); + pCursor = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); + } - pRange = reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId() ))); - pCursor = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); + SwDoc *const pDoc = + (pRange) ? pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : 0); + if (!pDoc) + { + throw lang::IllegalArgumentException(); } - SwDoc* pDc = pRange ? (SwDoc*)pRange->GetDoc() : pCursor ? - (SwDoc*)pCursor->GetDoc() : 0; - if(pDc) + m_pImpl->m_pDoc = pDoc; + SwUnoInternalPaM aPam(*m_pImpl->m_pDoc); + SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange); + UnoActionContext aCont(m_pImpl->m_pDoc); + if (!m_pImpl->m_sMarkName.getLength()) { - m_pDoc = pDc; - SwUnoInternalPaM aPam(*m_pDoc); - SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange); - UnoActionContext aCont(m_pDoc); - if(!m_aName.Len()) - m_aName = OUString::createFromAscii("Bookmark"); - if(eType == IDocumentMarkAccess::BOOKMARK && ::sw::mark::CrossRefNumItemBookmark::IsLegalName(m_aName)) - eType = IDocumentMarkAccess::CROSSREF_NUMITEM_BOOKMARK; - else if(eType == IDocumentMarkAccess::BOOKMARK && ::sw::mark::CrossRefHeadingBookmark::IsLegalName(m_aName)) - eType = IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK; - registerInMark(m_pDoc->getIDocumentMarkAccess()->makeMark(aPam, m_aName, eType)); - // --> OD 2007-10-23 #i81002# - // Check, if bookmark has been created. - // E.g., the creation of a cross-reference bookmark is suppress, - // if the PaM isn't a valid one for cross-reference bookmarks. - if(!m_pRegisteredBookmark) - { - OSL_ENSURE(false, - "" - " - could not create Mark."); - throw lang::IllegalArgumentException(); - } - // <-- + m_pImpl->m_sMarkName = OUString::createFromAscii("Bookmark"); } - else + if ((eType == IDocumentMarkAccess::BOOKMARK) && + ::sw::mark::CrossRefNumItemBookmark::IsLegalName(m_pImpl->m_sMarkName)) + { + eType = IDocumentMarkAccess::CROSSREF_NUMITEM_BOOKMARK; + } + else if ((eType == IDocumentMarkAccess::BOOKMARK) && + ::sw::mark::CrossRefHeadingBookmark::IsLegalName(m_pImpl->m_sMarkName)) + { + eType = IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK; + } + m_pImpl->registerInMark(*this, + m_pImpl->m_pDoc->getIDocumentMarkAccess()->makeMark( + aPam, m_pImpl->m_sMarkName, eType)); + // --> OD 2007-10-23 #i81002# + // Check, if bookmark has been created. + // E.g., the creation of a cross-reference bookmark is suppress, + // if the PaM isn't a valid one for cross-reference bookmarks. + if (!m_pImpl->m_pRegisteredBookmark) + { + OSL_ENSURE(false, + "" + " - could not create Mark."); throw lang::IllegalArgumentException(); + } + // <-- } -void SwXBookmark::attachToRange(const uno::Reference< text::XTextRange > & xTextRange) - throw( lang::IllegalArgumentException, uno::RuntimeException ) +void SwXBookmark::attachToRange( + const uno::Reference< text::XTextRange > & xTextRange) +throw (lang::IllegalArgumentException, uno::RuntimeException) { attachToRangeEx(xTextRange, IDocumentMarkAccess::BOOKMARK); } -void SwXBookmark::attach(const uno::Reference< text::XTextRange > & xTextRange) - throw( lang::IllegalArgumentException, uno::RuntimeException ) +void SAL_CALL +SwXBookmark::attach(const uno::Reference< text::XTextRange > & xTextRange) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); attachToRange( xTextRange ); } -uno::Reference< text::XTextRange > SwXBookmark::getAnchor(void) - throw( uno::RuntimeException ) +uno::Reference< text::XTextRange > SAL_CALL +SwXBookmark::getAnchor() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextRange > aRet; - if(m_pRegisteredBookmark) - aRet = SwXTextRange::CreateTextRangeFromPosition( - m_pDoc, - m_pRegisteredBookmark->GetMarkPos(), - m_pRegisteredBookmark->IsExpanded() ? &m_pRegisteredBookmark->GetOtherMarkPos() : NULL); - else + + if (!m_pImpl->m_pRegisteredBookmark) + { throw uno::RuntimeException(); - return aRet; + } + return SwXTextRange::CreateTextRangeFromPosition( + m_pImpl->m_pDoc, + m_pImpl->m_pRegisteredBookmark->GetMarkPos(), + (m_pImpl->m_pRegisteredBookmark->IsExpanded()) + ? &m_pImpl->m_pRegisteredBookmark->GetOtherMarkPos() : NULL); } -void SwXBookmark::dispose(void) - throw( uno::RuntimeException ) +void SAL_CALL SwXBookmark::dispose() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(m_pRegisteredBookmark) - GetDoc()->getIDocumentMarkAccess()->deleteMark(m_pRegisteredBookmark); - else - throw uno::RuntimeException(); + if (m_pImpl->m_pRegisteredBookmark) + { + m_pImpl->m_pDoc->getIDocumentMarkAccess()->deleteMark( + m_pImpl->m_pRegisteredBookmark); + } } -void SwXBookmark::addEventListener(const uno::Reference< lang::XEventListener > & aListener) - throw( uno::RuntimeException ) +void SAL_CALL SwXBookmark::addEventListener( + const uno::Reference< lang::XEventListener > & xListener) +throw (uno::RuntimeException) { - if(!m_pRegisteredBookmark) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->m_pRegisteredBookmark) + { throw uno::RuntimeException(); - m_aLstnrCntnr.AddListener(aListener); + } + m_pImpl->m_ListenerContainer.AddListener(xListener); } -void SwXBookmark::removeEventListener(const uno::Reference< lang::XEventListener > & aListener) - throw( uno::RuntimeException ) +void SAL_CALL SwXBookmark::removeEventListener( + const uno::Reference< lang::XEventListener > & xListener) +throw (uno::RuntimeException) { - if(!m_pRegisteredBookmark || !m_aLstnrCntnr.RemoveListener(aListener)) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->m_pRegisteredBookmark || + !m_pImpl->m_ListenerContainer.RemoveListener(xListener)) + { throw uno::RuntimeException(); + } } -OUString SwXBookmark::getName(void) - throw(uno::RuntimeException) +OUString SAL_CALL SwXBookmark::getName() +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - OUString sRet; - if(m_pRegisteredBookmark) - sRet = m_pRegisteredBookmark->GetName(); - else - sRet = m_aName; - return sRet; + + return (m_pImpl->m_pRegisteredBookmark) + ? m_pImpl->m_pRegisteredBookmark->GetName() + : m_pImpl->m_sMarkName; } -void SwXBookmark::setName(const OUString& rName) - throw(uno::RuntimeException) +void SAL_CALL SwXBookmark::setName(const OUString& rName) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(!m_pRegisteredBookmark) - m_aName = rName; - if(!m_pRegisteredBookmark || getName() == rName) + + if (!m_pImpl->m_pRegisteredBookmark) + { + m_pImpl->m_sMarkName = rName; + } + if (!m_pImpl->m_pRegisteredBookmark || (getName() == rName)) + { return; - IDocumentMarkAccess* const pMarkAccess = m_pDoc->getIDocumentMarkAccess(); + } + IDocumentMarkAccess *const pMarkAccess = + m_pImpl->m_pDoc->getIDocumentMarkAccess(); if(pMarkAccess->findMark(rName) != pMarkAccess->getMarksEnd()) + { throw uno::RuntimeException(); + } - SwPaM aPam(m_pRegisteredBookmark->GetMarkPos()); - if(m_pRegisteredBookmark->IsExpanded()) + SwPaM aPam(m_pImpl->m_pRegisteredBookmark->GetMarkPos()); + if (m_pImpl->m_pRegisteredBookmark->IsExpanded()) { aPam.SetMark(); - *aPam.GetMark() = m_pRegisteredBookmark->GetOtherMarkPos(); + *aPam.GetMark() = m_pImpl->m_pRegisteredBookmark->GetOtherMarkPos(); } SwRewriter aRewriter; @@ -259,114 +379,145 @@ void SwXBookmark::setName(const OUString& rName) aRewriter.AddRule(UNDO_ARG2, SW_RES(STR_YIELDS)); aRewriter.AddRule(UNDO_ARG3, lcl_QuoteName(rName)); - m_pDoc->StartUndo(UNDO_BOOKMARK_RENAME, &aRewriter); - pMarkAccess->renameMark(m_pRegisteredBookmark, rName); - m_pDoc->EndUndo(UNDO_BOOKMARK_RENAME, NULL); + m_pImpl->m_pDoc->StartUndo(UNDO_BOOKMARK_RENAME, &aRewriter); + pMarkAccess->renameMark(m_pImpl->m_pRegisteredBookmark, rName); + m_pImpl->m_pDoc->EndUndo(UNDO_BOOKMARK_RENAME, NULL); } -OUString SwXBookmark::getImplementationName(void) throw( uno::RuntimeException ) +OUString SAL_CALL +SwXBookmark::getImplementationName() throw (uno::RuntimeException) { return OUString::createFromAscii("SwXBookmark"); } -sal_Bool SwXBookmark::supportsService(const OUString& rServiceName) - throw( uno::RuntimeException ) +static char const*const g_ServicesBookmark[] = { - return !rServiceName.compareToAscii("com.sun.star.text.Bookmark") || - !rServiceName.compareToAscii("com.sun.star.document.LinkTarget") || - !rServiceName.compareToAscii("com.sun.star.text.TextContent"); -} - -uno::Sequence< OUString > SwXBookmark::getSupportedServiceNames(void) - throw( uno::RuntimeException ) + "com.sun.star.text.TextContent", + "com.sun.star.text.Bookmark", + "com.sun.star.document.LinkTarget", +}; +static const size_t g_nServicesBookmark( + sizeof(g_ServicesBookmark)/sizeof(g_ServicesBookmark[0])); + +sal_Bool SAL_CALL SwXBookmark::supportsService(const OUString& rServiceName) +throw (uno::RuntimeException) { - uno::Sequence< OUString > aRet(3); - aRet[0] = OUString::createFromAscii("com.sun.star.text.Bookmark"); - aRet[1] = OUString::createFromAscii("com.sun.star.document.LinkTarget"); - aRet[2] = OUString::createFromAscii("com.sun.star.text.TextContent"); - return aRet; + return ::sw::SupportsServiceImpl( + g_nServicesBookmark, g_ServicesBookmark, rServiceName); } -void SwXBookmark::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) +uno::Sequence< OUString > SAL_CALL +SwXBookmark::getSupportedServiceNames() throw (uno::RuntimeException) { - ClientModify(this, pOld, pNew); - if(!GetRegisteredIn()) - { - m_pRegisteredBookmark = NULL; - m_pDoc = NULL; - m_aLstnrCntnr.Disposing(); - } + return ::sw::GetSupportedServiceNamesImpl( + g_nServicesBookmark, g_ServicesBookmark); } // MetadatableMixin ::sfx2::Metadatable* SwXBookmark::GetCoreObject() { - return dynamic_cast< ::sfx2::Metadatable* >( GetBookmark() ); + return dynamic_cast< ::sfx2::Metadatable* >(m_pImpl->m_pRegisteredBookmark); } uno::Reference SwXBookmark::GetModel() { - if (GetDoc()) + if (m_pImpl->m_pDoc) { - SwDocShell const * const pShell( GetDoc()->GetDocShell() ); + SwDocShell const * const pShell( m_pImpl->m_pDoc->GetDocShell() ); return (pShell) ? pShell->GetModel() : 0; } return 0; } -uno::Reference< beans::XPropertySetInfo > SwXBookmark::getPropertySetInfo(void) - throw( uno::RuntimeException ) +uno::Reference< beans::XPropertySetInfo > SAL_CALL +SwXBookmark::getPropertySetInfo() throw (uno::RuntimeException) { - static uno::Reference< beans::XPropertySetInfo > aRef; - if(!aRef.is()) - { - aRef = aSwMapProvider.GetPropertySet(PROPERTY_MAP_BOOKMARK)->getPropertySetInfo(); - } - return aRef; + vos::OGuard g(Application::GetSolarMutex()); + + static uno::Reference< beans::XPropertySetInfo > xRef( + aSwMapProvider.GetPropertySet(PROPERTY_MAP_BOOKMARK) + ->getPropertySetInfo() ); + return xRef; } -void SwXBookmark::setPropertyValue(const OUString& PropertyName, const uno::Any& /*aValue*/) - throw( beans::UnknownPropertyException, - beans::PropertyVetoException, - lang::IllegalArgumentException, - lang::WrappedTargetException, - uno::RuntimeException ) +void SAL_CALL +SwXBookmark::setPropertyValue(const OUString& PropertyName, + const uno::Any& /*rValue*/) +throw (beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException) { // nothing to set here - throw IllegalArgumentException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + PropertyName, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw lang::IllegalArgumentException( ::rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("Property is read-only: ")) + + PropertyName, static_cast< cppu::OWeakObject * >(this), 0 ); } -uno::Any SwXBookmark::getPropertyValue(const OUString& rPropertyName) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +uno::Any SAL_CALL SwXBookmark::getPropertyValue(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { + vos::OGuard g(Application::GetSolarMutex()); + uno::Any aRet; if(!SwXParagraph::getDefaultTextContentValue(aRet, rPropertyName)) { if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_LINK_DISPLAY_NAME))) + { aRet <<= getName(); + } } return aRet; } -void SwXBookmark::addPropertyChangeListener(const OUString& /*PropertyName*/, - const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) -{ } +void SAL_CALL +SwXBookmark::addPropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) +{ + OSL_ENSURE(false, + "SwXBookmark::addPropertyChangeListener(): not implemented"); +} -void SwXBookmark::removePropertyChangeListener(const OUString& /*PropertyName*/, - const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) -{ } +void SAL_CALL +SwXBookmark::removePropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) +{ + OSL_ENSURE(false, + "SwXBookmark::removePropertyChangeListener(): not implemented"); +} -void SwXBookmark::addVetoableChangeListener(const OUString& /*PropertyName*/, - const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) -{ } +void SAL_CALL +SwXBookmark::addVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) +{ + OSL_ENSURE(false, + "SwXBookmark::addVetoableChangeListener(): not implemented"); +} -void SwXBookmark::removeVetoableChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) -{ } +void SAL_CALL +SwXBookmark::removeVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) +{ + OSL_ENSURE(false, + "SwXBookmark::removeVetoableChangeListener(): not implemented"); +} + +/****************************************************************** + * SwXFieldmark + ******************************************************************/ SwXFieldmark::SwXFieldmark(bool _isReplacementObject, ::sw::mark::IMark* pBkm, SwDoc* pDc) : SwXFieldmark_Base(pBkm, pDc) @@ -436,3 +587,4 @@ void SAL_CALL SwXFieldmark::setDescription( const ::rtl::OUString& description ) else throw uno::RuntimeException(); } + diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 745d28165c..3a471e133a 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -1529,8 +1529,9 @@ uno::Any SwXBookmarks::getByIndex(sal_Int32 nIndex) uno::Any aRet; ::sw::mark::IMark* pBkmk = pMarkAccess->getBookmarksBegin()[nIndex].get(); - uno::Reference< XTextContent > xRef = GetObject(*pBkmk, GetDoc()); - aRet.setValue(&xRef, ::getCppuType((uno::Reference*)0)); + const uno::Reference< text::XTextContent > xRef = + SwXBookmark::CreateXBookmark(*GetDoc(), *pBkmk); + aRet <<= xRef; return aRet; } @@ -1547,8 +1548,9 @@ uno::Any SwXBookmarks::getByName(const rtl::OUString& rName) throw NoSuchElementException(); uno::Any aRet; - uno::Reference< XTextContent > xRef = SwXBookmarks::GetObject(*(ppBkmk->get()), GetDoc()); - aRet.setValue(&xRef, ::getCppuType((uno::Reference*)0)); + const uno::Reference< text::XTextContent > xRef = + SwXBookmark::CreateXBookmark(*GetDoc(), *(ppBkmk->get())); + aRet <<= xRef; return aRet; } @@ -1594,27 +1596,6 @@ sal_Bool SwXBookmarks::hasElements(void) return GetDoc()->getIDocumentMarkAccess()->getBookmarksCount() != 0; } -SwXBookmark* SwXBookmarks::GetObject( ::sw::mark::IMark& rBkmk, SwDoc* pDoc) -{ - SwModify* const pModify = static_cast(&rBkmk); - SwXBookmark* pXBkmk = (SwXBookmark*)SwClientIter(*pModify).First(TYPE(SwXBookmark)); - if(!pXBkmk) - { - // FIXME: These belong in XTextFieldsSupplier - //if (dynamic_cast< ::sw::mark::TextFieldmark* >(&rBkmk)) - // pXBkmk = new SwXFieldmark(false, &rBkmk, pDoc); - //else if (dynamic_cast< ::sw::mark::CheckboxFieldmark* >(&rBkmk)) - // pXBkmk = new SwXFieldmark(true, &rBkmk, pDoc); - //else - OSL_ENSURE( - dynamic_cast< ::sw::mark::IBookmark* >(&rBkmk), - "" - "SwXBookmark requested for non-bookmark mark."); - pXBkmk = new SwXBookmark(&rBkmk, pDoc); - } - return pXBkmk; -} - /****************************************************************** * ******************************************************************/ diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 2cff59cf41..931038335d 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -100,8 +100,9 @@ namespace BYTE nBkmType; const SwPosition aPosition; - SwXBookmarkPortion_Impl( SwXBookmark* pXMark, BYTE nType, const SwPosition &rPosition ) - : xBookmark ( pXMark ) + SwXBookmarkPortion_Impl(uno::Reference const& xMark, + const BYTE nType, SwPosition const& rPosition) + : xBookmark ( xMark ) , nBkmType ( nType ) , aPosition ( rPosition ) { @@ -165,7 +166,9 @@ namespace { const BYTE nType = hasOther ? BKM_TYPE_START : BKM_TYPE_START_END; rBkmArr.insert(SwXBookmarkPortion_ImplSharedPtr( - new SwXBookmarkPortion_Impl ( SwXBookmarks::GetObject(*pBkmk, &rDoc ), nType, rStartPos))); + new SwXBookmarkPortion_Impl( + SwXBookmark::CreateXBookmark(rDoc, *pBkmk), + nType, rStartPos))); } const SwPosition& rEndPos = pBkmk->GetMarkEnd(); @@ -183,8 +186,12 @@ namespace pEndPos = pCrossRefEndPos.get(); } if(pEndPos) + { rBkmArr.insert(SwXBookmarkPortion_ImplSharedPtr( - new SwXBookmarkPortion_Impl ( SwXBookmarks::GetObject(*pBkmk, &rDoc ), BKM_TYPE_END, *pEndPos))); + new SwXBookmarkPortion_Impl( + SwXBookmark::CreateXBookmark(rDoc, *pBkmk), + BKM_TYPE_END, *pEndPos))); + } } } } diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 19f1aa0dea..8d84296790 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -433,19 +433,14 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg if(xBkm.is() && xIfcTunnel.is()) { - SwXBookmark* pBkm = reinterpret_cast( - xIfcTunnel->getSomething(SwXBookmark::getUnoTunnelId())); - if(pBkm && pBkm->GetDoc() == pDoc) + ::sw::mark::IMark const*const pMark( + SwXBookmark::GetBookmarkInDoc(pDoc, xIfcTunnel) ); + if (pMark) { - IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess(); - IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->findMark(pBkm->getName()); - if( ppMark != pMarkAccess->getMarksEnd() ) - { - rSh.EnterStdMode(); - rSh.GotoMark( ppMark->get() ); - } - return sal_True; + rSh.EnterStdMode(); + rSh.GotoMark(pMark); } + return sal_True; } // IndexMark, Index, TextField, Draw, Section, Footnote, Paragraph // -- cgit v1.2.3 From 48b77021b2fc21e4de8e3dead6d7701e28472c5a Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:50 +0100 Subject: swunolocking1: #i105557#: fix locking for SwXParagraph: add Impl struct, and use UnoImplPtr to lock destructor. move all implementation details out of header, into Impl struct. make SwXParagraph instances reusable with a WeakReference in SwTxtNode. make constructor private, and add factory function CreateXParagraph. use new XUnoTunnel and XServiceInfo helpers. clean up the implementation a little. --- sw/inc/ndtxt.hxx | 20 +- sw/inc/unoparagraph.hxx | 75 +- sw/source/core/txtnode/ndtxt.cxx | 31 +- sw/source/core/unocore/unodraw.cxx | 4 +- sw/source/core/unocore/unoobj2.cxx | 16 +- sw/source/core/unocore/unoparagraph.cxx | 1163 +++++++++++++++++++------------ sw/source/core/unocore/unotext.cxx | 15 +- 7 files changed, 775 insertions(+), 549 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 37aa87b202..635052103e 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -30,6 +30,8 @@ #ifndef _NDTXT_HXX #define _NDTXT_HXX +#include + #include "swdllapi.h" #include #include @@ -76,9 +78,12 @@ class SwScriptInfo; struct SwDocStat; struct SwParaIdleData_Impl; -namespace com { namespace sun { namespace star { namespace uno { - template < class > class Sequence; -}}}} +namespace com { namespace sun { namespace star { + namespace uno { + template < class > class Sequence; + } + namespace text { class XTextContent; } +} } } typedef std::set< xub_StrLen > SwSoftPageBreakList; @@ -132,6 +137,8 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable SwList* mpList; // <-- + ::com::sun::star::uno::WeakReference< + ::com::sun::star::text::XTextContent> m_wXParagraph; SW_DLLPRIVATE SwTxtNode( const SwNodeIndex &rWhere, SwTxtFmtColl *pTxtColl, const SfxItemSet* pAutoAttr = 0 ); @@ -813,6 +820,13 @@ public: USHORT GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd ) const; + SW_DLLPRIVATE ::com::sun::star::uno::WeakReference< + ::com::sun::star::text::XTextContent> const& GetXParagraph() const + { return m_wXParagraph; } + SW_DLLPRIVATE void SetXParagraph(::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextContent> const& xParagraph) + { m_wXParagraph = xParagraph; } + // sfx2::Metadatable virtual ::sfx2::IXmlIdRegistry& GetRegistry(); virtual bool IsInClipboard() const; diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx index 984786b0d1..d5c5e2ed28 100644 --- a/sw/inc/unoparagraph.hxx +++ b/sw/inc/unoparagraph.hxx @@ -48,12 +48,11 @@ #include #include -#include #include -class SfxItemPropertySet; struct SwPosition; +class SwPaM; class SwUnoCrsr; class SwStartNode; class SwTxtNode; @@ -80,73 +79,41 @@ typedef ::cppu::ImplInheritanceHelper10 class SwXParagraph : public SwXParagraph_Base - , public SwClient { private: - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; - SwEventListenerContainer aLstnrCntnr; - const SfxItemPropertySet* m_pPropSet; - ::rtl::OUString m_sText; - sal_Int32 nSelectionStartPos; - sal_Int32 nSelectionEndPos; - BOOL m_bIsDescriptor; - -protected: - - void SAL_CALL SetPropertyValues_Impl( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames, - const ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Any >& rValues) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::beans::PropertyVetoException, - ::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL - GetPropertyValues_Impl( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - - ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL - GetPropertyValuesTolerant_Impl( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames, - sal_Bool bDirectValuesOnly) - throw (::com::sun::star::uno::RuntimeException); + class Impl; + ::sw::UnoImplPtr m_pImpl; virtual ~SwXParagraph(); + SwXParagraph(::com::sun::star::uno::Reference< + ::com::sun::star::text::XText > const & xParent, + SwTxtNode & rTxtNode, + const sal_Int32 nSelStart = -1, const sal_Int32 nSelEnd = - 1); + public: + /// descriptor SwXParagraph(); - SwXParagraph(::com::sun::star::uno::Reference< - ::com::sun::star::text::XText > const & i_xParent, - SwTxtNode * i_pTxtNode, - sal_Int32 nSelStart = -1, sal_Int32 nSelEnd = - 1); - BOOL IsDescriptor() const {return m_bIsDescriptor;} + static ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextContent> + CreateXParagraph(SwDoc & rDoc, SwTxtNode& rTxtNode, + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText> + const& xParentText = 0, + const sal_Int32 nSelStart = -1, const sal_Int32 nSelEnd = - 1); const SwTxtNode * GetTxtNode() const; - SwTxtNode * GetTxtNode(); - - static BOOL getDefaultTextContentValue(::com::sun::star::uno::Any& rAny, - const ::rtl::OUString& rPropertyName, USHORT nWID = 0); - static SwXParagraph* GetImplementation( - ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface> xRef); + bool IsDescriptor() const; + /// make rPaM select the paragraph + bool SelectPaM(SwPaM & rPaM); + /// for SwXText void attachToText(SwXText & rParent, SwTxtNode & rTxtNode); - TYPEINFO(); - - // SwClient - virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + static bool getDefaultTextContentValue(::com::sun::star::uno::Any& rAny, + const ::rtl::OUString& rPropertyName, USHORT nWID = 0); // MetadatableMixin virtual ::sfx2::Metadatable* GetCoreObject(); diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 4ed6861b54..713bc64f15 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3623,6 +3623,12 @@ void SwTxtNode::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue ) } m_bNotifiable = bWasNotifiable; + + if (pOldValue && (RES_REMOVE_UNO_OBJECT == pOldValue->Which())) + { // invalidate cached uno object + SetXParagraph(::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextContent>(0)); + } } SwFmtColl* SwTxtNode::ChgFmtColl( SwFmtColl *pNewColl ) @@ -4973,27 +4979,14 @@ bool SwTxtNode::IsInContent() const } #include -#include -::com::sun::star::uno::Reference< ::com::sun::star::rdf::XMetadatable > +using namespace ::com::sun::star; + +uno::Reference< rdf::XMetadatable > SwTxtNode::MakeUnoObject() { - // re-use existing SwXParagraph - SwClientIter iter( *this ); - SwClient * pClient( iter.First( TYPE( SwXParagraph ) ) ); - while (pClient) { - SwXParagraph *pPara( dynamic_cast(pClient) ); - if (pPara && pPara->GetCoreObject() == this ) { - return pPara; - } - pClient = iter.Next(); - } - - // create new SwXParagraph - SwPosition Pos( *this ); - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent( - SwXTextRange::CreateParentXText( GetDoc(), Pos ) ); - SwXParagraph * pXPara( new SwXParagraph( xParent, this ) ); - return pXPara; + const uno::Reference xMeta( + SwXParagraph::CreateXParagraph(*GetDoc(), *this), uno::UNO_QUERY); + return xMeta; } diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 67c7249571..06c1961c73 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -2158,7 +2158,9 @@ void SwXShape::attach(const uno::Reference< text::XTextRange > & xTextRange) pDoc = pPortion->GetCursor()->GetDoc(); } else if ( !pDoc && pParagraph && pParagraph->GetTxtNode( ) ) - pDoc = pParagraph->GetTxtNode( )->GetDoc( ); + { + pDoc = const_cast(pParagraph->GetTxtNode()->GetDoc()); + } } diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 2f94bf2da6..342e078290 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1169,9 +1169,9 @@ uno::Reference< XTextContent > SAL_CALL SwXParagraphEnumeration::NextElement_Imp } else { - aRef = new SwXParagraph(static_cast(pText), - pStart->nNode.GetNode().GetTxtNode(), - nFirstContent, nLastContent); + aRef = SwXParagraph::CreateXParagraph(*pUnoCrsr->GetDoc(), + *pStart->nNode.GetNode().GetTxtNode(), + static_cast(pText), nFirstContent, nLastContent); } } } @@ -1528,15 +1528,7 @@ sal_Bool SwXTextRange::XTextRangeToSwPaM( SwUnoInternalPaM& rToFill, { if (pPara) { - const SwTxtNode * pTxtNode( pPara->GetTxtNode() ); - - if (pTxtNode) { - bRet = sal_True; - *rToFill.GetPoint() = SwPosition( *pTxtNode ); - // set selection to the whole paragraph - rToFill.SetMark(); - rToFill.GetMark()->nContent = pTxtNode->GetTxt().Len(); - } + bRet = pPara->SelectPaM(rToFill); } else { diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index c83920d101..683366fc6d 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -31,13 +31,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include #include #include #include #include #include #include -#include #include #include #include @@ -60,6 +60,7 @@ #include #include + using namespace ::com::sun::star; using ::rtl::OUString; @@ -69,38 +70,38 @@ using ::rtl::OUString; ---------------------------------------------------------------------------*/ class SwParaSelection { - SwCursor* m_pCursor; + SwCursor & m_rCursor; public: - SwParaSelection(SwCursor* pPam); + SwParaSelection(SwCursor & rCursor); ~SwParaSelection(); }; -SwParaSelection::SwParaSelection(SwCursor* pCursor) - : m_pCursor(pCursor) +SwParaSelection::SwParaSelection(SwCursor & rCursor) + : m_rCursor(rCursor) { - if (m_pCursor->HasMark()) + if (m_rCursor.HasMark()) { - m_pCursor->DeleteMark(); + m_rCursor.DeleteMark(); } // is it at the start? - if (m_pCursor->GetPoint()->nContent != 0) + if (m_rCursor.GetPoint()->nContent != 0) { - m_pCursor->MovePara(fnParaCurr, fnParaStart); + m_rCursor.MovePara(fnParaCurr, fnParaStart); } // or at the end already? - if (m_pCursor->GetPoint()->nContent != m_pCursor->GetCntntNode()->Len()) + if (m_rCursor.GetPoint()->nContent != m_rCursor.GetCntntNode()->Len()) { - m_pCursor->SetMark(); - m_pCursor->MovePara(fnParaCurr, fnParaEnd); + m_rCursor.SetMark(); + m_rCursor.MovePara(fnParaCurr, fnParaEnd); } } SwParaSelection::~SwParaSelection() { - if (m_pCursor->GetPoint()->nContent != 0) + if (m_rCursor.GetPoint()->nContent != 0) { - m_pCursor->DeleteMark(); - m_pCursor->MovePara(fnParaCurr, fnParaStart); + m_rCursor.DeleteMark(); + m_rCursor.MovePara(fnParaCurr, fnParaStart); } } @@ -114,25 +115,184 @@ beans::PropertyState lcl_SwXParagraph_getPropertyState( const SwAttrSet** ppSet, const SfxItemPropertySimpleEntry& rEntry, sal_Bool &rAttrSetFetched ) - throw( beans::UnknownPropertyException); + throw (beans::UnknownPropertyException); /****************************************************************** * SwXParagraph ******************************************************************/ -TYPEINIT1(SwXParagraph, SwClient); +class SwXParagraph::Impl + : public SwClient +{ -/* -----------------------------11.07.00 12:10-------------------------------- +public: + SwXParagraph & m_rThis; + SwEventListenerContainer m_ListenerContainer; + SfxItemPropertySet const& m_rPropSet; + bool m_bIsDescriptor; + sal_Int32 m_nSelectionStartPos; + sal_Int32 m_nSelectionEndPos; + ::rtl::OUString m_sText; + uno::Reference m_xParentText; + + Impl( SwXParagraph & rThis, + SwTxtNode *const pTxtNode = 0, + uno::Reference< text::XText > const & xParent = 0, + const sal_Int32 nSelStart = -1, const sal_Int32 nSelEnd = -1) + : SwClient(pTxtNode) + , m_rThis(rThis) + , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) + , m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH)) + , m_bIsDescriptor(0 == pTxtNode) + , m_nSelectionStartPos(nSelStart) + , m_nSelectionEndPos(nSelEnd) + , m_xParentText(xParent) + { + } - ---------------------------------------------------------------------------*/ -SwXParagraph* SwXParagraph::GetImplementation(uno::Reference< XInterface> xRef ) + const SwTxtNode * GetTxtNode() const { + return static_cast(GetRegisteredIn()); + } + SwTxtNode * GetTxtNode() { + return static_cast(pRegisteredIn); + } + + SwTxtNode & GetTxtNodeOrThrow() { + SwTxtNode *const pTxtNode( GetTxtNode() ); + if (!pTxtNode) { + throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( + "SwXParagraph: disposed or invalid")), 0); + } + return *pTxtNode; + } + + bool IsDescriptor() const { return m_bIsDescriptor; } + + void SetPropertyValues_Impl( + const uno::Sequence< ::rtl::OUString >& rPropertyNames, + const uno::Sequence< uno::Any >& rValues) + throw (beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException); + + uno::Sequence< uno::Any > + GetPropertyValues_Impl( + const uno::Sequence< ::rtl::OUString >& rPropertyNames) + throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException); + + uno::Sequence< beans::GetDirectPropertyTolerantResult > + GetPropertyValuesTolerant_Impl( + const uno::Sequence< ::rtl::OUString >& rPropertyNames, + bool bDirectValuesOnly) + throw (uno::RuntimeException); + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + +}; + +/*-- 11.12.98 08:12:58--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void SwXParagraph::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) +{ + ClientModify(this, pOld, pNew); + if (!GetRegisteredIn()) + { + m_ListenerContainer.Disposing(); + } +} + +/*-- 11.12.98 08:12:47--------------------------------------------------- + + -----------------------------------------------------------------------*/ +SwXParagraph::SwXParagraph() + : m_pImpl( new SwXParagraph::Impl(*this) ) +{ +} + +/*-- 11.12.98 08:12:47--------------------------------------------------- + + -----------------------------------------------------------------------*/ +SwXParagraph::SwXParagraph( + uno::Reference< text::XText > const & xParent, + SwTxtNode & rTxtNode, + const sal_Int32 nSelStart, const sal_Int32 nSelEnd) + : m_pImpl( + new SwXParagraph::Impl(*this, &rTxtNode, xParent, nSelStart, nSelEnd)) { - uno::Reference xParaTunnel( xRef, uno::UNO_QUERY); - if(xParaTunnel.is()) - return reinterpret_cast< SwXParagraph * >( - sal::static_int_cast< sal_IntPtr >( xParaTunnel->getSomething(SwXParagraph::getUnoTunnelId()) )); - return 0; } + +/*-- 11.12.98 08:12:48--------------------------------------------------- + + -----------------------------------------------------------------------*/ +SwXParagraph::~SwXParagraph() +{ +} + +const SwTxtNode * SwXParagraph::GetTxtNode() const +{ + return m_pImpl->GetTxtNode(); +} + +bool SwXParagraph::IsDescriptor() const +{ + return m_pImpl->IsDescriptor(); +} + +uno::Reference +SwXParagraph::CreateXParagraph(SwDoc & rDoc, SwTxtNode& rTxtNode, + uno::Reference< text::XText> const& i_xParent, + const sal_Int32 nSelStart, const sal_Int32 nSelEnd) +{ + // re-use existing SwXParagraph + // #i105557#: do not iterate over the registered clients: race condition + uno::Reference xParagraph; + if ((-1 == nSelStart) && (-1 == nSelEnd)) // only use cache if no selection! + { + xParagraph.set(rTxtNode.GetXParagraph()); + } + if (xParagraph.is()) + { + return xParagraph; + } + + // create new SwXParagraph + uno::Reference xParentText(i_xParent); + if (!xParentText.is()) + { + SwPosition Pos( rTxtNode ); + xParentText.set(SwXTextRange::CreateParentXText( &rDoc, Pos )); + } + SwXParagraph *const pXPara( + new SwXParagraph(xParentText, rTxtNode, nSelStart, nSelEnd) ); + // this is why the constructor is private: need to acquire pXPara here + xParagraph.set(pXPara); + // in order to initialize the weak pointer cache in the core object + if ((-1 == nSelStart) && (-1 == nSelEnd)) + { + rTxtNode.SetXParagraph(xParagraph); + } + return xParagraph; +} + +bool SwXParagraph::SelectPaM(SwPaM & rPaM) +{ + SwTxtNode const*const pTxtNode( GetTxtNode() ); + + if (!pTxtNode) + { + return false; + } + + *rPaM.GetPoint() = SwPosition( *pTxtNode ); + // set selection to the whole paragraph + rPaM.SetMark(); + rPaM.GetMark()->nContent = pTxtNode->GetTxt().Len(); + return true; +} + /* -----------------------------13.03.00 12:15-------------------------------- ---------------------------------------------------------------------------*/ @@ -144,191 +304,176 @@ const uno::Sequence< sal_Int8 > & SwXParagraph::getUnoTunnelId() /* -----------------------------10.03.00 18:04-------------------------------- ---------------------------------------------------------------------------*/ -sal_Int64 SAL_CALL SwXParagraph::getSomething( const uno::Sequence< sal_Int8 >& rId ) - throw(uno::RuntimeException) +sal_Int64 SAL_CALL +SwXParagraph::getSomething(const uno::Sequence< sal_Int8 >& rId) +throw (uno::RuntimeException) { - if( rId.getLength() == 16 - && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16 ) ) - { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); - } - return 0; + return ::sw::UnoTunnelImpl(rId, this); } -/* -----------------------------06.04.00 16:37-------------------------------- - ---------------------------------------------------------------------------*/ -OUString SwXParagraph::getImplementationName(void) throw( uno::RuntimeException ) -{ - return C2U("SwXParagraph"); -} /* -----------------------------06.04.00 16:37-------------------------------- ---------------------------------------------------------------------------*/ -BOOL SwXParagraph::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) +OUString SAL_CALL +SwXParagraph::getImplementationName() throw (uno::RuntimeException) { - String sServiceName(rServiceName); - return sServiceName.EqualsAscii("com.sun.star.text.TextContent") || - sServiceName.EqualsAscii("com.sun.star.text.Paragraph") || - sServiceName.EqualsAscii("com.sun.star.style.CharacterProperties")|| - sServiceName.EqualsAscii("com.sun.star.style.CharacterPropertiesAsian")|| - sServiceName.EqualsAscii("com.sun.star.style.CharacterPropertiesComplex")|| - sServiceName.EqualsAscii("com.sun.star.style.ParagraphProperties") || - sServiceName.EqualsAscii("com.sun.star.style.ParagraphPropertiesAsian") || - sServiceName.EqualsAscii("com.sun.star.style.ParagraphPropertiesComplex"); + return C2U("SwXParagraph"); } /* -----------------------------06.04.00 16:37-------------------------------- ---------------------------------------------------------------------------*/ -uno::Sequence< OUString > SwXParagraph::getSupportedServiceNames(void) throw( uno::RuntimeException ) +static char const*const g_ServicesParagraph[] = { - uno::Sequence< OUString > aRet(8); - OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.Paragraph"); - pArray[1] = C2U("com.sun.star.style.CharacterProperties"); - pArray[2] = C2U("com.sun.star.style.CharacterPropertiesAsian"); - pArray[3] = C2U("com.sun.star.style.CharacterPropertiesComplex"); - pArray[4] = C2U("com.sun.star.style.ParagraphProperties"); - pArray[5] = C2U("com.sun.star.style.ParagraphPropertiesAsian"); - pArray[6] = C2U("com.sun.star.style.ParagraphPropertiesComplex"); - pArray[7] = C2U("com.sun.star.text.TextContent"); - return aRet; -} -/*-- 11.12.98 08:12:47--------------------------------------------------- + "com.sun.star.text.TextContent", + "com.sun.star.text.Paragraph", + "com.sun.star.style.CharacterProperties", + "com.sun.star.style.CharacterPropertiesAsian", + "com.sun.star.style.CharacterPropertiesComplex", + "com.sun.star.style.ParagraphProperties", + "com.sun.star.style.ParagraphPropertiesAsian", + "com.sun.star.style.ParagraphPropertiesComplex", +}; +static const size_t g_nServicesParagraph( + sizeof(g_ServicesParagraph)/sizeof(g_ServicesParagraph[0])); - -----------------------------------------------------------------------*/ -SwXParagraph::SwXParagraph() : - xParentText(0), - aLstnrCntnr( (text::XTextRange*)this), - m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH)), - nSelectionStartPos(-1), - nSelectionEndPos(-1), - m_bIsDescriptor(TRUE) +sal_Bool SAL_CALL +SwXParagraph::supportsService(const OUString& rServiceName) +throw (uno::RuntimeException) { + return ::sw::SupportsServiceImpl( + g_nServicesParagraph, g_ServicesParagraph, rServiceName); } +/* -----------------------------06.04.00 16:37-------------------------------- -/*-- 11.12.98 08:12:47--------------------------------------------------- - - -----------------------------------------------------------------------*/ -SwXParagraph::SwXParagraph(uno::Reference< text::XText > const & i_xParent, SwTxtNode * i_pTxtNode, sal_Int32 nSelStart, sal_Int32 nSelEnd) : - SwClient(i_pTxtNode), - xParentText(i_xParent), - aLstnrCntnr( (text::XTextRange*)this), - m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH)), - nSelectionStartPos(nSelStart), - nSelectionEndPos(nSelEnd), - m_bIsDescriptor(FALSE) + ---------------------------------------------------------------------------*/ +uno::Sequence< OUString > SAL_CALL +SwXParagraph::getSupportedServiceNames() throw (uno::RuntimeException) { + return ::sw::GetSupportedServiceNamesImpl( + g_nServicesParagraph, g_ServicesParagraph); } -/*-- 11.12.98 08:12:48--------------------------------------------------- - -----------------------------------------------------------------------*/ -SwXParagraph::~SwXParagraph() -{ -} /* -----------------------------11.07.00 14:48-------------------------------- ---------------------------------------------------------------------------*/ void SwXParagraph::attachToText(SwXText & rParent, SwTxtNode & rTxtNode) { - DBG_ASSERT(m_bIsDescriptor, "Paragraph is not a descriptor"); - if(m_bIsDescriptor) + DBG_ASSERT(m_pImpl->m_bIsDescriptor, "Paragraph is not a descriptor"); + if (m_pImpl->m_bIsDescriptor) { - m_bIsDescriptor = FALSE; - rTxtNode.Add(this); - xParentText = &rParent; - if(m_sText.getLength()) + m_pImpl->m_bIsDescriptor = false; + rTxtNode.Add(m_pImpl.get()); + rTxtNode.SetXParagraph(uno::Reference(this)); + m_pImpl->m_xParentText = &rParent; + if (m_pImpl->m_sText.getLength()) { - try { setString(m_sText); } + try { setString(m_pImpl->m_sText); } catch(...){} - m_sText = OUString(); + m_pImpl->m_sText = OUString(); } } } + /*-- 11.12.98 08:12:49--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< beans::XPropertySetInfo > SwXParagraph::getPropertySetInfo(void) - throw( uno::RuntimeException ) +uno::Reference< beans::XPropertySetInfo > SAL_CALL +SwXParagraph::getPropertySetInfo() +throw (uno::RuntimeException) { - static uno::Reference< beans::XPropertySetInfo > xRef = m_pPropSet->getPropertySetInfo(); + vos::OGuard g(Application::GetSolarMutex()); + + static uno::Reference< beans::XPropertySetInfo > xRef = + m_pImpl->m_rPropSet.getPropertySetInfo(); return xRef; } /*-- 11.12.98 08:12:49--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXParagraph::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue) - throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, - lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXParagraph::setPropertyValue(const OUString& rPropertyName, + const uno::Any& rValue) +throw (beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException ) { vos::OGuard aGuard(Application::GetSolarMutex()); uno::Sequence aPropertyNames(1); aPropertyNames.getArray()[0] = rPropertyName; uno::Sequence aValues(1); - aValues.getArray()[0] = aValue; - SetPropertyValues_Impl( aPropertyNames, aValues ); + aValues.getArray()[0] = rValue; + m_pImpl->SetPropertyValues_Impl( aPropertyNames, aValues ); } + /*-- 11.12.98 08:12:49--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXParagraph::getPropertyValue(const OUString& rPropertyName) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +uno::Any +SwXParagraph::getPropertyValue(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException ) { vos::OGuard aGuard(Application::GetSolarMutex()); uno::Sequence aPropertyNames(1); aPropertyNames.getArray()[0] = rPropertyName; - uno::Sequence< uno::Any > aRet = GetPropertyValues_Impl(aPropertyNames ); + const uno::Sequence< uno::Any > aRet = + m_pImpl->GetPropertyValues_Impl(aPropertyNames); return aRet.getConstArray()[0]; } /* -----------------------------02.04.01 11:43-------------------------------- ---------------------------------------------------------------------------*/ -void SAL_CALL SwXParagraph::SetPropertyValues_Impl( +void SwXParagraph::Impl::SetPropertyValues_Impl( const uno::Sequence< OUString >& rPropertyNames, const uno::Sequence< uno::Any >& rValues ) - throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, - lang::WrappedTargetException, uno::RuntimeException) +throw (beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException) { - if (GetTxtNode()) + SwTxtNode & rTxtNode(GetTxtNodeOrThrow()); + + SwPosition aPos( rTxtNode ); + SwCursor aCursor( aPos, 0, false ); + const OUString* pPropertyNames = rPropertyNames.getConstArray(); + const uno::Any* pValues = rValues.getConstArray(); + SfxItemPropertyMap const*const pMap = m_rPropSet.getPropertyMap(); + SwParaSelection aParaSel( aCursor ); + for (sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++) { - SwPosition aPos( *GetTxtNode() ); - SwCursor aCursor( aPos, 0, false ); - const OUString* pPropertyNames = rPropertyNames.getConstArray(); - const uno::Any* pValues = rValues.getConstArray(); - const SfxItemPropertyMap* pMap = m_pPropSet->getPropertyMap(); - SwParaSelection aParaSel( & aCursor ); - for(sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++) + SfxItemPropertySimpleEntry const*const pEntry = + pMap->getByName( pPropertyNames[nProp] ); + if (!pEntry) { - const SfxItemPropertySimpleEntry* pEntry = pMap->getByName( pPropertyNames[nProp] ); - if(!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); - else - { - if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); - - SwXTextCursor::SetPropertyValue(aCursor, *m_pPropSet, - pPropertyNames[nProp], pValues[nProp]); - } + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + pPropertyNames[nProp], + static_cast< cppu::OWeakObject * >(&m_rThis)); + } + if (pEntry->nFlags & beans::PropertyAttribute::READONLY) + { + throw beans::PropertyVetoException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only: ")) + + pPropertyNames[nProp], + static_cast< cppu::OWeakObject * >(&m_rThis)); } + SwXTextCursor::SetPropertyValue(aCursor, m_rPropSet, + pPropertyNames[nProp], pValues[nProp]); } - else - throw uno::RuntimeException(); } -void SwXParagraph::setPropertyValues( +void SAL_CALL SwXParagraph::setPropertyValues( const uno::Sequence< OUString >& rPropertyNames, const uno::Sequence< uno::Any >& rValues ) - throw(beans::PropertyVetoException, lang::IllegalArgumentException, - lang::WrappedTargetException, uno::RuntimeException) +throw (beans::PropertyVetoException, lang::IllegalArgumentException, + lang::WrappedTargetException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); // workaround for bad designed API try { - SetPropertyValues_Impl( rPropertyNames, rValues ); + m_pImpl->SetPropertyValues_Impl( rPropertyNames, rValues ); } catch (beans::UnknownPropertyException &rException) { @@ -339,53 +484,57 @@ void SwXParagraph::setPropertyValues( throw aWExc; } } + /* -----------------------------02.04.01 11:43-------------------------------- ---------------------------------------------------------------------------*/ -uno::Sequence< uno::Any > SAL_CALL SwXParagraph::GetPropertyValues_Impl( +uno::Sequence< uno::Any > SwXParagraph::Impl::GetPropertyValues_Impl( const uno::Sequence< OUString > & rPropertyNames ) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { + SwTxtNode & rTxtNode(GetTxtNodeOrThrow()); + uno::Sequence< uno::Any > aValues(rPropertyNames.getLength()); - const SwTxtNode * pTxtNode( GetTxtNode() ); - if (pTxtNode) + SwPosition aPos( rTxtNode ); + SwPaM aPam( aPos ); + uno::Any* pValues = aValues.getArray(); + const OUString* pPropertyNames = rPropertyNames.getConstArray(); + SfxItemPropertyMap const*const pMap = m_rPropSet.getPropertyMap(); + const SwAttrSet& rAttrSet( rTxtNode.GetSwAttrSet() ); + for (sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++) { - SwPosition aPos( *pTxtNode ); - SwPaM aPam( aPos ); - uno::Any* pValues = aValues.getArray(); - const OUString* pPropertyNames = rPropertyNames.getConstArray(); - const SfxItemPropertyMap* pMap = m_pPropSet->getPropertyMap(); - const SwAttrSet& rAttrSet( pTxtNode->GetSwAttrSet() ); - for(sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++) + SfxItemPropertySimpleEntry const*const pEntry = + pMap->getByName( pPropertyNames[nProp] ); + if (!pEntry) + { + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + pPropertyNames[nProp], + static_cast< cppu::OWeakObject * >(&m_rThis)); + } + if (!SwXParagraph::getDefaultTextContentValue( + pValues[nProp], pPropertyNames[nProp], pEntry->nWID)) { - const SfxItemPropertySimpleEntry* pEntry = pMap->getByName( pPropertyNames[nProp] ); - if(pEntry) + beans::PropertyState eTemp; + const bool bDone = SwUnoCursorHelper::getCrsrPropertyValue( + *pEntry, aPam, &(pValues[nProp]), eTemp, &rTxtNode ); + if (!bDone) { - if(!SwXParagraph::getDefaultTextContentValue( - pValues[nProp], pPropertyNames[nProp], pEntry->nWID)) - { - BOOL bDone = FALSE; - beans::PropertyState eTemp; - bDone = SwUnoCursorHelper::getCrsrPropertyValue( - *pEntry, aPam, &(pValues[nProp]), eTemp, pTxtNode ); - if(!bDone) - m_pPropSet->getPropertyValue(*pEntry, rAttrSet, pValues[nProp]); - } + m_rPropSet.getPropertyValue( + *pEntry, rAttrSet, pValues[nProp]); } - else - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); } } - else - throw uno::RuntimeException(); return aValues; } + /* -----------------------------04.11.03 11:43-------------------------------- ---------------------------------------------------------------------------*/ -uno::Sequence< uno::Any > SwXParagraph::getPropertyValues( - const uno::Sequence< OUString >& rPropertyNames ) - throw(uno::RuntimeException) +uno::Sequence< uno::Any > SAL_CALL +SwXParagraph::getPropertyValues(const uno::Sequence< OUString >& rPropertyNames) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); uno::Sequence< uno::Any > aValues; @@ -393,67 +542,82 @@ uno::Sequence< uno::Any > SwXParagraph::getPropertyValues( // workaround for bad designed API try { - aValues = GetPropertyValues_Impl( rPropertyNames ); + aValues = m_pImpl->GetPropertyValues_Impl( rPropertyNames ); } catch (beans::UnknownPropertyException &) { - throw uno::RuntimeException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property exception caught" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unknown property exception caught")), + static_cast(this)); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "WrappedTargetException caught" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( + "WrappedTargetException caught")), + static_cast(this)); } return aValues; } + /* -----------------------------02.04.01 11:43-------------------------------- ---------------------------------------------------------------------------*/ -void SwXParagraph::addPropertiesChangeListener( +void SAL_CALL SwXParagraph::addPropertiesChangeListener( const uno::Sequence< OUString >& /*aPropertyNames*/, const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ ) - throw(uno::RuntimeException) -{} +throw (uno::RuntimeException) +{ + OSL_ENSURE(false, + "SwXParagraph::addPropertiesChangeListener(): not implemented"); +} /* -----------------------------02.04.01 11:43-------------------------------- ---------------------------------------------------------------------------*/ -void SwXParagraph::removePropertiesChangeListener( +void SAL_CALL SwXParagraph::removePropertiesChangeListener( const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ ) - throw(uno::RuntimeException) -{} +throw (uno::RuntimeException) +{ + OSL_ENSURE(false, + "SwXParagraph::removePropertiesChangeListener(): not implemented"); +} /* -----------------------------02.04.01 11:43-------------------------------- ---------------------------------------------------------------------------*/ -void SwXParagraph::firePropertiesChangeEvent( +void SAL_CALL SwXParagraph::firePropertiesChangeEvent( const uno::Sequence< OUString >& /*aPropertyNames*/, const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ ) throw(uno::RuntimeException) -{} +{ + OSL_ENSURE(false, + "SwXParagraph::firePropertiesChangeEvent(): not implemented"); +} /* -----------------------------25.09.03 11:09-------------------------------- ---------------------------------------------------------------------------*/ /* disabled for #i46921# */ -uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL SwXParagraph::setPropertyValuesTolerant( +uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL +SwXParagraph::setPropertyValuesTolerant( const uno::Sequence< OUString >& rPropertyNames, const uno::Sequence< uno::Any >& rValues ) - throw (lang::IllegalArgumentException, uno::RuntimeException) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard( Application::GetSolarMutex() ); if (rPropertyNames.getLength() != rValues.getLength()) + { throw lang::IllegalArgumentException(); + } - const SwTxtNode * const pTxtNode( GetTxtNode() ); - if (!pTxtNode) - throw uno::RuntimeException(); + SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow()); //SwNode& rTxtNode = pUnoCrsr->GetPoint()->nNode.GetNode(); //const SwAttrSet& rAttrSet = ((SwTxtNode&)rTxtNode).GetSwAttrSet(); //USHORT nAttrCount = rAttrSet.Count(); - sal_Int32 nProps = rPropertyNames.getLength(); + const sal_Int32 nProps = rPropertyNames.getLength(); const OUString *pProp = rPropertyNames.getConstArray(); //sal_Int32 nVals = rValues.getLength(); @@ -464,31 +628,39 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL SwXParagraph::setProp beans::SetPropertyTolerantFailed *pFailed = aFailed.getArray(); // get entry to start with - const SfxItemPropertyMap* pPropMap = m_pPropSet->getPropertyMap(); + SfxItemPropertyMap const*const pPropMap = + m_pImpl->m_rPropSet.getPropertyMap(); OUString sTmp; - SwPosition aPos( *pTxtNode ); + SwPosition aPos( rTxtNode ); SwCursor aCursor( aPos, 0, false ); - SwParaSelection aParaSel( & aCursor ); + SwParaSelection aParaSel( aCursor ); for (sal_Int32 i = 0; i < nProps; ++i) { try { pFailed[ nFailed ].Name = pProp[i]; - const SfxItemPropertySimpleEntry* pEntry = pPropMap->getByName( pProp[i] ); + SfxItemPropertySimpleEntry const*const pEntry = + pPropMap->getByName( pProp[i] ); if (!pEntry) - pFailed[ nFailed++ ].Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY; + { + pFailed[ nFailed++ ].Result = + beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY; + } else { // set property value // (compare to SwXParagraph::setPropertyValues) if (pEntry->nFlags & beans::PropertyAttribute::READONLY) - pFailed[ nFailed++ ].Result = beans::TolerantPropertySetResultType::PROPERTY_VETO; + { + pFailed[ nFailed++ ].Result = + beans::TolerantPropertySetResultType::PROPERTY_VETO; + } else { SwXTextCursor::SetPropertyValue( - aCursor, *m_pPropSet, pProp[i], pValue[i] ); + aCursor, m_pImpl->m_rPropSet, pProp[i], pValue[i]); } } } @@ -496,19 +668,23 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL SwXParagraph::setProp { // should not occur because property was searched for before DBG_ERROR( "unexpected exception catched" ); - pFailed[ nFailed++ ].Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY; + pFailed[ nFailed++ ].Result = + beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY; } catch (lang::IllegalArgumentException &) { - pFailed[ nFailed++ ].Result = beans::TolerantPropertySetResultType::ILLEGAL_ARGUMENT; + pFailed[ nFailed++ ].Result = + beans::TolerantPropertySetResultType::ILLEGAL_ARGUMENT; } catch (beans::PropertyVetoException &) { - pFailed[ nFailed++ ].Result = beans::TolerantPropertySetResultType::PROPERTY_VETO; + pFailed[ nFailed++ ].Result = + beans::TolerantPropertySetResultType::PROPERTY_VETO; } catch (lang::WrappedTargetException &) { - pFailed[ nFailed++ ].Result = beans::TolerantPropertySetResultType::WRAPPED_TARGET; + pFailed[ nFailed++ ].Result = + beans::TolerantPropertySetResultType::WRAPPED_TARGET; } } @@ -517,52 +693,56 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL SwXParagraph::setProp } -uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL SwXParagraph::getPropertyValuesTolerant( +uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL +SwXParagraph::getPropertyValuesTolerant( const uno::Sequence< OUString >& rPropertyNames ) - throw (uno::RuntimeException) +throw (uno::RuntimeException) { vos::OGuard aGuard( Application::GetSolarMutex() ); uno::Sequence< beans::GetDirectPropertyTolerantResult > aTmpRes( - GetPropertyValuesTolerant_Impl( rPropertyNames, sal_False ) ); - const beans::GetDirectPropertyTolerantResult *pTmpRes = aTmpRes.getConstArray(); + m_pImpl->GetPropertyValuesTolerant_Impl( rPropertyNames, false ) ); + const beans::GetDirectPropertyTolerantResult *pTmpRes = + aTmpRes.getConstArray(); // copy temporary result to final result type - sal_Int32 nLen = aTmpRes.getLength(); + const sal_Int32 nLen = aTmpRes.getLength(); uno::Sequence< beans::GetPropertyTolerantResult > aRes( nLen ); beans::GetPropertyTolerantResult *pRes = aRes.getArray(); for (sal_Int32 i = 0; i < nLen; i++) + { *pRes++ = *pTmpRes++; + } return aRes; } -uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXParagraph::getDirectPropertyValuesTolerant( +uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL +SwXParagraph::getDirectPropertyValuesTolerant( const uno::Sequence< OUString >& rPropertyNames ) - throw (uno::RuntimeException) +throw (uno::RuntimeException) { vos::OGuard aGuard( Application::GetSolarMutex() ); - return GetPropertyValuesTolerant_Impl( rPropertyNames, sal_True ); + + return m_pImpl->GetPropertyValuesTolerant_Impl( rPropertyNames, true ); } -uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXParagraph::GetPropertyValuesTolerant_Impl( +uno::Sequence< beans::GetDirectPropertyTolerantResult > +SwXParagraph::Impl::GetPropertyValuesTolerant_Impl( const uno::Sequence< OUString >& rPropertyNames, - sal_Bool bDirectValuesOnly ) - throw (uno::RuntimeException) + bool bDirectValuesOnly ) +throw (uno::RuntimeException) { vos::OGuard aGuard( Application::GetSolarMutex() ); - const SwTxtNode * const pTxtNode( GetTxtNode() ); - DBG_ASSERT( pTxtNode != NULL, "need text node" ); - if (!pTxtNode) - throw uno::RuntimeException(); + SwTxtNode & rTxtNode(GetTxtNodeOrThrow()); // #i46786# Use SwAttrSet pointer for determining the state. // Use the value SwAttrSet (from the paragraph OR the style) // for determining the actual value(s). - const SwAttrSet* pAttrSet = pTxtNode->GetpSwAttrSet(); - const SwAttrSet& rValueAttrSet = pTxtNode->GetSwAttrSet(); + const SwAttrSet* pAttrSet = rTxtNode.GetpSwAttrSet(); + const SwAttrSet& rValueAttrSet = rTxtNode.GetSwAttrSet(); sal_Int32 nProps = rPropertyNames.getLength(); const OUString *pProp = rPropertyNames.getConstArray(); @@ -572,7 +752,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXParagraph::G sal_Int32 nIdx = 0; // get entry to start with - const SfxItemPropertyMap *pPropMap = m_pPropSet->getPropertyMap(); + SfxItemPropertyMap const*const pPropMap = m_rPropSet.getPropertyMap(); for (sal_Int32 i = 0; i < nProps; ++i) { @@ -583,23 +763,28 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXParagraph::G { rResult.Name = pProp[i]; - const SfxItemPropertySimpleEntry* pEntry = pPropMap->getByName( pProp[i] ); + SfxItemPropertySimpleEntry const*const pEntry = + pPropMap->getByName( pProp[i] ); if (!pEntry) // property available? - rResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY; + { + rResult.Result = + beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY; + } else { // get property state // (compare to SwXParagraph::getPropertyState) sal_Bool bAttrSetFetched = sal_True; beans::PropertyState eState = lcl_SwXParagraph_getPropertyState( - *pTxtNode, &pAttrSet, *pEntry, bAttrSetFetched ); + rTxtNode, &pAttrSet, *pEntry, bAttrSetFetched ); rResult.State = eState; // if (bDirectValuesOnly && PropertyState_DIRECT_VALUE != eState) // rResult.Result = beans::TolerantPropertySetResultType::NO_DIRECT_VALUE; // else rResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_FAILURE; - if (!bDirectValuesOnly || beans::PropertyState_DIRECT_VALUE == eState) + if (!bDirectValuesOnly || + (beans::PropertyState_DIRECT_VALUE == eState)) { // get property value // (compare to SwXParagraph::getPropertyValue(s)) @@ -607,18 +792,21 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXParagraph::G if (!SwXParagraph::getDefaultTextContentValue( aValue, pProp[i], pEntry->nWID ) ) { - SwPosition aPos( *pTxtNode ); + SwPosition aPos( rTxtNode ); SwPaM aPam( aPos ); // handle properties that are not part of the attribute // and thus only pretendend to be paragraph attributes - BOOL bDone = FALSE; beans::PropertyState eTemp; - bDone = SwUnoCursorHelper::getCrsrPropertyValue( - *pEntry, aPam, &aValue, eTemp, pTxtNode ); + const bool bDone = + SwUnoCursorHelper::getCrsrPropertyValue( + *pEntry, aPam, &aValue, eTemp, &rTxtNode ); // if not found try the real paragraph attributes... if (!bDone) - m_pPropSet->getPropertyValue( *pEntry, rValueAttrSet, aValue ); + { + m_rPropSet.getPropertyValue( + *pEntry, rValueAttrSet, aValue ); + } } rResult.Value = aValue; @@ -661,7 +849,8 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXParagraph::G /* -----------------------------12.09.00 11:09-------------------------------- ---------------------------------------------------------------------------*/ -BOOL SwXParagraph::getDefaultTextContentValue(uno::Any& rAny, const OUString& rPropertyName, USHORT nWID) +bool SwXParagraph::getDefaultTextContentValue( + uno::Any& rAny, const OUString& rPropertyName, USHORT nWID) { if(!nWID) { @@ -694,35 +883,59 @@ BOOL SwXParagraph::getDefaultTextContentValue(uno::Any& rAny, const OUString& rP /*-- 11.12.98 08:12:50--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXParagraph::addPropertyChangeListener( - const OUString& /*PropertyName*/, - const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXParagraph::addPropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXParagraph::addPropertyChangeListener(): not implemented"); } + /*-- 11.12.98 08:12:50--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXParagraph::removePropertyChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXParagraph::removePropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXParagraph::removePropertyChangeListener(): not implemented"); } + /*-- 11.12.98 08:12:50--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXParagraph::addVetoableChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXParagraph::addVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXParagraph::addVetoableChangeListener(): not implemented"); } + /*-- 11.12.98 08:12:51--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXParagraph::removeVetoableChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXParagraph::removeVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXParagraph::removeVetoableChangeListener(): not implemented"); } + //----------------------------------------------------------------------------- beans::PropertyState lcl_SwXParagraph_getPropertyState( // SwUnoCrsr& rUnoCrsr, @@ -730,7 +943,7 @@ beans::PropertyState lcl_SwXParagraph_getPropertyState( const SwAttrSet** ppSet, const SfxItemPropertySimpleEntry& rEntry, sal_Bool &rAttrSetFetched ) - throw( beans::UnknownPropertyException) +throw (beans::UnknownPropertyException) { beans::PropertyState eRet = beans::PropertyState_DEFAULT_VALUE; @@ -786,348 +999,393 @@ beans::PropertyState lcl_SwXParagraph_getPropertyState( /*-- 05.03.99 11:37:30--------------------------------------------------- -----------------------------------------------------------------------*/ -beans::PropertyState SwXParagraph::getPropertyState(const OUString& rPropertyName) - throw( beans::UnknownPropertyException, uno::RuntimeException ) +beans::PropertyState SAL_CALL +SwXParagraph::getPropertyState(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - beans::PropertyState eRet = beans::PropertyState_DEFAULT_VALUE; - const SwTxtNode * const pTxtNode( GetTxtNode() ); - if (pTxtNode) + + SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow()); + + const SwAttrSet* pSet = 0; + SfxItemPropertySimpleEntry const*const pEntry = + m_pImpl->m_rPropSet.getPropertyMap()->getByName(rPropertyName); + if (!pEntry) { - const SwAttrSet* pSet = 0; - const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( rPropertyName ); - if(!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); - sal_Bool bDummy = sal_False; - eRet = lcl_SwXParagraph_getPropertyState( *pTxtNode, &pSet, *pEntry, - bDummy ); + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + rPropertyName, + static_cast(this)); } - else - throw uno::RuntimeException(); + sal_Bool bDummy = sal_False; + const beans::PropertyState eRet = + lcl_SwXParagraph_getPropertyState(rTxtNode, &pSet, *pEntry, bDummy); return eRet; } /*-- 05.03.99 11:37:32--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Sequence< beans::PropertyState > SwXParagraph::getPropertyStates( +uno::Sequence< beans::PropertyState > SAL_CALL +SwXParagraph::getPropertyStates( const uno::Sequence< OUString >& PropertyNames) - throw( beans::UnknownPropertyException, uno::RuntimeException ) +throw (beans::UnknownPropertyException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + + SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow()); + const OUString* pNames = PropertyNames.getConstArray(); uno::Sequence< beans::PropertyState > aRet(PropertyNames.getLength()); beans::PropertyState* pStates = aRet.getArray(); + SfxItemPropertyMap const*const pMap = m_pImpl->m_rPropSet.getPropertyMap(); + const SwAttrSet* pSet = 0; + sal_Bool bAttrSetFetched = sal_False; - const SwTxtNode * pTxtNode( GetTxtNode() ); - if (pTxtNode) + for (sal_Int32 i = 0, nEnd = PropertyNames.getLength(); i < nEnd; + ++i, ++pStates, ++pNames) { - const SfxItemPropertyMap* pMap = m_pPropSet->getPropertyMap(); - const SwAttrSet* pSet = 0; - sal_Bool bAttrSetFetched = sal_False; - for(sal_Int32 i = 0, nEnd = PropertyNames.getLength(); i < nEnd; i++,++pStates,++pNames ) + SfxItemPropertySimpleEntry const*const pEntry = + pMap->getByName( *pNames ); + if (!pEntry) { - const SfxItemPropertySimpleEntry* pEntry = pMap->getByName( *pNames ); - if(!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + *pNames, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + *pNames, + static_cast(this)); + } - if (bAttrSetFetched && !pSet && isATR(pEntry->nWID)) - { - *pStates = beans::PropertyState_DEFAULT_VALUE; - } - else - { - *pStates = lcl_SwXParagraph_getPropertyState( - *pTxtNode, &pSet, *pEntry, bAttrSetFetched ); - } + if (bAttrSetFetched && !pSet && isATR(pEntry->nWID)) + { + *pStates = beans::PropertyState_DEFAULT_VALUE; + } + else + { + *pStates = lcl_SwXParagraph_getPropertyState( + rTxtNode, &pSet, *pEntry, bAttrSetFetched ); } } - else - throw uno::RuntimeException(); return aRet; } + /*-- 05.03.99 11:37:33--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXParagraph::setPropertyToDefault(const OUString& rPropertyName) - throw( beans::UnknownPropertyException, uno::RuntimeException ) +void SAL_CALL +SwXParagraph::setPropertyToDefault(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - const SwTxtNode * pTxtNode( GetTxtNode() ); - if (pTxtNode) + + SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow()); + + SwPosition aPos( rTxtNode ); + SwCursor aCursor( aPos, 0, false ); + if (rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_ANCHOR_TYPE)) || + rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_ANCHOR_TYPES)) || + rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_TEXT_WRAP))) { - SwPosition aPos( *pTxtNode ); - SwCursor aCursor( aPos, 0, false ); - if( rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_ANCHOR_TYPE)) || - rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_ANCHOR_TYPES)) || - rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_TEXT_WRAP))) - return; + return; + } - // select paragraph - SwParaSelection aParaSel( & aCursor ); - const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( rPropertyName ); - if(pEntry) - { - if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw uno::RuntimeException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only:" ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + // select paragraph + SwParaSelection aParaSel( aCursor ); + SfxItemPropertySimpleEntry const*const pEntry = + m_pImpl->m_rPropSet.getPropertyMap()->getByName( rPropertyName ); + if (!pEntry) + { + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + rPropertyName, + static_cast(this)); + } - if(pEntry->nWID < RES_FRMATR_END) + if (pEntry->nFlags & beans::PropertyAttribute::READONLY) + { + throw uno::RuntimeException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only: ")) + + rPropertyName, + static_cast(this)); + } + + if (pEntry->nWID < RES_FRMATR_END) + { + SvUShortsSort aWhichIds; + aWhichIds.Insert(pEntry->nWID); + if (pEntry->nWID < RES_PARATR_BEGIN) + { + aCursor.GetDoc()->ResetAttrs(aCursor, sal_True, &aWhichIds); + } + else + { + // for paragraph attributes the selection must be extended + // to paragraph boundaries + SwPosition aStart( *aCursor.Start() ); + SwPosition aEnd ( *aCursor.End() ); + ::std::auto_ptr pTemp( + aCursor.GetDoc()->CreateUnoCrsr(aStart, sal_False) ); + if(!SwUnoCursorHelper::IsStartOfPara(*pTemp)) { - SvUShortsSort aWhichIds; - aWhichIds.Insert(pEntry->nWID); - if(pEntry->nWID < RES_PARATR_BEGIN) - { - aCursor.GetDoc()->ResetAttrs(aCursor, sal_True, &aWhichIds); - } - else - { - // for paragraph attributes the selection must be extended - // to paragraph boundaries - SwPosition aStart( *aCursor.Start() ); - SwPosition aEnd ( *aCursor.End() ); - std::auto_ptr pTemp( - aCursor.GetDoc()->CreateUnoCrsr(aStart, sal_False) ); - if(!SwUnoCursorHelper::IsStartOfPara(*pTemp)) - { - pTemp->MovePara(fnParaCurr, fnParaStart); - } - pTemp->SetMark(); - *pTemp->GetPoint() = aEnd; - //pTemp->Exchange(); - SwXTextCursor::SelectPam(*pTemp, sal_True); - if(!SwUnoCursorHelper::IsEndOfPara(*pTemp)) - { - pTemp->MovePara(fnParaCurr, fnParaEnd); - } - pTemp->GetDoc()->ResetAttrs(*pTemp, sal_True, &aWhichIds); - } + pTemp->MovePara(fnParaCurr, fnParaStart); } - else + pTemp->SetMark(); + *pTemp->GetPoint() = aEnd; + //pTemp->Exchange(); + SwXTextCursor::SelectPam(*pTemp, sal_True); + if (!SwUnoCursorHelper::IsEndOfPara(*pTemp)) { - SwUnoCursorHelper::resetCrsrPropertyValue(*pEntry, aCursor); + pTemp->MovePara(fnParaCurr, fnParaEnd); } + pTemp->GetDoc()->ResetAttrs(*pTemp, sal_True, &aWhichIds); } - else - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } else - throw uno::RuntimeException(); + { + SwUnoCursorHelper::resetCrsrPropertyValue(*pEntry, aCursor); + } } + /*-- 05.03.99 11:37:33--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXParagraph::getPropertyDefault(const OUString& rPropertyName) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +uno::Any SAL_CALL +SwXParagraph::getPropertyDefault(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { + vos::OGuard g(Application::GetSolarMutex()); + + SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow()); + uno::Any aRet; - const SwTxtNode * pTxtNode( GetTxtNode() ); - if (pTxtNode) + if (SwXParagraph::getDefaultTextContentValue(aRet, rPropertyName)) { - if(SwXParagraph::getDefaultTextContentValue(aRet, rPropertyName)) - return aRet; + return aRet; + } - const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( rPropertyName ); - if(pEntry) - { - if(pEntry->nWID < RES_FRMATR_END) - { - const SfxPoolItem& rDefItem = - pTxtNode->GetDoc()->GetAttrPool().GetDefaultItem( - pEntry->nWID); - rDefItem.QueryValue(aRet, pEntry->nMemberId); - } - } - else - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + SfxItemPropertySimpleEntry const*const pEntry = + m_pImpl->m_rPropSet.getPropertyMap()->getByName(rPropertyName); + if (!pEntry) + { + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + rPropertyName, + static_cast(this)); + } + + if (pEntry->nWID < RES_FRMATR_END) + { + const SfxPoolItem& rDefItem = + rTxtNode.GetDoc()->GetAttrPool().GetDefaultItem(pEntry->nWID); + rDefItem.QueryValue(aRet, pEntry->nMemberId); } - else - throw uno::RuntimeException(); return aRet; } + /*-- 11.12.98 08:12:51--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXParagraph::attach(const uno::Reference< text::XTextRange > & /*xTextRange*/) - throw( lang::IllegalArgumentException, uno::RuntimeException ) +void SAL_CALL +SwXParagraph::attach(const uno::Reference< text::XTextRange > & /*xTextRange*/) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - // SwXParagraph will only created in order to be inserteb by + // SwXParagraph will only created in order to be inserted by // 'insertTextContentBefore' or 'insertTextContentAfter' therefore // they cannot be attached throw uno::RuntimeException(); } + /*-- 11.12.98 08:12:51--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextRange > SwXParagraph::getAnchor(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextRange > SAL_CALL +SwXParagraph::getAnchor() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextRange > aRet; - const SwTxtNode * pTxtNode( GetTxtNode() ); - if (pTxtNode) - { - SwPosition aPos( *pTxtNode ); - SwCursor aCursor( aPos, 0, false ); - // select paragraph - SwParaSelection aParaSel( & aCursor ); - aRet = new SwXTextRange(aCursor, xParentText); - } - else - throw uno::RuntimeException(); - return aRet; + + SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow()); + + SwPosition aPos( rTxtNode ); + SwCursor aCursor( aPos, 0, false ); + // select paragraph + SwParaSelection aParaSel( aCursor ); + const uno::Reference< text::XTextRange > xRet = + new SwXTextRange(aCursor, m_pImpl->m_xParentText); + return xRet; } + /*-- 11.12.98 08:12:52--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXParagraph::dispose(void) throw( uno::RuntimeException ) +void SAL_CALL SwXParagraph::dispose() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwTxtNode * pTxtNode( GetTxtNode() ); + + SwTxtNode *const pTxtNode( m_pImpl->GetTxtNode() ); if (pTxtNode) { SwCursor aCursor( SwPosition( *pTxtNode ), 0, false ); // select paragraph { - SwParaSelection aParaSel( & aCursor ); + SwParaSelection aParaSel( aCursor ); pTxtNode->GetDoc()->DelFullPara(aCursor); } - aLstnrCntnr.Disposing(); + m_pImpl->m_ListenerContainer.Disposing(); } - else - throw uno::RuntimeException(); } + /*-- 11.12.98 08:12:52--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXParagraph::addEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException ) +void SAL_CALL SwXParagraph::addEventListener( + const uno::Reference< lang::XEventListener > & xListener) +throw (uno::RuntimeException) { - if(!GetRegisteredIn()) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->GetTxtNode()) + { throw uno::RuntimeException(); - aLstnrCntnr.AddListener(aListener); + } + m_pImpl->m_ListenerContainer.AddListener(xListener); } /*-- 11.12.98 08:12:53--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXParagraph::removeEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException ) +void SAL_CALL SwXParagraph::removeEventListener( + const uno::Reference< lang::XEventListener > & xListener) +throw (uno::RuntimeException) { - if(!GetRegisteredIn() || !aLstnrCntnr.RemoveListener(aListener)) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->GetTxtNode() || + !m_pImpl->m_ListenerContainer.RemoveListener(xListener)) + { throw uno::RuntimeException(); + } } + /*-- 11.12.98 08:12:53--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< container::XEnumeration > SwXParagraph::createEnumeration(void) throw( uno::RuntimeException ) +uno::Reference< container::XEnumeration > SAL_CALL +SwXParagraph::createEnumeration() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< container::XEnumeration > aRef; - const SwTxtNode * pTxtNode( GetTxtNode() ); - if (pTxtNode) - { - SwPosition aPos( *pTxtNode ); - SwPaM aPam ( aPos ); - aRef = new SwXTextPortionEnumeration(aPam, xParentText, - nSelectionStartPos, nSelectionEndPos); - } - else - throw uno::RuntimeException(); - return aRef; + SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow()); + + SwPosition aPos( rTxtNode ); + SwPaM aPam ( aPos ); + const uno::Reference< container::XEnumeration > xRef = + new SwXTextPortionEnumeration(aPam, m_pImpl->m_xParentText, + m_pImpl->m_nSelectionStartPos, m_pImpl->m_nSelectionEndPos); + return xRef; } + /*-- 11.12.98 08:12:54--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Type SwXParagraph::getElementType(void) throw( uno::RuntimeException ) +uno::Type SAL_CALL SwXParagraph::getElementType() throw (uno::RuntimeException) { - return ::getCppuType((uno::Reference*)0); + return text::XTextRange::static_type(); } /*-- 11.12.98 08:12:54--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXParagraph::hasElements(void) throw( uno::RuntimeException ) +sal_Bool SAL_CALL SwXParagraph::hasElements() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); return (GetTxtNode()) ? sal_True : sal_False; } + /*-- 11.12.98 08:12:55--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XText > SwXParagraph::getText(void) throw( uno::RuntimeException ) +uno::Reference< text::XText > SAL_CALL +SwXParagraph::getText() throw (uno::RuntimeException) { - return xParentText; + vos::OGuard g(Application::GetSolarMutex()); + + return m_pImpl->m_xParentText; } + /*-- 11.12.98 08:12:55--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextRange > SwXParagraph::getStart(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextRange > SAL_CALL +SwXParagraph::getStart() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextRange > xRet; - const SwTxtNode * pTxtNode( GetTxtNode() ); - if (pTxtNode) - { - SwPosition aPos( *pTxtNode ); - SwCursor aCursor( aPos, 0, false ); - SwParaSelection aParaSel( &aCursor ); - SwPaM aPam( *aCursor.Start() ); - uno::Reference< text::XText > xParent = getText(); - xRet = new SwXTextRange(aPam, xParent); - } - else - throw uno::RuntimeException(); + + SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow()); + + SwPosition aPos( rTxtNode ); + SwCursor aCursor( aPos, 0, false ); + SwParaSelection aParaSel( aCursor ); + SwPaM aPam( *aCursor.Start() ); + uno::Reference< text::XText > xParent = getText(); + const uno::Reference< text::XTextRange > xRet = + new SwXTextRange(aPam, xParent); return xRet; } /*-- 11.12.98 08:12:56--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextRange > SwXParagraph::getEnd(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextRange > SAL_CALL +SwXParagraph::getEnd() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextRange > xRet; - const SwTxtNode * pTxtNode( GetTxtNode() ); - if (pTxtNode) - { - SwPosition aPos( *pTxtNode ); - SwCursor aCursor( aPos, 0, false ); - SwParaSelection aParaSel( &aCursor ); - SwPaM aPam( *aCursor.End() ); - uno::Reference< text::XText > xParent = getText(); - xRet = new SwXTextRange(aPam, xParent); - } - else - throw uno::RuntimeException(); + + SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow()); + + SwPosition aPos( rTxtNode ); + SwCursor aCursor( aPos, 0, false ); + SwParaSelection aParaSel( aCursor ); + SwPaM aPam( *aCursor.End() ); + uno::Reference< text::XText > xParent = getText(); + const uno::Reference< text::XTextRange > xRet = + new SwXTextRange(aPam, xParent); return xRet; } + /*-- 11.12.98 08:12:56--------------------------------------------------- -----------------------------------------------------------------------*/ -OUString SwXParagraph::getString(void) throw( uno::RuntimeException ) +OUString SAL_CALL SwXParagraph::getString() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); OUString aRet; - const SwTxtNode * pTxtNode( GetTxtNode() ); + SwTxtNode const*const pTxtNode( GetTxtNode() ); if (pTxtNode) { SwPosition aPos( *pTxtNode ); SwCursor aCursor( aPos, 0, false ); - SwParaSelection aParaSel( & aCursor ); + SwParaSelection aParaSel( aCursor ); SwXTextCursor::getTextFromPam(aCursor, aRet); } - else if(IsDescriptor()) - aRet = m_sText; + else if (m_pImpl->IsDescriptor()) + { + aRet = m_pImpl->m_sText; + } else + { throw uno::RuntimeException(); + } return aRet; } /*-- 11.12.98 08:12:57--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXParagraph::setString(const OUString& aString) throw( uno::RuntimeException ) +void SAL_CALL SwXParagraph::setString(const OUString& aString) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - const SwTxtNode * pTxtNode( GetTxtNode() ); + SwTxtNode const*const pTxtNode( GetTxtNode() ); if (pTxtNode) { SwPosition aPos( *pTxtNode ); @@ -1142,23 +1400,33 @@ void SwXParagraph::setString(const OUString& aString) throw( uno::RuntimeExcepti SwXTextCursor::SetString(aCursor, aString); SwXTextCursor::SelectPam(aCursor, sal_False); } - else if(IsDescriptor()) - m_sText = aString; + else if (m_pImpl->IsDescriptor()) + { + m_pImpl->m_sText = aString; + } else + { throw uno::RuntimeException(); - + } } + /* -----------------23.03.99 12:49------------------- * * --------------------------------------------------*/ -uno::Reference< container::XEnumeration > SwXParagraph::createContentEnumeration(const OUString& rServiceName) - throw( uno::RuntimeException ) +uno::Reference< container::XEnumeration > SAL_CALL +SwXParagraph::createContentEnumeration(const OUString& rServiceName) +throw (uno::RuntimeException) { - const SwTxtNode * pTxtNode( GetTxtNode() ); - if(!pTxtNode || !rServiceName.equalsAscii("com.sun.star.text.TextContent")) + vos::OGuard g(Application::GetSolarMutex()); + + if (!rServiceName.equalsAscii("com.sun.star.text.TextContent")) + { throw uno::RuntimeException(); + } - SwPosition aPos( *pTxtNode ); + SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow()); + + SwPosition aPos( rTxtNode ); SwPaM aPam( aPos ); uno::Reference< container::XEnumeration > xRet = new SwXParaFrameEnumeration(aPam, PARAFRAME_PORTION_PARAGRAPH); @@ -1167,50 +1435,31 @@ uno::Reference< container::XEnumeration > SwXParagraph::createContentEnumeratio /* -----------------23.03.99 12:49------------------- * * --------------------------------------------------*/ -uno::Sequence< OUString > SwXParagraph::getAvailableServiceNames(void) throw( uno::RuntimeException ) +uno::Sequence< OUString > SAL_CALL +SwXParagraph::getAvailableServiceNames() throw (uno::RuntimeException) { uno::Sequence< OUString > aRet(1); OUString* pArray = aRet.getArray(); pArray[0] = C2U("com.sun.star.text.TextContent"); return aRet; } -/*-- 11.12.98 08:12:58--------------------------------------------------- - - -----------------------------------------------------------------------*/ -void SwXParagraph::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew) -{ - ClientModify(this, pOld, pNew); - if(!GetRegisteredIn()) - aLstnrCntnr.Disposing(); -} - -const SwTxtNode * SwXParagraph::GetTxtNode() const -{ - return static_cast(GetRegisteredIn()); -} -SwTxtNode * SwXParagraph::GetTxtNode() -{ - return static_cast(pRegisteredIn); -} +// MetadatableMixin ::sfx2::Metadatable* SwXParagraph::GetCoreObject() { - SwTxtNode * pTxtNode( GetTxtNode() ); + SwTxtNode *const pTxtNode( m_pImpl->GetTxtNode() ); return pTxtNode; } uno::Reference SwXParagraph::GetModel() { - SwTxtNode * pTxtNode( GetTxtNode() ); + SwTxtNode *const pTxtNode( m_pImpl->GetTxtNode() ); if (pTxtNode) { - const SwDocShell * pShell( pTxtNode->GetDoc()->GetDocShell() ); + SwDocShell const*const pShell( pTxtNode->GetDoc()->GetDocShell() ); return (pShell) ? pShell->GetModel() : 0; } - else - { - return 0; - } + return 0; } diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index b758f9104b..d81664310a 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -666,7 +666,10 @@ void SwXText::insertTextContentBefore( throw aRuntime; } - SwXParagraph* pPara = SwXParagraph::GetImplementation(xNewContent); + const uno::Reference xParaTunnel(xNewContent, + uno::UNO_QUERY); + SwXParagraph *const pPara = + ::sw::UnoTunnelGetImplementation(xParaTunnel); if(!pPara || !pPara->IsDescriptor() || !xSuccessor.is()) throw lang::IllegalArgumentException(); @@ -718,7 +721,10 @@ void SwXText::insertTextContentAfter( vos::OGuard aGuard(Application::GetSolarMutex()); if(!GetDoc()) throw uno::RuntimeException(); - SwXParagraph* pPara = SwXParagraph::GetImplementation(xNewContent); + const uno::Reference xParaTunnel(xNewContent, + uno::UNO_QUERY); + SwXParagraph *const pPara = + ::sw::UnoTunnelGetImplementation(xParaTunnel); if(!pPara || !pPara->IsDescriptor() || !xPredecessor.is()) throw lang::IllegalArgumentException(); @@ -1414,7 +1420,10 @@ uno::Reference< text::XTextRange > SwXText::finishOrAppendParagraph( } SwTxtNode * pTxtNode( aPam.Start()->nNode.GetNode().GetTxtNode() ); OSL_ENSURE(pTxtNode, "no SwTxtNode?"); - xRet = new SwXParagraph(this, pTxtNode); + if (pTxtNode) + { + xRet.set(SwXParagraph::CreateXParagraph(*pDoc, *pTxtNode, this), uno::UNO_QUERY); + } } return xRet; -- cgit v1.2.3 From e975eef29be0ba9ae056a9d2da499906d4e8152d Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:51 +0100 Subject: swunolocking1: #i105557#: fix locking for SwXParagraphEnumeration: add Impl struct, and use UnoImplPtr to lock destructor. move all implementation details out of header, into Impl struct. use new XServiceInfo helpers. clean up the implementation a little. --- sw/inc/unoparagraph.hxx | 56 +---- sw/source/core/unocore/unoframe.cxx | 7 +- sw/source/core/unocore/unoftn.cxx | 8 +- sw/source/core/unocore/unoobj2.cxx | 445 ++++++++++++++++++++-------------- sw/source/core/unocore/unoredline.cxx | 8 +- sw/source/core/unocore/unotbl.cxx | 13 +- sw/source/core/unocore/unotext.cxx | 15 +- 7 files changed, 303 insertions(+), 249 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx index d5c5e2ed28..b14aeb7dc3 100644 --- a/sw/inc/unoparagraph.hxx +++ b/sw/inc/unoparagraph.hxx @@ -32,6 +32,8 @@ #ifndef SW_UNOPARAGRAPH_HXX #define SW_UNOPARAGRAPH_HXX +#include + #include #include #include @@ -47,16 +49,13 @@ #include -#include #include struct SwPosition; class SwPaM; class SwUnoCrsr; -class SwStartNode; class SwTxtNode; -class SwTable; class SwXText; @@ -327,60 +326,23 @@ public: --------------------------------------------------*/ class SwXParagraphEnumeration : public SwSimpleEnumeration_Base - , public SwClient { private: - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > - xParentText; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > - xNextPara; - - const SwTable * pOwnTable; - /// Start node of the cell the enumeration belongs to. - /// Used to restrict the movement of the UNO cursor to the cell and its - /// embedded tables. - const SwStartNode * pOwnStartNode; - sal_Int32 nFirstParaStart; - sal_Int32 nLastParaEnd; - ULONG nEndIndex; - CursorType eCursorType; - BOOL bFirstParagraph; - - SwUnoCrsr* GetCrsr() {return (SwUnoCrsr*)GetRegisteredIn();} - -protected: + class Impl; + ::sw::UnoImplPtr m_pImpl; virtual ~SwXParagraphEnumeration(); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent > SAL_CALL - NextElement_Impl() - throw (::com::sun::star::container::NoSuchElementException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - public: + /// takes ownership of cursor SwXParagraphEnumeration( - SwXText* pParent, SwPosition& rPos, CursorType eType); - SwXParagraphEnumeration( - SwXText* pParent, SwUnoCrsr* pCrsr, CursorType eType); - - // non-Uno functions - - void SetOwnTable(const SwTable* pTable) - { pOwnTable = pTable; } - const SwTable* GetOwnTable() const - { return pOwnTable; } - void SetOwnStartNode(const SwStartNode* pNode) - { pOwnStartNode = pNode; } - const SwStartNode* GetOwnStartNode() const - { return pOwnStartNode; } - - // SwClient - virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > + const & xParent, + ::std::auto_ptr pCursor, + const CursorType eType); // XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName() diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index f4d7ea34be..5457e7d0f5 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2700,14 +2700,15 @@ uno::Reference< container::XEnumeration > SwXTextFrame::createEnumeration(void) if(pFmt) { SwPosition aPos(pFmt->GetCntnt().GetCntntIdx()->GetNode()); - SwUnoCrsr* pUnoCrsr = GetDoc()->CreateUnoCrsr(aPos, sal_False); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); + ::std::auto_ptr pUnoCursor( + GetDoc()->CreateUnoCrsr(aPos, sal_False)); + pUnoCursor->Move(fnMoveForward, fnGoNode); // // no Cursor in protected sections // SwCrsrSaveState aSave( *pUnoCrsr ); // if(pUnoCrsr->IsInProtectTable( sal_True ) || // pUnoCrsr->IsSelOvr( SELOVER_TOGGLE | SELOVER_CHANGEPOS )) // throw uno::RuntimeException() ); - aRef = new SwXParagraphEnumeration(this, pUnoCrsr, CURSOR_FRAME); + aRef = new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_FRAME); } return aRef; } diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index 7c0f8adbe3..4f07cebed1 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -439,10 +439,10 @@ uno::Reference< container::XEnumeration > SwXFootnote::createEnumeration() thro { const SwTxtFtn* pTxtFtn = pFmt->GetTxtFtn(); SwPosition aPos( *pTxtFtn->GetStartNode() ); - SwXTextCursor* pXCrsr = new SwXTextCursor(this, aPos, CURSOR_FOOTNOTE, GetDoc()); - SwUnoCrsr* pUnoCrsr = pXCrsr->GetCrsr(); - pUnoCrsr->Move(fnMoveForward, fnGoNode); - aRef = new SwXParagraphEnumeration(this, pUnoCrsr, CURSOR_FOOTNOTE); + ::std::auto_ptr pUnoCursor( + GetDoc()->CreateUnoCrsr(aPos, sal_False)); + pUnoCursor->Move(fnMoveForward, fnGoNode); + aRef = new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_FOOTNOTE); } return aRef; } diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 342e078290..23f4a043a5 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -699,28 +699,22 @@ uno::Reference< XEnumeration > SwXTextCursor::createEnumeration(void) throw( Ru sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething(SwXText::getUnoTunnelId()) )); } DBG_ASSERT(pParentText, "parent is not a SwXText"); + if (!pParentText) + { + throw uno::RuntimeException(); + } - SwUnoCrsr* pNewCrsr = pUnoCrsr->GetDoc()->CreateUnoCrsr(*pUnoCrsr->GetPoint()); + ::std::auto_ptr pNewCrsr( + pUnoCrsr->GetDoc()->CreateUnoCrsr(*pUnoCrsr->GetPoint()) ); if(pUnoCrsr->HasMark()) { pNewCrsr->SetMark(); *pNewCrsr->GetMark() = *pUnoCrsr->GetMark(); } - CursorType eSetType = eType == CURSOR_TBLTEXT ? CURSOR_SELECTION_IN_TABLE : CURSOR_SELECTION; - SwXParagraphEnumeration *pEnum = + const CursorType eSetType = (CURSOR_TBLTEXT == eType) + ? CURSOR_SELECTION_IN_TABLE : CURSOR_SELECTION; + const uno::Reference< XEnumeration > xRet = new SwXParagraphEnumeration(pParentText, pNewCrsr, eSetType); - uno::Reference< XEnumeration > xRet = pEnum; - if (eType == CURSOR_TBLTEXT) - { - // for import of tables in tables we have to remember the actual - // table and start node of the current position in the enumeration. - SwTableNode *pStartN = pUnoCrsr->GetPoint()->nNode.GetNode().FindTableNode(); - if (pStartN) - { - pEnum->SetOwnTable( &pStartN->GetTable() ); - pEnum->SetOwnStartNode( pStartN ); - } - } return xRet; } @@ -959,103 +953,180 @@ void SwXTextCursor::GetCrsrAttr( SwPaM& rPam, /****************************************************************** * SwXParagraphEnumeration ******************************************************************/ -/* -----------------------------06.04.00 16:33-------------------------------- - ---------------------------------------------------------------------------*/ -OUString SwXParagraphEnumeration::getImplementationName(void) throw( RuntimeException ) +static SwStartNode * +lcl_InitStartNode(const CursorType eType, SwUnoCrsr *const pCursor) { - return C2U("SwXParagraphEnumeration"); + switch (eType) + { + case CURSOR_TBLTEXT: // table cell: pCursor points at first paragraph + return pCursor->Start()->nNode.GetNode().StartOfSectionNode(); + case CURSOR_SELECTION_IN_TABLE: // table + return pCursor->Start()->nNode.GetNode().FindTableNode(); + default: + return 0; + } } -/* -----------------------------06.04.00 16:33-------------------------------- - ---------------------------------------------------------------------------*/ -BOOL SwXParagraphEnumeration::supportsService(const OUString& rServiceName) throw( RuntimeException ) +static SwTable const* +lcl_InitTable(const CursorType eType, SwStartNode const*const pStartNode) { - return C2U("com.sun.star.text.ParagraphEnumeration") == rServiceName; -} -/* -----------------------------06.04.00 16:33-------------------------------- + switch (eType) + { + case CURSOR_TBLTEXT: // table cell + return & pStartNode->FindTableNode()->GetTable(); + case CURSOR_SELECTION_IN_TABLE: // table + return & static_cast(pStartNode)->GetTable(); + default: + return 0; + } +} + +class SwXParagraphEnumeration::Impl + : public SwClient +{ + +public: + + uno::Reference< text::XText > const m_xParentText; + const CursorType m_eCursorType; + /// Start node of the cell _or_ table the enumeration belongs to. + /// Used to restrict the movement of the UNO cursor to the cell and its + /// embedded tables. + SwStartNode const*const m_pOwnStartNode; + SwTable const*const m_pOwnTable; + const ULONG m_nEndIndex; + sal_Int32 m_nFirstParaStart; + sal_Int32 m_nLastParaEnd; + bool m_bFirstParagraph; + uno::Reference< text::XTextContent > m_xNextPara; + + Impl( uno::Reference< text::XText > const& xParent, + ::std::auto_ptr pCursor, + const CursorType eType) + : SwClient( pCursor.release() ) + , m_xParentText( xParent ) + , m_eCursorType( eType ) + // remember table and start node for later travelling + // (used in export of tables in tables) + , m_pOwnStartNode( lcl_InitStartNode(eType, GetCursor()) ) + // for import of tables in tables we have to remember the actual + // table and start node of the current position in the enumeration. + , m_pOwnTable( lcl_InitTable(eType, m_pOwnStartNode) ) + , m_nEndIndex( GetCursor()->End()->nNode.GetIndex() ) + , m_nFirstParaStart( -1 ) + , m_nLastParaEnd( -1 ) + , m_bFirstParagraph( true ) + { + OSL_ENSURE(m_xParentText.is(), "SwXParagraphEnumeration: no parent?"); + OSL_ENSURE(GetRegisteredIn(), "SwXParagraphEnumeration: no cursor?"); - ---------------------------------------------------------------------------*/ -Sequence< OUString > SwXParagraphEnumeration::getSupportedServiceNames(void) throw( RuntimeException ) -{ - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.ParagraphEnumeration"); - return aRet; -} -/*-- 10.12.98 11:52:12--------------------------------------------------- + if ((CURSOR_SELECTION == m_eCursorType) || + (CURSOR_SELECTION_IN_TABLE == m_eCursorType)) + { + SwUnoCrsr & rCursor = *GetCursor(); + rCursor.Normalize(); + m_nFirstParaStart = rCursor.GetPoint()->nContent.GetIndex(); + m_nLastParaEnd = rCursor.GetMark()->nContent.GetIndex(); + rCursor.DeleteMark(); + } + } - -----------------------------------------------------------------------*/ -SwXParagraphEnumeration::SwXParagraphEnumeration(SwXText* pParent, - SwPosition& rPos, - CursorType eType) : - xParentText(pParent), - nFirstParaStart(-1), - nLastParaEnd(-1), - nEndIndex(rPos.nNode.GetIndex()), - eCursorType(eType), - bFirstParagraph(sal_True) -{ - pOwnTable = 0; - pOwnStartNode = 0; - SwUnoCrsr* pUnoCrsr = pParent->GetDoc()->CreateUnoCrsr(rPos, sal_False); - pUnoCrsr->Add(this); + ~Impl() { + // Impl owns the cursor; delete it here: SolarMutex is locked + delete GetRegisteredIn(); + } + + SwUnoCrsr * GetCursor() { + return static_cast( + const_cast(GetRegisteredIn())); + } + + uno::Reference< text::XTextContent > NextElement_Impl() + throw (container::NoSuchElementException, lang::WrappedTargetException, + uno::RuntimeException); + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + +}; + +void SwXParagraphEnumeration::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) +{ + ClientModify(this, pOld, pNew); } /*-- 10.12.98 11:52:12--------------------------------------------------- -----------------------------------------------------------------------*/ -SwXParagraphEnumeration::SwXParagraphEnumeration(SwXText* pParent, - SwUnoCrsr* pCrsr, - CursorType eType) : - SwClient(pCrsr), - xParentText(pParent), - nFirstParaStart(-1), - nLastParaEnd(-1), - nEndIndex(pCrsr->End()->nNode.GetIndex()), - eCursorType(eType), - bFirstParagraph(sal_True) -{ - pOwnTable = 0; - pOwnStartNode = 0; - if(CURSOR_SELECTION == eCursorType || CURSOR_SELECTION_IN_TABLE == eCursorType) - { - if(*pCrsr->GetPoint() > *pCrsr->GetMark()) - pCrsr->Exchange(); - nFirstParaStart = pCrsr->GetPoint()->nContent.GetIndex(); - nLastParaEnd = pCrsr->GetMark()->nContent.GetIndex(); - if(pCrsr->HasMark()) - pCrsr->DeleteMark(); - } +SwXParagraphEnumeration::SwXParagraphEnumeration( + uno::Reference< text::XText > const& xParent, + ::std::auto_ptr pCursor, + const CursorType eType) + : m_pImpl( new SwXParagraphEnumeration::Impl(xParent, pCursor, eType) ) +{ } /*-- 10.12.98 11:52:12--------------------------------------------------- -----------------------------------------------------------------------*/ SwXParagraphEnumeration::~SwXParagraphEnumeration() { - vos::OGuard aGuard(Application::GetSolarMutex()); - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) - delete pUnoCrsr; +} + +/* -----------------------------06.04.00 16:33-------------------------------- + + ---------------------------------------------------------------------------*/ +OUString SAL_CALL +SwXParagraphEnumeration::getImplementationName() throw (uno::RuntimeException) +{ + return C2U("SwXParagraphEnumeration"); +} +/* -----------------------------06.04.00 16:33-------------------------------- + + ---------------------------------------------------------------------------*/ +static char const*const g_ServicesParagraphEnum[] = +{ + "com.sun.star.text.ParagraphEnumeration", +}; +static const size_t g_nServicesParagraphEnum( + sizeof(g_ServicesParagraphEnum)/sizeof(g_ServicesParagraphEnum[0])); +sal_Bool SAL_CALL +SwXParagraphEnumeration::supportsService(const OUString& rServiceName) +throw (uno::RuntimeException) +{ + return ::sw::SupportsServiceImpl( + g_nServicesParagraphEnum, g_ServicesParagraphEnum, rServiceName); } +/* -----------------------------06.04.00 16:33-------------------------------- + + ---------------------------------------------------------------------------*/ +uno::Sequence< OUString > SAL_CALL +SwXParagraphEnumeration::getSupportedServiceNames() +throw (uno::RuntimeException) +{ + return ::sw::GetSupportedServiceNamesImpl( + g_nServicesParagraphEnum, g_ServicesParagraphEnum); +} + /*-- 10.12.98 11:52:13--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXParagraphEnumeration::hasMoreElements(void) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXParagraphEnumeration::hasMoreElements() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - return bFirstParagraph ? sal_True : xNextPara.is(); + + return (m_pImpl->m_bFirstParagraph) ? sal_True : m_pImpl->m_xNextPara.is(); } /*-- 14.08.03 13:10:14--------------------------------------------------- -----------------------------------------------------------------------*/ //!! compare to SwShellTableCrsr::FillRects() in viscrs.cxx -SwTableNode * lcl_FindTopLevelTable( - /*SwUnoCrsr* pUnoCrsr ,*/ - SwTableNode *pTblNode, - const SwTable *pOwnTable ) +static SwTableNode * +lcl_FindTopLevelTable( + SwTableNode *const pTblNode, SwTable const*const pOwnTable) { // find top-most table in current context (section) level @@ -1070,14 +1141,14 @@ SwTableNode * lcl_FindTopLevelTable( } -BOOL lcl_CursorIsInSection( - const SwUnoCrsr *pUnoCrsr, - const SwStartNode *pOwnStartNode ) +static bool +lcl_CursorIsInSection( + SwUnoCrsr const*const pUnoCrsr, SwStartNode const*const pOwnStartNode) { // returns true if the cursor is in the section (or in a sub section!) // represented by pOwnStartNode - BOOL bRes = TRUE; + bool bRes = true; if (pUnoCrsr && pOwnStartNode) { const SwEndNode * pOwnEndNode = pOwnStartNode->EndOfSectionNode(); @@ -1088,124 +1159,134 @@ BOOL lcl_CursorIsInSection( } -uno::Reference< XTextContent > SAL_CALL SwXParagraphEnumeration::NextElement_Impl(void) - throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException ) +uno::Reference< text::XTextContent > +SwXParagraphEnumeration::Impl::NextElement_Impl() +throw (container::NoSuchElementException, lang::WrappedTargetException, + uno::RuntimeException) { - uno::Reference< XTextContent > aRef; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) + SwUnoCrsr *const pUnoCrsr = GetCursor(); + if (!pUnoCrsr) { - // check for exceeding selections - if(!bFirstParagraph && - (CURSOR_SELECTION == eCursorType || CURSOR_SELECTION_IN_TABLE == eCursorType)) + throw uno::RuntimeException(); + } + + // check for exceeding selections + if (!m_bFirstParagraph && + ((CURSOR_SELECTION == m_eCursorType) || + (CURSOR_SELECTION_IN_TABLE == m_eCursorType))) + { + SwPosition* pStart = pUnoCrsr->Start(); + const ::std::auto_ptr aNewCrsr( + pUnoCrsr->GetDoc()->CreateUnoCrsr(*pStart, sal_False) ); + // one may also go into tables here + if ((CURSOR_TBLTEXT != m_eCursorType) && + (CURSOR_SELECTION_IN_TABLE != m_eCursorType)) { - SwPosition* pStart = pUnoCrsr->Start(); - ::std::auto_ptr aNewCrsr( pUnoCrsr->GetDoc()->CreateUnoCrsr(*pStart, sal_False) ); - //man soll hier auch in Tabellen landen duerfen - if(CURSOR_TBLTEXT != eCursorType && CURSOR_SELECTION_IN_TABLE != eCursorType) - aNewCrsr->SetRemainInSection( sal_False ); - - // os 2005-01-14: This part is only necessary to detect movements out of a selection - // if there is no selection we don't have to care - SwTableNode* pTblNode = aNewCrsr->GetNode()->FindTableNode(); - if((CURSOR_TBLTEXT != eCursorType && CURSOR_SELECTION_IN_TABLE != eCursorType) && pTblNode) - { - aNewCrsr->GetPoint()->nNode = pTblNode->EndOfSectionIndex(); - aNewCrsr->Move(fnMoveForward, fnGoNode); - } - else - aNewCrsr->MovePara(fnParaNext, fnParaStart); - if(nEndIndex < aNewCrsr->Start()->nNode.GetIndex()) - return aRef; // empty reference + aNewCrsr->SetRemainInSection( sal_False ); } - XText* pText = xParentText.get(); - sal_Bool bInTable = sal_False; - if(!bFirstParagraph) + // os 2005-01-14: This part is only necessary to detect movements out + // of a selection; if there is no selection we don't have to care + SwTableNode *const pTblNode = aNewCrsr->GetNode()->FindTableNode(); + if (((CURSOR_TBLTEXT != m_eCursorType) && + (CURSOR_SELECTION_IN_TABLE != m_eCursorType)) && pTblNode) { - //man soll hier auch in Tabellen landen duerfen - //if(CURSOR_TBLTEXT != eCursorType && CURSOR_SELECTION_IN_TABLE != eCursorType) - { - //BOOL bRemain = sal_False; - //pUnoCrsr->SetRemainInSection( bRemain ); - pUnoCrsr->SetRemainInSection( sal_False ); - //was mache ich, wenn ich schon in einer Tabelle stehe? - SwTableNode* pTblNode = pUnoCrsr->GetNode()->FindTableNode(); - pTblNode = lcl_FindTopLevelTable( /*pUnoCrsr,*/ pTblNode, pOwnTable ); - if(pTblNode && &pTblNode->GetTable() != pOwnTable) - { - // wir haben es mit einer fremden Tabelle zu tun - also ans Ende - pUnoCrsr->GetPoint()->nNode = pTblNode->EndOfSectionIndex(); - if(!pUnoCrsr->Move(fnMoveForward, fnGoNode)) - return aRef; - else - bInTable = sal_True; - - } - } + aNewCrsr->GetPoint()->nNode = pTblNode->EndOfSectionIndex(); + aNewCrsr->Move(fnMoveForward, fnGoNode); } + else + { + aNewCrsr->MovePara(fnParaNext, fnParaStart); + } + if (m_nEndIndex < aNewCrsr->Start()->nNode.GetIndex()) + { + return 0; + } + } - // the cursor must remain in the current section or a subsection - // before AND after the movement... - if( lcl_CursorIsInSection( pUnoCrsr, pOwnStartNode ) && - (bFirstParagraph || bInTable || - (pUnoCrsr->MovePara(fnParaNext, fnParaStart) && - lcl_CursorIsInSection( pUnoCrsr, pOwnStartNode ) ) ) ) + sal_Bool bInTable = sal_False; + if (!m_bFirstParagraph) + { + pUnoCrsr->SetRemainInSection( sal_False ); + // what to do if already in a table? + SwTableNode * pTblNode = pUnoCrsr->GetNode()->FindTableNode(); + pTblNode = lcl_FindTopLevelTable( pTblNode, m_pOwnTable ); + if (pTblNode && (&pTblNode->GetTable() != m_pOwnTable)) { - SwPosition* pStart = pUnoCrsr->Start(); - sal_Int32 nFirstContent = bFirstParagraph ? nFirstParaStart : -1; - sal_Int32 nLastContent = nEndIndex == pStart->nNode.GetIndex() ? nLastParaEnd : -1; - //steht man nun in einer Tabelle, oder in einem einfachen Absatz? - - SwTableNode* pTblNode = pUnoCrsr->GetNode()->FindTableNode(); - pTblNode = lcl_FindTopLevelTable( /*pUnoCrsr,*/ pTblNode, pOwnTable ); - if(/*CURSOR_TBLTEXT != eCursorType && CURSOR_SELECTION_IN_TABLE != eCursorType && */ - pTblNode && &pTblNode->GetTable() != pOwnTable) + // this is a foreign table: go to end + pUnoCrsr->GetPoint()->nNode = pTblNode->EndOfSectionIndex(); + if (!pUnoCrsr->Move(fnMoveForward, fnGoNode)) { - // wir haben es mit einer fremden Tabelle zu tun - SwFrmFmt* pTableFmt = (SwFrmFmt*)pTblNode->GetTable().GetFrmFmt(); - XTextTable* pTable = SwXTextTables::GetObject( *pTableFmt ); - aRef = (XTextContent*)(SwXTextTable*)pTable; - } - else - { - aRef = SwXParagraph::CreateXParagraph(*pUnoCrsr->GetDoc(), - *pStart->nNode.GetNode().GetTxtNode(), - static_cast(pText), nFirstContent, nLastContent); + return 0; } + bInTable = sal_True; } } - else - throw uno::RuntimeException(); - return aRef; + uno::Reference< text::XTextContent > xRef; + // the cursor must remain in the current section or a subsection + // before AND after the movement... + if (lcl_CursorIsInSection( pUnoCrsr, m_pOwnStartNode ) && + (m_bFirstParagraph || bInTable || + (pUnoCrsr->MovePara(fnParaNext, fnParaStart) && + lcl_CursorIsInSection( pUnoCrsr, m_pOwnStartNode )))) + { + SwPosition* pStart = pUnoCrsr->Start(); + const sal_Int32 nFirstContent = + (m_bFirstParagraph) ? m_nFirstParaStart : -1; + const sal_Int32 nLastContent = + (m_nEndIndex == pStart->nNode.GetIndex()) ? m_nLastParaEnd : -1; + + // position in a table, or in a simple paragraph? + SwTableNode * pTblNode = pUnoCrsr->GetNode()->FindTableNode(); + pTblNode = lcl_FindTopLevelTable( pTblNode, m_pOwnTable ); + if (/*CURSOR_TBLTEXT != eCursorType && CURSOR_SELECTION_IN_TABLE != eCursorType && */ + pTblNode && (&pTblNode->GetTable() != m_pOwnTable)) + { + // this is a foreign table + SwFrmFmt* pTableFmt = + static_cast(pTblNode->GetTable().GetFrmFmt()); + text::XTextTable *const pTable = + SwXTextTables::GetObject( *pTableFmt ); + xRef = static_cast( + static_cast(pTable)); + } + else + { + text::XText *const pText = m_xParentText.get(); + xRef = SwXParagraph::CreateXParagraph(*pUnoCrsr->GetDoc(), + *pStart->nNode.GetNode().GetTxtNode(), + static_cast(pText), nFirstContent, nLastContent); + } + } + + return xRef; } /*-- 10.12.98 11:52:14--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXParagraphEnumeration::nextElement(void) - throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException ) +uno::Any SAL_CALL SwXParagraphEnumeration::nextElement() +throw (container::NoSuchElementException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< XTextContent > aRef; - if (bFirstParagraph) + if (m_pImpl->m_bFirstParagraph) { - xNextPara = NextElement_Impl(); - bFirstParagraph = sal_False; + m_pImpl->m_xNextPara = m_pImpl->NextElement_Impl(); + m_pImpl->m_bFirstParagraph = false; } - aRef = xNextPara; - if (!aRef.is()) + const uno::Reference< text::XTextContent > xRef = m_pImpl->m_xNextPara; + if (!xRef.is()) + { throw container::NoSuchElementException(); - xNextPara = NextElement_Impl(); + } + m_pImpl->m_xNextPara = m_pImpl->NextElement_Impl(); - uno::Any aRet(&aRef, ::getCppuType((uno::Reference*)0)); + uno::Any aRet; + aRet <<= xRef; return aRet; } -void SwXParagraphEnumeration::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew) -{ - ClientModify(this, pOld, pNew); -} /****************************************************************** * SwXTextRange @@ -1727,7 +1808,7 @@ uno::Reference< XEnumeration > SwXTextRange::createEnumeration(void) throw( Runt ::sw::mark::IMark const * const pBkmk = GetBookmark(); if(!pBkmk) throw RuntimeException(); const SwPosition& rPoint = pBkmk->GetMarkPos(); - SwUnoCrsr* pNewCrsr = pDoc->CreateUnoCrsr(rPoint, FALSE); + ::std::auto_ptr pNewCrsr(pDoc->CreateUnoCrsr(rPoint, sal_False)); if(pBkmk->IsExpanded() && pBkmk->GetOtherMarkPos() != rPoint) { pNewCrsr->SetMark(); @@ -1741,8 +1822,14 @@ uno::Reference< XEnumeration > SwXTextRange::createEnumeration(void) throw( Runt sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething(SwXText::getUnoTunnelId()) )); } DBG_ASSERT(pParentText, "parent is not a SwXText"); - CursorType eSetType = RANGE_IN_CELL == eRangePosition ? CURSOR_SELECTION_IN_TABLE : CURSOR_SELECTION; - uno::Reference< XEnumeration > xRet = + if (!pParentText) + { + throw uno::RuntimeException(); + } + + const CursorType eSetType = (RANGE_IN_CELL == eRangePosition) + ? CURSOR_SELECTION_IN_TABLE : CURSOR_SELECTION; + const uno::Reference< XEnumeration > xRet = new SwXParagraphEnumeration(pParentText, pNewCrsr, eSetType); return xRet; } diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index bbd81aa140..6f7ee5ff68 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -198,7 +198,9 @@ uno::Reference SwXRedlineText::createEnumeration(void) vos::OGuard aGuard(Application::GetSolarMutex()); SwPaM aPam(aNodeIndex); aPam.Move(fnMoveForward, fnGoNode); - return new SwXParagraphEnumeration(this, *aPam.Start(), CURSOR_REDLINE); + ::std::auto_ptr pUnoCursor( + GetDoc()->CreateUnoCrsr(*aPam.Start(), sal_False)); + return new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_REDLINE); } /* --------------------------------------------------------------------------- @@ -681,7 +683,9 @@ uno::Reference< container::XEnumeration > SwXRedline::createEnumeration(void) t { SwPaM aPam(*pNodeIndex); aPam.Move(fnMoveForward, fnGoNode); - xRet = new SwXParagraphEnumeration(this, *aPam.Start(), CURSOR_REDLINE); + ::std::auto_ptr pUnoCursor( + GetDoc()->CreateUnoCrsr(*aPam.Start(), sal_False)); + xRet = new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_REDLINE); } return xRet; } diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index e594ba50d6..049f2c5662 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1214,15 +1214,12 @@ uno::Reference< container::XEnumeration > SwXCell::createEnumeration(void) thro { const SwStartNode* pSttNd = pBox->GetSttNd(); SwPosition aPos(*pSttNd); - SwUnoCrsr* pUnoCrsr = GetDoc()->CreateUnoCrsr(aPos, sal_False); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); + ::std::auto_ptr pUnoCursor( + GetDoc()->CreateUnoCrsr(aPos, sal_False)); + pUnoCursor->Move(fnMoveForward, fnGoNode); - SwXParagraphEnumeration *pEnum = new SwXParagraphEnumeration(this, pUnoCrsr, CURSOR_TBLTEXT); - const SwTableNode* pTblNode = pSttNd->FindTableNode(); - // remember table and start node for later travelling - // (used in export of tables in tables) - pEnum->SetOwnTable( &pTblNode->GetTable() ); - pEnum->SetOwnStartNode( pSttNd ); + SwXParagraphEnumeration *const pEnum = + new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_TBLTEXT); aRef = pEnum; // // no Cursor in protected sections diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index d81664310a..6a669499e7 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2412,9 +2412,10 @@ uno::Reference< container::XEnumeration > SwXBodyText::createEnumeration(void) { SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent(); SwPosition aPos(rNode); - SwUnoCrsr* pUnoCrsr = GetDoc()->CreateUnoCrsr(aPos, sal_False); - pUnoCrsr->Move( fnMoveBackward, fnGoDoc ); - aRef = new SwXParagraphEnumeration(this, pUnoCrsr, CURSOR_BODY); + ::std::auto_ptr pUnoCursor( + GetDoc()->CreateUnoCrsr(aPos, sal_False)); + pUnoCursor->Move(fnMoveBackward, fnGoDoc); + aRef = new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_BODY); } else { @@ -2653,9 +2654,11 @@ uno::Reference< container::XEnumeration > SwXHeadFootText::createEnumeration(vo const SwFmtCntnt& rFlyCntnt = pHeadFootFmt->GetCntnt(); const SwNode& rNode = rFlyCntnt.GetCntntIdx()->GetNode(); SwPosition aPos(rNode); - SwUnoCrsr* pUnoCrsr = GetDoc()->CreateUnoCrsr(aPos, sal_False); - pUnoCrsr->Move(fnMoveForward, fnGoNode); - aRef = new SwXParagraphEnumeration(this, pUnoCrsr, bIsHeader ? CURSOR_HEADER : CURSOR_FOOTER); + ::std::auto_ptr pUnoCursor( + GetDoc()->CreateUnoCrsr(aPos, sal_False)); + pUnoCursor->Move(fnMoveForward, fnGoNode); + aRef = new SwXParagraphEnumeration(this, pUnoCursor, + (bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER); } else { -- cgit v1.2.3 From 285fed9b6c21042a7e892be208c929645fc9e47f Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:51 +0100 Subject: swunolocking1: #i105557#: fix locking for SwXTextSection: replace SwXTextSectionClient with Impl struct, use UnoImplPtr to lock dtor. move all implementation details out of header, into Impl struct. remove ugly destruction of SwUnoCrsr via Application::PostUserEvent. replace broken SwClient iteration with a WeakReference in SwSectionFmt. add factory function CreateXTextSection. use new XUnoTunnel and XServiceInfo helpers. clean up the implementation a little. --- sw/inc/frmfmt.hxx | 19 +- sw/inc/section.hxx | 20 + sw/inc/unosection.hxx | 102 +- sw/source/core/docnode/section.cxx | 5 + sw/source/core/layout/atrfrm.cxx | 5 + sw/source/core/unocore/unocoll.cxx | 13 +- sw/source/core/unocore/unosect.cxx | 2427 ++++++++++++++++++++---------------- sw/source/core/unocore/unotext.cxx | 20 +- 8 files changed, 1413 insertions(+), 1198 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx index 12ef87e948..9b77c79991 100644 --- a/sw/inc/frmfmt.hxx +++ b/sw/inc/frmfmt.hxx @@ -30,11 +30,14 @@ #ifndef _FRMFMT_HXX #define _FRMFMT_HXX -#include - // --> OD 2004-08-06 #i28749# #include // <-- + +#include + +#include + #include "swdllapi.h" class SwFlyFrm; @@ -51,8 +54,9 @@ class SW_DLLPUBLIC SwFrmFmt: public SwFmt { friend class SwDoc; friend class SwPageDesc; //darf den protected CTor rufen. -// friend class SwSwgReader; // der SW2-Reader auch! -// friend class Sw3IoImp; // der SW3-Reader auch! + + ::com::sun::star::uno::WeakReference< + ::com::sun::star::uno::XInterface> m_wXObject; protected: SwFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, @@ -136,6 +140,13 @@ public: virtual String GetDescription() const; + SW_DLLPRIVATE ::com::sun::star::uno::WeakReference< + ::com::sun::star::uno::XInterface> const& GetXObject() const + { return m_wXObject; } + SW_DLLPRIVATE void SetXObject(::com::sun::star::uno::Reference< + ::com::sun::star::uno::XInterface> const& xObject) + { m_wXObject = xObject; } + DECL_FIXEDMEMPOOL_NEWDEL_DLL(SwFrmFmt) }; diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index 4d883e8464..47633d4208 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -41,6 +41,11 @@ #include #include + +namespace com { namespace sun { namespace star { + namespace text { class XTextSection; } +} } } + // Forward Deklaration class SwSectionFmt; class SwDoc; @@ -230,6 +235,13 @@ class SW_DLLPUBLIC SwSectionFmt : public SwFrmFmt { friend class SwDoc; + /** why does this exist in addition to the m_wXObject in SwFrmFmt? + in case of an index, both a SwXDocumentIndex and a SwXTextSection + register at this SwSectionFmt, so we need to have two refs. + */ + ::com::sun::star::uno::WeakReference< + ::com::sun::star::text::XTextSection> m_wXTextSection; + /* SW_DLLPUBLIC */ SwSection* _GetSection() const; SW_DLLPRIVATE void UpdateParent(); // Parent wurde veraendert @@ -271,6 +283,14 @@ public: // ist die Section eine gueltige fuers GlobalDocument? const SwSection* GetGlobalDocSection() const; + + SW_DLLPRIVATE ::com::sun::star::uno::WeakReference< + ::com::sun::star::text::XTextSection> const& GetXTextSection() const + { return m_wXTextSection; } + SW_DLLPRIVATE void SetXTextSection(::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextSection> const& xTextSection) + { m_wXTextSection = xTextSection; } + }; // -------------- inlines --------------------------------- diff --git a/sw/inc/unosection.hxx b/sw/inc/unosection.hxx index 31d15d7010..6f3eb1794c 100644 --- a/sw/inc/unosection.hxx +++ b/sw/inc/unosection.hxx @@ -43,14 +43,9 @@ #include -#include -#include +#include -#include -#include - -class SfxItemPropertySet; class SwSectionFmt; @@ -58,51 +53,6 @@ class SwSectionFmt; --------------------------------------------------*/ -class SwXTextSection; - -class SwXTextSectionClient - : public SwClient -{ - -private: - - friend class SwXTextSection; - - SwXTextSection * m_pSection; - ::com::sun::star::uno::WeakReference< - ::com::sun::star::text::XTextSection > m_xReference; - - // SwClient - virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); - - SwXTextSectionClient( - SwSectionFmt& rFmt, - SwXTextSection& rTextSection, - ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextSection > xSection); - - virtual ~SwXTextSectionClient(); - - DECL_STATIC_LINK( SwXTextSectionClient, RemoveSectionClient_Impl, - SwXTextSectionClient* ); - -public: - - TYPEINFO(); - - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > - GetXTextSection(); - - static ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextSection > - CreateXTextSection(SwSectionFmt* pFmt = 0, BOOL bIndexHeader = FALSE); - static SwXTextSectionClient* Create( - SwXTextSection& rSection, - ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextSection > xSection, - SwSectionFmt& rFmt); -}; - struct SwTextSectionProperties_Impl; @@ -122,57 +72,21 @@ class SwXTextSection private: - friend class SwXTextSectionClient; - - SwEventListenerContainer aLstnrCntnr; - const SfxItemPropertySet* m_pPropSet; + class Impl; + ::sw::UnoImplPtr m_pImpl; - BOOL m_bIsDescriptor; - BOOL m_bIndexHeader; - String m_sName; - SwTextSectionProperties_Impl* pProps; - SwXTextSectionClient* m_pClient; - -protected: - - void SAL_CALL SetPropertyValues_Impl( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames, - const ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Any >& aValues) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::beans::PropertyVetoException, - ::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL - GetPropertyValues_Impl( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - - SwXTextSection(sal_Bool bWithFormat, sal_Bool bIndexHeader = FALSE); + SwXTextSection(SwSectionFmt *const pFmt, const bool bIndexHeader = false); virtual ~SwXTextSection(); - void ResetClient() { m_pClient = 0; } - void SetClient(SwXTextSectionClient* pClient) { m_pClient = pClient; } - public: - void attachToRange( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > & xTextRange) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - SwSectionFmt* GetFmt() const; - static SwXTextSection* GetImplementation( - ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface> xRef); + static ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextSection > + CreateXTextSection(SwSectionFmt *const pFmt = 0, + const bool bIndexHeader = false); static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 23dffa13ac..2d92d0e5b7 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -835,6 +835,11 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) break; } SwFrmFmt::Modify( pOld, pNew ); + + if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which())) + { // invalidate cached uno object + SetXTextSection(uno::Reference(0)); + } } // erfrage vom Format Informationen diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 37c75c2f71..cd834bacd7 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -2480,6 +2480,11 @@ void SwFrmFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) // wegen RESET_FMTWRITTEN. // if ( GetDepends() ) SwFmt::Modify( pOld, pNew ); + + if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which())) + { // invalidate cached uno object + SetXObject(uno::Reference(0)); + } } //Vernichtet alle Frms, die in aDepend angemeldet sind. diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 3a471e133a..d62b7837cc 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -447,7 +447,8 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16 break; case SW_SERVICE_INDEX_HEADER_SECTION : case SW_SERVICE_TEXT_SECTION : - xRet = SwXTextSectionClient::CreateXTextSection( 0, SW_SERVICE_INDEX_HEADER_SECTION == nObjectType); + xRet = SwXTextSection::CreateXTextSection(0, + (SW_SERVICE_INDEX_HEADER_SECTION == nObjectType)); break; case SW_SERVICE_REFERENCE_MARK : @@ -1473,15 +1474,7 @@ sal_Bool SwXTextSections::hasElements(void) throw( uno::RuntimeException ) -----------------------------------------------------------------------*/ uno::Reference< XTextSection > SwXTextSections::GetObject( SwSectionFmt& rFmt ) { - SwXTextSectionClient* pClient = (SwXTextSectionClient*)SwClientIter( rFmt ). - First( TYPE( SwXTextSectionClient )); - uno::Reference< XTextSection > xRet; - if( pClient ) - xRet = pClient->GetXTextSection(); - // it is possible that the client is still registered but the reference is already invalid - if( !xRet.is() ) - xRet = SwXTextSectionClient::CreateXTextSection(&rFmt); - return xRet; + return SwXTextSection::CreateXTextSection(&rFmt); } OUString SwXBookmarks::getImplementationName(void) throw( RuntimeException ) diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index c2b706250c..c47a3aef13 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -36,6 +36,7 @@ #include #include +#include #include #include #include @@ -71,182 +72,171 @@ using namespace ::com::sun::star; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::text; -using namespace ::com::sun::star::container; -using namespace ::com::sun::star::beans; using ::rtl::OUString; -TYPEINIT1(SwXTextSectionClient, SwClient); -/*-- 20.12.2005 09:56:33--------------------------------------------------- +/****************************************************************** + * + ******************************************************************/ +struct SwTextSectionProperties_Impl +{ + uno::Sequence m_Password; + ::rtl::OUString m_sCondition; + ::rtl::OUString m_sLinkFileName; + ::rtl::OUString m_sSectionFilter; + ::rtl::OUString m_sSectionRegion; + + ::std::auto_ptr m_pColItem; + ::std::auto_ptr m_pBrushItem; + ::std::auto_ptr m_pFtnItem; + ::std::auto_ptr m_pEndItem; + ::std::auto_ptr m_pXMLAttr; + ::std::auto_ptr m_pNoBalanceItem; + ::std::auto_ptr m_pFrameDirItem; + ::std::auto_ptr m_pLRSpaceItem; // #109700# + + bool m_bDDE; + bool m_bHidden; + bool m_bCondHidden; + bool m_bProtect; + // --> FME 2004-06-22 #114856# edit in readonly sections + bool m_bEditInReadonly; + // <-- + bool m_bUpdateType; - -----------------------------------------------------------------------*/ -SwXTextSectionClient::SwXTextSectionClient( - SwSectionFmt& rFmt, - SwXTextSection& rTextSection, - uno::Reference< text::XTextSection > xSection ) : - SwClient(&rFmt), - m_pSection( &rTextSection ), - m_xReference( xSection ) + SwTextSectionProperties_Impl() + : m_bDDE(false) + , m_bHidden(false) + , m_bCondHidden(false) + , m_bProtect(false) + // --> FME 2004-06-22 #114856# edit in readonly sections + , m_bEditInReadonly(false) + // <-- + , m_bUpdateType(true) + { + } -{ - m_pSection->SetClient( this ); -} -/*-- 20.12.2005 09:56:33--------------------------------------------------- +}; - -----------------------------------------------------------------------*/ -SwXTextSectionClient::~SwXTextSectionClient() + +class SwXTextSection::Impl + : public SwClient { - uno::Reference< text::XTextSection > xSection( m_xReference ); - if(xSection.is()) + +public: + + SwXTextSection & m_rThis; + const SfxItemPropertySet & m_rPropSet; + SwEventListenerContainer m_ListenerContainer; + const bool m_bIndexHeader; + bool m_bIsDescriptor; + ::rtl::OUString m_sName; + ::std::auto_ptr m_pProps; + + Impl( SwXTextSection & rThis, + SwSectionFmt *const pFmt, const bool bIndexHeader) + : SwClient(pFmt) + , m_rThis(rThis) + , m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_SECTION)) + , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) + , m_bIndexHeader(bIndexHeader) + , m_bIsDescriptor(0 == pFmt) + , m_pProps((pFmt) ? 0 : new SwTextSectionProperties_Impl()) { - m_pSection->SetClient( 0 ); } -} -/*-- 20.12.2005 09:56:35--------------------------------------------------- - -----------------------------------------------------------------------*/ -uno::Reference< text::XTextSection > SwXTextSectionClient::GetXTextSection() -{ - return uno::Reference< text::XTextSection >( m_xReference ); -} + SwSectionFmt * GetSectionFmt() const + { + return static_cast(const_cast( + GetRegisteredIn())); + } -/*-- 29.12.2005 11:29:30--------------------------------------------------- + SwSectionFmt & GetSectionFmtOrThrow() const { + SwSectionFmt *const pFmt( GetSectionFmt() ); + if (!pFmt) { + throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( + "SwXTextSection: disposed or invalid")), 0); + } + return *pFmt; + } - -----------------------------------------------------------------------*/ -/*SwXTextSection* SwXTextSectionClient::GetSwTextSection() -{ - if( m_xReference.is() ) - return m_pSection;; -} */ + void SAL_CALL SetPropertyValues_Impl( + const uno::Sequence< ::rtl::OUString >& rPropertyNames, + const uno::Sequence< uno::Any >& aValues) + throw (beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException); + uno::Sequence< uno::Any > SAL_CALL + GetPropertyValues_Impl( + const uno::Sequence< ::rtl::OUString >& rPropertyNames) + throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException); + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + +}; /*-- 10.12.98 14:42:52--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextSectionClient::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew) +void SwXTextSection::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) { - if(pOld && pOld->Which() == RES_REMOVE_UNO_OBJECT && - (void*)GetRegisteredIn() == ((SwPtrMsgPoolItem *)pOld)->pObject ) - ((SwModify*)GetRegisteredIn())->Remove(this); - else - ClientModify(this, pOld, pNew); - if(!GetRegisteredIn()) + ClientModify(this, pOld, pNew); + if (!GetRegisteredIn()) { - uno::Reference< text::XTextSection > xSection( m_xReference ); - if(xSection.is()) - { - m_pSection->SetClient( 0 ); - m_pSection->aLstnrCntnr.Disposing(); - m_xReference = uno::Reference< text::XTextSection >(); - - Application::PostUserEvent( - STATIC_LINK( this, SwXTextSectionClient, RemoveSectionClient_Impl ), this ); - } + m_ListenerContainer.Disposing(); } } -/*-- 29.12.2005 13:04:57--------------------------------------------------- +/*-- 20.12.2005 10:27:33--------------------------------------------------- -----------------------------------------------------------------------*/ -IMPL_STATIC_LINK_NOINSTANCE( SwXTextSectionClient, RemoveSectionClient_Impl, - SwXTextSectionClient*, pClient ) +SwSectionFmt * SwXTextSection::GetFmt() const { - delete pClient; - return 0; + return m_pImpl->GetSectionFmt(); } /*-- 20.12.2005 09:56:36--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextSection > SwXTextSectionClient::CreateXTextSection( - SwSectionFmt* pFmt, BOOL bIndexHeader ) +uno::Reference< text::XTextSection > +SwXTextSection::CreateXTextSection( + SwSectionFmt *const pFmt, const bool bIndexHeader) { - SwXTextSection* pNew; - uno::Reference< text::XTextSection > xSection = pNew = new SwXTextSection( pFmt != 0, bIndexHeader ); - if(pFmt) - new SwXTextSectionClient( *pFmt, *pNew, xSection ); + // re-use existing SwXTextSection + // #i105557#: do not iterate over the registered clients: race condition + uno::Reference< text::XTextSection > xSection; + if (pFmt) + { + xSection.set(pFmt->GetXTextSection()); + } + if ( !xSection.is() ) + { + SwXTextSection *const pNew = new SwXTextSection(pFmt, bIndexHeader); + xSection.set(pNew); + if (pFmt) + { + pFmt->SetXTextSection(xSection); + } + } return xSection; } -/*-- 29.12.2005 10:23:37--------------------------------------------------- +/*-- 10.12.98 14:47:05--------------------------------------------------- -----------------------------------------------------------------------*/ -SwXTextSectionClient* SwXTextSectionClient::Create(SwXTextSection& rSection, - uno::Reference< text::XTextSection >xSection, SwSectionFmt& rFmt ) +SwXTextSection::SwXTextSection( + SwSectionFmt *const pFmt, const bool bIndexHeader) + : m_pImpl( new SwXTextSection::Impl(*this, pFmt, bIndexHeader) ) { - return new SwXTextSectionClient( rFmt, rSection, xSection ); } -/****************************************************************** - * - ******************************************************************/ -struct SwTextSectionProperties_Impl -{ - - String sCondition; - String sLinkFileName; - String sSectionFilter; - String sSectionRegion; - uno::Sequence aPassword; - - SwFmtCol* pColItem; - SvxBrushItem* pBrushItem; - SwFmtFtnAtTxtEnd* pFtnItem; - SwFmtEndAtTxtEnd* pEndItem; - SvXMLAttrContainerItem *pXMLAttr; - SwFmtNoBalancedColumns *pNoBalanceItem; - SvxFrameDirectionItem *pFrameDirItem; - SvxLRSpaceItem *pLRSpaceItem; // #109700# - sal_Bool bDDE; - sal_Bool bHidden; - sal_Bool bCondHidden; - sal_Bool bProtect; - // --> FME 2004-06-22 #114856# edit in readonly sections - sal_Bool bEditInReadonly; - // <-- - sal_Bool bUpdateType; - - SwTextSectionProperties_Impl() : - pColItem(0), - pBrushItem(0), - pFtnItem(0), - pEndItem(0), - pXMLAttr(0), - pNoBalanceItem(0), - pFrameDirItem(0), - pLRSpaceItem(0), // #109700# - bDDE(0), - bHidden(0), - bCondHidden(0), - bProtect(0), - // --> FME 2004-06-22 #114856# edit in readonly sections - bEditInReadonly(0), - // <-- - bUpdateType(sal_True){} - ~SwTextSectionProperties_Impl() - { - delete pColItem; - delete pBrushItem; - delete pFtnItem; - delete pEndItem; - delete pXMLAttr; - delete pNoBalanceItem; - delete pFrameDirItem; - delete pLRSpaceItem; // #109700# - } -}; -/* -----------------------------11.07.00 12:10-------------------------------- +/*-- 10.12.98 14:47:07--------------------------------------------------- - ---------------------------------------------------------------------------*/ -SwXTextSection* SwXTextSection::GetImplementation(uno::Reference< XInterface> xRef ) + -----------------------------------------------------------------------*/ +SwXTextSection::~SwXTextSection() { - uno::Reference xTunnel( xRef, uno::UNO_QUERY); - if(xTunnel.is()) - return reinterpret_cast< SwXTextSection * >( - sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething(SwXTextSection::getUnoTunnelId()) )); - return 0; } /* -----------------------------13.03.00 12:15-------------------------------- @@ -260,258 +250,230 @@ const uno::Sequence< sal_Int8 > & SwXTextSection::getUnoTunnelId() /* -----------------------------10.03.00 18:04-------------------------------- ---------------------------------------------------------------------------*/ -sal_Int64 SAL_CALL SwXTextSection::getSomething( const uno::Sequence< sal_Int8 >& rId ) - throw(uno::RuntimeException) -{ - if( rId.getLength() == 16 - && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16 ) ) - { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this ) ); - } - return 0; -} -/*-- 10.12.98 14:47:05--------------------------------------------------- - - -----------------------------------------------------------------------*/ -SwXTextSection::SwXTextSection(sal_Bool bWithFormat, sal_Bool bIndexHeader) : -// SwClient(pFmt), - aLstnrCntnr( (text::XTextContent*)this), - m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_SECTION)), - m_bIsDescriptor(!bWithFormat), - m_bIndexHeader(bIndexHeader), - pProps(bWithFormat ? 0 : new SwTextSectionProperties_Impl()), - m_pClient( 0 ) +sal_Int64 SAL_CALL +SwXTextSection::getSomething(const uno::Sequence< sal_Int8 >& rId) +throw (uno::RuntimeException) { - + return ::sw::UnoTunnelImpl(rId, this); } -/*-- 10.12.98 14:47:07--------------------------------------------------- - -----------------------------------------------------------------------*/ -SwXTextSection::~SwXTextSection() -{ - vos::OGuard aGuard(Application::GetSolarMutex()); - delete m_pClient; - delete pProps; -} /*-- 10.12.98 14:47:08--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextSection > SwXTextSection::getParentSection(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextSection > SAL_CALL +SwXTextSection::getParentSection() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextSection > aRef; - SwSectionFmt* pSectFmt = GetFmt(); - if(pSectFmt) - { - SwSectionFmt* pParentFmt = pSectFmt->GetParent(); - if(pParentFmt) - { - SwXTextSectionClient* pClient = (SwXTextSectionClient*)SwClientIter(*pParentFmt). - First(TYPE(SwXTextSectionClient)); - if(pClient) - aRef = pClient->GetXTextSection(); - else - aRef = SwXTextSectionClient::CreateXTextSection(pParentFmt); - } - } - else - throw uno::RuntimeException(); - return aRef; + + SwSectionFmt & rSectionFmt( m_pImpl->GetSectionFmtOrThrow() ); + + SwSectionFmt *const pParentFmt = rSectionFmt.GetParent(); + const uno::Reference< text::XTextSection > xRet = + (pParentFmt) ? CreateXTextSection(pParentFmt) : 0; + return xRet; } + /*-- 10.12.98 14:47:08--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Sequence< uno::Reference< text::XTextSection > > SwXTextSection::getChildSections(void) - throw( uno::RuntimeException ) +uno::Sequence< uno::Reference< text::XTextSection > > SAL_CALL +SwXTextSection::getChildSections() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Sequence > aSeq; - SwSectionFmt* pSectFmt = GetFmt(); - if(pSectFmt) - { - SwSections aChildren; - pSectFmt->GetChildSections(aChildren, SORTSECT_NOT, sal_False); - aSeq.realloc(aChildren.Count()); - uno::Reference< text::XTextSection > * pArray = aSeq.getArray(); - for(sal_uInt16 i = 0; i < aChildren.Count(); i++) - { - SwSectionFmt* pChild = aChildren.GetObject(i)->GetFmt(); - SwXTextSectionClient* pClient = (SwXTextSectionClient*)SwClientIter(*pChild). - First(TYPE(SwXTextSectionClient)); - if(pClient) - pArray[i] = pClient->GetXTextSection(); - else - pArray[i] = SwXTextSectionClient::CreateXTextSection(pChild); - } + SwSectionFmt & rSectionFmt( m_pImpl->GetSectionFmtOrThrow() ); + + SwSections aChildren; + rSectionFmt.GetChildSections(aChildren, SORTSECT_NOT, sal_False); + uno::Sequence > aSeq(aChildren.Count()); + uno::Reference< text::XTextSection > * pArray = aSeq.getArray(); + for (sal_uInt16 i = 0; i < aChildren.Count(); i++) + { + SwSectionFmt *const pChild = aChildren.GetObject(i)->GetFmt(); + pArray[i] = CreateXTextSection(pChild); } return aSeq; - } + /* -----------------18.02.99 13:31------------------- * * --------------------------------------------------*/ -void SwXTextSection::attachToRange(const uno::Reference< text::XTextRange > & xTextRange) - throw( lang::IllegalArgumentException, uno::RuntimeException ) +void SAL_CALL +SwXTextSection::attach(const uno::Reference< text::XTextRange > & xTextRange) +throw (lang::IllegalArgumentException, uno::RuntimeException) { - if(!m_bIsDescriptor) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->m_bIsDescriptor) + { throw uno::RuntimeException(); + } uno::Reference xRangeTunnel( xTextRange, uno::UNO_QUERY); SwXTextRange* pRange = 0; OTextCursorHelper* pCursor = 0; if(xRangeTunnel.is()) { - pRange = reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) )); - pCursor = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); + pRange = ::sw::UnoTunnelGetImplementation(xRangeTunnel); + pCursor = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); } - SwDoc* pDoc = pRange ? (SwDoc*)pRange->GetDoc() : pCursor ? (SwDoc*)pCursor->GetDoc() : 0; - if(pDoc) + SwDoc *const pDoc = + (pRange) ? pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : 0); + if (!pDoc) { - SwUnoInternalPaM aPam(*pDoc); - //das muss jetzt sal_True liefern - SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange); - UnoActionContext aCont(pDoc); - pDoc->StartUndo( UNDO_INSSECTION, NULL ); - - SwSection* pRet = 0; - if(!m_sName.Len()) - m_sName = C2S("TextSection"); - SectionType eType = pProps->bDDE ? DDE_LINK_SECTION : - pProps->sLinkFileName.Len() || pProps->sSectionRegion.Len() ? FILE_LINK_SECTION : - CONTENT_SECTION; - // index header section? - if(m_bIndexHeader) + throw lang::IllegalArgumentException(); + } + + SwUnoInternalPaM aPam(*pDoc); + //das muss jetzt sal_True liefern + SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange); + UnoActionContext aCont(pDoc); + pDoc->StartUndo( UNDO_INSSECTION, NULL ); + + if (!m_pImpl->m_sName.getLength()) + { + m_pImpl->m_sName = C2U("TextSection"); + } + SectionType eType = (m_pImpl->m_pProps->m_bDDE) + ? DDE_LINK_SECTION + : ((m_pImpl->m_pProps->m_sLinkFileName.getLength() || + m_pImpl->m_pProps->m_sSectionRegion.getLength()) + ? FILE_LINK_SECTION : CONTENT_SECTION); + // index header section? + if (m_pImpl->m_bIndexHeader) + { + // caller wants an index header section, but will only + // give him one if a) we are inside an index, and b) said + // index doesn't yet have a header section. + const SwTOXBase* pBase = aPam.GetDoc()->GetCurTOX(*aPam.Start()); + + // are we inside an index? + if (pBase) { - // caller wants an index header section, but will only - // give him one if a) we are inside an index, and b) said - // index doesn't yet have a header section. - const SwTOXBase* pBase = aPam.GetDoc()->GetCurTOX( - *aPam.Start() ); - - // are we inside an index? - if (pBase) + // get all child sections + SwSections aSectionsArr; + static_cast(pBase)->GetFmt()-> + GetChildSections(aSectionsArr); + + // and search for current header section + const sal_uInt16 nCount = aSectionsArr.Count(); + sal_Bool bHeaderPresent = sal_False; + for(sal_uInt16 i = 0; i < nCount; i++) { - // get all child sections - SwSections aSectionsArr; - ((SwTOXBaseSection*)pBase)->GetFmt()-> - GetChildSections(aSectionsArr); - - // and search for current header section - sal_uInt16 nCount = aSectionsArr.Count(); - sal_Bool bHeaderPresent = sal_False; - for(sal_uInt16 i = 0; i < nCount; i++) - { - bHeaderPresent |= - (aSectionsArr[i]->GetType() == TOX_HEADER_SECTION); - } - if (! bHeaderPresent) - { - eType = TOX_HEADER_SECTION; - } + bHeaderPresent |= + (aSectionsArr[i]->GetType() == TOX_HEADER_SECTION); + } + if (! bHeaderPresent) + { + eType = TOX_HEADER_SECTION; } } + } - SwSection aSect(eType, pDoc->GetUniqueSectionName(&m_sName)); - aSect.SetCondition(pProps->sCondition); - String sLinkName(pProps->sLinkFileName); - sLinkName += sfx2::cTokenSeperator; - sLinkName += pProps->sSectionFilter; - sLinkName += sfx2::cTokenSeperator; - sLinkName += pProps->sSectionRegion; - aSect.SetLinkFileName(sLinkName); - - aSect.SetHidden(pProps->bHidden); - aSect.SetProtect(pProps->bProtect); - // --> FME 2004-06-22 #114856# edit in readonly sections - aSect.SetEditInReadonly(pProps->bEditInReadonly); - // <-- + String tmp(m_pImpl->m_sName); + SwSection aSect(eType, pDoc->GetUniqueSectionName(&tmp)); + aSect.SetCondition(m_pImpl->m_pProps->m_sCondition); + ::rtl::OUStringBuffer sLinkNameBuf(m_pImpl->m_pProps->m_sLinkFileName); + sLinkNameBuf.append(sfx2::cTokenSeperator); + sLinkNameBuf.append(m_pImpl->m_pProps->m_sSectionFilter); + sLinkNameBuf.append(sfx2::cTokenSeperator); + sLinkNameBuf.append(m_pImpl->m_pProps->m_sSectionRegion); + aSect.SetLinkFileName(sLinkNameBuf.makeStringAndClear()); + + aSect.SetHidden(m_pImpl->m_pProps->m_bHidden); + aSect.SetProtect(m_pImpl->m_pProps->m_bProtect); + // --> FME 2004-06-22 #114856# edit in readonly sections + aSect.SetEditInReadonly(m_pImpl->m_pProps->m_bEditInReadonly); + // <-- - SfxItemSet aSet(pDoc->GetAttrPool(), - RES_COL, RES_COL, - RES_BACKGROUND, RES_BACKGROUND, - RES_FTN_AT_TXTEND, RES_FRAMEDIR, - RES_LR_SPACE, RES_LR_SPACE, // #109700# - RES_UNKNOWNATR_CONTAINER,RES_UNKNOWNATR_CONTAINER, - 0); - if(pProps->pBrushItem) - aSet.Put(*pProps->pBrushItem); - if(pProps->pColItem) - aSet.Put(*pProps->pColItem); - if(pProps->pFtnItem) - aSet.Put(*pProps->pFtnItem); - if(pProps->pEndItem) - aSet.Put(*pProps->pEndItem); - if(pProps->pXMLAttr) - aSet.Put(*pProps->pXMLAttr); - if(pProps->pNoBalanceItem) - aSet.Put(*pProps->pNoBalanceItem); - if(pProps->pFrameDirItem) - aSet.Put(*pProps->pFrameDirItem); - /* #109700# */ - if(pProps->pLRSpaceItem) - aSet.Put(*pProps->pLRSpaceItem); - - // section password - if (pProps->aPassword.getLength() > 0) - aSect.SetPasswd(pProps->aPassword); - - pRet = pDoc->InsertSwSection( aPam, aSect, aSet.Count() ? &aSet : 0 ); - // now create the client - m_refCount++; - // keep block to remove Reference before the refcount is decremented - { - uno::Reference< text::XTextSection> xSection( this ); - m_pClient = SwXTextSectionClient::Create(*this, xSection, *pRet->GetFmt()); - } - m_refCount--; + SfxItemSet aSet(pDoc->GetAttrPool(), + RES_COL, RES_COL, + RES_BACKGROUND, RES_BACKGROUND, + RES_FTN_AT_TXTEND, RES_FRAMEDIR, + RES_LR_SPACE, RES_LR_SPACE, // #109700# + RES_UNKNOWNATR_CONTAINER,RES_UNKNOWNATR_CONTAINER, + 0); + if (m_pImpl->m_pProps->m_pBrushItem.get()) + { + aSet.Put(*m_pImpl->m_pProps->m_pBrushItem); + } + if (m_pImpl->m_pProps->m_pColItem.get()) + { + aSet.Put(*m_pImpl->m_pProps->m_pColItem); + } + if (m_pImpl->m_pProps->m_pFtnItem.get()) + { + aSet.Put(*m_pImpl->m_pProps->m_pFtnItem); + } + if (m_pImpl->m_pProps->m_pEndItem.get()) + { + aSet.Put(*m_pImpl->m_pProps->m_pEndItem); + } + if (m_pImpl->m_pProps->m_pXMLAttr.get()) + { + aSet.Put(*m_pImpl->m_pProps->m_pXMLAttr); + } + if (m_pImpl->m_pProps->m_pNoBalanceItem.get()) + { + aSet.Put(*m_pImpl->m_pProps->m_pNoBalanceItem); + } + if (m_pImpl->m_pProps->m_pFrameDirItem.get()) + { + aSet.Put(*m_pImpl->m_pProps->m_pFrameDirItem); + } + /* #109700# */ + if (m_pImpl->m_pProps->m_pLRSpaceItem.get()) + { + aSet.Put(*m_pImpl->m_pProps->m_pLRSpaceItem); + } + // section password + if (m_pImpl->m_pProps->m_Password.getLength() > 0) + { + aSect.SetPasswd(m_pImpl->m_pProps->m_Password); + } - // #97450# XML import must hide sections depending on their old - // condition status - if( pProps->sCondition.Len() != 0 ) - pRet->SetCondHidden(pProps->bCondHidden); + SwSection *const pRet = + pDoc->InsertSwSection( aPam, aSect, aSet.Count() ? &aSet : 0 ); + pRet->GetFmt()->Add(m_pImpl.get()); + pRet->GetFmt()->SetXObject(static_cast< ::cppu::OWeakObject*>(this)); - // set update type if DDE link (and connect, if necessary) - if (pProps->bDDE) + // #97450# XML import must hide sections depending on their old + // condition status + if (m_pImpl->m_pProps->m_sCondition.getLength() != 0) + { + pRet->SetCondHidden(m_pImpl->m_pProps->m_bCondHidden); + } + + // set update type if DDE link (and connect, if necessary) + if (m_pImpl->m_pProps->m_bDDE) + { + if (! pRet->IsConnected()) { - if (! pRet->IsConnected()) - { - pRet->CreateLink(CREATE_CONNECT); - } - pRet->SetUpdateType( static_cast< USHORT >(pProps->bUpdateType ? - sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL) ); + pRet->CreateLink(CREATE_CONNECT); } - - // Undo-Klammerung hier beenden - pDoc->EndUndo( UNDO_INSSECTION, NULL ); - DELETEZ(pProps); - m_bIsDescriptor = sal_False; + pRet->SetUpdateType( static_cast< USHORT >( + (m_pImpl->m_pProps->m_bUpdateType) ? + sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL) ); } - else - throw lang::IllegalArgumentException(); -} -/*-- 10.12.98 14:47:09--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXTextSection::attach(const uno::Reference< text::XTextRange > & xTextRange) - throw( lang::IllegalArgumentException, uno::RuntimeException ) -{ - vos::OGuard aGuard(Application::GetSolarMutex()); - attachToRange( xTextRange ); + // Undo-Klammerung hier beenden + pDoc->EndUndo( UNDO_INSSECTION, NULL ); + m_pImpl->m_pProps.reset(); + m_pImpl->m_bIsDescriptor = false; } /*-- 10.12.98 14:47:09--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextRange > SwXTextSection::getAnchor(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextRange > SAL_CALL +SwXTextSection::getAnchor() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + uno::Reference< text::XTextRange > xRet; - SwSectionFmt* pSectFmt = GetFmt(); + SwSectionFmt *const pSectFmt = m_pImpl->GetSectionFmt(); if(pSectFmt) { const SwSection* pSect; @@ -535,677 +497,858 @@ uno::Reference< text::XTextRange > SwXTextSection::getAnchor(void) throw( uno:: /*-- 10.12.98 14:47:09--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextSection::dispose(void) throw( uno::RuntimeException ) +void SAL_CALL SwXTextSection::dispose() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwSectionFmt* pSectFmt = GetFmt(); - if(pSectFmt) + + SwSectionFmt *const pSectFmt = m_pImpl->GetSectionFmt(); + if (pSectFmt) + { pSectFmt->GetDoc()->DelSectionFmt( pSectFmt ); - else - throw uno::RuntimeException(); + } } /*-- 10.12.98 14:47:10--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextSection::addEventListener(const uno::Reference< lang::XEventListener > & aListener) - throw( uno::RuntimeException ) +void SAL_CALL SwXTextSection::addEventListener( + const uno::Reference< lang::XEventListener > & xListener) +throw (uno::RuntimeException) { - if(!GetFmt()) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->GetSectionFmt()) + { throw uno::RuntimeException(); - aLstnrCntnr.AddListener(aListener); + } + m_pImpl->m_ListenerContainer.AddListener(xListener); } /*-- 10.12.98 14:47:10--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextSection::removeEventListener(const uno::Reference< lang::XEventListener > & aListener) - throw( uno::RuntimeException ) +void SAL_CALL SwXTextSection::removeEventListener( + const uno::Reference< lang::XEventListener > & xListener) +throw (uno::RuntimeException) { - if(!GetFmt() || !aLstnrCntnr.RemoveListener(aListener)) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->GetSectionFmt() || + !m_pImpl->m_ListenerContainer.RemoveListener(xListener)) + { throw uno::RuntimeException(); + } } /*-- 10.12.98 14:47:11--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< beans::XPropertySetInfo > SwXTextSection::getPropertySetInfo(void) throw( uno::RuntimeException ) +uno::Reference< beans::XPropertySetInfo > SAL_CALL +SwXTextSection::getPropertySetInfo() throw (uno::RuntimeException) { - static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropSet->getPropertySetInfo(); + vos::OGuard g(Application::GetSolarMutex()); + + static const uno::Reference< beans::XPropertySetInfo > aRef = + m_pImpl->m_rPropSet.getPropertySetInfo(); return aRef; } -/* -----------------------------12.02.01 10:29-------------------------------- - ---------------------------------------------------------------------------*/ -struct SwSectItemSet_Impl -{ - - SfxItemSet* pItemSet; - SwSectItemSet_Impl() : - pItemSet(0){} - ~SwSectItemSet_Impl() - {delete pItemSet;} -}; /* -----------------------------12.02.01 10:45-------------------------------- ---------------------------------------------------------------------------*/ -void SAL_CALL SwXTextSection::SetPropertyValues_Impl( +void SwXTextSection::Impl::SetPropertyValues_Impl( const uno::Sequence< OUString >& rPropertyNames, - const uno::Sequence< Any >& rValues ) - throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, - WrappedTargetException, RuntimeException) + const uno::Sequence< uno::Any >& rValues) +throw (beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException) { - SwSectionFmt* pFmt = GetFmt(); if(rPropertyNames.getLength() != rValues.getLength()) - throw IllegalArgumentException(); - if(pFmt || m_bIsDescriptor) { - SwSection aSection(CONTENT_SECTION, aEmptyStr); - SwSection* pSect = pFmt ? pFmt->GetSection() : 0; - if(pFmt) - aSection = *pSect; - const OUString* pPropertyNames = rPropertyNames.getConstArray(); - const Any* pValues = rValues.getConstArray(); - SwSectItemSet_Impl aItemSet; - - sal_Bool bLinkModeChanged = sal_False; - sal_Bool bLinkMode = sal_False; - for(sal_Int16 nProperty = 0; nProperty < rPropertyNames.getLength(); nProperty++) + throw lang::IllegalArgumentException(); + } + SwSectionFmt *const pFmt = GetSectionFmt(); + if (!pFmt && !m_bIsDescriptor) + { + throw uno::RuntimeException(); + } + + SwSection aSection(CONTENT_SECTION, aEmptyStr); + SwSection *const pSect = (pFmt) ? pFmt->GetSection() : 0; + if (pFmt) + { + aSection = *pSect; + } + OUString const*const pPropertyNames = rPropertyNames.getConstArray(); + uno::Any const*const pValues = rValues.getConstArray(); + ::std::auto_ptr pItemSet; + sal_Bool bLinkModeChanged = sal_False; + sal_Bool bLinkMode = sal_False; + + for (sal_Int32 nProperty = 0; nProperty < rPropertyNames.getLength(); + nProperty++) + { + SfxItemPropertySimpleEntry const*const pEntry = + m_rPropSet.getPropertyMap()->getByName(pPropertyNames[nProperty]); + if (!pEntry) { - const SfxItemPropertySimpleEntry* pEntry = - m_pPropSet->getPropertyMap()->getByName( pPropertyNames[nProperty] ); - if(!pEntry) - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pPropertyNames[nProperty], static_cast < cppu::OWeakObject * > ( this ) ); - else + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + pPropertyNames[nProperty], + static_cast(& m_rThis)); + } + if (pEntry->nFlags & beans::PropertyAttribute::READONLY) + { + throw beans::PropertyVetoException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only: ")) + + pPropertyNames[nProperty], + static_cast(& m_rThis)); + } + switch (pEntry->nWID) + { + case WID_SECT_CONDITION: + { + OUString uTmp; + pValues[nProperty] >>= uTmp; + if (m_bIsDescriptor) + { + m_pProps->m_sCondition = uTmp; + } + else + { + aSection.SetCondition(uTmp); + } + } + break; + case WID_SECT_DDE_TYPE: + case WID_SECT_DDE_FILE: + case WID_SECT_DDE_ELEMENT: { - if ( pEntry->nFlags & PropertyAttribute::READONLY) - throw PropertyVetoException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + pPropertyNames[nProperty], static_cast < cppu::OWeakObject * > ( this ) ); - switch(pEntry->nWID) + OUString uTmp; + pValues[nProperty] >>= uTmp; + String sTmp(uTmp); + if (m_bIsDescriptor) { - case WID_SECT_CONDITION: + if (!m_pProps->m_bDDE) { - OUString uTmp; - pValues[nProperty] >>= uTmp; - if(m_bIsDescriptor) - pProps->sCondition = String(uTmp); - else - aSection.SetCondition(uTmp); + ::rtl::OUStringBuffer buf; + buf.append(sfx2::cTokenSeperator); + buf.append(sfx2::cTokenSeperator); + m_pProps->m_sLinkFileName = buf.makeStringAndClear(); + m_pProps->m_bDDE = true; + } + String sLinkFileName(m_pProps->m_sLinkFileName); + sLinkFileName.SetToken(pEntry->nWID - WID_SECT_DDE_TYPE, + sfx2::cTokenSeperator, sTmp); + m_pProps->m_sLinkFileName = sLinkFileName; + } + else + { + String sLinkFileName(aSection.GetLinkFileName()); + if (aSection.GetType() != DDE_LINK_SECTION) + { + sLinkFileName = sfx2::cTokenSeperator; + sLinkFileName += sfx2::cTokenSeperator; + aSection.SetType(DDE_LINK_SECTION); + } + sLinkFileName.SetToken(pEntry->nWID - WID_SECT_DDE_TYPE, + sfx2::cTokenSeperator, sTmp); + aSection.SetLinkFileName(sLinkFileName); + } + } + break; + case WID_SECT_DDE_AUTOUPDATE: + { + sal_Bool bVal(sal_False); + if (!(pValues[nProperty] >>= bVal)) + { + throw lang::IllegalArgumentException(); + } + if (m_bIsDescriptor) + { + m_pProps->m_bUpdateType = bVal; + } + else + { + bLinkModeChanged = sal_True; + bLinkMode = bVal; + } + } + break; + case WID_SECT_LINK: + { + text::SectionFileLink aLink; + if (!(pValues[nProperty] >>= aLink)) + { + throw lang::IllegalArgumentException(); + } + if (m_bIsDescriptor) + { + m_pProps->m_bDDE = sal_False; + m_pProps->m_sLinkFileName = aLink.FileURL; + m_pProps->m_sSectionFilter = aLink.FilterName; + } + else + { + if (aSection.GetType() != FILE_LINK_SECTION && + aLink.FileURL.getLength()) + { + aSection.SetType(FILE_LINK_SECTION); + } + ::rtl::OUStringBuffer sFileNameBuf; + if (aLink.FileURL.getLength()) + { + sFileNameBuf.append( URIHelper::SmartRel2Abs( + pFmt->GetDoc()->GetDocShell()->GetMedium() + ->GetURLObject(), + aLink.FileURL, URIHelper::GetMaybeFileHdl())); } - break; - case WID_SECT_DDE_TYPE : - case WID_SECT_DDE_FILE : - case WID_SECT_DDE_ELEMENT : + sFileNameBuf.append(sfx2::cTokenSeperator); + sFileNameBuf.append(aLink.FilterName); + sFileNameBuf.append(sfx2::cTokenSeperator); + sFileNameBuf.append( + aSection.GetLinkFileName().GetToken(2, + sfx2::cTokenSeperator)); + const ::rtl::OUString sFileName( + sFileNameBuf.makeStringAndClear()); + aSection.SetLinkFileName(sFileName); + if (sFileName.getLength() < 3) { - OUString uTmp; - pValues[nProperty] >>= uTmp; - String sTmp(uTmp); - if(m_bIsDescriptor) + aSection.SetType(CONTENT_SECTION); + } + } + } + break; + case WID_SECT_REGION: + { + OUString sLink; + pValues[nProperty] >>= sLink; + if (m_bIsDescriptor) + { + m_pProps->m_bDDE = sal_False; + m_pProps->m_sSectionRegion = sLink; + } + else + { + if (aSection.GetType() != FILE_LINK_SECTION && + sLink.getLength()) + { + aSection.SetType(FILE_LINK_SECTION); + } + String sSectLink(aSection.GetLinkFileName()); + while (3 < sSectLink.GetTokenCount(sfx2::cTokenSeperator)) + { + sSectLink += sfx2::cTokenSeperator; + } + sSectLink.SetToken(2, sfx2::cTokenSeperator, sLink); + aSection.SetLinkFileName(sSectLink); + if (sSectLink.Len() < 3) + { + aSection.SetType(CONTENT_SECTION); + } + } + } + break; + case WID_SECT_VISIBLE: + { + sal_Bool bVal(sal_False); + if (!(pValues[nProperty] >>= bVal)) + { + throw lang::IllegalArgumentException(); + } + if (m_bIsDescriptor) + { + m_pProps->m_bHidden = !bVal; + } + else + { + aSection.SetHidden(!bVal); + } + } + break; + case WID_SECT_CURRENTLY_VISIBLE: + { + sal_Bool bVal(sal_False); + if (!(pValues[nProperty] >>= bVal)) + { + throw lang::IllegalArgumentException(); + } + if (m_bIsDescriptor) + { + m_pProps->m_bCondHidden = !bVal; + } + else + { + if (aSection.GetCondition().Len() != 0) + { + aSection.SetCondHidden(!bVal); + } + } + } + break; + case WID_SECT_PROTECTED: + { + sal_Bool bVal(sal_False); + if (!(pValues[nProperty] >>= bVal)) + { + throw lang::IllegalArgumentException(); + } + if (m_bIsDescriptor) + { + m_pProps->m_bProtect = bVal; + } + else + { + aSection.SetProtect(bVal); + } + } + break; + // --> FME 2004-06-22 #114856# edit in readonly sections + case WID_SECT_EDIT_IN_READONLY: + { + sal_Bool bVal(sal_False); + if (!(pValues[nProperty] >>= bVal)) + { + throw lang::IllegalArgumentException(); + } + if (m_bIsDescriptor) + { + m_pProps->m_bEditInReadonly = bVal; + } + else + { + aSection.SetEditInReadonly(bVal); + } + } + // <-- + break; + case WID_SECT_PASSWORD: + { + uno::Sequence aSeq; + pValues[nProperty] >>= aSeq; + if (m_bIsDescriptor) + { + m_pProps->m_Password = aSeq; + } + else + { + aSection.SetPasswd(aSeq); + } + } + break; + default: + { + if (pFmt) + { + const SfxItemSet& rOldAttrSet = pFmt->GetAttrSet(); + pItemSet.reset( new SfxItemSet(*rOldAttrSet.GetPool(), + pEntry->nWID, pEntry->nWID, 0)); + pItemSet->Put(rOldAttrSet); + m_rPropSet.setPropertyValue(*pEntry, + pValues[nProperty], *pItemSet); + } + else + { + SfxPoolItem* pPutItem = 0; + if (RES_COL == pEntry->nWID) + { + if (!m_pProps->m_pColItem.get()) { - if(!pProps->bDDE) - { - pProps->sLinkFileName = sfx2::cTokenSeperator; - pProps->sLinkFileName += sfx2::cTokenSeperator; - pProps->bDDE = sal_True; - } - pProps->sLinkFileName.SetToken(pEntry->nWID - WID_SECT_DDE_TYPE,sfx2::cTokenSeperator,sTmp); + m_pProps->m_pColItem.reset(new SwFmtCol); } - else + pPutItem = m_pProps->m_pColItem.get(); + } + else if (RES_BACKGROUND == pEntry->nWID) + { + if (!m_pProps->m_pBrushItem.get()) { - String sLinkFileName(aSection.GetLinkFileName()); - if(aSection.GetType() != DDE_LINK_SECTION) - { - sLinkFileName = sfx2::cTokenSeperator; - sLinkFileName += sfx2::cTokenSeperator; - aSection.SetType(DDE_LINK_SECTION); - } - sLinkFileName.SetToken(pEntry->nWID - WID_SECT_DDE_TYPE,sfx2::cTokenSeperator, sTmp); - aSection.SetLinkFileName(sLinkFileName); + m_pProps->m_pBrushItem.reset( + new SvxBrushItem(RES_BACKGROUND)); } + pPutItem = m_pProps->m_pBrushItem.get(); } - break; - case WID_SECT_DDE_AUTOUPDATE: + else if (RES_FTN_AT_TXTEND == pEntry->nWID) { - sal_Bool bVal = *(sal_Bool*)pValues[nProperty].getValue(); - if(m_bIsDescriptor) + if (!m_pProps->m_pFtnItem.get()) { - pProps->bUpdateType = bVal; + m_pProps->m_pFtnItem.reset(new SwFmtFtnAtTxtEnd); } - else + pPutItem = m_pProps->m_pFtnItem.get(); + } + else if (RES_END_AT_TXTEND == pEntry->nWID) + { + if (!m_pProps->m_pEndItem.get()) { - bLinkModeChanged = sal_True; - bLinkMode = bVal; + m_pProps->m_pEndItem.reset(new SwFmtEndAtTxtEnd); } + pPutItem = m_pProps->m_pEndItem.get(); } - break; - case WID_SECT_LINK : + else if (RES_UNKNOWNATR_CONTAINER== pEntry->nWID) { - text::SectionFileLink aLink; - if(pValues[nProperty] >>= aLink) + if (!m_pProps->m_pXMLAttr.get()) { - if(m_bIsDescriptor) - { - pProps->bDDE = sal_False; - pProps->sLinkFileName = String(aLink.FileURL); - pProps->sSectionFilter = String(aLink.FilterName); - } - else - { - if(aSection.GetType() != FILE_LINK_SECTION && - aLink.FileURL.getLength()) - aSection.SetType(FILE_LINK_SECTION); - String sFileName; - if(aLink.FileURL.getLength()) - { - sFileName += URIHelper::SmartRel2Abs( - pFmt->GetDoc()->GetDocShell()->GetMedium()->GetURLObject(), - aLink.FileURL, - URIHelper::GetMaybeFileHdl()); - } - sFileName += sfx2::cTokenSeperator; - sFileName += String(aLink.FilterName); - sFileName += sfx2::cTokenSeperator; - sFileName += aSection.GetLinkFileName().GetToken( 2, sfx2::cTokenSeperator ); - aSection.SetLinkFileName(sFileName); - if(sFileName.Len() < 3) - aSection.SetType(CONTENT_SECTION); - } + m_pProps->m_pXMLAttr.reset( + new SvXMLAttrContainerItem( + RES_UNKNOWNATR_CONTAINER)); } - else - throw lang::IllegalArgumentException(); + pPutItem = m_pProps->m_pXMLAttr.get(); } - break; - case WID_SECT_REGION : + else if (RES_COLUMNBALANCE== pEntry->nWID) { - OUString uTmp; - pValues[nProperty] >>= uTmp; - String sLink(uTmp); - if(m_bIsDescriptor) + if (!m_pProps->m_pNoBalanceItem.get()) { - pProps->bDDE = sal_False; - pProps->sSectionRegion = sLink; + m_pProps->m_pNoBalanceItem.reset( + new SwFmtNoBalancedColumns(RES_COLUMNBALANCE)); } - else + pPutItem = m_pProps->m_pNoBalanceItem.get(); + } + else if (RES_FRAMEDIR == pEntry->nWID) + { + if (!m_pProps->m_pFrameDirItem.get()) { - if(aSection.GetType() != FILE_LINK_SECTION && - sLink.Len()) - aSection.SetType(FILE_LINK_SECTION); - String sSectLink(aSection.GetLinkFileName()); - while( 3 < sSectLink.GetTokenCount( sfx2::cTokenSeperator )) - { - sSectLink += sfx2::cTokenSeperator; - } - sSectLink.SetToken(2, sfx2::cTokenSeperator, sLink); - aSection.SetLinkFileName(sSectLink); - if(sSectLink.Len() < 3) - aSection.SetType(CONTENT_SECTION); + m_pProps->m_pFrameDirItem.reset( + new SvxFrameDirectionItem( + FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR)); } + pPutItem = m_pProps->m_pFrameDirItem.get(); } - break; - case WID_SECT_VISIBLE : + else if (RES_LR_SPACE == pEntry->nWID) { - sal_Bool bVal = *(sal_Bool*)pValues[nProperty].getValue(); - if(m_bIsDescriptor) - pProps->bHidden = !bVal; - else - aSection.SetHidden(!bVal); + // #109700# + if (!m_pProps->m_pLRSpaceItem.get()) + { + m_pProps->m_pLRSpaceItem.reset( + new SvxLRSpaceItem( RES_LR_SPACE )); + } + pPutItem = m_pProps->m_pLRSpaceItem.get(); } - break; - case WID_SECT_CURRENTLY_VISIBLE: + if (pPutItem) { - sal_Bool bVal = *(sal_Bool*)pValues[nProperty].getValue(); - if(m_bIsDescriptor) - pProps->bCondHidden = !bVal; - else - if( aSection.GetCondition().Len() != 0 ) - aSection.SetCondHidden(!bVal); + pPutItem->PutValue(pValues[nProperty], + pEntry->nMemberId); } - break; - case WID_SECT_PROTECTED: + } + } + } + } + + if (pFmt) + { + SwDoc* pDoc = pFmt->GetDoc(); + const SwSectionFmts& rFmts = pDoc->GetSections(); + UnoActionContext aContext(pDoc); + for (sal_uInt16 i = 0; i < rFmts.Count(); i++) + { + if (rFmts[i]->GetSection()->GetName() == pSect->GetName()) + { + pDoc->ChgSection(i, aSection, pItemSet.get(), + pDoc->IsInReading()); + { + // temporarily remove actions to allow cursor update + UnoActionRemoveContext aRemoveContext( pDoc ); + } + + //SwSection* pSect = pFmt->GetSection(); + if (bLinkModeChanged && pSect->GetType() == DDE_LINK_SECTION) + { + // set update type; needs an established link + if (!pSect->IsConnected()) { - sal_Bool bVal = *(sal_Bool*)pValues[nProperty].getValue(); - if(m_bIsDescriptor) - pProps->bProtect = bVal; - else - aSection.SetProtect(bVal); + pSect->CreateLink(CREATE_CONNECT); } - break; - // --> FME 2004-06-22 #114856# edit in readonly sections - case WID_SECT_EDIT_IN_READONLY: + pSect->SetUpdateType( static_cast< USHORT >((bLinkMode) ? + sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL) ); + } + // section found and processed: break from loop + break; + } + } + } +} + +void SAL_CALL +SwXTextSection::setPropertyValues( + const uno::Sequence< ::rtl::OUString >& rPropertyNames, + const uno::Sequence< uno::Any >& rValues) +throw (beans::PropertyVetoException, lang::IllegalArgumentException, + lang::WrappedTargetException, uno::RuntimeException) +{ + vos::OGuard aGuard(Application::GetSolarMutex()); + + // workaround for bad designed API + try + { + m_pImpl->SetPropertyValues_Impl( rPropertyNames, rValues ); + } + catch (beans::UnknownPropertyException &rException) + { + // wrap the original (here not allowed) exception in + // a WrappedTargetException that gets thrown instead. + lang::WrappedTargetException aWExc; + aWExc.TargetException <<= rException; + throw aWExc; + } +} +/*-- 10.12.98 14:47:11--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void SwXTextSection::setPropertyValue( + const OUString& rPropertyName, const uno::Any& rValue) +throw (beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException ) +{ + vos::OGuard aGuard(Application::GetSolarMutex()); + + uno::Sequence< ::rtl::OUString > aPropertyNames(1); + aPropertyNames.getArray()[0] = rPropertyName; + uno::Sequence< uno::Any > aValues(1); + aValues.getArray()[0] = rValue; + m_pImpl->SetPropertyValues_Impl( aPropertyNames, aValues ); +} + +/* -----------------------------12.02.01 10:43-------------------------------- + + ---------------------------------------------------------------------------*/ +uno::Sequence< uno::Any > +SwXTextSection::Impl::GetPropertyValues_Impl( + const uno::Sequence< OUString > & rPropertyNames ) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) +{ + SwSectionFmt *const pFmt = GetSectionFmt(); + if (!pFmt && !m_bIsDescriptor) + { + throw uno::RuntimeException(); + } + + uno::Sequence< uno::Any > aRet(rPropertyNames.getLength()); + uno::Any* pRet = aRet.getArray(); + SwSection *const pSect = (pFmt) ? pFmt->GetSection() : 0; + const OUString* pPropertyNames = rPropertyNames.getConstArray(); + + for (sal_Int32 nProperty = 0; nProperty < rPropertyNames.getLength(); + nProperty++) + { + SfxItemPropertySimpleEntry const*const pEntry = + m_rPropSet.getPropertyMap()->getByName(pPropertyNames[nProperty]); + if (!pEntry) + { + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + pPropertyNames[nProperty], + static_cast(& m_rThis)); + } + switch(pEntry->nWID) + { + case WID_SECT_CONDITION: + { + OUString uTmp( (m_bIsDescriptor) + ? m_pProps->m_sCondition + : ::rtl::OUString(pSect->GetCondition())); + pRet[nProperty] <<= uTmp; + } + break; + case WID_SECT_DDE_TYPE: + case WID_SECT_DDE_FILE: + case WID_SECT_DDE_ELEMENT: + { + ::rtl::OUString sRet; + if (m_bIsDescriptor) + { + if (m_pProps->m_bDDE) { - sal_Bool bVal = *(sal_Bool*)pValues[nProperty].getValue(); - if(m_bIsDescriptor) - pProps->bEditInReadonly = bVal; - else - aSection.SetEditInReadonly(bVal); + sRet = m_pProps->m_sLinkFileName; } - // <-- - break; - case WID_SECT_PASSWORD: + } + else if (DDE_LINK_SECTION == pSect->GetType()) + { + sRet = pSect->GetLinkFileName(); + } + sal_Int32 nDummy(0); + sRet = sRet.getToken(pEntry->nWID - WID_SECT_DDE_TYPE, + sfx2::cTokenSeperator, nDummy); + pRet[nProperty] <<= sRet; + } + break; + case WID_SECT_DDE_AUTOUPDATE: + { + // GetUpdateType() returns .._ALWAYS or .._ONCALL + if (pSect && pSect->IsLinkType() && pSect->IsConnected()) // lijian i73247 + { + const sal_Bool bTemp = + (pSect->GetUpdateType() == sfx2::LINKUPDATE_ALWAYS); + pRet[nProperty] <<= bTemp; + } + } + break; + case WID_SECT_LINK : + { + text::SectionFileLink aLink; + if (m_bIsDescriptor) + { + if (!m_pProps->m_bDDE) { - uno::Sequence aSeq; - pValues[nProperty] >>= aSeq; - if (m_bIsDescriptor) - pProps->aPassword = aSeq; - else - aSection.SetPasswd(aSeq); + aLink.FileURL = m_pProps->m_sLinkFileName; + aLink.FilterName = m_pProps->m_sSectionFilter; } - break; - default: - if(pFmt) - { - const SfxItemSet& rOldAttrSet = pFmt->GetAttrSet(); - aItemSet.pItemSet = new SfxItemSet(*rOldAttrSet.GetPool(), - pEntry->nWID, pEntry->nWID, 0); - aItemSet.pItemSet->Put(rOldAttrSet); - m_pPropSet->setPropertyValue(*pEntry, pValues[nProperty], *aItemSet.pItemSet); - } - else - { - SfxPoolItem* pPutItem = 0; - if(RES_COL == pEntry->nWID) - { - if(!pProps->pColItem) - pProps->pColItem = new SwFmtCol; - pPutItem = pProps->pColItem; - } - else if(RES_BACKGROUND == pEntry->nWID) - { - if(!pProps->pBrushItem) - pProps->pBrushItem = new SvxBrushItem(RES_BACKGROUND); - pPutItem = pProps->pBrushItem; - } - else if(RES_FTN_AT_TXTEND == pEntry->nWID) - { - if(!pProps->pFtnItem) - pProps->pFtnItem = new SwFmtFtnAtTxtEnd; - pPutItem = pProps->pFtnItem; - } - else if(RES_END_AT_TXTEND == pEntry->nWID) - { - if(!pProps->pEndItem) - pProps->pEndItem = new SwFmtEndAtTxtEnd; - pPutItem = pProps->pEndItem; - } - else if(RES_UNKNOWNATR_CONTAINER== pEntry->nWID) - { - if(!pProps->pXMLAttr) - pProps->pXMLAttr= new SvXMLAttrContainerItem( RES_UNKNOWNATR_CONTAINER ); - pPutItem = pProps->pXMLAttr; - } - else if(RES_COLUMNBALANCE== pEntry->nWID) - { - if(!pProps->pNoBalanceItem) - pProps->pNoBalanceItem= new SwFmtNoBalancedColumns( RES_COLUMNBALANCE ); - pPutItem = pProps->pNoBalanceItem; - } - else if(RES_FRAMEDIR == pEntry->nWID) - { - if(!pProps->pFrameDirItem) - pProps->pFrameDirItem = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR ); - pPutItem = pProps->pFrameDirItem; - } - else if(RES_LR_SPACE == pEntry->nWID) - { - // #109700# - if(!pProps->pLRSpaceItem) - pProps->pLRSpaceItem = new SvxLRSpaceItem( RES_LR_SPACE ); - pPutItem = pProps->pLRSpaceItem; - } - if(pPutItem) - pPutItem->PutValue(pValues[nProperty], pEntry->nMemberId); - } } + else if (FILE_LINK_SECTION == pSect->GetType()) + { + ::rtl::OUString sRet( pSect->GetLinkFileName() ); + sal_Int32 nIndex(0); + aLink.FileURL = + sRet.getToken(0, sfx2::cTokenSeperator, nIndex); + aLink.FilterName = + sRet.getToken(0, sfx2::cTokenSeperator, nIndex); + } + pRet[nProperty] <<= aLink; } - } - if(pFmt) - { - SwDoc* pDoc = pFmt->GetDoc(); - const SwSectionFmts& rFmts = pDoc->GetSections(); - UnoActionContext aContext(pDoc); - for( sal_uInt16 i = 0; i < rFmts.Count(); i++ ) + break; + case WID_SECT_REGION : + { + ::rtl::OUString sRet; + if (m_bIsDescriptor) + { + sRet = m_pProps->m_sSectionRegion; + } + else if (FILE_LINK_SECTION == pSect->GetType()) + { + sRet = pSect->GetLinkFileName().GetToken(2, + sfx2::cTokenSeperator); + } + pRet[nProperty] <<= sRet; + } + break; + case WID_SECT_VISIBLE : + { + const sal_Bool bTemp = (m_bIsDescriptor) + ? !m_pProps->m_bHidden : !pSect->IsHidden(); + pRet[nProperty] <<= bTemp; + } + break; + case WID_SECT_CURRENTLY_VISIBLE: + { + const sal_Bool bTemp = (m_bIsDescriptor) + ? !m_pProps->m_bCondHidden : !pSect->IsCondHidden(); + pRet[nProperty] <<= bTemp; + } + break; + case WID_SECT_PROTECTED: + { + const sal_Bool bTemp = (m_bIsDescriptor) + ? m_pProps->m_bProtect : pSect->IsProtect(); + pRet[nProperty] <<= bTemp; + } + break; + // --> FME 2004-06-22 #114856# edit in readonly sections + case WID_SECT_EDIT_IN_READONLY: + { + const sal_Bool bTemp = (m_bIsDescriptor) + ? m_pProps->m_bEditInReadonly : pSect->IsEditInReadonly(); + pRet[nProperty] <<= bTemp; + } + break; + // <-- + case FN_PARAM_LINK_DISPLAY_NAME: + { + if (pFmt) + { + pRet[nProperty] <<= OUString(pFmt->GetSection()->GetName()); + } + } + break; + case WID_SECT_DOCUMENT_INDEX: + { + // search enclosing index + SwSection* pEnclosingSection = pSect; + while ((pEnclosingSection != NULL) && + (TOX_CONTENT_SECTION != pEnclosingSection->GetType())) + { + pEnclosingSection = pEnclosingSection->GetParent(); + } + if (pEnclosingSection) + { + // convert section to TOXBase and get SwXDocumentIndex + SwTOXBaseSection *const pTOXBaseSect = + PTR_CAST(SwTOXBaseSection, pEnclosingSection); + const uno::Reference xIndex = + SwXDocumentIndexes::GetObject(pTOXBaseSect); + pRet[nProperty] <<= xIndex; + } + // else: no enclosing index found -> empty return value + } + break; + case WID_SECT_IS_GLOBAL_DOC_SECTION: + { + const sal_Bool bRet = (NULL == pFmt) ? sal_False : + static_cast(NULL != pFmt->GetGlobalDocSection()); + pRet[nProperty] <<= bRet; + } + break; + case FN_UNO_ANCHOR_TYPES: + case FN_UNO_TEXT_WRAP: + case FN_UNO_ANCHOR_TYPE: + SwXParagraph::getDefaultTextContentValue( + pRet[nProperty], OUString(), pEntry->nWID); + break; + case FN_UNO_REDLINE_NODE_START: + case FN_UNO_REDLINE_NODE_END: { - if(rFmts[i]->GetSection()->GetName() == pSect->GetName()) + if (!pFmt) + break; // lijian i73247 + SwNode* pSectNode = pFmt->GetSectionNode(); + if (FN_UNO_REDLINE_NODE_END == pEntry->nWID) { - pDoc->ChgSection( i, aSection, aItemSet.pItemSet, pDoc->IsInReading()); - - { - // temporarily remove actions to allow cursor update - UnoActionRemoveContext aRemoveContext( pDoc ); - } - - //SwSection* pSect = pFmt->GetSection(); - if( bLinkModeChanged && pSect->GetType() == DDE_LINK_SECTION) + pSectNode = pSectNode->EndOfSectionNode(); + } + const SwRedlineTbl& rRedTbl = + pFmt->GetDoc()->GetRedlineTbl(); + for (USHORT nRed = 0; nRed < rRedTbl.Count(); nRed++) + { + const SwRedline* pRedline = rRedTbl[nRed]; + SwNode const*const pRedPointNode = pRedline->GetNode(TRUE); + SwNode const*const pRedMarkNode = pRedline->GetNode(FALSE); + if ((pRedPointNode == pSectNode) || + (pRedMarkNode == pSectNode)) { - // set update type; needs an established link - if(!pSect->IsConnected()) - { - pSect->CreateLink(CREATE_CONNECT); - } - pSect->SetUpdateType( static_cast< USHORT >(bLinkMode ? - sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL) ); + SwNode const*const pStartOfRedline = + (SwNodeIndex(*pRedPointNode) <= + SwNodeIndex(*pRedMarkNode)) + ? pRedPointNode : pRedMarkNode; + const bool bIsStart = (pStartOfRedline == pSectNode); + pRet[nProperty] <<= + SwXRedlinePortion::CreateRedlineProperties( + *pRedline, bIsStart); + break; } - // section found and processed: break from loop - break; } } - } - } - else - throw uno::RuntimeException(); -} - -void SwXTextSection::setPropertyValues( - const Sequence< ::rtl::OUString >& rPropertyNames, - const Sequence< Any >& rValues ) - throw(PropertyVetoException, lang::IllegalArgumentException, - lang::WrappedTargetException, RuntimeException) -{ - vos::OGuard aGuard(Application::GetSolarMutex()); - - // workaround for bad designed API - try - { - SetPropertyValues_Impl( rPropertyNames, rValues ); - } - catch (UnknownPropertyException &rException) - { - // wrap the original (here not allowed) exception in - // a WrappedTargetException that gets thrown instead. - WrappedTargetException aWExc; - aWExc.TargetException <<= rException; - throw aWExc; - } -} -/*-- 10.12.98 14:47:11--------------------------------------------------- - - -----------------------------------------------------------------------*/ -void SwXTextSection::setPropertyValue( - const OUString& rPropertyName, const uno::Any& aValue) - throw( beans::UnknownPropertyException, beans::PropertyVetoException, - lang::IllegalArgumentException, lang::WrappedTargetException, - uno::RuntimeException ) -{ - vos::OGuard aGuard(Application::GetSolarMutex()); - Sequence< ::rtl::OUString > aPropertyNames(1); - aPropertyNames.getArray()[0] = rPropertyName; - Sequence< Any > aValues(1); - aValues.getArray()[0] = aValue; - SetPropertyValues_Impl( aPropertyNames, aValues ); -} -/* -----------------------------12.02.01 10:43-------------------------------- - - ---------------------------------------------------------------------------*/ -uno::Sequence< Any > SAL_CALL SwXTextSection::GetPropertyValues_Impl( - const uno::Sequence< OUString > & rPropertyNames ) - throw( UnknownPropertyException, WrappedTargetException, RuntimeException) -{ - Sequence< Any > aRet(rPropertyNames.getLength()); - Any* pRet = aRet.getArray(); - SwSectionFmt* pFmt = GetFmt(); - if(pFmt||m_bIsDescriptor) - { - SwSection* pSect = pFmt ? pFmt->GetSection() : 0; - const OUString* pPropertyNames = rPropertyNames.getConstArray(); - for(sal_Int32 nProperty = 0; nProperty < rPropertyNames.getLength(); nProperty++) - { - const SfxItemPropertySimpleEntry* pEntry = - m_pPropSet->getPropertyMap()->getByName( pPropertyNames[nProperty]); - if(pEntry) + break; + case WID_SECT_PASSWORD: { - switch(pEntry->nWID) + pRet[nProperty] <<= (m_bIsDescriptor) + ? m_pProps->m_Password : pSect->GetPasswd(); + } + break; + default: + { + if (pFmt) { - case WID_SECT_CONDITION: - { - OUString uTmp( - m_bIsDescriptor ? pProps->sCondition : pSect->GetCondition()); - pRet[nProperty] <<= uTmp; - } - break; - case WID_SECT_DDE_TYPE : - case WID_SECT_DDE_FILE : - case WID_SECT_DDE_ELEMENT : + m_rPropSet.getPropertyValue(*pEntry, + pFmt->GetAttrSet(), pRet[nProperty]); + } + else + { + const SfxPoolItem* pQueryItem = 0; + if (RES_COL == pEntry->nWID) { - String sRet; - if(m_bIsDescriptor) - { - if(pProps->bDDE) - sRet = pProps->sLinkFileName; - } - else if( DDE_LINK_SECTION == pSect->GetType() ) + if (!m_pProps->m_pColItem.get()) { - sRet = pSect->GetLinkFileName(); + m_pProps->m_pColItem.reset(new SwFmtCol); } - sRet = sRet.GetToken(pEntry->nWID - WID_SECT_DDE_TYPE, sfx2::cTokenSeperator); - pRet[nProperty] <<= OUString(sRet); + pQueryItem = m_pProps->m_pColItem.get(); } - break; - case WID_SECT_DDE_AUTOUPDATE: + else if (RES_BACKGROUND == pEntry->nWID) { - // GetUpdateType() returns .._ALWAYS or .._ONCALL - if ( pSect && pSect->IsLinkType() && pSect->IsConnected() ) // lijian i73247 + if (!m_pProps->m_pBrushItem.get()) { - sal_Bool bTemp = - (pSect->GetUpdateType() == sfx2::LINKUPDATE_ALWAYS); - pRet[nProperty].setValue( &bTemp, ::getCppuBooleanType()); + m_pProps->m_pBrushItem.reset( + new SvxBrushItem(RES_BACKGROUND)); } + pQueryItem = m_pProps->m_pBrushItem.get(); } - break; - case WID_SECT_LINK : + else if (RES_FTN_AT_TXTEND == pEntry->nWID) { - text::SectionFileLink aLink; - if(m_bIsDescriptor) - { - if(!pProps->bDDE) - { - aLink.FileURL = pProps->sLinkFileName; - aLink.FilterName = pProps->sSectionFilter; - } - } - else if( FILE_LINK_SECTION == pSect->GetType() ) + if (!m_pProps->m_pFtnItem.get()) { - String sRet( pSect->GetLinkFileName() ); - aLink.FileURL = sRet.GetToken(0, sfx2::cTokenSeperator ); - aLink.FilterName = sRet.GetToken(1, sfx2::cTokenSeperator ); + m_pProps->m_pFtnItem.reset(new SwFmtFtnAtTxtEnd); } - pRet[nProperty].setValue(&aLink, ::getCppuType((text::SectionFileLink*)0)); + pQueryItem = m_pProps->m_pFtnItem.get(); } - break; - case WID_SECT_REGION : + else if (RES_END_AT_TXTEND == pEntry->nWID) { - String sRet; - if(m_bIsDescriptor) + if (!m_pProps->m_pEndItem.get()) { - sRet = pProps->sSectionRegion; + m_pProps->m_pEndItem.reset(new SwFmtEndAtTxtEnd); } - else if( FILE_LINK_SECTION == pSect->GetType() ) - sRet = pSect->GetLinkFileName().GetToken(2, sfx2::cTokenSeperator); - pRet[nProperty] <<= OUString(sRet); - } - break; - case WID_SECT_VISIBLE : - { - sal_Bool bTemp = m_bIsDescriptor ? !pProps->bHidden : !pSect->IsHidden(); - pRet[nProperty].setValue( &bTemp, ::getCppuBooleanType()); - } - break; - case WID_SECT_CURRENTLY_VISIBLE: - { - sal_Bool bTmp = m_bIsDescriptor ? !pProps->bCondHidden : !pSect->IsCondHidden(); - pRet[nProperty].setValue( &bTmp, ::getCppuBooleanType()); - } - break; - case WID_SECT_PROTECTED: - { - sal_Bool bTemp = m_bIsDescriptor ? pProps->bProtect : pSect->IsProtect(); - pRet[nProperty].setValue( &bTemp, ::getCppuBooleanType()); - } - break; - // --> FME 2004-06-22 #114856# edit in readonly sections - case WID_SECT_EDIT_IN_READONLY: - { - sal_Bool bTemp = m_bIsDescriptor ? pProps->bEditInReadonly : pSect->IsEditInReadonly(); - pRet[nProperty].setValue( &bTemp, ::getCppuBooleanType()); - } - break; - // <-- - case FN_PARAM_LINK_DISPLAY_NAME: - { - if(pFmt) - pRet[nProperty] <<= OUString(pFmt->GetSection()->GetName()); + pQueryItem = m_pProps->m_pEndItem.get(); } - break; - case WID_SECT_DOCUMENT_INDEX: + else if (RES_UNKNOWNATR_CONTAINER== pEntry->nWID) { - // search enclosing index - SwSection* pEnclosingSection = pSect; - while ( (pEnclosingSection != NULL) && - (TOX_CONTENT_SECTION != - pEnclosingSection->GetType()) ) + if (!m_pProps->m_pXMLAttr.get()) { - pEnclosingSection = pEnclosingSection->GetParent(); + m_pProps->m_pXMLAttr.reset( + new SvXMLAttrContainerItem); } - if (pEnclosingSection) + pQueryItem = m_pProps->m_pXMLAttr.get(); + } + else if (RES_COLUMNBALANCE== pEntry->nWID) + { + if (!m_pProps->m_pNoBalanceItem.get()) { - // convert section to TOXBase and get SwXDocumentIndex - SwTOXBaseSection* pTOXBaseSect = - PTR_CAST(SwTOXBaseSection, pEnclosingSection); - uno::Reference xIndex = - SwXDocumentIndexes::GetObject(pTOXBaseSect); - pRet[nProperty] <<= xIndex; + m_pProps->m_pNoBalanceItem.reset( + new SwFmtNoBalancedColumns); } - // else: no enclosing index found -> empty return value + pQueryItem = m_pProps->m_pNoBalanceItem.get(); } - break; - case WID_SECT_IS_GLOBAL_DOC_SECTION: + else if (RES_FRAMEDIR == pEntry->nWID) { - sal_Bool bRet = (NULL == pFmt) ? sal_False : - static_cast< sal_Bool >(NULL != pFmt->GetGlobalDocSection()); - pRet[nProperty].setValue( &bRet, ::getCppuBooleanType()); + if (!m_pProps->m_pFrameDirItem.get()) + { + m_pProps->m_pFrameDirItem.reset( + new SvxFrameDirectionItem( + FRMDIR_ENVIRONMENT, RES_FRAMEDIR)); + } + pQueryItem = m_pProps->m_pFrameDirItem.get(); } - break; - case FN_UNO_ANCHOR_TYPES: - case FN_UNO_TEXT_WRAP: - case FN_UNO_ANCHOR_TYPE: - SwXParagraph::getDefaultTextContentValue(pRet[nProperty], OUString(), pEntry->nWID); - break; - case FN_UNO_REDLINE_NODE_START: - case FN_UNO_REDLINE_NODE_END: + /* -> #109700# */ + else if (RES_LR_SPACE == pEntry->nWID) { - if(!pFmt) - break; // lijian i73247 - SwNode* pSectNode = pFmt->GetSectionNode(); - if(FN_UNO_REDLINE_NODE_END == pEntry->nWID) - pSectNode = pSectNode->EndOfSectionNode(); - const SwRedlineTbl& rRedTbl = pFmt->GetDoc()->GetRedlineTbl(); - for(USHORT nRed = 0; nRed < rRedTbl.Count(); nRed++) + if (!m_pProps->m_pLRSpaceItem.get()) { - const SwRedline* pRedline = rRedTbl[nRed]; - const SwNode* pRedPointNode = pRedline->GetNode(TRUE); - const SwNode* pRedMarkNode = pRedline->GetNode(FALSE); - if(pRedPointNode == pSectNode || pRedMarkNode == pSectNode) - { - const SwNode* pStartOfRedline = SwNodeIndex(*pRedPointNode) <= SwNodeIndex(*pRedMarkNode) ? - pRedPointNode : pRedMarkNode; - BOOL bIsStart = pStartOfRedline == pSectNode; - pRet[nProperty] <<= SwXRedlinePortion::CreateRedlineProperties(*pRedline, bIsStart); - break; - } + m_pProps->m_pLRSpaceItem.reset( + new SvxLRSpaceItem( RES_LR_SPACE )); } + pQueryItem = m_pProps->m_pLRSpaceItem.get(); } - break; - case WID_SECT_PASSWORD: + /* <- #109700# */ + if (pQueryItem) { - pRet[nProperty] <<= m_bIsDescriptor ? pProps->aPassword : pSect->GetPasswd(); + pQueryItem->QueryValue(pRet[nProperty], + pEntry->nMemberId); } - break; - default: - if(pFmt) - m_pPropSet->getPropertyValue(*pEntry, pFmt->GetAttrSet(), pRet[nProperty]); - else - { - const SfxPoolItem* pQueryItem = 0; - if(RES_COL == pEntry->nWID) - { - if(!pProps->pColItem) - pProps->pColItem = new SwFmtCol; - pQueryItem = pProps->pColItem; - } - else if(RES_BACKGROUND == pEntry->nWID) - { - if(!pProps->pBrushItem) - pProps->pBrushItem = new SvxBrushItem(RES_BACKGROUND); - pQueryItem = pProps->pBrushItem; - } - else if(RES_FTN_AT_TXTEND == pEntry->nWID) - { - if(!pProps->pFtnItem) - pProps->pFtnItem = new SwFmtFtnAtTxtEnd; - pQueryItem = pProps->pFtnItem; - } - else if(RES_END_AT_TXTEND == pEntry->nWID) - { - if(!pProps->pEndItem) - pProps->pEndItem = new SwFmtEndAtTxtEnd; - pQueryItem = pProps->pEndItem; - } - else if(RES_UNKNOWNATR_CONTAINER== pEntry->nWID) - { - if(!pProps->pXMLAttr) - pProps->pXMLAttr= new SvXMLAttrContainerItem ; - pQueryItem = pProps->pXMLAttr; - } - else if(RES_COLUMNBALANCE== pEntry->nWID) - { - if(!pProps->pNoBalanceItem) - pProps->pNoBalanceItem= new SwFmtNoBalancedColumns; - pQueryItem = pProps->pNoBalanceItem; - } - else if(RES_FRAMEDIR == pEntry->nWID) - { - if(!pProps->pFrameDirItem) - pProps->pFrameDirItem = new SvxFrameDirectionItem(FRMDIR_ENVIRONMENT, RES_FRAMEDIR); - pQueryItem = pProps->pFrameDirItem; - } - /* -> #109700# */ - else if(RES_LR_SPACE == pEntry->nWID) - { - if(!pProps->pLRSpaceItem) - pProps->pLRSpaceItem = new SvxLRSpaceItem( RES_LR_SPACE ); - pQueryItem = pProps->pLRSpaceItem; - } - /* <- #109700# */ - if(pQueryItem) - pQueryItem->QueryValue(pRet[nProperty], pEntry->nMemberId); - } } } - else - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pPropertyNames[nProperty], static_cast < cppu::OWeakObject * > ( this ) ); } } - else - throw uno::RuntimeException(); return aRet; } + /* -----------------------------04.11.03 10:43-------------------------------- ---------------------------------------------------------------------------*/ -Sequence< Any > SwXTextSection::getPropertyValues( - const Sequence< ::rtl::OUString >& rPropertyNames ) - throw(RuntimeException) +uno::Sequence< uno::Any > SAL_CALL +SwXTextSection::getPropertyValues( + const uno::Sequence< ::rtl::OUString >& rPropertyNames) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - Sequence< Any > aValues; + uno::Sequence< uno::Any > aValues; // workaround for bad designed API try { - aValues = GetPropertyValues_Impl( rPropertyNames ); + aValues = m_pImpl->GetPropertyValues_Impl( rPropertyNames ); } - catch (UnknownPropertyException &) + catch (beans::UnknownPropertyException &) { - throw RuntimeException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property exception caught" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException(OUString( + RTL_CONSTASCII_USTRINGPARAM("Unknown property exception caught")), + static_cast(this)); } - catch (WrappedTargetException &) + catch (lang::WrappedTargetException &) { - throw RuntimeException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "WrappedTargetException caught" ) ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException(OUString( + RTL_CONSTASCII_USTRINGPARAM("WrappedTargetException caught")), + static_cast(this)); } return aValues; @@ -1213,279 +1356,373 @@ Sequence< Any > SwXTextSection::getPropertyValues( /*-- 10.12.98 14:47:12--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXTextSection::getPropertyValue(const OUString& rPropertyName) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +uno::Any SAL_CALL +SwXTextSection::getPropertyValue(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - Sequence< ::rtl::OUString > aPropertyNames(1); + + uno::Sequence< ::rtl::OUString > aPropertyNames(1); aPropertyNames.getArray()[0] = rPropertyName; - return GetPropertyValues_Impl(aPropertyNames).getConstArray()[0]; + return m_pImpl->GetPropertyValues_Impl(aPropertyNames).getConstArray()[0]; } /* -----------------------------12.02.01 10:30-------------------------------- ---------------------------------------------------------------------------*/ -void SwXTextSection::addPropertiesChangeListener( - const uno::Sequence< ::rtl::OUString >& /*aPropertyNames*/, - const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ ) throw(RuntimeException) +void SAL_CALL SwXTextSection::addPropertiesChangeListener( + const uno::Sequence< OUString >& /*aPropertyNames*/, + const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ ) +throw (uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXTextSection::addPropertiesChangeListener(): not implemented"); } + /* -----------------------------12.02.01 10:30-------------------------------- ---------------------------------------------------------------------------*/ -void SwXTextSection::removePropertiesChangeListener( +void SAL_CALL SwXTextSection::removePropertiesChangeListener( const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ ) - throw(RuntimeException) +throw (uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXTextSection::removePropertiesChangeListener(): not implemented"); } + /* -----------------------------12.02.01 10:30-------------------------------- ---------------------------------------------------------------------------*/ -void SwXTextSection::firePropertiesChangeEvent( - const uno::Sequence< ::rtl::OUString >& /*aPropertyNames*/, +void SAL_CALL SwXTextSection::firePropertiesChangeEvent( + const uno::Sequence< OUString >& /*aPropertyNames*/, const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ ) - throw(RuntimeException) + throw(uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXTextSection::firePropertiesChangeEvent(): not implemented"); } + /*-- 10.12.98 14:47:13--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextSection::addPropertyChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXTextSection::addPropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXTextSection::addPropertyChangeListener(): not implemented"); } -/*-- 10.12.98 14:47:13--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXTextSection::removePropertyChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXTextSection::removePropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXTextSection::removePropertyChangeListener(): not implemented"); } -/*-- 10.12.98 14:47:14--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXTextSection::addVetoableChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXTextSection::addVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXTextSection::addVetoableChangeListener(): not implemented"); } -/*-- 10.12.98 14:47:14--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXTextSection::removeVetoableChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXTextSection::removeVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXTextSection::removeVetoableChangeListener(): not implemented"); } /*-- 08.11.00 10:47:55--------------------------------------------------- -----------------------------------------------------------------------*/ -PropertyState SwXTextSection::getPropertyState( const OUString& rPropertyName ) - throw(UnknownPropertyException, RuntimeException) +beans::PropertyState SAL_CALL +SwXTextSection::getPropertyState(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - Sequence< OUString > aNames(1); + + uno::Sequence< OUString > aNames(1); aNames.getArray()[0] = rPropertyName; return getPropertyStates(aNames).getConstArray()[0]; } /*-- 08.11.00 10:47:55--------------------------------------------------- -----------------------------------------------------------------------*/ -Sequence< PropertyState > SwXTextSection::getPropertyStates( - const Sequence< OUString >& rPropertyNames ) - throw(UnknownPropertyException, RuntimeException) +uno::Sequence< beans::PropertyState > SAL_CALL +SwXTextSection::getPropertyStates( + const uno::Sequence< OUString >& rPropertyNames) +throw (beans::UnknownPropertyException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - Sequence< PropertyState > aStates(rPropertyNames.getLength()); - SwSectionFmt* pFmt = GetFmt(); - if(pFmt||m_bIsDescriptor) + + SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt(); + if (!pFmt && !m_pImpl->m_bIsDescriptor) + { + throw uno::RuntimeException(); + } + + uno::Sequence< beans::PropertyState > aStates(rPropertyNames.getLength()); + beans::PropertyState *const pStates = aStates.getArray(); + const OUString* pNames = rPropertyNames.getConstArray(); + for (sal_Int32 i = 0; i < rPropertyNames.getLength(); i++) { - PropertyState* pStates = aStates.getArray(); - const OUString* pNames = rPropertyNames.getConstArray(); - for(sal_Int32 i = 0; i < rPropertyNames.getLength(); i++) + pStates[i] = beans::PropertyState_DEFAULT_VALUE; + SfxItemPropertySimpleEntry const*const pEntry = + m_pImpl->m_rPropSet.getPropertyMap()->getByName( pNames[i]); + if (!pEntry) + { + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + pNames[i], static_cast< cppu::OWeakObject* >(this)); + } + switch (pEntry->nWID) { - pStates[i] = PropertyState_DEFAULT_VALUE; - const SfxItemPropertySimpleEntry* pEntry = - m_pPropSet->getPropertyMap()->getByName( pNames[i]); - if(!pEntry) - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pNames[i], static_cast < cppu::OWeakObject * > ( this ) ); - switch(pEntry->nWID) + case WID_SECT_CONDITION: + case WID_SECT_DDE_TYPE: + case WID_SECT_DDE_FILE: + case WID_SECT_DDE_ELEMENT: + case WID_SECT_DDE_AUTOUPDATE: + case WID_SECT_LINK: + case WID_SECT_REGION : + case WID_SECT_VISIBLE: + case WID_SECT_PROTECTED: + // --> FME 2004-06-22 #114856# edit in readonly sections + case WID_SECT_EDIT_IN_READONLY: + // <-- + case FN_PARAM_LINK_DISPLAY_NAME: + case FN_UNO_ANCHOR_TYPES: + case FN_UNO_TEXT_WRAP: + case FN_UNO_ANCHOR_TYPE: + pStates[i] = beans::PropertyState_DIRECT_VALUE; + break; + default: { - case WID_SECT_CONDITION: - case WID_SECT_DDE_TYPE : - case WID_SECT_DDE_FILE : - case WID_SECT_DDE_ELEMENT : - case WID_SECT_DDE_AUTOUPDATE: - case WID_SECT_LINK : - case WID_SECT_REGION : - case WID_SECT_VISIBLE : - case WID_SECT_PROTECTED: - // --> FME 2004-06-22 #114856# edit in readonly sections - case WID_SECT_EDIT_IN_READONLY: - // <-- - case FN_PARAM_LINK_DISPLAY_NAME: - case FN_UNO_ANCHOR_TYPES: - case FN_UNO_TEXT_WRAP: - case FN_UNO_ANCHOR_TYPE: - pStates[i] = PropertyState_DIRECT_VALUE; - break; - default: - if(pFmt) - pStates[i] = m_pPropSet->getPropertyState(pNames[i], pFmt->GetAttrSet()); - else + if (pFmt) + { + pStates[i] = m_pImpl->m_rPropSet.getPropertyState( + pNames[i], pFmt->GetAttrSet()); + } + else + { + if (RES_COL == pEntry->nWID) + { + if (!m_pImpl->m_pProps->m_pColItem.get()) + { + pStates[i] = beans::PropertyState_DEFAULT_VALUE; + } + else + { + pStates[i] = beans::PropertyState_DIRECT_VALUE; + } + } + else //if(RES_BACKGROUND == pEntry->nWID) { - if(RES_COL == pEntry->nWID) + if (!m_pImpl->m_pProps->m_pBrushItem.get()) { - if(!pProps->pColItem) - pStates[i] = PropertyState_DEFAULT_VALUE; - else - pStates[i] = PropertyState_DIRECT_VALUE; + pStates[i] = beans::PropertyState_DEFAULT_VALUE; } - else //if(RES_BACKGROUND == pEntry->nWID) + else { - if(!pProps->pBrushItem) - pStates[i] = PropertyState_DEFAULT_VALUE; - else - pStates[i] = PropertyState_DIRECT_VALUE; + pStates[i] = beans::PropertyState_DIRECT_VALUE; } } + } } } } - else - throw RuntimeException(); return aStates; } + /*-- 08.11.00 10:47:55--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextSection::setPropertyToDefault( const OUString& rPropertyName ) - throw(UnknownPropertyException, RuntimeException) +void SAL_CALL +SwXTextSection::setPropertyToDefault(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwSectionFmt* pFmt = GetFmt(); - if(pFmt||m_bIsDescriptor) + + SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt(); + if (!pFmt && !m_pImpl->m_bIsDescriptor) { - SwSection aSection(CONTENT_SECTION, aEmptyStr); - SwSection* pSect = pFmt ? pFmt->GetSection() : 0; - if(pFmt) - aSection = *pSect; - const SfxItemPropertySimpleEntry* pEntry = - m_pPropSet->getPropertyMap()->getByName( rPropertyName ); - if(!pEntry) - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); - if ( pEntry->nFlags & PropertyAttribute::READONLY) - throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "setPropertyToDefault: property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); - SfxItemSet* pNewAttrSet = 0; - switch(pEntry->nWID) + throw uno::RuntimeException(); + } + + SwSection aSection(CONTENT_SECTION, aEmptyStr); + SwSection *const pSect = (pFmt) ? pFmt->GetSection() : 0; + if (pFmt) + { + aSection = *pSect; + } + SfxItemPropertySimpleEntry const*const pEntry = + m_pImpl->m_rPropSet.getPropertyMap()->getByName(rPropertyName); + if (!pEntry) + { + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + rPropertyName, static_cast< cppu::OWeakObject* >(this)); + } + if (pEntry->nFlags & beans::PropertyAttribute::READONLY) + { + throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( + "setPropertyToDefault: property is read-only: ")) + + rPropertyName, + static_cast(this)); + } + + ::std::auto_ptr pNewAttrSet; + switch (pEntry->nWID) + { + case WID_SECT_CONDITION: { - case WID_SECT_CONDITION: + if (m_pImpl->m_bIsDescriptor) { - if(m_bIsDescriptor) - pProps->sCondition = aEmptyStr; - else - aSection.SetCondition(aEmptyStr); + m_pImpl->m_pProps->m_sCondition = aEmptyStr; } - break; - case WID_SECT_DDE_TYPE : - case WID_SECT_DDE_FILE : - case WID_SECT_DDE_ELEMENT : - case WID_SECT_LINK : - case WID_SECT_REGION : - aSection.SetType(CONTENT_SECTION); - break; - case WID_SECT_DDE_AUTOUPDATE: - aSection.SetUpdateType(sfx2::LINKUPDATE_ALWAYS); - break; - case WID_SECT_VISIBLE : + else { - if(m_bIsDescriptor) - pProps->bHidden = FALSE; - else - aSection.SetHidden(FALSE); + aSection.SetCondition(aEmptyStr); } - break; - case WID_SECT_PROTECTED: + } + break; + case WID_SECT_DDE_TYPE : + case WID_SECT_DDE_FILE : + case WID_SECT_DDE_ELEMENT : + case WID_SECT_LINK : + case WID_SECT_REGION : + aSection.SetType(CONTENT_SECTION); + break; + case WID_SECT_DDE_AUTOUPDATE: + aSection.SetUpdateType(sfx2::LINKUPDATE_ALWAYS); + break; + case WID_SECT_VISIBLE : + { + if (m_pImpl->m_bIsDescriptor) { - if(m_bIsDescriptor) - pProps->bProtect = FALSE; - else - aSection.SetProtect(FALSE); + m_pImpl->m_pProps->m_bHidden = false; } - break; - // --> FME 2004-06-22 #114856# edit in readonly sections - case WID_SECT_EDIT_IN_READONLY: + else { - if(m_bIsDescriptor) - pProps->bEditInReadonly = FALSE; - else - aSection.SetEditInReadonly(FALSE); + aSection.SetHidden(FALSE); } - break; - // <-- + } + break; + case WID_SECT_PROTECTED: + { + if (m_pImpl->m_bIsDescriptor) + { + m_pImpl->m_pProps->m_bProtect = false; + } + else + { + aSection.SetProtect(FALSE); + } + } + break; + // --> FME 2004-06-22 #114856# edit in readonly sections + case WID_SECT_EDIT_IN_READONLY: + { + if (m_pImpl->m_bIsDescriptor) + { + m_pImpl->m_pProps->m_bEditInReadonly = false; + } + else + { + aSection.SetEditInReadonly(FALSE); + } + } + break; + // <-- - case FN_UNO_ANCHOR_TYPES: - case FN_UNO_TEXT_WRAP: - case FN_UNO_ANCHOR_TYPE: - break; - default: - if(pEntry->nWID <= SFX_WHICH_MAX) + case FN_UNO_ANCHOR_TYPES: + case FN_UNO_TEXT_WRAP: + case FN_UNO_ANCHOR_TYPE: + break; + default: + { + if (pEntry->nWID <= SFX_WHICH_MAX) + { + if (pFmt) + { + const SfxItemSet& rOldAttrSet = pFmt->GetAttrSet(); + pNewAttrSet.reset( new SfxItemSet(*rOldAttrSet.GetPool(), + pEntry->nWID, pEntry->nWID, 0)); + pNewAttrSet->ClearItem(pEntry->nWID); + } + else { - if(pFmt) + if (RES_COL == pEntry->nWID) { - const SfxItemSet& rOldAttrSet = pFmt->GetAttrSet(); - pNewAttrSet = new SfxItemSet(*rOldAttrSet.GetPool(), - pEntry->nWID, pEntry->nWID, 0); - pNewAttrSet->ClearItem(pEntry->nWID); + m_pImpl->m_pProps->m_pColItem.reset(); } - else + else if (RES_BACKGROUND == pEntry->nWID) { - if(RES_COL == pEntry->nWID) - DELETEZ(pProps->pColItem); - else if(RES_BACKGROUND == pEntry->nWID) - DELETEZ(pProps->pBrushItem); + m_pImpl->m_pProps->m_pBrushItem.reset(); } } + } } - if(pFmt) + } + + if (pFmt) + { + SwDoc *const pDoc = pFmt->GetDoc(); + const SwSectionFmts& rFmts = pDoc->GetSections(); + UnoActionContext aContext(pDoc); + for (sal_uInt16 i = 0; i < rFmts.Count(); i++) { - SwDoc* pDoc = pFmt->GetDoc(); - const SwSectionFmts& rFmts = pDoc->GetSections(); - UnoActionContext aContext(pDoc); - for( sal_uInt16 i = 0; i < rFmts.Count(); i++ ) + if (rFmts[i]->GetSection()->GetName() == pSect->GetName()) { - if(rFmts[i]->GetSection()->GetName() == pSect->GetName()) + pDoc->ChgSection(i, aSection, pNewAttrSet.get(), + pDoc->IsInReading()); { - pDoc->ChgSection( i, aSection, pNewAttrSet, pDoc->IsInReading()); - - { - // temporarily remove actions to allow cursor update - UnoActionRemoveContext aRemoveContext( pDoc ); - } - - break; + // temporarily remove actions to allow cursor update + UnoActionRemoveContext aRemoveContext( pDoc ); } + break; } - delete pNewAttrSet; } } - else - throw RuntimeException(); } + /*-- 08.11.00 10:47:56--------------------------------------------------- -----------------------------------------------------------------------*/ -Any SwXTextSection::getPropertyDefault( const OUString& rPropertyName ) - throw(UnknownPropertyException, WrappedTargetException, RuntimeException) +uno::Any SAL_CALL +SwXTextSection::getPropertyDefault(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + uno::Any aRet; - SwSectionFmt* pFmt = GetFmt(); - const SfxItemPropertySimpleEntry* pEntry = - m_pPropSet->getPropertyMap()->getByName( rPropertyName ); + SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt(); + SfxItemPropertySimpleEntry const*const pEntry = + m_pImpl->m_rPropSet.getPropertyMap()->getByName(rPropertyName); if (!pEntry) - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + { + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + rPropertyName, + static_cast(this)); + } switch(pEntry->nWID) { @@ -1498,7 +1735,7 @@ Any SwXTextSection::getPropertyDefault( const OUString& rPropertyName ) aRet <<= OUString(); break; case WID_SECT_LINK : - aRet <<= SectionFileLink(); + aRet <<= text::SectionFileLink(); break; case WID_SECT_DDE_AUTOUPDATE: case WID_SECT_VISIBLE : @@ -1524,7 +1761,7 @@ Any SwXTextSection::getPropertyDefault( const OUString& rPropertyName ) default: if(pFmt && pEntry->nWID <= SFX_WHICH_MAX) { - SwDoc* pDoc = pFmt->GetDoc(); + SwDoc *const pDoc = pFmt->GetDoc(); const SfxPoolItem& rDefItem = pDoc->GetAttrPool().GetDefaultItem(pEntry->nWID); rDefItem.QueryValue(aRet, pEntry->nMemberId); @@ -1532,33 +1769,43 @@ Any SwXTextSection::getPropertyDefault( const OUString& rPropertyName ) } return aRet; } + /*-- 10.12.98 14:47:15--------------------------------------------------- -----------------------------------------------------------------------*/ -OUString SwXTextSection::getName(void) throw( uno::RuntimeException ) +OUString SAL_CALL SwXTextSection::getName() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - String sRet; - const SwSectionFmt* pFmt = GetFmt(); + + ::rtl::OUString sRet; + SwSectionFmt const*const pFmt = m_pImpl->GetSectionFmt(); if(pFmt) + { sRet = pFmt->GetSection()->GetName(); - else if(m_bIsDescriptor) - sRet = m_sName; + } + else if (m_pImpl->m_bIsDescriptor) + { + sRet = m_pImpl->m_sName; + } else + { throw uno::RuntimeException(); + } return sRet; } /*-- 10.12.98 14:47:16--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextSection::setName(const OUString& rName) throw( uno::RuntimeException ) +void SAL_CALL SwXTextSection::setName(const OUString& rName) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwSectionFmt* pFmt = GetFmt(); + + SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt(); if(pFmt) { SwSection aSection(CONTENT_SECTION, aEmptyStr); - SwSection* pSect = pFmt->GetSection(); + SwSection *const pSect = pFmt->GetSection(); aSection = *pSect; String sNewName(rName); aSection.SetName(sNewName); @@ -1568,9 +1815,13 @@ void SwXTextSection::setName(const OUString& rName) throw( uno::RuntimeException for( sal_uInt16 i = 0; i < rFmts.Count(); i++ ) { if(rFmts[i]->GetSection() == pSect) + { nApplyPos = i; + } else if(sNewName == rFmts[i]->GetSection()->GetName()) + { throw uno::RuntimeException(); + } } if(nApplyPos != USHRT_MAX) { @@ -1584,46 +1835,50 @@ void SwXTextSection::setName(const OUString& rName) throw( uno::RuntimeException } } } - else if(m_bIsDescriptor) - m_sName = String(rName); + else if (m_pImpl->m_bIsDescriptor) + { + m_pImpl->m_sName = rName; + } else + { throw uno::RuntimeException(); + } } /* -----------------02.11.99 11:30------------------- --------------------------------------------------*/ -OUString SwXTextSection::getImplementationName(void) throw( uno::RuntimeException ) +OUString SAL_CALL +SwXTextSection::getImplementationName() throw (uno::RuntimeException) { return C2U("SwXTextSection"); } + /* -----------------02.11.99 11:30------------------- --------------------------------------------------*/ -sal_Bool SwXTextSection::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) +static char const*const g_ServicesTextSection[] = { - return !rServiceName.compareToAscii("com.sun.star.text.TextSection") || - !rServiceName.compareToAscii("com.sun.star.document.LinkTarget") || - !rServiceName.compareToAscii("com.sun.star.text.TextContent"); -} -/* -----------------02.11.99 11:30------------------- + "com.sun.star.text.TextContent", + "com.sun.star.text.TextSection", + "com.sun.star.document.LinkTarget", +}; +static const size_t g_nServicesTextSection( + sizeof(g_ServicesTextSection)/sizeof(g_ServicesTextSection[0])); - --------------------------------------------------*/ -uno::Sequence< OUString > SwXTextSection::getSupportedServiceNames(void) throw( uno::RuntimeException ) +sal_Bool SAL_CALL SwXTextSection::supportsService(const OUString& rServiceName) +throw (uno::RuntimeException) { - uno::Sequence< OUString > aRet(3); - OUString* pArr = aRet.getArray(); - pArr[0] = C2U("com.sun.star.text.TextSection"); - pArr[1] = C2U("com.sun.star.document.LinkTarget"); - pArr[2] = C2U("com.sun.star.text.TextContent"); - return aRet; + return ::sw::SupportsServiceImpl( + g_nServicesTextSection, g_ServicesTextSection, rServiceName); } -/*-- 20.12.2005 10:27:33--------------------------------------------------- +/* -----------------02.11.99 11:30------------------- - -----------------------------------------------------------------------*/ -SwSectionFmt* SwXTextSection::GetFmt()const + --------------------------------------------------*/ +uno::Sequence< OUString > SAL_CALL +SwXTextSection::getSupportedServiceNames() throw (uno::RuntimeException) { - return m_pClient ? - const_cast(static_cast< const SwSectionFmt* >(m_pClient->GetRegisteredIn())) - : 0; + return ::sw::GetSupportedServiceNamesImpl( + g_nServicesTextSection, g_ServicesTextSection); } + diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 6a669499e7..937e31710a 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -674,7 +674,10 @@ void SwXText::insertTextContentBefore( throw lang::IllegalArgumentException(); sal_Bool bRet = sal_False; - SwXTextSection* pXSection = SwXTextSection::GetImplementation( xSuccessor ); + const uno::Reference xSuccTunnel(xSuccessor, + uno::UNO_QUERY); + SwXTextSection *const pXSection = + ::sw::UnoTunnelGetImplementation(xSuccTunnel); SwXTextTable* pXTable = SwXTextTable::GetImplementation(xSuccessor ); SwFrmFmt* pTableFmt = pXTable ? pXTable->GetFrmFmt() : 0; SwTxtNode * pTxtNode = 0; @@ -728,7 +731,10 @@ void SwXText::insertTextContentAfter( if(!pPara || !pPara->IsDescriptor() || !xPredecessor.is()) throw lang::IllegalArgumentException(); - SwXTextSection* pXSection = SwXTextSection::GetImplementation( xPredecessor ); + const uno::Reference xPredTunnel(xPredecessor, + uno::UNO_QUERY); + SwXTextSection *const pXSection = + ::sw::UnoTunnelGetImplementation(xPredTunnel); SwXTextTable* pXTable = SwXTextTable::GetImplementation(xPredecessor ); SwFrmFmt* pTableFmt = pXTable ? pXTable->GetFrmFmt() : 0; sal_Bool bRet = sal_False; @@ -779,7 +785,10 @@ void SwXText::removeTextContentBefore( } sal_Bool bRet = sal_False; - SwXTextSection* pXSection = SwXTextSection::GetImplementation( xSuccessor ); + const uno::Reference xSuccTunnel(xSuccessor, + uno::UNO_QUERY); + SwXTextSection *const pXSection = + ::sw::UnoTunnelGetImplementation(xSuccTunnel); SwXTextTable* pXTable = SwXTextTable::GetImplementation( xSuccessor ); SwFrmFmt* pTableFmt = pXTable ? pXTable->GetFrmFmt() : 0; if(pTableFmt && pTableFmt->GetDoc() == GetDoc()) @@ -826,7 +835,10 @@ void SwXText::removeTextContentAfter(const uno::Reference< text::XTextContent>& } sal_Bool bRet = sal_False; - SwXTextSection* pXSection = SwXTextSection::GetImplementation( xPredecessor ); + const uno::Reference xPredTunnel(xPredecessor, + uno::UNO_QUERY); + SwXTextSection *const pXSection = + ::sw::UnoTunnelGetImplementation(xPredTunnel); SwXTextTable* pXTable = SwXTextTable::GetImplementation(xPredecessor ); SwFrmFmt* pTableFmt = pXTable ? pXTable->GetFrmFmt() : 0; if(pTableFmt && pTableFmt->GetDoc() == GetDoc()) -- cgit v1.2.3 From 5735c644e61b90bd9f63cdc37121c86a18ddfdd2 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:51 +0100 Subject: swunolocking1: #i105557#: fix locking for SwXTextRanges: add Impl struct, and use UnoImplPtr to lock destructor. move all implementation details out of header, into Impl struct. use new XServiceInfo helpers. replace SvWeirdArray with STL vector. clean up the implementation a little. --- sw/inc/unotextrange.hxx | 33 ++--- sw/source/core/unocore/unoobj2.cxx | 285 ++++++++++++++++++++----------------- sw/source/ui/uno/unotxdoc.cxx | 5 +- sw/source/ui/uno/unotxvw.cxx | 20 +-- 4 files changed, 169 insertions(+), 174 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx index a7d13daf48..94d4996b46 100644 --- a/sw/inc/unotextrange.hxx +++ b/sw/inc/unotextrange.hxx @@ -45,10 +45,9 @@ #include #include -#include - #include #include +#include class String; @@ -85,6 +84,13 @@ public: }; +namespace sw { + + void DeepCopyPaM(SwPaM const & rSource, SwPaM & rTarget); + +} // namespace sw + + typedef ::cppu::WeakImplHelper8 < ::com::sun::star::lang::XUnoTunnel , ::com::sun::star::lang::XServiceInfo @@ -300,9 +306,6 @@ public: /* -----------------15.05.98 08:29------------------- * * --------------------------------------------------*/ -typedef ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > * - XTextRangeRefPtr; -SV_DECL_PTRARR(XTextRangeArr, XTextRangeRefPtr, 4, 4) typedef ::cppu::WeakImplHelper3 < ::com::sun::star::lang::XUnoTunnel @@ -312,32 +315,20 @@ typedef ::cppu::WeakImplHelper3 class SwXTextRanges : public SwXTextRanges_Base - , public SwClient { private: - XTextRangeArr* pRangeArr; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > - xParentText; - XTextRangeArr* GetRangesArray(); - SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)GetRegisteredIn(); } - -protected: + class Impl; + ::sw::UnoImplPtr m_pImpl; virtual ~SwXTextRanges(); public: - SwXTextRanges(); - SwXTextRanges(SwPaM* pCrsr); + SwXTextRanges(SwPaM *const pCrsr); - const SwUnoCrsr* GetCursor() const { - return (const SwUnoCrsr*)(GetRegisteredIn()); - } - - // SwClient - virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + const SwUnoCrsr* GetCursor() const; static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 23f4a043a5..53ee80c600 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -177,6 +177,29 @@ GetSupportedServiceNamesImpl( } // namespace sw +namespace sw { + +void DeepCopyPaM(SwPaM const & rSource, SwPaM & rTarget) +{ + rTarget = rSource; + + if (rSource.GetNext() != &rSource) + { + SwPaM *pPam = static_cast(rSource.GetNext()); + do + { + // create new PaM + SwPaM *const pNew = new SwPaM(*pPam); + // insert into ring + pNew->MoveTo(&rTarget); + pPam = static_cast(pPam->GetNext()); + } + while (pPam != &rSource); + } +} + +} // namespace sw + struct FrameDependSortListLess { bool operator() (FrameDependSortListEntry const& r1, @@ -1971,6 +1994,96 @@ void SwXTextRange::makeRedline( /****************************************************************** * SwXTextRanges ******************************************************************/ + +class SwXTextRanges::Impl + : public SwClient +{ + +public: + + ::std::vector< uno::Reference< text::XTextRange > > m_Ranges; + + Impl(SwPaM *const pPaM) + : SwClient( (pPaM) + ? pPaM->GetDoc()->CreateUnoCrsr(*pPaM->GetPoint()) + : 0 ) + { + if (pPaM) + { + ::sw::DeepCopyPaM(*pPaM, *GetCursor()); + } + MakeRanges(); + } + + ~Impl() { + // Impl owns the cursor; delete it here: SolarMutex is locked + delete GetRegisteredIn(); + } + + SwUnoCrsr * GetCursor() { + return static_cast( + const_cast(GetRegisteredIn())); + } + + void MakeRanges(); + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + +}; + +/*-- 10.12.98 13:57:02--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void SwXTextRanges::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) +{ + ClientModify(this, pOld, pNew); +} + +/* -----------------10.12.98 14:25------------------- + * + * --------------------------------------------------*/ +void SwXTextRanges::Impl::MakeRanges() +{ + SwUnoCrsr *const pCursor = GetCursor(); + if (pCursor) + { + SwPaM *pTmpCursor = pCursor; + do { + const uno::Reference< text::XTextRange > xRange( + SwXTextRange::CreateTextRangeFromPosition( + pTmpCursor->GetDoc(), + *pTmpCursor->GetPoint(), pTmpCursor->GetMark())); + if (xRange.is()) + { + m_Ranges.push_back(xRange); + } + pTmpCursor = static_cast(pTmpCursor->GetNext()); + } + while (pTmpCursor != pCursor); + } +} + +const SwUnoCrsr* SwXTextRanges::GetCursor() const +{ + return m_pImpl->GetCursor(); +} + +/*-- 10.12.98 13:57:22--------------------------------------------------- + + -----------------------------------------------------------------------*/ +SwXTextRanges::SwXTextRanges(SwPaM *const pPaM) + : m_pImpl( new SwXTextRanges::Impl(pPaM) ) +{ +} + +/*-- 10.12.98 13:57:22--------------------------------------------------- + + -----------------------------------------------------------------------*/ +SwXTextRanges::~SwXTextRanges() +{ +} + /* -----------------------------13.03.00 12:15-------------------------------- ---------------------------------------------------------------------------*/ @@ -1982,188 +2095,98 @@ const uno::Sequence< sal_Int8 > & SwXTextRanges::getUnoTunnelId() /* -----------------------------10.03.00 18:04-------------------------------- ---------------------------------------------------------------------------*/ -sal_Int64 SAL_CALL SwXTextRanges::getSomething( const uno::Sequence< sal_Int8 >& rId ) - throw(uno::RuntimeException) +sal_Int64 SAL_CALL +SwXTextRanges::getSomething(const uno::Sequence< sal_Int8 >& rId) +throw (uno::RuntimeException) { - if( rId.getLength() == 16 - && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16 ) ) - { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast (this) ); - } - return 0; + return ::sw::UnoTunnelImpl(rId, this); } + /**************************************************************************** * Text positions * Bis zum ersten Zugriff auf eine TextPosition wird ein SwCursor gehalten, * danach wird ein Array mit uno::Reference< XTextPosition > angelegt * ****************************************************************************/ -SV_IMPL_PTRARR(XTextRangeArr, XTextRangeRefPtr); /* -----------------------------06.04.00 16:36-------------------------------- ---------------------------------------------------------------------------*/ -OUString SwXTextRanges::getImplementationName(void) throw( RuntimeException ) +OUString SAL_CALL +SwXTextRanges::getImplementationName() throw (uno::RuntimeException) { return C2U("SwXTextRanges"); } /* -----------------------------06.04.00 16:36-------------------------------- ---------------------------------------------------------------------------*/ -BOOL SwXTextRanges::supportsService(const OUString& rServiceName) throw( RuntimeException ) -{ - return C2U("com.sun.star.text.TextRanges") == rServiceName; -} -/* -----------------------------06.04.00 16:36-------------------------------- - - ---------------------------------------------------------------------------*/ -Sequence< OUString > SwXTextRanges::getSupportedServiceNames(void) throw( RuntimeException ) +static char const*const g_ServicesTextRanges[] = { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.TextRanges"); - return aRet; -} -/*-- 10.12.98 13:57:20--------------------------------------------------- + "com.sun.star.text.TextRanges", +}; +static const size_t g_nServicesTextRanges( + sizeof(g_ServicesTextRanges)/sizeof(g_ServicesTextRanges[0])); - -----------------------------------------------------------------------*/ -SwXTextRanges::SwXTextRanges() : - pRangeArr(0) +sal_Bool SAL_CALL SwXTextRanges::supportsService(const OUString& rServiceName) +throw (uno::RuntimeException) { - + return ::sw::SupportsServiceImpl( + g_nServicesTextRanges, g_ServicesTextRanges, rServiceName); } -/*-- 10.12.98 13:57:22--------------------------------------------------- +/* -----------------------------06.04.00 16:36-------------------------------- - -----------------------------------------------------------------------*/ -SwXTextRanges::SwXTextRanges(SwPaM* pCrsr) : - pRangeArr(0) + ---------------------------------------------------------------------------*/ +uno::Sequence< OUString > SAL_CALL +SwXTextRanges::getSupportedServiceNames() throw (uno::RuntimeException) { - SwUnoCrsr* pUnoCrsr = pCrsr->GetDoc()->CreateUnoCrsr(*pCrsr->GetPoint()); - if(pCrsr->HasMark()) - { - pUnoCrsr->SetMark(); - *pUnoCrsr->GetMark() = *pCrsr->GetMark(); - } - if(pCrsr->GetNext() != pCrsr) - { - SwPaM *_pStartCrsr = (SwPaM *)pCrsr->GetNext(); - do - { - //neuen PaM erzeugen - SwPaM* pPaM = _pStartCrsr->HasMark() ? - new SwPaM(*_pStartCrsr->GetMark(), *_pStartCrsr->GetPoint()) : - new SwPaM(*_pStartCrsr->GetPoint()); - //und in den Ring einfuegen - pPaM->MoveTo(pUnoCrsr); - - } while( (_pStartCrsr=(SwPaM *)_pStartCrsr->GetNext()) != pCrsr ); - } - - pUnoCrsr->Add(this); + return ::sw::GetSupportedServiceNamesImpl( + g_nServicesTextRanges, g_ServicesTextRanges); } -/*-- 10.12.98 13:57:22--------------------------------------------------- - -----------------------------------------------------------------------*/ -SwXTextRanges::~SwXTextRanges() -{ - vos::OGuard aGuard(Application::GetSolarMutex()); - SwUnoCrsr* pCrsr = GetCrsr(); - delete pCrsr; - if(pRangeArr) - { - pRangeArr->DeleteAndDestroy(0, pRangeArr->Count()); - delete pRangeArr; - } -} /*-- 10.12.98 13:57:24--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Int32 SwXTextRanges::getCount(void) throw( uno::RuntimeException ) +sal_Int32 SAL_CALL SwXTextRanges::getCount() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Int32 nRet = 0; - SwUnoCrsr* pCrsr = GetCrsr(); - if(pCrsr) - { - SwPaM *pTmpCrsr = pCrsr; - do { - nRet++; - pTmpCrsr = static_cast(pTmpCrsr->GetNext()); - } while ( pTmpCrsr != pCrsr ); - } - else if(pRangeArr) - nRet = pRangeArr->Count(); - return nRet; + + return static_cast(m_pImpl->m_Ranges.size()); } /*-- 10.12.98 13:57:25--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXTextRanges::getByIndex(sal_Int32 nIndex) - throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException ) +uno::Any SAL_CALL SwXTextRanges::getByIndex(sal_Int32 nIndex) +throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< XTextRange > aRef; - XTextRangeArr* pArr = ((SwXTextRanges*)this)->GetRangesArray(); - if(pArr && 0 <= nIndex && nIndex < pArr->Count()) + + if ((nIndex < 0) || + (static_cast(nIndex) >= m_pImpl->m_Ranges.size())) { - XTextRangeRefPtr pRef = pArr->GetObject( USHORT( nIndex )); - aRef = *pRef; - } - else throw lang::IndexOutOfBoundsException(); - uno::Any aRet(&aRef, ::getCppuType((uno::Reference*)0)); - return aRet; + } + uno::Any ret; + ret <<= (m_pImpl->m_Ranges.at(nIndex)); + return ret; } + /*-- 10.12.98 13:57:25--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Type SwXTextRanges::getElementType(void) throw( uno::RuntimeException ) +uno::Type SAL_CALL +SwXTextRanges::getElementType() throw (uno::RuntimeException) { - return ::getCppuType((uno::Reference*)0); + return text::XTextRange::static_type(); } /*-- 10.12.98 13:57:26--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextRanges::hasElements(void) throw( uno::RuntimeException ) +sal_Bool SAL_CALL SwXTextRanges::hasElements() throw (uno::RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + // no mutex necessary: getCount() does locking return getCount() > 0; } -/* -----------------10.12.98 14:25------------------- - * - * --------------------------------------------------*/ -XTextRangeArr* SwXTextRanges::GetRangesArray() -{ - SwUnoCrsr* pCrsr = GetCrsr(); - if(!pRangeArr && pCrsr) - { - pRangeArr = new XTextRangeArr(); - SwPaM *pTmpCrsr = pCrsr; - do { - - uno::Reference< XTextRange >* pPtr = - new uno::Reference( - SwXTextRange::CreateTextRangeFromPosition( - pTmpCrsr->GetDoc(), - *pTmpCrsr->GetPoint(), pTmpCrsr->GetMark())); -// new uno::Reference( SwXTextRange::createTextRangeFromPaM(*pTmpCrsr, xParentText)); - if(pPtr->is()) - pRangeArr->Insert(pPtr, pRangeArr->Count()); - - pTmpCrsr = static_cast(pTmpCrsr->GetNext()); - } while ( pTmpCrsr != pCrsr ); - pCrsr->Remove( this ); - } - return pRangeArr; -} -/*-- 10.12.98 13:57:02--------------------------------------------------- - - -----------------------------------------------------------------------*/ -void SwXTextRanges::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew) -{ - ClientModify(this, pOld, pNew); -} /* -----------------11.12.98 10:07------------------- * diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 5c2c3a7e52..1d9b3f1f82 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -971,10 +971,7 @@ Reference< XIndexAccess > if(!pResultCrsr) throw RuntimeException(); Reference< XIndexAccess > xRet; - if(nResult) - xRet = new SwXTextRanges(pResultCrsr); - else - xRet = new SwXTextRanges(); + xRet = new SwXTextRanges( (nResult) ? pResultCrsr : 0 ); delete pResultCrsr; return xRet; } diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 8d84296790..9a352aa5ee 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -108,24 +108,8 @@ SV_IMPL_PTRARR( SelectionChangeListenerArr, XSelectionChangeListenerPtr ); * --------------------------------------------------*/ SwPaM* lcl_createPamCopy(const SwPaM& rPam) { - SwPaM* pRet = new SwPaM(*rPam.GetPoint()); - if(rPam.HasMark()) - { - pRet->SetMark(); - *pRet->GetMark() = *rPam.GetMark(); - } - if(rPam.GetNext() != (const Ring*)&rPam) - { - SwPaM *_pStartCrsr = (SwPaM *)rPam.GetNext(); - do - { - //neuen PaM erzeugen - SwPaM* pPaM = new SwPaM(*_pStartCrsr); - //und in den Ring einfuegen - pPaM->MoveTo(pRet); - - } while( (_pStartCrsr=(SwPaM *)_pStartCrsr->GetNext()) != rPam.GetNext() ); - } + SwPaM *const pRet = new SwPaM(*rPam.GetPoint()); + ::sw::DeepCopyPaM(rPam, *pRet); return pRet; } /****************************************************************** -- cgit v1.2.3 From f0d66b520a418df78626389024499e5c58542bda Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:52 +0100 Subject: swunolocking1: #i105557#: SwXTextRange: try to hide the implementation detail that SwXTextRange registers at a bookmark from its clients by using SwXTextRange::GetPositions(). --- sw/inc/unotext.hxx | 5 +- sw/inc/unotextrange.hxx | 6 +- sw/source/core/inc/unometa.hxx | 4 +- sw/source/core/unocore/unoobj.cxx | 87 ++++++++---------------- sw/source/core/unocore/unoobj2.cxx | 8 +-- sw/source/core/unocore/unorefmk.cxx | 63 +++++------------- sw/source/core/unocore/unotext.cxx | 128 ++++++++++++++---------------------- sw/source/ui/uno/unoatxt.cxx | 48 ++++++-------- sw/source/ui/uno/unotxvw.cxx | 9 ++- 9 files changed, 130 insertions(+), 228 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unotext.hxx b/sw/inc/unotext.hxx index 499e0620da..97a45ece73 100644 --- a/sw/inc/unotext.hxx +++ b/sw/inc/unotext.hxx @@ -93,7 +93,7 @@ private: virtual void PrepareForAttach( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, - SwXTextRange const * const pRange, SwPaM const * const pPam); + SwPaM const & rPam); protected: @@ -136,8 +136,7 @@ public: throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual bool CheckForOwnMemberMeta( - const SwXTextRange* const pRange, - const SwPaM* const pPam, bool bAbsorb) + const SwPaM & rPam, const bool bAbsorb) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx index 94d4996b46..079296d2a4 100644 --- a/sw/inc/unotextrange.hxx +++ b/sw/inc/unotextrange.hxx @@ -130,7 +130,9 @@ private: xParentText; ::sw::mark::IMark* pMark; - void _CreateNewBookmark(SwPaM& rPam); + const ::sw::mark::IMark * GetBookmark() const + { return pMark; } + void SetPositions(SwPaM const& rPam); //TODO: new exception type for protected content void DeleteAndInsert(const String& rText, const bool bForceExpandHints) throw (::com::sun::star::uno::RuntimeException); @@ -153,8 +155,6 @@ public: { return pDoc; } SwDoc* GetDoc() { return pDoc; } - const ::sw::mark::IMark * GetBookmark() const - { return pMark; } static BOOL XTextRangeToSwPaM(SwUnoInternalPaM& rToFill, const ::com::sun::star::uno::Reference< diff --git a/sw/source/core/inc/unometa.hxx b/sw/source/core/inc/unometa.hxx index 5568aa88b5..39f81caa90 100755 --- a/sw/source/core/inc/unometa.hxx +++ b/sw/source/core/inc/unometa.hxx @@ -52,7 +52,6 @@ typedef ::std::deque< ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > > TextRangeList_t; -class SwXTextRange; class SwPaM; class SwTxtNode; @@ -117,8 +116,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > GetParentText() const; - bool CheckForOwnMemberMeta(const SwXTextRange* const pRange, - const SwPaM* const pPam, bool bAbsorb) + bool CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 8b0f76bfbe..f923fcf1ae 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -1181,17 +1181,26 @@ void SwXTextCursor::gotoRange(const uno::Reference< XTextRange > & xRange, sal_B const SwStartNode* pOwnStartNode = pOwnCursor->GetNode()-> FindSttNodeByType(eSearchNodeType); - const SwNode* pSrcNode = 0; - if(pCursor && pCursor->GetPaM()) + SwPaM aPam(GetDoc()->GetNodes()); + const SwPaM * pPam(0); + if (pCursor) { - pSrcNode = pCursor->GetPaM()->GetNode(); + pPam = pCursor->GetPaM(); } - else if(pRange && pRange->GetBookmark()) + else if (pRange) { - ::sw::mark::IMark const * const pBkmk = pRange->GetBookmark(); - pSrcNode = &pBkmk->GetMarkPos().nNode.GetNode(); + if (pRange->GetPositions(aPam)) + { + pPam = & aPam; + } + } + + if (!pPam) + { + throw uno::RuntimeException(); } - const SwStartNode* pTmp = pSrcNode ? pSrcNode->FindSttNodeByType(eSearchNodeType) : 0; + const SwStartNode* pTmp = + pPam->GetNode()->FindSttNodeByType(eSearchNodeType); //SectionNodes ueberspringen while(pTmp && pTmp->IsSectionNode()) @@ -1209,16 +1218,9 @@ void SwXTextCursor::gotoRange(const uno::Reference< XTextRange > & xRange, sal_B if (CURSOR_META == eType) { - const SwPosition & rPoint( (pRange) - ? pRange->GetBookmark()->GetMarkPos() - : *pCursor->GetPaM()->GetPoint() ); - const SwPosition & rMark ( (pRange) - ? ((pRange->GetBookmark()->IsExpanded()) - ? pRange->GetBookmark()->GetOtherMarkPos() : rPoint) - : *pCursor->GetPaM()->GetMark() ); - SwPaM aPam(rPoint, rMark); + SwPaM CopyPam(*pPam->GetMark(), *pPam->GetPoint()); const bool bNotForced( - lcl_ForceIntoMeta(aPam, xParentText, META_CHECK_BOTH) ); + lcl_ForceIntoMeta(CopyPam, xParentText, META_CHECK_BOTH) ); if (!bNotForced) { throw uno::RuntimeException( @@ -1241,26 +1243,9 @@ void SwXTextCursor::gotoRange(const uno::Reference< XTextRange > & xRange, sal_B aOwnLeft = aOwnRight; aOwnRight = aTmp; } - SwPosition* pParamLeft; - SwPosition* pParamRight; - if(pCursor) - { - const SwPaM* pTmp2 = pCursor->GetPaM(); - pParamLeft = new SwPosition(*pTmp2->GetPoint()); - pParamRight = new SwPosition(pTmp2->HasMark() ? *pTmp2->GetMark() : *pParamLeft); - } - else - { - ::sw::mark::IMark const * const pBkmk = pRange->GetBookmark(); - pParamLeft = new SwPosition(pBkmk->GetMarkPos()); - pParamRight = new SwPosition(pBkmk->IsExpanded() ? pBkmk->GetOtherMarkPos() : *pParamLeft); - } - if(*pParamRight < *pParamLeft) - { - SwPosition* pTmp2 = pParamLeft; - pParamLeft = pParamRight; - pParamRight = pTmp2; - } + SwPosition const* pParamLeft = pPam->Start(); + SwPosition const* pParamRight = pPam->End(); + // jetzt sind vier SwPositions da, zwei davon werden gebraucht, also welche? if(aOwnRight > *pParamRight) *pOwnCursor->GetPoint() = aOwnRight; @@ -1271,35 +1256,19 @@ void SwXTextCursor::gotoRange(const uno::Reference< XTextRange > & xRange, sal_B *pOwnCursor->GetMark() = aOwnLeft; else *pOwnCursor->GetMark() = *pParamLeft; - delete pParamLeft; - delete pParamRight; } else { - //der Cursor soll dem uebergebenen Range entsprechen - if(pCursor) + // cursor should be the given range + *pOwnCursor->GetPoint() = *pPam->GetPoint(); + if (pPam->HasMark()) { - const SwPaM* pTmp2 = pCursor->GetPaM(); - *pOwnCursor->GetPoint() = *pTmp2->GetPoint(); - if(pTmp2->HasMark()) - { - pOwnCursor->SetMark(); - *pOwnCursor->GetMark() = *pTmp2->GetMark(); - } - else - pOwnCursor->DeleteMark(); + pOwnCursor->SetMark(); + *pOwnCursor->GetMark() = *pPam->GetMark(); } else { - ::sw::mark::IMark const * const pBkmk = pRange->GetBookmark(); - *pOwnCursor->GetPoint() = pBkmk->GetMarkPos(); - if(pBkmk->IsExpanded()) - { - pOwnCursor->SetMark(); - *pOwnCursor->GetMark() = pBkmk->GetOtherMarkPos(); - } - else - pOwnCursor->DeleteMark(); + pOwnCursor->DeleteMark(); } } } @@ -1923,7 +1892,7 @@ void SwXTextCursor::setString(const OUString& aString) throw( uno::RuntimeExcept const bool bForceExpandHints( (CURSOR_META != eType) ? false : dynamic_cast(xParentText.get())->CheckForOwnMemberMeta( - 0, GetPaM(), true) ); + *GetPaM(), true) ); DeleteAndInsert(aString, bForceExpandHints); } /* -----------------------------03.05.00 12:56-------------------------------- diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 53ee80c600..4bd21c4122 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1377,7 +1377,7 @@ SwXTextRange::SwXTextRange(SwPaM& rPam, xParentText(rxParent), pMark(NULL) { - _CreateNewBookmark(rPam); + SetPositions(rPam); } SwXTextRange::SwXTextRange(SwFrmFmt& rTblFmt) : @@ -1394,7 +1394,7 @@ SwXTextRange::SwXTextRange(SwFrmFmt& rTblFmt) : SwPosition aPosition( *pTblNode ); SwPaM aPam( aPosition ); - _CreateNewBookmark( aPam ); + SetPositions( aPam ); } SwXTextRange::~SwXTextRange() @@ -1405,7 +1405,7 @@ SwXTextRange::~SwXTextRange() pDoc->getIDocumentMarkAccess()->deleteMark(pBkmk); } -void SwXTextRange::_CreateNewBookmark(SwPaM& rPam) +void SwXTextRange::SetPositions(const SwPaM& rPam) { IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); @@ -1452,7 +1452,7 @@ void SwXTextRange::DeleteAndInsert( SwXTextCursor::SelectPam(aNewCrsr, sal_True); aNewCrsr.Left(rText.Len(), CRSR_SKIP_CHARS, FALSE, FALSE); } - _CreateNewBookmark(aNewCrsr); + SetPositions(aNewCrsr); pDoc->EndUndo(UNDO_INSERT, NULL); } } diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index c1a59bddbb..fa8acbf631 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -586,12 +586,10 @@ private: SwXMeta & m_rMeta; virtual void PrepareForAttach(uno::Reference< text::XTextRange > & xRange, - const SwXTextRange* const pRange, const SwPaM * const pPam); + const SwPaM & rPam); - virtual bool CheckForOwnMemberMeta(const SwXTextRange* const pRange, - const SwPaM* const pPam, bool bAbsorb) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); + virtual bool CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb) + throw (lang::IllegalArgumentException, uno::RuntimeException); protected: virtual const SwStartNode *GetStartNode() const; @@ -637,41 +635,18 @@ const SwStartNode *SwXMetaText::GetStartNode() const } void SwXMetaText::PrepareForAttach( uno::Reference & xRange, - const SwXTextRange* const pRange, const SwPaM * const pPam) + const SwPaM & rPam) { - SwPosition const* pPoint(0); - SwPosition const* pMark (0); - if (pRange) - { - ::sw::mark::IMark const& rIMark(*pRange->GetBookmark()); - pMark = &rIMark.GetMarkPos(); - if (rIMark.IsExpanded()) - { - pMark = &rIMark.GetOtherMarkPos(); - } - } - else if (pPam) - { - pPoint = pPam->GetPoint(); - if (pPam->HasMark()) - { - pMark = pPam->GetMark(); - } - } // create a new cursor to prevent modifying SwXTextRange - if (pPoint) - { - xRange = static_cast( - new SwXTextCursor(&m_rMeta, *pPoint, CURSOR_META, GetDoc(), pMark)); - } + xRange = static_cast( + new SwXTextCursor(&m_rMeta, *rPam.GetPoint(), CURSOR_META, + GetDoc(), (rPam.HasMark()) ? rPam.GetMark() : 0)); } -bool SwXMetaText::CheckForOwnMemberMeta(const SwXTextRange* const pRange, - const SwPaM* const pPam, bool bAbsorb) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException) +bool SwXMetaText::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb) + throw (lang::IllegalArgumentException, uno::RuntimeException) { - return m_rMeta.CheckForOwnMemberMeta(pRange, pPam, bAbsorb); + return m_rMeta.CheckForOwnMemberMeta(rPam, bAbsorb); } uno::Reference< text::XTextCursor > SwXMetaText::createCursor() @@ -884,11 +859,9 @@ bool SwXMeta::SetContentRange( return false; } -bool SwXMeta::CheckForOwnMemberMeta(const SwXTextRange* const pRange, - const SwPaM* const pPam, bool bAbsorb) +bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb) throw (lang::IllegalArgumentException, uno::RuntimeException) { - ASSERT((pPam && !pRange) || (!pPam && pRange), "ERROR: pam xor range"); SwTxtNode * pTxtNode; xub_StrLen nMetaStart; xub_StrLen nMetaEnd; @@ -896,9 +869,8 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwXTextRange* const pRange, ASSERT(bSuccess, "no pam?"); if (!bSuccess) throw lang::DisposedException(); - SwPosition const * const pStartPos( (pPam) - ? pPam->Start() - : &pRange->GetBookmark()->GetMarkStart() ); + + SwPosition const * const pStartPos( rPam.Start() ); if (&pStartPos->nNode.GetNode() != pTxtNode) { throw lang::IllegalArgumentException( @@ -921,14 +893,9 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwXTextRange* const pRange, { bForceExpandHints = true; } - const bool bHasEnd( (pPam) - ? pPam->HasMark() - : pRange->GetBookmark()->IsExpanded()); - if (bHasEnd && bAbsorb) + if (rPam.HasMark() && bAbsorb) { - SwPosition const * const pEndPos( (pPam) - ? pPam->End() - : &pRange->GetBookmark()->GetMarkEnd() ); + SwPosition const * const pEndPos( rPam.End() ); if (&pEndPos->nNode.GetNode() != pTxtNode) { throw lang::IllegalArgumentException( diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 937e31710a..1600bbbb7a 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -91,16 +91,13 @@ const sal_Char cInvalidObject[] = "this object is invalid"; -----------------------------------------------------------------------*/ -void SwXText::PrepareForAttach( ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > &, - const SwXTextRange* const, const SwPaM * const) +void +SwXText::PrepareForAttach(uno::Reference< text::XTextRange > &, const SwPaM &) { } -bool SwXText::CheckForOwnMemberMeta(const SwXTextRange* const, - const SwPaM* const, bool) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException) +bool SwXText::CheckForOwnMemberMeta(const SwPaM &, const bool) + throw (lang::IllegalArgumentException, uno::RuntimeException) { ASSERT(CURSOR_META != eCrsrType, "should not be called!"); return false; @@ -285,35 +282,43 @@ void SwXText::insertString(const uno::Reference< text::XTextRange >& xTextRange, if(pRange && pRange->GetDoc() == GetDoc() || pCursor && pCursor->GetDoc() == GetDoc()) { - const SwStartNode* pOwnStartNode = GetStartNode(); - if(pCursor) + const SwStartNode *const pOwnStartNode = GetStartNode(); + SwPaM aPam(GetDoc()->GetNodes()); + const SwPaM * pPam(0); + if (pCursor) { - const SwStartNode* pTmp = pCursor->GetPaM()->GetNode()->StartOfSectionNode(); - while(pTmp && pTmp->IsSectionNode()) - { - pTmp = pTmp->StartOfSectionNode(); - } - if( !pOwnStartNode || pOwnStartNode != pTmp) + pPam = pCursor->GetPaM(); + } + else // pRange + { + if (pRange->GetPositions(aPam)) { - throw uno::RuntimeException(); + pPam = &aPam; } } - else //dann pRange + if (!pPam) { - ::sw::mark::IMark const * const pBkmk = pRange->GetBookmark(); - const SwStartNode* pTmp = pBkmk->GetMarkPos().nNode.GetNode().StartOfSectionNode(); - while(pTmp && pTmp->IsSectionNode()) + throw uno::RuntimeException(); + } + else + { + const SwStartNode* pTmp(pPam->GetNode()->StartOfSectionNode()); + while (pTmp && pTmp->IsSectionNode()) + { pTmp = pTmp->StartOfSectionNode(); - if(!pOwnStartNode || pOwnStartNode != pTmp) + } + if (!pOwnStartNode || (pOwnStartNode != pTmp)) + { throw uno::RuntimeException(); + } } + bool bForceExpandHints( false ); if (CURSOR_META == eCrsrType) { try { - bForceExpandHints = CheckForOwnMemberMeta( - pRange, (pCursor) ? pCursor->GetPaM() : 0, bAbsorb); + bForceExpandHints = CheckForOwnMemberMeta(*pPam, bAbsorb); } catch (lang::IllegalArgumentException & iae) { @@ -348,10 +353,7 @@ void SwXText::insertString(const uno::Reference< text::XTextRange >& xTextRange, //hier wird ein PaM angelegt, der vor dem Parameter-PaM liegt, damit der //Text davor eingefuegt wird UnoActionContext aContext(GetDoc()); - const SwPosition* pPos = pCursor - ? pCursor->GetPaM()->Start() - : &pRange->GetBookmark()->GetMarkStart(); - SwPaM aInsertPam(*pPos); + SwPaM aInsertPam(*pPam->Start()); const sal_Bool bGroupUndo = GetDoc()->DoesGroupUndo(); GetDoc()->DoGroupUndo(sal_False); @@ -382,8 +384,7 @@ void SwXText::insertControlCharacter(const uno::Reference< text::XTextRange > & SwUnoInternalPaM aPam(*GetDoc()); if(SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange)) { - const bool bForceExpandHints( - CheckForOwnMemberMeta( 0, &aPam, bAbsorb) ); + const bool bForceExpandHints(CheckForOwnMemberMeta(aPam, bAbsorb)); const enum IDocumentContentOperations::InsertFlags nInsertFlags = (bForceExpandHints) @@ -424,7 +425,7 @@ void SwXText::insertControlCharacter(const uno::Reference< text::XTextRange > & } if(pRange) { - pRange->_CreateNewBookmark(aTmp); + pRange->SetPositions(aTmp); } else if(pCursor) { @@ -462,7 +463,9 @@ void SwXText::insertControlCharacter(const uno::Reference< text::XTextRange > & aCrsr.Left(1, CRSR_SKIP_CHARS, FALSE, FALSE); //hier muss der uebergebene PaM umgesetzt werden: if(pRange) - pRange->_CreateNewBookmark(aCrsr); + { + pRange->SetPositions(aCrsr); + } else { SwPaM* pUnoCrsr = pCursor->GetPaM(); @@ -541,33 +544,8 @@ void SwXText::insertTextContent(const uno::Reference< text::XTextRange > & xRang ; } - const SwNode* pSrcNode = 0; - if(pCursor && pCursor->GetPaM()) - { - pSrcNode = pCursor->GetPaM()->GetNode(); - } - else if (pRange && pRange->GetBookmark()) - { - ::sw::mark::IMark const * const pBkmk = pRange->GetBookmark(); - pSrcNode = &pBkmk->GetMarkPos().nNode.GetNode(); - } - else if (pPortion && pPortion->GetCursor()) - { - pSrcNode = pPortion->GetCursor()->GetNode(); - } - else if (pText) - { - uno::Reference xTextCursor = pText->createCursor(); - xTextCursor->gotoEnd(sal_True); - uno::Reference xCrsrTunnel( xTextCursor, uno::UNO_QUERY ); - pCursor = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); - pSrcNode = pCursor->GetPaM()->GetNode(); - } - else - throw lang::IllegalArgumentException(); - - const SwStartNode* pTmp = pSrcNode->FindSttNodeByType(eSearchNodeType); + const SwStartNode* pTmp = + aPam.GetNode()->FindSttNodeByType(eSearchNodeType); //SectionNodes ueberspringen while(pTmp && pTmp->IsSectionNode()) @@ -587,8 +565,7 @@ void SwXText::insertTextContent(const uno::Reference< text::XTextRange > & xRang throw aRunException; } - const bool bForceExpandHints( CheckForOwnMemberMeta( - pRange, (pCursor) ? pCursor->GetPaM() : 0, bAbsorb) ); + const bool bForceExpandHints(CheckForOwnMemberMeta(aPam, bAbsorb)); // Sonderbehandlung fuer Contents, die den Range nicht ersetzen, sonder darueber gelegt werden // Bookmarks, IndexEntry @@ -627,8 +604,7 @@ void SwXText::insertTextContent(const uno::Reference< text::XTextRange > & xRang if (bForceExpandHints) { // if necessary, replace xTempRange with a new SwXTextCursor - PrepareForAttach(xTempRange, pRange, - (pCursor) ? pCursor->GetPaM() : 0); + PrepareForAttach(xTempRange, aPam); } xContent->attach(xTempRange); } @@ -1047,13 +1023,19 @@ sal_Bool SwXText::CheckForOwnMember( } const SwNode* pSrcNode; - if(pCursor) + if (pCursor) + { pSrcNode = pCursor->GetPaM()->GetNode(); - else //dann pRange + } + else // pRange { - ::sw::mark::IMark const * const pBkmk = pRange->GetBookmark(); - pSrcNode = &pBkmk->GetMarkPos().nNode.GetNode(); + SwPaM aPam(pRange->GetDoc()->GetNodes().GetEndOfContent()); + if (pRange->GetPositions(aPam)) + { + pSrcNode = aPam.GetNode(); + } } + if (!pSrcNode) { return sal_False; } const SwStartNode* pTmp = pSrcNode->FindSttNodeByType(eSearchNodeType); //SectionNodes ueberspringen @@ -1107,18 +1089,8 @@ sal_Int16 SwXText::ComparePositions( if(CheckForOwnMember(pRange1, pCursor1) && CheckForOwnMember( pRange2, pCursor2)) { - const SwPosition *pStart1 = 0; - const SwPosition *pStart2 = 0; - - if(pRange1) - pStart1 = pRange1->GetBookmark() ? &(pRange1->GetBookmark()->GetMarkStart()) : 0; - else - pStart1 = pCursor1->GetPaM() ? pCursor1->GetPaM()->Start() : 0; - - if(pRange2) - pStart2 = pRange2->GetBookmark() ? &(pRange2->GetBookmark()->GetMarkStart()) : 0; - else - pStart2 = pCursor2->GetPaM() ? pCursor2->GetPaM()->Start() : 0; + SwPosition const*const pStart1 = aPam1.Start(); + SwPosition const*const pStart2 = aPam2.Start(); if(pStart1 && pStart2) { diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx index f9b672df97..481d366f4e 100644 --- a/sw/source/ui/uno/unoatxt.cxx +++ b/sw/source/ui/uno/unoatxt.cxx @@ -411,25 +411,25 @@ sal_Bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTextR SwCntntNode * pNd = aIdx.GetNode().GetCntntNode(); SwPosition aPos( aIdx, SwIndex( pNd, pNd->Len() )); - sal_Bool bRet = sal_False; + bool bRet = false; pInsDoc->LockExpFlds(); { + SwDoc *const pDoc((pxCursor) ? pxCursor->GetDoc() : pxRange->GetDoc()); + SwPaM aPam(pDoc->GetNodes()); + SwPaM * pPam(0); if(pxCursor) { - SwPaM* pUnoCrsr = pxCursor->GetPaM(); - bRet = pxCursor->GetDoc()->CopyRange( *pUnoCrsr, aPos, false ) - || bRet; + pPam = pxCursor->GetPaM(); } else { - const ::sw::mark::IMark* const pBkmk = pxRange->GetBookmark(); - if(pBkmk && pBkmk->IsExpanded()) + if (pxRange->GetPositions(aPam)) { - SwPaM aTmp(pBkmk->GetOtherMarkPos(), pBkmk->GetMarkPos()); - bRet = pxRange->GetDoc()->CopyRange(aTmp, aPos, false) - || bRet; + pPam = & aPam; } } + if (!pPam) { return false; } + bRet = pDoc->CopyRange( *pPam, aPos, false ) || bRet; } pInsDoc->UnlockExpFlds(); @@ -1113,7 +1113,7 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR } SwDoc* pDoc = 0; - if ( pRange && pRange->GetBookmark()) + if (pRange) pDoc = pRange->GetDoc(); else if ( pCursor ) pDoc = pCursor->GetDoc(); @@ -1131,29 +1131,23 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR if(!pDoc) throw uno::RuntimeException(); - SwPaM* pInsertPaM = 0; - if(pRange) + + SwPaM InsertPaM(pDoc->GetNodes()); + if (pRange) { - const ::sw::mark::IMark* const pBkmk = pRange->GetBookmark(); - if(pBkmk->IsExpanded()) - pInsertPaM = new SwPaM(pBkmk->GetOtherMarkPos(), pBkmk->GetMarkPos()); - else - pInsertPaM = new SwPaM(pBkmk->GetMarkPos()); + if (!pRange->GetPositions(InsertPaM)) + { + throw uno::RuntimeException(); + } } else { - SwPaM* pCrsr = pCursor->GetPaM(); - if(pCrsr->HasMark()) - pInsertPaM = new SwPaM(*pCrsr->GetPoint(), *pCrsr->GetMark()); - else - pInsertPaM = new SwPaM(*pCrsr->GetPoint()); + InsertPaM = *pCursor->GetPaM(); } - SwTextBlocks* pBlock = pGlossaries->GetGroupDoc(sGroupName); - sal_Bool bResult = pBlock && !pBlock->GetError() && - pDoc->InsertGlossary( *pBlock, sEntryName, *pInsertPaM); - delete pBlock; - delete pInsertPaM; + ::std::auto_ptr pBlock(pGlossaries->GetGroupDoc(sGroupName)); + const bool bResult = pBlock.get() && !pBlock->GetError() + && pDoc->InsertGlossary( *pBlock, sEntryName, InsertPaM); if(!bResult) throw uno::RuntimeException(); diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 9a352aa5ee..e314b306e9 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -1418,10 +1418,13 @@ void SwXTextViewCursor::gotoRange( { pSrcNode = pCursor->GetPaM()->GetNode(); } - else if(pRange && pRange->GetBookmark()) + else if (pRange) { - const ::sw::mark::IMark* const pBkmk = pRange->GetBookmark(); - pSrcNode = &(pBkmk->GetMarkPos().nNode.GetNode()); + SwPaM aPam(pRange->GetDoc()->GetNodes()); + if (pRange->GetPositions(aPam)) + { + pSrcNode = aPam.GetNode(); + } } else if (pPara && pPara->GetTxtNode()) { -- cgit v1.2.3 From 18af93c8768e952870dd73fb9abc43ddddcbd7a4 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:52 +0100 Subject: swunolocking1: #i105557#: fix locking for SwXTextRange: add Impl struct, and use UnoImplPtr to lock destructor. move all implementation details out of header, into Impl struct. use new XUnoTunnel and XServiceInfo helpers. clean up the implementation a little. --- sw/inc/unotextrange.hxx | 54 +--- sw/source/core/unocore/unoobj2.cxx | 645 ++++++++++++++++++++++--------------- sw/source/core/unocore/unotext.cxx | 14 +- 3 files changed, 400 insertions(+), 313 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx index 079296d2a4..8b34ce7f94 100644 --- a/sw/inc/unotextrange.hxx +++ b/sw/inc/unotextrange.hxx @@ -45,26 +45,15 @@ #include #include -#include #include #include -class String; -class SfxItemPropertySet; class SwDoc; -class SwStartNode; struct SwPosition; class SwPaM; class SwUnoCrsr; class SwFrmFmt; -class SwTableBox; - -namespace sw { - namespace mark { - class IMark; - } -} /* -----------------29.04.98 07:35------------------- * @@ -104,13 +93,15 @@ typedef ::cppu::WeakImplHelper8 class SW_DLLPUBLIC SwXTextRange : public SwXTextRange_Base - , private SwClient { private: friend class SwXText; + class Impl; + ::sw::UnoImplPtr m_pImpl; + enum RangePosition { RANGE_IN_TEXT, // "ordinary" ::com::sun::star::text::TextRange @@ -118,26 +109,14 @@ private: RANGE_IN_CELL, // position created with a cell that has no uno object RANGE_IS_TABLE, // anchor of a table RANGE_INVALID // created by NewInstance - } eRangePosition; - - SwDoc* pDoc; - SwTableBox* pBox; - const SwStartNode* pBoxStartNode; - SwDepend aObjectDepend; // register at format of table or frame - const SfxItemPropertySet* m_pPropSet; - //SwDepend aFrameDepend; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > - xParentText; - ::sw::mark::IMark* pMark; - - const ::sw::mark::IMark * GetBookmark() const - { return pMark; } + }; + void SetPositions(SwPaM const& rPam); //TODO: new exception type for protected content - void DeleteAndInsert(const String& rText, const bool bForceExpandHints) + void DeleteAndInsert( + const ::rtl::OUString& rText, const bool bForceExpandHints) throw (::com::sun::star::uno::RuntimeException); - -protected: + void Invalidate(); virtual ~SwXTextRange(); @@ -146,31 +125,26 @@ public: SwXTextRange(SwPaM& rPam, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > & xParent, - enum RangePosition eRange = RANGE_IN_TEXT); + const enum RangePosition eRange = RANGE_IN_TEXT); // only for RANGE_IS_TABLE SwXTextRange(SwFrmFmt& rTblFmt); - BOOL GetPositions(SwPaM& rToFill) const; - const SwDoc* GetDoc() const - { return pDoc; } - SwDoc* GetDoc() - { return pDoc; } + const SwDoc* GetDoc() const; + SwDoc* GetDoc(); + bool GetPositions(SwPaM & rToFill) const; static BOOL XTextRangeToSwPaM(SwUnoInternalPaM& rToFill, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange); + static ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > CreateTextRangeFromPosition( SwDoc* pDoc, const SwPosition& rPos, const SwPosition* pMark); + static ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > CreateParentXText(SwDoc* pDoc, const SwPosition& rPos); - TYPEINFO(); - - // SwClient - virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); - static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); // XUnoTunnel diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 4bd21c4122..71061001d6 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1314,83 +1314,97 @@ throw (container::NoSuchElementException, lang::WrappedTargetException, /****************************************************************** * SwXTextRange ******************************************************************/ -TYPEINIT1(SwXTextRange, SwClient); -const uno::Sequence< sal_Int8 > & SwXTextRange::getUnoTunnelId() +class SwXTextRange::Impl + : public SwClient { - static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId(); - return aSeq; -} -//XUnoTunnel -sal_Int64 SAL_CALL SwXTextRange::getSomething( - const uno::Sequence< sal_Int8 >& rId ) - throw(uno::RuntimeException) -{ - if( rId.getLength() == 16 - && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16 ) ) +public: + + const SfxItemPropertySet & m_rPropSet; + const enum RangePosition m_eRangePosition; + SwDoc & m_rDoc; + uno::Reference m_xParentText; + SwDepend m_ObjectDepend; // register at format of table or frame + ::sw::mark::IMark * m_pMark; + + Impl( SwDoc & rDoc, const enum RangePosition eRange, + SwFrmFmt *const pTblFmt = 0, + const uno::Reference< text::XText > & xParent = 0) + : SwClient() + , m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR)) + , m_eRangePosition(eRange) + , m_rDoc(rDoc) + , m_xParentText(xParent) + , m_ObjectDepend(this, pTblFmt) + , m_pMark(0) + { + } + + ~Impl() + { + // Impl owns the bookmark; delete it here: SolarMutex is locked + Invalidate(); + } + + void Invalidate() + { + if (m_pMark) { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast (this) ); + m_rDoc.getIDocumentMarkAccess()->deleteMark(m_pMark); + m_pMark = 0; } - return 0; -} + } -OUString SwXTextRange::getImplementationName(void) throw( RuntimeException ) -{ - return OUString::createFromAscii("SwXTextRange"); -} + const ::sw::mark::IMark * GetBookmark() const { return m_pMark; } -BOOL SwXTextRange::supportsService(const OUString& rServiceName) throw( RuntimeException ) -{ - String sServiceName(rServiceName); - return sServiceName.EqualsAscii("com.sun.star.text.TextRange") || - sServiceName.EqualsAscii("com.sun.star.style.CharacterProperties")|| - sServiceName.EqualsAscii("com.sun.star.style.CharacterPropertiesAsian")|| - sServiceName.EqualsAscii("com.sun.star.style.CharacterPropertiesComplex")|| - sServiceName.EqualsAscii("com.sun.star.style.ParagraphProperties") || - sServiceName.EqualsAscii("com.sun.star.style.ParagraphPropertiesAsian") || - sServiceName.EqualsAscii("com.sun.star.style.ParagraphPropertiesComplex"); -} + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); -Sequence< OUString > SwXTextRange::getSupportedServiceNames(void) throw( RuntimeException ) +}; + +void SwXTextRange::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) { - Sequence< OUString > aRet(7); - aRet[0] = OUString::createFromAscii("com.sun.star.text.TextRange"); - aRet[1] = OUString::createFromAscii("com.sun.star.style.CharacterProperties"); - aRet[2] = OUString::createFromAscii("com.sun.star.style.CharacterPropertiesAsian"); - aRet[3] = OUString::createFromAscii("com.sun.star.style.CharacterPropertiesComplex"); - aRet[4] = OUString::createFromAscii("com.sun.star.style.ParagraphProperties"); - aRet[5] = OUString::createFromAscii("com.sun.star.style.ParagraphPropertiesAsian"); - aRet[6] = OUString::createFromAscii("com.sun.star.style.ParagraphPropertiesComplex"); - return aRet; + const bool bAlreadyRegistered = 0 != GetRegisteredIn(); + ClientModify(this, pOld, pNew); + if (m_ObjectDepend.GetRegisteredIn()) + { + ClientModify(&m_ObjectDepend, pOld, pNew); + // if the depend was removed then the range must be removed too + if (!m_ObjectDepend.GetRegisteredIn() && GetRegisteredIn()) + { + const_cast(GetRegisteredIn())->Remove(this); + } + // or if the range has been removed but the depend ist still + // connected then the depend must be removed + else if (bAlreadyRegistered && !GetRegisteredIn() && + m_ObjectDepend.GetRegisteredIn()) + { + const_cast(m_ObjectDepend.GetRegisteredIn()) + ->Remove(& m_ObjectDepend); + } + } + if (!GetRegisteredIn()) + { + m_pMark = 0; + } } + SwXTextRange::SwXTextRange(SwPaM& rPam, - const uno::Reference< XText > & rxParent, enum RangePosition eRange) : - eRangePosition(eRange), - pDoc(rPam.GetDoc()), - pBox(0), - pBoxStartNode(0), - aObjectDepend(this, 0), - m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR)), - xParentText(rxParent), - pMark(NULL) + const uno::Reference< text::XText > & xParent, + const enum RangePosition eRange) + : m_pImpl( new SwXTextRange::Impl(*rPam.GetDoc(), eRange, 0, xParent) ) { SetPositions(rPam); } -SwXTextRange::SwXTextRange(SwFrmFmt& rTblFmt) : - eRangePosition(RANGE_IS_TABLE), - pDoc(rTblFmt.GetDoc()), - pBox(0), - pBoxStartNode(0), - aObjectDepend(this, &rTblFmt), - m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR)), - pMark(NULL) +SwXTextRange::SwXTextRange(SwFrmFmt& rTblFmt) + : m_pImpl( + new SwXTextRange::Impl(*rTblFmt.GetDoc(), RANGE_IS_TABLE, &rTblFmt) ) { - SwTable* pTable = SwTable::FindTable( &rTblFmt ); - SwTableNode* pTblNode = pTable->GetTableNode( ); + SwTable *const pTable = SwTable::FindTable( &rTblFmt ); + SwTableNode *const pTblNode = pTable->GetTableNode(); SwPosition aPosition( *pTblNode ); SwPaM aPam( aPosition ); @@ -1399,181 +1413,221 @@ SwXTextRange::SwXTextRange(SwFrmFmt& rTblFmt) : SwXTextRange::~SwXTextRange() { - vos::OGuard aGuard(Application::GetSolarMutex()); - ::sw::mark::IMark const * const pBkmk = GetBookmark(); - if(pBkmk) - pDoc->getIDocumentMarkAccess()->deleteMark(pBkmk); } -void SwXTextRange::SetPositions(const SwPaM& rPam) +const SwDoc * SwXTextRange::GetDoc() const { - IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); + return & m_pImpl->m_rDoc; +} - ::sw::mark::IMark const * const pBkmk = GetBookmark(); - if(pBkmk) - pMarkAccess->deleteMark(pBkmk); - pMark = pMarkAccess->makeMark(rPam, ::rtl::OUString(), IDocumentMarkAccess::UNO_BOOKMARK); - pMark->Add(this); +SwDoc * SwXTextRange::GetDoc() +{ + return & m_pImpl->m_rDoc; +} + + +void SwXTextRange::Invalidate() +{ + m_pImpl->Invalidate(); +} + +void SwXTextRange::SetPositions(const SwPaM& rPam) +{ + m_pImpl->Invalidate(); + IDocumentMarkAccess* const pMA = m_pImpl->m_rDoc.getIDocumentMarkAccess(); + m_pImpl->m_pMark = pMA->makeMark(rPam, ::rtl::OUString(), + IDocumentMarkAccess::UNO_BOOKMARK); + m_pImpl->m_pMark->Add(m_pImpl.get()); } void SwXTextRange::DeleteAndInsert( - const String& rText, const bool bForceExpandHints) - throw(uno::RuntimeException) + const ::rtl::OUString& rText, const bool bForceExpandHints) +throw (uno::RuntimeException) { - if (RANGE_IS_TABLE == eRangePosition) + if (RANGE_IS_TABLE == m_pImpl->m_eRangePosition) { // setString on table not allowed throw uno::RuntimeException(); } - ::sw::mark::IMark const * const pBkmk = GetBookmark(); - if(pBkmk) + const SwPosition aPos(GetDoc()->GetNodes().GetEndOfContent()); + SwCursor aCursor(aPos, 0, false); + if (GetPositions(aCursor)) { - const SwPosition& rPoint = pBkmk->GetMarkStart(); - SwCursor aNewCrsr(rPoint, 0, false); - if(pBkmk->IsExpanded()) - { - aNewCrsr.SetMark(); - const SwPosition& rMark = pBkmk->GetMarkEnd(); - *aNewCrsr.GetMark() = rMark; - } - UnoActionContext aAction(pDoc); - pDoc->StartUndo(UNDO_INSERT, NULL); - if(aNewCrsr.HasMark()) + UnoActionContext aAction(& m_pImpl->m_rDoc); + m_pImpl->m_rDoc.StartUndo(UNDO_INSERT, NULL); + if (aCursor.HasMark()) { - pDoc->DeleteAndJoin(aNewCrsr); + m_pImpl->m_rDoc.DeleteAndJoin(aCursor); } - if(rText.Len()) + if (rText.getLength()) { SwUnoCursorHelper::DocInsertStringSplitCR( - *pDoc, aNewCrsr, rText, bForceExpandHints); + m_pImpl->m_rDoc, aCursor, rText, bForceExpandHints); - SwXTextCursor::SelectPam(aNewCrsr, sal_True); - aNewCrsr.Left(rText.Len(), CRSR_SKIP_CHARS, FALSE, FALSE); + SwXTextCursor::SelectPam(aCursor, sal_True); + aCursor.Left(rText.getLength(), CRSR_SKIP_CHARS, FALSE, FALSE); } - SetPositions(aNewCrsr); - pDoc->EndUndo(UNDO_INSERT, NULL); + SetPositions(aCursor); + m_pImpl->m_rDoc.EndUndo(UNDO_INSERT, NULL); } } -uno::Reference< XText > SwXTextRange::getText(void) throw( uno::RuntimeException ) +const uno::Sequence< sal_Int8 > & SwXTextRange::getUnoTunnelId() +{ + static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId(); + return aSeq; +} + +// XUnoTunnel +sal_Int64 SAL_CALL +SwXTextRange::getSomething(const uno::Sequence< sal_Int8 >& rId) +throw (uno::RuntimeException) +{ + return ::sw::UnoTunnelImpl(rId, this); +} + +OUString SAL_CALL +SwXTextRange::getImplementationName() throw (uno::RuntimeException) +{ + return OUString::createFromAscii("SwXTextRange"); +} + +static char const*const g_ServicesTextRange[] = +{ + "com.sun.star.text.TextRange", + "com.sun.star.style.CharacterProperties", + "com.sun.star.style.CharacterPropertiesAsian", + "com.sun.star.style.CharacterPropertiesComplex", + "com.sun.star.style.ParagraphProperties", + "com.sun.star.style.ParagraphPropertiesAsian", + "com.sun.star.style.ParagraphPropertiesComplex", +}; +static const size_t g_nServicesTextRange( + sizeof(g_ServicesTextRange)/sizeof(g_ServicesTextRange[0])); + +sal_Bool SAL_CALL SwXTextRange::supportsService(const OUString& rServiceName) +throw (uno::RuntimeException) +{ + return ::sw::SupportsServiceImpl( + g_nServicesTextRange, g_ServicesTextRange, rServiceName); +} + +uno::Sequence< OUString > SAL_CALL +SwXTextRange::getSupportedServiceNames() throw (uno::RuntimeException) +{ + return ::sw::GetSupportedServiceNamesImpl( + g_nServicesTextRange, g_ServicesTextRange); +} + +uno::Reference< text::XText > SAL_CALL +SwXTextRange::getText() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if (!xParentText.is()) + + if (!m_pImpl->m_xParentText.is()) { - if (eRangePosition == RANGE_IS_TABLE && - aObjectDepend.GetRegisteredIn() ) - { - SwFrmFmt* pTblFmt = (SwFrmFmt*)aObjectDepend.GetRegisteredIn(); - SwTable* pTable = SwTable::FindTable( pTblFmt ); - SwTableNode* pTblNode = pTable->GetTableNode(); - SwPosition aPosition( *pTblNode ); - uno::Reference< XTextRange > xRange = - SwXTextRange::CreateTextRangeFromPosition(pDoc, aPosition, 0); - xParentText = xRange->getText(); - } - else + if (m_pImpl->m_eRangePosition == RANGE_IS_TABLE && + m_pImpl->m_ObjectDepend.GetRegisteredIn()) { - OSL_ENSURE(false, "SwXTextRange::getText: no text"); + SwFrmFmt const*const pTblFmt = static_cast( + m_pImpl->m_ObjectDepend.GetRegisteredIn()); + SwTable const*const pTable = SwTable::FindTable( pTblFmt ); + SwTableNode const*const pTblNode = pTable->GetTableNode(); + const SwPosition aPosition( *pTblNode ); + const uno::Reference< text::XTextRange > xRange = + SwXTextRange::CreateTextRangeFromPosition( + &m_pImpl->m_rDoc, aPosition, 0); + m_pImpl->m_xParentText = xRange->getText(); } } - return xParentText; + OSL_ENSURE(m_pImpl->m_xParentText.is(), "SwXTextRange::getText: no text"); + return m_pImpl->m_xParentText; } -uno::Reference< XTextRange > SwXTextRange::getStart(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextRange > SAL_CALL +SwXTextRange::getStart() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< XTextRange > xRet; - ::sw::mark::IMark const * const pBkmk = GetBookmark(); - if(!xParentText.is()) + uno::Reference< text::XTextRange > xRet; + ::sw::mark::IMark const * const pBkmk = m_pImpl->GetBookmark(); + if (!m_pImpl->m_xParentText.is()) + { getText(); + } if(pBkmk) { SwPaM aPam(pBkmk->GetMarkStart()); - xRet = new SwXTextRange(aPam, xParentText); + xRet = new SwXTextRange(aPam, m_pImpl->m_xParentText); } - else if(eRangePosition == RANGE_IS_TABLE) + else if (RANGE_IS_TABLE == m_pImpl->m_eRangePosition) { - //start and end are this, if its a table + // start and end are this, if its a table xRet = this; } else + { throw uno::RuntimeException(); + } return xRet; } -uno::Reference< XTextRange > SwXTextRange::getEnd(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextRange > SAL_CALL +SwXTextRange::getEnd() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< XTextRange > xRet; - ::sw::mark::IMark const * const pBkmk = GetBookmark(); - if(!xParentText.is()) + + uno::Reference< text::XTextRange > xRet; + ::sw::mark::IMark const * const pBkmk = m_pImpl->GetBookmark(); + if (!m_pImpl->m_xParentText.is()) + { getText(); + } if(pBkmk) { SwPaM aPam(pBkmk->GetMarkEnd()); - xRet = new SwXTextRange(aPam, xParentText); + xRet = new SwXTextRange(aPam, m_pImpl->m_xParentText); } - else if(eRangePosition == RANGE_IS_TABLE) + else if (RANGE_IS_TABLE == m_pImpl->m_eRangePosition) { - //start and end are this, if its a table + // start and end are this, if its a table xRet = this; } else + { throw uno::RuntimeException(); + } return xRet; } -OUString SwXTextRange::getString(void) throw( uno::RuntimeException ) +OUString SAL_CALL SwXTextRange::getString() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + OUString sRet; - ::sw::mark::IMark const * const pBkmk = GetBookmark(); // for tables there is no bookmark, thus also no text // one could export the table as ASCII here maybe? - if(pBkmk && pBkmk->IsExpanded()) + SwPaM aPaM(GetDoc()->GetNodes()); + if (GetPositions(aPaM) && aPaM.HasMark()) { - const SwPosition& rPoint = pBkmk->GetMarkPos(); - const SwPosition& rMark = pBkmk->GetOtherMarkPos(); - SwPaM aCrsr(rMark, rPoint); - SwXTextCursor::getTextFromPam(aCrsr, sRet); + SwXTextCursor::getTextFromPam(aPaM, sRet); } return sRet; } -void SwXTextRange::setString(const OUString& aString) - throw( uno::RuntimeException ) +void SAL_CALL SwXTextRange::setString(const OUString& rString) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - DeleteAndInsert(aString, false); -} -void SwXTextRange::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew) -{ - sal_Bool bAlreadyRegisterred = 0 != GetRegisteredIn(); - ClientModify(this, pOld, pNew); - if(aObjectDepend.GetRegisteredIn()) - { - ClientModify(&aObjectDepend, pOld, pNew); - // if the depend was removed then the range must be removed too - if(!aObjectDepend.GetRegisteredIn() && GetRegisteredIn()) - ((SwModify*)GetRegisteredIn())->Remove(this); - // or if the range has been removed but the depend ist still - // connected then the depend must be removed - else if(bAlreadyRegisterred && !GetRegisteredIn() && - aObjectDepend.GetRegisteredIn()) - ((SwModify*)aObjectDepend.GetRegisteredIn())->Remove(&aObjectDepend); - } - if(!GetRegisteredIn()) - pMark = NULL; + DeleteAndInsert(rString, false); } -sal_Bool SwXTextRange::GetPositions(SwPaM& rToFill) const +bool SwXTextRange::GetPositions(SwPaM& rToFill) const { - sal_Bool bRet = sal_False; - ::sw::mark::IMark const * const pBkmk = GetBookmark(); + ::sw::mark::IMark const * const pBkmk = m_pImpl->GetBookmark(); if(pBkmk) { *rToFill.GetPoint() = pBkmk->GetMarkPos(); @@ -1583,10 +1637,12 @@ sal_Bool SwXTextRange::GetPositions(SwPaM& rToFill) const *rToFill.GetMark() = pBkmk->GetOtherMarkPos(); } else + { rToFill.DeleteMark(); - bRet = sal_True; + } + return true; } - return bRet; + return false; } sal_Bool SwXTextRange::XTextRangeToSwPaM( SwUnoInternalPaM& rToFill, @@ -1806,187 +1862,248 @@ uno::Reference< XText > SwXTextRange::CreateParentXText(SwDoc* pDoc, return xParentText; } -uno::Reference< XEnumeration > SAL_CALL SwXTextRange::createContentEnumeration( - const OUString& rServiceName) - throw(RuntimeException) +uno::Reference< container::XEnumeration > SAL_CALL +SwXTextRange::createContentEnumeration(const OUString& rServiceName) +throw (uno::RuntimeException) { - ::sw::mark::IMark const * const pBkmk = GetBookmark(); - if( !pBkmk || COMPARE_EQUAL != rServiceName.compareToAscii("com.sun.star.text.TextContent") ) - throw RuntimeException(); + vos::OGuard g(Application::GetSolarMutex()); - const SwPosition& rPoint = pBkmk->GetMarkPos(); - SwUnoCrsr* pNewCrsr = pDoc->CreateUnoCrsr(rPoint, FALSE); - if(pBkmk->IsExpanded() && pBkmk->GetOtherMarkPos() != rPoint) + if (!rServiceName.equalsAscii("com.sun.star.text.TextContent")) { - pNewCrsr->SetMark(); - *pNewCrsr->GetMark() = pBkmk->GetOtherMarkPos(); + throw uno::RuntimeException(); } - uno::Reference< XEnumeration > xRet = new SwXParaFrameEnumeration(*pNewCrsr, PARAFRAME_PORTION_TEXTRANGE); - delete pNewCrsr; + + if (!GetDoc() || !m_pImpl->GetBookmark()) + { + throw uno::RuntimeException(); + } + const SwPosition aPos(GetDoc()->GetNodes().GetEndOfContent()); + const ::std::auto_ptr pNewCrsr( + m_pImpl->m_rDoc.CreateUnoCrsr(aPos, FALSE)); + if (!GetPositions(*pNewCrsr)) + { + throw uno::RuntimeException(); + } + + const uno::Reference< container::XEnumeration > xRet = + new SwXParaFrameEnumeration(*pNewCrsr, PARAFRAME_PORTION_TEXTRANGE); return xRet; } -uno::Reference< XEnumeration > SwXTextRange::createEnumeration(void) throw( RuntimeException ) +uno::Reference< container::XEnumeration > SAL_CALL +SwXTextRange::createEnumeration() throw (uno::RuntimeException) { - ::sw::mark::IMark const * const pBkmk = GetBookmark(); - if(!pBkmk) throw RuntimeException(); - const SwPosition& rPoint = pBkmk->GetMarkPos(); - ::std::auto_ptr pNewCrsr(pDoc->CreateUnoCrsr(rPoint, sal_False)); - if(pBkmk->IsExpanded() && pBkmk->GetOtherMarkPos() != rPoint) + vos::OGuard g(Application::GetSolarMutex()); + + if (!GetDoc() || !m_pImpl->GetBookmark()) { - pNewCrsr->SetMark(); - *pNewCrsr->GetMark() = pBkmk->GetOtherMarkPos(); + throw uno::RuntimeException(); } - uno::Reference xTunnel(xParentText, UNO_QUERY); - SwXText* pParentText = 0; - if(xTunnel.is()) + const SwPosition aPos(GetDoc()->GetNodes().GetEndOfContent()); + ::std::auto_ptr pNewCrsr( + m_pImpl->m_rDoc.CreateUnoCrsr(aPos, FALSE)); + if (!GetPositions(*pNewCrsr)) { - pParentText = reinterpret_cast< SwXText * >( - sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething(SwXText::getUnoTunnelId()) )); + throw uno::RuntimeException(); } - DBG_ASSERT(pParentText, "parent is not a SwXText"); - if (!pParentText) + if (!m_pImpl->m_xParentText.is()) { - throw uno::RuntimeException(); + getText(); } - const CursorType eSetType = (RANGE_IN_CELL == eRangePosition) + const CursorType eSetType = (RANGE_IN_CELL == m_pImpl->m_eRangePosition) ? CURSOR_SELECTION_IN_TABLE : CURSOR_SELECTION; - const uno::Reference< XEnumeration > xRet = - new SwXParagraphEnumeration(pParentText, pNewCrsr, eSetType); + const uno::Reference< container::XEnumeration > xRet = + new SwXParagraphEnumeration(m_pImpl->m_xParentText, pNewCrsr, eSetType); return xRet; } -uno::Type SwXTextRange::getElementType(void) throw( RuntimeException ) +uno::Type SAL_CALL SwXTextRange::getElementType() throw (uno::RuntimeException) { - return ::getCppuType((uno::Reference*)0); + return text::XTextRange::static_type(); } -sal_Bool SwXTextRange::hasElements(void) throw( RuntimeException ) +sal_Bool SAL_CALL SwXTextRange::hasElements() throw (uno::RuntimeException) { return sal_True; } -Sequence< OUString > SAL_CALL SwXTextRange::getAvailableServiceNames(void) throw( RuntimeException ) +uno::Sequence< OUString > SAL_CALL +SwXTextRange::getAvailableServiceNames() throw (uno::RuntimeException) { - Sequence< OUString > aRet(1); + uno::Sequence< OUString > aRet(1); OUString* pArray = aRet.getArray(); pArray[0] = OUString::createFromAscii("com.sun.star.text.TextContent"); return aRet; } -uno::Reference< XPropertySetInfo > SAL_CALL SwXTextRange::getPropertySetInfo( ) throw(RuntimeException) +uno::Reference< beans::XPropertySetInfo > SAL_CALL +SwXTextRange::getPropertySetInfo() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - static uno::Reference< XPropertySetInfo > xRef = m_pPropSet->getPropertySetInfo(); + + static uno::Reference< beans::XPropertySetInfo > xRef = + m_pImpl->m_rPropSet.getPropertySetInfo(); return xRef; } -void SAL_CALL SwXTextRange::setPropertyValue( - const OUString& rPropertyName, const Any& rValue ) - throw(UnknownPropertyException, PropertyVetoException, - IllegalArgumentException, WrappedTargetException, RuntimeException) +void SAL_CALL +SwXTextRange::setPropertyValue( + const OUString& rPropertyName, const uno::Any& rValue) +throw (beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(!GetDoc() || !GetBookmark()) - throw RuntimeException(); + + if (!GetDoc() || !m_pImpl->GetBookmark()) + { + throw uno::RuntimeException(); + } SwPaM aPaM(GetDoc()->GetNodes()); - SwXTextRange::GetPositions(aPaM); - SwXTextCursor::SetPropertyValue(aPaM, *m_pPropSet, rPropertyName, rValue); + GetPositions(aPaM); + SwXTextCursor::SetPropertyValue(aPaM, m_pImpl->m_rPropSet, + rPropertyName, rValue); } -Any SAL_CALL SwXTextRange::getPropertyValue( const OUString& rPropertyName ) - throw(UnknownPropertyException, WrappedTargetException, RuntimeException) +uno::Any SAL_CALL +SwXTextRange::getPropertyValue(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(!GetDoc() || !GetBookmark()) - throw RuntimeException(); - SwPaM aPaM(((SwDoc*)GetDoc())->GetNodes()); - SwXTextRange::GetPositions(aPaM); - return SwXTextCursor::GetPropertyValue(aPaM, *m_pPropSet, rPropertyName); + + if (!GetDoc() || !m_pImpl->GetBookmark()) + { + throw uno::RuntimeException(); + } + SwPaM aPaM(GetDoc()->GetNodes()); + GetPositions(aPaM); + return SwXTextCursor::GetPropertyValue(aPaM, m_pImpl->m_rPropSet, + rPropertyName); } -void SAL_CALL SwXTextRange::addPropertyChangeListener( - const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) +void SAL_CALL +SwXTextRange::addPropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXTextRange::addPropertyChangeListener(): not implemented"); } -void SAL_CALL SwXTextRange::removePropertyChangeListener( - const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) +void SAL_CALL +SwXTextRange::removePropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXTextRange::removePropertyChangeListener(): not implemented"); } -void SAL_CALL SwXTextRange::addVetoableChangeListener( - const OUString& /*PropertyName*/, const uno::Reference< XVetoableChangeListener >& /*aListener*/ ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) +void SAL_CALL +SwXTextRange::addVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXTextRange::addVetoableChangeListener(): not implemented"); } -void SAL_CALL SwXTextRange::removeVetoableChangeListener( - const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) +void SAL_CALL +SwXTextRange::removeVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXTextRange::removeVetoableChangeListener(): not implemented"); } -PropertyState SAL_CALL SwXTextRange::getPropertyState( const OUString& rPropertyName ) - throw(UnknownPropertyException, RuntimeException) +beans::PropertyState SAL_CALL +SwXTextRange::getPropertyState(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(!GetDoc() || !GetBookmark()) - throw RuntimeException(); - SwPaM aPaM(((SwDoc*)GetDoc())->GetNodes()); - SwXTextRange::GetPositions(aPaM); - return SwXTextCursor::GetPropertyState(aPaM, *m_pPropSet, rPropertyName); + + if (!GetDoc() || !m_pImpl->GetBookmark()) + { + throw uno::RuntimeException(); + } + SwPaM aPaM(GetDoc()->GetNodes()); + GetPositions(aPaM); + return SwXTextCursor::GetPropertyState(aPaM, m_pImpl->m_rPropSet, + rPropertyName); } -Sequence< PropertyState > SAL_CALL SwXTextRange::getPropertyStates( - const Sequence< OUString >& rPropertyName ) throw(UnknownPropertyException, RuntimeException) +uno::Sequence< beans::PropertyState > SAL_CALL +SwXTextRange::getPropertyStates(const uno::Sequence< OUString >& rPropertyName) +throw (beans::UnknownPropertyException, uno::RuntimeException) { - NAMESPACE_VOS(OGuard) aGuard(Application::GetSolarMutex()); - if(!GetDoc() || !GetBookmark()) - throw RuntimeException(); - SwPaM aPaM(((SwDoc*)GetDoc())->GetNodes()); - SwXTextRange::GetPositions(aPaM); - return SwXTextCursor::GetPropertyStates(aPaM, *m_pPropSet, rPropertyName); + vos::OGuard g(Application::GetSolarMutex()); + + if (!GetDoc() || !m_pImpl->GetBookmark()) + { + throw uno::RuntimeException(); + } + SwPaM aPaM(GetDoc()->GetNodes()); + GetPositions(aPaM); + return SwXTextCursor::GetPropertyStates(aPaM, m_pImpl->m_rPropSet, + rPropertyName); } -void SAL_CALL SwXTextRange::setPropertyToDefault( const OUString& rPropertyName ) - throw(UnknownPropertyException, RuntimeException) +void SAL_CALL SwXTextRange::setPropertyToDefault(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(!GetDoc() || !GetBookmark()) - throw RuntimeException(); - SwPaM aPaM(((SwDoc*)GetDoc())->GetNodes()); - SwXTextRange::GetPositions(aPaM); - SwXTextCursor::SetPropertyToDefault(aPaM, *m_pPropSet, rPropertyName); + + if (!GetDoc() || !m_pImpl->GetBookmark()) + { + throw uno::RuntimeException(); + } + SwPaM aPaM(GetDoc()->GetNodes()); + GetPositions(aPaM); + SwXTextCursor::SetPropertyToDefault(aPaM, m_pImpl->m_rPropSet, + rPropertyName); } -Any SAL_CALL SwXTextRange::getPropertyDefault( const OUString& rPropertyName ) - throw(UnknownPropertyException, WrappedTargetException, RuntimeException) +uno::Any SAL_CALL +SwXTextRange::getPropertyDefault(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(!GetDoc() || !GetBookmark()) - throw RuntimeException(); - SwPaM aPaM(((SwDoc*)GetDoc())->GetNodes()); - SwXTextRange::GetPositions(aPaM); - return SwXTextCursor::GetPropertyDefault(aPaM, *m_pPropSet, rPropertyName); + + if (!GetDoc() || !m_pImpl->GetBookmark()) + { + throw uno::RuntimeException(); + } + SwPaM aPaM(GetDoc()->GetNodes()); + GetPositions(aPaM); + return SwXTextCursor::GetPropertyDefault(aPaM, m_pImpl->m_rPropSet, + rPropertyName); } -void SwXTextRange::makeRedline( - const ::rtl::OUString& rRedlineType, - const uno::Sequence< beans::PropertyValue >& rRedlineProperties ) - throw (lang::IllegalArgumentException, uno::RuntimeException) +void SAL_CALL +SwXTextRange::makeRedline( + const ::rtl::OUString& rRedlineType, + const uno::Sequence< beans::PropertyValue >& rRedlineProperties ) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(!GetDoc() || !GetBookmark()) - throw RuntimeException(); - SwPaM aPaM(((SwDoc*)GetDoc())->GetNodes()); + + if (!GetDoc() || !m_pImpl->GetBookmark()) + { + throw uno::RuntimeException(); + } + SwPaM aPaM(GetDoc()->GetNodes()); SwXTextRange::GetPositions(aPaM); SwUnoCursorHelper::makeRedline( aPaM, rRedlineType, rRedlineProperties ); } diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 1600bbbb7a..98c81df1f4 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1594,17 +1594,13 @@ uno::Reference< text::XTextContent > SwXText::convertToTextFrame( //bookmarks have to be removed before the referenced text node is deleted in DelFullPara if(pStartRange) { - ::sw::mark::IMark const * const pStartBookmark = pStartRange->GetBookmark(); - if(pStartBookmark) - pDoc->getIDocumentMarkAccess()->deleteMark(pStartBookmark); - } + pStartRange->Invalidate(); + } if(pEndRange) { - ::sw::mark::IMark const * const pEndBookmark = pEndRange->GetBookmark(); - if(pEndBookmark) - pDoc->getIDocumentMarkAccess()->deleteMark(pEndBookmark); - } - + pEndRange->Invalidate(); + } + pDoc->StartUndo( UNDO_START, NULL ); bool bIllegalException = false; bool bRuntimeException = false; -- cgit v1.2.3 From d7a4257e39045bacd08e634817bd89f09d988381 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:53 +0100 Subject: swunolocking1: #i105557#: SwXTextRange: move static methods to namespace sw. clean up the implementation a little. --- sw/inc/unotextrange.hxx | 22 ++- sw/source/core/access/accpara.cxx | 6 +- sw/source/core/crsr/crsrsh.cxx | 4 +- sw/source/core/unocore/unobkm.cxx | 6 +- sw/source/core/unocore/unodraw.cxx | 12 +- sw/source/core/unocore/unofield.cxx | 6 +- sw/source/core/unocore/unoflatpara.cxx | 8 +- sw/source/core/unocore/unoframe.cxx | 8 +- sw/source/core/unocore/unoftn.cxx | 7 +- sw/source/core/unocore/unoidx.cxx | 6 +- sw/source/core/unocore/unoobj2.cxx | 175 +++++++++++++---------- sw/source/core/unocore/unoparagraph.cxx | 2 +- sw/source/core/unocore/unoredline.cxx | 7 +- sw/source/core/unocore/unorefmk.cxx | 17 +-- sw/source/core/unocore/unosect.cxx | 4 +- sw/source/core/unocore/unotbl.cxx | 5 +- sw/source/core/unocore/unotext.cxx | 20 +-- sw/source/filter/xml/XMLRedlineImportHelper.cxx | 4 +- sw/source/filter/xml/swxml.cxx | 5 +- sw/source/filter/xml/xmlimp.cxx | 6 +- sw/source/filter/xml/xmltbli.cxx | 4 +- sw/source/ui/dialog/SwSpellDialogChildWindow.cxx | 9 +- sw/source/ui/uno/unotxdoc.cxx | 18 ++- sw/source/ui/uno/unotxvw.cxx | 14 +- 24 files changed, 198 insertions(+), 177 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx index 8b34ce7f94..c3c3d362db 100644 --- a/sw/inc/unotextrange.hxx +++ b/sw/inc/unotextrange.hxx @@ -77,6 +77,13 @@ namespace sw { void DeepCopyPaM(SwPaM const & rSource, SwPaM & rTarget); + bool XTextRangeToSwPaM(SwUnoInternalPaM& rToFill, + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextRange); + + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > + CreateParentXText(SwDoc & rDoc, const SwPosition& rPos); + } // namespace sw @@ -105,10 +112,8 @@ private: enum RangePosition { RANGE_IN_TEXT, // "ordinary" ::com::sun::star::text::TextRange - RANGE_IN_FRAME, // position created with a frame that has no uno object RANGE_IN_CELL, // position created with a cell that has no uno object RANGE_IS_TABLE, // anchor of a table - RANGE_INVALID // created by NewInstance }; void SetPositions(SwPaM const& rPam); @@ -133,17 +138,10 @@ public: SwDoc* GetDoc(); bool GetPositions(SwPaM & rToFill) const; - static BOOL XTextRangeToSwPaM(SwUnoInternalPaM& rToFill, - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > & xTextRange); - static ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > CreateTextRangeFromPosition( - SwDoc* pDoc, - const SwPosition& rPos, const SwPosition* pMark); - - static ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > - CreateParentXText(SwDoc* pDoc, const SwPosition& rPos); + ::com::sun::star::text::XTextRange > CreateXTextRange( + SwDoc & rDoc, + const SwPosition& rPos, const SwPosition *const pMark); static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index c9de2c74df..eac4a4fdaf 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -2105,8 +2105,10 @@ sal_Bool SwAccessibleParagraph::replaceText( aEndPos.nContent = nEnd; // now create XTextRange as helper and set string - SwXTextRange::CreateTextRangeFromPosition( - pNode->GetDoc(), aStartPos, &aEndPos)->setString(sReplacement); + const uno::Reference xRange( + SwXTextRange::CreateXTextRange( + *pNode->GetDoc(), aStartPos, &aEndPos)); + xRange->setString(sReplacement); // delete portion data ClearPortionData(); diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 674b95634d..ec0a07b306 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -3372,8 +3372,8 @@ void lcl_FillTextRange( uno::Reference& rRange, SwPosition aEndPos( aStartPos ); aEndPos.nContent = nBegin + nLen; - uno::Reference xRange = - SwXTextRange::CreateTextRangeFromPosition( rNode.GetDoc(), aStartPos, &aEndPos); + const uno::Reference xRange = + SwXTextRange::CreateXTextRange(*rNode.GetDoc(), aStartPos, &aEndPos); rRange = xRange; } diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index 24d1ccd7d6..561f145473 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -237,7 +237,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) m_pImpl->m_pDoc = pDoc; SwUnoInternalPaM aPam(*m_pImpl->m_pDoc); - SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange); + ::sw::XTextRangeToSwPaM(aPam, xTextRange); UnoActionContext aCont(m_pImpl->m_pDoc); if (!m_pImpl->m_sMarkName.getLength()) { @@ -294,8 +294,8 @@ SwXBookmark::getAnchor() throw (uno::RuntimeException) { throw uno::RuntimeException(); } - return SwXTextRange::CreateTextRangeFromPosition( - m_pImpl->m_pDoc, + return SwXTextRange::CreateXTextRange( + *m_pImpl->m_pDoc, m_pImpl->m_pRegisteredBookmark->GetMarkPos(), (m_pImpl->m_pRegisteredBookmark->IsExpanded()) ? &m_pImpl->m_pRegisteredBookmark->GetOtherMarkPos() : NULL); diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 06c1961c73..00e129efc4 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -784,7 +784,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape) if( pDesc && (xRg = pDesc->GetTextRange()).is() ) { pInternalPam = new SwUnoInternalPaM(*pDoc); - if(SwXTextRange::XTextRangeToSwPaM(*pInternalPam, xRg)) + if (::sw::XTextRangeToSwPaM(*pInternalPam, xRg)) { if(FLY_AT_FLY == aAnchor.GetAnchorId() && !pInternalPam->GetNode()->FindFlyStartNode()) @@ -1302,7 +1302,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A new SwUnoInternalPaM( *(pFmt->GetDoc()) ); uno::Reference< text::XTextRange > xRg; aValue >>= xRg; - if ( SwXTextRange::XTextRangeToSwPaM(*pInternalPam, xRg) ) + if (::sw::XTextRangeToSwPaM(*pInternalPam, xRg) ) { if (aAnchor.GetAnchorId() == FLY_AS_CHAR) { @@ -1634,9 +1634,9 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName) { if ( aAnchor.GetCntntAnchor() ) { - uno::Reference< text::XTextRange > xTextRange = - SwXTextRange::CreateTextRangeFromPosition( - pFmt->GetDoc(), + const uno::Reference< text::XTextRange > xTextRange + = SwXTextRange::CreateXTextRange( + *pFmt->GetDoc(), *aAnchor.GetCntntAnchor(), 0L ); aRet.setValue(&xTextRange, ::getCppuType((uno::Reference*)0)); @@ -2203,7 +2203,7 @@ uno::Reference< text::XTextRange > SwXShape::getAnchor(void) throw( uno::Runtim (rAnchor.GetCntntAnchor() && !rAnchor.GetPageNum())) { const SwPosition &rPos = *(pFmt->GetAnchor().GetCntntAnchor()); - aRef = SwXTextRange::CreateTextRangeFromPosition(pFmt->GetDoc(), rPos, 0); + aRef = SwXTextRange::CreateXTextRange(*pFmt->GetDoc(), rPos, 0); } } else diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 31f4659c22..161a71136b 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -1305,7 +1305,7 @@ void SwXTextField::attachToRange( { SwUnoInternalPaM aPam(*pDoc); //das muss jetzt sal_True liefern - SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange); + ::sw::XTextRangeToSwPaM(aPam, xTextRange); SwField* pFld = 0; switch(m_nServiceId) { @@ -1880,8 +1880,8 @@ uno::Reference< text::XTextRange > SwXTextField::getAnchor(void) throw( uno::Ru SwPaM aPam(rTxtNode, *pTxtFld->GetStart() + 1, rTxtNode, *pTxtFld->GetStart()); - aRef = SwXTextRange::CreateTextRangeFromPosition(m_pDoc, - *aPam.GetPoint(), aPam.GetMark()); + aRef = SwXTextRange::CreateXTextRange( + *m_pDoc, *aPam.GetPoint(), aPam.GetMark()); } return aRef; diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index c5055394cd..d45125c2d2 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -218,7 +218,9 @@ void SAL_CALL SwXFlatParagraph::changeText(::sal_Int32 nPos, ::sal_Int32 nLen, c UnoActionContext aAction( mpTxtNode->GetDoc() ); - uno::Reference< text::XTextRange > xRange = SwXTextRange::CreateTextRangeFromPosition( mpTxtNode->GetDoc(), *aPaM.GetPoint(), aPaM.GetMark() ); + const uno::Reference< text::XTextRange > xRange = + SwXTextRange::CreateXTextRange( + *mpTxtNode->GetDoc(), *aPaM.GetPoint(), aPaM.GetMark() ); uno::Reference< beans::XPropertySet > xPropSet( xRange, uno::UNO_QUERY ); if ( xPropSet.is() ) { @@ -246,7 +248,9 @@ void SAL_CALL SwXFlatParagraph::changeAttributes(::sal_Int32 nPos, ::sal_Int32 n UnoActionContext aAction( mpTxtNode->GetDoc() ); - uno::Reference< text::XTextRange > xRange = SwXTextRange::CreateTextRangeFromPosition( mpTxtNode->GetDoc(), *aPaM.GetPoint(), aPaM.GetMark() ); + const uno::Reference< text::XTextRange > xRange = + SwXTextRange::CreateXTextRange( + *mpTxtNode->GetDoc(), *aPaM.GetPoint(), aPaM.GetMark() ); uno::Reference< beans::XPropertySet > xPropSet( xRange, uno::UNO_QUERY ); if ( xPropSet.is() ) { diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 5457e7d0f5..841465009f 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2056,7 +2056,7 @@ uno::Reference< text::XTextRange > SwXFrame::getAnchor(void) throw( uno::Runtim (rAnchor.GetCntntAnchor() && !rAnchor.GetPageNum())) { const SwPosition &rPos = *(rAnchor.GetCntntAnchor()); - aRef = SwXTextRange::CreateTextRangeFromPosition(pFmt->GetDoc(), rPos, 0); + aRef = SwXTextRange::CreateXTextRange(*pFmt->GetDoc(), rPos, 0); } } else @@ -2098,7 +2098,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan { SwUnoInternalPaM aIntPam(*pDoc); //das muss jetzt sal_True liefern - SwXTextRange::XTextRangeToSwPaM(aIntPam, xTextRange); + ::sw::XTextRangeToSwPaM(aIntPam, xTextRange); SwNode& rNode = pDoc->GetNodes().GetEndOfContent(); SwPaM aPam(rNode); @@ -2430,7 +2430,7 @@ void SwXFrame::attach(const uno::Reference< text::XTextRange > & xTextRange) } SwDoc* pDoc = pFmt->GetDoc(); SwUnoInternalPaM aIntPam(*pDoc); - if(SwXTextRange::XTextRangeToSwPaM(aIntPam, xTextRange)) + if (::sw::XTextRangeToSwPaM(aIntPam, xTextRange)) { SfxItemSet aSet( pDoc->GetAttrPool(), RES_ANCHOR, RES_ANCHOR ); @@ -2672,7 +2672,7 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursorByRange(const uno::Reference< text::XTextCursor > aRef; SwFrmFmt* pFmt = GetFrmFmt(); SwUnoInternalPaM aPam(*GetDoc()); - if(pFmt && SwXTextRange::XTextRangeToSwPaM(aPam, aTextPosition)) + if (pFmt && ::sw::XTextRangeToSwPaM(aPam, aTextPosition)) { SwNode& rNode = pFmt->GetCntnt().GetCntntIdx()->GetNode(); #if OSL_DEBUG_LEVEL > 1 diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index 4f07cebed1..26333dd73d 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -251,7 +251,7 @@ void SwXFootnote::attachToRange(const uno::Reference< text::XTextRange > & xText { SwUnoInternalPaM aPam(*pNewDoc); //das muss jetzt sal_True liefern - SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange); + ::sw::XTextRangeToSwPaM(aPam, xTextRange); UnoActionContext aCont(pNewDoc); SwTxtAttr* pTxtAttr = 0; @@ -315,7 +315,8 @@ uno::Reference< text::XTextRange > SwXFootnote::getAnchor(void) throw( uno::Run SwPosition aMark( *aPam.Start() ); aPam.SetMark(); aPam.GetMark()->nContent++; - aRef = SwXTextRange::CreateTextRangeFromPosition((SwDoc*)GetDoc(), *aPam.Start(), aPam.End()); + aRef = SwXTextRange::CreateXTextRange( + *GetDoc(), *aPam.Start(), aPam.End()); } else throw uno::RuntimeException(); @@ -412,7 +413,7 @@ uno::Reference< text::XTextCursor > SwXFootnote::createTextCursorByRange( throw uno::RuntimeException(); uno::Reference< text::XTextCursor > aRef; SwUnoInternalPaM aPam(*GetDoc()); - if(SwXTextRange::XTextRangeToSwPaM(aPam, aTextPosition)) + if (::sw::XTextRangeToSwPaM(aPam, aTextPosition)) { const SwTxtFtn* pTxtFtn = pFmt->GetTxtFtn(); const SwNode* pFtnStartNode = &pTxtFtn->GetStartNode()->GetNode(); diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 904e7dfcdb..5cfaf16fc5 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -1030,7 +1030,7 @@ void SwXDocumentIndex::attachToRange(const uno::Reference< text::XTextRange > & { SwUnoInternalPaM aPam(*pDoc); //das muss jetzt sal_True liefern - SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange); + ::sw::XTextRangeToSwPaM(aPam, xTextRange); const SwTOXBase* pOld = pDoc->GetCurTOX( *aPam.Start() ); if(!pOld) @@ -1092,7 +1092,7 @@ uno::Reference< text::XTextRange > SwXDocumentIndex::getAnchor(void) throw( uno aPaM.SetMark(); aPaM.GetPoint()->nNode = *pIdx->GetNode().EndOfSectionNode(); aPaM.Move( fnMoveBackward, fnGoCntnt ); - xRet = SwXTextRange::CreateTextRangeFromPosition(pSectFmt->GetDoc(), + xRet = SwXTextRange::CreateXTextRange(*pSectFmt->GetDoc(), *aPaM.GetMark(), aPaM.GetPoint()); } } @@ -1469,7 +1469,7 @@ void SwXDocumentIndexMark::attachToRange(const uno::Reference< text::XTextRange SwUnoInternalPaM aPam(*pDoc); //das muss jetzt sal_True liefern - SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange); + ::sw::XTextRangeToSwPaM(aPam, xTextRange); SwTOXMark aMark (pTOXType); if(sAltText.Len()) aMark.SetAlternativeText(sAltText); diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 71061001d6..36afe319cb 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1536,10 +1536,8 @@ SwXTextRange::getText() throw (uno::RuntimeException) SwTable const*const pTable = SwTable::FindTable( pTblFmt ); SwTableNode const*const pTblNode = pTable->GetTableNode(); const SwPosition aPosition( *pTblNode ); - const uno::Reference< text::XTextRange > xRange = - SwXTextRange::CreateTextRangeFromPosition( - &m_pImpl->m_rDoc, aPosition, 0); - m_pImpl->m_xParentText = xRange->getText(); + m_pImpl->m_xParentText = + ::sw::CreateParentXText(m_pImpl->m_rDoc, aPosition); } } OSL_ENSURE(m_pImpl->m_xParentText.is(), "SwXTextRange::getText: no text"); @@ -1645,10 +1643,12 @@ bool SwXTextRange::GetPositions(SwPaM& rToFill) const return false; } -sal_Bool SwXTextRange::XTextRangeToSwPaM( SwUnoInternalPaM& rToFill, - const uno::Reference< XTextRange > & xTextRange) +namespace sw { + +bool XTextRangeToSwPaM( SwUnoInternalPaM & rToFill, + const uno::Reference< text::XTextRange > & xTextRange) { - sal_Bool bRet = sal_False; + bool bRet = false; uno::Reference xRangeTunnel( xTextRange, uno::UNO_QUERY); SwXTextRange* pRange = 0; @@ -1658,27 +1658,26 @@ sal_Bool SwXTextRange::XTextRangeToSwPaM( SwUnoInternalPaM& rToFill, SwXParagraph* pPara = 0; if(xRangeTunnel.is()) { - pRange = reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) )); - pCursor = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); - pPortion = reinterpret_cast< SwXTextPortion * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextPortion::getUnoTunnelId()) )); - pText = reinterpret_cast< SwXText * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXText::getUnoTunnelId()) )); - pPara = reinterpret_cast< SwXParagraph * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXParagraph::getUnoTunnelId()) )); + pRange = ::sw::UnoTunnelGetImplementation(xRangeTunnel); + pCursor = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); + pPortion= + ::sw::UnoTunnelGetImplementation(xRangeTunnel); + pText = ::sw::UnoTunnelGetImplementation(xRangeTunnel); + pPara = ::sw::UnoTunnelGetImplementation(xRangeTunnel); } - //if it's a text cursor then create a temporary cursor there and re-use the pCursor variable - uno::Reference< XTextCursor > xTextCursor; + // if it's a text then create a temporary cursor there and re-use + // the pCursor variable if(pText) { - xTextCursor = pText->createCursor(); + const uno::Reference< text::XTextCursor > xTextCursor = + pText->createCursor(); xTextCursor->gotoEnd(sal_True); - uno::Reference xCrsrTunnel( xTextCursor, UNO_QUERY); - pCursor = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); + const uno::Reference xCrsrTunnel( + xTextCursor, uno::UNO_QUERY); + pCursor = + ::sw::UnoTunnelGetImplementation(xCrsrTunnel); } if(pRange && pRange->GetDoc() == rToFill.GetDoc()) { @@ -1698,8 +1697,9 @@ sal_Bool SwXTextRange::XTextRangeToSwPaM( SwUnoInternalPaM& rToFill, : ((pPortion) ? pPortion->GetCursor() : 0); if (pUnoCrsr && pDoc == rToFill.GetDoc()) { - DBG_ASSERT((SwPaM*)pUnoCrsr->GetNext() == pUnoCrsr, "was machen wir mit Ringen?" ); - bRet = sal_True; + DBG_ASSERT((SwPaM*)pUnoCrsr->GetNext() == pUnoCrsr, + "what to do about rings?"); + bRet = true; *rToFill.GetPoint() = *pUnoCrsr->GetPoint(); if (pUnoCrsr->HasMark()) { @@ -1714,53 +1714,65 @@ sal_Bool SwXTextRange::XTextRangeToSwPaM( SwUnoInternalPaM& rToFill, return bRet; } -sal_Bool lcl_IsStartNodeInFormat(sal_Bool bHeader, SwStartNode* pSttNode, - const SwFrmFmt* pFrmFmt, SwFrmFmt*& rpFormat) +static bool +lcl_IsStartNodeInFormat(const bool bHeader, SwStartNode *const pSttNode, + SwFrmFmt const*const pFrmFmt, SwFrmFmt*& rpFormat) { - sal_Bool bRet = sal_False; + bool bRet = false; const SfxItemSet& rSet = pFrmFmt->GetAttrSet(); const SfxPoolItem* pItem; - SwFrmFmt* pHeadFootFmt; - if(SFX_ITEM_SET == rSet.GetItemState( static_cast< USHORT >(bHeader ? RES_HEADER : RES_FOOTER), sal_True, &pItem) && - 0 != (pHeadFootFmt = bHeader ? - ((SwFmtHeader*)pItem)->GetHeaderFmt() : - ((SwFmtFooter*)pItem)->GetFooterFmt())) - { - const SwFmtCntnt& rFlyCntnt = pHeadFootFmt->GetCntnt(); - const SwNode& rNode = rFlyCntnt.GetCntntIdx()->GetNode(); - const SwStartNode* pCurSttNode = rNode.FindSttNodeByType( - bHeader ? SwHeaderStartNode : SwFooterStartNode); - if(pCurSttNode && pCurSttNode == pSttNode) + if (SFX_ITEM_SET == rSet.GetItemState( + static_cast(bHeader ? RES_HEADER : RES_FOOTER), + sal_True, &pItem)) + { + SfxPoolItem *const pItemNonConst(const_cast(pItem)); + SwFrmFmt *const pHeadFootFmt = (bHeader) ? + static_cast(pItemNonConst)->GetHeaderFmt() : + static_cast(pItemNonConst)->GetFooterFmt(); + if (pHeadFootFmt) { - bRet = sal_True; - rpFormat = pHeadFootFmt; + const SwFmtCntnt& rFlyCntnt = pHeadFootFmt->GetCntnt(); + const SwNode& rNode = rFlyCntnt.GetCntntIdx()->GetNode(); + SwStartNode const*const pCurSttNode = rNode.FindSttNodeByType( + (bHeader) ? SwHeaderStartNode : SwFooterStartNode); + if (pCurSttNode && (pCurSttNode == pSttNode)) + { + rpFormat = pHeadFootFmt; + bRet = true; + } } } return bRet; } -uno::Reference< XTextRange > SwXTextRange::CreateTextRangeFromPosition( - SwDoc* pDoc, const SwPosition& rPos, const SwPosition* pMark) +} // namespace sw + +uno::Reference< text::XTextRange > +SwXTextRange::CreateXTextRange( + SwDoc & rDoc, const SwPosition& rPos, const SwPosition *const pMark) { - uno::Reference< XText > xParentText( CreateParentXText(pDoc, rPos) ); - std::auto_ptr pNewCrsr( pDoc->CreateUnoCrsr(rPos, sal_False) ); + const uno::Reference xParentText( + ::sw::CreateParentXText(rDoc, rPos)); + const ::std::auto_ptr pNewCrsr( + rDoc.CreateUnoCrsr(rPos, sal_False)); if(pMark) { pNewCrsr->SetMark(); *pNewCrsr->GetMark() = *pMark; } - bool isCell( dynamic_cast(xParentText.get()) ); - uno::Reference< XTextRange > xRet( + const bool isCell( dynamic_cast(xParentText.get()) ); + const uno::Reference< text::XTextRange > xRet( new SwXTextRange(*pNewCrsr, xParentText, isCell ? RANGE_IN_CELL : RANGE_IN_TEXT) ); return xRet; - } -uno::Reference< XText > SwXTextRange::CreateParentXText(SwDoc* pDoc, - const SwPosition& rPos) +namespace sw { + +uno::Reference< text::XText > +CreateParentXText(SwDoc & rDoc, const SwPosition& rPos) { - uno::Reference< XText > xParentText; + uno::Reference< text::XText > xParentText; SwStartNode* pSttNode = rPos.nNode.GetNode().StartOfSectionNode(); while(pSttNode && pSttNode->IsSectionNode()) { @@ -1771,18 +1783,19 @@ uno::Reference< XText > SwXTextRange::CreateParentXText(SwDoc* pDoc, { case SwTableBoxStartNode: { - const SwTableNode* pTblNode = pSttNode->FindTableNode(); - SwFrmFmt* pTableFmt = (SwFrmFmt*)pTblNode->GetTable().GetFrmFmt(); - SwTableBox* pBox = pSttNode->GetTblBox(); + SwTableNode const*const pTblNode = pSttNode->FindTableNode(); + SwFrmFmt *const pTableFmt = + static_cast(pTblNode->GetTable().GetFrmFmt()); + SwTableBox *const pBox = pSttNode->GetTblBox(); - xParentText = pBox + xParentText = (pBox) ? SwXCell::CreateXCell( pTableFmt, pBox ) : new SwXCell( pTableFmt, *pSttNode ); } break; case SwFlyStartNode: { - SwFrmFmt* pFmt = pSttNode->GetFlyFmt(); + SwFrmFmt *const pFmt = pSttNode->GetFlyFmt(); if (0 != pFmt) { SwXTextFrame* pFrame( static_cast( @@ -1794,18 +1807,23 @@ uno::Reference< XText > SwXTextRange::CreateParentXText(SwDoc* pDoc, case SwHeaderStartNode: case SwFooterStartNode: { - sal_Bool bHeader = SwHeaderStartNode == eType; - sal_uInt16 nPDescCount = pDoc->GetPageDescCnt(); + const bool bHeader = (SwHeaderStartNode == eType); + const sal_uInt16 nPDescCount = rDoc.GetPageDescCnt(); for(sal_uInt16 i = 0; i < nPDescCount; i++) { - const SwPageDesc& rDesc = const_cast(pDoc) - ->GetPageDesc( i ); + const SwPageDesc& rDesc = + // C++ is retarded + const_cast(rDoc).GetPageDesc( i ); const SwFrmFmt* pFrmFmtMaster = &rDesc.GetMaster(); const SwFrmFmt* pFrmFmtLeft = &rDesc.GetLeft(); SwFrmFmt* pHeadFootFmt = 0; - if(!lcl_IsStartNodeInFormat(bHeader, pSttNode, pFrmFmtMaster, pHeadFootFmt)) - lcl_IsStartNodeInFormat(bHeader, pSttNode, pFrmFmtLeft, pHeadFootFmt); + if (!lcl_IsStartNodeInFormat(bHeader, pSttNode, pFrmFmtMaster, + pHeadFootFmt)) + { + lcl_IsStartNodeInFormat(bHeader, pSttNode, pFrmFmtLeft, + pHeadFootFmt); + } if(pHeadFootFmt) { @@ -1813,7 +1831,10 @@ uno::Reference< XText > SwXTextRange::CreateParentXText(SwDoc* pDoc, First( TYPE( SwXHeadFootText )); xParentText = pxHdFt; if(!pxHdFt) - xParentText = new SwXHeadFootText(*pHeadFootFmt, bHeader); + { + xParentText = + new SwXHeadFootText(*pHeadFootFmt, bHeader); + } break; } } @@ -1821,15 +1842,16 @@ uno::Reference< XText > SwXTextRange::CreateParentXText(SwDoc* pDoc, break; case SwFootnoteStartNode: { - sal_uInt16 n, nFtnCnt = pDoc->GetFtnIdxs().Count(); - uno::Reference< XFootnote > xRef; - for( n = 0; n < nFtnCnt; ++n ) + const sal_uInt16 nFtnCnt = rDoc.GetFtnIdxs().Count(); + uno::Reference< text::XFootnote > xRef; + for (sal_uInt16 n = 0; n < nFtnCnt; ++n ) { - const SwTxtFtn* pTxtFtn = pDoc->GetFtnIdxs()[ n ]; + const SwTxtFtn* pTxtFtn = rDoc.GetFtnIdxs()[ n ]; const SwFmtFtn& rFtn = pTxtFtn->GetFtn(); pTxtFtn = rFtn.GetTxtFtn(); #if OSL_DEBUG_LEVEL > 1 - const SwStartNode* pTmpSttNode = pTxtFtn->GetStartNode()->GetNode(). + const SwStartNode* pTmpSttNode = + pTxtFtn->GetStartNode()->GetNode(). FindSttNodeByType(SwFootnoteStartNode); (void)pTmpSttNode; #endif @@ -1837,11 +1859,12 @@ uno::Reference< XText > SwXTextRange::CreateParentXText(SwDoc* pDoc, if (pSttNode == pTxtFtn->GetStartNode()->GetNode(). FindSttNodeByType(SwFootnoteStartNode)) { - xParentText = ((SwUnoCallBack*)pDoc->GetUnoCallBack())-> + xParentText = + static_cast(rDoc.GetUnoCallBack())-> GetFootnote(rFtn); if (!xParentText.is()) { - xParentText = new SwXFootnote(pDoc, rFtn); + xParentText = new SwXFootnote(&rDoc, rFtn); } break; } @@ -1851,9 +1874,9 @@ uno::Reference< XText > SwXTextRange::CreateParentXText(SwDoc* pDoc, default: { // then it is the body text - uno::Reference xModel = - pDoc->GetDocShell()->GetBaseModel(); - uno::Reference< XTextDocument > xDoc( + const uno::Reference xModel = + rDoc.GetDocShell()->GetBaseModel(); + const uno::Reference< text::XTextDocument > xDoc( xModel, uno::UNO_QUERY); xParentText = xDoc->getText(); } @@ -1862,6 +1885,8 @@ uno::Reference< XText > SwXTextRange::CreateParentXText(SwDoc* pDoc, return xParentText; } +} // namespace sw + uno::Reference< container::XEnumeration > SAL_CALL SwXTextRange::createContentEnumeration(const OUString& rServiceName) throw (uno::RuntimeException) @@ -2168,8 +2193,8 @@ void SwXTextRanges::Impl::MakeRanges() SwPaM *pTmpCursor = pCursor; do { const uno::Reference< text::XTextRange > xRange( - SwXTextRange::CreateTextRangeFromPosition( - pTmpCursor->GetDoc(), + SwXTextRange::CreateXTextRange( + *pTmpCursor->GetDoc(), *pTmpCursor->GetPoint(), pTmpCursor->GetMark())); if (xRange.is()) { diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 683366fc6d..ee6af202af 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -263,7 +263,7 @@ SwXParagraph::CreateXParagraph(SwDoc & rDoc, SwTxtNode& rTxtNode, if (!xParentText.is()) { SwPosition Pos( rTxtNode ); - xParentText.set(SwXTextRange::CreateParentXText( &rDoc, Pos )); + xParentText.set(::sw::CreateParentXText( rDoc, Pos )); } SwXParagraph *const pXPara( new SwXParagraph(xParentText, rTxtNode, nSelStart, nSelEnd) ); diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index 6f7ee5ff68..04162db925 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -591,11 +591,8 @@ uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName ) pPoint = pRedline->GetPoint(); else pPoint = pRedline->GetMark(); - SwPaM aTmp(*pPoint); - uno::Reference xTmpParent; -// uno::Reference< text::XTextRange > xRange = SwXTextRange::createTextRangeFromPaM(aTmp); - uno::ReferencexRange = - SwXTextRange::CreateTextRangeFromPosition( pDoc, *pPoint, 0 ); + const uno::Reference xRange = + SwXTextRange::CreateXTextRange(*pDoc, *pPoint, 0); xRet = xRange.get(); } break; diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index fa8acbf631..c8b4927b09 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -309,7 +309,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) SwUnoInternalPaM aPam(*pDocument); //das muss jetzt sal_True liefern - SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange); + ::sw::XTextRangeToSwPaM(aPam, xTextRange); m_pImpl->InsertRefMark(aPam, dynamic_cast(pCursor)); m_pImpl->m_bIsDescriptor = sal_False; m_pImpl->m_pDoc = pDocument; @@ -342,8 +342,8 @@ SwXReferenceMark::getAnchor() throw (uno::RuntimeException) rTxtNode, *pTxtMark->GetStart()) : new SwPaM( rTxtNode, *pTxtMark->GetStart()) ); - return SwXTextRange::CreateTextRangeFromPosition( - m_pImpl->m_pDoc, *pPam->Start(), pPam->End()); + return SwXTextRange::CreateXTextRange( + *m_pImpl->m_pDoc, *pPam->Start(), pPam->End()); } } } @@ -820,8 +820,7 @@ SwXMeta::CreateXMeta(::sw::Meta & rMeta, OSL_ENSURE(pTxtAttr, "CreateXMeta: no text attr?"); if (!pTxtAttr) { return 0; } const SwPosition aPos(*pTxtNode, *pTxtAttr->GetStart()); - xParentText.set( - SwXTextRange::CreateParentXText(pTxtNode->GetDoc(), aPos) ); + xParentText.set( ::sw::CreateParentXText(*pTxtNode->GetDoc(), aPos) ); } if (!xParentText.is()) { return 0; } SwXMeta *const pXMeta( (RES_TXTATR_META == rMeta.GetFmtMeta()->Which()) @@ -1072,7 +1071,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) } SwUnoInternalPaM aPam(*pDoc); - SwXTextRange::XTextRangeToSwPaM(aPam, i_xTextRange); + ::sw::XTextRangeToSwPaM(aPam, i_xTextRange); UnoActionContext aContext(pDoc); @@ -1109,8 +1108,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) pMeta->Add(m_pImpl.get()); pMeta->SetXMeta(uno::Reference(this)); - m_pImpl->m_xParentText = - SwXTextRange::CreateParentXText(pDoc, *aPam.GetPoint()); + m_pImpl->m_xParentText = ::sw::CreateParentXText(*pDoc, *aPam.GetPoint()); m_pImpl->m_bIsDescriptor = false; } @@ -1153,8 +1151,7 @@ SwXMeta::getAnchor() throw (uno::RuntimeException) const SwPosition start(*pTxtNode, nMetaStart - 1); // -1 due to CH_TXTATR const SwPosition end(*pTxtNode, nMetaEnd); - return SwXTextRange::CreateTextRangeFromPosition( - pTxtNode->GetDoc(), start, &end); + return SwXTextRange::CreateXTextRange(*pTxtNode->GetDoc(), start, &end); } // XTextRange diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index c47a3aef13..d9d6bafa31 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -328,7 +328,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) SwUnoInternalPaM aPam(*pDoc); //das muss jetzt sal_True liefern - SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange); + ::sw::XTextRangeToSwPaM(aPam, xTextRange); UnoActionContext aCont(pDoc); pDoc->StartUndo( UNDO_INSSECTION, NULL ); @@ -488,7 +488,7 @@ SwXTextSection::getAnchor() throw (uno::RuntimeException) const SwEndNode* pEndNode = pIdx->GetNode().EndOfSectionNode(); SwPaM aEnd(*pEndNode); aEnd.Move( fnMoveBackward, fnGoCntnt ); - xRet = SwXTextRange::CreateTextRangeFromPosition(pSectFmt->GetDoc(), + xRet = SwXTextRange::CreateXTextRange(*pSectFmt->GetDoc(), *aPaM.Start(), aEnd.Start()); } } diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 049f2c5662..497f09fa8d 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1062,7 +1062,8 @@ uno::Reference< text::XTextCursor > SwXCell::createTextCursorByRange(const uno: vos::OGuard aGuard(Application::GetSolarMutex()); uno::Reference< text::XTextCursor > aRef; SwUnoInternalPaM aPam(*GetDoc()); - if((pStartNode || IsValid()) && SwXTextRange::XTextRangeToSwPaM(aPam, xTextPosition)) + if ((pStartNode || IsValid()) + && ::sw::XTextRangeToSwPaM(aPam, xTextPosition)) { const SwStartNode* pSttNd = pStartNode ? pStartNode : pBox->GetSttNd(); //skip sections @@ -2468,7 +2469,7 @@ void SwXTextTable::attachToRange(const uno::Reference< text::XTextRange > & xTex { SwUnoInternalPaM aPam(*pDoc); //das muss jetzt sal_True liefern - SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange); + ::sw::XTextRangeToSwPaM(aPam, xTextRange); { UnoActionContext aCont( pDoc ); diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 98c81df1f4..fb4e04b236 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -382,7 +382,7 @@ void SwXText::insertControlCharacter(const uno::Reference< text::XTextRange > & if (GetDoc()) { SwUnoInternalPaM aPam(*GetDoc()); - if(SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange)) + if (::sw::XTextRangeToSwPaM(aPam, xTextRange)) { const bool bForceExpandHints(CheckForOwnMemberMeta(aPam, bAbsorb)); @@ -504,7 +504,7 @@ void SwXText::insertTextContent(const uno::Reference< text::XTextRange > & xRang if(xRange.is() && xContent.is()) { SwUnoInternalPaM aPam(*GetDoc()); - if(SwXTextRange::XTextRangeToSwPaM(aPam, xRange)) + if (::sw::XTextRangeToSwPaM(aPam, xRange)) { uno::Reference xRangeTunnel( xRange, uno::UNO_QUERY); SwXTextRange* pRange = 0; @@ -1060,8 +1060,8 @@ sal_Int16 SwXText::ComparePositions( SwUnoInternalPaM aPam2(*GetDoc()); BOOL bExcept = FALSE; - if(SwXTextRange::XTextRangeToSwPaM(aPam1, xPos1) && - SwXTextRange::XTextRangeToSwPaM(aPam2, xPos2)) + if (::sw::XTextRangeToSwPaM(aPam1, xPos1) && + ::sw::XTextRangeToSwPaM(aPam2, xPos2)) { uno::Reference xRangeTunnel1( xPos1, uno::UNO_QUERY); SwXTextRange* pRange1 = 0; @@ -1582,8 +1582,8 @@ uno::Reference< text::XTextContent > SwXText::convertToTextFrame( uno::Reference< text::XTextContent > xRet; SwUnoInternalPaM aStartPam(*GetDoc()); std::auto_ptr < SwUnoInternalPaM > pEndPam( new SwUnoInternalPaM(*GetDoc())); - if(SwXTextRange::XTextRangeToSwPaM(aStartPam, xStart) && - SwXTextRange::XTextRangeToSwPaM(*pEndPam, xEnd) ) + if (::sw::XTextRangeToSwPaM(aStartPam, xStart) && + ::sw::XTextRangeToSwPaM(*pEndPam, xEnd)) { uno::Reference xStartRangeTunnel( xStart, uno::UNO_QUERY); SwXTextRange* pStartRange = reinterpret_cast< SwXTextRange * >( @@ -1826,8 +1826,8 @@ uno::Reference< text::XTextTable > SwXText::convertToTable( // !!! TODO - PaMs in tables and sections do not work here - the same applies to PaMs in frames !!! - if(!SwXTextRange::XTextRangeToSwPaM(aStartCellPam, xStartRange) || - !SwXTextRange::XTextRangeToSwPaM(aEndCellPam, xEndRange) ) + if (!::sw::XTextRangeToSwPaM(aStartCellPam, xStartRange) || + !::sw::XTextRangeToSwPaM(aEndCellPam, xEndRange)) throw lang::IllegalArgumentException(); /** check the nodes between start and end it is allowed to have pairs of StartNode/EndNodes @@ -2361,7 +2361,7 @@ uno::Reference< text::XTextCursor > SwXBodyText::createTextCursorByRange( throw aRuntime; } SwUnoInternalPaM aPam(*GetDoc()); - if(SwXTextRange::XTextRangeToSwPaM(aPam, aTextPosition)) + if (::sw::XTextRangeToSwPaM(aPam, aTextPosition)) { SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent(); @@ -2603,7 +2603,7 @@ uno::Reference< text::XTextCursor > SwXHeadFootText::createTextCursorByRange( uno::Reference< text::XTextCursor > xRet; SwFrmFmt* pHeadFootFmt = GetFmt(); SwUnoInternalPaM aPam(*GetDoc()); - if(pHeadFootFmt && SwXTextRange::XTextRangeToSwPaM(aPam, aTextPosition)) + if (pHeadFootFmt && ::sw::XTextRangeToSwPaM(aPam, aTextPosition)) { SwNode& rNode = pHeadFootFmt->GetCntnt().GetCntntIdx()->GetNode(); SwPosition aPos(rNode); diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index 3cabf2e49b..b28c444f26 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -162,7 +162,7 @@ void XTextRangeOrNodeIndexPosition::SetAsNodeIndex( #ifdef DBG_UTIL sal_Bool bSuccess = #endif - SwXTextRange::XTextRangeToSwPaM( aPaM, rRange); + ::sw::XTextRangeToSwPaM(aPaM, rRange); DBG_ASSERT(bSuccess, "illegal range"); // PaM -> Index @@ -180,7 +180,7 @@ void XTextRangeOrNodeIndexPosition::CopyPositionInto(SwPosition& rPos) #ifdef DBG_UTIL sal_Bool bSuccess = #endif - SwXTextRange::XTextRangeToSwPaM(aUnoPaM, xRange); + ::sw::XTextRangeToSwPaM(aUnoPaM, xRange); DBG_ASSERT(bSuccess, "illegal range"); rPos = *aUnoPaM.GetPoint(); diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index 8d964ac1d8..986c76b229 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -788,9 +788,8 @@ ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const S } else if( bInsertMode ) { - uno::Reference xInsertTextRange = - SwXTextRange::CreateTextRangeFromPosition( &rDoc, *rPaM.GetPoint(), - 0 ); + const uno::Reference xInsertTextRange = + SwXTextRange::CreateXTextRange(rDoc, *rPaM.GetPoint(), 0); OUString sTextInsertModeRange( RTL_CONSTASCII_USTRINGPARAM("TextInsertModeRange")); xInfoSet->setPropertyValue( sTextInsertModeRange, diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 1039515a8d..42815039db 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -713,9 +713,9 @@ void SwXMLImport::startDocument( void ) } if( pCrsrSh ) { - Reference xInsertTextRange( - SwXTextRange::CreateTextRangeFromPosition( - pDoc, *pCrsrSh->GetCrsr()->GetPoint(), 0 ) ); + const uno::Reference xInsertTextRange( + SwXTextRange::CreateXTextRange( + *pDoc, *pCrsrSh->GetCrsr()->GetPoint(), 0 ) ); setTextInsertMode( xInsertTextRange ); xTextCursor = GetTextImport()->GetCursor(); pTxtCrsr = 0; diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index a50779bf1b..95cf0ddfda 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -2926,8 +2926,8 @@ const SwStartNode *SwXMLTableContext::InsertTableSection( SwPosition aPos( *pCNd ); aPos.nContent.Assign( pCNd, 0U ); - Reference < XTextRange > xTextRange = - SwXTextRange::CreateTextRangeFromPosition( pDoc, aPos, 0 ); + const uno::Reference< text::XTextRange > xTextRange = + SwXTextRange::CreateXTextRange( *pDoc, aPos, 0 ); Reference < XText > xText = xTextRange->getText(); Reference < XTextCursor > xTextCursor = xText->createTextCursorByRange( xTextRange ); diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx index f0e72323d2..a5d9c75b39 100644 --- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx @@ -258,8 +258,10 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void) //mark the start position only if not at start of doc if(!pWrtShell->IsStartOfDoc()) { - m_pSpellState->m_xStartRange = SwXTextRange::CreateTextRangeFromPosition( - pWrtShell->GetDoc(), *pCrsr->Start(), pCrsr->End()); + m_pSpellState->m_xStartRange = + SwXTextRange::CreateXTextRange( + *pWrtShell->GetDoc(), + *pCrsr->Start(), pCrsr->End()); } pWrtShell->SpellStart( DOCPOS_START, DOCPOS_END, DOCPOS_CURR, FALSE ); } @@ -390,7 +392,8 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void) if(RET_YES == nRet) { SwUnoInternalPaM aPam(*pWrtShell->GetDoc()); - if(SwXTextRange::XTextRangeToSwPaM(aPam, m_pSpellState->m_xStartRange)) + if (::sw::XTextRangeToSwPaM(aPam, + m_pSpellState->m_xStartRange)) { pWrtShell->SetSelection(aPam); pWrtShell->SpellStart(DOCPOS_START, DOCPOS_CURR, DOCPOS_START); diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 1d9b3f1f82..4b6e67a8d7 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -991,11 +991,10 @@ Reference< XInterface > SwXTextDocument::findFirst(const Reference< util::XSear Reference< XInterface > xRet; if(nResult) { - Reference< XTextRange > xTempRange = SwXTextRange::CreateTextRangeFromPosition( - pDocShell->GetDoc(), - *pResultCrsr->GetPoint(), - pResultCrsr->GetMark()); - xRet = *new SwXTextCursor(xTempRange->getText(), pResultCrsr); + const uno::Reference< text::XText > xParent = + ::sw::CreateParentXText(*pDocShell->GetDoc(), + *pResultCrsr->GetPoint()); + xRet = *new SwXTextCursor(xParent, pResultCrsr); delete pResultCrsr; } return xRet; @@ -1019,12 +1018,11 @@ Reference< XInterface > SwXTextDocument::findNext(const Reference< XInterface > Reference< XInterface > xRet; if(nResult) { - Reference< XTextRange > xTempRange = SwXTextRange::CreateTextRangeFromPosition( - pDocShell->GetDoc(), - *pResultCrsr->GetPoint(), - pResultCrsr->GetMark()); + const uno::Reference< text::XText > xParent = + ::sw::CreateParentXText(*pDocShell->GetDoc(), + *pResultCrsr->GetPoint()); - xRet = *new SwXTextCursor(xTempRange->getText(), pResultCrsr); + xRet = *new SwXTextCursor(xParent, pResultCrsr); delete pResultCrsr; } return xRet; diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index e314b306e9..3645be8506 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -334,7 +334,7 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg else if(!pFrame && !pCell && xPos.is()) { SwUnoInternalPaM aPam(*pDoc); - if(SwXTextRange::XTextRangeToSwPaM(aPam, xPos)) + if (::sw::XTextRangeToSwPaM(aPam, xPos)) { pPam = lcl_createPamCopy(aPam); } @@ -1362,7 +1362,7 @@ void SwXTextViewCursor::gotoRange( throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) ); SwUnoInternalPaM rDestPam(*m_pView->GetDocShell()->GetDoc()); - if(!SwXTextRange::XTextRangeToSwPaM( rDestPam, xRange)) + if (!::sw::XTextRangeToSwPaM(rDestPam, xRange)) throw IllegalArgumentException(); ShellModes eSelMode = m_pView->GetShellMode(); @@ -1699,9 +1699,7 @@ uno::Reference< text::XText > SwXTextViewCursor::getText(void) throw( uno::Runt SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); - uno::Reference< text::XTextRange > xRg = SwXTextRange::CreateTextRangeFromPosition(pDoc, - *pShellCrsr->Start(), 0); - xRet = xRg->getText(); + xRet = ::sw::CreateParentXText(*pDoc, *pShellCrsr->Start()); } else throw uno::RuntimeException(); @@ -1722,8 +1720,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getStart(void) throw( uno SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); - xRet = SwXTextRange::CreateTextRangeFromPosition(pDoc, - *pShellCrsr->Start(), 0); + xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->Start(), 0); } else throw uno::RuntimeException(); @@ -1744,8 +1741,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd(void) throw( uno:: SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); - xRet = SwXTextRange::CreateTextRangeFromPosition(pDoc, - *pShellCrsr->End(), 0); + xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->End(), 0); } else throw uno::RuntimeException(); -- cgit v1.2.3 From 86e79281da064c01a3618a94504ec0a50e74c1c8 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:54 +0100 Subject: swunolocking1: #i105557#: fix locking for SwXParaFrameEnumeration: add Impl struct, and use UnoImplPtr to lock destructor. move all implementation details out of header, into Impl struct. replace PARAFRAME_PORTION_ macros with an enum. use new XServiceInfo helpers. clean up the implementation a little. --- sw/inc/unoparaframeenum.hxx | 29 ++-- sw/source/core/unocore/unoobj2.cxx | 271 +++++++++++++++++++++---------------- 2 files changed, 165 insertions(+), 135 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unoparaframeenum.hxx b/sw/inc/unoparaframeenum.hxx index d05fccfed4..7e5b43f1e6 100644 --- a/sw/inc/unoparaframeenum.hxx +++ b/sw/inc/unoparaframeenum.hxx @@ -42,13 +42,12 @@ #include -#include -#include +#include +class SwDepend; class SwNodeIndex; class SwPaM; -class SwUnoCrsr; class SwFrmFmt; @@ -80,10 +79,12 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx, * * --------------------------------------------------*/ -#define PARAFRAME_PORTION_PARAGRAPH 0 -#define PARAFRAME_PORTION_CHAR 1 -#define PARAFRAME_PORTION_TEXTRANGE 2 - +enum ParaFrameMode +{ + PARAFRAME_PORTION_PARAGRAPH, + PARAFRAME_PORTION_CHAR, + PARAFRAME_PORTION_TEXTRANGE, +}; typedef ::cppu::WeakImplHelper2 < ::com::sun::star::lang::XServiceInfo @@ -92,27 +93,19 @@ typedef ::cppu::WeakImplHelper2 class SwXParaFrameEnumeration : public SwXParaFrameEnumeration_Base - , public SwClient { private: - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > - m_xNextObject; // created by hasMoreElements - FrameDependList_t m_Frames; - - SwUnoCrsr* GetCursor() const - {return static_cast(const_cast(GetRegisteredIn()));} + class Impl; + ::sw::UnoImplPtr m_pImpl; virtual ~SwXParaFrameEnumeration(); public: SwXParaFrameEnumeration(const SwPaM& rPaM, - sal_uInt8 nParaFrameMode, SwFrmFmt* pFmt = 0); - - // SwClient - virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + const enum ParaFrameMode eParaFrameMode, SwFrmFmt *const pFmt = 0); // XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName() diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 36afe319cb..0e7f33b456 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -2359,6 +2359,68 @@ void SwXTextCursor::SetString(SwCursor& rCrsr, const OUString& rString) * SwXParaFrameEnumeration ******************************************************************/ +class SwXParaFrameEnumeration::Impl + : public SwClient +{ + +public: + + // created by hasMoreElements + uno::Reference< text::XTextContent > m_xNextObject; + FrameDependList_t m_Frames; + + Impl(SwPaM const & rPaM) + : SwClient(rPaM.GetDoc()->CreateUnoCrsr(*rPaM.GetPoint(), sal_False)) + { + if (rPaM.HasMark()) + { + GetCursor()->SetMark(); + *GetCursor()->GetMark() = *rPaM.GetMark(); + } + } + + ~Impl() { + // Impl owns the cursor; delete it here: SolarMutex is locked + delete GetRegisteredIn(); + } + + SwUnoCrsr * GetCursor() { + return static_cast( + const_cast(GetRegisteredIn())); + } + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + +}; + +/*-- 23.03.99 13:22:37--------------------------------------------------- + + -----------------------------------------------------------------------*/ + +struct InvalidFrameDepend { + bool operator() (::boost::shared_ptr const & rEntry) + { return !rEntry->GetRegisteredIn(); } +}; + +void SwXParaFrameEnumeration::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) +{ + ClientModify(this, pOld, pNew); + if(!GetRegisteredIn()) + { + m_Frames.clear(); + m_xNextObject = 0; + } + else + { + // check if any frame went away... + FrameDependList_t::iterator const iter = + ::std::remove_if(m_Frames.begin(), m_Frames.end(), + InvalidFrameDepend()); + m_Frames.erase(iter, m_Frames.end()); + } +} + /* -----------------23.03.99 13:38------------------- * * --------------------------------------------------*/ @@ -2370,7 +2432,7 @@ lcl_CreateNextObject(SwUnoCrsr& i_rUnoCrsr, if (!i_rFrames.size()) return sal_False; - SwFrmFmt* pFormat = static_cast(const_cast( + SwFrmFmt *const pFormat = static_cast(const_cast( i_rFrames.front()->GetRegisteredIn())); i_rFrames.pop_front(); // the format should be valid here, otherwise the client @@ -2391,7 +2453,7 @@ lcl_CreateNextObject(SwUnoCrsr& i_rUnoCrsr, { const SwNodeIndex* pIdx = pFormat->GetCntnt().GetCntntIdx(); DBG_ASSERT(pIdx, "where is the index?"); - const SwNode* pNd = + SwNode const*const pNd = i_rUnoCrsr.GetDoc()->GetNodes()[ pIdx->GetIndex() + 1 ]; const FlyCntType eType = (!pNd->IsNoTxtNode()) ? FLYCNTTYPE_FRM @@ -2410,11 +2472,12 @@ lcl_CreateNextObject(SwUnoCrsr& i_rUnoCrsr, and fill the frame into the array ---------------------------------------------------------------------------*/ static void -lcl_FillFrame(SwXParaFrameEnumeration & rEnum, SwUnoCrsr& rUnoCrsr, +lcl_FillFrame(SwClient & rEnum, SwUnoCrsr& rUnoCrsr, FrameDependList_t & rFrames) { // search for objects at the cursor - anchored at/as char - const SwTxtAttr * pTxtAttr = rUnoCrsr.GetNode()->GetTxtNode()->GetTxtAttr( + SwTxtAttr const*const pTxtAttr = + rUnoCrsr.GetNode()->GetTxtNode()->GetTxtAttr( rUnoCrsr.GetPoint()->nContent, RES_TXTATR_FLYCNT); if (pTxtAttr) { @@ -2425,93 +2488,64 @@ lcl_FillFrame(SwXParaFrameEnumeration & rEnum, SwUnoCrsr& rUnoCrsr, } } -/* -----------------------------06.04.00 16:39-------------------------------- - - ---------------------------------------------------------------------------*/ -OUString SwXParaFrameEnumeration::getImplementationName() -throw( RuntimeException ) -{ - return C2U("SwXParaFrameEnumeration"); -} -/* -----------------------------06.04.00 16:39-------------------------------- - - ---------------------------------------------------------------------------*/ -sal_Bool SwXParaFrameEnumeration::supportsService(const OUString& rServiceName) -throw( RuntimeException ) -{ - return C2U("com.sun.star.util.ContentEnumeration") == rServiceName; -} -/* -----------------------------06.04.00 16:39-------------------------------- - - ---------------------------------------------------------------------------*/ -Sequence< OUString > SwXParaFrameEnumeration::getSupportedServiceNames() -throw( RuntimeException ) -{ - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.util.ContentEnumeration"); - return aRet; -} /*-- 23.03.99 13:22:29--------------------------------------------------- -----------------------------------------------------------------------*/ -SwXParaFrameEnumeration::SwXParaFrameEnumeration(const SwPaM& rPaM, - sal_uInt8 nParaFrameMode, - SwFrmFmt* pFmt) +SwXParaFrameEnumeration::SwXParaFrameEnumeration( + const SwPaM& rPaM, const enum ParaFrameMode eParaFrameMode, + SwFrmFmt *const pFmt) + : m_pImpl( new SwXParaFrameEnumeration::Impl(rPaM) ) { - SwDoc* pDoc = rPaM.GetDoc(); - SwUnoCrsr* pUnoCrsr = pDoc->CreateUnoCrsr(*rPaM.GetPoint(), sal_False); - if (rPaM.HasMark()) - { - pUnoCrsr->SetMark(); - *pUnoCrsr->GetMark() = *rPaM.GetMark(); - } - pUnoCrsr->Add(this); - - if (PARAFRAME_PORTION_PARAGRAPH == nParaFrameMode) + if (PARAFRAME_PORTION_PARAGRAPH == eParaFrameMode) { FrameDependSortList_t frames; - ::CollectFrameAtNode( *this, rPaM.GetPoint()->nNode, frames, false ); + ::CollectFrameAtNode(*m_pImpl.get(), rPaM.GetPoint()->nNode, + frames, false); ::std::transform(frames.begin(), frames.end(), - ::std::back_inserter(m_Frames), + ::std::back_inserter(m_pImpl->m_Frames), ::boost::bind(&FrameDependSortListEntry::pFrameDepend, _1)); } else if (pFmt) { - //jetzt einen SwDepend anlegen und in das Array einfuegen - SwDepend* pNewDepend = new SwDepend(this, pFmt); - m_Frames.push_back( ::boost::shared_ptr(pNewDepend) ); + // create SwDepend for frame and insert into array + SwDepend *const pNewDepend = new SwDepend(m_pImpl.get(), pFmt); + m_pImpl->m_Frames.push_back(::boost::shared_ptr(pNewDepend)); } - else if((PARAFRAME_PORTION_CHAR == nParaFrameMode) || - (PARAFRAME_PORTION_TEXTRANGE == nParaFrameMode)) + else if ((PARAFRAME_PORTION_CHAR == eParaFrameMode) || + (PARAFRAME_PORTION_TEXTRANGE == eParaFrameMode)) { - if(PARAFRAME_PORTION_TEXTRANGE == nParaFrameMode) + if (PARAFRAME_PORTION_TEXTRANGE == eParaFrameMode) { SwPosFlyFrms aFlyFrms; //get all frames that are bound at paragraph or at character - pDoc->GetAllFlyFmts(aFlyFrms, pUnoCrsr);//, bDraw); + rPaM.GetDoc()->GetAllFlyFmts(aFlyFrms, m_pImpl->GetCursor()); for(USHORT i = 0; i < aFlyFrms.Count(); i++) { SwPosFlyFrm* pPosFly = aFlyFrms[i]; - SwFrmFmt* pFrmFmt = (SwFrmFmt*)&pPosFly->GetFmt(); - //jetzt einen SwDepend anlegen und in das Array einfuegen - SwDepend* pNewDepend = new SwDepend(this, pFrmFmt); - m_Frames.push_back( ::boost::shared_ptr(pNewDepend) ); + SwFrmFmt *const pFrmFmt = + const_cast(&pPosFly->GetFmt()); + // create SwDepend for frame and insert into array + SwDepend *const pNewDepend = + new SwDepend(m_pImpl.get(), pFrmFmt); + m_pImpl->m_Frames.push_back( + ::boost::shared_ptr(pNewDepend) ); } //created from any text range - if(pUnoCrsr->HasMark()) + if (m_pImpl->GetCursor()->HasMark()) { - if(pUnoCrsr->Start() != pUnoCrsr->GetPoint()) - pUnoCrsr->Exchange(); + m_pImpl->GetCursor()->Normalize(); do { - lcl_FillFrame(*this, *pUnoCrsr, m_Frames); - pUnoCrsr->Right(1, CRSR_SKIP_CHARS, FALSE, FALSE); + lcl_FillFrame(*m_pImpl.get(), *m_pImpl->GetCursor(), + m_pImpl->m_Frames); + m_pImpl->GetCursor()->Right( + 1, CRSR_SKIP_CHARS, FALSE, FALSE); } - while(*pUnoCrsr->GetPoint() < *pUnoCrsr->GetMark()); + while (*m_pImpl->GetCursor()->GetPoint() < + *m_pImpl->GetCursor()->GetMark()); } } - lcl_FillFrame(*this, *pUnoCrsr, m_Frames); + lcl_FillFrame(*m_pImpl.get(), *m_pImpl->GetCursor(), m_pImpl->m_Frames); } } /*-- 23.03.99 13:22:30--------------------------------------------------- @@ -2519,89 +2553,92 @@ SwXParaFrameEnumeration::SwXParaFrameEnumeration(const SwPaM& rPaM, -----------------------------------------------------------------------*/ SwXParaFrameEnumeration::~SwXParaFrameEnumeration() { - vos::OGuard aGuard(Application::GetSolarMutex()); - - SwUnoCrsr* pUnoCrsr = GetCursor(); - delete pUnoCrsr; } /*-- 23.03.99 13:22:32--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXParaFrameEnumeration::hasMoreElements() -throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXParaFrameEnumeration::hasMoreElements() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if (!GetCursor()) + if (!m_pImpl->GetCursor()) throw uno::RuntimeException(); - return m_xNextObject.is() ? sal_True : - lcl_CreateNextObject(*GetCursor(), m_xNextObject, m_Frames); + return (m_pImpl->m_xNextObject.is()) + ? sal_True + : lcl_CreateNextObject(*m_pImpl->GetCursor(), + m_pImpl->m_xNextObject, m_pImpl->m_Frames); } /*-- 23.03.99 13:22:33--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXParaFrameEnumeration::nextElement() - throw( container::NoSuchElementException, - lang::WrappedTargetException, uno::RuntimeException ) +uno::Any SAL_CALL SwXParaFrameEnumeration::nextElement() +throw (container::NoSuchElementException, + lang::WrappedTargetException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if (!GetCursor()) + if (!m_pImpl->GetCursor()) + { throw uno::RuntimeException(); + } - if (!m_xNextObject.is() && m_Frames.size()) + if (!m_pImpl->m_xNextObject.is() && m_pImpl->m_Frames.size()) { - lcl_CreateNextObject(*GetCursor(), m_xNextObject, m_Frames); + lcl_CreateNextObject(*m_pImpl->GetCursor(), + m_pImpl->m_xNextObject, m_pImpl->m_Frames); } - if(!m_xNextObject.is()) + if (!m_pImpl->m_xNextObject.is()) + { throw container::NoSuchElementException(); - uno::Any aRet(&m_xNextObject, - ::getCppuType((uno::Reference*)0)); - m_xNextObject = 0; + } + uno::Any aRet; + aRet <<= m_pImpl->m_xNextObject; + m_pImpl->m_xNextObject = 0; return aRet; } -struct InvalidFrameDepend { - bool operator() (::boost::shared_ptr const & rEntry) - { return !rEntry->GetRegisteredIn(); } -}; +/* -----------------------------06.04.00 16:39-------------------------------- -/*-- 23.03.99 13:22:37--------------------------------------------------- + ---------------------------------------------------------------------------*/ +OUString SAL_CALL +SwXParaFrameEnumeration::getImplementationName() throw (uno::RuntimeException) +{ + return C2U("SwXParaFrameEnumeration"); +} - -----------------------------------------------------------------------*/ -void SwXParaFrameEnumeration::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew) +/* -----------------------------06.04.00 16:39-------------------------------- + + ---------------------------------------------------------------------------*/ +static char const*const g_ServicesParaFrameEnum[] = { - switch( pOld ? pOld->Which() : 0 ) - { - case RES_REMOVE_UNO_OBJECT: - case RES_OBJECTDYING: - if( (void*)GetRegisteredIn() == ((SwPtrMsgPoolItem *)pOld)->pObject ) - ((SwModify*)GetRegisteredIn())->Remove(this); - break; + "com.sun.star.util.ContentEnumeration", +}; +static const size_t g_nServicesParaFrameEnum( + sizeof(g_ServicesParaFrameEnum)/sizeof(g_ServicesParaFrameEnum[0])); - case RES_FMT_CHG: - // wurden wir an das neue umgehaengt und wird das alte geloscht? - if( ((SwFmtChg*)pNew)->pChangedFmt == GetRegisteredIn() && - ((SwFmtChg*)pOld)->pChangedFmt->IsFmtInDTOR() ) - ((SwModify*)GetRegisteredIn())->Remove(this); - break; - } - if(!GetRegisteredIn()) - { - m_Frames.clear(); - m_xNextObject = 0; - } - else - { - // check if any frame went away... - FrameDependList_t::iterator iter = - ::std::remove_if(m_Frames.begin(), m_Frames.end(), - InvalidFrameDepend()); - m_Frames.erase(iter, m_Frames.end()); - } +sal_Bool SAL_CALL +SwXParaFrameEnumeration::supportsService(const OUString& rServiceName) +throw (uno::RuntimeException) +{ + return ::sw::SupportsServiceImpl( + g_nServicesParaFrameEnum, g_ServicesParaFrameEnum, rServiceName); +} + +/* -----------------------------06.04.00 16:39-------------------------------- + + ---------------------------------------------------------------------------*/ +uno::Sequence< OUString > SAL_CALL +SwXParaFrameEnumeration::getSupportedServiceNames() +throw (uno::RuntimeException) +{ + return ::sw::GetSupportedServiceNamesImpl( + g_nServicesParaFrameEnum, g_ServicesParaFrameEnum); } + + // ----------------------------------------------------------------------------- IMPLEMENT_FORWARD_REFCOUNT( SwXTextCursor,SwXTextCursor_Base ) -- cgit v1.2.3 From fb1b1e04e03a82150516ad6bd08cc40cd68df13f Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:54 +0100 Subject: swunolocking1: #i105557#: SwXTextCursor: move implementation of all non-static methods into unoobj.cxx. --- sw/source/core/unocore/unoobj.cxx | 603 +++++++++++++++++++++++++++++++++++++ sw/source/core/unocore/unoobj2.cxx | 512 ------------------------------- 2 files changed, 603 insertions(+), 512 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index f923fcf1ae..5deb85dd2a 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -31,9 +31,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include #include #include +#include #include #include #include @@ -115,6 +117,7 @@ #define _SVSTDARR_USHORTSSORT #include #include +#include #include #include #include @@ -122,6 +125,8 @@ #include #include #include +#include +#include using namespace ::com::sun::star; @@ -708,6 +713,96 @@ SwFmtColl* SwXTextCursor::GetCurTxtFmtColl(SwPaM& rPaM, BOOL bConditional) * SwXTextCursor ******************************************************************/ +/*-- 09.12.98 14:19:00--------------------------------------------------- + + -----------------------------------------------------------------------*/ +IMPL_STATIC_LINK( SwXTextCursor, RemoveCursor_Impl, + uno::Reference< XInterface >*, EMPTYARG ) +{ + ASSERT( pThis != NULL, "no reference?" ); + //ASSERT( pArg != NULL, "no reference?" ); + + // --> FME 2006-03-07 #126177# Tell the SwXTextCursor that the user event + // has been executed. It is not necessary to remove the user event in + // ~SwXTextCursor + pThis->DoNotRemoveUserEvent(); + // <-- + + SwUnoCrsr* pCursor = pThis->GetCrsr(); + if( pCursor != NULL ) + { + pCursor->Remove( pThis ); + delete pCursor; + } + + // --> FME 2006-03-07 #126177# + //delete pArg; + // <-- + + return 0; +} + +void SwXTextCursor::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew) +{ + ClientModify(this, pOld, pNew); + + // if the cursor leaves its designated section, it becomes invalid + if( !mbRemoveUserEvent && ( pOld != NULL ) && ( pOld->Which() == RES_UNOCURSOR_LEAVES_SECTION ) ) + { + // --> FME 2006-03-07 #126177# We don't need to create a reference + // to the SwXTextCursor to prevent its deletion. If the destructor + // of the SwXTextCursor is called before the user event is executed, + // the user event will be removed. This is necessary, because an other + // thread might be currently waiting in ~SwXTextCursor. In this case + // the pRef = new ... stuff did not work! + + // create reference to this object to prevent deletion before + // the STATIC_LINK is executed. The link will delete the + // reference. + //uno::Reference* pRef = + //new uno::Reference( static_cast( this ) ); + + mbRemoveUserEvent = true; + // <-- + + mnUserEventId = Application::PostUserEvent( + STATIC_LINK( this, SwXTextCursor, RemoveCursor_Impl ), this ); + } + + if(!GetRegisteredIn()) + aLstnrCntnr.Disposing(); + +} + +/*-- 09.12.98 14:19:01--------------------------------------------------- + + -----------------------------------------------------------------------*/ +const SwPaM* SwXTextCursor::GetPaM() const +{ + return GetCrsr() ? GetCrsr() : 0; +} + +SwPaM* SwXTextCursor::GetPaM() +{ + return GetCrsr() ? GetCrsr() : 0; +} + +/*-- 09.12.98 14:19:02--------------------------------------------------- + + -----------------------------------------------------------------------*/ +const SwDoc* SwXTextCursor::GetDoc()const +{ + return GetCrsr() ? GetCrsr()->GetDoc() : 0; +} +/* -----------------22.07.99 13:52------------------- + + --------------------------------------------------*/ +SwDoc* SwXTextCursor::GetDoc() +{ + return GetCrsr() ? GetCrsr()->GetDoc() : 0; +} + + /*-- 09.12.98 14:19:19--------------------------------------------------- -----------------------------------------------------------------------*/ @@ -2447,3 +2542,511 @@ void SwXTextCursor::makeRedline( else throw uno::RuntimeException(); } + +/*-- 09.12.98 14:18:58--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void SAL_CALL SwXTextCursor::insertDocumentFromURL(const OUString& rURL, + const uno::Sequence< beans::PropertyValue >& rOptions) +throw (lang::IllegalArgumentException, io::IOException, + uno::RuntimeException) +{ + vos::OGuard aGuard(Application::GetSolarMutex()); + + SwUnoCrsr* pUnoCrsr = GetCrsr(); + if (!pUnoCrsr) + { + throw uno::RuntimeException(); + } + SwUnoCursorHelper::InsertFile(pUnoCrsr, rURL, rOptions); +} + +/* -----------------------------15.12.00 14:01-------------------------------- + + ---------------------------------------------------------------------------*/ +uno::Sequence< beans::PropertyValue > +SwXTextCursor::createSortDescriptor(sal_Bool bFromTable) +{ + uno::Sequence< beans::PropertyValue > aRet(5); + beans::PropertyValue* pArray = aRet.getArray(); + + uno::Any aVal; + aVal.setValue( &bFromTable, ::getCppuBooleanType()); + pArray[0] = beans::PropertyValue(C2U("IsSortInTable"), -1, aVal, + beans::PropertyState_DIRECT_VALUE); + + String sSpace(String::CreateFromAscii(" ")); + sal_Unicode uSpace = sSpace.GetChar(0); + + aVal <<= uSpace; + pArray[1] = beans::PropertyValue(C2U("Delimiter"), -1, aVal, + beans::PropertyState_DIRECT_VALUE); + + aVal <<= (sal_Bool) sal_False; + pArray[2] = beans::PropertyValue(C2U("IsSortColumns"), -1, aVal, + beans::PropertyState_DIRECT_VALUE); + + aVal <<= (sal_Int32) 3; + pArray[3] = beans::PropertyValue(C2U("MaxSortFieldsCount"), -1, aVal, + beans::PropertyState_DIRECT_VALUE); + + uno::Sequence< table::TableSortField > aFields(3); + table::TableSortField* pFields = aFields.getArray(); + + Locale aLang( SvxCreateLocale( LANGUAGE_SYSTEM ) ); + // get collator algorithm to be used for the locale + uno::Sequence< OUString > aSeq( + GetAppCollator().listCollatorAlgorithms( aLang ) ); + INT32 nLen = aSeq.getLength(); + DBG_ASSERT( nLen > 0, "list of collator algorithms is empty!"); + OUString aCollAlg; + if (nLen > 0) + aCollAlg = aSeq.getConstArray()[0]; + +#if OSL_DEBUG_LEVEL > 1 + const OUString *pTxt = aSeq.getConstArray(); + (void)pTxt; +#endif + + pFields[0].Field = 1; + pFields[0].IsAscending = sal_True; + pFields[0].IsCaseSensitive = sal_False; + pFields[0].FieldType = table::TableSortFieldType_ALPHANUMERIC; + pFields[0].CollatorLocale = aLang; + pFields[0].CollatorAlgorithm = aCollAlg; + + pFields[1].Field = 1; + pFields[1].IsAscending = sal_True; + pFields[1].IsCaseSensitive = sal_False; + pFields[1].FieldType = table::TableSortFieldType_ALPHANUMERIC; + pFields[1].CollatorLocale = aLang; + pFields[1].CollatorAlgorithm = aCollAlg; + + pFields[2].Field = 1; + pFields[2].IsAscending = sal_True; + pFields[2].IsCaseSensitive = sal_False; + pFields[2].FieldType = table::TableSortFieldType_ALPHANUMERIC; + pFields[2].CollatorLocale = aLang; + pFields[2].CollatorAlgorithm = aCollAlg; + + aVal <<= aFields; + pArray[4] = beans::PropertyValue(C2U("SortFields"), -1, aVal, + beans::PropertyState_DIRECT_VALUE); + + return aRet; +} + +/*-- 09.12.98 14:18:58--------------------------------------------------- + + -----------------------------------------------------------------------*/ +uno::Sequence< beans::PropertyValue > SAL_CALL +SwXTextCursor::createSortDescriptor() throw (uno::RuntimeException) +{ + vos::OGuard aGuard(Application::GetSolarMutex()); + return SwXTextCursor::createSortDescriptor(sal_False); +} + +/* -----------------------------15.12.00 14:06-------------------------------- + + ---------------------------------------------------------------------------*/ +sal_Bool SwXTextCursor::convertSortProperties( + const uno::Sequence< beans::PropertyValue >& rDescriptor, + SwSortOptions& rSortOpt) +{ + sal_Bool bRet = sal_True; + const beans::PropertyValue* pProperties = rDescriptor.getConstArray(); + + rSortOpt.bTable = sal_False; + rSortOpt.cDeli = ' '; + rSortOpt.eDirection = SRT_COLUMNS; //!! UI text may be contrary though !! + + SwSortKey* pKey1 = new SwSortKey; + pKey1->nColumnId = USHRT_MAX; + pKey1->bIsNumeric = TRUE; + pKey1->eSortOrder = SRT_ASCENDING; + + SwSortKey* pKey2 = new SwSortKey; + pKey2->nColumnId = USHRT_MAX; + pKey2->bIsNumeric = TRUE; + pKey2->eSortOrder = SRT_ASCENDING; + + SwSortKey* pKey3 = new SwSortKey; + pKey3->nColumnId = USHRT_MAX; + pKey3->bIsNumeric = TRUE; + pKey3->eSortOrder = SRT_ASCENDING; + SwSortKey* aKeys[3] = {pKey1, pKey2, pKey3}; + + sal_Bool bOldSortdescriptor(sal_False); + sal_Bool bNewSortdescriptor(sal_False); + + for (int n = 0; n < rDescriptor.getLength(); ++n) + { + uno::Any aValue( pProperties[n].Value ); +// String sPropName = pProperties[n].Name; + const OUString& rPropName = pProperties[n].Name; + + // old and new sortdescriptor + if (COMPARE_EQUAL == rPropName.compareToAscii("IsSortInTable")) + { + if (aValue.getValueType() == ::getBooleanCppuType()) + { + rSortOpt.bTable = *(sal_Bool*)aValue.getValue(); + } + else + { + bRet = sal_False; + } + } + else if (COMPARE_EQUAL == rPropName.compareToAscii("Delimiter")) + { + sal_Unicode uChar = sal_Unicode(); + if (aValue >>= uChar) + { + rSortOpt.cDeli = uChar; + } + else + { + bRet = sal_False; + } + } + // old sortdescriptor + else if (COMPARE_EQUAL == rPropName.compareToAscii("SortColumns")) + { + bOldSortdescriptor = sal_True; + if (aValue.getValueType() == ::getBooleanCppuType()) + { + sal_Bool bTemp = *(sal_Bool*)aValue.getValue(); + rSortOpt.eDirection = bTemp ? SRT_COLUMNS : SRT_ROWS; + } + else + { + bRet = sal_False; + } + } + else if (COMPARE_EQUAL == rPropName.compareToAscii("IsCaseSensitive")) + { + bOldSortdescriptor = sal_True; + if (aValue.getValueType() == ::getBooleanCppuType()) + { + sal_Bool bTemp = *(sal_Bool*)aValue.getValue(); + rSortOpt.bIgnoreCase = !bTemp; + } + else + { + bRet = sal_False; + } + } + else if (COMPARE_EQUAL == rPropName.compareToAscii("CollatorLocale")) + { + bOldSortdescriptor = sal_True; + Locale aLocale; + if (aValue >>= aLocale) + { + rSortOpt.nLanguage = SvxLocaleToLanguage( aLocale ); + } + else + { + bRet = sal_False; + } + } + else if (COMPARE_EQUAL == rPropName.compareToAscii("CollatorAlgorithm", + 17) && + rPropName.getLength() == 18 && + (rPropName.getStr()[17] >= '0' && rPropName.getStr()[17] <= '9')) + { + bOldSortdescriptor = sal_True; + sal_uInt16 nIndex = rPropName.getStr()[17]; + nIndex -= '0'; + OUString aTxt; + if ((aValue >>= aTxt) && nIndex < 3) + { + aKeys[nIndex]->sSortType = aTxt; + } + else + { + bRet = sal_False; + } + } + else if (COMPARE_EQUAL == rPropName.compareToAscii("SortRowOrColumnNo", + 17) && + rPropName.getLength() == 18 && + (rPropName.getStr()[17] >= '0' && rPropName.getStr()[17] <= '9')) + { + bOldSortdescriptor = sal_True; + sal_uInt16 nIndex = rPropName.getStr()[17]; + nIndex -= '0'; + sal_Int16 nCol = -1; + if (aValue.getValueType() == ::getCppuType((const sal_Int16*)0) + && nIndex < 3) + { + aValue >>= nCol; + } + if (nCol >= 0) + { + aKeys[nIndex]->nColumnId = nCol; + } + else + { + bRet = sal_False; + } + } + else if (0 == rPropName.indexOf(C2U("IsSortNumeric")) && + rPropName.getLength() == 14 && + (rPropName.getStr()[13] >= '0' && rPropName.getStr()[13] <= '9')) + { + bOldSortdescriptor = sal_True; + sal_uInt16 nIndex = rPropName.getStr()[13]; + nIndex = nIndex - '0'; + if (aValue.getValueType() == ::getBooleanCppuType() && nIndex < 3) + { + sal_Bool bTemp = *(sal_Bool*)aValue.getValue(); + aKeys[nIndex]->bIsNumeric = bTemp; + } + else + { + bRet = sal_False; + } + } + else if (0 == rPropName.indexOf(C2U("IsSortAscending")) && + rPropName.getLength() == 16 && + (rPropName.getStr()[15] >= '0' && rPropName.getStr()[15] <= '9')) + { + bOldSortdescriptor = sal_True; + sal_uInt16 nIndex = rPropName.getStr()[15]; + nIndex -= '0'; + if (aValue.getValueType() == ::getBooleanCppuType() && nIndex < 3) + { + sal_Bool bTemp = *(sal_Bool*)aValue.getValue(); + aKeys[nIndex]->eSortOrder = (bTemp) + ? SRT_ASCENDING : SRT_DESCENDING; + } + else + { + bRet = sal_False; + } + } + // new sortdescriptor + else if (COMPARE_EQUAL == rPropName.compareToAscii("IsSortColumns")) + { + bNewSortdescriptor = sal_True; + if (aValue.getValueType() == ::getBooleanCppuType()) + { + sal_Bool bTemp = *(sal_Bool*)aValue.getValue(); + rSortOpt.eDirection = bTemp ? SRT_COLUMNS : SRT_ROWS; + } + else + { + bRet = sal_False; + } + } + else if (COMPARE_EQUAL == rPropName.compareToAscii("SortFields")) + { + bNewSortdescriptor = sal_True; + uno::Sequence < table::TableSortField > aFields; + if (aValue >>= aFields) + { + sal_Int32 nCount(aFields.getLength()); + if (nCount <= 3) + { + table::TableSortField* pFields = aFields.getArray(); + for (sal_Int32 i = 0; i < nCount; ++i) + { + rSortOpt.bIgnoreCase = !pFields[i].IsCaseSensitive; + rSortOpt.nLanguage = + SvxLocaleToLanguage( pFields[i].CollatorLocale ); + aKeys[i]->sSortType = pFields[i].CollatorAlgorithm; + aKeys[i]->nColumnId = + static_cast(pFields[i].Field); + aKeys[i]->bIsNumeric = (pFields[i].FieldType == + table::TableSortFieldType_NUMERIC); + aKeys[i]->eSortOrder = (pFields[i].IsAscending) + ? SRT_ASCENDING : SRT_DESCENDING; + } + } + else + { + bRet = sal_False; + } + } + else + { + bRet = sal_False; + } + } + } + + if (bNewSortdescriptor && bOldSortdescriptor) + { + DBG_ERROR("someone tried to set the old deprecated and " + "the new sortdescriptor"); + bRet = sal_False; + } + + if (pKey1->nColumnId != USHRT_MAX) + { + rSortOpt.aKeys.C40_INSERT(SwSortKey, pKey1, rSortOpt.aKeys.Count()); + } + if (pKey2->nColumnId != USHRT_MAX) + { + rSortOpt.aKeys.C40_INSERT(SwSortKey, pKey2, rSortOpt.aKeys.Count()); + } + if (pKey3->nColumnId != USHRT_MAX) + { + rSortOpt.aKeys.C40_INSERT(SwSortKey, pKey3, rSortOpt.aKeys.Count()); + } + + return bRet && rSortOpt.aKeys.Count() > 0; +} + +/*-- 09.12.98 14:19:00--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void SAL_CALL +SwXTextCursor::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor) +throw (uno::RuntimeException) +{ + vos::OGuard aGuard(Application::GetSolarMutex()); + + SwSortOptions aSortOpt; + SwUnoCrsr* pUnoCrsr = GetCrsr(); + + if (!pUnoCrsr) + { + throw uno::RuntimeException(); + } + + if (pUnoCrsr->HasMark()) + { + if (!SwXTextCursor::convertSortProperties(rDescriptor, aSortOpt)) + { + throw uno::RuntimeException(); + } + UnoActionContext aContext( pUnoCrsr->GetDoc() ); + + SwPosition* pStart = pUnoCrsr->Start(); + SwPosition* pEnd = pUnoCrsr->End(); + + SwNodeIndex aPrevIdx( pStart->nNode, -1 ); + ULONG nOffset = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex(); + xub_StrLen nCntStt = pStart->nContent.GetIndex(); + + pUnoCrsr->GetDoc()->SortText(*pUnoCrsr, aSortOpt); + + // Selektion wieder setzen + pUnoCrsr->DeleteMark(); + pUnoCrsr->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 ); + SwCntntNode* pCNd = pUnoCrsr->GetCntntNode(); + xub_StrLen nLen = pCNd->Len(); + if (nLen > nCntStt) + { + nLen = nCntStt; + } + pUnoCrsr->GetPoint()->nContent.Assign(pCNd, nLen ); + pUnoCrsr->SetMark(); + + pUnoCrsr->GetPoint()->nNode += nOffset; + pCNd = pUnoCrsr->GetCntntNode(); + pUnoCrsr->GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); + } +} + +/* -----------------------------03.04.00 09:11-------------------------------- + + ---------------------------------------------------------------------------*/ +uno::Reference< container::XEnumeration > SAL_CALL +SwXTextCursor::createContentEnumeration(const OUString& rServiceName) +throw (uno::RuntimeException) +{ + SwUnoCrsr* pUnoCrsr = GetCrsr(); + if (!pUnoCrsr || + 0 != rServiceName.compareToAscii("com.sun.star.text.TextContent")) + { + throw uno::RuntimeException(); + } + + uno::Reference< container::XEnumeration > xRet = + new SwXParaFrameEnumeration(*pUnoCrsr, PARAFRAME_PORTION_TEXTRANGE); + return xRet; +} + +/* -----------------------------07.03.01 14:53-------------------------------- + + ---------------------------------------------------------------------------*/ +uno::Reference< container::XEnumeration > SAL_CALL +SwXTextCursor::createEnumeration() throw (uno::RuntimeException) +{ + SwUnoCrsr* pUnoCrsr = GetCrsr(); + if (!pUnoCrsr) + { + throw uno::RuntimeException(); + } + uno::Reference xTunnel(xParentText, UNO_QUERY); + SwXText* pParentText = 0; + if (xTunnel.is()) + { + pParentText = reinterpret_cast< SwXText *>( + sal::static_int_cast< sal_IntPtr >( + xTunnel->getSomething(SwXText::getUnoTunnelId()) )); + } + DBG_ASSERT(pParentText, "parent is not a SwXText"); + if (!pParentText) + { + throw uno::RuntimeException(); + } + + ::std::auto_ptr pNewCrsr( + pUnoCrsr->GetDoc()->CreateUnoCrsr(*pUnoCrsr->GetPoint()) ); + if (pUnoCrsr->HasMark()) + { + pNewCrsr->SetMark(); + *pNewCrsr->GetMark() = *pUnoCrsr->GetMark(); + } + const CursorType eSetType = (CURSOR_TBLTEXT == eType) + ? CURSOR_SELECTION_IN_TABLE : CURSOR_SELECTION; + const uno::Reference< XEnumeration > xRet = + new SwXParagraphEnumeration(pParentText, pNewCrsr, eSetType); + + return xRet; +} + +/* -----------------------------07.03.01 15:43-------------------------------- + + ---------------------------------------------------------------------------*/ +uno::Type SAL_CALL +SwXTextCursor::getElementType() throw (uno::RuntimeException) +{ + return ::getCppuType((uno::Reference*)0); +} + +/* -----------------------------07.03.01 15:43-------------------------------- + + ---------------------------------------------------------------------------*/ +sal_Bool SAL_CALL SwXTextCursor::hasElements() throw (uno::RuntimeException) +{ + return sal_True; +} + +/* -----------------------------03.04.00 09:11-------------------------------- + + ---------------------------------------------------------------------------*/ +uno::Sequence< OUString > SAL_CALL +SwXTextCursor::getAvailableServiceNames() throw (uno::RuntimeException) +{ + uno::Sequence< OUString > aRet(1); + OUString* pArray = aRet.getArray(); + pArray[0] = OUString::createFromAscii("com.sun.star.text.TextContent"); + return aRet; +} + +// --------------------------------------------------------------------------- +IMPLEMENT_FORWARD_REFCOUNT( SwXTextCursor,SwXTextCursor_Base ) + +uno::Any SAL_CALL +SwXTextCursor::queryInterface(const uno::Type& rType) +throw (uno::RuntimeException) +{ + return (rType == lang::XUnoTunnel::static_type()) + ? OTextCursorHelper::queryInterface(rType) + : SwXTextCursor_Base::queryInterface(rType); +} + diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 0e7f33b456..1bdd873ff9 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -94,7 +94,6 @@ #include #include #include -#include #include #include #include @@ -106,8 +105,6 @@ #include #include #include -#include -#include #include #include #include @@ -336,342 +333,6 @@ UnoActionRemoveContext::~UnoActionRemoveContext() } -/*-- 09.12.98 14:18:58--------------------------------------------------- - - -----------------------------------------------------------------------*/ -void SwXTextCursor::insertDocumentFromURL(const OUString& rURL, - const uno::Sequence< beans::PropertyValue >& rOptions) - throw( lang::IllegalArgumentException, io::IOException, uno::RuntimeException ) -{ - vos::OGuard aGuard(Application::GetSolarMutex()); - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) - { - SwUnoCursorHelper::InsertFile(pUnoCrsr, rURL, rOptions); - } - else - throw uno::RuntimeException(); -} -/* -----------------------------15.12.00 14:01-------------------------------- - - ---------------------------------------------------------------------------*/ -uno::Sequence< beans::PropertyValue > SwXTextCursor::createSortDescriptor(sal_Bool bFromTable) -{ - uno::Sequence< beans::PropertyValue > aRet(5); - beans::PropertyValue* pArray = aRet.getArray(); - - uno::Any aVal; - aVal.setValue( &bFromTable, ::getCppuBooleanType()); - pArray[0] = beans::PropertyValue(C2U("IsSortInTable"), -1, aVal, beans::PropertyState_DIRECT_VALUE); - - String sSpace(String::CreateFromAscii(" ")); - sal_Unicode uSpace = sSpace.GetChar(0); - - aVal <<= uSpace; - pArray[1] = beans::PropertyValue(C2U("Delimiter"), -1, aVal, beans::PropertyState_DIRECT_VALUE); - - aVal <<= (sal_Bool) sal_False; - pArray[2] = beans::PropertyValue(C2U("IsSortColumns"), -1, aVal, beans::PropertyState_DIRECT_VALUE); - - aVal <<= (sal_Int32) 3; - pArray[3] = beans::PropertyValue(C2U("MaxSortFieldsCount"), -1, aVal, beans::PropertyState_DIRECT_VALUE); - - uno::Sequence< table::TableSortField > aFields(3); - table::TableSortField* pFields = aFields.getArray(); - - Locale aLang( SvxCreateLocale( LANGUAGE_SYSTEM ) ); - // get collator algorithm to be used for the locale - Sequence < OUString > aSeq( GetAppCollator().listCollatorAlgorithms( aLang ) ); - INT32 nLen = aSeq.getLength(); - DBG_ASSERT( nLen > 0, "list of collator algorithms is empty!"); - OUString aCollAlg; - if (nLen > 0) - aCollAlg = aSeq.getConstArray()[0]; - -#if OSL_DEBUG_LEVEL > 1 - const OUString *pTxt = aSeq.getConstArray(); - (void)pTxt; -#endif - - pFields[0].Field = 1; - pFields[0].IsAscending = sal_True; - pFields[0].IsCaseSensitive = sal_False; - pFields[0].FieldType = table::TableSortFieldType_ALPHANUMERIC; - pFields[0].CollatorLocale = aLang; - pFields[0].CollatorAlgorithm = aCollAlg; - - pFields[1].Field = 1; - pFields[1].IsAscending = sal_True; - pFields[1].IsCaseSensitive = sal_False; - pFields[1].FieldType = table::TableSortFieldType_ALPHANUMERIC; - pFields[1].CollatorLocale = aLang; - pFields[1].CollatorAlgorithm = aCollAlg; - - pFields[2].Field = 1; - pFields[2].IsAscending = sal_True; - pFields[2].IsCaseSensitive = sal_False; - pFields[2].FieldType = table::TableSortFieldType_ALPHANUMERIC; - pFields[2].CollatorLocale = aLang; - pFields[2].CollatorAlgorithm = aCollAlg; - - aVal <<= aFields; - pArray[4] = beans::PropertyValue(C2U("SortFields"), -1, aVal, beans::PropertyState_DIRECT_VALUE); - - return aRet; -} - -/*-- 09.12.98 14:18:58--------------------------------------------------- - - -----------------------------------------------------------------------*/ -uno::Sequence< beans::PropertyValue > SwXTextCursor::createSortDescriptor(void) throw( uno::RuntimeException ) -{ - vos::OGuard aGuard(Application::GetSolarMutex()); - return SwXTextCursor::createSortDescriptor(sal_False); -} -/* -----------------------------15.12.00 14:06-------------------------------- - - ---------------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::convertSortProperties( - const uno::Sequence< beans::PropertyValue >& rDescriptor, SwSortOptions& rSortOpt) -{ - sal_Bool bRet = sal_True; - const beans::PropertyValue* pProperties = rDescriptor.getConstArray(); - - rSortOpt.bTable = sal_False; - rSortOpt.cDeli = ' '; - rSortOpt.eDirection = SRT_COLUMNS; //!! UI text may be contrary though !! - - SwSortKey* pKey1 = new SwSortKey; - pKey1->nColumnId = USHRT_MAX; - pKey1->bIsNumeric = TRUE; - pKey1->eSortOrder = SRT_ASCENDING; - - SwSortKey* pKey2 = new SwSortKey; - pKey2->nColumnId = USHRT_MAX; - pKey2->bIsNumeric = TRUE; - pKey2->eSortOrder = SRT_ASCENDING; - - SwSortKey* pKey3 = new SwSortKey; - pKey3->nColumnId = USHRT_MAX; - pKey3->bIsNumeric = TRUE; - pKey3->eSortOrder = SRT_ASCENDING; - SwSortKey* aKeys[3] = {pKey1, pKey2, pKey3}; - - sal_Bool bOldSortdescriptor(sal_False); - sal_Bool bNewSortdescriptor(sal_False); - - for( int n = 0; n < rDescriptor.getLength(); ++n ) - { - uno::Any aValue( pProperties[n].Value ); -// String sPropName = pProperties[n].Name; - const OUString& rPropName = pProperties[n].Name; - - // old and new sortdescriptor - if( COMPARE_EQUAL == rPropName.compareToAscii("IsSortInTable")) - { - if ( aValue.getValueType() == ::getBooleanCppuType() ) - rSortOpt.bTable = *(sal_Bool*)aValue.getValue(); - else - bRet = sal_False; - } - else if(COMPARE_EQUAL == rPropName.compareToAscii("Delimiter")) - { - sal_Unicode uChar = sal_Unicode(); - if( aValue >>= uChar ) - rSortOpt.cDeli = uChar; - else - bRet = sal_False; - } - // old sortdescriptor - else if(COMPARE_EQUAL == rPropName.compareToAscii("SortColumns")) - { - bOldSortdescriptor = sal_True; - if ( aValue.getValueType() == ::getBooleanCppuType() ) - { - sal_Bool bTemp = *(sal_Bool*)aValue.getValue(); - rSortOpt.eDirection = bTemp ? SRT_COLUMNS : SRT_ROWS; - } - else - bRet = sal_False; - } - else if(COMPARE_EQUAL == rPropName.compareToAscii("IsCaseSensitive")) - { - bOldSortdescriptor = sal_True; - if ( aValue.getValueType() == ::getBooleanCppuType() ) - { - sal_Bool bTemp = *(sal_Bool*)aValue.getValue(); - rSortOpt.bIgnoreCase = !bTemp; - } - else - bRet = sal_False; - } - else if(COMPARE_EQUAL == rPropName.compareToAscii("CollatorLocale")) - { - bOldSortdescriptor = sal_True; - Locale aLocale; - if (aValue >>= aLocale) - rSortOpt.nLanguage = SvxLocaleToLanguage( aLocale ); - else - bRet = sal_False; - } - else if(COMPARE_EQUAL == rPropName.compareToAscii("CollatorAlgorithm", 17) && - rPropName.getLength() == 18 && - (rPropName.getStr()[17] >= '0' && rPropName.getStr()[17] <= '9')) - { - bOldSortdescriptor = sal_True; - sal_uInt16 nIndex = rPropName.getStr()[17]; - nIndex -= '0'; - OUString aTxt; - if ((aValue >>= aTxt) && nIndex < 3) - aKeys[nIndex]->sSortType = aTxt; - else - bRet = sal_False; - } - else if(COMPARE_EQUAL == rPropName.compareToAscii("SortRowOrColumnNo", 17) && - rPropName.getLength() == 18 && - (rPropName.getStr()[17] >= '0' && rPropName.getStr()[17] <= '9')) - { - bOldSortdescriptor = sal_True; - sal_uInt16 nIndex = rPropName.getStr()[17]; - nIndex -= '0'; - sal_Int16 nCol = -1; - if( aValue.getValueType() == ::getCppuType((const sal_Int16*)0) && nIndex < 3) - aValue >>= nCol; - if( nCol >= 0 ) - aKeys[nIndex]->nColumnId = nCol; - else - bRet = sal_False; - } - else if(0 == rPropName.indexOf(C2U("IsSortNumeric")) && - rPropName.getLength() == 14 && - (rPropName.getStr()[13] >= '0' && rPropName.getStr()[13] <= '9')) - { - bOldSortdescriptor = sal_True; - sal_uInt16 nIndex = rPropName.getStr()[13]; - nIndex = nIndex - '0'; - if ( aValue.getValueType() == ::getBooleanCppuType() && nIndex < 3 ) - { - sal_Bool bTemp = *(sal_Bool*)aValue.getValue(); - aKeys[nIndex]->bIsNumeric = bTemp; - } - else - bRet = sal_False; - } - else if(0 == rPropName.indexOf(C2U("IsSortAscending")) && - rPropName.getLength() == 16 && - (rPropName.getStr()[15] >= '0' && rPropName.getStr()[15] <= '9')) - { - bOldSortdescriptor = sal_True; - sal_uInt16 nIndex = rPropName.getStr()[15]; - nIndex -= '0'; - if ( aValue.getValueType() == ::getBooleanCppuType() && nIndex < 3 ) - { - sal_Bool bTemp = *(sal_Bool*)aValue.getValue(); - aKeys[nIndex]->eSortOrder = bTemp ? SRT_ASCENDING : SRT_DESCENDING; - } - else - bRet = sal_False; - } - // new sortdescriptor - else if(COMPARE_EQUAL == rPropName.compareToAscii("IsSortColumns")) - { - bNewSortdescriptor = sal_True; - if ( aValue.getValueType() == ::getBooleanCppuType() ) - { - sal_Bool bTemp = *(sal_Bool*)aValue.getValue(); - rSortOpt.eDirection = bTemp ? SRT_COLUMNS : SRT_ROWS; - } - else - bRet = sal_False; - } - else if (COMPARE_EQUAL == rPropName.compareToAscii("SortFields")) - { - bNewSortdescriptor = sal_True; - uno::Sequence < table::TableSortField > aFields; - if ( aValue >>= aFields ) - { - sal_Int32 nCount(aFields.getLength()); - if (nCount <= 3) - { - table::TableSortField* pFields = aFields.getArray(); - for (sal_Int32 i = 0; i < nCount; ++i) - { - rSortOpt.bIgnoreCase = !pFields[i].IsCaseSensitive; - rSortOpt.nLanguage = SvxLocaleToLanguage( pFields[i].CollatorLocale ); - aKeys[i]->sSortType = pFields[i].CollatorAlgorithm; - aKeys[i]->nColumnId = static_cast< USHORT >(pFields[i].Field); - aKeys[i]->bIsNumeric = (pFields[i].FieldType == table::TableSortFieldType_NUMERIC); - aKeys[i]->eSortOrder = pFields[i].IsAscending ? SRT_ASCENDING : SRT_DESCENDING; - } - } - else - bRet = sal_False; - } - else - bRet = sal_False; - } - } - - if (bNewSortdescriptor && bOldSortdescriptor) - { - DBG_ERROR("someone tried to set the old deprecated and the new sortdescriptor"); - bRet = sal_False; - } - - if(pKey1->nColumnId != USHRT_MAX) - rSortOpt.aKeys.C40_INSERT(SwSortKey, pKey1, rSortOpt.aKeys.Count()); - if(pKey2->nColumnId != USHRT_MAX) - rSortOpt.aKeys.C40_INSERT(SwSortKey, pKey2, rSortOpt.aKeys.Count()); - if(pKey3->nColumnId != USHRT_MAX) - rSortOpt.aKeys.C40_INSERT(SwSortKey, pKey3, rSortOpt.aKeys.Count()); - - return bRet && rSortOpt.aKeys.Count() > 0; -} -/*-- 09.12.98 14:19:00--------------------------------------------------- - - -----------------------------------------------------------------------*/ -void SwXTextCursor::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor) - throw( uno::RuntimeException ) -{ - vos::OGuard aGuard(Application::GetSolarMutex()); - SwSortOptions aSortOpt; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - - if(pUnoCrsr) - { - if(pUnoCrsr->HasMark()) - { - if(!SwXTextCursor::convertSortProperties(rDescriptor, aSortOpt)) - throw uno::RuntimeException(); - UnoActionContext aContext( pUnoCrsr->GetDoc() ); - - SwPosition* pStart = pUnoCrsr->Start(); - SwPosition* pEnd = pUnoCrsr->End(); - - SwNodeIndex aPrevIdx( pStart->nNode, -1 ); - ULONG nOffset = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex(); - xub_StrLen nCntStt = pStart->nContent.GetIndex(); - - pUnoCrsr->GetDoc()->SortText(*pUnoCrsr, aSortOpt); - - // Selektion wieder setzen - pUnoCrsr->DeleteMark(); - pUnoCrsr->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 ); - SwCntntNode* pCNd = pUnoCrsr->GetCntntNode(); - xub_StrLen nLen = pCNd->Len(); - if( nLen > nCntStt ) - nLen = nCntStt; - pUnoCrsr->GetPoint()->nContent.Assign(pCNd, nLen ); - pUnoCrsr->SetMark(); - - pUnoCrsr->GetPoint()->nNode += nOffset; - pCNd = pUnoCrsr->GetCntntNode(); - pUnoCrsr->GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); - } - } - else - throw uno::RuntimeException(); -} /*-- 10.12.98 11:52:15--------------------------------------------------- -----------------------------------------------------------------------*/ @@ -694,166 +355,6 @@ void ClientModify(SwClient* pClient, SfxPoolItem *pOld, SfxPoolItem *pNew) } } -/* -----------------------------03.04.00 09:11-------------------------------- - - ---------------------------------------------------------------------------*/ -uno::Reference< XEnumeration > SAL_CALL SwXTextCursor::createContentEnumeration(const OUString& rServiceName) throw( RuntimeException ) -{ - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if( !pUnoCrsr || 0 != rServiceName.compareToAscii("com.sun.star.text.TextContent") ) - throw RuntimeException(); - - uno::Reference< XEnumeration > xRet = new SwXParaFrameEnumeration(*pUnoCrsr, PARAFRAME_PORTION_TEXTRANGE); - return xRet; -} -/* -----------------------------07.03.01 14:53-------------------------------- - - ---------------------------------------------------------------------------*/ -uno::Reference< XEnumeration > SwXTextCursor::createEnumeration(void) throw( RuntimeException ) -{ - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if( !pUnoCrsr ) - throw RuntimeException(); - uno::Reference xTunnel(xParentText, UNO_QUERY); - SwXText* pParentText = 0; - if(xTunnel.is()) - { - pParentText = reinterpret_cast< SwXText *>( - sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething(SwXText::getUnoTunnelId()) )); - } - DBG_ASSERT(pParentText, "parent is not a SwXText"); - if (!pParentText) - { - throw uno::RuntimeException(); - } - - ::std::auto_ptr pNewCrsr( - pUnoCrsr->GetDoc()->CreateUnoCrsr(*pUnoCrsr->GetPoint()) ); - if(pUnoCrsr->HasMark()) - { - pNewCrsr->SetMark(); - *pNewCrsr->GetMark() = *pUnoCrsr->GetMark(); - } - const CursorType eSetType = (CURSOR_TBLTEXT == eType) - ? CURSOR_SELECTION_IN_TABLE : CURSOR_SELECTION; - const uno::Reference< XEnumeration > xRet = - new SwXParagraphEnumeration(pParentText, pNewCrsr, eSetType); - - return xRet; -} -/* -----------------------------07.03.01 15:43-------------------------------- - - ---------------------------------------------------------------------------*/ -uno::Type SwXTextCursor::getElementType(void) throw( RuntimeException ) -{ - return ::getCppuType((uno::Reference*)0); -} -/* -----------------------------07.03.01 15:43-------------------------------- - - ---------------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::hasElements(void) throw( RuntimeException ) -{ - return sal_True; -} -/* -----------------------------03.04.00 09:11-------------------------------- - - ---------------------------------------------------------------------------*/ -Sequence< OUString > SAL_CALL SwXTextCursor::getAvailableServiceNames(void) throw( RuntimeException ) -{ - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = OUString::createFromAscii("com.sun.star.text.TextContent"); - return aRet; -} -/*-- 09.12.98 14:19:00--------------------------------------------------- - - -----------------------------------------------------------------------*/ - -IMPL_STATIC_LINK( SwXTextCursor, RemoveCursor_Impl, - uno::Reference< XInterface >*, EMPTYARG ) -{ - ASSERT( pThis != NULL, "no reference?" ); - //ASSERT( pArg != NULL, "no reference?" ); - - // --> FME 2006-03-07 #126177# Tell the SwXTextCursor that the user event - // has been executed. It is not necessary to remove the user event in - // ~SwXTextCursor - pThis->DoNotRemoveUserEvent(); - // <-- - - SwUnoCrsr* pCursor = pThis->GetCrsr(); - if( pCursor != NULL ) - { - pCursor->Remove( pThis ); - delete pCursor; - } - - // --> FME 2006-03-07 #126177# - //delete pArg; - // <-- - - return 0; -} - -void SwXTextCursor::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew) -{ - ClientModify(this, pOld, pNew); - - // if the cursor leaves its designated section, it becomes invalid - if( !mbRemoveUserEvent && ( pOld != NULL ) && ( pOld->Which() == RES_UNOCURSOR_LEAVES_SECTION ) ) - { - // --> FME 2006-03-07 #126177# We don't need to create a reference - // to the SwXTextCursor to prevent its deletion. If the destructor - // of the SwXTextCursor is called before the user event is executed, - // the user event will be removed. This is necessary, because an other - // thread might be currently waiting in ~SwXTextCursor. In this case - // the pRef = new ... stuff did not work! - - // create reference to this object to prevent deletion before - // the STATIC_LINK is executed. The link will delete the - // reference. - //uno::Reference* pRef = - //new uno::Reference( static_cast( this ) ); - - mbRemoveUserEvent = true; - // <-- - - mnUserEventId = Application::PostUserEvent( - STATIC_LINK( this, SwXTextCursor, RemoveCursor_Impl ), this ); - } - - if(!GetRegisteredIn()) - aLstnrCntnr.Disposing(); - -} -/*-- 09.12.98 14:19:01--------------------------------------------------- - - -----------------------------------------------------------------------*/ -const SwPaM* SwXTextCursor::GetPaM() const -{ - return GetCrsr() ? GetCrsr() : 0; -} -// ----------------------------------------------------------------------------- -SwPaM* SwXTextCursor::GetPaM() -{ - return GetCrsr() ? GetCrsr() : 0; -} - -/*-- 09.12.98 14:19:02--------------------------------------------------- - - -----------------------------------------------------------------------*/ -const SwDoc* SwXTextCursor::GetDoc()const -{ - return GetCrsr() ? GetCrsr()->GetDoc() : 0; -} -/* -----------------22.07.99 13:52------------------- - - --------------------------------------------------*/ -SwDoc* SwXTextCursor::GetDoc() -{ - return GetCrsr() ? GetCrsr()->GetDoc() : 0; -} - /*-- 09.12.98 14:19:03--------------------------------------------------- @@ -2638,16 +2139,3 @@ throw (uno::RuntimeException) g_nServicesParaFrameEnum, g_ServicesParaFrameEnum); } - -// ----------------------------------------------------------------------------- -IMPLEMENT_FORWARD_REFCOUNT( SwXTextCursor,SwXTextCursor_Base ) - -uno::Any SAL_CALL SwXTextCursor::queryInterface( const uno::Type& _rType ) throw (uno::RuntimeException) -{ - if( _rType == ::getCppuType( (uno::Reference*)0) ) - return OTextCursorHelper::queryInterface( _rType ); - else - return SwXTextCursor_Base::queryInterface( _rType ); -} - - -- cgit v1.2.3 From 893a5245bdc4b5b8288a6b7bcec826a1cd0bd565 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:54 +0100 Subject: swunolocking1: #i105557#: SwXTextCursor: move enum SwGetPropertyStatesCaller to unocrsrhelper.hxx. move static methods of SwXTextCursor to namespace SwUnoCursorHelper. move various not-actually-local functions with declarations in multiple cxx files to namespace SwUnoCursorHelper. clean up the implementation a little. --- sw/inc/unocrsrhelper.hxx | 113 +++- sw/inc/unotextcursor.hxx | 84 --- sw/source/core/access/accpara.cxx | 4 +- sw/source/core/edit/editsh.cxx | 4 +- sw/source/core/unocore/SwXTextDefaults.cxx | 11 +- sw/source/core/unocore/unocrsrhelper.cxx | 12 +- sw/source/core/unocore/unoobj.cxx | 991 +++++++++++++++++------------ sw/source/core/unocore/unoobj2.cxx | 168 +++-- sw/source/core/unocore/unoparagraph.cxx | 17 +- sw/source/core/unocore/unoport.cxx | 23 +- sw/source/core/unocore/unoportenum.cxx | 4 +- sw/source/core/unocore/unosect.cxx | 2 +- sw/source/core/unocore/unotbl.cxx | 59 +- sw/source/core/unocore/unotext.cxx | 22 +- sw/source/ui/uno/unotxvw.cxx | 31 +- 15 files changed, 863 insertions(+), 682 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx index 27a511d969..2a25fb24ac 100644 --- a/sw/inc/unocrsrhelper.hxx +++ b/sw/inc/unocrsrhelper.hxx @@ -30,12 +30,25 @@ #ifndef _UNOCRSRHELPER_HXX #define _UNOCRSRHELPER_HXX -#include -#include #include +#include +#include + +#include +#include + + +class String; +class SfxItemSet; +class SfxItemPropertySet; struct SfxItemPropertySimpleEntry; +class SwTxtNode; class SwPaM; +class SwCursor; +class SwUnoCrsr; +class SwFmtColl; +struct SwSortOptions; class SwDoc; namespace com{ namespace sun{ namespace star{ @@ -46,7 +59,18 @@ namespace com{ namespace sun{ namespace star{ struct PropertyValue; } }}} - + +/* -----------------03.12.98 12:16------------------- + * + * --------------------------------------------------*/ +enum SwGetPropertyStatesCaller +{ + SW_PROPERTY_STATE_CALLER_DEFAULT, + SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION, + SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY, + SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT +}; + /* -----------------------------14.12.00 15:06-------------------------------- ---------------------------------------------------------------------------*/ @@ -62,6 +86,7 @@ namespace SwUnoCursorHelper void SetValue( USHORT nWhichId, USHORT nMemberId, const com::sun::star::uno::Any& rAny ); bool FillValue( USHORT nWhichId, USHORT nMemberId, const com::sun::star::uno::Any*& pAny ); }; + sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry , SwPaM& rPam , com::sun::star::uno::Any *pAny @@ -102,6 +127,88 @@ namespace SwUnoCursorHelper const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& RedlineProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + + /// @param bTableMode: attributes should be applied to a table selection + void SetCrsrAttr(SwPaM & rPam, const SfxItemSet & rSet, + const SetAttrMode nAttrMode, + const bool bTableMode = false); + void GetCrsrAttr(SwPaM & rPam, SfxItemSet & rSet, + const bool bOnlyTxtAttr = false, + const bool bGetFromChrFmt = true); + void GetTextFromPam(SwPaM & rPam, ::rtl::OUString & rBuffer); + SwFmtColl * GetCurTxtFmtColl(SwPaM & rPam, const bool bConditional); + + void SelectPam(SwPaM & rPam, const bool bExpand); + void SetString(SwCursor & rCursor, const ::rtl::OUString & rString); + + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > + CreateSortDescriptor(const bool bFromTable); + sal_Bool ConvertSortProperties( + const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& rDescriptor, + SwSortOptions & rSortOpt); + + /// @param bTableMode: attributes should be applied to a table selection + void SetPropertyValue( + SwPaM& rPaM, + const SfxItemPropertySet & rPropSet, + const ::rtl::OUString & rPropertyName, + const ::com::sun::star::uno::Any & rValue, + const SetAttrMode nAttrMode = nsSetAttrMode::SETATTR_DEFAULT, + const bool bTableMode = false) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Any GetPropertyValue( + SwPaM& rPaM, + const SfxItemPropertySet & rPropSet, + const ::rtl::OUString & rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyState > GetPropertyStates( + SwPaM & rPaM, + const SfxItemPropertySet & rPropSet, + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& + rPropertyNames, + const SwGetPropertyStatesCaller eCaller = + SW_PROPERTY_STATE_CALLER_DEFAULT) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + ::com::sun::star::beans::PropertyState GetPropertyState( + SwPaM & rPaM, + const SfxItemPropertySet & rPropSet, + const ::rtl::OUString & rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + void SetPropertyToDefault( + SwPaM & rPaM, + const SfxItemPropertySet & rPropSet, + const ::rtl::OUString & rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Any GetPropertyDefault( + SwPaM & rPaM, + const SfxItemPropertySet & rPropSet, + const ::rtl::OUString & rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + bool SetPageDesc( + const ::com::sun::star::uno::Any& rValue, + SwDoc & rDoc, SfxItemSet & rSet); + void SetTxtFmtColl(const ::com::sun::star::uno::Any & rAny, SwPaM & rPaM) + throw (::com::sun::star::lang::IllegalArgumentException); + bool SetCursorPropertyValue( + SfxItemPropertySimpleEntry const& rEntry, + ::com::sun::star::uno::Any const& rValue, + SwPaM & rPam, SfxItemSet & rItemSet) + throw (::com::sun::star::lang::IllegalArgumentException); + } // namespace SwUnoCursorHelper #endif diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx index ce91bd2952..fe9b260218 100644 --- a/sw/inc/unotextcursor.hxx +++ b/sw/inc/unotextcursor.hxx @@ -58,32 +58,13 @@ #include -class SfxItemSet; class SfxItemPropertySet; class SwDoc; struct SwPosition; -class SwCursor; class SwUnoCrsr; -class SwFmtColl; struct SwSortOptions; -/* -----------------03.12.98 12:16------------------- - * - * --------------------------------------------------*/ -enum SwGetPropertyStatesCaller -{ - SW_PROPERTY_STATE_CALLER_DEFAULT, - SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION, - SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY, - SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT -}; - -/// attributes should be applied to a table selection -#define CRSR_ATTR_MODE_TABLE 1 -/// attributes should be added, not replaced -#define CRSR_ATTR_MODE_DONTREPLACE 2 - typedef ::cppu::WeakImplHelper12 < ::com::sun::star::lang::XServiceInfo , ::com::sun::star::beans::XPropertySet @@ -152,71 +133,6 @@ public: void DeleteAndInsert(const String& rText, const bool bForceExpandHints); - static void SetCrsrAttr(SwPaM& rPam, const SfxItemSet& rSet, - USHORT nAttrMode); - static void GetCrsrAttr( SwPaM& rPam, SfxItemSet& rSet, - BOOL bOnlyTxtAttr = FALSE, BOOL bGetFromChrFmt = TRUE ); - static void getTextFromPam(SwPaM& aCrsr, ::rtl::OUString& rBuffer); - static SwFmtColl* GetCurTxtFmtColl(SwPaM& rPam, BOOL bConditional); - - static void SelectPam(SwPaM& rCrsr, sal_Bool bExpand); - static void SetString(SwCursor& rCrsr, const ::rtl::OUString& rString); - - static ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue > - createSortDescriptor(sal_Bool bFromTable); - static sal_Bool convertSortProperties( - const ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue >& rDescriptor, - SwSortOptions& rSortOpt); - - static void SetPropertyValue( - SwPaM& rPaM, - const SfxItemPropertySet& rPropSet, - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Any& aValue, - USHORT nAttrMode = 0) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::beans::PropertyVetoException, - ::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - static ::com::sun::star::uno::Any GetPropertyValue( - SwPaM& rPaM, - const SfxItemPropertySet& rPropSet, - const ::rtl::OUString& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - static ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyState > GetPropertyStates( - SwPaM& rPaM, - const SfxItemPropertySet& rPropSet, - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames, - SwGetPropertyStatesCaller eCaller=SW_PROPERTY_STATE_CALLER_DEFAULT) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - static ::com::sun::star::beans::PropertyState GetPropertyState( - SwPaM& rPaM, - const SfxItemPropertySet& rPropSet, - const ::rtl::OUString& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - static void SetPropertyToDefault( - SwPaM& rPaM, - const SfxItemPropertySet& rPropSet, - const ::rtl::OUString& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - static ::com::sun::star::uno::Any GetPropertyDefault( - SwPaM& rPaM, - const SfxItemPropertySet& rPropSet, - const ::rtl::OUString& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual const SwPaM* GetPaM() const; virtual SwPaM* GetPaM(); virtual const SwDoc* GetDoc() const; diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index eac4a4fdaf..d931f65a18 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include "fesh.hxx" @@ -1533,7 +1533,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl( SfxItemSet aCharAttrsAtPaM( pPaM->GetDoc()->GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END -1, 0 ); - SwXTextCursor::GetCrsrAttr( *pPaM, aCharAttrsAtPaM, TRUE, TRUE ); + SwUnoCursorHelper::GetCrsrAttr(*pPaM, aCharAttrsAtPaM, TRUE, TRUE); aSet.Put( aCharAttrsAtPaM ); } // <-- diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 56df4dac76..b7c272f456 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -63,7 +63,7 @@ #include #include #include -#include +#include #include #include #include @@ -1111,7 +1111,7 @@ String SwEditShell::DeleteExtTextInput( SwExtTextInput* pDel, BOOL bInsText ) if( pDel ) { rtl::OUString sTmp; - SwXTextCursor::getTextFromPam(*pDel, sTmp); + SwUnoCursorHelper::GetTextFromPam(*pDel, sTmp); sRet = sTmp; SET_CURR_SHELL( this ); StartAllAction(); diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx index 2218129443..7d1c1cb43d 100644 --- a/sw/source/core/unocore/SwXTextDefaults.cxx +++ b/sw/source/core/unocore/SwXTextDefaults.cxx @@ -30,9 +30,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + +#include + #include #include -#include + #include #include #include @@ -44,6 +47,7 @@ #include #include #include +#include #include #include @@ -56,9 +60,6 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; -// declarations -void lcl_setPageDesc(SwDoc*, const uno::Any&, SfxItemSet& ); // from unoobj.cxx - SwXTextDefaults::SwXTextDefaults ( SwDoc * pNewDoc ) : m_pPropSet( aSwMapProvider.GetPropertySet( PROPERTY_MAP_TEXT_DEFAULT ) ), @@ -97,7 +98,7 @@ void SAL_CALL SwXTextDefaults::setPropertyValue( const OUString& rPropertyName, { SfxItemSet aSet( m_pDoc->GetAttrPool(), RES_PAGEDESC, RES_PAGEDESC ); aSet.Put(rItem); - lcl_setPageDesc( m_pDoc, aValue, aSet ); + SwUnoCursorHelper::SetPageDesc( aValue, *m_pDoc, aSet ); m_pDoc->SetDefault(aSet.Get(RES_PAGEDESC)); } else if ((RES_PARATR_DROP == pMap->nWID && MID_DROPCAP_CHAR_STYLE_NAME == pMap->nMemberId) || diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 676c1839ad..2e177b40e0 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -32,12 +32,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include + #include #include #include #include -#include #include #include #include @@ -45,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -103,8 +105,9 @@ using ::rtl::OUString; namespace SwUnoCursorHelper { + /* -----------------16.09.98 12:27------------------- - * Lesen spezieller Properties am Cursor +* Lesen spezieller Properties am Cursor * --------------------------------------------------*/ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry , SwPaM& rPam @@ -196,7 +199,10 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry pFmt = FN_UNO_PARA_CONDITIONAL_STYLE_NAME == rEntry.nWID ? pNode->GetFmtColl() : &pNode->GetAnyFmtColl(); else - pFmt = SwXTextCursor::GetCurTxtFmtColl(rPam, FN_UNO_PARA_CONDITIONAL_STYLE_NAME == rEntry.nWID); + { + pFmt = SwUnoCursorHelper::GetCurTxtFmtColl(rPam, + FN_UNO_PARA_CONDITIONAL_STYLE_NAME == rEntry.nWID); + } if(pFmt) { if( pAny ) diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 5deb85dd2a..d86f8f59f8 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -195,25 +196,30 @@ SwUnoInternalPaM& SwUnoInternalPaM::operator=(const SwPaM& rPaM) /*-----------------09.03.98 08:29------------------- --------------------------------------------------*/ -void SwXTextCursor::SelectPam(SwPaM& rCrsr, sal_Bool bExpand) +void SwUnoCursorHelper::SelectPam(SwPaM & rPam, const bool bExpand) { - if(bExpand) + if (bExpand) { - if(!rCrsr.HasMark()) - rCrsr.SetMark(); + if (!rPam.HasMark()) + { + rPam.SetMark(); + } + } + else if (rPam.HasMark()) + { + rPam.DeleteMark(); } - else if(rCrsr.HasMark()) - rCrsr.DeleteMark(); - } /* -----------------20.05.98 14:59------------------- * * --------------------------------------------------*/ -void SwXTextCursor::getTextFromPam(SwPaM& aCrsr, OUString& rBuffer) +void SwUnoCursorHelper::GetTextFromPam(SwPaM & rPam, OUString & rBuffer) { - if(!aCrsr.HasMark()) + if (!rPam.HasMark()) + { return; + } SvCacheStream aStream( 20480 ); #ifdef OSL_BIGENDIAN aStream.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); @@ -225,7 +231,7 @@ void SwXTextCursor::getTextFromPam(SwPaM& aCrsr, OUString& rBuffer) SwReaderWriter::GetWriter( C2S(FILTER_TEXT_DLG), String(), xWrt ); if( xWrt.Is() ) { - SwWriter aWriter( aStream, aCrsr ); + SwWriter aWriter( aStream, rPam ); xWrt->bASCII_NoLastLineEnd = sal_True; xWrt->bExportPargraphNumbering = sal_False; SwAsciiOptions aOpt = xWrt->GetAsciiOptions(); @@ -253,10 +259,15 @@ void SwXTextCursor::getTextFromPam(SwPaM& aCrsr, OUString& rBuffer) String sBuf; sal_Int32 nLocalLen = 0; if( lUniLen >= STRING_MAXLEN ) + { nLocalLen = STRING_MAXLEN - 1; + } else + { nLocalLen = lUniLen; - sal_Unicode* pStrBuf = sBuf.AllocBuffer( xub_StrLen( nLocalLen + 1)); + } + sal_Unicode *const pStrBuf = + sBuf.AllocBuffer( xub_StrLen( nLocalLen + 1)); aStream.Read( pStrBuf, 2 * nLocalLen ); pStrBuf[ nLocalLen ] = '\0'; aStrBuffer.append( pStrBuf, nLocalLen ); @@ -271,46 +282,52 @@ void SwXTextCursor::getTextFromPam(SwPaM& aCrsr, OUString& rBuffer) /* -----------------06.07.98 07:33------------------- * * --------------------------------------------------*/ -void lcl_setCharStyle(SwDoc* pDoc, const uno::Any aValue, SfxItemSet& rSet) - throw (lang::IllegalArgumentException) +static void +lcl_setCharStyle(SwDoc *const pDoc, const uno::Any & rValue, SfxItemSet & rSet) +throw (lang::IllegalArgumentException) { - SwDocShell* pDocSh = pDoc->GetDocShell(); + SwDocShell *const pDocSh = pDoc->GetDocShell(); if(pDocSh) { OUString uStyle; - aValue >>= uStyle; - String sStyle; - SwStyleNameMapper::FillUIName(uStyle, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, sal_True ); - SwDocStyleSheet* pStyle = - (SwDocStyleSheet*)pDocSh->GetStyleSheetPool()->Find(sStyle, SFX_STYLE_FAMILY_CHAR); - if(pStyle) + if (!(rValue >>= uStyle)) { - SwFmtCharFmt aFmt(pStyle->GetCharFmt()); - rSet.Put(aFmt); + throw lang::IllegalArgumentException(); } - else + String sStyle; + SwStyleNameMapper::FillUIName(uStyle, sStyle, + nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, sal_True); + SwDocStyleSheet *const pStyle = static_cast( + pDocSh->GetStyleSheetPool()->Find(sStyle, SFX_STYLE_FAMILY_CHAR)); + if (!pStyle) { - throw lang::IllegalArgumentException(); + throw lang::IllegalArgumentException(); } - + const SwFmtCharFmt aFmt(pStyle->GetCharFmt()); + rSet.Put(aFmt); } }; /* -----------------08.06.06 10:43------------------- * * --------------------------------------------------*/ -void lcl_setAutoStyle(IStyleAccess& rStyleAccess, const uno::Any aValue, SfxItemSet& rSet, bool bPara ) - throw (lang::IllegalArgumentException) +static void +lcl_setAutoStyle(IStyleAccess & rStyleAccess, const uno::Any & rValue, + SfxItemSet & rSet, const bool bPara) +throw (lang::IllegalArgumentException) { OUString uStyle; - aValue >>= uStyle; - String sStyle; + if (!(rValue >>= uStyle)) + { + throw lang::IllegalArgumentException(); + } StylePool::SfxItemSet_Pointer_t pStyle = bPara ? rStyleAccess.getByName(uStyle, IStyleAccess::AUTO_STYLE_PARA ): rStyleAccess.getByName(uStyle, IStyleAccess::AUTO_STYLE_CHAR ); if(pStyle.get()) { - SwFmtAutoFmt aFmt( bPara ? sal::static_int_cast< USHORT >(RES_AUTO_STYLE) - : sal::static_int_cast< USHORT >(RES_TXTATR_AUTOFMT) ); + SwFmtAutoFmt aFmt( (bPara) + ? sal::static_int_cast< USHORT >(RES_AUTO_STYLE) + : sal::static_int_cast< USHORT >(RES_TXTATR_AUTOFMT) ); aFmt.SetStyleHandle( pStyle ); rSet.Put(aFmt); } @@ -322,71 +339,77 @@ void lcl_setAutoStyle(IStyleAccess& rStyleAccess, const uno::Any aValue, SfxItem /* -----------------30.06.98 08:46------------------- * * --------------------------------------------------*/ -void lcl_SetTxtFmtColl(const uno::Any& rAny, SwPaM& rPaM) - throw (lang::IllegalArgumentException) +void +SwUnoCursorHelper::SetTxtFmtColl(const uno::Any & rAny, SwPaM & rPaM) +throw (lang::IllegalArgumentException) { - SwDoc* pDoc = rPaM.GetDoc(); - SwDocShell* pDocSh = pDoc->GetDocShell(); + SwDoc *const pDoc = rPaM.GetDoc(); + SwDocShell *const pDocSh = pDoc->GetDocShell(); if(!pDocSh) return; OUString uStyle; rAny >>= uStyle; String sStyle; - SwStyleNameMapper::FillUIName(uStyle, sStyle, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True ); - SwDocStyleSheet* pStyle = - (SwDocStyleSheet*)pDocSh->GetStyleSheetPool()->Find(sStyle, SFX_STYLE_FAMILY_PARA); - if(pStyle) - { - SwTxtFmtColl *pLocal = pStyle->GetCollection(); - UnoActionContext aAction(pDoc); - pDoc->StartUndo( UNDO_START, NULL ); - SwPaM *pTmpCrsr = &rPaM; - do { - pDoc->SetTxtFmtColl(*pTmpCrsr, pLocal); - pTmpCrsr = static_cast(pTmpCrsr->GetNext()); - } while ( pTmpCrsr != &rPaM ); - pDoc->EndUndo( UNDO_END, NULL ); - } - else + SwStyleNameMapper::FillUIName(uStyle, sStyle, + nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True ); + SwDocStyleSheet *const pStyle = static_cast( + pDocSh->GetStyleSheetPool()->Find(sStyle, SFX_STYLE_FAMILY_PARA)); + if (!pStyle) { throw lang::IllegalArgumentException(); } + SwTxtFmtColl *const pLocal = pStyle->GetCollection(); + UnoActionContext aAction(pDoc); + pDoc->StartUndo( UNDO_START, NULL ); + SwPaM *pTmpCrsr = &rPaM; + do { + pDoc->SetTxtFmtColl(*pTmpCrsr, pLocal); + pTmpCrsr = static_cast(pTmpCrsr->GetNext()); + } while ( pTmpCrsr != &rPaM ); + pDoc->EndUndo( UNDO_END, NULL ); } + /* -----------------06.07.98 07:38------------------- * * --------------------------------------------------*/ - void lcl_setPageDesc(SwDoc* pDoc, const uno::Any& aValue, SfxItemSet& rSet) - { - if(aValue.getValueType() != ::getCppuType((const OUString*)0)) - return; - SwFmtPageDesc *pNewDesc = 0 ; +bool +SwUnoCursorHelper::SetPageDesc( + const uno::Any& rValue, SwDoc & rDoc, SfxItemSet & rSet) +{ + OUString uDescName; + if (!(rValue >>= uDescName)) + { + return false; + } + ::std::auto_ptr pNewDesc; const SfxPoolItem* pItem; if(SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, sal_True, &pItem ) ) { - pNewDesc = new SwFmtPageDesc(*((SwFmtPageDesc*)pItem)); + pNewDesc.reset(new SwFmtPageDesc( + *static_cast(pItem))); + } + if (!pNewDesc.get()) + { + pNewDesc.reset(new SwFmtPageDesc()); } - if(!pNewDesc) - pNewDesc = new SwFmtPageDesc(); - OUString uDescName; - aValue >>= uDescName; String sDescName; - SwStyleNameMapper::FillUIName(uDescName, sDescName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, sal_True ); - if(!pNewDesc->GetPageDesc() || pNewDesc->GetPageDesc()->GetName() != sDescName) + SwStyleNameMapper::FillUIName(uDescName, sDescName, + nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, sal_True); + if (!pNewDesc->GetPageDesc() || + (pNewDesc->GetPageDesc()->GetName() != sDescName)) { sal_Bool bPut = sal_False; if(sDescName.Len()) { - SwPageDesc* pPageDesc = ::GetPageDescByName_Impl(*pDoc, sDescName); - if(pPageDesc) - { - pPageDesc->Add( pNewDesc ); - bPut = sal_True; - } - else + SwPageDesc *const pPageDesc = + ::GetPageDescByName_Impl(rDoc, sDescName); + if (!pPageDesc) { throw lang::IllegalArgumentException(); } + pPageDesc->Add( pNewDesc.get() ); + bPut = sal_True; } if(!bPut) { @@ -394,17 +417,21 @@ void lcl_SetTxtFmtColl(const uno::Any& rAny, SwPaM& rPaM) rSet.Put(SwFmtPageDesc()); } else + { rSet.Put(*pNewDesc); + } } - delete pNewDesc; + return true; } + /* -----------------30.06.98 10:29------------------- * * --------------------------------------------------*/ -void lcl_SetNodeNumStart( SwPaM& rCrsr, uno::Any aValue ) +static void +lcl_SetNodeNumStart(SwPaM & rCrsr, uno::Any const& rValue) { sal_Int16 nTmp = 1; - aValue >>= nTmp; + rValue >>= nTmp; sal_uInt16 nStt = (nTmp < 0 ? USHRT_MAX : (sal_uInt16)nTmp); SwDoc* pDoc = rCrsr.GetDoc(); UnoActionContext aAction(pDoc); @@ -429,215 +456,264 @@ void lcl_SetNodeNumStart( SwPaM& rCrsr, uno::Any aValue ) } } +static bool +lcl_setCharFmtSequence(SwPaM & rPam, uno::Any const& rValue) +{ + uno::Sequence aCharStyles; + if (!(rValue >>= aCharStyles)) + { + return false; + } + + for (sal_Int32 nStyle = 0; nStyle < aCharStyles.getLength(); nStyle++) + { + uno::Any aStyle; + rPam.GetDoc()->StartUndo(UNDO_START, NULL); + aStyle <<= aCharStyles.getConstArray()[nStyle]; + // create a local set and apply each format directly + SfxItemSet aSet(rPam.GetDoc()->GetAttrPool(), + RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT); + lcl_setCharStyle(rPam.GetDoc(), aStyle, aSet); + // the first style should replace the current attributes, + // all other have to be added + SwUnoCursorHelper::SetCrsrAttr(rPam, aSet, (nStyle) + ? nsSetAttrMode::SETATTR_DONTREPLACE + : nsSetAttrMode::SETATTR_DEFAULT); + rPam.GetDoc()->EndUndo(UNDO_START, NULL); + } + return true; +} + +static void +lcl_setDropcapCharStyle(SwPaM & rPam, SfxItemSet & rItemSet, + uno::Any const& rValue) +{ + OUString uStyle; + if (!(rValue >>= uStyle)) + { + throw lang::IllegalArgumentException(); + } + String sStyle; + SwStyleNameMapper::FillUIName(uStyle, sStyle, + nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, sal_True); + SwDoc *const pDoc = rPam.GetDoc(); + //default character style must not be set as default format + SwDocStyleSheet *const pStyle = static_cast( + pDoc->GetDocShell() + ->GetStyleSheetPool()->Find(sStyle, SFX_STYLE_FAMILY_CHAR)); + if (!pStyle || + (static_cast(pStyle)->GetCharFmt() == + pDoc->GetDfltCharFmt())) + { + throw lang::IllegalArgumentException(); + } + ::std::auto_ptr pDrop; + SfxPoolItem const* pItem(0); + if (SFX_ITEM_SET == + rItemSet.GetItemState(RES_PARATR_DROP, sal_True, &pItem)) + { + pDrop.reset(new SwFmtDrop(*static_cast(pItem))); + } + if (!pDrop.get()) + { + pDrop.reset(new SwFmtDrop); + } + const rtl::Reference xStyle(new SwDocStyleSheet(*pStyle)); + pDrop->SetCharFmt(xStyle->GetCharFmt()); + rItemSet.Put(*pDrop); +} + +static void +lcl_setRubyCharstyle(SfxItemSet & rItemSet, uno::Any const& rValue) +{ + OUString sTmp; + if (!(rValue >>= sTmp)) + { + throw lang::IllegalArgumentException(); + } + + ::std::auto_ptr pRuby; + const SfxPoolItem* pItem; + if (SFX_ITEM_SET == + rItemSet.GetItemState(RES_TXTATR_CJK_RUBY, sal_True, &pItem)) + { + pRuby.reset(new SwFmtRuby(*static_cast(pItem))); + } + if (!pRuby.get()) + { + pRuby.reset(new SwFmtRuby(aEmptyStr)); + } + String sStyle; + SwStyleNameMapper::FillUIName(sTmp, sStyle, + nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, sal_True ); + pRuby->SetCharFmtName(sStyle); + pRuby->SetCharFmtId(0); + if (sStyle.Len() > 0) + { + const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( + sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); + pRuby->SetCharFmtId(nId); + } + rItemSet.Put(*pRuby); +} + /* -----------------17.09.98 09:44------------------- * * --------------------------------------------------*/ -sal_Bool lcl_setCrsrPropertyValue(const SfxItemPropertySimpleEntry* pEntry, - SwPaM& rPam, - SfxItemSet& rItemSet, - const uno::Any& aValue ) throw (lang::IllegalArgumentException) -{ - sal_Bool bRet = sal_True; - if(0 == ( pEntry->nFlags&PropertyAttribute::MAYBEVOID ) && - aValue.getValueType() == ::getCppuVoidType()) - bRet = sal_False; - else - { - switch(pEntry->nWID) +bool +SwUnoCursorHelper::SetCursorPropertyValue( + SfxItemPropertySimpleEntry const& rEntry, const uno::Any& rValue, + SwPaM & rPam, SfxItemSet & rItemSet) +throw (lang::IllegalArgumentException) +{ + if (!(rEntry.nFlags & beans::PropertyAttribute::MAYBEVOID) && + (rValue.getValueType() == ::getCppuVoidType())) + { + return false; + } + bool bRet = true; + switch (rEntry.nWID) + { + case RES_TXTATR_CHARFMT: + lcl_setCharStyle(rPam.GetDoc(), rValue, rItemSet); + break; + case RES_TXTATR_AUTOFMT: + lcl_setAutoStyle(rPam.GetDoc()->GetIStyleAccess(), + rValue, rItemSet, false); + break; + case FN_UNO_CHARFMT_SEQUENCE: + lcl_setCharFmtSequence(rPam, rValue); + break; + case FN_UNO_PARA_STYLE : + SwUnoCursorHelper::SetTxtFmtColl(rValue, rPam); + break; + case RES_AUTO_STYLE: + lcl_setAutoStyle(rPam.GetDoc()->GetIStyleAccess(), + rValue, rItemSet, true); + break; + case FN_UNO_PAGE_STYLE: + //FIXME nothing here? + break; + case FN_UNO_NUM_START_VALUE: + lcl_SetNodeNumStart( rPam, rValue ); + break; + case FN_UNO_NUM_LEVEL: + // --> OD 2008-07-14 #i91601# + case FN_UNO_LIST_ID: + // <-- + case FN_UNO_IS_NUMBER: { - case RES_TXTATR_CHARFMT: - lcl_setCharStyle(rPam.GetDoc(), aValue, rItemSet ); - break; - case RES_TXTATR_AUTOFMT: - lcl_setAutoStyle(rPam.GetDoc()->GetIStyleAccess(), aValue, rItemSet, false ); - break; - case FN_UNO_CHARFMT_SEQUENCE: + // multi selection is not considered + SwTxtNode *const pTxtNd = rPam.GetNode()->GetTxtNode(); + // --> OD 2008-05-14 #refactorlists# - check on list style not needed +// const SwNumRule* pRule = pTxtNd->GetNumRule(); +// if( FN_UNO_NUM_LEVEL == rEntry.nWID && pRule != NULL ) + if (FN_UNO_NUM_LEVEL == rEntry.nWID) + // <-- { - Sequence aCharStyles; - if(aValue >>= aCharStyles) + sal_Int16 nLevel = 0; + if (rValue >>= nLevel) { - for(sal_Int32 nStyle = 0; nStyle < aCharStyles.getLength(); nStyle++) - { - Any aStyle; - rPam.GetDoc()->StartUndo( UNDO_START, NULL); - aStyle <<= aCharStyles.getConstArray()[nStyle]; - //create a local set and apply each format directly - SfxItemSet aSet(rPam.GetDoc()->GetAttrPool(), RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT ); - lcl_setCharStyle(rPam.GetDoc(), aStyle, aSet ); - //the first style should replace the current attributes, all other have to be added - SwXTextCursor::SetCrsrAttr(rPam, aSet, nStyle ? CRSR_ATTR_MODE_DONTREPLACE : 0); - rPam.GetDoc()->EndUndo( UNDO_START, NULL ); - } + pTxtNd->SetAttrListLevel(nLevel); } - else - bRet = sal_False; } - break; - case FN_UNO_PARA_STYLE : - lcl_SetTxtFmtColl(aValue, rPam); - break; - case RES_AUTO_STYLE: - lcl_setAutoStyle(rPam.GetDoc()->GetIStyleAccess(), aValue, rItemSet, true ); - break; - case FN_UNO_PAGE_STYLE : - break; - case FN_UNO_NUM_START_VALUE : - lcl_SetNodeNumStart( rPam, aValue ); - break; - case FN_UNO_NUM_LEVEL : // --> OD 2008-07-14 #i91601# - case FN_UNO_LIST_ID: - // <-- - case FN_UNO_IS_NUMBER : + else if (FN_UNO_LIST_ID == rEntry.nWID) { - // multi selection is not considered - SwTxtNode* pTxtNd = rPam.GetNode()->GetTxtNode(); - // --> OD 2008-05-14 #refactorlists# - check on list style not needed -// const SwNumRule* pRule = pTxtNd->GetNumRule(); -// if( FN_UNO_NUM_LEVEL == pEntry->nWID && pRule != NULL ) - if ( FN_UNO_NUM_LEVEL == pEntry->nWID ) - // <-- - { - sal_Int16 nLevel = 0; - aValue >>= nLevel; - - pTxtNd->SetAttrListLevel(nLevel); - - } - // --> OD 2008-07-14 #i91601# - else if( FN_UNO_LIST_ID == pEntry->nWID ) + ::rtl::OUString sListId; + if (rValue >>= sListId) { - ::rtl::OUString sListId; - aValue >>= sListId; pTxtNd->SetListId( sListId ); } - // <-- - else if( FN_UNO_IS_NUMBER == pEntry->nWID ) + } + // <-- + else if (FN_UNO_IS_NUMBER == rEntry.nWID) + { + sal_Bool bIsNumber(sal_False); + if (rValue >>= bIsNumber) { - BOOL bIsNumber = *(sal_Bool*) aValue.getValue(); - if(!bIsNumber) + if (!bIsNumber) + { pTxtNd->SetCountedInList( false ); + } } - //PROPERTY_MAYBEVOID! } - break; - case FN_NUMBER_NEWSTART : + //PROPERTY_MAYBEVOID! + } + break; + case FN_NUMBER_NEWSTART: + { + sal_Bool bVal = sal_False; + if (!(rValue >>= bVal)) { - sal_Bool bVal = sal_False; - if (aValue >>= bVal) - rPam.GetDoc()->SetNumRuleStart(*rPam.GetPoint(), bVal); - else - throw lang::IllegalArgumentException(); + throw lang::IllegalArgumentException(); } - break; - case FN_UNO_NUM_RULES: - SwUnoCursorHelper::setNumberingProperty(aValue, rPam); - break; - case RES_PARATR_DROP: + rPam.GetDoc()->SetNumRuleStart(*rPam.GetPoint(), bVal); + } + break; + case FN_UNO_NUM_RULES: + SwUnoCursorHelper::setNumberingProperty(rValue, rPam); + break; + case RES_PARATR_DROP: + { + if (MID_DROPCAP_CHAR_STYLE_NAME == rEntry.nMemberId) { - if( MID_DROPCAP_CHAR_STYLE_NAME == pEntry->nMemberId) - { - OUString uStyle; - if(aValue >>= uStyle) - { - String sStyle; - SwStyleNameMapper::FillUIName(uStyle, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, sal_True ); - SwDoc* pDoc = rPam.GetDoc(); - //default character style mustn't be set as default format - SwDocStyleSheet* pStyle = - (SwDocStyleSheet*)pDoc->GetDocShell()->GetStyleSheetPool()->Find(sStyle, SFX_STYLE_FAMILY_CHAR); - SwFmtDrop* pDrop = 0; - if(pStyle && - ((SwDocStyleSheet*)pStyle)->GetCharFmt() != pDoc->GetDfltCharFmt()) - { - const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rItemSet.GetItemState( RES_PARATR_DROP, sal_True, &pItem ) ) - pDrop = new SwFmtDrop(*((SwFmtDrop*)pItem)); - if(!pDrop) - pDrop = new SwFmtDrop(); - rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *(SwDocStyleSheet*)pStyle ) ); - pDrop->SetCharFmt(xStyle->GetCharFmt()); - } - else - throw lang::IllegalArgumentException(); - rItemSet.Put(*pDrop); - delete pDrop; - } - else - throw lang::IllegalArgumentException(); - } - else - bRet = sal_False; + lcl_setDropcapCharStyle(rPam, rItemSet, rValue); } - break; - case RES_TXTATR_CJK_RUBY: - if(MID_RUBY_CHARSTYLE == pEntry->nMemberId ) - { - OUString sTmp; - if(aValue >>= sTmp) - { - SwFmtRuby* pRuby = 0; - const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rItemSet.GetItemState( RES_TXTATR_CJK_RUBY, sal_True, &pItem ) ) - pRuby = new SwFmtRuby(*((SwFmtRuby*)pItem)); - if(!pRuby) - pRuby = new SwFmtRuby(aEmptyStr); - String sStyle; - SwStyleNameMapper::FillUIName(sTmp, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, sal_True ); - pRuby->SetCharFmtName( sStyle ); - pRuby->SetCharFmtId( 0 ); - if(sStyle.Len() > 0) - { - sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); - pRuby->SetCharFmtId(nId); - } - rItemSet.Put(*pRuby); - delete pRuby; - } - else - throw lang::IllegalArgumentException(); - bRet = sal_True; - } - else - bRet = sal_False; - break; - case RES_PAGEDESC : - if(MID_PAGEDESC_PAGEDESCNAME == pEntry->nMemberId ) + else { - lcl_setPageDesc(rPam.GetDoc(), aValue, rItemSet); - break; + bRet = false; } - //hier kein break - default: bRet = sal_False; } + break; + case RES_TXTATR_CJK_RUBY: + { + if (MID_RUBY_CHARSTYLE == rEntry.nMemberId) + { + lcl_setRubyCharstyle(rItemSet, rValue); + } + else + { + bRet = false; + } + } + break; + case RES_PAGEDESC: + { + if (MID_PAGEDESC_PAGEDESCNAME == rEntry.nMemberId) + { + SwUnoCursorHelper::SetPageDesc( + rValue, *rPam.GetDoc(), rItemSet); + } + else + { + bRet = false; + } + } + break; + default: + bRet = false; } -return bRet; + return bRet; } /* -----------------30.06.98 08:39------------------- * * --------------------------------------------------*/ -SwFmtColl* SwXTextCursor::GetCurTxtFmtColl(SwPaM& rPaM, BOOL bConditional) +SwFmtColl * +SwUnoCursorHelper::GetCurTxtFmtColl(SwPaM & rPaM, const bool bConditional) { static const sal_uInt16 nMaxLookup = 1000; SwFmtColl *pFmt = 0; // if ( GetCrsrCnt() > nMaxLookup ) // return 0; - sal_Bool bError = sal_False; + bool bError = false; SwPaM *pTmpCrsr = &rPaM; - do { - - ULONG nSttNd = pTmpCrsr->GetMark()->nNode.GetIndex(); - ULONG nEndNd = pTmpCrsr->GetPoint()->nNode.GetIndex(); - xub_StrLen nSttCnt = pTmpCrsr->GetMark()->nContent.GetIndex(); - xub_StrLen nEndCnt = pTmpCrsr->GetPoint()->nContent.GetIndex(); - - if( nSttNd > nEndNd || ( nSttNd == nEndNd && nSttCnt > nEndCnt )) - { - sal_uInt32 nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp; - nTmp = nSttCnt; nSttCnt = nEndCnt; nEndCnt = (sal_uInt16)nTmp; - } + do + { + const ULONG nSttNd = pTmpCrsr->Start()->nNode.GetIndex(); + const ULONG nEndNd = pTmpCrsr->End()->nNode.GetIndex(); if( nEndNd - nSttNd >= nMaxLookup ) { @@ -648,33 +724,33 @@ SwFmtColl* SwXTextCursor::GetCurTxtFmtColl(SwPaM& rPaM, BOOL bConditional) const SwNodes& rNds = rPaM.GetDoc()->GetNodes(); for( ULONG n = nSttNd; n <= nEndNd; ++n ) { - const SwTxtNode* pNd = rNds[ n ]->GetTxtNode(); + SwTxtNode const*const pNd = rNds[ n ]->GetTxtNode(); if( pNd ) { - SwFmtColl* pNdFmt = bConditional ? pNd->GetFmtColl() - : &pNd->GetAnyFmtColl(); + SwFmtColl *const pNdFmt = (bConditional) + ? pNd->GetFmtColl() : &pNd->GetAnyFmtColl(); if( !pFmt ) + { pFmt = pNdFmt; + } else if( pFmt != pNdFmt ) { - bError = sal_True; + bError = true; break; } } } - if(bError) - break; pTmpCrsr = static_cast(pTmpCrsr->GetNext()); } while ( pTmpCrsr != &rPaM ); - return bError ? 0 : pFmt; + return (bError) ? 0 : pFmt; } /* -----------------26.06.98 16:20------------------- * Hilfsfunktion fuer PageDesc * --------------------------------------------------*/ - SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName) - { +SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName) +{ SwPageDesc* pRet = 0; sal_uInt16 nDCount = rDoc.GetPageDescCnt(); sal_uInt16 i; @@ -695,7 +771,8 @@ SwFmtColl* SwXTextCursor::GetCurTxtFmtColl(SwPaM& rPaM, BOOL bConditional) const String aFmtName(SW_RES(i)); if(aFmtName == rName) { - pRet = rDoc.GetPageDescFromPool( static_cast< sal_uInt16 >(RES_POOLPAGE_BEGIN + i - RC_POOLPAGEDESC_BEGIN) ); + pRet = rDoc.GetPageDescFromPool( static_cast< sal_uInt16 >( + RES_POOLPAGE_BEGIN + i - RC_POOLPAGEDESC_BEGIN) ); break; } } @@ -934,7 +1011,7 @@ void SwXTextCursor::DeleteAndInsert(const String& rText, DBG_ASSERT( bSuccess, "Doc->Insert(Str) failed." ); (void) bSuccess; - SwXTextCursor::SelectPam(*pUnoCrsr, sal_True); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, true); _pStartCrsr->Left(rText.Len(), CRSR_SKIP_CHARS, FALSE, FALSE); } } while( (_pStartCrsr=(SwCursor*)_pStartCrsr->GetNext()) != pUnoCrsr ); @@ -945,7 +1022,8 @@ void SwXTextCursor::DeleteAndInsert(const String& rText, enum ForceIntoMetaMode { META_CHECK_BOTH, META_INIT_START, META_INIT_END }; -sal_Bool lcl_ForceIntoMeta(SwPaM & rCursor, +static sal_Bool +lcl_ForceIntoMeta(SwPaM & rCursor, uno::Reference const & xParentText, const enum ForceIntoMetaMode eMode) { @@ -1106,7 +1184,7 @@ sal_Bool SwXTextCursor::goLeft(sal_Int16 nCount, sal_Bool Expand) throw( uno::Ru SwUnoCrsr* pUnoCrsr = GetCrsr(); if(pUnoCrsr) { - SwXTextCursor::SelectPam(*pUnoCrsr, Expand); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); bRet = pUnoCrsr->Left( nCount, CRSR_SKIP_CHARS, FALSE, FALSE); if (CURSOR_META == eType) { @@ -1130,7 +1208,7 @@ sal_Bool SwXTextCursor::goRight(sal_Int16 nCount, sal_Bool Expand) throw( uno::R SwUnoCrsr* pUnoCrsr = GetCrsr(); if(pUnoCrsr) { - SwXTextCursor::SelectPam(*pUnoCrsr, Expand); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); bRet = pUnoCrsr->Right(nCount, CRSR_SKIP_CHARS, FALSE, FALSE); if (CURSOR_META == eType) { @@ -1153,7 +1231,7 @@ void SwXTextCursor::gotoStart(sal_Bool Expand) throw( uno::RuntimeException ) SwUnoCrsr* pUnoCrsr = GetCrsr(); if(pUnoCrsr) { - SwXTextCursor::SelectPam(*pUnoCrsr, Expand); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); if(eType == CURSOR_BODY) { pUnoCrsr->Move( fnMoveBackward, fnGoDoc ); @@ -1209,7 +1287,7 @@ void SwXTextCursor::gotoEnd(sal_Bool Expand) throw( uno::RuntimeException ) SwUnoCrsr* pUnoCrsr = GetCrsr(); if(pUnoCrsr) { - SwXTextCursor::SelectPam(*pUnoCrsr, Expand); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); if(eType == CURSOR_BODY) { pUnoCrsr->Move( fnMoveForward, fnGoDoc ); @@ -1424,7 +1502,7 @@ sal_Bool SwXTextCursor::gotoNextWord(sal_Bool Expand) throw( uno::RuntimeExcepti SwNode *pOldNode = &pPoint->nNode.GetNode(); xub_StrLen nOldIndex = pPoint->nContent.GetIndex(); - SwXTextCursor::SelectPam(*pUnoCrsr, Expand); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); //Absatzende? if(pUnoCrsr->GetCntntNode() && pPoint->nContent == pUnoCrsr->GetCntntNode()->Len()) @@ -1470,7 +1548,7 @@ sal_Bool SwXTextCursor::gotoPreviousWord(sal_Bool Expand) throw( uno::RuntimeExc SwNode *pOldNode = &pPoint->nNode.GetNode(); xub_StrLen nOldIndex = pPoint->nContent.GetIndex(); - SwXTextCursor::SelectPam(*pUnoCrsr, Expand); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); //Absatzanfang ? if(pPoint->nContent == 0) { @@ -1514,7 +1592,7 @@ sal_Bool SwXTextCursor::gotoEndOfWord(sal_Bool Expand) throw( uno::RuntimeExcept xub_StrLen nOldIndex = pPoint->nContent.GetIndex(); sal_Int16 nWordType = i18n::WordType::DICTIONARY_WORD; - SwXTextCursor::SelectPam(*pUnoCrsr, Expand); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); if(!pUnoCrsr->IsEndWordWT( nWordType )) pUnoCrsr->GoEndWordWT( nWordType ); @@ -1554,7 +1632,7 @@ sal_Bool SwXTextCursor::gotoStartOfWord(sal_Bool Expand) throw( uno::RuntimeExce xub_StrLen nOldIndex = pPoint->nContent.GetIndex(); sal_Int16 nWordType = i18n::WordType::DICTIONARY_WORD; - SwXTextCursor::SelectPam(*pUnoCrsr, Expand); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); if(!pUnoCrsr->IsStartWordWT( nWordType )) pUnoCrsr->GoStartWordWT( nWordType ); @@ -1646,7 +1724,7 @@ sal_Bool SwXTextCursor::gotoNextSentence(sal_Bool Expand) throw( uno::RuntimeExc if(pUnoCrsr) { BOOL bWasEOS = isEndOfSentence(); - SwXTextCursor::SelectPam(*pUnoCrsr, Expand); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); bRet = pUnoCrsr->GoSentence(SwCursor::NEXT_SENT); if(!bRet) bRet = pUnoCrsr->MovePara(fnParaNext, fnParaStart); @@ -1680,7 +1758,7 @@ sal_Bool SwXTextCursor::gotoPreviousSentence(sal_Bool Expand) throw( uno::Runtim SwUnoCrsr* pUnoCrsr = GetCrsr(); if(pUnoCrsr) { - SwXTextCursor::SelectPam(*pUnoCrsr, Expand); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); bRet = pUnoCrsr->GoSentence(SwCursor::PREV_SENT); if(!bRet) { @@ -1712,7 +1790,7 @@ sal_Bool SwXTextCursor::gotoStartOfSentence(sal_Bool Expand) throw( uno::Runtime SwUnoCrsr* pUnoCrsr = GetCrsr(); if(pUnoCrsr) { - SwXTextCursor::SelectPam(*pUnoCrsr, Expand); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); // if we're at the para start then we wont move // but bRet is also true if GoSentence failed but // the start of the sentence is reached @@ -1739,7 +1817,7 @@ sal_Bool SwXTextCursor::gotoEndOfSentence(sal_Bool Expand) throw( uno::RuntimeEx SwUnoCrsr* pUnoCrsr = GetCrsr(); if(pUnoCrsr) { - SwXTextCursor::SelectPam(*pUnoCrsr, Expand); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); // bRet is true if GoSentence() succeeded or if the // MovePara() succeeded while the end of the para is // not reached already @@ -1798,7 +1876,7 @@ sal_Bool SwXTextCursor::gotoStartOfParagraph(sal_Bool Expand) throw( uno::Runtim SwUnoCrsr* pUnoCrsr = GetCrsr(); if(pUnoCrsr ) { - SwXTextCursor::SelectPam(*pUnoCrsr, Expand); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); bRet = SwUnoCursorHelper::IsStartOfPara(*pUnoCrsr); if(!bRet) bRet = pUnoCrsr->MovePara(fnParaCurr, fnParaStart); @@ -1824,7 +1902,7 @@ sal_Bool SwXTextCursor::gotoEndOfParagraph(sal_Bool Expand) throw( uno::RuntimeE SwUnoCrsr* pUnoCrsr = GetCrsr(); if(pUnoCrsr) { - SwXTextCursor::SelectPam(*pUnoCrsr, Expand); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); bRet = SwUnoCursorHelper::IsEndOfPara(*pUnoCrsr); if(!bRet) bRet = pUnoCrsr->MovePara(fnParaCurr, fnParaEnd); @@ -1850,7 +1928,7 @@ sal_Bool SwXTextCursor::gotoNextParagraph(sal_Bool Expand) throw( uno::RuntimeEx SwUnoCrsr* pUnoCrsr = GetCrsr(); if(pUnoCrsr) { - SwXTextCursor::SelectPam(*pUnoCrsr, Expand); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); bRet = pUnoCrsr->MovePara(fnParaNext, fnParaStart); } else @@ -1869,7 +1947,7 @@ sal_Bool SwXTextCursor::gotoPreviousParagraph(sal_Bool Expand) throw( uno::Runti SwUnoCrsr* pUnoCrsr = GetCrsr(); if(pUnoCrsr) { - SwXTextCursor::SelectPam(*pUnoCrsr, Expand); + SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); bRet = pUnoCrsr->MovePara(fnParaPrev, fnParaStart); } else @@ -1967,7 +2045,7 @@ OUString SwXTextCursor::getString(void) throw( uno::RuntimeException ) else */ { //Text ueber mehrere Absaetze - SwXTextCursor::getTextFromPam(*pUnoCrsr, aTxt); + SwUnoCursorHelper::GetTextFromPam(*pUnoCrsr, aTxt); } } else @@ -1993,242 +2071,307 @@ void SwXTextCursor::setString(const OUString& aString) throw( uno::RuntimeExcept /* -----------------------------03.05.00 12:56-------------------------------- ---------------------------------------------------------------------------*/ -Any SwXTextCursor::GetPropertyValue( +uno::Any SwUnoCursorHelper::GetPropertyValue( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const OUString& rPropertyName) - throw( UnknownPropertyException, WrappedTargetException, RuntimeException) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - Any aAny; - const SfxItemPropertySimpleEntry* pEntry = rPropSet.getPropertyMap()->getByName( - rPropertyName); - if(pEntry) + uno::Any aAny; + SfxItemPropertySimpleEntry const*const pEntry = + rPropSet.getPropertyMap()->getByName(rPropertyName); + + if (!pEntry) { - PropertyState eTemp; - BOOL bDone = SwUnoCursorHelper::getCrsrPropertyValue( *pEntry, rPaM, &aAny, eTemp ); - if(!bDone) - { - SfxItemSet aSet(rPaM.GetDoc()->GetAttrPool(), - RES_CHRATR_BEGIN, RES_FRMATR_END -1, - RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER, - RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER, - 0L); - SwXTextCursor::GetCrsrAttr(rPaM, aSet); + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + rPropertyName, static_cast(0)); + } - rPropSet.getPropertyValue(*pEntry, aSet, aAny); - } + beans::PropertyState eTemp; + const sal_Bool bDone = SwUnoCursorHelper::getCrsrPropertyValue( + *pEntry, rPaM, &aAny, eTemp ); + + if (!bDone) + { + SfxItemSet aSet(rPaM.GetDoc()->GetAttrPool(), + RES_CHRATR_BEGIN, RES_FRMATR_END - 1, + RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER, + RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER, + 0L); + SwUnoCursorHelper::GetCrsrAttr(rPaM, aSet); + + rPropSet.getPropertyValue(*pEntry, aSet, aAny); } - else - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( 0 ) ); return aAny; } /* -----------------------------03.05.00 12:57-------------------------------- ---------------------------------------------------------------------------*/ -void SwXTextCursor::SetPropertyValue( - SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const OUString& rPropertyName, - const Any& aValue, USHORT nAttrMode) - throw (UnknownPropertyException, PropertyVetoException, - IllegalArgumentException, WrappedTargetException, RuntimeException) +void SwUnoCursorHelper::SetPropertyValue( + SwPaM& rPaM, const SfxItemPropertySet& rPropSet, + const OUString& rPropertyName, + const uno::Any& rValue, + const SetAttrMode nAttrMode, const bool bTableMode) +throw (beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException) { - SwDoc* pDoc = rPaM.GetDoc(); - const SfxItemPropertySimpleEntry* pEntry = rPropSet.getPropertyMap()->getByName(rPropertyName); - if(pEntry) + SwDoc *const pDoc = rPaM.GetDoc(); + SfxItemPropertySimpleEntry const*const pEntry = + rPropSet.getPropertyMap()->getByName(rPropertyName); + if (!pEntry) { - if( pEntry->nFlags & PropertyAttribute::READONLY) - throw PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( 0 ) ); + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + rPropertyName, + static_cast(0)); + } - SfxItemSet aItemSet( pDoc->GetAttrPool(), pEntry->nWID, pEntry->nWID ); - SwXTextCursor::GetCrsrAttr( rPaM, aItemSet ); + if (pEntry->nFlags & beans::PropertyAttribute::READONLY) + { + throw beans::PropertyVetoException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only: ")) + + rPropertyName, + static_cast(0)); + } + + SfxItemSet aItemSet( pDoc->GetAttrPool(), pEntry->nWID, pEntry->nWID ); + SwUnoCursorHelper::GetCrsrAttr( rPaM, aItemSet ); - if(!lcl_setCrsrPropertyValue( pEntry, rPaM, aItemSet, aValue )) - rPropSet.setPropertyValue(*pEntry, aValue, aItemSet ); - SwXTextCursor::SetCrsrAttr(rPaM, aItemSet, nAttrMode ); + if (!SwUnoCursorHelper::SetCursorPropertyValue( + *pEntry, rValue, rPaM, aItemSet)) + { + rPropSet.setPropertyValue(*pEntry, rValue, aItemSet ); } - else - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( 0 ) ); + SwUnoCursorHelper::SetCrsrAttr(rPaM, aItemSet, nAttrMode, bTableMode); } + /* -----------------------------03.05.00 13:16-------------------------------- ---------------------------------------------------------------------------*/ -Sequence< PropertyState > SwXTextCursor::GetPropertyStates( +uno::Sequence< beans::PropertyState > +SwUnoCursorHelper::GetPropertyStates( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, - const Sequence< OUString >& PropertyNames, - SwGetPropertyStatesCaller eCaller ) - throw(UnknownPropertyException, RuntimeException) + const uno::Sequence< OUString >& rPropertyNames, + const SwGetPropertyStatesCaller eCaller) +throw (beans::UnknownPropertyException, uno::RuntimeException) { - const OUString* pNames = PropertyNames.getConstArray(); - Sequence< PropertyState > aRet ( PropertyNames.getLength() ); - PropertyState* pStates = aRet.getArray(); + const OUString* pNames = rPropertyNames.getConstArray(); + uno::Sequence< beans::PropertyState > aRet(rPropertyNames.getLength()); + beans::PropertyState* pStates = aRet.getArray(); + SfxItemPropertyMap const*const pMap = rPropSet.getPropertyMap(); + ::std::auto_ptr pSet; + ::std::auto_ptr pSetParent; - SfxItemSet *pSet = 0, *pSetParent = 0; - const SfxItemPropertyMap *pMap = rPropSet.getPropertyMap(); - for( INT32 i = 0, nEnd = PropertyNames.getLength(); i < nEnd; i++ ) + for (sal_Int32 i = 0, nEnd = rPropertyNames.getLength(); i < nEnd; i++) { - const SfxItemPropertySimpleEntry* pEntry = pMap->getByName( pNames[i] ); + SfxItemPropertySimpleEntry const*const pEntry = + pMap->getByName( pNames[i] ); if(!pEntry) { - if(pNames[i].equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_SKIP_HIDDEN_TEXT)) || - pNames[i].equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_SKIP_PROTECTED_TEXT))) + if (pNames[i].equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_SKIP_HIDDEN_TEXT)) || + pNames[i].equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_SKIP_PROTECTED_TEXT))) { pStates[i] = beans::PropertyState_DEFAULT_VALUE; continue; } - else if( SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT == eCaller ) + else if (SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT == + eCaller) { //this values marks the element as unknown property pStates[i] = beans::PropertyState_MAKE_FIXED_SIZE; continue; } else - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pNames[i], static_cast < cppu::OWeakObject * > ( 0 ) ); + { + throw beans::UnknownPropertyException( + OUString( RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + pNames[i], + static_cast(0)); + } } - if ((eCaller == SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION || eCaller == SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT) && + if (((SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION == eCaller) || + (SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT == eCaller)) && pEntry->nWID < FN_UNO_RANGE_BEGIN && pEntry->nWID > FN_UNO_RANGE_END && pEntry->nWID < RES_CHRATR_BEGIN && pEntry->nWID > RES_TXTATR_END ) + { pStates[i] = beans::PropertyState_DEFAULT_VALUE; + } else { if ( pEntry->nWID >= FN_UNO_RANGE_BEGIN && pEntry->nWID <= FN_UNO_RANGE_END ) - SwUnoCursorHelper::getCrsrPropertyValue(*pEntry, rPaM, 0, pStates[i] ); + { + SwUnoCursorHelper::getCrsrPropertyValue( + *pEntry, rPaM, 0, pStates[i] ); + } else { - if( !pSet ) + if (!pSet.get()) { switch ( eCaller ) { case SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT: case SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION: - pSet = new SfxItemSet( rPaM.GetDoc()->GetAttrPool(), - RES_CHRATR_BEGIN, RES_TXTATR_END ); + pSet.reset( + new SfxItemSet( rPaM.GetDoc()->GetAttrPool(), + RES_CHRATR_BEGIN, RES_TXTATR_END )); break; case SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY: - pSet = new SfxItemSet( rPaM.GetDoc()->GetAttrPool(), - pEntry->nWID, pEntry->nWID ); + pSet.reset( + new SfxItemSet( rPaM.GetDoc()->GetAttrPool(), + pEntry->nWID, pEntry->nWID )); break; default: - pSet = new SfxItemSet( rPaM.GetDoc()->GetAttrPool(), + pSet.reset( new SfxItemSet( + rPaM.GetDoc()->GetAttrPool(), RES_CHRATR_BEGIN, RES_FRMATR_END - 1, RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER, - 0L ); + 0L )); } // --> OD 2006-07-12 #i63870# - SwXTextCursor::GetCrsrAttr( rPaM, *pSet ); + SwUnoCursorHelper::GetCrsrAttr( rPaM, *pSet ); // <-- } - if( pSet->Count() ) - pStates[i] = rPropSet.getPropertyState( *pEntry, *pSet ); - else - pStates[i] = PropertyState_DEFAULT_VALUE; + pStates[i] = ( pSet->Count() ) + ? rPropSet.getPropertyState( *pEntry, *pSet ) + : beans::PropertyState_DEFAULT_VALUE; //try again to find out if a value has been inherited if( beans::PropertyState_DIRECT_VALUE == pStates[i] ) { - if( !pSetParent ) + if (!pSetParent.get()) { - pSetParent = pSet->Clone( FALSE ); + pSetParent.reset( pSet->Clone( FALSE ) ); // --> OD 2006-07-12 #i63870# - SwXTextCursor::GetCrsrAttr( rPaM, *pSetParent, TRUE, FALSE ); + SwUnoCursorHelper::GetCrsrAttr( + rPaM, *pSetParent, TRUE, FALSE ); // <-- } - if( (pSetParent)->Count() ) - pStates[i] = rPropSet.getPropertyState( *pEntry, *pSetParent ); - else - pStates[i] = PropertyState_DEFAULT_VALUE; + pStates[i] = ( (pSetParent)->Count() ) + ? rPropSet.getPropertyState( *pEntry, *pSetParent ) + : beans::PropertyState_DEFAULT_VALUE; } } } } - delete pSet; - delete pSetParent; return aRet; } /* -----------------------------03.05.00 13:17-------------------------------- ---------------------------------------------------------------------------*/ -PropertyState SwXTextCursor::GetPropertyState( - SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const OUString& rPropertyName) - throw(UnknownPropertyException, RuntimeException) +beans::PropertyState SwUnoCursorHelper::GetPropertyState( + SwPaM& rPaM, const SfxItemPropertySet& rPropSet, + const OUString& rPropertyName) +throw (beans::UnknownPropertyException, uno::RuntimeException) { - Sequence < OUString > aStrings ( 1 ); + uno::Sequence< OUString > aStrings ( 1 ); aStrings[0] = rPropertyName; - Sequence < PropertyState > aSeq = GetPropertyStates( rPaM, rPropSet, aStrings, SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY ); + uno::Sequence< beans::PropertyState > aSeq = + GetPropertyStates(rPaM, rPropSet, aStrings, + SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY ); return aSeq[0]; } /* -----------------------------03.05.00 13:20-------------------------------- ---------------------------------------------------------------------------*/ -void lcl_SelectParaAndReset ( SwPaM &rPaM, SwDoc* pDoc, const SvUShortsSort* pWhichIds = 0 ) +static void +lcl_SelectParaAndReset( SwPaM &rPaM, SwDoc & rDoc, + SvUShortsSort const*const pWhichIds = 0 ) { // if we are reseting paragraph attributes, we need to select the full paragraph first SwPosition aStart = *rPaM.Start(); SwPosition aEnd = *rPaM.End(); - auto_ptr < SwUnoCrsr > pTemp ( pDoc->CreateUnoCrsr(aStart, FALSE) ); + ::std::auto_ptr< SwUnoCrsr > pTemp ( rDoc.CreateUnoCrsr(aStart, FALSE) ); if(!SwUnoCursorHelper::IsStartOfPara(*pTemp)) + { pTemp->MovePara(fnParaCurr, fnParaStart); + } pTemp->SetMark(); *pTemp->GetPoint() = aEnd; - SwXTextCursor::SelectPam(*pTemp, sal_True); + SwUnoCursorHelper::SelectPam(*pTemp, true); if(!SwUnoCursorHelper::IsEndOfPara(*pTemp)) + { pTemp->MovePara(fnParaCurr, fnParaEnd); - pDoc->ResetAttrs(*pTemp, sal_True, pWhichIds); + } + rDoc.ResetAttrs(*pTemp, sal_True, pWhichIds); } -void SwXTextCursor::SetPropertyToDefault( +void SwUnoCursorHelper::SetPropertyToDefault( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const OUString& rPropertyName) - throw(UnknownPropertyException, RuntimeException) +throw (beans::UnknownPropertyException, uno::RuntimeException) { - NAMESPACE_VOS(OGuard) aGuard(Application::GetSolarMutex()); - SwDoc* pDoc = rPaM.GetDoc(); - const SfxItemPropertySimpleEntry* pEntry = rPropSet.getPropertyMap()->getByName( rPropertyName); - if(pEntry) + SwDoc & rDoc = *rPaM.GetDoc(); + SfxItemPropertySimpleEntry const*const pEntry = + rPropSet.getPropertyMap()->getByName(rPropertyName); + if (!pEntry) + { + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + rPropertyName, static_cast(0)); + } + + if (pEntry->nFlags & beans::PropertyAttribute::READONLY) + { + throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( + "setPropertyToDefault: property is read-only: ")) + + rPropertyName, 0); + } + + if (pEntry->nWID < RES_FRMATR_END) { - if ( pEntry->nFlags & PropertyAttribute::READONLY) - throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "setPropertyToDefault: property is read-only: " ) ) + rPropertyName, 0 ); - if(pEntry->nWID < RES_FRMATR_END) + SvUShortsSort aWhichIds; + aWhichIds.Insert(pEntry->nWID); + if (pEntry->nWID < RES_PARATR_BEGIN) { - SvUShortsSort aWhichIds; - aWhichIds.Insert(pEntry->nWID); - if(pEntry->nWID < RES_PARATR_BEGIN) - pDoc->ResetAttrs(rPaM, sal_True, &aWhichIds); - else - lcl_SelectParaAndReset ( rPaM, pDoc, &aWhichIds ); + rDoc.ResetAttrs(rPaM, sal_True, &aWhichIds); } else - SwUnoCursorHelper::resetCrsrPropertyValue(*pEntry, rPaM); + { + lcl_SelectParaAndReset ( rPaM, rDoc, &aWhichIds ); + } } else - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( 0 ) ); + { + SwUnoCursorHelper::resetCrsrPropertyValue(*pEntry, rPaM); + } } + /* -----------------------------03.05.00 13:19-------------------------------- ---------------------------------------------------------------------------*/ -Any SwXTextCursor::GetPropertyDefault( +uno::Any SwUnoCursorHelper::GetPropertyDefault( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const OUString& rPropertyName) - throw( UnknownPropertyException, WrappedTargetException, RuntimeException) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - Any aRet; - SwDoc* pDoc = rPaM.GetDoc(); - const SfxItemPropertySimpleEntry* pEntry = rPropSet.getPropertyMap()->getByName( rPropertyName); - if(pEntry) + SfxItemPropertySimpleEntry const*const pEntry = + rPropSet.getPropertyMap()->getByName(rPropertyName); + if (!pEntry) { - if(pEntry->nWID < RES_FRMATR_END) - { - const SfxPoolItem& rDefItem = pDoc->GetAttrPool().GetDefaultItem(pEntry->nWID); - rDefItem.QueryValue(aRet, pEntry->nMemberId); - } + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + rPropertyName, static_cast(0)); + } + + uno::Any aRet; + if (pEntry->nWID < RES_FRMATR_END) + { + SwDoc & rDoc = *rPaM.GetDoc(); + const SfxPoolItem& rDefItem = + rDoc.GetAttrPool().GetDefaultItem(pEntry->nWID); + rDefItem.QueryValue(aRet, pEntry->nMemberId); } - else - throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( 0 ) ); return aRet; } /*-- 09.12.98 14:18:54--------------------------------------------------- @@ -2276,7 +2419,10 @@ void SwXTextCursor::setPropertyValue(const OUString& rPropertyName, const uno::A pUnoCrsr->SetSkipOverProtectSections(bSet); } else - SetPropertyValue(*pUnoCrsr, *m_pPropSet, rPropertyName, aValue); + { + SwUnoCursorHelper::SetPropertyValue(*pUnoCrsr, + *m_pPropSet, rPropertyName, aValue); + } } else throw uno::RuntimeException(); @@ -2304,7 +2450,10 @@ Any SwXTextCursor::getPropertyValue(const OUString& rPropertyName) aAny.setValue(&bSet, ::getBooleanCppuType()); } else - aAny = GetPropertyValue(*pUnoCrsr, *m_pPropSet, rPropertyName); + { + aAny = SwUnoCursorHelper::GetPropertyValue(*pUnoCrsr, + *m_pPropSet, rPropertyName); + } } else throw uno::RuntimeException(); @@ -2350,7 +2499,8 @@ beans::PropertyState SwXTextCursor::getPropertyState(const OUString& rPropertyNa SwUnoCrsr* pUnoCrsr = GetCrsr(); if(pUnoCrsr) { - eRet = GetPropertyState(*pUnoCrsr, *m_pPropSet, rPropertyName); + eRet = SwUnoCursorHelper::GetPropertyState( + *pUnoCrsr, *m_pPropSet, rPropertyName); } else throw RuntimeException(); @@ -2367,7 +2517,8 @@ uno::Sequence< beans::PropertyState > SwXTextCursor::getPropertyStates( SwUnoCrsr* pUnoCrsr = GetCrsr(); if(!pUnoCrsr) throw RuntimeException(); - return GetPropertyStates(*pUnoCrsr, *m_pPropSet, PropertyNames); + return SwUnoCursorHelper::GetPropertyStates( + *pUnoCrsr, *m_pPropSet, PropertyNames); } /*-- 05.03.99 11:36:12--------------------------------------------------- @@ -2430,7 +2581,7 @@ void SAL_CALL SwXTextCursor::setAllPropertiesToDefault() } } if (aParaWhichIds.Count()) - lcl_SelectParaAndReset( *pUnoCrsr, pUnoCrsr->GetDoc(), &aParaWhichIds ); + lcl_SelectParaAndReset( *pUnoCrsr, *pUnoCrsr->GetDoc(), &aParaWhichIds ); if (aWhichIds.Count() ) pUnoCrsr->GetDoc()->ResetAttrs( *pUnoCrsr, sal_True, &aWhichIds ); } @@ -2479,7 +2630,7 @@ void SAL_CALL SwXTextCursor::setPropertiesToDefault( const Sequence< OUString >& } if ( aParaWhichIds.Count() ) - lcl_SelectParaAndReset ( *pUnoCrsr, pDoc, &aParaWhichIds ); + lcl_SelectParaAndReset ( *pUnoCrsr, *pDoc, &aParaWhichIds ); if (aWhichIds.Count() ) pDoc->ResetAttrs(*pUnoCrsr, sal_True, &aWhichIds); } @@ -2565,7 +2716,7 @@ throw (lang::IllegalArgumentException, io::IOException, ---------------------------------------------------------------------------*/ uno::Sequence< beans::PropertyValue > -SwXTextCursor::createSortDescriptor(sal_Bool bFromTable) +SwUnoCursorHelper::CreateSortDescriptor(const bool bFromTable) { uno::Sequence< beans::PropertyValue > aRet(5); beans::PropertyValue* pArray = aRet.getArray(); @@ -2575,10 +2726,7 @@ SwXTextCursor::createSortDescriptor(sal_Bool bFromTable) pArray[0] = beans::PropertyValue(C2U("IsSortInTable"), -1, aVal, beans::PropertyState_DIRECT_VALUE); - String sSpace(String::CreateFromAscii(" ")); - sal_Unicode uSpace = sSpace.GetChar(0); - - aVal <<= uSpace; + aVal <<= sal_Unicode(' '); pArray[1] = beans::PropertyValue(C2U("Delimiter"), -1, aVal, beans::PropertyState_DIRECT_VALUE); @@ -2593,15 +2741,17 @@ SwXTextCursor::createSortDescriptor(sal_Bool bFromTable) uno::Sequence< table::TableSortField > aFields(3); table::TableSortField* pFields = aFields.getArray(); - Locale aLang( SvxCreateLocale( LANGUAGE_SYSTEM ) ); + lang::Locale aLang( SvxCreateLocale( LANGUAGE_SYSTEM ) ); // get collator algorithm to be used for the locale uno::Sequence< OUString > aSeq( GetAppCollator().listCollatorAlgorithms( aLang ) ); - INT32 nLen = aSeq.getLength(); + const sal_Int32 nLen = aSeq.getLength(); DBG_ASSERT( nLen > 0, "list of collator algorithms is empty!"); OUString aCollAlg; if (nLen > 0) + { aCollAlg = aSeq.getConstArray()[0]; + } #if OSL_DEBUG_LEVEL > 1 const OUString *pTxt = aSeq.getConstArray(); @@ -2643,13 +2793,14 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextCursor::createSortDescriptor() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - return SwXTextCursor::createSortDescriptor(sal_False); + + return SwUnoCursorHelper::CreateSortDescriptor(false); } /* -----------------------------15.12.00 14:06-------------------------------- ---------------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::convertSortProperties( +sal_Bool SwUnoCursorHelper::ConvertSortProperties( const uno::Sequence< beans::PropertyValue >& rDescriptor, SwSortOptions& rSortOpt) { @@ -2679,14 +2830,14 @@ sal_Bool SwXTextCursor::convertSortProperties( sal_Bool bOldSortdescriptor(sal_False); sal_Bool bNewSortdescriptor(sal_False); - for (int n = 0; n < rDescriptor.getLength(); ++n) + for (sal_Int32 n = 0; n < rDescriptor.getLength(); ++n) { uno::Any aValue( pProperties[n].Value ); // String sPropName = pProperties[n].Name; const OUString& rPropName = pProperties[n].Name; // old and new sortdescriptor - if (COMPARE_EQUAL == rPropName.compareToAscii("IsSortInTable")) + if (rPropName.equalsAscii("IsSortInTable")) { if (aValue.getValueType() == ::getBooleanCppuType()) { @@ -2697,7 +2848,7 @@ sal_Bool SwXTextCursor::convertSortProperties( bRet = sal_False; } } - else if (COMPARE_EQUAL == rPropName.compareToAscii("Delimiter")) + else if (rPropName.equalsAscii("Delimiter")) { sal_Unicode uChar = sal_Unicode(); if (aValue >>= uChar) @@ -2710,12 +2861,12 @@ sal_Bool SwXTextCursor::convertSortProperties( } } // old sortdescriptor - else if (COMPARE_EQUAL == rPropName.compareToAscii("SortColumns")) + else if (rPropName.equalsAscii("SortColumns")) { bOldSortdescriptor = sal_True; - if (aValue.getValueType() == ::getBooleanCppuType()) + sal_Bool bTemp(sal_False); + if (aValue >>= bTemp) { - sal_Bool bTemp = *(sal_Bool*)aValue.getValue(); rSortOpt.eDirection = bTemp ? SRT_COLUMNS : SRT_ROWS; } else @@ -2723,12 +2874,12 @@ sal_Bool SwXTextCursor::convertSortProperties( bRet = sal_False; } } - else if (COMPARE_EQUAL == rPropName.compareToAscii("IsCaseSensitive")) + else if ( rPropName.equalsAscii("IsCaseSensitive")) { bOldSortdescriptor = sal_True; - if (aValue.getValueType() == ::getBooleanCppuType()) + sal_Bool bTemp(sal_False); + if (aValue >>= bTemp) { - sal_Bool bTemp = *(sal_Bool*)aValue.getValue(); rSortOpt.bIgnoreCase = !bTemp; } else @@ -2736,10 +2887,10 @@ sal_Bool SwXTextCursor::convertSortProperties( bRet = sal_False; } } - else if (COMPARE_EQUAL == rPropName.compareToAscii("CollatorLocale")) + else if (rPropName.equalsAscii("CollatorLocale")) { bOldSortdescriptor = sal_True; - Locale aLocale; + lang::Locale aLocale; if (aValue >>= aLocale) { rSortOpt.nLanguage = SvxLocaleToLanguage( aLocale ); @@ -2749,8 +2900,7 @@ sal_Bool SwXTextCursor::convertSortProperties( bRet = sal_False; } } - else if (COMPARE_EQUAL == rPropName.compareToAscii("CollatorAlgorithm", - 17) && + else if (rPropName.matchAsciiL("CollatorAlgorithm", 17) && rPropName.getLength() == 18 && (rPropName.getStr()[17] >= '0' && rPropName.getStr()[17] <= '9')) { @@ -2767,8 +2917,7 @@ sal_Bool SwXTextCursor::convertSortProperties( bRet = sal_False; } } - else if (COMPARE_EQUAL == rPropName.compareToAscii("SortRowOrColumnNo", - 17) && + else if (rPropName.matchAsciiL("SortRowOrColumnNo", 17) && rPropName.getLength() == 18 && (rPropName.getStr()[17] >= '0' && rPropName.getStr()[17] <= '9')) { @@ -2826,7 +2975,7 @@ sal_Bool SwXTextCursor::convertSortProperties( } } // new sortdescriptor - else if (COMPARE_EQUAL == rPropName.compareToAscii("IsSortColumns")) + else if (rPropName.equalsAscii("IsSortColumns")) { bNewSortdescriptor = sal_True; if (aValue.getValueType() == ::getBooleanCppuType()) @@ -2839,7 +2988,7 @@ sal_Bool SwXTextCursor::convertSortProperties( bRet = sal_False; } } - else if (COMPARE_EQUAL == rPropName.compareToAscii("SortFields")) + else if (rPropName.equalsAscii("SortFields")) { bNewSortdescriptor = sal_True; uno::Sequence < table::TableSortField > aFields; @@ -2917,7 +3066,7 @@ throw (uno::RuntimeException) if (pUnoCrsr->HasMark()) { - if (!SwXTextCursor::convertSortProperties(rDescriptor, aSortOpt)) + if (!SwUnoCursorHelper::ConvertSortProperties(rDescriptor, aSortOpt)) { throw uno::RuntimeException(); } diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 1bdd873ff9..e1abe7a715 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -80,7 +80,6 @@ #include #include #include -#include #include #include #include @@ -132,14 +131,6 @@ using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::text; -using namespace ::com::sun::star::container; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::drawing; - using ::rtl::OUString; @@ -359,28 +350,29 @@ void ClientModify(SwClient* pClient, SfxPoolItem *pOld, SfxPoolItem *pNew) /*-- 09.12.98 14:19:03--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextCursor::SetCrsrAttr(SwPaM& rPam, const SfxItemSet& rSet, USHORT nAttrMode) +void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam, + const SfxItemSet& rSet, + const SetAttrMode nAttrMode, const bool bTableMode) { - sal_uInt16 nFlags = nsSetAttrMode::SETATTR_APICALL | (nAttrMode & nsSetAttrMode::SETATTR_NOFORMATATTR); - if(nAttrMode & CRSR_ATTR_MODE_DONTREPLACE) - nFlags |= nsSetAttrMode::SETATTR_DONTREPLACE; + const SetAttrMode nFlags = nAttrMode | nsSetAttrMode::SETATTR_APICALL; SwDoc* pDoc = rPam.GetDoc(); //StartEndAction UnoActionContext aAction(pDoc); - SwPaM* pCrsr = &rPam; - if( pCrsr->GetNext() != pCrsr ) // Ring von Cursorn + if (rPam.GetNext() != &rPam) // Ring of Cursors { pDoc->StartUndo(UNDO_INSATTR, NULL); - SwPaM *_pStartCrsr = &rPam; + SwPaM *pCurrent = &rPam; do { - if( _pStartCrsr->HasMark() && ( (CRSR_ATTR_MODE_TABLE & nAttrMode) || - *_pStartCrsr->GetPoint() != *_pStartCrsr->GetMark() )) + if (pCurrent->HasMark() && + ( (bTableMode) || + (*pCurrent->GetPoint() != *pCurrent->GetMark()) )) { - pDoc->InsertItemSet(*_pStartCrsr, rSet, nFlags); + pDoc->InsertItemSet(*pCurrent, rSet, nFlags); } - } while( (_pStartCrsr=(SwPaM *)_pStartCrsr->GetNext()) != &rPam ); + pCurrent= static_cast(pCurrent->GetNext()); + } while (pCurrent != &rPam); pDoc->EndUndo(UNDO_INSATTR, NULL); } @@ -388,7 +380,7 @@ void SwXTextCursor::SetCrsrAttr(SwPaM& rPam, const SfxItemSet& rSet, USHORT nAtt { // if( !HasSelection() ) // UpdateAttr(); - pDoc->InsertItemSet( *pCrsr, rSet, nFlags ); + pDoc->InsertItemSet( rPam, rSet, nFlags ); } //#outline level,add by zhaojianwei if( rSet.GetItemState( RES_PARATR_OUTLINELEVEL, false ) >= SFX_ITEM_AVAILABLE ) @@ -398,7 +390,6 @@ void SwXTextCursor::SetCrsrAttr(SwPaM& rPam, const SfxItemSet& rSet, USHORT nAtt { rPam.GetDoc()->GetNodes().UpdateOutlineNode( *pTmpNode ); } - } //<-end,zhaojianwei } @@ -408,72 +399,72 @@ void SwXTextCursor::SetCrsrAttr(SwPaM& rPam, const SfxItemSet& rSet, USHORT nAtt // --> OD 2006-07-12 #i63870# // split third parameter into new parameters // and to get better control about resulting -void SwXTextCursor::GetCrsrAttr( SwPaM& rPam, - SfxItemSet& rSet, - BOOL bOnlyTxtAttr, - BOOL bGetFromChrFmt ) +void SwUnoCursorHelper::GetCrsrAttr(SwPaM & rPam, + SfxItemSet & rSet, const bool bOnlyTxtAttr, const bool bGetFromChrFmt) { static const sal_uInt16 nMaxLookup = 1000; SfxItemSet aSet( *rSet.GetPool(), rSet.GetRanges() ); SfxItemSet *pSet = &rSet; - SwPaM *_pStartCrsr = &rPam; + SwPaM *pCurrent = & rPam; do { - ULONG nSttNd = _pStartCrsr->GetMark()->nNode.GetIndex(), - nEndNd = _pStartCrsr->GetPoint()->nNode.GetIndex(); - xub_StrLen nSttCnt = _pStartCrsr->GetMark()->nContent.GetIndex(), - nEndCnt = _pStartCrsr->GetPoint()->nContent.GetIndex(); - - if( nSttNd > nEndNd || ( nSttNd == nEndNd && nSttCnt > nEndCnt )) - { - sal_uInt32 nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp; - nTmp = nSttCnt; nSttCnt = nEndCnt; nEndCnt = (sal_uInt16)nTmp; - } + SwPosition const & rStart( *pCurrent->Start() ); + SwPosition const & rEnd( *pCurrent->End() ); + const ULONG nSttNd = rStart.nNode.GetIndex(); + const ULONG nEndNd = rEnd .nNode.GetIndex(); - if( nEndNd - nSttNd >= nMaxLookup ) - { - rSet.ClearItem(); - rSet.InvalidateAllItems(); - return;// uno::Any(); - } + if (nEndNd - nSttNd >= nMaxLookup) + { + rSet.ClearItem(); + rSet.InvalidateAllItems(); + return;// uno::Any(); + } - // beim 1.Node traegt der Node die Werte in den GetSet ein (Initial) - // alle weiteren Nodes werden zum GetSet zu gemergt - for( ULONG n = nSttNd; n <= nEndNd; ++n ) + // the first node inserts the values into the get set + // all other nodes merge their values into the get set + for (ULONG n = nSttNd; n <= nEndNd; ++n) + { + SwNode *const pNd = rPam.GetDoc()->GetNodes()[ n ]; + switch (pNd->GetNodeType()) { - SwNode* pNd = rPam.GetDoc()->GetNodes()[ n ]; - switch( pNd->GetNodeType() ) - { case ND_TEXTNODE: - { - xub_StrLen nStt = n == nSttNd ? nSttCnt : 0, - nEnd = n == nEndNd ? nEndCnt - : ((SwTxtNode*)pNd)->GetTxt().Len(); - ((SwTxtNode*)pNd)->GetAttr( *pSet, nStt, nEnd, bOnlyTxtAttr, bGetFromChrFmt ); - } - break; + { + const xub_StrLen nStart = (n == nSttNd) + ? rStart.nContent.GetIndex() : 0; + const xub_StrLen nEnd = (n == nEndNd) + ? rEnd.nContent.GetIndex() + : static_cast(pNd)->GetTxt().Len(); + static_cast(pNd)->GetAttr( + *pSet, nStart, nEnd, bOnlyTxtAttr, bGetFromChrFmt); + } + break; case ND_GRFNODE: case ND_OLENODE: - ((SwCntntNode*)pNd)->GetAttr( *pSet ); - break; + static_cast(pNd)->GetAttr( *pSet ); + break; default: - pNd = 0; - } - - if( pNd ) - { - if( pSet != &rSet ) - rSet.MergeValues( aSet ); - - if( aSet.Count() ) - aSet.ClearItem(); + continue; // skip this node + } - } + if (pSet != &rSet) + { + rSet.MergeValues( aSet ); + } + else + { pSet = &aSet; } - } while( (_pStartCrsr=(SwPaM *)_pStartCrsr->GetNext()) != &rPam ); + + if (aSet.Count()) + { + aSet.ClearItem(); + } + } + pCurrent= static_cast(pCurrent->GetNext()); + } while ( pCurrent != &rPam ); } + /****************************************************************** * SwXParagraphEnumeration ******************************************************************/ @@ -967,7 +958,7 @@ throw (uno::RuntimeException) SwUnoCursorHelper::DocInsertStringSplitCR( m_pImpl->m_rDoc, aCursor, rText, bForceExpandHints); - SwXTextCursor::SelectPam(aCursor, sal_True); + SwUnoCursorHelper::SelectPam(aCursor, true); aCursor.Left(rText.getLength(), CRSR_SKIP_CHARS, FALSE, FALSE); } SetPositions(aCursor); @@ -1111,7 +1102,7 @@ OUString SAL_CALL SwXTextRange::getString() throw (uno::RuntimeException) SwPaM aPaM(GetDoc()->GetNodes()); if (GetPositions(aPaM) && aPaM.HasMark()) { - SwXTextCursor::getTextFromPam(aPaM, sRet); + SwUnoCursorHelper::GetTextFromPam(aPaM, sRet); } return sRet; } @@ -1488,7 +1479,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, } SwPaM aPaM(GetDoc()->GetNodes()); GetPositions(aPaM); - SwXTextCursor::SetPropertyValue(aPaM, m_pImpl->m_rPropSet, + SwUnoCursorHelper::SetPropertyValue(aPaM, m_pImpl->m_rPropSet, rPropertyName, rValue); } @@ -1505,7 +1496,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, } SwPaM aPaM(GetDoc()->GetNodes()); GetPositions(aPaM); - return SwXTextCursor::GetPropertyValue(aPaM, m_pImpl->m_rPropSet, + return SwUnoCursorHelper::GetPropertyValue(aPaM, m_pImpl->m_rPropSet, rPropertyName); } @@ -1565,7 +1556,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) } SwPaM aPaM(GetDoc()->GetNodes()); GetPositions(aPaM); - return SwXTextCursor::GetPropertyState(aPaM, m_pImpl->m_rPropSet, + return SwUnoCursorHelper::GetPropertyState(aPaM, m_pImpl->m_rPropSet, rPropertyName); } @@ -1581,7 +1572,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) } SwPaM aPaM(GetDoc()->GetNodes()); GetPositions(aPaM); - return SwXTextCursor::GetPropertyStates(aPaM, m_pImpl->m_rPropSet, + return SwUnoCursorHelper::GetPropertyStates(aPaM, m_pImpl->m_rPropSet, rPropertyName); } @@ -1596,7 +1587,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) } SwPaM aPaM(GetDoc()->GetNodes()); GetPositions(aPaM); - SwXTextCursor::SetPropertyToDefault(aPaM, m_pImpl->m_rPropSet, + SwUnoCursorHelper::SetPropertyToDefault(aPaM, m_pImpl->m_rPropSet, rPropertyName); } @@ -1613,7 +1604,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, } SwPaM aPaM(GetDoc()->GetNodes()); GetPositions(aPaM); - return SwXTextCursor::GetPropertyDefault(aPaM, m_pImpl->m_rPropSet, + return SwUnoCursorHelper::GetPropertyDefault(aPaM, m_pImpl->m_rPropSet, rPropertyName); } @@ -1834,24 +1825,25 @@ sal_Bool SAL_CALL SwXTextRanges::hasElements() throw (uno::RuntimeException) /* -----------------11.12.98 10:07------------------- * * --------------------------------------------------*/ -void SwXTextCursor::SetString(SwCursor& rCrsr, const OUString& rString) +void SwUnoCursorHelper::SetString(SwCursor & rCursor, const OUString& rString) { // Start/EndAction - SwDoc* pDoc = rCrsr.GetDoc(); + SwDoc *const pDoc = rCursor.GetDoc(); UnoActionContext aAction(pDoc); - String aText(rString); - xub_StrLen nTxtLen = aText.Len(); pDoc->StartUndo(UNDO_INSERT, NULL); - if(rCrsr.HasMark()) - pDoc->DeleteAndJoin(rCrsr); - if(nTxtLen) + if (rCursor.HasMark()) + { + pDoc->DeleteAndJoin(rCursor); + } + if (rString.getLength()) { + String aText(rString); const bool bSuccess( SwUnoCursorHelper::DocInsertStringSplitCR( - *pDoc, rCrsr, aText, false ) ); + *pDoc, rCursor, aText, false ) ); DBG_ASSERT( bSuccess, "DocInsertStringSplitCR" ); (void) bSuccess; - SwXTextCursor::SelectPam(rCrsr, sal_True); - rCrsr.Left(nTxtLen, CRSR_SKIP_CHARS, FALSE, FALSE); + SwUnoCursorHelper::SelectPam(rCursor, true); + rCursor.Left(rString.getLength(), CRSR_SKIP_CHARS, FALSE, FALSE); } pDoc->EndUndo(UNDO_INSERT, NULL); } diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index ee6af202af..57389df869 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -457,7 +456,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, + pPropertyNames[nProp], static_cast< cppu::OWeakObject * >(&m_rThis)); } - SwXTextCursor::SetPropertyValue(aCursor, m_rPropSet, + SwUnoCursorHelper::SetPropertyValue(aCursor, m_rPropSet, pPropertyNames[nProp], pValues[nProp]); } } @@ -659,7 +658,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) } else { - SwXTextCursor::SetPropertyValue( + SwUnoCursorHelper::SetPropertyValue( aCursor, m_pImpl->m_rPropSet, pProp[i], pValue[i]); } } @@ -973,7 +972,7 @@ throw (beans::UnknownPropertyException) case FN_UNO_PARA_STYLE: case FN_UNO_PARA_CONDITIONAL_STYLE_NAME: { - SwFmtColl* pFmt = SwXTextCursor::GetCurTxtFmtColl( + SwFmtColl* pFmt = SwUnoCursorHelper::GetCurTxtFmtColl( aPam, rEntry.nWID == FN_UNO_PARA_CONDITIONAL_STYLE_NAME); eRet = pFmt ? beans::PropertyState_DIRECT_VALUE : beans::PropertyState_AMBIGUOUS_VALUE; @@ -1132,7 +1131,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) pTemp->SetMark(); *pTemp->GetPoint() = aEnd; //pTemp->Exchange(); - SwXTextCursor::SelectPam(*pTemp, sal_True); + SwUnoCursorHelper::SelectPam(*pTemp, true); if (!SwUnoCursorHelper::IsEndOfPara(*pTemp)) { pTemp->MovePara(fnParaCurr, fnParaEnd); @@ -1365,7 +1364,7 @@ OUString SAL_CALL SwXParagraph::getString() throw (uno::RuntimeException) SwPosition aPos( *pTxtNode ); SwCursor aCursor( aPos, 0, false ); SwParaSelection aParaSel( aCursor ); - SwXTextCursor::getTextFromPam(aCursor, aRet); + SwUnoCursorHelper::GetTextFromPam(aCursor, aRet); } else if (m_pImpl->IsDescriptor()) { @@ -1393,12 +1392,12 @@ throw (uno::RuntimeException) if (!SwUnoCursorHelper::IsStartOfPara(aCursor)) { aCursor.MovePara(fnParaCurr, fnParaStart); } - SwXTextCursor::SelectPam(aCursor, sal_True); + SwUnoCursorHelper::SelectPam(aCursor, true); if (pTxtNode->GetTxt().Len()) { aCursor.MovePara(fnParaCurr, fnParaEnd); } - SwXTextCursor::SetString(aCursor, aString); - SwXTextCursor::SelectPam(aCursor, sal_False); + SwUnoCursorHelper::SetString(aCursor, aString); + SwUnoCursorHelper::SelectPam(aCursor, false); } else if (m_pImpl->IsDescriptor()) { diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index 8ddb5a7f20..a8e879f56a 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include @@ -241,7 +240,7 @@ void SwXTextPortion::setString(const OUString& aString) throw( uno::RuntimeExcep if (!pUnoCrsr) throw uno::RuntimeException(); - SwXTextCursor::SetString(*pUnoCrsr, aString); + SwUnoCursorHelper::SetString(*pUnoCrsr, aString); } /*-- 11.12.98 09:56:57--------------------------------------------------- @@ -275,7 +274,7 @@ void SwXTextPortion::setPropertyValue(const OUString& rPropertyName, if (!pUnoCrsr) throw uno::RuntimeException(); - SwXTextCursor::SetPropertyValue(*pUnoCrsr, *m_pPropSet, + SwUnoCursorHelper::SetPropertyValue(*pUnoCrsr, *m_pPropSet, rPropertyName, aValue); } /*-- 04.11.03 09:56:58--------------------------------------------------- @@ -426,7 +425,7 @@ void SwXTextPortion::GetPropertyValue( RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER, 0L); - SwXTextCursor::GetCrsrAttr(*pUnoCrsr, *pSet); + SwUnoCursorHelper::GetCrsrAttr(*pUnoCrsr, *pSet); } m_pPropSet->getPropertyValue(rEntry, *pSet, rVal); } @@ -503,7 +502,7 @@ void SAL_CALL SwXTextPortion::SetPropertyValues_Impl( if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) throw beans::PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); - SwXTextCursor::SetPropertyValue( *pUnoCrsr, *m_pPropSet, + SwUnoCursorHelper::SetPropertyValue( *pUnoCrsr, *m_pPropSet, pPropertyNames[nProp], pValues[nProp]); } } @@ -606,7 +605,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL SwXTextPortion::setPr pFailed[ nFailed++ ].Result = beans::TolerantPropertySetResultType::PROPERTY_VETO; else { - SwXTextCursor::SetPropertyValue( + SwUnoCursorHelper::SetPropertyValue( *pUnoCrsr, *m_pPropSet, pProp[i], pValue[i] ); } } @@ -683,7 +682,8 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion: const SfxItemPropertyMap* pPropMap = m_pPropSet->getPropertyMap(); - uno::Sequence< beans::PropertyState > aPropertyStates = SwXTextCursor::GetPropertyStates( + uno::Sequence< beans::PropertyState > aPropertyStates = + SwUnoCursorHelper::GetPropertyStates( *pUnoCrsr, *m_pPropSet, rPropertyNames, SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT ); @@ -832,7 +832,7 @@ beans::PropertyState SwXTextPortion::getPropertyState(const OUString& rPropertyN } else { - eRet = SwXTextCursor::GetPropertyState(*pUnoCrsr, *m_pPropSet, + eRet = SwUnoCursorHelper::GetPropertyState(*pUnoCrsr, *m_pPropSet, rPropertyName); } return eRet; @@ -850,7 +850,7 @@ uno::Sequence< beans::PropertyState > SwXTextPortion::getPropertyStates( throw uno::RuntimeException(); uno::Sequence< beans::PropertyState > aRet = - SwXTextCursor::GetPropertyStates(*pUnoCrsr, *m_pPropSet, + SwUnoCursorHelper::GetPropertyStates(*pUnoCrsr, *m_pPropSet, rPropertyNames, SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION); if(GetTextPortionType() == PORTION_RUBY_START) @@ -876,7 +876,8 @@ void SwXTextPortion::setPropertyToDefault(const OUString& rPropertyName) if (!pUnoCrsr) throw uno::RuntimeException(); - SwXTextCursor::SetPropertyToDefault(*pUnoCrsr, *m_pPropSet, rPropertyName); + SwUnoCursorHelper::SetPropertyToDefault( + *pUnoCrsr, *m_pPropSet, rPropertyName); } /*-- 08.03.99 09:41:48--------------------------------------------------- @@ -890,7 +891,7 @@ uno::Any SwXTextPortion::getPropertyDefault(const OUString& rPropertyName) if (!pUnoCrsr) throw uno::RuntimeException(); - aRet = SwXTextCursor::GetPropertyDefault(*pUnoCrsr, *m_pPropSet, + aRet = SwUnoCursorHelper::GetPropertyDefault(*pUnoCrsr, *m_pPropSet, rPropertyName); return aRet; } diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 931038335d..10c6c1eb07 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include #include @@ -1150,7 +1150,7 @@ lcl_CreatePortions( // text at nCurrentIndex; i.e. it must be set _once_ per iteration uno::Reference< XTextRange > xRef; - SwXTextCursor::SelectPam(*pUnoCrsr, sal_True); // set mark + SwUnoCursorHelper::SelectPam(*pUnoCrsr, true); // set mark const sal_Int32 nFirstFrameIndex = lcl_ExportFrames( *PortionStack.top().first, diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index d9d6bafa31..fbe7e6e7eb 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 497f09fa8d..117a96cadc 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -109,10 +109,6 @@ using ::rtl::OUString; //----------------------------------------------------------------------------- -// from unoobj.cxx -extern void lcl_SetTxtFmtColl(const uno::Any& rAny, SwPaM& rPaM) throw (lang::IllegalArgumentException); -extern void lcl_setCharStyle(SwDoc* pDoc, const uno::Any aValue, SfxItemSet& rSet) throw (lang::IllegalArgumentException); - // from swtable.cxx extern void lcl_GetTblBoxColStr( sal_uInt16 nCol, String& rNm ); @@ -1854,12 +1850,6 @@ uno::Reference< beans::XPropertySetInfo > SwXTextTableCursor::getPropertySetInf /*-- 11.12.98 12:16:17--------------------------------------------------- -----------------------------------------------------------------------*/ -extern sal_Bool lcl_setCrsrPropertyValue(const SfxItemPropertySimpleEntry* pEntry, - SwPaM& rPam, - SfxItemSet& rSet, - const uno::Any& aValue ) throw (lang::IllegalArgumentException); - - void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue) throw( beans::UnknownPropertyException, @@ -1903,16 +1893,21 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, } break; case FN_UNO_PARA_STYLE: - lcl_SetTxtFmtColl(aValue, *pUnoCrsr); + SwUnoCursorHelper::SetTxtFmtColl(aValue, *pUnoCrsr); break; default: { SfxItemSet aItemSet( pDoc->GetAttrPool(), pEntry->nWID, pEntry->nWID ); - SwXTextCursor::GetCrsrAttr( pTblCrsr->GetSelRing(), aItemSet ); + SwUnoCursorHelper::GetCrsrAttr(pTblCrsr->GetSelRing(), + aItemSet); - if(!lcl_setCrsrPropertyValue( pEntry, pTblCrsr->GetSelRing(), aItemSet, aValue )) - m_pPropSet->setPropertyValue( *pEntry, aValue, aItemSet ); - SwXTextCursor::SetCrsrAttr( pTblCrsr->GetSelRing(), aItemSet, CRSR_ATTR_MODE_TABLE ); + if (!SwUnoCursorHelper::SetCursorPropertyValue( + *pEntry, aValue, pTblCrsr->GetSelRing(), aItemSet)) + { + m_pPropSet->setPropertyValue(*pEntry, aValue, aItemSet); + } + SwUnoCursorHelper::SetCrsrAttr(pTblCrsr->GetSelRing(), + aItemSet, nsSetAttrMode::SETATTR_DEFAULT, true); } } } @@ -1956,7 +1951,8 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName) break; case FN_UNO_PARA_STYLE: { - SwFmtColl* pFmt = SwXTextCursor::GetCurTxtFmtColl(*pUnoCrsr, FALSE); + SwFmtColl *const pFmt = + SwUnoCursorHelper::GetCurTxtFmtColl(*pUnoCrsr, FALSE); OUString sRet; if(pFmt) sRet = pFmt->GetName(); @@ -1970,7 +1966,8 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName) RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER, 0L); // erstmal die Attribute des Cursors - SwXTextCursor::GetCrsrAttr(pTblCrsr->GetSelRing(), aSet); + SwUnoCursorHelper::GetCrsrAttr(pTblCrsr->GetSelRing(), + aSet); m_pPropSet->getPropertyValue(*pEntry, aSet, aRet); } } @@ -3162,7 +3159,8 @@ uno::Sequence< beans::PropertyValue > SwXTextTable::createSortDescriptor(void) throw( uno::RuntimeException ) { vos::OGuard aGuard(Application::GetSolarMutex()); - return SwXTextCursor::createSortDescriptor(sal_True); + + return SwUnoCursorHelper::CreateSortDescriptor(true); } /*-- 11.12.98 12:42:49--------------------------------------------------- @@ -3174,7 +3172,7 @@ void SwXTextTable::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor SwSortOptions aSortOpt; SwFrmFmt* pFmt = GetFrmFmt(); if(pFmt && - SwXTextCursor::convertSortProperties(rDescriptor, aSortOpt)) + SwUnoCursorHelper::ConvertSortProperties(rDescriptor, aSortOpt)) { SwTable* pTable = SwTable::FindTable( pFmt ); SwSelBoxes aBoxes; @@ -4157,11 +4155,16 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, default: { SfxItemSet aItemSet( pDoc->GetAttrPool(), pEntry->nWID, pEntry->nWID ); - SwXTextCursor::GetCrsrAttr( pCrsr->GetSelRing(), aItemSet ); + SwUnoCursorHelper::GetCrsrAttr(pCrsr->GetSelRing(), + aItemSet); - if(!lcl_setCrsrPropertyValue( pEntry, pCrsr->GetSelRing(), aItemSet, aValue )) - m_pPropSet->setPropertyValue(*pEntry, aValue, aItemSet ); - SwXTextCursor::SetCrsrAttr(pCrsr->GetSelRing(), aItemSet, CRSR_ATTR_MODE_TABLE ); + if (!SwUnoCursorHelper::SetCursorPropertyValue( + *pEntry, aValue, pCrsr->GetSelRing(), aItemSet)) + { + m_pPropSet->setPropertyValue(*pEntry, aValue, aItemSet); + } + SwUnoCursorHelper::SetCrsrAttr(pCrsr->GetSelRing(), + aItemSet, nsSetAttrMode::SETATTR_DEFAULT, true); } } } @@ -4214,7 +4217,8 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName) throw( be break; case FN_UNO_PARA_STYLE: { - SwFmtColl* pTmpFmt = SwXTextCursor::GetCurTxtFmtColl(*pTblCrsr, FALSE); + SwFmtColl *const pTmpFmt = + SwUnoCursorHelper::GetCurTxtFmtColl(*pTblCrsr, FALSE); OUString sRet; if(pFmt) sRet = pTmpFmt->GetName(); @@ -4242,7 +4246,7 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName) throw( be 0L); // erstmal die Attribute des Cursors SwUnoTableCrsr* pCrsr = dynamic_cast(pTblCrsr); - SwXTextCursor::GetCrsrAttr(pCrsr->GetSelRing(), aSet); + SwUnoCursorHelper::GetCrsrAttr(pCrsr->GetSelRing(), aSet); m_pPropSet->getPropertyValue(*pEntry, aSet, aRet); } } @@ -4875,7 +4879,8 @@ double SwXCellRange::getNotANumber(void) throw( uno::RuntimeException ) uno::Sequence< beans::PropertyValue > SwXCellRange::createSortDescriptor(void) throw( uno::RuntimeException ) { vos::OGuard aGuard(Application::GetSolarMutex()); - return SwXTextCursor::createSortDescriptor(sal_True); + + return SwUnoCursorHelper::CreateSortDescriptor(true); } /*-- 11.12.98 14:27:39--------------------------------------------------- @@ -4887,7 +4892,7 @@ void SAL_CALL SwXCellRange::sort(const uno::Sequence< beans::PropertyValue >& rD SwSortOptions aSortOpt; SwFrmFmt* pFmt = GetFrmFmt(); if(pFmt && - SwXTextCursor::convertSortProperties(rDescriptor, aSortOpt)) + SwUnoCursorHelper::ConvertSortProperties(rDescriptor, aSortOpt)) { SwUnoTableCrsr* pTableCrsr = dynamic_cast(pTblCrsr); pTableCrsr->MakeBoxSels(); diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index fb4e04b236..ee02e567ba 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -459,7 +459,7 @@ void SwXText::insertControlCharacter(const uno::Reference< text::XTextRange > & } SwCursor aCrsr(*aTmp.GetPoint(),0,false); - SwXTextCursor::SelectPam(aCrsr, sal_True); + SwUnoCursorHelper::SelectPam(aCrsr, true); aCrsr.Left(1, CRSR_SKIP_CHARS, FALSE, FALSE); //hier muss der uebergebene PaM umgesetzt werden: if(pRange) @@ -1359,11 +1359,9 @@ uno::Reference< text::XTextRange > SwXText::finishOrAppendParagraph( { try { - SwXTextCursor::SetPropertyValue( - aPam, - *pParaPropSet, - pValues[nProp].Name, - pValues[nProp].Value); + SwUnoCursorHelper::SetPropertyValue( + aPam, *pParaPropSet, + pValues[nProp].Name, pValues[nProp].Value); } catch( lang::IllegalArgumentException& rIllegal ) { @@ -1448,7 +1446,7 @@ uno::Reference< text::XTextRange > SwXText::appendTextPortion( xub_StrLen nContentPos = pCursor->GetPoint()->nContent.GetIndex(); SwUnoCursorHelper::DocInsertStringSplitCR( *pDoc, *pCursor, rText, false ); - SwXTextCursor::SelectPam(*pCursor, sal_True); + SwUnoCursorHelper::SelectPam(*pCursor, true); pCursor->GetPoint()->nContent = nContentPos; } @@ -1463,12 +1461,10 @@ uno::Reference< text::XTextRange > SwXText::appendTextPortion( { try { - SwXTextCursor::SetPropertyValue( - *pCursor, - *pCursorPropSet, - pValues[nProp].Name, - pValues[nProp].Value, - nsSetAttrMode::SETATTR_NOFORMATATTR); + SwUnoCursorHelper::SetPropertyValue( + *pCursor, *pCursorPropSet, + pValues[nProp].Name, pValues[nProp].Value, + nsSetAttrMode::SETATTR_NOFORMATATTR); } catch( lang::IllegalArgumentException& rIllegal ) { diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 3645be8506..b9a1bd8fd2 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -79,7 +79,7 @@ #include #include #include -#include +#include #include #include @@ -317,8 +317,9 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg : 0; if(pCursor && pCursor->GetDoc() == GetView()->GetDocShell()->GetDoc()) - pPam = lcl_createPamCopy(*((SwXTextCursor*)pCursor)->GetPaM()); - + { + pPam = lcl_createPamCopy(*pCursor->GetPaM()); + } } else if(xPosN.is() && xIfcTunnel.is() && @@ -1773,7 +1774,7 @@ OUString SwXTextViewCursor::getString(void) throw( uno::RuntimeException ) { SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); - SwXTextCursor::getTextFromPam(*pShellCrsr, uRet); + SwUnoCursorHelper::GetTextFromPam(*pShellCrsr, uRet); } default:;//prevent warning } @@ -1805,7 +1806,7 @@ void SwXTextViewCursor::setString(const OUString& aString) throw( uno::RuntimeEx { SwWrtShell& rSh = m_pView->GetWrtShell(); SwCursor* pShellCrsr = rSh.GetSwCrsr(); - SwXTextCursor::SetString( *pShellCrsr, aString ); + SwUnoCursorHelper::SetString(*pShellCrsr, aString); } default:;//prevent warning } @@ -1834,7 +1835,10 @@ void SwXTextViewCursor::setPropertyValue( const OUString& rPropertyName, const SwPaM* pShellCrsr = rSh.GetCrsr(); SwNode *pNode = pShellCrsr->GetNode(); if (pNode && pNode->IsTxtNode()) - SwXTextCursor::SetPropertyValue(*pShellCrsr, *m_pPropSet, rPropertyName, aValue ); + { + SwUnoCursorHelper::SetPropertyValue( + *pShellCrsr, *m_pPropSet, rPropertyName, aValue ); + } else throw RuntimeException(); } @@ -1853,7 +1857,8 @@ Any SwXTextViewCursor::getPropertyValue( const OUString& rPropertyName ) { SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); - aRet = SwXTextCursor::GetPropertyValue( *pShellCrsr, *m_pPropSet, rPropertyName); + aRet = SwUnoCursorHelper::GetPropertyValue( + *pShellCrsr, *m_pPropSet, rPropertyName); } else throw RuntimeException(); @@ -1902,7 +1907,8 @@ PropertyState SwXTextViewCursor::getPropertyState( const OUString& rPropertyNam { SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); - eState = SwXTextCursor::GetPropertyState( *pShellCrsr, *m_pPropSet, rPropertyName); + eState = SwUnoCursorHelper::GetPropertyState( + *pShellCrsr, *m_pPropSet, rPropertyName); } else throw RuntimeException(); @@ -1920,7 +1926,8 @@ Sequence< PropertyState > SwXTextViewCursor::getPropertyStates( { SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); - aRet = SwXTextCursor::GetPropertyStates(*pShellCrsr, *m_pPropSet, rPropertyNames); + aRet = SwUnoCursorHelper::GetPropertyStates( + *pShellCrsr, *m_pPropSet, rPropertyNames); } return aRet; } @@ -1935,7 +1942,8 @@ void SwXTextViewCursor::setPropertyToDefault( const OUString& rPropertyName ) { SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); - SwXTextCursor::SetPropertyToDefault( *pShellCrsr, *m_pPropSet, rPropertyName); + SwUnoCursorHelper::SetPropertyToDefault( + *pShellCrsr, *m_pPropSet, rPropertyName); } } /*-- 29.06.00 17:33:43--------------------------------------------------- @@ -1950,7 +1958,8 @@ Any SwXTextViewCursor::getPropertyDefault( const OUString& rPropertyName ) { SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); - aRet = SwXTextCursor::GetPropertyDefault( *pShellCrsr, *m_pPropSet, rPropertyName); + aRet = SwUnoCursorHelper::GetPropertyDefault( + *pShellCrsr, *m_pPropSet, rPropertyName); } return aRet; } -- cgit v1.2.3 From 2cf5b699718b5666a1a56468903c17bfde86d7b6 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:55 +0100 Subject: swunolocking1: #i105557#: SwXParagraph: move static methods to namespace sw. --- sw/inc/unoparagraph.hxx | 3 --- sw/inc/unotextrange.hxx | 3 +++ sw/source/core/unocore/unobkm.cxx | 3 +-- sw/source/core/unocore/unoftn.cxx | 2 +- sw/source/core/unocore/unoidx.cxx | 5 +++-- sw/source/core/unocore/unoparagraph.cxx | 10 +++++----- sw/source/core/unocore/unorefmk.cxx | 3 +-- sw/source/core/unocore/unosect.cxx | 5 ++--- sw/source/core/unocore/unotbl.cxx | 3 ++- 9 files changed, 18 insertions(+), 19 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx index b14aeb7dc3..add936e9c7 100644 --- a/sw/inc/unoparagraph.hxx +++ b/sw/inc/unoparagraph.hxx @@ -111,9 +111,6 @@ public: /// for SwXText void attachToText(SwXText & rParent, SwTxtNode & rTxtNode); - static bool getDefaultTextContentValue(::com::sun::star::uno::Any& rAny, - const ::rtl::OUString& rPropertyName, USHORT nWID = 0); - // MetadatableMixin virtual ::sfx2::Metadatable* GetCoreObject(); virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx index c3c3d362db..164b35b703 100644 --- a/sw/inc/unotextrange.hxx +++ b/sw/inc/unotextrange.hxx @@ -84,6 +84,9 @@ namespace sw { ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > CreateParentXText(SwDoc & rDoc, const SwPosition& rPos); + bool GetDefaultTextContentValue(::com::sun::star::uno::Any& rAny, + const ::rtl::OUString& rPropertyName, USHORT nWID = 0); + } // namespace sw diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index 561f145473..b0cb38b78f 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -37,7 +37,6 @@ #include #include -#include #include #include #include @@ -461,7 +460,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, vos::OGuard g(Application::GetSolarMutex()); uno::Any aRet; - if(!SwXParagraph::getDefaultTextContentValue(aRet, rPropertyName)) + if (! ::sw::GetDefaultTextContentValue(aRet, rPropertyName)) { if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_LINK_DISPLAY_NAME))) { diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index 26333dd73d..9d55ccd0c4 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -526,7 +526,7 @@ uno::Any SwXFootnote::getPropertyValue( const OUString& rPropertyName ) { vos::OGuard aGuard(Application::GetSolarMutex()); uno::Any aRet; - if(!SwXParagraph::getDefaultTextContentValue(aRet, rPropertyName)) + if (! ::sw::GetDefaultTextContentValue(aRet, rPropertyName)) { if(rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_START_REDLINE))|| rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_END_REDLINE))) diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 5cfaf16fc5..f89fb5a25b 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -57,7 +57,6 @@ #include #include #include -#include #include #include #include @@ -1784,8 +1783,10 @@ uno::Any SwXDocumentIndexMark::getPropertyValue(const OUString& rPropertyName) const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName(rPropertyName); if (!pEntry) throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); - if(SwXParagraph::getDefaultTextContentValue(aRet, rPropertyName, pEntry->nWID)) + if (::sw::GetDefaultTextContentValue(aRet, rPropertyName, pEntry->nWID)) + { return aRet; + } if(pType && m_pTOXMark) { switch(pEntry->nWID) diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 57389df869..1913c3ba6b 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -512,8 +512,8 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, + pPropertyNames[nProp], static_cast< cppu::OWeakObject * >(&m_rThis)); } - if (!SwXParagraph::getDefaultTextContentValue( - pValues[nProp], pPropertyNames[nProp], pEntry->nWID)) + if (! ::sw::GetDefaultTextContentValue( + pValues[nProp], pPropertyNames[nProp], pEntry->nWID)) { beans::PropertyState eTemp; const bool bDone = SwUnoCursorHelper::getCrsrPropertyValue( @@ -788,7 +788,7 @@ throw (uno::RuntimeException) // get property value // (compare to SwXParagraph::getPropertyValue(s)) uno::Any aValue; - if (!SwXParagraph::getDefaultTextContentValue( + if (! ::sw::GetDefaultTextContentValue( aValue, pProp[i], pEntry->nWID ) ) { SwPosition aPos( rTxtNode ); @@ -848,7 +848,7 @@ throw (uno::RuntimeException) /* -----------------------------12.09.00 11:09-------------------------------- ---------------------------------------------------------------------------*/ -bool SwXParagraph::getDefaultTextContentValue( +bool ::sw::GetDefaultTextContentValue( uno::Any& rAny, const OUString& rPropertyName, USHORT nWID) { if(!nWID) @@ -1158,7 +1158,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow()); uno::Any aRet; - if (SwXParagraph::getDefaultTextContentValue(aRet, rPropertyName)) + if (::sw::GetDefaultTextContentValue(aRet, rPropertyName)) { return aRet; } diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index c8b4927b09..a9d58c7e69 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -510,7 +509,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, { // does not seem to need SolarMutex uno::Any aRet; - if(!SwXParagraph::getDefaultTextContentValue(aRet, rPropertyName)) + if (! ::sw::GetDefaultTextContentValue(aRet, rPropertyName)) { throw beans::UnknownPropertyException(); } diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index fbe7e6e7eb..907a2a617c 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -1186,7 +1185,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, case FN_UNO_ANCHOR_TYPES: case FN_UNO_TEXT_WRAP: case FN_UNO_ANCHOR_TYPE: - SwXParagraph::getDefaultTextContentValue( + ::sw::GetDefaultTextContentValue( pRet[nProperty], OUString(), pEntry->nWID); break; case FN_UNO_REDLINE_NODE_START: @@ -1756,7 +1755,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, case FN_UNO_ANCHOR_TYPES: case FN_UNO_TEXT_WRAP: case FN_UNO_ANCHOR_TYPE: - SwXParagraph::getDefaultTextContentValue(aRet, OUString(), pEntry->nWID); + ::sw::GetDefaultTextContentValue(aRet, OUString(), pEntry->nWID); break; default: if(pFmt && pEntry->nWID <= SFX_WHICH_MAX) diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 117a96cadc..ed38bda74a 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -3472,7 +3472,8 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be case FN_UNO_ANCHOR_TYPES: case FN_UNO_TEXT_WRAP: case FN_UNO_ANCHOR_TYPE: - SwXParagraph::getDefaultTextContentValue(aRet, OUString(), pEntry->nWID); + ::sw::GetDefaultTextContentValue( + aRet, OUString(), pEntry->nWID); break; case FN_UNO_RANGE_ROW_LABEL: { -- cgit v1.2.3 From 57ffb75de22462c54ad06c89691432ae81a0e341 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:55 +0100 Subject: swunolocking1: #i105557#: SwXBodyText: make SwXBodyText::CreateTextCursor() return a pointer, not a UNO reference. --- sw/inc/unotextbodyhf.hxx | 4 +-- sw/source/core/unocore/unotext.cxx | 50 ++++++++++++++++++++------------------ sw/source/ui/uno/unotxdoc.cxx | 15 +++--------- 3 files changed, 33 insertions(+), 36 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unotextbodyhf.hxx b/sw/inc/unotextbodyhf.hxx index 8e7a64c186..baab8bc158 100644 --- a/sw/inc/unotextbodyhf.hxx +++ b/sw/inc/unotextbodyhf.hxx @@ -45,6 +45,7 @@ class SwDoc; class SwFrmFmt; +class SwXTextCursor; typedef ::cppu::WeakAggImplHelper2 @@ -65,8 +66,7 @@ public: SwXBodyText(SwDoc* pDoc); - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > - CreateTextCursor(sal_Bool bIgnoreTables = sal_False); + SwXTextCursor * CreateTextCursor(const bool bIgnoreTables = false); // XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index ee02e567ba..f787f0e0fc 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2301,46 +2301,50 @@ throw (uno::RuntimeException) /* -----------------------------05.01.00 11:07-------------------------------- ---------------------------------------------------------------------------*/ -uno::Reference< text::XTextCursor > SwXBodyText::CreateTextCursor(sal_Bool bIgnoreTables) +SwXTextCursor * SwXBodyText::CreateTextCursor(const bool bIgnoreTables) { - uno::Reference< text::XTextCursor > xRet; - if(IsValid()) + if(!IsValid()) { - SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent(); - //the cursor has to skip tables contained in this text - SwPaM aPam(rNode); - aPam.Move( fnMoveBackward, fnGoDoc ); - if(!bIgnoreTables) + return 0; + } + + // the cursor has to skip tables contained in this text + SwPaM aPam(GetDoc()->GetNodes().GetEndOfContent()); + aPam.Move( fnMoveBackward, fnGoDoc ); + if (!bIgnoreTables) + { + SwTableNode * pTblNode = aPam.GetNode()->FindTableNode(); + SwCntntNode * pCont = 0; + while (pTblNode) { - SwTableNode* pTblNode = aPam.GetNode()->FindTableNode(); - SwCntntNode* pCont = 0; - while( pTblNode ) - { - aPam.GetPoint()->nNode = *pTblNode->EndOfSectionNode(); - pCont = GetDoc()->GetNodes().GoNext(&aPam.GetPoint()->nNode); - pTblNode = pCont->FindTableNode(); - } - if(pCont) - aPam.GetPoint()->nContent.Assign(pCont, 0); + aPam.GetPoint()->nNode = *pTblNode->EndOfSectionNode(); + pCont = GetDoc()->GetNodes().GoNext(&aPam.GetPoint()->nNode); + pTblNode = pCont->FindTableNode(); + } + if (pCont) + { + aPam.GetPoint()->nContent.Assign(pCont, 0); } - xRet = (text::XWordCursor*)new SwXTextCursor(this, *aPam.GetPoint(), CURSOR_BODY, GetDoc()); } - return xRet; + return new SwXTextCursor(this, *aPam.GetPoint(), CURSOR_BODY, GetDoc()); } + /*-- 10.12.98 11:17:29--------------------------------------------------- -----------------------------------------------------------------------*/ uno::Reference< text::XTextCursor > SwXBodyText::createTextCursor(void) throw( uno::RuntimeException ) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextCursor > aRef = CreateTextCursor(sal_False); - if(!aRef.is()) + + const uno::Reference< text::XTextCursor > xRef( + static_cast(CreateTextCursor(false)) ); + if (!xRef.is()) { uno::RuntimeException aRuntime; aRuntime.Message = C2U(cInvalidObject); throw aRuntime; } - return aRef; + return xRef; } /*-- 10.12.98 11:17:29--------------------------------------------------- diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 4b6e67a8d7..97e419d050 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -728,19 +728,12 @@ Reference< util::XReplaceDescriptor > SwXTextDocument::createReplaceDescriptor( SwUnoCrsr* SwXTextDocument::CreateCursorForSearch(Reference< XTextCursor > & xCrsr) { getText(); - XText* pText = xBodyText.get(); + XText *const pText = xBodyText.get(); SwXBodyText* pBText = (SwXBodyText*)pText; - xCrsr = pBText->CreateTextCursor(sal_True); + SwXTextCursor *const pXTextCursor = pBText->CreateTextCursor(true); + xCrsr.set( static_cast(pXTextCursor) ); - Reference xRangeTunnel( xCrsr, UNO_QUERY); - SwXTextCursor* pxUnoCrsr = 0; - if(xRangeTunnel.is()) - { - pxUnoCrsr = reinterpret_cast(xRangeTunnel->getSomething( - SwXTextCursor::getUnoTunnelId())); - } - - SwUnoCrsr* pUnoCrsr = pxUnoCrsr->GetCrsr(); + SwUnoCrsr *const pUnoCrsr = pXTextCursor->GetCrsr(); pUnoCrsr->SetRemainInSection(sal_False); return pUnoCrsr; } -- cgit v1.2.3 From 62f4f6722efbf8f284f927eb66255c5322ce7306 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:55 +0100 Subject: swunolocking1: #i105557#: SwXTextCursor: add Impl struct, and use UnoImplPtr to lock destructor. move all implementation details out of header, into Impl struct. remove ugly destruction of SwUnoCrsr via Application::PostUserEvent. use new XUnoTunnel and XServiceInfo helpers. clean up the implementation a little. --- sw/inc/unotextcursor.hxx | 54 +- sw/source/core/unocore/unoframe.cxx | 14 +- sw/source/core/unocore/unoftn.cxx | 13 +- sw/source/core/unocore/unoobj.cxx | 1884 ++++++++++++----------- sw/source/core/unocore/unoredline.cxx | 15 +- sw/source/core/unocore/unorefmk.cxx | 7 +- sw/source/core/unocore/unotbl.cxx | 13 +- sw/source/core/unocore/unotext.cxx | 28 +- sw/source/filter/xml/XMLRedlineImportHelper.cxx | 10 +- sw/source/ui/uno/unotxdoc.cxx | 6 +- 10 files changed, 1023 insertions(+), 1021 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx index fe9b260218..e976af91e1 100644 --- a/sw/inc/unotextcursor.hxx +++ b/sw/inc/unotextcursor.hxx @@ -49,20 +49,14 @@ #include #include -#include -#include -#include -#include #include #include -class SfxItemPropertySet; class SwDoc; struct SwPosition; class SwUnoCrsr; -struct SwSortOptions; typedef ::cppu::WeakImplHelper12 @@ -82,65 +76,45 @@ typedef ::cppu::WeakImplHelper12 class SwXTextCursor : public SwXTextCursor_Base - , public SwClient , public OTextCursorHelper { private: - SwEventListenerContainer aLstnrCntnr; - const SfxItemPropertySet* m_pPropSet; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; - SwSortOptions* pLastSortOptions; - - CursorType eType; - - // --> FME 2006-03-07 #126177# We need to track if the RemoveCursor_Impl - // user event has been posted. In this case we have to remove the user - // event in ~SwXTextCursor(). - ULONG mnUserEventId; - bool mbRemoveUserEvent; - // <-- - - DECL_STATIC_LINK(SwXTextCursor, RemoveCursor_Impl, - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*); - -protected: + class Impl; + ::sw::UnoImplPtr m_pImpl; virtual ~SwXTextCursor(); public: SwXTextCursor( + SwDoc & rDoc, ::com::sun::star::uno::Reference< - ::com::sun::star::text::XText > xParent, - const SwPosition& rPos, - CursorType eSet, SwDoc* pDoc, const SwPosition* pMark = 0); + ::com::sun::star::text::XText > const& xParent, + const enum CursorType eType, + SwPosition const& rPos, + SwPosition const*const pMark = 0); SwXTextCursor( ::com::sun::star::uno::Reference< - ::com::sun::star::text::XText > xParent, - SwUnoCrsr* pSourceCrsr, CursorType eSet = CURSOR_ALL); - - SwUnoCrsr* GetCrsr() {return (SwUnoCrsr*)GetRegisteredIn();} - const SwUnoCrsr* GetCrsr() const {return (SwUnoCrsr*)GetRegisteredIn();} + ::com::sun::star::text::XText > const& xParent, + SwPaM const& rSourceCursor, + const enum CursorType eType = CURSOR_ALL); - // --> FME 2006-03-07 #126177# - void DoNotRemoveUserEvent() { mbRemoveUserEvent = false; } - // <-- + SwUnoCrsr * GetCursor(); + const SwUnoCrsr * GetCursor() const; bool IsAtEndOfMeta() const; - void DeleteAndInsert(const String& rText, + void DeleteAndInsert(::rtl::OUString const& rText, const bool bForceExpandHints); + // OTextCursorHelper virtual const SwPaM* GetPaM() const; virtual SwPaM* GetPaM(); virtual const SwDoc* GetDoc() const; virtual SwDoc* GetDoc(); - // SwClient - virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); - DECLARE_XINTERFACE() static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 841465009f..c1a5a632e5 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2652,10 +2652,11 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursor(void) throw( throw aExcept; } - SwXTextCursor* pXCrsr = new SwXTextCursor(this, *aPam.GetPoint(), CURSOR_FRAME, pFmt->GetDoc()); - aRef = (text::XWordCursor*)pXCrsr; + SwXTextCursor *const pXCursor = new SwXTextCursor( + *pFmt->GetDoc(), this, CURSOR_FRAME, *aPam.GetPoint()); + aRef = static_cast(pXCursor); #if OSL_DEBUG_LEVEL > 1 - SwUnoCrsr* pUnoCrsr = pXCrsr->GetCrsr(); + SwUnoCrsr *const pUnoCrsr = pXCursor->GetCursor(); (void) pUnoCrsr; #endif } @@ -2682,8 +2683,11 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursorByRange(const (void)p2; #endif if(aPam.GetNode()->FindFlyStartNode() == rNode.FindFlyStartNode()) - aRef = (text::XWordCursor*)new SwXTextCursor(this , - *aPam.GetPoint(), CURSOR_FRAME, pFmt->GetDoc(), aPam.GetMark()); + { + aRef = static_cast( + new SwXTextCursor(*pFmt->GetDoc(), this, CURSOR_FRAME, + *aPam.GetPoint(), aPam.GetMark())); + } } else throw uno::RuntimeException(); diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index 9d55ccd0c4..c0eeb66a9e 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -391,9 +391,10 @@ uno::Reference< text::XTextCursor > SwXFootnote::createTextCursor(void) throw( { const SwTxtFtn* pTxtFtn = pFmt->GetTxtFtn(); SwPosition aPos( *pTxtFtn->GetStartNode() ); - SwXTextCursor* pXCrsr = new SwXTextCursor(this, aPos, CURSOR_FOOTNOTE, GetDoc()); - aRef = (text::XWordCursor*)pXCrsr; - SwUnoCrsr* pUnoCrsr = pXCrsr->GetCrsr(); + SwXTextCursor *const pXCursor = + new SwXTextCursor(*GetDoc(), this, CURSOR_FOOTNOTE, aPos); + aRef = static_cast(pXCursor); + SwUnoCrsr *const pUnoCrsr = pXCursor->GetCursor(); pUnoCrsr->Move(fnMoveForward, fnGoNode); } else @@ -421,8 +422,10 @@ uno::Reference< text::XTextCursor > SwXFootnote::createTextCursorByRange( const SwNode* pStart = aPam.GetNode()->FindFootnoteStartNode(); if( pStart != pFtnStartNode ) throw uno::RuntimeException(); - - aRef = (text::XWordCursor*)new SwXTextCursor(this , *aPam.GetPoint(), CURSOR_FOOTNOTE, GetDoc(), aPam.GetMark()); + + aRef = static_cast( + new SwXTextCursor(*GetDoc(), this, CURSOR_FOOTNOTE, + *aPam.GetPoint(), aPam.GetMark())); } else throw uno::RuntimeException(); diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index d86f8f59f8..37fa35e035 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -131,17 +131,10 @@ using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::text; -using namespace ::com::sun::star::container; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::drawing; -using std::auto_ptr; using ::rtl::OUString; using ::rtl::OUStringBuffer; + /**************************************************************************** static methods ****************************************************************************/ @@ -780,185 +773,146 @@ SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName) return pRet; } -/****************************************************************************** - ****************************************************************************** - ****************************************************************************** - * Taskforce ONE51 - ******************************************************************************/ /****************************************************************** * SwXTextCursor ******************************************************************/ -/*-- 09.12.98 14:19:00--------------------------------------------------- - - -----------------------------------------------------------------------*/ -IMPL_STATIC_LINK( SwXTextCursor, RemoveCursor_Impl, - uno::Reference< XInterface >*, EMPTYARG ) +class SwXTextCursor::Impl + : public SwClient { - ASSERT( pThis != NULL, "no reference?" ); - //ASSERT( pArg != NULL, "no reference?" ); - // --> FME 2006-03-07 #126177# Tell the SwXTextCursor that the user event - // has been executed. It is not necessary to remove the user event in - // ~SwXTextCursor - pThis->DoNotRemoveUserEvent(); - // <-- +public: + + const SfxItemPropertySet & m_rPropSet; + const enum CursorType m_eType; + const uno::Reference< text::XText > m_xParentText; + SwEventListenerContainer m_ListenerContainer; + bool m_bIsDisposed; - SwUnoCrsr* pCursor = pThis->GetCrsr(); - if( pCursor != NULL ) + Impl( SwXTextCursor & rThis, + SwDoc & rDoc, + const enum CursorType eType, + uno::Reference xParent, + SwPosition const& rPoint, SwPosition const*const pMark) + : SwClient(rDoc.CreateUnoCrsr(rPoint, sal_False)) + , m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR)) + , m_eType(eType) + , m_xParentText(xParent) + , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) + , m_bIsDisposed(false) { - pCursor->Remove( pThis ); - delete pCursor; + if (pMark) + { + GetCursor()->SetMark(); + *GetCursor()->GetMark() = *pMark; + } } - // --> FME 2006-03-07 #126177# - //delete pArg; - // <-- + ~Impl() { + // Impl owns the cursor; delete it here: SolarMutex is locked + delete GetRegisteredIn(); + } - return 0; -} + SwUnoCrsr * GetCursor() { + return (m_bIsDisposed) ? 0 : + static_cast(const_cast(GetRegisteredIn())); + } -void SwXTextCursor::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew) -{ - ClientModify(this, pOld, pNew); + SwUnoCrsr & GetCursorOrThrow() { + SwUnoCrsr *const pUnoCursor( GetCursor() ); + if (!pUnoCursor) { + throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( + "SwXTextCursor: disposed or invalid")), 0); + } + return *pUnoCursor; + } - // if the cursor leaves its designated section, it becomes invalid - if( !mbRemoveUserEvent && ( pOld != NULL ) && ( pOld->Which() == RES_UNOCURSOR_LEAVES_SECTION ) ) - { - // --> FME 2006-03-07 #126177# We don't need to create a reference - // to the SwXTextCursor to prevent its deletion. If the destructor - // of the SwXTextCursor is called before the user event is executed, - // the user event will be removed. This is necessary, because an other - // thread might be currently waiting in ~SwXTextCursor. In this case - // the pRef = new ... stuff did not work! + void Invalidate() { + m_bIsDisposed = true; + m_ListenerContainer.Disposing(); + } - // create reference to this object to prevent deletion before - // the STATIC_LINK is executed. The link will delete the - // reference. - //uno::Reference* pRef = - //new uno::Reference( static_cast( this ) ); + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); - mbRemoveUserEvent = true; - // <-- +}; - mnUserEventId = Application::PostUserEvent( - STATIC_LINK( this, SwXTextCursor, RemoveCursor_Impl ), this ); +void SwXTextCursor::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) +{ + ClientModify(this, pOld, pNew); + + if (!GetRegisteredIn() || + // if the cursor leaves its designated section, it becomes invalid + (pOld != NULL) && (pOld->Which() == RES_UNOCURSOR_LEAVES_SECTION)) + { + Invalidate(); } +} + - if(!GetRegisteredIn()) - aLstnrCntnr.Disposing(); +SwUnoCrsr const* SwXTextCursor::GetCursor() const +{ + return m_pImpl->GetCursor(); +} +SwUnoCrsr * SwXTextCursor::GetCursor() +{ + return m_pImpl->GetCursor(); } /*-- 09.12.98 14:19:01--------------------------------------------------- -----------------------------------------------------------------------*/ -const SwPaM* SwXTextCursor::GetPaM() const +SwPaM const* SwXTextCursor::GetPaM() const { - return GetCrsr() ? GetCrsr() : 0; + return m_pImpl->GetCursor(); } -SwPaM* SwXTextCursor::GetPaM() +SwPaM * SwXTextCursor::GetPaM() { - return GetCrsr() ? GetCrsr() : 0; + return m_pImpl->GetCursor(); } /*-- 09.12.98 14:19:02--------------------------------------------------- -----------------------------------------------------------------------*/ -const SwDoc* SwXTextCursor::GetDoc()const +SwDoc const* SwXTextCursor::GetDoc() const { - return GetCrsr() ? GetCrsr()->GetDoc() : 0; + return m_pImpl->GetCursor() ? m_pImpl->GetCursor()->GetDoc() : 0; } /* -----------------22.07.99 13:52------------------- --------------------------------------------------*/ -SwDoc* SwXTextCursor::GetDoc() -{ - return GetCrsr() ? GetCrsr()->GetDoc() : 0; -} - - -/*-- 09.12.98 14:19:19--------------------------------------------------- - - -----------------------------------------------------------------------*/ -OUString SwXTextCursor::getImplementationName(void) throw( RuntimeException ) +SwDoc * SwXTextCursor::GetDoc() { - return C2U("SwXTextCursor"); + return m_pImpl->GetCursor() ? m_pImpl->GetCursor()->GetDoc() : 0; } -/*-- 09.12.98 14:19:19--------------------------------------------------- - -----------------------------------------------------------------------*/ -BOOL SwXTextCursor::supportsService(const OUString& rServiceName) throw( RuntimeException ) -{ - String sServiceName(rServiceName); - return sServiceName.EqualsAscii("com.sun.star.text.TextCursor") || - sServiceName.EqualsAscii("com.sun.star.style.CharacterProperties")|| - sServiceName.EqualsAscii("com.sun.star.style.CharacterPropertiesAsian")|| - sServiceName.EqualsAscii("com.sun.star.style.CharacterPropertiesComplex")|| - sServiceName.EqualsAscii("com.sun.star.style.ParagraphProperties") || - sServiceName.EqualsAscii("com.sun.star.style.ParagraphPropertiesAsian") || - sServiceName.EqualsAscii("com.sun.star.style.ParagraphPropertiesComplex") || - sServiceName.EqualsAscii("com.sun.star.text.TextSortable"); -} -/*-- 09.12.98 14:19:19--------------------------------------------------- - -----------------------------------------------------------------------*/ -Sequence< OUString > SwXTextCursor::getSupportedServiceNames(void) throw( RuntimeException ) -{ - Sequence< OUString > aRet(8); - OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.TextCursor"); - pArray[1] = C2U("com.sun.star.style.CharacterProperties"); - pArray[2] = C2U("com.sun.star.style.CharacterPropertiesAsian"); - pArray[3] = C2U("com.sun.star.style.CharacterPropertiesComplex"); - pArray[4] = C2U("com.sun.star.style.ParagraphProperties"); - pArray[5] = C2U("com.sun.star.style.ParagraphPropertiesAsian"); - pArray[6] = C2U("com.sun.star.style.ParagraphPropertiesComplex"); - pArray[7] = C2U("com.sun.star.text.TextSortable"); - return aRet; -} /*-- 09.12.98 14:19:19--------------------------------------------------- -----------------------------------------------------------------------*/ -SwXTextCursor::SwXTextCursor(uno::Reference< XText > xParent, const SwPosition& rPos, - CursorType eSet, SwDoc* pDoc, const SwPosition* pMark) : - aLstnrCntnr(( util::XSortable*)this), - m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR)), - xParentText(xParent), - pLastSortOptions(0), - eType(eSet), - mbRemoveUserEvent( false ) +SwXTextCursor::SwXTextCursor( + SwDoc & rDoc, + uno::Reference< text::XText > const& xParent, + const enum CursorType eType, + const SwPosition& rPos, + SwPosition const*const pMark) + : m_pImpl( new SwXTextCursor::Impl(*this, rDoc, eType, xParent, + rPos, pMark ) ) { - SwUnoCrsr* pUnoCrsr = pDoc->CreateUnoCrsr(rPos, sal_False); - if(pMark) - { - pUnoCrsr->SetMark(); - *pUnoCrsr->GetMark() = *pMark; - } - pUnoCrsr->Add(this); } /* -----------------04.03.99 09:02------------------- * * --------------------------------------------------*/ -SwXTextCursor::SwXTextCursor(uno::Reference< XText > xParent, - SwUnoCrsr* pSourceCrsr, CursorType eSet) : - aLstnrCntnr( (util::XSortable*)this), - m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR)), - xParentText(xParent), - pLastSortOptions(0), - eType(eSet), - mbRemoveUserEvent( false ) +SwXTextCursor::SwXTextCursor(uno::Reference< text::XText > const& xParent, + SwPaM const& rSourceCursor, const enum CursorType eType) + : m_pImpl( new SwXTextCursor::Impl(*this, *rSourceCursor.GetDoc(), eType, + xParent, *rSourceCursor.GetPoint(), + rSourceCursor.HasMark() ? rSourceCursor.GetMark() : 0) ) { - SwUnoCrsr* pUnoCrsr = pSourceCrsr->GetDoc()->CreateUnoCrsr(*pSourceCrsr->GetPoint(), sal_False); - if(pSourceCrsr->HasMark()) - { - pUnoCrsr->SetMark(); - *pUnoCrsr->GetMark() = *pSourceCrsr->GetMark(); - } - pUnoCrsr->Add(this); } /*-- 09.12.98 14:19:20--------------------------------------------------- @@ -966,55 +920,43 @@ SwXTextCursor::SwXTextCursor(uno::Reference< XText > xParent, -----------------------------------------------------------------------*/ SwXTextCursor::~SwXTextCursor() { - vos::OGuard aGuard(Application::GetSolarMutex()); - - // --> FME 2006-03-07 #126177# A user event has been posted in order - // to delete the SwUnoCursor. Remove the user event if the SwXTextCursor - // is destroyed before the user event could be handled. - if ( mbRemoveUserEvent ) - { - mbRemoveUserEvent = false; - Application::RemoveUserEvent( mnUserEventId ); - } - // <-- - - SwUnoCrsr* pUnoCrsr = GetCrsr(); - delete pUnoCrsr; - delete pLastSortOptions; } + /*-- 09.12.98 14:19:18--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextCursor::DeleteAndInsert(const String& rText, +void SwXTextCursor::DeleteAndInsert(const ::rtl::OUString& rText, const bool bForceExpandHints) { - SwUnoCrsr* pUnoCrsr = GetCrsr(); + SwUnoCrsr *const pUnoCrsr = m_pImpl->GetCursor(); if(pUnoCrsr) { // Start/EndAction SwDoc* pDoc = pUnoCrsr->GetDoc(); UnoActionContext aAction(pDoc); - xub_StrLen nTxtLen = rText.Len(); + const xub_StrLen nTxtLen = rText.getLength(); pDoc->StartUndo(UNDO_INSERT, NULL); - SwCursor *_pStartCrsr = pUnoCrsr; + SwCursor * pCurrent = pUnoCrsr; do { - if(_pStartCrsr->HasMark()) + if (pCurrent->HasMark()) { - pDoc->DeleteAndJoin(*_pStartCrsr); + pDoc->DeleteAndJoin(*pCurrent); } if(nTxtLen) { const bool bSuccess( SwUnoCursorHelper::DocInsertStringSplitCR( - *pDoc, *_pStartCrsr, rText, bForceExpandHints ) ); + *pDoc, *pCurrent, rText, bForceExpandHints ) ); DBG_ASSERT( bSuccess, "Doc->Insert(Str) failed." ); (void) bSuccess; SwUnoCursorHelper::SelectPam(*pUnoCrsr, true); - _pStartCrsr->Left(rText.Len(), CRSR_SKIP_CHARS, FALSE, FALSE); + pCurrent->Left(rText.getLength(), + CRSR_SKIP_CHARS, FALSE, FALSE); } - } while( (_pStartCrsr=(SwCursor*)_pStartCrsr->GetNext()) != pUnoCrsr ); + pCurrent = static_cast(pCurrent->GetNext()); + } while (pCurrent != pUnoCrsr); pDoc->EndUndo(UNDO_INSERT, NULL); } } @@ -1068,10 +1010,11 @@ lcl_ForceIntoMeta(SwPaM & rCursor, bool SwXTextCursor::IsAtEndOfMeta() const { - if (CURSOR_META == eType) + if (CURSOR_META == m_pImpl->m_eType) { - SwUnoCrsr const * const pCursor( GetCrsr() ); - SwXMeta const*const pXMeta( dynamic_cast(xParentText.get()) ); + SwUnoCrsr const * const pCursor( m_pImpl->GetCursor() ); + SwXMeta const*const pXMeta( + dynamic_cast(m_pImpl->m_xParentText.get()) ); ASSERT(pXMeta, "no meta?"); if (pCursor && pXMeta) { @@ -1095,6 +1038,45 @@ bool SwXTextCursor::IsAtEndOfMeta() const return false; } +/*-- 09.12.98 14:19:19--------------------------------------------------- + + -----------------------------------------------------------------------*/ +OUString SwXTextCursor::getImplementationName() throw (uno::RuntimeException) +{ + return C2U("SwXTextCursor"); +} + +/*-- 09.12.98 14:19:19--------------------------------------------------- + + -----------------------------------------------------------------------*/ +static char const*const g_ServicesTextCursor[] = +{ + "com.sun.star.text.TextCursor", + "com.sun.star.style.CharacterProperties", + "com.sun.star.style.CharacterPropertiesAsian", + "com.sun.star.style.CharacterPropertiesComplex", + "com.sun.star.style.ParagraphProperties", + "com.sun.star.style.ParagraphPropertiesAsian", + "com.sun.star.style.ParagraphPropertiesComplex", + "com.sun.star.text.TextSortable", +}; +static const size_t g_nServicesTextCursor( + sizeof(g_ServicesTextCursor)/sizeof(g_ServicesTextCursor[0])); + +sal_Bool SAL_CALL SwXTextCursor::supportsService(const OUString& rServiceName) +throw (uno::RuntimeException) +{ + return ::sw::SupportsServiceImpl( + g_nServicesTextCursor, g_ServicesTextCursor, rServiceName); +} + +uno::Sequence< OUString > SAL_CALL +SwXTextCursor::getSupportedServiceNames() throw (uno::RuntimeException) +{ + return ::sw::GetSupportedServiceNamesImpl( + g_nServicesTextCursor, g_ServicesTextCursor); +} + /* -----------------------------10.03.00 18:02-------------------------------- ---------------------------------------------------------------------------*/ @@ -1106,231 +1088,219 @@ const uno::Sequence< sal_Int8 > & SwXTextCursor::getUnoTunnelId() /* -----------------------------10.03.00 18:04-------------------------------- ---------------------------------------------------------------------------*/ -sal_Int64 SAL_CALL SwXTextCursor::getSomething( const uno::Sequence< sal_Int8 >& rId ) - throw(uno::RuntimeException) +sal_Int64 SAL_CALL +SwXTextCursor::getSomething(const uno::Sequence< sal_Int8 >& rId) +throw (uno::RuntimeException) { - if( rId.getLength() == 16 - && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16 ) ) - { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); - } - return OTextCursorHelper::getSomething(rId); + const sal_Int64 nRet( ::sw::UnoTunnelImpl(rId, this) ); + return (nRet) ? nRet : OTextCursorHelper::getSomething(rId); } /*-- 09.12.98 14:18:12--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextCursor::collapseToStart(void) throw( uno::RuntimeException ) +void SAL_CALL SwXTextCursor::collapseToStart() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + if (rUnoCursor.HasMark()) { - if(pUnoCrsr->HasMark()) + if (*rUnoCursor.GetPoint() > *rUnoCursor.GetMark()) { - if(*pUnoCrsr->GetPoint() > *pUnoCrsr->GetMark()) - pUnoCrsr->Exchange(); - pUnoCrsr->DeleteMark(); + rUnoCursor.Exchange(); } - } - else - { - throw uno::RuntimeException(); + rUnoCursor.DeleteMark(); } } /*-- 09.12.98 14:18:14--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextCursor::collapseToEnd(void) throw( uno::RuntimeException ) +void SAL_CALL SwXTextCursor::collapseToEnd() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + if (rUnoCursor.HasMark()) { - if(pUnoCrsr->HasMark()) + if (*rUnoCursor.GetPoint() < *rUnoCursor.GetMark()) { - if(*pUnoCrsr->GetPoint() < *pUnoCrsr->GetMark()) - pUnoCrsr->Exchange(); - pUnoCrsr->DeleteMark(); + rUnoCursor.Exchange(); } - } - else - { - throw uno::RuntimeException(); + rUnoCursor.DeleteMark(); } } /*-- 09.12.98 14:18:41--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::isCollapsed(void) throw( uno::RuntimeException ) +sal_Bool SAL_CALL SwXTextCursor::isCollapsed() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + sal_Bool bRet = sal_True; - SwUnoCrsr* pUnoCrsr = GetCrsr(); + SwUnoCrsr *const pUnoCrsr = m_pImpl->GetCursor(); if(pUnoCrsr && pUnoCrsr->GetMark()) { bRet = (*pUnoCrsr->GetPoint() == *pUnoCrsr->GetMark()); } return bRet; } + /*-- 09.12.98 14:18:42--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::goLeft(sal_Int16 nCount, sal_Bool Expand) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::goLeft(sal_Int16 nCount, sal_Bool Expand) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Bool bRet = sal_False; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) - { - SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); - bRet = pUnoCrsr->Left( nCount, CRSR_SKIP_CHARS, FALSE, FALSE); - if (CURSOR_META == eType) - { - bRet = lcl_ForceIntoMeta(*pUnoCrsr, xParentText, META_CHECK_BOTH) - && bRet; - } - } - else + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); + sal_Bool bRet = rUnoCursor.Left( nCount, CRSR_SKIP_CHARS, FALSE, FALSE); + if (CURSOR_META == m_pImpl->m_eType) { - throw uno::RuntimeException(); + bRet = lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText, + META_CHECK_BOTH) + && bRet; } return bRet; } /*-- 09.12.98 14:18:42--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::goRight(sal_Int16 nCount, sal_Bool Expand) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::goRight(sal_Int16 nCount, sal_Bool Expand) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Bool bRet = sal_False; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) - { - SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); - bRet = pUnoCrsr->Right(nCount, CRSR_SKIP_CHARS, FALSE, FALSE); - if (CURSOR_META == eType) - { - bRet = lcl_ForceIntoMeta(*pUnoCrsr, xParentText, META_CHECK_BOTH) - && bRet; - } - } - else + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); + sal_Bool bRet = rUnoCursor.Right(nCount, CRSR_SKIP_CHARS, FALSE, FALSE); + if (CURSOR_META == m_pImpl->m_eType) { - throw uno::RuntimeException(); + bRet = lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText, + META_CHECK_BOTH) + && bRet; } return bRet; } + /*-- 09.12.98 14:18:43--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextCursor::gotoStart(sal_Bool Expand) throw( uno::RuntimeException ) +void SAL_CALL +SwXTextCursor::gotoStart(sal_Bool Expand) throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); + if (CURSOR_BODY == m_pImpl->m_eType) { - SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); - if(eType == CURSOR_BODY) + rUnoCursor.Move( fnMoveBackward, fnGoDoc ); + //check, that the cursor is not in a table + SwTableNode * pTblNode = rUnoCursor.GetNode()->FindTableNode(); + SwCntntNode * pCNode = 0; + while (pTblNode) { - pUnoCrsr->Move( fnMoveBackward, fnGoDoc ); - //check, that the cursor is not in a table - SwTableNode* pTblNode = pUnoCrsr->GetNode()->FindTableNode(); - SwCntntNode* pCont = 0; - while( pTblNode ) - { - pUnoCrsr->GetPoint()->nNode = *pTblNode->EndOfSectionNode(); - pCont = GetDoc()->GetNodes().GoNext(&pUnoCrsr->GetPoint()->nNode); - pTblNode = pCont ? pCont->FindTableNode() : 0; - } - if(pCont) - pUnoCrsr->GetPoint()->nContent.Assign(pCont, 0); - const SwStartNode* pTmp = pUnoCrsr->GetNode()->StartOfSectionNode(); - if(pTmp->IsSectionNode()) - { - SwSectionNode* pSectionStartNode = (SwSectionNode*)pTmp; - if(pSectionStartNode->GetSection().IsHiddenFlag()) - { - pCont = GetDoc()->GetNodes().GoNextSection( - &pUnoCrsr->GetPoint()->nNode, sal_True, sal_False); - if(pCont) - pUnoCrsr->GetPoint()->nContent.Assign(pCont, 0); - } - } + rUnoCursor.GetPoint()->nNode = *pTblNode->EndOfSectionNode(); + pCNode = GetDoc()->GetNodes().GoNext(&rUnoCursor.GetPoint()->nNode); + pTblNode = (pCNode) ? pCNode->FindTableNode() : 0; } - else if(eType == CURSOR_FRAME || - eType == CURSOR_TBLTEXT || - eType == CURSOR_HEADER || - eType == CURSOR_FOOTER || - eType == CURSOR_FOOTNOTE|| - eType == CURSOR_REDLINE) + if (pCNode) { - pUnoCrsr->MoveSection( fnSectionCurr, fnSectionStart); + rUnoCursor.GetPoint()->nContent.Assign(pCNode, 0); } - else if (CURSOR_META == eType) + SwStartNode const*const pTmp = + rUnoCursor.GetNode()->StartOfSectionNode(); + if (pTmp->IsSectionNode()) { - lcl_ForceIntoMeta(*pUnoCrsr, xParentText, META_INIT_START); + SwSectionNode const*const pSectionStartNode = + static_cast(pTmp); + if (pSectionStartNode->GetSection().IsHiddenFlag()) + { + pCNode = GetDoc()->GetNodes().GoNextSection( + &rUnoCursor.GetPoint()->nNode, sal_True, sal_False); + if (pCNode) + { + rUnoCursor.GetPoint()->nContent.Assign(pCNode, 0); + } + } } } - else + else if ( (CURSOR_FRAME == m_pImpl->m_eType) + || (CURSOR_TBLTEXT == m_pImpl->m_eType) + || (CURSOR_HEADER == m_pImpl->m_eType) + || (CURSOR_FOOTER == m_pImpl->m_eType) + || (CURSOR_FOOTNOTE== m_pImpl->m_eType) + || (CURSOR_REDLINE == m_pImpl->m_eType)) { - throw uno::RuntimeException(); + rUnoCursor.MoveSection(fnSectionCurr, fnSectionStart); + } + else if (CURSOR_META == m_pImpl->m_eType) + { + lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText, META_INIT_START); } } /*-- 09.12.98 14:18:43--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextCursor::gotoEnd(sal_Bool Expand) throw( uno::RuntimeException ) +void SAL_CALL +SwXTextCursor::gotoEnd(sal_Bool Expand) throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); + if (CURSOR_BODY == m_pImpl->m_eType) { - SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); - if(eType == CURSOR_BODY) - { - pUnoCrsr->Move( fnMoveForward, fnGoDoc ); - } - else if(eType == CURSOR_FRAME || - eType == CURSOR_TBLTEXT || - eType == CURSOR_HEADER || - eType == CURSOR_FOOTER || - eType == CURSOR_FOOTNOTE|| - eType == CURSOR_REDLINE) - { - pUnoCrsr->MoveSection( fnSectionCurr, fnSectionEnd); - } - else if (CURSOR_META == eType) - { - lcl_ForceIntoMeta(*pUnoCrsr, xParentText, META_INIT_END); - } + rUnoCursor.Move( fnMoveForward, fnGoDoc ); } - else + else if ( (CURSOR_FRAME == m_pImpl->m_eType) + || (CURSOR_TBLTEXT == m_pImpl->m_eType) + || (CURSOR_HEADER == m_pImpl->m_eType) + || (CURSOR_FOOTER == m_pImpl->m_eType) + || (CURSOR_FOOTNOTE== m_pImpl->m_eType) + || (CURSOR_REDLINE == m_pImpl->m_eType)) { - throw uno::RuntimeException(); + rUnoCursor.MoveSection( fnSectionCurr, fnSectionEnd); + } + else if (CURSOR_META == m_pImpl->m_eType) + { + lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText, META_INIT_END); } } -void SwXTextCursor::gotoRange(const uno::Reference< XTextRange > & xRange, sal_Bool bExpand ) - throw( uno::RuntimeException ) +void SAL_CALL +SwXTextCursor::gotoRange( + const uno::Reference< text::XTextRange > & xRange, sal_Bool bExpand) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwUnoCrsr* pOwnCursor = GetCrsr(); - if(!pOwnCursor || !xRange.is()) + + if (!xRange.is()) { throw uno::RuntimeException(); } + SwUnoCrsr & rOwnCursor( m_pImpl->GetCursorOrThrow() ); + uno::Reference xRangeTunnel( xRange, uno::UNO_QUERY); SwXTextRange* pRange = 0; OTextCursorHelper* pCursor = 0; if(xRangeTunnel.is()) { - pRange = reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) )); - pCursor = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); + pRange = ::sw::UnoTunnelGetImplementation(xRangeTunnel); + pCursor = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); } if (!pRange && !pCursor) @@ -1339,7 +1309,7 @@ void SwXTextCursor::gotoRange(const uno::Reference< XTextRange > & xRange, sal_B } SwStartNodeType eSearchNodeType = SwNormalStartNode; - switch(eType) + switch (m_pImpl->m_eType) { case CURSOR_FRAME: eSearchNodeType = SwFlyStartNode; break; case CURSOR_TBLTEXT: eSearchNodeType = SwTableBoxStartNode; break; @@ -1351,8 +1321,8 @@ void SwXTextCursor::gotoRange(const uno::Reference< XTextRange > & xRange, sal_B default: ; } - const SwStartNode* pOwnStartNode = pOwnCursor->GetNode()-> - FindSttNodeByType(eSearchNodeType); + const SwStartNode* pOwnStartNode = + rOwnCursor.GetNode()->FindSttNodeByType(eSearchNodeType); SwPaM aPam(GetDoc()->GetNodes()); const SwPaM * pPam(0); @@ -1389,11 +1359,11 @@ void SwXTextCursor::gotoRange(const uno::Reference< XTextRange > & xRange, sal_B throw uno::RuntimeException(); } - if (CURSOR_META == eType) + if (CURSOR_META == m_pImpl->m_eType) { SwPaM CopyPam(*pPam->GetMark(), *pPam->GetPoint()); - const bool bNotForced( - lcl_ForceIntoMeta(CopyPam, xParentText, META_CHECK_BOTH) ); + const bool bNotForced( lcl_ForceIntoMeta( + CopyPam, m_pImpl->m_xParentText, META_CHECK_BOTH) ); if (!bNotForced) { throw uno::RuntimeException( @@ -1408,40 +1378,30 @@ void SwXTextCursor::gotoRange(const uno::Reference< XTextRange > & xRange, sal_B { // der Cursor soll alles einschliessen, was bisher von ihm und dem uebergebenen // Range eingeschlossen wurde - SwPosition aOwnLeft(*pOwnCursor->GetPoint()); - SwPosition aOwnRight(pOwnCursor->HasMark() ? *pOwnCursor->GetMark() : aOwnLeft); - if(aOwnRight < aOwnLeft) - { - SwPosition aTmp = aOwnLeft; - aOwnLeft = aOwnRight; - aOwnRight = aTmp; - } - SwPosition const* pParamLeft = pPam->Start(); - SwPosition const* pParamRight = pPam->End(); + const SwPosition aOwnLeft(*rOwnCursor.Start()); + const SwPosition aOwnRight(*rOwnCursor.End()); + SwPosition const& rParamLeft = *pPam->Start(); + SwPosition const& rParamRight = *pPam->End(); // jetzt sind vier SwPositions da, zwei davon werden gebraucht, also welche? - if(aOwnRight > *pParamRight) - *pOwnCursor->GetPoint() = aOwnRight; - else - *pOwnCursor->GetPoint() = *pParamRight; - pOwnCursor->SetMark(); - if(aOwnLeft < *pParamLeft) - *pOwnCursor->GetMark() = aOwnLeft; - else - *pOwnCursor->GetMark() = *pParamLeft; + *rOwnCursor.GetPoint() = (aOwnRight > rParamRight) + ? aOwnRight : *rOwnCursor.GetPoint() = rParamRight; + rOwnCursor.SetMark(); + *rOwnCursor.GetMark() = (aOwnLeft < rParamLeft) + ? aOwnLeft : *rOwnCursor.GetMark() = rParamLeft; } else { // cursor should be the given range - *pOwnCursor->GetPoint() = *pPam->GetPoint(); + *rOwnCursor.GetPoint() = *pPam->GetPoint(); if (pPam->HasMark()) { - pOwnCursor->SetMark(); - *pOwnCursor->GetMark() = *pPam->GetMark(); + rOwnCursor.SetMark(); + *rOwnCursor.GetMark() = *pPam->GetMark(); } else { - pOwnCursor->DeleteMark(); + rOwnCursor.DeleteMark(); } } } @@ -1449,169 +1409,157 @@ void SwXTextCursor::gotoRange(const uno::Reference< XTextRange > & xRange, sal_B /*-- 09.12.98 14:18:44--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::isStartOfWord(void) throw( uno::RuntimeException ) +sal_Bool SAL_CALL SwXTextCursor::isStartOfWord() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Bool bRet = sal_False; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) - { - bRet = pUnoCrsr->IsStartWordWT( i18n::WordType::DICTIONARY_WORD ); - } - else - { - throw uno::RuntimeException(); - } + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + const sal_Bool bRet = + rUnoCursor.IsStartWordWT( i18n::WordType::DICTIONARY_WORD ); return bRet; } /*-- 09.12.98 14:18:44--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::isEndOfWord(void) throw( uno::RuntimeException ) +sal_Bool SAL_CALL SwXTextCursor::isEndOfWord() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Bool bRet = sal_False; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) - { - bRet = pUnoCrsr->IsEndWordWT( i18n::WordType::DICTIONARY_WORD ); - } - else - { - throw uno::RuntimeException(); - } + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + const sal_Bool bRet = + rUnoCursor.IsEndWordWT( i18n::WordType::DICTIONARY_WORD ); return bRet; } + /*-- 09.12.98 14:18:44--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::gotoNextWord(sal_Bool Expand) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::gotoNextWord(sal_Bool Expand) throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - //Probleme gibt's noch mit einem Absatzanfang, an dem kein Wort beginnt. - SwUnoCrsr* pUnoCrsr = GetCrsr(); + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + //Probleme gibt's noch mit einem Absatzanfang, an dem kein Wort beginnt. sal_Bool bRet = sal_False; - if(pUnoCrsr) - { - // remember old position to check if cursor has moved - // since the called functions are sometimes a bit unreliable - // in specific cases... - SwPosition *pPoint = pUnoCrsr->GetPoint(); - SwNode *pOldNode = &pPoint->nNode.GetNode(); - xub_StrLen nOldIndex = pPoint->nContent.GetIndex(); - - SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); - //Absatzende? - if(pUnoCrsr->GetCntntNode() && - pPoint->nContent == pUnoCrsr->GetCntntNode()->Len()) - { - pUnoCrsr->Right(1, CRSR_SKIP_CHARS, FALSE, FALSE); - } - else - { - sal_Bool bTmp = pUnoCrsr->GoNextWordWT( i18n::WordType::DICTIONARY_WORD ); - //if there is no next word within the current paragraph try to go to the start of the next paragraph - if(!bTmp) - pUnoCrsr->MovePara(fnParaNext, fnParaStart); - } + // remember old position to check if cursor has moved + // since the called functions are sometimes a bit unreliable + // in specific cases... + SwPosition *const pPoint = rUnoCursor.GetPoint(); + SwNode *const pOldNode = &pPoint->nNode.GetNode(); + xub_StrLen const nOldIndex = pPoint->nContent.GetIndex(); - // return true if cursor has moved - bRet = &pPoint->nNode.GetNode() != pOldNode || - pPoint->nContent.GetIndex() != nOldIndex; - if (bRet && (CURSOR_META == eType)) + SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); + // end of paragraph + if (rUnoCursor.GetCntntNode() && + (pPoint->nContent == rUnoCursor.GetCntntNode()->Len())) + { + rUnoCursor.Right(1, CRSR_SKIP_CHARS, FALSE, FALSE); + } + else + { + const bool bTmp = + rUnoCursor.GoNextWordWT( i18n::WordType::DICTIONARY_WORD ); + // if there is no next word within the current paragraph + // try to go to the start of the next paragraph + if (!bTmp) { - bRet = lcl_ForceIntoMeta(*pUnoCrsr, xParentText, META_CHECK_BOTH); + rUnoCursor.MovePara(fnParaNext, fnParaStart); } } - else + + // return true if cursor has moved + bRet = (&pPoint->nNode.GetNode() != pOldNode) || + (pPoint->nContent.GetIndex() != nOldIndex); + if (bRet && (CURSOR_META == m_pImpl->m_eType)) { - throw uno::RuntimeException(); + bRet = lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText, + META_CHECK_BOTH); } return bRet; } + /*-- 09.12.98 14:18:45--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::gotoPreviousWord(sal_Bool Expand) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::gotoPreviousWord(sal_Bool Expand) throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - // hier machen Leerzeichen am Absatzanfang Probleme - SwUnoCrsr* pUnoCrsr = GetCrsr(); - sal_Bool bRet = sal_False; - if(pUnoCrsr) - { - SwPosition *pPoint = pUnoCrsr->GetPoint(); - SwNode *pOldNode = &pPoint->nNode.GetNode(); - xub_StrLen nOldIndex = pPoint->nContent.GetIndex(); + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); - SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); - //Absatzanfang ? - if(pPoint->nContent == 0) - { - pUnoCrsr->Left(1, CRSR_SKIP_CHARS, FALSE, FALSE); - } - else - { - pUnoCrsr->GoPrevWordWT( i18n::WordType::DICTIONARY_WORD ); - if(pPoint->nContent == 0) - pUnoCrsr->Left(1, CRSR_SKIP_CHARS, FALSE, FALSE); - } + // hier machen Leerzeichen am Absatzanfang Probleme + sal_Bool bRet = sal_False; + SwPosition *const pPoint = rUnoCursor.GetPoint(); + SwNode *const pOldNode = &pPoint->nNode.GetNode(); + xub_StrLen const nOldIndex = pPoint->nContent.GetIndex(); - // return true if cursor has moved - bRet = &pPoint->nNode.GetNode() != pOldNode || - pPoint->nContent.GetIndex() != nOldIndex; - if (bRet && (CURSOR_META == eType)) + SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); + // start of paragraph? + if (pPoint->nContent == 0) + { + rUnoCursor.Left(1, CRSR_SKIP_CHARS, FALSE, FALSE); + } + else + { + rUnoCursor.GoPrevWordWT( i18n::WordType::DICTIONARY_WORD ); + if (pPoint->nContent == 0) { - bRet = lcl_ForceIntoMeta(*pUnoCrsr, xParentText, META_CHECK_BOTH); + rUnoCursor.Left(1, CRSR_SKIP_CHARS, FALSE, FALSE); } } - else + + // return true if cursor has moved + bRet = (&pPoint->nNode.GetNode() != pOldNode) || + (pPoint->nContent.GetIndex() != nOldIndex); + if (bRet && (CURSOR_META == m_pImpl->m_eType)) { - throw uno::RuntimeException(); + bRet = lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText, + META_CHECK_BOTH); } return bRet; } + /*-- 09.12.98 14:18:45--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::gotoEndOfWord(sal_Bool Expand) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::gotoEndOfWord(sal_Bool Expand) throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwUnoCrsr* pUnoCrsr = GetCrsr(); + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); sal_Bool bRet = sal_False; - if(pUnoCrsr) - { - SwPosition *pPoint = pUnoCrsr->GetPoint(); - SwNode &rOldNode = pPoint->nNode.GetNode(); - xub_StrLen nOldIndex = pPoint->nContent.GetIndex(); + SwPosition *const pPoint = rUnoCursor.GetPoint(); + SwNode & rOldNode = pPoint->nNode.GetNode(); + xub_StrLen const nOldIndex = pPoint->nContent.GetIndex(); - sal_Int16 nWordType = i18n::WordType::DICTIONARY_WORD; - SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); - if(!pUnoCrsr->IsEndWordWT( nWordType )) - pUnoCrsr->GoEndWordWT( nWordType ); + const sal_Int16 nWordType = i18n::WordType::DICTIONARY_WORD; + SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); + if (!rUnoCursor.IsEndWordWT( nWordType )) + { + rUnoCursor.GoEndWordWT( nWordType ); + } - // restore old cursor if we are not at the end of a word by now - // otherwise use current one - bRet = pUnoCrsr->IsEndWordWT( nWordType ); - if (!bRet) - { - pPoint->nNode = rOldNode; - pPoint->nContent = nOldIndex; - } - else if (CURSOR_META == eType) - { - bRet = lcl_ForceIntoMeta(*pUnoCrsr, xParentText, META_CHECK_BOTH); - } + // restore old cursor if we are not at the end of a word by now + // otherwise use current one + bRet = rUnoCursor.IsEndWordWT( nWordType ); + if (!bRet) + { + pPoint->nNode = rOldNode; + pPoint->nContent = nOldIndex; } - else + else if (CURSOR_META == m_pImpl->m_eType) { - throw uno::RuntimeException(); + bRet = lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText, + META_CHECK_BOTH); } return bRet; @@ -1619,270 +1567,266 @@ sal_Bool SwXTextCursor::gotoEndOfWord(sal_Bool Expand) throw( uno::RuntimeExcept /*-- 09.12.98 14:18:46--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::gotoStartOfWord(sal_Bool Expand) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::gotoStartOfWord(sal_Bool Expand) throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwUnoCrsr* pUnoCrsr = GetCrsr(); + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); sal_Bool bRet = sal_False; - if(pUnoCrsr) - { - SwPosition *pPoint = pUnoCrsr->GetPoint(); - SwNode &rOldNode = pPoint->nNode.GetNode(); - xub_StrLen nOldIndex = pPoint->nContent.GetIndex(); + SwPosition *const pPoint = rUnoCursor.GetPoint(); + SwNode & rOldNode = pPoint->nNode.GetNode(); + xub_StrLen const nOldIndex = pPoint->nContent.GetIndex(); - sal_Int16 nWordType = i18n::WordType::DICTIONARY_WORD; - SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); - if(!pUnoCrsr->IsStartWordWT( nWordType )) - pUnoCrsr->GoStartWordWT( nWordType ); + const sal_Int16 nWordType = i18n::WordType::DICTIONARY_WORD; + SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); + if (!rUnoCursor.IsStartWordWT( nWordType )) + { + rUnoCursor.GoStartWordWT( nWordType ); + } - // restore old cursor if we are not at the start of a word by now - // otherwise use current one - bRet = pUnoCrsr->IsStartWordWT( nWordType ); - if (!bRet) - { - pPoint->nNode = rOldNode; - pPoint->nContent = nOldIndex; - } - else if (CURSOR_META == eType) - { - bRet = lcl_ForceIntoMeta(*pUnoCrsr, xParentText, META_CHECK_BOTH); - } + // restore old cursor if we are not at the start of a word by now + // otherwise use current one + bRet = rUnoCursor.IsStartWordWT( nWordType ); + if (!bRet) + { + pPoint->nNode = rOldNode; + pPoint->nContent = nOldIndex; } - else + else if (CURSOR_META == m_pImpl->m_eType) { - throw uno::RuntimeException(); + bRet = lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText, + META_CHECK_BOTH); } return bRet; } + /*-- 09.12.98 14:18:46--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::isStartOfSentence(void) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::isStartOfSentence() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Bool bRet = sal_False; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + // start of paragraph? + sal_Bool bRet = rUnoCursor.GetPoint()->nContent == 0; + // with mark ->no sentence start + // (check if cursor is no selection, i.e. it does not have + // a mark or else point and mark are identical) + if (!bRet && (!rUnoCursor.HasMark() || + *rUnoCursor.GetPoint() == *rUnoCursor.GetMark())) { - // start of paragraph? - bRet = pUnoCrsr->GetPoint()->nContent == 0; - // with mark ->no sentence start - // (check if cursor is no selection, i.e. it does not have - // a mark or else point and mark are identical) - if(!bRet && (!pUnoCrsr->HasMark() || - *pUnoCrsr->GetPoint() == *pUnoCrsr->GetMark())) - { - SwCursor aCrsr(*pUnoCrsr->GetPoint(),0,false); - SwPosition aOrigPos = *aCrsr.GetPoint(); - aCrsr.GoSentence(SwCursor::START_SENT ); - bRet = aOrigPos == *aCrsr.GetPoint(); - } + SwCursor aCrsr(*rUnoCursor.GetPoint(),0,false); + SwPosition aOrigPos = *aCrsr.GetPoint(); + aCrsr.GoSentence(SwCursor::START_SENT ); + bRet = aOrigPos == *aCrsr.GetPoint(); } - else - throw uno::RuntimeException(); return bRet; } /*-- 09.12.98 14:18:47--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::isEndOfSentence(void) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::isEndOfSentence() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Bool bRet = sal_False; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + // end of paragraph? + sal_Bool bRet = rUnoCursor.GetCntntNode() && + (rUnoCursor.GetPoint()->nContent == rUnoCursor.GetCntntNode()->Len()); + // with mark->no sentence end + // (check if cursor is no selection, i.e. it does not have + // a mark or else point and mark are identical) + if (!bRet && (!rUnoCursor.HasMark() || + *rUnoCursor.GetPoint() == *rUnoCursor.GetMark())) { - //end of paragraph? - bRet = pUnoCrsr->GetCntntNode() && - pUnoCrsr->GetPoint()->nContent == pUnoCrsr->GetCntntNode()->Len(); - // with mark->no sentence end - // (check if cursor is no selection, i.e. it does not have - // a mark or else point and mark are identical) - if(!bRet && (!pUnoCrsr->HasMark() || - *pUnoCrsr->GetPoint() == *pUnoCrsr->GetMark())) - { - SwCursor aCrsr(*pUnoCrsr->GetPoint(),0,false); - SwPosition aOrigPos = *aCrsr.GetPoint(); - aCrsr.GoSentence(SwCursor::END_SENT ); - bRet = aOrigPos == *aCrsr.GetPoint(); - } + SwCursor aCrsr(*rUnoCursor.GetPoint(), 0, false); + SwPosition aOrigPos = *aCrsr.GetPoint(); + aCrsr.GoSentence(SwCursor::END_SENT); + bRet = aOrigPos == *aCrsr.GetPoint(); } - else - throw uno::RuntimeException(); return bRet; } + /*-- 09.12.98 14:18:47--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::gotoNextSentence(sal_Bool Expand) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::gotoNextSentence(sal_Bool Expand) throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Bool bRet = sal_False; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + const bool bWasEOS = isEndOfSentence(); + SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); + sal_Bool bRet = rUnoCursor.GoSentence(SwCursor::NEXT_SENT); + if (!bRet) { - BOOL bWasEOS = isEndOfSentence(); - SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); - bRet = pUnoCrsr->GoSentence(SwCursor::NEXT_SENT); - if(!bRet) - bRet = pUnoCrsr->MovePara(fnParaNext, fnParaStart); + bRet = rUnoCursor.MovePara(fnParaNext, fnParaStart); + } - // if at the end of the sentence (i.e. at the space after the '.') - // advance to next word in order for GoSentence to work properly - // next time and have isStartOfSentence return true after this call - if (!pUnoCrsr->IsStartWord()) - { - BOOL bNextWord = pUnoCrsr->GoNextWord(); - if (bWasEOS && !bNextWord) - bRet = sal_False; - } - if (CURSOR_META == eType) + // if at the end of the sentence (i.e. at the space after the '.') + // advance to next word in order for GoSentence to work properly + // next time and have isStartOfSentence return true after this call + if (!rUnoCursor.IsStartWord()) + { + const bool bNextWord = rUnoCursor.GoNextWord(); + if (bWasEOS && !bNextWord) { - bRet = lcl_ForceIntoMeta(*pUnoCrsr, xParentText, META_CHECK_BOTH) - && bRet; + bRet = sal_False; } } - else - throw uno::RuntimeException(); + if (CURSOR_META == m_pImpl->m_eType) + { + bRet = lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText, + META_CHECK_BOTH) + && bRet; + } return bRet; } /*-- 09.12.98 14:18:47--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::gotoPreviousSentence(sal_Bool Expand) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::gotoPreviousSentence(sal_Bool Expand) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Bool bRet = sal_False; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); + sal_Bool bRet = rUnoCursor.GoSentence(SwCursor::PREV_SENT); + if (!bRet) { - SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); - bRet = pUnoCrsr->GoSentence(SwCursor::PREV_SENT); - if(!bRet) - { - if(0 != (bRet = pUnoCrsr->MovePara(fnParaPrev, fnParaStart))) - { - pUnoCrsr->MovePara(fnParaCurr, fnParaEnd); - //at the end of a paragraph move to the sentence end again - // - pUnoCrsr->GoSentence(SwCursor::PREV_SENT); - } - } - if (CURSOR_META == eType) + bRet = rUnoCursor.MovePara(fnParaPrev, fnParaStart); + if (bRet) { - bRet = lcl_ForceIntoMeta(*pUnoCrsr, xParentText, META_CHECK_BOTH) - && bRet; + rUnoCursor.MovePara(fnParaCurr, fnParaEnd); + // at the end of a paragraph move to the sentence end again + rUnoCursor.GoSentence(SwCursor::PREV_SENT); } } - else - throw uno::RuntimeException(); + if (CURSOR_META == m_pImpl->m_eType) + { + bRet = lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText, + META_CHECK_BOTH) + && bRet; + } return bRet; } + /* -----------------15.10.99 08:24------------------- --------------------------------------------------*/ -sal_Bool SwXTextCursor::gotoStartOfSentence(sal_Bool Expand) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::gotoStartOfSentence(sal_Bool Expand) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + sal_Bool bRet = sal_False; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) - { - SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); - // if we're at the para start then we wont move - // but bRet is also true if GoSentence failed but - // the start of the sentence is reached - bRet = SwUnoCursorHelper::IsStartOfPara(*pUnoCrsr) - || pUnoCrsr->GoSentence(SwCursor::START_SENT) || - SwUnoCursorHelper::IsStartOfPara(*pUnoCrsr); - if (CURSOR_META == eType) - { - bRet = lcl_ForceIntoMeta(*pUnoCrsr, xParentText, META_CHECK_BOTH) - && bRet; - } + SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); + // if we're at the para start then we wont move + // but bRet is also true if GoSentence failed but + // the start of the sentence is reached + bRet = SwUnoCursorHelper::IsStartOfPara(rUnoCursor) + || rUnoCursor.GoSentence(SwCursor::START_SENT) + || SwUnoCursorHelper::IsStartOfPara(rUnoCursor); + if (CURSOR_META == m_pImpl->m_eType) + { + bRet = lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText, + META_CHECK_BOTH) + && bRet; } - else - throw uno::RuntimeException(); return bRet; } /* -----------------15.10.99 08:24------------------- --------------------------------------------------*/ -sal_Bool SwXTextCursor::gotoEndOfSentence(sal_Bool Expand) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::gotoEndOfSentence(sal_Bool Expand) throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + sal_Bool bRet = sal_False; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) - { - SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); - // bRet is true if GoSentence() succeeded or if the - // MovePara() succeeded while the end of the para is - // not reached already - sal_Bool bAlreadyParaEnd = SwUnoCursorHelper::IsEndOfPara(*pUnoCrsr); - bRet = !bAlreadyParaEnd && - (pUnoCrsr->GoSentence(SwCursor::END_SENT) || - pUnoCrsr->MovePara(fnParaCurr, fnParaEnd)); - if (CURSOR_META == eType) - { - bRet = lcl_ForceIntoMeta(*pUnoCrsr, xParentText, META_CHECK_BOTH) - && bRet; - } + SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); + // bRet is true if GoSentence() succeeded or if the + // MovePara() succeeded while the end of the para is + // not reached already + sal_Bool bAlreadyParaEnd = SwUnoCursorHelper::IsEndOfPara(rUnoCursor); + bRet = !bAlreadyParaEnd + && (rUnoCursor.GoSentence(SwCursor::END_SENT) + || rUnoCursor.MovePara(fnParaCurr, fnParaEnd)); + if (CURSOR_META == m_pImpl->m_eType) + { + bRet = lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText, + META_CHECK_BOTH) + && bRet; } - else - throw uno::RuntimeException(); return bRet; } /*-- 09.12.98 14:18:48--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::isStartOfParagraph(void) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::isStartOfParagraph() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Bool bRet = sal_False; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) - bRet = SwUnoCursorHelper::IsStartOfPara(*pUnoCrsr); - else - throw uno::RuntimeException(); + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + const sal_Bool bRet = SwUnoCursorHelper::IsStartOfPara(rUnoCursor); return bRet; } /*-- 09.12.98 14:18:48--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::isEndOfParagraph(void) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::isEndOfParagraph() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Bool bRet = sal_False; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) - bRet = SwUnoCursorHelper::IsEndOfPara(*pUnoCrsr); - else - throw uno::RuntimeException(); + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + const sal_Bool bRet = SwUnoCursorHelper::IsEndOfPara(rUnoCursor); return bRet; } + /*-- 09.12.98 14:18:49--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::gotoStartOfParagraph(sal_Bool Expand) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::gotoStartOfParagraph(sal_Bool Expand) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Bool bRet = sal_False; - if (CURSOR_META == eType) - return bRet; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr ) + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + if (CURSOR_META == m_pImpl->m_eType) { - SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); - bRet = SwUnoCursorHelper::IsStartOfPara(*pUnoCrsr); - if(!bRet) - bRet = pUnoCrsr->MovePara(fnParaCurr, fnParaStart); + return sal_False; + } + SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); + sal_Bool bRet = SwUnoCursorHelper::IsStartOfPara(rUnoCursor); + if (!bRet) + { + bRet = rUnoCursor.MovePara(fnParaCurr, fnParaStart); } - else - throw uno::RuntimeException(); // since MovePara(fnParaCurr, fnParaStart) only returns false // if we were already at the start of the paragraph this function @@ -1893,22 +1837,23 @@ sal_Bool SwXTextCursor::gotoStartOfParagraph(sal_Bool Expand) throw( uno::Runtim /*-- 09.12.98 14:18:49--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::gotoEndOfParagraph(sal_Bool Expand) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::gotoEndOfParagraph(sal_Bool Expand) throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Bool bRet = sal_False; - if (CURSOR_META == eType) - return bRet; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + if (CURSOR_META == m_pImpl->m_eType) { - SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); - bRet = SwUnoCursorHelper::IsEndOfPara(*pUnoCrsr); - if(!bRet) - bRet = pUnoCrsr->MovePara(fnParaCurr, fnParaEnd); + return sal_False; + } + SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); + sal_Bool bRet = SwUnoCursorHelper::IsEndOfPara(rUnoCursor); + if (!bRet) + { + bRet = rUnoCursor.MovePara(fnParaCurr, fnParaEnd); } - else - throw uno::RuntimeException(); // since MovePara(fnParaCurr, fnParaEnd) only returns false // if we were already at the end of the paragraph this function @@ -1916,158 +1861,144 @@ sal_Bool SwXTextCursor::gotoEndOfParagraph(sal_Bool Expand) throw( uno::RuntimeE DBG_ASSERT( bRet, "gotoEndOfParagraph failed" ); return bRet; } + /*-- 09.12.98 14:18:50--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::gotoNextParagraph(sal_Bool Expand) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::gotoNextParagraph(sal_Bool Expand) throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Bool bRet = sal_False; - if (CURSOR_META == eType) - return bRet; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + if (CURSOR_META == m_pImpl->m_eType) { - SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); - bRet = pUnoCrsr->MovePara(fnParaNext, fnParaStart); + return sal_False; } - else - throw uno::RuntimeException(); + SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); + const sal_Bool bRet = rUnoCursor.MovePara(fnParaNext, fnParaStart); return bRet; } /*-- 09.12.98 14:18:50--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXTextCursor::gotoPreviousParagraph(sal_Bool Expand) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXTextCursor::gotoPreviousParagraph(sal_Bool Expand) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Bool bRet = sal_False; - if (CURSOR_META == eType) - return bRet; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + if (CURSOR_META == m_pImpl->m_eType) { - SwUnoCursorHelper::SelectPam(*pUnoCrsr, Expand); - bRet = pUnoCrsr->MovePara(fnParaPrev, fnParaStart); + return sal_False; } - else - throw uno::RuntimeException(); + SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); + const sal_Bool bRet = rUnoCursor.MovePara(fnParaPrev, fnParaStart); return bRet; } + /*-- 09.12.98 14:18:50--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< XText > SwXTextCursor::getText(void) throw( uno::RuntimeException ) +uno::Reference< text::XText > SAL_CALL +SwXTextCursor::getText() throw (uno::RuntimeException) { - return xParentText; + vos::OGuard g(Application::GetSolarMutex()); + + return m_pImpl->m_xParentText; } + /*-- 09.12.98 14:18:50--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< XTextRange > SwXTextCursor::getStart(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextRange > SAL_CALL +SwXTextCursor::getStart() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< XTextRange > xRet; - SwUnoCrsr* pUnoCrsr = ((SwXTextCursor*)this)->GetCrsr(); - if( pUnoCrsr) + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + uno::Reference< text::XTextRange > xRet; + SwPaM aPam(*rUnoCursor.Start()); + const uno::Reference< text::XText > xParent = getText(); + if (CURSOR_META == m_pImpl->m_eType) { - SwPaM aPam(*pUnoCrsr->Start()); - uno::Reference< XText > xParent = getText(); - if (CURSOR_META == eType) - { - // return cursor to prevent modifying SwXTextRange for META - SwXTextCursor * const pCursor( - new SwXTextCursor(xParent, *pUnoCrsr->GetPoint(), - CURSOR_META, pUnoCrsr->GetDoc()) ); - pCursor->gotoStart(sal_False); - xRet = static_cast(pCursor); - } - else - { - xRet = new SwXTextRange(aPam, xParent); - } + // return cursor to prevent modifying SwXTextRange for META + SwXTextCursor * const pXCursor( + new SwXTextCursor(*rUnoCursor.GetDoc(), xParent, CURSOR_META, + *rUnoCursor.GetPoint()) ); + pXCursor->gotoStart(sal_False); + xRet = static_cast(pXCursor); } else - throw uno::RuntimeException(); + { + xRet = new SwXTextRange(aPam, xParent); + } return xRet; } /*-- 09.12.98 14:18:51--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< XTextRange > SwXTextCursor::getEnd(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextRange > SAL_CALL +SwXTextCursor::getEnd() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< XTextRange > xRet; - SwUnoCrsr* pUnoCrsr = ((SwXTextCursor*)this)->GetCrsr(); - if( pUnoCrsr) + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + uno::Reference< text::XTextRange > xRet; + SwPaM aPam(*rUnoCursor.End()); + const uno::Reference< text::XText > xParent = getText(); + if (CURSOR_META == m_pImpl->m_eType) { - SwPaM aPam(*pUnoCrsr->End()); - uno::Reference< XText > xParent = getText(); - if (CURSOR_META == eType) - { - // return cursor to prevent modifying SwXTextRange for META - SwXTextCursor * const pCursor( - new SwXTextCursor(xParent, *pUnoCrsr->GetPoint(), - CURSOR_META, pUnoCrsr->GetDoc()) ); - pCursor->gotoEnd(sal_False); - xRet = static_cast(pCursor); - } - else - { - xRet = new SwXTextRange(aPam, xParent); - } + // return cursor to prevent modifying SwXTextRange for META + SwXTextCursor * const pXCursor( + new SwXTextCursor(*rUnoCursor.GetDoc(), xParent, CURSOR_META, + *rUnoCursor.GetPoint()) ); + pXCursor->gotoEnd(sal_False); + xRet = static_cast(pXCursor); } else - throw uno::RuntimeException(); + { + xRet = new SwXTextRange(aPam, xParent); + } return xRet; } + /*-- 09.12.98 14:18:51--------------------------------------------------- -----------------------------------------------------------------------*/ -OUString SwXTextCursor::getString(void) throw( uno::RuntimeException ) +OUString SAL_CALL SwXTextCursor::getString() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + OUString aTxt; - SwUnoCrsr* pUnoCrsr = ((SwXTextCursor*)this)->GetCrsr(); - if( pUnoCrsr) - { -/* if( pUnoCrsr->GetPoint()->nNode.GetIndex() == - pUnoCrsr->GetMark()->nNode.GetIndex() ) - { - SwTxtNode* pTxtNd = pUnoCrsr->GetNode()->GetTxtNode(); - if( pTxtNd ) - { - sal_uInt16 nStt = pUnoCrsr->Start()->nContent.GetIndex(); - aTxt = pTxtNd->GetExpandTxt( nStt, - pUnoCrsr->End()->nContent.GetIndex() - nStt ); - } - } - else -*/ { - //Text ueber mehrere Absaetze - SwUnoCursorHelper::GetTextFromPam(*pUnoCrsr, aTxt); - } - } - else - throw uno::RuntimeException(); + SwUnoCursorHelper::GetTextFromPam(rUnoCursor, aTxt); return aTxt; } /*-- 09.12.98 14:18:52--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextCursor::setString(const OUString& aString) throw( uno::RuntimeException ) +void SAL_CALL +SwXTextCursor::setString(const OUString& aString) throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(!pUnoCrsr) - throw uno::RuntimeException(); - const bool bForceExpandHints( (CURSOR_META != eType) + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + (void) rUnoCursor; // just to check if valid + + const bool bForceExpandHints( (CURSOR_META != m_pImpl->m_eType) ? false - : dynamic_cast(xParentText.get())->CheckForOwnMemberMeta( - *GetPaM(), true) ); + : dynamic_cast(m_pImpl->m_xParentText.get()) + ->CheckForOwnMemberMeta(*GetPaM(), true) ); DeleteAndInsert(aString, bForceExpandHints); } + /* -----------------------------03.05.00 12:56-------------------------------- ---------------------------------------------------------------------------*/ @@ -2374,11 +2305,15 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, } return aRet; } + /*-- 09.12.98 14:18:54--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< beans::XPropertySetInfo > SwXTextCursor::getPropertySetInfo(void) throw( uno::RuntimeException ) +uno::Reference< beans::XPropertySetInfo > SAL_CALL +SwXTextCursor::getPropertySetInfo() throw (uno::RuntimeException) { + vos::OGuard g(Application::GetSolarMutex()); + static uno::Reference< beans::XPropertySetInfo > xRef; if(!xRef.is()) { @@ -2388,7 +2323,8 @@ uno::Reference< beans::XPropertySetInfo > SwXTextCursor::getPropertySetInfo(voi { SW_PROP_NAME(UNO_NAME_IS_SKIP_PROTECTED_TEXT), FN_SKIP_PROTECTED_TEXT, &::getBooleanCppuType(), PROPERTY_NONE, 0}, {0,0,0,0,0,0} }; - uno::Reference< beans::XPropertySetInfo > xInfo = m_pPropSet->getPropertySetInfo(); + const uno::Reference< beans::XPropertySetInfo > xInfo = + m_pImpl->m_rPropSet.getPropertySetInfo(); // PropertySetInfo verlaengern! const uno::Sequence aPropSeq = xInfo->getProperties(); xRef = new SfxExtItemPropertySetInfo( @@ -2397,283 +2333,361 @@ uno::Reference< beans::XPropertySetInfo > SwXTextCursor::getPropertySetInfo(voi } return xRef; } + /*-- 09.12.98 14:18:54--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextCursor::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue) - throw( beans::UnknownPropertyException, beans::PropertyVetoException, - lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) +void SAL_CALL +SwXTextCursor::setPropertyValue( + const OUString& rPropertyName, const uno::Any& rValue) +throw (beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + if (rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_IS_SKIP_HIDDEN_TEXT))) { - if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_SKIP_HIDDEN_TEXT))) + sal_Bool bSet(sal_False); + if (!(rValue >>= bSet)) { - sal_Bool bSet = *(sal_Bool*)aValue.getValue(); - pUnoCrsr->SetSkipOverHiddenSections(bSet); - } - else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_SKIP_PROTECTED_TEXT))) - { - sal_Bool bSet = *(sal_Bool*)aValue.getValue(); - pUnoCrsr->SetSkipOverProtectSections(bSet); + throw lang::IllegalArgumentException(); } - else + rUnoCursor.SetSkipOverHiddenSections(bSet); + } + else if (rPropertyName.equalsAsciiL( + SW_PROP_NAME(UNO_NAME_IS_SKIP_PROTECTED_TEXT))) + { + sal_Bool bSet(sal_False); + if (!(rValue >>= bSet)) { - SwUnoCursorHelper::SetPropertyValue(*pUnoCrsr, - *m_pPropSet, rPropertyName, aValue); + throw lang::IllegalArgumentException(); } + rUnoCursor.SetSkipOverProtectSections(bSet); } else - throw uno::RuntimeException(); - + { + SwUnoCursorHelper::SetPropertyValue(rUnoCursor, + m_pImpl->m_rPropSet, rPropertyName, rValue); + } } + /*-- 09.12.98 14:18:55--------------------------------------------------- -----------------------------------------------------------------------*/ -Any SwXTextCursor::getPropertyValue(const OUString& rPropertyName) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +uno::Any SAL_CALL +SwXTextCursor::getPropertyValue(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + uno::Any aAny; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) + if (rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_IS_SKIP_HIDDEN_TEXT))) { - if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_SKIP_HIDDEN_TEXT))) - { - BOOL bSet = pUnoCrsr->IsSkipOverHiddenSections(); - aAny.setValue(&bSet, ::getBooleanCppuType()); - } - else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_SKIP_PROTECTED_TEXT))) - { - BOOL bSet = pUnoCrsr->IsSkipOverProtectSections(); - aAny.setValue(&bSet, ::getBooleanCppuType()); - } - else - { - aAny = SwUnoCursorHelper::GetPropertyValue(*pUnoCrsr, - *m_pPropSet, rPropertyName); - } + const sal_Bool bSet = rUnoCursor.IsSkipOverHiddenSections(); + aAny <<= bSet; + } + else if (rPropertyName.equalsAsciiL( + SW_PROP_NAME(UNO_NAME_IS_SKIP_PROTECTED_TEXT))) + { + const sal_Bool bSet = rUnoCursor.IsSkipOverProtectSections(); + aAny <<= bSet; } else - throw uno::RuntimeException(); + { + aAny = SwUnoCursorHelper::GetPropertyValue(rUnoCursor, + m_pImpl->m_rPropSet, rPropertyName); + } return aAny; - } + /*-- 09.12.98 14:18:55--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextCursor::addPropertyChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXTextCursor::addPropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXTextCursor::addPropertyChangeListener(): not implemented"); } + /*-- 09.12.98 14:18:57--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextCursor::removePropertyChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXTextCursor::removePropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXTextCursor::removePropertyChangeListener(): not implemented"); } + /*-- 09.12.98 14:18:57--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextCursor::addVetoableChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXTextCursor::addVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXTextCursor::addVetoableChangeListener(): not implemented"); } + /*-- 09.12.98 14:18:58--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextCursor::removeVetoableChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXTextCursor::removeVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXTextCursor::removeVetoableChangeListener(): not implemented"); } + /*-- 05.03.99 11:36:11--------------------------------------------------- -----------------------------------------------------------------------*/ -beans::PropertyState SwXTextCursor::getPropertyState(const OUString& rPropertyName) - throw( beans::UnknownPropertyException, uno::RuntimeException ) +beans::PropertyState SAL_CALL +SwXTextCursor::getPropertyState(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - beans::PropertyState eRet = beans::PropertyState_DEFAULT_VALUE; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) - { - eRet = SwUnoCursorHelper::GetPropertyState( - *pUnoCrsr, *m_pPropSet, rPropertyName); - } - else - throw RuntimeException(); + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + const beans::PropertyState eRet = SwUnoCursorHelper::GetPropertyState( + rUnoCursor, m_pImpl->m_rPropSet, rPropertyName); return eRet; } /*-- 05.03.99 11:36:11--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Sequence< beans::PropertyState > SwXTextCursor::getPropertyStates( - const uno::Sequence< OUString >& PropertyNames) - throw( beans::UnknownPropertyException, uno::RuntimeException ) +uno::Sequence< beans::PropertyState > SAL_CALL +SwXTextCursor::getPropertyStates( + const uno::Sequence< OUString >& rPropertyNames) +throw (beans::UnknownPropertyException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(!pUnoCrsr) - throw RuntimeException(); + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + return SwUnoCursorHelper::GetPropertyStates( - *pUnoCrsr, *m_pPropSet, PropertyNames); + rUnoCursor, m_pImpl->m_rPropSet, rPropertyNames); } + /*-- 05.03.99 11:36:12--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextCursor::setPropertyToDefault(const OUString& rPropertyName) - throw( beans::UnknownPropertyException, uno::RuntimeException ) +void SAL_CALL +SwXTextCursor::setPropertyToDefault(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, uno::RuntimeException) { - Sequence < OUString > aSequence ( &rPropertyName, 1 ); + // forward: need no solar mutex here + uno::Sequence < OUString > aSequence ( &rPropertyName, 1 ); setPropertiesToDefault ( aSequence ); } /*-- 05.03.99 11:36:12--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXTextCursor::getPropertyDefault(const OUString& rPropertyName) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +uno::Any SAL_CALL +SwXTextCursor::getPropertyDefault(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - const Sequence < OUString > aSequence ( &rPropertyName, 1 ); + // forward: need no solar mutex here + const uno::Sequence < OUString > aSequence ( &rPropertyName, 1 ); return getPropertyDefaults ( aSequence ).getConstArray()[0]; } -void SAL_CALL SwXTextCursor::setAllPropertiesToDefault() - throw (RuntimeException) -{ - vos::OGuard aGuard(Application::GetSolarMutex()); +// para specific attribut ranges +static USHORT g_ParaResetableSetRange[] = { + RES_FRMATR_BEGIN, RES_FRMATR_END-1, + RES_PARATR_BEGIN, RES_PARATR_END-1, + // --> OD 2008-02-25 #refactorlists# + RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1, + // <-- + RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1, + 0 +}; + +// selection specific attribut ranges +static USHORT g_ResetableSetRange[] = { + RES_CHRATR_BEGIN, RES_CHRATR_END-1, + RES_TXTATR_INETFMT, RES_TXTATR_INETFMT, + RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT, + RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY, + RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER, + 0 +}; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if (pUnoCrsr) +static void +lcl_EnumerateIds(USHORT const* pIdRange, SvUShortsSort & rWhichIds) +{ + while (*pIdRange) { - // para specific attribut ranges - USHORT aParaResetableSetRange[] = { - RES_FRMATR_BEGIN, RES_FRMATR_END-1, - RES_PARATR_BEGIN, RES_PARATR_END-1, - // --> OD 2008-02-25 #refactorlists# - RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1, - // <-- - RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1, - 0 - }; - // selection specific attribut ranges - USHORT aResetableSetRange[] = { - RES_CHRATR_BEGIN, RES_CHRATR_END-1, - RES_TXTATR_INETFMT, RES_TXTATR_INETFMT, - RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT, - RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY, - RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER, - 0 - }; - SvUShortsSort aParaWhichIds; - SvUShortsSort aWhichIds; - for (USHORT k = 0; k < 2; ++k) + const USHORT nStart = sal::static_int_cast(*pIdRange++); + const USHORT nEnd = sal::static_int_cast(*pIdRange++); + for (USHORT nId = nStart + 1; nId <= nEnd; ++nId) { - SvUShortsSort &rWhichIds = k == 0? aParaWhichIds : aWhichIds; - USHORT *pResetableSetRange = k == 0? aParaResetableSetRange : aResetableSetRange; - while (*pResetableSetRange) - { - USHORT nStart = sal::static_int_cast< USHORT >(*pResetableSetRange++); - USHORT nEnd = sal::static_int_cast< USHORT >(*pResetableSetRange++); - for (USHORT nId = nStart + 1; nId <= nEnd; ++nId) - rWhichIds.Insert( nId ); - } + rWhichIds.Insert( nId ); } - if (aParaWhichIds.Count()) - lcl_SelectParaAndReset( *pUnoCrsr, *pUnoCrsr->GetDoc(), &aParaWhichIds ); - if (aWhichIds.Count() ) - pUnoCrsr->GetDoc()->ResetAttrs( *pUnoCrsr, sal_True, &aWhichIds ); } - else - throw uno::RuntimeException(); } -void SAL_CALL SwXTextCursor::setPropertiesToDefault( const Sequence< OUString >& aPropertyNames ) - throw (UnknownPropertyException, RuntimeException) +void SAL_CALL +SwXTextCursor::setAllPropertiesToDefault() +throw (uno::RuntimeException) +{ + vos::OGuard aGuard(Application::GetSolarMutex()); + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + SvUShortsSort aParaWhichIds; + SvUShortsSort aWhichIds; + lcl_EnumerateIds(g_ParaResetableSetRange, aParaWhichIds); + lcl_EnumerateIds(g_ResetableSetRange, aWhichIds); + if (aParaWhichIds.Count()) + { + lcl_SelectParaAndReset(rUnoCursor, *rUnoCursor.GetDoc(), + &aParaWhichIds); + } + if (aWhichIds.Count()) + { + rUnoCursor.GetDoc()->ResetAttrs(rUnoCursor, sal_True, &aWhichIds); + } +} + +void SAL_CALL +SwXTextCursor::setPropertiesToDefault( + const uno::Sequence< OUString >& rPropertyNames) +throw (beans::UnknownPropertyException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Int32 nCount = aPropertyNames.getLength(); + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + const sal_Int32 nCount = rPropertyNames.getLength(); if ( nCount ) { - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) + SwDoc & rDoc = *rUnoCursor.GetDoc(); + const OUString * pNames = rPropertyNames.getConstArray(); + SvUShortsSort aWhichIds; + SvUShortsSort aParaWhichIds; + for (sal_Int32 i = 0; i < nCount; i++) { - SwDoc* pDoc = pUnoCrsr->GetDoc(); - const OUString * pNames = aPropertyNames.getConstArray(); - SvUShortsSort aWhichIds, aParaWhichIds; - for ( sal_Int32 i = 0; i < nCount; i++ ) + SfxItemPropertySimpleEntry const*const pEntry = + m_pImpl->m_rPropSet.getPropertyMap()->getByName( pNames[i] ); + if (!pEntry) { - const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( pNames[i] ); - if(!pEntry) + if (pNames[i].equalsAsciiL( + SW_PROP_NAME(UNO_NAME_IS_SKIP_HIDDEN_TEXT)) || + pNames[i].equalsAsciiL( + SW_PROP_NAME(UNO_NAME_IS_SKIP_PROTECTED_TEXT))) { - if(pNames[i].equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_SKIP_HIDDEN_TEXT)) || - pNames[i].equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_SKIP_PROTECTED_TEXT))) - { - continue; - } - else - throw UnknownPropertyException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pNames[i], static_cast < cppu::OWeakObject * > ( 0 ) ); + continue; } - if( pEntry->nFlags & PropertyAttribute::READONLY) - throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "setPropertiesToDefault: property is read-only: " ) ) + pNames[i], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + pNames[i], + static_cast(this)); + } + if (pEntry->nFlags & beans::PropertyAttribute::READONLY) + { + throw uno::RuntimeException( + OUString(RTL_CONSTASCII_USTRINGPARAM( + "setPropertiesToDefault: property is read-only: ")) + + pNames[i], + static_cast(this)); + } - if( pEntry->nWID < RES_FRMATR_END) + if (pEntry->nWID < RES_FRMATR_END) + { + if (pEntry->nWID < RES_PARATR_BEGIN) { - if(pEntry->nWID < RES_PARATR_BEGIN) - aWhichIds.Insert(pEntry->nWID); - else - aParaWhichIds.Insert (pEntry->nWID); + aWhichIds.Insert(pEntry->nWID); } - else if ( pEntry->nWID == FN_UNO_NUM_START_VALUE ) - SwUnoCursorHelper::resetCrsrPropertyValue(*pEntry, *pUnoCrsr); + else + { + aParaWhichIds.Insert(pEntry->nWID); + } + } + else if (pEntry->nWID == FN_UNO_NUM_START_VALUE) + { + SwUnoCursorHelper::resetCrsrPropertyValue(*pEntry, rUnoCursor); } + } - if ( aParaWhichIds.Count() ) - lcl_SelectParaAndReset ( *pUnoCrsr, *pDoc, &aParaWhichIds ); - if (aWhichIds.Count() ) - pDoc->ResetAttrs(*pUnoCrsr, sal_True, &aWhichIds); + if (aParaWhichIds.Count()) + { + lcl_SelectParaAndReset(rUnoCursor, rDoc, &aParaWhichIds); + } + if (aWhichIds.Count()) + { + rDoc.ResetAttrs(rUnoCursor, sal_True, &aWhichIds); } - else - throw uno::RuntimeException(); } } -Sequence< Any > SAL_CALL SwXTextCursor::getPropertyDefaults( const Sequence< OUString >& aPropertyNames ) - throw (UnknownPropertyException, WrappedTargetException, RuntimeException) + +uno::Sequence< uno::Any > SAL_CALL +SwXTextCursor::getPropertyDefaults( + const uno::Sequence< OUString >& rPropertyNames) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - sal_Int32 nCount = aPropertyNames.getLength(); - Sequence < Any > aRet ( nCount ); + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + const sal_Int32 nCount = rPropertyNames.getLength(); + uno::Sequence< uno::Any > aRet(nCount); if ( nCount ) { - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if (pUnoCrsr) + SwDoc & rDoc = *rUnoCursor.GetDoc(); + const OUString *pNames = rPropertyNames.getConstArray(); + uno::Any *pAny = aRet.getArray(); + for (sal_Int32 i = 0; i < nCount; i++) { - SwDoc* pDoc = pUnoCrsr->GetDoc(); - const OUString *pNames = aPropertyNames.getConstArray(); - Any *pAny = aRet.getArray(); - for ( sal_Int32 i = 0; i < nCount; i++) + SfxItemPropertySimpleEntry const*const pEntry = + m_pImpl->m_rPropSet.getPropertyMap()->getByName( pNames[i] ); + if (!pEntry) { - const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( pNames[i] ); - if(!pEntry) + if (pNames[i].equalsAsciiL( + SW_PROP_NAME(UNO_NAME_IS_SKIP_HIDDEN_TEXT)) || + pNames[i].equalsAsciiL( + SW_PROP_NAME(UNO_NAME_IS_SKIP_PROTECTED_TEXT))) { - if(pNames[i].equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_SKIP_HIDDEN_TEXT)) || - pNames[i].equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_SKIP_PROTECTED_TEXT))) - { - continue; - } - else - throw UnknownPropertyException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pNames[i], static_cast < cppu::OWeakObject * > ( 0 ) ); - } - if(pEntry->nWID < RES_FRMATR_END) - { - const SfxPoolItem& rDefItem = pDoc->GetAttrPool().GetDefaultItem(pEntry->nWID); - rDefItem.QueryValue(pAny[i], pEntry->nMemberId); + continue; } + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + pNames[i], + static_cast(0)); + } + if (pEntry->nWID < RES_FRMATR_END) + { + const SfxPoolItem& rDefItem = + rDoc.GetAttrPool().GetDefaultItem(pEntry->nWID); + rDefItem.QueryValue(pAny[i], pEntry->nMemberId); } } - else - throw UnknownPropertyException(); } return aRet; } @@ -2681,17 +2695,17 @@ Sequence< Any > SAL_CALL SwXTextCursor::getPropertyDefaults( const Sequence< OUS /*-- 10.03.2008 09:58:47--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXTextCursor::makeRedline( +void SAL_CALL +SwXTextCursor::makeRedline( const ::rtl::OUString& rRedlineType, - const uno::Sequence< beans::PropertyValue >& rRedlineProperties ) - throw (lang::IllegalArgumentException, uno::RuntimeException) + const uno::Sequence< beans::PropertyValue >& rRedlineProperties) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) - SwUnoCursorHelper::makeRedline( *pUnoCrsr, rRedlineType, rRedlineProperties ); - else - throw uno::RuntimeException(); + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + SwUnoCursorHelper::makeRedline(rUnoCursor, rRedlineType, rRedlineProperties); } /*-- 09.12.98 14:18:58--------------------------------------------------- @@ -2704,12 +2718,9 @@ throw (lang::IllegalArgumentException, io::IOException, { vos::OGuard aGuard(Application::GetSolarMutex()); - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if (!pUnoCrsr) - { - throw uno::RuntimeException(); - } - SwUnoCursorHelper::InsertFile(pUnoCrsr, rURL, rOptions); + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + SwUnoCursorHelper::InsertFile(&rUnoCursor, rURL, rOptions); } /* -----------------------------15.12.00 14:01-------------------------------- @@ -3056,46 +3067,41 @@ throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwSortOptions aSortOpt; - SwUnoCrsr* pUnoCrsr = GetCrsr(); - - if (!pUnoCrsr) - { - throw uno::RuntimeException(); - } + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); - if (pUnoCrsr->HasMark()) + if (rUnoCursor.HasMark()) { + SwSortOptions aSortOpt; if (!SwUnoCursorHelper::ConvertSortProperties(rDescriptor, aSortOpt)) { - throw uno::RuntimeException(); + throw uno::RuntimeException(); } - UnoActionContext aContext( pUnoCrsr->GetDoc() ); + UnoActionContext aContext( rUnoCursor.GetDoc() ); - SwPosition* pStart = pUnoCrsr->Start(); - SwPosition* pEnd = pUnoCrsr->End(); + SwPosition & rStart = *rUnoCursor.Start(); + SwPosition & rEnd = *rUnoCursor.End(); - SwNodeIndex aPrevIdx( pStart->nNode, -1 ); - ULONG nOffset = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex(); - xub_StrLen nCntStt = pStart->nContent.GetIndex(); + SwNodeIndex aPrevIdx( rStart.nNode, -1 ); + const ULONG nOffset = rEnd.nNode.GetIndex() - rStart.nNode.GetIndex(); + const xub_StrLen nCntStt = rStart.nContent.GetIndex(); - pUnoCrsr->GetDoc()->SortText(*pUnoCrsr, aSortOpt); + rUnoCursor.GetDoc()->SortText(rUnoCursor, aSortOpt); // Selektion wieder setzen - pUnoCrsr->DeleteMark(); - pUnoCrsr->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 ); - SwCntntNode* pCNd = pUnoCrsr->GetCntntNode(); + rUnoCursor.DeleteMark(); + rUnoCursor.GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 ); + SwCntntNode *const pCNd = rUnoCursor.GetCntntNode(); xub_StrLen nLen = pCNd->Len(); if (nLen > nCntStt) { nLen = nCntStt; } - pUnoCrsr->GetPoint()->nContent.Assign(pCNd, nLen ); - pUnoCrsr->SetMark(); + rUnoCursor.GetPoint()->nContent.Assign(pCNd, nLen ); + rUnoCursor.SetMark(); - pUnoCrsr->GetPoint()->nNode += nOffset; - pCNd = pUnoCrsr->GetCntntNode(); - pUnoCrsr->GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); + rUnoCursor.GetPoint()->nNode += nOffset; + SwCntntNode *const pCNd2 = rUnoCursor.GetCntntNode(); + rUnoCursor.GetPoint()->nContent.Assign( pCNd2, pCNd2->Len() ); } } @@ -3106,15 +3112,17 @@ uno::Reference< container::XEnumeration > SAL_CALL SwXTextCursor::createContentEnumeration(const OUString& rServiceName) throw (uno::RuntimeException) { - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if (!pUnoCrsr || - 0 != rServiceName.compareToAscii("com.sun.star.text.TextContent")) + vos::OGuard g(Application::GetSolarMutex()); + + if (!rServiceName.equalsAscii("com.sun.star.text.TextContent")) { throw uno::RuntimeException(); } + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + uno::Reference< container::XEnumeration > xRet = - new SwXParaFrameEnumeration(*pUnoCrsr, PARAFRAME_PORTION_TEXTRANGE); + new SwXParaFrameEnumeration(rUnoCursor, PARAFRAME_PORTION_TEXTRANGE); return xRet; } @@ -3124,18 +3132,16 @@ throw (uno::RuntimeException) uno::Reference< container::XEnumeration > SAL_CALL SwXTextCursor::createEnumeration() throw (uno::RuntimeException) { - SwUnoCrsr* pUnoCrsr = GetCrsr(); - if (!pUnoCrsr) - { - throw uno::RuntimeException(); - } - uno::Reference xTunnel(xParentText, UNO_QUERY); + vos::OGuard g(Application::GetSolarMutex()); + + SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() ); + + const uno::Reference xTunnel( + m_pImpl->m_xParentText, uno::UNO_QUERY); SwXText* pParentText = 0; if (xTunnel.is()) { - pParentText = reinterpret_cast< SwXText *>( - sal::static_int_cast< sal_IntPtr >( - xTunnel->getSomething(SwXText::getUnoTunnelId()) )); + pParentText = ::sw::UnoTunnelGetImplementation(xTunnel); } DBG_ASSERT(pParentText, "parent is not a SwXText"); if (!pParentText) @@ -3144,15 +3150,15 @@ SwXTextCursor::createEnumeration() throw (uno::RuntimeException) } ::std::auto_ptr pNewCrsr( - pUnoCrsr->GetDoc()->CreateUnoCrsr(*pUnoCrsr->GetPoint()) ); - if (pUnoCrsr->HasMark()) + rUnoCursor.GetDoc()->CreateUnoCrsr(*rUnoCursor.GetPoint()) ); + if (rUnoCursor.HasMark()) { pNewCrsr->SetMark(); - *pNewCrsr->GetMark() = *pUnoCrsr->GetMark(); + *pNewCrsr->GetMark() = *rUnoCursor.GetMark(); } - const CursorType eSetType = (CURSOR_TBLTEXT == eType) + const CursorType eSetType = (CURSOR_TBLTEXT == m_pImpl->m_eType) ? CURSOR_SELECTION_IN_TABLE : CURSOR_SELECTION; - const uno::Reference< XEnumeration > xRet = + const uno::Reference< container::XEnumeration > xRet = new SwXParagraphEnumeration(pParentText, pNewCrsr, eSetType); return xRet; @@ -3164,7 +3170,7 @@ SwXTextCursor::createEnumeration() throw (uno::RuntimeException) uno::Type SAL_CALL SwXTextCursor::getElementType() throw (uno::RuntimeException) { - return ::getCppuType((uno::Reference*)0); + return text::XTextRange::static_type(); } /* -----------------------------07.03.01 15:43-------------------------------- diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index 04162db925..4e7122560f 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -141,9 +141,9 @@ uno::Reference SwXRedlineText::createTextCursor(void) vos::OGuard aGuard(Application::GetSolarMutex()); SwPosition aPos(aNodeIndex); - SwXTextCursor* pCrsr = new SwXTextCursor(this, aPos, CURSOR_REDLINE, - GetDoc()); - SwUnoCrsr* pUnoCursor = pCrsr->GetCrsr(); + SwXTextCursor *const pXCursor = + new SwXTextCursor(*GetDoc(), this, CURSOR_REDLINE, aPos); + SwUnoCrsr *const pUnoCursor = pXCursor->GetCursor(); pUnoCursor->Move(fnMoveForward, fnGoNode); // #101929# prevent a newly created text cursor from running inside a table @@ -175,7 +175,7 @@ uno::Reference SwXRedlineText::createTextCursor(void) throw aExcept; } - return (text::XWordCursor*)pCrsr; + return static_cast(pXCursor); } /* --------------------------------------------------------------------------- @@ -716,8 +716,9 @@ uno::Reference< text::XTextCursor > SwXRedline::createTextCursor(void) throw( u if(pNodeIndex) { SwPosition aPos(*pNodeIndex); - SwXTextCursor* pCrsr = new SwXTextCursor(this, aPos, CURSOR_REDLINE, pDoc); - SwUnoCrsr* pUnoCrsr = pCrsr->GetCrsr(); + SwXTextCursor *const pXCursor = + new SwXTextCursor(*pDoc, this, CURSOR_REDLINE, aPos); + SwUnoCrsr *const pUnoCrsr = pXCursor->GetCursor(); pUnoCrsr->Move(fnMoveForward, fnGoNode); //steht hier eine Tabelle? @@ -731,7 +732,7 @@ uno::Reference< text::XTextCursor > SwXRedline::createTextCursor(void) throw( u } if(pCont) pUnoCrsr->GetPoint()->nContent.Assign(pCont, 0); - xRet = (text::XWordCursor*)pCrsr; + xRet = static_cast(pXCursor); } else { diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index a9d58c7e69..f1f6cba52f 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -638,8 +639,8 @@ void SwXMetaText::PrepareForAttach( uno::Reference & xRange, { // create a new cursor to prevent modifying SwXTextRange xRange = static_cast( - new SwXTextCursor(&m_rMeta, *rPam.GetPoint(), CURSOR_META, - GetDoc(), (rPam.HasMark()) ? rPam.GetMark() : 0)); + new SwXTextCursor(*GetDoc(), &m_rMeta, CURSOR_META, *rPam.GetPoint(), + (rPam.HasMark()) ? rPam.GetMark() : 0)); } bool SwXMetaText::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb) @@ -663,7 +664,7 @@ throw (uno::RuntimeException) { SwPosition aPos(*pTxtNode, nMetaStart); xRet = static_cast( - new SwXTextCursor(&m_rMeta, aPos, CURSOR_META, GetDoc())); + new SwXTextCursor(*GetDoc(), &m_rMeta, CURSOR_META, aPos)); } } return xRet; diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index ed38bda74a..3087e3c90c 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1035,10 +1035,11 @@ uno::Reference< text::XTextCursor > SwXCell::createTextCursor(void) throw( uno: { const SwStartNode* pSttNd = pStartNode ? pStartNode : pBox->GetSttNd(); SwPosition aPos(*pSttNd); - SwXTextCursor* pCrsr = new SwXTextCursor(this, aPos, CURSOR_TBLTEXT, GetDoc()); - SwUnoCrsr* pUnoCrsr = pCrsr->GetCrsr(); + SwXTextCursor *const pXCursor = + new SwXTextCursor(*GetDoc(), this, CURSOR_TBLTEXT, aPos); + SwUnoCrsr *const pUnoCrsr = pXCursor->GetCursor(); pUnoCrsr->Move(fnMoveForward, fnGoNode); - aRef = (text::XWordCursor*)pCrsr; + aRef = static_cast(pXCursor); // // no Cursor in protected sections // SwCrsrSaveState aSave( *pUnoCrsr ); // if(pUnoCrsr->IsInProtectTable( sal_True ) || @@ -1068,7 +1069,11 @@ uno::Reference< text::XTextCursor > SwXCell::createTextCursorByRange(const uno: p1 = p1->StartOfSectionNode(); if( p1 == pSttNd ) - aRef = (text::XWordCursor*)new SwXTextCursor(this , *aPam.GetPoint(), CURSOR_TBLTEXT, GetDoc(), aPam.GetMark()); + { + aRef = static_cast( + new SwXTextCursor(*GetDoc(), this, CURSOR_TBLTEXT, + *aPam.GetPoint(), aPam.GetMark())); + } } else throw uno::RuntimeException(); diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index f787f0e0fc..c3bffeb924 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -116,7 +116,7 @@ uno::Reference< text::XTextCursor > SwXText::createCursor() throw (uno::Runtim SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent(); SwPosition aPos(rNode); xRet = static_cast( - new SwXTextCursor(this, aPos, GetTextType(), GetDoc())); + new SwXTextCursor(*GetDoc(), this, GetTextType(), aPos)); xRet->gotoStart(sal_False); } return xRet; @@ -1437,7 +1437,7 @@ uno::Reference< text::XTextRange > SwXText::appendTextPortion( // SwPaM aPam(*pStartNode->EndOfSectionNode()); //aPam.Move( fnMoveBackward, fnGoNode ); - SwUnoCrsr* pCursor = pTextCursor->GetCrsr(); + SwUnoCrsr * pCursor = pTextCursor->GetCursor(); pCursor->MovePara( fnParaCurr, fnParaEnd ); pDoc->DontExpandFmt( *pCursor->Start() ); @@ -2326,7 +2326,7 @@ SwXTextCursor * SwXBodyText::CreateTextCursor(const bool bIgnoreTables) aPam.GetPoint()->nContent.Assign(pCont, 0); } } - return new SwXTextCursor(this, *aPam.GetPoint(), CURSOR_BODY, GetDoc()); + return new SwXTextCursor(*GetDoc(), this, CURSOR_BODY, *aPam.GetPoint()); } /*-- 10.12.98 11:17:29--------------------------------------------------- @@ -2374,7 +2374,11 @@ uno::Reference< text::XTextCursor > SwXBodyText::createTextCursorByRange( SwStartNode* p2 = rNode.StartOfSectionNode(); if(p1 == p2) - aRef = (text::XWordCursor*)new SwXTextCursor(this , *aPam.GetPoint(), CURSOR_BODY, GetDoc(), aPam.GetMark()); + { + aRef = static_cast( + new SwXTextCursor(*GetDoc(), this, CURSOR_BODY, + *aPam.GetPoint(), aPam.GetMark())); + } } if(!aRef.is()) throw uno::RuntimeException(); @@ -2554,8 +2558,9 @@ uno::Reference< text::XTextCursor > SwXHeadFootText::createTextCursor(void) thr const SwFmtCntnt& rFlyCntnt = pHeadFootFmt->GetCntnt(); const SwNode& rNode = rFlyCntnt.GetCntntIdx()->GetNode(); SwPosition aPos(rNode); - SwXTextCursor* pCrsr = new SwXTextCursor(this, aPos, bIsHeader ? CURSOR_HEADER : CURSOR_FOOTER, GetDoc()); - SwUnoCrsr* pUnoCrsr = pCrsr->GetCrsr(); + SwXTextCursor *const pXCursor = new SwXTextCursor(*GetDoc(), this, + (bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER, aPos); + SwUnoCrsr *const pUnoCrsr = pXCursor->GetCursor(); pUnoCrsr->Move(fnMoveForward, fnGoNode); //save current start node to be able to check if there is content after the table - @@ -2578,12 +2583,11 @@ uno::Reference< text::XTextCursor > SwXHeadFootText::createTextCursor(void) thr bIsHeader ? SwHeaderStartNode : SwFooterStartNode); if(!pNewStartNode || pNewStartNode != pOwnStartNode) { - pCrsr = NULL; uno::RuntimeException aExcept; aExcept.Message = S2U("no text available"); throw aExcept; } - xRet = (text::XWordCursor*)pCrsr; + xRet = static_cast(pXCursor); } else { @@ -2614,8 +2618,12 @@ uno::Reference< text::XTextCursor > SwXHeadFootText::createTextCursorByRange( SwStartNode* p1 = aPam.GetNode()->FindSttNodeByType( bIsHeader ? SwHeaderStartNode : SwFooterStartNode); if(p1 == pOwnStartNode) - xRet = (text::XWordCursor*)new SwXTextCursor(this, *aPam.GetPoint(), - bIsHeader ? CURSOR_HEADER : CURSOR_FOOTER, GetDoc(), aPam.GetMark()); + { + xRet = static_cast( + new SwXTextCursor(*GetDoc(), this, + (bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER, + *aPam.GetPoint(), aPam.GetMark())); + } } return xRet; } diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index b28c444f26..b3318dbe9b 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -500,11 +500,11 @@ Reference XMLRedlineImportHelper::CreateRedlineTextSection( // create (UNO-) cursor SwPosition aPos(*pRedlineNode); - SwXTextCursor* pCursor = - new SwXTextCursor(pXText, aPos, CURSOR_REDLINE, pDoc); - pCursor->GetCrsr()->Move(fnMoveForward, fnGoNode); - - xReturn = (XWordCursor*)pCursor; // cast to avoid ambigiouty + SwXTextCursor *const pXCursor = + new SwXTextCursor(*pDoc, pXText, CURSOR_REDLINE, aPos); + pXCursor->GetCursor()->Move(fnMoveForward, fnGoNode); + // cast to avoid ambiguity + xReturn = static_cast(pXCursor); } // else: unknown redline -> Ignore diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 97e419d050..f2d43e070a 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -733,7 +733,7 @@ SwUnoCrsr* SwXTextDocument::CreateCursorForSearch(Reference< XTextCursor > & xC SwXTextCursor *const pXTextCursor = pBText->CreateTextCursor(true); xCrsr.set( static_cast(pXTextCursor) ); - SwUnoCrsr *const pUnoCrsr = pXTextCursor->GetCrsr(); + SwUnoCrsr *const pUnoCrsr = pXTextCursor->GetCursor(); pUnoCrsr->SetRemainInSection(sal_False); return pUnoCrsr; } @@ -987,7 +987,7 @@ Reference< XInterface > SwXTextDocument::findFirst(const Reference< util::XSear const uno::Reference< text::XText > xParent = ::sw::CreateParentXText(*pDocShell->GetDoc(), *pResultCrsr->GetPoint()); - xRet = *new SwXTextCursor(xParent, pResultCrsr); + xRet = *new SwXTextCursor(xParent, *pResultCrsr); delete pResultCrsr; } return xRet; @@ -1015,7 +1015,7 @@ Reference< XInterface > SwXTextDocument::findNext(const Reference< XInterface > ::sw::CreateParentXText(*pDocShell->GetDoc(), *pResultCrsr->GetPoint()); - xRet = *new SwXTextCursor(xParent, pResultCrsr); + xRet = *new SwXTextCursor(xParent, *pResultCrsr); delete pResultCrsr; } return xRet; -- cgit v1.2.3 From 09bb367e6c6ebd6e13d0d188fbeea65643a0e137 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:56 +0100 Subject: swunolocking1: #i105557#: fix locking for SwXText: add Impl struct, and use UnoImplPtr to lock destructor. move all implementation details out of header, into Impl struct. use new XUnoTunnel and XServiceInfo helpers. clean up the implementation a little. --- sw/inc/unofootnote.hxx | 2 +- sw/inc/unoframe.hxx | 10 +- sw/inc/unotbl.hxx | 14 +- sw/inc/unotext.hxx | 63 +- sw/inc/unotextbodyhf.hxx | 2 +- sw/source/core/unocore/unoframe.cxx | 3 +- sw/source/core/unocore/unoftn.cxx | 3 +- sw/source/core/unocore/unoobj2.cxx | 2 +- sw/source/core/unocore/unorefmk.cxx | 11 +- sw/source/core/unocore/unotbl.cxx | 21 +- sw/source/core/unocore/unotext.cxx | 2137 ++++++++++++++++++----------------- 11 files changed, 1162 insertions(+), 1106 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unofootnote.hxx b/sw/inc/unofootnote.hxx index d1c869404d..8710f7effa 100644 --- a/sw/inc/unofootnote.hxx +++ b/sw/inc/unofootnote.hxx @@ -85,7 +85,7 @@ protected: virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > - createCursor() + CreateCursor() throw (::com::sun::star::uno::RuntimeException); virtual ~SwXFootnote(); diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx index e48f029b00..1d7b17cf22 100644 --- a/sw/inc/unoframe.hxx +++ b/sw/inc/unoframe.hxx @@ -186,12 +186,18 @@ class SwXTextFrame : public SwXTextFrameBaseClass, protected: virtual const SwStartNode *GetStartNode() const; - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor()throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextCursor > + CreateCursor() + throw (::com::sun::star::uno::RuntimeException); + virtual ~SwXTextFrame(); public: SwXTextFrame(SwDoc *pDoc); SwXTextFrame(SwFrmFmt& rFmt); - + + // FIXME: EVIL HACK: make available for SwXFrame::attachToRange + void SetDoc(SwDoc *const pDoc) { SwXText::SetDoc(pDoc); }; virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL acquire( ) throw(); diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index bc66e61c26..7b2272b090 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -106,14 +106,16 @@ class SwXCell : public SwXCellBaseClass, // table position where pBox was found last sal_uInt16 nFndPos; - using SwXText::IsValid; - protected: virtual const SwStartNode *GetStartNode() const; - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor()throw(::com::sun::star::uno::RuntimeException); - - sal_Bool IsValid(); - + + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextCursor > + CreateCursor() + throw (::com::sun::star::uno::RuntimeException); + + bool IsValid() const; + virtual ~SwXCell(); public: diff --git a/sw/inc/unotext.hxx b/sw/inc/unotext.hxx index 97a45ece73..3c805da512 100644 --- a/sw/inc/unotext.hxx +++ b/sw/inc/unotext.hxx @@ -40,8 +40,6 @@ #include #include -#include - #include @@ -75,28 +73,24 @@ class SwXText private: - SwDoc* pDoc; - BOOL bObjectValid; - CursorType eCrsrType; - const SfxItemPropertySet* m_pPropSet; - - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > SAL_CALL - finishOrAppendParagraph( - bool bFinish, - const ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue >& - rCharacterAndParagraphProperties) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); + class Impl; + ::sw::UnoImplPtr m_pImpl; virtual void PrepareForAttach( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, SwPaM const & rPam); + virtual bool CheckForOwnMemberMeta( + const SwPaM & rPam, const bool bAbsorb) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); protected: + bool IsValid() const; + void Invalidate(); + void SetDoc(SwDoc *const pDoc); + virtual ~SwXText(); public: /*not protected because C++ is retarded*/ @@ -104,41 +98,16 @@ public: /*not protected because C++ is retarded*/ public: - SwXText(SwDoc* pDc, CursorType eType); + SwXText(SwDoc *const pDoc, const enum CursorType eType); - const SwDoc* GetDoc() const { return pDoc; } - SwDoc* GetDoc() { return pDoc; } - - // SwDoc is set when SwXText is attached - void SetDoc(SwDoc* pDc) { - DBG_ASSERT(!pDoc || !pDc, "Doc schon gesetzt?"); - pDoc = pDc; - bObjectValid = 0 != pDc; - } - - void Invalidate() { bObjectValid = sal_False; } - BOOL IsValid() const { return bObjectValid; } - - CursorType GetTextType() { return eCrsrType; } + const SwDoc* GetDoc() const; + SwDoc* GetDoc(); virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextCursor > createCursor() + ::com::sun::star::text::XTextCursor > + CreateCursor() throw (::com::sun::star::uno::RuntimeException); - INT16 ComparePositions( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange>& xPos1, - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange>& xPos2) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - BOOL CheckForOwnMember(const SwXTextRange* pRange1, - const OTextCursorHelper* pCursor1) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - virtual bool CheckForOwnMemberMeta( - const SwPaM & rPam, const bool bAbsorb) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); + // XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( diff --git a/sw/inc/unotextbodyhf.hxx b/sw/inc/unotextbodyhf.hxx index baab8bc158..98656ca68c 100644 --- a/sw/inc/unotextbodyhf.hxx +++ b/sw/inc/unotextbodyhf.hxx @@ -149,7 +149,7 @@ protected: virtual const SwStartNode *GetStartNode() const; virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > - createCursor() + CreateCursor() throw (::com::sun::star::uno::RuntimeException); virtual ~SwXHeadFootText(); diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index c1a5a632e5..afea552fd2 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2611,7 +2611,8 @@ const SwStartNode *SwXTextFrame::GetStartNode() const return pSttNd; } -uno::Reference< text::XTextCursor > SwXTextFrame::createCursor() throw ( uno::RuntimeException) +uno::Reference< text::XTextCursor > +SwXTextFrame::CreateCursor() throw (uno::RuntimeException) { return createTextCursor(); } diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index c0eeb66a9e..19787cdbd0 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -375,7 +375,8 @@ const SwStartNode *SwXFootnote::GetStartNode() const return pSttNd; } -uno::Reference< text::XTextCursor > SwXFootnote::createCursor() throw ( uno::RuntimeException) +uno::Reference< text::XTextCursor > +SwXFootnote::CreateCursor() throw (uno::RuntimeException) { return createTextCursor(); } diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index e1abe7a715..4c25d821eb 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1164,7 +1164,7 @@ bool XTextRangeToSwPaM( SwUnoInternalPaM & rToFill, if(pText) { const uno::Reference< text::XTextCursor > xTextCursor = - pText->createCursor(); + pText->CreateCursor(); xTextCursor->gotoEnd(sal_True); const uno::Reference xCrsrTunnel( xTextCursor, uno::UNO_QUERY); diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index f1f6cba52f..b3fe08f3a3 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -594,11 +594,14 @@ private: protected: virtual const SwStartNode *GetStartNode() const; virtual uno::Reference< text::XTextCursor > - createCursor() throw (uno::RuntimeException); + CreateCursor() throw (uno::RuntimeException); public: SwXMetaText(SwDoc & rDoc, SwXMeta & rMeta); + /// make available for SwXMeta + void Invalidate() { SwXText::Invalidate(); }; + // XInterface virtual void SAL_CALL acquire() throw() { OSL_ENSURE(false, "ERROR: SwXMetaText::acquire"); } @@ -649,7 +652,7 @@ bool SwXMetaText::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb) return m_rMeta.CheckForOwnMemberMeta(rPam, bAbsorb); } -uno::Reference< text::XTextCursor > SwXMetaText::createCursor() +uno::Reference< text::XTextCursor > SwXMetaText::CreateCursor() throw (uno::RuntimeException) { uno::Reference< text::XTextCursor > xRet; @@ -680,7 +683,7 @@ SwXMetaText::getImplementationId() throw (uno::RuntimeException) uno::Reference< text::XTextCursor > SAL_CALL SwXMetaText::createTextCursor() throw (uno::RuntimeException) { - return createCursor(); + return CreateCursor(); } uno::Reference< text::XTextCursor > SAL_CALL @@ -688,7 +691,7 @@ SwXMetaText::createTextCursorByRange( const uno::Reference & xTextPosition) throw (uno::RuntimeException) { - const uno::Reference xCursor( createCursor() ); + const uno::Reference xCursor( CreateCursor() ); xCursor->gotoRange(xTextPosition, sal_False); return xCursor; } diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 3087e3c90c..d94cce8a73 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -893,25 +893,32 @@ const SwStartNode *SwXCell::GetStartNode() const return pSttNd; } -uno::Reference< text::XTextCursor > SwXCell::createCursor() throw (uno::RuntimeException) +uno::Reference< text::XTextCursor > +SwXCell::CreateCursor() throw (uno::RuntimeException) { return createTextCursor(); } /*-- 11.12.98 10:56:24--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXCell::IsValid() +bool SwXCell::IsValid() const { + // FIXME: this is now a const method, to make SwXText::IsValid invisible + // but the const_cast here are still ridiculous. TODO: find a better way. SwFrmFmt* pTblFmt = pBox ? GetFrmFmt() : 0; if(!pTblFmt) - pBox = 0; + { + const_cast(this)->pBox = 0; + } else { SwTable* pTable = SwTable::FindTable( pTblFmt ); - const SwTableBox* pFoundBox ; - pFoundBox = FindBox(pTable, pBox); - if(!pFoundBox) - pBox = 0; + SwTableBox const*const pFoundBox = + const_cast(this)->FindBox(pTable, pBox); + if (!pFoundBox) + { + const_cast(this)->pBox = 0; + } } return 0 != pBox; } diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index c3bffeb924..82ad2cccc9 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -84,13 +84,92 @@ using ::rtl::OUString; const sal_Char cInvalidObject[] = "this object is invalid"; + /****************************************************************** * SwXText ******************************************************************/ + +class SwXText::Impl +{ + +public: + SwXText & m_rThis; + SfxItemPropertySet const& m_rPropSet; + const enum CursorType m_eType; + SwDoc * m_pDoc; + bool m_bIsValid; + + Impl( SwXText & rThis, + SwDoc *const pDoc, const enum CursorType eType) + : m_rThis(rThis) + , m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT)) + , m_eType(eType) + , m_pDoc(pDoc) + , m_bIsValid(0 != pDoc) + { + } + + uno::Reference< text::XTextRange > + finishOrAppendParagraph( + const bool bFinish, + const uno::Sequence< beans::PropertyValue >& + rCharacterAndParagraphProperties) + throw (lang::IllegalArgumentException, uno::RuntimeException); + + sal_Int16 ComparePositions( + const uno::Reference& xPos1, + const uno::Reference& xPos2) + throw (lang::IllegalArgumentException, uno::RuntimeException); + + bool CheckForOwnMember(const SwPaM & rPaM) + throw (lang::IllegalArgumentException, uno::RuntimeException); +}; + +/* -----------------------------15.03.2002 12:39------------------------------ + + ---------------------------------------------------------------------------*/ +SwXText::SwXText(SwDoc *const pDoc, const enum CursorType eType) + : m_pImpl( new SwXText::Impl(*this, pDoc, eType) ) +{ +} +/*-- 09.12.98 12:43:55--------------------------------------------------- + + -----------------------------------------------------------------------*/ +SwXText::~SwXText() +{ +} + /*-- 09.12.98 12:44:07--------------------------------------------------- -----------------------------------------------------------------------*/ +const SwDoc * SwXText::GetDoc() const +{ + return m_pImpl->m_pDoc; +} + SwDoc * SwXText::GetDoc() +{ + return m_pImpl->m_pDoc; +} + +bool SwXText::IsValid() const +{ + return m_pImpl->m_bIsValid; +} + +void SwXText::Invalidate() +{ + m_pImpl->m_bIsValid = false; +} + +void SwXText::SetDoc(SwDoc *const pDoc) +{ + OSL_ENSURE(!m_pImpl->m_pDoc || !pDoc, + "SwXText::SetDoc: already have a doc?"); + m_pImpl->m_pDoc = pDoc; + m_pImpl->m_bIsValid = (0 != pDoc); +} + void SwXText::PrepareForAttach(uno::Reference< text::XTextRange > &, const SwPaM &) { @@ -99,7 +178,7 @@ SwXText::PrepareForAttach(uno::Reference< text::XTextRange > &, const SwPaM &) bool SwXText::CheckForOwnMemberMeta(const SwPaM &, const bool) throw (lang::IllegalArgumentException, uno::RuntimeException) { - ASSERT(CURSOR_META != eCrsrType, "should not be called!"); + ASSERT(CURSOR_META != m_pImpl->m_eType, "should not be called!"); return false; } @@ -108,7 +187,8 @@ const SwStartNode *SwXText::GetStartNode() const return GetDoc()->GetNodes().GetEndOfContent().StartOfSectionNode(); } -uno::Reference< text::XTextCursor > SwXText::createCursor() throw (uno::RuntimeException) +uno::Reference< text::XTextCursor > +SwXText::CreateCursor() throw (uno::RuntimeException) { uno::Reference< text::XTextCursor > xRet; if(IsValid()) @@ -116,525 +196,457 @@ uno::Reference< text::XTextCursor > SwXText::createCursor() throw (uno::Runtim SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent(); SwPosition aPos(rNode); xRet = static_cast( - new SwXTextCursor(*GetDoc(), this, GetTextType(), aPos)); + new SwXTextCursor(*GetDoc(), this, m_pImpl->m_eType, aPos)); xRet->gotoStart(sal_False); } return xRet; } -/* -----------------------------15.03.2002 12:39------------------------------ - - ---------------------------------------------------------------------------*/ -SwXText::SwXText(SwDoc* pDc, CursorType eType) : - pDoc(pDc), - bObjectValid(0 != pDc), - eCrsrType(eType), - m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT)) -{ -} -/*-- 09.12.98 12:43:55--------------------------------------------------- - -----------------------------------------------------------------------*/ -SwXText::~SwXText() -{ -} /*-- 09.12.98 12:43:02--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SAL_CALL SwXText::queryInterface( const uno::Type& rType ) throw(uno::RuntimeException) -{ - const uno::Type& rXTextType = ::getCppuType((uno::Reference< text::XText >*)0); - const uno::Type& rXTextRangeCompareType = ::getCppuType((uno::Reference< text::XTextRangeCompare >*)0); - const uno::Type& rXSimpleTextType = ::getCppuType((const uno::Reference< XSimpleText >*)0); - const uno::Type& rXTextRangeType = ::getCppuType((uno::Reference< text::XTextRange >*)0); - const uno::Type& rXTypeProviderType = ::getCppuType((uno::Reference< lang::XTypeProvider >*)0); - const uno::Type& rXTextContentInsert = ::getCppuType((uno::Reference< text::XRelativeTextContentInsert >*)0); - const uno::Type& rXTextContentRemove = ::getCppuType((uno::Reference< text::XRelativeTextContentRemove >*)0); - const uno::Type& rXPropertySet = ::getCppuType((uno::Reference*)0); - const uno::Type& rXUnoTunnel = ::getCppuType((uno::Reference< lang::XUnoTunnel >*)0); - const uno::Type& rXTextPortionAppend = ::getCppuType((uno::Reference< text::XTextPortionAppend >*)0); - const uno::Type& rXParagraphAppend = ::getCppuType((uno::Reference< text::XParagraphAppend >*)0); - const uno::Type& rXTextContentAppend = ::getCppuType((uno::Reference< text::XTextContentAppend >*)0); - const uno::Type& rXTextConvert = ::getCppuType((uno::Reference< text::XTextConvert >*)0); - const uno::Type& rXTextAppend = ::getCppuType((uno::Reference< text::XTextAppend >*)0); - const uno::Type& rXTextAppendAndConvert = ::getCppuType((uno::Reference< text::XTextAppendAndConvert >*)0); - +uno::Any SAL_CALL +SwXText::queryInterface(const uno::Type& rType) throw (uno::RuntimeException) +{ uno::Any aRet; - if(rType == rXTextType) + if (rType == text::XText::static_type()) { - uno::Reference< text::XText > xRet = this; - aRet.setValue(&xRet, rXTextType); + aRet <<= uno::Reference< text::XText >(this); } - else if(rType == rXSimpleTextType) + else if (rType == text::XSimpleText::static_type()) { - uno::Reference< XSimpleText > xRet = this; - aRet.setValue(&xRet, rXSimpleTextType); + aRet <<= uno::Reference< text::XSimpleText >(this); } - else if(rType == rXTextRangeType) + else if (rType == text::XTextRange::static_type()) { - uno::Reference< text::XTextRange > xRet = this; - aRet.setValue(&xRet, rXTextRangeType); + aRet <<= uno::Reference< text::XTextRange>(this); } - else if(rType == rXTextRangeCompareType) + else if (rType == text::XTextRangeCompare::static_type()) { - uno::Reference< text::XTextRangeCompare > xRet = this; - aRet.setValue(&xRet, rXTextRangeCompareType); + aRet <<= uno::Reference< text::XTextRangeCompare >(this); } - else if(rType == rXTypeProviderType) + else if (rType == lang::XTypeProvider::static_type()) { - uno::Reference< lang::XTypeProvider > xRet = this; - aRet.setValue(&xRet, rXTypeProviderType); + aRet <<= uno::Reference< lang::XTypeProvider >(this); } - else if(rType == rXTextContentInsert) + else if (rType == text::XRelativeTextContentInsert::static_type()) { - uno::Reference< text::XRelativeTextContentInsert > xRet = this; - aRet.setValue(&xRet, rXTextContentInsert); + aRet <<= uno::Reference< text::XRelativeTextContentInsert >(this); } - else if(rType == rXTextContentRemove) + else if (rType == text::XRelativeTextContentRemove::static_type()) { - uno::Reference< text::XRelativeTextContentRemove > xRet = this; - aRet.setValue(&xRet, rXTextContentRemove); + aRet <<= uno::Reference< text::XRelativeTextContentRemove >(this); } - else if(rType == rXPropertySet) + else if (rType == beans::XPropertySet::static_type()) { - uno::Reference< beans::XPropertySet > xRet = this; - aRet.setValue(&xRet, rXPropertySet); + aRet <<= uno::Reference< beans::XPropertySet >(this); } - else if(rType == rXUnoTunnel ) + else if (rType == lang::XUnoTunnel::static_type()) { - uno::Reference< lang::XUnoTunnel > xRet = this; - aRet.setValue(&xRet, rXUnoTunnel); + aRet <<= uno::Reference< lang::XUnoTunnel >(this); } - else if(rType == rXTextAppendAndConvert ) + else if (rType == text::XTextAppendAndConvert::static_type()) { - uno::Reference< XTextAppendAndConvert > xRet = this; - aRet.setValue(&xRet, rXTextAppendAndConvert); + aRet <<= uno::Reference< text::XTextAppendAndConvert >(this); } - else if(rType == rXTextAppend ) + else if (rType == text::XTextAppend::static_type()) { - uno::Reference< XTextAppend > xRet = this; - aRet.setValue(&xRet, rXTextAppend); + aRet <<= uno::Reference< text::XTextAppend >(this); } - else if(rType == rXTextPortionAppend ) + else if (rType == text::XTextPortionAppend::static_type()) { - uno::Reference< XTextPortionAppend > xRet = this; - aRet.setValue(&xRet, rXTextPortionAppend); + aRet <<= uno::Reference< text::XTextPortionAppend >(this); } - else if(rType == rXParagraphAppend ) + else if (rType == text::XParagraphAppend::static_type()) { - uno::Reference< XParagraphAppend > xRet = this; - aRet.setValue(&xRet, rXParagraphAppend ); + aRet <<= uno::Reference< text::XParagraphAppend >(this); } - else if(rType == rXTextConvert ) + else if (rType == text::XTextConvert::static_type() ) { - uno::Reference< XTextConvert > xRet = this; - aRet.setValue(&xRet, rXParagraphAppend ); + aRet <<= uno::Reference< text::XTextConvert >(this); } - else if(rType == rXTextContentAppend ) + else if (rType == text::XTextContentAppend::static_type()) { - uno::Reference< XTextContentAppend > xRet = this; - aRet.setValue(&xRet, rXTextContentAppend ); + aRet <<= uno::Reference< text::XTextContentAppend >(this); } return aRet; } /* -----------------------------15.03.00 17:42-------------------------------- ---------------------------------------------------------------------------*/ -uno::Sequence< uno::Type > SAL_CALL SwXText::getTypes() throw(uno::RuntimeException) +uno::Sequence< uno::Type > SAL_CALL +SwXText::getTypes() throw (uno::RuntimeException) { uno::Sequence< uno::Type > aRet(12); uno::Type* pTypes = aRet.getArray(); - pTypes[0] = ::getCppuType((uno::Reference< text::XText >*)0); - pTypes[1] = ::getCppuType((uno::Reference< text::XTextRangeCompare >*)0); - pTypes[2] = ::getCppuType((uno::Reference< text::XRelativeTextContentInsert >*)0); - pTypes[3] = ::getCppuType((uno::Reference< text::XRelativeTextContentRemove >*)0); - pTypes[4] = ::getCppuType((uno::Reference< lang::XUnoTunnel >*)0); - pTypes[5] = ::getCppuType((uno::Reference< beans::XPropertySet >*)0); - pTypes[6] = ::getCppuType((uno::Reference< text::XTextPortionAppend >*)0); - pTypes[7] = ::getCppuType((uno::Reference< text::XParagraphAppend >*)0); - pTypes[8] = ::getCppuType((uno::Reference< text::XTextContentAppend >*)0); - pTypes[9] = ::getCppuType((uno::Reference< text::XTextConvert >*)0); - pTypes[10] = ::getCppuType((uno::Reference< text::XTextAppend >*)0); - pTypes[11] = ::getCppuType((uno::Reference< text::XTextAppendAndConvert >*)0); + pTypes[0] = text::XText::static_type(); + pTypes[1] = text::XTextRangeCompare::static_type(); + pTypes[2] = text::XRelativeTextContentInsert::static_type(); + pTypes[3] = text::XRelativeTextContentRemove::static_type(); + pTypes[4] = lang::XUnoTunnel::static_type(); + pTypes[5] = beans::XPropertySet::static_type(); + pTypes[6] = text::XTextPortionAppend::static_type(); + pTypes[7] = text::XParagraphAppend::static_type(); + pTypes[8] = text::XTextContentAppend::static_type(); + pTypes[9] = text::XTextConvert::static_type(); + pTypes[10] = text::XTextAppend::static_type(); + pTypes[11] = text::XTextAppendAndConvert::static_type(); return aRet; } // belongs the range in the text ? insert it then. -void SwXText::insertString(const uno::Reference< text::XTextRange >& xTextRange, - const OUString& aString, - sal_Bool bAbsorb) - throw( uno::RuntimeException ) +void SAL_CALL +SwXText::insertString(const uno::Reference< text::XTextRange >& xTextRange, + const OUString& rString, sal_Bool bAbsorb) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(GetDoc() && xTextRange.is()) + + if (!xTextRange.is()) { - uno::Reference xRangeTunnel( xTextRange, uno::UNO_QUERY); - SwXTextRange* pRange = 0; - OTextCursorHelper* pCursor = 0; - if(xRangeTunnel.is()) + throw uno::RuntimeException(); + } + if (!GetDoc()) + { + throw uno::RuntimeException(); + } + const uno::Reference xRangeTunnel(xTextRange, + uno::UNO_QUERY); + SwXTextRange *const pRange = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); + OTextCursorHelper *const pCursor = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); + if ((!pRange || pRange ->GetDoc() != GetDoc()) && + (!pCursor || pCursor->GetDoc() != GetDoc())) + { + throw uno::RuntimeException(); + } + + const SwStartNode *const pOwnStartNode = GetStartNode(); + SwPaM aPam(GetDoc()->GetNodes()); + const SwPaM * pPam(0); + if (pCursor) + { + pPam = pCursor->GetPaM(); + } + else // pRange + { + if (pRange->GetPositions(aPam)) { - pRange = reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) )); - pCursor = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); + pPam = &aPam; } + } + if (!pPam) + { + throw uno::RuntimeException(); + } - if(pRange && pRange->GetDoc() == GetDoc() || - pCursor && pCursor->GetDoc() == GetDoc()) - { - const SwStartNode *const pOwnStartNode = GetStartNode(); - SwPaM aPam(GetDoc()->GetNodes()); - const SwPaM * pPam(0); - if (pCursor) - { - pPam = pCursor->GetPaM(); - } - else // pRange - { - if (pRange->GetPositions(aPam)) - { - pPam = &aPam; - } - } - if (!pPam) - { - throw uno::RuntimeException(); - } - else - { - const SwStartNode* pTmp(pPam->GetNode()->StartOfSectionNode()); - while (pTmp && pTmp->IsSectionNode()) - { - pTmp = pTmp->StartOfSectionNode(); - } - if (!pOwnStartNode || (pOwnStartNode != pTmp)) - { - throw uno::RuntimeException(); - } - } + const SwStartNode* pTmp(pPam->GetNode()->StartOfSectionNode()); + while (pTmp && pTmp->IsSectionNode()) + { + pTmp = pTmp->StartOfSectionNode(); + } + if (!pOwnStartNode || (pOwnStartNode != pTmp)) + { + throw uno::RuntimeException(); + } - bool bForceExpandHints( false ); - if (CURSOR_META == eCrsrType) - { - try - { - bForceExpandHints = CheckForOwnMemberMeta(*pPam, bAbsorb); - } - catch (lang::IllegalArgumentException & iae) - { - // stupid method not allowed to throw iae - throw uno::RuntimeException(iae.Message, 0); - } - } - if(bAbsorb) + bool bForceExpandHints( false ); + if (CURSOR_META == m_pImpl->m_eType) + { + try + { + bForceExpandHints = CheckForOwnMemberMeta(*pPam, bAbsorb); + } + catch (lang::IllegalArgumentException & iae) + { + // stupid method not allowed to throw iae + throw uno::RuntimeException(iae.Message, 0); + } + } + if (bAbsorb) + { + //!! scan for CR characters and inserting the paragraph breaks + //!! has to be done in the called function. + //!! Implemented in SwXTextRange::DeleteAndInsert + if (pCursor) + { + SwXTextCursor * const pTextCursor( + dynamic_cast(pCursor) ); + if (pTextCursor) { - //!! scan for CR characters and inserting the paragraph breaks - //!! has to be done in the called function. - //!! Implemented in SwXTextRange::DeleteAndInsert - if (pCursor) - { - SwXTextCursor * const pTextCursor( dynamic_cast(pCursor) ); - if (pTextCursor) - { - pTextCursor->DeleteAndInsert(aString, bForceExpandHints); - } - else - { - xTextRange->setString(aString); - } - } - else - { - pRange->DeleteAndInsert(aString, bForceExpandHints); - } + pTextCursor->DeleteAndInsert(rString, bForceExpandHints); } else { - //hier wird ein PaM angelegt, der vor dem Parameter-PaM liegt, damit der - //Text davor eingefuegt wird - UnoActionContext aContext(GetDoc()); - SwPaM aInsertPam(*pPam->Start()); - const sal_Bool bGroupUndo = GetDoc()->DoesGroupUndo(); - GetDoc()->DoGroupUndo(sal_False); - - SwUnoCursorHelper::DocInsertStringSplitCR( - *GetDoc(), aInsertPam, aString, bForceExpandHints ); - GetDoc()->DoGroupUndo(bGroupUndo); + xTextRange->setString(rString); } } else - throw uno::RuntimeException(); + { + pRange->DeleteAndInsert(rString, bForceExpandHints); + } } else - throw uno::RuntimeException(); + { + // create a PaM positioned before the parameter PaM, + // so the text is inserted before + UnoActionContext aContext(GetDoc()); + SwPaM aInsertPam(*pPam->Start()); + const sal_Bool bGroupUndo = GetDoc()->DoesGroupUndo(); + GetDoc()->DoGroupUndo(sal_False); + + SwUnoCursorHelper::DocInsertStringSplitCR( + *GetDoc(), aInsertPam, rString, bForceExpandHints ); + GetDoc()->DoGroupUndo(bGroupUndo); + } } /*-- 09.12.98 12:43:16--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXText::insertControlCharacter(const uno::Reference< text::XTextRange > & xTextRange, - sal_Int16 nControlCharacter, sal_Bool bAbsorb) - throw( lang::IllegalArgumentException, uno::RuntimeException ) +void SAL_CALL +SwXText::insertControlCharacter( + const uno::Reference< text::XTextRange > & xTextRange, + sal_Int16 nControlCharacter, sal_Bool bAbsorb) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + if (!xTextRange.is()) + { throw lang::IllegalArgumentException(); - if (GetDoc()) + } + if (!GetDoc()) { - SwUnoInternalPaM aPam(*GetDoc()); - if (::sw::XTextRangeToSwPaM(aPam, xTextRange)) + throw uno::RuntimeException(); + } + + SwUnoInternalPaM aPam(*GetDoc()); + if (!::sw::XTextRangeToSwPaM(aPam, xTextRange)) + { + throw uno::RuntimeException(); + } + const bool bForceExpandHints(CheckForOwnMemberMeta(aPam, bAbsorb)); + + const enum IDocumentContentOperations::InsertFlags nInsertFlags = + (bForceExpandHints) + ? static_cast( + IDocumentContentOperations::INS_FORCEHINTEXPAND | + IDocumentContentOperations::INS_EMPTYEXPAND) + : IDocumentContentOperations::INS_EMPTYEXPAND; + + SwPaM aTmp(*aPam.Start()); + if (bAbsorb && aPam.HasMark()) + { + m_pImpl->m_pDoc->DeleteAndJoin(aPam); + } + + sal_Unicode cIns = 0; + switch (nControlCharacter) + { + case text::ControlCharacter::PARAGRAPH_BREAK : + // a table cell now becomes an ordinary text cell! + m_pImpl->m_pDoc->ClearBoxNumAttrs( aTmp.GetPoint()->nNode ); + m_pImpl->m_pDoc->SplitNode( *aTmp.GetPoint(), sal_False ); + break; + case text::ControlCharacter::APPEND_PARAGRAPH: { - const bool bForceExpandHints(CheckForOwnMemberMeta(aPam, bAbsorb)); - - const enum IDocumentContentOperations::InsertFlags nInsertFlags = - (bForceExpandHints) - ? static_cast( - IDocumentContentOperations::INS_FORCEHINTEXPAND | - IDocumentContentOperations::INS_EMPTYEXPAND) - : IDocumentContentOperations::INS_EMPTYEXPAND; - - //Steuerzeichen einfuegen - SwPaM aTmp(*aPam.Start()); - if(bAbsorb && aPam.HasMark()) + m_pImpl->m_pDoc->ClearBoxNumAttrs( aTmp.GetPoint()->nNode ); + m_pImpl->m_pDoc->AppendTxtNode( *aTmp.GetPoint() ); + + const uno::Reference xRangeTunnel( + xTextRange, uno::UNO_QUERY); + SwXTextRange *const pRange = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); + OTextCursorHelper *const pCursor = + ::sw::UnoTunnelGetImplementation( + xRangeTunnel); + if (pRange) { - pDoc->DeleteAndJoin(aPam); + pRange->SetPositions(aTmp); } - - sal_Unicode cIns = 0; - switch( nControlCharacter ) + else if (pCursor) { - case text::ControlCharacter::PARAGRAPH_BREAK : - // eine Tabellen Zelle wird jetzt zu einer normalen Textzelle! - pDoc->ClearBoxNumAttrs( aTmp.GetPoint()->nNode ); - pDoc->SplitNode( *aTmp.GetPoint(), sal_False ); - break; - case text::ControlCharacter::APPEND_PARAGRAPH: - { - pDoc->ClearBoxNumAttrs( aTmp.GetPoint()->nNode ); - pDoc->AppendTxtNode( *aTmp.GetPoint() ); - - uno::Reference xRangeTunnel( xTextRange, uno::UNO_QUERY); - SwXTextRange* pRange = 0; - OTextCursorHelper* pCursor = 0; - if(xRangeTunnel.is()) - { - pRange = reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) )); - pCursor = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); - } - if(pRange) - { - pRange->SetPositions(aTmp); - } - else if(pCursor) - { - SwPaM* pCrsr = pCursor->GetPaM(); - *pCrsr->GetPoint() = *aTmp.GetPoint(); - pCrsr->DeleteMark(); - } - } - break; - case text::ControlCharacter::LINE_BREAK: cIns = 10; break; - case text::ControlCharacter::SOFT_HYPHEN: cIns = CHAR_SOFTHYPHEN; break; - case text::ControlCharacter::HARD_HYPHEN: cIns = CHAR_HARDHYPHEN; break; - case text::ControlCharacter::HARD_SPACE: cIns = CHAR_HARDBLANK; break; + SwPaM *const pCrsr = pCursor->GetPaM(); + *pCrsr->GetPoint() = *aTmp.GetPoint(); + pCrsr->DeleteMark(); } - if( cIns ) + } + break; + case text::ControlCharacter::LINE_BREAK: cIns = 10; break; + case text::ControlCharacter::SOFT_HYPHEN: cIns = CHAR_SOFTHYPHEN; break; + case text::ControlCharacter::HARD_HYPHEN: cIns = CHAR_HARDHYPHEN; break; + case text::ControlCharacter::HARD_SPACE: cIns = CHAR_HARDBLANK; break; + } + if (cIns) + { + m_pImpl->m_pDoc->InsertString( aTmp, cIns, nInsertFlags ); + } + + if (bAbsorb) + { + const uno::Reference xRangeTunnel( + xTextRange, uno::UNO_QUERY); + SwXTextRange *const pRange = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); + OTextCursorHelper *const pCursor = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); + + SwCursor aCrsr(*aTmp.GetPoint(),0,false); + SwUnoCursorHelper::SelectPam(aCrsr, true); + aCrsr.Left(1, CRSR_SKIP_CHARS, FALSE, FALSE); + //hier muss der uebergebene PaM umgesetzt werden: + if (pRange) + { + pRange->SetPositions(aCrsr); + } + else + { + SwPaM *const pUnoCrsr = pCursor->GetPaM(); + *pUnoCrsr->GetPoint() = *aCrsr.GetPoint(); + if (aCrsr.HasMark()) { - pDoc->InsertString( aTmp, cIns, nInsertFlags ); + pUnoCrsr->SetMark(); + *pUnoCrsr->GetMark() = *aCrsr.GetMark(); } - - if(bAbsorb) + else { - uno::Reference xRangeTunnel( xTextRange, uno::UNO_QUERY); - SwXTextRange* pRange = 0; - OTextCursorHelper* pCursor = 0; - if(xRangeTunnel.is()) - { - pRange = reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) )); - pCursor = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); - } - - SwCursor aCrsr(*aTmp.GetPoint(),0,false); - SwUnoCursorHelper::SelectPam(aCrsr, true); - aCrsr.Left(1, CRSR_SKIP_CHARS, FALSE, FALSE); - //hier muss der uebergebene PaM umgesetzt werden: - if(pRange) - { - pRange->SetPositions(aCrsr); - } - else - { - SwPaM* pUnoCrsr = pCursor->GetPaM(); - *pUnoCrsr->GetPoint() = *aCrsr.GetPoint(); - if(aCrsr.HasMark()) - { - pUnoCrsr->SetMark(); - *pUnoCrsr->GetMark() = *aCrsr.GetMark(); - } - else - pUnoCrsr->DeleteMark(); - } + pUnoCrsr->DeleteMark(); } } } - else - throw uno::RuntimeException(); } + /*-- 09.12.98 12:43:17--------------------------------------------------- -----------------------------------------------------------------------*/ - -void SwXText::insertTextContent(const uno::Reference< text::XTextRange > & xRange, - const uno::Reference< text::XTextContent > & xContent, sal_Bool bAbsorb) - throw( lang::IllegalArgumentException, uno::RuntimeException ) +void SAL_CALL +SwXText::insertTextContent( + const uno::Reference< text::XTextRange > & xRange, + const uno::Reference< text::XTextContent > & xContent, + sal_Bool bAbsorb) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - // erstmal testen, ob der Range an der richtigen Stelle ist und dann - // am Sw-Content attachToRange aufrufen + + if (!xRange.is()) + { + lang::IllegalArgumentException aIllegal; + aIllegal.Message = C2U("first parameter invalid;"); + throw aIllegal; + } + if (!xContent.is()) + { + lang::IllegalArgumentException aIllegal; + aIllegal.Message += C2U("second parameter invalid"); + throw aIllegal; + } if(!GetDoc()) { uno::RuntimeException aRuntime; aRuntime.Message = C2U(cInvalidObject); throw aRuntime; } - if(xRange.is() && xContent.is()) - { - SwUnoInternalPaM aPam(*GetDoc()); - if (::sw::XTextRangeToSwPaM(aPam, xRange)) - { - uno::Reference xRangeTunnel( xRange, uno::UNO_QUERY); - SwXTextRange* pRange = 0; - OTextCursorHelper* pCursor = 0; - SwXTextPortion* pPortion = 0; - SwXText* pText = 0; - if(xRangeTunnel.is()) - { - pRange = reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) )); - pCursor = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); - pPortion = reinterpret_cast< SwXTextPortion * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextPortion::getUnoTunnelId()) )); - pText = reinterpret_cast< SwXText * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXText::getUnoTunnelId()) )); - } + SwUnoInternalPaM aPam(*GetDoc()); + if (!::sw::XTextRangeToSwPaM(aPam, xRange)) + { + lang::IllegalArgumentException aIllegal; + aIllegal.Message = C2U("first parameter invalid"); + throw aIllegal; + } + // first test if the range is at the right position, then call + // xContent->attach + const SwStartNode* pOwnStartNode = GetStartNode(); + SwStartNodeType eSearchNodeType = SwNormalStartNode; + switch (m_pImpl->m_eType) + { + case CURSOR_FRAME: eSearchNodeType = SwFlyStartNode; break; + case CURSOR_TBLTEXT: eSearchNodeType = SwTableBoxStartNode; break; + case CURSOR_FOOTNOTE: eSearchNodeType = SwFootnoteStartNode; break; + case CURSOR_HEADER: eSearchNodeType = SwHeaderStartNode; break; + case CURSOR_FOOTER: eSearchNodeType = SwFooterStartNode; break; + //case CURSOR_INVALID: + //case CURSOR_BODY: + default: + break; + } - uno::Reference< text::XTextCursor > xOwnCursor = createCursor(); - uno::Reference xOwnTunnel( xOwnCursor, uno::UNO_QUERY); -// OTextCursorHelper* pOwnCursor = reinterpret_cast< OTextCursorHelper * >( -// sal::static_int_cast< sal_IntPtr >( xOwnTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); + const SwStartNode* pTmp = + aPam.GetNode()->FindSttNodeByType(eSearchNodeType); - const SwStartNode* pOwnStartNode = GetStartNode(); - SwStartNodeType eSearchNodeType = SwNormalStartNode; - switch(eCrsrType) - { - case CURSOR_FRAME: eSearchNodeType = SwFlyStartNode; break; - case CURSOR_TBLTEXT: eSearchNodeType = SwTableBoxStartNode; break; - case CURSOR_FOOTNOTE: eSearchNodeType = SwFootnoteStartNode; break; - case CURSOR_HEADER: eSearchNodeType = SwHeaderStartNode; break; - case CURSOR_FOOTER: eSearchNodeType = SwFooterStartNode; break; - //case CURSOR_INVALID: - //case CURSOR_BODY: - default: - ; - } + // ignore SectionNodes + while (pTmp && pTmp->IsSectionNode()) + { + pTmp = pTmp->StartOfSectionNode(); + } + // if the document starts with a section + while (pOwnStartNode->IsSectionNode()) + { + pOwnStartNode = pOwnStartNode->StartOfSectionNode(); + } + // this checks if (this) and xRange are in the same text::XText interface + if (pOwnStartNode != pTmp) + { + uno::RuntimeException aRunException; + aRunException.Message = C2U("text interface and cursor not related"); + throw aRunException; + } - const SwStartNode* pTmp = - aPam.GetNode()->FindSttNodeByType(eSearchNodeType); + const bool bForceExpandHints(CheckForOwnMemberMeta(aPam, bAbsorb)); - //SectionNodes ueberspringen - while(pTmp && pTmp->IsSectionNode()) - { - pTmp = pTmp->StartOfSectionNode(); - } - //if the document starts with a section - while(pOwnStartNode->IsSectionNode()) - { - pOwnStartNode = pOwnStartNode->StartOfSectionNode(); - } - //this checks if (this) and xRange are in the same text::XText interface - if(pOwnStartNode != pTmp) - { - uno::RuntimeException aRunException; - aRunException.Message = C2U("text interface and cursor not related"); - throw aRunException; - } + // special treatment for Contents that do not replace the range, but + // instead are "overlaid" + const uno::Reference xContentTunnel(xContent, + uno::UNO_QUERY); + if (!xContentTunnel.is()) + { + lang::IllegalArgumentException aArgException; + aArgException.Message = + C2U("text content does not support lang::XUnoTunnel"); + throw aArgException; + } + SwXDocumentIndexMark *const pDocumentIndexMark = + ::sw::UnoTunnelGetImplementation(xContentTunnel); + SwXTextSection *const pSection = + ::sw::UnoTunnelGetImplementation(xContentTunnel); + SwXBookmark *const pBookmark = + ::sw::UnoTunnelGetImplementation(xContentTunnel); + SwXReferenceMark *const pReferenceMark = + ::sw::UnoTunnelGetImplementation(xContentTunnel); + SwXMeta *const pMeta = + ::sw::UnoTunnelGetImplementation(xContentTunnel); - const bool bForceExpandHints(CheckForOwnMemberMeta(aPam, bAbsorb)); + const bool bAttribute = pBookmark || pDocumentIndexMark + || pSection || pReferenceMark || pMeta; - // Sonderbehandlung fuer Contents, die den Range nicht ersetzen, sonder darueber gelegt werden - // Bookmarks, IndexEntry - uno::Reference xContentTunnel( xContent, uno::UNO_QUERY); - if(!xContentTunnel.is()) - { - lang::IllegalArgumentException aArgException; - aArgException.Message = C2U("text content doesn't support lang::XUnoTunnel"); - throw aArgException; - } - SwXDocumentIndexMark* pDocumentIndexMark = reinterpret_cast< SwXDocumentIndexMark * >( - sal::static_int_cast< sal_IntPtr >( xContentTunnel->getSomething( SwXDocumentIndexMark::getUnoTunnelId()) )); - SwXTextSection* pSection = reinterpret_cast< SwXTextSection * >( - sal::static_int_cast< sal_IntPtr >( xContentTunnel->getSomething( SwXTextSection::getUnoTunnelId()) )); - SwXBookmark* pBookmark = reinterpret_cast< SwXBookmark * >( - sal::static_int_cast< sal_IntPtr >( xContentTunnel->getSomething( SwXBookmark::getUnoTunnelId()) )); - SwXReferenceMark* pReferenceMark = reinterpret_cast< SwXReferenceMark * >( - sal::static_int_cast< sal_IntPtr >( xContentTunnel->getSomething( SwXReferenceMark::getUnoTunnelId()) )); - SwXMeta *const pMeta = reinterpret_cast< SwXMeta* >( - sal::static_int_cast< sal_IntPtr >( - xContentTunnel->getSomething( SwXMeta::getUnoTunnelId()))); - - const bool bAttribute = pBookmark || pDocumentIndexMark - || pSection || pReferenceMark || pMeta; - - if(bAbsorb && !bAttribute) - { - xRange->setString(aEmptyStr); - } - //hier wird tatsaechlich eingefuegt - uno::Reference< text::XTextRange > xTempRange; - if(bAttribute && bAbsorb) - xTempRange = xRange; - else - xTempRange = xRange->getStart(); - if (bForceExpandHints) - { - // if necessary, replace xTempRange with a new SwXTextCursor - PrepareForAttach(xTempRange, aPam); - } - xContent->attach(xTempRange); - } - else - { - lang::IllegalArgumentException aIllegal; - aIllegal.Message = C2U("first parameter invalid"); - throw aIllegal; - } + if (bAbsorb && !bAttribute) + { + xRange->setString(aEmptyStr); } - else + uno::Reference< text::XTextRange > xTempRange = + (bAttribute && bAbsorb) ? xRange : xRange->getStart(); + if (bForceExpandHints) { - lang::IllegalArgumentException aIllegal; - if(!xRange.is()) - aIllegal.Message = C2U("first parameter invalid;"); - if(!xContent.is()) - aIllegal.Message += C2U("second parameter invalid"); - throw aIllegal; + // if necessary, replace xTempRange with a new SwXTextCursor + PrepareForAttach(xTempRange, aPam); } - + xContent->attach(xTempRange); } + /* -----------------------------10.07.00 15:40-------------------------------- ---------------------------------------------------------------------------*/ -void SwXText::insertTextContentBefore( +void SAL_CALL +SwXText::insertTextContentBefore( const uno::Reference< text::XTextContent>& xNewContent, const uno::Reference< text::XTextContent>& xSuccessor) - throw(lang::IllegalArgumentException, uno::RuntimeException) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + if(!GetDoc()) { uno::RuntimeException aRuntime; @@ -646,35 +658,37 @@ void SwXText::insertTextContentBefore( uno::UNO_QUERY); SwXParagraph *const pPara = ::sw::UnoTunnelGetImplementation(xParaTunnel); - if(!pPara || !pPara->IsDescriptor() || !xSuccessor.is()) + if (!pPara || !pPara->IsDescriptor() || !xSuccessor.is()) + { throw lang::IllegalArgumentException(); + } sal_Bool bRet = sal_False; const uno::Reference xSuccTunnel(xSuccessor, uno::UNO_QUERY); SwXTextSection *const pXSection = ::sw::UnoTunnelGetImplementation(xSuccTunnel); - SwXTextTable* pXTable = SwXTextTable::GetImplementation(xSuccessor ); - SwFrmFmt* pTableFmt = pXTable ? pXTable->GetFrmFmt() : 0; + SwXTextTable *const pXTable = + ::sw::UnoTunnelGetImplementation(xSuccTunnel); + SwFrmFmt *const pTableFmt = (pXTable) ? pXTable->GetFrmFmt() : 0; SwTxtNode * pTxtNode = 0; if(pTableFmt && pTableFmt->GetDoc() == GetDoc()) { - SwTable* pTable = SwTable::FindTable( pTableFmt ); - SwTableNode* pTblNode = pTable->GetTableNode(); + SwTable *const pTable = SwTable::FindTable( pTableFmt ); + SwTableNode *const pTblNode = pTable->GetTableNode(); - SwNodeIndex aTblIdx( *pTblNode, -1 ); + const SwNodeIndex aTblIdx( *pTblNode, -1 ); SwPosition aBefore(aTblIdx); bRet = GetDoc()->AppendTxtNode( aBefore ); pTxtNode = aBefore.nNode.GetNode().GetTxtNode(); } - else if(pXSection && - pXSection->GetFmt() && + else if (pXSection && pXSection->GetFmt() && pXSection->GetFmt()->GetDoc() == GetDoc()) { - SwSectionFmt* pSectFmt = pXSection->GetFmt(); - SwSectionNode* pSectNode = pSectFmt->GetSectionNode(); + SwSectionFmt *const pSectFmt = pXSection->GetFmt(); + SwSectionNode *const pSectNode = pSectFmt->GetSectionNode(); - SwNodeIndex aSectIdx( *pSectNode, -1 ); + const SwNodeIndex aSectIdx( *pSectNode, -1 ); SwPosition aBefore(aSectIdx); bRet = GetDoc()->AppendTxtNode( aBefore ); pTxtNode = aBefore.nNode.GetNode().GetTxtNode(); @@ -683,55 +697,59 @@ void SwXText::insertTextContentBefore( { throw lang::IllegalArgumentException(); } - else - { - pPara->attachToText(*this, *pTxtNode); - } - + pPara->attachToText(*this, *pTxtNode); } + /* -----------------------------10.07.00 15:40-------------------------------- ---------------------------------------------------------------------------*/ -void SwXText::insertTextContentAfter( +void SAL_CALL +SwXText::insertTextContentAfter( const uno::Reference< text::XTextContent>& xNewContent, const uno::Reference< text::XTextContent>& xPredecessor) - throw(lang::IllegalArgumentException, uno::RuntimeException) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + if(!GetDoc()) + { throw uno::RuntimeException(); + } + const uno::Reference xParaTunnel(xNewContent, uno::UNO_QUERY); SwXParagraph *const pPara = ::sw::UnoTunnelGetImplementation(xParaTunnel); if(!pPara || !pPara->IsDescriptor() || !xPredecessor.is()) + { throw lang::IllegalArgumentException(); + } const uno::Reference xPredTunnel(xPredecessor, uno::UNO_QUERY); SwXTextSection *const pXSection = ::sw::UnoTunnelGetImplementation(xPredTunnel); - SwXTextTable* pXTable = SwXTextTable::GetImplementation(xPredecessor ); - SwFrmFmt* pTableFmt = pXTable ? pXTable->GetFrmFmt() : 0; + SwXTextTable *const pXTable = + ::sw::UnoTunnelGetImplementation(xPredTunnel); + SwFrmFmt *const pTableFmt = (pXTable) ? pXTable->GetFrmFmt() : 0; sal_Bool bRet = sal_False; SwTxtNode * pTxtNode = 0; if(pTableFmt && pTableFmt->GetDoc() == GetDoc()) { - SwTable* pTable = SwTable::FindTable( pTableFmt ); - SwTableNode* pTblNode = pTable->GetTableNode(); + SwTable *const pTable = SwTable::FindTable( pTableFmt ); + SwTableNode *const pTblNode = pTable->GetTableNode(); - SwEndNode* pTableEnd = pTblNode->EndOfSectionNode(); + SwEndNode *const pTableEnd = pTblNode->EndOfSectionNode(); SwPosition aTableEnd(*pTableEnd); bRet = GetDoc()->AppendTxtNode( aTableEnd ); pTxtNode = aTableEnd.nNode.GetNode().GetTxtNode(); } - else if(pXSection && - pXSection->GetFmt() && + else if (pXSection && pXSection->GetFmt() && pXSection->GetFmt()->GetDoc() == GetDoc()) { - SwSectionFmt* pSectFmt = pXSection->GetFmt(); - SwSectionNode* pSectNode = pSectFmt->GetSectionNode(); - SwEndNode* pEnd = pSectNode->EndOfSectionNode(); + SwSectionFmt *const pSectFmt = pXSection->GetFmt(); + SwSectionNode *const pSectNode = pSectFmt->GetSectionNode(); + SwEndNode *const pEnd = pSectNode->EndOfSectionNode(); SwPosition aEnd(*pEnd); bRet = GetDoc()->AppendTxtNode( aEnd ); pTxtNode = aEnd.nNode.GetNode().GetTxtNode(); @@ -740,19 +758,19 @@ void SwXText::insertTextContentAfter( { throw lang::IllegalArgumentException(); } - else - { - pPara->attachToText(*this, *pTxtNode); - } + pPara->attachToText(*this, *pTxtNode); } + /* -----------------------------10.07.00 15:40-------------------------------- ---------------------------------------------------------------------------*/ -void SwXText::removeTextContentBefore( +void SAL_CALL +SwXText::removeTextContentBefore( const uno::Reference< text::XTextContent>& xSuccessor) - throw(lang::IllegalArgumentException, uno::RuntimeException) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + if(!GetDoc()) { uno::RuntimeException aRuntime; @@ -765,28 +783,28 @@ void SwXText::removeTextContentBefore( uno::UNO_QUERY); SwXTextSection *const pXSection = ::sw::UnoTunnelGetImplementation(xSuccTunnel); - SwXTextTable* pXTable = SwXTextTable::GetImplementation( xSuccessor ); - SwFrmFmt* pTableFmt = pXTable ? pXTable->GetFrmFmt() : 0; + SwXTextTable *const pXTable = + ::sw::UnoTunnelGetImplementation(xSuccTunnel); + SwFrmFmt *const pTableFmt = (pXTable) ? pXTable->GetFrmFmt() : 0; if(pTableFmt && pTableFmt->GetDoc() == GetDoc()) { - SwTable* pTable = SwTable::FindTable( pTableFmt ); - SwTableNode* pTblNode = pTable->GetTableNode(); + SwTable *const pTable = SwTable::FindTable( pTableFmt ); + SwTableNode *const pTblNode = pTable->GetTableNode(); - SwNodeIndex aTblIdx( *pTblNode, -1 ); + const SwNodeIndex aTblIdx( *pTblNode, -1 ); if(aTblIdx.GetNode().IsTxtNode()) { SwPaM aBefore(aTblIdx); bRet = GetDoc()->DelFullPara( aBefore ); } } - else if(pXSection && - pXSection->GetFmt() && + else if (pXSection && pXSection->GetFmt() && pXSection->GetFmt()->GetDoc() == GetDoc()) { - SwSectionFmt* pSectFmt = pXSection->GetFmt(); - SwSectionNode* pSectNode = pSectFmt->GetSectionNode(); + SwSectionFmt *const pSectFmt = pXSection->GetFmt(); + SwSectionNode *const pSectNode = pSectFmt->GetSectionNode(); - SwNodeIndex aSectIdx( *pSectNode, -1 ); + const SwNodeIndex aSectIdx( *pSectNode, -1 ); if(aSectIdx.GetNode().IsTxtNode()) { SwPaM aBefore(aSectIdx); @@ -794,15 +812,21 @@ void SwXText::removeTextContentBefore( } } if(!bRet) + { throw lang::IllegalArgumentException(); + } } + /* -----------------------------10.07.00 15:40-------------------------------- ---------------------------------------------------------------------------*/ -void SwXText::removeTextContentAfter(const uno::Reference< text::XTextContent>& xPredecessor) - throw(lang::IllegalArgumentException, uno::RuntimeException) +void SAL_CALL +SwXText::removeTextContentAfter( + const uno::Reference< text::XTextContent>& xPredecessor) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + if(!GetDoc()) { uno::RuntimeException aRuntime; @@ -815,29 +839,29 @@ void SwXText::removeTextContentAfter(const uno::Reference< text::XTextContent>& uno::UNO_QUERY); SwXTextSection *const pXSection = ::sw::UnoTunnelGetImplementation(xPredTunnel); - SwXTextTable* pXTable = SwXTextTable::GetImplementation(xPredecessor ); - SwFrmFmt* pTableFmt = pXTable ? pXTable->GetFrmFmt() : 0; + SwXTextTable *const pXTable = + ::sw::UnoTunnelGetImplementation(xPredTunnel); + SwFrmFmt *const pTableFmt = (pXTable) ? pXTable->GetFrmFmt() : 0; if(pTableFmt && pTableFmt->GetDoc() == GetDoc()) { - SwTable* pTable = SwTable::FindTable( pTableFmt ); - SwTableNode* pTblNode = pTable->GetTableNode(); - SwEndNode* pTableEnd = pTblNode->EndOfSectionNode(); + SwTable *const pTable = SwTable::FindTable( pTableFmt ); + SwTableNode *const pTblNode = pTable->GetTableNode(); + SwEndNode *const pTableEnd = pTblNode->EndOfSectionNode(); - SwNodeIndex aTblIdx( *pTableEnd, 1 ); + const SwNodeIndex aTblIdx( *pTableEnd, 1 ); if(aTblIdx.GetNode().IsTxtNode()) { SwPaM aPaM(aTblIdx); bRet = GetDoc()->DelFullPara( aPaM ); } } - else if(pXSection && - pXSection->GetFmt() && + else if (pXSection && pXSection->GetFmt() && pXSection->GetFmt()->GetDoc() == GetDoc()) { - SwSectionFmt* pSectFmt = pXSection->GetFmt(); - SwSectionNode* pSectNode = pSectFmt->GetSectionNode(); - SwEndNode* pEnd = pSectNode->EndOfSectionNode(); - SwNodeIndex aSectIdx( *pEnd, 1 ); + SwSectionFmt *const pSectFmt = pXSection->GetFmt(); + SwSectionNode *const pSectNode = pSectFmt->GetSectionNode(); + SwEndNode *const pEnd = pSectNode->EndOfSectionNode(); + const SwNodeIndex aSectIdx( *pEnd, 1 ); if(aSectIdx.GetNode().IsTxtNode()) { SwPaM aAfter(aSectIdx); @@ -845,42 +869,50 @@ void SwXText::removeTextContentAfter(const uno::Reference< text::XTextContent>& } } if(!bRet) + { throw lang::IllegalArgumentException(); + } } + /*-- 09.12.98 12:43:19--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXText::removeTextContent(const uno::Reference< text::XTextContent > & xContent) - throw( container::NoSuchElementException, uno::RuntimeException ) +void SAL_CALL +SwXText::removeTextContent( + const uno::Reference< text::XTextContent > & xContent) +throw (container::NoSuchElementException, uno::RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + // forward: need no solar mutex here if(!xContent.is()) { uno::RuntimeException aRuntime; aRuntime.Message = C2U("first parameter invalid"); throw aRuntime; } - else - xContent->dispose(); + xContent->dispose(); } + /*-- 09.12.98 12:43:22--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XText > SwXText::getText(void) - throw( uno::RuntimeException ) +uno::Reference< text::XText > SAL_CALL +SwXText::getText() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XText > xRet = (SwXText*)this; - return xRet; + const uno::Reference< text::XText > xRet(this); + return xRet; } + /*-- 09.12.98 12:43:24--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextRange > SwXText::getStart(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextRange > SAL_CALL +SwXText::getStart() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextCursor > xRef = createCursor(); + + const uno::Reference< text::XTextCursor > xRef = CreateCursor(); if(!xRef.is()) { uno::RuntimeException aRuntime; @@ -888,16 +920,18 @@ uno::Reference< text::XTextRange > SwXText::getStart(void) throw( uno::RuntimeE throw aRuntime; } xRef->gotoStart(sal_False); - uno::Reference< text::XTextRange > xRet(xRef, uno::UNO_QUERY); + const uno::Reference< text::XTextRange > xRet(xRef, uno::UNO_QUERY); return xRet; } /*-- 09.12.98 12:43:27--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextRange > SwXText::getEnd(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextRange > SAL_CALL +SwXText::getEnd() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextCursor > xRef = createCursor(); + + const uno::Reference< text::XTextCursor > xRef = CreateCursor(); if(!xRef.is()) { uno::RuntimeException aRuntime; @@ -905,42 +939,52 @@ uno::Reference< text::XTextRange > SwXText::getEnd(void) throw( uno::RuntimeExc throw aRuntime; } xRef->gotoEnd(sal_False); - uno::Reference< text::XTextRange > xRet(xRef, uno::UNO_QUERY); + const uno::Reference< text::XTextRange > xRet(xRef, uno::UNO_QUERY); return xRet; } + /*-- 09.12.98 12:43:29--------------------------------------------------- -----------------------------------------------------------------------*/ -OUString SwXText::getString(void) throw( uno::RuntimeException ) +OUString SAL_CALL SwXText::getString() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextCursor > xRet = createCursor(); + + const uno::Reference< text::XTextCursor > xRet = CreateCursor(); if(!xRet.is()) { uno::RuntimeException aRuntime; aRuntime.Message = C2U(cInvalidObject); throw aRuntime; } - else - { - xRet->gotoEnd(sal_True); - } + xRet->gotoEnd(sal_True); return xRet->getString(); } /*-- 09.12.98 12:43:30--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXText::setString(const OUString& aString) throw( uno::RuntimeException ) +void SAL_CALL +SwXText::setString(const OUString& rString) throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + + if (!GetDoc()) + { + uno::RuntimeException aRuntime; + aRuntime.Message = C2U(cInvalidObject); + throw aRuntime; + } + const SwStartNode* pStartNode = GetStartNode(); - if(!pStartNode) + if (!pStartNode) + { throw uno::RuntimeException(); + } GetDoc()->StartUndo(UNDO_START, NULL); //insert an empty paragraph at the start and at the end to ensure that //all tables and sections can be removed by the selecting text::XTextCursor - if (CURSOR_META != eCrsrType) + if (CURSOR_META != m_pImpl->m_eType) { SwPosition aStartPos(*pStartNode); const SwEndNode* pEnd = pStartNode->EndOfSectionNode(); @@ -972,7 +1016,7 @@ void SwXText::setString(const OUString& aString) throw( uno::RuntimeException ) } } - uno::Reference< text::XTextCursor > xRet = createCursor(); + const uno::Reference< text::XTextCursor > xRet = CreateCursor(); if(!xRet.is()) { GetDoc()->EndUndo(UNDO_END, NULL); @@ -980,36 +1024,28 @@ void SwXText::setString(const OUString& aString) throw( uno::RuntimeException ) aRuntime.Message = C2U(cInvalidObject); throw aRuntime; } - else - { - xRet->gotoEnd(sal_True); - } - xRet->setString(aString); + xRet->gotoEnd(sal_True); + xRet->setString(rString); GetDoc()->EndUndo(UNDO_END, NULL); } //FIXME why is CheckForOwnMember duplicated in some insert methods? // Description: Checks if pRange/pCursor are member of the same text interface. // Only one of the pointers has to be set! -sal_Bool SwXText::CheckForOwnMember( - const SwXTextRange* pRange, - const OTextCursorHelper* pCursor) - throw(lang::IllegalArgumentException, uno::RuntimeException) +bool SwXText::Impl::CheckForOwnMember( + const SwPaM & rPaM) +throw (lang::IllegalArgumentException, uno::RuntimeException) { - DBG_ASSERT((!pRange || !pCursor) && (pRange || pCursor), "only one pointer will be checked" ); - uno::Reference xOwnCursor = createCursor(); + const uno::Reference xOwnCursor(m_rThis.CreateCursor()); - uno::Reference xTunnel( xOwnCursor, uno::UNO_QUERY); - OTextCursorHelper* pOwnCursor = 0; - if(xTunnel.is()) - { - pOwnCursor = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething(OTextCursorHelper::getUnoTunnelId()) )); - } + const uno::Reference xTunnel(xOwnCursor, uno::UNO_QUERY); + OTextCursorHelper *const pOwnCursor = + ::sw::UnoTunnelGetImplementation(xTunnel); DBG_ASSERT(pOwnCursor, "OTextCursorHelper::getUnoTunnelId() ??? "); - const SwStartNode* pOwnStartNode = pOwnCursor->GetPaM()->GetNode()->StartOfSectionNode(); + const SwStartNode* pOwnStartNode = + pOwnCursor->GetPaM()->GetNode()->StartOfSectionNode(); SwStartNodeType eSearchNodeType = SwNormalStartNode; - switch(eCrsrType) + switch (m_eType) { case CURSOR_FRAME: eSearchNodeType = SwFlyStartNode; break; case CURSOR_TBLTEXT: eSearchNodeType = SwTableBoxStartNode; break; @@ -1022,101 +1058,62 @@ sal_Bool SwXText::CheckForOwnMember( ; } - const SwNode* pSrcNode; - if (pCursor) - { - pSrcNode = pCursor->GetPaM()->GetNode(); - } - else // pRange - { - SwPaM aPam(pRange->GetDoc()->GetNodes().GetEndOfContent()); - if (pRange->GetPositions(aPam)) - { - pSrcNode = aPam.GetNode(); - } - } - if (!pSrcNode) { return sal_False; } + SwNode const*const pSrcNode(rPaM.GetNode()); + if (!pSrcNode) { return false; } const SwStartNode* pTmp = pSrcNode->FindSttNodeByType(eSearchNodeType); //SectionNodes ueberspringen while(pTmp && pTmp->IsSectionNode()) + { pTmp = pTmp->StartOfSectionNode(); + } //if the document starts with a section while(pOwnStartNode->IsSectionNode()) + { pOwnStartNode = pOwnStartNode->StartOfSectionNode(); + } //this checks if (this) and xRange are in the same text::XText interface - return(pOwnStartNode == pTmp); + return (pOwnStartNode == pTmp); } -sal_Int16 SwXText::ComparePositions( +sal_Int16 +SwXText::Impl::ComparePositions( const uno::Reference& xPos1, const uno::Reference& xPos2) - throw(lang::IllegalArgumentException, uno::RuntimeException) +throw (lang::IllegalArgumentException, uno::RuntimeException) { - sal_Int16 nCompare = 0; - SwUnoInternalPaM aPam1(*GetDoc()); - SwUnoInternalPaM aPam2(*GetDoc()); + SwUnoInternalPaM aPam1(*m_pDoc); + SwUnoInternalPaM aPam2(*m_pDoc); - BOOL bExcept = FALSE; - if (::sw::XTextRangeToSwPaM(aPam1, xPos1) && - ::sw::XTextRangeToSwPaM(aPam2, xPos2)) + if (!::sw::XTextRangeToSwPaM(aPam1, xPos1) || + !::sw::XTextRangeToSwPaM(aPam2, xPos2)) { - uno::Reference xRangeTunnel1( xPos1, uno::UNO_QUERY); - SwXTextRange* pRange1 = 0; - OTextCursorHelper* pCursor1 = 0; - if(xRangeTunnel1.is()) - { - pRange1 = reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel1->getSomething( SwXTextRange::getUnoTunnelId()) )); - pCursor1 = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel1->getSomething( OTextCursorHelper::getUnoTunnelId()) )); - } - uno::Reference xRangeTunnel2( xPos2, uno::UNO_QUERY); - SwXTextRange* pRange2 = 0; - OTextCursorHelper* pCursor2 = 0; - if(xRangeTunnel2.is()) - { - pRange2 = reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel2->getSomething( SwXTextRange::getUnoTunnelId()) )); - pCursor2 = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel2->getSomething( OTextCursorHelper::getUnoTunnelId()) )); - } - - if((pRange1||pCursor1) && (pRange2||pCursor2)) - { - if(CheckForOwnMember(pRange1, pCursor1) - && CheckForOwnMember( pRange2, pCursor2)) - { - SwPosition const*const pStart1 = aPam1.Start(); - SwPosition const*const pStart2 = aPam2.Start(); + throw lang::IllegalArgumentException(); + } + if (!CheckForOwnMember(aPam1) || !CheckForOwnMember(aPam2)) + { + throw lang::IllegalArgumentException(); + } - if(pStart1 && pStart2) - { - if(*pStart1 < *pStart2) - nCompare = 1; - else if(*pStart1 > *pStart2) - nCompare = -1; - else - { - DBG_ASSERT(*pStart1 == *pStart2, "SwPositions should be equal here"); - nCompare = 0; - } - } - else - bExcept = TRUE; - } - else - bExcept = TRUE; - } - else - bExcept = TRUE; + sal_Int16 nCompare = 0; + SwPosition const*const pStart1 = aPam1.Start(); + SwPosition const*const pStart2 = aPam2.Start(); + if (*pStart1 < *pStart2) + { + nCompare = 1; + } + else if (*pStart1 > *pStart2) + { + nCompare = -1; } else - bExcept = TRUE; - if(bExcept) - throw lang::IllegalArgumentException(); + { + DBG_ASSERT(*pStart1 == *pStart2, + "SwPositions should be equal here"); + nCompare = 0; + } return nCompare; } @@ -1124,50 +1121,64 @@ sal_Int16 SwXText::ComparePositions( /*-- 28.03.00 10:37:22--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Int16 SwXText::compareRegionStarts( - const uno::Reference& xR1, - const uno::Reference& xR2) - throw(lang::IllegalArgumentException, uno::RuntimeException) +sal_Int16 SAL_CALL +SwXText::compareRegionStarts( + const uno::Reference& xRange1, + const uno::Reference& xRange2) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(!xR1.is() || !xR2.is()) + + if (!xRange1.is() || !xRange2.is()) + { throw lang::IllegalArgumentException(); - uno::Reference xStart1 = xR1->getStart(); - uno::Reference xStart2 = xR2->getStart(); + } + const uno::Reference xStart1 = xRange1->getStart(); + const uno::Reference xStart2 = xRange2->getStart(); - return ComparePositions(xStart1, xStart2); + return m_pImpl->ComparePositions(xStart1, xStart2); } /*-- 28.03.00 10:37:25--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Int16 SwXText::compareRegionEnds( - const uno::Reference& xR1, - const uno::Reference& xR2) - throw(lang::IllegalArgumentException, uno::RuntimeException) +sal_Int16 SAL_CALL +SwXText::compareRegionEnds( + const uno::Reference& xRange1, + const uno::Reference& xRange2) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(!xR1.is() || !xR2.is()) + + if (!xRange1.is() || !xRange2.is()) + { throw lang::IllegalArgumentException(); - uno::Reference xEnd1 = xR1->getEnd(); - uno::Reference xEnd2 = xR2->getEnd(); + } + uno::Reference xEnd1 = xRange1->getEnd(); + uno::Reference xEnd2 = xRange2->getEnd(); - return ComparePositions(xEnd1, xEnd2); + return m_pImpl->ComparePositions(xEnd1, xEnd2); } /*-- 15.03.2002 12:30:40--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< beans::XPropertySetInfo > SwXText::getPropertySetInfo( ) - throw(uno::RuntimeException) +uno::Reference< beans::XPropertySetInfo > SAL_CALL +SwXText::getPropertySetInfo() throw(uno::RuntimeException) { - static uno::Reference< beans::XPropertySetInfo > xInfo = m_pPropSet->getPropertySetInfo(); + vos::OGuard g(Application::GetSolarMutex()); + + static uno::Reference< beans::XPropertySetInfo > xInfo = + m_pImpl->m_rPropSet.getPropertySetInfo(); return xInfo; } + /*-- 15.03.2002 12:30:42--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXText::setPropertyValue( const ::rtl::OUString& /*aPropertyName*/, const uno::Any& /*aValue*/ ) - throw(beans::UnknownPropertyException, beans::PropertyVetoException, +void SAL_CALL +SwXText::setPropertyValue(const ::rtl::OUString& /*aPropertyName*/, + const uno::Any& /*aValue*/) +throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) { @@ -1176,100 +1187,113 @@ void SwXText::setPropertyValue( const ::rtl::OUString& /*aPropertyName*/, const /*-- 15.03.2002 12:30:42--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXText::getPropertyValue( - const ::rtl::OUString& rPropertyName ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, - uno::RuntimeException) +uno::Any SAL_CALL +SwXText::getPropertyValue( + const ::rtl::OUString& rPropertyName) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + if(!IsValid()) + { throw uno::RuntimeException(); - const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName(rPropertyName); + } + + SfxItemPropertySimpleEntry const*const pEntry = + m_pImpl->m_rPropSet.getPropertyMap()->getByName(rPropertyName); + if (!pEntry) + { + beans::UnknownPropertyException aExcept; + aExcept.Message = C2U("Unknown property: "); + aExcept.Message += rPropertyName; + throw aExcept; + } + uno::Any aRet; - if(pEntry) + switch (pEntry->nWID) { - switch(pEntry->nWID) - { // no code necessary - the redline is always located at the end node // case FN_UNO_REDLINE_NODE_START: // break; - case FN_UNO_REDLINE_NODE_END: + case FN_UNO_REDLINE_NODE_END: + { + const SwRedlineTbl& rRedTbl = GetDoc()->GetRedlineTbl(); + const USHORT nRedTblCount = rRedTbl.Count(); + if (nRedTblCount > 0) { - const SwRedlineTbl& rRedTbl = GetDoc()->GetRedlineTbl(); - USHORT nRedTblCount = rRedTbl.Count(); - if ( nRedTblCount > 0 ) + SwStartNode const*const pStartNode = GetStartNode(); + const ULONG nOwnIndex = pStartNode->EndOfSectionIndex(); + for (USHORT nRed = 0; nRed < nRedTblCount; nRed++) { - const SwStartNode* pStartNode = GetStartNode(); - ULONG nOwnIndex = pStartNode->EndOfSectionIndex(); - for(USHORT nRed = 0; nRed < nRedTblCount; nRed++) + SwRedline const*const pRedline = rRedTbl[nRed]; + SwPosition const*const pRedStart = pRedline->Start(); + const SwNodeIndex nRedNode = pRedStart->nNode; + if (nOwnIndex == nRedNode.GetIndex()) { - const SwRedline* pRedline = rRedTbl[nRed]; - const SwPosition* pRedStart = pRedline->Start(); - const SwNodeIndex nRedNode = pRedStart->nNode; - if(nOwnIndex == nRedNode.GetIndex()) - { - aRet <<= SwXRedlinePortion::CreateRedlineProperties(*pRedline, TRUE); - break; - } + aRet <<= SwXRedlinePortion::CreateRedlineProperties( + *pRedline, TRUE); + break; } } } - break; } - } - else - { - beans::UnknownPropertyException aExcept; - aExcept.Message = C2U("Unknown property: "); - aExcept.Message += rPropertyName; - throw aExcept; + break; } return aRet; - } + /*-- 15.03.2002 12:30:42--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXText::addPropertyChangeListener( - const ::rtl::OUString& /*aPropertyName*/, - const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, - uno::RuntimeException) +void SAL_CALL +SwXText::addPropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - throw uno::RuntimeException(); + OSL_ENSURE(false, + "SwXText::addPropertyChangeListener(): not implemented"); } /*-- 15.03.2002 12:30:43--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXText::removePropertyChangeListener( - const ::rtl::OUString& /*aPropertyName*/, - const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, - uno::RuntimeException) +void SAL_CALL +SwXText::removePropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - throw uno::RuntimeException(); + OSL_ENSURE(false, + "SwXText::removePropertyChangeListener(): not implemented"); } /*-- 15.03.2002 12:30:43--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXText::addVetoableChangeListener( - const ::rtl::OUString& /*PropertyName*/, - const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/ ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, - uno::RuntimeException) +void SAL_CALL +SwXText::addVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - throw uno::RuntimeException(); + OSL_ENSURE(false, + "SwXText::addVetoableChangeListener(): not implemented"); } /*-- 15.03.2002 12:30:43--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXText::removeVetoableChangeListener( - const ::rtl::OUString& /*rPropertyName*/, - const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/ ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, +void SAL_CALL +SwXText::removeVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - throw uno::RuntimeException(); + OSL_ENSURE(false, + "SwXText::removeVetoableChangeListener(): not implemented"); } /* -----------------------------08.01.01 09:07-------------------------------- @@ -1283,488 +1307,527 @@ const uno::Sequence< sal_Int8 > & SwXText::getUnoTunnelId() /* -----------------------------08.01.01 09:07-------------------------------- ---------------------------------------------------------------------------*/ -sal_Int64 SwXText::getSomething( const uno::Sequence< sal_Int8 >& rId ) - throw(uno::RuntimeException) +sal_Int64 SAL_CALL +SwXText::getSomething(const uno::Sequence< sal_Int8 >& rId) +throw (uno::RuntimeException) { - if( rId.getLength() == 16 - && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16 ) ) - { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); - } - return 0; + return ::sw::UnoTunnelImpl(rId, this); } + /*-- 23.06.2006 08:56:30--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextRange > SwXText::appendParagraph( - const uno::Sequence< beans::PropertyValue > & rProperties ) - throw (lang::IllegalArgumentException, uno::RuntimeException) +uno::Reference< text::XTextRange > SAL_CALL +SwXText::appendParagraph( + const uno::Sequence< beans::PropertyValue > & rProperties) +throw (lang::IllegalArgumentException, uno::RuntimeException) { - return finishOrAppendParagraph(false, rProperties); + vos::OGuard g(Application::GetSolarMutex()); + + return m_pImpl->finishOrAppendParagraph(false, rProperties); } /*-- 23.06.2006 08:56:22--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextRange > SwXText::finishParagraph( - const uno::Sequence< beans::PropertyValue > & rProperties ) - throw (lang::IllegalArgumentException, uno::RuntimeException) +uno::Reference< text::XTextRange > SAL_CALL +SwXText::finishParagraph( + const uno::Sequence< beans::PropertyValue > & rProperties) +throw (lang::IllegalArgumentException, uno::RuntimeException) { - return finishOrAppendParagraph(true, rProperties); + vos::OGuard g(Application::GetSolarMutex()); + + return m_pImpl->finishOrAppendParagraph(true, rProperties); } /*-- 08.05.2006 13:26:26--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextRange > SwXText::finishOrAppendParagraph( - bool bFinish, - const uno::Sequence< beans::PropertyValue > & rProperties ) - throw (lang::IllegalArgumentException, uno::RuntimeException) - +uno::Reference< text::XTextRange > +SwXText::Impl::finishOrAppendParagraph( + const bool bFinish, + const uno::Sequence< beans::PropertyValue > & rProperties) +throw (lang::IllegalArgumentException, uno::RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); - if(!IsValid()) + if (!m_bIsValid) + { throw uno::RuntimeException(); - uno::Reference< text::XTextRange > xRet; + } - const SwStartNode* pStartNode = GetStartNode(); + const SwStartNode* pStartNode = m_rThis.GetStartNode(); if(!pStartNode) + { throw uno::RuntimeException(); + } + + uno::Reference< text::XTextRange > xRet; + bool bIllegalException = false; + bool bRuntimeException = false; + ::rtl::OUString sMessage; + m_pDoc->StartUndo(UNDO_START , NULL); + // find end node, go backward - don't skip tables because the new + // paragraph has to be the last node + //aPam.Move( fnMoveBackward, fnGoNode ); + SwPosition aInsertPosition( + SwNodeIndex( *pStartNode->EndOfSectionNode(), -1 ) ); + SwPaM aPam(aInsertPosition); + m_pDoc->AppendTxtNode( *aPam.GetPoint() ); + // remove attributes from the previous paragraph + m_pDoc->ResetAttrs(aPam); + // in case of finishParagraph the PaM needs to be moved to the + // previous paragraph + if (bFinish) { - bool bIllegalException = false; - bool bRuntimeException = false; - ::rtl::OUString sMessage; - pDoc->StartUndo(UNDO_START , NULL); - //find end node, go backward - don't skip tables because the new paragraph has to be the last node - //aPam.Move( fnMoveBackward, fnGoNode ); - SwPosition aInsertPosition( SwNodeIndex( *pStartNode->EndOfSectionNode(), -1 ) ); - SwPaM aPam(aInsertPosition); - pDoc->AppendTxtNode( *aPam.GetPoint() ); - //remove attributes from the previous paragraph - pDoc->ResetAttrs(aPam); - //in case of finishParagraph the PaM needs to be moved to the previous paragraph - if(bFinish) - aPam.Move( fnMoveBackward, fnGoNode ); - if(rProperties.getLength()) - { - // now set the properties - const SfxItemPropertySet* pParaPropSet = aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH); - const SfxItemPropertyMap* pParagraphMap = pParaPropSet->getPropertyMap(); + aPam.Move( fnMoveBackward, fnGoNode ); + } + if (rProperties.getLength()) + { + // now set the properties + SfxItemPropertySet const*const pParaPropSet = + aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH); + SfxItemPropertyMap const*const pParagraphMap = + pParaPropSet->getPropertyMap(); - const beans::PropertyValue* pValues = rProperties.getConstArray(); + const beans::PropertyValue* pValues = rProperties.getConstArray(); - for( sal_Int32 nProp = 0; nProp < rProperties.getLength(); ++nProp) + for (sal_Int32 nProp = 0; nProp < rProperties.getLength(); ++nProp) + { + if (!pParagraphMap->getByName(pValues[nProp].Name)) { - if(pParagraphMap->getByName( pValues[nProp].Name )) - { - try - { - SwUnoCursorHelper::SetPropertyValue( - aPam, *pParaPropSet, - pValues[nProp].Name, pValues[nProp].Value); - } - catch( lang::IllegalArgumentException& rIllegal ) - { - sMessage = rIllegal.Message; - bIllegalException = true; - } - catch( uno::RuntimeException& rRuntime ) - { - sMessage = rRuntime.Message; - bRuntimeException = true; - } - } - else - bIllegalException = true; - if( bIllegalException || bRuntimeException ) - { - break; - } + bIllegalException = true; + break; } - } - pDoc->EndUndo(UNDO_END, NULL); - if( bIllegalException || bRuntimeException ) - { - SwUndoIter aUndoIter( &aPam, UNDO_EMPTY ); - pDoc->Undo(aUndoIter); - if(bIllegalException) + try { - lang::IllegalArgumentException aEx; - aEx.Message = sMessage; - throw aEx; + SwUnoCursorHelper::SetPropertyValue(aPam, *pParaPropSet, + pValues[nProp].Name, pValues[nProp].Value); } - else //if(bRuntimeException) + catch (lang::IllegalArgumentException& rIllegal) { - uno::RuntimeException aEx; - aEx.Message = sMessage; - throw aEx; + sMessage = rIllegal.Message; + bIllegalException = true; + break; + } + catch (uno::RuntimeException& rRuntime) + { + sMessage = rRuntime.Message; + bRuntimeException = true; + break; } } - SwTxtNode * pTxtNode( aPam.Start()->nNode.GetNode().GetTxtNode() ); - OSL_ENSURE(pTxtNode, "no SwTxtNode?"); - if (pTxtNode) + } + m_pDoc->EndUndo(UNDO_END, NULL); + if (bIllegalException || bRuntimeException) + { + SwUndoIter aUndoIter( &aPam, UNDO_EMPTY ); + m_pDoc->Undo(aUndoIter); + if (bIllegalException) + { + lang::IllegalArgumentException aEx; + aEx.Message = sMessage; + throw aEx; + } + else // if(bRuntimeException) { - xRet.set(SwXParagraph::CreateXParagraph(*pDoc, *pTxtNode, this), uno::UNO_QUERY); + uno::RuntimeException aEx; + aEx.Message = sMessage; + throw aEx; } } + SwTxtNode *const pTxtNode( aPam.Start()->nNode.GetNode().GetTxtNode() ); + OSL_ENSURE(pTxtNode, "no SwTxtNode?"); + if (pTxtNode) + { + xRet.set(SwXParagraph::CreateXParagraph(*m_pDoc, *pTxtNode, &m_rThis), + uno::UNO_QUERY); + } return xRet; } + /*-- 08.05.2006 13:28:26--------------------------------------------------- Append text portions at the end of the last paragraph of the text interface. Support of import filters. -----------------------------------------------------------------------*/ -uno::Reference< text::XTextRange > SwXText::appendTextPortion( +uno::Reference< text::XTextRange > SAL_CALL +SwXText::appendTextPortion( const ::rtl::OUString& rText, - const uno::Sequence< beans::PropertyValue > & rCharacterAndParagraphProperties ) - throw (lang::IllegalArgumentException, uno::RuntimeException) + const uno::Sequence< beans::PropertyValue > & + rCharacterAndParagraphProperties) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + if(!IsValid()) + { throw uno::RuntimeException(); - uno::Reference< text::XTextRange > xRet; - uno::Reference< text::XTextCursor > xTextCursor = createCursor(); + } + uno::Reference< text::XTextRange > xRet; + const uno::Reference< text::XTextCursor > xTextCursor = CreateCursor(); xTextCursor->gotoEnd(sal_False); - uno::Reference< lang::XUnoTunnel > xRangeTunnel( xTextCursor, uno::UNO_QUERY_THROW ); - SwXTextCursor* pTextCursor = reinterpret_cast< SwXTextCursor * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextCursor::getUnoTunnelId()))); - { - bool bIllegalException = false; - bool bRuntimeException = false; - ::rtl::OUString sMessage; - pDoc->StartUndo(UNDO_INSERT, NULL); - -// SwPaM aPam(*pStartNode->EndOfSectionNode()); - //aPam.Move( fnMoveBackward, fnGoNode ); - SwUnoCrsr * pCursor = pTextCursor->GetCursor(); - pCursor->MovePara( fnParaCurr, fnParaEnd ); - pDoc->DontExpandFmt( *pCursor->Start() ); + const uno::Reference< lang::XUnoTunnel > xRangeTunnel( + xTextCursor, uno::UNO_QUERY_THROW ); + SwXTextCursor *const pTextCursor = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); - if(rText.getLength()) - { - xub_StrLen nContentPos = pCursor->GetPoint()->nContent.GetIndex(); - SwUnoCursorHelper::DocInsertStringSplitCR( *pDoc, *pCursor, rText, - false ); - SwUnoCursorHelper::SelectPam(*pCursor, true); - pCursor->GetPoint()->nContent = nContentPos; - } + bool bIllegalException = false; + bool bRuntimeException = false; + ::rtl::OUString sMessage; + m_pImpl->m_pDoc->StartUndo(UNDO_INSERT, NULL); - if(rCharacterAndParagraphProperties.getLength()) +// SwPaM aPam(*pStartNode->EndOfSectionNode()); + //aPam.Move( fnMoveBackward, fnGoNode ); + SwUnoCrsr *const pCursor = pTextCursor->GetCursor(); + pCursor->MovePara( fnParaCurr, fnParaEnd ); + m_pImpl->m_pDoc->DontExpandFmt( *pCursor->Start() ); + + if (rText.getLength()) + { + const xub_StrLen nContentPos = pCursor->GetPoint()->nContent.GetIndex(); + SwUnoCursorHelper::DocInsertStringSplitCR( + *m_pImpl->m_pDoc, *pCursor, rText, false); + SwUnoCursorHelper::SelectPam(*pCursor, true); + pCursor->GetPoint()->nContent = nContentPos; + } + + if (rCharacterAndParagraphProperties.getLength()) + { + SfxItemPropertyMap const*const pCursorMap = + aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR) + ->getPropertyMap(); + beans::PropertyValue const*const pValues = + rCharacterAndParagraphProperties.getConstArray(); + SfxItemPropertySet const*const pCursorPropSet = + aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR); + const sal_Int32 nLen(rCharacterAndParagraphProperties.getLength()); + for (sal_Int32 nProp = 0; nProp < nLen; ++nProp) { - const SfxItemPropertyMap* pCursorMap = aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR)->getPropertyMap(); - const beans::PropertyValue* pValues = rCharacterAndParagraphProperties.getConstArray(); - const SfxItemPropertySet* pCursorPropSet = aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR); - for( sal_Int32 nProp = 0; nProp < rCharacterAndParagraphProperties.getLength(); ++nProp) + if (!pCursorMap->getByName( pValues[nProp].Name )) { - if( pCursorMap->getByName( pValues[nProp].Name ) ) - { - try - { - SwUnoCursorHelper::SetPropertyValue( - *pCursor, *pCursorPropSet, - pValues[nProp].Name, pValues[nProp].Value, - nsSetAttrMode::SETATTR_NOFORMATATTR); - } - catch( lang::IllegalArgumentException& rIllegal ) - { - sMessage = rIllegal.Message; - bIllegalException = true; - } - catch( uno::RuntimeException& rRuntime ) - { - sMessage = rRuntime.Message; - bRuntimeException = true; - } - } - else - bIllegalException = true; - if( bIllegalException || bRuntimeException ) - { - break; - } + bIllegalException = true; + break; } - } - pDoc->EndUndo(UNDO_INSERT, NULL); - if( bIllegalException || bRuntimeException ) - { - SwUndoIter aUndoIter( pCursor, UNDO_EMPTY ); - pDoc->Undo(aUndoIter); - delete pCursor; - pCursor = 0; - if(bIllegalException) + try { - lang::IllegalArgumentException aEx; - aEx.Message = sMessage; - throw aEx; + SwUnoCursorHelper::SetPropertyValue( + *pCursor, *pCursorPropSet, + pValues[nProp].Name, pValues[nProp].Value, + nsSetAttrMode::SETATTR_NOFORMATATTR); } - else //if(bRuntimeException) + catch( lang::IllegalArgumentException& rIllegal ) { - uno::RuntimeException aEx; - aEx.Message = sMessage; - throw aEx; + sMessage = rIllegal.Message; + bIllegalException = true; + break; + } + catch( uno::RuntimeException& rRuntime ) + { + sMessage = rRuntime.Message; + bRuntimeException = true; + break; } } - xRet = new SwXTextRange(*pCursor, this); - delete pCursor; } - return xRet; + m_pImpl->m_pDoc->EndUndo(UNDO_INSERT, NULL); + if (bIllegalException || bRuntimeException) + { + SwUndoIter aUndoIter( pCursor, UNDO_EMPTY ); + m_pImpl->m_pDoc->Undo(aUndoIter); + if (bIllegalException) + { + lang::IllegalArgumentException aEx; + aEx.Message = sMessage; + throw aEx; + } + else //if(bRuntimeException) + { + uno::RuntimeException aEx; + aEx.Message = sMessage; + throw aEx; + } + } + xRet = new SwXTextRange(*pCursor, this); + return xRet; } + /*-- 11.05.2006 15:46:26--------------------------------------------------- enable appending text contents like graphic objects, shapes and so on to support import filters -----------------------------------------------------------------------*/ -uno::Reference< text::XTextRange > SwXText::appendTextContent( +uno::Reference< text::XTextRange > SAL_CALL +SwXText::appendTextContent( const uno::Reference< text::XTextContent >& xTextContent, - const uno::Sequence< beans::PropertyValue >& rCharacterAndParagraphProperties ) - throw (lang::IllegalArgumentException, uno::RuntimeException) + const uno::Sequence< beans::PropertyValue >& + rCharacterAndParagraphProperties) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(!IsValid()) + + if (!IsValid()) + { throw uno::RuntimeException(); - const SwStartNode* pStartNode = GetStartNode(); + } + SwStartNode const*const pStartNode = GetStartNode(); if(!pStartNode) + { throw uno::RuntimeException(); + } + uno::Reference< text::XTextRange > xRet; + m_pImpl->m_pDoc->StartUndo(UNDO_INSERT, NULL); + // find end node, go backward - don't skip tables because the + // new paragraph has to be the last node + SwPaM aPam(*pStartNode->EndOfSectionNode()); + aPam.Move( fnMoveBackward, fnGoNode ); + // set cursor to the end of the last text node + SwCursor aCursor( *aPam.Start(), 0, false ); + xRet = new SwXTextRange(aCursor, this); + aCursor.MovePara( fnParaCurr, fnParaEnd ); + m_pImpl->m_pDoc->DontExpandFmt( *aCursor.Start() ); + // now attach the text content here + insertTextContent( xRet, xTextContent, false ); + // now apply the properties to the anchor + if (rCharacterAndParagraphProperties.getLength()) { - pDoc->StartUndo(UNDO_INSERT, NULL); - //find end node, go backward - don't skip tables because the new paragraph has to be the last node - SwPaM aPam(*pStartNode->EndOfSectionNode()); - aPam.Move( fnMoveBackward, fnGoNode ); - //set cursor to the end of the last text node - SwCursor* pCursor = new SwCursor( *aPam.Start(),0,false ); - xRet = new SwXTextRange(*pCursor, this); - pCursor->MovePara( fnParaCurr, fnParaEnd ); - pDoc->DontExpandFmt( *pCursor->Start() ); - //now attach the text content here - insertTextContent( xRet, xTextContent, false ); - //now apply the properties to the anchor - if( rCharacterAndParagraphProperties.getLength()) + try { - try + const sal_Int32 nLen(rCharacterAndParagraphProperties.getLength()); + const uno::Reference< beans::XPropertySet > xAnchor( + xTextContent->getAnchor(), uno::UNO_QUERY); + if (xAnchor.is()) { - uno::Reference< beans::XPropertySet > xAnchor( xTextContent->getAnchor(), uno::UNO_QUERY); - if( xAnchor.is() ) + for (sal_Int32 nElement = 0; nElement < nLen; ++nElement) { - for( sal_Int32 nElement = 0; nElement < rCharacterAndParagraphProperties.getLength(); ++nElement ) - { - xAnchor->setPropertyValue( rCharacterAndParagraphProperties[nElement].Name, rCharacterAndParagraphProperties[nElement].Value ); - } + xAnchor->setPropertyValue( + rCharacterAndParagraphProperties[nElement].Name, + rCharacterAndParagraphProperties[nElement].Value); } - - } - catch(const uno::Exception&) - { - throw uno::RuntimeException(); } } - delete pCursor; - pDoc->EndUndo(UNDO_INSERT, NULL); + catch (const uno::Exception&) + { + throw uno::RuntimeException(); + } } + m_pImpl->m_pDoc->EndUndo(UNDO_INSERT, NULL); return xRet; } // move previously appended paragraphs into a text frames // to support import filters -uno::Reference< text::XTextContent > SwXText::convertToTextFrame( +uno::Reference< text::XTextContent > SAL_CALL +SwXText::convertToTextFrame( const uno::Reference< text::XTextRange >& xStart, const uno::Reference< text::XTextRange >& xEnd, - const uno::Sequence< beans::PropertyValue >& rFrameProperties ) - throw (lang::IllegalArgumentException, uno::RuntimeException) + const uno::Sequence< beans::PropertyValue >& rFrameProperties) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + if(!IsValid()) + { throw uno::RuntimeException(); + } uno::Reference< text::XTextContent > xRet; SwUnoInternalPaM aStartPam(*GetDoc()); - std::auto_ptr < SwUnoInternalPaM > pEndPam( new SwUnoInternalPaM(*GetDoc())); - if (::sw::XTextRangeToSwPaM(aStartPam, xStart) && - ::sw::XTextRangeToSwPaM(*pEndPam, xEnd)) - { - uno::Reference xStartRangeTunnel( xStart, uno::UNO_QUERY); - SwXTextRange* pStartRange = reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xStartRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) )); - uno::Reference xEndRangeTunnel( xEnd, uno::UNO_QUERY); - SwXTextRange* pEndRange = reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xEndRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) )); - //bookmarks have to be removed before the referenced text node is deleted in DelFullPara - if(pStartRange) - { - pStartRange->Invalidate(); - } - if(pEndRange) - { - pEndRange->Invalidate(); - } + std::auto_ptr< SwUnoInternalPaM > pEndPam(new SwUnoInternalPaM(*GetDoc())); + if (!::sw::XTextRangeToSwPaM(aStartPam, xStart) || + !::sw::XTextRangeToSwPaM(*pEndPam, xEnd)) + { + throw lang::IllegalArgumentException(); + } - pDoc->StartUndo( UNDO_START, NULL ); - bool bIllegalException = false; - bool bRuntimeException = false; - ::rtl::OUString sMessage; - SwStartNode* pStartStartNode = aStartPam.GetNode()->StartOfSectionNode(); - while(pStartStartNode && pStartStartNode->IsSectionNode()) + const uno::Reference xStartRangeTunnel(xStart, + uno::UNO_QUERY); + SwXTextRange *const pStartRange = + ::sw::UnoTunnelGetImplementation(xStartRangeTunnel); + const uno::Reference xEndRangeTunnel(xEnd, + uno::UNO_QUERY); + SwXTextRange *const pEndRange = + ::sw::UnoTunnelGetImplementation(xEndRangeTunnel); + // bookmarks have to be removed before the referenced text node + // is deleted in DelFullPara + if (pStartRange) + { + pStartRange->Invalidate(); + } + if (pEndRange) + { + pEndRange->Invalidate(); + } + + m_pImpl->m_pDoc->StartUndo( UNDO_START, NULL ); + bool bIllegalException = false; + bool bRuntimeException = false; + ::rtl::OUString sMessage; + SwStartNode* pStartStartNode = aStartPam.GetNode()->StartOfSectionNode(); + while (pStartStartNode && pStartStartNode->IsSectionNode()) + { + pStartStartNode = pStartStartNode->StartOfSectionNode(); + } + SwStartNode* pEndStartNode = pEndPam->GetNode()->StartOfSectionNode(); + while (pEndStartNode && pEndStartNode->IsSectionNode()) + { + pEndStartNode = pEndStartNode->StartOfSectionNode(); + } + bool bParaAfterInserted = false; + bool bParaBeforeInserted = false; + if (pStartStartNode != pEndStartNode || pStartStartNode != GetStartNode()) + { + // todo: if the start/end is in a table then insert a paragraph + // before/after, move the start/end nodes, then convert and + // remove the addtional paragraphs in the end + if (pStartStartNode->GetStartNodeType() == SwTableBoxStartNode) { - pStartStartNode = pStartStartNode->StartOfSectionNode(); + SwTableNode *const pSartTableNode(pStartStartNode->FindTableNode()); + const SwNodeIndex aTblIdx( *pSartTableNode, -1 ); + SwPosition aBefore(aTblIdx); + bParaBeforeInserted = GetDoc()->AppendTxtNode( aBefore ); + aStartPam.DeleteMark(); + *aStartPam.GetPoint() = aBefore; + pStartStartNode = aStartPam.GetNode()->StartOfSectionNode(); } - SwStartNode* pEndStartNode = pEndPam->GetNode()->StartOfSectionNode(); - while(pEndStartNode && pEndStartNode->IsSectionNode()) + if (pEndStartNode->GetStartNodeType() == SwTableBoxStartNode) { - pEndStartNode = pEndStartNode->StartOfSectionNode(); + SwTableNode *const pEndTableNode = pEndStartNode->FindTableNode(); + SwEndNode *const pTableEnd = pEndTableNode->EndOfSectionNode(); + SwPosition aTableEnd(*pTableEnd); + bParaAfterInserted = GetDoc()->AppendTxtNode( aTableEnd ); + pEndPam->DeleteMark(); + *pEndPam->GetPoint() = aTableEnd; + pEndStartNode = pEndPam->GetNode()->StartOfSectionNode(); } - bool bParaAfterInserted = false; - bool bParaBeforeInserted = false; - if(pStartStartNode != pEndStartNode || pStartStartNode != GetStartNode()) + // now we should have the positions in the same hierarchy + if ((pStartStartNode != pEndStartNode) || + (pStartStartNode != GetStartNode())) { - //todo: if the start/end is in a table then insert a paragraph before/after, move - //the start/end nodes, then convert and remove the addtional paragraphs in the end - if( pStartStartNode->GetStartNodeType() == SwTableBoxStartNode ) - { - SwTableNode* pSartTableNode = pStartStartNode->FindTableNode(); - SwNodeIndex aTblIdx( *pSartTableNode, -1 ); - SwPosition aBefore(aTblIdx); - bParaBeforeInserted = GetDoc()->AppendTxtNode( aBefore ); - aStartPam.DeleteMark(); - *aStartPam.GetPoint() = aBefore; - pStartStartNode = aStartPam.GetNode()->StartOfSectionNode(); - } - if( pEndStartNode->GetStartNodeType() == SwTableBoxStartNode ) + // if not - remove the additional paragraphs and throw + if (bParaBeforeInserted) { - SwTableNode* pEndTableNode = pEndStartNode->FindTableNode(); - SwEndNode* pTableEnd = pEndTableNode->EndOfSectionNode(); - SwPosition aTableEnd(*pTableEnd); - bParaAfterInserted = GetDoc()->AppendTxtNode( aTableEnd ); - pEndPam->DeleteMark(); - *pEndPam->GetPoint() = aTableEnd; - pEndStartNode = pEndPam->GetNode()->StartOfSectionNode(); + SwCursor aDelete(*aStartPam.GetPoint(), 0, false); + aDelete.MovePara(fnParaCurr, fnParaStart); + aDelete.SetMark(); + aDelete.MovePara(fnParaCurr, fnParaEnd); + GetDoc()->DelFullPara(aDelete); } - //now we should have the positions in the same hierarchy - if(pStartStartNode != pEndStartNode || pStartStartNode != GetStartNode()) + if (bParaAfterInserted) { - //if not - remove the additional paragraphs and throw - if( bParaBeforeInserted ) - { - SwCursor aDelete(*aStartPam.GetPoint(), 0, false); - aDelete.MovePara(fnParaCurr, fnParaStart); - aDelete.SetMark(); - aDelete.MovePara(fnParaCurr, fnParaEnd); - GetDoc()->DelFullPara(aDelete); - } - if( bParaAfterInserted ) - { - SwCursor aDelete(*pEndPam->GetPoint(), 0, false); - aDelete.MovePara(fnParaCurr, fnParaStart); - aDelete.SetMark(); - aDelete.MovePara(fnParaCurr, fnParaEnd); - GetDoc()->DelFullPara(aDelete); - } - throw lang::IllegalArgumentException(); + SwCursor aDelete(*pEndPam->GetPoint(), 0, false); + aDelete.MovePara(fnParaCurr, fnParaStart); + aDelete.SetMark(); + aDelete.MovePara(fnParaCurr, fnParaEnd); + GetDoc()->DelFullPara(aDelete); } - } - - //make a selection from aStartPam to a EndPam - SwSelBoxes aBoxes; - SfxItemSet aFrameItemSet(pDoc->GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1, - 0 ); - - aStartPam.SetMark(); - *aStartPam.End() = *pEndPam->End(); - pEndPam.reset(0); - - SwXTextFrame* pNewFrame; - uno::Reference< text::XTextFrame > xNewFrame = pNewFrame = new SwXTextFrame( pDoc ); - pNewFrame->SetSelection( aStartPam ); - try + throw lang::IllegalArgumentException(); + } + } + + // make a selection from aStartPam to a EndPam + SwSelBoxes aBoxes; + SfxItemSet aFrameItemSet(m_pImpl->m_pDoc->GetAttrPool(), + RES_FRMATR_BEGIN, RES_FRMATR_END-1, + 0 ); + + aStartPam.SetMark(); + *aStartPam.End() = *pEndPam->End(); + pEndPam.reset(0); + + SwXTextFrame *const pNewFrame = new SwXTextFrame(m_pImpl->m_pDoc); + const uno::Reference< text::XTextFrame > xNewFrame = pNewFrame; + pNewFrame->SetSelection( aStartPam ); + try + { + const beans::PropertyValue* pValues = rFrameProperties.getConstArray(); + for (sal_Int32 nProp = 0; nProp < rFrameProperties.getLength(); ++nProp) + { + pNewFrame->SwXFrame::setPropertyValue( + pValues[nProp].Name, pValues[nProp].Value); + } + + { // has to be in a block to remove the SwIndexes before + // DelFullPara is called + const uno::Reference< text::XTextRange> xInsertTextRange = + new SwXTextRange(aStartPam, this); + pNewFrame->attach( xInsertTextRange ); + pNewFrame->setName(m_pImpl->m_pDoc->GetUniqueFrameName()); + } + + if (!aStartPam.GetTxt().Len()) { - const beans::PropertyValue* pValues = rFrameProperties.getConstArray(); - for(sal_Int32 nProp = 0; nProp < rFrameProperties.getLength(); ++nProp) - pNewFrame->SwXFrame::setPropertyValue(pValues[nProp].Name, pValues[nProp].Value); - - {//has to be in a block to remove the SwIndexes before DelFullPara is called - uno::Reference< text::XTextRange> xInsertTextRange = new SwXTextRange(aStartPam, this); - pNewFrame->attach( xInsertTextRange ); - pNewFrame->setName(pDoc->GetUniqueFrameName()); + bool bMoved = false; + { // has to be in a block to remove the SwIndexes before + // DelFullPara is called + SwPaM aMovePam( *aStartPam.GetNode() ); + if (aMovePam.Move( fnMoveForward, fnGoCntnt )) + { + // move the anchor to the next paragraph + SwFmtAnchor aNewAnchor(pNewFrame->GetFrmFmt()->GetAnchor()); + aNewAnchor.SetAnchor( aMovePam.Start() ); + m_pImpl->m_pDoc->SetAttr( + aNewAnchor, *pNewFrame->GetFrmFmt() ); + } + bMoved = true; } - - if( !aStartPam.GetTxt().Len() ) + if (bMoved) { - - bool bMoved = false; - {//has to be in a block to remove the SwIndexes before DelFullPara is called - SwPaM aMovePam( *aStartPam.GetNode() ); - if( aMovePam.Move( fnMoveForward, fnGoCntnt ) ) - { - //move the anchor to the next paragraph - SwFmtAnchor aNewAnchor( pNewFrame->GetFrmFmt()->GetAnchor() ); - aNewAnchor.SetAnchor( aMovePam.Start() ); - pDoc->SetAttr( aNewAnchor, *pNewFrame->GetFrmFmt() ); - } - bMoved = true; - } - if(bMoved) - { - aStartPam.DeleteMark(); + aStartPam.DeleteMark(); // SwPaM aDelPam( *aStartPam.GetNode() ); - pDoc->DelFullPara(aStartPam/*aDelPam*/); - } + m_pImpl->m_pDoc->DelFullPara(aStartPam/*aDelPam*/); } } - catch( lang::IllegalArgumentException& rIllegal ) - { - sMessage = rIllegal.Message; - bIllegalException = true; - } - catch( uno::RuntimeException& rRuntime ) + } + catch (lang::IllegalArgumentException& rIllegal) + { + sMessage = rIllegal.Message; + bIllegalException = true; + } + catch (uno::RuntimeException& rRuntime) + { + sMessage = rRuntime.Message; + bRuntimeException = true; + } + xRet = pNewFrame; + if (bParaBeforeInserted || bParaAfterInserted) + { + const uno::Reference xFrameTextCursor = + pNewFrame->createTextCursor(); + const uno::Reference xTunnel(xFrameTextCursor, + uno::UNO_QUERY); + SwXTextCursor *const pFrameCursor = + ::sw::UnoTunnelGetImplementation(xTunnel); + if (bParaBeforeInserted) { - sMessage = rRuntime.Message; - bRuntimeException = true; + // todo: remove paragraph before frame + m_pImpl->m_pDoc->DelFullPara(*pFrameCursor->GetPaM()); } - xRet = pNewFrame; - uno::Reference xFrameTextCursor; - if( bParaBeforeInserted ) + if (bParaAfterInserted) { - //todo: remove paragraph before frame - xFrameTextCursor = pNewFrame->createTextCursor(); - uno::Reference xTunnel(xFrameTextCursor, uno::UNO_QUERY); - SwXTextCursor* pFrameCursor = reinterpret_cast< SwXTextCursor* >( - sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething(SwXTextCursor::getUnoTunnelId()) )); - pDoc->DelFullPara(*pFrameCursor->GetPaM()); + xFrameTextCursor->gotoEnd(sal_False); + m_pImpl->m_pDoc->DelFullPara(*pFrameCursor->GetPaM()); } - if( bParaAfterInserted ) + } + + m_pImpl->m_pDoc->EndUndo(UNDO_END, NULL); + if (bIllegalException || bRuntimeException) + { + SwUndoIter aUndoIter( &aStartPam, UNDO_EMPTY ); + m_pImpl->m_pDoc->Undo(aUndoIter); + if (bIllegalException) { - //todo: remove paragraph after frame - if( xFrameTextCursor.is() ) - xFrameTextCursor = pNewFrame->createTextCursor(); - xFrameTextCursor->gotoEnd( false ); - uno::Reference xTunnel(xFrameTextCursor, uno::UNO_QUERY); - SwXTextCursor* pFrameCursor = reinterpret_cast< SwXTextCursor* >( - sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething(SwXTextCursor::getUnoTunnelId()) )); - pDoc->DelFullPara(*pFrameCursor->GetPaM()); + lang::IllegalArgumentException aEx; + aEx.Message = sMessage; + throw aEx; } - - pDoc->EndUndo(UNDO_END, NULL); - if( bIllegalException || bRuntimeException ) + else //if(bRuntimeException) { - SwUndoIter aUndoIter( &aStartPam, UNDO_EMPTY ); - pDoc->Undo(aUndoIter); - if(bIllegalException) - { - lang::IllegalArgumentException aEx; - aEx.Message = sMessage; - throw aEx; - } - else //if(bRuntimeException) - { - uno::RuntimeException aEx; - aEx.Message = sMessage; - throw aEx; - } + uno::RuntimeException aEx; + aEx.Message = sMessage; + throw aEx; } } - else - throw lang::IllegalArgumentException(); return xRet; } + /*-- 11.05.2006 15:46:26--------------------------------------------------- Move previously imported paragraphs into a new text table. @@ -1788,12 +1851,15 @@ bool lcl_SimilarPosition( sal_Int32 nPos1, sal_Int32 nPos2 ) return abs( nPos1 - nPos2 ) < COL_POS_FUZZY; } -uno::Reference< text::XTextTable > SwXText::convertToTable( - const uno::Sequence< uno::Sequence< uno::Sequence< uno::Reference< text::XTextRange > > > >& rTableRanges, - const uno::Sequence< uno::Sequence< uno::Sequence< beans::PropertyValue > > >& rCellProperties, +uno::Reference< text::XTextTable > SAL_CALL +SwXText::convertToTable( + const uno::Sequence< uno::Sequence< uno::Sequence< + uno::Reference< text::XTextRange > > > >& rTableRanges, + const uno::Sequence< uno::Sequence< uno::Sequence< + beans::PropertyValue > > >& rCellProperties, const uno::Sequence< uno::Sequence< beans::PropertyValue > >& rRowProperties, - const uno::Sequence< beans::PropertyValue >& rTableProperties ) - throw (lang::IllegalArgumentException, uno::RuntimeException) + const uno::Sequence< beans::PropertyValue >& rTableProperties) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); if(!IsValid()) @@ -1804,7 +1870,7 @@ uno::Reference< text::XTextTable > SwXText::convertToTable( std::auto_ptr < SwPaM > pFirstPaM; std::vector< std::vector > aTableNodes; bool bExcept = false; - SwPaM aLastPaM(pDoc->GetNodes()); + SwPaM aLastPaM(m_pImpl->m_pDoc->GetNodes()); for( sal_Int32 nRow = 0; !bExcept && (nRow < rTableRanges.getLength()); ++nRow) { std::vector aRowNodes; @@ -1817,8 +1883,8 @@ uno::Reference< text::XTextTable > SwXText::convertToTable( throw lang::IllegalArgumentException(); const uno::Reference< text::XTextRange > xStartRange = pRow[nCell][0]; const uno::Reference< text::XTextRange > xEndRange = pRow[nCell][1]; - SwUnoInternalPaM aStartCellPam(*pDoc); - SwUnoInternalPaM aEndCellPam(*pDoc); + SwUnoInternalPaM aStartCellPam(*m_pImpl->m_pDoc); + SwUnoInternalPaM aEndCellPam(*m_pImpl->m_pDoc); // !!! TODO - PaMs in tables and sections do not work here - the same applies to PaMs in frames !!! @@ -1865,7 +1931,7 @@ uno::Reference< text::XTextTable > SwXText::convertToTable( { //align the beginning - if necessary if(aStartCellPam.Start()->nContent.GetIndex()) - pDoc->SplitNode(*aStartCellPam.Start(), sal_False); + m_pImpl->m_pDoc->SplitNode(*aStartCellPam.Start(), sal_False); } else { @@ -1880,7 +1946,7 @@ uno::Reference< text::XTextTable > SwXText::convertToTable( bExcept = true; else { - pDoc->SplitNode(*aStartCellPam.Start(), sal_False); + m_pImpl->m_pDoc->SplitNode(*aStartCellPam.Start(), sal_False); } } else if(nStartCellNodeIndex == ( nLastNodeEndIndex + 1)) @@ -1898,7 +1964,7 @@ uno::Reference< text::XTextTable > SwXText::convertToTable( //now check if there's a need to insert another paragraph break if( aEndCellPam.End()->nContent.GetIndex() < aEndCellPam.End()->nNode.GetNode().GetTxtNode()->Len()) { - pDoc->SplitNode(*aEndCellPam.End(), sal_False); + m_pImpl->m_pDoc->SplitNode(*aEndCellPam.End(), sal_False); //take care that the new start/endcell is moved to the right position //aStartCellPam has to point to the start of the new (previous) node //aEndCellPam has to point the the end of the new (previous) node @@ -1931,7 +1997,7 @@ uno::Reference< text::XTextTable > SwXText::convertToTable( if(bExcept) { SwUndoIter aUndoIter( &aLastPaM, UNDO_EMPTY ); - pDoc->Undo(aUndoIter); + m_pImpl->m_pDoc->Undo(aUndoIter); throw lang::IllegalArgumentException(); } @@ -1939,7 +2005,7 @@ uno::Reference< text::XTextTable > SwXText::convertToTable( std::vector< TableColumnSeparators > aRowSeparators(rRowProperties.getLength()); std::vector aMergedCells; - const SwTable* pTable = pDoc->TextToTable( aTableNodes ); + const SwTable* pTable = m_pImpl->m_pDoc->TextToTable( aTableNodes ); SwXTextTable* pTextTable = 0; uno::Reference< text::XTextTable > xRet = pTextTable = new SwXTextTable( *pTable->GetFrmFmt() ); uno::Reference< beans::XPropertySet > xPrSet = pTextTable; @@ -2159,12 +2225,12 @@ uno::Reference< text::XTextTable > SwXText::convertToTable( bool bIllegalException = false; bool bRuntimeException = false; ::rtl::OUString sMessage; - pDoc->StartUndo(UNDO_START, NULL); - pDoc->EndUndo(UNDO_START, NULL); + m_pImpl->m_pDoc->StartUndo(UNDO_START, NULL); + m_pImpl->m_pDoc->EndUndo(UNDO_START, NULL); if( bIllegalException || bRuntimeException ) { SwUndoIter aUndoIter( pFirstPaM.get(), UNDO_EMPTY ); - pDoc->Undo(aUndoIter); + m_pImpl->m_pDoc->Undo(aUndoIter); if(bIllegalException) { lang::IllegalArgumentException aEx; @@ -2493,7 +2559,8 @@ const SwStartNode *SwXHeadFootText::GetStartNode() const return pSttNd; } -uno::Reference< text::XTextCursor > SwXHeadFootText::createCursor() throw(uno::RuntimeException) +uno::Reference< text::XTextCursor > +SwXHeadFootText::CreateCursor() throw (uno::RuntimeException) { return createTextCursor(); } -- cgit v1.2.3 From fadf840e56ef29cc6ef7a21cb509e349cc6e2b5e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:56 +0100 Subject: swunolocking1: #i105557#: clean up implementation of SwXText::convertToTable(). --- sw/source/core/unocore/unotext.cxx | 747 +++++++++++++++++++++---------------- 1 file changed, 423 insertions(+), 324 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 82ad2cccc9..b96aec2bd3 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -123,6 +123,15 @@ public: bool CheckForOwnMember(const SwPaM & rPaM) throw (lang::IllegalArgumentException, uno::RuntimeException); + + void ConvertCell( + const bool bFirstCell, + const uno::Sequence< uno::Reference< text::XTextRange > > & rCell, + ::std::vector & rRowNodes, + ::std::auto_ptr< SwPaM > & rpFirstPaM, + SwPaM & rLastPaM, + bool & rbExcept); + }; /* -----------------------------15.03.2002 12:39------------------------------ @@ -1838,158 +1847,407 @@ struct VerticallyMergedCell sal_Int32 nLeftPosition; bool bOpen; - VerticallyMergedCell( uno::Reference< beans::XPropertySet >& rxCell, sal_Int32 nLeft ) : - nLeftPosition( nLeft ), - bOpen( true ) - { - aCells.push_back( rxCell ); - } + VerticallyMergedCell(uno::Reference< beans::XPropertySet > const& rxCell, + const sal_Int32 nLeft) + : nLeftPosition( nLeft ) + , bOpen( true ) + { + aCells.push_back( rxCell ); + } }; #define COL_POS_FUZZY 2 -bool lcl_SimilarPosition( sal_Int32 nPos1, sal_Int32 nPos2 ) +static bool lcl_SimilarPosition( const sal_Int32 nPos1, const sal_Int32 nPos2 ) { return abs( nPos1 - nPos2 ) < COL_POS_FUZZY; } -uno::Reference< text::XTextTable > SAL_CALL -SwXText::convertToTable( - const uno::Sequence< uno::Sequence< uno::Sequence< - uno::Reference< text::XTextRange > > > >& rTableRanges, - const uno::Sequence< uno::Sequence< uno::Sequence< - beans::PropertyValue > > >& rCellProperties, - const uno::Sequence< uno::Sequence< beans::PropertyValue > >& rRowProperties, - const uno::Sequence< beans::PropertyValue >& rTableProperties) -throw (lang::IllegalArgumentException, uno::RuntimeException) +void SwXText::Impl::ConvertCell( + const bool bFirstCell, + const uno::Sequence< uno::Reference< text::XTextRange > > & rCell, + ::std::vector & rRowNodes, + ::std::auto_ptr< SwPaM > & rpFirstPaM, + SwPaM & rLastPaM, + bool & rbExcept) { - vos::OGuard aGuard(Application::GetSolarMutex()); - if(!IsValid()) - throw uno::RuntimeException(); + if (rCell.getLength() != 2) + { + throw lang::IllegalArgumentException(); + } + const uno::Reference xStartRange = rCell[0]; + const uno::Reference xEndRange = rCell[1]; + SwUnoInternalPaM aStartCellPam(*m_pDoc); + SwUnoInternalPaM aEndCellPam(*m_pDoc); - //at first collect the text ranges as SwPaMs - const uno::Sequence< uno::Sequence< uno::Reference< text::XTextRange > > >* pTableRanges = rTableRanges.getConstArray(); - std::auto_ptr < SwPaM > pFirstPaM; - std::vector< std::vector > aTableNodes; - bool bExcept = false; - SwPaM aLastPaM(m_pImpl->m_pDoc->GetNodes()); - for( sal_Int32 nRow = 0; !bExcept && (nRow < rTableRanges.getLength()); ++nRow) + // !!! TODO - PaMs in tables and sections do not work here - + // the same applies to PaMs in frames !!! + + if (!::sw::XTextRangeToSwPaM(aStartCellPam, xStartRange) || + !::sw::XTextRangeToSwPaM(aEndCellPam, xEndRange)) { - std::vector aRowNodes; - const uno::Sequence< uno::Sequence< uno::Reference< text::XTextRange > > >& rRow = pTableRanges[nRow]; - const uno::Sequence< uno::Reference< text::XTextRange > >* pRow = pTableRanges[nRow].getConstArray(); + throw lang::IllegalArgumentException(); + } + /** check the nodes between start and end + it is allowed to have pairs of StartNode/EndNodes + */ + if (aStartCellPam.Start()->nNode < aEndCellPam.End()->nNode) + { + // increment on each StartNode and decrement on each EndNode + // we must reach zero at the end and must not go below zero + long nOpenNodeBlock = 0; + SwNodeIndex aCellIndex = aStartCellPam.Start()->nNode; + while (aCellIndex < aEndCellPam.End()->nNode.GetIndex()) + { + if (aCellIndex.GetNode().IsStartNode()) + { + ++nOpenNodeBlock; + } + else if (aCellIndex.GetNode().IsEndNode()) + { + --nOpenNodeBlock; + } + if (nOpenNodeBlock < 0) + { + rbExcept = true; + break; + } + ++aCellIndex; + } + if (nOpenNodeBlock != 0) + { + rbExcept = true; + return; + } + } - for( sal_Int32 nCell = 0; nCell < rRow.getLength(); ++nCell) + /** The vector NodeRanges has to contain consecutive nodes. + In rTableRanges the ranges don't need to be full paragraphs but + they have to follow each other. To process the ranges they + have to be aligned on paragraph borders by inserting paragraph + breaks. Non-consecutive ranges must initiate an exception. + */ + if (bFirstCell) + { + // align the beginning - if necessary + if (aStartCellPam.Start()->nContent.GetIndex()) { - if( pRow[nCell].getLength() != 2 ) - throw lang::IllegalArgumentException(); - const uno::Reference< text::XTextRange > xStartRange = pRow[nCell][0]; - const uno::Reference< text::XTextRange > xEndRange = pRow[nCell][1]; - SwUnoInternalPaM aStartCellPam(*m_pImpl->m_pDoc); - SwUnoInternalPaM aEndCellPam(*m_pImpl->m_pDoc); - - // !!! TODO - PaMs in tables and sections do not work here - the same applies to PaMs in frames !!! - - if (!::sw::XTextRangeToSwPaM(aStartCellPam, xStartRange) || - !::sw::XTextRangeToSwPaM(aEndCellPam, xEndRange)) - throw lang::IllegalArgumentException(); - /** check the nodes between start and end - it is allowed to have pairs of StartNode/EndNodes - */ - if(aStartCellPam.Start()->nNode < aEndCellPam.End()->nNode) + m_pDoc->SplitNode(*aStartCellPam.Start(), sal_False); + } + } + else + { + // check the predecessor + const ULONG nLastNodeIndex = rLastPaM.End()->nNode.GetIndex(); + const ULONG nStartCellNodeIndex = + aStartCellPam.Start()->nNode.GetIndex(); + const ULONG nLastNodeEndIndex = rLastPaM.End()->nNode.GetIndex(); + if (nLastNodeIndex == nStartCellNodeIndex) + { + // same node as predecessor then equal nContent? + if (rLastPaM.End()->nContent != aStartCellPam.Start()->nContent) { - // increment on each StartNode and decrement on each EndNode - // we must reach zero at the end and must not go below zero - long nOpenNodeBlock = 0; - SwNodeIndex aCellIndex = aStartCellPam.Start()->nNode; - while( aCellIndex < aEndCellPam.End()->nNode.GetIndex()) - { - if( aCellIndex.GetNode().IsStartNode() ) - ++nOpenNodeBlock; - else if(aCellIndex.GetNode().IsEndNode() ) - --nOpenNodeBlock; - if( nOpenNodeBlock < 0 ) - { - bExcept = true; - break; - } - ++aCellIndex; - } - if( nOpenNodeBlock != 0) - { - bExcept = true; - break; - } + rbExcept = true; } + else + { + m_pDoc->SplitNode(*aStartCellPam.Start(), sal_False); + } + } + else if (nStartCellNodeIndex == (nLastNodeEndIndex + 1)) + { + // next paragraph - now the content index of the new should be 0 + // and of the old one should be equal to the text length + // but if it isn't we don't care - the cell is being inserted on + // the node border anyway + } + else + { + rbExcept = true; + } + } + // now check if there's a need to insert another paragraph break + if (aEndCellPam.End()->nContent.GetIndex() < + aEndCellPam.End()->nNode.GetNode().GetTxtNode()->Len()) + { + m_pDoc->SplitNode(*aEndCellPam.End(), sal_False); + // take care that the new start/endcell is moved to the right position + // aStartCellPam has to point to the start of the new (previous) node + // aEndCellPam has to point to the end of the new (previous) node + aStartCellPam.DeleteMark(); + aStartCellPam.Move(fnMoveBackward, fnGoNode); + aStartCellPam.GetPoint()->nContent = 0; + aEndCellPam.DeleteMark(); + aEndCellPam.Move(fnMoveBackward, fnGoNode); + aEndCellPam.GetPoint()->nContent = + aEndCellPam.GetNode()->GetTxtNode()->Len(); + } + + *rLastPaM.GetPoint() = *aEndCellPam.Start(); + if (aStartCellPam.HasMark()) + { + rLastPaM.SetMark(); + *rLastPaM.GetMark() = *aEndCellPam.End(); + } + else + { + rLastPaM.DeleteMark(); + } + + SwNodeRange aCellRange(aStartCellPam.Start()->nNode, + aEndCellPam.End()->nNode); + rRowNodes.push_back(aCellRange); + if (bFirstCell) + { + rpFirstPaM.reset(new SwPaM(*aStartCellPam.Start())); + } +} + +typedef uno::Sequence< text::TableColumnSeparator > TableColumnSeparators; + +static void +lcl_ApplyRowProperties( + uno::Sequence const& rRowProperties, + uno::Any const& rRow, + TableColumnSeparators & rRowSeparators) +{ + uno::Reference< beans::XPropertySet > xRow; + rRow >>= xRow; + const beans::PropertyValue* pProperties = rRowProperties.getConstArray(); + for (sal_Int32 nProperty = 0; nProperty < rRowProperties.getLength(); + ++nProperty) + { + if (pProperties[ nProperty ].Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("TableColumnSeparators"))) + { + // add the separators to access the cell's positions + // for vertical merging later + TableColumnSeparators aSeparators; + pProperties[ nProperty ].Value >>= aSeparators; + rRowSeparators = aSeparators; + } + xRow->setPropertyValue( + pProperties[ nProperty ].Name, pProperties[ nProperty ].Value); + } +} + +#ifdef DEBUG +//-->debug cell properties of all rows +static void +lcl_DebugCellProperties( + const uno::Sequence< uno::Sequence< uno::Sequence< + beans::PropertyValue > > >& rCellProperties) +{ + ::rtl::OUString sNames; + for (sal_Int32 nDebugRow = 0; nDebugRow < rCellProperties.getLength(); + ++nDebugRow) + { + const uno::Sequence< beans::PropertyValues > aDebugCurrentRow = + rCellProperties[nDebugRow]; + sal_Int32 nDebugCells = aDebugCurrentRow.getLength(); + (void) nDebugCells; + for (sal_Int32 nDebugCell = 0; nDebugCell < nDebugCells; + ++nDebugCell) + { + const uno::Sequence< beans::PropertyValue >& + rDebugCellProperties = aDebugCurrentRow[nDebugCell]; + const sal_Int32 nDebugCellProperties = + rDebugCellProperties.getLength(); + for (sal_Int32 nDebugProperty = 0; + nDebugProperty < nDebugCellProperties; ++nDebugProperty) + { + const ::rtl::OUString sName = + rDebugCellProperties[nDebugProperty].Name; + sNames += sName; + sNames += ::rtl::OUString('-'); + } + sNames += ::rtl::OUString('+'); + } + sNames += ::rtl::OUString('|'); + } + (void)sNames; +} +//--< +#endif - /** The vector NodeRanges has to contain consecutive nodes. - In rTableRanges the ranges don't need to be full paragraphs but they have to follow - each other. To process the ranges they have to be aligned on paragraph borders - by inserting paragraph breaks. Non-consecutive ranges must initiate an - exception. - */ - if(!nRow && !nCell) +static void +lcl_ApplyCellProperties( + const sal_Int32 nCell, + TableColumnSeparators const& rRowSeparators, + const uno::Sequence< beans::PropertyValue >& rCellProperties, + uno::Reference< uno::XInterface > xCell, + ::std::vector & rMergedCells) +{ + const sal_Int32 nCellProperties = rCellProperties.getLength(); + const uno::Reference< beans::XPropertySet > xCellPS(xCell, uno::UNO_QUERY); + for (sal_Int32 nProperty = 0; nProperty < nCellProperties; ++nProperty) + { + const OUString & rName = rCellProperties[nProperty].Name; + const uno::Any & rValue = rCellProperties[nProperty].Value; + if (rName.equalsAscii("VerticalMerge")) + { + // determine left border position + // add the cell to a queue of merged cells + sal_Bool bMerge = sal_False; + rValue >>= bMerge; + sal_Int32 nLeftPos = -1; + if (!nCell) { - //align the beginning - if necessary - if(aStartCellPam.Start()->nContent.GetIndex()) - m_pImpl->m_pDoc->SplitNode(*aStartCellPam.Start(), sal_False); + nLeftPos = 0; } - else + else if (rRowSeparators.getLength() >= nCell) { - //check the predecessor - ULONG nLastNodeIndex = aLastPaM.End()->nNode.GetIndex(); - ULONG nStartCellNodeIndex = aStartCellPam.Start()->nNode.GetIndex(); - ULONG nLastNodeEndIndex = aLastPaM.End()->nNode.GetIndex(); - if( nLastNodeIndex == nStartCellNodeIndex) + const text::TableColumnSeparator* pSeparators = + rRowSeparators.getConstArray(); + nLeftPos = pSeparators[nCell - 1].Position; + } + if (bMerge) + { + // 'close' all the cell with the same left position + // if separate vertical merges in the same column exist + if (rMergedCells.size()) { - //- same node as predecessor then equal nContent? - if(aLastPaM.End()->nContent != aStartCellPam.Start()->nContent) - bExcept = true; - else + std::vector::iterator aMergedIter = + rMergedCells.begin(); + while (aMergedIter != rMergedCells.end()) { - m_pImpl->m_pDoc->SplitNode(*aStartCellPam.Start(), sal_False); + if (lcl_SimilarPosition(aMergedIter->nLeftPosition, + nLeftPos)) + { + aMergedIter->bOpen = false; + } + ++aMergedIter; } } - else if(nStartCellNodeIndex == ( nLastNodeEndIndex + 1)) - { - //next paragraph - now the content index of the new should be 0 - //and of the old one should be equal to the text length - //but if it isn't we don't care - the cell is being inserted on the - //node border anyway - } - else + // add the new group of merged cells + rMergedCells.push_back(VerticallyMergedCell(xCellPS, nLeftPos)); + } + else + { + // find the cell that + DBG_ASSERT(rMergedCells.size(), + "the first merged cell is missing"); + if (rMergedCells.size()) { - bExcept = true; + std::vector::iterator aMergedIter = + rMergedCells.begin(); +#if OSL_DEBUG_LEVEL > 1 + bool bDbgFound = false; +#endif + while (aMergedIter != rMergedCells.end()) + { + if (aMergedIter->bOpen && + lcl_SimilarPosition(aMergedIter->nLeftPosition, + nLeftPos)) + { + aMergedIter->aCells.push_back( xCellPS ); +#if OSL_DEBUG_LEVEL > 1 + bDbgFound = true; +#endif + } + ++aMergedIter; + } +#if OSL_DEBUG_LEVEL > 1 + DBG_ASSERT( bDbgFound, + "couldn't find first vertically merged cell" ); +#endif } } - //now check if there's a need to insert another paragraph break - if( aEndCellPam.End()->nContent.GetIndex() < aEndCellPam.End()->nNode.GetNode().GetTxtNode()->Len()) - { - m_pImpl->m_pDoc->SplitNode(*aEndCellPam.End(), sal_False); - //take care that the new start/endcell is moved to the right position - //aStartCellPam has to point to the start of the new (previous) node - //aEndCellPam has to point the the end of the new (previous) node - aStartCellPam.DeleteMark(); - aStartCellPam.Move(fnMoveBackward, fnGoNode); - aStartCellPam.GetPoint()->nContent = 0; - aEndCellPam.DeleteMark(); - aEndCellPam.Move(fnMoveBackward, fnGoNode); - aEndCellPam.GetPoint()->nContent = aEndCellPam.GetNode()->GetTxtNode()->Len(); - - } - - *aLastPaM.GetPoint() = *aEndCellPam.Start(); - if( aStartCellPam.HasMark() ) + } + else + { + try + { + xCellPS->setPropertyValue(rName, rValue); + } + catch (uno::Exception const& e) { - aLastPaM.SetMark(); - *aLastPaM.GetMark() = *aEndCellPam.End(); + // Apply the paragraph and char properties to the cell's content + const uno::Reference< text::XText > xCellText(xCell, + uno::UNO_QUERY); + const uno::Reference< text::XTextCursor > xCellCurs = + xCellText->createTextCursor(); + xCellCurs->gotoStart( sal_False ); + xCellCurs->gotoEnd( sal_True ); + const uno::Reference< beans::XPropertySet > xCellTextProps( + xCellCurs, uno::UNO_QUERY); + xCellTextProps->setPropertyValue(rName, rValue); } - else - aLastPaM.DeleteMark(); + } + } +} - SwNodeRange aCellRange( aStartCellPam.Start()->nNode, aEndCellPam.End()->nNode); - aRowNodes.push_back(aCellRange); - if( !nRow && !nCell ) - pFirstPaM.reset( new SwPaM(*aStartCellPam.Start())); +static void +lcl_MergeCells(::std::vector & rMergedCells) +{ + if (rMergedCells.size()) + { + std::vector::iterator aMergedIter = + rMergedCells.begin(); + while (aMergedIter != rMergedCells.end()) + { + sal_Int32 nCellCount = + static_cast(aMergedIter->aCells.size()); + std::vector >::iterator + aCellIter = aMergedIter->aCells.begin(); + bool bFirstCell = true; + // the first of the cells gets the number of cells set as RowSpan + // the others get the inverted number of remaining merged cells + // (3,-2,-1) + while (aCellIter != aMergedIter->aCells.end()) + { + (*aCellIter)->setPropertyValue( + C2U(SW_PROP_NAME_STR(UNO_NAME_ROW_SPAN)), + uno::makeAny(nCellCount)); + if (bFirstCell) + { + nCellCount *= -1; + bFirstCell = false; + } + ++nCellCount; + ++aCellIter; + } + ++aMergedIter; + } + } +} + +uno::Reference< text::XTextTable > SAL_CALL +SwXText::convertToTable( + const uno::Sequence< uno::Sequence< uno::Sequence< + uno::Reference< text::XTextRange > > > >& rTableRanges, + const uno::Sequence< uno::Sequence< uno::Sequence< + beans::PropertyValue > > >& rCellProperties, + const uno::Sequence< uno::Sequence< beans::PropertyValue > >& + rRowProperties, + const uno::Sequence< beans::PropertyValue >& rTableProperties) +throw (lang::IllegalArgumentException, uno::RuntimeException) +{ + vos::OGuard aGuard(Application::GetSolarMutex()); + + if(!IsValid()) + { + throw uno::RuntimeException(); + } + + //at first collect the text ranges as SwPaMs + const uno::Sequence< uno::Sequence< uno::Reference< text::XTextRange > > >* + pTableRanges = rTableRanges.getConstArray(); + std::auto_ptr < SwPaM > pFirstPaM; + std::vector< std::vector > aTableNodes; + bool bExcept = false; + SwPaM aLastPaM(m_pImpl->m_pDoc->GetNodes()); + for (sal_Int32 nRow = 0; !bExcept && (nRow < rTableRanges.getLength()); + ++nRow) + { + std::vector aRowNodes; + const uno::Sequence< uno::Reference< text::XTextRange > >* pRow = + pTableRanges[nRow].getConstArray(); + const sal_Int32 nCells(pTableRanges[nRow].getLength()); + + for (sal_Int32 nCell = 0; nCell < nCells; ++nCell) + { + m_pImpl->ConvertCell((nCell == 0) && (nRow == 0), pRow[nCell], + aRowNodes, pFirstPaM, aLastPaM, bExcept); } aTableNodes.push_back(aRowNodes); } @@ -2001,216 +2259,80 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) throw lang::IllegalArgumentException(); } - typedef uno::Sequence< text::TableColumnSeparator > TableColumnSeparators; - std::vector< TableColumnSeparators > aRowSeparators(rRowProperties.getLength()); - std::vector aMergedCells; + std::vector< TableColumnSeparators > + aRowSeparators(rRowProperties.getLength()); + std::vector aMergedCells; - const SwTable* pTable = m_pImpl->m_pDoc->TextToTable( aTableNodes ); - SwXTextTable* pTextTable = 0; - uno::Reference< text::XTextTable > xRet = pTextTable = new SwXTextTable( *pTable->GetFrmFmt() ); - uno::Reference< beans::XPropertySet > xPrSet = pTextTable; - // set properties to the table - catch lang::WrappedTargetException and lang::IndexOutOfBoundsException + SwTable const*const pTable = m_pImpl->m_pDoc->TextToTable( aTableNodes ); + SwXTextTable *const pTextTable = new SwXTextTable( *pTable->GetFrmFmt() ); + const uno::Reference< text::XTextTable > xRet = pTextTable; + const uno::Reference< beans::XPropertySet > xPrSet = pTextTable; + // set properties to the table + // catch lang::WrappedTargetException and lang::IndexOutOfBoundsException try { //apply table properties - const beans::PropertyValue* pTableProperties = rTableProperties.getConstArray(); - sal_Int32 nProperty = 0; - for( ; nProperty < rTableProperties.getLength(); ++nProperty) + const beans::PropertyValue* pTableProperties = + rTableProperties.getConstArray(); + for (sal_Int32 nProperty = 0; nProperty < rTableProperties.getLength(); + ++nProperty) { - try + try { - xPrSet->setPropertyValue( pTableProperties[nProperty].Name, pTableProperties[nProperty].Value ); + xPrSet->setPropertyValue( pTableProperties[nProperty].Name, + pTableProperties[nProperty].Value ); } - catch ( const uno::Exception e ) + catch ( uno::Exception const& e ) { #if DEBUG std::clog << "Exception when setting property: "; - std::clog << rtl::OUStringToOString( pTableProperties[nProperty].Name, RTL_TEXTENCODING_UTF8 ).getStr( ); + std::clog << rtl::OUStringToOString( + pTableProperties[nProperty].Name, RTL_TEXTENCODING_UTF8) + .getStr(); std::clog << ". Message: "; - std::clog << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( ); + std::clog << rtl::OUStringToOString( e.Message, + RTL_TEXTENCODING_UTF8 ).getStr(); std::clog << std::endl; #endif } } //apply row properties - uno::Reference< table::XTableRows > xRows = xRet->getRows(); - const beans::PropertyValues* pRowProperties = rRowProperties.getConstArray(); - sal_Int32 nRow = 0; - for( ; nRow < xRows->getCount(); ++nRow) + const uno::Reference< table::XTableRows > xRows = xRet->getRows(); + + const beans::PropertyValues* pRowProperties = + rRowProperties.getConstArray(); + for (sal_Int32 nRow = 0; nRow < xRows->getCount(); ++nRow) { if( nRow >= rRowProperties.getLength()) { break; } - uno::Reference< beans::XPropertySet > xRow; - xRows->getByIndex( nRow ) >>= xRow; - const beans::PropertyValue* pProperties = pRowProperties[nRow].getConstArray(); - for( nProperty = 0; nProperty < pRowProperties[nRow].getLength(); ++nProperty) - { - if( pProperties[ nProperty ].Name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM ( "TableColumnSeparators" ))) - { - //add the separators to access the cell's positions for vertical merging later - TableColumnSeparators aSeparators; - pProperties[ nProperty ].Value >>= aSeparators; - aRowSeparators[nRow] = aSeparators; - } - xRow->setPropertyValue( pProperties[ nProperty ].Name, pProperties[ nProperty ].Value ); - } + lcl_ApplyRowProperties(pRowProperties[nRow], + xRows->getByIndex(nRow), aRowSeparators[nRow]); } #ifdef DEBUG -//-->debug cell properties of all rows - { - ::rtl::OUString sNames; - for( sal_Int32 nDebugRow = 0; nDebugRow < rCellProperties.getLength(); ++nDebugRow) - { - const uno::Sequence< beans::PropertyValues > aDebugCurrentRow = rCellProperties[nDebugRow]; - sal_Int32 nDebugCells = aDebugCurrentRow.getLength(); - (void) nDebugCells; - for( sal_Int32 nDebugCell = 0; nDebugCell < nDebugCells; ++nDebugCell) - { - const uno::Sequence< beans::PropertyValue >& aDebugCellProperties = aDebugCurrentRow[nDebugCell]; - sal_Int32 nDebugCellProperties = aDebugCellProperties.getLength(); - for( sal_Int32 nDebugProperty = 0; nDebugProperty < nDebugCellProperties; ++nDebugProperty) - { - const ::rtl::OUString sName = aDebugCellProperties[nDebugProperty].Name; - sNames += sName; - sNames += ::rtl::OUString('-'); - } - sNames += ::rtl::OUString('+'); - } - sNames += ::rtl::OUString('|'); - } - (void)sNames; - } -//--< + lcl_DebugCellProperties(rCellProperties); #endif - //apply cell properties - for( nRow = 0; nRow < rCellProperties.getLength(); ++nRow) + for (sal_Int32 nRow = 0; nRow < rCellProperties.getLength(); ++nRow) { - const uno::Sequence< beans::PropertyValues > aCurrentRow = rCellProperties[nRow]; + const uno::Sequence< beans::PropertyValues > aCurrentRow = + rCellProperties[nRow]; sal_Int32 nCells = aCurrentRow.getLength(); - for( sal_Int32 nCell = 0; nCell < nCells; ++nCell) - { - const uno::Sequence< beans::PropertyValue >& aCellProperties = aCurrentRow[nCell]; - sal_Int32 nCellProperties = aCellProperties.getLength(); - uno::Reference< beans::XPropertySet > xCell( pTextTable->getCellByPosition(nCell, nRow), uno::UNO_QUERY ); - for( nProperty = 0; nProperty < nCellProperties; ++nProperty) - { - const OUString& rName = aCellProperties[nProperty].Name; - if( rName.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM ( "VerticalMerge"))) - { - //determine left border position - //add the cell to a queue of merged cells - // - sal_Bool bMerge = sal_False; - aCellProperties[nProperty].Value >>= bMerge; - sal_Int32 nLeftPos = -1; - if( !nCell ) - nLeftPos = 0; - else if( aRowSeparators[nRow].getLength() >= nCell ) - { - const text::TableColumnSeparator* pSeparators = aRowSeparators[nRow].getConstArray(); - nLeftPos = pSeparators[nCell - 1].Position; - } - if( bMerge ) - { - // 'close' all the cell with the same left position - // if separate vertical merges in the same column exist - if( aMergedCells.size() ) - { - std::vector::iterator aMergedIter = aMergedCells.begin(); - while( aMergedIter != aMergedCells.end()) - { - if( lcl_SimilarPosition( aMergedIter->nLeftPosition, nLeftPos) ) - { - aMergedIter->bOpen = false; - } - ++aMergedIter; - } - } - //add the new group of merged cells - aMergedCells.push_back(VerticallyMergedCell(xCell, nLeftPos )); - } - else - { - //find the cell that - DBG_ASSERT(aMergedCells.size(), "the first merged cell is missing"); - if( aMergedCells.size() ) - { - std::vector::iterator aMergedIter = aMergedCells.begin(); -#if OSL_DEBUG_LEVEL > 1 - bool bDbgFound = false; -#endif - while( aMergedIter != aMergedCells.end()) - { - if( aMergedIter->bOpen && - lcl_SimilarPosition( aMergedIter->nLeftPosition, nLeftPos) ) - { - aMergedIter->aCells.push_back( xCell ); -#if OSL_DEBUG_LEVEL > 1 - bDbgFound = true; -#endif - } - ++aMergedIter; - } -#if OSL_DEBUG_LEVEL > 1 - DBG_ASSERT( bDbgFound, "couldn't find first vertically merged cell" ); -#endif - } - } - } - else - { - try - { - xCell->setPropertyValue(rName, aCellProperties[nProperty].Value); - } - catch ( const uno::Exception e ) - { - // Apply the paragraph and char properties to the cell's content - uno::Reference< text::XText > xCellText( xCell, uno::UNO_QUERY ); - uno::Reference< text::XTextCursor > xCellCurs = xCellText->createTextCursor( ); - xCellCurs->gotoStart( false ); - xCellCurs->gotoEnd( true ); - - uno::Reference< beans::XPropertySet > xCellTextProps( xCellCurs, uno::UNO_QUERY ); - xCellTextProps->setPropertyValue( rName, aCellProperties[nProperty].Value ); - } - } - } - } - } - //now that the cell properties are set the vertical merge values have to be applied - if( aMergedCells.size() ) - { - std::vector::iterator aMergedIter = aMergedCells.begin(); - while( aMergedIter != aMergedCells.end()) + for (sal_Int32 nCell = 0; nCell < nCells; ++nCell) { - sal_Int32 nCellCount = (sal_Int32)aMergedIter->aCells.size(); - std::vector >::iterator aCellIter = aMergedIter->aCells.begin(); - bool bFirstCell = true; - //the first of the cells get's the number of cells set as RowSpan - //the others get the inverted number of remaining merged cells (3,-2,-1) - while( aCellIter != aMergedIter->aCells.end() ) - { - (*aCellIter)->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ROW_SPAN)), uno::makeAny( nCellCount )); - if( bFirstCell ) - { - nCellCount *= -1; - bFirstCell = false; - } - ++nCellCount; - ++aCellIter; - } - ++aMergedIter; + lcl_ApplyCellProperties(nCell, + aRowSeparators[nRow], aCurrentRow[nCell], + pTextTable->getCellByPosition(nCell, nRow), + aMergedCells); } } + // now that the cell properties are set the vertical merge values + // have to be applied + lcl_MergeCells(aMergedCells); } catch( const lang::WrappedTargetException& rWrapped ) { @@ -2221,29 +2343,6 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) (void)rBounds; } - - bool bIllegalException = false; - bool bRuntimeException = false; - ::rtl::OUString sMessage; - m_pImpl->m_pDoc->StartUndo(UNDO_START, NULL); - m_pImpl->m_pDoc->EndUndo(UNDO_START, NULL); - if( bIllegalException || bRuntimeException ) - { - SwUndoIter aUndoIter( pFirstPaM.get(), UNDO_EMPTY ); - m_pImpl->m_pDoc->Undo(aUndoIter); - if(bIllegalException) - { - lang::IllegalArgumentException aEx; - aEx.Message = sMessage; - throw aEx; - } - else //if(bRuntimeException) - { - uno::RuntimeException aEx; - aEx.Message = sMessage; - throw aEx; - } - } return xRet; } -- cgit v1.2.3 From eab3c7a3a45c945ae480d08052c1d17022d99eed Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:56 +0100 Subject: swunolocking1: #i105557#: fix locking for SwXBodyText: use new XServiceInfo helpers. clean up the implementation a little. --- sw/inc/unotextbodyhf.hxx | 2 +- sw/source/core/unocore/unotext.cxx | 145 ++++++++++++++++++++----------------- 2 files changed, 80 insertions(+), 67 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unotextbodyhf.hxx b/sw/inc/unotextbodyhf.hxx index 98656ca68c..15c38044e4 100644 --- a/sw/inc/unotextbodyhf.hxx +++ b/sw/inc/unotextbodyhf.hxx @@ -64,7 +64,7 @@ protected: public: - SwXBodyText(SwDoc* pDoc); + SwXBodyText(SwDoc *const pDoc); SwXTextCursor * CreateTextCursor(const bool bIgnoreTables = false); diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index b96aec2bd3..a1fe00dba1 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -36,9 +36,11 @@ #include #include +#include + #include #include -#include +#include #include #include @@ -2349,8 +2351,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) /****************************************************************** * SwXBodyText ******************************************************************/ -SwXBodyText::SwXBodyText(SwDoc* _pDoc) : - SwXText(_pDoc, CURSOR_BODY) +SwXBodyText::SwXBodyText(SwDoc *const pDoc) + : SwXText(pDoc, CURSOR_BODY) { } @@ -2364,82 +2366,81 @@ SwXBodyText::~SwXBodyText() /* -----------------------------06.04.00 16:33-------------------------------- ---------------------------------------------------------------------------*/ -OUString SwXBodyText::getImplementationName(void) throw( uno::RuntimeException ) +OUString SAL_CALL +SwXBodyText::getImplementationName() throw (uno::RuntimeException) { return C2U("SwXBodyText"); } /* -----------------------------06.04.00 16:33-------------------------------- ---------------------------------------------------------------------------*/ -BOOL SwXBodyText::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) +static char const*const g_ServicesBodyText[] = { - return C2U("com.sun.star.text.Text") == rServiceName; + "com.sun.star.text.Text", +}; +static const size_t g_nServicesBodyText( + sizeof(g_ServicesBodyText)/sizeof(g_ServicesBodyText[0])); + +sal_Bool SAL_CALL SwXBodyText::supportsService(const OUString& rServiceName) +throw (uno::RuntimeException) +{ + return ::sw::SupportsServiceImpl( + g_nServicesBodyText, g_ServicesBodyText, rServiceName); } -/* -----------------------------06.04.00 16:33-------------------------------- - ---------------------------------------------------------------------------*/ -uno::Sequence< OUString > SwXBodyText::getSupportedServiceNames(void) throw( uno::RuntimeException ) +uno::Sequence< OUString > SAL_CALL +SwXBodyText::getSupportedServiceNames() throw (uno::RuntimeException) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.Text"); - return aRet; + return ::sw::GetSupportedServiceNamesImpl( + g_nServicesBodyText, g_ServicesBodyText); } + /*-- 10.12.98 11:17:27--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXBodyText::queryAggregation( - const uno::Type& rType ) - throw(uno::RuntimeException) +uno::Any SAL_CALL +SwXBodyText::queryAggregation(const uno::Type& rType) +throw (uno::RuntimeException) { uno::Any aRet; - const uno::Type& rXEnumerationAccessType = ::getCppuType((uno::Reference< container::XEnumerationAccess >*)0); - const uno::Type& rXElementAccessType = ::getCppuType((uno::Reference< container::XElementAccess >*)0); - const uno::Type& rXServiceInfoType = ::getCppuType((uno::Reference< lang::XServiceInfo >*)0); - - if(rType == rXEnumerationAccessType) + if (rType == container::XEnumerationAccess::static_type()) { - uno::Reference xRet = this; - aRet.setValue(&xRet, rXEnumerationAccessType); + aRet <<= uno::Reference< container::XEnumerationAccess >(this); } - else if(rType == rXElementAccessType) + else if (rType == container::XElementAccess::static_type()) { - uno::Reference xRet = this; - aRet.setValue(&xRet, rXElementAccessType); + aRet <<= uno::Reference< container::XElementAccess >(this); } - else if(rType == rXServiceInfoType) + else if (rType == lang::XServiceInfo::static_type()) { - uno::Reference xRet = this; - aRet.setValue(&xRet, rXServiceInfoType); + aRet <<= uno::Reference< lang::XServiceInfo >(this); } else { aRet = SwXText::queryInterface( rType ); } if(aRet.getValueType() == ::getCppuVoidType()) + { aRet = OWeakAggObject::queryAggregation( rType ); + } return aRet; } /*-- 10.12.98 11:17:28--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Sequence< uno::Type > SwXBodyText::getTypes( ) throw(uno::RuntimeException) +uno::Sequence< uno::Type > SAL_CALL +SwXBodyText::getTypes() throw (uno::RuntimeException) { - uno::Sequence< uno::Type > aTypes = SwXBodyText_Base::getTypes(); - uno::Sequence< uno::Type > aTextTypes = SwXText::getTypes(); - long nIndex = aTypes.getLength(); - aTypes.realloc(aTypes.getLength() + aTextTypes.getLength()); - uno::Type* pTypes = aTypes.getArray(); - const uno::Type* pTextTypes = aTextTypes.getConstArray(); - for(int i = 0; i < aTextTypes.getLength(); i++) - pTypes[nIndex++] = pTextTypes[i]; - return aTypes; + const uno::Sequence< uno::Type > aTypes = SwXBodyText_Base::getTypes(); + const uno::Sequence< uno::Type > aTextTypes = SwXText::getTypes(); + return ::comphelper::concatSequences(aTypes, aTextTypes); } /* -----------------------------21.03.00 15:39-------------------------------- ---------------------------------------------------------------------------*/ -uno::Sequence< sal_Int8 > SwXBodyText::getImplementationId( ) throw(uno::RuntimeException) +uno::Sequence< sal_Int8 > SAL_CALL +SwXBodyText::getImplementationId() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); static uno::Sequence< sal_Int8 > aId( 16 ); @@ -2497,7 +2498,8 @@ SwXTextCursor * SwXBodyText::CreateTextCursor(const bool bIgnoreTables) /*-- 10.12.98 11:17:29--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextCursor > SwXBodyText::createTextCursor(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextCursor > SAL_CALL +SwXBodyText::createTextCursor() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -2514,19 +2516,23 @@ uno::Reference< text::XTextCursor > SwXBodyText::createTextCursor(void) throw( /*-- 10.12.98 11:17:29--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextCursor > SwXBodyText::createTextCursorByRange( - const uno::Reference< text::XTextRange > & aTextPosition) throw( uno::RuntimeException ) +uno::Reference< text::XTextCursor > SAL_CALL +SwXBodyText::createTextCursorByRange( + const uno::Reference< text::XTextRange > & xTextPosition) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextCursor > aRef; + if(!IsValid()) { uno::RuntimeException aRuntime; aRuntime.Message = C2U(cInvalidObject); throw aRuntime; } + + uno::Reference< text::XTextCursor > aRef; SwUnoInternalPaM aPam(*GetDoc()); - if (::sw::XTextRangeToSwPaM(aPam, aTextPosition)) + if (::sw::XTextRangeToSwPaM(aPam, xTextPosition)) { SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent(); @@ -2536,7 +2542,7 @@ uno::Reference< text::XTextCursor > SwXBodyText::createTextCursorByRange( { p1 = p1->StartOfSectionNode(); } - SwStartNode* p2 = rNode.StartOfSectionNode(); + SwStartNode *const p2 = rNode.StartOfSectionNode(); if(p1 == p2) { @@ -2546,57 +2552,64 @@ uno::Reference< text::XTextCursor > SwXBodyText::createTextCursorByRange( } } if(!aRef.is()) + { throw uno::RuntimeException(); + } return aRef; } + /*-- 10.12.98 11:17:30--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< container::XEnumeration > SwXBodyText::createEnumeration(void) - throw( uno::RuntimeException ) +uno::Reference< container::XEnumeration > SAL_CALL +SwXBodyText::createEnumeration() +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< container::XEnumeration > aRef; - if(IsValid()) - { - SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent(); - SwPosition aPos(rNode); - ::std::auto_ptr pUnoCursor( - GetDoc()->CreateUnoCrsr(aPos, sal_False)); - pUnoCursor->Move(fnMoveBackward, fnGoDoc); - aRef = new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_BODY); - } - else + + if (!IsValid()) { uno::RuntimeException aRuntime; aRuntime.Message = C2U(cInvalidObject); throw aRuntime; } - return aRef; + SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent(); + SwPosition aPos(rNode); + ::std::auto_ptr pUnoCursor( + GetDoc()->CreateUnoCrsr(aPos, sal_False)); + pUnoCursor->Move(fnMoveBackward, fnGoDoc); + const uno::Reference< container::XEnumeration > xRet + = new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_BODY); + return xRet; } + /* -----------------18.12.98 13:36------------------- * * --------------------------------------------------*/ -uno::Type SwXBodyText::getElementType(void) throw( uno::RuntimeException ) +uno::Type SAL_CALL +SwXBodyText::getElementType() throw (uno::RuntimeException) { - return ::getCppuType((uno::Reference*)0); + return text::XTextRange::static_type(); } /* -----------------18.12.98 13:36------------------- * * --------------------------------------------------*/ -sal_Bool SwXBodyText::hasElements(void) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXBodyText::hasElements() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(IsValid()) - return sal_True; - else + + if (!IsValid()) { uno::RuntimeException aRuntime; aRuntime.Message = C2U(cInvalidObject); throw aRuntime; } + + return sal_True; } + /****************************************************************** * SwXHeadFootText ******************************************************************/ -- cgit v1.2.3 From efb8cefe7887fa8e1801ab119fa350931cc8b2a7 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:57 +0100 Subject: swunolocking1: #i105557#: fix locking for SwXHeadFootText: add Impl struct, and use UnoImplPtr to lock destructor. move all implementation details out of header, into Impl struct. replace broken SwClient iteration with a WeakReference in SwFrmFmt. make constructor protected, and add factory function CreateXHeadFootText. use new XUnoTunnel and XServiceInfo helpers. clean up the implementation a little. --- sw/inc/unotextbodyhf.hxx | 18 +- sw/source/core/layout/atrfrm.cxx | 3 +- sw/source/core/unocore/unoobj2.cxx | 13 +- sw/source/core/unocore/unostyle.cxx | 53 +++--- sw/source/core/unocore/unotext.cxx | 331 +++++++++++++++++++++--------------- 5 files changed, 242 insertions(+), 176 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unotextbodyhf.hxx b/sw/inc/unotextbodyhf.hxx index 15c38044e4..8fd4e8c2a4 100644 --- a/sw/inc/unotextbodyhf.hxx +++ b/sw/inc/unotextbodyhf.hxx @@ -38,8 +38,6 @@ #include -#include -#include #include @@ -136,13 +134,12 @@ typedef ::cppu::WeakImplHelper2 class SwXHeadFootText : public SwXHeadFootText_Base , public SwXText - , public SwClient { private: - SwFrmFmt* GetFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } - BOOL bIsHeader; + class Impl; + ::sw::UnoImplPtr m_pImpl; protected: @@ -154,14 +151,13 @@ protected: virtual ~SwXHeadFootText(); -public: - - SwXHeadFootText(SwFrmFmt& rHeadFootFmt, BOOL bHeader); + SwXHeadFootText(SwFrmFmt & rHeadFootFmt, const bool bIsHeader); - TYPEINFO(); +public: - // SwClient - virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + static ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > + CreateXHeadFootText(SwFrmFmt & rHeadFootFmt, const bool bIsHeader); + static bool IsXHeadFootText(SwClient *const pClient); // XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index cd834bacd7..ead6b57f1d 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -198,7 +198,8 @@ void DelHFFormat( SwClient *pToRemove, SwFrmFmt *pFmt ) SwClient *pLast = aIter.GoStart(); if( pLast ) do { - bDel = pLast->IsA( TYPE(SwFrm) )|| pLast->IsA(TYPE(SwXHeadFootText)); + bDel = pLast->IsA( TYPE(SwFrm) ) + || SwXHeadFootText::IsXHeadFootText(pLast); } while( bDel && 0 != ( pLast = aIter++ )); } diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 4c25d821eb..95a027f8a6 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1317,17 +1317,10 @@ CreateParentXText(SwDoc & rDoc, const SwPosition& rPos) pHeadFootFmt); } - if(pHeadFootFmt) + if (pHeadFootFmt) { - SwXHeadFootText* pxHdFt = (SwXHeadFootText*)SwClientIter( *pHeadFootFmt ). - First( TYPE( SwXHeadFootText )); - xParentText = pxHdFt; - if(!pxHdFt) - { - xParentText = - new SwXHeadFootText(*pHeadFootFmt, bHeader); - } - break; + xParentText = SwXHeadFootText::CreateXHeadFootText( + *pHeadFootFmt, bHeader); } } } diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 1108dcf71f..2b648ec87a 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -3436,6 +3436,29 @@ void SwXPageStyle::setPropertyValues( /* -----------------------------04.11.03 13:50-------------------------------- ---------------------------------------------------------------------------*/ +static uno::Reference +lcl_makeHeaderFooter( + const sal_uInt16 nRes, const bool bHeader, SwFrmFmt const*const pFrmFmt) +{ + if (!pFrmFmt) { return 0; } + + const SfxItemSet& rSet = pFrmFmt->GetAttrSet(); + const SfxPoolItem* pItem; + if (SFX_ITEM_SET == rSet.GetItemState(nRes, sal_True, &pItem)) + { + SwFrmFmt *const pHeadFootFmt = (bHeader) + ? static_cast(const_cast(pItem))-> + GetHeaderFmt() + : static_cast(const_cast(pItem))-> + GetFooterFmt(); + if (pHeadFootFmt) + { + return SwXHeadFootText::CreateXHeadFootText(*pHeadFootFmt, bHeader); + } + } + return 0; +} + uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl( const uno::Sequence< OUString >& rPropertyNames ) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) @@ -3468,7 +3491,8 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl( GetBasePool()->SetSearchMask(GetFamily(), nSaveMask ); } sal_uInt16 nRes = 0; - sal_Bool bHeader = sal_False, bAll = sal_False, bLeft = sal_False, bRight = sal_False; + bool bHeader = false; + sal_Bool bAll = sal_False, bLeft = sal_False, bRight = sal_False; switch(pEntry->nWID) { case FN_UNO_HEADER_ON: @@ -3574,7 +3598,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl( case FN_UNO_HEADER_RIGHT : bRight = sal_True; goto Header; Header: - bHeader = sal_True; + bHeader = true; nRes = RES_HEADER; goto MakeObject; case FN_UNO_FOOTER : bAll = sal_True; goto Footer; @@ -3595,27 +3619,18 @@ MakeObject: // TextRight does the same as Text and is for // comptability only. if( bLeft && !bShare ) + { pFrmFmt = &rDesc.GetLeft(); + } else + { pFrmFmt = &rDesc.GetMaster(); - if(pFrmFmt) + } + const uno::Reference< text::XText > xRet = + lcl_makeHeaderFooter(nRes, bHeader, pFrmFmt); + if (xRet.is()) { - const SfxItemSet& rSet = pFrmFmt->GetAttrSet(); - const SfxPoolItem* pItem; - SwFrmFmt* pHeadFootFmt; - if(SFX_ITEM_SET == rSet.GetItemState(nRes, sal_True, &pItem) && - 0 != (pHeadFootFmt = bHeader ? - ((SwFmtHeader*)pItem)->GetHeaderFmt() : - ((SwFmtFooter*)pItem)->GetFooterFmt())) - { - // gibt es schon ein Objekt dafuer? - SwXHeadFootText* pxHdFt = (SwXHeadFootText*)SwClientIter( *pHeadFootFmt ). - First( TYPE( SwXHeadFootText )); - uno::Reference< text::XText > xRet = pxHdFt; - if(!pxHdFt) - xRet = new SwXHeadFootText(*pHeadFootFmt, bHeader); - pRet[nProp].setValue(&xRet, ::getCppuType((uno::Reference*)0)); - } + pRet[nProp] <<= xRet; } } break; diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index a1fe00dba1..ddbb40bccf 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2613,60 +2613,136 @@ SwXBodyText::hasElements() throw (uno::RuntimeException) /****************************************************************** * SwXHeadFootText ******************************************************************/ -TYPEINIT1(SwXHeadFootText, SwClient); -/* -----------------------------06.04.00 16:40-------------------------------- - ---------------------------------------------------------------------------*/ -OUString SwXHeadFootText::getImplementationName(void) throw( uno::RuntimeException ) +class SwXHeadFootText::Impl + : public SwClient { - return C2U("SwXHeadFootText"); + +public: + + bool m_bIsHeader; + + Impl( SwXHeadFootText & /*rThis*/, + SwFrmFmt & rHeadFootFmt, const bool bIsHeader) + : SwClient(& rHeadFootFmt) + , m_bIsHeader(bIsHeader) + { + } + + SwFrmFmt * GetHeadFootFmt() const { + return static_cast( + const_cast(GetRegisteredIn())); + } + + SwFrmFmt & GetHeadFootFmtOrThrow() { + SwFrmFmt *const pFmt( GetHeadFootFmt() ); + if (!pFmt) { + throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( + "SwXHeadFootText: disposed or invalid")), 0); + } + return *pFmt; + } + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + +}; + +/*-- 11.12.98 10:14:51--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void SwXHeadFootText::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) +{ + ClientModify(this, pOld, pNew); } -/* -----------------------------06.04.00 16:40-------------------------------- - ---------------------------------------------------------------------------*/ -BOOL SwXHeadFootText::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) +bool SwXHeadFootText::IsXHeadFootText(SwClient *const pClient) { - return C2U("com.sun.star.text.Text") == rServiceName; + return 0 != dynamic_cast(pClient); } -/* -----------------------------06.04.00 16:40-------------------------------- - ---------------------------------------------------------------------------*/ -uno::Sequence< OUString > SwXHeadFootText::getSupportedServiceNames(void) throw( uno::RuntimeException ) +uno::Reference< text::XText > +SwXHeadFootText::CreateXHeadFootText( + SwFrmFmt & rHeadFootFmt, const bool bIsHeader) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.Text"); - return aRet; + // re-use existing SwXHeadFootText + // #i105557#: do not iterate over the registered clients: race condition + uno::Reference< text::XText > xText(rHeadFootFmt.GetXObject(), + uno::UNO_QUERY); + if (!xText.is()) + { + SwXHeadFootText *const pXHFT( + new SwXHeadFootText(rHeadFootFmt, bIsHeader)); + xText.set(pXHFT); + rHeadFootFmt.SetXObject(xText); + } + return xText; } + /*-- 11.12.98 10:14:48--------------------------------------------------- -----------------------------------------------------------------------*/ -SwXHeadFootText::SwXHeadFootText(SwFrmFmt& rHeadFootFmt, BOOL bHeader) : - SwXText(rHeadFootFmt.GetDoc(), bHeader ? CURSOR_HEADER : CURSOR_FOOTER), - SwClient(&rHeadFootFmt), - bIsHeader(bHeader) +SwXHeadFootText::SwXHeadFootText(SwFrmFmt & rHeadFootFmt, const bool bIsHeader) + : SwXText(rHeadFootFmt.GetDoc(), + (bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER) + , m_pImpl( new SwXHeadFootText::Impl(*this, rHeadFootFmt, bIsHeader) ) { - } + /*-- 11.12.98 10:14:48--------------------------------------------------- -----------------------------------------------------------------------*/ SwXHeadFootText::~SwXHeadFootText() { +} + +/* -----------------------------06.04.00 16:40-------------------------------- + + ---------------------------------------------------------------------------*/ +OUString SAL_CALL +SwXHeadFootText::getImplementationName() throw (uno::RuntimeException) +{ + return C2U("SwXHeadFootText"); +} + +/* -----------------------------06.04.00 16:40-------------------------------- + + ---------------------------------------------------------------------------*/ +static char const*const g_ServicesHeadFootText[] = +{ + "com.sun.star.text.Text", +}; +static const size_t g_nServicesHeadFootText( + sizeof(g_ServicesHeadFootText)/sizeof(g_ServicesHeadFootText[0])); + +sal_Bool SAL_CALL SwXHeadFootText::supportsService(const OUString& rServiceName) +throw (uno::RuntimeException) +{ + return ::sw::SupportsServiceImpl( + g_nServicesHeadFootText, g_ServicesHeadFootText, rServiceName); +} +uno::Sequence< OUString > SAL_CALL +SwXHeadFootText::getSupportedServiceNames() throw (uno::RuntimeException) +{ + return ::sw::GetSupportedServiceNamesImpl( + g_nServicesHeadFootText, g_ServicesHeadFootText); } + /*-- 11.12.98 10:14:49--------------------------------------------------- -----------------------------------------------------------------------*/ const SwStartNode *SwXHeadFootText::GetStartNode() const { const SwStartNode *pSttNd = 0; - SwFrmFmt* pHeadFootFmt = GetFmt(); + SwFrmFmt *const pHeadFootFmt = m_pImpl->GetHeadFootFmt(); if(pHeadFootFmt) { const SwFmtCntnt& rFlyCntnt = pHeadFootFmt->GetCntnt(); if( rFlyCntnt.GetCntntIdx() ) + { pSttNd = rFlyCntnt.GetCntntIdx()->GetNode().GetStartNode(); + } } return pSttNd; } @@ -2679,28 +2755,19 @@ SwXHeadFootText::CreateCursor() throw (uno::RuntimeException) /* -----------------------------21.03.00 15:39-------------------------------- ---------------------------------------------------------------------------*/ -uno::Sequence< uno::Type > SwXHeadFootText::getTypes( ) throw(uno::RuntimeException) +uno::Sequence< uno::Type > SAL_CALL +SwXHeadFootText::getTypes() throw (uno::RuntimeException) { - uno::Sequence< uno::Type > aHFTypes = SwXHeadFootText_Base::getTypes(); - uno::Sequence< uno::Type > aTextTypes = SwXText::getTypes(); - - long nIndex = aHFTypes.getLength(); - aHFTypes.realloc( - aHFTypes.getLength() + - aTextTypes.getLength()); - - uno::Type* pHFTypes = aHFTypes.getArray(); - const uno::Type* pTextTypes = aTextTypes.getConstArray(); - for(long nPos = 0; nPos < aTextTypes.getLength(); nPos++) - pHFTypes[nIndex++] = pTextTypes[nPos]; - - return aHFTypes; + const uno::Sequence< uno::Type > aTypes = SwXHeadFootText_Base::getTypes(); + const uno::Sequence< uno::Type > aTextTypes = SwXText::getTypes(); + return ::comphelper::concatSequences(aTypes, aTextTypes); } /* -----------------------------21.03.00 15:39-------------------------------- ---------------------------------------------------------------------------*/ -uno::Sequence< sal_Int8 > SwXHeadFootText::getImplementationId( ) throw(uno::RuntimeException) +uno::Sequence< sal_Int8 > SAL_CALL +SwXHeadFootText::getImplementationId() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); static uno::Sequence< sal_Int8 > aId( 16 ); @@ -2715,7 +2782,8 @@ uno::Sequence< sal_Int8 > SwXHeadFootText::getImplementationId( ) throw(uno::Ru /* -----------------------------21.03.00 15:46-------------------------------- ---------------------------------------------------------------------------*/ -uno::Any SwXHeadFootText::queryInterface(const uno::Type& rType) +uno::Any SAL_CALL +SwXHeadFootText::queryInterface(const uno::Type& rType) throw (uno::RuntimeException) { const uno::Any ret = SwXHeadFootText_Base::queryInterface(rType); @@ -2727,135 +2795,128 @@ throw (uno::RuntimeException) /*-- 11.12.98 10:14:50--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextCursor > SwXHeadFootText::createTextCursor(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextCursor > SAL_CALL +SwXHeadFootText::createTextCursor() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextCursor > xRet; - SwFrmFmt* pHeadFootFmt = GetFmt(); - if(pHeadFootFmt) - { - const SwFmtCntnt& rFlyCntnt = pHeadFootFmt->GetCntnt(); - const SwNode& rNode = rFlyCntnt.GetCntntIdx()->GetNode(); - SwPosition aPos(rNode); - SwXTextCursor *const pXCursor = new SwXTextCursor(*GetDoc(), this, - (bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER, aPos); - SwUnoCrsr *const pUnoCrsr = pXCursor->GetCursor(); - pUnoCrsr->Move(fnMoveForward, fnGoNode); - - //save current start node to be able to check if there is content after the table - - //otherwise the cursor would be in the body text! - - const SwStartNode* pOwnStartNode = rNode.FindSttNodeByType( - bIsHeader ? SwHeaderStartNode : SwFooterStartNode); - //steht hier eine Tabelle? - SwTableNode* pTblNode = pUnoCrsr->GetNode()->FindTableNode(); - SwCntntNode* pCont = 0; - while( pTblNode ) - { - pUnoCrsr->GetPoint()->nNode = *pTblNode->EndOfSectionNode(); - pCont = GetDoc()->GetNodes().GoNext(&pUnoCrsr->GetPoint()->nNode); - pTblNode = pCont->FindTableNode(); - } - if(pCont) - pUnoCrsr->GetPoint()->nContent.Assign(pCont, 0); - const SwStartNode* pNewStartNode = pUnoCrsr->GetNode()->FindSttNodeByType( - bIsHeader ? SwHeaderStartNode : SwFooterStartNode); - if(!pNewStartNode || pNewStartNode != pOwnStartNode) - { - uno::RuntimeException aExcept; - aExcept.Message = S2U("no text available"); - throw aExcept; - } - xRet = static_cast(pXCursor); - } - else - { - uno::RuntimeException aRuntime; - aRuntime.Message = C2U(cInvalidObject); - throw aRuntime; + + SwFrmFmt & rHeadFootFmt( m_pImpl->GetHeadFootFmtOrThrow() ); + + uno::Reference< text::XTextCursor > xRet; + const SwFmtCntnt& rFlyCntnt = rHeadFootFmt.GetCntnt(); + const SwNode& rNode = rFlyCntnt.GetCntntIdx()->GetNode(); + SwPosition aPos(rNode); + SwXTextCursor *const pXCursor = new SwXTextCursor(*GetDoc(), this, + (m_pImpl->m_bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER, aPos); + SwUnoCrsr *const pUnoCrsr = pXCursor->GetCursor(); + pUnoCrsr->Move(fnMoveForward, fnGoNode); + + // save current start node to be able to check if there is content + // after the table - otherwise the cursor would be in the body text! + SwStartNode const*const pOwnStartNode = rNode.FindSttNodeByType( + (m_pImpl->m_bIsHeader) ? SwHeaderStartNode : SwFooterStartNode); + // is there a table here? + SwTableNode* pTblNode = pUnoCrsr->GetNode()->FindTableNode(); + SwCntntNode* pCont = 0; + while (pTblNode) + { + pUnoCrsr->GetPoint()->nNode = *pTblNode->EndOfSectionNode(); + pCont = GetDoc()->GetNodes().GoNext(&pUnoCrsr->GetPoint()->nNode); + pTblNode = pCont->FindTableNode(); + } + if (pCont) + { + pUnoCrsr->GetPoint()->nContent.Assign(pCont, 0); + } + SwStartNode const*const pNewStartNode = + pUnoCrsr->GetNode()->FindSttNodeByType( + (m_pImpl->m_bIsHeader) ? SwHeaderStartNode : SwFooterStartNode); + if (!pNewStartNode || (pNewStartNode != pOwnStartNode)) + { + uno::RuntimeException aExcept; + aExcept.Message = S2U("no text available"); + throw aExcept; } + xRet = static_cast(pXCursor); return xRet; } + /*-- 11.12.98 10:14:50--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextCursor > SwXHeadFootText::createTextCursorByRange( - const uno::Reference< text::XTextRange > & aTextPosition) throw( uno::RuntimeException ) +uno::Reference< text::XTextCursor > SAL_CALL +SwXHeadFootText::createTextCursorByRange( + const uno::Reference< text::XTextRange > & xTextPosition) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextCursor > xRet; - SwFrmFmt* pHeadFootFmt = GetFmt(); + + SwFrmFmt & rHeadFootFmt( m_pImpl->GetHeadFootFmtOrThrow() ); + SwUnoInternalPaM aPam(*GetDoc()); - if (pHeadFootFmt && ::sw::XTextRangeToSwPaM(aPam, aTextPosition)) + if (!::sw::XTextRangeToSwPaM(aPam, xTextPosition)) { - SwNode& rNode = pHeadFootFmt->GetCntnt().GetCntntIdx()->GetNode(); - SwPosition aPos(rNode); - SwPaM aHFPam(aPos); - aHFPam.Move(fnMoveForward, fnGoNode); - SwStartNode* pOwnStartNode = aHFPam.GetNode()->FindSttNodeByType( - bIsHeader ? SwHeaderStartNode : SwFooterStartNode); - SwStartNode* p1 = aPam.GetNode()->FindSttNodeByType( - bIsHeader ? SwHeaderStartNode : SwFooterStartNode); - if(p1 == pOwnStartNode) - { - xRet = static_cast( - new SwXTextCursor(*GetDoc(), this, - (bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER, - *aPam.GetPoint(), aPam.GetMark())); - } + uno::RuntimeException aRuntime; + aRuntime.Message = C2U(cInvalidObject); + throw aRuntime; + } + + uno::Reference< text::XTextCursor > xRet; + SwNode& rNode = rHeadFootFmt.GetCntnt().GetCntntIdx()->GetNode(); + SwPosition aPos(rNode); + SwPaM aHFPam(aPos); + aHFPam.Move(fnMoveForward, fnGoNode); + SwStartNode *const pOwnStartNode = aHFPam.GetNode()->FindSttNodeByType( + (m_pImpl->m_bIsHeader) ? SwHeaderStartNode : SwFooterStartNode); + SwStartNode *const p1 = aPam.GetNode()->FindSttNodeByType( + (m_pImpl->m_bIsHeader) ? SwHeaderStartNode : SwFooterStartNode); + if (p1 == pOwnStartNode) + { + xRet = static_cast( + new SwXTextCursor(*GetDoc(), this, + (m_pImpl->m_bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER, + *aPam.GetPoint(), aPam.GetMark())); } return xRet; } + /* -----------------19.03.99 15:44------------------- * * --------------------------------------------------*/ -uno::Reference< container::XEnumeration > SwXHeadFootText::createEnumeration(void) - throw( uno::RuntimeException ) +uno::Reference< container::XEnumeration > SAL_CALL +SwXHeadFootText::createEnumeration() +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + + SwFrmFmt & rHeadFootFmt( m_pImpl->GetHeadFootFmtOrThrow() ); + uno::Reference< container::XEnumeration > aRef; - //wenn this ungueltig ist, dann kommt die uno::Exception aus createTextCursor() - SwFrmFmt* pHeadFootFmt = GetFmt(); - if(pHeadFootFmt) - { - const SwFmtCntnt& rFlyCntnt = pHeadFootFmt->GetCntnt(); - const SwNode& rNode = rFlyCntnt.GetCntntIdx()->GetNode(); - SwPosition aPos(rNode); - ::std::auto_ptr pUnoCursor( - GetDoc()->CreateUnoCrsr(aPos, sal_False)); - pUnoCursor->Move(fnMoveForward, fnGoNode); - aRef = new SwXParagraphEnumeration(this, pUnoCursor, - (bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER); - } - else - { - uno::RuntimeException aRuntime; - aRuntime.Message = C2U(cInvalidObject); - throw aRuntime; - } + const SwFmtCntnt& rFlyCntnt = rHeadFootFmt.GetCntnt(); + const SwNode& rNode = rFlyCntnt.GetCntntIdx()->GetNode(); + SwPosition aPos(rNode); + ::std::auto_ptr pUnoCursor( + GetDoc()->CreateUnoCrsr(aPos, sal_False)); + pUnoCursor->Move(fnMoveForward, fnGoNode); + aRef = new SwXParagraphEnumeration(this, pUnoCursor, + (m_pImpl->m_bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER); return aRef; } + /* -----------------19.03.99 15:50------------------- * * --------------------------------------------------*/ -uno::Type SwXHeadFootText::getElementType(void) throw( uno::RuntimeException ) +uno::Type SAL_CALL +SwXHeadFootText::getElementType() throw (uno::RuntimeException) { - return ::getCppuType((uno::Reference*)0); + return text::XTextRange::static_type(); } /* -----------------19.03.99 15:50------------------- * * --------------------------------------------------*/ -sal_Bool SwXHeadFootText::hasElements(void) throw( uno::RuntimeException ) +sal_Bool SAL_CALL SwXHeadFootText::hasElements() throw (uno::RuntimeException) { return sal_True; } -/*-- 11.12.98 10:14:51--------------------------------------------------- - - -----------------------------------------------------------------------*/ -void SwXHeadFootText::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew) -{ - ClientModify( this, pOld, pNew); -} - -- cgit v1.2.3 From 98ea66421c121036cf3e6f4a883b9c629e484ee9 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:58 +0100 Subject: swunolocking1: #i105557#: fix locking for SwXFootnote: add Impl struct, and use UnoImplPtr to lock destructor. move all implementation details out of header, into Impl struct. disable broken SwClient iteration. make constructor protected, and add factory function CreateXFootnote. use new XUnoTunnel and XServiceInfo helpers. clean up the implementation a little. --- sw/inc/unofootnote.hxx | 37 +- sw/source/core/unocore/unoclbck.cxx | 15 +- sw/source/core/unocore/unocoll.cxx | 11 +- sw/source/core/unocore/unocrsrhelper.cxx | 5 +- sw/source/core/unocore/unoftn.cxx | 743 ++++++++++++++++++------------- sw/source/core/unocore/unoobj2.cxx | 8 +- 6 files changed, 461 insertions(+), 358 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unofootnote.hxx b/sw/inc/unofootnote.hxx index 8710f7effa..8d9a65d963 100644 --- a/sw/inc/unofootnote.hxx +++ b/sw/inc/unofootnote.hxx @@ -41,14 +41,11 @@ #include -#include - -#include -#include #include class SwDoc; +class SwModify; class SwFmtFtn; @@ -66,18 +63,15 @@ typedef ::cppu::WeakImplHelper5 class SwXFootnote : public SwXFootnote_Base , public SwXText - , public SwClient { private: friend class SwXFootnotes; - SwEventListenerContainer aLstnrCntnr; - const SwFmtFtn* pFmtFtn; - BOOL m_bIsDescriptor; - String m_sLabel; - BOOL m_bIsEndnote; + class Impl; + ::sw::UnoImplPtr m_pImpl; + protected: @@ -90,24 +84,17 @@ protected: virtual ~SwXFootnote(); -public: - - SwXFootnote(BOOL bEndnote); - SwXFootnote(SwDoc* pDoc, const SwFmtFtn& rFmt); - - void attachToRange( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > & xTextRange) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); + SwXFootnote(SwDoc & rDoc, const SwFmtFtn & rFmt); - const SwFmtFtn* FindFmt() const { return GetDoc() ? pFmtFtn : 0; } - void Invalidate(); +public: - TYPEINFO(); + SwXFootnote(const bool bEndnote); - // SwClient - virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + static SwXFootnote * + CreateXFootnote(SwDoc & rDoc, SwFmtFtn const& rFootnoteFmt); + /// may return 0 + static SwXFootnote * + GetXFootnote(SwModify const& rUnoCB, SwFmtFtn const& rFootnoteFmt); // XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( diff --git a/sw/source/core/unocore/unoclbck.cxx b/sw/source/core/unocore/unoclbck.cxx index 693aaf9674..96ba9b2421 100644 --- a/sw/source/core/unocore/unoclbck.cxx +++ b/sw/source/core/unocore/unoclbck.cxx @@ -72,20 +72,7 @@ SwXReferenceMark* SwUnoCallBack::GetRefMark(const SwFmtRefMark& rMark) ---------------------------------------------------------------------------*/ SwXFootnote* SwUnoCallBack::GetFootnote(const SwFmtFtn& rMark) { - SwClientIter aIter( *this ); - SwXFootnote* pxFootnote = (SwXFootnote*)aIter.First( TYPE( SwXFootnote )); - while(pxFootnote) - { - SwDoc* pDoc = pxFootnote->GetDoc(); - if(pDoc) - { - const SwFmtFtn* pFtn = pxFootnote->FindFmt(); - if(pFtn == &rMark) - return pxFootnote; - } - pxFootnote = (SwXFootnote*)aIter.Next( ); - } - return 0; + return SwXFootnote::GetXFootnote(*this, rMark); } /* -----------------------------27.11.00 17:15-------------------------------- diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index d62b7837cc..aedace0510 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -1727,8 +1727,8 @@ uno::Any SwXFootnotes::getByIndex(sal_Int32 nIndex) if(nCount == nIndex) { - xRef = new SwXFootnote(GetDoc(), rFtn); - aRet.setValue(&xRef, ::getCppuType((uno::Reference*)0)); + xRef = SwXFootnote::CreateXFootnote(*GetDoc(), rFtn); + aRet <<= xRef; break; } nCount++; @@ -1762,12 +1762,7 @@ sal_Bool SwXFootnotes::hasElements(void) throw( uno::RuntimeException ) ---------------------------------------------------------------------------*/ Reference SwXFootnotes::GetObject( SwDoc& rDoc, const SwFmtFtn& rFmt ) { - Reference xContent = ((SwUnoCallBack*)rDoc.GetUnoCallBack())-> - GetFootnote(rFmt); - if(!xContent.is()) - xContent = new SwXFootnote(&rDoc, rFmt); - Reference xRet(xContent, UNO_QUERY); - return xRet; + return SwXFootnote::CreateXFootnote(rDoc, rFmt); } /****************************************************************** diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 2e177b40e0..76c28f8d22 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -445,8 +445,9 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry { if( pAny ) { - uno::Reference< XFootnote > xFoot = new SwXFootnote(rPam.GetDoc(), rFtn); - pAny->setValue(&xFoot, ::getCppuType((uno::Reference*)0)); + const uno::Reference< text::XFootnote > xFootnote = + SwXFootnote::CreateXFootnote(*rPam.GetDoc(), rFtn); + *pAny <<= xFootnote; } } else diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index 19787cdbd0..3a1509a276 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -31,9 +31,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include + #include #include -#include +#include #include #include @@ -42,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -55,118 +58,233 @@ using namespace ::com::sun::star; using ::rtl::OUString; /****************************************************************** - * + * SwXFootnote ******************************************************************/ -/* -----------------------------13.03.00 12:15-------------------------------- - ---------------------------------------------------------------------------*/ -const uno::Sequence< sal_Int8 > & SwXFootnote::getUnoTunnelId() +class SwXFootnote::Impl + : public SwClient { - static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId(); - return aSeq; -} -/* -----------------------------10.03.00 18:04-------------------------------- - ---------------------------------------------------------------------------*/ -sal_Int64 SAL_CALL SwXFootnote::getSomething( const uno::Sequence< sal_Int8 >& rId ) - throw(uno::RuntimeException) -{ - if( rId.getLength() == 16 - && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16 ) ) +public: + + SwXFootnote & m_rThis; + const bool m_bIsEndnote; + SwEventListenerContainer m_ListenerContainer; + bool m_bIsDescriptor; + const SwFmtFtn * m_pFmtFtn; + ::rtl::OUString m_sLabel; + + Impl( SwXFootnote & rThis, + SwDoc *const pDoc, SwFmtFtn const*const pFootnote, + const bool bIsEndnote) + : SwClient((pDoc) ? pDoc->GetUnoCallBack() : 0) + , m_rThis(rThis) + , m_bIsEndnote(bIsEndnote) + , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) + , m_bIsDescriptor(0 == pFootnote) + , m_pFmtFtn(pFootnote) { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); } - return SwXText::getSomething( rId ); -} -/* -----------------------------06.04.00 16:36-------------------------------- + + const SwFmtFtn* GetFootnoteFormat() const { + return m_rThis.GetDoc() ? m_pFmtFtn : 0; + } + + SwFmtFtn const& GetFootnoteFormatOrThrow() { + SwFmtFtn const*const pFootnote( GetFootnoteFormat() ); + if (!pFootnote) { + throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( + "SwXFootnote: disposed or invalid")), 0); + } + return *pFootnote; + } + + void Invalidate(); + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + +}; + +/* -----------------------------07.01.00 12:39-------------------------------- ---------------------------------------------------------------------------*/ -OUString SwXFootnote::getImplementationName(void) throw( uno::RuntimeException ) +void SwXFootnote::Impl::Invalidate() { - return C2U("SwXFootnote"); + if (GetRegisteredIn()) + { + const_cast(GetRegisteredIn())->Remove(this); + } + m_ListenerContainer.Disposing(); + m_pFmtFtn = 0; + m_rThis.SetDoc(0); } -/* -----------------------------06.04.00 16:36-------------------------------- - ---------------------------------------------------------------------------*/ -BOOL SwXFootnote::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) +/* -----------------18.01.99 09:12------------------- + * + * --------------------------------------------------*/ +void SwXFootnote::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) { - return !rServiceName.compareToAscii("com.sun.star.text.Footnote") || - !rServiceName.compareToAscii("com.sun.star.text.TextContent") || - !rServiceName.compareToAscii("com.sun.star.text.Text") || - (m_bIsEndnote && !rServiceName.compareToAscii("com.sun.star.text.Endnote")); -; -} -/* -----------------------------06.04.00 16:36-------------------------------- + ClientModify(this, pOld, pNew); - ---------------------------------------------------------------------------*/ -uno::Sequence< OUString > SwXFootnote::getSupportedServiceNames(void) throw( uno::RuntimeException ) -{ - uno::Sequence< OUString > aRet(m_bIsEndnote ? 4 : 3); - OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.Footnote"); - pArray[1] = C2U("com.sun.star.text.TextContent"); - pArray[2] = C2U("com.sun.star.text.Text"); - if(m_bIsEndnote) - pArray[3] = C2U("com.sun.star.text.Endnote"); - return aRet; + if (!GetRegisteredIn()) // removed => dispose + { + Invalidate(); + } + else if (pOld) + { + switch (pOld->Which()) + { + case RES_FOOTNOTE_DELETED: + if (static_cast(m_pFmtFtn) == + static_cast(pOld)->pObject) + { + Invalidate(); + } + break; + } + } } + /*-- 10.12.98 15:31:44--------------------------------------------------- -----------------------------------------------------------------------*/ -TYPEINIT1(SwXFootnote, SwClient); - -SwXFootnote::SwXFootnote(sal_Bool bEndnote) : - SwXText(0, CURSOR_FOOTNOTE), - aLstnrCntnr( (text::XTextContent*)this), - pFmtFtn(0), - m_bIsDescriptor(sal_True), - m_bIsEndnote(bEndnote) +SwXFootnote::SwXFootnote(const bool bEndnote) + : SwXText(0, CURSOR_FOOTNOTE) + , m_pImpl( new SwXFootnote::Impl(*this, 0, 0, bEndnote) ) { - } /*-- 10.12.98 15:31:45--------------------------------------------------- -----------------------------------------------------------------------*/ -SwXFootnote::SwXFootnote(SwDoc* _pDoc, const SwFmtFtn& rFmt) : - SwXText(_pDoc, CURSOR_FOOTNOTE), - aLstnrCntnr( (text::XTextContent*)this), - pFmtFtn(&rFmt), - m_bIsDescriptor(sal_False), - m_bIsEndnote(rFmt.IsEndNote()) +SwXFootnote::SwXFootnote(SwDoc & rDoc, const SwFmtFtn& rFmt) + : SwXText(& rDoc, CURSOR_FOOTNOTE) + , m_pImpl( new SwXFootnote::Impl(*this, &rDoc, &rFmt, rFmt.IsEndNote()) ) { - GetDoc()->GetUnoCallBack()->Add(this); } /*-- 10.12.98 15:31:45--------------------------------------------------- -----------------------------------------------------------------------*/ SwXFootnote::~SwXFootnote() { +} + +SwXFootnote * +SwXFootnote::GetXFootnote( + SwModify const& /*rUnoCB*/, SwFmtFtn const& /*rFootnoteFmt*/) +{ + // re-use existing SwXFootnote + // #i105557#: do not iterate over the registered clients: race condition + // to do this properly requires the SwXFootnote to register at the + // SwFmtFtn directly, not at the unocallback + // also this function must return a uno Reference! +#if 0 + SwClientIter aIter( rUnoCB ); + SwXFootnote::Impl * pXFootnote = static_cast( + aIter.First( TYPE( SwXFootnote::Impl ))); + while (pXFootnote) + { + SwDoc *const pDoc = pXFootnote->m_rThis.GetDoc(); + if (pDoc) + { + SwFmtFtn const*const pFtn = pXFootnote->GetFootnoteFormat(); + if (pFtn == &rFootnoteFmt) + { + return & pXFootnote->m_rThis; + } + } + pXFootnote = static_cast(aIter.Next()); + } +#endif + return 0; +} + +SwXFootnote * +SwXFootnote::CreateXFootnote(SwDoc & rDoc, SwFmtFtn const& rFootnoteFmt) +{ + SwXFootnote *const pXFootnote( + GetXFootnote(*rDoc.GetUnoCallBack(), rFootnoteFmt)); + return (pXFootnote) + ? pXFootnote + : new SwXFootnote(rDoc, rFootnoteFmt); +} +/* -----------------------------13.03.00 12:15-------------------------------- + + ---------------------------------------------------------------------------*/ +const uno::Sequence< sal_Int8 > & SwXFootnote::getUnoTunnelId() +{ + static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId(); + return aSeq; } -/* -----------------------------21.03.00 15:39-------------------------------- +/* -----------------------------10.03.00 18:04-------------------------------- + + ---------------------------------------------------------------------------*/ +sal_Int64 SAL_CALL +SwXFootnote::getSomething(const uno::Sequence< sal_Int8 >& rId) +throw (uno::RuntimeException) +{ + const sal_Int64 nRet( ::sw::UnoTunnelImpl(rId, this) ); + return (nRet) ? nRet : SwXText::getSomething(rId); +} + +/* -----------------------------06.04.00 16:36-------------------------------- + + ---------------------------------------------------------------------------*/ +OUString SAL_CALL +SwXFootnote::getImplementationName() throw (uno::RuntimeException) +{ + return C2U("SwXFootnote"); +} + +/* -----------------------------06.04.00 16:36-------------------------------- ---------------------------------------------------------------------------*/ -uno::Sequence< uno::Type > SAL_CALL SwXFootnote::getTypes( ) throw(uno::RuntimeException) +static char const*const g_ServicesFootnote[] = +{ + "com.sun.star.text.TextContent", + "com.sun.star.text.Footnote", + "com.sun.star.text.Text", + "com.sun.star.text.Endnote", // NB: only supported for endnotes! +}; +static const size_t g_nServicesEndnote( + sizeof(g_ServicesFootnote)/sizeof(g_ServicesFootnote[0])); +static const size_t g_nServicesFootnote( g_nServicesEndnote - 1 ); // NB: omit! + +sal_Bool SAL_CALL SwXFootnote::supportsService(const OUString& rServiceName) +throw (uno::RuntimeException) { - uno::Sequence< uno::Type > aFtnTypes = SwXFootnote_Base::getTypes(); - uno::Sequence< uno::Type > aTextTypes = SwXText::getTypes(); + vos::OGuard g(Application::GetSolarMutex()); + return ::sw::SupportsServiceImpl( + (m_pImpl->m_bIsEndnote) ? g_nServicesEndnote : g_nServicesFootnote, + g_ServicesFootnote, rServiceName); +} - long nIndex = aFtnTypes.getLength(); - aFtnTypes.realloc( aFtnTypes.getLength() + aTextTypes.getLength()); +uno::Sequence< OUString > SAL_CALL +SwXFootnote::getSupportedServiceNames() throw (uno::RuntimeException) +{ + vos::OGuard g(Application::GetSolarMutex()); + return ::sw::GetSupportedServiceNamesImpl( + (m_pImpl->m_bIsEndnote) ? g_nServicesEndnote : g_nServicesFootnote, + g_ServicesFootnote); +} - uno::Type* pFtnTypes = aFtnTypes.getArray(); - const uno::Type* pTextTypes = aTextTypes.getConstArray(); - for(long nPos = 0; nPos < aTextTypes.getLength(); nPos++) - pFtnTypes[nIndex++] = pTextTypes[nPos]; +/* -----------------------------21.03.00 15:39-------------------------------- - return aFtnTypes; + ---------------------------------------------------------------------------*/ +uno::Sequence< uno::Type > SAL_CALL +SwXFootnote::getTypes() throw (uno::RuntimeException) +{ + const uno::Sequence< uno::Type > aTypes = SwXFootnote_Base::getTypes(); + const uno::Sequence< uno::Type > aTextTypes = SwXText::getTypes(); + return ::comphelper::concatSequences(aTypes, aTextTypes); } /* -----------------------------21.03.00 15:39-------------------------------- ---------------------------------------------------------------------------*/ -uno::Sequence< sal_Int8 > SAL_CALL SwXFootnote::getImplementationId( ) throw(uno::RuntimeException) +uno::Sequence< sal_Int8 > SAL_CALL +SwXFootnote::getImplementationId() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); static uno::Sequence< sal_Int8 > aId( 16 ); @@ -181,7 +299,8 @@ uno::Sequence< sal_Int8 > SAL_CALL SwXFootnote::getImplementationId( ) throw(un /* -----------------------------21.03.00 15:46-------------------------------- ---------------------------------------------------------------------------*/ -uno::Any SAL_CALL SwXFootnote::queryInterface(const uno::Type& rType) +uno::Any SAL_CALL +SwXFootnote::queryInterface(const uno::Type& rType) throw (uno::RuntimeException) { const uno::Any ret = SwXFootnote_Base::queryInterface(rType); @@ -193,26 +312,36 @@ throw (uno::RuntimeException) /*-- 10.12.98 15:31:47--------------------------------------------------- -----------------------------------------------------------------------*/ -OUString SwXFootnote::getLabel(void) throw( uno::RuntimeException ) +OUString SAL_CALL SwXFootnote::getLabel() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - String sRet; - const SwFmtFtn* pFmt = SwXFootnote::FindFmt(); + + ::rtl::OUString sRet; + SwFmtFtn const*const pFmt = m_pImpl->GetFootnoteFormat(); if(pFmt) + { sRet = pFmt->GetNumStr(); - else if(m_bIsDescriptor) - return m_sLabel; + } + else if (m_pImpl->m_bIsDescriptor) + { + sRet = m_pImpl->m_sLabel; + } else + { throw uno::RuntimeException(); + } return sRet; } + /*-- 10.12.98 15:31:48--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXFootnote::setLabel(const OUString& aLabel) throw( uno::RuntimeException ) +void SAL_CALL +SwXFootnote::setLabel(const OUString& aLabel) throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - const SwFmtFtn* pFmt = FindFmt(); + + SwFmtFtn const*const pFmt = m_pImpl->GetFootnoteFormat(); if(pFmt) { const SwTxtFtn* pTxtFtn = pFmt->GetTxtFtn(); @@ -222,157 +351,172 @@ void SwXFootnote::setLabel(const OUString& aLabel) throw( uno::RuntimeException SwPaM aPam(rTxtNode, *pTxtFtn->GetStart()); GetDoc()->SetCurFtn(aPam, aLabel, pFmt->GetNumber(), pFmt->IsEndNote()); } - else if(m_bIsDescriptor) - m_sLabel = String(aLabel); + else if (m_pImpl->m_bIsDescriptor) + { + m_pImpl->m_sLabel = String(aLabel); + } else + { throw uno::RuntimeException(); - + } } + /* -----------------18.02.99 13:32------------------- * * --------------------------------------------------*/ -void SwXFootnote::attachToRange(const uno::Reference< text::XTextRange > & xTextRange) - throw( lang::IllegalArgumentException, uno::RuntimeException ) +void SAL_CALL +SwXFootnote::attach(const uno::Reference< text::XTextRange > & xTextRange) +throw (lang::IllegalArgumentException, uno::RuntimeException) { - if(!m_bIsDescriptor) + vos::OGuard aGuard(Application::GetSolarMutex()); + + if (!m_pImpl->m_bIsDescriptor) + { throw uno::RuntimeException(); - uno::Reference xRangeTunnel( xTextRange, uno::UNO_QUERY); - SwXTextRange* pRange = 0; - OTextCursorHelper* pCursor = 0; - if(xRangeTunnel.is()) + } + const uno::Reference xRangeTunnel( + xTextRange, uno::UNO_QUERY); + SwXTextRange *const pRange = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); + OTextCursorHelper *const pCursor = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); + SwDoc *const pNewDoc = + (pRange) ? pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : 0); + if (!pNewDoc) + { + throw lang::IllegalArgumentException(); + } + + SwUnoInternalPaM aPam(*pNewDoc); + //das muss jetzt sal_True liefern + ::sw::XTextRangeToSwPaM(aPam, xTextRange); + + UnoActionContext aCont(pNewDoc); + pNewDoc->DeleteAndJoin(aPam); + aPam.DeleteMark(); + SwFmtFtn aFootNote(m_pImpl->m_bIsEndnote); + if (m_pImpl->m_sLabel.getLength()) { - pRange = reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) )); - pCursor = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); + aFootNote.SetNumStr(m_pImpl->m_sLabel); } - SwDoc* pNewDoc = pRange ? (SwDoc*)pRange->GetDoc() : pCursor ? (SwDoc*)pCursor->GetDoc() : 0; - if(pNewDoc) + + SwXTextCursor const*const pTextCursor( + dynamic_cast(pCursor)); + const bool bForceExpandHints( (pTextCursor) + ? pTextCursor->IsAtEndOfMeta() : false ); + const SetAttrMode nInsertFlags = (bForceExpandHints) + ? nsSetAttrMode::SETATTR_FORCEHINTEXPAND + : nsSetAttrMode::SETATTR_DEFAULT; + + pNewDoc->InsertPoolItem(aPam, aFootNote, nInsertFlags); + + SwTxtFtn *const pTxtAttr = static_cast( + aPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt( + aPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_FTN )); + + if (pTxtAttr) { - SwUnoInternalPaM aPam(*pNewDoc); - //das muss jetzt sal_True liefern - ::sw::XTextRangeToSwPaM(aPam, xTextRange); - - UnoActionContext aCont(pNewDoc); - SwTxtAttr* pTxtAttr = 0; - pNewDoc->DeleteAndJoin(aPam); - aPam.DeleteMark(); - SwFmtFtn aFootNote(m_bIsEndnote); - if(m_sLabel.Len()) - aFootNote.SetNumStr(m_sLabel); - - SwXTextCursor const*const pTextCursor( - dynamic_cast(pCursor)); - const bool bForceExpandHints( (pTextCursor) - ? pTextCursor->IsAtEndOfMeta() : false ); - const SetAttrMode nInsertFlags = (bForceExpandHints) - ? nsSetAttrMode::SETATTR_FORCEHINTEXPAND - : nsSetAttrMode::SETATTR_DEFAULT; - - pNewDoc->InsertPoolItem(aPam, aFootNote, nInsertFlags); - - pTxtAttr = aPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt( - aPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_FTN ); - - if(pTxtAttr) + const SwFmtFtn& rFtn = pTxtAttr->GetFtn(); + m_pImpl->m_pFmtFtn = &rFtn; + pNewDoc->GetUnoCallBack()->Add(m_pImpl.get()); + // force creation of sequence id - is used for references + if (pNewDoc->IsInReading()) + { + pTxtAttr->SetSeqNo(pNewDoc->GetFtnIdxs().Count()); + } + else { - const SwFmtFtn& rFtn = pTxtAttr->GetFtn(); - pFmtFtn = &rFtn; - pNewDoc->GetUnoCallBack()->Add(this); - //force creation of sequence id - is used for references - if(pNewDoc->IsInReading()) - ((SwTxtFtn*)pTxtAttr)->SetSeqNo(pNewDoc->GetFtnIdxs().Count()); - else - ((SwTxtFtn*)pTxtAttr)->SetSeqRefNo(); + pTxtAttr->SetSeqRefNo(); } - m_bIsDescriptor = sal_False; - SetDoc(pNewDoc); } - else - throw lang::IllegalArgumentException(); + m_pImpl->m_bIsDescriptor = sal_False; + SetDoc(pNewDoc); } -/*-- 10.12.98 15:31:48--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXFootnote::attach(const uno::Reference< text::XTextRange > & xTextRange) - throw( lang::IllegalArgumentException, uno::RuntimeException ) -{ - vos::OGuard aGuard(Application::GetSolarMutex()); - attachToRange( xTextRange ); -} /*-- 10.12.98 15:31:48--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextRange > SwXFootnote::getAnchor(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextRange > SAL_CALL +SwXFootnote::getAnchor() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextRange > aRef; - const SwFmtFtn* pFmt = FindFmt(); - if(pFmt) - { - const SwTxtFtn* pTxtFtn = pFmt->GetTxtFtn(); - SwPaM aPam( pTxtFtn->GetTxtNode(), *pTxtFtn->GetStart() ); - SwPosition aMark( *aPam.Start() ); - aPam.SetMark(); - aPam.GetMark()->nContent++; - aRef = SwXTextRange::CreateXTextRange( - *GetDoc(), *aPam.Start(), aPam.End()); - } - else - throw uno::RuntimeException(); - return aRef; + + SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() ); + + SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn(); + SwPaM aPam( pTxtFtn->GetTxtNode(), *pTxtFtn->GetStart() ); + SwPosition aMark( *aPam.Start() ); + aPam.SetMark(); + aPam.GetMark()->nContent++; + const uno::Reference< text::XTextRange > xRet = + SwXTextRange::CreateXTextRange(*GetDoc(), *aPam.Start(), aPam.End()); + return xRet; } /*-- 10.12.98 15:31:49--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXFootnote::dispose(void) throw( uno::RuntimeException ) +void SAL_CALL SwXFootnote::dispose() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - const SwFmtFtn* pFmt = FindFmt(); - if(pFmt) - { - const SwTxtFtn* pTxtFtn = pFmt->GetTxtFtn(); - DBG_ASSERT(pTxtFtn, "kein TextNode?"); - SwTxtNode& rTxtNode = (SwTxtNode&)pTxtFtn->GetTxtNode(); - xub_StrLen nPos = *pTxtFtn->GetStart(); - SwPaM aPam(rTxtNode, nPos, rTxtNode, nPos+1 ); - GetDoc()->DeleteAndJoin( aPam ); - } - else - throw uno::RuntimeException(); + SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() ); + + SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn(); + DBG_ASSERT(pTxtFtn, "no TextNode?"); + SwTxtNode& rTxtNode = const_cast(pTxtFtn->GetTxtNode()); + const xub_StrLen nPos = *pTxtFtn->GetStart(); + SwPaM aPam(rTxtNode, nPos, rTxtNode, nPos+1); + GetDoc()->DeleteAndJoin( aPam ); } + /*-- 10.12.98 15:31:49--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXFootnote::addEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException ) +void SAL_CALL +SwXFootnote::addEventListener( + const uno::Reference< lang::XEventListener > & xListener) +throw (uno::RuntimeException) { - if(!GetRegisteredIn()) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->GetFootnoteFormat()) + { throw uno::RuntimeException(); - aLstnrCntnr.AddListener(aListener); + } + m_pImpl->m_ListenerContainer.AddListener(xListener); } /*-- 10.12.98 15:31:50--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXFootnote::removeEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException ) +void SAL_CALL +SwXFootnote::removeEventListener( + const uno::Reference< lang::XEventListener > & xListener) +throw (uno::RuntimeException) { - if(!GetRegisteredIn() || !aLstnrCntnr.RemoveListener(aListener)) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->GetFootnoteFormat() || + !m_pImpl->m_ListenerContainer.RemoveListener(xListener)) + { throw uno::RuntimeException(); + } } + /* -----------------06.05.99 15:31------------------- * * --------------------------------------------------*/ const SwStartNode *SwXFootnote::GetStartNode() const { - const SwStartNode *pSttNd = 0; - const SwFmtFtn* pFmt = FindFmt(); + SwFmtFtn const*const pFmt = m_pImpl->GetFootnoteFormat(); if(pFmt) { const SwTxtFtn* pTxtFtn = pFmt->GetTxtFtn(); if( pTxtFtn ) - pSttNd = pTxtFtn->GetStartNode()->GetNode().GetStartNode(); + { + return pTxtFtn->GetStartNode()->GetNode().GetStartNode(); + } } - return pSttNd; + return 0; } uno::Reference< text::XTextCursor > @@ -380,144 +524,119 @@ SwXFootnote::CreateCursor() throw (uno::RuntimeException) { return createTextCursor(); } + /*-- 10.12.98 15:31:50--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextCursor > SwXFootnote::createTextCursor(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextCursor > SAL_CALL +SwXFootnote::createTextCursor() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextCursor > aRef; - const SwFmtFtn* pFmt = FindFmt(); - if(pFmt) - { - const SwTxtFtn* pTxtFtn = pFmt->GetTxtFtn(); - SwPosition aPos( *pTxtFtn->GetStartNode() ); - SwXTextCursor *const pXCursor = - new SwXTextCursor(*GetDoc(), this, CURSOR_FOOTNOTE, aPos); - aRef = static_cast(pXCursor); - SwUnoCrsr *const pUnoCrsr = pXCursor->GetCursor(); - pUnoCrsr->Move(fnMoveForward, fnGoNode); - } - else - throw uno::RuntimeException(); - return aRef; + + SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() ); + + SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn(); + SwPosition aPos( *pTxtFtn->GetStartNode() ); + SwXTextCursor *const pXCursor = + new SwXTextCursor(*GetDoc(), this, CURSOR_FOOTNOTE, aPos); + SwUnoCrsr *const pUnoCrsr = pXCursor->GetCursor(); + pUnoCrsr->Move(fnMoveForward, fnGoNode); + const uno::Reference< text::XTextCursor > xRet = + static_cast(pXCursor); + return xRet; } + /*-- 10.12.98 15:31:51--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextCursor > SwXFootnote::createTextCursorByRange( - const uno::Reference< text::XTextRange > & aTextPosition) - throw( uno::RuntimeException ) +uno::Reference< text::XTextCursor > SAL_CALL +SwXFootnote::createTextCursorByRange( + const uno::Reference< text::XTextRange > & xTextPosition) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - const SwFmtFtn* pFmt = FindFmt(); - if( !pFmt ) - throw uno::RuntimeException(); - uno::Reference< text::XTextCursor > aRef; + + SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() ); + SwUnoInternalPaM aPam(*GetDoc()); - if (::sw::XTextRangeToSwPaM(aPam, aTextPosition)) + if (!::sw::XTextRangeToSwPaM(aPam, xTextPosition)) { - const SwTxtFtn* pTxtFtn = pFmt->GetTxtFtn(); - const SwNode* pFtnStartNode = &pTxtFtn->GetStartNode()->GetNode(); + throw uno::RuntimeException(); + } - const SwNode* pStart = aPam.GetNode()->FindFootnoteStartNode(); - if( pStart != pFtnStartNode ) - throw uno::RuntimeException(); + SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn(); + SwNode const*const pFtnStartNode = &pTxtFtn->GetStartNode()->GetNode(); - aRef = static_cast( + const SwNode* pStart = aPam.GetNode()->FindFootnoteStartNode(); + if (pStart != pFtnStartNode) + { + throw uno::RuntimeException(); + } + + const uno::Reference< text::XTextCursor > xRet = + static_cast( new SwXTextCursor(*GetDoc(), this, CURSOR_FOOTNOTE, *aPam.GetPoint(), aPam.GetMark())); - } - else - throw uno::RuntimeException(); - return aRef; + return xRet; } + /*-- 13.06.00 14:28:23--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< container::XEnumeration > SwXFootnote::createEnumeration() throw( uno::RuntimeException ) +uno::Reference< container::XEnumeration > SAL_CALL +SwXFootnote::createEnumeration() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< container::XEnumeration > aRef; - const SwFmtFtn* pFmt = FindFmt(); - if(pFmt) - { - const SwTxtFtn* pTxtFtn = pFmt->GetTxtFtn(); - SwPosition aPos( *pTxtFtn->GetStartNode() ); - ::std::auto_ptr pUnoCursor( - GetDoc()->CreateUnoCrsr(aPos, sal_False)); - pUnoCursor->Move(fnMoveForward, fnGoNode); - aRef = new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_FOOTNOTE); - } - return aRef; + + SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() ); + + SwTxtFtn const*const pTxtFtn = rFmt.GetTxtFtn(); + SwPosition aPos( *pTxtFtn->GetStartNode() ); + ::std::auto_ptr pUnoCursor( + GetDoc()->CreateUnoCrsr(aPos, sal_False)); + pUnoCursor->Move(fnMoveForward, fnGoNode); + const uno::Reference< container::XEnumeration > xRet = + new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_FOOTNOTE); + return xRet; } + /*-- 13.06.00 14:28:24--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Type SwXFootnote::getElementType( ) throw(uno::RuntimeException) +uno::Type SAL_CALL SwXFootnote::getElementType() throw (uno::RuntimeException) { - return ::getCppuType(static_cast*>(0)); + return text::XTextRange::static_type(); } /*-- 13.06.00 14:28:24--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXFootnote::hasElements( ) throw(uno::RuntimeException) +sal_Bool SAL_CALL SwXFootnote::hasElements() throw (uno::RuntimeException) { return sal_True; } -/* -----------------------------07.01.00 12:39-------------------------------- - ---------------------------------------------------------------------------*/ -void SwXFootnote::Invalidate() -{ - if(GetRegisteredIn()) - { - ((SwModify*)GetRegisteredIn())->Remove(this); - pFmtFtn = 0; - aLstnrCntnr.Disposing(); - SetDoc(0); - } -} -/* -----------------18.01.99 09:12------------------- - * - * --------------------------------------------------*/ -void SwXFootnote::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew) -{ - switch( pOld ? pOld->Which() : 0 ) - { - case RES_REMOVE_UNO_OBJECT: - case RES_OBJECTDYING: - if( (void*)GetRegisteredIn() == ((SwPtrMsgPoolItem *)pOld)->pObject ) - Invalidate(); - break; - case RES_FMT_CHG: - // wurden wir an das neue umgehaengt und wird das alte geloscht? - if( ((SwFmtChg*)pNew)->pChangedFmt == GetRegisteredIn() && - ((SwFmtChg*)pOld)->pChangedFmt->IsFmtInDTOR() ) - Invalidate(); - break; - case RES_FOOTNOTE_DELETED: - if( (void*)pFmtFtn == ((SwPtrMsgPoolItem *)pOld)->pObject ) - Invalidate(); - break; - } -} /*-- 11.09.00 13:12:03--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< beans::XPropertySetInfo > SwXFootnote::getPropertySetInfo( ) - throw(uno::RuntimeException) +uno::Reference< beans::XPropertySetInfo > SAL_CALL +SwXFootnote::getPropertySetInfo() +throw (uno::RuntimeException) { - static uno::Reference< beans::XPropertySetInfo > xRef = aSwMapProvider.GetPropertySet(PROPERTY_MAP_FOOTNOTE)->getPropertySetInfo(); - return xRef; + vos::OGuard g(Application::GetSolarMutex()); + static uno::Reference< beans::XPropertySetInfo > xRet = + aSwMapProvider.GetPropertySet(PROPERTY_MAP_FOOTNOTE) + ->getPropertySetInfo(); + return xRet; } + /*-- 11.09.00 13:12:04--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXFootnote::setPropertyValue( const ::rtl::OUString&, - const uno::Any& ) - throw(beans::UnknownPropertyException, beans::PropertyVetoException, - lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) +void SAL_CALL +SwXFootnote::setPropertyValue(const ::rtl::OUString&, const uno::Any&) +throw (beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException) { //no values to be set throw lang::IllegalArgumentException(); @@ -525,28 +644,34 @@ void SwXFootnote::setPropertyValue( const ::rtl::OUString&, /*-- 11.09.00 13:12:04--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXFootnote::getPropertyValue( const OUString& rPropertyName ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) +uno::Any SAL_CALL +SwXFootnote::getPropertyValue(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + uno::Any aRet; if (! ::sw::GetDefaultTextContentValue(aRet, rPropertyName)) { - if(rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_START_REDLINE))|| - rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_END_REDLINE))) + if (rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_START_REDLINE)) || + rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_END_REDLINE))) { //redline can only be returned if it's a living object - if(!m_bIsDescriptor) + if (!m_pImpl->m_bIsDescriptor) + { aRet = SwXText::getPropertyValue(rPropertyName); + } } - else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_REFERENCE_ID))) + else if (rPropertyName.equalsAsciiL( + SW_PROP_NAME(UNO_NAME_REFERENCE_ID))) { - const SwFmtFtn* pFmt = FindFmt(); - if(pFmt) + SwFmtFtn const*const pFmt = m_pImpl->GetFootnoteFormat(); + if (pFmt) { - const SwTxtFtn* pTxtFtn = pFmt->GetTxtFtn(); + SwTxtFtn const*const pTxtFtn = pFmt->GetTxtFtn(); DBG_ASSERT(pTxtFtn, "no TextNode?"); - aRet <<= (sal_Int16)pTxtFtn->GetSeqRefNo(); + aRet <<= static_cast(pTxtFtn->GetSeqRefNo()); } } else @@ -558,37 +683,51 @@ uno::Any SwXFootnote::getPropertyValue( const OUString& rPropertyName ) } return aRet; } + /*-- 11.09.00 13:12:04--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXFootnote::addPropertyChangeListener( const OUString& /*aPropertyName*/, - const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) +void SAL_CALL +SwXFootnote::addPropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { + OSL_ENSURE(false, + "SwXFootnote::addPropertyChangeListener(): not implemented"); } -/*-- 11.09.00 13:12:04--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXFootnote::removePropertyChangeListener( const OUString& /*aPropertyName*/, - const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) +void SAL_CALL +SwXFootnote::removePropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { + OSL_ENSURE(false, + "SwXFootnote::removePropertyChangeListener(): not implemented"); } -/*-- 11.09.00 13:12:04--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXFootnote::addVetoableChangeListener( const OUString& /*PropertyName*/, - const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) +void SAL_CALL +SwXFootnote::addVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { + OSL_ENSURE(false, + "SwXFootnote::addVetoableChangeListener(): not implemented"); } -/*-- 11.09.00 13:12:05--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXFootnote::removeVetoableChangeListener( const OUString& /*PropertyName*/, - const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) +void SAL_CALL +SwXFootnote::removeVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { + OSL_ENSURE(false, + "SwXFootnote::removeVetoableChangeListener(): not implemented"); } - diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 95a027f8a6..62ae8053e1 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1344,13 +1344,7 @@ CreateParentXText(SwDoc & rDoc, const SwPosition& rPos) if (pSttNode == pTxtFtn->GetStartNode()->GetNode(). FindSttNodeByType(SwFootnoteStartNode)) { - xParentText = - static_cast(rDoc.GetUnoCallBack())-> - GetFootnote(rFtn); - if (!xParentText.is()) - { - xParentText = new SwXFootnote(&rDoc, rFtn); - } + xParentText = SwXFootnote::CreateXFootnote(rDoc, rFtn); break; } } -- cgit v1.2.3 From 4c09fd99f3b4df3e7adfad9ea81bbddd74d8a867 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:58 +0100 Subject: swunolocking1: #i105557#: fix locking for SwXDocumentIndex: add Impl struct, and use UnoImplPtr to lock destructor. move all implementation details out of header, into Impl struct. replace broken SwClient iteration with a WeakReference in SwFrmFmt. make constructor private, and add factory function CreateXDocumentIndex. use new XUnoTunnel helpers. clean up the implementation a little. remove SwXDocumentIndexes::GetObject(). --- sw/inc/unoidx.hxx | 199 ++-- sw/source/core/unocore/unocrsrhelper.cxx | 8 +- sw/source/core/unocore/unoidx.cxx | 1681 +++++++++++++++++------------- sw/source/core/unocore/unosect.cxx | 3 +- 4 files changed, 1083 insertions(+), 808 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unoidx.hxx b/sw/inc/unoidx.hxx index b9a321f87b..3ea515cf11 100644 --- a/sw/inc/unoidx.hxx +++ b/sw/inc/unoidx.hxx @@ -53,101 +53,143 @@ class SwTOXType; /* -----------------07.12.98 10:08------------------- * * --------------------------------------------------*/ -class SwDocIdxProperties_Impl; class SwXIndexStyleAccess_Impl; class SwXIndexTokenAccess_Impl; -class SwXDocumentIndex : public cppu::WeakImplHelper5 -< - ::com::sun::star::text::XDocumentIndex, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::container::XNamed, - ::com::sun::star::lang::XUnoTunnel ->, - public SwClient -{ - friend class SwXIndexStyleAccess_Impl; - friend class SwXIndexTokenAccess_Impl; - - SwEventListenerContainer aLstnrCntnr; - const SfxItemPropertySet* m_pPropSet; - SwDoc* m_pDoc; - const SwTOXBaseSection* pBase; - TOXTypes eTOXType; - - //Descriptor-Interface - sal_Bool bIsDescriptor; - SwDocIdxProperties_Impl* pProps; +typedef ::cppu::WeakImplHelper5 +< ::com::sun::star::lang::XUnoTunnel +, ::com::sun::star::lang::XServiceInfo +, ::com::sun::star::beans::XPropertySet +, ::com::sun::star::container::XNamed +, ::com::sun::star::text::XDocumentIndex +> SwXDocumentIndex_Base; - SwXIndexStyleAccess_Impl* pStyleAccess; - SwXIndexTokenAccess_Impl* pTokenAccess; +class SwXDocumentIndex + : public SwXDocumentIndex_Base +{ - SwSectionFmt* GetFmt()const {return (SwSectionFmt*)GetRegisteredIn();} +private: - sal_Bool IsDescriptor() const {return bIsDescriptor;} - const SwDocIdxProperties_Impl* GetProperties_Impl() const { return pProps;} - SwDocIdxProperties_Impl* GetProperties_Impl() { return pProps;} - TOXTypes GetTOXType() const {return eTOXType;} + friend class SwXIndexStyleAccess_Impl; + friend class SwXIndexTokenAccess_Impl; - SwXIndexStyleAccess_Impl* GetStyleAccess() const {return pStyleAccess;} - void SetStyleAccess(SwXIndexStyleAccess_Impl* pSet) - {pStyleAccess = pSet;} + class Impl; + ::sw::UnoImplPtr m_pImpl; - SwXIndexTokenAccess_Impl* GetTokenAccess() const {return pTokenAccess;} - void SetTokenAccess(SwXIndexTokenAccess_Impl* pSet) - {pTokenAccess = pSet;} -protected: virtual ~SwXDocumentIndex(); -public: - SwXDocumentIndex(const SwTOXBaseSection* = 0, SwDoc* = 0); - //Descriptor-Ctor - SwXDocumentIndex(TOXTypes eToxType, SwDoc& rDoc); - - - TYPEINFO(); - - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - - //XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); - //XDocumentIndex - virtual ::rtl::OUString SAL_CALL getServiceName( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL update( ) throw(::com::sun::star::uno::RuntimeException); + SwXDocumentIndex(SwTOXBaseSection const&, SwDoc &); - //XPropertySet - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //XTextContent - virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException ); +public: - //XComponent - virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + /// descriptor + SwXDocumentIndex(const TOXTypes eToxType, SwDoc& rDoc); - //XNamed - virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException ); + static ::com::sun::star::uno::Reference< + ::com::sun::star::text::XDocumentIndex> + CreateXDocumentIndex(SwDoc & rDoc, SwTOXBaseSection const& rSection); - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - //SwClient - virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + // XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( + const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier) + throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( + const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // XComponent + virtual void SAL_CALL dispose() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener) + throw (::com::sun::star::uno::RuntimeException); + + // XPropertySet + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Any& rValue) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // XNamed + virtual ::rtl::OUString SAL_CALL getName() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setName(const ::rtl::OUString& rName) + throw (::com::sun::star::uno::RuntimeException); + + // XTextContent + virtual void SAL_CALL attach( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextRange) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL getAnchor() + throw (::com::sun::star::uno::RuntimeException); + + + // XDocumentIndex + virtual ::rtl::OUString SAL_CALL getServiceName() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL update() + throw (::com::sun::star::uno::RuntimeException); - void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); }; + /* -----------------07.12.98 10:08------------------- * * --------------------------------------------------*/ @@ -274,7 +316,6 @@ public: virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - static SwXDocumentIndex* GetObject(const SwTOXBaseSection* pTOX); }; /* -----------------13.09.99 16:39------------------- diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 76c28f8d22..739378f3fb 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -69,6 +69,7 @@ #include #include #include +#include #include #include #include @@ -331,9 +332,10 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry { if( pAny ) { - uno::Reference< XDocumentIndex > aRef = - SwXDocumentIndexes::GetObject((SwTOXBaseSection*)pBase); - pAny->setValue(&aRef, ::getCppuType((uno::Reference*)0)); + const uno::Reference< text::XDocumentIndex > xRef = + SwXDocumentIndex::CreateXDocumentIndex(*rPam.GetDoc(), + *static_cast(pBase)); + (*pAny) <<= xRef; } } else diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index f89fb5a25b..3aef38b685 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -31,19 +31,19 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include - -#include -#include -#include -#include -#include #include #include #include #include #include #include + +#include +#include +#include +#include + +#include #include #include #include @@ -59,6 +59,7 @@ #include #include #include +#include #include #include #include @@ -74,36 +75,61 @@ using namespace ::com::sun::star; using ::rtl::OUString; //----------------------------------------------------------------------------- -String lcl_AnyToString(uno::Any rVal) throw(lang::IllegalArgumentException) +static String +lcl_AnyToString(uno::Any const& rVal) throw (lang::IllegalArgumentException) { OUString sRet; if(!(rVal >>= sRet)) + { throw lang::IllegalArgumentException(); + } return sRet; } //----------------------------------------------------------------------------- -sal_Int16 lcl_AnyToInt16(uno::Any rVal) throw(lang::IllegalArgumentException) +static sal_Int16 +lcl_AnyToInt16(uno::Any const& rVal) throw (lang::IllegalArgumentException) { sal_Int16 nRet = 0; if(!(rVal >>= nRet)) + { throw lang::IllegalArgumentException(); + } return nRet; } //----------------------------------------------------------------------------- -sal_Bool lcl_AnyToBool(uno::Any rVal) throw(lang::IllegalArgumentException) +static sal_Bool +lcl_AnyToBool(uno::Any const& rVal) throw (lang::IllegalArgumentException) { sal_Bool bRet = sal_False; if(!(rVal >>= bRet)) + { throw lang::IllegalArgumentException(); + } return bRet; } -/****************************************************************************** - * - ******************************************************************************/ + +static void +lcl_AnyToBitMask(uno::Any const& rValue, + sal_uInt16 & rBitMask, const sal_uInt16 nBit) +throw (lang::IllegalArgumentException) +{ + rBitMask = lcl_AnyToBool(rValue) + ? (rBitMask | nBit) + : (rBitMask & ~nBit); +} +static void +lcl_BitMaskToAny(uno::Any & o_rValue, + const sal_uInt16 nBitMask, const sal_uInt16 nBit) +{ + const sal_Bool bRet = 0 != (nBitMask & nBit); + o_rValue <<= bRet; +} + //----------------------------------------------------------------------------- -void lcl_ReAssignTOXType(SwDoc* pDoc, SwTOXBase& rTOXBase, const OUString& rNewName) +static void +lcl_ReAssignTOXType(SwDoc* pDoc, SwTOXBase& rTOXBase, const OUString& rNewName) { - sal_uInt16 nUserCount = pDoc->GetTOXTypeCount( TOX_USER ); + const sal_uInt16 nUserCount = pDoc->GetTOXTypeCount( TOX_USER ); const SwTOXType* pNewType = 0; for(sal_uInt16 nUser = 0; nUser < nUserCount; nUser++) { @@ -133,14 +159,19 @@ void lcl_ConvertTOUNameToProgrammaticName(OUString& rTmp) ShellResource* pShellRes = ViewShell::GetShellRes(); if(rTmp.equals(pShellRes->aTOXUserName)) + { rTmp = OUString(C2U(cUserDefined)); - //if the version is not English but the alternative index's name is "User-Defined" - //a " (user)" is appended + } + // if the version is not English but the alternative index's name is + // "User-Defined" a " (user)" is appended else if(rTmp.equalsAscii(cUserDefined)) + { rTmp += C2U(cUserSuffix); + } } //----------------------------------------------------------------------------- -void lcl_ConvertTOUNameToUserName(OUString& rTmp) +static void +lcl_ConvertTOUNameToUserName(OUString& rTmp) { ShellResource* pShellRes = ViewShell::GetShellRes(); if(rTmp.equalsAscii(cUserDefined)) @@ -150,43 +181,189 @@ void lcl_ConvertTOUNameToUserName(OUString& rTmp) else if(!pShellRes->aTOXUserName.EqualsAscii(cUserDefined) && USER_AND_SUFFIXLEN == rTmp.getLength()) { - String sToChange(rTmp); //make sure that in non-English versions the " (user)" suffix is removed - if(!sToChange.SearchAscii(cUserDefined) && USER_LEN == sToChange.SearchAscii(cUserSuffix)) + if (rTmp.matchAsciiL(cUserDefined, sizeof(cUserDefined)) && + rTmp.matchAsciiL(cUserSuffix, sizeof(cUserSuffix), USER_LEN)) + { rTmp = C2U(cUserDefined); + } } } /****************************************************************** * SwXDocumentIndex ******************************************************************/ + /* -----------------20.06.98 11:06------------------- * * --------------------------------------------------*/ -class SwDocIdxProperties_Impl +class SwDocIndexDescriptorProperties_Impl { - SwTOXBase* pTOXBase; - OUString sUserTOXTypeName; +private: + ::std::auto_ptr m_pTOXBase; + OUString m_sUserTOXTypeName; + public: - SwTOXBase& GetTOXBase() {return *pTOXBase;} - SwDocIdxProperties_Impl(const SwTOXType* pType); - ~SwDocIdxProperties_Impl(){delete pTOXBase;} + SwDocIndexDescriptorProperties_Impl(SwTOXType const*const pType); - const OUString& GetTypeName()const {return sUserTOXTypeName;} - void SetTypeName(const OUString& rSet) {sUserTOXTypeName = rSet;} + SwTOXBase & GetTOXBase() { return *m_pTOXBase; } + const OUString& GetTypeName() const { return m_sUserTOXTypeName; } + void SetTypeName(const OUString& rSet) { m_sUserTOXTypeName = rSet; } }; /* -----------------20.06.98 11:41------------------- * * --------------------------------------------------*/ -SwDocIdxProperties_Impl::SwDocIdxProperties_Impl(const SwTOXType* pType) +SwDocIndexDescriptorProperties_Impl::SwDocIndexDescriptorProperties_Impl( + SwTOXType const*const pType) { SwForm aForm(pType->GetType()); - pTOXBase = new SwTOXBase(pType, aForm, - nsSwTOXElement::TOX_MARK, pType->GetTypeName()); + m_pTOXBase.reset(new SwTOXBase(pType, aForm, + nsSwTOXElement::TOX_MARK, pType->GetTypeName())); if(pType->GetType() == TOX_CONTENT || pType->GetType() == TOX_USER) - pTOXBase->SetLevel(MAXLEVEL); - sUserTOXTypeName = pType->GetTypeName(); + { + m_pTOXBase->SetLevel(MAXLEVEL); + } + m_sUserTOXTypeName = pType->GetTypeName(); +} + +static sal_uInt16 +lcl_TypeToPropertyMap(const TOXTypes eType) +{ + switch (eType) + { + case TOX_INDEX: return PROPERTY_MAP_INDEX_IDX; + case TOX_CONTENT: return PROPERTY_MAP_INDEX_CNTNT; + case TOX_TABLES: return PROPERTY_MAP_INDEX_TABLES; + case TOX_ILLUSTRATIONS: return PROPERTY_MAP_INDEX_ILLUSTRATIONS; + case TOX_OBJECTS: return PROPERTY_MAP_INDEX_OBJECTS; + case TOX_AUTHORITIES: return PROPERTY_MAP_BIBLIOGRAPHY; + //case TOX_USER: + default: + return PROPERTY_MAP_INDEX_USER; + } +} + +class SwXDocumentIndex::Impl + : public SwClient +{ + +public: + + SfxItemPropertySet const& m_rPropSet; + const TOXTypes m_eTOXType; + SwEventListenerContainer m_ListenerContainer; + bool m_bIsDescriptor; + SwDoc * m_pDoc; + ::std::auto_ptr m_pProps; + uno::WeakReference m_wStyleAccess; + uno::WeakReference m_wTokenAccess; + + Impl( SwXDocumentIndex & rThis, + SwDoc & rDoc, + const TOXTypes eType, + SwTOXBaseSection const*const pBaseSection) + : SwClient((pBaseSection) ? pBaseSection->GetFmt() : 0) + , m_rPropSet( + *aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap(eType))) + , m_eTOXType(eType) + , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) + , m_bIsDescriptor(0 == pBaseSection) + , m_pDoc(&rDoc) + , m_pProps((m_bIsDescriptor) + ? new SwDocIndexDescriptorProperties_Impl(rDoc.GetTOXType(eType, 0)) + : 0) + { + } + + SwSectionFmt * GetSectionFmt() const { + return static_cast( + const_cast(GetRegisteredIn())); + } + + SwTOXBase & GetTOXSectionOrThrow() const + { + SwSectionFmt *const pSectionFmt(GetSectionFmt()); + SwTOXBase *const pTOXSection( (m_bIsDescriptor) + ? &m_pProps->GetTOXBase() + : ((pSectionFmt) + ? static_cast(pSectionFmt->GetSection()) + : 0)); + if (!pTOXSection) + { + throw uno::RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( + "SwXDocumentIndex: disposed or invalid")), 0); + } + return *pTOXSection; + } + + sal_Int32 GetFormMax() const + { + SwTOXBase & rSection( GetTOXSectionOrThrow() ); + return (m_bIsDescriptor) + ? SwForm::GetFormMaxLevel(m_eTOXType) + : rSection.GetTOXForm().GetFormMax(); + } + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + +}; + +/*-- 14.12.98 09:35:07--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void SwXDocumentIndex::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) +{ + ClientModify(this, pOld, pNew); + + if (!GetRegisteredIn()) + { + m_ListenerContainer.Disposing(); + } +} + +/*-- 14.12.98 09:35:03--------------------------------------------------- + + -----------------------------------------------------------------------*/ +SwXDocumentIndex::SwXDocumentIndex( + SwTOXBaseSection const& rBaseSection, SwDoc & rDoc) + : m_pImpl( new SwXDocumentIndex::Impl( *this, + rDoc, rBaseSection.SwTOXBase::GetType(), & rBaseSection) ) +{ +} +/* -----------------15.01.99 14:59------------------- + * + * --------------------------------------------------*/ +SwXDocumentIndex::SwXDocumentIndex(const TOXTypes eType, SwDoc& rDoc) + : m_pImpl( new SwXDocumentIndex::Impl( *this, rDoc, eType, 0) ) +{ +} + +/*-- 14.12.98 09:35:04--------------------------------------------------- + + -----------------------------------------------------------------------*/ +SwXDocumentIndex::~SwXDocumentIndex() +{ } + +uno::Reference +SwXDocumentIndex::CreateXDocumentIndex( + SwDoc & rDoc, SwTOXBaseSection const& rSection) +{ + // re-use existing SwXDocumentIndex + // #i105557#: do not iterate over the registered clients: race condition + SwSectionFmt *const pFmt = rSection.GetFmt(); + uno::Reference xIndex(pFmt->GetXObject(), + uno::UNO_QUERY); + if (!xIndex.is()) + { + SwXDocumentIndex *const pIndex(new SwXDocumentIndex(rSection, rDoc)); + xIndex.set(pIndex); + pFmt->SetXObject(uno::Reference(xIndex)); + } + return xIndex; +} + /* -----------------------------10.03.00 18:02-------------------------------- ---------------------------------------------------------------------------*/ @@ -198,505 +375,530 @@ const uno::Sequence< sal_Int8 > & SwXDocumentIndex::getUnoTunnelId() /* -----------------------------10.03.00 18:04-------------------------------- ---------------------------------------------------------------------------*/ -sal_Int64 SAL_CALL SwXDocumentIndex::getSomething( const uno::Sequence< sal_Int8 >& rId ) - throw(uno::RuntimeException) +sal_Int64 SAL_CALL +SwXDocumentIndex::getSomething(const uno::Sequence< sal_Int8 >& rId) +throw (uno::RuntimeException) { - if( rId.getLength() == 16 - && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16 ) ) - { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); - } - return 0; + return ::sw::UnoTunnelImpl(rId, this); } + /* -----------------------------06.04.00 15:01-------------------------------- ---------------------------------------------------------------------------*/ -OUString SwXDocumentIndex::getImplementationName(void) throw( uno::RuntimeException ) +OUString SAL_CALL +SwXDocumentIndex::getImplementationName() throw (uno::RuntimeException) { return C2U("SwXDocumentIndex"); } /* -----------------------------06.04.00 15:01-------------------------------- ---------------------------------------------------------------------------*/ -BOOL SwXDocumentIndex::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) -{ - return C2U("com.sun.star.text.BaseIndex") == rServiceName || - ( TOX_INDEX == eTOXType && C2U("com.sun.star.text.DocumentIndex") == rServiceName) || - ( TOX_CONTENT == eTOXType && C2U("com.sun.star.text.ContentIndex") == rServiceName) || - ( TOX_USER == eTOXType && C2U("com.sun.star.text.UserDefinedIndex") == rServiceName) || - ( TOX_ILLUSTRATIONS == eTOXType && C2U("com.sun.star.text.IllustrationsIndex") == rServiceName) || - ( TOX_TABLES == eTOXType && C2U("com.sun.star.text.TableIndex") == rServiceName) || - ( TOX_OBJECTS == eTOXType && C2U("com.sun.star.text.ObjectIndex") == rServiceName) || - ( TOX_AUTHORITIES == eTOXType && C2U("com.sun.star.text.Bibliography") == rServiceName); +sal_Bool SAL_CALL +SwXDocumentIndex::supportsService(const OUString& rServiceName) +throw (uno::RuntimeException) +{ + vos::OGuard g(Application::GetSolarMutex()); + + return C2U("com.sun.star.text.BaseIndex") == rServiceName + || ((TOX_INDEX == m_pImpl->m_eTOXType) && + rServiceName.equalsAscii("com.sun.star.text.DocumentIndex")) + || ((TOX_CONTENT == m_pImpl->m_eTOXType) && + rServiceName.equalsAscii("com.sun.star.text.ContentIndex")) + || ((TOX_USER == m_pImpl->m_eTOXType) && + rServiceName.equalsAscii("com.sun.star.text.UserDefinedIndex")) + || ((TOX_ILLUSTRATIONS == m_pImpl->m_eTOXType) && + rServiceName.equalsAscii("com.sun.star.text.IllustrationsIndex")) + || ((TOX_TABLES == m_pImpl->m_eTOXType) && + rServiceName.equalsAscii("com.sun.star.text.TableIndex")) + || ((TOX_OBJECTS == m_pImpl->m_eTOXType) && + rServiceName.equalsAscii("com.sun.star.text.ObjectIndex")) + || ((TOX_AUTHORITIES == m_pImpl->m_eTOXType) && + rServiceName.equalsAscii("com.sun.star.text.Bibliography")); } /* -----------------------------06.04.00 15:01-------------------------------- ---------------------------------------------------------------------------*/ -uno::Sequence< OUString > SwXDocumentIndex::getSupportedServiceNames(void) throw( uno::RuntimeException ) +uno::Sequence< OUString > SAL_CALL +SwXDocumentIndex::getSupportedServiceNames() throw (uno::RuntimeException) { + vos::OGuard g(Application::GetSolarMutex()); + uno::Sequence< OUString > aRet(2); OUString* pArray = aRet.getArray(); pArray[0] = C2U("com.sun.star.text.BaseIndex"); - switch( eTOXType ) - { - case TOX_INDEX: pArray[1] = C2U("com.sun.star.text.DocumentIndex");break; - case TOX_CONTENT: pArray[1] = C2U("com.sun.star.text.ContentIndex");break; - case TOX_TABLES: pArray[1] = C2U("com.sun.star.text.TableIndex");break; - case TOX_ILLUSTRATIONS: pArray[1] = C2U("com.sun.star.text.IllustrationsIndex");break; - case TOX_OBJECTS: pArray[1] = C2U("com.sun.star.text.ObjectIndex");break; - case TOX_AUTHORITIES : pArray[1] = C2U("com.sun.star.text.Bibliography");break; + switch (m_pImpl->m_eTOXType) + { + case TOX_INDEX: + pArray[1] = C2U("com.sun.star.text.DocumentIndex"); + break; + case TOX_CONTENT: + pArray[1] = C2U("com.sun.star.text.ContentIndex"); + break; + case TOX_TABLES: + pArray[1] = C2U("com.sun.star.text.TableIndex"); + break; + case TOX_ILLUSTRATIONS: + pArray[1] = C2U("com.sun.star.text.IllustrationsIndex"); + break; + case TOX_OBJECTS: + pArray[1] = C2U("com.sun.star.text.ObjectIndex"); + break; + case TOX_AUTHORITIES: + pArray[1] = C2U("com.sun.star.text.Bibliography"); + break; //case TOX_USER: default: pArray[1] = C2U("com.sun.star.text.UserDefinedIndex"); } return aRet; } -/*-- 14.12.98 09:35:03--------------------------------------------------- - -----------------------------------------------------------------------*/ -TYPEINIT1(SwXDocumentIndex, SwClient) -SwXDocumentIndex::SwXDocumentIndex(const SwTOXBaseSection* pB, SwDoc* pDc) : - aLstnrCntnr( (text::XTextContent*)this), - m_pPropSet(0), - m_pDoc(pDc), - pBase(pB), - eTOXType(TOX_USER), - bIsDescriptor(sal_False), - pProps(0), - pStyleAccess(0), - pTokenAccess(0) -{ - if(pBase && m_pDoc) - { - pBase->GetFmt()->Add(this); - sal_uInt16 PropertyId; - eTOXType = pBase->SwTOXBase::GetType(); - switch( eTOXType ) - { - case TOX_INDEX: PropertyId = PROPERTY_MAP_INDEX_IDX; break; - case TOX_CONTENT: PropertyId = PROPERTY_MAP_INDEX_CNTNT; break; - case TOX_TABLES: PropertyId = PROPERTY_MAP_INDEX_TABLES; break; - case TOX_ILLUSTRATIONS: PropertyId = PROPERTY_MAP_INDEX_ILLUSTRATIONS; break; - case TOX_OBJECTS: PropertyId = PROPERTY_MAP_INDEX_OBJECTS; break; - case TOX_AUTHORITIES : PropertyId = PROPERTY_MAP_BIBLIOGRAPHY; break; - //case TOX_USER: - default: - PropertyId = PROPERTY_MAP_INDEX_USER; - } - m_pPropSet = aSwMapProvider.GetPropertySet(PropertyId); - } -} -/* -----------------15.01.99 14:59------------------- - * - * --------------------------------------------------*/ -SwXDocumentIndex::SwXDocumentIndex(TOXTypes eType, SwDoc& rDoc) : - aLstnrCntnr( (text::XTextContent*)this), - m_pDoc(0), - pBase(0), - eTOXType(eType), - bIsDescriptor(sal_True), - pProps(new SwDocIdxProperties_Impl(rDoc.GetTOXType(eType, 0))), - pStyleAccess(0), - pTokenAccess(0) -{ - sal_uInt16 PropertyId; - switch(eType) - { - case TOX_INDEX: PropertyId = PROPERTY_MAP_INDEX_IDX; break; - case TOX_CONTENT: PropertyId = PROPERTY_MAP_INDEX_CNTNT; break; - case TOX_TABLES: PropertyId = PROPERTY_MAP_INDEX_TABLES; break; - case TOX_ILLUSTRATIONS: PropertyId = PROPERTY_MAP_INDEX_ILLUSTRATIONS; break; - case TOX_OBJECTS: PropertyId = PROPERTY_MAP_INDEX_OBJECTS; break; - case TOX_AUTHORITIES : PropertyId = PROPERTY_MAP_BIBLIOGRAPHY; break; - //case TOX_USER: - default: - PropertyId = PROPERTY_MAP_INDEX_USER; - } - m_pPropSet = aSwMapProvider.GetPropertySet(PropertyId); -} - -/*-- 14.12.98 09:35:04--------------------------------------------------- - - -----------------------------------------------------------------------*/ -SwXDocumentIndex::~SwXDocumentIndex() -{ - delete pProps; -} /*-- 14.12.98 09:35:05--------------------------------------------------- -----------------------------------------------------------------------*/ -OUString SwXDocumentIndex::getServiceName(void) throw( uno::RuntimeException ) +OUString SAL_CALL SwXDocumentIndex::getServiceName() +throw (uno::RuntimeException) { + vos::OGuard g(Application::GetSolarMutex()); + USHORT nObjectType = SW_SERVICE_TYPE_INDEX; - switch(eTOXType) + switch (m_pImpl->m_eTOXType) { // case TOX_INDEX: break; - case TOX_USER: nObjectType = SW_SERVICE_USER_INDEX;break; - case TOX_CONTENT: nObjectType = SW_SERVICE_CONTENT_INDEX;break; - case TOX_ILLUSTRATIONS: nObjectType = SW_SERVICE_INDEX_ILLUSTRATIONS;break; - case TOX_OBJECTS: nObjectType = SW_SERVICE_INDEX_OBJECTS;break; - case TOX_TABLES: nObjectType = SW_SERVICE_INDEX_TABLES;break; - case TOX_AUTHORITIES: nObjectType = SW_SERVICE_INDEX_BIBLIOGRAPHY;break; + case TOX_USER: nObjectType = SW_SERVICE_USER_INDEX; + break; + case TOX_CONTENT: nObjectType = SW_SERVICE_CONTENT_INDEX; + break; + case TOX_ILLUSTRATIONS: nObjectType = SW_SERVICE_INDEX_ILLUSTRATIONS; + break; + case TOX_OBJECTS: nObjectType = SW_SERVICE_INDEX_OBJECTS; + break; + case TOX_TABLES: nObjectType = SW_SERVICE_INDEX_TABLES; + break; + case TOX_AUTHORITIES: nObjectType = SW_SERVICE_INDEX_BIBLIOGRAPHY; + break; default: - ; + break; } return SwXServiceProvider::GetProviderName(nObjectType); } + /*-- 14.12.98 09:35:05--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXDocumentIndex::update(void) throw( uno::RuntimeException ) +void SAL_CALL SwXDocumentIndex::update() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwSectionFmt *pFmt = GetFmt(); - SwTOXBase* pTOXBase = pFmt ? (SwTOXBaseSection*)pFmt->GetSection() : 0; + + SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt(); + SwTOXBaseSection *const pTOXBase = (pFmt) ? + static_cast(pFmt->GetSection()) : 0; if(!pTOXBase) + { throw uno::RuntimeException(); - ((SwTOXBaseSection*)pTOXBase)->Update(); - // Seitennummern eintragen - ((SwTOXBaseSection*)pTOXBase)->UpdatePageNum(); + } + pTOXBase->Update(); + // page numbers + pTOXBase->UpdatePageNum(); } + /*-- 14.12.98 09:35:05--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< beans::XPropertySetInfo > SwXDocumentIndex::getPropertySetInfo(void) throw( uno::RuntimeException ) +uno::Reference< beans::XPropertySetInfo > SAL_CALL +SwXDocumentIndex::getPropertySetInfo() throw (uno::RuntimeException) { - uno::Reference< beans::XPropertySetInfo > aRef = m_pPropSet->getPropertySetInfo(); - return aRef; + vos::OGuard g(Application::GetSolarMutex()); + + const uno::Reference< beans::XPropertySetInfo > xRef = + m_pImpl->m_rPropSet.getPropertySetInfo(); + return xRef; } + /*-- 14.12.98 09:35:05--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXDocumentIndex::setPropertyValue(const OUString& rPropertyName, - const uno::Any& aValue) - throw( beans::UnknownPropertyException, beans::PropertyVetoException, - lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) +void SAL_CALL +SwXDocumentIndex::setPropertyValue( + const OUString& rPropertyName, const uno::Any& rValue) +throw (beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName(rPropertyName); + + SfxItemPropertySimpleEntry const*const pEntry = + m_pImpl->m_rPropSet.getPropertyMap()->getByName(rPropertyName); if (!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); - if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + { + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + rPropertyName, + static_cast(this)); + } + if (pEntry->nFlags & beans::PropertyAttribute::READONLY) + { + throw beans::PropertyVetoException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only: " )) + + rPropertyName, + static_cast(this)); + } - SwTOXBase* pTOXBase = 0; - if(GetFmt()) - pTOXBase = (SwTOXBaseSection*)GetFmt()->GetSection(); - else if(bIsDescriptor) - pTOXBase = &pProps->GetTOXBase(); - if(pTOXBase) + SwSectionFmt *const pSectionFmt(m_pImpl->GetSectionFmt()); + SwTOXBase & rTOXBase( m_pImpl->GetTOXSectionOrThrow() ); + + sal_uInt16 nCreate = rTOXBase.GetCreateType(); + sal_uInt16 nTOIOptions = 0; + sal_uInt16 nOLEOptions = rTOXBase.GetOLEOptions(); + const TOXTypes eTxBaseType = rTOXBase.GetTOXType()->GetType(); + if (eTxBaseType == TOX_INDEX) { - sal_uInt16 nCreate = pTOXBase->GetCreateType(); - sal_uInt16 nTOIOptions = 0; - sal_uInt16 nOLEOptions = pTOXBase->GetOLEOptions(); - TOXTypes eTxBaseType = pTOXBase->GetTOXType()->GetType(); - if( eTxBaseType == TOX_INDEX ) - nTOIOptions = pTOXBase->GetOptions(); - SwForm aForm(pTOXBase->GetTOXForm()); - sal_Bool bForm = sal_False; - SfxItemSet* pAttrSet = 0; - switch(pEntry->nWID) + nTOIOptions = rTOXBase.GetOptions(); + } + SwForm aForm(rTOXBase.GetTOXForm()); + sal_Bool bForm = sal_False; + switch (pEntry->nWID) + { + case WID_IDX_TITLE: { - case WID_IDX_TITLE : - { - OUString sNewName; - aValue >>= sNewName; - pTOXBase->SetTitle(sNewName); - } - break; - case WID_IDX_NAME: + OUString sNewName; + if (!(rValue >>= sNewName)) { - OUString sNewName; - aValue >>= sNewName; - pTOXBase->SetTOXName(sNewName); - } - break; - case WID_USER_IDX_NAME: - { - OUString sNewName; - aValue >>= sNewName; - lcl_ConvertTOUNameToUserName(sNewName); - DBG_ASSERT(TOX_USER == eTxBaseType, "tox type name can only be changed for user indexes"); - if(GetFmt()) - { - OUString sTmp = pTOXBase->GetTOXType()->GetTypeName(); - if(sTmp != sNewName) - { - lcl_ReAssignTOXType(GetFmt()->GetDoc(), *pTOXBase, sNewName); - } - } - else - pProps->SetTypeName(sNewName); + throw lang::IllegalArgumentException(); } - break; - case WID_IDX_LOCALE: + rTOXBase.SetTitle(sNewName); + } + break; + case WID_IDX_NAME: + { + OUString sNewName; + if (!(rValue >>= sNewName)) { - lang::Locale aLocale; - if(aValue>>= aLocale) - pTOXBase->SetLanguage(SvxLocaleToLanguage(aLocale)); - else - throw lang::IllegalArgumentException(); + throw lang::IllegalArgumentException(); } - break; - case WID_IDX_SORT_ALGORITHM: + rTOXBase.SetTOXName(sNewName); + } + break; + case WID_USER_IDX_NAME: + { + OUString sNewName; + if (!(rValue >>= sNewName)) { - OUString sTmp; - if(aValue >>= sTmp) - pTOXBase->SetSortAlgorithm(sTmp); - else - throw lang::IllegalArgumentException(); + throw lang::IllegalArgumentException(); } - break; - case WID_LEVEL : - pTOXBase->SetLevel(lcl_AnyToInt16(aValue)); - break; - case WID_CREATE_FROM_MARKS : - nCreate = lcl_AnyToBool(aValue) ? nCreate | nsSwTOXElement::TOX_MARK: nCreate & ~nsSwTOXElement::TOX_MARK; - break; - case WID_CREATE_FROM_OUTLINE : - nCreate = lcl_AnyToBool(aValue) ? nCreate | nsSwTOXElement::TOX_OUTLINELEVEL: nCreate & ~nsSwTOXElement::TOX_OUTLINELEVEL; - break; -// case WID_PARAGRAPH_STYLE_NAMES :DBG_ERROR("not implemented") -// break; - case WID_CREATE_FROM_CHAPTER : - pTOXBase->SetFromChapter(lcl_AnyToBool(aValue)); - break; - case WID_CREATE_FROM_LABELS : - pTOXBase->SetFromObjectNames(! lcl_AnyToBool(aValue)); - break; - case WID_PROTECTED : + lcl_ConvertTOUNameToUserName(sNewName); + DBG_ASSERT(TOX_USER == eTxBaseType, + "tox type name can only be changed for user indexes"); + if (pSectionFmt) { - sal_Bool bSet = lcl_AnyToBool(aValue); - pTOXBase->SetProtected(bSet); - if(GetFmt()) - ((SwTOXBaseSection*)pTOXBase)->SetProtect(bSet); + OUString sTmp = rTOXBase.GetTOXType()->GetTypeName(); + if (sTmp != sNewName) + { + lcl_ReAssignTOXType(pSectionFmt->GetDoc(), + rTOXBase, sNewName); + } } - break; - case WID_USE_ALPHABETICAL_SEPARATORS: - nTOIOptions = lcl_AnyToBool(aValue) ? - nTOIOptions | nsSwTOIOptions::TOI_ALPHA_DELIMITTER : nTOIOptions & ~nsSwTOIOptions::TOI_ALPHA_DELIMITTER; - break; - case WID_USE_KEY_AS_ENTRY : - nTOIOptions = lcl_AnyToBool(aValue) ? - nTOIOptions | nsSwTOIOptions::TOI_KEY_AS_ENTRY : nTOIOptions & ~nsSwTOIOptions::TOI_KEY_AS_ENTRY; - break; - case WID_USE_COMBINED_ENTRIES : - nTOIOptions = lcl_AnyToBool(aValue) ? - nTOIOptions | nsSwTOIOptions::TOI_SAME_ENTRY : nTOIOptions & ~nsSwTOIOptions::TOI_SAME_ENTRY; - break; - case WID_IS_CASE_SENSITIVE : - nTOIOptions = lcl_AnyToBool(aValue) ? - nTOIOptions | nsSwTOIOptions::TOI_CASE_SENSITIVE : nTOIOptions & ~nsSwTOIOptions::TOI_CASE_SENSITIVE; - break; - case WID_USE_P_P : - nTOIOptions = lcl_AnyToBool(aValue) ? - nTOIOptions | nsSwTOIOptions::TOI_FF : nTOIOptions & ~nsSwTOIOptions::TOI_FF; - break; - case WID_USE_DASH : - nTOIOptions = lcl_AnyToBool(aValue) ? - nTOIOptions | nsSwTOIOptions::TOI_DASH : nTOIOptions & ~nsSwTOIOptions::TOI_DASH; - break; - case WID_USE_UPPER_CASE : - nTOIOptions = lcl_AnyToBool(aValue) ? - nTOIOptions | nsSwTOIOptions::TOI_INITIAL_CAPS : nTOIOptions & ~nsSwTOIOptions::TOI_INITIAL_CAPS; - break; - case WID_IS_COMMA_SEPARATED : - bForm = sal_True; - aForm.SetCommaSeparated(lcl_AnyToBool(aValue)); - break; - case WID_LABEL_CATEGORY : + else { - // convert file-format/API/external programmatic english name - // to internal UI name before usage - String aName( SwStyleNameMapper::GetSpecialExtraUIName( - lcl_AnyToString(aValue) ) ); - pTOXBase->SetSequenceName( aName ); + m_pImpl->m_pProps->SetTypeName(sNewName); } - break; - case WID_LABEL_DISPLAY_TYPE : + } + break; + case WID_IDX_LOCALE: + { + lang::Locale aLocale; + if (!(rValue>>= aLocale)) { - sal_Int16 nVal = lcl_AnyToInt16(aValue); - sal_uInt16 nSet = CAPTION_COMPLETE; - switch (nVal) - { - case text::ReferenceFieldPart::TEXT: nSet = CAPTION_COMPLETE; - break; - case text::ReferenceFieldPart::CATEGORY_AND_NUMBER : nSet = CAPTION_NUMBER; - break; - case text::ReferenceFieldPart::ONLY_CAPTION : nSet = CAPTION_TEXT; - break; - default: - throw lang::IllegalArgumentException(); - } - pTOXBase->SetCaptionDisplay((SwCaptionDisplay)nSet); + throw lang::IllegalArgumentException(); } - break; - case WID_USE_LEVEL_FROM_SOURCE : - pTOXBase->SetLevelFromChapter(lcl_AnyToBool(aValue)); - break; - case WID_MAIN_ENTRY_CHARACTER_STYLE_NAME : + rTOXBase.SetLanguage(SvxLocaleToLanguage(aLocale)); + } + break; + case WID_IDX_SORT_ALGORITHM: + { + OUString sTmp; + if (!(rValue >>= sTmp)) { - String aString; - SwStyleNameMapper::FillUIName(lcl_AnyToString(aValue), aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, sal_True); - pTOXBase->SetMainEntryCharStyle( aString ); + throw lang::IllegalArgumentException(); } - break; - case WID_CREATE_FROM_TABLES : - nCreate = lcl_AnyToBool(aValue) ? nCreate | nsSwTOXElement::TOX_TABLE : nCreate & ~nsSwTOXElement::TOX_TABLE; - break; - case WID_CREATE_FROM_TEXT_FRAMES : - nCreate = lcl_AnyToBool(aValue) ? nCreate | nsSwTOXElement::TOX_FRAME : nCreate & ~nsSwTOXElement::TOX_FRAME; - break; - case WID_CREATE_FROM_GRAPHIC_OBJECTS : - nCreate = lcl_AnyToBool(aValue) ? nCreate | nsSwTOXElement::TOX_GRAPHIC : nCreate & ~nsSwTOXElement::TOX_GRAPHIC; - break; - case WID_CREATE_FROM_EMBEDDED_OBJECTS : - if(lcl_AnyToBool(aValue)) - nCreate |= nsSwTOXElement::TOX_OLE; - else - nCreate &= ~nsSwTOXElement::TOX_OLE; - break; - case WID_CREATE_FROM_STAR_MATH: - nOLEOptions = lcl_AnyToBool(aValue) ? nOLEOptions | nsSwTOOElements::TOO_MATH : nOLEOptions & ~nsSwTOOElements::TOO_MATH; - break; - case WID_CREATE_FROM_STAR_CHART : - nOLEOptions = lcl_AnyToBool(aValue) ? nOLEOptions | nsSwTOOElements::TOO_CHART : nOLEOptions & ~nsSwTOOElements::TOO_CHART; - break; - case WID_CREATE_FROM_STAR_CALC : - nOLEOptions = lcl_AnyToBool(aValue) ? nOLEOptions | nsSwTOOElements::TOO_CALC : nOLEOptions & ~nsSwTOOElements::TOO_CALC; - break; - case WID_CREATE_FROM_STAR_DRAW : - nOLEOptions = lcl_AnyToBool(aValue) ? nOLEOptions | nsSwTOOElements::TOO_DRAW_IMPRESS : nOLEOptions & ~nsSwTOOElements::TOO_DRAW_IMPRESS; - break; - case WID_CREATE_FROM_OTHER_EMBEDDED_OBJECTS: - nOLEOptions = lcl_AnyToBool(aValue) ? nOLEOptions | nsSwTOOElements::TOO_OTHER : nOLEOptions & ~nsSwTOOElements::TOO_OTHER; - break; - case WID_PARA_HEAD : + rTOXBase.SetSortAlgorithm(sTmp); + } + break; + case WID_LEVEL: + { + rTOXBase.SetLevel(lcl_AnyToInt16(rValue)); + } + break; + case WID_CREATE_FROM_MARKS: + lcl_AnyToBitMask(rValue, nCreate, nsSwTOXElement::TOX_MARK); + break; + case WID_CREATE_FROM_OUTLINE: + lcl_AnyToBitMask(rValue, nCreate, nsSwTOXElement::TOX_OUTLINELEVEL); + break; +// case WID_PARAGRAPH_STYLE_NAMES :DBG_ERROR("not implemented") +// break; + case WID_CREATE_FROM_CHAPTER: + rTOXBase.SetFromChapter(lcl_AnyToBool(rValue)); + break; + case WID_CREATE_FROM_LABELS: + rTOXBase.SetFromObjectNames(! lcl_AnyToBool(rValue)); + break; + case WID_PROTECTED: + { + sal_Bool bSet = lcl_AnyToBool(rValue); + rTOXBase.SetProtected(bSet); + if (pSectionFmt) { - String aString; - SwStyleNameMapper::FillUIName( lcl_AnyToString(aValue), aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True); - bForm = sal_True; - //Header steht an Pos 0 - aForm.SetTemplate( 0, aString ); + static_cast(rTOXBase).SetProtect(bSet); } - break; - case WID_IS_RELATIVE_TABSTOPS: - bForm = sal_True; - aForm.SetRelTabPos(lcl_AnyToBool(aValue)); - break; - case WID_PARA_SEP : + } + break; + case WID_USE_ALPHABETICAL_SEPARATORS: + lcl_AnyToBitMask(rValue, nTOIOptions, + nsSwTOIOptions::TOI_ALPHA_DELIMITTER); + break; + case WID_USE_KEY_AS_ENTRY: + lcl_AnyToBitMask(rValue, nTOIOptions, + nsSwTOIOptions::TOI_KEY_AS_ENTRY); + break; + case WID_USE_COMBINED_ENTRIES: + lcl_AnyToBitMask(rValue, nTOIOptions, + nsSwTOIOptions::TOI_SAME_ENTRY); + break; + case WID_IS_CASE_SENSITIVE: + lcl_AnyToBitMask(rValue, nTOIOptions, + nsSwTOIOptions::TOI_CASE_SENSITIVE); + break; + case WID_USE_P_P: + lcl_AnyToBitMask(rValue, nTOIOptions, nsSwTOIOptions::TOI_FF); + break; + case WID_USE_DASH: + lcl_AnyToBitMask(rValue, nTOIOptions, nsSwTOIOptions::TOI_DASH); + break; + case WID_USE_UPPER_CASE: + lcl_AnyToBitMask(rValue, nTOIOptions, + nsSwTOIOptions::TOI_INITIAL_CAPS); + break; + case WID_IS_COMMA_SEPARATED: + bForm = sal_True; + aForm.SetCommaSeparated(lcl_AnyToBool(rValue)); + break; + case WID_LABEL_CATEGORY: + { + // convert file-format/API/external programmatic english name + // to internal UI name before usage + String aName( SwStyleNameMapper::GetSpecialExtraUIName( + lcl_AnyToString(rValue) ) ); + rTOXBase.SetSequenceName( aName ); + } + break; + case WID_LABEL_DISPLAY_TYPE: + { + const sal_Int16 nVal = lcl_AnyToInt16(rValue); + sal_uInt16 nSet = CAPTION_COMPLETE; + switch (nVal) { - String aString; - bForm = sal_True; - SwStyleNameMapper::FillUIName( lcl_AnyToString(aValue), aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True); - aForm.SetTemplate( 1, aString ); + case text::ReferenceFieldPart::TEXT: + nSet = CAPTION_COMPLETE; + break; + case text::ReferenceFieldPart::CATEGORY_AND_NUMBER: + nSet = CAPTION_NUMBER; + break; + case text::ReferenceFieldPart::ONLY_CAPTION: + nSet = CAPTION_TEXT; + break; + default: + throw lang::IllegalArgumentException(); } - break; - case WID_CREATE_FROM_PARAGRAPH_STYLES: - nCreate = lcl_AnyToBool(aValue) ? - (nCreate | nsSwTOXElement::TOX_TEMPLATE) : (nCreate & ~nsSwTOXElement::TOX_TEMPLATE); - break; - - case WID_PARA_LEV1 : - case WID_PARA_LEV2 : - case WID_PARA_LEV3 : - case WID_PARA_LEV4 : - case WID_PARA_LEV5 : - case WID_PARA_LEV6 : - case WID_PARA_LEV7 : - case WID_PARA_LEV8 : - case WID_PARA_LEV9 : - case WID_PARA_LEV10 : + rTOXBase.SetCaptionDisplay(static_cast(nSet)); + } + break; + case WID_USE_LEVEL_FROM_SOURCE: + rTOXBase.SetLevelFromChapter(lcl_AnyToBool(rValue)); + break; + case WID_MAIN_ENTRY_CHARACTER_STYLE_NAME: + { + String aString; + SwStyleNameMapper::FillUIName(lcl_AnyToString(rValue), + aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, sal_True); + rTOXBase.SetMainEntryCharStyle( aString ); + } + break; + case WID_CREATE_FROM_TABLES: + lcl_AnyToBitMask(rValue, nCreate, nsSwTOXElement::TOX_TABLE); + break; + case WID_CREATE_FROM_TEXT_FRAMES: + lcl_AnyToBitMask(rValue, nCreate, nsSwTOXElement::TOX_FRAME); + break; + case WID_CREATE_FROM_GRAPHIC_OBJECTS: + lcl_AnyToBitMask(rValue, nCreate, nsSwTOXElement::TOX_GRAPHIC); + break; + case WID_CREATE_FROM_EMBEDDED_OBJECTS: + lcl_AnyToBitMask(rValue, nCreate, nsSwTOXElement::TOX_OLE); + break; + case WID_CREATE_FROM_STAR_MATH: + lcl_AnyToBitMask(rValue, nOLEOptions, nsSwTOOElements::TOO_MATH); + break; + case WID_CREATE_FROM_STAR_CHART: + lcl_AnyToBitMask(rValue, nOLEOptions, nsSwTOOElements::TOO_CHART); + break; + case WID_CREATE_FROM_STAR_CALC: + lcl_AnyToBitMask(rValue, nOLEOptions, nsSwTOOElements::TOO_CALC); + break; + case WID_CREATE_FROM_STAR_DRAW: + lcl_AnyToBitMask(rValue, nOLEOptions, + nsSwTOOElements::TOO_DRAW_IMPRESS); + break; + case WID_CREATE_FROM_OTHER_EMBEDDED_OBJECTS: + lcl_AnyToBitMask(rValue, nOLEOptions, nsSwTOOElements::TOO_OTHER); + break; + case WID_PARA_HEAD: + { + String aString; + SwStyleNameMapper::FillUIName( lcl_AnyToString(rValue), + aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True); + bForm = sal_True; + // Header is on Pos 0 + aForm.SetTemplate( 0, aString ); + } + break; + case WID_IS_RELATIVE_TABSTOPS: + bForm = sal_True; + aForm.SetRelTabPos(lcl_AnyToBool(rValue)); + break; + case WID_PARA_SEP: + { + String aString; + bForm = sal_True; + SwStyleNameMapper::FillUIName( lcl_AnyToString(rValue), + aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True); + aForm.SetTemplate( 1, aString ); + } + break; + case WID_CREATE_FROM_PARAGRAPH_STYLES: + lcl_AnyToBitMask(rValue, nCreate, nsSwTOXElement::TOX_TEMPLATE); + break; + + case WID_PARA_LEV1: + case WID_PARA_LEV2: + case WID_PARA_LEV3: + case WID_PARA_LEV4: + case WID_PARA_LEV5: + case WID_PARA_LEV6: + case WID_PARA_LEV7: + case WID_PARA_LEV8: + case WID_PARA_LEV9: + case WID_PARA_LEV10: + { + bForm = sal_True; + // in sdbcx::Index Label 1 begins at Pos 2 otherwise at Pos 1 + const sal_uInt16 nLPos = rTOXBase.GetType() == TOX_INDEX ? 2 : 1; + String aString; + SwStyleNameMapper::FillUIName( lcl_AnyToString(rValue), + aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True); + aForm.SetTemplate(nLPos + pEntry->nWID - WID_PARA_LEV1, aString ); + } + break; + default: + //this is for items only + if (WID_PRIMARY_KEY > pEntry->nWID) { - bForm = sal_True; - // im sdbcx::Index beginnt Lebel 1 bei Pos 2 sonst bei Pos 1 - sal_uInt16 nLPos = pTOXBase->GetType() == TOX_INDEX ? 2 : 1; - String aString; - SwStyleNameMapper::FillUIName( lcl_AnyToString(aValue), aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True); - aForm.SetTemplate(nLPos + pEntry->nWID - WID_PARA_LEV1, aString ); - } - break; - default: - //this is for items only - if(WID_PRIMARY_KEY > pEntry->nWID) + const SwAttrSet& rSet = + m_pImpl->m_pDoc->GetTOXBaseAttrSet(rTOXBase); + SfxItemSet aAttrSet(rSet); + m_pImpl->m_rPropSet.setPropertyValue( + rPropertyName, rValue, aAttrSet); + + const SwSectionFmts& rSects = m_pImpl->m_pDoc->GetSections(); + for (sal_uInt16 i = 0; i < rSects.Count(); i++) { - const SwAttrSet& rSet = m_pDoc->GetTOXBaseAttrSet(*pTOXBase); - pAttrSet = new SfxItemSet(rSet); - m_pPropSet->setPropertyValue(rPropertyName, aValue, *pAttrSet); - - const SwSectionFmts& rSects = m_pDoc->GetSections(); - const SwSectionFmt* pOwnFmt = GetFmt(); - for(sal_uInt16 i = 0; i < rSects.Count(); i++) + const SwSectionFmt* pTmpFmt = rSects[ i ]; + if (pTmpFmt == pSectionFmt) { - const SwSectionFmt* pTmpFmt = rSects[ i ]; - if(pTmpFmt == pOwnFmt) - { - m_pDoc->ChgSection( i, *(SwTOXBaseSection*)pTOXBase, pAttrSet ); - break; - } + m_pImpl->m_pDoc->ChgSection( i, + static_cast(rTOXBase), + & aAttrSet); + break; } } - } - pTOXBase->SetCreate(nCreate); - pTOXBase->SetOLEOptions(nOLEOptions); - if(pTOXBase->GetTOXType()->GetType() == TOX_INDEX) - pTOXBase->SetOptions(nTOIOptions); - if(bForm) - pTOXBase->SetTOXForm(aForm); - delete pAttrSet; + } + } + rTOXBase.SetCreate(nCreate); + rTOXBase.SetOLEOptions(nOLEOptions); + if (rTOXBase.GetTOXType()->GetType() == TOX_INDEX) + { + rTOXBase.SetOptions(nTOIOptions); + } + if (bForm) + { + rTOXBase.SetTOXForm(aForm); } - else - throw uno::RuntimeException(); - } + /*-- 14.12.98 09:35:05--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXDocumentIndex::getPropertyValue(const OUString& rPropertyName) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +uno::Any SAL_CALL +SwXDocumentIndex::getPropertyValue(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + uno::Any aRet; - const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName(rPropertyName); + SfxItemPropertySimpleEntry const*const pEntry = + m_pImpl->m_rPropSet.getPropertyMap()->getByName(rPropertyName); if (!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + { + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + rPropertyName, + static_cast< cppu::OWeakObject * >(this)); + } + + SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() ); SwTOXBase* pTOXBase = 0; - if(GetFmt()) - pTOXBase = (SwTOXBaseSection*)GetFmt()->GetSection(); - else if(bIsDescriptor) - pTOXBase = &pProps->GetTOXBase(); + if (pSectionFmt) + { + pTOXBase = static_cast(pSectionFmt->GetSection()); + } + else if (m_pImpl->m_bIsDescriptor) + { + pTOXBase = &m_pImpl->m_pProps->GetTOXBase(); + } if(pTOXBase) { - sal_uInt16 nCreate = pTOXBase->GetCreateType(); - sal_uInt16 nTOIOptions = 0; - sal_uInt16 nOLEOptions = pTOXBase->GetOLEOptions(); - if(pTOXBase->GetTOXType()->GetType() == TOX_INDEX) - nTOIOptions = pTOXBase->GetOptions(); + const sal_uInt16 nCreate = pTOXBase->GetCreateType(); + const sal_uInt16 nOLEOptions = pTOXBase->GetOLEOptions(); + const sal_uInt16 nTOIOptions = + (pTOXBase->GetTOXType()->GetType() == TOX_INDEX) + ? pTOXBase->GetOptions() + : 0U; const SwForm& rForm = pTOXBase->GetTOXForm(); - sal_Bool bBOOL = sal_True; - sal_Bool bRet = sal_False; switch(pEntry->nWID) { case WID_IDX_CONTENT_SECTION: case WID_IDX_HEADER_SECTION : - bBOOL = sal_False; if(WID_IDX_CONTENT_SECTION == pEntry->nWID) { - uno::Reference xContentSect = SwXTextSections::GetObject( *GetFmt() ); + const uno::Reference xContentSect = + SwXTextSection::CreateXTextSection( pSectionFmt ); aRet <<= xContentSect; } else { SwSections aSectArr; - GetFmt()->GetChildSections( aSectArr, SORTSECT_NOT, FALSE); + pSectionFmt->GetChildSections(aSectArr, + SORTSECT_NOT, FALSE); for(USHORT i = 0; i < aSectArr.Count(); i++) { SwSection* pSect = aSectArr[i]; if(pSect->GetType() == TOX_HEADER_SECTION) { - uno::Reference xHeaderSect = SwXTextSections::GetObject( *pSect->GetFmt() ); - aRet <<= xHeaderSect; + const uno::Reference xHeader = + SwXTextSection::CreateXTextSection( + pSect->GetFmt() ); + aRet <<= xHeader; break; } } @@ -704,80 +906,96 @@ uno::Any SwXDocumentIndex::getPropertyValue(const OUString& rPropertyName) break; case WID_IDX_TITLE : { - bBOOL = sal_False; OUString uRet(pTOXBase->GetTitle()); aRet <<= uRet; break; } case WID_IDX_NAME: - bBOOL = sal_False; aRet <<= OUString(pTOXBase->GetTOXName()); break; case WID_USER_IDX_NAME: { - bBOOL = sal_False; OUString sTmp; - if(!IsDescriptor()) + if (!m_pImpl->m_bIsDescriptor) + { sTmp = pTOXBase->GetTOXType()->GetTypeName(); + } else - sTmp = pProps->GetTypeName(); + { + sTmp = m_pImpl->m_pProps->GetTypeName(); + } //I18N lcl_ConvertTOUNameToProgrammaticName(sTmp); aRet <<= sTmp; } break; case WID_IDX_LOCALE: - bBOOL = sal_False; aRet <<= SvxCreateLocale(pTOXBase->GetLanguage()); break; case WID_IDX_SORT_ALGORITHM: - bBOOL = sal_False; aRet <<= OUString(pTOXBase->GetSortAlgorithm()); break; case WID_LEVEL : - bBOOL = sal_False; - aRet <<= (sal_Int16)pTOXBase->GetLevel(); + aRet <<= static_cast(pTOXBase->GetLevel()); break; - case WID_CREATE_FROM_MARKS : - bRet = 0 != (nCreate & nsSwTOXElement::TOX_MARK); + case WID_CREATE_FROM_MARKS: + lcl_BitMaskToAny(aRet, nCreate, nsSwTOXElement::TOX_MARK); break; - case WID_CREATE_FROM_OUTLINE : - bRet = 0 != (nCreate & nsSwTOXElement::TOX_OUTLINELEVEL); + case WID_CREATE_FROM_OUTLINE: + lcl_BitMaskToAny(aRet, nCreate, + nsSwTOXElement::TOX_OUTLINELEVEL); break; - case WID_CREATE_FROM_CHAPTER : - bRet = pTOXBase->IsFromChapter(); + case WID_CREATE_FROM_CHAPTER: + { + const sal_Bool bRet = pTOXBase->IsFromChapter(); + aRet <<= bRet; + } break; - case WID_CREATE_FROM_LABELS : - bRet = ! pTOXBase->IsFromObjectNames(); + case WID_CREATE_FROM_LABELS: + { + const sal_Bool bRet = ! pTOXBase->IsFromObjectNames(); + aRet <<= bRet; + } break; - case WID_PROTECTED : - bRet = pTOXBase->IsProtected(); + case WID_PROTECTED: + { + const sal_Bool bRet = pTOXBase->IsProtected(); + aRet <<= bRet; + } break; case WID_USE_ALPHABETICAL_SEPARATORS: - bRet = 0 != (nTOIOptions & nsSwTOIOptions::TOI_ALPHA_DELIMITTER); + lcl_BitMaskToAny(aRet, nTOIOptions, + nsSwTOIOptions::TOI_ALPHA_DELIMITTER); break; - case WID_USE_KEY_AS_ENTRY : - bRet = 0 != (nTOIOptions & nsSwTOIOptions::TOI_KEY_AS_ENTRY); + case WID_USE_KEY_AS_ENTRY: + lcl_BitMaskToAny(aRet, nTOIOptions, + nsSwTOIOptions::TOI_KEY_AS_ENTRY); break; - case WID_USE_COMBINED_ENTRIES : - bRet = 0 != (nTOIOptions & nsSwTOIOptions::TOI_SAME_ENTRY); + case WID_USE_COMBINED_ENTRIES: + lcl_BitMaskToAny(aRet, nTOIOptions, + nsSwTOIOptions::TOI_SAME_ENTRY); break; - case WID_IS_CASE_SENSITIVE : - bRet = 0 != (nTOIOptions & nsSwTOIOptions::TOI_CASE_SENSITIVE); + case WID_IS_CASE_SENSITIVE: + lcl_BitMaskToAny(aRet, nTOIOptions, + nsSwTOIOptions::TOI_CASE_SENSITIVE); break; case WID_USE_P_P: - bRet = 0 != (nTOIOptions & nsSwTOIOptions::TOI_FF); + lcl_BitMaskToAny(aRet, nTOIOptions, nsSwTOIOptions::TOI_FF); break; - case WID_USE_DASH : - bRet = 0 != (nTOIOptions & nsSwTOIOptions::TOI_DASH); + case WID_USE_DASH: + lcl_BitMaskToAny(aRet, nTOIOptions, nsSwTOIOptions::TOI_DASH); break; - case WID_USE_UPPER_CASE : - bRet = 0 != (nTOIOptions & nsSwTOIOptions::TOI_INITIAL_CAPS); + case WID_USE_UPPER_CASE: + lcl_BitMaskToAny(aRet, nTOIOptions, + nsSwTOIOptions::TOI_INITIAL_CAPS); break; - case WID_IS_COMMA_SEPARATED : - bRet = rForm.IsCommaSeparated(); + case WID_IS_COMMA_SEPARATED: + { + const sal_Bool bRet = rForm.IsCommaSeparated(); + aRet <<= bRet; + } break; - case WID_LABEL_CATEGORY : + case WID_LABEL_CATEGORY: { // convert internal UI name to // file-format/API/external programmatic english name @@ -785,50 +1003,58 @@ uno::Any SwXDocumentIndex::getPropertyValue(const OUString& rPropertyName) String aName( SwStyleNameMapper::GetSpecialExtraProgName( pTOXBase->GetSequenceName() ) ); aRet <<= OUString( aName ); - bBOOL = sal_False; } break; - case WID_LABEL_DISPLAY_TYPE : + case WID_LABEL_DISPLAY_TYPE: { - bBOOL = sal_False; sal_Int16 nSet = text::ReferenceFieldPart::TEXT; switch (pTOXBase->GetCaptionDisplay()) { - case CAPTION_COMPLETE: nSet = text::ReferenceFieldPart::TEXT;break; - case CAPTION_NUMBER : nSet = text::ReferenceFieldPart::CATEGORY_AND_NUMBER; break; - case CAPTION_TEXT : nSet = text::ReferenceFieldPart::ONLY_CAPTION; break; + case CAPTION_COMPLETE: + nSet = text::ReferenceFieldPart::TEXT; + break; + case CAPTION_NUMBER: + nSet = text::ReferenceFieldPart::CATEGORY_AND_NUMBER; + break; + case CAPTION_TEXT: + nSet = text::ReferenceFieldPart::ONLY_CAPTION; + break; } aRet <<= nSet; } break; - case WID_USE_LEVEL_FROM_SOURCE : - bRet = pTOXBase->IsLevelFromChapter(); + case WID_USE_LEVEL_FROM_SOURCE: + { + const sal_Bool bRet = pTOXBase->IsLevelFromChapter(); + aRet <<= bRet; + } break; - case WID_LEVEL_FORMAT : + case WID_LEVEL_FORMAT: { - uno::Reference< container::XIndexReplace > xTokenAcc = - ((SwXDocumentIndex*)this)->GetTokenAccess(); - if(!xTokenAcc.is()) - xTokenAcc = new SwXIndexTokenAccess_Impl(* - (SwXDocumentIndex*)this); - aRet.setValue(&xTokenAcc, ::getCppuType((const uno::Reference*)0)); - bBOOL = sal_False; + uno::Reference< container::XIndexReplace > xTokenAccess( + m_pImpl->m_wTokenAccess); + if (!xTokenAccess.is()) + { + xTokenAccess = new SwXIndexTokenAccess_Impl(*this); + m_pImpl->m_wTokenAccess = xTokenAccess; + } + aRet <<= xTokenAccess; } break; - case WID_LEVEL_PARAGRAPH_STYLES : + case WID_LEVEL_PARAGRAPH_STYLES: { - uno::Reference< container::XIndexReplace > xStyleAcc = - ((SwXDocumentIndex*)this)->GetStyleAccess(); - if(!xStyleAcc.is()) - xStyleAcc = new SwXIndexStyleAccess_Impl(* - (SwXDocumentIndex*)this); - aRet.setValue(&xStyleAcc, ::getCppuType((const uno::Reference*)0)); - bBOOL = sal_False; + uno::Reference< container::XIndexReplace > xStyleAccess( + m_pImpl->m_wStyleAccess); + if (!xStyleAccess.is()) + { + xStyleAccess = new SwXIndexStyleAccess_Impl(*this); + m_pImpl->m_wStyleAccess = xStyleAccess; + } + aRet <<= xStyleAccess; } break; - case WID_MAIN_ENTRY_CHARACTER_STYLE_NAME : + case WID_MAIN_ENTRY_CHARACTER_STYLE_NAME: { - bBOOL = sal_False; String aString; SwStyleNameMapper::FillProgName( pTOXBase->GetMainEntryCharStyle(), @@ -838,47 +1064,47 @@ uno::Any SwXDocumentIndex::getPropertyValue(const OUString& rPropertyName) aRet <<= OUString( aString ); } break; - case WID_CREATE_FROM_TABLES : - bRet = 0 != (nCreate & nsSwTOXElement::TOX_TABLE); + case WID_CREATE_FROM_TABLES: + lcl_BitMaskToAny(aRet, nCreate, nsSwTOXElement::TOX_TABLE); break; - case WID_CREATE_FROM_TEXT_FRAMES : - bRet = 0 != (nCreate & nsSwTOXElement::TOX_FRAME); + case WID_CREATE_FROM_TEXT_FRAMES: + lcl_BitMaskToAny(aRet, nCreate, nsSwTOXElement::TOX_FRAME); break; - case WID_CREATE_FROM_GRAPHIC_OBJECTS : - bRet = 0 != (nCreate & nsSwTOXElement::TOX_GRAPHIC); + case WID_CREATE_FROM_GRAPHIC_OBJECTS: + lcl_BitMaskToAny(aRet, nCreate, nsSwTOXElement::TOX_GRAPHIC); break; - case WID_CREATE_FROM_EMBEDDED_OBJECTS : - bRet = 0 != (nCreate & nsSwTOXElement::TOX_OLE); + case WID_CREATE_FROM_EMBEDDED_OBJECTS: + lcl_BitMaskToAny(aRet, nCreate, nsSwTOXElement::TOX_OLE); break; case WID_CREATE_FROM_STAR_MATH: - bRet = 0 != (nOLEOptions & nsSwTOOElements::TOO_MATH); + lcl_BitMaskToAny(aRet, nOLEOptions, nsSwTOOElements::TOO_MATH); break; - case WID_CREATE_FROM_STAR_CHART : - bRet = 0 != (nOLEOptions & nsSwTOOElements::TOO_CHART); + case WID_CREATE_FROM_STAR_CHART: + lcl_BitMaskToAny(aRet, nOLEOptions, nsSwTOOElements::TOO_CHART); break; - case WID_CREATE_FROM_STAR_CALC : - bRet = 0 != (nOLEOptions & nsSwTOOElements::TOO_CALC); + case WID_CREATE_FROM_STAR_CALC: + lcl_BitMaskToAny(aRet, nOLEOptions, nsSwTOOElements::TOO_CALC); break; - case WID_CREATE_FROM_STAR_DRAW : - bRet = 0 != (nOLEOptions & nsSwTOOElements::TOO_DRAW_IMPRESS); + case WID_CREATE_FROM_STAR_DRAW: + lcl_BitMaskToAny(aRet, nOLEOptions, + nsSwTOOElements::TOO_DRAW_IMPRESS); break; case WID_CREATE_FROM_OTHER_EMBEDDED_OBJECTS: - bRet = 0 != (nOLEOptions & nsSwTOOElements::TOO_OTHER); + lcl_BitMaskToAny(aRet, nOLEOptions, nsSwTOOElements::TOO_OTHER); break; case WID_CREATE_FROM_PARAGRAPH_STYLES: - bRet = 0 != (nCreate & nsSwTOXElement::TOX_TEMPLATE); + lcl_BitMaskToAny(aRet, nCreate, nsSwTOXElement::TOX_TEMPLATE); break; - case WID_PARA_HEAD : + case WID_PARA_HEAD: { //Header steht an Pos 0 String aString; SwStyleNameMapper::FillProgName(rForm.GetTemplate( 0 ), aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True ); aRet <<= OUString( aString ); - bBOOL = sal_False; } break; - case WID_PARA_SEP : + case WID_PARA_SEP: { String aString; SwStyleNameMapper::FillProgName( @@ -887,21 +1113,20 @@ uno::Any SwXDocumentIndex::getPropertyValue(const OUString& rPropertyName) nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True); aRet <<= OUString( aString ); - bBOOL = sal_False; } break; - case WID_PARA_LEV1 : - case WID_PARA_LEV2 : - case WID_PARA_LEV3 : - case WID_PARA_LEV4 : - case WID_PARA_LEV5 : - case WID_PARA_LEV6 : - case WID_PARA_LEV7 : - case WID_PARA_LEV8 : - case WID_PARA_LEV9 : - case WID_PARA_LEV10 : + case WID_PARA_LEV1: + case WID_PARA_LEV2: + case WID_PARA_LEV3: + case WID_PARA_LEV4: + case WID_PARA_LEV5: + case WID_PARA_LEV6: + case WID_PARA_LEV7: + case WID_PARA_LEV8: + case WID_PARA_LEV9: + case WID_PARA_LEV10: { - // im sdbcx::Index beginnt Lebel 1 bei Pos 2 sonst bei Pos 1 + // in sdbcx::Index Label 1 begins at Pos 2 otherwise at Pos 1 sal_uInt16 nLPos = pTOXBase->GetType() == TOX_INDEX ? 2 : 1; String aString; SwStyleNameMapper::FillProgName( @@ -910,282 +1135,319 @@ uno::Any SwXDocumentIndex::getPropertyValue(const OUString& rPropertyName) nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True); aRet <<= OUString( aString ); - bBOOL = sal_False; } break; case WID_IS_RELATIVE_TABSTOPS: - bRet = rForm.IsRelTabPos(); + { + const sal_Bool bRet = rForm.IsRelTabPos(); + aRet <<= bRet; + } break; case WID_INDEX_MARKS: { SwTOXMarks aMarks; - const SwTOXType* pType = pTOXBase->GetTOXType(); - SwClientIter aIter(*(SwTOXType*)pType); - SwTOXMark* pMark = (SwTOXMark*)aIter.First(TYPE(SwTOXMark)); + SwTOXType const*const pType = pTOXBase->GetTOXType(); + SwClientIter aIter(*pType); + SwTOXMark * pMark = + static_cast(aIter.First(TYPE(SwTOXMark))); while( pMark ) { if(pMark->GetTxtTOXMark()) + { aMarks.C40_INSERT(SwTOXMark, pMark, aMarks.Count()); - pMark = (SwTOXMark*)aIter.Next(); + } + pMark = static_cast(aIter.Next()); } - uno::Sequence< uno::Reference < text::XDocumentIndexMark > > aXMarks(aMarks.Count()); - uno::Reference* pxMarks = aXMarks.getArray(); + uno::Sequence< uno::Reference > + aXMarks(aMarks.Count()); + uno::Reference* pxMarks = + aXMarks.getArray(); for(USHORT i = 0; i < aMarks.Count(); i++) { pMark = aMarks.GetObject(i); - pxMarks[i] = SwXDocumentIndexMark::GetObject((SwTOXType*)pType, pMark, m_pDoc); + pxMarks[i] = SwXDocumentIndexMark::GetObject( + const_cast(pType), pMark, m_pImpl->m_pDoc); } - aRet.setValue(&aXMarks, ::getCppuType((uno::Sequence< uno::Reference< text::XDocumentIndexMark > >*)0)); - bBOOL = sal_False; + aRet <<= aXMarks; } break; default: //this is for items only - bBOOL = sal_False; if(WID_PRIMARY_KEY > pEntry->nWID) { - const SwAttrSet& rSet = m_pDoc->GetTOXBaseAttrSet(*pTOXBase); - aRet = m_pPropSet->getPropertyValue(rPropertyName, rSet); + const SwAttrSet& rSet = + m_pImpl->m_pDoc->GetTOXBaseAttrSet(*pTOXBase); + aRet = m_pImpl->m_rPropSet.getPropertyValue( + rPropertyName, rSet); } } - if(bBOOL) - aRet.setValue(&bRet, ::getCppuBooleanType()); } return aRet; } -/*-- 14.12.98 09:35:06--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXDocumentIndex::addPropertyChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); -} /*-- 14.12.98 09:35:06--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXDocumentIndex::removePropertyChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXDocumentIndex::addPropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXDocumentIndex::addPropertyChangeListener(): not implemented"); } -/*-- 14.12.98 09:35:06--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXDocumentIndex::addVetoableChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXDocumentIndex::removePropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXDocumentIndex::removePropertyChangeListener(): not implemented"); } -/*-- 14.12.98 09:35:07--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXDocumentIndex::removeVetoableChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXDocumentIndex::addVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXDocumentIndex::addVetoableChangeListener(): not implemented"); } -/*-- 14.12.98 09:35:07--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXDocumentIndex::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew) +void SAL_CALL +SwXDocumentIndex::removeVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - BOOL bRemove = FALSE; - switch( pOld ? pOld->Which() : 0 ) - { - case RES_REMOVE_UNO_OBJECT: - case RES_OBJECTDYING: - bRemove = (void*)GetRegisteredIn() == ((SwPtrMsgPoolItem *)pOld)->pObject; - break; - case RES_FMT_CHG: - // wurden wir an das neue umgehaengt und wird das alte geloscht? - bRemove = ((SwFmtChg*)pNew)->pChangedFmt == GetRegisteredIn() && - ((SwFmtChg*)pOld)->pChangedFmt->IsFmtInDTOR(); - break; - } - if( bRemove ) - { - ((SwModify*)GetRegisteredIn())->Remove( this ); - aLstnrCntnr.Disposing(); - } + OSL_ENSURE(false, + "SwXDocumentIndex::removeVetoableChangeListener(): not implemented"); } + /* -----------------18.02.99 13:39------------------- * * --------------------------------------------------*/ -void SwXDocumentIndex::attachToRange(const uno::Reference< text::XTextRange > & xTextRange) - throw( lang::IllegalArgumentException, uno::RuntimeException ) +void SAL_CALL +SwXDocumentIndex::attach(const uno::Reference< text::XTextRange > & xTextRange) +throw (lang::IllegalArgumentException, uno::RuntimeException) { - if(!bIsDescriptor) + vos::OGuard aGuard(Application::GetSolarMutex()); + + if (!m_pImpl->m_bIsDescriptor) + { throw uno::RuntimeException(); - uno::Reference xRangeTunnel( xTextRange, uno::UNO_QUERY); - SwXTextRange* pRange = 0; - OTextCursorHelper* pCursor = 0; - if(xRangeTunnel.is()) + } + const uno::Reference xRangeTunnel( xTextRange, uno::UNO_QUERY); + SwXTextRange *const pRange = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); + OTextCursorHelper *const pCursor = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); + + SwDoc *const pDoc = + (pRange) ? pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : 0); + if (!pDoc) { - pRange = reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) )); - pCursor = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); + throw lang::IllegalArgumentException(); } - SwDoc* pDoc = pRange ? (SwDoc*)pRange->GetDoc() : pCursor ? (SwDoc*)pCursor->GetDoc() : 0; - if(pDoc ) + SwUnoInternalPaM aPam(*pDoc); + //das muss jetzt sal_True liefern + ::sw::XTextRangeToSwPaM(aPam, xTextRange); + + const SwTOXBase* pOld = pDoc->GetCurTOX( *aPam.Start() ); + if (pOld) { - SwUnoInternalPaM aPam(*pDoc); - //das muss jetzt sal_True liefern - ::sw::XTextRangeToSwPaM(aPam, xTextRange); + throw lang::IllegalArgumentException(); + } - const SwTOXBase* pOld = pDoc->GetCurTOX( *aPam.Start() ); - if(!pOld) - { - UnoActionContext aAction(pDoc); - if(aPam.HasMark()) - pDoc->DeleteAndJoin(aPam); + UnoActionContext aAction(pDoc); + if (aPam.HasMark()) + { + pDoc->DeleteAndJoin(aPam); + } - SwTOXBase& rTOXBase = pProps->GetTOXBase(); - const SwTOXType* pTOXType = rTOXBase.GetTOXType(); - if(TOX_USER == pTOXType->GetType() && !pProps->GetTypeName().equals(pTOXType->GetTypeName())) - { - lcl_ReAssignTOXType(pDoc, rTOXBase, pProps->GetTypeName()); - } - //TODO: apply Section attributes (columns and background) - const SwTOXBaseSection* pTOX = pDoc->InsertTableOf( - *aPam.GetPoint(), rTOXBase, 0, sal_False ); + SwTOXBase & rTOXBase = m_pImpl->m_pProps->GetTOXBase(); + SwTOXType const*const pTOXType = rTOXBase.GetTOXType(); + if ((TOX_USER == pTOXType->GetType()) && + !m_pImpl->m_pProps->GetTypeName().equals(pTOXType->GetTypeName())) + { + lcl_ReAssignTOXType(pDoc, rTOXBase, m_pImpl->m_pProps->GetTypeName()); + } + //TODO: apply Section attributes (columns and background) + SwTOXBaseSection const*const pTOX = + pDoc->InsertTableOf( *aPam.GetPoint(), rTOXBase, 0, sal_False ); - pDoc->SetTOXBaseName( *pTOX, pProps->GetTOXBase().GetTOXName() ); + pDoc->SetTOXBaseName(*pTOX, m_pImpl->m_pProps->GetTOXBase().GetTOXName()); - // Seitennummern eintragen - pBase = (const SwTOXBaseSection*)pTOX; - pBase->GetFmt()->Add(this); - ((SwTOXBaseSection*)pTOX)->UpdatePageNum(); - } - else - throw lang::IllegalArgumentException(); + // update page numbers + pTOX->GetFmt()->Add(m_pImpl.get()); + pTOX->GetFmt()->SetXObject(static_cast< ::cppu::OWeakObject*>(this)); + const_cast(pTOX)->UpdatePageNum(); - DELETEZ(pProps); - m_pDoc = pDoc; - bIsDescriptor = sal_False; - } + m_pImpl->m_pProps.reset(); + m_pImpl->m_pDoc = pDoc; + m_pImpl->m_bIsDescriptor = sal_False; } -/*-- 15.01.99 14:23:51--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXDocumentIndex::attach(const uno::Reference< text::XTextRange > & xTextRange) - throw( lang::IllegalArgumentException, uno::RuntimeException ) -{ - vos::OGuard aGuard(Application::GetSolarMutex()); - attachToRange( xTextRange ); -} /*-- 15.01.99 14:23:56--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextRange > SwXDocumentIndex::getAnchor(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextRange > SAL_CALL +SwXDocumentIndex::getAnchor() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextRange > xRet; - if(GetRegisteredIn()) + + SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() ); + if (!pSectionFmt) { - SwSectionFmt* pSectFmt = GetFmt(); - const SwNodeIndex* pIdx; - if( 0 != ( pIdx = pSectFmt->GetCntnt().GetCntntIdx() ) && - pIdx->GetNode().GetNodes().IsDocNodes() ) - { - SwPaM aPaM(*pIdx); - aPaM.Move( fnMoveForward, fnGoCntnt ); - aPaM.SetMark(); - aPaM.GetPoint()->nNode = *pIdx->GetNode().EndOfSectionNode(); - aPaM.Move( fnMoveBackward, fnGoCntnt ); - xRet = SwXTextRange::CreateXTextRange(*pSectFmt->GetDoc(), - *aPaM.GetMark(), aPaM.GetPoint()); - } - } - else throw uno::RuntimeException(); + } + + uno::Reference< text::XTextRange > xRet; + SwNodeIndex const*const pIdx( pSectionFmt->GetCntnt().GetCntntIdx() ); + if (pIdx && pIdx->GetNode().GetNodes().IsDocNodes()) + { + SwPaM aPaM(*pIdx); + aPaM.Move( fnMoveForward, fnGoCntnt ); + aPaM.SetMark(); + aPaM.GetPoint()->nNode = *pIdx->GetNode().EndOfSectionNode(); + aPaM.Move( fnMoveBackward, fnGoCntnt ); + xRet = SwXTextRange::CreateXTextRange(*pSectionFmt->GetDoc(), + *aPaM.GetMark(), aPaM.GetPoint()); + } return xRet; } + /*-- 15.01.99 15:46:48--------------------------------------------------- -----------------------------------------------------------------------*/ void lcl_RemoveChildSections(SwSectionFmt& rParentFmt) { SwSections aTmpArr; - SwDoc* pDoc = rParentFmt.GetDoc(); - sal_uInt16 nCnt = rParentFmt.GetChildSections(aTmpArr,SORTSECT_POS); + SwDoc *const pDoc = rParentFmt.GetDoc(); + const sal_uInt16 nCnt = rParentFmt.GetChildSections(aTmpArr, SORTSECT_POS); if( nCnt ) { for( sal_uInt16 n = 0; n < nCnt; ++n ) + { if( aTmpArr[n]->GetFmt()->IsInNodesArr() ) { SwSectionFmt* pFmt = aTmpArr[n]->GetFmt(); lcl_RemoveChildSections(*pFmt); pDoc->DelSectionFmt( pFmt ); } + } } } -void SwXDocumentIndex::dispose(void) throw( uno::RuntimeException ) + +void SAL_CALL SwXDocumentIndex::dispose() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(GetRegisteredIn()) + + SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() ); + if (pSectionFmt) { - SwSectionFmt* pSectFmt = GetFmt(); - pSectFmt->GetDoc()->DeleteTOX( *(SwTOXBaseSection*)pSectFmt->GetSection(), sal_True); + pSectionFmt->GetDoc()->DeleteTOX( + *static_cast(pSectionFmt->GetSection()), + sal_True); } - else - throw uno::RuntimeException(); } + /*-- 15.01.99 15:46:49--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXDocumentIndex::addEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException ) +void SAL_CALL +SwXDocumentIndex::addEventListener( + const uno::Reference< lang::XEventListener > & xListener) +throw (uno::RuntimeException) { - if(!GetRegisteredIn()) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->GetRegisteredIn()) + { throw uno::RuntimeException(); - aLstnrCntnr.AddListener(aListener); + } + m_pImpl->m_ListenerContainer.AddListener(xListener); } /*-- 15.01.99 15:46:54--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXDocumentIndex::removeEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException ) +void SAL_CALL +SwXDocumentIndex::removeEventListener( + const uno::Reference< lang::XEventListener > & xListener) +throw (uno::RuntimeException) { - if(!GetRegisteredIn() || !aLstnrCntnr.RemoveListener(aListener)) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->GetRegisteredIn() || + !m_pImpl->m_ListenerContainer.RemoveListener(xListener)) + { throw uno::RuntimeException(); + } } + /* -----------------30.07.99 11:28------------------- --------------------------------------------------*/ -OUString SwXDocumentIndex::getName(void) throw( uno::RuntimeException ) +OUString SAL_CALL SwXDocumentIndex::getName() throw (uno::RuntimeException) { - SwSectionFmt* pSectionFmt = GetFmt(); + vos::OGuard g(Application::GetSolarMutex()); + OUString uRet; - if(bIsDescriptor) + SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() ); + if (m_pImpl->m_bIsDescriptor) { - uRet = OUString(pProps->GetTOXBase().GetTOXName()); + uRet = OUString(m_pImpl->m_pProps->GetTOXBase().GetTOXName()); } else if(pSectionFmt) { uRet = OUString(pSectionFmt->GetSection()->GetName()); } else + { throw uno::RuntimeException(); + } return uRet; } /* -----------------30.07.99 11:28------------------- --------------------------------------------------*/ -void SwXDocumentIndex::setName(const OUString& rName) throw( uno::RuntimeException ) +void SAL_CALL +SwXDocumentIndex::setName(const OUString& rName) throw (uno::RuntimeException) { - SwSectionFmt* pSectionFmt = GetFmt(); - String sNewName(rName); - sal_Bool bExcept = sal_False; - if(!sNewName.Len()) - bExcept = sal_True; - if(bIsDescriptor) + vos::OGuard g(Application::GetSolarMutex()); + + if (!rName.getLength()) { - pProps->GetTOXBase().SetTOXName(sNewName); + throw uno::RuntimeException(); } - else if(!pSectionFmt || - !pSectionFmt->GetDoc()->SetTOXBaseName( - *(SwTOXBaseSection*)pSectionFmt->GetSection(), sNewName)) - bExcept = sal_True; - if(bExcept) + SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() ); + if (m_pImpl->m_bIsDescriptor) + { + m_pImpl->m_pProps->GetTOXBase().SetTOXName(rName); + } + else if (pSectionFmt) + { + const bool bSuccess = pSectionFmt->GetDoc()->SetTOXBaseName( + *static_cast(pSectionFmt->GetSection()), rName); + if (!bSuccess) + { + throw uno::RuntimeException(); + } + } + else + { throw uno::RuntimeException(); + } } /****************************************************************** @@ -2018,7 +2280,6 @@ uno::Any SwXDocumentIndexes::getByIndex(sal_Int32 nIndex) if(!IsValid()) throw uno::RuntimeException(); - uno::Any aRet; sal_Int32 nIdx = 0; const SwSectionFmts& rFmts = GetDoc()->GetSections(); @@ -2029,9 +2290,11 @@ uno::Any SwXDocumentIndexes::getByIndex(sal_Int32 nIndex) pSect->GetFmt()->GetSectionNode() && nIdx++ == nIndex ) { - uno::Reference< text::XDocumentIndex > xTmp = new SwXDocumentIndex( - (SwTOXBaseSection*)pSect, GetDoc() ); - aRet.setValue(&xTmp, ::getCppuType((uno::Reference*)0)); + const uno::Reference< text::XDocumentIndex > xTmp = + SwXDocumentIndex::CreateXDocumentIndex( + *GetDoc(), static_cast(*pSect)); + uno::Any aRet; + aRet <<= xTmp; return aRet; } } @@ -2049,7 +2312,6 @@ uno::Any SwXDocumentIndexes::getByName(const OUString& rName) if(!IsValid()) throw uno::RuntimeException(); - uno::Any aRet; String sToFind(rName); const SwSectionFmts& rFmts = GetDoc()->GetSections(); @@ -2060,9 +2322,11 @@ uno::Any SwXDocumentIndexes::getByName(const OUString& rName) pSect->GetFmt()->GetSectionNode() && ((SwTOXBaseSection*)pSect)->GetTOXName() == sToFind) { - uno::Reference< text::XDocumentIndex > xTmp = new SwXDocumentIndex( - (SwTOXBaseSection*)pSect, GetDoc() ); - aRet.setValue(&xTmp, ::getCppuType((uno::Reference*)0)); + const uno::Reference< text::XDocumentIndex > xTmp = + SwXDocumentIndex::CreateXDocumentIndex( + *GetDoc(), static_cast(*pSect)); + uno::Any aRet; + aRet <<= xTmp; return aRet; } } @@ -2145,17 +2409,6 @@ sal_Bool SwXDocumentIndexes::hasElements(void) throw( uno::RuntimeException ) return 0 != getCount(); } -SwXDocumentIndex* SwXDocumentIndexes::GetObject(const SwTOXBaseSection* pTOX) -{ - SwSectionFmt* pFmt = pTOX->GetFmt(); - SwClientIter aIter(*pFmt); - SwXDocumentIndex* pxIdx = (SwXDocumentIndex*)aIter.First(TYPE(SwXDocumentIndex)); - if(pxIdx) - return pxIdx; - else - return new SwXDocumentIndex(pTOX, pFmt->GetDoc()); -} - /* -----------------------------06.04.00 15:08-------------------------------- ---------------------------------------------------------------------------*/ @@ -2187,16 +2440,12 @@ SwXIndexStyleAccess_Impl::SwXIndexStyleAccess_Impl(SwXDocumentIndex& rParentIdx) rParent(rParentIdx), xParent(&rParentIdx) { - vos::OGuard aGuard(Application::GetSolarMutex()); - rParent.SetStyleAccess(this); } /*-- 13.09.99 16:52:29--------------------------------------------------- -----------------------------------------------------------------------*/ SwXIndexStyleAccess_Impl::~SwXIndexStyleAccess_Impl() { - vos::OGuard aGuard(Application::GetSolarMutex()); - rParent.SetStyleAccess(0); } /*-- 13.09.99 16:52:29--------------------------------------------------- @@ -2206,14 +2455,13 @@ void SwXIndexStyleAccess_Impl::replaceByIndex(sal_Int32 nIndex, const uno::Any& lang::WrappedTargetException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - const sal_Bool bDescriptor = rParent.IsDescriptor(); - SwSectionFmt* pSectFmt = rParent.GetFmt(); - if(!pSectFmt && !bDescriptor) - throw uno::RuntimeException(); + if(nIndex < 0 || nIndex > MAXLEVEL) + { throw lang::IndexOutOfBoundsException(); - SwTOXBase* pTOXBase = bDescriptor ? &rParent.GetProperties_Impl()->GetTOXBase() : - (SwTOXBaseSection*)pSectFmt->GetSection(); + } + + SwTOXBase * pTOXBase( &rParent.m_pImpl->GetTOXSectionOrThrow() ); uno::Sequence aSeq; if(!(rElement >>= aSeq)) @@ -2247,14 +2495,13 @@ uno::Any SwXIndexStyleAccess_Impl::getByIndex(sal_Int32 nIndex) uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - const sal_Bool bDescriptor = rParent.IsDescriptor(); - SwSectionFmt* pSectFmt = rParent.GetFmt(); - if(!pSectFmt && !bDescriptor) - throw uno::RuntimeException(); + if(nIndex < 0 || nIndex > MAXLEVEL) + { throw lang::IndexOutOfBoundsException(); - SwTOXBase* pTOXBase = bDescriptor ? &rParent.GetProperties_Impl()->GetTOXBase() : - (SwTOXBaseSection*)pSectFmt->GetSection(); + } + + SwTOXBase * pTOXBase( &rParent.m_pImpl->GetTOXSectionOrThrow() ); const String& rStyles = pTOXBase->GetStyleNames((sal_uInt16) nIndex); sal_uInt16 nStyles = rStyles.GetTokenCount(TOX_STYLE_DELIMITER); @@ -2322,18 +2569,14 @@ uno::Sequence< OUString > SwXIndexTokenAccess_Impl::getSupportedServiceNames(voi SwXIndexTokenAccess_Impl::SwXIndexTokenAccess_Impl(SwXDocumentIndex& rParentIdx) : rParent(rParentIdx), xParent(&rParentIdx), - nCount(SwForm::GetFormMaxLevel(rParent.GetTOXType())) + nCount(0) { - vos::OGuard aGuard(Application::GetSolarMutex()); - rParent.SetTokenAccess(this); } /*-- 13.09.99 16:52:29--------------------------------------------------- -----------------------------------------------------------------------*/ SwXIndexTokenAccess_Impl::~SwXIndexTokenAccess_Impl() { - vos::OGuard aGuard(Application::GetSolarMutex()); - rParent.SetTokenAccess(0); } /*-- 13.09.99 16:52:29--------------------------------------------------- @@ -2343,13 +2586,9 @@ void SwXIndexTokenAccess_Impl::replaceByIndex(sal_Int32 nIndex, const uno::Any& lang::WrappedTargetException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - const sal_Bool bDescriptor = rParent.IsDescriptor(); - SwSectionFmt* pSectFmt = rParent.GetFmt(); - if(!pSectFmt && !bDescriptor) - throw uno::RuntimeException(); - SwTOXBase* pTOXBase = bDescriptor ? &rParent.GetProperties_Impl()->GetTOXBase() : - (SwTOXBaseSection*)pSectFmt->GetSection(); + SwTOXBase * pTOXBase( &rParent.m_pImpl->GetTOXSectionOrThrow() ); + if(nIndex < 0 || (nIndex > pTOXBase->GetTOXForm().GetFormMax())) throw lang::IndexOutOfBoundsException(); @@ -2358,6 +2597,7 @@ void SwXIndexTokenAccess_Impl::replaceByIndex(sal_Int32 nIndex, const uno::Any& if(!(rElement >>= aSeq)) throw lang::IllegalArgumentException(); + String sPattern; sal_Int32 nTokens = aSeq.getLength(); const beans::PropertyValues* pTokens = aSeq.getConstArray(); @@ -2519,14 +2759,8 @@ void SwXIndexTokenAccess_Impl::replaceByIndex(sal_Int32 nIndex, const uno::Any& sal_Int32 SwXIndexTokenAccess_Impl::getCount(void) throw( uno::RuntimeException ) { vos::OGuard aGuard(Application::GetSolarMutex()); - const sal_Bool bDescriptor = rParent.IsDescriptor(); - SwSectionFmt* pSectFmt = rParent.GetFmt(); - if(!pSectFmt && !bDescriptor) - throw uno::RuntimeException(); - sal_Int32 nRet = bDescriptor ? - nCount : - ((SwTOXBaseSection*)pSectFmt->GetSection())-> - GetTOXForm().GetFormMax(); + + const sal_Int32 nRet = rParent.m_pImpl->GetFormMax(); return nRet; } /*-- 13.09.99 16:52:30--------------------------------------------------- @@ -2537,12 +2771,9 @@ uno::Any SwXIndexTokenAccess_Impl::getByIndex(sal_Int32 nIndex) uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - const sal_Bool bDescriptor = rParent.IsDescriptor(); - SwSectionFmt* pSectFmt = rParent.GetFmt(); - if(!pSectFmt && !bDescriptor) - throw uno::RuntimeException(); - SwTOXBase* pTOXBase = bDescriptor ? &rParent.GetProperties_Impl()->GetTOXBase() : - (SwTOXBaseSection*)pSectFmt->GetSection(); + + SwTOXBase * pTOXBase( &rParent.m_pImpl->GetTOXSectionOrThrow() ); + if(nIndex < 0 || (nIndex > pTOXBase->GetTOXForm().GetFormMax())) throw lang::IndexOutOfBoundsException(); diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 907a2a617c..6eeb9757e4 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -1169,7 +1169,8 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, SwTOXBaseSection *const pTOXBaseSect = PTR_CAST(SwTOXBaseSection, pEnclosingSection); const uno::Reference xIndex = - SwXDocumentIndexes::GetObject(pTOXBaseSect); + SwXDocumentIndex::CreateXDocumentIndex( + *pTOXBaseSect->GetFmt()->GetDoc(), *pTOXBaseSect); pRet[nProperty] <<= xIndex; } // else: no enclosing index found -> empty return value -- cgit v1.2.3 From b27415a981fb85957502e4b4bc289f3812d85ab6 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:58 +0100 Subject: swunolocking1: #i105557#: move SwXDocumentIndex helper classes out of header. use new XUnoTunnel and XServiceInfo helpers. clean up the implementation a little. --- sw/inc/unoidx.hxx | 80 +----- sw/source/core/unocore/unoidx.cxx | 549 ++++++++++++++++++++++++++------------ 2 files changed, 381 insertions(+), 248 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unoidx.hxx b/sw/inc/unoidx.hxx index 3ea515cf11..553e6e8f7e 100644 --- a/sw/inc/unoidx.hxx +++ b/sw/inc/unoidx.hxx @@ -32,9 +32,7 @@ #include #include -#include #include -#include #include #include @@ -53,8 +51,6 @@ class SwTOXType; /* -----------------07.12.98 10:08------------------- * * --------------------------------------------------*/ -class SwXIndexStyleAccess_Impl; -class SwXIndexTokenAccess_Impl; typedef ::cppu::WeakImplHelper5 < ::com::sun::star::lang::XUnoTunnel @@ -70,8 +66,8 @@ class SwXDocumentIndex private: - friend class SwXIndexStyleAccess_Impl; - friend class SwXIndexTokenAccess_Impl; + class StyleAccess_Impl; + class TokenAccess_Impl; class Impl; ::sw::UnoImplPtr m_pImpl; @@ -316,79 +312,7 @@ public: virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); -}; -/* -----------------13.09.99 16:39------------------- - - --------------------------------------------------*/ -class SwXIndexStyleAccess_Impl : public cppu::WeakImplHelper2 -< - ::com::sun::star::container::XIndexReplace, - ::com::sun::star::lang::XServiceInfo -> -{ - SwXDocumentIndex& rParent; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XDocumentIndex > xParent; -protected: - virtual ~SwXIndexStyleAccess_Impl(); -public: - SwXIndexStyleAccess_Impl(SwXDocumentIndex& rParentIdx); - - - //XIndexReplace - virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //XIndexAccess - virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); - - //XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - -}; - -/* -----------------13.09.99 16:39------------------- - - --------------------------------------------------*/ -class SwXIndexTokenAccess_Impl : public cppu::WeakImplHelper2 -< - ::com::sun::star::container::XIndexReplace, - ::com::sun::star::lang::XServiceInfo -> -{ - SwXDocumentIndex& rParent; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XDocumentIndex > xParent; - sal_Int32 nCount; -protected: - virtual ~SwXIndexTokenAccess_Impl(); -public: - SwXIndexTokenAccess_Impl(SwXDocumentIndex& rParentIdx); - - - - //XIndexReplace - virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //XIndexAccess - virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); - - //XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - }; #endif - diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 3aef38b685..76f28ac107 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -31,12 +31,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include +#include +#include #include #include #include -#include #include -#include #include #include @@ -75,7 +76,7 @@ using namespace ::com::sun::star; using ::rtl::OUString; //----------------------------------------------------------------------------- -static String +static OUString lcl_AnyToString(uno::Any const& rVal) throw (lang::IllegalArgumentException) { OUString sRet; @@ -190,6 +191,104 @@ lcl_ConvertTOUNameToUserName(OUString& rTmp) } } +/* -----------------13.09.99 16:39------------------- + + --------------------------------------------------*/ +typedef ::cppu::WeakImplHelper2 +< lang::XServiceInfo +, container::XIndexReplace +> SwXDocumentIndexStyleAccess_Base; + +class SwXDocumentIndex::StyleAccess_Impl + : public SwXDocumentIndexStyleAccess_Base +{ + +private: + /// can be destroyed threadsafely, so no UnoImplPtr here + ::rtl::Reference m_xParent; + + virtual ~StyleAccess_Impl(); + +public: + StyleAccess_Impl(SwXDocumentIndex& rParentIdx); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (uno::RuntimeException); + virtual sal_Bool SAL_CALL + supportsService(const ::rtl::OUString& rServiceName) + throw (uno::RuntimeException); + virtual uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() throw (uno::RuntimeException); + + // XElementAccess + virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() throw (uno::RuntimeException); + + // XIndexAccess + virtual sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException); + virtual uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) + throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, + uno::RuntimeException); + + // XIndexReplace + virtual void SAL_CALL + replaceByIndex(sal_Int32 Index, const uno::Any& rElement) + throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, + lang::WrappedTargetException, uno::RuntimeException); + +}; + +/* -----------------13.09.99 16:39------------------- + + --------------------------------------------------*/ +typedef ::cppu::WeakImplHelper2 +< lang::XServiceInfo +, container::XIndexReplace +> SwXDocumentIndexTokenAccess_Base; + +class SwXDocumentIndex::TokenAccess_Impl + : public SwXDocumentIndexTokenAccess_Base +{ + +private: + /// can be destroyed threadsafely, so no UnoImplPtr here + ::rtl::Reference m_xParent; + + virtual ~TokenAccess_Impl(); + +public: + + TokenAccess_Impl(SwXDocumentIndex& rParentIdx); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (uno::RuntimeException); + virtual sal_Bool SAL_CALL + supportsService(const ::rtl::OUString& rServiceName) + throw (uno::RuntimeException); + virtual uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() throw (uno::RuntimeException); + + // XElementAccess + virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() throw (uno::RuntimeException); + + // XIndexAccess + virtual sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException); + virtual uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) + throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, + uno::RuntimeException); + + // XIndexReplace + virtual void SAL_CALL + replaceByIndex(sal_Int32 Index, const uno::Any& rElement) + throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, + lang::WrappedTargetException, uno::RuntimeException); + +}; + + /****************************************************************** * SwXDocumentIndex ******************************************************************/ @@ -1035,7 +1134,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, m_pImpl->m_wTokenAccess); if (!xTokenAccess.is()) { - xTokenAccess = new SwXIndexTokenAccess_Impl(*this); + xTokenAccess = new TokenAccess_Impl(*this); m_pImpl->m_wTokenAccess = xTokenAccess; } aRet <<= xTokenAccess; @@ -1047,7 +1146,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, m_pImpl->m_wStyleAccess); if (!xStyleAccess.is()) { - xStyleAccess = new SwXIndexStyleAccess_Impl(*this); + xStyleAccess = new StyleAccess_Impl(*this); m_pImpl->m_wStyleAccess = xStyleAccess; } aRet <<= xStyleAccess; @@ -2409,49 +2508,66 @@ sal_Bool SwXDocumentIndexes::hasElements(void) throw( uno::RuntimeException ) return 0 != getCount(); } -/* -----------------------------06.04.00 15:08-------------------------------- +/****************************************************************** + * SwXDocumentIndex::StyleAccess_Impl + ******************************************************************/ - ---------------------------------------------------------------------------*/ -OUString SwXIndexStyleAccess_Impl::getImplementationName(void) throw( uno::RuntimeException ) +/*-- 13.09.99 16:52:28--------------------------------------------------- + + -----------------------------------------------------------------------*/ +SwXDocumentIndex::StyleAccess_Impl::StyleAccess_Impl( + SwXDocumentIndex& rParentIdx) + : m_xParent(&rParentIdx) { - return C2U("SwXIndexStyleAccess_Impl"); } -/* -----------------------------06.04.00 15:08-------------------------------- +/*-- 13.09.99 16:52:29--------------------------------------------------- - ---------------------------------------------------------------------------*/ -BOOL SwXIndexStyleAccess_Impl::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) + -----------------------------------------------------------------------*/ +SwXDocumentIndex::StyleAccess_Impl::~StyleAccess_Impl() { - return C2U("com.sun.star.text.DocumentIndexParagraphStyles") == rServiceName; } + /* -----------------------------06.04.00 15:08-------------------------------- ---------------------------------------------------------------------------*/ -uno::Sequence< OUString > SwXIndexStyleAccess_Impl::getSupportedServiceNames(void) throw( uno::RuntimeException ) +OUString SAL_CALL +SwXDocumentIndex::StyleAccess_Impl::getImplementationName() +throw (uno::RuntimeException) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.DocumentIndexParagraphStyles"); - return aRet; + return C2U("SwXDocumentIndex::StyleAccess_Impl"); } -/*-- 13.09.99 16:52:28--------------------------------------------------- - -----------------------------------------------------------------------*/ -SwXIndexStyleAccess_Impl::SwXIndexStyleAccess_Impl(SwXDocumentIndex& rParentIdx) : - rParent(rParentIdx), - xParent(&rParentIdx) +static char const*const g_ServicesIndexStyleAccess[] = { + "com.sun.star.text.DocumentIndexParagraphStyles", +}; +static const size_t g_nServicesIndexStyleAccess( + sizeof(g_ServicesIndexStyleAccess)/sizeof(g_ServicesIndexStyleAccess[0])); + +sal_Bool SAL_CALL +SwXDocumentIndex::StyleAccess_Impl::supportsService( + const OUString& rServiceName) +throw (uno::RuntimeException) +{ + return ::sw::SupportsServiceImpl( + g_nServicesIndexStyleAccess, g_ServicesIndexStyleAccess, rServiceName); } -/*-- 13.09.99 16:52:29--------------------------------------------------- - -----------------------------------------------------------------------*/ -SwXIndexStyleAccess_Impl::~SwXIndexStyleAccess_Impl() +uno::Sequence< OUString > SAL_CALL +SwXDocumentIndex::StyleAccess_Impl::getSupportedServiceNames() +throw (uno::RuntimeException) { + return ::sw::GetSupportedServiceNamesImpl( + g_nServicesIndexStyleAccess, g_ServicesIndexStyleAccess); } + /*-- 13.09.99 16:52:29--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXIndexStyleAccess_Impl::replaceByIndex(sal_Int32 nIndex, const uno::Any& rElement) - throw( lang::IllegalArgumentException, lang::IndexOutOfBoundsException, +void SAL_CALL +SwXDocumentIndex::StyleAccess_Impl::replaceByIndex( + sal_Int32 nIndex, const uno::Any& rElement) +throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -2461,38 +2577,45 @@ void SwXIndexStyleAccess_Impl::replaceByIndex(sal_Int32 nIndex, const uno::Any& throw lang::IndexOutOfBoundsException(); } - SwTOXBase * pTOXBase( &rParent.m_pImpl->GetTOXSectionOrThrow() ); + SwTOXBase & rTOXBase( m_xParent->m_pImpl->GetTOXSectionOrThrow() ); uno::Sequence aSeq; if(!(rElement >>= aSeq)) + { throw lang::IllegalArgumentException(); + } - sal_Int32 nStyles = aSeq.getLength(); + const sal_Int32 nStyles = aSeq.getLength(); const OUString* pStyles = aSeq.getConstArray(); String sSetStyles; String aString; for(sal_Int32 i = 0; i < nStyles; i++) { if(i) + { sSetStyles += TOX_STYLE_DELIMITER; - SwStyleNameMapper::FillUIName(pStyles[i], aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True); + } + SwStyleNameMapper::FillUIName(pStyles[i], aString, + nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True); sSetStyles += aString; } - pTOXBase->SetStyleNames(sSetStyles, (sal_uInt16) nIndex); + rTOXBase.SetStyleNames(sSetStyles, static_cast(nIndex)); } /*-- 13.09.99 16:52:29--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Int32 SwXIndexStyleAccess_Impl::getCount(void) throw( uno::RuntimeException ) +sal_Int32 SAL_CALL +SwXDocumentIndex::StyleAccess_Impl::getCount() throw (uno::RuntimeException) { return MAXLEVEL; } /*-- 13.09.99 16:52:30--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXIndexStyleAccess_Impl::getByIndex(sal_Int32 nIndex) - throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, - uno::RuntimeException) +uno::Any SAL_CALL +SwXDocumentIndex::StyleAccess_Impl::getByIndex(sal_Int32 nIndex) +throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -2501,10 +2624,11 @@ uno::Any SwXIndexStyleAccess_Impl::getByIndex(sal_Int32 nIndex) throw lang::IndexOutOfBoundsException(); } - SwTOXBase * pTOXBase( &rParent.m_pImpl->GetTOXSectionOrThrow() ); + SwTOXBase & rTOXBase( m_xParent->m_pImpl->GetTOXSectionOrThrow() ); - const String& rStyles = pTOXBase->GetStyleNames((sal_uInt16) nIndex); - sal_uInt16 nStyles = rStyles.GetTokenCount(TOX_STYLE_DELIMITER); + const String& rStyles = + rTOXBase.GetStyleNames(static_cast(nIndex)); + const sal_uInt16 nStyles = rStyles.GetTokenCount(TOX_STYLE_DELIMITER); uno::Sequence aStyles(nStyles); OUString* pStyles = aStyles.getArray(); String aString; @@ -2523,116 +2647,143 @@ uno::Any SwXIndexStyleAccess_Impl::getByIndex(sal_Int32 nIndex) /*-- 13.09.99 16:52:30--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Type SwXIndexStyleAccess_Impl::getElementType(void) - throw( uno::RuntimeException ) +uno::Type SAL_CALL +SwXDocumentIndex::StyleAccess_Impl::getElementType() +throw (uno::RuntimeException) { return ::getCppuType((uno::Sequence*)0); } /*-- 13.09.99 16:52:30--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXIndexStyleAccess_Impl::hasElements(void) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXDocumentIndex::StyleAccess_Impl::hasElements() throw (uno::RuntimeException) { return sal_True; } -/* -----------------13.09.99 16:51------------------- - - --------------------------------------------------*/ -/* -----------------------------06.04.00 15:08-------------------------------- +/****************************************************************** + * SwXDocumentIndex::TokenAccess_Impl + ******************************************************************/ +/*-- 13.09.99 16:52:28--------------------------------------------------- - ---------------------------------------------------------------------------*/ -OUString SwXIndexTokenAccess_Impl::getImplementationName(void) throw( uno::RuntimeException ) + -----------------------------------------------------------------------*/ +SwXDocumentIndex::TokenAccess_Impl::TokenAccess_Impl( + SwXDocumentIndex& rParentIdx) + : m_xParent(&rParentIdx) { - return C2U("SwXIndexTokenAccess_Impl"); } -/* -----------------------------06.04.00 15:08-------------------------------- +/*-- 13.09.99 16:52:29--------------------------------------------------- - ---------------------------------------------------------------------------*/ -BOOL SwXIndexTokenAccess_Impl::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) + -----------------------------------------------------------------------*/ +SwXDocumentIndex::TokenAccess_Impl::~TokenAccess_Impl() { - return C2U("com.sun.star.text.DocumentIndexLevelFormat") == rServiceName; } + /* -----------------------------06.04.00 15:08-------------------------------- ---------------------------------------------------------------------------*/ -uno::Sequence< OUString > SwXIndexTokenAccess_Impl::getSupportedServiceNames(void) throw( uno::RuntimeException ) +OUString SAL_CALL +SwXDocumentIndex::TokenAccess_Impl::getImplementationName() +throw (uno::RuntimeException) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.DocumentIndexLevelFormat"); - return aRet; + return C2U("SwXDocumentIndex::TokenAccess_Impl"); } -/*-- 13.09.99 16:52:28--------------------------------------------------- - -----------------------------------------------------------------------*/ -SwXIndexTokenAccess_Impl::SwXIndexTokenAccess_Impl(SwXDocumentIndex& rParentIdx) : - rParent(rParentIdx), - xParent(&rParentIdx), - nCount(0) +static char const*const g_ServicesIndexTokenAccess[] = +{ + "com.sun.star.text.DocumentIndexLevelFormat", +}; +static const size_t g_nServicesIndexTokenAccess( + sizeof(g_ServicesIndexTokenAccess)/sizeof(g_ServicesIndexTokenAccess[0])); + +sal_Bool SAL_CALL +SwXDocumentIndex::TokenAccess_Impl::supportsService( + const OUString& rServiceName) +throw (uno::RuntimeException) { + return ::sw::SupportsServiceImpl( + g_nServicesIndexTokenAccess, g_ServicesIndexTokenAccess, rServiceName); } -/*-- 13.09.99 16:52:29--------------------------------------------------- - -----------------------------------------------------------------------*/ -SwXIndexTokenAccess_Impl::~SwXIndexTokenAccess_Impl() +uno::Sequence< OUString > SAL_CALL +SwXDocumentIndex::TokenAccess_Impl::getSupportedServiceNames() +throw (uno::RuntimeException) { + return ::sw::GetSupportedServiceNamesImpl( + g_nServicesIndexTokenAccess, g_ServicesIndexTokenAccess); } + +struct TokenType { + const char *pName; + const enum FormTokenType eTokenType; +}; + +static const struct TokenType g_TokenTypes[] = +{ + { "TokenEntryNumber", TOKEN_ENTRY_NO }, + { "TokenEntryText", TOKEN_ENTRY_TEXT }, + { "TokenTabStop", TOKEN_TAB_STOP }, + { "TokenText", TOKEN_TEXT }, + { "TokenPageNumber", TOKEN_PAGE_NUMS }, + { "TokenChapterInfo", TOKEN_CHAPTER_INFO }, + { "TokenHyperlinkStart", TOKEN_LINK_START }, + { "TokenHyperlinkEnd", TOKEN_LINK_END }, + { "TokenBibliographyDataField", TOKEN_AUTHORITY }, + { 0, static_cast(0) } +}; + /*-- 13.09.99 16:52:29--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXIndexTokenAccess_Impl::replaceByIndex(sal_Int32 nIndex, const uno::Any& rElement) - throw( lang::IllegalArgumentException, lang::IndexOutOfBoundsException, - lang::WrappedTargetException, uno::RuntimeException) +void SAL_CALL +SwXDocumentIndex::TokenAccess_Impl::replaceByIndex( + sal_Int32 nIndex, const uno::Any& rElement) +throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, + lang::WrappedTargetException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwTOXBase * pTOXBase( &rParent.m_pImpl->GetTOXSectionOrThrow() ); + SwTOXBase & rTOXBase( m_xParent->m_pImpl->GetTOXSectionOrThrow() ); - if(nIndex < 0 || - (nIndex > pTOXBase->GetTOXForm().GetFormMax())) - throw lang::IndexOutOfBoundsException(); + if ((nIndex < 0) || (nIndex > rTOXBase.GetTOXForm().GetFormMax())) + { + throw lang::IndexOutOfBoundsException(); + } uno::Sequence aSeq; if(!(rElement >>= aSeq)) + { throw lang::IllegalArgumentException(); - + } String sPattern; - sal_Int32 nTokens = aSeq.getLength(); + const sal_Int32 nTokens = aSeq.getLength(); const beans::PropertyValues* pTokens = aSeq.getConstArray(); for(sal_Int32 i = 0; i < nTokens; i++) { const beans::PropertyValue* pProperties = pTokens[i].getConstArray(); - sal_Int32 nProperties = pTokens[i].getLength(); + const sal_Int32 nProperties = pTokens[i].getLength(); //create an invalid token SwFormToken aToken(TOKEN_END); for(sal_Int32 j = 0; j < nProperties; j++) { - if( COMPARE_EQUAL == pProperties[j].Name.compareToAscii("TokenType")) + if (pProperties[j].Name.equalsAscii("TokenType")) { - const String sTokenType = + const OUString sTokenType = lcl_AnyToString(pProperties[j].Value); - if(sTokenType.EqualsAscii("TokenEntryNumber")) - aToken.eTokenType = TOKEN_ENTRY_NO; - else if(sTokenType.EqualsAscii("TokenEntryText" )) - aToken.eTokenType = TOKEN_ENTRY_TEXT; - else if(sTokenType.EqualsAscii("TokenTabStop" )) - aToken.eTokenType = TOKEN_TAB_STOP; - else if(sTokenType.EqualsAscii("TokenText" )) - aToken.eTokenType = TOKEN_TEXT; - else if(sTokenType.EqualsAscii("TokenPageNumber")) - aToken.eTokenType = TOKEN_PAGE_NUMS; - else if(sTokenType.EqualsAscii("TokenChapterInfo" )) - aToken.eTokenType = TOKEN_CHAPTER_INFO; - else if(sTokenType.EqualsAscii("TokenHyperlinkStart" )) - aToken.eTokenType = TOKEN_LINK_START; - else if(sTokenType.EqualsAscii("TokenHyperlinkEnd")) - aToken.eTokenType = TOKEN_LINK_END; - else if(sTokenType.EqualsAscii("TokenBibliographyDataField" )) - aToken.eTokenType = TOKEN_AUTHORITY; + for (TokenType const* pTokenType = g_TokenTypes; + pTokenType->pName; ++pTokenType) + { + if (sTokenType.equalsAscii(pTokenType->pName)) + { + aToken.eTokenType = pTokenType->eTokenType; + break; + } + } } - else if( pProperties[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CharacterStyleName" ) )) + else if (pProperties[j].Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("CharacterStyleName"))) { String sCharStyleName; SwStyleNameMapper::FillUIName( @@ -2642,54 +2793,68 @@ void SwXIndexTokenAccess_Impl::replaceByIndex(sal_Int32 nIndex, const uno::Any& sal_True); aToken.sCharStyleName = sCharStyleName; aToken.nPoolId = SwStyleNameMapper::GetPoolIdFromUIName ( - sCharStyleName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + sCharStyleName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); } - else if( pProperties[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TabStopRightAligned") )) + else if (pProperties[j].Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("TabStopRightAligned"))) { - sal_Bool bRight = lcl_AnyToBool(pProperties[j].Value); + const sal_Bool bRight = lcl_AnyToBool(pProperties[j].Value); aToken.eTabAlign = bRight ? SVX_TAB_ADJUST_END : SVX_TAB_ADJUST_LEFT; } - else if( pProperties[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TabStopPosition" ))) + else if (pProperties[j].Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("TabStopPosition"))) { sal_Int32 nPosition = 0; - if(pProperties[j].Value.getValueType() != ::getCppuType((sal_Int32*)0)) + if (!(pProperties[j].Value >>= nPosition)) + { throw lang::IllegalArgumentException(); - pProperties[j].Value >>= nPosition; + } nPosition = MM100_TO_TWIP(nPosition); if(nPosition < 0) + { throw lang::IllegalArgumentException(); + } aToken.nTabStopPosition = nPosition; } - else if( pProperties[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TabStopFillCharacter" ))) + else if (pProperties[j].Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("TabStopFillCharacter"))) { - const String sFillChar = + const OUString sFillChar = lcl_AnyToString(pProperties[j].Value); - if(sFillChar.Len() > 1) + if (sFillChar.getLength() > 1) + { throw lang::IllegalArgumentException(); - aToken.cTabFillChar = sFillChar.Len() ? - sFillChar.GetChar(0) : ' '; + } + aToken.cTabFillChar = + (sFillChar.getLength()) ? sFillChar[0] : ' '; } - else if( pProperties[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Text" ))) + else if (pProperties[j].Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("Text"))) { - const String sText = - lcl_AnyToString(pProperties[j].Value); + const OUString sText = lcl_AnyToString(pProperties[j].Value); aToken.sText = sText; } - else if( pProperties[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ChapterFormat" ))) + else if (pProperties[j].Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("ChapterFormat"))) { sal_Int16 nFormat = lcl_AnyToInt16(pProperties[j].Value); switch(nFormat) { - case text::ChapterFormat::NUMBER: nFormat = CF_NUMBER; + case text::ChapterFormat::NUMBER: + nFormat = CF_NUMBER; break; - case text::ChapterFormat::NAME: nFormat = CF_TITLE; + case text::ChapterFormat::NAME: + nFormat = CF_TITLE; break; - case text::ChapterFormat::NAME_NUMBER: nFormat = CF_NUM_TITLE; + case text::ChapterFormat::NAME_NUMBER: + nFormat = CF_NUM_TITLE; break; - case text::ChapterFormat::NO_PREFIX_SUFFIX:nFormat = CF_NUMBER_NOPREPST; + case text::ChapterFormat::NO_PREFIX_SUFFIX: + nFormat = CF_NUMBER_NOPREPST; break; - case text::ChapterFormat::DIGIT: nFormat = CF_NUM_NOPREPST_TITLE; + case text::ChapterFormat::DIGIT: + nFormat = CF_NUM_NOPREPST_TITLE; break; default: throw lang::IllegalArgumentException(); @@ -2697,15 +2862,19 @@ void SwXIndexTokenAccess_Impl::replaceByIndex(sal_Int32 nIndex, const uno::Any& aToken.nChapterFormat = nFormat; } //--->i53420 - else if( pProperties[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ChapterLevel")) ) + else if (pProperties[j].Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("ChapterLevel"))) { const sal_Int16 nLevel = lcl_AnyToInt16(pProperties[j].Value); if( nLevel < 1 || nLevel > MAXLEVEL ) + { throw lang::IllegalArgumentException(); + } aToken.nOutlineLevel = nLevel; } //<--- - else if( pProperties[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("BibliographyDataField"))) + else if (pProperties[j].Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("BibliographyDataField"))) { sal_Int16 nType = 0; pProperties[j].Value >>= nType; @@ -2719,7 +2888,8 @@ void SwXIndexTokenAccess_Impl::replaceByIndex(sal_Int32 nIndex, const uno::Any& aToken.nAuthorityField = nType; } // #i21237# - else if ( pProperties[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("WithTab"))) + else if (pProperties[j].Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("WithTab"))) { aToken.bWithTab = lcl_AnyToBool(pProperties[j].Value); } @@ -2727,17 +2897,22 @@ void SwXIndexTokenAccess_Impl::replaceByIndex(sal_Int32 nIndex, const uno::Any& } //exception if wrong TokenType if(TOKEN_END <= aToken.eTokenType ) + { throw lang::IllegalArgumentException(); + } // set TokenType from TOKEN_ENTRY_TEXT to TOKEN_ENTRY if it is // not a content index if(TOKEN_ENTRY_TEXT == aToken.eTokenType && - TOX_CONTENT != pTOXBase->GetType()) + (TOX_CONTENT != rTOXBase.GetType())) + { aToken.eTokenType = TOKEN_ENTRY; + } //---> i53420 // check for chapter format allowed values if it was TOKEN_ENTRY_NO type // only allowed value are CF_NUMBER and CF_NUM_NOPREPST_TITLE // reading from file if( TOKEN_ENTRY_NO == aToken.eTokenType ) + { switch(aToken.nChapterFormat) { case CF_NUMBER: @@ -2746,41 +2921,47 @@ void SwXIndexTokenAccess_Impl::replaceByIndex(sal_Int32 nIndex, const uno::Any& default: throw lang::IllegalArgumentException(); } + } //<--- sPattern += aToken.GetString(); } - SwForm aForm(pTOXBase->GetTOXForm()); - aForm.SetPattern((sal_uInt16) nIndex, sPattern); - pTOXBase->SetTOXForm(aForm); + SwForm aForm(rTOXBase.GetTOXForm()); + aForm.SetPattern(static_cast(nIndex), sPattern); + rTOXBase.SetTOXForm(aForm); } + /*-- 13.09.99 16:52:29--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Int32 SwXIndexTokenAccess_Impl::getCount(void) throw( uno::RuntimeException ) +sal_Int32 SAL_CALL +SwXDocumentIndex::TokenAccess_Impl::getCount() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - const sal_Int32 nRet = rParent.m_pImpl->GetFormMax(); + const sal_Int32 nRet = m_xParent->m_pImpl->GetFormMax(); return nRet; } + /*-- 13.09.99 16:52:30--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXIndexTokenAccess_Impl::getByIndex(sal_Int32 nIndex) - throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, - uno::RuntimeException) +uno::Any SAL_CALL +SwXDocumentIndex::TokenAccess_Impl::getByIndex(sal_Int32 nIndex) +throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwTOXBase * pTOXBase( &rParent.m_pImpl->GetTOXSectionOrThrow() ); + SwTOXBase & rTOXBase( m_xParent->m_pImpl->GetTOXSectionOrThrow() ); - if(nIndex < 0 || - (nIndex > pTOXBase->GetTOXForm().GetFormMax())) + if ((nIndex < 0) || (nIndex > rTOXBase.GetTOXForm().GetFormMax())) + { throw lang::IndexOutOfBoundsException(); + } // #i21237# - SwFormTokens aPattern = pTOXBase->GetTOXForm(). - GetPattern((sal_uInt16) nIndex); + SwFormTokens aPattern = rTOXBase.GetTOXForm(). + GetPattern(static_cast(nIndex)); SwFormTokens::iterator aIt = aPattern.begin(); sal_uInt16 nTokenCount = 0; @@ -2793,7 +2974,8 @@ uno::Any SwXIndexTokenAccess_Impl::getByIndex(sal_Int32 nIndex) beans::PropertyValues* pTokenProps = aRetSeq.getArray(); SwFormToken aToken = *aIt; // #i21237# - uno::Sequence< beans::PropertyValue >& rCurTokenSeq = pTokenProps[nTokenCount-1]; + uno::Sequence< beans::PropertyValue >& rCurTokenSeq = + pTokenProps[nTokenCount-1]; SwStyleNameMapper::FillProgName( aToken.sCharStyleName, aString, @@ -2802,25 +2984,30 @@ uno::Any SwXIndexTokenAccess_Impl::getByIndex(sal_Int32 nIndex) const OUString aProgCharStyle( aString ); switch(aToken.eTokenType) { - case TOKEN_ENTRY_NO : + case TOKEN_ENTRY_NO: { //--->i53420 // writing to file (from doc to properties) sal_Int32 nElements = 2; sal_Int32 nCurrentElement = 0; - if( aToken.nChapterFormat != CF_NUMBER )//check for default value + // check for default value + if (aToken.nChapterFormat != CF_NUMBER) + { nElements++;//we need the element + } if( aToken.nOutlineLevel != MAXLEVEL ) + { nElements++; + } rCurTokenSeq.realloc( nElements ); beans::PropertyValue* pArr = rCurTokenSeq.getArray(); pArr[nCurrentElement].Name = C2U("TokenType"); - pArr[nCurrentElement++].Value <<= OUString::createFromAscii("TokenEntryNumber"); -// pArr[0].Value <<= C2U("TokenEntryNumber"); + pArr[nCurrentElement++].Value <<= + OUString::createFromAscii("TokenEntryNumber"); pArr[nCurrentElement].Name = C2U("CharacterStyleName"); pArr[nCurrentElement++].Value <<= aProgCharStyle; @@ -2828,18 +3015,24 @@ uno::Any SwXIndexTokenAccess_Impl::getByIndex(sal_Int32 nIndex) { pArr[nCurrentElement].Name = C2U("ChapterFormat"); sal_Int16 nVal; -//! the allowed values for chapter format, when used as entry number, are CF_NUMBER and CF_NUM_NOPREPST_TITLE only, all else forced to +// the allowed values for chapter format, when used as entry number, +// are CF_NUMBER and CF_NUM_NOPREPST_TITLE only, all else forced to //CF_NUMBER switch(aToken.nChapterFormat) { default: - case CF_NUMBER: nVal = text::ChapterFormat::NUMBER; break; - case CF_NUM_NOPREPST_TITLE: nVal = text::ChapterFormat::DIGIT; break; + case CF_NUMBER: + nVal = text::ChapterFormat::NUMBER; + break; + case CF_NUM_NOPREPST_TITLE: + nVal = text::ChapterFormat::DIGIT; + break; } - pArr[nCurrentElement++].Value <<= (sal_Int16)nVal; + pArr[nCurrentElement++].Value <<= nVal; } - if( aToken.nOutlineLevel != MAXLEVEL ) //only a ChapterLevel != MAXLEVEL is registered + // only a ChapterLevel != MAXLEVEL is registered + if (aToken.nOutlineLevel != MAXLEVEL) { pArr[nCurrentElement].Name = C2U("ChapterLevel"); pArr[nCurrentElement].Value <<= aToken.nOutlineLevel; @@ -2847,8 +3040,8 @@ uno::Any SwXIndexTokenAccess_Impl::getByIndex(sal_Int32 nIndex) //<--- } break; - case TOKEN_ENTRY : // no difference between Entry and Entry Text - case TOKEN_ENTRY_TEXT : + case TOKEN_ENTRY: // no difference between Entry and Entry Text + case TOKEN_ENTRY_TEXT: { rCurTokenSeq.realloc( 2 ); beans::PropertyValue* pArr = rCurTokenSeq.getArray(); @@ -2860,7 +3053,7 @@ uno::Any SwXIndexTokenAccess_Impl::getByIndex(sal_Int32 nIndex) pArr[1].Value <<= aProgCharStyle; } break; - case TOKEN_TAB_STOP : + case TOKEN_TAB_STOP: { rCurTokenSeq.realloc(5); // #i21237# beans::PropertyValue* pArr = rCurTokenSeq.getArray(); @@ -2868,7 +3061,6 @@ uno::Any SwXIndexTokenAccess_Impl::getByIndex(sal_Int32 nIndex) pArr[0].Name = C2U("TokenType"); pArr[0].Value <<= OUString::createFromAscii("TokenTabStop"); - if(SVX_TAB_ADJUST_END == aToken.eTabAlign) { pArr[1].Name = C2U("TabStopRightAligned"); @@ -2889,10 +3081,10 @@ uno::Any SwXIndexTokenAccess_Impl::getByIndex(sal_Int32 nIndex) pArr[3].Value <<= aProgCharStyle; // #i21237# pArr[4].Name = C2U("WithTab"); - pArr[4].Value.setValue(&aToken.bWithTab, ::getCppuBooleanType()); + pArr[4].Value <<= static_cast(aToken.bWithTab); } break; - case TOKEN_TEXT : + case TOKEN_TEXT: { rCurTokenSeq.realloc( 3 ); beans::PropertyValue* pArr = rCurTokenSeq.getArray(); @@ -2907,7 +3099,7 @@ uno::Any SwXIndexTokenAccess_Impl::getByIndex(sal_Int32 nIndex) pArr[2].Value <<= OUString(aToken.sText); } break; - case TOKEN_PAGE_NUMS : + case TOKEN_PAGE_NUMS: { rCurTokenSeq.realloc( 2 ); beans::PropertyValue* pArr = rCurTokenSeq.getArray(); @@ -2919,7 +3111,7 @@ uno::Any SwXIndexTokenAccess_Impl::getByIndex(sal_Int32 nIndex) pArr[1].Value <<= aProgCharStyle; } break; - case TOKEN_CHAPTER_INFO : + case TOKEN_CHAPTER_INFO: { rCurTokenSeq.realloc( 4 ); beans::PropertyValue* pArr = rCurTokenSeq.getArray(); @@ -2934,13 +3126,23 @@ uno::Any SwXIndexTokenAccess_Impl::getByIndex(sal_Int32 nIndex) sal_Int16 nVal = text::ChapterFormat::NUMBER; switch(aToken.nChapterFormat) { - case CF_NUMBER: nVal = text::ChapterFormat::NUMBER; break; - case CF_TITLE: nVal = text::ChapterFormat::NAME; break; - case CF_NUM_TITLE: nVal = text::ChapterFormat::NAME_NUMBER; break; - case CF_NUMBER_NOPREPST: nVal = text::ChapterFormat::NO_PREFIX_SUFFIX; break; - case CF_NUM_NOPREPST_TITLE: nVal = text::ChapterFormat::DIGIT; break; + case CF_NUMBER: + nVal = text::ChapterFormat::NUMBER; + break; + case CF_TITLE: + nVal = text::ChapterFormat::NAME; + break; + case CF_NUM_TITLE: + nVal = text::ChapterFormat::NAME_NUMBER; + break; + case CF_NUMBER_NOPREPST: + nVal = text::ChapterFormat::NO_PREFIX_SUFFIX; + break; + case CF_NUM_NOPREPST_TITLE: + nVal = text::ChapterFormat::DIGIT; + break; } - pArr[2].Value <<= (sal_Int16)nVal; + pArr[2].Value <<= nVal; //--->i53420 pArr[3].Name = C2U("ChapterLevel"); // @@ -2948,33 +3150,36 @@ uno::Any SwXIndexTokenAccess_Impl::getByIndex(sal_Int32 nIndex) //<--- } break; - case TOKEN_LINK_START : + case TOKEN_LINK_START: { rCurTokenSeq.realloc( 2 ); beans::PropertyValue* pArr = rCurTokenSeq.getArray(); pArr[0].Name = C2U("TokenType"); - pArr[0].Value <<= OUString::createFromAscii("TokenHyperlinkStart"); + pArr[0].Value <<= + OUString::createFromAscii("TokenHyperlinkStart"); pArr[1].Name = C2U("CharacterStyleName"); pArr[1].Value <<= aProgCharStyle; } break; - case TOKEN_LINK_END : + case TOKEN_LINK_END: { rCurTokenSeq.realloc( 1 ); beans::PropertyValue* pArr = rCurTokenSeq.getArray(); pArr[0].Name = C2U("TokenType"); - pArr[0].Value <<= OUString::createFromAscii("TokenHyperlinkEnd"); + pArr[0].Value <<= + OUString::createFromAscii("TokenHyperlinkEnd"); } break; - case TOKEN_AUTHORITY : + case TOKEN_AUTHORITY: { rCurTokenSeq.realloc( 3 ); beans::PropertyValue* pArr = rCurTokenSeq.getArray(); pArr[0].Name = C2U("TokenType"); - pArr[0].Value <<= OUString::createFromAscii("TokenBibliographyDataField"); + pArr[0].Value <<= + OUString::createFromAscii("TokenBibliographyDataField"); pArr[1].Name = C2U("CharacterStyleName"); pArr[1].Value <<= aProgCharStyle; @@ -2991,22 +3196,26 @@ uno::Any SwXIndexTokenAccess_Impl::getByIndex(sal_Int32 nIndex) aIt++; // #i21237# } - uno::Any aRet(&aRetSeq, ::getCppuType((uno::Sequence< beans::PropertyValues >*)0)); - + uno::Any aRet; + aRet <<= aRetSeq; return aRet; } + /*-- 13.09.99 16:52:30--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Type SwXIndexTokenAccess_Impl::getElementType(void) - throw( uno::RuntimeException ) +uno::Type SAL_CALL +SwXDocumentIndex::TokenAccess_Impl::getElementType() +throw (uno::RuntimeException) { return ::getCppuType((uno::Sequence< beans::PropertyValues >*)0); } /*-- 13.09.99 16:52:30--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXIndexTokenAccess_Impl::hasElements(void) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXDocumentIndex::TokenAccess_Impl::hasElements() +throw (uno::RuntimeException) { return sal_True; } -- cgit v1.2.3 From c6686b209ccf4f643bdc06b531e475e385dc21c4 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:59 +0100 Subject: swunolocking1: #i105557#: SwXDocumentIndexes: use new XServiceInfo helpers. clean up the implementation a little. --- sw/inc/unoidx.hxx | 67 ++++++++++------- sw/source/core/unocore/unoidx.cxx | 150 +++++++++++++++++++++++--------------- 2 files changed, 131 insertions(+), 86 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unoidx.hxx b/sw/inc/unoidx.hxx index 553e6e8f7e..c4737e0e68 100644 --- a/sw/inc/unoidx.hxx +++ b/sw/inc/unoidx.hxx @@ -271,46 +271,57 @@ public: SwDoc* pDoc); void Invalidate(); }; + /* -----------------05.05.99 12:27------------------- * * --------------------------------------------------*/ - -class SwXDocumentIndexes : public SwCollectionBaseClass, - public SwUnoCollection +class SwXDocumentIndexes + : public SwCollectionBaseClass + , public SwUnoCollection { -protected: - virtual ~SwXDocumentIndexes(); -public: - SwXDocumentIndexes(SwDoc* pDoc); - -// SMART_UNO_DECLARATION( SwXDocumentIndexes, UsrObject ); +private: -// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen! -// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void) + virtual ~SwXDocumentIndexes(); -// throw( ::com::sun::star::uno::RuntimeException ); -// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen! -// virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut ); +public: + SwXDocumentIndexes(SwDoc *const pDoc); - //XNameAccess - virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( + const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() + throw (::com::sun::star::uno::RuntimeException); - //XIndexAccess - virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() + throw (::com::sun::star::uno::RuntimeException); - //XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + // XIndexAccess + virtual sal_Int32 SAL_CALL getCount() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) + throw (::com::sun::star::lang::IndexOutOfBoundsException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + // XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName( + const ::rtl::OUString& rName) + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getElementNames() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasByName(const ::rtl::OUString& rName) + throw (::com::sun::star::uno::RuntimeException); }; diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 76f28ac107..ee94746f0a 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -2312,49 +2312,63 @@ void SwXDocumentIndexMark::Invalidate() m_pDoc = 0; } } -/* -----------------------------06.04.00 15:08-------------------------------- - ---------------------------------------------------------------------------*/ -OUString SwXDocumentIndexes::getImplementationName(void) throw( uno::RuntimeException ) +/****************************************************************** + * SwXDocumentIndexes + ******************************************************************/ +/*-- 05.05.99 13:14:59--------------------------------------------------- + + -----------------------------------------------------------------------*/ +SwXDocumentIndexes::SwXDocumentIndexes(SwDoc *const _pDoc) + : SwUnoCollection(_pDoc) { - return C2U("SwXDocumentIndexes"); } -/* -----------------------------06.04.00 15:08-------------------------------- +/*-- 05.05.99 13:15:00--------------------------------------------------- - ---------------------------------------------------------------------------*/ -BOOL SwXDocumentIndexes::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) + -----------------------------------------------------------------------*/ +SwXDocumentIndexes::~SwXDocumentIndexes() { - return C2U("com.sun.star.text.DocumentIndexes") == rServiceName; } + /* -----------------------------06.04.00 15:08-------------------------------- ---------------------------------------------------------------------------*/ -uno::Sequence< OUString > SwXDocumentIndexes::getSupportedServiceNames(void) throw( uno::RuntimeException ) +OUString SAL_CALL +SwXDocumentIndexes::getImplementationName() throw (uno::RuntimeException) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.DocumentIndexes"); - return aRet; + return C2U("SwXDocumentIndexes"); } -/*-- 05.05.99 13:14:59--------------------------------------------------- - -----------------------------------------------------------------------*/ -SwXDocumentIndexes::SwXDocumentIndexes(SwDoc* _pDoc) : - SwUnoCollection(_pDoc) +static char const*const g_ServicesDocumentIndexes[] = +{ + "com.sun.star.text.DocumentIndexes", +}; +static const size_t g_nServicesDocumentIndexes( + sizeof(g_ServicesDocumentIndexes)/sizeof(g_ServicesDocumentIndexes[0])); + +sal_Bool SAL_CALL +SwXDocumentIndexes::supportsService(const OUString& rServiceName) +throw (uno::RuntimeException) { + return ::sw::SupportsServiceImpl( + g_nServicesDocumentIndexes, g_ServicesDocumentIndexes, rServiceName); } -/*-- 05.05.99 13:15:00--------------------------------------------------- - -----------------------------------------------------------------------*/ -SwXDocumentIndexes::~SwXDocumentIndexes() +uno::Sequence< OUString > SAL_CALL +SwXDocumentIndexes::getSupportedServiceNames() throw (uno::RuntimeException) { + return ::sw::GetSupportedServiceNamesImpl( + g_nServicesDocumentIndexes, g_ServicesDocumentIndexes); } + /*-- 05.05.99 13:15:01--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Int32 SwXDocumentIndexes::getCount(void) throw( uno::RuntimeException ) +sal_Int32 SAL_CALL +SwXDocumentIndexes::getCount() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + if(!IsValid()) throw uno::RuntimeException(); @@ -2365,17 +2379,23 @@ sal_Int32 SwXDocumentIndexes::getCount(void) throw( uno::RuntimeException ) const SwSection* pSect = rFmts[ n ]->GetSection(); if( TOX_CONTENT_SECTION == pSect->GetType() && pSect->GetFmt()->GetSectionNode() ) + { ++nRet; + } } return nRet; } + /*-- 05.05.99 13:15:01--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXDocumentIndexes::getByIndex(sal_Int32 nIndex) - throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException ) +uno::Any SAL_CALL +SwXDocumentIndexes::getByIndex(sal_Int32 nIndex) +throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + if(!IsValid()) throw uno::RuntimeException(); @@ -2388,14 +2408,14 @@ uno::Any SwXDocumentIndexes::getByIndex(sal_Int32 nIndex) if( TOX_CONTENT_SECTION == pSect->GetType() && pSect->GetFmt()->GetSectionNode() && nIdx++ == nIndex ) - { - const uno::Reference< text::XDocumentIndex > xTmp = - SwXDocumentIndex::CreateXDocumentIndex( - *GetDoc(), static_cast(*pSect)); - uno::Any aRet; - aRet <<= xTmp; - return aRet; - } + { + const uno::Reference< text::XDocumentIndex > xTmp = + SwXDocumentIndex::CreateXDocumentIndex( + *GetDoc(), static_cast(*pSect)); + uno::Any aRet; + aRet <<= xTmp; + return aRet; + } } throw lang::IndexOutOfBoundsException(); @@ -2404,14 +2424,16 @@ uno::Any SwXDocumentIndexes::getByIndex(sal_Int32 nIndex) /*-- 31.01.00 10:12:31--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXDocumentIndexes::getByName(const OUString& rName) - throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException ) +uno::Any SAL_CALL +SwXDocumentIndexes::getByName(const OUString& rName) +throw (container::NoSuchElementException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + if(!IsValid()) throw uno::RuntimeException(); - String sToFind(rName); const SwSectionFmts& rFmts = GetDoc()->GetSections(); for( sal_uInt16 n = 0; n < rFmts.Count(); ++n ) @@ -2419,25 +2441,28 @@ uno::Any SwXDocumentIndexes::getByName(const OUString& rName) const SwSection* pSect = rFmts[ n ]->GetSection(); if( TOX_CONTENT_SECTION == pSect->GetType() && pSect->GetFmt()->GetSectionNode() && - ((SwTOXBaseSection*)pSect)->GetTOXName() == sToFind) - { - const uno::Reference< text::XDocumentIndex > xTmp = - SwXDocumentIndex::CreateXDocumentIndex( - *GetDoc(), static_cast(*pSect)); - uno::Any aRet; - aRet <<= xTmp; - return aRet; - } + (static_cast(pSect)->GetTOXName() + == sToFind)) + { + const uno::Reference< text::XDocumentIndex > xTmp = + SwXDocumentIndex::CreateXDocumentIndex( + *GetDoc(), static_cast(*pSect)); + uno::Any aRet; + aRet <<= xTmp; + return aRet; + } } throw container::NoSuchElementException(); } + /*-- 31.01.00 10:12:31--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Sequence< OUString > SwXDocumentIndexes::getElementNames(void) - throw( uno::RuntimeException ) +uno::Sequence< OUString > SAL_CALL +SwXDocumentIndexes::getElementNames() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + if(!IsValid()) throw uno::RuntimeException(); @@ -2446,10 +2471,12 @@ uno::Sequence< OUString > SwXDocumentIndexes::getElementNames(void) sal_uInt16 n; for( n = 0; n < rFmts.Count(); ++n ) { - const SwSection* pSect = rFmts[ n ]->GetSection(); + SwSection const*const pSect = rFmts[ n ]->GetSection(); if( TOX_CONTENT_SECTION == pSect->GetType() && pSect->GetFmt()->GetSectionNode() ) + { ++nCount; + } } uno::Sequence< OUString > aRet(nCount); @@ -2457,22 +2484,26 @@ uno::Sequence< OUString > SwXDocumentIndexes::getElementNames(void) sal_uInt16 nCnt; for( n = 0, nCnt = 0; n < rFmts.Count(); ++n ) { - const SwSection* pSect = rFmts[ n ]->GetSection(); + SwSection const*const pSect = rFmts[ n ]->GetSection(); if( TOX_CONTENT_SECTION == pSect->GetType() && pSect->GetFmt()->GetSectionNode()) { - pArray[nCnt++] = OUString(((SwTOXBaseSection*)pSect)->GetTOXName()); + pArray[nCnt++] = OUString( + static_cast(pSect)->GetTOXName()); } } return aRet; } + /*-- 31.01.00 10:12:31--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXDocumentIndexes::hasByName(const OUString& rName) - throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXDocumentIndexes::hasByName(const OUString& rName) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + if(!IsValid()) throw uno::RuntimeException(); @@ -2480,31 +2511,34 @@ sal_Bool SwXDocumentIndexes::hasByName(const OUString& rName) const SwSectionFmts& rFmts = GetDoc()->GetSections(); for( sal_uInt16 n = 0; n < rFmts.Count(); ++n ) { - const SwSection* pSect = rFmts[ n ]->GetSection(); + SwSection const*const pSect = rFmts[ n ]->GetSection(); if( TOX_CONTENT_SECTION == pSect->GetType() && pSect->GetFmt()->GetSectionNode()) { - if(((SwTOXBaseSection*)pSect)->GetTOXName() == sToFind) + if (static_cast(pSect)->GetTOXName() + == sToFind) + { return sal_True; + } } } return sal_False; } + /*-- 05.05.99 13:15:01--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Type SwXDocumentIndexes::getElementType(void) throw( uno::RuntimeException ) +uno::Type SAL_CALL +SwXDocumentIndexes::getElementType() throw (uno::RuntimeException) { - return ::getCppuType((uno::Reference< text::XDocumentIndex> *)0); + return text::XDocumentIndex::static_type(); } /*-- 05.05.99 13:15:02--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwXDocumentIndexes::hasElements(void) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXDocumentIndexes::hasElements() throw (uno::RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); - if(!IsValid()) - throw uno::RuntimeException(); return 0 != getCount(); } -- cgit v1.2.3 From f19eba067c58629044292831eba09d85fd767679 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:59 +0100 Subject: swunolocking1: #i105557#: fix locking for SwXDocumentIndexMark: add Impl struct, and use UnoImplPtr to lock destructor. move all implementation details out of header, into Impl struct. disable broken SwClient iteration. make constructor private, and add factory function CreateXDocumentIndexMark. use new XUnoTunnel helpers. clean up the implementation a little. remove SwXDocumentIndexMark::GetObject(). --- sw/inc/unoidx.hxx | 179 +++--- sw/source/core/unocore/unoclbck.cxx | 12 +- sw/source/core/unocore/unocrsrhelper.cxx | 8 +- sw/source/core/unocore/unoidx.cxx | 992 ++++++++++++++++++------------- sw/source/core/unocore/unoportenum.cxx | 5 +- 5 files changed, 700 insertions(+), 496 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unoidx.hxx b/sw/inc/unoidx.hxx index c4737e0e68..4824068b3f 100644 --- a/sw/inc/unoidx.hxx +++ b/sw/inc/unoidx.hxx @@ -36,14 +36,13 @@ #include #include +#include #include -#include #include #include -class SfxItemPropertySet; class SwTOXBaseSection; class SwTOXMark; class SwTOXType; @@ -189,87 +188,129 @@ public: /* -----------------07.12.98 10:08------------------- * * --------------------------------------------------*/ -class SwXDocumentIndexMark : public cppu::WeakImplHelper4 -< - ::com::sun::star::text::XDocumentIndexMark, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::lang::XUnoTunnel ->, - public SwClient +typedef ::cppu::WeakImplHelper4 +< ::com::sun::star::lang::XUnoTunnel +, ::com::sun::star::lang::XServiceInfo +, ::com::sun::star::beans::XPropertySet +, ::com::sun::star::text::XDocumentIndexMark +> SwXDocumentIndexMark_Base; + +class SwXDocumentIndexMark + : public SwXDocumentIndexMark_Base { - SwEventListenerContainer aLstnrCntnr; - SwDepend aTypeDepend; - SwDoc* m_pDoc; - const SwTOXMark* m_pTOXMark; - const SfxItemPropertySet* m_pPropSet; - - sal_Bool bIsDescriptor; - sal_Bool bMainEntry; - TOXTypes eType; - sal_uInt16 nLevel; - String sAltText; - String sPrimaryKey; - String sSecondaryKey; - String sTextReading; - String sPrimaryKeyReading; - String sSecondaryKeyReading; - String sUserIndexName; - - void InitMap(TOXTypes eToxType); -protected: + +private: + + class Impl; + ::sw::UnoImplPtr m_pImpl; + virtual ~SwXDocumentIndexMark(); -public: - SwXDocumentIndexMark(TOXTypes eToxType); - SwXDocumentIndexMark(const SwTOXType* pType, - const SwTOXMark* pMark, - SwDoc* pDc); - - TYPEINFO(); + SwXDocumentIndexMark(SwDoc & rDoc, + SwTOXType & rType, const SwTOXMark & rMark); - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); +public: - //XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + /// descriptor + SwXDocumentIndexMark(const TOXTypes eToxType); - virtual rtl::OUString SAL_CALL getMarkEntry(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setMarkEntry(const rtl::OUString& aIndexEntry) throw( ::com::sun::star::uno::RuntimeException ); + static ::com::sun::star::uno::Reference< + ::com::sun::star::text::XDocumentIndexMark> + CreateXDocumentIndexMark(SwDoc & rDoc, + SwTOXType & rType, const SwTOXMark & rMark); - //XTextContent - virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException ); + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - //XComponent - virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + // XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( + const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier) + throw (::com::sun::star::uno::RuntimeException); - //XPropertySet - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( + const ::rtl::OUString& rServiceName) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames() + throw (::com::sun::star::uno::RuntimeException); - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + // XComponent + virtual void SAL_CALL dispose() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener) + throw (::com::sun::star::uno::RuntimeException); - //SwClient - virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + // XPropertySet + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Any& rValue) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( + const ::rtl::OUString& rPropertyName) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( + const ::rtl::OUString& rPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& xListener) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); - void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + // XTextContent + virtual void SAL_CALL attach( + const ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & xTextRange) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > SAL_CALL getAnchor() + throw (::com::sun::star::uno::RuntimeException); - SwTOXType* GetTOXType() const {return (SwTOXType*)aTypeDepend.GetRegisteredIn();} - const SwTOXMark* GetTOXMark() const {return m_pTOXMark;} + // XDocumentIndexMark + virtual rtl::OUString SAL_CALL getMarkEntry() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setMarkEntry(const rtl::OUString& rIndexEntry) + throw (::com::sun::star::uno::RuntimeException); - static SwXDocumentIndexMark* GetObject(SwTOXType* pType, const SwTOXMark* pMark, - SwDoc* pDoc); - void Invalidate(); }; /* -----------------05.05.99 12:27------------------- diff --git a/sw/source/core/unocore/unoclbck.cxx b/sw/source/core/unocore/unoclbck.cxx index 96ba9b2421..a05a37abf7 100644 --- a/sw/source/core/unocore/unoclbck.cxx +++ b/sw/source/core/unocore/unoclbck.cxx @@ -78,18 +78,8 @@ SwXFootnote* SwUnoCallBack::GetFootnote(const SwFmtFtn& rMark) /* -----------------------------27.11.00 17:15-------------------------------- ---------------------------------------------------------------------------*/ -SwXDocumentIndexMark* SwUnoCallBack::GetTOXMark(const SwTOXMark& rMark) +SwXDocumentIndexMark* SwUnoCallBack::GetTOXMark(const SwTOXMark& /*rMark*/) { - SwClientIter aIter( *this ); - SwXDocumentIndexMark* pxIndexMark = (SwXDocumentIndexMark*)aIter.First( TYPE( SwXDocumentIndexMark )); - while(pxIndexMark) - { - const SwTOXMark* pMark = pxIndexMark->GetTOXMark(); - if(pMark == &rMark) - return pxIndexMark; - - pxIndexMark = (SwXDocumentIndexMark*)aIter.Next( ); - } return 0; } diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 739378f3fb..cb0aa83e22 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -314,9 +314,11 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry if( pAny ) { const SwTOXMark& rMark = pTxtAttr->GetTOXMark(); - uno::Reference< XDocumentIndexMark > xRef = SwXDocumentIndexMark::GetObject( - (SwTOXType*)rMark.GetTOXType(), &rMark, rPam.GetDoc()); - pAny->setValue(&xRef, ::getCppuType((uno::Reference*)0)); + const uno::Reference< text::XDocumentIndexMark > xRef = + SwXDocumentIndexMark::CreateXDocumentIndexMark( + *rPam.GetDoc(), + *const_cast(rMark.GetTOXType()), rMark); + (*pAny) <<= xRef; } } else diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index ee94746f0a..8e4d56e705 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -70,6 +70,7 @@ #include #include #include +#include using namespace ::com::sun::star; @@ -326,7 +327,7 @@ SwDocIndexDescriptorProperties_Impl::SwDocIndexDescriptorProperties_Impl( } static sal_uInt16 -lcl_TypeToPropertyMap(const TOXTypes eType) +lcl_TypeToPropertyMap_Index(const TOXTypes eType) { switch (eType) { @@ -363,7 +364,7 @@ public: SwTOXBaseSection const*const pBaseSection) : SwClient((pBaseSection) ? pBaseSection->GetFmt() : 0) , m_rPropSet( - *aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap(eType))) + *aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Index(eType))) , m_eTOXType(eType) , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) , m_bIsDescriptor(0 == pBaseSection) @@ -1264,8 +1265,9 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, for(USHORT i = 0; i < aMarks.Count(); i++) { pMark = aMarks.GetObject(i); - pxMarks[i] = SwXDocumentIndexMark::GetObject( - const_cast(pType), pMark, m_pImpl->m_pDoc); + pxMarks[i] = SwXDocumentIndexMark::CreateXDocumentIndexMark( + *m_pImpl->m_pDoc, + *const_cast(pType), *pMark); } aRet <<= aXMarks; } @@ -1552,6 +1554,165 @@ SwXDocumentIndex::setName(const OUString& rName) throw (uno::RuntimeException) /****************************************************************** * SwXDocumentIndexMark ******************************************************************/ +/* -----------------21.04.99 09:36------------------- + * + * --------------------------------------------------*/ +static sal_uInt16 +lcl_TypeToPropertyMap_Mark(const TOXTypes eType) +{ + switch (eType) + { + case TOX_INDEX: return PROPERTY_MAP_INDEX_MARK; + case TOX_CONTENT: return PROPERTY_MAP_CNTIDX_MARK; + //case TOX_USER: + default: + return PROPERTY_MAP_USER_MARK; + } +} + +class SwXDocumentIndexMark::Impl + : public SwClient +{ + +public: + + SfxItemPropertySet const& m_rPropSet; + const TOXTypes m_eTOXType; + SwEventListenerContainer m_ListenerContainer; + bool m_bIsDescriptor; + SwDepend m_TypeDepend; + const SwTOXMark * m_pTOXMark; + SwDoc * m_pDoc; + + sal_Bool m_bMainEntry; + sal_uInt16 m_nLevel; + OUString m_sAltText; + OUString m_sPrimaryKey; + OUString m_sSecondaryKey; + OUString m_sTextReading; + OUString m_sPrimaryKeyReading; + OUString m_sSecondaryKeyReading; + OUString m_sUserIndexName; + + Impl( SwXDocumentIndexMark & rThis, + SwDoc *const pDoc, + const enum TOXTypes eType, + SwTOXType *const pType, SwTOXMark const*const pMark) + : SwClient((pDoc) ? pDoc->GetUnoCallBack() : 0) + , m_rPropSet( + *aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Mark(eType))) + , m_eTOXType(eType) + , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) + , m_bIsDescriptor(0 == pMark) + , m_TypeDepend(this, pType) + , m_pTOXMark(pMark) + , m_pDoc(pDoc) + , m_bMainEntry(sal_False) + , m_nLevel(0) + { + } + + SwTOXType * GetTOXType() const { + return static_cast( + const_cast(m_TypeDepend.GetRegisteredIn())); + } + + void Invalidate(); + + // SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + +}; + +/* -----------------------------16.10.00 11:24-------------------------------- + + ---------------------------------------------------------------------------*/ +void SwXDocumentIndexMark::Impl::Invalidate() +{ + if (GetRegisteredIn()) + { + const_cast(GetRegisteredIn())->Remove(this); + if (m_TypeDepend.GetRegisteredIn()) + { + const_cast(m_TypeDepend.GetRegisteredIn())->Remove( + &m_TypeDepend); + } + } + m_ListenerContainer.Disposing(); + m_pDoc = 0; + m_pTOXMark = 0; +} + +/*-- 14.12.98 10:25:47--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void SwXDocumentIndexMark::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) +{ + ClientModify(this, pOld, pNew); + + if (!GetRegisteredIn()) // removed => dispose + { + Invalidate(); + } + else if (pOld) + { + switch (pOld->Which()) + { + case RES_TOXMARK_DELETED: + if (static_cast(m_pTOXMark) == + static_cast(pOld)->pObject) + { + Invalidate(); + } + break; + } + } +} + +/*-- 14.12.98 10:25:43--------------------------------------------------- + + -----------------------------------------------------------------------*/ +SwXDocumentIndexMark::SwXDocumentIndexMark(const TOXTypes eToxType) + : m_pImpl( new SwXDocumentIndexMark::Impl(*this, 0, eToxType, 0, 0) ) +{ +} +/*-- 14.12.98 10:25:44--------------------------------------------------- + + -----------------------------------------------------------------------*/ +SwXDocumentIndexMark::SwXDocumentIndexMark(SwDoc & rDoc, + SwTOXType & rType, const SwTOXMark & rMark) + : m_pImpl( new SwXDocumentIndexMark::Impl(*this, &rDoc, rType.GetType(), + &rType, &rMark) ) +{ +} +/*-- 14.12.98 10:25:44--------------------------------------------------- + + -----------------------------------------------------------------------*/ +SwXDocumentIndexMark::~SwXDocumentIndexMark() +{ +} + +uno::Reference +SwXDocumentIndexMark::CreateXDocumentIndexMark( + SwDoc & rDoc, SwTOXType & rType, const SwTOXMark & rMark) +{ + // #i105557#: do not iterate over the registered clients: race condition + // to do this properly requires the SwXDocumentIndexMark to register at the + // format directly, not at the unocallback +#if 0 + SwClientIter aIter(*pType); + SwXDocumentIndexMark::Impl* pxMark = (SwXDocumentIndexMark::Impl*) + aIter.First(TYPE(SwXDocumentIndexMark::Impl)); + while( pxMark ) + { + if(pxMark->m_pTOXMark == pMark) + return pxMark->m_rThis; + pxMark = (SwXDocumentIndexMark::Impl*)aIter.Next(); + } +#endif + return new SwXDocumentIndexMark(rDoc, rType, rMark); +} + /* -----------------------------10.03.00 18:02-------------------------------- ---------------------------------------------------------------------------*/ @@ -1563,55 +1724,62 @@ const uno::Sequence< sal_Int8 > & SwXDocumentIndexMark::getUnoTunnelId() /* -----------------------------10.03.00 18:04-------------------------------- ---------------------------------------------------------------------------*/ -sal_Int64 SAL_CALL SwXDocumentIndexMark::getSomething( const uno::Sequence< sal_Int8 >& rId ) - throw(uno::RuntimeException) +sal_Int64 SAL_CALL +SwXDocumentIndexMark::getSomething(const uno::Sequence< sal_Int8 >& rId) +throw (uno::RuntimeException) { - if( rId.getLength() == 16 - && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16 ) ) - { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); - } - return 0; + return ::sw::UnoTunnelImpl(rId, this); } -TYPEINIT1(SwXDocumentIndexMark, SwClient) -const sal_Char cBaseMark[] = "com.sun.star.text.BaseIndexMark"; -const sal_Char cContentMark[] = "com.sun.star.text.ContentIndexMark"; -const sal_Char cIdxMark[] = "com.sun.star.text.DocumentIndexMark"; -const sal_Char cIdxMarkAsian[] = "com.sun.star.text.DocumentIndexMarkAsian"; -const sal_Char cUserMark[] = "com.sun.star.text.UserIndexMark"; -const sal_Char cTextContent[] = "com.sun.star.text.TextContent"; +static const sal_Char cBaseMark[] = "com.sun.star.text.BaseIndexMark"; +static const sal_Char cContentMark[] = "com.sun.star.text.ContentIndexMark"; +static const sal_Char cIdxMark[] = "com.sun.star.text.DocumentIndexMark"; +static const sal_Char cIdxMarkAsian[] = "com.sun.star.text.DocumentIndexMarkAsian"; +static const sal_Char cUserMark[] = "com.sun.star.text.UserIndexMark"; +static const sal_Char cTextContent[] = "com.sun.star.text.TextContent"; + /* -----------------------------06.04.00 15:07-------------------------------- ---------------------------------------------------------------------------*/ -OUString SwXDocumentIndexMark::getImplementationName(void) throw( uno::RuntimeException ) +OUString SAL_CALL +SwXDocumentIndexMark::getImplementationName() throw (uno::RuntimeException) { return C2U("SwXDocumentIndexMark"); } /* -----------------------------06.04.00 15:07-------------------------------- ---------------------------------------------------------------------------*/ -BOOL SwXDocumentIndexMark::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) +sal_Bool SAL_CALL +SwXDocumentIndexMark::supportsService(const OUString& rServiceName) +throw (uno::RuntimeException) { - return !rServiceName.compareToAscii(cBaseMark)|| - !rServiceName.compareToAscii(cTextContent) || - (eType == TOX_USER && !rServiceName.compareToAscii(cUserMark)) || - (eType == TOX_CONTENT && !rServiceName.compareToAscii(cContentMark)) || - (eType == TOX_INDEX && !rServiceName.compareToAscii(cIdxMark)) || - (eType == TOX_INDEX && !rServiceName.compareToAscii(cIdxMarkAsian)); + vos::OGuard g(Application::GetSolarMutex()); + + return rServiceName.equalsAscii(cBaseMark) + || rServiceName.equalsAscii(cTextContent) + || ((m_pImpl->m_eTOXType == TOX_USER) + && rServiceName.equalsAscii(cUserMark)) + || ((m_pImpl->m_eTOXType == TOX_CONTENT) + && rServiceName.equalsAscii(cContentMark)) + || ((m_pImpl->m_eTOXType == TOX_INDEX) + && rServiceName.equalsAscii(cIdxMark)) + || ((m_pImpl->m_eTOXType == TOX_INDEX) + && rServiceName.equalsAscii(cIdxMarkAsian)); } /* -----------------------------06.04.00 15:07-------------------------------- ---------------------------------------------------------------------------*/ -uno::Sequence< OUString > SwXDocumentIndexMark::getSupportedServiceNames(void) throw( uno::RuntimeException ) +uno::Sequence< OUString > SAL_CALL +SwXDocumentIndexMark::getSupportedServiceNames() throw (uno::RuntimeException) { - INT32 nCnt = (eType == TOX_INDEX) ? 4 : 3; + vos::OGuard g(Application::GetSolarMutex()); + + const sal_Int32 nCnt = (m_pImpl->m_eTOXType == TOX_INDEX) ? 4 : 3; uno::Sequence< OUString > aRet(nCnt); OUString* pArray = aRet.getArray(); pArray[0] = C2U(cBaseMark); pArray[1] = C2U(cTextContent); - switch(eType) + switch (m_pImpl->m_eTOXType) { case TOX_USER: pArray[2] = C2U(cUserMark); @@ -1629,97 +1797,47 @@ uno::Sequence< OUString > SwXDocumentIndexMark::getSupportedServiceNames(void) t } return aRet; } -/*-- 14.12.98 10:25:43--------------------------------------------------- - - -----------------------------------------------------------------------*/ -SwXDocumentIndexMark::SwXDocumentIndexMark(TOXTypes eToxType) : - aLstnrCntnr( (text::XTextContent*)this), - aTypeDepend(this, 0), - m_pDoc(0), - m_pTOXMark(0), - bIsDescriptor(sal_True), - bMainEntry(sal_False), - eType(eToxType), - nLevel(0) -{ - InitMap(eToxType); -} -/*-- 14.12.98 10:25:44--------------------------------------------------- - - -----------------------------------------------------------------------*/ -SwXDocumentIndexMark::SwXDocumentIndexMark(const SwTOXType* pType, - const SwTOXMark* pMark, - SwDoc* pDc) : - aLstnrCntnr( (text::XTextContent*)this), - aTypeDepend(this, (SwTOXType*)pType), - m_pDoc(pDc), - m_pTOXMark(pMark), - bIsDescriptor(sal_False), - bMainEntry(sal_False), - eType(pType->GetType()), - nLevel(0) -{ - m_pDoc->GetUnoCallBack()->Add(this); - InitMap(eType); -} -/*-- 14.12.98 10:25:44--------------------------------------------------- - - -----------------------------------------------------------------------*/ -SwXDocumentIndexMark::~SwXDocumentIndexMark() -{ - -} -/* -----------------21.04.99 09:36------------------- - * - * --------------------------------------------------*/ -void SwXDocumentIndexMark::InitMap(TOXTypes eToxType) -{ - sal_uInt16 nMapId = PROPERTY_MAP_USER_MARK; //case TOX_USER: - switch( eToxType ) - { - case TOX_INDEX: - nMapId = PROPERTY_MAP_INDEX_MARK ; - break; - case TOX_CONTENT: - nMapId = PROPERTY_MAP_CNTIDX_MARK; - break; - //case TOX_USER: - default: - ; - } - m_pPropSet = aSwMapProvider.GetPropertySet(nMapId); -} /*-- 14.12.98 10:25:45--------------------------------------------------- -----------------------------------------------------------------------*/ -OUString SwXDocumentIndexMark::getMarkEntry(void) throw( uno::RuntimeException ) +OUString SAL_CALL +SwXDocumentIndexMark::getMarkEntry() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwTOXType* pType = ((SwXDocumentIndexMark*)this)->GetTOXType(); + OUString sRet; - if(pType && m_pTOXMark) + SwTOXType *const pType = m_pImpl->GetTOXType(); + if (pType && m_pImpl->m_pTOXMark) { - sRet = OUString(m_pTOXMark->GetAlternativeText()); + sRet = OUString(m_pImpl->m_pTOXMark->GetAlternativeText()); + } + else if (m_pImpl->m_bIsDescriptor) + { + sRet = m_pImpl->m_sAltText; } - else if(bIsDescriptor) - sRet = sAltText; else + { throw uno::RuntimeException(); + } return sRet; } /*-- 14.12.98 10:25:45--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXDocumentIndexMark::setMarkEntry(const OUString& rIndexEntry) throw( uno::RuntimeException ) +void SAL_CALL +SwXDocumentIndexMark::setMarkEntry(const OUString& rIndexEntry) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwTOXType* pType = ((SwXDocumentIndexMark*)this)->GetTOXType(); - if(pType && m_pTOXMark) + + SwTOXType *const pType = m_pImpl->GetTOXType(); + if (pType && m_pImpl->m_pTOXMark) { - SwTOXMark aMark(*m_pTOXMark); + SwTOXMark aMark(*m_pImpl->m_pTOXMark); aMark.SetAlternativeText(rIndexEntry); - const SwTxtTOXMark* pTxtMark = m_pTOXMark->GetTxtTOXMark(); + SwTxtTOXMark const*const pTxtMark = + m_pImpl->m_pTOXMark->GetTxtTOXMark(); SwPaM aPam(pTxtMark->GetTxtNode(), *pTxtMark->GetStart()); aPam.SetMark(); if(pTxtMark->GetEnd()) @@ -1729,9 +1847,9 @@ void SwXDocumentIndexMark::setMarkEntry(const OUString& rIndexEntry) throw( uno: else aPam.GetPoint()->nContent++; - //die alte Marke loeschen - m_pDoc->DeleteTOXMark(m_pTOXMark); - m_pTOXMark = 0; + // delete old mark + m_pImpl->m_pDoc->DeleteTOXMark(m_pImpl->m_pTOXMark); + m_pImpl->m_pTOXMark = 0; SwTxtAttr* pTxtAttr = 0; sal_Bool bInsAtPos = aMark.IsAlternativeText(); @@ -1740,311 +1858,377 @@ void SwXDocumentIndexMark::setMarkEntry(const OUString& rIndexEntry) throw( uno: if( bInsAtPos ) { SwPaM aTmp( *pStt ); - m_pDoc->InsertPoolItem( aTmp, aMark, 0 ); + m_pImpl->m_pDoc->InsertPoolItem( aTmp, aMark, 0 ); pTxtAttr = pStt->nNode.GetNode().GetTxtNode()->GetTxtAttrForCharAt( pStt->nContent.GetIndex()-1, RES_TXTATR_TOXMARK); } else if( *pEnd != *pStt ) { - m_pDoc->InsertPoolItem( aPam, aMark, + m_pImpl->m_pDoc->InsertPoolItem( aPam, aMark, nsSetAttrMode::SETATTR_DONTEXPAND ); pTxtAttr = pStt->nNode.GetNode().GetTxtNode()->GetTxtAttr( pStt->nContent, RES_TXTATR_TOXMARK); } - //und sonst - Marke geloescht? if(pTxtAttr) - m_pTOXMark = &pTxtAttr->GetTOXMark(); + { + m_pImpl->m_pTOXMark = &pTxtAttr->GetTOXMark(); + } } - else if(bIsDescriptor) + else if (m_pImpl->m_bIsDescriptor) { - sAltText = rIndexEntry; + m_pImpl->m_sAltText = rIndexEntry; } else + { throw uno::RuntimeException(); + } } + /* -----------------18.02.99 13:40------------------- * * --------------------------------------------------*/ -void SwXDocumentIndexMark::attachToRange(const uno::Reference< text::XTextRange > & xTextRange) - throw( lang::IllegalArgumentException, uno::RuntimeException ) +void SAL_CALL +SwXDocumentIndexMark::attach( + const uno::Reference< text::XTextRange > & xTextRange) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(!bIsDescriptor) - throw uno::RuntimeException(); - uno::Reference xRangeTunnel( xTextRange, uno::UNO_QUERY); - SwXTextRange* pRange = 0; - OTextCursorHelper* pCursor = 0; - if(xRangeTunnel.is()) + if (!m_pImpl->m_bIsDescriptor) { - pRange = reinterpret_cast< SwXTextRange * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) )); - pCursor = reinterpret_cast< OTextCursorHelper * >( - sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); + throw uno::RuntimeException(); } - SwDoc* pDoc = pRange ? (SwDoc*)pRange->GetDoc() : pCursor ? (SwDoc*)pCursor->GetDoc() : 0; + const uno::Reference xRangeTunnel(xTextRange, uno::UNO_QUERY); + SwXTextRange *const pRange = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); + OTextCursorHelper *const pCursor = + ::sw::UnoTunnelGetImplementation(xRangeTunnel); + SwDoc *const pDoc = + (pRange) ? pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : 0); + if (!pDoc) + { + throw lang::IllegalArgumentException(); + } - if(pDoc ) + const SwTOXType* pTOXType = 0; + switch (m_pImpl->m_eTOXType) { - const SwTOXType* pTOXType = 0; - switch(eType) + case TOX_INDEX: + case TOX_CONTENT: + pTOXType = pDoc->GetTOXType( m_pImpl->m_eTOXType, 0 ); + break; + case TOX_USER: { - case TOX_INDEX: - case TOX_CONTENT: - pTOXType = pDoc->GetTOXType( eType, 0 ); - break; - case TOX_USER: + if (!m_pImpl->m_sUserIndexName.getLength()) { - if(!sUserIndexName.Len()) - pTOXType = pDoc->GetTOXType( eType, 0 ); - else + pTOXType = pDoc->GetTOXType( m_pImpl->m_eTOXType, 0 ); + } + else + { + const sal_uInt16 nCount = + pDoc->GetTOXTypeCount(m_pImpl->m_eTOXType); + for (sal_uInt16 i = 0; i < nCount; i++) { - sal_uInt16 nCount = pDoc->GetTOXTypeCount( eType); - for(sal_uInt16 i = 0; i < nCount; i++) + SwTOXType const*const pTemp = + pDoc->GetTOXType( m_pImpl->m_eTOXType, i ); + if (m_pImpl->m_sUserIndexName == + OUString(pTemp->GetTypeName())) { - const SwTOXType* pTemp = pDoc->GetTOXType( eType, i ); - if(sUserIndexName == pTemp->GetTypeName()) - { - pTOXType = pTemp; - break; - } - } - if(!pTOXType) - { - SwTOXType aUserType(TOX_USER, sUserIndexName); - pTOXType = pDoc->InsertTOXType(aUserType); + pTOXType = pTemp; + break; } } + if (!pTOXType) + { + SwTOXType aUserType(TOX_USER, m_pImpl->m_sUserIndexName); + pTOXType = pDoc->InsertTOXType(aUserType); + } } - break; - - default: - ; } - if(!pTOXType) - throw lang::IllegalArgumentException(); - pDoc->GetUnoCallBack()->Add(this); - ((SwTOXType*)pTOXType)->Add(&aTypeDepend); - - SwUnoInternalPaM aPam(*pDoc); - //das muss jetzt sal_True liefern - ::sw::XTextRangeToSwPaM(aPam, xTextRange); - SwTOXMark aMark (pTOXType); - if(sAltText.Len()) - aMark.SetAlternativeText(sAltText); - switch(eType) - { - case TOX_INDEX: - if(sPrimaryKey.Len()) - aMark.SetPrimaryKey(sPrimaryKey); - if(sSecondaryKey.Len()) - aMark.SetSecondaryKey(sSecondaryKey); - if(sTextReading.Len()) - aMark.SetTextReading(sTextReading); - if(sPrimaryKeyReading.Len()) - aMark.SetPrimaryKeyReading(sPrimaryKeyReading); - if(sSecondaryKeyReading.Len()) - aMark.SetSecondaryKeyReading(sSecondaryKeyReading); - aMark.SetMainEntry(bMainEntry); - break; - case TOX_USER: - case TOX_CONTENT: - if(USHRT_MAX != nLevel) - aMark.SetLevel(nLevel+1); - break; + break; - default: - ; - } - UnoActionContext aAction(pDoc); - sal_Bool bMark = *aPam.GetPoint() != *aPam.GetMark(); - // Marks ohne Alternativtext ohne selektierten Text koennen nicht eingefuegt werden, - // deshalb hier ein Leerzeichen - ob das die ideale Loesung ist? - if(!bMark && !aMark.GetAlternativeText().Len()) - aMark.SetAlternativeText( String(' ') ); - - SwXTextCursor const*const pTextCursor( - dynamic_cast(pCursor)); - const bool bForceExpandHints( (!bMark && pTextCursor) - ? pTextCursor->IsAtEndOfMeta() : false ); - const SetAttrMode nInsertFlags = (bForceExpandHints) - ? ( nsSetAttrMode::SETATTR_FORCEHINTEXPAND - | nsSetAttrMode::SETATTR_DONTEXPAND) - : nsSetAttrMode::SETATTR_DONTEXPAND; - - pDoc->InsertPoolItem(aPam, aMark, nInsertFlags); - if( bMark && *aPam.GetPoint() > *aPam.GetMark()) - aPam.Exchange(); + default: + break; + } + if (!pTOXType) + { + throw lang::IllegalArgumentException(); + } + pDoc->GetUnoCallBack()->Add(m_pImpl.get()); + const_cast(pTOXType)->Add(&m_pImpl->m_TypeDepend); - SwTxtAttr* pTxtAttr = 0; - if( bMark ) - pTxtAttr = aPam.GetNode()->GetTxtNode()->GetTxtAttr( - aPam.GetPoint()->nContent, RES_TXTATR_TOXMARK ); - else - { - pTxtAttr = aPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt( - aPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_TOXMARK ); - } + SwUnoInternalPaM aPam(*pDoc); + //das muss jetzt sal_True liefern + ::sw::XTextRangeToSwPaM(aPam, xTextRange); + SwTOXMark aMark (pTOXType); + if (m_pImpl->m_sAltText.getLength()) + { + aMark.SetAlternativeText(m_pImpl->m_sAltText); + } + switch (m_pImpl->m_eTOXType) + { + case TOX_INDEX: + if (m_pImpl->m_sPrimaryKey.getLength()) + { + aMark.SetPrimaryKey(m_pImpl->m_sPrimaryKey); + } + if (m_pImpl->m_sSecondaryKey.getLength()) + { + aMark.SetSecondaryKey(m_pImpl->m_sSecondaryKey); + } + if (m_pImpl->m_sTextReading.getLength()) + { + aMark.SetTextReading(m_pImpl->m_sTextReading); + } + if (m_pImpl->m_sPrimaryKeyReading.getLength()) + { + aMark.SetPrimaryKeyReading(m_pImpl->m_sPrimaryKeyReading); + } + if (m_pImpl->m_sSecondaryKeyReading.getLength()) + { + aMark.SetSecondaryKeyReading(m_pImpl->m_sSecondaryKeyReading); + } + aMark.SetMainEntry(m_pImpl->m_bMainEntry); + break; + case TOX_USER: + case TOX_CONTENT: + if (USHRT_MAX != m_pImpl->m_nLevel) + { + aMark.SetLevel(m_pImpl->m_nLevel+1); + } + break; - if(pTxtAttr) - { - m_pTOXMark = &pTxtAttr->GetTOXMark(); - m_pDoc = pDoc; - bIsDescriptor = sal_False; - } - else - throw uno::RuntimeException(); + default: + break; + } + UnoActionContext aAction(pDoc); + const sal_Bool bMark = *aPam.GetPoint() != *aPam.GetMark(); + // Marks ohne Alternativtext ohne selektierten Text koennen nicht eingefuegt werden, + // deshalb hier ein Leerzeichen - ob das die ideale Loesung ist? + if (!bMark && !aMark.GetAlternativeText().Len()) + { + aMark.SetAlternativeText( String(' ') ); } -} -/*-- 14.12.98 10:25:45--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXDocumentIndexMark::attach(const uno::Reference< text::XTextRange > & xTextRange) - throw( lang::IllegalArgumentException, uno::RuntimeException ) -{ - vos::OGuard aGuard(Application::GetSolarMutex()); - attachToRange( xTextRange ); + SwXTextCursor const*const pTextCursor( + dynamic_cast(pCursor)); + const bool bForceExpandHints( (!bMark && pTextCursor) + ? pTextCursor->IsAtEndOfMeta() : false ); + const SetAttrMode nInsertFlags = (bForceExpandHints) + ? ( nsSetAttrMode::SETATTR_FORCEHINTEXPAND + | nsSetAttrMode::SETATTR_DONTEXPAND) + : nsSetAttrMode::SETATTR_DONTEXPAND; + + pDoc->InsertPoolItem(aPam, aMark, nInsertFlags); + if (bMark && *aPam.GetPoint() > *aPam.GetMark()) + { + aPam.Exchange(); + } + + SwTxtAttr* pTxtAttr = 0; + if (bMark) + { + pTxtAttr = aPam.GetNode()->GetTxtNode()->GetTxtAttr( + aPam.GetPoint()->nContent, RES_TXTATR_TOXMARK ); + } + else + { + pTxtAttr = aPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt( + aPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_TOXMARK ); + } + + if (!pTxtAttr) + { + throw uno::RuntimeException(); + } + + m_pImpl->m_pTOXMark = &pTxtAttr->GetTOXMark(); + m_pImpl->m_pDoc = pDoc; + m_pImpl->m_bIsDescriptor = sal_False; } + /*-- 14.12.98 10:25:45--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< text::XTextRange > SwXDocumentIndexMark::getAnchor(void) throw( uno::RuntimeException ) +uno::Reference< text::XTextRange > SAL_CALL +SwXDocumentIndexMark::getAnchor() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextRange > aRet; - SwTOXType* pType = ((SwXDocumentIndexMark*)this)->GetTOXType(); - if(pType && m_pTOXMark) + + SwTOXType *const pType = m_pImpl->GetTOXType(); + if (!pType || !m_pImpl->m_pTOXMark) { - if( m_pTOXMark->GetTxtTOXMark() ) - { - const SwTxtTOXMark* pTxtMark = m_pTOXMark->GetTxtTOXMark(); - SwPaM aPam(pTxtMark->GetTxtNode(), *pTxtMark->GetStart()); - aPam.SetMark(); - if(pTxtMark->GetEnd()) - { - aPam.GetPoint()->nContent = *pTxtMark->GetEnd(); - } - else - aPam.GetPoint()->nContent++; - uno::Reference< frame::XModel > xModel = m_pDoc->GetDocShell()->GetBaseModel(); - uno::Reference< text::XTextDocument > xTDoc(xModel, uno::UNO_QUERY); - aRet = new SwXTextRange(aPam, xTDoc->getText()); - } + throw uno::RuntimeException(); } - if(!aRet.is()) + if (!m_pImpl->m_pTOXMark->GetTxtTOXMark()) + { throw uno::RuntimeException(); - return aRet; + } + const SwTxtTOXMark* pTxtMark = m_pImpl->m_pTOXMark->GetTxtTOXMark(); + SwPaM aPam(pTxtMark->GetTxtNode(), *pTxtMark->GetStart()); + aPam.SetMark(); + if(pTxtMark->GetEnd()) + { + aPam.GetPoint()->nContent = *pTxtMark->GetEnd(); + } + else + { + aPam.GetPoint()->nContent++; + } + const uno::Reference< frame::XModel > xModel = + m_pImpl->m_pDoc->GetDocShell()->GetBaseModel(); + const uno::Reference< text::XTextDocument > xTDoc(xModel, uno::UNO_QUERY); + const uno::Reference< text::XTextRange > xRet = + new SwXTextRange(aPam, xTDoc->getText()); + + return xRet; } + /*-- 14.12.98 10:25:45--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXDocumentIndexMark::dispose(void) throw( uno::RuntimeException ) +void SAL_CALL +SwXDocumentIndexMark::dispose() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwTOXType* pType = ((SwXDocumentIndexMark*)this)->GetTOXType(); - if(pType && m_pTOXMark) + + SwTOXType *const pType = m_pImpl->GetTOXType(); + if (pType && m_pImpl->m_pTOXMark) { - m_pDoc->DeleteTOXMark(m_pTOXMark); + m_pImpl->m_pDoc->DeleteTOXMark(m_pImpl->m_pTOXMark); } - else - throw uno::RuntimeException(); } /*-- 14.12.98 10:25:45--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXDocumentIndexMark::addEventListener(const uno::Reference< lang::XEventListener > & aListener) - throw( uno::RuntimeException ) +void SAL_CALL +SwXDocumentIndexMark::addEventListener( + const uno::Reference< lang::XEventListener > & xListener) +throw (uno::RuntimeException) { - if(!GetRegisteredIn()) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->GetRegisteredIn()) + { throw uno::RuntimeException(); - aLstnrCntnr.AddListener(aListener); + } + m_pImpl->m_ListenerContainer.AddListener(xListener); } /*-- 14.12.98 10:25:46--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXDocumentIndexMark::removeEventListener(const uno::Reference< lang::XEventListener > & aListener) - throw( uno::RuntimeException ) +void SAL_CALL +SwXDocumentIndexMark::removeEventListener( + const uno::Reference< lang::XEventListener > & xListener) +throw (uno::RuntimeException) { - if(!GetRegisteredIn() || !aLstnrCntnr.RemoveListener(aListener)) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->GetRegisteredIn() || + !m_pImpl->m_ListenerContainer.RemoveListener(xListener)) + { throw uno::RuntimeException(); + } } + /*-- 14.12.98 10:25:46--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Reference< beans::XPropertySetInfo > SwXDocumentIndexMark::getPropertySetInfo(void) - throw( uno::RuntimeException ) +uno::Reference< beans::XPropertySetInfo > SAL_CALL +SwXDocumentIndexMark::getPropertySetInfo() throw (uno::RuntimeException) { + vos::OGuard g(Application::GetSolarMutex()); + static uno::Reference< beans::XPropertySetInfo > xInfos[3]; int nPos = 0; - switch(eType) + switch (m_pImpl->m_eTOXType) { - case TOX_INDEX: nPos = 0; break; - case TOX_CONTENT: nPos = 1; break; - case TOX_USER: nPos = 2; break; + case TOX_INDEX: nPos = 0; break; + case TOX_CONTENT: nPos = 1; break; + case TOX_USER: nPos = 2; break; default: ; } if(!xInfos[nPos].is()) { - uno::Reference< beans::XPropertySetInfo > xInfo = m_pPropSet->getPropertySetInfo(); + const uno::Reference< beans::XPropertySetInfo > xInfo = + m_pImpl->m_rPropSet.getPropertySetInfo(); // extend PropertySetInfo! const uno::Sequence aPropSeq = xInfo->getProperties(); xInfos[nPos] = new SfxExtItemPropertySetInfo( - aSwMapProvider.GetPropertyMapEntries(PROPERTY_MAP_PARAGRAPH_EXTENSIONS), + aSwMapProvider.GetPropertyMapEntries( + PROPERTY_MAP_PARAGRAPH_EXTENSIONS), aPropSeq ); } return xInfos[nPos]; } + /*-- 14.12.98 10:25:46--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXDocumentIndexMark::setPropertyValue(const OUString& rPropertyName, - const uno::Any& aValue) - throw( beans::UnknownPropertyException, beans::PropertyVetoException, - lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXDocumentIndexMark::setPropertyValue( + const OUString& rPropertyName, const uno::Any& rValue) +throw (beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwTOXType* pType = ((SwXDocumentIndexMark*)this)->GetTOXType(); - const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName(rPropertyName); + + SfxItemPropertySimpleEntry const*const pEntry = + m_pImpl->m_rPropSet.getPropertyMap()->getByName(rPropertyName); if (!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); - if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); - if(pType && m_pTOXMark) { - SwDoc* pLocalDoc = m_pDoc; + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + rPropertyName, + static_cast(this)); + } + if (pEntry->nFlags & beans::PropertyAttribute::READONLY) + { + throw beans::PropertyVetoException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only: ")) + + rPropertyName, + static_cast(this)); + } + + SwTOXType *const pType = m_pImpl->GetTOXType(); + if (pType && m_pImpl->m_pTOXMark) + { + SwDoc* pLocalDoc = m_pImpl->m_pDoc; - SwTOXMark aMark(*m_pTOXMark); + SwTOXMark aMark(*m_pImpl->m_pTOXMark); switch(pEntry->nWID) { case WID_ALT_TEXT: - aMark.SetAlternativeText(lcl_AnyToString(aValue)); + aMark.SetAlternativeText(lcl_AnyToString(rValue)); break; case WID_LEVEL: - aMark.SetLevel(Min( (sal_Int8) ( MAXLEVEL ), - (sal_Int8)(lcl_AnyToInt16(aValue)+1))); + aMark.SetLevel(Min( static_cast( MAXLEVEL ), + static_cast(lcl_AnyToInt16(rValue)+1))); break; case WID_PRIMARY_KEY : - aMark.SetPrimaryKey(lcl_AnyToString(aValue)); + aMark.SetPrimaryKey(lcl_AnyToString(rValue)); break; case WID_SECONDARY_KEY: - aMark.SetSecondaryKey(lcl_AnyToString(aValue)); + aMark.SetSecondaryKey(lcl_AnyToString(rValue)); break; case WID_MAIN_ENTRY: - aMark.SetMainEntry(lcl_AnyToBool(aValue)); + aMark.SetMainEntry(lcl_AnyToBool(rValue)); break; case WID_TEXT_READING: - aMark.SetTextReading(lcl_AnyToString(aValue)); + aMark.SetTextReading(lcl_AnyToString(rValue)); break; case WID_PRIMARY_KEY_READING: - aMark.SetPrimaryKeyReading(lcl_AnyToString(aValue)); + aMark.SetPrimaryKeyReading(lcl_AnyToString(rValue)); break; case WID_SECONDARY_KEY_READING: - aMark.SetSecondaryKeyReading(lcl_AnyToString(aValue)); + aMark.SetSecondaryKeyReading(lcl_AnyToString(rValue)); break; } - const SwTxtTOXMark* pTxtMark = m_pTOXMark->GetTxtTOXMark(); + SwTxtTOXMark const*const pTxtMark = + m_pImpl->m_pTOXMark->GetTxtTOXMark(); SwPaM aPam(pTxtMark->GetTxtNode(), *pTxtMark->GetStart()); aPam.SetMark(); if(pTxtMark->GetEnd()) @@ -2052,15 +2236,17 @@ void SwXDocumentIndexMark::setPropertyValue(const OUString& rPropertyName, aPam.GetPoint()->nContent = *pTxtMark->GetEnd(); } else + { aPam.GetPoint()->nContent++; + } //delete the old mark - pLocalDoc->DeleteTOXMark(m_pTOXMark); - m_pTOXMark = 0; + pLocalDoc->DeleteTOXMark(m_pImpl->m_pTOXMark); + m_pImpl->m_pTOXMark = 0; sal_Bool bInsAtPos = aMark.IsAlternativeText(); - const SwPosition *pStt = aPam.Start(), - *pEnd = aPam.End(); + const SwPosition *pStt = aPam.Start(); + const SwPosition *pEnd = aPam.End(); SwTxtAttr* pTxtAttr = 0; if( bInsAtPos ) @@ -2077,101 +2263,120 @@ void SwXDocumentIndexMark::setPropertyValue(const OUString& rPropertyName, pTxtAttr = pStt->nNode.GetNode().GetTxtNode()->GetTxtAttr( pStt->nContent, RES_TXTATR_TOXMARK ); } - m_pDoc = pLocalDoc; + m_pImpl->m_pDoc = pLocalDoc; if(pTxtAttr) { - m_pTOXMark = &pTxtAttr->GetTOXMark(); - m_pDoc->GetUnoCallBack()->Add(this); - pType->Add(&aTypeDepend); + m_pImpl->m_pTOXMark = &pTxtAttr->GetTOXMark(); + m_pImpl->m_pDoc->GetUnoCallBack()->Add(m_pImpl.get()); + pType->Add(&m_pImpl->m_TypeDepend); } } - else if(bIsDescriptor) + else if (m_pImpl->m_bIsDescriptor) { switch(pEntry->nWID) { case WID_ALT_TEXT: - sAltText = lcl_AnyToString(aValue); + m_pImpl->m_sAltText = lcl_AnyToString(rValue); break; case WID_LEVEL: { - sal_Int16 nVal = lcl_AnyToInt16(aValue); + const sal_Int16 nVal = lcl_AnyToInt16(rValue); if(nVal >= 0 && nVal < MAXLEVEL) - nLevel = nVal; + { + m_pImpl->m_nLevel = nVal; + } else + { throw lang::IllegalArgumentException(); + } } break; - case WID_PRIMARY_KEY : - sPrimaryKey = lcl_AnyToString(aValue); + case WID_PRIMARY_KEY: + m_pImpl->m_sPrimaryKey = lcl_AnyToString(rValue); break; case WID_SECONDARY_KEY: - sSecondaryKey = lcl_AnyToString(aValue); + m_pImpl->m_sSecondaryKey = lcl_AnyToString(rValue); break; case WID_TEXT_READING: - sTextReading = lcl_AnyToString(aValue); + m_pImpl->m_sTextReading = lcl_AnyToString(rValue); break; case WID_PRIMARY_KEY_READING: - sPrimaryKeyReading = lcl_AnyToString(aValue); + m_pImpl->m_sPrimaryKeyReading = lcl_AnyToString(rValue); break; case WID_SECONDARY_KEY_READING: - sSecondaryKeyReading = lcl_AnyToString(aValue); + m_pImpl->m_sSecondaryKeyReading = lcl_AnyToString(rValue); break; - case WID_USER_IDX_NAME : + case WID_USER_IDX_NAME: { - OUString sTmp(lcl_AnyToString(aValue)); + OUString sTmp(lcl_AnyToString(rValue)); lcl_ConvertTOUNameToUserName(sTmp); - sUserIndexName = sTmp; + m_pImpl->m_sUserIndexName = sTmp; } break; case WID_MAIN_ENTRY: - bMainEntry = lcl_AnyToBool(aValue); + m_pImpl->m_bMainEntry = lcl_AnyToBool(rValue); break; } } else + { throw uno::RuntimeException(); + } } + /*-- 14.12.98 10:25:46--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXDocumentIndexMark::getPropertyValue(const OUString& rPropertyName) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +uno::Any SAL_CALL +SwXDocumentIndexMark::getPropertyValue(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); + uno::Any aRet; - SwTOXType* pType = ((SwXDocumentIndexMark*)this)->GetTOXType(); - const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName(rPropertyName); + SfxItemPropertySimpleEntry const*const pEntry = + m_pImpl->m_rPropSet.getPropertyMap()->getByName(rPropertyName); if (!pEntry) - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + { + throw beans::UnknownPropertyException( + OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown property: ")) + + rPropertyName, + static_cast(this)); + } if (::sw::GetDefaultTextContentValue(aRet, rPropertyName, pEntry->nWID)) { return aRet; } - if(pType && m_pTOXMark) + + SwTOXType *const pType = m_pImpl->GetTOXType(); + if (pType && m_pImpl->m_pTOXMark) { switch(pEntry->nWID) { case WID_ALT_TEXT: - aRet <<= OUString(m_pTOXMark->GetAlternativeText()); + aRet <<= OUString(m_pImpl->m_pTOXMark->GetAlternativeText()); break; case WID_LEVEL: - aRet <<= (sal_Int16)(m_pTOXMark->GetLevel() - 1); + aRet <<= static_cast( + m_pImpl->m_pTOXMark->GetLevel() - 1); break; case WID_PRIMARY_KEY : - aRet <<= OUString(m_pTOXMark->GetPrimaryKey()); + aRet <<= OUString(m_pImpl->m_pTOXMark->GetPrimaryKey()); break; case WID_SECONDARY_KEY: - aRet <<= OUString(m_pTOXMark->GetSecondaryKey()); + aRet <<= OUString(m_pImpl->m_pTOXMark->GetSecondaryKey()); break; case WID_TEXT_READING: - aRet <<= OUString(m_pTOXMark->GetTextReading()); + aRet <<= OUString(m_pImpl->m_pTOXMark->GetTextReading()); break; case WID_PRIMARY_KEY_READING: - aRet <<= OUString(m_pTOXMark->GetPrimaryKeyReading()); + aRet <<= OUString(m_pImpl->m_pTOXMark->GetPrimaryKeyReading()); break; case WID_SECONDARY_KEY_READING: - aRet <<= OUString(m_pTOXMark->GetSecondaryKeyReading()); + aRet <<= OUString( + m_pImpl->m_pTOXMark->GetSecondaryKeyReading()); break; case WID_USER_IDX_NAME : { @@ -2182,136 +2387,101 @@ uno::Any SwXDocumentIndexMark::getPropertyValue(const OUString& rPropertyName) break; case WID_MAIN_ENTRY: { - sal_Bool bTemp = m_pTOXMark->IsMainEntry(); - aRet.setValue(&bTemp, ::getBooleanCppuType()); + const sal_Bool bTemp = m_pImpl->m_pTOXMark->IsMainEntry(); + aRet <<= bTemp; } break; } } - else if(bIsDescriptor) + else if (m_pImpl->m_bIsDescriptor) { switch(pEntry->nWID) { case WID_ALT_TEXT: - aRet <<= OUString(sAltText); + aRet <<= m_pImpl->m_sAltText; break; case WID_LEVEL: - aRet <<= (sal_Int16)nLevel; + aRet <<= static_cast(m_pImpl->m_nLevel); break; - case WID_PRIMARY_KEY : - aRet <<= OUString(sPrimaryKey); + case WID_PRIMARY_KEY: + aRet <<= m_pImpl->m_sPrimaryKey; break; case WID_SECONDARY_KEY: - aRet <<= OUString(sSecondaryKey); + aRet <<= m_pImpl->m_sSecondaryKey; break; case WID_TEXT_READING: - aRet <<= OUString(sTextReading); + aRet <<= m_pImpl->m_sTextReading; break; case WID_PRIMARY_KEY_READING: - aRet <<= OUString(sPrimaryKeyReading); + aRet <<= m_pImpl->m_sPrimaryKeyReading; break; case WID_SECONDARY_KEY_READING: - aRet <<= OUString(sSecondaryKeyReading); + aRet <<= m_pImpl->m_sSecondaryKeyReading; break; case WID_USER_IDX_NAME : - aRet <<= OUString(sUserIndexName); + aRet <<= m_pImpl->m_sUserIndexName; break; case WID_MAIN_ENTRY: { - aRet.setValue(&bMainEntry, ::getBooleanCppuType()); + aRet <<= static_cast(m_pImpl->m_bMainEntry); } break; } } else + { throw uno::RuntimeException(); + } return aRet; } -/*-- 14.12.98 10:25:46--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXDocumentIndexMark::addPropertyChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); -} /*-- 14.12.98 10:25:46--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwXDocumentIndexMark::removePropertyChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); -} -/*-- 14.12.98 10:25:47--------------------------------------------------- - - -----------------------------------------------------------------------*/ -void SwXDocumentIndexMark::addVetoableChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXDocumentIndexMark::addPropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXDocumentIndexMark::addPropertyChangeListener(): not implemented"); } -/*-- 14.12.98 10:25:47--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXDocumentIndexMark::removeVetoableChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +void SAL_CALL +SwXDocumentIndexMark::removePropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - DBG_WARNING("not implemented"); + OSL_ENSURE(false, + "SwXDocumentIndexMark::removePropertyChangeListener(): not implemented"); } -/*-- 14.12.98 10:25:47--------------------------------------------------- - -----------------------------------------------------------------------*/ -SwXDocumentIndexMark* SwXDocumentIndexMark::GetObject(SwTOXType* pType, - const SwTOXMark* pMark, SwDoc* pDoc) +void SAL_CALL +SwXDocumentIndexMark::addVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - SwClientIter aIter(*pType); - SwXDocumentIndexMark* pxMark = (SwXDocumentIndexMark*) - aIter.First(TYPE(SwXDocumentIndexMark)); - while( pxMark ) - { - if(pxMark->m_pTOXMark == pMark) - return pxMark; - pxMark = (SwXDocumentIndexMark*)aIter.Next(); - } - return new SwXDocumentIndexMark(pType, pMark, pDoc); + OSL_ENSURE(false, + "SwXDocumentIndexMark::addVetoableChangeListener(): not implemented"); } -/*-- 14.12.98 10:25:47--------------------------------------------------- - -----------------------------------------------------------------------*/ -void SwXDocumentIndexMark::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew) +void SAL_CALL +SwXDocumentIndexMark::removeVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { - switch( pOld ? pOld->Which() : 0 ) - { - case RES_REMOVE_UNO_OBJECT: - case RES_OBJECTDYING: - if( (void*)GetRegisteredIn() == ((SwPtrMsgPoolItem *)pOld)->pObject ) - Invalidate(); - break; - - case RES_FMT_CHG: - // wurden wir an das neue umgehaengt und wird das alte geloscht? - if( ((SwFmtChg*)pNew)->pChangedFmt == GetRegisteredIn() && - ((SwFmtChg*)pOld)->pChangedFmt->IsFmtInDTOR() ) - Invalidate(); - break; - case RES_TOXMARK_DELETED: - if( (void*)m_pTOXMark == ((SwPtrMsgPoolItem *)pOld)->pObject ) - Invalidate(); - break; - } + OSL_ENSURE(false, + "SwXDocumentIndexMark::removeVetoableChangeListener(): not implemented"); } -/* -----------------------------16.10.00 11:24-------------------------------- - ---------------------------------------------------------------------------*/ -void SwXDocumentIndexMark::Invalidate() -{ - if(GetRegisteredIn()) - { - ((SwModify*)GetRegisteredIn())->Remove(this); - if(aTypeDepend.GetRegisteredIn()) - ((SwModify*)aTypeDepend.GetRegisteredIn())->Remove(&aTypeDepend); - aLstnrCntnr.Disposing(); - m_pTOXMark = 0; - m_pDoc = 0; - } -} /****************************************************************** * SwXDocumentIndexes diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 10c6c1eb07..cf5853b06b 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -481,8 +481,9 @@ lcl_CreateTOXMarkPortion( ->GetTOXMark(rTOXMark); if (!xContent.is()) { - xContent = new SwXDocumentIndexMark(rTOXMark.GetTOXType(), - &rTOXMark, pDoc); + xContent.set( SwXDocumentIndexMark::CreateXDocumentIndexMark(*pDoc, + *const_cast(rTOXMark.GetTOXType()), rTOXMark), + uno::UNO_QUERY); } SwXTextPortion* pPortion = 0; -- cgit v1.2.3 From b970711495a98a16ccdf4c1d7abc1513e4410a52 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:59 +0100 Subject: swunolocking1: #i105557#: remove class SwUnoCallBack. everything SwUnoCallBack class does has unfixable race conditions. in SwDoc, the uno callback is now a plain SwModify. --- sw/inc/doc.hxx | 3 +- sw/source/core/doc/docnew.cxx | 3 +- sw/source/core/inc/unoclbck.hxx | 52 --------------------- sw/source/core/unocore/makefile.mk | 1 - sw/source/core/unocore/unoclbck.cxx | 85 ---------------------------------- sw/source/core/unocore/unocoll.cxx | 1 - sw/source/core/unocore/unoobj.cxx | 1 - sw/source/core/unocore/unoobj2.cxx | 1 - sw/source/core/unocore/unoportenum.cxx | 16 ++----- 9 files changed, 6 insertions(+), 157 deletions(-) delete mode 100644 sw/source/core/inc/unoclbck.hxx delete mode 100644 sw/source/core/unocore/unoclbck.cxx (limited to 'sw/source') diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 66695efba4..eccdcf2815 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -199,7 +199,6 @@ class SwLayouter; class SdrView; class SdrMarkList; class SwAuthEntry; -class SwUnoCallBack; class SwLayoutCache; class IStyleAccess; struct SwCallMouseEvent; @@ -391,7 +390,7 @@ class SW_DLLPUBLIC SwDoc : SwLayoutCache *pLayoutCache; // Layout cache to read and save with the // document for a faster formatting - SwUnoCallBack *pUnoCallBack; + SwModify *pUnoCallBack; IGrammarContact *mpGrammarContact; // for grammar checking in paragraphs during editing mutable comphelper::ImplementationReference< SwChartDataProvider diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 16d3bc4162..1944579c45 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -90,7 +90,6 @@ #include #include #include -#include #include #include #include @@ -259,7 +258,7 @@ SwDoc::SwDoc() : pStyleAccess( 0 ), // <-- pLayoutCache( 0 ), - pUnoCallBack(new SwUnoCallBack(0)), + pUnoCallBack(new SwModify(0)), mpGrammarContact( 0 ), aChartDataProviderImplRef(), pChartControllerHelper( 0 ), diff --git a/sw/source/core/inc/unoclbck.hxx b/sw/source/core/inc/unoclbck.hxx deleted file mode 100644 index 230b7eb503..0000000000 --- a/sw/source/core/inc/unoclbck.hxx +++ /dev/null @@ -1,52 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: unoclbck.hxx,v $ - * $Revision: 1.6 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _UNOCLBCK_HXX -#define _UNOCLBCK_HXX -#include - -class SwXReferenceMark; -class SwFmtRefMark; -class SwFmtFtn; -class SwXFootnote; -class SwTOXMark; -class SwXDocumentIndexMark; - -class SwUnoCallBack : public SwModify -{ -public: - SwUnoCallBack(SwModify *pToRegisterIn); - virtual ~SwUnoCallBack(); - - // returns the API object of a reference mark if available - SwXReferenceMark* GetRefMark(const SwFmtRefMark& rMark); - SwXFootnote* GetFootnote(const SwFmtFtn& rMark); - SwXDocumentIndexMark* GetTOXMark(const SwTOXMark& rMark); -}; -#endif diff --git a/sw/source/core/unocore/makefile.mk b/sw/source/core/unocore/makefile.mk index b364956a3d..31c6f4f726 100644 --- a/sw/source/core/unocore/makefile.mk +++ b/sw/source/core/unocore/makefile.mk @@ -115,7 +115,6 @@ SLOFILES = \ $(SLO)$/unotextmarkup.obj\ $(SLO)$/TextCursorHelper.obj \ $(SLO)$/unotext.obj\ - $(SLO)$/unoclbck.obj\ $(SLO)$/unomap.obj\ $(SLO)$/unoprnms.obj\ $(SLO)$/XMLRangeHelper.obj diff --git a/sw/source/core/unocore/unoclbck.cxx b/sw/source/core/unocore/unoclbck.cxx deleted file mode 100644 index a05a37abf7..0000000000 --- a/sw/source/core/unocore/unoclbck.cxx +++ /dev/null @@ -1,85 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: unoclbck.cxx,v $ - * $Revision: 1.10 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* -----------------------------06.01.00 13:51-------------------------------- - - ---------------------------------------------------------------------------*/ -SwUnoCallBack::SwUnoCallBack(SwModify *pToRegisterIn) : - SwModify(pToRegisterIn) -{ -} -/* -----------------------------06.01.00 13:51-------------------------------- - - ---------------------------------------------------------------------------*/ -SwUnoCallBack::~SwUnoCallBack() -{ -} -/* -----------------------------01.09.00 12:03-------------------------------- - - ---------------------------------------------------------------------------*/ -SwXReferenceMark* SwUnoCallBack::GetRefMark(const SwFmtRefMark& rMark) -{ - return SwXReferenceMark::GetReferenceMark(*this, rMark); -} - -/* -----------------------------05.09.00 12:38-------------------------------- - - ---------------------------------------------------------------------------*/ -SwXFootnote* SwUnoCallBack::GetFootnote(const SwFmtFtn& rMark) -{ - return SwXFootnote::GetXFootnote(*this, rMark); -} - -/* -----------------------------27.11.00 17:15-------------------------------- - - ---------------------------------------------------------------------------*/ -SwXDocumentIndexMark* SwUnoCallBack::GetTOXMark(const SwTOXMark& /*rMark*/) -{ - return 0; -} - diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index aedace0510..71f4ce5b25 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 37fa35e035..a0903cf049 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -84,7 +84,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 62ae8053e1..40f1234896 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -75,7 +75,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index cf5853b06b..f1e567faf5 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -429,9 +428,7 @@ lcl_CreateRefMarkPortion( SwDoc* pDoc = pUnoCrsr->GetDoc(); const SwFmtRefMark& rRefMark = static_cast(rAttr.GetAttr()); - Reference xContent = - static_cast(pDoc->GetUnoCallBack()) - ->GetRefMark(rRefMark); + Reference xContent; if (!xContent.is()) { xContent = new SwXReferenceMark(pDoc, &rRefMark); @@ -476,15 +473,10 @@ lcl_CreateTOXMarkPortion( SwDoc* pDoc = pUnoCrsr->GetDoc(); const SwTOXMark& rTOXMark = static_cast(rAttr.GetAttr()); - Reference xContent = - static_cast(pDoc->GetUnoCallBack()) - ->GetTOXMark(rTOXMark); - if (!xContent.is()) - { - xContent.set( SwXDocumentIndexMark::CreateXDocumentIndexMark(*pDoc, + Reference xContent( + SwXDocumentIndexMark::CreateXDocumentIndexMark(*pDoc, *const_cast(rTOXMark.GetTOXType()), rTOXMark), - uno::UNO_QUERY); - } + uno::UNO_QUERY); SwXTextPortion* pPortion = 0; if (!bEnd) -- cgit v1.2.3 From 1258f097f0d9786cd4441df6ed1b531df5d56c14 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:14:00 +0100 Subject: swunolocking1: #i107771#: SwXDocumentIndexMark: register at SwTOXMark instead of UnoCallBack. implement instance caching with a WeakReference in SwTOXMark. [the ODF export depends on caching: see XMLIndexMarkExport::GetID()] --- sw/inc/tox.hxx | 32 ++++++++++++++++++--- sw/inc/unoidx.hxx | 4 +-- sw/source/core/docnode/nodes.cxx | 4 ++- sw/source/core/tox/tox.cxx | 34 +++++++++++++++++----- sw/source/core/txtnode/thints.cxx | 2 +- sw/source/core/unocore/unocrsrhelper.cxx | 3 +- sw/source/core/unocore/unoidx.cxx | 49 +++++++++++--------------------- sw/source/core/unocore/unoportenum.cxx | 8 +++--- 8 files changed, 84 insertions(+), 52 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx index 17c9c3103e..07810f6b63 100644 --- a/sw/inc/tox.hxx +++ b/sw/inc/tox.hxx @@ -27,8 +27,10 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _TOX_HXX -#define _TOX_HXX +#ifndef SW_TOX_HXX +#define SW_TOX_HXX + +#include #include #include @@ -47,6 +49,11 @@ #define INCLUDED_VECTOR #endif + +namespace com { namespace sun { namespace star { + namespace text { class XDocumentIndexMark; } +} } } + class SwTOXType; class SwTOXMark; class SwTxtTOXMark; @@ -61,7 +68,9 @@ SV_DECL_PTRARR(SwTOXMarks, SwTOXMark*, 0, 10) #define IVER_TOXMARK_STRPOOL ((USHORT)1) #define IVER_TOXMARK_NEWTOX ((USHORT)2) -class SW_DLLPUBLIC SwTOXMark : public SfxPoolItem, public SwClient +class SW_DLLPUBLIC SwTOXMark + : public SfxPoolItem + , public SwModify { friend void _InitCore(); friend class SwTxtTOXMark; @@ -80,6 +89,8 @@ class SW_DLLPUBLIC SwTOXMark : public SfxPoolItem, public SwClient BOOL bAutoGenerated : 1; // generated using a concordance file BOOL bMainEntry : 1; // main entry emphasized by character style + ::com::sun::star::uno::WeakReference< + ::com::sun::star::text::XDocumentIndexMark> m_wXDocumentIndexMark; SwTOXMark(); // to create the dflt. atr. in _InitCore @@ -97,6 +108,11 @@ public: virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + // SwClient + virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ); + + void InvalidateTOXMark(); + String GetText() const; inline BOOL IsAlternativeText() const; @@ -131,6 +147,14 @@ public: const SwTxtTOXMark* GetTxtTOXMark() const { return pTxtAttr; } SwTxtTOXMark* GetTxtTOXMark() { return pTxtAttr; } + + SW_DLLPRIVATE ::com::sun::star::uno::WeakReference< + ::com::sun::star::text::XDocumentIndexMark> const& GetXTOXMark() const + { return m_wXDocumentIndexMark; } + SW_DLLPRIVATE void SetXTOXMark(::com::sun::star::uno::Reference< + ::com::sun::star::text::XDocumentIndexMark> const& xMark) + { m_wXDocumentIndexMark = xMark; } + }; /*-------------------------------------------------------------------- @@ -769,4 +793,4 @@ inline void SwTOXBase::SetOptions(USHORT nOpt) } -#endif // _TOX_HXX +#endif // SW_TOX_HXX diff --git a/sw/inc/unoidx.hxx b/sw/inc/unoidx.hxx index 4824068b3f..d262e1784a 100644 --- a/sw/inc/unoidx.hxx +++ b/sw/inc/unoidx.hxx @@ -207,7 +207,7 @@ private: virtual ~SwXDocumentIndexMark(); SwXDocumentIndexMark(SwDoc & rDoc, - SwTOXType & rType, const SwTOXMark & rMark); + SwTOXType & rType, SwTOXMark & rMark); public: @@ -217,7 +217,7 @@ public: static ::com::sun::star::uno::Reference< ::com::sun::star::text::XDocumentIndexMark> CreateXDocumentIndexMark(SwDoc & rDoc, - SwTOXType & rType, const SwTOXMark & rMark); + SwTOXType & rType, SwTOXMark & rMark); static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 4656d96a0b..069ea638bd 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -48,6 +48,7 @@ #include #include #include +#include // InvalidateTOXMark #include #include @@ -341,7 +342,8 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz, break; case RES_TXTATR_TOXMARK: - nDelMsg = RES_TOXMARK_DELETED; + static_cast(pAttr->GetAttr()) + .InvalidateTOXMark(); break; case RES_TXTATR_REFMARK: diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index 5a1795a237..268d6a3aaa 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -50,6 +50,7 @@ #include #include #include +#include // SwPtrMsgPoolItem // -> #i21237# #include @@ -176,10 +177,11 @@ SwFormTokens lcl_GetAuthPattern(USHORT nTypeId) --------------------------------------------------------------------*/ - // Konstruktor fuers Default vom Attribut-Pool +/// pool default constructor SwTOXMark::SwTOXMark() - : SfxPoolItem( RES_TXTATR_TOXMARK ), - SwClient( 0 ), + : SfxPoolItem( RES_TXTATR_TOXMARK ) + , SwModify( 0 ) + , pTxtAttr( 0 ), bAutoGenerated(FALSE), bMainEntry(FALSE) @@ -188,8 +190,9 @@ SwTOXMark::SwTOXMark() SwTOXMark::SwTOXMark( const SwTOXType* pTyp ) - : SfxPoolItem( RES_TXTATR_TOXMARK ), - SwClient( (SwModify*)pTyp ), + : SfxPoolItem( RES_TXTATR_TOXMARK ) + , SwModify( const_cast(pTyp) ) + , pTxtAttr( 0 ), nLevel( 0 ), bAutoGenerated(FALSE), bMainEntry(FALSE) @@ -198,8 +201,9 @@ SwTOXMark::SwTOXMark( const SwTOXType* pTyp ) SwTOXMark::SwTOXMark( const SwTOXMark& rCopy ) - : SfxPoolItem( RES_TXTATR_TOXMARK ), - SwClient((SwModify*)rCopy.GetRegisteredIn()), + : SfxPoolItem( RES_TXTATR_TOXMARK ) + , SwModify(rCopy.pRegisteredIn) + , aPrimaryKey( rCopy.aPrimaryKey ), aSecondaryKey( rCopy.aSecondaryKey ), aTextReading( rCopy.aTextReading ), aPrimaryKeyReading( rCopy.aPrimaryKeyReading ), @@ -230,6 +234,22 @@ SfxPoolItem* SwTOXMark::Clone( SfxItemPool* ) const return new SwTOXMark( *this ); } +void SwTOXMark::Modify(SfxPoolItem* pOld, SfxPoolItem* pNew) +{ + SwModify::Modify(pOld, pNew); + if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which())) + { // invalidate cached uno object + SetXTOXMark(::com::sun::star::uno::Reference< + ::com::sun::star::text::XDocumentIndexMark>(0)); + } +} + +void SwTOXMark::InvalidateTOXMark() +{ + SwPtrMsgPoolItem aMsgHint( RES_REMOVE_UNO_OBJECT, + &static_cast(*this) ); // cast to base class! + Modify(&aMsgHint, &aMsgHint); +} String SwTOXMark::GetText() const { diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index dfb147fbbe..7819ecd496 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1174,7 +1174,7 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* pAttr ) break; case RES_TXTATR_TOXMARK: - nDelMsg = RES_TOXMARK_DELETED; + static_cast(pAttr->GetAttr()).InvalidateTOXMark(); break; case RES_TXTATR_REFMARK: diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index cb0aa83e22..725c287111 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -313,7 +313,8 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry { if( pAny ) { - const SwTOXMark& rMark = pTxtAttr->GetTOXMark(); + SwTOXMark & rMark = + static_cast(pTxtAttr->GetAttr()); const uno::Reference< text::XDocumentIndexMark > xRef = SwXDocumentIndexMark::CreateXDocumentIndexMark( *rPam.GetDoc(), diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 8e4d56e705..19dda1dd91 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -1598,7 +1598,7 @@ public: SwDoc *const pDoc, const enum TOXTypes eType, SwTOXType *const pType, SwTOXMark const*const pMark) - : SwClient((pDoc) ? pDoc->GetUnoCallBack() : 0) + : SwClient(const_cast(pMark)) , m_rPropSet( *aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Mark(eType))) , m_eTOXType(eType) @@ -1654,19 +1654,6 @@ void SwXDocumentIndexMark::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) { Invalidate(); } - else if (pOld) - { - switch (pOld->Which()) - { - case RES_TOXMARK_DELETED: - if (static_cast(m_pTOXMark) == - static_cast(pOld)->pObject) - { - Invalidate(); - } - break; - } - } } /*-- 14.12.98 10:25:43--------------------------------------------------- @@ -1680,7 +1667,7 @@ SwXDocumentIndexMark::SwXDocumentIndexMark(const TOXTypes eToxType) -----------------------------------------------------------------------*/ SwXDocumentIndexMark::SwXDocumentIndexMark(SwDoc & rDoc, - SwTOXType & rType, const SwTOXMark & rMark) + SwTOXType & rType, SwTOXMark & rMark) : m_pImpl( new SwXDocumentIndexMark::Impl(*this, &rDoc, rType.GetType(), &rType, &rMark) ) { @@ -1694,23 +1681,20 @@ SwXDocumentIndexMark::~SwXDocumentIndexMark() uno::Reference SwXDocumentIndexMark::CreateXDocumentIndexMark( - SwDoc & rDoc, SwTOXType & rType, const SwTOXMark & rMark) + SwDoc & rDoc, SwTOXType & rType, SwTOXMark & rMark) { + // re-use existing SwXDocumentIndexMark + // NB: xmloff depends on this caching to generate ID from the address! // #i105557#: do not iterate over the registered clients: race condition - // to do this properly requires the SwXDocumentIndexMark to register at the - // format directly, not at the unocallback -#if 0 - SwClientIter aIter(*pType); - SwXDocumentIndexMark::Impl* pxMark = (SwXDocumentIndexMark::Impl*) - aIter.First(TYPE(SwXDocumentIndexMark::Impl)); - while( pxMark ) - { - if(pxMark->m_pTOXMark == pMark) - return pxMark->m_rThis; - pxMark = (SwXDocumentIndexMark::Impl*)aIter.Next(); + uno::Reference< text::XDocumentIndexMark > xTOXMark(rMark.GetXTOXMark()); + if (!xTOXMark.is()) + { + SwXDocumentIndexMark *const pNew = + new SwXDocumentIndexMark(rDoc, rType, rMark); + xTOXMark.set(pNew); + rMark.SetXTOXMark(xTOXMark); } -#endif - return new SwXDocumentIndexMark(rDoc, rType, rMark); + return xTOXMark; } /* -----------------------------10.03.00 18:02-------------------------------- @@ -1955,8 +1939,6 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) { throw lang::IllegalArgumentException(); } - pDoc->GetUnoCallBack()->Add(m_pImpl.get()); - const_cast(pTOXType)->Add(&m_pImpl->m_TypeDepend); SwUnoInternalPaM aPam(*pDoc); //das muss jetzt sal_True liefern @@ -2046,6 +2028,9 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) m_pImpl->m_pTOXMark = &pTxtAttr->GetTOXMark(); m_pImpl->m_pDoc = pDoc; m_pImpl->m_bIsDescriptor = sal_False; + + const_cast(m_pImpl->m_pTOXMark)->Add(m_pImpl.get()); + const_cast(pTOXType)->Add(&m_pImpl->m_TypeDepend); } /*-- 14.12.98 10:25:45--------------------------------------------------- @@ -2268,7 +2253,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, if(pTxtAttr) { m_pImpl->m_pTOXMark = &pTxtAttr->GetTOXMark(); - m_pImpl->m_pDoc->GetUnoCallBack()->Add(m_pImpl.get()); + const_cast(m_pImpl->m_pTOXMark)->Add(m_pImpl.get()); pType->Add(&m_pImpl->m_TypeDepend); } } diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index f1e567faf5..be4befde2f 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -468,12 +468,12 @@ static Reference lcl_CreateTOXMarkPortion( Reference const& xParent, const SwUnoCrsr * const pUnoCrsr, - const SwTxtAttr & rAttr, const bool bEnd) + SwTxtAttr & rAttr, const bool bEnd) { SwDoc* pDoc = pUnoCrsr->GetDoc(); - const SwTOXMark& rTOXMark = static_cast(rAttr.GetAttr()); + SwTOXMark & rTOXMark = static_cast(rAttr.GetAttr()); - Reference xContent( + const Reference xContent( SwXDocumentIndexMark::CreateXDocumentIndexMark(*pDoc, *const_cast(rTOXMark.GetTOXType()), rTOXMark), uno::UNO_QUERY); @@ -742,7 +742,7 @@ lcl_ExportHints( while(nStartIndex < pHints->GetStartCount() && nCurrentIndex >= (nNextStart = (*pHints->GetStart(nStartIndex)->GetStart()))) { - const SwTxtAttr * const pAttr = pHints->GetStart(nStartIndex); + SwTxtAttr * const pAttr = pHints->GetStart(nStartIndex); USHORT nAttrWhich = pAttr->Which(); if (nNextStart == nCurrentIndex) { -- cgit v1.2.3 From 75575267643e05abd59d3c3de43f863764fd0845 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 8 Jan 2010 18:32:51 +0100 Subject: #i107450#: build all other modules with new editeng lib --- starmath/inc/edit.hxx | 2 +- starmath/inc/starmath.hrc | 6 +- starmath/sdi/smslots.sdi | 1 + starmath/source/accessibility.cxx | 12 +-- starmath/source/accessibility.hxx | 4 +- starmath/source/document.cxx | 18 ++--- starmath/source/edit.cxx | 16 ++-- starmath/source/format.cxx | 2 +- starmath/source/math_pch.cxx | 2 +- starmath/source/parse.cxx | 2 +- starmath/source/unomodel.cxx | 2 +- starmath/source/view.cxx | 2 +- starmath/util/makefile.mk | 1 + sw/inc/PostItMgr.hxx | 2 +- sw/inc/doc.hxx | 2 +- sw/inc/editsh.hxx | 2 +- sw/inc/ftninfo.hxx | 2 +- sw/inc/hhcwrp.hxx | 4 +- sw/inc/htmltbl.hxx | 2 +- sw/inc/lineinfo.hxx | 2 +- sw/inc/numrule.hxx | 4 +- sw/inc/pagedesc.hxx | 2 +- sw/inc/pch/precompiled_sw.hxx | 41 +++++----- sw/inc/poolfmt.hxx | 2 +- sw/inc/postit.hxx | 2 +- sw/inc/swacorr.hxx | 2 +- sw/inc/tblafmt.hxx | 26 +++---- sw/inc/tox.hxx | 2 +- sw/inc/txatritr.hxx | 2 +- sw/inc/unotxdoc.hxx | 2 +- sw/sdi/swslots.hrc | 4 +- sw/source/core/SwNumberTree/SwNodeNum.cxx | 2 +- sw/source/core/access/accframe.cxx | 2 +- sw/source/core/access/accpara.cxx | 2 +- sw/source/core/attr/hints.cxx | 2 +- sw/source/core/attr/swatrset.cxx | 8 +- sw/source/core/bastyp/breakit.cxx | 4 +- sw/source/core/bastyp/calc.cxx | 6 +- sw/source/core/bastyp/init.cxx | 86 ++++++++++----------- sw/source/core/bastyp/swtypes.cxx | 2 +- sw/source/core/crsr/crsrsh.cxx | 2 +- sw/source/core/crsr/crstrvl.cxx | 6 +- sw/source/core/crsr/findattr.cxx | 6 +- sw/source/core/crsr/pam.cxx | 2 +- sw/source/core/crsr/swcrsr.cxx | 2 +- sw/source/core/crsr/trvltbl.cxx | 2 +- sw/source/core/doc/acmplwrd.cxx | 4 +- sw/source/core/doc/doc.cxx | 10 +-- sw/source/core/doc/doccomp.cxx | 8 +- sw/source/core/doc/docdesc.cxx | 8 +- sw/source/core/doc/docdraw.cxx | 27 +++---- sw/source/core/doc/docedt.cxx | 4 +- sw/source/core/doc/docfmt.cxx | 10 +-- sw/source/core/doc/doclay.cxx | 18 ++--- sw/source/core/doc/docnew.cxx | 2 +- sw/source/core/doc/docnum.cxx | 6 +- sw/source/core/doc/docredln.cxx | 6 +- sw/source/core/doc/docsort.cxx | 2 +- sw/source/core/doc/doctxm.cxx | 8 +- sw/source/core/doc/extinput.cxx | 4 +- sw/source/core/doc/fmtcol.cxx | 6 +- sw/source/core/doc/gctable.cxx | 2 +- sw/source/core/doc/notxtfrm.cxx | 4 +- sw/source/core/doc/number.cxx | 6 +- sw/source/core/doc/poolfmt.cxx | 44 +++++------ sw/source/core/doc/tblrwcl.cxx | 8 +- sw/source/core/docnode/ndcopy.cxx | 2 +- sw/source/core/docnode/ndtbl.cxx | 10 +-- sw/source/core/docnode/ndtbl1.cxx | 10 +-- sw/source/core/docnode/node.cxx | 4 +- sw/source/core/docnode/section.cxx | 2 +- sw/source/core/docnode/swbaslnk.cxx | 2 +- sw/source/core/draw/dcontact.cxx | 8 +- sw/source/core/draw/dflyobj.cxx | 4 +- sw/source/core/draw/drawdoc.cxx | 2 +- sw/source/core/draw/dview.cxx | 4 +- sw/source/core/edit/acorrect.cxx | 4 +- sw/source/core/edit/autofmt.cxx | 22 +++--- sw/source/core/edit/edattr.cxx | 6 +- sw/source/core/edit/edfcol.cxx | 2 +- sw/source/core/edit/edlingu.cxx | 10 +-- sw/source/core/edit/edtab.cxx | 2 +- sw/source/core/edit/edtox.cxx | 2 +- sw/source/core/fields/authfld.cxx | 4 +- sw/source/core/fields/docufld.cxx | 6 +- sw/source/core/fields/expfld.cxx | 6 +- sw/source/core/fields/fldbas.cxx | 2 +- sw/source/core/fields/postithelper.cxx | 2 +- sw/source/core/fields/reffld.cxx | 2 +- sw/source/core/fields/textapi.cxx | 4 +- sw/source/core/frmedt/fecopy.cxx | 2 +- sw/source/core/frmedt/fefly1.cxx | 2 +- sw/source/core/frmedt/feshview.cxx | 6 +- sw/source/core/frmedt/fetab.cxx | 6 +- sw/source/core/frmedt/tblsel.cxx | 4 +- sw/source/core/graphic/ndgrf.cxx | 7 +- sw/source/core/inc/acorrect.hxx | 2 +- sw/source/core/inc/frmtool.hxx | 2 +- sw/source/core/inc/swfont.hxx | 2 +- sw/source/core/inc/textapi.hxx | 14 ++-- sw/source/core/layout/anchoredobject.cxx | 4 +- sw/source/core/layout/atrfrm.cxx | 6 +- sw/source/core/layout/calcmove.cxx | 4 +- sw/source/core/layout/colfrm.cxx | 4 +- sw/source/core/layout/flowfrm.cxx | 8 +- sw/source/core/layout/fly.cxx | 12 +-- sw/source/core/layout/flycnt.cxx | 4 +- sw/source/core/layout/flylay.cxx | 2 +- sw/source/core/layout/frmtool.cxx | 14 ++-- sw/source/core/layout/layact.cxx | 4 +- sw/source/core/layout/laycache.cxx | 2 +- sw/source/core/layout/pagechg.cxx | 2 +- sw/source/core/layout/pagedesc.cxx | 14 ++-- sw/source/core/layout/paintfrm.cxx | 10 +-- sw/source/core/layout/sectfrm.cxx | 6 +- sw/source/core/layout/ssfrm.cxx | 4 +- sw/source/core/layout/tabfrm.cxx | 10 +-- sw/source/core/layout/trvlfrm.cxx | 2 +- sw/source/core/layout/wsfrm.cxx | 8 +- .../objectpositioning/anchoredobjectposition.cxx | 4 +- .../ascharanchoredobjectposition.cxx | 4 +- .../tocntntanchoredobjectposition.cxx | 4 +- .../tolayoutanchoredobjectposition.cxx | 4 +- sw/source/core/sw3io/sw3convert.cxx | 4 +- sw/source/core/table/swnewtable.cxx | 4 +- sw/source/core/table/swtable.cxx | 10 +-- sw/source/core/text/EnhancedPDFExportHelper.cxx | 8 +- sw/source/core/text/atrstck.cxx | 46 +++++------ sw/source/core/text/frmcrsr.cxx | 8 +- sw/source/core/text/frmform.cxx | 4 +- sw/source/core/text/frmpaint.cxx | 4 +- sw/source/core/text/guess.cxx | 2 +- sw/source/core/text/inftxt.cxx | 20 ++--- sw/source/core/text/inftxt.hxx | 2 +- sw/source/core/text/itratr.cxx | 4 +- sw/source/core/text/itrcrsr.cxx | 8 +- sw/source/core/text/itrform2.cxx | 4 +- sw/source/core/text/itrpaint.cxx | 6 +- sw/source/core/text/itrtxt.cxx | 2 +- sw/source/core/text/porfld.cxx | 4 +- sw/source/core/text/porfly.cxx | 4 +- sw/source/core/text/porlay.cxx | 8 +- sw/source/core/text/pormulti.cxx | 4 +- sw/source/core/text/porrst.cxx | 10 +-- sw/source/core/text/txtdrop.cxx | 4 +- sw/source/core/text/txtfly.cxx | 16 ++-- sw/source/core/text/txtfrm.cxx | 12 +-- sw/source/core/text/txtftn.cxx | 4 +- sw/source/core/text/txthyph.cxx | 2 +- sw/source/core/text/txttab.cxx | 4 +- sw/source/core/text/widorp.cxx | 8 +- sw/source/core/tox/tox.cxx | 2 +- sw/source/core/tox/txmsrt.cxx | 2 +- sw/source/core/txtnode/fntcache.cxx | 4 +- sw/source/core/txtnode/fntcap.cxx | 2 +- sw/source/core/txtnode/ndtxt.cxx | 10 +-- sw/source/core/txtnode/swfont.cxx | 52 ++++++------- sw/source/core/txtnode/thints.cxx | 14 ++-- sw/source/core/txtnode/txatritr.cxx | 2 +- sw/source/core/txtnode/txtatr2.cxx | 4 +- sw/source/core/txtnode/txtedt.cxx | 14 ++-- sw/source/core/undo/rolbck.cxx | 2 +- sw/source/core/undo/unattr.cxx | 2 +- sw/source/core/undo/undel.cxx | 6 +- sw/source/core/undo/unins.cxx | 2 +- sw/source/core/undo/unnum.cxx | 2 +- sw/source/core/undo/unspnd.cxx | 2 +- sw/source/core/undo/untbl.cxx | 2 +- sw/source/core/unocore/unocrsrhelper.cxx | 4 +- sw/source/core/unocore/unodraw.cxx | 6 +- sw/source/core/unocore/unofield.cxx | 2 +- sw/source/core/unocore/unoflatpara.cxx | 2 +- sw/source/core/unocore/unoframe.cxx | 20 ++--- sw/source/core/unocore/unoidx.cxx | 2 +- sw/source/core/unocore/unomap.cxx | 11 +-- sw/source/core/unocore/unoobj.cxx | 4 +- sw/source/core/unocore/unoobj2.cxx | 6 +- sw/source/core/unocore/unosect.cxx | 8 +- sw/source/core/unocore/unosett.cxx | 9 ++- sw/source/core/unocore/unosrch.cxx | 2 +- sw/source/core/unocore/unostyle.cxx | 17 +++-- sw/source/core/unocore/unotbl.cxx | 14 ++-- sw/source/core/view/vprint.cxx | 4 +- sw/source/filter/ascii/ascatr.cxx | 2 +- sw/source/filter/ascii/parasc.cxx | 8 +- sw/source/filter/basflt/fltini.cxx | 6 +- sw/source/filter/basflt/shellio.cxx | 8 +- sw/source/filter/html/css1atr.cxx | 48 ++++++------ sw/source/filter/html/htmlatr.cxx | 44 ++++++----- sw/source/filter/html/htmlcss1.cxx | 31 ++++---- sw/source/filter/html/htmlctxt.cxx | 8 +- sw/source/filter/html/htmldraw.cxx | 12 +-- sw/source/filter/html/htmlfly.cxx | 15 ++-- sw/source/filter/html/htmlform.cxx | 20 ++--- sw/source/filter/html/htmlforw.cxx | 16 ++-- sw/source/filter/html/htmlgrin.cxx | 24 +++--- sw/source/filter/html/htmlnum.cxx | 4 +- sw/source/filter/html/htmlplug.cxx | 4 +- sw/source/filter/html/htmlsect.cxx | 6 +- sw/source/filter/html/htmltab.cxx | 16 ++-- sw/source/filter/html/htmltabw.cxx | 8 +- sw/source/filter/html/svxcss1.cxx | 42 +++++------ sw/source/filter/html/svxcss1.hxx | 2 +- sw/source/filter/html/swhtml.cxx | 37 ++++----- sw/source/filter/html/swhtml.hxx | 2 +- sw/source/filter/html/wrthtml.cxx | 14 ++-- sw/source/filter/inc/fltshell.hxx | 2 +- sw/source/filter/rtf/rtfatr.cxx | 76 +++++++++---------- sw/source/filter/rtf/rtffld.cxx | 10 +-- sw/source/filter/rtf/rtffly.cxx | 16 ++-- sw/source/filter/rtf/rtfnum.cxx | 20 ++--- sw/source/filter/rtf/rtftbl.cxx | 6 +- sw/source/filter/rtf/swparrtf.cxx | 26 +++---- sw/source/filter/rtf/swparrtf.hxx | 6 +- sw/source/filter/rtf/wrtrtf.cxx | 22 +++--- sw/source/filter/writer/writer.cxx | 5 +- sw/source/filter/writer/wrtswtbl.cxx | 4 +- sw/source/filter/ww1/fltshell.cxx | 22 +++--- sw/source/filter/ww1/w1filter.cxx | 32 ++++---- sw/source/filter/ww1/w1sprm.cxx | 20 ++--- sw/source/filter/ww8/attributeoutputbase.hxx | 2 +- sw/source/filter/ww8/docxattributeoutput.cxx | 78 +++++++++---------- sw/source/filter/ww8/dump/ww8struc.hxx | 2 +- sw/source/filter/ww8/writerhelper.cxx | 4 +- sw/source/filter/ww8/writerwordglue.cxx | 10 +-- sw/source/filter/ww8/wrtw8esh.cxx | 20 ++--- sw/source/filter/ww8/wrtw8nds.cxx | 26 +++---- sw/source/filter/ww8/wrtw8num.cxx | 4 +- sw/source/filter/ww8/wrtw8sty.cxx | 10 +-- sw/source/filter/ww8/wrtww8.cxx | 12 +-- sw/source/filter/ww8/wrtww8gr.cxx | 12 +-- sw/source/filter/ww8/ww8atr.cxx | 80 ++++++++++---------- sw/source/filter/ww8/ww8graf.cxx | 53 ++++++------- sw/source/filter/ww8/ww8graf2.cxx | 6 +- sw/source/filter/ww8/ww8par.cxx | 14 ++-- sw/source/filter/ww8/ww8par.hxx | 2 +- sw/source/filter/ww8/ww8par2.cxx | 26 +++---- sw/source/filter/ww8/ww8par2.hxx | 2 +- sw/source/filter/ww8/ww8par3.cxx | 16 ++-- sw/source/filter/ww8/ww8par4.cxx | 4 +- sw/source/filter/ww8/ww8par5.cxx | 6 +- sw/source/filter/ww8/ww8par6.cxx | 88 +++++++++++----------- sw/source/filter/xml/xmlbrsh.cxx | 3 +- sw/source/filter/xml/xmlexp.cxx | 8 +- sw/source/filter/xml/xmlexpit.cxx | 17 +++-- sw/source/filter/xml/xmlfonte.cxx | 2 +- sw/source/filter/xml/xmlimp.cxx | 2 +- sw/source/filter/xml/xmlimpit.cxx | 17 +++-- sw/source/filter/xml/xmliteme.cxx | 7 +- sw/source/filter/xml/xmlitemi.cxx | 12 +-- sw/source/filter/xml/xmlitemm.cxx | 2 +- sw/source/filter/xml/xmlithlp.cxx | 14 ++-- sw/source/filter/xml/xmlithlp.hxx | 2 +- sw/source/filter/xml/xmlmeta.cxx | 2 +- sw/source/filter/xml/xmltble.cxx | 6 +- sw/source/filter/xml/xmltbli.cxx | 2 +- sw/source/ui/app/appenv.cxx | 12 +-- sw/source/ui/app/apphdl.cxx | 2 +- sw/source/ui/app/applab.cxx | 12 +-- sw/source/ui/app/appopt.cxx | 8 +- sw/source/ui/app/docsh.cxx | 4 +- sw/source/ui/app/docsh2.cxx | 6 +- sw/source/ui/app/docshini.cxx | 22 +++--- sw/source/ui/app/docst.cxx | 4 +- sw/source/ui/app/docstyle.cxx | 13 +--- sw/source/ui/app/swmodul1.cxx | 14 ++-- sw/source/ui/app/swmodule.cxx | 2 +- sw/source/ui/chrdlg/chardlg.cxx | 2 +- sw/source/ui/chrdlg/drpcps.cxx | 6 +- sw/source/ui/config/cfgitems.cxx | 2 +- sw/source/ui/config/modcfg.cxx | 2 +- sw/source/ui/config/optpage.cxx | 6 +- sw/source/ui/config/uinums.cxx | 2 +- sw/source/ui/config/viewopt.cxx | 6 +- sw/source/ui/dbui/dbinsdlg.cxx | 8 +- sw/source/ui/dbui/dbmgr.cxx | 2 +- sw/source/ui/dbui/mmlayoutpage.cxx | 2 +- sw/source/ui/dbui/mmoutputpage.cxx | 4 +- sw/source/ui/dialog/SwSpellDialogChildWindow.cxx | 6 +- sw/source/ui/dialog/ascfldlg.cxx | 10 +-- sw/source/ui/dialog/regionsw.cxx | 2 +- sw/source/ui/dialog/uiregionsw.cxx | 2 +- sw/source/ui/dochdl/gloshdl.cxx | 6 +- sw/source/ui/dochdl/swdtflvr.cxx | 38 +++------- sw/source/ui/docvw/PostItMgr.cxx | 6 +- sw/source/ui/docvw/edtdd.cxx | 2 +- sw/source/ui/docvw/edtwin.cxx | 26 +++---- sw/source/ui/docvw/edtwin2.cxx | 4 +- sw/source/ui/docvw/edtwin3.cxx | 2 +- sw/source/ui/docvw/postit.cxx | 40 +++++----- sw/source/ui/docvw/romenu.cxx | 5 +- sw/source/ui/docvw/srcedtw.cxx | 2 +- sw/source/ui/envelp/envfmt.cxx | 8 +- sw/source/ui/envelp/envimg.cxx | 2 +- sw/source/ui/fldui/fldmgr.cxx | 4 +- sw/source/ui/fldui/inpdlg.cxx | 2 +- sw/source/ui/fmtui/tmpdlg.cxx | 2 +- sw/source/ui/frmdlg/colex.cxx | 10 +-- sw/source/ui/frmdlg/colmgr.cxx | 2 +- sw/source/ui/frmdlg/column.cxx | 10 +-- sw/source/ui/frmdlg/frmmgr.cxx | 12 +-- sw/source/ui/frmdlg/frmpage.cxx | 28 +++---- sw/source/ui/frmdlg/wrap.cxx | 6 +- sw/source/ui/inc/colex.hxx | 2 +- sw/source/ui/inc/frmmgr.hxx | 2 +- sw/source/ui/inc/hyp.hxx | 2 +- sw/source/ui/inc/regionsw.hxx | 6 +- sw/source/ui/inc/view.hxx | 4 +- sw/source/ui/index/cnttab.cxx | 2 +- sw/source/ui/index/idxmrk.cxx | 4 +- sw/source/ui/index/swuiidxmrk.cxx | 6 +- sw/source/ui/lingu/hhcwrp.cxx | 14 ++-- sw/source/ui/lingu/olmenu.cxx | 15 ++-- sw/source/ui/lingu/sdrhhcwrap.cxx | 6 +- sw/source/ui/misc/glossary.cxx | 2 +- sw/source/ui/misc/glshell.cxx | 2 +- sw/source/ui/misc/insfnote.cxx | 2 +- sw/source/ui/misc/insrule.cxx | 2 +- sw/source/ui/misc/num.cxx | 7 +- sw/source/ui/misc/outline.cxx | 2 +- sw/source/ui/misc/pgfnote.cxx | 4 +- sw/source/ui/misc/pggrid.cxx | 10 +-- sw/source/ui/misc/srtdlg.cxx | 2 +- sw/source/ui/ribbar/concustomshape.cxx | 4 +- sw/source/ui/ribbar/conrect.cxx | 2 +- sw/source/ui/ribbar/drawbase.cxx | 2 +- sw/source/ui/shells/annotsh.cxx | 58 +++++++------- sw/source/ui/shells/basesh.cxx | 21 +++--- sw/source/ui/shells/drwtxtex.cxx | 62 +++++++-------- sw/source/ui/shells/drwtxtsh.cxx | 16 ++-- sw/source/ui/shells/frmsh.cxx | 8 +- sw/source/ui/shells/grfsh.cxx | 6 +- sw/source/ui/shells/grfshex.cxx | 5 -- sw/source/ui/shells/langhelper.cxx | 14 ++-- sw/source/ui/shells/listsh.cxx | 4 +- sw/source/ui/shells/mediash.cxx | 6 +- sw/source/ui/shells/slotadd.cxx | 85 +++++++++++---------- sw/source/ui/shells/tabsh.cxx | 22 +++--- sw/source/ui/shells/textidx.cxx | 2 +- sw/source/ui/shells/textsh.cxx | 16 ++-- sw/source/ui/shells/textsh1.cxx | 20 ++--- sw/source/ui/shells/txtattr.cxx | 14 ++-- sw/source/ui/shells/txtnum.cxx | 4 +- sw/source/ui/table/swtablerep.cxx | 8 +- sw/source/ui/table/tabledlg.cxx | 8 +- sw/source/ui/uiview/formatclipboard.cxx | 12 +-- sw/source/ui/uiview/pview.cxx | 2 +- sw/source/ui/uiview/srcview.cxx | 10 +-- sw/source/ui/uiview/view.cxx | 5 +- sw/source/ui/uiview/view2.cxx | 27 +++---- sw/source/ui/uiview/viewdlg.cxx | 2 +- sw/source/ui/uiview/viewdraw.cxx | 14 ++-- sw/source/ui/uiview/viewling.cxx | 7 +- sw/source/ui/uiview/viewmdi.cxx | 2 +- sw/source/ui/uiview/viewport.cxx | 4 +- sw/source/ui/uiview/viewprt.cxx | 2 +- sw/source/ui/uiview/viewsrch.cxx | 2 +- sw/source/ui/uiview/viewstat.cxx | 8 +- sw/source/ui/uiview/viewtab.cxx | 12 +-- sw/source/ui/uno/swdetect.cxx | 1 - sw/source/ui/uno/unoatxt.cxx | 2 +- sw/source/ui/uno/unotxdoc.cxx | 10 +-- sw/source/ui/uno/unotxvw.cxx | 10 +-- sw/source/ui/utlui/attrdesc.cxx | 2 +- sw/source/ui/utlui/numfmtlb.cxx | 2 +- sw/source/ui/utlui/uiitems.cxx | 2 +- sw/source/ui/utlui/uitool.cxx | 10 +-- sw/source/ui/vba/vbaapplication.cxx | 2 +- sw/source/ui/wrtsh/delete.cxx | 2 +- sw/source/ui/wrtsh/select.cxx | 2 +- sw/source/ui/wrtsh/wrtsh1.cxx | 11 ++- sw/util/makefile.mk | 6 +- 372 files changed, 1708 insertions(+), 1793 deletions(-) (limited to 'sw/source') diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx index c6e3121ced..0865397851 100644 --- a/starmath/inc/edit.hxx +++ b/starmath/inc/edit.hxx @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include //#ifndef _ACCESSIBILITY_HXX_ diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc index d6a894258a..0b5a25e354 100644 --- a/starmath/inc/starmath.hrc +++ b/starmath/inc/starmath.hrc @@ -30,13 +30,9 @@ #ifndef _STARMATH_HRC #define _STARMATH_HRC -#ifndef _SVX_SVXIDS_HRC #include -#endif -#ifndef _SFXSIDS_HRC //autogen #include -#endif - +#include #define SID_NEXTERR (SID_SMA_START + 1) #define SID_PREVERR (SID_SMA_START + 2) diff --git a/starmath/sdi/smslots.sdi b/starmath/sdi/smslots.sdi index 88bd108bdd..2a43b08f2e 100644 --- a/starmath/sdi/smslots.sdi +++ b/starmath/sdi/smslots.sdi @@ -35,6 +35,7 @@ StarMath [ HelpText ( "StarMath Application" ) SlotIdFile ( "starmath.hrc" ) + SlotIdFile ( "editeng/editids.hrc" ) SlotIdFile ( "sfx2/sfxsids.hrc" ) SlotIdFile ( "svx/svxids.hrc" ) ] diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index ec5c005d68..384920a2c9 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -53,12 +53,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "accessibility.hxx" diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx index 3c0c3fcc63..7865f9e401 100644 --- a/starmath/source/accessibility.hxx +++ b/starmath/source/accessibility.hxx @@ -54,8 +54,8 @@ #include #include -#include -#include // SvxEditSource, SvxTextForwarder, SvxViewForwarder, SvxEditViewForwarder +#include +#include // SvxEditSource, SvxTextForwarder, SvxViewForwarder, SvxEditViewForwarder #include #include diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index cc85df6aa7..62b454e70b 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -71,17 +71,17 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include #include - +#include #include #include #include @@ -97,8 +97,8 @@ #include "mathtype.hxx" #include "mathmlimport.hxx" #include "mathmlexport.hxx" - - +#include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::accessibility; diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index 6e9a1827f3..af55c2b9e9 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -47,19 +47,19 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include -#include -#include -#include +#include +#include +#include #include -#include +#include #include #include "edit.hxx" diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx index 11309efb98..2946edf5b4 100644 --- a/starmath/source/format.cxx +++ b/starmath/source/format.cxx @@ -34,7 +34,7 @@ #include #include -#include +#include #include "format.hxx" ///////////////////////////////////////////////////////////////// diff --git a/starmath/source/math_pch.cxx b/starmath/source/math_pch.cxx index 7a58e8aa62..f3f9be832a 100644 --- a/starmath/source/math_pch.cxx +++ b/starmath/source/math_pch.cxx @@ -817,7 +817,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index b48e7541aa..a6fbe06d10 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include "parse.hxx" #ifndef _STARMATH_HRC diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 1747670204..a6bb99eebd 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 4c409a7f8f..d3867e7ba8 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -61,7 +61,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/starmath/util/makefile.mk b/starmath/util/makefile.mk index 978cb6cff4..7a4e56f94e 100644 --- a/starmath/util/makefile.mk +++ b/starmath/util/makefile.mk @@ -57,6 +57,7 @@ SHL1DEF=$(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) SHL1STDLIBS= \ + $(EDITENGLIB) \ $(SVXCORELIB) \ $(SVXLIB) \ $(SFX2LIB) \ diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index e2060e83d4..09c4175164 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include #include diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 557f73ad13..302e8cf243 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -78,7 +78,7 @@ class SwList; #include #include #include -#include +#include #include "comphelper/implementationreference.hxx" #include #include diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 0a67b971fd..7985cc63ff 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include "swdllapi.h" #include // fuer Basisklasse #include diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx index ec66693082..abdece06f6 100644 --- a/sw/inc/ftninfo.hxx +++ b/sw/inc/ftninfo.hxx @@ -36,7 +36,7 @@ //#include //#endif #include -#include +#include class SwTxtFmtColl; class SwPageDesc; diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx index 6f10de127d..68fad19731 100644 --- a/sw/inc/hhcwrp.hxx +++ b/sw/inc/hhcwrp.hxx @@ -30,7 +30,7 @@ #ifndef _HHCWRP_HXX #define _HHCWRP_HXX -#include +#include #include class SwView; @@ -40,7 +40,7 @@ struct SwConversionArgs; ////////////////////////////////////////////////////////////////////// -class SwHHCWrapper : public svx::HangulHanjaConversion +class SwHHCWrapper : public editeng::HangulHanjaConversion { SwView * pView; Window* pWin; diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx index 8192d81cb8..982b5f5261 100644 --- a/sw/inc/htmltbl.hxx +++ b/sw/inc/htmltbl.hxx @@ -33,7 +33,7 @@ #include -#include +#include #include "swtypes.hxx" #include "node.hxx" // Fuer SwStartNode diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx index 1e1fe9c97a..5580a91360 100644 --- a/sw/inc/lineinfo.hxx +++ b/sw/inc/lineinfo.hxx @@ -34,7 +34,7 @@ //#ifndef _NUMRULE_HXX //#include //#endif -#include +#include #include "swdllapi.h" class SwCharFmt; diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx index 1035cb9fe5..f0a5fe4a84 100644 --- a/sw/inc/numrule.hxx +++ b/sw/inc/numrule.hxx @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include #include "swdllapi.h" #include #include diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index dd80b7f94f..def757b9cf 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -39,7 +39,7 @@ //#ifndef _NUMRULE_HXX //#include //#endif -#include +#include class SfxPoolItem; class SwTxtFmtColl; diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index b029304b38..0591bc7dd0 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -710,9 +710,9 @@ #include "svx/IAccessibleParent.hxx" #include "svx/IAccessibleViewForwarder.hxx" #include "svx/SpellDialogChildWindow.hxx" -#include "svx/SpellPortions.hxx" -#include "svx/UnoForbiddenCharsTable.hxx" -#include "svx/acorrcfg.hxx" +#include "editeng/SpellPortions.hxx" +#include "editeng/UnoForbiddenCharsTable.hxx" +#include "editeng/acorrcfg.hxx" #include "svx/anchorid.hxx" #include "svx/asiancfg.hxx" #include "svx/checklbx.hxx" @@ -724,18 +724,18 @@ #include "svx/dialmgr.hxx" #include "svx/dialogs.hrc" #include "svx/dlgutil.hxx" -#include "svx/editdata.hxx" -#include "svx/editeng.hxx" -#include "svx/editobj.hxx" -#include "svx/editstat.hxx" -#include "svx/editview.hxx" -#include "svx/eeitem.hxx" +#include "editeng/editdata.hxx" +#include "editeng/editeng.hxx" +#include "editeng/editobj.hxx" +#include "editeng/editstat.hxx" +#include "editeng/editview.hxx" +#include "editeng/eeitem.hxx" #include "filter/msfilter/escherex.hxx" #include "svx/extrusionbar.hxx" #include "svx/extrusioncontrols.hxx" #include "svx/fillctrl.hxx" #include "svx/flagsdef.hxx" -#include "svx/flstitem.hxx" +#include "editeng/flstitem.hxx" #include "svx/fmdmod.hxx" #include "svx/fmglob.hxx" #include "svx/fmobjfac.hxx" @@ -744,22 +744,21 @@ #include "svx/fontwork.hxx" #include "svx/fontworkbar.hxx" #include "svx/fontworkgallery.hxx" -#include "svx/forbiddencharacterstable.hxx" +#include "editeng/forbiddencharacterstable.hxx" #include "svx/formatpaintbrushctrl.hxx" -#include "svx/frmdir.hxx" +#include "editeng/frmdir.hxx" #include "svx/galbrws.hxx" #include "svx/gallery.hxx" #include "svx/globlmn.hrc" #include "svx/grafctrl.hxx" -#include "svx/hangulhanja.hxx" +#include "editeng/hangulhanja.hxx" #include "svx/hdft2.hxx" #include "svx/htmlcfg.hxx" #include "svx/htmlmode.hxx" #include "svx/hyperdlg.hxx" #include "svx/hyprlink.hxx" #include "svx/imapdlg.hxx" -#include "svx/impgrf.hxx" -#include "svx/itemtype.hxx" +#include "editeng/itemtype.hxx" #include "svx/langbox.hxx" #include "svx/layctrl.hxx" #include "svx/lboxctrl.hxx" @@ -770,16 +769,16 @@ #include "filter/msfilter/msfiltertracer.hxx" #include "filter/msfilter/msocximex.hxx" #include "filter/msfilter/msoleexp.hxx" -#include "svx/numitem.hxx" +#include "editeng/numitem.hxx" #include "svx/numvset.hxx" #include "svx/objfac3d.hxx" #include "svx/ofaitem.hxx" #include "svx/optgenrl.hxx" #include "svx/optgrid.hxx" -#include "svx/outliner.hxx" -#include "svx/outlobj.hxx" +#include "editeng/outliner.hxx" +#include "editeng/outlobj.hxx" #include "svx/pagectrl.hxx" -#include "svx/paperinf.hxx" +#include "editeng/paperinf.hxx" #include "svx/paraprev.hxx" #include "svx/pfiledlg.hxx" #include "svx/prtqry.hxx" @@ -788,7 +787,7 @@ #include "svx/rubydialog.hxx" #include "svx/ruler.hxx" #include "svx/rulritem.hxx" -#include "svx/scripttypeitem.hxx" +#include "editeng/scripttypeitem.hxx" #include "svx/sdgcoitm.hxx" #include "svx/sdggaitm.hxx" #include "svx/sdginitm.hxx" @@ -806,7 +805,7 @@ #include "svx/sdtaitm.hxx" #include "svx/sdtakitm.hxx" #include "svx/simptabl.hxx" -#include "svx/splwrap.hxx" +#include "editeng/splwrap.hxx" #include "svx/srchdlg.hxx" #include "svx/stddlg.hxx" #include "svx/strarray.hxx" diff --git a/sw/inc/poolfmt.hxx b/sw/inc/poolfmt.hxx index c6244468da..6cc12c7393 100644 --- a/sw/inc/poolfmt.hxx +++ b/sw/inc/poolfmt.hxx @@ -32,7 +32,7 @@ #include #include -#include +#include // POOLCOLL-IDs: // +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ diff --git a/sw/inc/postit.hxx b/sw/inc/postit.hxx index ddc75cc6e6..30f51cab66 100644 --- a/sw/inc/postit.hxx +++ b/sw/inc/postit.hxx @@ -43,7 +43,7 @@ #include #include -#include +#include class SwPostItMgr; class SwPostItField; diff --git a/sw/inc/swacorr.hxx b/sw/inc/swacorr.hxx index e6e20b3fb6..87be706668 100644 --- a/sw/inc/swacorr.hxx +++ b/sw/inc/swacorr.hxx @@ -30,7 +30,7 @@ #ifndef _SWACORR_HXX #define _SWACORR_HXX -#include +#include #include #include diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx index ececf6e0c4..3cc8126534 100644 --- a/sw/inc/tblafmt.hxx +++ b/sw/inc/tblafmt.hxx @@ -50,23 +50,23 @@ JP 20.07.95: #include #include "hintids.hxx" //_immmer_ vor den solar-items! #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #ifndef _SVX_CNTRTITEM_HXX //autogen -#include +#include #endif -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include -#include +#include #include "swdllapi.h" struct SwAfVersions; diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx index 74bebda882..8e271a62c0 100644 --- a/sw/inc/tox.hxx +++ b/sw/inc/tox.hxx @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include #include "swdllapi.h" diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx index 1c78f134c6..03b172d98c 100644 --- a/sw/inc/txatritr.hxx +++ b/sw/inc/txatritr.hxx @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include class String; diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index 7445b228f3..a72982ee8a 100644 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -72,7 +72,7 @@ #include #include #include -#include +#include #include #include // helper for implementations #include // helper for implementations diff --git a/sw/sdi/swslots.hrc b/sw/sdi/swslots.hrc index 94e4700414..433ff5e49b 100644 --- a/sw/sdi/swslots.hrc +++ b/sw/sdi/swslots.hrc @@ -1,5 +1,5 @@ /************************************************************************* - * + * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2008 by Sun Microsystems, Inc. @@ -27,6 +27,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ +#include +#include #include #include #include "globals.hrc" diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx index 171c4de920..f1a8d18fec 100644 --- a/sw/source/core/SwNumberTree/SwNodeNum.cxx +++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include +#include #include #include #include diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx index ce6c2ad0e1..c2b7b0e8f2 100644 --- a/sw/source/core/access/accframe.cxx +++ b/sw/source/core/access/accframe.cxx @@ -34,7 +34,7 @@ #include -#include +#include #include #include #include diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index a48e36d134..77f2da2404 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -85,7 +85,7 @@ #include // <-- // --> OD 2007-01-17 #i71385# -#include +#include #include // <-- // --> OD 2007-11-12 #i82637# diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx index 8351496ecb..7958b882cf 100644 --- a/sw/source/core/attr/hints.cxx +++ b/sw/source/core/attr/hints.cxx @@ -35,7 +35,7 @@ #ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_ #include #endif -#include +#include #include #include #include diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx index 23a2d4772d..70bb837be0 100644 --- a/sw/source/core/attr/swatrset.cxx +++ b/sw/source/core/attr/swatrset.cxx @@ -34,10 +34,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx index 9541707ea9..a1570c8fdb 100644 --- a/sw/source/core/bastyp/breakit.cxx +++ b/sw/source/core/bastyp/breakit.cxx @@ -40,9 +40,9 @@ #include #ifndef _SVX_LINGU_HXX -#include +#include #endif -#include +#include #include "swtypes.hxx" using namespace com::sun::star; diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index dae28acc73..51115024db 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -42,13 +42,13 @@ #include #include #include -#include +#include #include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index 6f9fdb7546..88a56dc42a 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -33,60 +33,60 @@ #include #include #include -#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef _SVX_DIALOGS_HRC #include #endif -#include -#include +#include +#include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/bastyp/swtypes.cxx b/sw/source/core/bastyp/swtypes.cxx index d7049832bc..abd701cbb4 100644 --- a/sw/source/core/bastyp/swtypes.cxx +++ b/sw/source/core/bastyp/swtypes.cxx @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index efb7c6bd76..3b1d2c5b76 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index a39ccb99c9..d20c00dd18 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -34,9 +34,9 @@ #include #include -#include -#include -#include +#include +#include +#include #ifndef _SVX_SVDOBJ_HXX #include #endif diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx index 2808184f8c..f6421b7b04 100644 --- a/sw/source/core/crsr/findattr.cxx +++ b/sw/source/core/crsr/findattr.cxx @@ -40,9 +40,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index d7823ec532..bdf360857e 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -33,7 +33,7 @@ #include -#include +#include #include #include #include diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index b938d5ace5..413b879389 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -33,7 +33,7 @@ #include -#include +#include #include #include diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index 76bdb74d5b..3df5e1294e 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include #include diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx index c1bebf848c..15a27525c1 100644 --- a/sw/source/core/doc/acmplwrd.cxx +++ b/sw/source/core/doc/acmplwrd.cxx @@ -44,9 +44,9 @@ #include #include #include -#include +#include -#include +#include #include #include diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 8654d9c3af..4a9cd2f05a 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -35,7 +35,7 @@ #include #include - +#include #include #include #include @@ -49,11 +49,11 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include -#include +#include #include #include #include diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 58e3cccc6f..21a267c857 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -35,10 +35,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index acfaaeb761..60ba4ace47 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -33,10 +33,10 @@ #include #include #include -#include -#include -#include -#include "svx/frmdiritem.hxx" +#include +#include +#include +#include "editeng/frmdiritem.hxx" #include #include #include diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index 4c797d6282..2792774986 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -32,36 +32,27 @@ #include "precompiled_sw.hxx" #include #include -#ifndef _OUTDEV_HXX //autogen #include -#endif #include -#include -#include -#include +#include +#include +#include #include -#include +#include #include #include -#include -#include - -#ifndef _SVDOMEAS_HXX -#include -#endif +#include +#include +#include #include #include #include #include #include #include -#ifndef _SWHINTS_HXX #include -#endif #include -#ifndef _DOCSH_HXX #include -#endif #include //Damit der RootDtor gerufen wird. #include #include // fuer MakeDrawView @@ -74,7 +65,7 @@ #include #include #include -#include +#include // OD 26.06.2003 #108784# #include @@ -82,7 +73,7 @@ #include #include #include -#include +#include #include // --> OD 2006-03-14 #i62875# #include diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index f741f2fc04..67f41837ea 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -35,8 +35,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 3033eaf9a2..4a59207bdb 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -39,11 +39,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #ifndef _ZFORLIST_HXX //autogen #define _ZFORLIST_DECLARE_TABLE diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 0ab5de60a7..595b5e10cd 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -39,18 +39,18 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include -#include +#include #include #include diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index e791d5c4ad..85c9029247 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index a3bca434cc..e9acde1cdb 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include @@ -55,8 +55,8 @@ #ifndef _COMCORE_HRC #include #endif -#include -#include +#include +#include #include #include #include diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index b1cbd29eb7..cf8957be9f 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -38,9 +38,9 @@ #include #endif #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index 752b146b9f..640ba279ed 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 67fd5c7288..62aaf3bc6e 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -37,10 +37,10 @@ #define _SVSTDARR_STRINGSSORT #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx index 8cd8229f74..db83739bcc 100644 --- a/sw/source/core/doc/extinput.cxx +++ b/sw/source/core/doc/extinput.cxx @@ -41,8 +41,8 @@ #include #include #include -#include -#include +#include +#include #include using namespace ::com::sun::star; diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx index 372dbba83e..a511972d57 100644 --- a/sw/source/core/doc/fmtcol.cxx +++ b/sw/source/core/doc/fmtcol.cxx @@ -31,9 +31,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" #include -#include -#include -#include +#include +#include +#include #include // fuer GetAttrPool #include #include diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx index 4e69adef3a..8ef8c2ed5c 100644 --- a/sw/source/core/doc/gctable.cxx +++ b/sw/source/core/doc/gctable.cxx @@ -33,7 +33,7 @@ #include -#include +#include #include #include diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index a5c058bb4f..5eec883061 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -44,8 +44,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 7d45261f9c..cd6509f354 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -36,9 +36,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx index a5419368d0..5b69916c66 100644 --- a/sw/source/core/doc/poolfmt.cxx +++ b/sw/source/core/doc/poolfmt.cxx @@ -33,32 +33,32 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #ifndef _SVX_TSTPITEM_HXX //autogen -#include +#include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef _SVX_EMPHITEM_HXX -#include +#include #endif -#include +#include #include #include #include diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 2f3fb01501..2b6dc8d161 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -36,10 +36,10 @@ #include #define _ZFORLIST_DECLARE_TABLE -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index f7897bed15..965e6fc4f3 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -36,7 +36,7 @@ #include -#include +#include #include #include #include diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 31f477752f..d2876246b6 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -39,12 +39,12 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include // OD 06.08.2003 #i17174# -#include +#include #include #include #include diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 7dbf247500..bd80f9fa49 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -37,10 +37,10 @@ #endif #include "hintids.hxx" -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -51,7 +51,7 @@ #include #include #include - +#include #include "doc.hxx" #include "pam.hxx" #include "swcrsr.hxx" diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 73d0124567..c8ed60876f 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -35,9 +35,9 @@ #include // --> OD 2005-02-21 #i42921# -#include +#include // <-- -#include +#include #ifndef _COM_SUN_STAR_I18N_CHARACTERITERATORMODE_HDL_ #include #endif diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 66dbd2e7a9..d06c4bd52e 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index 01711b931d..a3ce9a4565 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -45,7 +45,7 @@ #include #include #include -#include +#include #ifndef _SVX_SVXIDS_HRC #include // fuer die EventIds #endif diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 93f83256a9..83af17ba5a 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -31,10 +31,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" #include "hintids.hxx" -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index ce2c6067f3..ff18736737 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -32,8 +32,8 @@ #include "precompiled_sw.hxx" #include "hintids.hxx" #include -#include -#include +#include +#include #include diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx index ddafb79647..0f6984d92d 100644 --- a/sw/source/core/draw/drawdoc.cxx +++ b/sw/source/core/draw/drawdoc.cxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index 08051aa33d..57c83061ad 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -32,7 +32,7 @@ #include "precompiled_sw.hxx" #include "hintids.hxx" -#include +#include #include #ifndef _FM_FMMODEL_HXX #include @@ -58,7 +58,7 @@ #include "shellres.hxx" // #i7672# -#include +#include #include diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index 29b3968c34..a50b513002 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -38,7 +38,7 @@ #ifndef _SVX_SVXIDS_HRC #include #endif -#include +#include #include #include #include @@ -51,7 +51,7 @@ #include #include -#include +#include using namespace ::com::sun::star; diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 26c94709c2..cbe96c4f24 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -40,17 +40,17 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include #include #include #include diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index 431887c0bf..dda7ab5650 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -35,10 +35,10 @@ #include #ifndef _SVX_TSTPITEM_HXX //autogen -#include +#include #endif -#include -#include +#include +#include #ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_ #include #endif diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 273316e069..5fc1ffec5b 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -33,7 +33,7 @@ #include -#include +#include #include #include // fuer SwTxtFmtColls #include // fuer MACROS diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index c10370979a..0b0b20848e 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -44,11 +44,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx index 7bc8f0e310..dae80e4bc0 100644 --- a/sw/source/core/edit/edtab.cxx +++ b/sw/source/core/edit/edtab.cxx @@ -42,7 +42,7 @@ #include #endif #include -#include +#include #include #include #include diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index aade7c6041..26dd9f6f41 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -41,7 +41,7 @@ #include #endif #include -#include "svx/unolingu.hxx" +#include "editeng/unolingu.hxx" #include #include #include diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index be59f24541..7d0a587885 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -39,8 +39,8 @@ #include #include -#include -#include +#include +#include #include #include #ifndef _COMCORE_HRC diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index daf8e04387..8facdeb1aa 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -55,7 +55,7 @@ #include #include #include -#include +#include #include #include #include @@ -104,8 +104,8 @@ #include #include -#include -#include +#include +#include #define URL_DECODE INetURLObject::DECODE_UNAMBIGUOUS diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index d620ff9f5f..e5c7c3cd8e 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -35,10 +35,10 @@ #include #include #include -#include +#include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index 33861fb8de..f9ec245d7d 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -37,7 +37,7 @@ #include #include #include -#include +#include #ifndef _UNOFLDMID_H #include #endif diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx index 9a4542b628..b76df1a02b 100644 --- a/sw/source/core/fields/postithelper.cxx +++ b/sw/source/core/fields/postithelper.cxx @@ -47,7 +47,7 @@ #include #include #include -#include +#include SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( std::vector< SwLayoutInfo >& rInfo, SwPosition& rPos ) diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 12062bb3fb..08b4e21ca5 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/fields/textapi.cxx b/sw/source/core/fields/textapi.cxx index 287dc5a051..1415431900 100755 --- a/sw/source/core/fields/textapi.cxx +++ b/sw/source/core/fields/textapi.cxx @@ -34,8 +34,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 27f93b5cf6..7c2065acf1 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 70ee872744..3bae8dab10 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index e8c849cee0..498c3e2d44 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -47,9 +47,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 202f223754..e9fce111fe 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -40,9 +40,9 @@ #ifndef _SVX_SVXIDS_HRC #include #endif -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 26eed5bdf8..d82b1da727 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -31,8 +31,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index f4efffd15a..a451d444e1 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -41,8 +41,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -402,7 +401,7 @@ Size SwGrfNode::GetTwipSize() const BOOL SwGrfNode::ImportGraphic( SvStream& rStrm ) { Graphic aGraphic; - if( !GetGrfFilter()->ImportGraphic( aGraphic, String(), rStrm ) ) + if( !GraphicFilter::GetGraphicFilter()->ImportGraphic( aGraphic, String(), rStrm ) ) { const String aUserData( aGrfObj.GetUserData() ); @@ -921,7 +920,7 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const SvStream* pStrm = _GetStreamForEmbedGrf( refPics, aStrmName ); if ( pStrm ) { - GetGrfFilter()->ImportGraphic( aTmpGrf, String(), *pStrm ); + GraphicFilter::GetGraphicFilter()->ImportGraphic( aTmpGrf, String(), *pStrm ); delete pStrm; } // <-- diff --git a/sw/source/core/inc/acorrect.hxx b/sw/source/core/inc/acorrect.hxx index 7cb24ed6b8..893177d6c6 100644 --- a/sw/source/core/inc/acorrect.hxx +++ b/sw/source/core/inc/acorrect.hxx @@ -30,7 +30,7 @@ #ifndef _ACORRECT_HXX #define _ACORRECT_HXX -#include +#include #include diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index 199be26f58..c2b8169d8d 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -34,7 +34,7 @@ #include "frmatr.hxx" #include "swcache.hxx" // --> OD 2008-12-04 #i96772# -#include +#include // <-- class SwPageFrm; diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx index 9cd9e16ac7..9527db2ba7 100644 --- a/sw/source/core/inc/swfont.hxx +++ b/sw/source/core/inc/swfont.hxx @@ -35,7 +35,7 @@ #ifndef _TOOLS_STREAM_HXX //autogen #include #endif -#include +#include #include #include // SwDrawTextInfo diff --git a/sw/source/core/inc/textapi.hxx b/sw/source/core/inc/textapi.hxx index 51f07077c9..2bb78dfa74 100755 --- a/sw/source/core/inc/textapi.hxx +++ b/sw/source/core/inc/textapi.hxx @@ -28,13 +28,13 @@ * ************************************************************************/ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include class SwDoc; diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx index eed807f6f2..cf5a1c047c 100644 --- a/sw/source/core/layout/anchoredobject.cxx +++ b/sw/source/core/layout/anchoredobject.cxx @@ -42,8 +42,8 @@ #include #include #include -#include -#include +#include +#include #include #include // <-- diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index b1b147f06f..e81edb888c 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -56,8 +56,8 @@ #endif #include #include -#include -#include +#include +#include #include #include #include @@ -107,7 +107,7 @@ /// OD 22.08.2002 #99657# /// include definition of class SvxBrushItem and GraphicObject /// in order to determine, if background is transparent. -#include +#include #include #ifndef _CMDID_H diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 91090ac630..b50d11ef32 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -43,8 +43,8 @@ #include "frmtool.hxx" #include "txtftn.hxx" #include "fmtftn.hxx" -#include -#include +#include +#include #ifndef _OUTDEV_HXX //autogen #include diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx index 8515889c10..29d60b11c3 100644 --- a/sw/source/core/layout/colfrm.cxx +++ b/sw/source/core/layout/colfrm.cxx @@ -36,8 +36,8 @@ #include "doc.hxx" #include "hintids.hxx" -#include -#include +#include +#include #include #include #include diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 4968601e7a..101f82fffa 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -41,16 +41,16 @@ #include "dflyobj.hxx" #include "frmtool.hxx" #include "dcontact.hxx" -#include -#include +#include +#include #include #include #include -#include +#include #include #include #include -#include +#include #include #include "ftnfrm.hxx" diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index c7eb4b408c..778316e0a3 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -38,12 +38,12 @@ #endif #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 1fadf0378f..ed29da7ef7 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -47,8 +47,8 @@ #include "ndtxt.hxx" #include "swundo.hxx" #include "errhdl.hxx" -#include -#include +#include +#include #include #include #include diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index 5e6e53b69b..5192cbdeca 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -48,7 +48,7 @@ #include -#include +#include #include #include #include diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 82c921750a..928b006e74 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -34,15 +34,15 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include // OD 08.01.2004 #i11859# -#include +#include #include diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 5eb767a656..048a461475 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -64,8 +64,8 @@ #include #include #include -#include -#include +#include +#include #include #define _SVSTDARR_BOOLS diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index 977f458863..f90a362608 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -33,7 +33,7 @@ #include -#include +#include #include #include #include diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index b7079fad50..a6f43c1a61 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -76,7 +76,7 @@ #include "htmltbl.hxx" #include "pagedesc.hxx" #include "poolfmt.hxx" -#include +#include #include // SwFontAccess // OD 2004-05-24 #i28701# #include diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx index f47ee65f12..86cc827705 100644 --- a/sw/source/core/layout/pagedesc.cxx +++ b/sw/source/core/layout/pagedesc.cxx @@ -34,13 +34,13 @@ #include -#include -#include -#include -#include -#include -#include -#include "svx/frmdiritem.hxx" +#include +#include +#include +#include +#include +#include +#include "editeng/frmdiritem.hxx" #include #include #include diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 64abb6fd58..ac0d78cccc 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -44,11 +44,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // --> collapsing borders FME 2005-05-27 #i29550# #include // <-- diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index e06b2751b3..ec8c8b65cd 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -58,9 +58,9 @@ #include "dbg_lay.hxx" #include "viewsh.hxx" #include "viewimp.hxx" -#include -#include -#include +#include +#include +#include #include // OD 2004-05-24 #i28701# #include diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index 21b78c69eb..60b315de57 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -51,8 +51,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 2041797e54..df12e78eb9 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -50,12 +50,12 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include // --> collapsing borders FME 2005-05-27 #i29550# -#include +#include // <-- #ifndef _OUTDEV_HXX //autogen #include diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index ba43b3a096..b7f7ac33a2 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 73e8ea22bf..78f392f218 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -39,9 +39,9 @@ #include #endif #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -77,7 +77,7 @@ #include #include #include -#include +#include // OD 2004-05-24 #i28701# #include diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index 4b1b751fa7..a6264112e3 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -49,8 +49,8 @@ // --> OD 2006-03-15 #i62875# #include // <-- -#include -#include +#include +#include #include #include diff --git a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx index 40f0c5d727..7913a6d249 100644 --- a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx @@ -40,8 +40,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index b052e2e652..3bef76b7b6 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -45,8 +45,8 @@ #include #include #include -#include -#include +#include +#include #ifndef _SVX_SVDOBJ_HXX #include #endif diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx index 99a5cf2a6d..957e4fb6e7 100644 --- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx @@ -43,8 +43,8 @@ #include #include #include -#include -#include +#include +#include using namespace objectpositioning; using namespace ::com::sun::star; diff --git a/sw/source/core/sw3io/sw3convert.cxx b/sw/source/core/sw3io/sw3convert.cxx index 35a72dc8e2..94714e0518 100644 --- a/sw/source/core/sw3io/sw3convert.cxx +++ b/sw/source/core/sw3io/sw3convert.cxx @@ -48,8 +48,8 @@ #define _SVSTDARR_USHORTS #include #endif -#include -#include +#include +#include #include #include #include diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx index cf1d6a8ed2..0a5bc5be02 100644 --- a/sw/source/core/table/swnewtable.cxx +++ b/sw/source/core/table/swnewtable.cxx @@ -46,8 +46,8 @@ #include #include #include -#include -#include +#include +#include #include #ifndef DBG_UTIL diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index df3fdf29f9..3d3c79029c 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -39,12 +39,12 @@ #include #include #include // fuer SwAttrSetChg -#include -#include -#include -#include +#include +#include +#include +#include #include -#include +#include #include diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index a9715cc9ff..b398267a92 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -41,10 +41,10 @@ #include #endif #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx index 23e2a0e8e2..61bde15a8d 100644 --- a/sw/source/core/text/atrstck.cxx +++ b/sw/source/core/text/atrstck.cxx @@ -36,33 +36,33 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index 33abb7b176..e02114ecbe 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -41,10 +41,10 @@ #include "colfrm.hxx" #include "txttypes.hxx" #include -#include -#include -#include -#include +#include +#include +#include +#include #include // SwMultiPortion #include #include diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index d396a7e247..4abcb90a4b 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -33,8 +33,8 @@ #include -#include -#include +#include +#include #include // ChangeFtnRef #include // MakeFrm() #include // SwDrawContact diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index f796f0f957..d77a86b5f6 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -35,8 +35,8 @@ #include #include #include // SW_MOD -#include -#include +#include +#include #include // SwPageDesc #include #include diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx index b1c2eaefb5..89295920ca 100644 --- a/sw/source/core/text/guess.cxx +++ b/sw/source/core/text/guess.cxx @@ -33,7 +33,7 @@ #include -#include +#include #include // needed for SW_MOD() macro #include // ASSERTs #include diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index f374020964..96451884c9 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -37,24 +37,24 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include // --> OD 2008-01-17 #newlistlevelattrs# #ifndef _SVX_TSTPITEM_HXX -#include +#include #endif // <-- #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index c03a94d090..181a566ab7 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -45,7 +45,7 @@ #include "txtfrm.hxx" #include "ndtxt.hxx" #include "txttypes.hxx" -#include +#include class Font; class OutputDevice; diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index 09be2bd798..526cd10979 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -33,10 +33,10 @@ #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx index b40398463f..7cb0087623 100644 --- a/sw/source/core/text/itrcrsr.cxx +++ b/sw/source/core/text/itrcrsr.cxx @@ -40,10 +40,10 @@ #include "pam.hxx" #include "swselectionlist.hxx" #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include // SwPageDesc #include diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 3899c94656..62eaaf2c12 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -36,12 +36,12 @@ #ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_ #include #endif -#include +#include #include #include #include #include -#include +#include #include // GetFrmRstHeight, etc #include #include // SwViewOptions diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx index 3bed270774..744be1dbf6 100644 --- a/sw/source/core/text/itrpaint.cxx +++ b/sw/source/core/text/itrpaint.cxx @@ -38,9 +38,9 @@ #include "errhdl.hxx" #include "txtatr.hxx" // SwINetFmt #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx index 5919ff1b1a..2d082b4461 100644 --- a/sw/source/core/text/itrtxt.cxx +++ b/sw/source/core/text/itrtxt.cxx @@ -37,7 +37,7 @@ #include "paratr.hxx" #include "errhdl.hxx" #include -#include +#include #include "pormulti.hxx" #include diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index ee7c20ab40..6a19c9b4fb 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -41,7 +41,7 @@ #ifndef _GRAPH_HXX //autogen #include #endif -#include +#include #ifndef _METRIC_HXX //autogen #include #endif @@ -65,7 +65,7 @@ #include #include // SwFtnPortion #include -#include +#include #include diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx index f690c3064b..3b5d2b093c 100644 --- a/sw/source/core/text/porfly.cxx +++ b/sw/source/core/text/porfly.cxx @@ -42,8 +42,8 @@ #ifndef _OUTDEV_HXX //autogen #include #endif -#include -#include +#include +#include #include #include #include diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 73ad538c74..edb3e4caf1 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -47,11 +47,11 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include -#include +#include #include #include #include diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index ea8b756212..8d21c1be28 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -35,8 +35,8 @@ #include #include -#include -#include +#include +#include #include #include #include // SwField diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx index 99aeaa49d7..c5fb9d4e37 100644 --- a/sw/source/core/text/porrst.cxx +++ b/sw/source/core/text/porrst.cxx @@ -32,11 +32,11 @@ #include "precompiled_sw.hxx" #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include // ViewShell diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx index 475beaecb3..24ff6648b9 100644 --- a/sw/source/core/text/txtdrop.cxx +++ b/sw/source/core/text/txtdrop.cxx @@ -50,9 +50,9 @@ #include #endif #include -#include +#include #include -#include +#include using namespace ::com::sun::star::i18n; using namespace ::com::sun::star; diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index 38d5bb9fe1..35cb9c9976 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -67,12 +67,12 @@ #include #ifndef _TXTRANGE_HXX //autogen -#include +#include #endif -#include -#include +#include +#include // --> OD 2004-06-16 #i28701# -#include +#include // <-- #include #include @@ -90,11 +90,11 @@ #include #include #ifndef _TXTRANGE_HXX //autogen -#include +#include #endif -#include -#include -#include +#include +#include +#include #include diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 0efd87ef72..f7cd9f2fba 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -35,12 +35,12 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include // GetDoc() diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx index 83ecf7a7ec..c7a32879b0 100644 --- a/sw/source/core/text/txtftn.cxx +++ b/sw/source/core/text/txtftn.cxx @@ -43,8 +43,8 @@ #include #include #include -#include -#include +#include +#include #include #ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_ #include diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx index 722cae6b04..299a11351d 100644 --- a/sw/source/core/text/txthyph.cxx +++ b/sw/source/core/text/txthyph.cxx @@ -33,7 +33,7 @@ #include -#include +#include #include #include #include // SwViewOptions diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index ed4f7059a0..926aefa56d 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -32,9 +32,9 @@ #include "precompiled_sw.hxx" #include "hintids.hxx" -#include +#include #ifndef _SVX_TSTPITEM_HXX //autogen -#include +#include #endif #include #include diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx index d7ea1cf5cb..253c8f3da0 100644 --- a/sw/source/core/text/widorp.cxx +++ b/sw/source/core/text/widorp.cxx @@ -38,10 +38,10 @@ #include "ftnboss.hxx" #include "ndtxt.hxx" #include "paratr.hxx" -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index 5a1795a237..e31885f1f0 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include // -> #i21237# diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index 63e551e8c8..eb0aa403ea 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 2b30826062..25da2e8f90 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -63,13 +63,13 @@ #include // SwPageDesc #include #include -#include +#include #include #include #include #include #include -#include +#include #include #ifndef _POOLFMT_HRC #include diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx index 0ad7ca6278..96b6273ad9 100644 --- a/sw/source/core/txtnode/fntcap.cxx +++ b/sw/source/core/txtnode/fntcap.cxx @@ -33,7 +33,7 @@ #include -#include +#include #ifndef _OUTDEV_HXX //autogen #include diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 218cdfb9a8..709849d7aa 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -33,12 +33,12 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include // --> OD 2008-01-17 #newlistlevelattrs# -#include +#include // <-- #include #ifndef _SVSTDARR_HXX diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index 15a973b122..fc92d71500 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -41,36 +41,36 @@ #include #endif #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef _SVX_CNTRITEM_HXX //autogen -#include +#include #endif -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef _SVX_EMPHITEM_HXX //autogen -#include +#include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 47d1cb01bd..d2a2e43ec2 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -34,17 +34,17 @@ #include #include -#include +#include #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // --> OD 2008-01-16 #newlistlevelattrs# -#include +#include // <-- #include #include diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx index cb3c9e4666..859e2d7e4f 100644 --- a/sw/source/core/txtnode/txatritr.cxx +++ b/sw/source/core/txtnode/txatritr.cxx @@ -38,7 +38,7 @@ #include #endif #include -#include +#include #include #include #include diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx index 23900ed60b..312a28276b 100644 --- a/sw/source/core/txtnode/txtatr2.cxx +++ b/sw/source/core/txtnode/txtatr2.cxx @@ -34,8 +34,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 6677d2b647..db7ed40b5e 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -42,11 +42,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include @@ -1024,8 +1024,8 @@ USHORT SwTxtNode::Convert( SwConversionArgs &rArgs ) do { nLangFound = aIter.GetLanguage(); sal_Bool bLangOk = (nLangFound == rArgs.nConvSrcLang) || - (svx::HangulHanjaConversion::IsChinese( nLangFound ) && - svx::HangulHanjaConversion::IsChinese( rArgs.nConvSrcLang )); + (editeng::HangulHanjaConversion::IsChinese( nLangFound ) && + editeng::HangulHanjaConversion::IsChinese( rArgs.nConvSrcLang )); xub_StrLen nChPos = aIter.GetChgPos(); // the position at the end of the paragraph returns -1 diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index 1d8d7b3cf7..0897e69221 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -69,7 +69,7 @@ #ifndef _UNDO_HRC #include #endif -#include +#include #include SV_IMPL_PTRARR( SwpHstry, SwHistoryHintPtr) diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index 422a02f0b2..28d7fa572c 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -37,7 +37,7 @@ #define _SVSTDARR_USHORTSSORT #include #include -#include +#include #include #include diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 1ebc3a084f..47667f9925 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include #include @@ -56,9 +56,9 @@ #include // #111827# #include -// #include +// #include // #include -// #include +// #include // #include // using namespace comphelper; diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index 36fc9bde50..3cfbd768ab 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx index dd2d59fc17..5f46767c8f 100644 --- a/sw/source/core/undo/unnum.cxx +++ b/sw/source/core/undo/unnum.cxx @@ -33,7 +33,7 @@ #include -#include +#include #include #include // fuer die UndoIds #include diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx index 0e39363c67..d0e5a5f38e 100644 --- a/sw/source/core/undo/unspnd.cxx +++ b/sw/source/core/undo/unspnd.cxx @@ -37,7 +37,7 @@ #include "swtable.hxx" #include "ndtxt.hxx" #include "swundo.hxx" // fuer die UndoIds -#include +#include #include #include #include "undobj.hxx" diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 2782a408ac..15f6ecb1cd 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -33,7 +33,7 @@ #include -#include +#include #include #include #include diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 1ac40712b4..a04fecd24e 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -32,7 +32,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - +#include #include #include #include @@ -65,7 +65,7 @@ #include #include #include -#include +#include #include #include #define _SVSTDARR_USHORTS diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index a88f0a26c0..af1b474da2 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include @@ -61,8 +61,8 @@ // OD 2004-04-21 #i26791# #include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 2167a0c918..95db40126e 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -92,7 +92,7 @@ #include #include #include -#include +#include #include #include // MetaFieldManager diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index 68015384da..f9aa7913a6 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include +#include #include diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 37f53ade45..bc0237a397 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -38,6 +38,8 @@ #include #include #include +#include +#include #include #include @@ -83,16 +85,16 @@ #include #include #include -#include -#include +#include +#include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -111,7 +113,7 @@ #include #include #include -#include +#include // DVO, OD 01.10.2003 #i18732# #include // OD 2004-05-05 #i28701# diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 41643101c1..2c47ff4dd5 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index 4e7789b27f..e5421b4a74 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -32,15 +32,9 @@ #include "precompiled_sw.hxx" #include -#ifndef _SVX_SVXIDS_HRC #include -#endif -#ifndef _COMPHELPER_TYPEGENERATION_HXX #include -#endif -#ifndef _COM_SUN_STAR_BEANS_PropertyAttribute_HPP_ #include -#endif #include #include // --> OD 2004-08-06 #i28749# @@ -50,12 +44,9 @@ #include #include #include -#ifndef _CMDID_H #include -#endif -#ifndef _UNOFLDMID_H #include -#endif +#include using namespace ::com::sun::star; using namespace ::com::sun::star::lang; diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 30f57c7df8..33fdc28e2b 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -93,7 +93,7 @@ #include #include #include -#include +#include #include #include #include @@ -113,7 +113,7 @@ #define _SVSTDARR_USHORTS #define _SVSTDARR_USHORTSSORT #include -#include +#include #include #include #include diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 5b09353555..78d8e6d814 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -89,8 +89,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -113,7 +113,7 @@ #define _SVSTDARR_USHORTSSORT #define _SVSTDARR_XUB_STRLEN #include -#include +#include #include #include #include diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index a78d27225a..9fce50c9ff 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -37,9 +37,9 @@ #include #include #include -#include +#include #ifndef _SVX_XMLCNITEM_HXX -#include +#include #endif #include #include @@ -68,9 +68,9 @@ #ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPPP_ #include #endif -#include +#include /* #109700# */ -#include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::lang; diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 4caa5a735e..140d0cb783 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -31,7 +31,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - +#include +#include #include #include #include @@ -51,7 +52,7 @@ #include #include #include -#include +#include #include #include #include @@ -67,7 +68,7 @@ #include #include #include -#include +#include #include #include #include @@ -75,7 +76,7 @@ #ifndef _TOOLKIT_UNOHLP_HXX #include #endif -#include +#include #include #include // --> OD 2008-01-15 #newlistlevelattrs# diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx index 8ee8e3e141..d6d744afcb 100644 --- a/sw/source/core/unocore/unosrch.cxx +++ b/sw/source/core/unocore/unosrch.cxx @@ -39,7 +39,7 @@ #include #include #include -#include "svx/unolingu.hxx" +#include "editeng/unolingu.hxx" #include #include #include diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index bc3203f764..cd4d0eeaba 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -32,6 +32,7 @@ #include "precompiled_sw.hxx" +#include #include #include #include @@ -40,14 +41,14 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index b2e863595f..bbe1a5020b 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -38,11 +38,11 @@ // STL includes #include +#include +#include #include // for DBL_MIN #include -#ifndef _CMDID_H #include -#endif #include #include #include @@ -88,12 +88,12 @@ #include #include #include // SvNumberFormatter -#include -#include -#include -#include +#include +#include +#include +#include #include -#include +#include #include #include #include diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index 28348a682c..27d7cd0252 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -41,8 +41,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index 9b509a8eeb..f287861082 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -36,7 +36,7 @@ #define _SVSTDARR_USHORTS #include #endif -#include +#include #include #include #include diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index b713190564..67b1ed724f 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -37,10 +37,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index 428e50da1f..4035e57f51 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -46,8 +46,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -61,7 +61,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index a1fb3d5aeb..6959a612d6 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -39,10 +39,10 @@ #endif #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 4bb446e1f4..a181b33aee 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -39,31 +39,31 @@ #include #endif #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 3962ac7469..ddccc6f741 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -35,11 +35,9 @@ #include #include #include -#ifndef _WRKWIN_HXX //autogen #include -#endif #include - +#include #if !defined _SVSTDARR_XUB_STRLEN_DECL || !defined _SVSTDARR_USHORTS_DECL #define _SVSTDARR_XUB_STRLEN #define _SVSTDARR_USHORTS @@ -50,26 +48,26 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 62ae86f551..3aeb616e99 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -39,24 +39,19 @@ #include #include #include -#ifndef _APP_HXX //autogen #include -#endif -#include -#include -#include -#include -#ifndef _SVX_BOXITEM_HXX //autogen - -#include -#endif -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -67,7 +62,7 @@ #include "frmatr.hxx" #include #include - +#include #include "doc.hxx" #include "pam.hxx" diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index bfde0b1db2..1cf5351210 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -34,10 +34,10 @@ #include "hintids.hxx" #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include "doc.hxx" diff --git a/sw/source/filter/html/htmldraw.cxx b/sw/source/filter/html/htmldraw.cxx index 0b44d5d790..51f9486e4f 100644 --- a/sw/source/filter/html/htmldraw.cxx +++ b/sw/source/filter/html/htmldraw.cxx @@ -41,17 +41,17 @@ #include #include #include -#include +#include #ifndef _OUTLINER_HXX //autogen #define _EEITEMID_HXX -#include +#include #endif #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index b53df3f464..9e93c62da4 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -34,27 +34,22 @@ #include #include #include - - +#include #include "hintids.hxx" #include #include -#ifndef _APP_HXX #include -#endif -#ifndef _WRKWIN_HXX //autogen #include -#endif #include #include #include #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 35ab4d5ef4..5e60c99f90 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -50,16 +50,16 @@ #ifndef _SFXAPP_HXX #include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 07b3c78d85..796ff7d52b 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -59,14 +59,14 @@ #endif #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index e1a3141de0..b27abcf1c4 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -33,22 +33,22 @@ #include "hintids.hxx" #include -#ifndef _WRKWIN_HXX //autogen #include -#endif +#include +#include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx index bd70ff6d9c..b0a35d9cab 100644 --- a/sw/source/filter/html/htmlnum.cxx +++ b/sw/source/filter/html/htmlnum.cxx @@ -38,8 +38,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 125cce095a..1a7e006a7d 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -47,8 +47,8 @@ #endif #include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index e8ed0babd7..ba4bdd33d7 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -42,9 +42,9 @@ #ifndef _WRKWIN_HXX //autogen #include #endif -#include -#include -#include +#include +#include +#include #include #ifndef _HTMLKYWD_H #include diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index c4f47c68a9..40b7c43f1b 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -38,14 +38,14 @@ #ifndef _WRKWIN_HXX //autogen #include #endif -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index 38f8680372..3fc8c3b7cb 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -40,10 +40,10 @@ #ifndef _WRKWIN_HXX //autogen #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index d2f40c1253..76f2f9044b 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -40,28 +40,28 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx index c24b07bda4..05bd153ed9 100644 --- a/sw/source/filter/html/svxcss1.hxx +++ b/sw/source/filter/html/svxcss1.hxx @@ -32,7 +32,7 @@ #include #include -#include +#include #ifndef _SVSTDARR_HXX #define _SVSTDARR_USHORTS diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index ae4a704777..76fdbfb20c 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -35,7 +35,8 @@ #include #include #include - +#include +#include #ifdef DBG_UTIL #include #endif @@ -56,23 +57,23 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index bb89c877dc..b434f99dbb 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 1a74d5a129..5431cb0a8d 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -45,14 +45,14 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include +#include #include #include diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx index 463a4305c4..9aaef87388 100644 --- a/sw/source/filter/inc/fltshell.hxx +++ b/sw/source/filter/inc/fltshell.hxx @@ -40,7 +40,7 @@ #include #endif #include -#include +#include #include #include #include diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx index c7688b089b..b19c6e4cf6 100644 --- a/sw/source/filter/rtf/rtfatr.cxx +++ b/sw/source/filter/rtf/rtfatr.cxx @@ -48,51 +48,51 @@ #include #include #include -#include -#include +#include +#include #ifndef _SVX_TSTPITEM_HXX //autogen -#include +#include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef _SVX_CNTRITEM_HXX //autogen -#include +#include #endif -#include -#include -#include -#include +#include +#include +#include +#include #ifndef _SVX_EMPHITEM_HXX -#include +#include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/rtf/rtffld.cxx b/sw/source/filter/rtf/rtffld.cxx index d273a129ca..aadd3fe5a1 100644 --- a/sw/source/filter/rtf/rtffld.cxx +++ b/sw/source/filter/rtf/rtffld.cxx @@ -44,10 +44,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -69,7 +69,7 @@ #include #include #include -#include +#include // bestimme, ob es sich um ein IMPORT/TOC - Feld handelt. diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx index c761fe1cd9..fa2d37f8a4 100644 --- a/sw/source/filter/rtf/rtffly.cxx +++ b/sw/source/filter/rtf/rtffly.cxx @@ -36,13 +36,13 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -76,7 +76,7 @@ // --> OD 2004-06-30 #i27767# #include // <-- -#include +#include #include // --> OD, FLR 2006-02-16 #131205# #include "dcontact.hxx" diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx index 85954250bf..c82bf7b60e 100644 --- a/sw/source/filter/rtf/rtfnum.cxx +++ b/sw/source/filter/rtf/rtfnum.cxx @@ -36,16 +36,16 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx index c3a56f64e3..e61c53f946 100644 --- a/sw/source/filter/rtf/rtftbl.cxx +++ b/sw/source/filter/rtf/rtftbl.cxx @@ -36,9 +36,9 @@ #define private public #endif #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index b07a93f0bb..a21904a403 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -42,17 +42,17 @@ #include #include #include -#include -#include +#include +#include #ifndef _SVX_TSTPITEM_HXX //autogen -#include +#include #endif -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -102,7 +102,7 @@ #include #include // SwLayoutSplit -#include +#include #include #include @@ -111,13 +111,13 @@ #include #include #include -#include +#include #include "svx/svdograf.hxx" #include #include #include -#include -#include +#include +#include #include #include diff --git a/sw/source/filter/rtf/swparrtf.hxx b/sw/source/filter/rtf/swparrtf.hxx index 77b7ed14a1..84d3c86586 100644 --- a/sw/source/filter/rtf/swparrtf.hxx +++ b/sw/source/filter/rtf/swparrtf.hxx @@ -46,9 +46,9 @@ #define _SVSTDARR_BOOLS #include #endif -#include -#include -#include +#include +#include +#include #include #ifndef __SGI_STL_ALGORITHM #include diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx index 65828f6d53..621bd4d3e5 100644 --- a/sw/source/filter/rtf/wrtrtf.cxx +++ b/sw/source/filter/rtf/wrtrtf.cxx @@ -40,19 +40,19 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #ifndef _SVX_TSTPITEM_HXX //autogen -#include +#include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 289b67670a..be79878b7d 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -39,9 +39,8 @@ #include #include #include -#include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx index ce6aed9876..a4f67bcf33 100644 --- a/sw/source/filter/writer/wrtswtbl.cxx +++ b/sw/source/filter/writer/wrtswtbl.cxx @@ -32,8 +32,8 @@ #include "precompiled_sw.hxx" #include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx index 0e66638169..2ce8c0488a 100644 --- a/sw/source/filter/ww1/fltshell.cxx +++ b/sw/source/filter/ww1/fltshell.cxx @@ -34,19 +34,17 @@ #include #include #include +#include -#ifndef _GRAPH_HXX //autogen #include -#endif #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -72,9 +70,7 @@ #include // class SwSection #include // class SwSelBoxes #include -#ifndef _DOCSH_HXX #include // class SwDocSh -#endif #include #include #include @@ -1089,7 +1085,7 @@ void SwFltShell::NextPage() SwFltShell& SwFltShell::AddGraphic( const String& rPicName ) { // embedded: - GraphicFilter* pFilter = ::GetGrfFilter(); + GraphicFilter* pFilter = GraphicFilter::GetGraphicFilter(); Graphic aGraphic; // one of: GFF_NOT GFF_BMP GFF_GIF GFF_JPG GFF_PCD GFF_PCX GFF_PNG // GFF_TIF GFF_XBM GFF_DXF GFF_MET GFF_PCT GFF_SGF GFF_SVM GFF_WMF diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx index b932a49c18..7bd7ad0a62 100644 --- a/sw/source/filter/ww1/w1filter.cxx +++ b/sw/source/filter/ww1/w1filter.cxx @@ -34,29 +34,29 @@ #include #include -#include +#include #include #ifndef _GRAPH_HXX //autogen #include #endif -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #ifndef _SVX_CNTRITEM_HXX //autogen -#include +#include #endif -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #ifndef _SVX_TSTPITEM_HXX //autogen -#include +#include #endif #include #include diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx index a90dd0fe2f..218472c99c 100644 --- a/sw/source/filter/ww1/w1sprm.cxx +++ b/sw/source/filter/ww1/w1sprm.cxx @@ -37,17 +37,17 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef _SVX_TSTPITEM_HXX //autogen -#include +#include #endif diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index cf6c68cafb..7cce732124 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -35,7 +35,7 @@ #include "WW8TableInfo.hxx" #include -#include +#include #include #include diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 9480f67382..85b136583d 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -46,45 +46,45 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/sw/source/filter/ww8/dump/ww8struc.hxx b/sw/source/filter/ww8/dump/ww8struc.hxx index 876feb7942..bf3dc07a16 100644 --- a/sw/source/filter/ww8/dump/ww8struc.hxx +++ b/sw/source/filter/ww8/dump/ww8struc.hxx @@ -200,7 +200,7 @@ struct WW8_BordersSO // fuer StarOffice-Border Code /* // Linien-Defaults in Twips: fruehere Writer-Defaults, -// siehe auch +// siehe auch #define DEF_LINE_WIDTH_0 1 #define DEF_LINE_WIDTH_1 20 #define DEF_LINE_WIDTH_2 50 diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 8b6a98eca8..349a8d38c7 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -46,8 +46,8 @@ # include //SdrObject # include //SdrOle2Obj # include //FmFormInventor -# include //SvxFmtBreakItem -# include //SvxTabStopItem +# include //SvxFmtBreakItem +# include //SvxTabStopItem # include //SwTxtNode # include //SwNoTxtNode # include //SwFmtCntnt diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx index 071bc6dce1..65bae42565 100644 --- a/sw/source/filter/ww8/writerwordglue.cxx +++ b/sw/source/filter/ww8/writerwordglue.cxx @@ -50,11 +50,11 @@ #ifndef SV_FONTCVT_HXX # include //GetSubsFontName #endif -# include //lA0Width... -# include //SvxLRSpaceItem -# include //SvxULSpaceItem -# include //SvxBoxItem -# include //SvxFontItem +# include //lA0Width... +# include //SvxLRSpaceItem +# include //SvxULSpaceItem +# include //SvxBoxItem +# include //SvxFontItem # include //SwFrmFmt # include //SwFmtCol # include //SwHeaderAndFooterEatSpacingItem diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index b05a763210..7db75bd31a 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -51,21 +51,21 @@ #include #include #include -#include -#include +#include +#include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include +#include #ifndef _SVX_FLDITEM_HXX //miserable hack to get around #98519# -#include +#include #endif #include diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index a9b5351f79..23a5953c3c 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -40,19 +40,19 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "svl/urihelper.hxx" #include #include diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index 9f30ac7f2b..65b1a04a4e 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -35,8 +35,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index c6f6ce0b02..9dcaeb9f46 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -39,15 +39,15 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index a650399f78..0fbfdc2889 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -53,16 +53,16 @@ #include #include #include -#include +#include #include #include -#include -#include +#include +#include #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index 3e6b3de46c..6918573adb 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -46,13 +46,13 @@ #include #include -#include -#include -#include +#include +#include +#include #include -#include // SvxLRSpaceItem -#include -#include +#include // SvxLRSpaceItem +#include +#include #include #include diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index afc8a436d8..ddcba5961d 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -44,46 +44,46 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 0553267d12..9fb86cf956 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -36,44 +36,41 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include -#include -#include -#include -#include -#include -#include -#ifndef _SVX_CNTRITEM_HXX -#include -#endif -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include +#include #include -#include -#include -#include -#include -#include // #79453# -#include +#include +#include +#include +#include +#include // #79453# +#include #include #include #include // class SwCropGrf @@ -97,15 +94,15 @@ #include "ww8par2.hxx" // SwWW8StyInf #include "ww8graf.hxx" #include -#include -#include +#include +#include // OD 30.09.2003 #i18732# #include #include "writerhelper.hxx" #include "writerwordglue.hxx" #include #include -#include +#include #include @@ -1424,7 +1421,7 @@ const WW8_BordersSO &WW8_BordersSO::Get0x01LineMatch(eBorderCode eCode) { /* // Linien-Defaults in Twips: fruehere Writer-Defaults, - // siehe auch + // siehe auch #define DEF_LINE_WIDTH_0 1 #define DEF_LINE_WIDTH_1 20 #define DEF_LINE_WIDTH_2 50 diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx index 004d04d9d4..bdb582a751 100644 --- a/sw/source/filter/ww8/ww8graf2.cxx +++ b/sw/source/filter/ww8/ww8graf2.cxx @@ -38,12 +38,11 @@ #endif #include #include -#include #include #include #include #include -#include +#include #include #include #include @@ -64,6 +63,7 @@ #include "ww8par.hxx" // class SwWWImplReader #include "ww8par2.hxx" // struct WWFlyPara #include "ww8graf.hxx" +#include using namespace ::com::sun::star; using namespace sw::types; @@ -263,7 +263,7 @@ extern void WW8PicShadowToReal( WW8_PIC_SHADOW* pPicS, WW8_PIC* pPic ); bool SwWW8ImplReader::GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc) { - return 0 == ::GetGrfFilter()->ImportGraphic(rGraphic, aEmptyStr, rSrc, + return 0 == GraphicFilter::GetGraphicFilter()->ImportGraphic(rGraphic, aEmptyStr, rSrc, GRFILTER_FORMAT_DONTKNOW); } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 2ae8a362ea..45d1432d12 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -49,16 +49,16 @@ #include #include -#include -#include +#include +#include #include #include -#include -#include // SvxLRSpaceItem -#include -#include +#include +#include // SvxLRSpaceItem +#include +#include // --> OD 2005-02-28 #i43427# -#include +#include // <-- #include #include diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 662b6d36f3..5da07b7e9a 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include // fuer den Attribut Stack #ifndef __SGI_STL_VECTOR diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 65912eb6b6..66b4a93a10 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -36,19 +36,19 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include // fuer SwPam #include diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx index d8730b0c55..bd210ed050 100644 --- a/sw/source/filter/ww8/ww8par2.hxx +++ b/sw/source/filter/ww8/ww8par2.hxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include #ifndef WW8SCAN_HXX #include "ww8scan.hxx" // class WW8Style diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index b6b91459fc..4c642c5cb5 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -67,14 +67,14 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index eda0dea5fa..6fb6ffab3d 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -47,7 +47,6 @@ #include #include #include -#include #include #include @@ -59,9 +58,7 @@ #include #include #include -#ifndef _DOCSH_HXX #include // fuer Ole-Node -#endif #include // Progress #include #include @@ -69,6 +66,7 @@ #include #include +#include #include "ww8scan.hxx" #include "ww8par.hxx" diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 7e6e294866..6eb3431341 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -57,9 +57,9 @@ #include #endif #include -#include -#include -#include +#include +#include +#include #include #include #include // fuer SwPam diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 9739922e4a..173e7a8c04 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -37,58 +37,58 @@ #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #ifndef _SVX_CNTRITEM_HXX //autogen -#include +#include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef _SVX_TSTPITEM_HXX //autogen -#include +#include #endif -#include -#include +#include +#include #ifndef _SVX_EMPHITEM_HXX //autogen -#include +#include #endif -#include -#include +#include +#include #ifndef _SVX_SCRIPSPACEITEM_HXX -#include +#include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include // SwTxtNode, siehe unten: JoinNode() diff --git a/sw/source/filter/xml/xmlbrsh.cxx b/sw/source/filter/xml/xmlbrsh.cxx index 0342053314..b53d9525e4 100644 --- a/sw/source/filter/xml/xmlbrsh.cxx +++ b/sw/source/filter/xml/xmlbrsh.cxx @@ -36,6 +36,7 @@ #include "hintids.hxx" #include #include +#include #include #include @@ -44,7 +45,7 @@ #include #include #include -#include +#include #include #include "xmlbrshi.hxx" diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 25544a79c5..53bf1013c7 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -44,11 +44,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include @@ -64,8 +64,8 @@ #include #include #include -#include -#include +#include +#include #include // for locking SolarMutex: svapp + mutex diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index 37f906d66f..07818884e2 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -40,8 +40,9 @@ #include #include #include -#include +#include #include +#include #ifndef _SVSTDARR_USHORTS #define _SVSTDARR_USHORTS @@ -52,13 +53,13 @@ #include "hintids.hxx" #include "unomid.h" #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "fmtpdsc.hxx" #include "fmtornt.hxx" #include "fmtfsize.hxx" diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx index 8ee621903f..f5763ee382 100644 --- a/sw/source/filter/xml/xmlfonte.cxx +++ b/sw/source/filter/xml/xmlfonte.cxx @@ -35,7 +35,7 @@ #include "hintids.hxx" #include #include -#include +#include #include #include #include diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index a2856b65ad..b0ac8ec807 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -58,7 +58,7 @@ #include "xmlimp.hxx" #include #include -#include +#include #include #include #include diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index 2f452eb807..69d84da10e 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -38,19 +38,20 @@ #include #include #include -#include +#include +#include #include "hintids.hxx" #include "unomid.h" #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "fmtpdsc.hxx" #include "fmtornt.hxx" #include "fmtfsize.hxx" diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx index 63ca631f1a..716d39f85d 100644 --- a/sw/source/filter/xml/xmliteme.cxx +++ b/sw/source/filter/xml/xmliteme.cxx @@ -41,19 +41,18 @@ #include #include #include "xmlbrshe.hxx" -#include -#include +#include +#include #include #include #include #include "fmtornt.hxx" -#ifndef _UNOMID_H #include -#endif #include "frmfmt.hxx" #include "fmtfsize.hxx" #include "swrect.hxx" #include "xmlexp.hxx" +#include using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx index b3faf5e685..6422dcc77d 100644 --- a/sw/source/filter/xml/xmlitemi.cxx +++ b/sw/source/filter/xml/xmlitemi.cxx @@ -45,12 +45,12 @@ #include #endif #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #ifndef _XMLOFF_XMLTABI_HXX //#include diff --git a/sw/source/filter/xml/xmlitemm.cxx b/sw/source/filter/xml/xmlitemm.cxx index 32c0b1f612..9969502b4b 100644 --- a/sw/source/filter/xml/xmlitemm.cxx +++ b/sw/source/filter/xml/xmlitemm.cxx @@ -32,7 +32,7 @@ #include "precompiled_sw.hxx" - +#include #include #include #include diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx index 2de4a4bed2..0d55d35c40 100644 --- a/sw/source/filter/xml/xmlithlp.cxx +++ b/sw/source/filter/xml/xmlithlp.cxx @@ -34,13 +34,13 @@ #include "hintids.hxx" #include "unomid.h" #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "fmtpdsc.hxx" #include "fmtornt.hxx" #include "fmtfsize.hxx" diff --git a/sw/source/filter/xml/xmlithlp.hxx b/sw/source/filter/xml/xmlithlp.hxx index 63a3a837be..9a315abd37 100644 --- a/sw/source/filter/xml/xmlithlp.hxx +++ b/sw/source/filter/xml/xmlithlp.hxx @@ -34,7 +34,7 @@ #include #include #include "hintids.hxx" // for following include -#include // for SvxGraphicsPosition +#include // for SvxGraphicsPosition class SvxBorderLine; struct SvXMLEnumMapEntry; diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx index 3bac5aa2b4..f17fdf9790 100644 --- a/sw/source/filter/xml/xmlmeta.cxx +++ b/sw/source/filter/xml/xmlmeta.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include "docstat.hxx" diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index 4aaa7bceaa..53c15dcc72 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -41,11 +41,11 @@ #include #include #include -#include -#include +#include +#include #include #ifndef _SVX_FRAMEDIRITEM_HXX -#include +#include #endif #include diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 7e6c33c9e7..ff76cad27e 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include "poolfmt.hxx" #include "fmtfsize.hxx" #include "fmtornt.hxx" diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx index e300e0d322..ccbfd5f186 100644 --- a/sw/source/ui/app/appenv.cxx +++ b/sw/source/ui/app/appenv.cxx @@ -56,12 +56,12 @@ #include #endif #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 94bd82f24e..2fbff43257 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -100,7 +100,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index 889b131c14..123a640684 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -53,12 +53,12 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx index dd95c398eb..955afd1297 100644 --- a/sw/source/ui/app/appopt.cxx +++ b/sw/source/ui/app/appopt.cxx @@ -49,9 +49,9 @@ #include #include #include -#include +#include #ifndef _SVX_TSTPITEM_HXX //autogen -#include +#include #endif #include #include @@ -86,9 +86,9 @@ #endif #include #include -#include +#include #include -#include +#include #ifndef _GLOBALS_HRC #include diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index e3a3426a3c..07b45a3619 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include @@ -55,7 +55,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index edfbe2883c..8e313b0536 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -75,8 +75,8 @@ #include #endif #include -#include -#include +#include +#include #include #include @@ -152,7 +152,7 @@ #include #include "com/sun/star/ui/dialogs/TemplateDescription.hpp" -#include +#include #include #include diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx index 7853c7f8fd..039357cde1 100644 --- a/sw/source/ui/app/docshini.cxx +++ b/sw/source/ui/app/docshini.cxx @@ -47,12 +47,12 @@ #include #include #include -#include +#include #include #include -#include +#include #ifndef _SVX_AKRNTEM_HXX -#include +#include #endif #include #include @@ -64,16 +64,16 @@ #include #endif -#include -#include -#include +#include +#include +#include #ifndef _SVX_TSTPITEM_HXX //autogen -#include +#include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx index 67828f5471..7436a51af0 100644 --- a/sw/source/ui/app/docst.cxx +++ b/sw/source/ui/app/docst.cxx @@ -43,10 +43,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx index e4c324ce3e..91cb973aac 100644 --- a/sw/source/ui/app/docstyle.cxx +++ b/sw/source/ui/app/docstyle.cxx @@ -38,18 +38,16 @@ #include #include #include -#include -#include +#include +#include // --> OD 2008-02-13 #newlistlevelattrs# -#include +#include // <-- #include #include #include #include -#ifndef _DOCSH_HXX #include -#endif #include #include #include @@ -59,13 +57,9 @@ #include #include #include -#ifndef _CMDID_H #include -#endif #include -#ifndef _APP_HRC #include -#endif #include #include #include @@ -74,6 +68,7 @@ #include #include #include +#include // --> OD 2008-02-12 #newlistlevelattrs# #include #include diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx index 50d2e81697..5e14330688 100644 --- a/sw/source/ui/app/swmodul1.cxx +++ b/sw/source/ui/app/swmodul1.cxx @@ -42,13 +42,13 @@ #include #include // helper for implementations #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx index fe2c630dcb..d4532a4ff4 100644 --- a/sw/source/ui/app/swmodule.cxx +++ b/sw/source/ui/app/swmodule.cxx @@ -153,7 +153,7 @@ // OD 14.02.2003 #107424# #include -#include +#include #include #ifndef _AVMEDIA_MEDIAPPLAYER_HXX diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 44ee430c60..5d4c981ac2 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -43,7 +43,7 @@ #endif #include #include -#include +#include #include #include diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index 4fc483c056..f1c48ed51b 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -52,16 +52,16 @@ #include #endif #include -#include +#include #include #include -#include +#include #include #include #ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_ #include #endif -#include +#include #include #include diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx index 43702e834c..93aa8f2a2c 100644 --- a/sw/source/ui/config/cfgitems.cxx +++ b/sw/source/ui/config/cfgitems.cxx @@ -39,7 +39,7 @@ #ifndef _SVX_SVXIDS_HRC //autogen #include #endif -#include +#include #include "viewopt.hxx" diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx index d2dec9a594..cbbdeb9601 100644 --- a/sw/source/ui/config/modcfg.cxx +++ b/sw/source/ui/config/modcfg.cxx @@ -40,7 +40,7 @@ #ifndef _SVX_SVXIDS_HRC //autogen #include #endif -#include +#include #include #include diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index b16b22325e..8a3d828488 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -51,9 +51,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx index ce2e162685..b4e0b35334 100644 --- a/sw/source/ui/config/uinums.cxx +++ b/sw/source/ui/config/uinums.cxx @@ -42,7 +42,7 @@ #endif #include #include -#include +#include #include diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx index bfd650b8a4..a2ba77b6cb 100644 --- a/sw/source/ui/config/viewopt.cxx +++ b/sw/source/ui/config/viewopt.cxx @@ -38,8 +38,8 @@ #ifndef _SVX_SVXIDS_HRC //autogen #include #endif -#include -#include +#include +#include #include #ifndef _REGION_HXX //autogen #include @@ -60,7 +60,7 @@ #include #include -#include +#include #ifdef DBG_UTIL BOOL SwViewOption::bTest9 = FALSE; //DrawingLayerNotLoading diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index c4913d65f3..ba14381f7b 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -63,7 +63,7 @@ #include #include #include -#include +#include #include #include #include @@ -74,11 +74,11 @@ #include #include #include -#include +#include #include #include -#include -#include +#include +#include #include #include #ifndef _SWTABLEREP_HXX //autogen diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index ad1377b9f2..dd5481d6e2 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -119,7 +119,7 @@ #include #include #include -#include +#include #include #include diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index 1560648be9..9cf809b836 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -66,7 +66,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 1106a1ac62..a7eb0c96b8 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -51,8 +51,8 @@ #include #endif #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx index ae783c9917..a160959dfc 100644 --- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx @@ -32,15 +32,15 @@ #include "precompiled_sw.hxx" #include #include -#include -#include +#include +#include #ifndef _SVX_SVXIDS_HRC #include #endif #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index 6907737855..a198df912b 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -40,13 +40,13 @@ #include #include #include -#include +#include #include -#include +#include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx index 6c850d9936..12984f53d8 100644 --- a/sw/source/ui/dialog/regionsw.cxx +++ b/sw/source/ui/dialog/regionsw.cxx @@ -51,7 +51,7 @@ #include #ifndef _SVX_SIZEITEM_HXX //autogen -#include +#include #endif #include diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index e34dc9387e..4a72998575 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx index c82bbb4d75..16788ed689 100644 --- a/sw/source/ui/dochdl/gloshdl.cxx +++ b/sw/source/ui/dochdl/gloshdl.cxx @@ -33,8 +33,8 @@ #include -#include -#include +#include +#include #ifndef __RSC //autogen #include #endif @@ -82,7 +82,7 @@ #include #endif -#include +#include #include "swabstdlg.hxx" #include diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index a1589281d5..3e67631d87 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -53,19 +53,13 @@ #include #include #include -#ifndef _WRKWIN_HXX #include -#endif -#ifndef _MSGBOX_HXX #include -#endif #include #include #include #include -#ifndef _GRAPH_HXX #include -#endif #include #include #include @@ -79,15 +73,15 @@ #include #include #include -#include +#include #include -#include -#include +#include #include #include #include #include #include +#include #include #include @@ -107,15 +101,9 @@ #include #include #include -#ifndef _VIEW_HXX #include -#endif -#ifndef _DOCSH_HXX #include -#endif -#ifndef _WDOCSH_HXX #include -#endif #include //DDE #include // fuer Undo-Ids #include @@ -126,25 +114,19 @@ #include #include #include -#ifndef _CMDID_H #include -#endif -#ifndef _DOCHDL_HRC #include -#endif -#ifndef _COMCORE_HRC #include // #111827# -#endif #include // #108584# #include // #108584# -#include +#include // #108584# -#include +#include // #108584# #include @@ -154,9 +136,7 @@ #include #include #include -#ifndef _GLOBALS_HRC #include -#endif #include #include #include @@ -2003,8 +1983,8 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData, //!!! auf FileSystem abpruefen - nur dann ist es sinnvoll die // Grafiken zu testen !!!! Graphic aGrf; - GraphicFilter *pFlt = ::GetGrfFilter(); - nRet = GRFILTER_OK == ::LoadGraphic( sURL, aEmptyStr, aGrf, pFlt ); + GraphicFilter *pFlt = GraphicFilter::GetGraphicFilter(); + nRet = GRFILTER_OK == GraphicFilter::LoadGraphic( sURL, aEmptyStr, aGrf, pFlt ); if( nRet ) { switch( nAction ) @@ -2352,8 +2332,8 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, { //!!! auf FileSystem abpruefen - nur dann ist es sinnvoll die // Grafiken zu testen !!!! - GraphicFilter *pFlt = ::GetGrfFilter(); - nRet = GRFILTER_OK == ::LoadGraphic( aBkmk.GetURL(), aEmptyStr, + GraphicFilter *pFlt = GraphicFilter::GetGraphicFilter(); + nRet = GRFILTER_OK == GraphicFilter::LoadGraphic( aBkmk.GetURL(), aEmptyStr, aGrf, pFlt ); if( !nRet && SW_PASTESDR_SETATTR == nAction && SOT_FORMAT_FILE == nFmt && diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index ceaba698f6..8ab26acaa1 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -75,9 +75,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx index 82577b37ae..9760ea797a 100644 --- a/sw/source/ui/docvw/edtdd.cxx +++ b/sw/source/ui/docvw/edtdd.cxx @@ -36,7 +36,7 @@ #include -#include +#include //#ifndef _SVDVMARK_HXX //autogen //#include //#endif diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index a548726ad7..77577a2a58 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -65,8 +65,8 @@ #include #include #include -#include -#include +#include +#include #include #include //#ifndef _SVDVMARK_HXX //autogen @@ -74,19 +74,19 @@ //#endif #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include +#include #include #include #include diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx index 7771bd4058..62363b3001 100644 --- a/sw/source/ui/docvw/edtwin2.cxx +++ b/sw/source/ui/docvw/edtwin2.cxx @@ -46,12 +46,12 @@ #include #include #include -#include +#include #include #include #ifndef _OUTLINER_HXX //autogen #define _EEITEMID_HXX -#include +#include #endif #include #include diff --git a/sw/source/ui/docvw/edtwin3.cxx b/sw/source/ui/docvw/edtwin3.cxx index ff951764bb..744343bfef 100644 --- a/sw/source/ui/docvw/edtwin3.cxx +++ b/sw/source/ui/docvw/edtwin3.cxx @@ -49,7 +49,7 @@ #include "docsh.hxx" #include "pagedesc.hxx" // Aktuelles Seitenformat #include -#include +#include /*-------------------------------------------------------------------- diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx index c807e24ff8..db79c0691c 100644 --- a/sw/source/ui/docvw/postit.cxx +++ b/sw/source/ui/docvw/postit.cxx @@ -43,29 +43,29 @@ #include // Polygon -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include -#include //EditEngine flags -#include -#include -#include -#include +#include //EditEngine flags +#include +#include +#include +#include #include #include diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx index 5c1f9a015d..cc1be380dc 100644 --- a/sw/source/ui/docvw/romenu.cxx +++ b/sw/source/ui/docvw/romenu.cxx @@ -47,9 +47,8 @@ #include #include #include -#include #include -#include +#include #include @@ -442,7 +441,7 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName ) aURL.SetSmartURL( aName ); aDlgHelper.SetFileName( aURL.GetName() ); - GraphicFilter& rGF = *GetGrfFilter(); + GraphicFilter& rGF = *GraphicFilter::GetGraphicFilter(); const USHORT nCount = rGF.GetExportFormatCount(); String aExt( aURL.GetExtension() ); diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx index ed2d42db0c..9e77a2bf27 100644 --- a/sw/source/ui/docvw/srcedtw.cxx +++ b/sw/source/ui/docvw/srcedtw.cxx @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index 7114470d0e..9d1ee84cc1 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -45,12 +45,12 @@ #define _SVSTDARR_LONGSSORT #define _SVSTDARR_LONGS #include -#include +#include #ifndef _SVX_TSTPITEM_HXX //autogen -#include +#include #endif -#include -#include +#include +#include #ifndef _MSGBOX_HXX //autogen #include #endif diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx index fefe09f318..806c0c1470 100644 --- a/sw/source/ui/envelp/envimg.cxx +++ b/sw/source/ui/envelp/envimg.cxx @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx index a767990c23..5d073f27b1 100644 --- a/sw/source/ui/fldui/fldmgr.cxx +++ b/sw/source/ui/fldui/fldmgr.cxx @@ -45,14 +45,14 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx index 949cb9c207..0efe591a84 100644 --- a/sw/source/ui/fldui/inpdlg.cxx +++ b/sw/source/ui/fldui/inpdlg.cxx @@ -43,7 +43,7 @@ #include #endif #include -#include +#include #include #include #include diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index d8f316875a..3c74f67088 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/frmdlg/colex.cxx b/sw/source/ui/frmdlg/colex.cxx index d042ce7dca..9d5acc36f4 100644 --- a/sw/source/ui/frmdlg/colex.cxx +++ b/sw/source/ui/frmdlg/colex.cxx @@ -40,12 +40,12 @@ #include -#include -#include -#include +#include +#include +#include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/ui/frmdlg/colmgr.cxx b/sw/source/ui/frmdlg/colmgr.cxx index c403174a67..2ab144300f 100644 --- a/sw/source/ui/frmdlg/colmgr.cxx +++ b/sw/source/ui/frmdlg/colmgr.cxx @@ -34,7 +34,7 @@ #include "hintids.hxx" -#include +#include #include "frmmgr.hxx" #include "frmfmt.hxx" diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index b7d67803ff..bb05d0c86a 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -39,11 +39,11 @@ #include "hintids.hxx" #include -#include -#include -#include -#include -#include "svx/frmdiritem.hxx" +#include +#include +#include +#include +#include "editeng/frmdiritem.hxx" #include #include #include diff --git a/sw/source/ui/frmdlg/frmmgr.cxx b/sw/source/ui/frmdlg/frmmgr.cxx index 97bd17351f..0a642743fa 100644 --- a/sw/source/ui/frmdlg/frmmgr.cxx +++ b/sw/source/ui/frmdlg/frmmgr.cxx @@ -38,12 +38,12 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include "wrtsh.hxx" diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 2bbaa672f5..f8391b57a7 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -37,26 +37,21 @@ #include #include -#ifndef _CMDID_H #include -#endif -#ifndef _HELPID_H #include -#endif #include #include #include #include #include -#include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -68,9 +63,7 @@ #include #include #include -#ifndef _DOCSH_HXX #include -#endif #include #include #include @@ -83,17 +76,14 @@ // OD 19.09.2003 #i18732# #include -#ifndef _FRMUI_HRC #include -#endif -#ifndef _FRMPAGE_HRC #include -#endif #include #include "com/sun/star/ui/dialogs/TemplateDescription.hpp" #include #include #include +#include using namespace ::com::sun::star; using ::rtl::OUString; @@ -2551,7 +2541,7 @@ IMPL_LINK( SwGrfExtPage, BrowseHdl, Button *, EMPTYARG ) aBmpWin.MirrorVert(FALSE); Graphic aGraphic; - ::LoadGraphic( pGrfDlg->GetPath(), aEmptyStr, aGraphic ); + GraphicFilter::LoadGraphic( pGrfDlg->GetPath(), aEmptyStr, aGraphic ); aBmpWin.SetGraphic(aGraphic); BOOL bEnable = GRAPHIC_BITMAP == aGraphic.GetType() || diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index c9488c26ba..fa017890fe 100644 --- a/sw/source/ui/frmdlg/wrap.cxx +++ b/sw/source/ui/frmdlg/wrap.cxx @@ -42,9 +42,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include // OD 18.09.2003 #i18732# #include #include diff --git a/sw/source/ui/inc/colex.hxx b/sw/source/ui/inc/colex.hxx index 78b82d83b5..7d329a89e1 100644 --- a/sw/source/ui/inc/colex.hxx +++ b/sw/source/ui/inc/colex.hxx @@ -31,7 +31,7 @@ #define _COLEX_HXX #include -#include +#include #include "swdllapi.h" #include #include "frmatr.hxx" diff --git a/sw/source/ui/inc/frmmgr.hxx b/sw/source/ui/inc/frmmgr.hxx index 4d54559701..5bc4f89e7b 100644 --- a/sw/source/ui/inc/frmmgr.hxx +++ b/sw/source/ui/inc/frmmgr.hxx @@ -32,7 +32,7 @@ #include "swtypes.hxx" #include "frmatr.hxx" -#include +#include #include #include #include diff --git a/sw/source/ui/inc/hyp.hxx b/sw/source/ui/inc/hyp.hxx index a1761b6d42..2d7fa9a893 100644 --- a/sw/source/ui/inc/hyp.hxx +++ b/sw/source/ui/inc/hyp.hxx @@ -32,7 +32,7 @@ #define _HYP_HXX #include -#include +#include #include class SwView; diff --git a/sw/source/ui/inc/regionsw.hxx b/sw/source/ui/inc/regionsw.hxx index a7347c0aa7..171dc405a5 100644 --- a/sw/source/ui/inc/regionsw.hxx +++ b/sw/source/ui/inc/regionsw.hxx @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include @@ -49,10 +49,10 @@ #include #include #include -#include +#include #include #include -#include +#include class SwWrtShell; diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 459346df23..6f227d26c0 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -35,9 +35,9 @@ #include #include #include // SfxObjectShellRef <-> SV_DECL_REF(SfxObjectShell) -#include +#include #include -#include +#include #include "swdllapi.h" #include #include diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 502d54b2d7..45c7326df1 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/index/idxmrk.cxx b/sw/source/ui/index/idxmrk.cxx index 956754c5c7..d5f7927f1e 100644 --- a/sw/source/ui/index/idxmrk.cxx +++ b/sw/source/ui/index/idxmrk.cxx @@ -52,9 +52,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 812d5f1e7f..68ff1abf1d 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -55,10 +55,10 @@ #include #include #include -#include +#include #include -#include -#include "svx/unolingu.hxx" +#include +#include "editeng/unolingu.hxx" #include #include #include diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx index e41c5ba97f..3d56d8837d 100644 --- a/sw/source/ui/lingu/hhcwrp.cxx +++ b/sw/source/ui/lingu/hhcwrp.cxx @@ -50,9 +50,9 @@ #ifndef _MSGBOX_HXX //autogen #include #endif -#include -#include -#include +#include +#include +#include #include #include #include @@ -106,12 +106,12 @@ public: //!! hack to transport the current conversion direction state settings //!! into the next incarnation that iterates over the drawing objets //!! ( see SwHHCWrapper::~SwHHCWrapper() ) - svx::HangulHanjaConversion::SetUseSavedConversionDirectionState( sal_True ); + editeng::HangulHanjaConversion::SetUseSavedConversionDirectionState( sal_True ); } ~SwKeepConversionDirectionStateContext() { - svx::HangulHanjaConversion::SetUseSavedConversionDirectionState( sal_False ); + editeng::HangulHanjaConversion::SetUseSavedConversionDirectionState( sal_False ); } }; @@ -126,7 +126,7 @@ SwHHCWrapper::SwHHCWrapper( sal_Int32 nConvOptions, sal_Bool bIsInteractive, sal_Bool bStart, sal_Bool bOther, sal_Bool bSelection ) : - svx::HangulHanjaConversion( &pSwView->GetEditWin(), rxMSF, + editeng::HangulHanjaConversion( &pSwView->GetEditWin(), rxMSF, SvxCreateLocale( nSourceLanguage ), SvxCreateLocale( nTargetLanguage ), pTargetFont, @@ -651,7 +651,7 @@ void SwHHCWrapper::Convert() // at the begin of the paragraph to solve the problem, i.e. have the // TextConversion service get those charcters together in the same call. xub_StrLen nStartIdx = STRING_MAXLEN; - if (svx::HangulHanjaConversion::IsChinese( GetSourceLanguage() ) ) + if (editeng::HangulHanjaConversion::IsChinese( GetSourceLanguage() ) ) nStartIdx = 0; else { diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index ddce0b731d..e42d68f315 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -40,8 +40,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -51,7 +50,7 @@ #include #include #include -#include +#include #include #include #include @@ -65,12 +64,12 @@ #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include #include @@ -100,7 +99,7 @@ #include #include "swabstdlg.hxx" #include "chrdlg.hrc" -#include +#include #include #include #include @@ -358,7 +357,7 @@ static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl ) #endif Graphic aGraphic; const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) ); - if( GRFILTER_OK == LoadGraphic( aTmp, aFilterName, aGraphic ) ) + if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic ) ) { aRes = Image( aGraphic.GetBitmapEx() ); } diff --git a/sw/source/ui/lingu/sdrhhcwrap.cxx b/sw/source/ui/lingu/sdrhhcwrap.cxx index 5de9a802b4..01104a5fd1 100644 --- a/sw/source/ui/lingu/sdrhhcwrap.cxx +++ b/sw/source/ui/lingu/sdrhhcwrap.cxx @@ -33,17 +33,17 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index e2d5cd7f3f..8b948c2da2 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -60,7 +60,7 @@ #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx index 0cbb7cdc7d..76260e7c9f 100644 --- a/sw/source/ui/misc/glshell.cxx +++ b/sw/source/ui/misc/glshell.cxx @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index ac45a05afb..2dab43d20b 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/misc/insrule.cxx b/sw/source/ui/misc/insrule.cxx index 03facdece9..5b8aa22836 100644 --- a/sw/source/ui/misc/insrule.cxx +++ b/sw/source/ui/misc/insrule.cxx @@ -42,7 +42,7 @@ #ifndef _MSGBOX_HXX //autogen #include #endif -#include +#include #include #include diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 656f076800..108fd4b410 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -47,10 +47,9 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 4440cbcde3..030c5da988 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -42,7 +42,7 @@ #include #endif #include -#include +#include #include #include diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index 2116375b9a..085da99e3a 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -49,10 +49,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index 78ff19288e..354e03cdd9 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -49,11 +49,11 @@ #endif #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 306e99e7dd..5c92e3a0c1 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/ribbar/concustomshape.cxx b/sw/source/ui/ribbar/concustomshape.cxx index 32059b83f9..9e0810218a 100644 --- a/sw/source/ui/ribbar/concustomshape.cxx +++ b/sw/source/ui/ribbar/concustomshape.cxx @@ -42,7 +42,7 @@ #include #include #include -#include +#include #ifndef _CMDID_H #include #endif @@ -64,7 +64,7 @@ #include #include #include -#include +#include #include diff --git a/sw/source/ui/ribbar/conrect.cxx b/sw/source/ui/ribbar/conrect.cxx index 2bd57967d2..f2a5b50bad 100644 --- a/sw/source/ui/ribbar/conrect.cxx +++ b/sw/source/ui/ribbar/conrect.cxx @@ -42,7 +42,7 @@ #include #include #include -#include +#include #ifndef _CMDID_H #include #endif diff --git a/sw/source/ui/ribbar/drawbase.cxx b/sw/source/ui/ribbar/drawbase.cxx index e79d25ec9f..f00a8c84d3 100644 --- a/sw/source/ui/ribbar/drawbase.cxx +++ b/sw/source/ui/ribbar/drawbase.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 443b181cbc..f44cee9ccb 100755 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -42,42 +42,42 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include #include #include #include -#include -#include +#include +#include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -109,12 +109,12 @@ #include #include -#include -#include -#include +#include +#include +#include #include -#include +#include #include #include diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 41ce780ed1..94418d255e 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -50,27 +50,26 @@ #include #include #include -#include +#include #include #include #include -#include #include #include #include #include #include -#include -#include -#include +#include +#include +#include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index 784fcb1f84..92b3d193bb 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -34,29 +34,29 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #ifndef _SVX_PARAITEM_HXX //autogen -#include +#include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef _SVX_CNTRITEM_HXX //autogen -#include +#include #endif -#include -#include +#include +#include #include #include #include @@ -66,14 +66,14 @@ #include #include #include -#include -#include +#include +#include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -100,17 +100,17 @@ //modified on Jul. 30th #include -#include +#include #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include +#include #include #include diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index 1d7f5bbd84..bb41ca1e2a 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -34,24 +34,24 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 494765b9e9..0239e2ef4e 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -42,10 +42,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx index 91af49e3e4..4357bc3160 100644 --- a/sw/source/ui/shells/grfsh.cxx +++ b/sw/source/ui/shells/grfsh.cxx @@ -47,8 +47,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -58,7 +58,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/grfshex.cxx b/sw/source/ui/shells/grfshex.cxx index 8cf626538a..5d36ff0a82 100644 --- a/sw/source/ui/shells/grfshex.cxx +++ b/sw/source/ui/shells/grfshex.cxx @@ -33,13 +33,9 @@ #include -#ifndef _GRFSH_HXX #include -#endif #include -#ifndef _VIEW_HXX #include -#endif #include #ifndef _TEXTSH_HXX #include @@ -53,7 +49,6 @@ #define _SVSTDARR_STRINGSSORTDTOR #include #include -#include #include #ifndef _DOCSH_HXX #include diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx index 3fa52625b2..b1a51ed66f 100755 --- a/sw/source/ui/shells/langhelper.cxx +++ b/sw/source/ui/shells/langhelper.cxx @@ -40,13 +40,13 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/sw/source/ui/shells/listsh.cxx b/sw/source/ui/shells/listsh.cxx index 9a32de7f41..81f05c218c 100644 --- a/sw/source/ui/shells/listsh.cxx +++ b/sw/source/ui/shells/listsh.cxx @@ -34,8 +34,8 @@ #include "cmdid.h" #include "hintids.hxx" -#include -#include +#include +#include #include #include #include diff --git a/sw/source/ui/shells/mediash.cxx b/sw/source/ui/shells/mediash.cxx index 3f4235fd34..4025725000 100644 --- a/sw/source/ui/shells/mediash.cxx +++ b/sw/source/ui/shells/mediash.cxx @@ -44,8 +44,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -55,7 +55,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/slotadd.cxx b/sw/source/ui/shells/slotadd.cxx index c41571aa19..46b8abc39c 100644 --- a/sw/source/ui/shells/slotadd.cxx +++ b/sw/source/ui/shells/slotadd.cxx @@ -36,8 +36,7 @@ #include "cmdid.h" #include - - +#include #include #include #include @@ -53,46 +52,46 @@ #include #include #include -#include -#include -#include +#include +#include +#include #ifndef _SVX_TSTPITEM_HXX //autogen -#include +#include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef _SVX_CNTRITEM_HXX //autogen -#include +#include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -129,12 +128,12 @@ #include "grfatr.hxx" #include "fmtline.hxx" #include -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx index e792398a3c..5ec167136a 100644 --- a/sw/source/ui/shells/tabsh.cxx +++ b/sw/source/ui/shells/tabsh.cxx @@ -41,17 +41,17 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx index 643169e309..2c705777cd 100644 --- a/sw/source/ui/shells/textidx.cxx +++ b/sw/source/ui/shells/textidx.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 21337fbc44..f5db565d4a 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -56,13 +56,13 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -70,7 +70,7 @@ #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 09ba7b28cc..3f76587041 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include @@ -54,17 +54,17 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include #include -#include +#include #include #include #include @@ -109,7 +109,7 @@ #include -#include +#include #include "swabstdlg.hxx" #include "misc.hrc" #include "chrdlg.hrc" @@ -121,7 +121,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx index 29fc07107a..db3a7b9d13 100644 --- a/sw/source/ui/shells/txtattr.cxx +++ b/sw/source/ui/shells/txtattr.cxx @@ -44,14 +44,14 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include -#include +#include +#include #include "paratr.hxx" #include diff --git a/sw/source/ui/shells/txtnum.cxx b/sw/source/ui/shells/txtnum.cxx index 6b4be8da6e..cc6c5e67e5 100644 --- a/sw/source/ui/shells/txtnum.cxx +++ b/sw/source/ui/shells/txtnum.cxx @@ -39,8 +39,8 @@ #include #include #include -#include -#include +#include +#include #include #include "cmdid.h" diff --git a/sw/source/ui/table/swtablerep.cxx b/sw/source/ui/table/swtablerep.cxx index a2bcfcb920..8e52b5cdd7 100644 --- a/sw/source/ui/table/swtablerep.cxx +++ b/sw/source/ui/table/swtablerep.cxx @@ -38,10 +38,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index b7561449a4..310ec525e3 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -42,10 +42,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx index cce491f677..55cc47a0e4 100644 --- a/sw/source/ui/uiview/formatclipboard.cxx +++ b/sw/source/ui/uiview/formatclipboard.cxx @@ -51,19 +51,19 @@ // header for class SdrView #include //SvxBrushItem -#include -#include +#include +#include #include // header for class SvxBoxInfoItem -#include +#include // header for class SvxFmtBreakItem -#include +#include // header for class SwFmtLayoutSplit #include // header for class SvxFmtKeepItem -#include +#include // header for class SvxFrameDirectionItem -#include +#include #include #include #include diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index e85be040b7..6a526133b6 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index b2737dc3b6..326faf6ea5 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -52,7 +52,7 @@ #include #include #include - +#include #include #include #include @@ -63,12 +63,12 @@ #include #include #include -#include +#include #include #include -#include -#include -#include "svx/unolingu.hxx" +#include +#include +#include "editeng/unolingu.hxx" #include #include #include diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index c0763ec845..22398cde43 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -33,7 +33,6 @@ #include // HACK: prevent conflict between STLPORT and Workshop headers - #include #include #include @@ -51,7 +50,7 @@ #include #include #include -#include +#include #include #include #include @@ -100,7 +99,7 @@ #include #include #include -#include +#include //#include #include #include diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 15338aa201..07388f84b4 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -33,13 +33,7 @@ #include #include #include - -// #ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_ -// #include -// #endif -// #ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_ -// #include -// #endif +#include #include #include #include @@ -65,7 +59,7 @@ #include #include #include -#include +#include #include #include #include @@ -78,17 +72,16 @@ #include #include #include -#include -#include +#include #include -#include "svx/unolingu.hxx" +#include "editeng/unolingu.hxx" #include -#include +#include #include #include #include #include -#include +#include #include #include #include @@ -245,8 +238,8 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter, else { if( !pFlt ) - pFlt = ::GetGrfFilter(); - nRes = ::LoadGraphic( rPath, rFilter, aGrf, pFlt /*, nFilter*/ ); + pFlt = GraphicFilter::GetGraphicFilter(); + nRes = GraphicFilter::LoadGraphic( rPath, rFilter, aGrf, pFlt /*, nFilter*/ ); } if( GRFILTER_OK == nRes ) @@ -437,11 +430,11 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq ) rSh.StartUndo(UNDO_INSERT, &aRewriter); - int nError = InsertGraphic( aFileName, aFilterName, bAsLink, ::GetGrfFilter() ); + int nError = InsertGraphic( aFileName, aFilterName, bAsLink, GraphicFilter::GetGraphicFilter() ); // Format ist ungleich Current Filter, jetzt mit auto. detection if( nError == GRFILTER_FORMATERROR ) - nError = InsertGraphic( aFileName, aEmptyStr, bAsLink, ::GetGrfFilter() ); + nError = InsertGraphic( aFileName, aEmptyStr, bAsLink, GraphicFilter::GetGraphicFilter() ); if ( rSh.IsFrmSelected() ) { SwFrmFmt* pFmt = pDoc->FindFrmFmtByName( sGraphicFormat ); diff --git a/sw/source/ui/uiview/viewdlg.cxx b/sw/source/ui/uiview/viewdlg.cxx index 8b715474ce..2608c7f33e 100644 --- a/sw/source/ui/uiview/viewdlg.cxx +++ b/sw/source/ui/uiview/viewdlg.cxx @@ -35,7 +35,7 @@ #include "hintids.hxx" #include -#include +#include #include #include diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx index 9ab1df6a91..f50af8e25c 100644 --- a/sw/source/ui/uiview/viewdraw.cxx +++ b/sw/source/ui/uiview/viewdraw.cxx @@ -38,22 +38,22 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include #include -#include +#include #include -#include +#include #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index e8002bf6e8..22a41cd102 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -52,11 +52,11 @@ #include #include #include -#include +#include #include -#include +#include #include -#include +#include #include #include #include // fuer SpellPointer @@ -102,6 +102,7 @@ #include #include +#include using ::rtl::OUString; using namespace ::com::sun::star; diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx index 0de9b8a2cd..9ac97cf1f4 100644 --- a/sw/source/ui/uiview/viewmdi.cxx +++ b/sw/source/ui/uiview/viewmdi.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx index 708372d35d..b6332dc243 100644 --- a/sw/source/ui/uiview/viewport.cxx +++ b/sw/source/ui/uiview/viewport.cxx @@ -35,8 +35,8 @@ #include "hintids.hxx" #include #include -#include -#include +#include +#include #include #ifndef _VIEW_HXX #include diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx index 60238e1346..58fe6f505f 100644 --- a/sw/source/ui/uiview/viewprt.cxx +++ b/sw/source/ui/uiview/viewprt.cxx @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx index 57b206d449..96db734206 100644 --- a/sw/source/ui/uiview/viewsrch.cxx +++ b/sw/source/ui/uiview/viewsrch.cxx @@ -51,7 +51,7 @@ #include #include #include -#include "svx/unolingu.hxx" +#include "editeng/unolingu.hxx" #include #include #include diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx index 183498c31c..faa4082fd3 100644 --- a/sw/source/ui/uiview/viewstat.cxx +++ b/sw/source/ui/uiview/viewstat.cxx @@ -41,12 +41,12 @@ #include #include #include -#include +#include #include -#include -#include +#include +#include #include -#include +#include #include #include #include diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index 9e4c4060fe..182d276a54 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -38,16 +38,16 @@ #include "uitool.hxx" #include #include -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx index d0fcf366ee..b0a86d70a7 100644 --- a/sw/source/ui/uno/swdetect.cxx +++ b/sw/source/ui/uno/swdetect.cxx @@ -70,7 +70,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx index df941b500a..63d4135662 100644 --- a/sw/source/ui/uno/unoatxt.cxx +++ b/sw/source/ui/uno/unoatxt.cxx @@ -64,7 +64,7 @@ #include #include -#include +#include #include diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 044c5bd78f..f36754f4d2 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -90,7 +90,7 @@ #include #include #include -#include +#include #include #include #include @@ -102,7 +102,7 @@ #include #include #include -#include +#include #include #include #include @@ -116,7 +116,7 @@ ///////////////////////////Modified on Jun. 14th////////////////////////// ///////////////////////for getDocumentLanguages/////////////////////////// //--> -#include +#include #include #include //SwCharFmts #include @@ -135,8 +135,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 07e31ca6bb..94ddbc7332 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -56,10 +56,10 @@ #include #include #include -#include +#include #include -#include -#include +#include +#include #include #include #include @@ -77,8 +77,8 @@ #include #include #include -#include -#include +#include +#include #include #include "swdtflvr.hxx" diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx index 9cc2c2ddbb..feaa441eb9 100644 --- a/sw/source/ui/utlui/attrdesc.cxx +++ b/sw/source/ui/utlui/attrdesc.cxx @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx index 5d5bb06349..8e67c29a25 100644 --- a/sw/source/ui/utlui/numfmtlb.cxx +++ b/sw/source/ui/utlui/numfmtlb.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #ifndef _ZFORMAT_HXX //autogen diff --git a/sw/source/ui/utlui/uiitems.cxx b/sw/source/ui/utlui/uiitems.cxx index 9d68727158..7914abe4bc 100644 --- a/sw/source/ui/utlui/uiitems.cxx +++ b/sw/source/ui/utlui/uiitems.cxx @@ -32,7 +32,7 @@ #include "precompiled_sw.hxx" -#include +#include #include #include "swtypes.hxx" diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx index 755a07a058..88a9f02b8d 100644 --- a/sw/source/ui/utlui/uitool.cxx +++ b/sw/source/ui/utlui/uitool.cxx @@ -43,14 +43,14 @@ #include #include #include -#include +#include #ifndef _SVX_TSTPITEM_HXX //autogen -#include +#include #endif -#include -#include +#include +#include #include -#include +#include #include #ifndef _VCL_LSTBOX_HXX //autogen #include diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx index 243acca522..148ec2ce84 100644 --- a/sw/source/ui/vba/vbaapplication.cxx +++ b/sw/source/ui/vba/vbaapplication.cxx @@ -40,7 +40,7 @@ #include "vbaaddins.hxx" #include "vbadialogs.hxx" #include -#include +#include #include "wordvbahelper.hxx" #include diff --git a/sw/source/ui/wrtsh/delete.cxx b/sw/source/ui/wrtsh/delete.cxx index ba283bf95a..6991b1a42a 100644 --- a/sw/source/ui/wrtsh/delete.cxx +++ b/sw/source/ui/wrtsh/delete.cxx @@ -35,7 +35,7 @@ #include #include #include -#include // #i23725# +#include // #i23725# // --> OD 2006-07-10 #134369# #ifndef _VIEW_HXX #include diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx index 67372ea5d1..da6a365d3c 100644 --- a/sw/source/ui/wrtsh/select.cxx +++ b/sw/source/ui/wrtsh/select.cxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include #ifndef _CMDID_H #include #endif diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index f372bebac0..b829a35331 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -57,11 +57,10 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include -#include #include #include @@ -111,7 +110,7 @@ #include #include #include -#include +#include // -> #111827# #include @@ -122,7 +121,7 @@ #include #include -#include +#include #include "PostItMgr.hxx" diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk index 52cae5a57a..db19f0ffc9 100644 --- a/sw/util/makefile.mk +++ b/sw/util/makefile.mk @@ -103,6 +103,7 @@ LIB1OBJFILES= $(OUT)$/slo$/swmodule.obj \ SHL1STDLIBS+= \ $(LNGLIB) \ $(SVXCORELIB) \ + $(EDITENGLIB) \ $(SVXLIB) \ $(SFXLIB) \ $(XMLOFFLIB) \ @@ -182,6 +183,7 @@ DEF3NAME= $(SHL3TARGET) SHL3STDLIBS= \ $(ISWLIB) \ $(SVXCORELIB) \ + $(EDITENGLIB) \ $(SVXLIB) \ $(SFX2LIB) \ $(SVTOOLLIB) \ @@ -322,6 +324,7 @@ DEF4NAME=$(SHL4TARGET) SHL4STDLIBS= \ $(ISWLIB) \ $(SVXCORELIB) \ + $(EDITENGLIB) \ $(MSFILTERLIB) \ $(SFXLIB) \ $(BASEGFXLIB) \ @@ -369,8 +372,9 @@ SHL5STDLIBS= \ $(VCLLIB) \ $(TKLIB) \ $(I18NISOLANGLIB) \ + $(EDITENGLIB) \ $(SVXCORELIB) \ - $(SVXMSFILTERLIB) \ + $(SVXMSFILTERLIB) SHL5DEPN=$(SHL1TARGETN) SHL5LIBS=$(SLB)$/$(TARGET_VBA).lib -- cgit v1.2.3 From 4ffb113c6290fe0ca19346120e98ded4ee981a95 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 11 Jan 2010 12:14:09 +0100 Subject: #i107356#: uninitialized variable fixed --- sw/source/filter/xml/xmltbli.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'sw/source') diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index ff76cad27e..dd6112a532 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -1452,6 +1452,7 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport, pDDESource(NULL), bFirstSection( sal_False ), bRelWidth( sal_True ), + bHasSubTables( sal_False ), nHeaderRows( 0 ), nCurRow( 0UL ), nCurCol( 0UL ), -- cgit v1.2.3 From 68ea1d32ad1c3f35992f5cf17313e4d47d0084f6 Mon Sep 17 00:00:00 2001 From: os Date: Mon, 11 Jan 2010 15:11:11 +0100 Subject: #i105646# unused code removed --- sw/inc/PostItMgr.hxx | 5 +- sw/inc/SwNumberTree.hxx | 7 --- sw/inc/crsrsh.hxx | 2 - sw/inc/postit.hxx | 4 +- sw/inc/postithelper.hxx | 1 - sw/inc/undobj.hxx | 11 ---- sw/inc/viewsh.hxx | 3 - sw/inc/viscrs.hxx | 2 - sw/inc/warnpassword.hxx | 50 ---------------- sw/source/core/SwNumberTree/SwNumberTree.cxx | 13 ---- sw/source/core/access/accportions.cxx | 6 -- sw/source/core/access/accportions.hxx | 1 - sw/source/core/crsr/crsrsh.cxx | 13 ---- sw/source/core/crsr/viscrs.cxx | 10 ---- sw/source/core/fields/postithelper.cxx | 16 ----- sw/source/core/inc/SwGrammarMarkUp.hxx | 2 - sw/source/core/text/SwGrammarMarkUp.cxx | 15 ----- sw/source/core/text/inftxt.cxx | 4 +- sw/source/core/text/inftxt.hxx | 2 + sw/source/core/text/porlay.cxx | 5 -- sw/source/core/undo/unbkmk.cxx | 17 ------ sw/source/core/undo/unins.cxx | 15 ----- sw/source/core/undo/unmove.cxx | 10 ---- sw/source/core/unocore/unotbl.cxx | 35 ----------- sw/source/core/view/viewsh.cxx | 15 ----- sw/source/filter/rtf/swparrtf.cxx | 73 ----------------------- sw/source/filter/ww8/WW8TableInfo.cxx | 8 +-- sw/source/filter/ww8/WW8TableInfo.hxx | 4 ++ sw/source/filter/ww8/writerhelper.cxx | 3 +- sw/source/filter/ww8/writerhelper.hxx | 3 +- sw/source/filter/ww8/ww8par.hxx | 4 +- sw/source/filter/ww8/ww8par2.hxx | 1 - sw/source/filter/ww8/ww8par3.cxx | 10 +--- sw/source/filter/ww8/ww8par6.cxx | 6 -- sw/source/ui/app/docsh.cxx | 1 - sw/source/ui/docvw/PostItMgr.cxx | 38 +----------- sw/source/ui/docvw/postit.cxx | 3 +- sw/source/ui/uno/makefile.mk | 3 +- sw/source/ui/uno/warnpassword.cxx | 89 ---------------------------- 39 files changed, 29 insertions(+), 481 deletions(-) delete mode 100644 sw/inc/warnpassword.hxx delete mode 100644 sw/source/ui/uno/warnpassword.cxx (limited to 'sw/source') diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index e2060e83d4..d7292cdeee 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -222,7 +222,9 @@ class SwPostItMgr: public SfxListener void Delete(String aAuthor); void Delete(); +#if 0 void Hide( SwPostItField* pPostItField ); +#endif void Hide( const String& rAuthor ); void Hide(); void Show(); @@ -245,7 +247,6 @@ class SwPostItMgr: public SfxListener SwMarginWin* GetPostIt(const SfxBroadcaster* pBroadcaster) const; SwMarginWin* GetPostIt(SfxBroadcaster* pBroadcaster) const; SwPostIt* GetPostIt(const SwPostItField* pFld) const; - SwPostIt* GetPostIt(SwPostItField* pFld) const; void SetShadowState(const SwPostItField* pFld,bool bCursor = true); @@ -255,8 +256,6 @@ class SwPostItMgr: public SfxListener Color GetColorLight(sal_uInt16 aAuthorIndex); Color GetColorAnkor(sal_uInt16 aAuthorIndex); - bool ShowPreview(const SwField* pFld,SwFmtFld*& pFmtFld) const; - void RegisterAnswer(OutlinerParaObject* pAnswer) { mpAnswer = pAnswer;} OutlinerParaObject* IsAnswer() {return mpAnswer;} void CheckMetaText(); diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx index 7f4c88b608..cf546f3547 100644 --- a/sw/inc/SwNumberTree.hxx +++ b/sw/inc/SwNumberTree.hxx @@ -167,13 +167,6 @@ public: return mpParent; } - /** - Returns the first child of this node. - - @return the child - */ - SwNumberTreeNode* GetFirstChild() const; - /** Returns number of this node. diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index a98e7c69a0..68c8ffab7f 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -877,8 +877,6 @@ public: @return the textual description of the current selection */ String GetCrsrDescr() const; - - SwRect GetRectOfCurrentChar(); }; diff --git a/sw/inc/postit.hxx b/sw/inc/postit.hxx index ddc75cc6e6..a24403124a 100644 --- a/sw/inc/postit.hxx +++ b/sw/inc/postit.hxx @@ -324,7 +324,9 @@ class SwMarginWin : public Window virtual bool CalcFollow(); SwMarginWin* GetTopReplyNote(); - bool IsAnyStackParentVisible(); +#if 0 + bool IsAnyStackParentVisible(); +#endif sal_Int32 GetMetaHeight(); sal_Int32 GetMinimumSizeWithMeta(); diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index 5ff4bbbab4..8a6e14c902 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -66,7 +66,6 @@ namespace SwPostItHelper }; SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwPosition& ); - SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwTxtFld* ); long getLayoutHeight( const SwRootFrm* pRoot ); void setSidebarChanged( SwRootFrm* pRoot, bool bBrowseMode ); unsigned long getPageInfo( SwRect& rPageFrm, const SwRootFrm* , const Point& ); diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index 9c5f337460..9da774408d 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -404,7 +404,6 @@ public: */ virtual SwRewriter GetRewriter() const; - BOOL CanGrouping( const SwPosition&, sal_Unicode cIns ); OUT_UNDOBJ( Insert ) DECL_FIXEDMEMPOOL_NEWDEL(SwUndoInsert) @@ -566,7 +565,6 @@ public: ULONG GetEndNode() const { return nEndNode; } ULONG GetDestSttNode() const { return nDestSttNode; } xub_StrLen GetDestSttCntnt() const { return nDestSttCntnt; } - void AddTblMrgFlyHstry( SwHistory& rHstr ); void SetMoveRedlines( bool b ) { bMoveRedlines = b; } @@ -1143,15 +1141,6 @@ public: }; -class SwUndoDelBookmark : public SwUndoBookmark -{ -public: - SwUndoDelBookmark( const ::sw::mark::IMark& ); - virtual void Undo( SwUndoIter& ); - virtual void Redo( SwUndoIter& ); - OUT_UNDOBJ( DelBookmark ) -}; - class SwUndoInsBookmark : public SwUndoBookmark { public: diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index afff32a04d..10de134054 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -398,9 +398,6 @@ public: // compatible behaviour of tabs void SetTabCompat( bool bNew ); - //#i24363# tab stops relative to indent - void SetTabsRelativeToIndent( bool bNew ); - // font metric attribute "External Leading" should be considered void SetAddExtLeading( bool bNew ); diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx index 7988aaf209..bee72cdcd2 100644 --- a/sw/inc/viscrs.hxx +++ b/sw/inc/viscrs.hxx @@ -95,8 +95,6 @@ class SwSelPaintRects : public SwRects // die Shell const SwCrsrShell* pCShell; - void Paint( const SwRect& rRect ); - virtual void Paint( const Rectangle& rRect ); virtual void FillRects() = 0; diff --git a/sw/inc/warnpassword.hxx b/sw/inc/warnpassword.hxx deleted file mode 100644 index 45b8cc0d85..0000000000 --- a/sw/inc/warnpassword.hxx +++ /dev/null @@ -1,50 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: warnpassword.hxx,v $ - * $Revision: 1.4 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SW_WARNPASSWORD_HXX -#define SW_WARNPASSWORD_HXX - - - -class SfxMedium; -/** Static API helper functions. */ -class SwWarnPassword -{ -public: - /** Opens a query warning dialog. - @descr Pop up Query on export with a choice of yes/no if a - an encrypted password is imported. - @return true if yes and false if no. default to true. - */ - static bool WarningOnPassword( SfxMedium& rMedium ); -}; - - -#endif diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx index 8f9caf5f02..7a1a18b885 100644 --- a/sw/source/core/SwNumberTree/SwNumberTree.cxx +++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx @@ -130,19 +130,6 @@ SwNumberTreeNode * SwNumberTreeNode::GetRoot() const return pResult; } -SwNumberTreeNode * SwNumberTreeNode::GetFirstChild() const -{ - SwNumberTreeNode * pResult = 0; - - tSwNumberTreeChildren::iterator aIt = mChildren.begin(); - - if (aIt != mChildren.end() ) - pResult = *aIt; - - return pResult; -} - - void SwNumberTreeNode::ClearObsoletePhantoms() { tSwNumberTreeChildren::iterator aIt = mChildren.begin(); diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx index 48f4b23136..973ed07ded 100644 --- a/sw/source/core/access/accportions.cxx +++ b/sw/source/core/access/accportions.cxx @@ -262,12 +262,6 @@ sal_Bool SwAccessiblePortionData::IsReadOnlyPortion( size_t nPortionNo ) const return IsPortionAttrSet(nPortionNo, PORATTR_READONLY); } -sal_Bool SwAccessiblePortionData::IsGrayPortion( size_t nPortionNo ) const -{ - return IsPortionAttrSet(nPortionNo, PORATTR_GRAY); -} - - sal_Bool SwAccessiblePortionData::IsGrayPortionType( USHORT nType ) const { // gray portions? diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx index ab866dbc37..a281a40f0f 100644 --- a/sw/source/core/access/accportions.hxx +++ b/sw/source/core/access/accportions.hxx @@ -93,7 +93,6 @@ class SwAccessiblePortionData : public SwPortionHandler sal_Bool IsPortionAttrSet( size_t nPortionNo, sal_uInt8 nAttr ) const; sal_Bool IsSpecialPortion( size_t nPortionNo ) const; sal_Bool IsReadOnlyPortion( size_t nPortionNo ) const; - sal_Bool IsGrayPortion( size_t nPortionNo ) const; sal_Bool IsGrayPortionType( USHORT nType ) const; // helper method for GetEditableRange(...): diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index efb7c6bd76..4be578bafe 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -3305,19 +3305,6 @@ String SwCrsrShell::GetCrsrDescr() const return aResult; } -SwRect SwCrsrShell::GetRectOfCurrentChar() -{ - SwCntntFrm* pFrm = pCurCrsr->GetCntntNode()->GetFrm( 0, pCurCrsr->GetPoint(), FALSE ); - SwRect aRet; - SwCrsrMoveState aTmpState( MV_NONE ); - aTmpState.bRealHeight = TRUE; - pFrm->GetCharRect( aRet, *pCurCrsr->GetPoint(), &aTmpState ); - //const SwTwips nRealHeight = aTmpState.aRealHeight.Y(); - if (aTmpState.aRealHeight.X() != 0) - aRet.Top(aRet.Top() + aTmpState.aRealHeight.X()); - return aRet; -} - // SMARTTAGS void lcl_FillRecognizerData( uno::Sequence< rtl::OUString >& rSmartTagTypes, diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 1e0d6b3703..0c0dc8e5ee 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -669,16 +669,6 @@ void SwSelPaintRects::Paint( const Rectangle& /*rRect*/ ) // nothing to do with overlays } -/* - * Rectangle ist in Dokument-Koordianten !! - * pWin != 0 -> auch wirklich malen - * == 0 -> nur testen, ob es gemalt werden kann - */ - -void SwSelPaintRects::Paint( const SwRect& /*rRect*/ ) -{ - // nothing to do with overlays -} // check current MapMode of the shell and set possibly the static members. // Optional set the parameters pX, pY diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx index 9a4542b628..aa7078d842 100644 --- a/sw/source/core/fields/postithelper.cxx +++ b/sw/source/core/fields/postithelper.cxx @@ -129,22 +129,6 @@ unsigned long SwPostItHelper::getPageInfo( SwRect& rPageFrm, const SwRootFrm* pR return nRet; } -SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( std::vector< SwLayoutInfo >& rInfo, SwTxtFld* pFld ) -{ - SwLayoutStatus aRet = SwPostItHelper::INVISIBLE; - if( pFld ) - { - SwTxtNode* pTNd = pFld->GetpTxtNode(); - if( pTNd ) - { - SwPosition aPos( *pTNd ); - aPos.nContent.Assign( pTNd, *pFld->GetStart() ); - aRet = getLayoutInfos( rInfo, aPos ); - } - } - return aRet; -} - SwPosition SwPostItItem::GetPosition() { SwTxtFld* pFld = pFmtFld->GetTxtFld(); diff --git a/sw/source/core/inc/SwGrammarMarkUp.hxx b/sw/source/core/inc/SwGrammarMarkUp.hxx index d662a51ead..4150cbee2b 100644 --- a/sw/source/core/inc/SwGrammarMarkUp.hxx +++ b/sw/source/core/inc/SwGrammarMarkUp.hxx @@ -72,8 +72,6 @@ public: /* getSentenceEnd returns the first start position of a sentence which is greater than the given parameter */ xub_StrLen getSentenceEnd( xub_StrLen nPos ); - /* removeSentence removes all start positions in the given range */ - void removeSentence(xub_StrLen nStart, xub_StrLen nLength ); }; #endif diff --git a/sw/source/core/text/SwGrammarMarkUp.cxx b/sw/source/core/text/SwGrammarMarkUp.cxx index e060f4f59c..39460dae31 100644 --- a/sw/source/core/text/SwGrammarMarkUp.cxx +++ b/sw/source/core/text/SwGrammarMarkUp.cxx @@ -139,21 +139,6 @@ void SwGrammarMarkUp::setSentence( xub_StrLen nStart ) maSentence.insert( pIter, nStart ); } -void SwGrammarMarkUp::removeSentence(xub_StrLen nStart, xub_StrLen nLength ) -{ - std::vector< xub_StrLen >::iterator pIter = maSentence.begin(); - while( pIter != maSentence.end() && *pIter < nStart ) - ++pIter; - if( nLength == STRING_LEN ) - nStart = STRING_LEN; - else - nStart += nLength; - std::vector< xub_StrLen >::iterator pLast = pIter; - while( pLast != maSentence.end() && *pLast < nStart ) - ++pLast; - maSentence.erase( pIter, pLast ); -} - xub_StrLen SwGrammarMarkUp::getSentenceStart( xub_StrLen nPos ) { if( !maSentence.size() ) diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index f374020964..27820f16bc 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1140,7 +1140,7 @@ void SwTxtPaintInfo::DrawPostIts( const SwLinePortion&, sal_Bool bScript ) const } } - +#if 0 void SwTxtPaintInfo::DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) const { SwRect aIntersect; @@ -1167,7 +1167,7 @@ void SwTxtPaintInfo::DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) } } } - +#endif /************************************************************************* * SwTxtPaintInfo::DrawBackGround() *************************************************************************/ diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index c03a94d090..2988dec8e3 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -473,7 +473,9 @@ public: inline void DrawBackBrush( const SwLinePortion &rPor ) const { /* if( pFnt->GetBackColor() ) */ _DrawBackBrush( rPor ); } +#if 0 void DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) const; +#endif inline void NotifyURL( const SwLinePortion &rPor ) const { if( URLNotify() ) _NotifyURL( rPor ); } diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 73ad538c74..764d5bb876 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -125,11 +125,6 @@ sal_Bool isHahChar ( xub_Unicode cCh ) || cCh == 0x6BF ); } -sal_Bool isTahChar ( xub_Unicode cCh ) -{ - return ( cCh == 0x637 || cCh == 0x638 || cCh == 0x69F ); -} - sal_Bool isAinChar ( xub_Unicode cCh ) { return ( cCh == 0x639 || cCh == 0x63A || cCh == 0x6A0 || cCh == 0x6FC ); diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx index 6bc403478d..73dbeab718 100644 --- a/sw/source/core/undo/unbkmk.cxx +++ b/sw/source/core/undo/unbkmk.cxx @@ -91,23 +91,6 @@ SwRewriter SwUndoBookmark::GetRewriter() const //---------------------------------------------------------------------- -SwUndoDelBookmark::SwUndoDelBookmark( const ::sw::mark::IMark& rBkmk ) - : SwUndoBookmark( UNDO_DELBOOKMARK, rBkmk ) -{ -} - - -void SwUndoDelBookmark::Undo( SwUndoIter& rUndoIter ) -{ - SetInDoc( &rUndoIter.GetDoc() ); -} - - -void SwUndoDelBookmark::Redo( SwUndoIter& rUndoIter ) -{ - ResetInDoc( &rUndoIter.GetDoc() ); -} - SwUndoInsBookmark::SwUndoInsBookmark( const ::sw::mark::IMark& rBkmk ) : SwUndoBookmark( UNDO_INSBOOKMARK, rBkmk ) diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index 36fc9bde50..6ab0a047a0 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -167,21 +167,6 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd ) // werden kann. Wenn ja, dann aender die Laenge und die InsPos. // Dann wird von SwDoc::Insert kein neues Object in die Undoliste gestellt. -BOOL SwUndoInsert::CanGrouping( const SwPosition& rInsPos, sal_Unicode cIns ) -{ - BOOL bRet = FALSE; - if( !bIsAppend ) - { - ++nCntnt; - bRet = CanGrouping( rInsPos ); - --nCntnt; - if( bRet ) - bRet = CanGrouping( cIns ); - } - return bRet; -} - - BOOL SwUndoInsert::CanGrouping( sal_Unicode cIns ) { if( !bIsAppend && bIsWordDelim == diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx index a7491da0c8..3396dd54d5 100644 --- a/sw/source/core/undo/unmove.cxx +++ b/sw/source/core/undo/unmove.cxx @@ -357,13 +357,3 @@ void SwUndoMove::DelFtn( const SwPaM& rRange ) } } -void SwUndoMove::AddTblMrgFlyHstry( SwHistory& rHstr ) -{ - if( !pHistory ) - pHistory = new SwHistory; - - USHORT nInsPos = nFtnStt; - nFtnStt = nFtnStt + rHstr.Count(); - pHistory->Move( nInsPos, &rHstr ); -} - diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index b2e863595f..df3c089dcb 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -4429,41 +4429,6 @@ void SwXCellRange::GetDataSequence( pDblSeq->realloc( nDtaCnt ); } -/*-- 04.06.04 11:42:47--------------------------------------------------- - - -----------------------------------------------------------------------*/ - -SwUnoCrsr * lcl_CreateCursor( SwFrmFmt &rTblFmt, - SwTableBox *pStartBox, // should be top-left cell of cell range - SwTableBox *pEndBox ) // should be bottom right-cell cell range -{ - // create a *new* UNO cursor spanning the cell range defined by - // the start and end box. Both boxes must be belong to the same table! - - SwUnoCrsr *pUnoCrsr = 0; - if (pStartBox && pEndBox) - { - // hier muessen die Actions aufgehoben werden um - // (zB dem Layout zu ermöglichen die Tabelle zu formatieren, da - // sonst kein Tabellen Cursor aufgespannt werden kann.) - UnoActionRemoveContext aRemoveContext(rTblFmt.GetDoc()); - - // set point of cursor to top left box of range - const SwStartNode* pSttNd = pStartBox->GetSttNd(); - SwPosition aPos(*pSttNd); - pUnoCrsr = rTblFmt.GetDoc()->CreateUnoCrsr(aPos, sal_True); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); - pUnoCrsr->SetRemainInSection( sal_False ); - pUnoCrsr->SetMark(); - pUnoCrsr->GetPoint()->nNode = *pEndBox->GetSttNd(); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); - SwUnoTableCrsr *pCrsr = dynamic_cast(pUnoCrsr); - pCrsr->MakeBoxSels(); - } - return pUnoCrsr; -} - - /*-- 29.04.02 11:42:47--------------------------------------------------- -----------------------------------------------------------------------*/ diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 7d280ff1b6..434c636a52 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -884,21 +884,6 @@ void ViewShell::SetTabCompat( bool bNew ) } } -/*-- 29.11.2007 09:03:18--------------------------------------------------- - //#i24363# tab stops relative to indent - -----------------------------------------------------------------------*/ -void ViewShell::SetTabsRelativeToIndent(bool bNew) -{ - IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess(); - if( pIDSA->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT) != bNew ) - { - SwWait aWait( *GetDoc()->GetDocShell(), TRUE ); - pIDSA->set(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT, bNew ); - const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION; - lcl_InvalidateAllCntnt( *this, nInv ); - } -} - void ViewShell::SetAddExtLeading( bool bNew ) { IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess(); diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index b07a93f0bb..94b232f166 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -1618,79 +1618,6 @@ USHORT SwRTFParser::ReadRevTbl() return nAuthorTableIndex; } -// #117910# simulate words behaviour of \keepn in table rows -void fixKeepAndSplitAttributes(SwTableNode *pTableNode) -{ - ASSERT(pTableNode!=NULL, "no table node!"); - if (!pTableNode) return; - SwDoc *pDoc=pTableNode->GetDoc(); - if (pTableNode==NULL) return; - SwTable& rTable=pTableNode->GetTable(); - SwTableLines& rLns = rTable.GetTabLines(); - USHORT nLines=rLns.Count(); - if (nLines==0) return; - // get first paragaph in left down-most box - SwTableLine* pLastLine = rLns[ nLines-1 ]; - SwTableBox* pBox = pLastLine->GetTabBoxes()[ 0 ]; - ULONG iFirstParagraph=pBox->GetSttIdx()+1; - SwTxtNode *pTxtNode=(SwTxtNode *)pDoc->GetNodes()[iFirstParagraph]; - SwFrmFmt* pFmt=rTable.GetFrmFmt(); - - SwFmtLayoutSplit *pTableSplit=(SwFmtLayoutSplit *)pFmt->GetAttrSet().GetItem(RES_LAYOUT_SPLIT); - BOOL isTableKeep = pTableSplit!=NULL && !pTableSplit->GetValue(); - SvxFmtKeepItem *pTableKeep=(SvxFmtKeepItem *)pFmt->GetAttrSet().GetItem(RES_KEEP); - BOOL isTableKeepNext = pTableKeep!=NULL && pTableKeep->GetValue(); - SvxFmtKeepItem *pKeepNext = (SvxFmtKeepItem *)pTxtNode->GetSwAttrSet().GetItem(RES_KEEP); - - if (isTableKeepNext) - { - if (nLines>2 && !isTableKeep) - { // split - SwTableLine* pSplitLine = rLns[ nLines-2 ]; - SwTableBox* pSplitBox = pSplitLine->GetTabBoxes()[ 0 ]; - SwNodeIndex aSplitIdx( *pSplitBox->GetSttNd() ); - pDoc->SplitTable( SwPosition(aSplitIdx), HEADLINE_NONE, - !isTableKeep ); - SwTable& rSplitTable=aSplitIdx.GetNode().FindTableNode()->GetTable(); - aSplitIdx-=2; - pDoc->GetNodes().Delete(aSplitIdx); - pFmt=rSplitTable.GetFrmFmt(); - pFmt->ResetFmtAttr(RES_PAGEDESC); - } - // set keep=1(i.e. split=0) attribut - SwFmtLayoutSplit aSplit(0); - SwAttrSet aNewSet(pFmt->GetAttrSet()); - aNewSet.Put(aSplit); - pFmt->SetFmtAttr(aNewSet); - } - else // !isTableKeepNext - { - if (isTableKeep) - { - SwNodeIndex aTmpIdx( *pBox->GetSttNd() ); - pDoc->SplitTable( SwPosition(aTmpIdx), HEADLINE_NONE, FALSE ); - SwTable& rSplitTable=aTmpIdx.GetNode().FindTableNode()->GetTable(); - aTmpIdx-=2; - pDoc->GetNodes().Delete(aTmpIdx); - pFmt=rSplitTable.GetFrmFmt(); - pFmt->ResetFmtAttr(RES_PAGEDESC); - } - // set keep=0(i.e. split=1) attribut - SwFmtLayoutSplit aSplit(1); - SwAttrSet aNewSet(pFmt->GetAttrSet()); - aNewSet.Put(aSplit); - pFmt->SetFmtAttr(aNewSet); - } - // move keepnext attribtue from last paragraph to table - if (pKeepNext!=NULL) - { - SvxFmtKeepItem aNewKeepItem(pKeepNext->GetValue(), RES_KEEP); - SwAttrSet aNewSet(pFmt->GetAttrSet()); - aNewSet.Put(aNewKeepItem); - pFmt->SetFmtAttr(aNewSet); - } -} - void SwRTFParser::NextToken( int nToken ) { USHORT eDateFmt; diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index 965d997955..1f89a1d0d9 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -139,6 +139,7 @@ const SwTable * WW8TableNodeInfoInner::getTable() const return mpTable; } +#ifdef DEBUG string WW8TableNodeInfoInner::toString() const { static char buffer[256]; @@ -154,7 +155,7 @@ string WW8TableNodeInfoInner::toString() const return string(buffer); } - +#endif // WW8TableTextNodeInfo WW8TableNodeInfo::WW8TableNodeInfo(const SwNode * pNode) @@ -170,6 +171,7 @@ WW8TableNodeInfo::~WW8TableNodeInfo() { } +#ifdef DEBUG ::std::string WW8TableNodeInfo::toString() const { static char buffer[1024]; @@ -190,15 +192,13 @@ WW8TableNodeInfo::~WW8TableNodeInfo() aIt++; } -#ifdef DEBUG sResult += dbg_out(*mpNode); -#endif sResult +=""; return sResult; } - +#endif void WW8TableNodeInfo::setDepth(sal_uInt32 nDepth) { mnDepth = nDepth; diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index 0db4637465..d9340c992b 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -84,7 +84,9 @@ public: const SwNode * getNode() const; +#ifdef DEBUG string toString() const; +#endif }; class WW8TableNodeInfo @@ -131,7 +133,9 @@ public: sal_uInt32 getCell() const; sal_uInt32 getRow() const; +#ifdef DEBUG ::std::string toString() const; +#endif }; struct hashNode diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 8b6a98eca8..078c7084ea 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -570,6 +570,7 @@ namespace sw return aRet; } +#if 0 Frames GetFramesBetweenNodes(const Frames &rFrames, const SwNode &rStart, const SwNode &rEnd) { @@ -583,7 +584,7 @@ namespace sw return aRet; } - +#endif Frames GetFramesInNode(const Frames &rFrames, const SwNode &rNode) { Frames aRet; diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx index 68a474b227..3cc82dd384 100644 --- a/sw/source/filter/ww8/writerhelper.hxx +++ b/sw/source/filter/ww8/writerhelper.hxx @@ -666,6 +666,7 @@ namespace sw */ Frames GetFramesInNode(const Frames &rFrames, const SwNode &rNode); +#if 0 /** Get the Frames anchored for all nodes between two points Given a container of frames, find the ones anchored to the nodes @@ -688,7 +689,7 @@ namespace sw */ Frames GetFramesBetweenNodes(const Frames &rFrames, const SwNode &rStart, const SwNode &rEnd); - +#endif /** Get the Numbering Format used on a paragraph There are two differing types of numbering formats that may be on a diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 662b6d36f3..1cf43dcfa0 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -383,20 +383,18 @@ private: SwNodeIndex maPtNode; xub_StrLen mnPtCntnt; ::rtl::OUString msBookmarkName; - ::rtl::OUString msMarkType; typedef ::std::pair< ::rtl::OUString, ::rtl::OUString> Param_t; typedef ::std::vector< Param_t > Params_t; Params_t maParams; SwPaM * mpPaM; public: - WW8NewFieldCtx(SwPosition &aStartPos, ::rtl::OUString sBookmarkName, ::rtl::OUString sMarkType); + WW8NewFieldCtx(SwPosition &aStartPos, ::rtl::OUString sBookmarkName); ~WW8NewFieldCtx(); SwNodeIndex GetPtNode() { return maPtNode; }; xub_StrLen GetPtCntnt() { return mnPtCntnt; }; ::rtl::OUString GetBookmarkName(); - ::rtl::OUString GetMarkType(); void AddParam(::rtl::OUString name, ::rtl::OUString value); void SetCurrentFieldParamsTo(::sw::mark::IFieldmark* pFieldmark); }; diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx index d8730b0c55..a6c89174c6 100644 --- a/sw/source/filter/ww8/ww8par2.hxx +++ b/sw/source/filter/ww8/ww8par2.hxx @@ -288,7 +288,6 @@ public: const WW8SwFlyPara* pFS, bool bGraf); WW8FlySet(SwWW8ImplReader& rReader, const SwPaM* pPaM, const WW8_PIC& rPic, long nWidth, long nHeight); - WW8FlySet(const SwWW8ImplReader& rReader, const SwPaM* pPaM); }; enum WW8LvlType {WW8_None, WW8_Outline, WW8_Numbering, WW8_Sequence, WW8_Pause}; diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index b6b91459fc..ba35fd2bfd 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -103,11 +103,10 @@ using namespace com::sun::star; using namespace sw::util; using namespace sw::types; -WW8NewFieldCtx::WW8NewFieldCtx(SwPosition &aStartPos, ::rtl::OUString sBookmarkName, ::rtl::OUString sMarkType) +WW8NewFieldCtx::WW8NewFieldCtx(SwPosition &aStartPos, ::rtl::OUString sBookmarkName) : maPtNode(aStartPos.nNode) , mnPtCntnt(aStartPos.nContent.GetIndex()) , msBookmarkName(sBookmarkName) - , msMarkType(sMarkType) , mpPaM(NULL) { } @@ -123,11 +122,6 @@ WW8NewFieldCtx::~WW8NewFieldCtx() return msBookmarkName; } -::rtl::OUString WW8NewFieldCtx::GetMarkType() -{ - return msMarkType; -} - void WW8NewFieldCtx::AddParam(::rtl::OUString name, ::rtl::OUString value) { maParams.push_back( Param_t(name, value) ); @@ -233,7 +227,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr ) if (aBookmarkName.Len()>0) { - WW8NewFieldCtx *pFieldCtx=new WW8NewFieldCtx(*pPaM->GetPoint(), aBookmarkName, ::rtl::OUString::createFromAscii("ecma.office-open-xml.field.FORMTEXT")); + WW8NewFieldCtx *pFieldCtx=new WW8NewFieldCtx(*pPaM->GetPoint(), aBookmarkName/*, ::rtl::OUString::createFromAscii("ecma.office-open-xml.field.FORMTEXT"*/); maNewFieldCtxStack.push_back(pFieldCtx); pFieldCtx->AddParam(::rtl::OUString::createFromAscii("Description"), aFormula.sToolTip); pFieldCtx->AddParam(::rtl::OUString::createFromAscii("Name"), aFormula.sTitle); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 9739922e4a..1c047e3e54 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2275,12 +2275,6 @@ WW8FlySet::WW8FlySet( SwWW8ImplReader& rReader, const SwPaM* pPaM, + aSizeArray[WW8_BOT]) ); } -WW8FlySet::WW8FlySet(const SwWW8ImplReader& rReader, const SwPaM* pPaM) - : SfxItemSet(rReader.rDoc.GetAttrPool(),RES_FRMATR_BEGIN,RES_FRMATR_END-1) -{ - Init(rReader, pPaM); -} - void WW8FlySet::Init(const SwWW8ImplReader& rReader, const SwPaM* pPaM) { if (!rReader.mbNewDoc) diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index 8cb2cdb66c..6aa0d85057 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -106,7 +106,6 @@ #include #include #include -#include "warnpassword.hxx" #include #include diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 17673cd387..12089070bc 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -1295,7 +1295,7 @@ void SwPostItMgr::Delete() CalcRects(); LayoutPostIts(); } - +#if 0 void SwPostItMgr::Hide(SwPostItField* pPostItField ) { for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) @@ -1314,7 +1314,7 @@ void SwPostItMgr::Hide(SwPostItField* pPostItField ) LayoutPostIts(); } - +#endif void SwPostItMgr::Hide( const String& rAuthor ) { for(SwMarginItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) @@ -1379,16 +1379,6 @@ SwMarginWin* SwPostItMgr::GetPostIt(SfxBroadcaster* pBroadcaster) const return NULL; } -SwPostIt* SwPostItMgr::GetPostIt(SwPostItField* pFld) const -{ - for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) - { - if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld() == pFld) ) - return static_cast((*i)->pPostIt); - } - return NULL; -} - SwMarginWin* SwPostItMgr::GetPostIt( const SfxBroadcaster* pBroadcaster) const { for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) @@ -1409,30 +1399,6 @@ SwPostIt* SwPostItMgr::GetPostIt(const SwPostItField* pFld) const return NULL; } -bool SwPostItMgr::ShowPreview(const SwField* pFld, SwFmtFld*& pFmtFld) const -{ - for (unsigned long n=0;nmList->size()>0) - { - for(const_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++) - { - if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld()==pFld) ) - { - pFmtFld = (*i)->GetFmtFld(); - const long aSidebarheight = mPages[n]->bScrollbar ? mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height() : 0; - bool bTopPage = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y())).Y() >= (mPages[n]->mPageRect.Top()+aSidebarheight); - bool bBottomPage = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y()+(*i)->pPostIt->GetSizePixel().Height())).Y() <= (mPages[n]->mPageRect.Bottom()-aSidebarheight); - const bool bTopVis = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y())).Y() > mpView->GetVisArea().Top(); - const bool bBottomVis = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y()/*+(*i)->pPostIt->GetSizePixel().Height()*/)).Y() <= mpView->GetVisArea().Bottom(); - return !(bBottomPage && bTopPage && bBottomVis && bTopVis); - } - } - } - } - return false; -} - SwMarginWin* SwPostItMgr::GetNextPostIt(USHORT aDirection, SwMarginWin* aPostIt) { if (mvPostItFlds.size()>1) diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx index c807e24ff8..9b241c9c3e 100644 --- a/sw/source/ui/docvw/postit.cxx +++ b/sw/source/ui/docvw/postit.cxx @@ -1517,6 +1517,7 @@ void SwMarginWin::SetViewState(ShadowState bState) } } +#if 0 bool SwMarginWin::IsAnyStackParentVisible() { SwMarginWin* pMarginWin = mpMgr->GetNextPostIt(KEY_PAGEUP, this); @@ -1533,7 +1534,7 @@ bool SwMarginWin::IsAnyStackParentVisible() } return false; } - +#endif SwMarginWin* SwMarginWin::GetTopReplyNote() { SwMarginWin* pTopNote = 0; diff --git a/sw/source/ui/uno/makefile.mk b/sw/source/ui/uno/makefile.mk index 41b2cc73ca..2632db2e89 100644 --- a/sw/source/ui/uno/makefile.mk +++ b/sw/source/ui/uno/makefile.mk @@ -63,8 +63,7 @@ SLO1FILES = \ $(SLO)$/SwXFilterOptions.obj\ $(SLO)$/RefreshListenerContainer.obj \ $(SLO)$/unomodule.obj \ - $(SLO)$/unodoc.obj \ - $(SLO)$/warnpassword.obj + $(SLO)$/unodoc.obj SLO2FILES = \ $(SLO)$/swdetect.obj \ diff --git a/sw/source/ui/uno/warnpassword.cxx b/sw/source/ui/uno/warnpassword.cxx deleted file mode 100644 index 1af8e77c25..0000000000 --- a/sw/source/ui/uno/warnpassword.cxx +++ /dev/null @@ -1,89 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: warnpassword.cxx,v $ - * $Revision: 1.7 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * -+ ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" -// ============================================================================ -#include "warnpassword.hxx" -#include -#include -#include -#include -#include -#include -#include - -using ::rtl::OUString; - -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::ucb; -using namespace ::com::sun::star::task; - -bool SwWarnPassword::WarningOnPassword( SfxMedium& rMedium ) -{ - bool bReturn = true; - uno::Reference< task::XInteractionHandler > xHandler( rMedium.GetInteractionHandler()); - if( xHandler.is() ) - { - - OUString empty; - uno::Any xException( makeAny(InteractiveAppException(empty, - uno::Reference (), - InteractionClassification_QUERY, - ERRCODE_SVX_EXPORT_FILTER_CRYPT))); - - uno::Reference< ucbhelper::SimpleInteractionRequest > xRequest - = new ucbhelper::SimpleInteractionRequest( - xException, - ucbhelper::CONTINUATION_APPROVE - | ucbhelper::CONTINUATION_DISAPPROVE ); - - xHandler->handle( xRequest.get() ); - - const sal_Int32 nResp = xRequest->getResponse(); - - switch ( nResp ) - { - case ucbhelper::CONTINUATION_UNKNOWN: - break; - - case ucbhelper::CONTINUATION_APPROVE: - // Continue - break; - - case ucbhelper::CONTINUATION_DISAPPROVE: - bReturn = false; - break; - } - } - return bReturn; -} - -- cgit v1.2.3 From 025a5a2c3b779f1b4ae479955aba4eda2977c5ec Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 11 Jan 2010 15:58:29 +0100 Subject: cws tl74: merge problems --- sw/source/ui/lingu/olmenu.cxx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index fbb17bede6..2c099c1474 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -63,12 +63,7 @@ #include #include #include -#include -#include -#include -#include #include -#include #include #include #include @@ -80,6 +75,7 @@ #include #include #include +#include #include #include #include @@ -295,7 +291,7 @@ void SwSpellPopup::fillLangPopupMenu( { for (USHORT i = 0; i < rLocales.getLength(); ++i) { - if (aLangItems.size() == nMaxCount) + if (aLangItems.size() == (size_t)nMaxCount) break; const lang::Locale& rLocale = rLocales[i]; if (lcl_checkScriptType( nScriptType, aLanguageTable.GetType( rLocale.Language ))) @@ -575,7 +571,7 @@ bGrammarResults(false) Image rImg = ::GetImage( xFrame, OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False, Application::GetSettings().GetStyleSettings().GetHighContrastMode() ); - SetItemImage( MN_SPELLING, rImg ); + SetItemImage( MN_SPELLING_DLG, rImg ); ////////////////////////////////////////////////////////////////////////////////// @@ -708,7 +704,7 @@ aInfo16( SW_RES(IMG_INFO_16) ) Image rImg = ::GetImage( xFrame, OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False, Application::GetSettings().GetStyleSettings().GetHighContrastMode() ); - SetItemImage( MN_SPELLING, rImg ); + SetItemImage( MN_SPELLING_DLG, rImg ); ////////////////////////////////////////////////////////////////////////////////// @@ -740,7 +736,7 @@ void SwSpellPopup::Execute( USHORT nId ) if ((MN_SUGGESTION_START <= nId && nId <= MN_SUGGESTION_END) || (MN_AUTOCORR_START <= nId && nId <= MN_AUTOCORR_END)) { - USHORT nAltIdx = (MN_SUGGESTION_START <= nId && nId <= MN_SUGGESTION_END) ? + sal_Int32 nAltIdx = (MN_SUGGESTION_START <= nId && nId <= MN_SUGGESTION_END) ? nId - MN_SUGGESTION_START : nId - MN_AUTOCORR_START; DBG_ASSERT( 0 <= nAltIdx && nAltIdx < aSuggestions.getLength(), "index out of range" ); if (0 <= nAltIdx && nAltIdx < aSuggestions.getLength() && (bGrammarResults || xSpellAlt.is())) -- cgit v1.2.3 From 92604e602e71a592ce5c0797545fa9d874837981 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 12 Jan 2010 10:43:45 +0100 Subject: sw33a11y01: #i88070# refactoring of sidebar window code used for visualization of comments/annotations --- sw/inc/AnnotationWin.hxx | 81 + sw/inc/PostItMgr.hxx | 97 +- sw/inc/SidebarWin.hxx | 269 +++ sw/inc/SidebarWindowsTypes.hxx | 53 + sw/inc/postit.hxx | 417 ----- sw/inc/postithelper.hxx | 59 +- sw/inc/rcid.hrc | 9 +- sw/inc/sw_primitivetypes2d.hxx | 8 +- sw/source/core/crsr/findtxt.cxx | 37 +- sw/source/core/fields/postithelper.cxx | 23 +- sw/source/core/inc/pagefrm.hxx | 10 +- sw/source/core/layout/layact.cxx | 24 +- sw/source/core/layout/pagechg.cxx | 14 +- sw/source/core/layout/paintfrm.cxx | 2 +- sw/source/core/view/viewsh.cxx | 28 +- sw/source/ui/app/docsh.cxx | 18 +- sw/source/ui/docvw/AnchorOverlayObject.cxx | 467 +++++ sw/source/ui/docvw/AnchorOverlayObject.hxx | 143 ++ sw/source/ui/docvw/AnnotationMenuButton.cxx | 200 +++ sw/source/ui/docvw/AnnotationMenuButton.hxx | 62 + sw/source/ui/docvw/AnnotationWin.cxx | 291 ++++ sw/source/ui/docvw/PostItMgr.cxx | 472 ++--- sw/source/ui/docvw/ShadowOverlayObject.cxx | 269 +++ sw/source/ui/docvw/ShadowOverlayObject.hxx | 80 + sw/source/ui/docvw/SidebarTxtControl.cxx | 411 +++++ sw/source/ui/docvw/SidebarTxtControl.hxx | 95 + sw/source/ui/docvw/SidebarTxtControlAcc.cxx | 215 +++ sw/source/ui/docvw/SidebarTxtControlAcc.hxx | 56 + sw/source/ui/docvw/SidebarWin.cxx | 1299 ++++++++++++++ sw/source/ui/docvw/annotation.hrc | 54 + sw/source/ui/docvw/annotation.src | 68 + sw/source/ui/docvw/docvw.hrc | 23 +- sw/source/ui/docvw/docvw.src | 37 +- sw/source/ui/docvw/edtwin.cxx | 28 +- sw/source/ui/docvw/edtwin2.cxx | 1 - sw/source/ui/docvw/makefile.mk | 15 +- sw/source/ui/docvw/postit.cxx | 2486 --------------------------- sw/source/ui/inc/SidebarWindowsConsts.hxx | 41 + sw/source/ui/makefile.mk | 6 +- sw/source/ui/shells/annotsh.cxx | 112 +- sw/source/ui/shells/textfld.cxx | 25 +- sw/source/ui/uiview/view.cxx | 2 +- sw/source/ui/uiview/view2.cxx | 23 +- sw/source/ui/uiview/viewmdi.cxx | 19 +- sw/source/ui/uiview/viewsrch.cxx | 6 +- sw/source/ui/utlui/content.cxx | 15 +- sw/source/ui/wrtsh/wrtsh1.cxx | 4 +- sw/util/makefile.mk | 4 +- 48 files changed, 4751 insertions(+), 3427 deletions(-) create mode 100644 sw/inc/AnnotationWin.hxx create mode 100644 sw/inc/SidebarWin.hxx create mode 100644 sw/inc/SidebarWindowsTypes.hxx delete mode 100644 sw/inc/postit.hxx create mode 100644 sw/source/ui/docvw/AnchorOverlayObject.cxx create mode 100644 sw/source/ui/docvw/AnchorOverlayObject.hxx create mode 100644 sw/source/ui/docvw/AnnotationMenuButton.cxx create mode 100644 sw/source/ui/docvw/AnnotationMenuButton.hxx create mode 100644 sw/source/ui/docvw/AnnotationWin.cxx create mode 100644 sw/source/ui/docvw/ShadowOverlayObject.cxx create mode 100644 sw/source/ui/docvw/ShadowOverlayObject.hxx create mode 100644 sw/source/ui/docvw/SidebarTxtControl.cxx create mode 100644 sw/source/ui/docvw/SidebarTxtControl.hxx create mode 100644 sw/source/ui/docvw/SidebarTxtControlAcc.cxx create mode 100644 sw/source/ui/docvw/SidebarTxtControlAcc.hxx create mode 100644 sw/source/ui/docvw/SidebarWin.cxx create mode 100644 sw/source/ui/docvw/annotation.hrc create mode 100644 sw/source/ui/docvw/annotation.src delete mode 100644 sw/source/ui/docvw/postit.cxx create mode 100644 sw/source/ui/inc/SidebarWindowsConsts.hxx (limited to 'sw/source') diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx new file mode 100644 index 0000000000..634182068b --- /dev/null +++ b/sw/inc/AnnotationWin.hxx @@ -0,0 +1,81 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _ANNOTATIONWIN_HXX +#define _ANNOTATIONWIN_HXX + +#include + +class PopupMenu; + +namespace sw { namespace annotation { + +class SwAnnotationWin : public sw::sidebarwindows::SwSidebarWin +{ + public: + SwAnnotationWin( SwEditWin& rEditWin, + WinBits nBits, + SwFmtFld* aField, + SwPostItMgr& aMgr, + SwPostItBits aBits ); + virtual ~SwAnnotationWin(); + + virtual void UpdateData(); + virtual void SetPostItText(); + virtual void Delete(); + virtual void GotoPos(); + + virtual String GetAuthor(); + virtual Date GetDate(); + virtual Time GetTime(); + + virtual sal_uInt32 MoveCaret(); + + virtual bool CalcFollow(); + void InitAnswer(OutlinerParaObject* pText); + + virtual bool IsProtected(); + + protected: + virtual MenuButton* CreateMenuButton(); + + private: + virtual SvxLanguageItem GetLanguage(void); + sal_uInt32 CountFollowing(); + + SwFmtFld* mpFmtFld; + SwPostItField* mpFld; + PopupMenu* mpButtonPopup; + +}; + +} } // end of namespace sw::annotation +#endif diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index f71c0f3e23..1f26159fc7 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,12 +43,13 @@ #include #include #include +#include class SwWrtShell; class SwDoc; class SwView; class SwPostItField; -class SwFmtFld; +class SwFmtFld; class SwField; class SfxBroadcaster; class SfxHint; @@ -56,9 +57,13 @@ class SwEditWin; class Color; class SvxSearchItem; class SvxLanguageItem; -class SwPostIt; -class SwMarginWin; -class SwMarginItem; +namespace sw { namespace annotation { + class SwAnnotationWin; +}} +namespace sw { namespace sidebarwindows { + class SwSidebarWin; +}} +class SwSidebarItem; #define SORT_POS 1 #define SORT_AUTHOR 2 @@ -67,23 +72,20 @@ class SwMarginItem; #define COL_NOTES_SIDEPANE_ARROW_ENABLED RGB_COLORDATA(0,0,0) #define COL_NOTES_SIDEPANE_ARROW_DISABLED RGB_COLORDATA(172,168,153) -typedef std::list SwMarginItem_list; -typedef std::list::iterator SwMarginItem_iterator; +typedef std::list SwSidebarItem_list; +typedef std::list::iterator SwSidebarItem_iterator; -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using ::rtl::OUString; struct SwPostItPageItem { bool bScrollbar; - bool bMarginSide; + sw::sidebarwindows::SidebarPosition eSidebarPosition; long lOffset; SwRect mPageRect; - SwMarginItem_list* mList; + SwSidebarItem_list* mList; SwPostItPageItem(): bScrollbar(false),lOffset(0) { - mList = new SwMarginItem_list; + mList = new SwSidebarItem_list; } ~SwPostItPageItem() { @@ -105,14 +107,16 @@ struct FieldShadowState class SwNoteProps: public utl::ConfigItem { - private: + private: bool bIsShowAnkor; public: - SwNoteProps() : ConfigItem(::rtl::OUString::createFromAscii("Office.Writer/Notes")), bIsShowAnkor(false) + SwNoteProps() + : ConfigItem(::rtl::OUString::createFromAscii("Office.Writer/Notes")) + , bIsShowAnkor(false) { - const Sequence& rNames = GetPropertyNames(); - Sequence aValues = GetProperties(rNames); - const Any* pValues = aValues.getConstArray(); + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames = GetPropertyNames(); + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aValues = GetProperties(rNames); + const ::com::sun::star::uno::Any* pValues = aValues.getConstArray(); DBG_ASSERT(aValues.getLength() == rNames.getLength(), "GetProperties failed"); if (aValues.getLength()) pValues[0]>>=bIsShowAnkor; @@ -122,9 +126,9 @@ class SwNoteProps: public utl::ConfigItem { return bIsShowAnkor; } - Sequence& GetPropertyNames() + ::com::sun::star::uno::Sequence< ::rtl::OUString >& GetPropertyNames() { - static Sequence aNames; + static ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames; if(!aNames.getLength()) { static const char* aPropNames[] = @@ -133,9 +137,9 @@ class SwNoteProps: public utl::ConfigItem }; const int nCount = sizeof(aPropNames)/sizeof(const char*); aNames.realloc(nCount); - OUString* pNames = aNames.getArray(); + ::rtl::OUString* pNames = aNames.getArray(); for(int i = 0; i < nCount; i++) - pNames[i] = OUString::createFromAscii(aPropNames[i]); + pNames[i] = ::rtl::OUString::createFromAscii(aPropNames[i]); } return aNames; } @@ -147,11 +151,11 @@ class SwPostItMgr: public SfxListener SwView* mpView; SwWrtShell* mpWrtShell; SwEditWin* mpEditWin; - std::list< SwMarginItem*> mvPostItFlds; + std::list< SwSidebarItem*> mvPostItFlds; std::vector mPages; ULONG mnEventId; bool mbWaitingForCalcRects; - SwMarginWin* mpActivePostIt; + sw::sidebarwindows::SwSidebarWin* mpActivePostIt; bool mbLayout; long mbLayoutHeight; long mbLayouting; @@ -161,22 +165,24 @@ class SwPostItMgr: public SfxListener OutlinerParaObject* mpAnswer; bool mpIsShowAnkor; - typedef std::list::iterator SwMarginWin_iterator; + typedef std::list::iterator SwSidebarWin_iterator; void AddPostIts(bool bCheckExistance = true,bool bFocus = true); //void AddRedlineComments(bool bCheckExistance, bool bFocus); - void RemoveMarginWin(); + void RemoveSidebarWin(); void PreparePageContainer(); void Scroll(const long lScroll,const unsigned long aPage ); - void AutoScroll(const SwMarginWin* pPostIt,const unsigned long aPage ); + void AutoScroll(const sw::sidebarwindows::SwSidebarWin* pPostIt,const unsigned long aPage ); bool ScrollbarHit(const unsigned long aPage,const Point &aPoint); - bool LayoutByPage(std::list &aVisiblePostItList,const Rectangle aBorder,long lNeededHeight); + bool LayoutByPage( std::list &aVisiblePostItList, + const Rectangle aBorder, + long lNeededHeight); void CheckForRemovedPostIts(); bool ArrowEnabled(USHORT aDirection,unsigned long aPage) const; bool BorderOverPageBorder(unsigned long aPage) const; bool HasScrollbars() const; void Focus(SfxBroadcaster& rBC); - + sal_Int32 GetInitialAnchorDistance() const; sal_Int32 GetScrollSize() const; sal_Int32 GetSpaceBetween() const; @@ -188,7 +194,7 @@ class SwPostItMgr: public SfxListener SwPostItMgr(SwView* aDoc); ~SwPostItMgr(); - typedef std::list< SwMarginItem* >::const_iterator const_iterator; + typedef std::list< SwSidebarItem* >::const_iterator const_iterator; const_iterator begin() const { return mvPostItFlds.begin(); } const_iterator end() const { return mvPostItFlds.end(); } @@ -199,7 +205,8 @@ class SwPostItMgr: public SfxListener void LayoutPostIts(); bool CalcRects(); - void MakeVisible(const SwMarginWin* pPostIt,long aPage = -1); + void MakeVisible( const sw::sidebarwindows::SwSidebarWin* pPostIt, + long aPage = -1); bool ShowScrollbar(const unsigned long aPage) const; bool HasNotes() const ; @@ -212,7 +219,7 @@ class SwPostItMgr: public SfxListener void PrepareView(bool bIgnoreCount = false); void CorrectPositions(); - + void Sort(const short aType); void SetLayout() { mbLayout = true; }; @@ -232,17 +239,27 @@ class SwPostItMgr: public SfxListener bool IsHit(const Point &aPointPixel); Color GetArrowColor(USHORT aDirection,unsigned long aPage) const; - SwMarginWin* GetNextPostIt(USHORT aDirection, SwMarginWin* aPostIt); + sw::sidebarwindows::SwSidebarWin* GetNextPostIt( USHORT aDirection, + sw::sidebarwindows::SwSidebarWin* aPostIt); long GetNextBorder(); - SwMarginWin* GetActivePostIt() { return mpActivePostIt; } - void SetActivePostIt( SwMarginWin* p); + + sw::sidebarwindows::SwSidebarWin* GetActiveSidebarWin() { return mpActivePostIt; } + void SetActiveSidebarWin( sw::sidebarwindows::SwSidebarWin* p); + bool HasActiveSidebarWin() const; + bool HasActiveAnnotationWin() const; + void GrabFocusOnActiveSidebarWin(); + void UpdateDataOnActiveSidebarWin(); + void DeleteActiveSidebarWin(); + void HideActiveSidebarWin(); + void ToggleInsModeOnActiveSidebarWin(); + sal_Int32 GetMinimumSizeWithMeta() const; sal_Int32 GetSidebarScrollerHeight() const; - SwMarginWin* GetPostIt(const SfxBroadcaster* pBroadcaster) const; - SwMarginWin* GetPostIt(SfxBroadcaster* pBroadcaster) const; - SwPostIt* GetPostIt(const SwPostItField* pFld) const; - SwPostIt* GetPostIt(SwPostItField* pFld) const; + sw::sidebarwindows::SwSidebarWin* GetPostIt(const SfxBroadcaster* pBroadcaster) const; + sw::sidebarwindows::SwSidebarWin* GetPostIt(SfxBroadcaster* pBroadcaster) const; + sw::annotation::SwAnnotationWin* GetPostIt(const SwPostItField* pFld) const; + sw::annotation::SwAnnotationWin* GetPostIt(SwPostItField* pFld) const; void SetShadowState(const SwPostItField* pFld,bool bCursor = true); @@ -253,7 +270,7 @@ class SwPostItMgr: public SfxListener Color GetColorAnkor(sal_uInt16 aAuthorIndex); bool ShowPreview(const SwField* pFld,SwFmtFld*& pFmtFld) const; - + void RegisterAnswer(OutlinerParaObject* pAnswer) { mpAnswer = pAnswer;} OutlinerParaObject* IsAnswer() {return mpAnswer;} void CheckMetaText(); diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx new file mode 100644 index 0000000000..bb80d82150 --- /dev/null +++ b/sw/inc/SidebarWin.hxx @@ -0,0 +1,269 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SIDEBARWIN_HXX +#define _SIDEBARWIN_HXX + +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include + +class SwPostItMgr; +class SwPostItField; +class SwFmtFld; +class OutlinerView; +class Outliner; +class ScrollBar; +class SwEditWin; +class SwView; +class Edit; +class MenuButton; +//class SwRedline; +class OutlinerParaObject; + +namespace sw { namespace sidebarwindows { + +class SidebarTxtControl; +class AnchorOverlayObject; +class ShadowOverlayObject; + +typedef sal_Int64 SwPostItBits; + +#define PB_Preview ((SwPostItBits)0x00000001) + + +class SwSidebarWin : public Window +{ + public: + SwSidebarWin( SwEditWin& rEditWin, + WinBits nBits, + SwPostItMgr& aMgr, + SwPostItBits aBits ); + virtual ~SwSidebarWin(); + + void SetSize( const Size& rNewSize ); + void SetPosSizePixelRect( long nX, + long nY, + long nWidth, + long nHeight, + const SwRect &aRect, + const long PageBorder); + void SetPosAndSize(); + void TranslateTopPosition(const long aAmount); + virtual void CheckMetaText(); + + inline Point GetAnchorPos() { return mAnchorRect.Pos(); } + SwEditWin* EditWin(); + + inline OutlinerView* GetOutlinerView() { return mpOutlinerView;} + bool HasScrollbar() const; + bool IsScrollbarVisible() const; + inline ScrollBar* Scrollbar() { return mpVScrollbar; } + inline ::sw::sidebarwindows::AnchorOverlayObject* Anchor() { return mpAnchor;} + inline ::sw::sidebarwindows::ShadowOverlayObject* Shadow() { return mpShadow;} + + long GetPostItTextHeight(); + + void SwitchToPostIt(USHORT aDirection); + virtual void SwitchToFieldPos(); + + virtual sal_uInt32 MoveCaret() = 0; + + virtual void UpdateData() = 0; + virtual void SetPostItText() = 0; + virtual void Delete(); + virtual void GotoPos() = 0; + + virtual String GetAuthor() = 0; + virtual Date GetDate() = 0; + virtual Time GetTime() = 0; + + void ExecuteCommand(USHORT nSlot); + void InitControls(); + void HidePostIt(); + void DoResize(); + void ResizeIfNeccessary(long aOldHeight, long aNewHeight); + void SetScrollbar(); + + void SetVirtualPosSize( const Point& aPoint, const Size& aSize); + const Point VirtualPos() { return mPosSize.TopLeft(); } + const Size VirtualSize() { return mPosSize.GetSize(); } + + void ShowAnchorOnly(const Point &aPoint); + void ShowNote(); + void HideNote(); + + void ResetAttributes(); + + void SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSidebarPosition); + void SetReadonly(BOOL bSet); + BOOL IsReadOnly() { return mbReadonly;} + bool IsPreview() { return nFlags & PB_Preview;} + + void SetColor(Color aColorDark,Color aColorLight, Color aColorAnchor); + Color ColorAnchor() { return mColorAnchor; } + Color ColorDark() { return mColorDark; } + Color ColorLight() { return mColorLight; } + void Rescale(); + + void SetViewState(::sw::sidebarwindows::ViewState bViewState); + + bool IsFollow() { return mbIsFollow; } + void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow; }; + virtual bool CalcFollow() = 0; + + + sal_Int32 GetMetaHeight(); + sal_Int32 GetMinimumSizeWithMeta(); + sal_Int32 GetMinimumSizeWithoutMeta(); + sal_Int32 GetMetaButtonAreaWidth(); + sal_Int32 GetScrollbarWidth(); + + void SetSpellChecking(); + + void ToggleInsMode(); + + virtual void ActivatePostIt(); + virtual void DeactivatePostIt(); + + void SetChangeTracking( const SwPostItHelper::SwLayoutStatus aStatus, + const Color& aColor); + SwPostItHelper::SwLayoutStatus GetLayoutStatus() { return mLayoutStatus; } + Color GetChangeColor() { return mChangeColor; } + + virtual bool IsProtected() {return mbReadonly;}; + + DECL_LINK( WindowEventListener, VclSimpleEvent* ); + inline const bool IsMouseOverSidebarWin() const { return mbMouseOver; } + + void SetLanguage(const SvxLanguageItem aNewItem); + + protected: + virtual void DataChanged( const DataChangedEvent& aEvent); + virtual void LoseFocus(); + virtual void Paint( const Rectangle& rRect); + virtual void GetFocus(); + virtual MenuButton* CreateMenuButton() = 0; + + void SetSizePixel( const Size& rNewSize ); + SfxItemSet DefaultItem(); + + DECL_LINK(ModifyHdl, void*); + DECL_LINK(ScrollHdl, ScrollBar*); + DECL_LINK(DeleteHdl, void*); + + inline SwView& DocView() { return mrView;} + inline SwPostItMgr& Mgr() { return mrMgr; } + inline Outliner* Engine() { return mpOutliner;} + + private: + SwSidebarWin* GetTopReplyNote(); + + virtual SvxLanguageItem GetLanguage(void); + + SwPostItMgr& mrMgr; + SwView& mrView; + const SwPostItBits nFlags; + + ULONG mnEventId; + + OutlinerView* mpOutlinerView; + Outliner* mpOutliner; + + sw::sidebarwindows::SidebarTxtControl* mpSidebarTxtControl; + ScrollBar* mpVScrollbar; + Edit* mpMetadataAuthor; + Edit* mpMetadataDate; + MenuButton* mpMenuButton; + + sw::sidebarwindows::AnchorOverlayObject* mpAnchor; + sw::sidebarwindows::ShadowOverlayObject* mpShadow; + + Color mColorAnchor; + Color mColorDark; + Color mColorLight; + Color mChangeColor; + + sw::sidebarwindows::SidebarPosition meSidebarPosition; + + Rectangle mPosSize; + SwRect mAnchorRect; + long mPageBorder; + + bool mbMouseOver; + SwPostItHelper::SwLayoutStatus mLayoutStatus; + + bool mbReadonly; + bool mbIsFollow; +}; + +} } // eof namespace sw::sidebarwindows + + +// implementation for change tracking comments, fully functional, but not yet used +/* +class SwRedComment : public SwSidebarWin +{ + private: + SwRedline* pRedline; + + protected: + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + public: + SwRedComment( Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits,SwRedline* pRed); + virtual ~SwRedComment() {}; + + virtual void UpdateData(); + virtual void SetPostItText(); + virtual void Delete(); + virtual void GotoPos(); + virtual void SetPopup(); + virtual void ActivatePostIt(); + virtual void DeactivatePostIt(); + + virtual String GetAuthor(); + virtual Date GetDate(); + virtual Time GetTime(); + + virtual bool IsProtected(); +}; +*/ + +#endif diff --git a/sw/inc/SidebarWindowsTypes.hxx b/sw/inc/SidebarWindowsTypes.hxx new file mode 100644 index 0000000000..8b86f87edf --- /dev/null +++ b/sw/inc/SidebarWindowsTypes.hxx @@ -0,0 +1,53 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SIDEBARWINDOWSTYPES_HXX +#define _SIDEBARWINDOWSTYPES_HXX + +namespace sw { namespace sidebarwindows { + +enum ViewState +{ + VS_NORMAL, + VS_VIEW, + VS_EDIT +}; + +enum SidebarPosition +{ + SIDEBAR_LEFT, // sidebar on left side + SIDEBAR_RIGHT, // sidebar on right side + SIDEBAR_NONE // sidebar on neither side +}; + +} } // end of namespace sw::sidebarwindows + +#endif diff --git a/sw/inc/postit.hxx b/sw/inc/postit.hxx deleted file mode 100644 index ddc75cc6e6..0000000000 --- a/sw/inc/postit.hxx +++ /dev/null @@ -1,417 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: postit.hxx,v $ - * - * $Revision: 1.8.84.7 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _POSTIT_HXX -#define _POSTIT_HXX - -#include - -#include -#include -#include - -#include -#include - -#include -#include -#include - -class SwPostItMgr; -class SwPostItField; -class SwFmtFld; -class OutlinerView; -class Outliner; -class ScrollBar; -class SwEditWin; -class SwView; -class SwPostIt; -class Edit; -class MultiLineEdit; -class PopupMenu; -class SvxLanguageItem; -class SwRedline; -class OutlinerParaObject; - -#define ANKORLINE_WIDTH 1 - -enum AnkorState {AS_ALL, AS_START, AS_END,AS_TRI}; - -class SwPostItAnkor: public sdr::overlay::OverlayObjectWithBasePosition -{ - protected: - /* 6------------7 - 1 / - /4\ ---------------5 - 2 - 3 - */ - - basegfx::B2DPoint maSecondPosition; - basegfx::B2DPoint maThirdPosition; - basegfx::B2DPoint maFourthPosition; - basegfx::B2DPoint maFifthPosition; - basegfx::B2DPoint maSixthPosition; - basegfx::B2DPoint maSeventhPosition; - - // helpers to fill and reset geometry - void implEnsureGeometry(); - void implResetGeometry(); - - // geometry creation for OverlayObject - virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); - - private: - // object's geometry - basegfx::B2DPolygon maTriangle; - basegfx::B2DPolygon maLine; - basegfx::B2DPolygon maLineTop; - unsigned long mHeight; - AnkorState mAnkorState; - - // bitfield - unsigned mbShadowedEffect : 1; - unsigned mbLineSolid : 1; - - public: - SwPostItAnkor(const basegfx::B2DPoint& rBasePos, - const basegfx::B2DPoint& rSecondPos, - const basegfx::B2DPoint& rThirdPos, - const basegfx::B2DPoint& rFourthPos, - const basegfx::B2DPoint& rFifthPos, - const basegfx::B2DPoint& rSixthPos, - const basegfx::B2DPoint& rSeventhPos, - Color aBaseColor, - bool bShadowedEffect, - bool bLineSolid); - virtual ~SwPostItAnkor(); - - const basegfx::B2DPoint& GetSecondPosition() const { return maSecondPosition; } - const basegfx::B2DPoint& GetThirdPosition() const { return maThirdPosition; } - const basegfx::B2DPoint& GetFourthPosition() const { return maFourthPosition; } - const basegfx::B2DPoint& GetFifthPosition() const { return maFifthPosition; } - const basegfx::B2DPoint& GetSixthPosition() const { return maSixthPosition; } - const basegfx::B2DPoint& GetSeventhPosition() const { return maSeventhPosition; } - - void SetAllPosition(const basegfx::B2DPoint& rPoint1, const basegfx::B2DPoint& rPoint2, const basegfx::B2DPoint& rPoint3, - const basegfx::B2DPoint& rPoint4, const basegfx::B2DPoint& rPoint5, const basegfx::B2DPoint& rPoint6, const basegfx::B2DPoint& rPoint7); - void SetTriPosition(const basegfx::B2DPoint& rPoint1,const basegfx::B2DPoint& rPoint2,const basegfx::B2DPoint& rPoint3, - const basegfx::B2DPoint& rPoint4,const basegfx::B2DPoint& rPoint5); - void SetSixthPosition(const basegfx::B2DPoint& rNew); - void SetSeventhPosition(const basegfx::B2DPoint& rNew); - - bool getLineSolid() const { return mbLineSolid; } - void setLineSolid(bool bNew); - - void SetHeight(const unsigned long aHeight) {mHeight = aHeight;}; - - bool getShadowedEffect() const { return mbShadowedEffect; } - - void SetAnkorState(AnkorState aState); - AnkorState GetAnkorState() const {return mAnkorState;} -}; - -enum ShadowState {SS_NORMAL, SS_VIEW, SS_EDIT}; - -class SwPostItShadow: public sdr::overlay::OverlayObjectWithBasePosition -{ - protected: - // geometry creation for OverlayObject - virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); - - private: - basegfx::B2DPoint maSecondPosition; - ShadowState mShadowState; - - public: - SwPostItShadow(const basegfx::B2DPoint& rBasePos, const basegfx::B2DPoint& rSecondPosition, Color aBaseColor,ShadowState aState); - virtual ~SwPostItShadow(); - - void SetShadowState(ShadowState aState); - ShadowState GetShadowState() {return mShadowState;} - - const basegfx::B2DPoint& GetSecondPosition() const { return maSecondPosition; } - void SetSecondPosition(const basegfx::B2DPoint& rNew); - void SetPosition(const basegfx::B2DPoint& rPoint1,const basegfx::B2DPoint& rPoint2); -}; - -class PostItTxt : public Window -{ - private: - OutlinerView* mpOutlinerView; - SwMarginWin* mpMarginWin; - - bool mMouseOver; - BOOL mbShowPopup; - - protected: - virtual void Paint( const Rectangle& rRect); - virtual void KeyInput( const KeyEvent& rKeyEvt ); - virtual void MouseMove( const MouseEvent& rMEvt ); - virtual void MouseButtonDown( const MouseEvent& rMEvt ); - virtual void MouseButtonUp( const MouseEvent& rMEvt ); - virtual void Command( const CommandEvent& rCEvt ); - virtual void DataChanged( const DataChangedEvent& aData); - virtual void LoseFocus(); - virtual void RequestHelp(const HelpEvent &rEvt); - virtual XubString GetSurroundingText() const; - virtual Selection GetSurroundingTextSelection() const; - - DECL_LINK( Select, Menu* ); - - public: - PostItTxt(Window* pParent, WinBits nBits); - ~PostItTxt(); - - virtual void GetFocus(); - void SetTextView( OutlinerView* aEditView ) { mpOutlinerView = aEditView; } - - DECL_LINK( WindowEventListener, VclSimpleEvent* ); - DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*); -}; - -typedef sal_Int64 SwPostItBits; - -#define PB_Preview ((SwPostItBits)0x00000001) - - -class SwMarginWin : public Window -{ - private: - ULONG mnEventId; - SwView* mpView; - sdr::overlay::OverlayManager* pOverlayManager; - OutlinerView* mpOutlinerView; - Outliner* mpOutliner; - PostItTxt* mpPostItTxt; - MultiLineEdit* mpMeta; - ScrollBar* mpVScrollbar; - SwPostItAnkor* mpAnkor; - SwPostItShadow* mpShadow; - SwPostItMgr* mpMgr; - bool mbMeta; - Color mColorAnkor; - Color mColorDark; - Color mColorLight; - basegfx::B2DPolygon aPopupTriangle; - bool mbMarginSide; - Rectangle mPosSize; - SwRect mAnkorRect; - long mPageBorder; - SwPostItBits nFlags; - bool mbMouseOverButton; - - protected: - bool mbReadonly; - PopupMenu* mpButtonPopup; - bool mbIsFollow; - Rectangle mRectMetaButton; - virtual void DataChanged( const DataChangedEvent& aEvent); - virtual void LoseFocus(); - virtual void MouseButtonDown( const MouseEvent& rMEvt ); - virtual void MouseMove( const MouseEvent& rMEvt ); - virtual void Paint( const Rectangle& rRect); - virtual void GetFocus(); - - void SetSizePixel( const Size& rNewSize ); - SfxItemSet DefaultItem(); - - DECL_LINK(ModifyHdl, void*); - DECL_LINK(ScrollHdl, ScrollBar*); - DECL_LINK(DeleteHdl, void*); - - public: - TYPEINFO(); - SwMarginWin( Window* pParent, WinBits nBits, SwPostItMgr* aMgr,SwPostItBits aBits); - virtual ~SwMarginWin(); - - void SetSize( const Size& rNewSize ); - void SetPosSizePixelRect( long nX, long nY,long nWidth, long nHeight,const SwRect &aRect,const long PageBorder); - void SetPosAndSize(); - void TranslateTopPosition(const long aAmount); - virtual void CheckMetaText(); - - PostItTxt* PostItText() { return mpPostItTxt;} - ScrollBar* Scrollbar() { return mpVScrollbar;} - SwPostItAnkor* Ankor() { return mpAnkor;} - SwPostItShadow* Shadow() { return mpShadow;} - OutlinerView* View() { return mpOutlinerView;} - SwView* DocView() { return mpView;} - Outliner* Engine() { return mpOutliner;} - SwPostItMgr* Mgr() { return mpMgr; } - - SwRect GetAnkorRect() { return mAnkorRect; } - SwEditWin* EditWin(); - - long GetPostItTextHeight(); - - void SwitchToPostIt(USHORT aDirection); - //void SwitchToPostIt(bool aDirection); - virtual void SwitchToFieldPos(); - virtual sal_uInt32 MoveCaret() { return 0;}; - - virtual void UpdateData() = 0; - virtual void SetPostItText() = 0; - virtual void Delete(); - virtual void GotoPos() = 0; - virtual void SetPopup() = 0; - - virtual String GetAuthor(); - virtual Date GetDate(); - virtual Time GetTime(); - - void ExecuteCommand(USHORT nSlot); - void InitControls(); - void HidePostIt(); - void DoResize(); - void ResizeIfNeccessary(long aOldHeight, long aNewHeight); - void SetScrollbar(); - - void SetVirtualPosSize( const Point& aPoint, const Size& aSize); - const Point VirtualPos() { return mPosSize.TopLeft(); } - const Size VirtualSize() { return mPosSize.GetSize(); } - - void ShowAnkorOnly(const Point &aPoint); - void ShowNote(); - void HideNote(); - - void ResetAttributes(); - - void SetMarginSide(bool aMarginSide); - void SetReadonly(BOOL bSet); - BOOL IsReadOnly() { return mbReadonly;} - bool IsPreview() { return nFlags & PB_Preview;} - - void SetLanguage(const SvxLanguageItem aNewItem); - virtual SvxLanguageItem GetLanguage(void); - - void SetColor(Color aColorDark,Color aColorLight, Color aColorAnkor); - Color ColorDark() { return mColorDark; } - Color ColorLight() { return mColorLight; } - void Rescale(); - - void SetViewState(ShadowState bState); - - bool IsFollow() { return mbIsFollow; } - void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow;}; - virtual bool CalcFollow(); - - SwMarginWin* GetTopReplyNote(); - bool IsAnyStackParentVisible(); - - sal_Int32 GetMetaHeight(); - sal_Int32 GetMinimumSizeWithMeta(); - sal_Int32 GetMinimumSizeWithoutMeta(); - sal_Int32 GetMetaButtonAreaWidth(); - sal_Int32 GetScrollbarWidth(); - - void SetSpellChecking(); - - void ToggleInsMode(); - - virtual void ActivatePostIt(); - virtual void DeactivatePostIt(); - - virtual SwPostItHelper::SwLayoutStatus GetStatus() { return SwPostItHelper::NONE; } - - virtual bool IsProtected() {return mbReadonly;}; -}; - -// implementation for change tracking comments, fully functional, but not yet used -/* -class SwRedComment : public SwMarginWin -{ - private: - SwRedline* pRedline; - - protected: - virtual void MouseButtonDown( const MouseEvent& rMEvt ); - public: - TYPEINFO(); - SwRedComment( Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits,SwRedline* pRed); - virtual ~SwRedComment() {}; - - virtual void UpdateData(); - virtual void SetPostItText(); - virtual void Delete(); - virtual void GotoPos(); - virtual void SetPopup(); - virtual void ActivatePostIt(); - virtual void DeactivatePostIt(); - - virtual String GetAuthor(); - virtual Date GetDate(); - virtual Time GetTime(); - - virtual bool IsProtected(); -}; -*/ -class SwPostIt : public SwMarginWin -{ - private: - SwFmtFld* mpFmtFld; - SwPostItField* mpFld; - SwPostItHelper::SwLayoutStatus mStatus; - Color mChangeColor; - - protected: - virtual void MouseButtonDown( const MouseEvent& rMEvt ); - - public: - TYPEINFO(); - SwPostIt( Window* pParent, WinBits nBits,SwFmtFld* aField,SwPostItMgr* aMgr,SwPostItBits aBits); - virtual ~SwPostIt() {}; - - virtual void UpdateData(); - virtual void SetPostItText(); - virtual void Delete(); - virtual void GotoPos(); - virtual void SetPopup(); - - virtual String GetAuthor(); - virtual Date GetDate(); - virtual Time GetTime(); - - virtual sal_uInt32 MoveCaret(); - - void SetChangeTracking(SwPostItHelper::SwLayoutStatus& aStatus,Color aColor); - virtual SwPostItHelper::SwLayoutStatus GetStatus() { return mStatus; } - Color GetChangeColor() { return mChangeColor; } - - sal_uInt32 CountFollowing(); - virtual bool CalcFollow(); - void InitAnswer(OutlinerParaObject* pText); - - virtual SvxLanguageItem GetLanguage(void); - - virtual bool IsProtected(); -}; - -#endif diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index 992377ceb2..56ebe94228 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,13 +36,17 @@ #include #include #include +#include class SwTxtFld; class SwRootFrm; class SwPostIt; class String; -class SwMarginWin; class SwPostItMgr; +class SwEditWin; +namespace sw { namespace sidebarwindows { + class SwSidebarWin; +} } struct SwPosition; @@ -54,7 +58,7 @@ struct SwLayoutInfo SwRect mPageFrame; SwRect mPagePrtArea; unsigned long mnPageNumber; - bool mbMarginSide; + sw::sidebarwindows::SidebarPosition meSidebarPosition; USHORT mRedlineAuthor; }; @@ -72,71 +76,82 @@ namespace SwPostItHelper unsigned long getPageInfo( SwRect& rPageFrm, const SwRootFrm* , const Point& ); } -class SwMarginItem +class SwSidebarItem { public: - SwMarginWin* pPostIt; + sw::sidebarwindows::SwSidebarWin* pPostIt; bool bShow; bool bFocus; - bool bMarginSide; + sw::sidebarwindows::SidebarPosition meSidebarPosition; SwRect mPos; SwRect mFramePos; SwRect mPagePos; unsigned long mnPageNumber; SwPostItHelper::SwLayoutStatus mLayoutStatus; USHORT mRedlineAuthor; - SwMarginItem(bool aShow, bool aFocus) + SwSidebarItem( const bool aShow, + const bool aFocus) : pPostIt(0), bShow(aShow), bFocus(aFocus), - bMarginSide(false), + meSidebarPosition(sw::sidebarwindows::SIDEBAR_NONE), mnPageNumber(1), mLayoutStatus( SwPostItHelper::INVISIBLE ), mRedlineAuthor(0) {} - virtual ~SwMarginItem(){} + virtual ~SwSidebarItem(){} virtual SwPosition GetPosition() = 0; virtual bool UseElement() = 0; virtual SwFmtFld* GetFmtFld() = 0; virtual SfxBroadcaster* GetBroadCaster() const = 0; - virtual SwMarginWin* GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits) = 0; + virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin, + WinBits nBits, + SwPostItMgr& aMgr, + SwPostItBits aBits) = 0; }; /* -class SwRedCommentItem: public SwMarginItem +class SwRedCommentItem: public SwSidebarItem { private: SwRedline* pRedline; public: - SwRedCommentItem( SwRedline* pRed, bool aShow, bool aFocus) - : SwMarginItem(aShow,aFocus), + SwRedCommentItem( SwRedline* pRed, bool aShow, bool aFocus) + : SwSidebarItem(aShow,aFocus), pRedline(pRed) {} virtual ~SwRedCommentItem() {} virtual SwPosition GetPosition(); virtual bool UseElement(); virtual SwFmtFld* GetFmtFld() {return 0; } virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast (pRedline); } - virtual SwMarginWin* GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits); + virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin, + WinBits nBits, + SwPostItMgr& aMgr, + SwPostItBits aBits); }; */ -class SwPostItItem: public SwMarginItem +class SwAnnotationItem: public SwSidebarItem { private: SwFmtFld* pFmtFld; public: - SwPostItItem( SwFmtFld* p, bool aShow, bool aFocus) - : SwMarginItem(aShow,aFocus) , - pFmtFld(p) - { - } - virtual ~SwPostItItem() {} + SwAnnotationItem( SwFmtFld* p, + const bool aShow, + const bool aFocus) + : SwSidebarItem( aShow, aFocus ) + , pFmtFld(p) + {} + virtual ~SwAnnotationItem() {} virtual SwPosition GetPosition(); virtual bool UseElement(); virtual SwFmtFld* GetFmtFld() {return pFmtFld;} virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast (pFmtFld); } - virtual SwMarginWin* GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits); + virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin, + WinBits nBits, + SwPostItMgr& aMgr, + SwPostItBits aBits); }; #endif // _POSTITHELPER_HXX diff --git a/sw/inc/rcid.hrc b/sw/inc/rcid.hrc index a4613da4c6..54b8960b13 100644 --- a/sw/inc/rcid.hrc +++ b/sw/inc/rcid.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -81,6 +81,7 @@ #define RC_UNDO (RC_BASE + 3750) #define RC_SMARTTAG (RC_BASE + 3950) // SMARTTAGS #define RC_UNOCORE (RC_BASE + 4050) +#define RC_ANNOTATION (RC_BASE + 4150) /*-------------------------------------------------------------------- Beschreibung: Bereiche ausspannen @@ -90,8 +91,6 @@ #define RC_APP_BEGIN RC_APP #define RC_APP_END (RC_APP_BEGIN + 199) - - // Dialog-Verzeichnis #define RC_DIALOG_BEGIN RC_DIALOG #define RC_DIALOG_END (RC_DIALOG_BEGIN + 99) @@ -100,6 +99,10 @@ #define RC_DOCVW_BEGIN RC_DOCVW #define RC_DOCVW_END (RC_DOCVW_BEGIN + 99) +// Annotation +#define RC_ANNOTATION_BEGIN RC_ANNOTATION +#define RC_ANNOTATION_END (RC_ANNOTATION_BEGIN + 99) + // SW/Web #define RC_WEB_BEGIN RC_WEB #define RC_WEB_END (RC_WEB_BEGIN + 199) diff --git a/sw/inc/sw_primitivetypes2d.hxx b/sw/inc/sw_primitivetypes2d.hxx index 44541fc91e..8648165d25 100644 --- a/sw/inc/sw_primitivetypes2d.hxx +++ b/sw/inc/sw_primitivetypes2d.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,9 +38,9 @@ ////////////////////////////////////////////////////////////////////////////// -#define PRIMITIVE2D_ID_SWVIRTFLYDRAWOBJPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SW| 0) -#define PRIMITIVE2D_ID_SWPOSTITANKORPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 1) -#define PRIMITIVE2D_ID_SWPOSTITSHADOWPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 2) +#define PRIMITIVE2D_ID_SWVIRTFLYDRAWOBJPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SW| 0) +#define PRIMITIVE2D_ID_SWSIDEBARANCHORPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 1) +#define PRIMITIVE2D_ID_SWSIDEBARSHADOWPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 2) ////////////////////////////////////////////////////////////////////////////// diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index ab93dee334..ab8c5a606e 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -51,7 +51,6 @@ #include #include -/*testarea*/ #include #include #include @@ -90,7 +89,7 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart, STRING_LEN; if ( bNewSoftHyphen ) - nSoftHyphen = bRemoveSoftHyphen ? + nSoftHyphen = bRemoveSoftHyphen ? rNd.GetTxt().Search( CHAR_SOFTHYPHEN, nSoftHyphen ) : STRING_LEN; @@ -205,7 +204,7 @@ xub_StrLen GetPostIt(xub_StrLen aCount,const SwpHints *pHts) { aIndex++; const SwTxtAttr* pTxtAttr = (*pHts)[i]; - if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) && + if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) && (pTxtAttr->GetFld().GetFld()->Which()==RES_POSTITFLD)) { aCount--; @@ -218,12 +217,12 @@ xub_StrLen GetPostIt(xub_StrLen aCount,const SwpHints *pHts) for (xub_StrLen i = aIndex; i Count();i++) { const SwTxtAttr* pTxtAttr = (*pHts)[i]; - if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) && + if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) && (pTxtAttr->GetFld().GetFld()->Which()==RES_POSTITFLD)) break; else aIndex++; - } + } return aIndex; } @@ -308,12 +307,12 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te nEnde = nStart; nStart = swap; } - + for (xub_StrLen i = 0; i Count();i++) { xub_StrLen aPos = *(*pHts)[i]->GetStart(); const SwTxtAttr* pTxtAttr = (*pHts)[i]; - if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) && + if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) && (pTxtAttr->GetFld().GetFld()->Which()==RES_POSTITFLD)) { if ( (aPos >= nStart) && (aPos <= nEnde) ) @@ -325,7 +324,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te } } } - + if (!bSrchForward) { xub_StrLen swap = nEnde; @@ -334,10 +333,10 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te } } - + xub_StrLen aStart = 0; - // do we need to finish a note? - if (POSTITMGR->GetActivePostIt()) + // do we need to finish a note? + if (POSTITMGR->HasActiveSidebarWin()) { if (bSearchInNotes) { @@ -357,7 +356,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te } else { - POSTITMGR->SetActivePostIt(0); + POSTITMGR->SetActiveSidebarWin(0); } } @@ -367,9 +366,9 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te xub_StrLen nStartInside = 0; xub_StrLen nEndeInside = 0; sal_Int16 aLoop= bSrchForward ? aStart : aNumberPostits; - + while ( (aLoop>=0) && (aLoop<=aNumberPostits)) - { + { if (bSrchForward) { nStartInside = aLoop==0 ? nStart : *(*pHts)[GetPostIt(aLoop+aIgnore-1,pHts)]->GetStart()+1; @@ -400,7 +399,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te } } } - aLoop = bSrchForward ? aLoop+1 : aLoop-1; + aLoop = bSrchForward ? aLoop+1 : aLoop-1; } } else @@ -441,8 +440,8 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt, if ( 1 == rSearchOpt.searchString.getLength() && CHAR_SOFTHYPHEN == rSearchOpt.searchString.toChar() ) bRemoveSoftHyphens = false; - } - + } + if( bSrchForward ) lcl_CleanStr( *(SwTxtNode*)pNode, nStart, nEnde, aFltArr, sCleanStr, bRemoveSoftHyphens ); @@ -596,7 +595,7 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove, SwIndex& rSttCntIdx = pCrsr->Start()->nContent; xub_StrLen nSttCnt = rSttCntIdx.GetIndex(); // damit die Region auch verschoben wird, in den Shell-Cursr-Ring - // mit aufnehmen !! + // mit aufnehmen !! Ring *pPrev(0); if( bRegExp ) { diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx index 9a4542b628..af9fa02da7 100644 --- a/sw/source/core/fields/postithelper.cxx +++ b/sw/source/core/fields/postithelper.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,7 +35,8 @@ #include #include -#include +#include + #include #include #include @@ -74,7 +75,7 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( std::vector< SwLa aInfo.mPagePrtArea = pPage->Prt(); aInfo.mPagePrtArea.Pos() += aInfo.mPageFrame.Pos(); aInfo.mnPageNumber = pPage->GetPhyPageNum(); - aInfo.mbMarginSide = pPage->MarginSide(); + aInfo.meSidebarPosition = pPage->SidebarPosition(); aInfo.mRedlineAuthor = 0; if( aRet == INVISIBLE ) @@ -145,7 +146,7 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( std::vector< SwLa return aRet; } -SwPosition SwPostItItem::GetPosition() +SwPosition SwAnnotationItem::GetPosition() { SwTxtFld* pFld = pFmtFld->GetTxtFld(); //if( pFld ) @@ -156,18 +157,22 @@ SwPosition SwPostItItem::GetPosition() SwPosition aPos( *pTNd ); aPos.nContent.Assign( pTNd, *pFld->GetStart() ); return aPos; - // } + // } //} } -bool SwPostItItem::UseElement() +bool SwAnnotationItem::UseElement() { return pFmtFld->IsFldInDoc(); } -SwMarginWin* SwPostItItem::GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits) +sw::sidebarwindows::SwSidebarWin* SwAnnotationItem::GetSidebarWindow( + SwEditWin& rEditWin, + WinBits nBits, + SwPostItMgr& aMgr, + SwPostItBits aBits) { - return new SwPostIt(pParent,nBits,pFmtFld,aMgr,aBits); + return new sw::annotation::SwAnnotationWin( rEditWin, nBits, pFmtFld, aMgr, aBits ); } /* @@ -176,7 +181,7 @@ SwPosition SwRedCommentItem::GetPosition() return *pRedline->Start(); } -SwMarginWin* SwRedCommentItem::GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits) +SwSidebarWin* SwRedCommentItem::GetSidebarWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits) { return new SwRedComment(pParent,nBits,aMgr,aBits,pRedline); } diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx index 38f0b8a723..3fc81ee440 100644 --- a/sw/source/core/inc/pagefrm.hxx +++ b/sw/source/core/inc/pagefrm.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,6 +36,8 @@ #include "ftnboss.hxx" #include +#include + class SwFlyFrm; class SwFlyFrmFmt; class SwPageDesc; @@ -386,7 +388,7 @@ public: static void GetBorderAndShadowBoundRect( const SwRect& _rPageRect, ViewShell* _pViewShell, SwRect& _orBorderAndShadowBoundRect, - bool bRightSidebar ); + const bool bRightSidebar ); static void PaintNotesSidebar(const SwRect& _rPageRect, ViewShell* _pViewShell, USHORT nPageNum, bool bRight); static void PaintNotesSidebarArrows(const Point &aMiddleFirst, const Point &aMiddleSecond, ViewShell* _pViewShell, const Color aColorUp, const Color aColorDown); @@ -396,7 +398,7 @@ public: asks the page on which side a margin should be shown, e.g for notes returns true for left side, false for right side */ - bool MarginSide() const; + sw::sidebarwindows::SidebarPosition SidebarPosition() const; virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const; @@ -538,6 +540,6 @@ inline BOOL SwPageFrm::IsInvalidFly() const #define GETGRIDWIDTH( pGrid , pDoc ) pDoc->IsSquaredPageMode() ? \ pGrid->GetBaseHeight(): pGrid->GetBaseWidth() - + #endif //_PAGEFRM_HXX diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 2718e15a6c..ea81358d5d 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1640,15 +1640,23 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect ) //mod #i6193# added sidebar width const SwPostItMgr* pPostItMgr = pImp->GetShell()->GetPostItMgr(); const int nSidebarWidth = pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ? pPostItMgr->GetSidebarWidth() + pPostItMgr->GetSidebarBorderWidth() : 0; - if (pPageFrm->MarginSide()) + switch ( pPageFrm->SidebarPosition() ) { - aPaint.Left( aPaint.Left() - nBorderWidth - nSidebarWidth); - aPaint.Right( aPaint.Right() + nBorderWidth + nShadowWidth); - } - else - { - aPaint.Left( aPaint.Left() - nBorderWidth ); - aPaint.Right( aPaint.Right() + nBorderWidth + nShadowWidth + nSidebarWidth); + case sw::sidebarwindows::SIDEBAR_LEFT: + { + aPaint.Left( aPaint.Left() - nBorderWidth - nSidebarWidth); + aPaint.Right( aPaint.Right() + nBorderWidth + nShadowWidth); + } + break; + case sw::sidebarwindows::SIDEBAR_RIGHT: + { + aPaint.Left( aPaint.Left() - nBorderWidth ); + aPaint.Right( aPaint.Right() + nBorderWidth + nShadowWidth + nSidebarWidth); + } + break; + case sw::sidebarwindows::SIDEBAR_NONE: + // nothing to do + break; } aPaint.Top( aPaint.Top() - nBorderWidth ); aPaint.Bottom( aPaint.Bottom() + nBorderWidth + nShadowWidth); diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index cf45cba307..6b06b05209 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -305,7 +305,7 @@ SwPageFrm::~SwPageFrm() pImp->GetLayAction().SetAgain(); // OD 12.02.2003 #i9719#, #105645# - retouche area of page // including border and shadow area. - const bool bRightSidebar = !MarginSide(); + const bool bRightSidebar = (SidebarPosition() == sw::sidebarwindows::SIDEBAR_RIGHT); SwRect aRetoucheRect; SwPageFrm::GetBorderAndShadowBoundRect( Frm(), pSh, aRetoucheRect, bRightSidebar ); pSh->AddPaintRect( aRetoucheRect ); @@ -660,7 +660,7 @@ void SwPageFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew, { // OD 12.02.2003 #i9719#, #105645# - consider border and shadow of // page frame for determine 'old' rectangle - it's used for invalidating. - const bool bRightSidebar = !MarginSide(); + const bool bRightSidebar = (SidebarPosition() == sw::sidebarwindows::SIDEBAR_RIGHT); SwRect aOldRectWithBorderAndShadow; SwPageFrm::GetBorderAndShadowBoundRect( aOldPageFrmRect, pSh, aOldRectWithBorderAndShadow, bRightSidebar ); pSh->InvalidateWindows( aOldRectWithBorderAndShadow ); @@ -1391,17 +1391,19 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, BOOL bFtn ) } // false = right, true = left -bool SwPageFrm::MarginSide() const +sw::sidebarwindows::SidebarPosition SwPageFrm::SidebarPosition() const { if (!GetShell() || GetShell()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE)) - return false; + return sw::sidebarwindows::SIDEBAR_NONE; else { const bool bLTR = GetUpper() ? static_cast(GetUpper())->IsLeftToRightViewLayout() : true; const bool bBookMode = GetShell()->GetViewOptions()->IsViewLayoutBookMode(); const bool bRightSidebar = bLTR ? (!bBookMode || OnRightPage()) : (bBookMode && !OnRightPage()); - return !bRightSidebar; + return bRightSidebar + ? sw::sidebarwindows::SIDEBAR_RIGHT + : sw::sidebarwindows::SIDEBAR_LEFT; } } @@ -2315,7 +2317,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi const SwTwips nCurrentPageWidth = pFormatPage->Frm().Width() + (pFormatPage->IsEmptyPage() ? 0 : nSidebarWidth); const Point aOldPagePos = pPageToAdjust->Frm().Pos(); - const bool bLeftSidebar = pPageToAdjust->MarginSide(); + const bool bLeftSidebar = pPageToAdjust->SidebarPosition() == sw::sidebarwindows::SIDEBAR_LEFT; const SwTwips nLeftPageAddOffset = bLeftSidebar ? nSidebarWidth : 0; diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 34b94415d5..9198dedbe2 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2843,7 +2843,7 @@ void SwRootFrm::Paint( const SwRect& rRect ) const // <-- { const bool bPaintRightShadow = !bBookMode || (pPage == Lower()) || (!bLTR && !pPage->OnRightPage()) || (bLTR && pPage->OnRightPage()); - const bool bRightSidebar = !pPage->MarginSide(); + const bool bRightSidebar = pPage->SidebarPosition() == sw::sidebarwindows::SIDEBAR_RIGHT; if ( !pPage->IsEmptyPage() ) { diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index c0a45fbb4e..b501f6b1dd 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1226,16 +1226,23 @@ void ViewShell::VisPortChgd( const SwRect &rRect) SwTwips nPageLeft = 0; SwTwips nPageRight = 0; - if (pPage->MarginSide()) + switch ( pPage->SidebarPosition() ) { - nPageLeft = aPageRect.Left() - nBorderWidth - nSidebarWidth; - nPageRight = aPageRect.Right() + nBorderWidth + nShadowWidth; - } - else - { - // OD 03.03.2003 #107927# - use correct datatype - nPageLeft = aPageRect.Left() - nBorderWidth; - nPageRight = aPageRect.Right() + nBorderWidth + nShadowWidth + nSidebarWidth; + case sw::sidebarwindows::SIDEBAR_LEFT: + { + nPageLeft = aPageRect.Left() - nBorderWidth - nSidebarWidth; + nPageRight = aPageRect.Right() + nBorderWidth + nShadowWidth; + } + break; + case sw::sidebarwindows::SIDEBAR_RIGHT: + { + nPageLeft = aPageRect.Left() - nBorderWidth; + nPageRight = aPageRect.Right() + nBorderWidth + nShadowWidth + nSidebarWidth; + } + break; + case sw::sidebarwindows::SIDEBAR_NONE: + // nothing to do + break; } if( nPageLeft < nMinLeft ) nMinLeft = nPageLeft; @@ -1705,7 +1712,8 @@ void ViewShell::PaintDesktop( const SwRect &rRect ) aPageRect.SSize() = rFormatPage.Frm().SSize(); } - const bool bSidebarRight = !static_cast(pPage)->MarginSide(); + const bool bSidebarRight = + static_cast(pPage)->SidebarPosition() == sw::sidebarwindows::SIDEBAR_RIGHT; aPageRect.Pos().X() -= bSidebarRight ? 0 : nSidebarWidth; aPageRect.SSize().Width() += nSidebarWidth; diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index ec29858041..f8afef875c 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -63,7 +63,6 @@ #include #include #include -//#include #include #include #include @@ -75,7 +74,6 @@ #include // fuer die aktuelle Sicht #include #include -#include #include // Verbindung zur Core #include // Dokumenterzeugung #include @@ -436,8 +434,12 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium ) pView->GetEditWin().StopQuickHelp(); //#i91811# mod if we have an active margin window, write back the text - if (pView && pView->GetPostItMgr() && pView->GetPostItMgr()->GetActivePostIt()) - pView->GetPostItMgr()->GetActivePostIt()->UpdateData(); + if ( pView && + pView->GetPostItMgr() && + pView->GetPostItMgr()->HasActiveSidebarWin() ) + { + pView->GetPostItMgr()->UpdateDataOnActiveSidebarWin(); + } if( pDoc->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) && !pDoc->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS) ) @@ -583,8 +585,12 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) pView->GetEditWin().StopQuickHelp(); //#i91811# mod if we have an active margin window, write back the text - if (pView && pView->GetPostItMgr() && pView->GetPostItMgr()->GetActivePostIt()) - pView->GetPostItMgr()->GetActivePostIt()->UpdateData(); + if ( pView && + pView->GetPostItMgr() && + pView->GetPostItMgr()->HasActiveSidebarWin() ) + { + pView->GetPostItMgr()->UpdateDataOnActiveSidebarWin(); + } ULONG nVBWarning = 0; diff --git a/sw/source/ui/docvw/AnchorOverlayObject.cxx b/sw/source/ui/docvw/AnchorOverlayObject.cxx new file mode 100644 index 0000000000..cd50236fee --- /dev/null +++ b/sw/source/ui/docvw/AnchorOverlayObject.cxx @@ -0,0 +1,467 @@ +/************************************************************************* * + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: postit.cxx,v $ + * $Revision: 1.8.42.11 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#include "precompiled_sw.hxx" + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace sw { namespace sidebarwindows { + +////////////////////////////////////////////////////////////////////////////// +// helper class: Primitive for discrete visualisation + +class AnchorPrimitive : public drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D +{ +private: + basegfx::B2DPolygon maTriangle; + basegfx::B2DPolygon maLine; + basegfx::B2DPolygon maLineTop; + const AnchorState maAnchorState; + basegfx::BColor maColor; + + // discrete line width + double mfLogicLineWidth; + + // bitfield + bool mbShadow : 1; + bool mbLineSolid : 1; + +protected: + virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition( + const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + +public: + AnchorPrimitive( const basegfx::B2DPolygon& rTriangle, + const basegfx::B2DPolygon& rLine, + const basegfx::B2DPolygon& rLineTop, + AnchorState aAnchorState, + const basegfx::BColor& rColor, + double fLogicLineWidth, + bool bShadow, + bool bLineSolid ) + : drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D(), + maTriangle(rTriangle), + maLine(rLine), + maLineTop(rLineTop), + maAnchorState(aAnchorState), + maColor(rColor), + mfLogicLineWidth(fLogicLineWidth), + mbShadow(bShadow), + mbLineSolid(bLineSolid) + {} + + // data access + const basegfx::B2DPolygon& getTriangle() const { return maTriangle; } + const basegfx::B2DPolygon& getLine() const { return maLine; } + const basegfx::B2DPolygon& getLineTop() const { return maLineTop; } + const AnchorState getAnchorState() const { return maAnchorState; } + const basegfx::BColor& getColor() const { return maColor; } + double getLogicLineWidth() const { return mfLogicLineWidth; } + bool getShadow() const { return mbShadow; } + bool getLineSolid() const { return mbLineSolid; } + + virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const; + + DeclPrimitrive2DIDBlock() +}; + +drawinglayer::primitive2d::Primitive2DSequence AnchorPrimitive::createLocalDecomposition( + const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) const +{ + drawinglayer::primitive2d::Primitive2DSequence aRetval; + + if ( AS_TRI == maAnchorState || + AS_ALL == maAnchorState || + AS_START == maAnchorState ) + { + // create triangle + const drawinglayer::primitive2d::Primitive2DReference aTriangle( + new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( + basegfx::B2DPolyPolygon(getTriangle()), + getColor())); + + drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aTriangle); + } + + if ( AS_ALL == maAnchorState || + AS_START == maAnchorState ) + { + // create line start + const drawinglayer::attribute::LineAttribute aLineAttribute( + getColor(), + getLogicLineWidth() / (basegfx::fTools::equalZero(getDiscreteUnit()) ? 1.0 : getDiscreteUnit())); + + if(getLineSolid()) + { + const drawinglayer::primitive2d::Primitive2DReference aSolidLine( + new drawinglayer::primitive2d::PolygonStrokePrimitive2D( + getLine(), + aLineAttribute)); + + drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aSolidLine); + } + else + { + ::std::vector< double > aDotDashArray; + const double fDistance(3.0 * 15.0); + const double fDashLen(5.0 * 15.0); + + aDotDashArray.push_back(fDashLen); + aDotDashArray.push_back(fDistance); + + const drawinglayer::attribute::StrokeAttribute aStrokeAttribute( + aDotDashArray, + fDistance + fDashLen); + + const drawinglayer::primitive2d::Primitive2DReference aStrokedLine( + new drawinglayer::primitive2d::PolygonStrokePrimitive2D( + getLine(), + aLineAttribute, + aStrokeAttribute)); + + drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aStrokedLine); + } + } + + if(aRetval.hasElements() && getShadow()) + { + // shadow is only for triangle and line start, and in upper left + // and lower right direction, in different colors + const double fColorChange(20.0 / 255.0); + const basegfx::B3DTuple aColorChange(fColorChange, fColorChange, fColorChange); + basegfx::BColor aLighterColor(getColor() + aColorChange); + basegfx::BColor aDarkerColor(getColor() - aColorChange); + + aLighterColor.clamp(); + aDarkerColor.clamp(); + + // create shadow sequence + drawinglayer::primitive2d::Primitive2DSequence aShadows(2); + basegfx::B2DHomMatrix aTransform; + + aTransform.set(0, 2, -getDiscreteUnit()); + aTransform.set(1, 2, -getDiscreteUnit()); + + aShadows[0] = drawinglayer::primitive2d::Primitive2DReference( + new drawinglayer::primitive2d::ShadowPrimitive2D( + aTransform, + aLighterColor, + aRetval)); + + aTransform.set(0, 2, getDiscreteUnit()); + aTransform.set(1, 2, getDiscreteUnit()); + + aShadows[1] = drawinglayer::primitive2d::Primitive2DReference( + new drawinglayer::primitive2d::ShadowPrimitive2D( + aTransform, + aDarkerColor, + aRetval)); + + // add shadow before geometry to make it be proccessed first + const drawinglayer::primitive2d::Primitive2DSequence aTemporary(aRetval); + + aRetval = aShadows; + drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(aRetval, aTemporary); + } + + if ( AS_ALL == maAnchorState || + AS_END == maAnchorState ) + { + // LineTop has to be created, too, but uses no shadow, so add after + // the other parts are created + const drawinglayer::attribute::LineAttribute aLineAttribute( + getColor(), + getLogicLineWidth() / (basegfx::fTools::equalZero(getDiscreteUnit()) ? 1.0 : getDiscreteUnit())); + + const drawinglayer::primitive2d::Primitive2DReference aLineTop( + new drawinglayer::primitive2d::PolygonStrokePrimitive2D( + getLineTop(), + aLineAttribute)); + + drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aLineTop); + } + + return aRetval; +} + +bool AnchorPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const +{ + if(drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::operator==(rPrimitive)) + { + const AnchorPrimitive& rCompare = static_cast< const AnchorPrimitive& >(rPrimitive); + + return (getTriangle() == rCompare.getTriangle() + && getLine() == rCompare.getLine() + && getLineTop() == rCompare.getLineTop() + && getAnchorState() == rCompare.getAnchorState() + && getColor() == rCompare.getColor() + && getLogicLineWidth() == rCompare.getLogicLineWidth() + && getShadow() == rCompare.getShadow() + && getLineSolid() == rCompare.getLineSolid()); + } + + return false; +} + +ImplPrimitrive2DIDBlock(AnchorPrimitive, PRIMITIVE2D_ID_SWSIDEBARANCHORPRIMITIVE) + +/****** AnchorOverlayObject ***********************************************************/ +/*static*/ AnchorOverlayObject* AnchorOverlayObject::CreateAnchorOverlayObject( + SwView& rDocView, + const SwRect& aAnchorRect, + const long& aPageBorder, + const Point& aLineStart, + const Point& aLineEnd, + const Color& aColorAnchor ) +{ + AnchorOverlayObject* pAnchorOverlayObject( 0 ); + if ( rDocView.GetDrawView() ) + { + SdrPaintWindow* pPaintWindow = rDocView.GetDrawView()->GetPaintWindow(0); + if( pPaintWindow ) + { + sdr::overlay::OverlayManager* pOverlayManager = pPaintWindow->GetOverlayManager(); + + if ( pOverlayManager ) + { + pAnchorOverlayObject = new AnchorOverlayObject( + basegfx::B2DPoint( aAnchorRect.Left() , aAnchorRect.Bottom()-5*15), + basegfx::B2DPoint( aAnchorRect.Left()-5*15 , aAnchorRect.Bottom()+5*15), + basegfx::B2DPoint( aAnchorRect.Left()+5*15 , aAnchorRect.Bottom()+5*15), + basegfx::B2DPoint( aAnchorRect.Left(), aAnchorRect.Bottom()+2*15), + basegfx::B2DPoint( aPageBorder ,aAnchorRect.Bottom()+2*15), + basegfx::B2DPoint( aLineStart.X(),aLineStart.Y()), + basegfx::B2DPoint( aLineEnd.X(),aLineEnd.Y()) , + aColorAnchor, + false, + false); + pOverlayManager->add(*pAnchorOverlayObject); + } + } + } + + return pAnchorOverlayObject; +} + +/*static*/ void AnchorOverlayObject::DestroyAnchorOverlayObject( AnchorOverlayObject* pAnchor ) +{ + if ( pAnchor ) + { + if ( pAnchor->getOverlayManager() ) + { + // remove this object from the chain + pAnchor->getOverlayManager()->remove(*pAnchor); + } + delete pAnchor; + } +} + +AnchorOverlayObject::AnchorOverlayObject( const basegfx::B2DPoint& rBasePos, + const basegfx::B2DPoint& rSecondPos, + const basegfx::B2DPoint& rThirdPos, + const basegfx::B2DPoint& rFourthPos, + const basegfx::B2DPoint& rFifthPos, + const basegfx::B2DPoint& rSixthPos, + const basegfx::B2DPoint& rSeventhPos, + const Color aBaseColor, + const bool bShadowedEffect, + const bool bLineSolid) + : OverlayObjectWithBasePosition( rBasePos, aBaseColor ) + , maSecondPosition(rSecondPos) + , maThirdPosition(rThirdPos) + , maFourthPosition(rFourthPos) + , maFifthPosition(rFifthPos) + , maSixthPosition(rSixthPos) + , maSeventhPosition(rSeventhPos) + , maTriangle() + , maLine() + , maLineTop() + , mHeight(0) + , mAnchorState(AS_ALL) + , mbShadowedEffect(bShadowedEffect) + , mbLineSolid(bLineSolid) +{ +} + +AnchorOverlayObject::~AnchorOverlayObject() +{ +} + +void AnchorOverlayObject::implEnsureGeometry() +{ + if(!maTriangle.count()) + { + maTriangle.append(getBasePosition()); + maTriangle.append(GetSecondPosition()); + maTriangle.append(GetThirdPosition()); + maTriangle.setClosed(true); + } + + if(!maLine.count()) + { + maLine.append(GetFourthPosition()); + maLine.append(GetFifthPosition()); + maLine.append(GetSixthPosition()); + } + + if(!maLineTop.count()) + { + maLineTop.append(GetSixthPosition()); + maLineTop.append(GetSeventhPosition()); + } +} + +void AnchorOverlayObject::implResetGeometry() +{ + maTriangle.clear(); + maLine.clear(); + maLineTop.clear(); +} + +drawinglayer::primitive2d::Primitive2DSequence AnchorOverlayObject::createOverlayObjectPrimitive2DSequence() +{ + implEnsureGeometry(); + + const drawinglayer::primitive2d::Primitive2DReference aReference( + new AnchorPrimitive( maTriangle, + maLine, + maLineTop, + GetAnchorState(), + getBaseColor().getBColor(), + ANCHORLINE_WIDTH * 15.0, + getShadowedEffect(), + getLineSolid()) ); + + return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1); +} + +void AnchorOverlayObject::SetAllPosition( const basegfx::B2DPoint& rPoint1, + const basegfx::B2DPoint& rPoint2, + const basegfx::B2DPoint& rPoint3, + const basegfx::B2DPoint& rPoint4, + const basegfx::B2DPoint& rPoint5, + const basegfx::B2DPoint& rPoint6, + const basegfx::B2DPoint& rPoint7) +{ + if ( rPoint1 != getBasePosition() || + rPoint2 != GetSecondPosition() || + rPoint3 != GetThirdPosition() || + rPoint4 != GetFourthPosition() || + rPoint5 != GetFifthPosition() || + rPoint6 != GetSixthPosition() || + rPoint7 != GetSeventhPosition() ) + { + maBasePosition = rPoint1; + maSecondPosition = rPoint2; + maThirdPosition = rPoint3; + maFourthPosition = rPoint4; + maFifthPosition = rPoint5; + maSixthPosition = rPoint6; + maSeventhPosition = rPoint7; + + implResetGeometry(); + objectChange(); + } +} + +void AnchorOverlayObject::SetSixthPosition(const basegfx::B2DPoint& rNew) +{ + if(rNew != maSixthPosition) + { + maSixthPosition = rNew; + implResetGeometry(); + objectChange(); + } +} + +void AnchorOverlayObject::SetSeventhPosition(const basegfx::B2DPoint& rNew) +{ + if(rNew != maSeventhPosition) + { + maSeventhPosition = rNew; + implResetGeometry(); + objectChange(); + } +} + +void AnchorOverlayObject::SetTriPosition(const basegfx::B2DPoint& rPoint1,const basegfx::B2DPoint& rPoint2,const basegfx::B2DPoint& rPoint3, + const basegfx::B2DPoint& rPoint4,const basegfx::B2DPoint& rPoint5) +{ + if(rPoint1 != getBasePosition() + || rPoint2 != GetSecondPosition() + || rPoint3 != GetThirdPosition() + || rPoint4 != GetFourthPosition() + || rPoint5 != GetFifthPosition()) + { + maBasePosition = rPoint1; + maSecondPosition = rPoint2; + maThirdPosition = rPoint3; + maFourthPosition = rPoint4; + maFifthPosition = rPoint5; + + implResetGeometry(); + objectChange(); + } +} + +void AnchorOverlayObject::setLineSolid( const bool bNew ) +{ + if ( bNew != getLineSolid() ) + { + mbLineSolid = bNew; + objectChange(); + } +} + +void AnchorOverlayObject::SetAnchorState( const AnchorState aState) +{ + if ( mAnchorState != aState) + { + mAnchorState = aState; + objectChange(); + } +} + +} } // end of namespace sw::annotation + diff --git a/sw/source/ui/docvw/AnchorOverlayObject.hxx b/sw/source/ui/docvw/AnchorOverlayObject.hxx new file mode 100644 index 0000000000..cea567f229 --- /dev/null +++ b/sw/source/ui/docvw/AnchorOverlayObject.hxx @@ -0,0 +1,143 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _ANCHOROVERLAYOBJECT_HXX +#define _ANCHOROVERLAYOBJECT_HXX + +#include + +#include + +class SwView; +class SwRect; +class Point; + +namespace sw { namespace sidebarwindows { + +enum AnchorState +{ + AS_ALL, + AS_START, + AS_END, + AS_TRI +}; + +class AnchorOverlayObject: public sdr::overlay::OverlayObjectWithBasePosition +{ + public: + static AnchorOverlayObject* CreateAnchorOverlayObject( SwView& rDocView, + const SwRect& aAnchorRect, + const long& aPageBorder, + const Point& aLineStart, + const Point& aLineEnd, + const Color& aColorAnchor ); + static void DestroyAnchorOverlayObject( AnchorOverlayObject* pAnchor ); + + inline const basegfx::B2DPoint& GetSecondPosition() const { return maSecondPosition; } + const basegfx::B2DPoint& GetThirdPosition() const { return maThirdPosition; } + const basegfx::B2DPoint& GetFourthPosition() const { return maFourthPosition; } + const basegfx::B2DPoint& GetFifthPosition() const { return maFifthPosition; } + const basegfx::B2DPoint& GetSixthPosition() const { return maSixthPosition; } + const basegfx::B2DPoint& GetSeventhPosition() const { return maSeventhPosition; } + + void SetAllPosition( const basegfx::B2DPoint& rPoint1, + const basegfx::B2DPoint& rPoint2, + const basegfx::B2DPoint& rPoint3, + const basegfx::B2DPoint& rPoint4, + const basegfx::B2DPoint& rPoint5, + const basegfx::B2DPoint& rPoint6, + const basegfx::B2DPoint& rPoint7 ); + void SetTriPosition( const basegfx::B2DPoint& rPoint1, + const basegfx::B2DPoint& rPoint2, + const basegfx::B2DPoint& rPoint3, + const basegfx::B2DPoint& rPoint4, + const basegfx::B2DPoint& rPoint5 ); + void SetSixthPosition( const basegfx::B2DPoint& rNew ); + void SetSeventhPosition( const basegfx::B2DPoint& rNew ); + + void setLineSolid( const bool bNew ); + inline bool getLineSolid() const { return mbLineSolid; } + + inline void SetHeight( const unsigned long aHeight ) { mHeight = aHeight; }; + + bool getShadowedEffect() const { return mbShadowedEffect; } + + void SetAnchorState( const AnchorState aState ); + inline AnchorState GetAnchorState() const { return mAnchorState; } + + protected: + /* 6------------7 + 1 / + /4\ ---------------5 + 2 - 3 + */ + + basegfx::B2DPoint maSecondPosition; + basegfx::B2DPoint maThirdPosition; + basegfx::B2DPoint maFourthPosition; + basegfx::B2DPoint maFifthPosition; + basegfx::B2DPoint maSixthPosition; + basegfx::B2DPoint maSeventhPosition; + + // helpers to fill and reset geometry + void implEnsureGeometry(); + void implResetGeometry(); + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + private: + // object's geometry + basegfx::B2DPolygon maTriangle; + basegfx::B2DPolygon maLine; + basegfx::B2DPolygon maLineTop; + unsigned long mHeight; + AnchorState mAnchorState; + + bool mbShadowedEffect : 1; + bool mbLineSolid : 1; + + AnchorOverlayObject( const basegfx::B2DPoint& rBasePos, + const basegfx::B2DPoint& rSecondPos, + const basegfx::B2DPoint& rThirdPos, + const basegfx::B2DPoint& rFourthPos, + const basegfx::B2DPoint& rFifthPos, + const basegfx::B2DPoint& rSixthPos, + const basegfx::B2DPoint& rSeventhPos, + const Color aBaseColor, + const bool bShadowedEffect, + const bool bLineSolid ); + virtual ~AnchorOverlayObject(); +}; + +} } // end of namespace sw::annotation + +#endif diff --git a/sw/source/ui/docvw/AnnotationMenuButton.cxx b/sw/source/ui/docvw/AnnotationMenuButton.cxx new file mode 100644 index 0000000000..f0adb9a22f --- /dev/null +++ b/sw/source/ui/docvw/AnnotationMenuButton.cxx @@ -0,0 +1,200 @@ +/************************************************************************* * + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#include "precompiled_sw.hxx" + +#include + +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include + +namespace sw { namespace annotation { + +Color ColorFromAlphaColor(UINT8 aTransparency, Color &aFront, Color &aBack ) +{ + return Color((UINT8)(aFront.GetRed() * aTransparency/(double)255 + aBack.GetRed() * (1-aTransparency/(double)255)), + (UINT8)(aFront.GetGreen() * aTransparency/(double)255 + aBack.GetGreen() * (1-aTransparency/(double)255)), + (UINT8)(aFront.GetBlue() * aTransparency/(double)255 + aBack.GetBlue() * (1-aTransparency/(double)255))); +} + +AnnotationMenuButton::AnnotationMenuButton( sw::sidebarwindows::SwSidebarWin& rSidebarWin ) + : MenuButton( &rSidebarWin ) + , mrSidebarWin( rSidebarWin ) +{ + AddEventListener( LINK( &mrSidebarWin, sw::sidebarwindows::SwSidebarWin, WindowEventListener ) ); +} + +AnnotationMenuButton::~AnnotationMenuButton() +{ + RemoveEventListener( LINK( &mrSidebarWin, sw::sidebarwindows::SwSidebarWin, WindowEventListener ) ); +} + +void AnnotationMenuButton::Select() +{ + mrSidebarWin.ExecuteCommand( GetCurItemId() ); +} + +void AnnotationMenuButton::MouseButtonDown( const MouseEvent& rMEvt ) +{ + PopupMenu* pButtonPopup( GetPopupMenu() ); + if ( mrSidebarWin.IsReadOnly() ) + { + pButtonPopup->EnableItem( FN_REPLY, false ); + pButtonPopup->EnableItem( FN_DELETE_NOTE, false ); + pButtonPopup->EnableItem( FN_DELETE_NOTE_AUTHOR, false ); + pButtonPopup->EnableItem( FN_DELETE_ALL_NOTES, false ); + } + else + { + if ( mrSidebarWin.IsProtected() ) + { + pButtonPopup->EnableItem( FN_DELETE_NOTE, false ); + } + else + { + pButtonPopup->EnableItem( FN_DELETE_NOTE, true ); + } + pButtonPopup->EnableItem( FN_DELETE_NOTE_AUTHOR, true ); + pButtonPopup->EnableItem( FN_DELETE_ALL_NOTES, true ); + } + + if ( mrSidebarWin.IsProtected() ) + { + pButtonPopup->EnableItem( FN_REPLY, false ); + } + else + { + SvtUserOptions aUserOpt; + String sAuthor; + if ( !(sAuthor = aUserOpt.GetFullName()).Len() ) + { + if ( !(sAuthor = aUserOpt.GetID()).Len() ) + { + sAuthor = String( SW_RES( STR_REDLINE_UNKNOWN_AUTHOR )); + } + } + // do not allow to reply to ourself and no answer possible if this note is in a protected section + if ( sAuthor == mrSidebarWin.GetAuthor() ) + { + pButtonPopup->EnableItem( FN_REPLY, false ); + } + else + { + pButtonPopup->EnableItem( FN_REPLY, true ); + } + } + + MenuButton::MouseButtonDown( rMEvt ); +} + +void AnnotationMenuButton::Paint( const Rectangle& rRect ) +{ + if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) + SetFillColor(COL_BLACK); + else + SetFillColor( mrSidebarWin.ColorDark() ); + SetLineColor(); + const Rectangle aRect( Rectangle( Point( 0, 0 ), PixelToLogic( GetSizePixel() ) ) ); + DrawRect( aRect ); + + if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode()) + { + //draw rect around button + SetFillColor(COL_BLACK); + SetLineColor(COL_WHITE); + } + else + { + //draw button + Gradient aGradient; + if ( IsMouseOver() ) + aGradient = Gradient( GRADIENT_LINEAR, + ColorFromAlphaColor( 80, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() ), + ColorFromAlphaColor( 15, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() )); + else + aGradient = Gradient( GRADIENT_LINEAR, + ColorFromAlphaColor( 15, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() ), + ColorFromAlphaColor( 80, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() )); + DrawGradient( aRect, aGradient ); + + //draw rect around button + SetFillColor(); + SetLineColor( ColorFromAlphaColor( 90, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() )); + } + DrawRect( aRect ); + + if ( mrSidebarWin.IsPreview() ) + { + Font aOldFont( mrSidebarWin.GetFont() ); + Font aFont(aOldFont); + Color aCol( COL_BLACK); + aFont.SetColor( aCol ); + aFont.SetHeight(200); + aFont.SetWeight(WEIGHT_MEDIUM); + SetFont( aFont ); + DrawText( aRect , + rtl::OUString::createFromAscii("Edit Note"), + TEXT_DRAW_CENTER ); + SetFont( aOldFont ); + } + else + { + Rectangle aSymbolRect( aRect ); + // 25% distance to the left and right button border + const long nBorderDistanceLeftAndRight = ((aSymbolRect.GetWidth()*250)+500)/1000; + aSymbolRect.Left()+=nBorderDistanceLeftAndRight; + aSymbolRect.Right()-=nBorderDistanceLeftAndRight; + // 40% distance to the top button border + const long nBorderDistanceTop = ((aSymbolRect.GetHeight()*400)+500)/1000; + aSymbolRect.Top()+=nBorderDistanceTop; + // 15% distance to the bottom button border + const long nBorderDistanceBottom = ((aSymbolRect.GetHeight()*150)+500)/1000; + aSymbolRect.Bottom()-=nBorderDistanceBottom; + DecorationView aDecoView( this ); + aDecoView.DrawSymbol( aSymbolRect, SYMBOL_SPIN_DOWN, + ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() + ? Color( COL_WHITE ) + : Color( COL_BLACK ) ) ); + } +} + +} } // end of namespace sw::annotation + diff --git a/sw/source/ui/docvw/AnnotationMenuButton.hxx b/sw/source/ui/docvw/AnnotationMenuButton.hxx new file mode 100644 index 0000000000..bfef9b3018 --- /dev/null +++ b/sw/source/ui/docvw/AnnotationMenuButton.hxx @@ -0,0 +1,62 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _ANNOTATIONMENUBUTTON_HXX +#define _ANNOTATIONMENUBUTTON_HXX + +#include + +namespace sw { namespace sidebarwindows { + class SwSidebarWin; +} } + +namespace sw { namespace annotation { + +class AnnotationMenuButton : public MenuButton +{ + public: + AnnotationMenuButton( sw::sidebarwindows::SwSidebarWin& rSidebarWin ); + ~AnnotationMenuButton(); + + // overloaded methods + virtual void Select(); + + // overloaded methods + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void Paint( const Rectangle& rRect ); + + private: + sw::sidebarwindows::SwSidebarWin& mrSidebarWin; +}; + +} } // end of namespace sw::annotation + +#endif diff --git a/sw/source/ui/docvw/AnnotationWin.cxx b/sw/source/ui/docvw/AnnotationWin.cxx new file mode 100644 index 0000000000..b278432091 --- /dev/null +++ b/sw/source/ui/docvw/AnnotationWin.cxx @@ -0,0 +1,291 @@ +/************************************************************************* * + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#include "precompiled_sw.hxx" + +#include + +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include // SwPostItField +#include +#include +#include +#include +#include +#include +#include + +namespace sw { namespace annotation { + +SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin, + WinBits nBits, + SwFmtFld* aField, + SwPostItMgr& aMgr, + SwPostItBits aBits) + : SwSidebarWin( rEditWin, nBits, aMgr, aBits ) + , mpFmtFld(aField) + , mpFld( static_cast(aField->GetFld())) + , mpButtonPopup(0) +{ +} + +SwAnnotationWin::~SwAnnotationWin() +{ + delete mpButtonPopup; +} + +void SwAnnotationWin::SetPostItText() +{ + // get text from SwPostItField and insert into our textview + Engine()->SetModifyHdl( Link() ); + Engine()->EnableUndo( FALSE ); + mpFld = static_cast(mpFmtFld->GetFld()); + if( mpFld->GetTextObject() ) + Engine()->SetText( *mpFld->GetTextObject() ); + else + { + Engine()->Clear(); + GetOutlinerView()->SetAttribs(DefaultItem()); + GetOutlinerView()->InsertText(mpFld->GetPar2(),false); + } + + Engine()->ClearModifyFlag(); + Engine()->GetUndoManager().Clear(); + Engine()->EnableUndo( TRUE ); + Engine()->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) ); + Invalidate(); +} + +void SwAnnotationWin::UpdateData() +{ + if ( Engine()->IsModified() ) + { + SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld(); + SwPosition aPosition( pTxtFld->GetTxtNode() ); + aPosition.nContent = *pTxtFld->GetStart(); + SwField* pOldField = mpFld->Copy(); + mpFld->SetPar2(Engine()->GetEditEngine().GetText()); + mpFld->SetTextObject(Engine()->CreateParaObject()); + DocView().GetDocShell()->GetDoc()->AppendUndo(new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true)); + delete pOldField; + // so we get a new layout of notes (anchor position is still the same and we would otherwise not get one) + Mgr().SetLayout(); + // #i98686# if we have several views, all notes should update their text + mpFmtFld->Broadcast(SwFmtFldHint( 0, SWFMTFLD_CHANGED)); + DocView().GetDocShell()->SetModified(); + } + Engine()->ClearModifyFlag(); + Engine()->GetUndoManager().Clear(); +} + +void SwAnnotationWin::Delete() +{ + SwSidebarWin::Delete(); + // we delete the field directly, the Mgr cleans up the PostIt by listening + DocView().GetWrtShellPtr()->GotoField(*mpFmtFld); + GrabFocusToDocument(); + DocView().GetWrtShellPtr()->DelRight(); +} + +void SwAnnotationWin::GotoPos() +{ + DocView().GetDocShell()->GetWrtShell()->GotoField(*mpFmtFld); +} + +sal_uInt32 SwAnnotationWin::MoveCaret() +{ + // if this is an answer, do not skip over all following ones, but insert directly behind the current one + // but when just leaving a note, skip all following ones as well to continue typing + return Mgr().IsAnswer() + ? 1 + : 1 + CountFollowing(); +} + +//returns true, if there is another note right before this note +bool SwAnnotationWin::CalcFollow() +{ + SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld(); + SwPosition aPosition( pTxtFld->GetTxtNode() ); + aPosition.nContent = *pTxtFld->GetStart(); + SwTxtAttr * const pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt( + aPosition.nContent.GetIndex() - 1, RES_TXTATR_FIELD ); + const SwField* pFld = pTxtAttr ? pTxtAttr->GetFld().GetFld() : 0; + return pFld && (pFld->Which()== RES_POSTITFLD); +} + +// counts how many SwPostItField we have right after the current one +sal_uInt32 SwAnnotationWin::CountFollowing() +{ + sal_uInt32 aCount = 1; // we start with 1, so we have to subtract one at the end again + SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld(); + SwPosition aPosition( pTxtFld->GetTxtNode() ); + aPosition.nContent = *pTxtFld->GetStart(); + + SwTxtAttr * pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt( + aPosition.nContent.GetIndex() + 1, + RES_TXTATR_FIELD ); + SwField* pFld = pTxtAttr + ? const_cast(pTxtAttr->GetFld().GetFld()) + : 0; + while ( pFld && ( pFld->Which()== RES_POSTITFLD ) ) + { + aCount++; + pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt( + aPosition.nContent.GetIndex() + aCount, + RES_TXTATR_FIELD ); + pFld = pTxtAttr + ? const_cast(pTxtAttr->GetFld().GetFld()) + : 0; + } + return aCount - 1; +} + +MenuButton* SwAnnotationWin::CreateMenuButton() +{ + mpButtonPopup = new PopupMenu(SW_RES(MN_ANNOTATION_BUTTON)); + XubString aText = mpButtonPopup->GetItemText( FN_DELETE_NOTE_AUTHOR ); + SwRewriter aRewriter; + aRewriter.AddRule(UNDO_ARG1,GetAuthor()); + aText = aRewriter.Apply(aText); + mpButtonPopup->SetItemText(FN_DELETE_NOTE_AUTHOR,aText); + MenuButton* pMenuButton = new AnnotationMenuButton( *this ); + pMenuButton->SetPopupMenu( mpButtonPopup ); + pMenuButton->Show(); + return pMenuButton; +} + +void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText) +{ + //collect our old meta data + SwSidebarWin* pWin = Mgr().GetNextPostIt(KEY_PAGEUP, this); + const LocaleDataWrapper& rLocalData = SvtSysLocale().GetLocaleData(); + String aText = String(SW_RES(STR_REPLY)); + SwRewriter aRewriter; + aRewriter.AddRule(UNDO_ARG1, pWin->GetAuthor()); + aText = aRewriter.Apply(aText); + aText.Append(String(rtl::OUString::createFromAscii(" (") + + String(rLocalData.getDate( pWin->GetDate())) + rtl::OUString::createFromAscii(", ") + + String(rLocalData.getTime( pWin->GetTime(),false)) + rtl::OUString::createFromAscii("): \""))); + GetOutlinerView()->InsertText(aText,false); + + // insert old, selected text or "..." + // TOOD: iterate over all paragraphs, not only first one to find out if it is empty + if (pText->GetTextObject().GetText(0) != String(rtl::OUString::createFromAscii(""))) + GetOutlinerView()->GetEditView().InsertText(pText->GetTextObject()); + else + GetOutlinerView()->InsertText(rtl::OUString::createFromAscii("..."),false); + GetOutlinerView()->InsertText(rtl::OUString::createFromAscii("\"\n"),false); + + GetOutlinerView()->SetSelection(ESelection(0x0,0x0,0xFFFF,0xFFFF)); + SfxItemSet aAnswerSet( DocView().GetDocShell()->GetPool() ); + aAnswerSet.Put(SvxFontHeightItem(200,80,EE_CHAR_FONTHEIGHT)); + aAnswerSet.Put(SvxPostureItem(ITALIC_NORMAL,EE_CHAR_ITALIC)); + GetOutlinerView()->SetAttribs(aAnswerSet); + GetOutlinerView()->SetSelection(ESelection(0xFFFF,0xFFFF,0xFFFF,0xFFFF)); + + //remove all attributes and reset our standard ones + GetOutlinerView()->GetEditView().RemoveAttribsKeepLanguages(true); + GetOutlinerView()->SetAttribs(DefaultItem()); + // lets insert an undo step so the initial text can be easily deleted + // but do not use UpdateData() directly, would set modified state again and reentrance into Mgr + Engine()->SetModifyHdl( Link() ); + SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld(); + SwPosition aPosition( pTxtFld->GetTxtNode() ); + aPosition.nContent = *pTxtFld->GetStart(); + SwField* pOldField = mpFld->Copy(); + mpFld->SetPar2(Engine()->GetEditEngine().GetText()); + mpFld->SetTextObject(Engine()->CreateParaObject()); + DocView().GetDocShell()->GetDoc()->AppendUndo(new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true)); + delete pOldField; + Engine()->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) ); + Engine()->ClearModifyFlag(); + Engine()->GetUndoManager().Clear(); +} + +SvxLanguageItem SwAnnotationWin::GetLanguage(void) +{ + // set initial language for outliner + USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( mpFld->GetLanguage() ); + USHORT nLangWhichId = 0; + switch (nScriptType) + { + case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE ; break; + case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break; + case SCRIPTTYPE_COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break; + default: DBG_ERROR("GetLanguage: wrong script tye"); + } + return SvxLanguageItem(mpFld->GetLanguage(),nLangWhichId); +} + +bool SwAnnotationWin::IsProtected() +{ + return SwSidebarWin::IsProtected() || + GetLayoutStatus() == SwPostItHelper::DELETED || + ( mpFmtFld ? mpFmtFld->IsProtect() : false ); +} + +String SwAnnotationWin::GetAuthor() +{ + return mpFld->GetPar1(); +} + +Date SwAnnotationWin::GetDate() +{ + return mpFld->GetDate(); +} + +Time SwAnnotationWin::GetTime() +{ + return mpFld->GetTime(); +} + +} } // end of namespace sw::annotation diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 6681e755f1..a8e1f3425e 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,9 +35,16 @@ #include "PostItMgr.hxx" #include +#include +#include + +#include +#include +#include + #include #include -#include +#include #include @@ -49,7 +56,6 @@ #include #include #include -#include #include #include #include @@ -59,7 +65,7 @@ #include #include -#include +#include #include "cmdid.h" #include @@ -94,6 +100,8 @@ // if we layout more often we stop, this should never happen #define MAX_LOOP_COUNT 50 +using namespace sw::sidebarwindows; + /* bool comp_author( const SwPostItItem* a, const SwPostItItem* b) { @@ -107,14 +115,14 @@ bool comp_date( const SwPostItItem* a, const SwPostItItem* b) */ // if position is on the same line, sort by x (Left) position, otherwise by y(Bottom) position -// if two notes are at the same position, sort by logical node position -bool comp_pos(const SwMarginItem *a, const SwMarginItem *b) +// if two notes are at the same position, sort by logical node position +bool comp_pos(const SwSidebarItem *a, const SwSidebarItem *b) { - return (a->mPos.Bottom() == b->mPos.Bottom()) ? - ( ((a->mPos.Left() == b->mPos.Left()) && (a->GetBroadCaster()->ISA(SwFmtFld) && b->GetBroadCaster()->ISA(SwFmtFld)) ) ? - *(static_cast(a->GetBroadCaster())->GetTxtFld()->GetStart()) < + return (a->mPos.Bottom() == b->mPos.Bottom()) ? + ( ((a->mPos.Left() == b->mPos.Left()) && (a->GetBroadCaster()->ISA(SwFmtFld) && b->GetBroadCaster()->ISA(SwFmtFld)) ) ? + *(static_cast(a->GetBroadCaster())->GetTxtFld()->GetStart()) < *(static_cast(b->GetBroadCaster())->GetTxtFld()->GetStart()) - : a->mPos.Left() < b->mPos.Left() ) + : a->mPos.Left() < b->mPos.Left() ) : a->mPos.Bottom() < b->mPos.Bottom(); } @@ -134,17 +142,17 @@ SwPostItMgr::SwPostItMgr(SwView* pView) { if(!mpView->GetDrawView() ) mpView->GetWrtShell().MakeDrawView(); - + SwNoteProps aProps; mpIsShowAnkor = aProps.IsShowAnkor(); //make sure we get the colour yellow always, even if not the first one of comments or redlining SW_MOD()->GetRedlineAuthor(); - + // collect all PostIts and redline comments that exist after loading the document // don't check for existance for any of them, don't focus them AddPostIts(false,false); - /* this code can be used once we want redline comments in the margin + /* this code can be used once we want redline comments in the Sidebar AddRedlineComments(false,false); */ // we want to receive stuff like SFX_HINT_DOCCHANGED @@ -156,12 +164,12 @@ SwPostItMgr::SwPostItMgr(SwView* pView) } } -SwPostItMgr::~SwPostItMgr() +SwPostItMgr::~SwPostItMgr() { if ( mnEventId ) Application::RemoveUserEvent( mnEventId ); - // forget about all our margin windows - RemoveMarginWin(); + // forget about all our Sidebar windows + RemoveSidebarWin(); EndListening( *mpView->GetDocShell() ); for(std::vector::iterator i = mPages.begin(); i!= mPages.end() ; i++) @@ -172,15 +180,15 @@ SwPostItMgr::~SwPostItMgr() void SwPostItMgr::CheckForRemovedPostIts() { bool bRemoved = false; - for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end(); ) + for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end(); ) { - std::list::iterator it = i++; + std::list::iterator it = i++; if ( !(*it)->UseElement() ) { - SwMarginItem* p = (*it); + SwSidebarItem* p = (*it); mvPostItFlds.remove(*it); - if (GetActivePostIt() == p->pPostIt) - SetActivePostIt(0); + if (GetActiveSidebarWin() == p->pPostIt) + SetActiveSidebarWin(0); if (p->pPostIt) delete p->pPostIt; delete p; @@ -208,7 +216,7 @@ void SwPostItMgr::InsertItem(SfxBroadcaster* pItem, bool bCheckExistance, bool b { if (bCheckExistance) { - for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { if ( (*i)->GetBroadCaster() == pItem ) return; @@ -216,7 +224,7 @@ void SwPostItMgr::InsertItem(SfxBroadcaster* pItem, bool bCheckExistance, bool b } mbLayout = bFocus; if (pItem->ISA(SwFmtFld)) - mvPostItFlds.push_back(new SwPostItItem(static_cast(pItem), true, bFocus) ); + mvPostItFlds.push_back(new SwAnnotationItem(static_cast(pItem), true, bFocus) ); /* else if (pItem->ISA(SwRedline)) @@ -228,14 +236,14 @@ void SwPostItMgr::InsertItem(SfxBroadcaster* pItem, bool bCheckExistance, bool b void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast ) { - EndListening(*pBroadcast); - for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + EndListening(*pBroadcast); + for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { if ( (*i)->GetBroadCaster() == pBroadcast ) { - SwMarginItem* p = (*i); - if (GetActivePostIt() == p->pPostIt) - SetActivePostIt(0); + SwSidebarItem* p = (*i); + if (GetActiveSidebarWin() == p->pPostIt) + SetActiveSidebarWin(0); mvPostItFlds.remove(*i); delete p->pPostIt; delete p; @@ -301,7 +309,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) DBG_ERROR("Notification for removed SwFmtFld was not sent!"); RemoveItem(&rBC); } - break; + break; } } } @@ -326,7 +334,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) break; } case SWREDLINE_FOCUS: - { + { if (rRedlineHint.GetView()== mpView) Focus(rBC); break; @@ -337,7 +345,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) else if ( rHint.IsA(TYPE(SwFmtFldHint) ) ) { const SwFmtFldHint& rFmtHint = static_cast(rHint); - SwFmtFld* pFld = const_cast ( rFmtHint.GetField() ); + SwFmtFld* pFld = const_cast ( rFmtHint.GetField() ); switch ( rFmtHint.Which() ) { case SWFMTFLD_INSERTED : @@ -355,7 +363,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) if (bEmpty && !mvPostItFlds.empty()) PrepareView(true); } - else + else { DBG_ERROR( "Inserted field not in document!" ); } @@ -375,7 +383,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) break; } case SWFMTFLD_FOCUS: - { + { if (rFmtHint.GetView()== mpView) Focus(rBC); break; @@ -383,7 +391,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) case SWFMTFLD_CHANGED: { SwFmtFld* pFmtFld = dynamic_cast(&rBC); - for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { if ( pFmtFld == (*i)->GetBroadCaster() ) { @@ -400,7 +408,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) case SWFMTFLD_LANGUAGE: { SwFmtFld* pFmtFld = dynamic_cast(&rBC); - for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { if ( pFmtFld == (*i)->GetBroadCaster() ) { @@ -414,7 +422,8 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break; case SCRIPTTYPE_COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break; } - (*i)->pPostIt->SetLanguage(SvxLanguageItem((*i)->GetFmtFld()->GetFld()->GetLanguage(),nLangWhichId)); + (*i)->pPostIt->SetLanguage( SvxLanguageItem((*i)->GetFmtFld()->GetFld()->GetLanguage(), + nLangWhichId) ); } break; } @@ -432,8 +441,8 @@ void SwPostItMgr::Focus(SfxBroadcaster& rBC) SfxRequest aRequest(mpView->GetViewFrame(),FN_VIEW_NOTES); mpView->ExecViewOptions(aRequest); } - - for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + + for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { // field to get the focus is the broadcaster if ( &rBC == (*i)->GetBroadCaster() ) @@ -448,7 +457,7 @@ void SwPostItMgr::Focus(SfxBroadcaster& rBC) // when the layout algorithm starts, this postit is created and receives focus (*i)->bFocus = true; } - } + } } } @@ -467,9 +476,9 @@ bool SwPostItMgr::CalcRects() PreparePageContainer(); if ( !mvPostItFlds.empty() ) { - for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { - SwMarginItem* pItem = (*i); + SwSidebarItem* pItem = (*i); if ( !pItem->UseElement() ) { DBG_ERROR("PostIt is not in doc or other wrong use"); @@ -489,7 +498,7 @@ bool SwPostItMgr::CalcRects() pItem->mPos = rInfo.mPosition; pItem->mPagePos = rInfo.mPageFrame; pItem->mFramePos = rInfo.mPagePrtArea; - pItem->bMarginSide = rInfo.mbMarginSide; + pItem->meSidebarPosition = rInfo.meSidebarPosition; pItem->mnPageNumber = rInfo.mnPageNumber; pItem->mRedlineAuthor = rInfo.mRedlineAuthor; } @@ -501,9 +510,9 @@ bool SwPostItMgr::CalcRects() Sort(SORT_POS); // sort the items into the right page vector, so layout can be done by page - for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { - SwMarginItem* pItem = (*i); + SwSidebarItem* pItem = (*i); if( SwPostItHelper::INVISIBLE == pItem->mLayoutStatus ) { if (pItem->pPostIt) @@ -530,7 +539,7 @@ bool SwPostItMgr::CalcRects() } mPages[aPageNum-1]->mList->push_back(pItem); mPages[aPageNum-1]->mPageRect = pItem->mPagePos; - mPages[aPageNum-1]->bMarginSide = pItem->bMarginSide; + mPages[aPageNum-1]->eSidebarPosition = pItem->meSidebarPosition; } if (!bChange && mpWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE)) @@ -559,9 +568,9 @@ bool SwPostItMgr::CalcRects() bool SwPostItMgr::HasScrollbars() const { - for(std::list::const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(std::list::const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { - if ((*i)->bShow && (*i)->pPostIt && (*i)->pPostIt->Scrollbar()) + if ((*i)->bShow && (*i)->pPostIt && (*i)->pPostIt->HasScrollbar()) return true; } return false; @@ -602,7 +611,7 @@ void SwPostItMgr::LayoutPostIts() if ( !mvPostItFlds.empty() && !mbWaitingForCalcRects ) { mbLayouting = true; - + //loop over all pages and do the layout // - create SwPostIt if neccessary // - place SwPostIts on their initial position @@ -613,24 +622,24 @@ void SwPostItMgr::LayoutPostIts() // only layout if there are notes on this page if (mPages[n]->mList->size()>0) { - std::list aVisiblePostItList; + std::list aVisiblePostItList; unsigned long lNeededHeight = 0; long mlPageBorder = 0; long mlPageEnd = 0; - for(SwMarginItem_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++) + for(SwSidebarItem_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++) { - SwMarginItem* pItem = (*i); - SwMarginWin* pPostIt = pItem->pPostIt; + SwSidebarItem* pItem = (*i); + SwSidebarWin* pPostIt = pItem->pPostIt; - if (mPages[n]->bMarginSide) + if (mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT ) { // x value for notes positioning mlPageBorder = mpEditWin->LogicToPixel( Point( mPages[n]->mPageRect.Left(), 0)).X() - GetSidebarWidth(true);// - GetSidebarBorderWidth(true); //bending point mlPageEnd = mpWrtShell->getIDocumentSettingAccess()->get( IDocumentSettingAccess::BROWSE_MODE) ? pItem->mFramePos.Left() : mPages[n]->mPageRect.Left() + 350; } - else + else if (mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_RIGHT ) { // x value for notes positioning mlPageBorder = mpEditWin->LogicToPixel( Point(mPages[n]->mPageRect.Right(), 0)).X() + GetSidebarBorderWidth(true); @@ -644,32 +653,40 @@ void SwPostItMgr::LayoutPostIts() long aPostItHeight = 0; if (!pPostIt) { - pPostIt = (*i)->GetMarginWindow(static_cast(&mpView->GetEditWin()),WINDOW_CONTROL|WB_NODIALOGCONTROL,this,0); + pPostIt = (*i)->GetSidebarWindow( mpView->GetEditWin(), + WINDOW_CONTROL|WB_NODIALOGCONTROL, + *this, + 0 ); pPostIt->InitControls(); pPostIt->SetReadonly(mbReadOnly); pItem->pPostIt = pPostIt; if (mpAnswer) { if (pPostIt->CalcFollow()) //do we really have another note in front of this one - static_cast(pPostIt)->InitAnswer(mpAnswer); + static_cast(pPostIt)->InitAnswer(mpAnswer); delete mpAnswer; mpAnswer = 0; } } - if (pItem->pPostIt->ISA(SwPostIt)) - { - static_cast(pPostIt)->SetChangeTracking(pItem->mLayoutStatus,GetColorAnkor(pItem->mRedlineAuthor)); - } - pPostIt->SetMarginSide(mPages[n]->bMarginSide); + pPostIt->SetChangeTracking(pItem->mLayoutStatus,GetColorAnkor(pItem->mRedlineAuthor)); + pPostIt->SetSidebarPosition(mPages[n]->eSidebarPosition); pPostIt->SetFollow(pPostIt->CalcFollow()); - aPostItHeight = ( pPostIt->GetPostItTextHeight() < pPostIt->GetMinimumSizeWithoutMeta() ? pPostIt->GetMinimumSizeWithoutMeta() : pPostIt->GetPostItTextHeight() ) + pPostIt->GetMetaHeight(); - pPostIt->SetPosSizePixelRect( mlPageBorder ,Y-GetInitialAnchorDistance(), GetNoteWidth() ,aPostItHeight,pItem->mPos, mlPageEnd); + aPostItHeight = ( pPostIt->GetPostItTextHeight() < pPostIt->GetMinimumSizeWithoutMeta() + ? pPostIt->GetMinimumSizeWithoutMeta() + : pPostIt->GetPostItTextHeight() ) + + pPostIt->GetMetaHeight(); + pPostIt->SetPosSizePixelRect( mlPageBorder , + Y - GetInitialAnchorDistance(), + GetNoteWidth() , + aPostItHeight, + pItem->mPos, + mlPageEnd ); if (pItem->bFocus) { mbLayout = true; - pPostIt->GrabFocus(); + pPostIt->GrabFocus(); pItem->bFocus = false; } // only the visible postits are used for the final layout @@ -709,7 +726,7 @@ void SwPostItMgr::LayoutPostIts() - enlarge all notes till GetNextBorder(), as we resized to average value before */ //lets hide the ones which overlap the page - for(SwMarginWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++) + for(SwSidebarWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++) { if (mPages[n]->lOffset != 0) (*i)->TranslateTopPosition(mPages[n]->lOffset); @@ -724,24 +741,28 @@ void SwPostItMgr::LayoutPostIts() { if (mpEditWin->PixelToLogic(Point(0,(*i)->VirtualPos().Y())).Y() < (mPages[n]->mPageRect.Top()+aSidebarheight)) { - if (mPages[n]->bMarginSide) - (*i)->ShowAnkorOnly(Point(mPages[n]->mPageRect.Left(),mPages[n]->mPageRect.Top())); - else - (*i)->ShowAnkorOnly(Point(mPages[n]->mPageRect.Right(),mPages[n]->mPageRect.Top())); + if ( mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT ) + (*i)->ShowAnchorOnly(Point( mPages[n]->mPageRect.Left(), + mPages[n]->mPageRect.Top())); + else if ( mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_RIGHT ) + (*i)->ShowAnchorOnly(Point( mPages[n]->mPageRect.Right(), + mPages[n]->mPageRect.Top())); } else { - if (mPages[n]->bMarginSide) - (*i)->ShowAnkorOnly(Point(mPages[n]->mPageRect.Left(),mPages[n]->mPageRect.Bottom())); - else - (*i)->ShowAnkorOnly(Point(mPages[n]->mPageRect.Right(),mPages[n]->mPageRect.Bottom())); + if ( mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT ) + (*i)->ShowAnchorOnly(Point(mPages[n]->mPageRect.Left(), + mPages[n]->mPageRect.Bottom())); + else if ( mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_RIGHT ) + (*i)->ShowAnchorOnly(Point(mPages[n]->mPageRect.Right(), + mPages[n]->mPageRect.Bottom())); } DBG_ASSERT(mPages[n]->bScrollbar,"SwPostItMgr::LayoutByPage(): note overlaps, but bScrollbar is not true"); } } - + // do some magic so we really see the focused note - for(SwMarginWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++) + for(SwSidebarWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++) { if ((*i)->HasChildPathFocus()) { @@ -752,7 +773,7 @@ void SwPostItMgr::LayoutPostIts() } else { - for(SwMarginWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++) + for(SwSidebarWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++) (*i)->SetPosAndSize(); bool bOldScrollbar = mPages[n]->bScrollbar; @@ -767,35 +788,35 @@ void SwPostItMgr::LayoutPostIts() mPages[n]->bScrollbar = false; } } - + if (!ShowNotes()) { // we do not want to see the notes anymore -> Options-Writer-View-Notes bool bRepair = false; - for(SwMarginItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { - SwMarginItem* pItem = (*i); + SwSidebarItem* pItem = (*i); if ( !pItem->UseElement() ) { DBG_ERROR("PostIt is not in doc!"); bRepair = true; continue; } - + if ((*i)->pPostIt) { (*i)->pPostIt->HideNote(); if ((*i)->pPostIt->HasChildPathFocus()) { - SetActivePostIt(0); + SetActiveSidebarWin(0); (*i)->pPostIt->GrabFocusToDocument(); } } } - + if ( bRepair ) CheckForRemovedPostIts(); } - + // notes scrollbar is otherwise not drawn correctly for some cases // scrollbar area is enough @@ -813,7 +834,7 @@ bool SwPostItMgr::BorderOverPageBorder(unsigned long aPage) const return false; } - SwMarginItem_iterator aItem = mPages[aPage-1]->mList->end(); + SwSidebarItem_iterator aItem = mPages[aPage-1]->mList->end(); --aItem; DBG_ASSERT ((*aItem)->pPostIt,"BorderOverPageBorder: NULL postIt, should never happen"); if ((*aItem)->pPostIt) @@ -836,9 +857,9 @@ void SwPostItMgr::Scroll(const long lScroll,const unsigned long aPage) const bool bOldUp = ArrowEnabled(KEY_PAGEUP,aPage); const bool bOldDown = ArrowEnabled(KEY_PAGEDOWN,aPage); const long aSidebarheight = mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height(); - for(SwMarginItem_iterator i = mPages[aPage-1]->mList->begin(); i!= mPages[aPage-1]->mList->end(); i++) + for(SwSidebarItem_iterator i = mPages[aPage-1]->mList->begin(); i!= mPages[aPage-1]->mList->end(); i++) { - SwMarginWin* pPostIt = (*i)->pPostIt; + SwSidebarWin* pPostIt = (*i)->pPostIt; // if this is an answer, we should take the normal position and not the real, slightly moved position pPostIt->SetVirtualPosSize(pPostIt->GetPosPixel(),pPostIt->GetSizePixel()); pPostIt->TranslateTopPosition(lScroll); @@ -855,17 +876,17 @@ void SwPostItMgr::Scroll(const long lScroll,const unsigned long aPage) { if ( mpEditWin->PixelToLogic(Point(0,pPostIt->VirtualPos().Y())).Y() < (mPages[aPage-1]->mPageRect.Top()+aSidebarheight)) { - if (mPages[aPage-1]->bMarginSide) - pPostIt->ShowAnkorOnly(Point(mPages[aPage-1]->mPageRect.Left(),mPages[aPage-1]->mPageRect.Top())); - else - pPostIt->ShowAnkorOnly(Point(mPages[aPage-1]->mPageRect.Right(),mPages[aPage-1]->mPageRect.Top())); + if (mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT) + pPostIt->ShowAnchorOnly(Point(mPages[aPage-1]->mPageRect.Left(),mPages[aPage-1]->mPageRect.Top())); + else if (mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_RIGHT) + pPostIt->ShowAnchorOnly(Point(mPages[aPage-1]->mPageRect.Right(),mPages[aPage-1]->mPageRect.Top())); } else { - if (mPages[aPage-1]->bMarginSide) - pPostIt->ShowAnkorOnly(Point(mPages[aPage-1]->mPageRect.Left(),mPages[aPage-1]->mPageRect.Bottom())); - else - pPostIt->ShowAnkorOnly(Point(mPages[aPage-1]->mPageRect.Right(),mPages[aPage-1]->mPageRect.Bottom())); + if (mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT) + pPostIt->ShowAnchorOnly(Point(mPages[aPage-1]->mPageRect.Left(),mPages[aPage-1]->mPageRect.Bottom())); + else if (mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_RIGHT) + pPostIt->ShowAnchorOnly(Point(mPages[aPage-1]->mPageRect.Right(),mPages[aPage-1]->mPageRect.Bottom())); } } } @@ -878,7 +899,7 @@ void SwPostItMgr::Scroll(const long lScroll,const unsigned long aPage) } } -void SwPostItMgr::AutoScroll(const SwMarginWin* pPostIt,const unsigned long aPage ) +void SwPostItMgr::AutoScroll(const SwSidebarWin* pPostIt,const unsigned long aPage ) { // otherwise all notes are visible if (mPages[aPage-1]->bScrollbar) @@ -898,7 +919,7 @@ void SwPostItMgr::AutoScroll(const SwMarginWin* pPostIt,const unsigned long aPag } } -void SwPostItMgr::MakeVisible(const SwMarginWin* pPostIt,long aPage ) +void SwPostItMgr::MakeVisible(const SwSidebarWin* pPostIt,long aPage ) { if (aPage == -1) { @@ -907,7 +928,7 @@ void SwPostItMgr::MakeVisible(const SwMarginWin* pPostIt,long aPage ) { if (mPages[n]->mList->size()>0) { - for(SwMarginItem_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++) + for(SwSidebarItem_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++) { if ((*i)->pPostIt==pPostIt) { @@ -956,7 +977,7 @@ Color SwPostItMgr::GetArrowColor(USHORT aDirection,unsigned long aPage) const } } -bool SwPostItMgr::LayoutByPage(std::list &aVisiblePostItList,const Rectangle aBorder, long lNeededHeight) +bool SwPostItMgr::LayoutByPage(std::list &aVisiblePostItList,const Rectangle aBorder, long lNeededHeight) { /*** General layout idea:***/ // - if we have space left, we always move the current one up, @@ -986,12 +1007,12 @@ bool SwPostItMgr::LayoutByPage(std::list &aVisiblePostItList,const bScrollbars = true; lTopBorder += GetSidebarScrollerHeight() + 10; lBottomBorder -= (GetSidebarScrollerHeight() + 10); - for(SwMarginWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++) + for(SwSidebarWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++) (*i)->SetSize(Size((*i)->VirtualSize().getWidth(),(*i)->GetMinimumSizeWithMeta())); } else { - for(SwMarginWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++) + for(SwSidebarWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++) { if ( (*i)->VirtualSize().getHeight() > lAverageHeight) (*i)->SetSize(Size((*i)->VirtualSize().getWidth(),lAverageHeight)); @@ -1008,9 +1029,9 @@ bool SwPostItMgr::LayoutByPage(std::list &aVisiblePostItList,const loop++; bDone = true; lSpaceUsed = lTopBorder + GetSpaceBetween(); - for(SwMarginWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++) + for(SwSidebarWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++) { - SwMarginWin_iterator aNextPostIt = i; + SwSidebarWin_iterator aNextPostIt = i; ++aNextPostIt; if (aNextPostIt !=aVisiblePostItList.end()) @@ -1029,7 +1050,7 @@ bool SwPostItMgr::LayoutByPage(std::list &aVisiblePostItList,const if ( ((*i)->VirtualPos().Y()- lTranslatePos - GetSpaceBetween()) > lTopBorder) { if ((*aNextPostIt)->IsFollow()) - (*i)->TranslateTopPosition(-1*(lTranslatePos+ANKORLINE_WIDTH)); + (*i)->TranslateTopPosition(-1*(lTranslatePos+ANCHORLINE_WIDTH)); else (*i)->TranslateTopPosition(-1*(lTranslatePos+GetSpaceBetween())); } @@ -1038,7 +1059,7 @@ bool SwPostItMgr::LayoutByPage(std::list &aVisiblePostItList,const long lMoveUp = (*i)->VirtualPos().Y() - lTopBorder; (*i)->TranslateTopPosition(-1* lMoveUp); if ((*aNextPostIt)->IsFollow()) - (*aNextPostIt)->TranslateTopPosition( (lTranslatePos+ANKORLINE_WIDTH) - lMoveUp); + (*aNextPostIt)->TranslateTopPosition( (lTranslatePos+ANCHORLINE_WIDTH) - lMoveUp); else (*aNextPostIt)->TranslateTopPosition( (lTranslatePos+GetSpaceBetween()) - lMoveUp); } @@ -1047,7 +1068,7 @@ bool SwPostItMgr::LayoutByPage(std::list &aVisiblePostItList,const { // no space left, left move the next one down if ((*aNextPostIt)->IsFollow()) - (*aNextPostIt)->TranslateTopPosition(lTranslatePos+ANKORLINE_WIDTH); + (*aNextPostIt)->TranslateTopPosition(lTranslatePos+ANCHORLINE_WIDTH); else (*aNextPostIt)->TranslateTopPosition(lTranslatePos+GetSpaceBetween()); } @@ -1066,14 +1087,14 @@ bool SwPostItMgr::LayoutByPage(std::list &aVisiblePostItList,const } } if (aNextPostIt !=aVisiblePostItList.end() && (*aNextPostIt)->IsFollow()) - lSpaceUsed += (*i)->VirtualSize().Height() + ANKORLINE_WIDTH; + lSpaceUsed += (*i)->VirtualSize().Height() + ANCHORLINE_WIDTH; else lSpaceUsed += (*i)->VirtualSize().Height() + GetSpaceBetween(); } else { //(*i) is the last visible item - SwMarginWin_iterator aPrevPostIt = i; + SwSidebarWin_iterator aPrevPostIt = i; --aPrevPostIt; //lTranslatePos = ( (*aPrevPostIt)->VirtualPos().Y() + (*aPrevPostIt)->VirtualSize().Height() + GetSpaceBetween() ) - (*i)->VirtualPos().Y(); lTranslatePos = ( (*aPrevPostIt)->VirtualPos().Y() + (*aPrevPostIt)->VirtualSize().Height() ) - (*i)->VirtualPos().Y(); @@ -1083,7 +1104,7 @@ bool SwPostItMgr::LayoutByPage(std::list &aVisiblePostItList,const if ( ((*i)->VirtualPos().Y()+ (*i)->VirtualSize().Height()+lTranslatePos) < lBottomBorder) { if ( (*i)->IsFollow() ) - (*i)->TranslateTopPosition(lTranslatePos+ANKORLINE_WIDTH); + (*i)->TranslateTopPosition(lTranslatePos+ANCHORLINE_WIDTH); else (*i)->TranslateTopPosition(lTranslatePos+GetSpaceBetween()); } @@ -1115,7 +1136,7 @@ bool SwPostItMgr::LayoutByPage(std::list &aVisiblePostItList,const else { // only one left, make sure it is not hidden at the top or bottom - SwMarginWin_iterator i = aVisiblePostItList.begin(); + SwSidebarWin_iterator i = aVisiblePostItList.begin(); lTranslatePos = lTopBorder - (*i)->VirtualPos().Y(); if (lTranslatePos>0) { @@ -1168,11 +1189,11 @@ void SwPostItMgr::AddPostIts(bool bCheckExistance, bool bFocus) PrepareView(true); } -void SwPostItMgr::RemoveMarginWin() +void SwPostItMgr::RemoveSidebarWin() { if (!mvPostItFlds.empty()) { - for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { EndListening( *((*i)->GetBroadCaster()) ); if ((*i)->pPostIt) @@ -1192,8 +1213,10 @@ void SwPostItMgr::RemoveMarginWin() void SwPostItMgr::Delete(String aAuthor) { mpWrtShell->StartAllAction(); - if ( GetActivePostIt() && (GetActivePostIt()->GetAuthor()==aAuthor) ) - SetActivePostIt(0); + if ( HasActiveSidebarWin() && (GetActiveSidebarWin()->GetAuthor()==aAuthor) ) + { + SetActiveSidebarWin(0); + } SwRewriter aRewriter; String aUndoString = SW_RES(STR_DELETE_AUTHOR_NOTES); aUndoString += aAuthor; @@ -1202,7 +1225,7 @@ void SwPostItMgr::Delete(String aAuthor) std::vector aTmp; aTmp.reserve( mvPostItFlds.size() ); - for(std::list::iterator pPostIt = mvPostItFlds.begin(); pPostIt!= mvPostItFlds.end() ; pPostIt++) + for(std::list::iterator pPostIt = mvPostItFlds.begin(); pPostIt!= mvPostItFlds.end() ; pPostIt++) { if ((*pPostIt)->GetFmtFld() && ((*pPostIt)->pPostIt->GetAuthor() == aAuthor) ) aTmp.push_back( (*pPostIt)->GetFmtFld() ); @@ -1212,36 +1235,6 @@ void SwPostItMgr::Delete(String aAuthor) mpWrtShell->GotoField( *(*i) ); mpWrtShell->DelRight(); } - /* - for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end(); ) - { - SwPostItItem* pItem = (*i); - SwPostItField* pPostItField = static_cast(pItem->pFmtFld->GetFld()); - if (pPostItField->GetPar1() == aAuthor) - { - // stop listening, we delete ourselves - EndListening( *(pItem->pFmtFld) ); - - // remove reference to yet-to-die postit - if (pItem->pPostIt == GetActivePostIt()) - SetActivePostIt(0); - - // delete the actual SwPostItField - mpWrtShell->GotoField(*pItem->pFmtFld); - mpWrtShell->DelRight(); - i = mvPostItFlds.erase(i); - - // delete visual representation - // lazy delete doesn't work because references to document (mpFmtFld, mpView etc. may be dead before deletion) - delete pItem->pPostIt; - - // delete struct saving the pointers - delete pItem; - } - else - ++i; - } - */ mpWrtShell->EndUndo( UNDO_DELETE ); PrepareView(); mpWrtShell->EndAllAction(); @@ -1253,14 +1246,14 @@ void SwPostItMgr::Delete(String aAuthor) void SwPostItMgr::Delete() { mpWrtShell->StartAllAction(); - SetActivePostIt(0); + SetActiveSidebarWin(0); SwRewriter aRewriter; aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_DELETE_ALL_NOTES) ); mpWrtShell->StartUndo( UNDO_DELETE, &aRewriter ); - + std::vector aTmp; aTmp.reserve( mvPostItFlds.size() ); - for(std::list::iterator pPostIt = mvPostItFlds.begin(); pPostIt!= mvPostItFlds.end() ; pPostIt++) + for(std::list::iterator pPostIt = mvPostItFlds.begin(); pPostIt!= mvPostItFlds.end() ; pPostIt++) { if ((*pPostIt)->GetFmtFld()) aTmp.push_back( (*pPostIt)->GetFmtFld() ); @@ -1287,7 +1280,7 @@ void SwPostItMgr::Delete() } mvPostItFlds.clear(); */ - + mpWrtShell->EndUndo( UNDO_DELETE ); PrepareView(); mpWrtShell->EndAllAction(); @@ -1298,7 +1291,7 @@ void SwPostItMgr::Delete() void SwPostItMgr::Hide(SwPostItField* pPostItField ) { - for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { if ((*i)->GetFmtFld()) { @@ -1317,7 +1310,7 @@ void SwPostItMgr::Hide(SwPostItField* pPostItField ) void SwPostItMgr::Hide( const String& rAuthor ) { - for(SwMarginItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { if ( (*i)->pPostIt && ((*i)->pPostIt->GetAuthor() == rAuthor) ) { @@ -1331,7 +1324,7 @@ void SwPostItMgr::Hide( const String& rAuthor ) void SwPostItMgr::Hide() { - for(SwMarginItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { (*i)->bShow = false; (*i)->pPostIt->HideNote(); @@ -1341,7 +1334,7 @@ void SwPostItMgr::Hide() void SwPostItMgr::Show() { - for(SwMarginItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { (*i)->bShow = true; } @@ -1369,7 +1362,7 @@ void SwPostItMgr::Sort(const short aType) } } -SwMarginWin* SwPostItMgr::GetPostIt(SfxBroadcaster* pBroadcaster) const +SwSidebarWin* SwPostItMgr::GetPostIt(SfxBroadcaster* pBroadcaster) const { for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { @@ -1379,17 +1372,17 @@ SwMarginWin* SwPostItMgr::GetPostIt(SfxBroadcaster* pBroadcaster) const return NULL; } -SwPostIt* SwPostItMgr::GetPostIt(SwPostItField* pFld) const +sw::annotation::SwAnnotationWin* SwPostItMgr::GetPostIt(SwPostItField* pFld) const { for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld() == pFld) ) - return static_cast((*i)->pPostIt); + return dynamic_cast((*i)->pPostIt); } return NULL; } -SwMarginWin* SwPostItMgr::GetPostIt( const SfxBroadcaster* pBroadcaster) const +SwSidebarWin* SwPostItMgr::GetPostIt( const SfxBroadcaster* pBroadcaster) const { for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { @@ -1399,12 +1392,12 @@ SwMarginWin* SwPostItMgr::GetPostIt( const SfxBroadcaster* pBroadcaster) const return NULL; } -SwPostIt* SwPostItMgr::GetPostIt(const SwPostItField* pFld) const +sw::annotation::SwAnnotationWin* SwPostItMgr::GetPostIt(const SwPostItField* pFld) const { for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld() == pFld)) - return static_cast((*i)->pPostIt); + return dynamic_cast((*i)->pPostIt); } return NULL; } @@ -1433,19 +1426,20 @@ bool SwPostItMgr::ShowPreview(const SwField* pFld, SwFmtFld*& pFmtFld) const return false; } -SwMarginWin* SwPostItMgr::GetNextPostIt(USHORT aDirection, SwMarginWin* aPostIt) +SwSidebarWin* SwPostItMgr::GetNextPostIt( USHORT aDirection, + SwSidebarWin* aPostIt ) { if (mvPostItFlds.size()>1) { - for(SwMarginItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { if ( (*i)->pPostIt ==aPostIt) { - SwMarginItem_iterator iNextPostIt = i; + SwSidebarItem_iterator iNextPostIt = i; if (aDirection==KEY_PAGEUP) { if ( iNextPostIt==mvPostItFlds.begin() ) - { + { return NULL; } --iNextPostIt; @@ -1474,11 +1468,11 @@ long SwPostItMgr::GetNextBorder() { for (unsigned long n=0;nmList->begin(); b!= mPages[n]->mList->end(); b++) + for(SwSidebarItem_iterator b = mPages[n]->mList->begin(); b!= mPages[n]->mList->end(); b++) { if ((*b)->pPostIt == mpActivePostIt) { - SwMarginItem_iterator aNext = b; + SwSidebarItem_iterator aNext = b; aNext++; bool bFollow = (aNext == mPages[n]->mList->end()) ? false : (*aNext)->pPostIt->IsFollow(); if ( mPages[n]->bScrollbar || bFollow ) @@ -1511,15 +1505,15 @@ void SwPostItMgr::SetShadowState(const SwPostItField* pFld,bool bCursor) { // reset old one if still alive // TODO: does not work properly if mouse and cursor was set - SwPostIt* pOldPostIt = GetPostIt(mShadowState.mpShadowFld); + sw::annotation::SwAnnotationWin* pOldPostIt = GetPostIt(mShadowState.mpShadowFld); if (pOldPostIt && pOldPostIt->Shadow() && (pOldPostIt->Shadow()->GetShadowState() != SS_EDIT)) - pOldPostIt->SetViewState(SS_NORMAL); + pOldPostIt->SetViewState(VS_NORMAL); } //set new one, if it is not currently edited - SwPostIt* pNewPostIt = GetPostIt(pFld); + sw::annotation::SwAnnotationWin* pNewPostIt = GetPostIt(pFld); if (pNewPostIt && pNewPostIt->Shadow() && (pNewPostIt->Shadow()->GetShadowState() != SS_EDIT)) { - pNewPostIt->SetViewState(SS_VIEW); + pNewPostIt->SetViewState(VS_VIEW); //remember our new field mShadowState.mpShadowFld = pFld; mShadowState.bCursor = false; @@ -1542,10 +1536,10 @@ void SwPostItMgr::SetShadowState(const SwPostItField* pFld,bool bCursor) if (!mShadowState.bCursor && !mShadowState.bMouse) { // reset old one if still alive - SwPostIt* pOldPostIt = GetPostIt(mShadowState.mpShadowFld); + sw::annotation::SwAnnotationWin* pOldPostIt = GetPostIt(mShadowState.mpShadowFld); if (pOldPostIt && pOldPostIt->Shadow() && (pOldPostIt->Shadow()->GetShadowState() != SS_EDIT)) { - pOldPostIt->SetViewState(SS_NORMAL); + pOldPostIt->SetViewState(VS_NORMAL); mShadowState.mpShadowFld = 0; } } @@ -1561,7 +1555,7 @@ void SwPostItMgr::PrepareView(bool bIgnoreCount) //mpEditWin->Invalidate(); // really not needed anymore?? SwRootFrm* pLayout = mpWrtShell->GetLayout(); if ( pLayout ) - SwPostItHelper::setSidebarChanged( pLayout, + SwPostItHelper::setSidebarChanged( pLayout, mpWrtShell->getIDocumentSettingAccess()->get( IDocumentSettingAccess::BROWSE_MODE ) ); mpWrtShell->EndAllAction(); } @@ -1587,15 +1581,16 @@ bool SwPostItMgr::IsHit(const Point &aPointPixel) { Rectangle aRect; DBG_ASSERT(mPages.size()>nPageNum-1,"SwPostitMgr:: page container size wrong"); - aRect = mPages[nPageNum-1]->bMarginSide ? Rectangle(Point(aPageFrm.Left()-GetSidebarWidth()-GetSidebarBorderWidth(),aPageFrm.Top()),Size(GetSidebarWidth(),aPageFrm.Height())) : - Rectangle( Point(aPageFrm.Right()+GetSidebarBorderWidth(),aPageFrm.Top()) , Size(GetSidebarWidth(),aPageFrm.Height())); + aRect = mPages[nPageNum-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT + ? Rectangle(Point(aPageFrm.Left()-GetSidebarWidth()-GetSidebarBorderWidth(),aPageFrm.Top()),Size(GetSidebarWidth(),aPageFrm.Height())) + : Rectangle( Point(aPageFrm.Right()+GetSidebarBorderWidth(),aPageFrm.Top()) , Size(GetSidebarWidth(),aPageFrm.Height())); if (aRect.IsInside(aPoint)) { // we hit the note's sidebar // lets now test for the arrow area if (mPages[nPageNum-1]->bScrollbar) return ScrollbarHit(nPageNum,aPoint); - else + else return false; } } @@ -1605,8 +1600,9 @@ bool SwPostItMgr::IsHit(const Point &aPointPixel) Rectangle SwPostItMgr::GetBottomScrollRect(const unsigned long aPage) const { SwRect aPageRect = mPages[aPage-1]->mPageRect; - Point aPointBottom = mPages[aPage-1]->bMarginSide ? Point(aPageRect.Left() - GetSidebarWidth() - GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height()) : - Point(aPageRect.Right() + GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height()); + Point aPointBottom = mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT + ? Point(aPageRect.Left() - GetSidebarWidth() - GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height()) + : Point(aPageRect.Right() + GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height()); Size aSize(GetSidebarWidth() - mpEditWin->PixelToLogic(Size(4,0)).Width(), mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height()) ; return Rectangle(aPointBottom,aSize); @@ -1615,8 +1611,9 @@ Rectangle SwPostItMgr::GetBottomScrollRect(const unsigned long aPage) const Rectangle SwPostItMgr::GetTopScrollRect(const unsigned long aPage) const { SwRect aPageRect = mPages[aPage-1]->mPageRect; - Point aPointTop = mPages[aPage-1]->bMarginSide ? Point(aPageRect.Left() - GetSidebarWidth() -GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()) : - Point(aPageRect.Right() + GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()); + Point aPointTop = mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT + ? Point(aPageRect.Left() - GetSidebarWidth() -GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()) + : Point(aPageRect.Right() + GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()); Size aSize(GetSidebarWidth() - mpEditWin->PixelToLogic(Size(4,0)).Width(), mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height()) ; return Rectangle(aPointTop,aSize); } @@ -1626,11 +1623,13 @@ Rectangle SwPostItMgr::GetTopScrollRect(const unsigned long aPage) const bool SwPostItMgr::ScrollbarHit(const unsigned long aPage,const Point &aPoint) { SwRect aPageRect = mPages[aPage-1]->mPageRect; - Point aPointBottom = mPages[aPage-1]->bMarginSide ? Point(aPageRect.Left() - GetSidebarWidth()-GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height()) : - Point(aPageRect.Right() + GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height()); + Point aPointBottom = mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT + ? Point(aPageRect.Left() - GetSidebarWidth()-GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height()) + : Point(aPageRect.Right() + GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height()); - Point aPointTop = mPages[aPage-1]->bMarginSide ? Point(aPageRect.Left() - GetSidebarWidth()-GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()) : - Point(aPageRect.Right()+GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()); + Point aPointTop = mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT + ? Point(aPageRect.Left() - GetSidebarWidth()-GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()) + : Point(aPageRect.Right()+GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()); Rectangle aRectBottom(GetBottomScrollRect(aPage)); Rectangle aRectTop(GetTopScrollRect(aPage)); @@ -1661,8 +1660,8 @@ void SwPostItMgr::CorrectPositions() return; // find first valid note - SwMarginWin *pFirstPostIt = 0; - for(SwMarginItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + SwSidebarWin *pFirstPostIt = 0; + for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { pFirstPostIt = (*i)->pPostIt; if (pFirstPostIt) @@ -1674,22 +1673,22 @@ void SwPostItMgr::CorrectPositions() return; // yeah, I know, if this is a left page it could be wrong, but finding the page and the note is probably not even faster than just doing it - const long aAnkorX = mpEditWin->LogicToPixel( Point((long)(pFirstPostIt->Ankor()->GetSixthPosition().getX()),0)).X(); - const long aAnkorY = mpEditWin->LogicToPixel( Point(0,(long)(pFirstPostIt->Ankor()->GetSixthPosition().getY()))).Y() + 1; + const long aAnkorX = mpEditWin->LogicToPixel( Point((long)(pFirstPostIt->Anchor()->GetSixthPosition().getX()),0)).X(); + const long aAnkorY = mpEditWin->LogicToPixel( Point(0,(long)(pFirstPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1; if (Point(aAnkorX,aAnkorY) != pFirstPostIt->GetPosPixel()) { long aAnkorPosX = 0; long aAnkorPosY = 0; for (unsigned long n=0;nmList->begin(); i!= mPages[n]->mList->end(); i++) + for(SwSidebarItem_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++) { if ((*i)->bShow && (*i)->pPostIt) { - aAnkorPosX = mPages[n]->bMarginSide ? - mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Ankor()->GetSeventhPosition().getX()),0)).X() : - mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Ankor()->GetSixthPosition().getX()),0)).X(); - aAnkorPosY = mpEditWin->LogicToPixel( Point(0,(long)((*i)->pPostIt->Ankor()->GetSixthPosition().getY()))).Y() + 1; + aAnkorPosX = mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT + ? mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Anchor()->GetSeventhPosition().getX()),0)).X() + : mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Anchor()->GetSixthPosition().getX()),0)).X(); + aAnkorPosY = mpEditWin->LogicToPixel( Point(0,(long)((*i)->pPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1; (*i)->pPostIt->SetPosPixel(Point(aAnkorPosX,aAnkorPosY)); } } @@ -1776,14 +1775,14 @@ Color SwPostItMgr::GetColorAnkor(sal_uInt16 aAuthorIndex) return Color(COL_WHITE); } -void SwPostItMgr::SetActivePostIt( SwMarginWin* p) +void SwPostItMgr::SetActiveSidebarWin( SwSidebarWin* p) { if ( p != mpActivePostIt ) { // we need the temp variable so we can set mpActivePostIt before we call DeactivatePostIt // therefore we get a new layout in DOCCHANGED when switching from postit to document, // otherwise, GetActivePostIt() would still hold our old postit - SwMarginWin* pActive = mpActivePostIt; + SwSidebarWin* pActive = mpActivePostIt; mpActivePostIt = p; if (pActive) { @@ -1820,7 +1819,7 @@ IMPL_LINK( SwPostItMgr, CalcHdl, void*, /* pVoid*/ ) void SwPostItMgr::Rescale() { - for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) if ( (*i)->pPostIt ) (*i)->pPostIt->Rescale(); } @@ -1857,21 +1856,21 @@ sal_Int32 SwPostItMgr::GetSidebarScrollerHeight() const void SwPostItMgr::SetSpellChecking() { - for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) if ( (*i)->pPostIt ) (*i)->pPostIt->SetSpellChecking(); } void SwPostItMgr::SetReadOnlyState() { - for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) if ( (*i)->pPostIt ) (*i)->pPostIt->SetReadonly( mbReadOnly ); } void SwPostItMgr::CheckMetaText() { - for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) + for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) if ( (*i)->pPostIt ) (*i)->pPostIt->CheckMetaText(); @@ -1879,45 +1878,45 @@ void SwPostItMgr::CheckMetaText() sal_uInt16 SwPostItMgr::Replace(SvxSearchItem* pItem) { - SwMarginWin* pWin = GetActivePostIt(); - sal_uInt16 aResult = pWin->View()->StartSearchAndReplace( *pItem ); + SwSidebarWin* pWin = GetActiveSidebarWin(); + sal_uInt16 aResult = pWin->GetOutlinerView()->StartSearchAndReplace( *pItem ); if (!aResult) - SetActivePostIt(0); + SetActiveSidebarWin(0); return aResult; } sal_uInt16 SwPostItMgr::FinishSearchReplace(const ::com::sun::star::util::SearchOptions& rSearchOptions, bool bSrchForward) { - SwMarginWin* pWin = GetActivePostIt(); + SwSidebarWin* pWin = GetActiveSidebarWin(); SvxSearchItem aItem(SID_SEARCH_ITEM ); aItem.SetSearchOptions(rSearchOptions); aItem.SetBackward(!bSrchForward); - sal_uInt16 aResult = pWin->View()->StartSearchAndReplace( aItem ); + sal_uInt16 aResult = pWin->GetOutlinerView()->StartSearchAndReplace( aItem ); if (!aResult) - SetActivePostIt(0); + SetActiveSidebarWin(0); return aResult; } sal_uInt16 SwPostItMgr::SearchReplace(const SwFmtFld &pFld, const ::com::sun::star::util::SearchOptions& rSearchOptions, bool bSrchForward) { sal_uInt16 aResult = 0; - SwMarginWin* pWin = GetPostIt(&pFld); + SwSidebarWin* pWin = GetPostIt(&pFld); if (pWin) { - ESelection aOldSelection = pWin->View()->GetSelection(); + ESelection aOldSelection = pWin->GetOutlinerView()->GetSelection(); if (bSrchForward) - pWin->View()->SetSelection(ESelection(0,0,0,0)); + pWin->GetOutlinerView()->SetSelection(ESelection(0,0,0,0)); else - pWin->View()->SetSelection(ESelection(0xFFFF,0xFFFF,0xFFFF,0xFFFF)); + pWin->GetOutlinerView()->SetSelection(ESelection(0xFFFF,0xFFFF,0xFFFF,0xFFFF)); SvxSearchItem aItem(SID_SEARCH_ITEM ); aItem.SetSearchOptions(rSearchOptions); aItem.SetBackward(!bSrchForward); - aResult = pWin->View()->StartSearchAndReplace( aItem ); + aResult = pWin->GetOutlinerView()->StartSearchAndReplace( aItem ); if (!aResult) - pWin->View()->SetSelection(aOldSelection); + pWin->GetOutlinerView()->SetSelection(aOldSelection); else { - SetActivePostIt(pWin); + SetActiveSidebarWin(pWin); MakeVisible(pWin); } } @@ -1943,8 +1942,59 @@ void SwPostItMgr::AssureStdModeAtShell() mpWrtShell->LeaveSelFrmMode(); mpWrtShell->GetView().LeaveDrawCreate(); mpWrtShell->EnterStdMode(); - + mpWrtShell->DrawSelChanged(); mpView->StopShellTimer(); } } + +bool SwPostItMgr::HasActiveSidebarWin() const +{ + return mpActivePostIt != 0; +} + +bool SwPostItMgr::HasActiveAnnotationWin() const +{ + return HasActiveSidebarWin() && + dynamic_cast(mpActivePostIt) != 0; +} + +void SwPostItMgr::GrabFocusOnActiveSidebarWin() +{ + if ( HasActiveSidebarWin() ) + { + mpActivePostIt->GrabFocus(); + } +} + +void SwPostItMgr::UpdateDataOnActiveSidebarWin() +{ + if ( HasActiveSidebarWin() ) + { + mpActivePostIt->UpdateData(); + } +} + +void SwPostItMgr::DeleteActiveSidebarWin() +{ + if ( HasActiveSidebarWin() ) + { + mpActivePostIt->Delete(); + } +} + +void SwPostItMgr::HideActiveSidebarWin() +{ + if ( HasActiveSidebarWin() ) + { + mpActivePostIt->Hide(); + } +} + +void SwPostItMgr::ToggleInsModeOnActiveSidebarWin() +{ + if ( HasActiveSidebarWin() ) + { + mpActivePostIt->ToggleInsMode(); + } +} diff --git a/sw/source/ui/docvw/ShadowOverlayObject.cxx b/sw/source/ui/docvw/ShadowOverlayObject.cxx new file mode 100644 index 0000000000..ac81dad25d --- /dev/null +++ b/sw/source/ui/docvw/ShadowOverlayObject.cxx @@ -0,0 +1,269 @@ +/************************************************************************* * + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: postit.cxx,v $ + * $Revision: 1.8.42.11 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#include "precompiled_sw.hxx" + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +namespace sw { namespace sidebarwindows { + +////////////////////////////////////////////////////////////////////////////// +// helper SwPostItShadowPrimitive +// +// Used to allow view-dependent primitive definition. For that purpose, the +// initially created primitive (this one) always has to be view-independent, +// but the decomposition is made view-dependent. Very simple primitive which +// just remembers the discrete data and applies it at decomposition time. + +class ShadowPrimitive : public drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D +{ +private: + basegfx::B2DPoint maBasePosition; + basegfx::B2DPoint maSecondPosition; + ShadowState maShadowState; + +protected: + virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition( + const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + +public: + ShadowPrimitive( + const basegfx::B2DPoint& rBasePosition, + const basegfx::B2DPoint& rSecondPosition, + ShadowState aShadowState) + : drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D(), + maBasePosition(rBasePosition), + maSecondPosition(rSecondPosition), + maShadowState(aShadowState) + {} + + // data access + const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; } + const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; } + ShadowState getShadowState() const { return maShadowState; } + + virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const; + + DeclPrimitrive2DIDBlock() +}; + +drawinglayer::primitive2d::Primitive2DSequence ShadowPrimitive::createLocalDecomposition( + const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) const +{ + // get logic sizes in object coordinate system + drawinglayer::primitive2d::Primitive2DSequence xRetval; + basegfx::B2DRange aRange(getBasePosition()); + + switch(maShadowState) + { + case SS_NORMAL: + { + aRange.expand(basegfx::B2DTuple(getSecondPosition().getX(), getSecondPosition().getY() + (2.0 * getDiscreteUnit()))); + const ::drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute( + drawinglayer::attribute::GRADIENTSTYLE_LINEAR, + 0.0, + 0.5, + 0.5, + 1800.0 * F_PI1800, + basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0), + basegfx::BColor(180.0/255.0,180.0/255.0,180.0/255.0), + 2); + + const drawinglayer::primitive2d::Primitive2DReference xReference( + new drawinglayer::primitive2d::FillGradientPrimitive2D( + aRange, + aFillGradientAttribute)); + + xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); + break; + } + case SS_VIEW: + { + aRange.expand(basegfx::B2DTuple(getSecondPosition().getX(), getSecondPosition().getY() + (4.0 * getDiscreteUnit()))); + const drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute( + drawinglayer::attribute::GRADIENTSTYLE_LINEAR, + 0.0, + 0.5, + 0.5, + 1800.0 * F_PI1800, + basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0), + basegfx::BColor(180.0/255.0,180.0/255.0,180.0/255.0), + 4); + + const drawinglayer::primitive2d::Primitive2DReference xReference( + new drawinglayer::primitive2d::FillGradientPrimitive2D( + aRange, + aFillGradientAttribute)); + + xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); + break; + } + case SS_EDIT: + { + aRange.expand(basegfx::B2DTuple(getSecondPosition().getX(), getSecondPosition().getY() + (4.0 * getDiscreteUnit()))); + const drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute( + drawinglayer::attribute::GRADIENTSTYLE_LINEAR, + 0.0, + 0.5, + 0.5, + 1800.0 * F_PI1800, + basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0), + basegfx::BColor(83.0/255.0,83.0/255.0,83.0/255.0), + 4); + + const drawinglayer::primitive2d::Primitive2DReference xReference( + new drawinglayer::primitive2d::FillGradientPrimitive2D( + aRange, + aFillGradientAttribute)); + + xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); + break; + } + default: + { + break; + } + } + + return xRetval; +} + +bool ShadowPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const +{ + if(drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::operator==(rPrimitive)) + { + const ShadowPrimitive& rCompare = static_cast< const ShadowPrimitive& >(rPrimitive); + + return (getBasePosition() == rCompare.getBasePosition() + && getSecondPosition() == rCompare.getSecondPosition() + && getShadowState() == rCompare.getShadowState()); + } + + return false; +} + +ImplPrimitrive2DIDBlock(ShadowPrimitive, PRIMITIVE2D_ID_SWSIDEBARSHADOWPRIMITIVE) + +/****** ShadowOverlayObject **************************************************/ +/* static */ ShadowOverlayObject* ShadowOverlayObject::CreateShadowOverlayObject( SwView& rDocView ) +{ + ShadowOverlayObject* pShadowOverlayObject( 0 ); + + if ( rDocView.GetDrawView() ) + { + SdrPaintWindow* pPaintWindow = rDocView.GetDrawView()->GetPaintWindow(0); + if( pPaintWindow ) + { + sdr::overlay::OverlayManager* pOverlayManager = pPaintWindow->GetOverlayManager(); + + if ( pOverlayManager ) + { + pShadowOverlayObject = new ShadowOverlayObject( basegfx::B2DPoint(0,0), + basegfx::B2DPoint(0,0), + Color(0,0,0), + SS_NORMAL ); + pOverlayManager->add(*pShadowOverlayObject); + } + } + } + + return pShadowOverlayObject; +} + +/* static */ void ShadowOverlayObject::DestroyShadowOverlayObject( ShadowOverlayObject* pShadow ) +{ + if ( pShadow ) + { + if ( pShadow->getOverlayManager() ) + { + pShadow->getOverlayManager()->remove(*pShadow); + } + delete pShadow; + } +} + +ShadowOverlayObject::ShadowOverlayObject( const basegfx::B2DPoint& rBasePos, + const basegfx::B2DPoint& rSecondPosition, + Color aBaseColor, + ShadowState aState ) + : OverlayObjectWithBasePosition(rBasePos, aBaseColor) + , maSecondPosition(rSecondPosition) + , mShadowState(aState) +{ +} + +ShadowOverlayObject::~ShadowOverlayObject() +{ +} + +drawinglayer::primitive2d::Primitive2DSequence ShadowOverlayObject::createOverlayObjectPrimitive2DSequence() +{ + const drawinglayer::primitive2d::Primitive2DReference aReference( + new ShadowPrimitive( getBasePosition(), + GetSecondPosition(), + GetShadowState() ) ); + return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1); +} + +void ShadowOverlayObject::SetShadowState(ShadowState aState) +{ + if (mShadowState != aState) + { + mShadowState = aState; + + objectChange(); + } +} + +void ShadowOverlayObject::SetPosition( const basegfx::B2DPoint& rPoint1, + const basegfx::B2DPoint& rPoint2) +{ + if(!rPoint1.equal(getBasePosition()) || !rPoint2.equal(GetSecondPosition())) + { + maBasePosition = rPoint1; + maSecondPosition = rPoint2; + + objectChange(); + } +} + +} } // end of namespace sw::sidebarwindows + diff --git a/sw/source/ui/docvw/ShadowOverlayObject.hxx b/sw/source/ui/docvw/ShadowOverlayObject.hxx new file mode 100644 index 0000000000..a00aea380f --- /dev/null +++ b/sw/source/ui/docvw/ShadowOverlayObject.hxx @@ -0,0 +1,80 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SHADOWOVERLAYOBJECT_HXX +#define _SHADOWOVERLAYOBJECT_HXX + +#include + +class SwView; + +namespace sw { namespace sidebarwindows { + +enum ShadowState +{ + SS_NORMAL, + SS_VIEW, + SS_EDIT +}; + +class ShadowOverlayObject: public sdr::overlay::OverlayObjectWithBasePosition +{ + protected: + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + private: + basegfx::B2DPoint maSecondPosition; + ShadowState mShadowState; + + ShadowOverlayObject( const basegfx::B2DPoint& rBasePos, + const basegfx::B2DPoint& rSecondPosition, + Color aBaseColor, + ShadowState aState ); + virtual ~ShadowOverlayObject(); + + public: + void SetShadowState(ShadowState aState); + inline ShadowState GetShadowState() {return mShadowState;} + + inline const basegfx::B2DPoint& GetSecondPosition() const { return maSecondPosition; } + void SetSecondPosition( const basegfx::B2DPoint& rNew ); + + void SetPosition( const basegfx::B2DPoint& rPoint1, + const basegfx::B2DPoint& rPoint2 ); + + static ShadowOverlayObject* CreateShadowOverlayObject( SwView& rDocView ); + static void DestroyShadowOverlayObject( ShadowOverlayObject* pShadow ); +}; + +} } // end of namespace sw::sidebarwindows + +#endif diff --git a/sw/source/ui/docvw/SidebarTxtControl.cxx b/sw/source/ui/docvw/SidebarTxtControl.cxx new file mode 100644 index 0000000000..7b421327e4 --- /dev/null +++ b/sw/source/ui/docvw/SidebarTxtControl.cxx @@ -0,0 +1,411 @@ +/************************************************************************* * + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#include "precompiled_sw.hxx" + +#include + +#include + +#include +#include + +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace css = ::com::sun::star; + +namespace sw { namespace sidebarwindows { + +SidebarTxtControl::SidebarTxtControl( SwSidebarWin& rSidebarWin, + WinBits nBits, + SwView& rDocView, + SwPostItMgr& rPostItMgr ) + : Control( &rSidebarWin, nBits ) + , mpOutlinerView(0) + , mrSidebarWin( rSidebarWin ) + , mrDocView( rDocView ) + , mrPostItMgr( rPostItMgr ) + , mbMouseOver( false ) +{ + AddEventListener( LINK( &mrSidebarWin, SwSidebarWin, WindowEventListener ) ); +} + +SidebarTxtControl::~SidebarTxtControl() +{ + RemoveEventListener( LINK( &mrSidebarWin, SwSidebarWin, WindowEventListener ) ); +} + +void SidebarTxtControl::GetFocus() +{ + Window::GetFocus(); + if ( !mrSidebarWin.IsMouseOver() ) + { + Invalidate(); + } +} + +void SidebarTxtControl::LoseFocus() +{ + // write the visible text back into the SwField + mrSidebarWin.UpdateData(); + + Window::LoseFocus(); + if ( !mrSidebarWin.IsMouseOver() ) + { + Invalidate(); + } +} + +void SidebarTxtControl::RequestHelp(const HelpEvent &rEvt) +{ + USHORT nResId = 0; + switch( mrSidebarWin.GetLayoutStatus() ) + { + case SwPostItHelper::INSERTED: nResId = STR_REDLINE_INSERT; break; + case SwPostItHelper::DELETED: nResId = STR_REDLINE_DELETE; break; + default: nResId = 0; + } + + SwContentAtPos aCntntAtPos( SwContentAtPos::SW_REDLINE ); + if ( nResId && + mrDocView.GetWrtShell().GetContentAtPos( mrSidebarWin.GetAnchorPos(), aCntntAtPos ) ) + { + String sTxt; + sTxt = SW_RESSTR( nResId ); + sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM(": " )); + sTxt += aCntntAtPos.aFnd.pRedl->GetAuthorString(); + sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " - " )); + sTxt += GetAppLangDateTimeString( aCntntAtPos.aFnd.pRedl->GetTimeStamp() ); + Help::ShowQuickHelp( this,PixelToLogic(Rectangle(rEvt.GetMousePosPixel(),Size(50,10))),sTxt); + } +} + +void SidebarTxtControl::Paint( const Rectangle& rRect) +{ + if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) + { + if ( mrSidebarWin.IsMouseOverSidebarWin() || + HasFocus() ) + { + DrawGradient( Rectangle( Point(0,0), PixelToLogic(GetSizePixel()) ), + Gradient( GRADIENT_LINEAR, + mrSidebarWin.ColorDark(), + mrSidebarWin.ColorDark() ) ); + } + else + { + DrawGradient( Rectangle( Point(0,0), PixelToLogic(GetSizePixel()) ), + Gradient( GRADIENT_LINEAR, + mrSidebarWin.ColorLight(), + mrSidebarWin.ColorDark())); + } + } + + mpOutlinerView->Paint( rRect ); + + if ( mrSidebarWin.GetLayoutStatus()==SwPostItHelper::DELETED ) + { + SetLineColor(mrSidebarWin.GetChangeColor()); + DrawLine( PixelToLogic( GetPosPixel() ), + PixelToLogic( GetPosPixel() + + Point( GetSizePixel().Width(), + GetSizePixel().Height() ) ) ); + DrawLine( PixelToLogic( GetPosPixel() + + Point( GetSizePixel().Width(),0) ), + PixelToLogic( GetPosPixel() + + Point( 0, GetSizePixel().Height() ) ) ); + } +} + +void SidebarTxtControl::KeyInput( const KeyEvent& rKeyEvt ) +{ + const KeyCode& rKeyCode = rKeyEvt.GetKeyCode(); + USHORT nKey = rKeyCode.GetCode(); + if ( ( rKeyCode.IsMod1() && rKeyCode.IsMod2() ) && + ( (nKey == KEY_PAGEUP) || (nKey == KEY_PAGEDOWN) ) ) + { + mrSidebarWin.SwitchToPostIt(nKey); + } + else if ( nKey == KEY_ESCAPE || + ( rKeyCode.IsMod1() && + ( nKey == KEY_PAGEUP || + nKey == KEY_PAGEDOWN ) ) ) + { + mrSidebarWin.SwitchToFieldPos(); + } + else if ( nKey == KEY_INSERT ) + { + if ( !rKeyCode.IsMod1() && !rKeyCode.IsMod2() ) + { + mrSidebarWin.ToggleInsMode(); + } + } + else + { + //let's make sure we see our note + mrPostItMgr.MakeVisible(&mrSidebarWin); + + long aOldHeight = mrSidebarWin.GetPostItTextHeight(); + bool bDone = false; + + /// HACK: need to switch off processing of Undo/Redo in Outliner + if ( !( (nKey == KEY_Z || nKey == KEY_Y) && rKeyCode.IsMod1()) ) + { + bool bIsProtected = mrSidebarWin.IsProtected(); + if ( !bIsProtected || + ( bIsProtected && + !mrSidebarWin.GetOutlinerView()->GetOutliner()->GetEditEngine().DoesKeyChangeText(rKeyEvt)) ) + { + bDone = mpOutlinerView->PostKeyEvent( rKeyEvt ); + } + else + { + InfoBox( this, SW_RES( MSG_READONLY_CONTENT )).Execute(); + } + } + if (bDone) + mrSidebarWin.ResizeIfNeccessary( aOldHeight, mrSidebarWin.GetPostItTextHeight() ); + else + { + // write back data first when showing navigator + if ( nKey==KEY_F5 ) + mrSidebarWin.UpdateData(); + if (!mrDocView.KeyInput(rKeyEvt)) + Window::KeyInput(rKeyEvt); + } + } + + mrDocView.GetViewFrame()->GetBindings().InvalidateAll(FALSE); +} + +void SidebarTxtControl::MouseMove( const MouseEvent& rMEvt ) +{ + if ( mpOutlinerView ) + { + mpOutlinerView->MouseMove( rMEvt ); + // mba: why does OutlinerView not handle the modifier setting?! + // this forces the postit to handle *all* pointer types + SetPointer( mpOutlinerView->GetPointer( rMEvt.GetPosPixel() ) ); + + const EditView& aEV = mpOutlinerView->GetEditView(); + const SvxFieldItem* pItem = aEV.GetFieldUnderMousePointer(); + if ( pItem ) + { + const SvxFieldData* pFld = pItem->GetField(); + const SvxURLField* pURL = PTR_CAST( SvxURLField, pFld ); + if ( pURL ) + { + String sURL( pURL->GetURL() ); + SvtSecurityOptions aSecOpts; + if ( aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK) ) + { + sURL.InsertAscii( ": ", 0 ); + sURL.Insert( ViewShell::GetShellRes()->aHyperlinkClick, 0 ); + } + Help::ShowQuickHelp( this,PixelToLogic(Rectangle(GetPosPixel(),Size(50,10))),sURL); + } + } + } +} + +void SidebarTxtControl::MouseButtonDown( const MouseEvent& rMEvt ) +{ + if (mpOutlinerView ) + { + SvtSecurityOptions aSecOpts; + bool bExecuteMod = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK); + + if ( !bExecuteMod || (bExecuteMod && rMEvt.GetModifier() == KEY_MOD1)) + { + const EditView& aEV = mpOutlinerView->GetEditView(); + const SvxFieldItem* pItem = aEV.GetFieldUnderMousePointer(); + if ( pItem ) + { + const SvxFieldData* pFld = pItem->GetField(); + const SvxURLField* pURL = PTR_CAST( SvxURLField, pFld ); + if ( pURL ) + { + mpOutlinerView->MouseButtonDown( rMEvt ); + SwWrtShell &rSh = mrDocView.GetWrtShell(); + String sURL( pURL->GetURL() ); + String sTarget( pURL->GetTargetFrame() ); + ::LoadURL( sURL, &rSh, URLLOAD_NOFILTER, &sTarget); + return; + } + } + } + } + + GrabFocus(); + if ( mpOutlinerView ) + mpOutlinerView->MouseButtonDown( rMEvt ); + mrDocView.GetViewFrame()->GetBindings().InvalidateAll(FALSE); +} + +void SidebarTxtControl::MouseButtonUp( const MouseEvent& rMEvt ) +{ + if ( mpOutlinerView ) + mpOutlinerView->MouseButtonUp( rMEvt ); +} + +IMPL_LINK( SidebarTxtControl, OnlineSpellCallback, SpellCallbackInfo*, pInfo ) +{ + if ( pInfo->nCommand == SPELLCMD_STARTSPELLDLG ) + { + mrDocView.GetViewFrame()->GetDispatcher()->Execute( FN_SPELL_GRAMMAR_DIALOG, SFX_CALLMODE_ASYNCHRON); + } + return 0; +} + +IMPL_LINK( SidebarTxtControl, Select, Menu*, pSelMenu ) +{ + mrSidebarWin.ExecuteCommand( pSelMenu->GetCurItemId() ); + return 0; +} + +void SidebarTxtControl::Command( const CommandEvent& rCEvt ) +{ + if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ) + { + if (!mrSidebarWin.IsProtected() && + mpOutlinerView->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(),TRUE )) + { + Link aLink = LINK(this, SidebarTxtControl, OnlineSpellCallback); + mpOutlinerView->ExecuteSpellPopup(rCEvt.GetMousePosPixel(),&aLink); + } + else + { + SfxPopupMenuManager* aMgr = mrDocView.GetViewFrame()->GetDispatcher()->Popup(0, this,&rCEvt.GetMousePosPixel()); + ((PopupMenu*)aMgr->GetSVMenu())->SetSelectHdl( LINK(this, SidebarTxtControl, Select) ); + + { + XubString aText = ((PopupMenu*)aMgr->GetSVMenu())->GetItemText( FN_DELETE_NOTE_AUTHOR ); + SwRewriter aRewriter; + aRewriter.AddRule(UNDO_ARG1, mrSidebarWin.GetAuthor()); + aText = aRewriter.Apply(aText); + ((PopupMenu*)aMgr->GetSVMenu())->SetItemText(FN_DELETE_NOTE_AUTHOR,aText); + } + + if (rCEvt.IsMouseEvent()) + ((PopupMenu*)aMgr->GetSVMenu())->Execute(this,rCEvt.GetMousePosPixel()); + else + { + const Size aSize = GetSizePixel(); + const Point aPos = Point( aSize.getWidth()/2, aSize.getHeight()/2 ); + ((PopupMenu*)aMgr->GetSVMenu())->Execute(this,aPos); + } + delete aMgr; + } + } + else + if (rCEvt.GetCommand() == COMMAND_WHEEL) + { + if (mrSidebarWin.IsScrollbarVisible()) + { + const CommandWheelData* pData = rCEvt.GetWheelData(); + if (pData->IsShift() || pData->IsMod1() || pData->IsMod2()) + { + mrDocView.HandleWheelCommands(rCEvt); + } + else + { + HandleScrollCommand( rCEvt, 0 , mrSidebarWin.Scrollbar()); + } + } + else + { + mrDocView.HandleWheelCommands(rCEvt); + } + } + else + { + if ( mpOutlinerView ) + mpOutlinerView->Command( rCEvt ); + else + Window::Command(rCEvt); + } +} + +XubString SidebarTxtControl::GetSurroundingText() const +{ + if( mpOutlinerView ) + return mpOutlinerView->GetSurroundingText(); + else + return XubString::EmptyString(); +} + +Selection SidebarTxtControl::GetSurroundingTextSelection() const +{ + if( mpOutlinerView ) + return mpOutlinerView->GetSurroundingTextSelection(); + else + return Selection( 0, 0 ); +} + +css::uno::Reference< css::accessibility::XAccessible > SidebarTxtControl::CreateAccessible() +{ + + SidebarTxtControlAccessible* pAcc( new SidebarTxtControlAccessible( *this ) ); + css::uno::Reference< css::awt::XWindowPeer > xWinPeer( pAcc ); + SetWindowPeer( xWinPeer, pAcc ); + + css::uno::Reference< css::accessibility::XAccessible > xAcc( xWinPeer, css::uno::UNO_QUERY ); + return xAcc; +} + +} } // end of namespace sw::sidebarwindows + diff --git a/sw/source/ui/docvw/SidebarTxtControl.hxx b/sw/source/ui/docvw/SidebarTxtControl.hxx new file mode 100644 index 0000000000..5ce309e5f2 --- /dev/null +++ b/sw/source/ui/docvw/SidebarTxtControl.hxx @@ -0,0 +1,95 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SIDEBARTXTCONTROL_HXX +#define _SIDEBARTXTCONTROL_HXX + +#include + +class OutlinerView; +class SwView; +class SwPostItMgr; +class SpellCallbackInfo; + +namespace sw { namespace sidebarwindows { + +class SwSidebarWin; + +class SidebarTxtControl : public Control +{ + private: + OutlinerView* mpOutlinerView; + SwSidebarWin& mrSidebarWin; + SwView& mrDocView; + SwPostItMgr& mrPostItMgr; + + bool mbMouseOver; + + protected: + virtual void Paint( const Rectangle& rRect); + virtual void KeyInput( const KeyEvent& rKeyEvt ); + virtual void MouseMove( const MouseEvent& rMEvt ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseButtonUp( const MouseEvent& rMEvt ); + virtual void Command( const CommandEvent& rCEvt ); + virtual void LoseFocus(); + virtual void RequestHelp(const HelpEvent &rEvt); + virtual XubString GetSurroundingText() const; + virtual Selection GetSurroundingTextSelection() const; + + DECL_LINK( Select, Menu* ); + + public: + SidebarTxtControl( SwSidebarWin& rSidebarWin, + WinBits nBits, + SwView& rDocView, + SwPostItMgr& rPostItMgr ); + ~SidebarTxtControl(); + + virtual void GetFocus(); + + inline void SetTextView( OutlinerView* aEditView ) + { + mpOutlinerView = aEditView; + } + inline OutlinerView* GetTextView() const + { + return mpOutlinerView; + } + + DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*); + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); +}; + +} } // end of namespace sw::sidebarwindows + +#endif diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx new file mode 100644 index 0000000000..4354b27346 --- /dev/null +++ b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx @@ -0,0 +1,215 @@ +/************************************************************************* * + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#include "precompiled_sw.hxx" + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace css = ::com::sun::star; + +namespace sw { namespace sidebarwindows { + +// ============================================================================= +// declaration and implementation of +// for <::accessibiliy::AccessibleTextHelper> instance +// ============================================================================= +class SidebarTextEditSource : public SvxEditSource, + public SfxBroadcaster +{ + public: + SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl ); + virtual ~SidebarTextEditSource(); + + virtual SvxEditSource* Clone() const; + + virtual SvxTextForwarder* GetTextForwarder(); + virtual SvxViewForwarder* GetViewForwarder(); + virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool bCreate = sal_False ); + + virtual void UpdateData(); + + virtual SfxBroadcaster& GetBroadcaster() const; + + private: + SidebarTxtControl& mrSidebarTxtControl; + SvxOutlinerForwarder mTextForwarder; + SvxDrawOutlinerViewForwarder mViewForwarder; +}; + +SidebarTextEditSource::SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl ) + : SvxEditSource() + , mrSidebarTxtControl( rSidebarTxtControl ) + , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), NULL ) + , mViewForwarder( *(rSidebarTxtControl.GetTextView()) ) +{ +} + +SidebarTextEditSource::~SidebarTextEditSource() +{ +} + +SvxEditSource* SidebarTextEditSource::Clone() const +{ + return new SidebarTextEditSource( mrSidebarTxtControl ); +} + +SvxTextForwarder* SidebarTextEditSource::GetTextForwarder() +{ + return &mTextForwarder; +} + +SvxViewForwarder* SidebarTextEditSource::GetViewForwarder() +{ + return &mViewForwarder; +} + +SvxEditViewForwarder* SidebarTextEditSource::GetEditViewForwarder( sal_Bool /*bCreate*/ ) +{ + return &mViewForwarder; +} + +void SidebarTextEditSource::UpdateData() +{ + // nothing to do +} + +SfxBroadcaster& SidebarTextEditSource::GetBroadcaster() const +{ + return *( const_cast< SidebarTextEditSource* > (this) ); +} + +// ============================================================================= +// declaration and implementation of accessible context for instance +// ============================================================================= +class SidebarTxtControlAccessibleContext : public VCLXAccessibleComponent +{ + public: + explicit SidebarTxtControlAccessibleContext( SidebarTxtControl& rSidebarTxtControl ); + virtual ~SidebarTxtControlAccessibleContext(); + + virtual sal_Int32 SAL_CALL + getAccessibleChildCount() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL + getAccessibleChild( sal_Int32 i ) + throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL + addEventListener ( + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleEventListener >& xListener) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL + removeEventListener ( + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleEventListener >& xListener) + throw (::com::sun::star::uno::RuntimeException); + + private: + SidebarTxtControl& mrSidebarTxtControl; + ::accessibility::AccessibleTextHelper* mpAccessibleTextHelper; +}; + +SidebarTxtControlAccessibleContext::SidebarTxtControlAccessibleContext( SidebarTxtControl& rSidebarTxtControl ) + : VCLXAccessibleComponent( rSidebarTxtControl.GetWindowPeer() ) + , mrSidebarTxtControl( rSidebarTxtControl ) + , mpAccessibleTextHelper( 0 ) +{ + ::std::auto_ptr pEditSource( + new SidebarTextEditSource( mrSidebarTxtControl ) ); + mpAccessibleTextHelper = new ::accessibility::AccessibleTextHelper( pEditSource ); + mpAccessibleTextHelper->SetEventSource( mrSidebarTxtControl.GetWindowPeer() ); +} + +SidebarTxtControlAccessibleContext::~SidebarTxtControlAccessibleContext() +{ + delete mpAccessibleTextHelper; +} + +sal_Int32 SAL_CALL SidebarTxtControlAccessibleContext::getAccessibleChildCount() + throw (::com::sun::star::uno::RuntimeException) +{ + return mpAccessibleTextHelper->GetChildCount(); +} + +css::uno::Reference< css::accessibility::XAccessible > SAL_CALL SidebarTxtControlAccessibleContext::getAccessibleChild( sal_Int32 i ) + throw ( css::lang::IndexOutOfBoundsException, css::uno::RuntimeException ) +{ + return mpAccessibleTextHelper->GetChild( i ); +} + +void SAL_CALL SidebarTxtControlAccessibleContext::addEventListener ( + const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener) + throw (css::uno::RuntimeException) +{ + mpAccessibleTextHelper->AddEventListener(xListener); +} + +void SAL_CALL SidebarTxtControlAccessibleContext::removeEventListener ( + const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener) + throw (css::uno::RuntimeException) +{ + mpAccessibleTextHelper->RemoveEventListener(xListener); +} + +// ============================================================================= +// implementaion of accessible for instance +// ============================================================================= +SidebarTxtControlAccessible::SidebarTxtControlAccessible( SidebarTxtControl& rSidebarTxtControl ) + : VCLXWindow() + , mrSidebarTxtControl( rSidebarTxtControl ) +{ + SetWindow( &mrSidebarTxtControl ); +} + +SidebarTxtControlAccessible::~SidebarTxtControlAccessible() +{ +} + +css::uno::Reference< css::accessibility::XAccessibleContext > SidebarTxtControlAccessible::CreateAccessibleContext() +{ + SidebarTxtControlAccessibleContext* pAccContext( + new SidebarTxtControlAccessibleContext( mrSidebarTxtControl ) ); + css::uno::Reference< css::accessibility::XAccessibleContext > xAcc( pAccContext ); + return xAcc; +} + +} } // end of namespace sw::sidebarwindows + diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.hxx b/sw/source/ui/docvw/SidebarTxtControlAcc.hxx new file mode 100644 index 0000000000..57edc50512 --- /dev/null +++ b/sw/source/ui/docvw/SidebarTxtControlAcc.hxx @@ -0,0 +1,56 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SIDEBARTXTCONTROLACC_HXX +#define _SIDEBARTXTCONTROLACC_HXX + +#include + +namespace sw { namespace sidebarwindows { + +class SidebarTxtControl; + +class SidebarTxtControlAccessible : public VCLXWindow +{ + public: + explicit SidebarTxtControlAccessible( SidebarTxtControl& rSidebarTxtControl ); + virtual ~SidebarTxtControlAccessible(); + + virtual com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessibleContext > + CreateAccessibleContext(); + + private: + SidebarTxtControl& mrSidebarTxtControl; +}; + +} } // end of namespace sw::sidebarwindows + +#endif diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx new file mode 100644 index 0000000000..85d59b71fa --- /dev/null +++ b/sw/source/ui/docvw/SidebarWin.cxx @@ -0,0 +1,1299 @@ +/************************************************************************* * + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_sw.hxx" + +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace css = ::com::sun::star; + +namespace sw { namespace sidebarwindows { + +#define METABUTTON_WIDTH 16 +#define METABUTTON_HEIGHT 18 +#define METABUTTON_AREA_WIDTH 30 +#define POSTIT_META_HEIGHT (sal_Int32) 30 +#define POSTIT_MINIMUMSIZE_WITHOUT_META 50 + +#define POSTIT_SHADOW_BRIGHT Color(180,180,180) +#define POSTIT_SHADOW_DARK Color(83,83,83) + +#define EMPTYSTRING rtl::OUString::createFromAscii("") + +/************** SwSidebarWin************************************/ +SwSidebarWin::SwSidebarWin( SwEditWin& rEditWin, + WinBits nBits, + SwPostItMgr& aMgr, + SwPostItBits aBits) + : Window(&rEditWin, nBits) + , mrView( rEditWin.GetView() ) + , mrMgr(aMgr) + , nFlags(aBits) + , mnEventId(0) + , mpOutlinerView(0) + , mpOutliner(0) + , mpSidebarTxtControl(0) + , mpVScrollbar(0) + , mpMetadataAuthor(0) + , mpMetadataDate(0) + , mpMenuButton(0) + , mpAnchor(0) + , mpShadow(0) + , mColorAnchor() + , mColorDark() + , mColorLight() + , mChangeColor() + , meSidebarPosition( sw::sidebarwindows::SIDEBAR_NONE ) + , mPosSize() + , mAnchorRect() + , mPageBorder( 0 ) + , mbMouseOver( false ) + , mLayoutStatus( SwPostItHelper::INVISIBLE ) + , mbReadonly( false ) + , mbIsFollow( false ) +{ + mpShadow = ShadowOverlayObject::CreateShadowOverlayObject( mrView ); + if ( mpShadow ) + { + mpShadow->setVisible(false); + } +} + +SwSidebarWin::~SwSidebarWin() +{ + if (mpOutlinerView) + { + delete mpOutlinerView; + } + + if (mpOutliner) + { + delete mpOutliner; + } + + if (mpMetadataAuthor) + { + mpMetadataAuthor->RemoveEventListener( LINK( this, SwSidebarWin, WindowEventListener ) ); + delete mpMetadataAuthor; + } + + if (mpMetadataDate) + { + mpMetadataDate->RemoveEventListener( LINK( this, SwSidebarWin, WindowEventListener ) ); + delete mpMetadataDate; + } + + if (mpSidebarTxtControl) + { + delete mpSidebarTxtControl; + } + + if (mpVScrollbar) + { + mpVScrollbar->RemoveEventListener( LINK( this, SwSidebarWin, WindowEventListener ) ); + delete mpVScrollbar; + } + + AnchorOverlayObject::DestroyAnchorOverlayObject( mpAnchor ); + + ShadowOverlayObject::DestroyShadowOverlayObject( mpShadow ); + + delete mpMenuButton; + + if (mnEventId) + Application::RemoveUserEvent( mnEventId ); +} + +void SwSidebarWin::Paint( const Rectangle& rRect) +{ + Window::Paint(rRect); + + if (mpMetadataAuthor->IsVisible() ) + { + //draw left over space + if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) + { + SetFillColor(COL_BLACK); + } + else + { + SetFillColor(mColorDark); + } + SetLineColor(); + DrawRect( PixelToLogic( + Rectangle( Point( mpMetadataAuthor->GetPosPixel().X()+mpMetadataAuthor->GetSizePixel().Width(), + mpMetadataAuthor->GetPosPixel().Y() ), + Size( GetMetaButtonAreaWidth(), + GetSizePixel().Height() - mpMetadataAuthor->GetPosPixel().Y() ) ) ) ); + } +} + +void SwSidebarWin::SetPosSizePixelRect( long nX, + long nY, + long nWidth, + long nHeight, + const SwRect &aRect, + const long aPageBorder) +{ + mPosSize = Rectangle(Point(nX,nY),Size(nWidth,nHeight)); + mAnchorRect = aRect; + mPageBorder = aPageBorder; +} + +void SwSidebarWin::SetSize( const Size& rNewSize ) +{ + mPosSize.SetSize(rNewSize); +} + +void SwSidebarWin::SetVirtualPosSize( const Point& aPoint, const Size& aSize) +{ + mPosSize = Rectangle(aPoint,aSize); +} + +void SwSidebarWin::TranslateTopPosition(const long aAmount) +{ + mPosSize.Move(0,aAmount); +} + +void SwSidebarWin::ShowAnchorOnly(const Point &aPoint) +{ + HideNote(); + SetPosAndSize(); + if (mpAnchor) + { + mpAnchor->SetSixthPosition(basegfx::B2DPoint(aPoint.X(),aPoint.Y())); + mpAnchor->SetSeventhPosition(basegfx::B2DPoint(aPoint.X(),aPoint.Y())); + mpAnchor->SetAnchorState(AS_ALL); + mpAnchor->setVisible(true); + } + if (mpShadow) + mpShadow->setVisible(false); +} + +SfxItemSet SwSidebarWin::DefaultItem() +{ + SfxItemSet aItem( mrView.GetDocShell()->GetPool() ); + aItem.Put(SvxFontHeightItem(200,100,EE_CHAR_FONTHEIGHT)); + aItem.Put(SvxFontItem(FAMILY_SWISS,GetSettings().GetStyleSettings().GetFieldFont().GetName(), + EMPTYSTRING,PITCH_DONTKNOW,RTL_TEXTENCODING_DONTKNOW,EE_CHAR_FONTINFO)); + return aItem; +} + +void SwSidebarWin::InitControls() +{ + AddEventListener( LINK( this, SwSidebarWin, WindowEventListener ) ); + + // actual window which holds the user text + mpSidebarTxtControl = new SidebarTxtControl( *this, + WB_NODIALOGCONTROL, + mrView, mrMgr ); + mpSidebarTxtControl->SetPointer(Pointer(POINTER_TEXT)); + + // window controls for author and date + mpMetadataAuthor = new Edit( this, 0 ); + mpMetadataAuthor->SetReadOnly(); + mpMetadataAuthor->AlwaysDisableInput(true); + mpMetadataAuthor->SetCallHandlersOnInputDisabled(true); + mpMetadataAuthor->AddEventListener( LINK( this, SwSidebarWin, WindowEventListener ) ); + // we should leave this setting alone, but for this we need a better layout algo + // with variable meta size height + { + AllSettings aSettings = mpMetadataAuthor->GetSettings(); + StyleSettings aStyleSettings = aSettings.GetStyleSettings(); + Font aFont = aStyleSettings.GetFieldFont(); + aFont.SetHeight(8); + aStyleSettings.SetFieldFont(aFont); + aSettings.SetStyleSettings(aStyleSettings); + mpMetadataAuthor->SetSettings(aSettings); + } + + mpMetadataDate = new Edit( this, 0 ); + mpMetadataDate->SetReadOnly(); + mpMetadataDate->AlwaysDisableInput(true); + mpMetadataDate->SetCallHandlersOnInputDisabled(true); + mpMetadataDate->AddEventListener( LINK( this, SwSidebarWin, WindowEventListener ) ); + // we should leave this setting alone, but for this we need a better layout algo + // with variable meta size height + { + AllSettings aSettings = mpMetadataDate->GetSettings(); + StyleSettings aStyleSettings = aSettings.GetStyleSettings(); + Font aFont = aStyleSettings.GetFieldFont(); + aFont.SetHeight(8); + aStyleSettings.SetFieldFont(aFont); + aSettings.SetStyleSettings(aStyleSettings); + mpMetadataDate->SetSettings(aSettings); + } + + + SwDocShell* aShell = mrView.GetDocShell(); + mpOutliner = new Outliner(&aShell->GetPool(),OUTLINERMODE_TEXTOBJECT); + aShell->GetDoc()->SetCalcFieldValueHdl( mpOutliner ); + mpOutliner->SetUpdateMode( TRUE ); + Rescale(); + + OutputDevice* pDev = aShell->GetDoc()->getReferenceDevice(TRUE); + if ( pDev ) + { + mpOutliner->SetRefDevice( pDev ); + } + + mpOutlinerView = new OutlinerView ( mpOutliner, mpSidebarTxtControl ); + mpOutlinerView->SetBackgroundColor(COL_TRANSPARENT); + mpOutliner->InsertView(mpOutlinerView ); + mpSidebarTxtControl->SetTextView(mpOutlinerView); + mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,1,1) ) ); + + mpOutlinerView->SetAttribs(DefaultItem()); + + // TODO: ?? + EEHorizontalTextDirection aDefHoriTextDir = Application::GetSettings().GetLayoutRTL() ? EE_HTEXTDIR_R2L : EE_HTEXTDIR_L2R; + mpOutliner->SetDefaultHorizontalTextDirection( aDefHoriTextDir ); + + //create Scrollbars + mpVScrollbar = new ScrollBar(this, WB_3DLOOK |WB_VSCROLL|WB_DRAG); + mpVScrollbar->EnableNativeWidget(false); + mpVScrollbar->EnableRTL( false ); + mpVScrollbar->SetScrollHdl(LINK(this, SwSidebarWin, ScrollHdl)); + mpVScrollbar->EnableDrag(); + mpVScrollbar->AddEventListener( LINK( this, SwSidebarWin, WindowEventListener ) ); + + const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions(); + ULONG nCntrl = mpOutliner->GetControlWord(); + // TODO: crash when AUTOCOMPLETE enabled + nCntrl |= EE_CNTRL_MARKFIELDS | EE_CNTRL_PASTESPECIAL | EE_CNTRL_AUTOCORRECT | EV_CNTRL_AUTOSCROLL | EE_CNTRL_URLSFXEXECUTE; // | EE_CNTRL_AUTOCOMPLETE; + if (pVOpt->IsFieldShadings()) + nCntrl |= EE_CNTRL_MARKFIELDS; + else + nCntrl &= ~EE_CNTRL_MARKFIELDS; + if (pVOpt->IsOnlineSpell()) + nCntrl |= EE_CNTRL_ONLINESPELLING; + else + nCntrl &= ~EE_CNTRL_ONLINESPELLING; + mpOutliner->SetControlWord(nCntrl); + + sal_uInt16 aIndex = SW_MOD()->InsertRedlineAuthor(GetAuthor()); + SetColor( mrMgr.GetColorDark(aIndex), + mrMgr.GetColorLight(aIndex), + mrMgr.GetColorAnkor(aIndex)); + + CheckMetaText(); + + mpMenuButton = CreateMenuButton(); + + SetLanguage(GetLanguage()); + GetOutlinerView()->StartSpeller(); + SetPostItText(); + Engine()->CompleteOnlineSpelling(); + + mpSidebarTxtControl->Show(); + mpMetadataAuthor->Show(); + mpMetadataDate->Show(); + mpVScrollbar->Show(); +} + +void SwSidebarWin::CheckMetaText() +{ + const LocaleDataWrapper& rLocalData = SvtSysLocale().GetLocaleData(); + String sMeta = GetAuthor(); + if (sMeta.Len() == 0) + { + sMeta = String(SW_RES(STR_NOAUTHOR)); + } + else if (sMeta.Len() > 22) + { + sMeta.Erase(20); + sMeta = sMeta + rtl::OUString::createFromAscii("..."); + } + if ( mpMetadataAuthor->GetText() != sMeta ) + { + mpMetadataAuthor->SetText(sMeta); + } + + Date aDate = GetDate(); + if (aDate==Date()) + { + sMeta = String(SW_RES(STR_POSTIT_TODAY)); + } + else if (aDate == Date(Date()-1)) + { + sMeta = String(SW_RES(STR_POSTIT_YESTERDAY)); + } + else if (aDate.IsValid() ) + { + sMeta = rLocalData.getDate(aDate); + } + else + { + sMeta = String(SW_RES(STR_NODATE)); + } + if (GetTime()!=0) + { + sMeta = sMeta + rtl::OUString::createFromAscii(" ") + rLocalData.getTime( GetTime(),false ); + } + if ( mpMetadataDate->GetText() != sMeta ) + { + mpMetadataDate->SetText(sMeta); + } + +} + +void SwSidebarWin::Rescale() +{ + MapMode aMode = GetParent()->GetMapMode(); + aMode.SetOrigin( Point() ); + mpOutliner->SetRefMapMode( aMode ); + SetMapMode( aMode ); + mpSidebarTxtControl->SetMapMode( aMode ); + if ( mpMetadataAuthor ) + { + Font aFont( mpMetadataAuthor->GetSettings().GetStyleSettings().GetFieldFont() ); + sal_Int32 nHeight = aFont.GetHeight(); + nHeight = nHeight * aMode.GetScaleY().GetNumerator() / aMode.GetScaleY().GetDenominator(); + aFont.SetHeight( nHeight ); + mpMetadataAuthor->SetControlFont( aFont ); + } + if ( mpMetadataDate ) + { + Font aFont( mpMetadataDate->GetSettings().GetStyleSettings().GetFieldFont() ); + sal_Int32 nHeight = aFont.GetHeight(); + nHeight = nHeight * aMode.GetScaleY().GetNumerator() / aMode.GetScaleY().GetDenominator(); + aFont.SetHeight( nHeight ); + mpMetadataDate->SetControlFont( aFont ); + } +} + +void SwSidebarWin::SetPosAndSize() +{ + bool bChange = false; + + if (GetSizePixel() != mPosSize.GetSize()) + { + bChange = true; + SetSizePixel(mPosSize.GetSize()); + DoResize(); + } + + if (GetPosPixel().X() != mPosSize.TopLeft().X() || (abs(GetPosPixel().Y() - mPosSize.TopLeft().Y()) > 5) ) + { + bChange = true; + SetPosPixel(mPosSize.TopLeft()); + + Point aLineStart; + Point aLineEnd ; + switch ( meSidebarPosition ) + { + case sw::sidebarwindows::SIDEBAR_LEFT: + { + aLineStart = EditWin()->PixelToLogic( Point(GetPosPixel().X()+GetSizePixel().Width(),GetPosPixel().Y()-1) ); + aLineEnd = EditWin()->PixelToLogic( Point(GetPosPixel().X(),GetPosPixel().Y()-1) ); + } + break; + case sw::sidebarwindows::SIDEBAR_RIGHT: + { + aLineStart = EditWin()->PixelToLogic( Point(GetPosPixel().X(),GetPosPixel().Y()-1) ); + aLineEnd = EditWin()->PixelToLogic( Point(GetPosPixel().X()+GetSizePixel().Width(),GetPosPixel().Y()-1) ); + } + break; + default: + ASSERT( false, + " - unexpected position of sidebar" ); + break; + } + + if (!IsPreview()) + { + if (mpAnchor) + { + mpAnchor->SetAllPosition( basegfx::B2DPoint( mAnchorRect.Left() , mAnchorRect.Bottom() - 5* 15), + basegfx::B2DPoint( mAnchorRect.Left()-5*15 , mAnchorRect.Bottom()+5*15), + basegfx::B2DPoint( mAnchorRect.Left()+5*15 , mAnchorRect.Bottom()+5*15), + basegfx::B2DPoint( mAnchorRect.Left(), mAnchorRect.Bottom()+2*15), + basegfx::B2DPoint( mPageBorder ,mAnchorRect.Bottom()+2*15), + basegfx::B2DPoint( aLineStart.X(),aLineStart.Y()), + basegfx::B2DPoint( aLineEnd.X(),aLineEnd.Y())); + mpAnchor->SetHeight(mAnchorRect.Height()); + } + else + { + mpAnchor = AnchorOverlayObject::CreateAnchorOverlayObject( mrView, + mAnchorRect, + mPageBorder, + aLineStart, + aLineEnd, + mColorAnchor ); + if ( mpAnchor ) + { + mpAnchor->SetHeight(mAnchorRect.Height()); + mpAnchor->setVisible(true); + mpAnchor->SetAnchorState(AS_TRI); + if (HasChildPathFocus()) + { + mpAnchor->setLineSolid(true); + } + } + } + } + } + else + { + if ( mpAnchor && + ( mpAnchor->getBasePosition() != basegfx::B2DPoint( mAnchorRect.Left() , mAnchorRect.Bottom()-5*15) ) ) + { + mpAnchor->SetTriPosition( basegfx::B2DPoint( mAnchorRect.Left() , mAnchorRect.Bottom() - 5* 15), + basegfx::B2DPoint( mAnchorRect.Left()-5*15 , mAnchorRect.Bottom()+5*15), + basegfx::B2DPoint( mAnchorRect.Left()+5*15 , mAnchorRect.Bottom()+5*15), + basegfx::B2DPoint( mAnchorRect.Left(), mAnchorRect.Bottom()+2*15), + basegfx::B2DPoint( mPageBorder , mAnchorRect.Bottom()+2*15)); + } + } + + if (bChange) + { + Point aStart = EditWin()->PixelToLogic(GetPosPixel()+Point(0,GetSizePixel().Height())); + Point aEnd = EditWin()->PixelToLogic(GetPosPixel()+Point(GetSizePixel().Width()-1,GetSizePixel().Height())); + mpShadow->SetPosition(basegfx::B2DPoint(aStart.X(),aStart.Y()), basegfx::B2DPoint(aEnd.X(),aEnd.Y())); + } + + if (mrMgr.ShowNotes()) + { + if (IsFollow() && !HasChildPathFocus()) + { + mpAnchor->SetAnchorState(AS_END); + } + else + { + mpAnchor->SetAnchorState(AS_ALL); + SwSidebarWin* pWin = GetTopReplyNote(); + if (pWin) + pWin->Anchor()->SetAnchorState(AS_END); + } + } +} + +void SwSidebarWin::DoResize() +{ + long aTextHeight = LogicToPixel( mpOutliner->CalcTextSize()).Height(); + long aHeight = GetSizePixel().Height(); + unsigned long aWidth = GetSizePixel().Width(); + + aHeight -= GetMetaHeight(); + mpMetadataAuthor->Show(); + mpMetadataDate->Show(); + mpSidebarTxtControl->SetQuickHelpText(EMPTYSTRING); + + if ((aTextHeight > aHeight) && !IsPreview()) + { // we need vertical scrollbars and have to reduce the width + aWidth -= GetScrollbarWidth(); + mpVScrollbar->Show(); + } + else + { + mpVScrollbar->Hide(); + } + + { + const Size aSizeOfMetadataControls( GetSizePixel().Width() - GetMetaButtonAreaWidth(), + GetMetaHeight()/2 ); + mpMetadataAuthor->SetPosSizePixel( 0, + aHeight, + aSizeOfMetadataControls.Width(), + aSizeOfMetadataControls.Height() ); + mpMetadataDate->SetPosSizePixel( 0, + aHeight + aSizeOfMetadataControls.Height(), + aSizeOfMetadataControls.Width(), + aSizeOfMetadataControls.Height() ); + } + + mpOutliner->SetPaperSize( PixelToLogic( Size(aWidth,aHeight) ) ) ; + mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) ); + if (!mpVScrollbar->IsVisible()) + { // if we do not have a scrollbar anymore, we want to see the complete text + mpOutlinerView->SetVisArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) ); + } + + if (!Application::GetSettings().GetLayoutRTL()) + { + mpSidebarTxtControl->SetPosSizePixel(0, 0, aWidth, aHeight); + mpVScrollbar->SetPosSizePixel( aWidth, 0, GetScrollbarWidth(), aHeight); + } + else + { + mpSidebarTxtControl->SetPosSizePixel( ( (aTextHeight > aHeight) && !IsPreview() + ? GetScrollbarWidth() : 0 ) , 0, + aWidth, aHeight); + mpVScrollbar->SetPosSizePixel( 0, 0, GetScrollbarWidth(), aHeight); + } + + mpVScrollbar->SetVisibleSize( PixelToLogic(Size(0,aHeight)).Height() ); + mpVScrollbar->SetPageSize( PixelToLogic(Size(0,aHeight)).Height() * 8 / 10 ); + mpVScrollbar->SetLineSize( mpOutliner->GetTextHeight() / 10 ); + SetScrollbar(); + mpVScrollbar->SetRange( Range(0, mpOutliner->GetTextHeight())); + + //calculate rects for meta- button + const Fraction& fx( GetMapMode().GetScaleX() ); + const Fraction& fy( GetMapMode().GetScaleY() ); + + const Point aPos( mpMetadataAuthor->GetPosPixel()); + Rectangle aRectMetaButton; + if (IsPreview()) + { + aRectMetaButton = PixelToLogic( + Rectangle( Point( aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH*4+10)*fx.GetNumerator()/fx.GetDenominator(), + aPos.Y()+5*fy.GetNumerator()/fy.GetDenominator() ), + Size( METABUTTON_WIDTH*4*fx.GetNumerator()/fx.GetDenominator(), + METABUTTON_HEIGHT*fy.GetNumerator()/fy.GetDenominator() ) ) ); + } + else + { + aRectMetaButton = PixelToLogic( + Rectangle( Point( aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH+10)*fx.GetNumerator()/fx.GetDenominator(), + aPos.Y()+5*fy.GetNumerator()/fy.GetDenominator() ), + Size( METABUTTON_WIDTH*fx.GetNumerator()/fx.GetDenominator(), + METABUTTON_HEIGHT*fy.GetNumerator()/fy.GetDenominator() ) ) ); + } + + { + const Rectangle aRectMetaButtonPixel( LogicToPixel( aRectMetaButton ) ); + mpMenuButton->SetPosSizePixel( aRectMetaButtonPixel.Left(), + aRectMetaButtonPixel.Top(), + aRectMetaButtonPixel.GetWidth(), + aRectMetaButtonPixel.GetHeight() ); + } +} + +void SwSidebarWin::SetSizePixel( const Size& rNewSize ) +{ + Window::SetSizePixel(rNewSize); + + if (mpShadow) + { + Point aStart = EditWin()->PixelToLogic(GetPosPixel()+Point(0,GetSizePixel().Height())); + Point aEnd = EditWin()->PixelToLogic(GetPosPixel()+Point(GetSizePixel().Width()-1,GetSizePixel().Height())); + mpShadow->SetPosition(basegfx::B2DPoint(aStart.X(),aStart.Y()), basegfx::B2DPoint(aEnd.X(),aEnd.Y())); + } +} + +void SwSidebarWin::SetScrollbar() +{ + mpVScrollbar->SetThumbPos( mpOutlinerView->GetVisArea().Top()+ mpOutlinerView->GetEditView().GetCursor()->GetOffsetY()); +} + +void SwSidebarWin::ResizeIfNeccessary(long aOldHeight, long aNewHeight) +{ + if (aOldHeight != aNewHeight) + { + //check for lower border or next note + long aBorder = mrMgr.GetNextBorder(); + if (aBorder != -1) + { + if (aNewHeight > GetMinimumSizeWithoutMeta()) + { + long aNewLowerValue = GetPosPixel().Y() + aNewHeight + GetMetaHeight(); + if (aNewLowerValue < aBorder) + SetSizePixel(Size(GetSizePixel().Width(),aNewHeight+GetMetaHeight())); + else + SetSizePixel(Size(GetSizePixel().Width(),aBorder - GetPosPixel().Y())); + DoResize(); + Invalidate(); + } + else + { + if (GetSizePixel().Height() != GetMinimumSizeWithoutMeta() + GetMetaHeight()) + SetSizePixel(Size(GetSizePixel().Width(),GetMinimumSizeWithoutMeta() + GetMetaHeight())); + DoResize(); + Invalidate(); + } + } + else + { + DoResize(); + Invalidate(); + } + } + else + { + SetScrollbar(); + } +} + +void SwSidebarWin::SetColor(Color aColorDark,Color aColorLight, Color aColorAnchor) +{ + mColorDark = aColorDark; + mColorLight = aColorLight; + mColorAnchor = aColorAnchor; + + if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) + { + { + mpMetadataAuthor->SetControlBackground(mColorDark); + AllSettings aSettings = mpMetadataAuthor->GetSettings(); + StyleSettings aStyleSettings = aSettings.GetStyleSettings(); + aStyleSettings.SetFieldTextColor(aColorAnchor); + aSettings.SetStyleSettings(aStyleSettings); + mpMetadataAuthor->SetSettings(aSettings); + } + + { + mpMetadataDate->SetControlBackground(mColorDark); + AllSettings aSettings = mpMetadataDate->GetSettings(); + StyleSettings aStyleSettings = aSettings.GetStyleSettings(); + aStyleSettings.SetFieldTextColor(aColorAnchor); + aSettings.SetStyleSettings(aStyleSettings); + mpMetadataDate->SetSettings(aSettings); + } + + AllSettings aSettings2 = mpVScrollbar->GetSettings(); + StyleSettings aStyleSettings2 = aSettings2.GetStyleSettings(); + aStyleSettings2.SetButtonTextColor(Color(0,0,0)); + aStyleSettings2.SetCheckedColor(mColorLight); //hintergund + aStyleSettings2.SetShadowColor(mColorAnchor); + aStyleSettings2.SetFaceColor(mColorDark); + aSettings2.SetStyleSettings(aStyleSettings2); + mpVScrollbar->SetSettings(aSettings2); + } +} + +void SwSidebarWin::SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSidebarPosition) +{ + meSidebarPosition = eSidebarPosition; +} + +void SwSidebarWin::SetReadonly(BOOL bSet) +{ + mbReadonly = bSet; + GetOutlinerView()->SetReadOnly(bSet); +} + +void SwSidebarWin::SetLanguage(const SvxLanguageItem aNewItem) +{ + Link pLink = Engine()->GetModifyHdl(); + Engine()->SetModifyHdl( Link() ); + ESelection aOld = GetOutlinerView()->GetSelection(); + + ESelection aNewSelection( 0, 0, (USHORT)Engine()->GetParagraphCount()-1, USHRT_MAX ); + GetOutlinerView()->SetSelection( aNewSelection ); + SfxItemSet aEditAttr(GetOutlinerView()->GetAttribs()); + aEditAttr.Put(aNewItem); + GetOutlinerView()->SetAttribs( aEditAttr ); + + GetOutlinerView()->SetSelection(aOld); + Engine()->SetModifyHdl( pLink ); + + const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions(); + ULONG nCntrl = Engine()->GetControlWord(); + // turn off + if (!pVOpt->IsOnlineSpell()) + nCntrl &= ~EE_CNTRL_ONLINESPELLING; + else + nCntrl &= ~EE_CNTRL_ONLINESPELLING; + Engine()->SetControlWord(nCntrl); + + //turn back on + if (pVOpt->IsOnlineSpell()) + nCntrl |= EE_CNTRL_ONLINESPELLING; + else + nCntrl &= ~EE_CNTRL_ONLINESPELLING; + Engine()->SetControlWord(nCntrl); + + Engine()->CompleteOnlineSpelling(); + Invalidate(); +} + +void SwSidebarWin::DataChanged( const DataChangedEvent& aEvent) +{ + Window::DataChanged( aEvent ); +} + +void SwSidebarWin::GetFocus() +{ + if (mpSidebarTxtControl) + mpSidebarTxtControl->GrabFocus(); +} + +void SwSidebarWin::LoseFocus() +{ +} + +void SwSidebarWin::ShowNote() +{ + SetPosAndSize(); + if (!IsVisible()) + Window::Show(); + if (mpShadow && !mpShadow->isVisible()) + mpShadow->setVisible(true); + if (mpAnchor && !mpAnchor->isVisible()) + mpAnchor->setVisible(true); +} + +void SwSidebarWin::HideNote() +{ + if (IsVisible()) + Window::Hide(); + if (mpAnchor) + { + if (mrMgr.IsShowAnkor()) + mpAnchor->SetAnchorState(AS_TRI); + else + mpAnchor->setVisible(false); + } + if (mpShadow && mpShadow->isVisible()) + mpShadow->setVisible(false); +} + +void SwSidebarWin::ActivatePostIt() +{ + mrMgr.AssureStdModeAtShell(); + + mpOutliner->ClearModifyFlag(); + mpOutliner->GetUndoManager().Clear(); + + CheckMetaText(); + SetViewState(VS_EDIT); + GetOutlinerView()->ShowCursor(); + + mpOutlinerView->GetEditView().SetInsertMode(mrView.GetWrtShellPtr()->IsInsMode()); + + if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) + GetOutlinerView()->SetBackgroundColor(mColorDark); +} + +void SwSidebarWin::DeactivatePostIt() +{ + // remove selection, #i87073# + if (GetOutlinerView()->GetEditView().HasSelection()) + { + ESelection aSelection = GetOutlinerView()->GetEditView().GetSelection(); + aSelection.nEndPara = aSelection.nStartPara; + aSelection.nEndPos = aSelection.nStartPos; + GetOutlinerView()->GetEditView().SetSelection(aSelection); + } + + mpOutliner->CompleteOnlineSpelling(); + + SetViewState(VS_NORMAL); + // write the visible text back into the SwField + UpdateData(); + + if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) + GetOutlinerView()->SetBackgroundColor(COL_TRANSPARENT); + + + if ( !IsProtected() && + Engine()->GetEditEngine().GetText()==String(EMPTYSTRING) ) + { + mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), 0 ); + } +} + +void SwSidebarWin::ToggleInsMode() +{ + if (!mrView.GetWrtShell().IsRedlineOn()) + { + //change outliner + mpOutlinerView->GetEditView().SetInsertMode(!mpOutlinerView->GetEditView().IsInsertMode()); + //change documnet + mrView.GetWrtShell().ToggleInsMode(); + //update statusbar + SfxBindings &rBnd = mrView.GetViewFrame()->GetBindings(); + rBnd.Invalidate(SID_ATTR_INSERT); + rBnd.Update(SID_ATTR_INSERT); + } +} + +void SwSidebarWin::ExecuteCommand(USHORT nSlot) +{ + mrMgr.AssureStdModeAtShell(); + + switch (nSlot) + { + case FN_POSTIT: + case FN_REPLY: + { + // if this note is empty, it will be deleted once losing the focus, so no reply, but only a new note + // will be created + if (Engine()->GetEditEngine().GetText() != String(EMPTYSTRING)) + { + OutlinerParaObject* pPara = new OutlinerParaObject(*GetOutlinerView()->GetEditView().CreateTextObject()); + mrMgr.RegisterAnswer(pPara); + } + if (mrMgr.HasActiveSidebarWin()) + mrMgr.SetActiveSidebarWin(0); + SwitchToFieldPos(); + mrView.GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT); + break; + } + case FN_DELETE_COMMENT: + case FN_DELETE_NOTE: + + //Delete(); // do not kill the parent of our open popup menu + mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), 0 ); + break; + case FN_DELETE_ALL_NOTES: + case FN_HIDE_ALL_NOTES: + // not possible as slot as this would require that "this" is the active postit + mrView.GetViewFrame()->GetBindings().Execute( nSlot, 0, 0, SFX_CALLMODE_ASYNCHRON ); + break; + case FN_DELETE_NOTE_AUTHOR: + case FN_HIDE_NOTE_AUTHOR: + { + // not possible as slot as this would require that "this" is the active postit + SfxStringItem aItem( nSlot, GetAuthor() ); + const SfxPoolItem* aItems[2]; + aItems[0] = &aItem; + aItems[1] = 0; + mrView.GetViewFrame()->GetBindings().Execute( nSlot, aItems, 0, SFX_CALLMODE_ASYNCHRON ); + } + default: + mrView.GetViewFrame()->GetBindings().Execute( nSlot ); + break; + } +} + +SwEditWin* SwSidebarWin::EditWin() +{ + return &mrView.GetEditWin(); +} + +long SwSidebarWin::GetPostItTextHeight() +{ + return mpOutliner ? LogicToPixel(mpOutliner->CalcTextSize()).Height() : 0; +} + +void SwSidebarWin::SwitchToPostIt(USHORT aDirection) +{ + SwSidebarWin* pPostIt = mrMgr.GetNextPostIt(aDirection, this); + if (pPostIt) + pPostIt->GrabFocus(); +} + +IMPL_LINK( SwSidebarWin, WindowEventListener, VclSimpleEvent*, pEvent ) +{ + VclWindowEvent* pWinEvent = dynamic_cast(pEvent); + if ( pWinEvent ) + { + if ( pWinEvent->GetId() == VCLEVENT_WINDOW_MOUSEMOVE ) + { + MouseEvent* pMouseEvt = (MouseEvent*)pWinEvent->GetData(); + if ( pMouseEvt->IsEnterWindow() ) + { + mbMouseOver = true; + if ( !HasFocus() ) + { + SetViewState(VS_VIEW); + Invalidate(); + } + } + else if ( pMouseEvt->IsLeaveWindow()) + { + if (IsPreview()) + { + //doLazyDelete(); + } + else + { + mbMouseOver = false; + if ( !HasFocus() ) + { + SetViewState(VS_NORMAL); + Invalidate(); + } + } + } + } + else if ( pWinEvent->GetId() == VCLEVENT_WINDOW_ACTIVATE && + pWinEvent->GetWindow() == mpSidebarTxtControl ) + { + const BOOL bLockView = mrView.GetWrtShell().IsViewLocked(); + mrView.GetWrtShell().LockView( TRUE ); + + if ( !IsPreview() ) + { + mrMgr.SetActiveSidebarWin( this ); + } + + mrView.GetWrtShell().LockView( bLockView ); + mrMgr.MakeVisible( this ); + } + else if ( pWinEvent->GetWindow() == mpSidebarTxtControl ) + { + int i = 5; + ++i; + } + } + return sal_True; +} + +void SwSidebarWin::Delete() +{ + if ( mrMgr.GetActiveSidebarWin() == this) + { + mrMgr.SetActiveSidebarWin(0); + // if the note is empty, the previous line will send a delete event, but we are already there + if (mnEventId) + { + Application::RemoveUserEvent( mnEventId ); + mnEventId = 0; + } + } +} + +IMPL_LINK(SwSidebarWin, ScrollHdl, ScrollBar*, pScroll) +{ + long nDiff = GetOutlinerView()->GetEditView().GetVisArea().Top() - pScroll->GetThumbPos(); + GetOutlinerView()->Scroll( 0, nDiff ); + return 0; +} + +IMPL_LINK(SwSidebarWin, ModifyHdl, void*, pVoid) +{ + // no warnings, please + pVoid=0; + mrView.GetDocShell()->SetModified(sal_True); + return 0; +} + +IMPL_LINK(SwSidebarWin, DeleteHdl, void*, pVoid) +{ + // no warnings, please + pVoid=0; + mnEventId = 0; + Delete(); + return 0; +} + + +void SwSidebarWin::ResetAttributes() +{ + mpOutlinerView->RemoveAttribsKeepLanguages(TRUE); + mpOutliner->RemoveFields(TRUE); + mpOutlinerView->SetAttribs(DefaultItem()); +} + +sal_Int32 SwSidebarWin::GetScrollbarWidth() +{ + return mrView.GetWrtShell().GetViewOptions()->GetZoom() / 10; +} + +sal_Int32 SwSidebarWin::GetMetaButtonAreaWidth() +{ + const Fraction& f( GetMapMode().GetScaleX() ); + if (IsPreview()) + return 3 * METABUTTON_AREA_WIDTH * f.GetNumerator() / f.GetDenominator(); + else + return METABUTTON_AREA_WIDTH * f.GetNumerator() / f.GetDenominator(); +} + +sal_Int32 SwSidebarWin::GetMetaHeight() +{ + const Fraction& f( GetMapMode().GetScaleY() ); + return POSTIT_META_HEIGHT * f.GetNumerator() / f.GetDenominator(); +} + +sal_Int32 SwSidebarWin::GetMinimumSizeWithMeta() +{ + return mrMgr.GetMinimumSizeWithMeta(); +} + +sal_Int32 SwSidebarWin::GetMinimumSizeWithoutMeta() +{ + const Fraction& f( GetMapMode().GetScaleY() ); + return POSTIT_MINIMUMSIZE_WITHOUT_META * f.GetNumerator() / f.GetDenominator(); +} + +void SwSidebarWin::SetSpellChecking() +{ + const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions(); + ULONG nCntrl = mpOutliner->GetControlWord(); + if (pVOpt->IsOnlineSpell()) + nCntrl |= EE_CNTRL_ONLINESPELLING; + else + nCntrl &= ~EE_CNTRL_ONLINESPELLING; + mpOutliner->SetControlWord(nCntrl); + + mpOutliner->CompleteOnlineSpelling(); + Invalidate(); +} + +void SwSidebarWin::SetViewState(ViewState bViewState) +{ + switch (bViewState) + { + case VS_EDIT: + { + if (mpAnchor) + { + mpAnchor->SetAnchorState(AS_ALL); + SwSidebarWin* pWin = GetTopReplyNote(); + if (pWin) + pWin->Anchor()->SetAnchorState(AS_END); + mpAnchor->setLineSolid(true); + } + if (mpShadow) + mpShadow->SetShadowState(SS_EDIT); + break; + } + case VS_VIEW: + { + if (mpAnchor) + mpAnchor->setLineSolid(true); + if (mpShadow) + mpShadow->SetShadowState(SS_VIEW); + break; + } + case VS_NORMAL: + { + if (mpAnchor) + { + if (IsFollow()) + { + // if there is no visible parent note, we want to see the complete anchor ?? + //if (IsAnyStackParentVisible()) + mpAnchor->SetAnchorState(AS_END); + SwSidebarWin* pTopWinSelf = GetTopReplyNote(); + SwSidebarWin* pTopWinActive = mrMgr.HasActiveSidebarWin() + ? mrMgr.GetActiveSidebarWin()->GetTopReplyNote() + : 0; + if (pTopWinSelf && (pTopWinSelf!=pTopWinActive)) + { + if (pTopWinSelf!=mrMgr.GetActiveSidebarWin()) + pTopWinSelf->Anchor()->setLineSolid(false); + pTopWinSelf->Anchor()->SetAnchorState(AS_ALL); + } + } + mpAnchor->setLineSolid(false); + } + if (mpShadow) + mpShadow->SetShadowState(SS_NORMAL); + break; + } + } +} + +SwSidebarWin* SwSidebarWin::GetTopReplyNote() +{ + SwSidebarWin* pTopNote = 0; + SwSidebarWin* pSidebarWin = IsFollow() ? mrMgr.GetNextPostIt(KEY_PAGEUP, this) : 0; + while (pSidebarWin) + { + pTopNote = pSidebarWin; + pSidebarWin = pSidebarWin->IsFollow() ? mrMgr.GetNextPostIt(KEY_PAGEUP, pSidebarWin) : 0; + } + return pTopNote; +} + +void SwSidebarWin::SwitchToFieldPos() +{ + if ( mrMgr.GetActiveSidebarWin() == this ) + mrMgr.SetActiveSidebarWin(0); + GotoPos(); + sal_uInt32 aCount = MoveCaret(); + if (aCount) + mrView.GetDocShell()->GetWrtShell()->SwCrsrShell::Right(aCount, 0, FALSE); + GrabFocusToDocument(); +} + +SvxLanguageItem SwSidebarWin::GetLanguage(void) +{ + return SvxLanguageItem(SwLangHelper::GetLanguage(mrView.GetWrtShell(),RES_CHRATR_LANGUAGE),RES_CHRATR_LANGUAGE); +} + +void SwSidebarWin::SetChangeTracking( const SwPostItHelper::SwLayoutStatus aLayoutStatus, + const Color& aChangeColor ) +{ + if ( (mLayoutStatus != aLayoutStatus) || + (mChangeColor != aChangeColor) ) + { + mLayoutStatus = aLayoutStatus; + mChangeColor = aChangeColor; + Invalidate(); + } +} + +bool SwSidebarWin::HasScrollbar() const +{ + return mpVScrollbar != 0; +} + +bool SwSidebarWin::IsScrollbarVisible() const +{ + return HasScrollbar() && mpVScrollbar->IsVisible(); +} + +} } // eof of namespace sw::sidebarwindows:: + +/********** SwRedComment**************/ +/* +SwRedComment::SwRedComment( Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits,SwRedline* pRed) + : SwSidebarWin(pParent,nBits,aMgr,aBits), + pRedline(pRed) +{ +} + +void SwRedComment::SetPopup() +{ + mpButtonPopup = new PopupMenu(SW_RES(MN_REDCOMMENT_BUTTON)); + //mpButtonPopup->SetMenuFlags(MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES); +} + +void SwRedComment::UpdateData() +{ + if ( Engine()->IsModified() ) + { + // so we get a new layout of notes (Anchor position is still the same and we would otherwise not get one) + Mgr()->SetLayout(); + // SetRedline is calling SetModified already + DocView()->GetWrtShell().SetRedlineComment(Engine()->GetEditEngine().GetText()); + } + Engine()->ClearModifyFlag(); + Engine()->GetUndoManager().Clear(); +} + +void SwRedComment::SetPostItText() +{ + Engine()->SetModifyHdl( Link() ); + Engine()->EnableUndo( FALSE ); + + Engine()->Clear(); + View()->SetAttribs(DefaultItem()); + View()->InsertText(pRedline->GetComment(),false); + + Engine()->ClearModifyFlag(); + Engine()->GetUndoManager().Clear(); + Engine()->EnableUndo( TRUE ); + Engine()->SetModifyHdl( LINK( this, SwSidebarWin, ModifyHdl ) ); + Invalidate(); +} + +void SwRedComment::DeactivatePostIt() +{ + SwSidebarWin::DeactivatePostIt(); + // current Redline is still selected + DocView()->GetWrtShellPtr()->ClearMark(); +} + +void SwRedComment::ActivatePostIt() +{ + SwSidebarWin::ActivatePostIt(); + + // do we want the redline selected? + // otherwise, SwRedComment::ActivatePostIt() as well as SwRedComment::DeactivatePostIt() + // can be thrown out completly + DocView()->GetDocShell()->GetWrtShell()->GotoRedline( + DocView()->GetDocShell()->GetWrtShell()->FindRedlineOfData(pRedline->GetRedlineData()),true); +} + +void SwRedComment::MouseButtonDown( const MouseEvent& rMEvt ) +{ + if (mRectMetaButton.IsInside(PixelToLogic(rMEvt.GetPosPixel())) && rMEvt.IsLeft()) + { + ExecuteCommand( mpButtonPopup->Execute( this,Rectangle(LogicToPixel(mRectMetaButton.BottomLeft()),LogicToPixel(mRectMetaButton.BottomLeft())),POPUPMENU_EXECUTE_DOWN | POPUPMENU_NOMOUSEUPCLOSE) ); + } +} + +void SwRedComment::Delete() +{ + SwSidebarWin::Delete(); + // we are not neccessarily on our redline, so let's move there + GotoPos(); + DocView()->GetWrtShell().SetRedlineComment(EMPTYSTRING); + DocView()->GetWrtShell().ClearMark(); + // so we get a new layout of notes (Anchor position is still the same and we would otherwise not get one) + Mgr()->SetLayout(); + Mgr()->RemoveItem(pRedline); +} + +void SwRedComment::GotoPos() +{ + DocView()->GetDocShell()->GetWrtShell()->GotoRedline( + DocView()->GetDocShell()->GetWrtShell()->FindRedlineOfData(pRedline->GetRedlineData())); +} + +String SwRedComment::GetAuthor() +{ + return pRedline->GetAuthorString(); +} + +Date SwRedComment::GetDate() +{ + return pRedline->GetTimeStamp().GetDate(); +} + +Time SwRedComment::GetTime() +{ + return pRedline->GetTimeStamp().GetTime(); +} + +bool SwRedComment::IsProtected() +{ + return SwSidebarWin::IsProtected() || pRedline->Start()->nNode.GetNode().GetTxtNode()->IsInProtectSect(); +} +*/ diff --git a/sw/source/ui/docvw/annotation.hrc b/sw/source/ui/docvw/annotation.hrc new file mode 100644 index 0000000000..e43a903424 --- /dev/null +++ b/sw/source/ui/docvw/annotation.hrc @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _ANNOTATION_HRC +#define _ANNOTATION_HRC + +#include "rcid.hrc" + +#define STR_POSTIT_TODAY (RC_ANNOTATION_BEGIN + 1) +#define STR_POSTIT_YESTERDAY (RC_ANNOTATION_BEGIN + 2) + +#define STR_DELETE_ALL_NOTES (RC_ANNOTATION_BEGIN + 3) +#define STR_DELETE_AUTHOR_NOTES (RC_ANNOTATION_BEGIN + 4) + +#define STR_NODATE (RC_ANNOTATION_BEGIN + 5) +#define STR_NOAUTHOR (RC_ANNOTATION_BEGIN + 6) + +#define STR_REPLY (RC_ANNOTATION_BEGIN + 7) + + +#define ANNOTATION_ACT_END STR_REPLY +#if ANNOTATION_ACT_END > RC_ANNOTATION_END +#error Resource-Id Ueberlauf in #file, #line +#endif + + +#endif diff --git a/sw/source/ui/docvw/annotation.src b/sw/source/ui/docvw/annotation.src new file mode 100644 index 0000000000..8dcda9c25b --- /dev/null +++ b/sw/source/ui/docvw/annotation.src @@ -0,0 +1,68 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "annotation.hrc" +#include "cmdid.h" + +String STR_POSTIT_TODAY +{ + Text [ en-US ] = "Today," ; +}; + +String STR_POSTIT_YESTERDAY +{ + Text [ en-US ] = "Yesterday," ; +}; + +String STR_DELETE_ALL_NOTES +{ + Text [ en-US ] = "All Comments" ; +}; + +String STR_DELETE_AUTHOR_NOTES +{ + Text [ en-US ] = "Comments by " ; +}; + +String STR_NODATE +{ + Text [ en-US ] = "(no date)" ; +}; + +String STR_NOAUTHOR +{ + Text [ en-US ] = "(no author)" ; +}; + +String STR_REPLY +{ + Text [ en-US ] = "Reply to $1" ; +}; + diff --git a/sw/source/ui/docvw/docvw.hrc b/sw/source/ui/docvw/docvw.hrc index 09b6e42f14..38f36d3c24 100644 --- a/sw/source/ui/docvw/docvw.hrc +++ b/sw/source/ui/docvw/docvw.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -62,11 +62,11 @@ #define STR_EXPORT_GRAFIK_TITLE (RC_DOCVW_BEGIN + 1) #define STR_CHAIN_OK (RC_DOCVW_BEGIN + 2) -#define STR_CHAIN_NOT_EMPTY (RC_DOCVW_BEGIN + 3) -#define STR_CHAIN_IS_IN_CHAIN (RC_DOCVW_BEGIN + 4) +#define STR_CHAIN_NOT_EMPTY (RC_DOCVW_BEGIN + 3) +#define STR_CHAIN_IS_IN_CHAIN (RC_DOCVW_BEGIN + 4) #define STR_CHAIN_WRONG_AREA (RC_DOCVW_BEGIN + 5) #define STR_CHAIN_NOT_FOUND (RC_DOCVW_BEGIN + 6) -#define STR_CHAIN_SOURCE_CHAINED (RC_DOCVW_BEGIN + 7) +#define STR_CHAIN_SOURCE_CHAINED (RC_DOCVW_BEGIN + 7) #define STR_CHAIN_SELF (RC_DOCVW_BEGIN + 8) #define STR_REDLINE_INSERT (RC_DOCVW_BEGIN + 9) #define STR_REDLINE_DELETE (RC_DOCVW_BEGIN + 10) @@ -74,7 +74,7 @@ #define STR_REDLINE_TABLE (RC_DOCVW_BEGIN + 12) #define STR_REDLINE_FMTCOLL (RC_DOCVW_BEGIN + 13) #define STR_ENDNOTE (RC_DOCVW_BEGIN + 14) -#define STR_FTNNOTE (RC_DOCVW_BEGIN + 15) +#define STR_FTNNOTE (RC_DOCVW_BEGIN + 15) #define STR_TABLE_COL_ADJUST (RC_DOCVW_BEGIN + 16) #define STR_TABLE_ROW_ADJUST (RC_DOCVW_BEGIN + 17) @@ -84,18 +84,7 @@ #define STR_SMARTTAG_CLICK (RC_DOCVW_BEGIN + 21) -#define STR_POSTIT_TODAY (RC_DOCVW_BEGIN + 22) -#define STR_POSTIT_YESTERDAY (RC_DOCVW_BEGIN + 23) - -#define STR_DELETE_ALL_NOTES (RC_DOCVW_BEGIN + 24) -#define STR_DELETE_AUTHOR_NOTES (RC_DOCVW_BEGIN + 25) - -#define STR_NODATE (RC_DOCVW_BEGIN + 26) -#define STR_NOAUTHOR (RC_DOCVW_BEGIN + 27) - -#define STR_REPLY (RC_DOCVW_BEGIN + 28) - -#define MSG_READONLY_CONTENT (RC_DOCVW_BEGIN + 1) +#define MSG_READONLY_CONTENT (RC_DOCVW_BEGIN + 1) #define DOCVW_ACT_END STR_SMARTTAG_CLICK diff --git a/sw/source/ui/docvw/docvw.src b/sw/source/ui/docvw/docvw.src index 74da4994c7..451f6e7b18 100644 --- a/sw/source/ui/docvw/docvw.src +++ b/sw/source/ui/docvw/docvw.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -303,38 +303,3 @@ String STR_SMARTTAG_CLICK Text [ en-US ] = "%s-click to open Smart Tag menu" ; }; -String STR_POSTIT_TODAY -{ - Text [ en-US ] = "Today," ; -}; - -String STR_POSTIT_YESTERDAY -{ - Text [ en-US ] = "Yesterday," ; -}; - -String STR_DELETE_ALL_NOTES -{ - Text [ en-US ] = "All Comments" ; -}; - -String STR_DELETE_AUTHOR_NOTES -{ - Text [ en-US ] = "Comments by " ; -}; - -String STR_NODATE -{ - Text [ en-US ] = "(no date)" ; -}; - -String STR_NOAUTHOR -{ - Text [ en-US ] = "(no author)" ; -}; - -String STR_REPLY -{ - Text [ en-US ] = "Reply to $1" ; -}; - diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 0f45470c91..0fc1c2ae94 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -69,9 +69,6 @@ #include #include #include -//#ifndef _SVDVMARK_HXX //autogen -//#include -//#endif #include #include #include @@ -152,8 +149,7 @@ #include #include -#include "PostItMgr.hxx" -#include "postit.hxx" +#include //JP 11.10.2001: enable test code for bug fix 91313 #if !defined( PRODUCT ) && (OSL_DEBUG_LEVEL > 1) @@ -1765,7 +1761,7 @@ KEYINPUT_CHECKTABLE_INSDEL: !rSh.GetCurNumRule()->IsOutlineRule() && !rSh.HasSelection() && rSh.IsSttPara() && rSh.IsEndPara() ) - eKeyState = KS_NumOff, eNextKeyState = KS_OutlineLvOff; + eKeyState = KS_NumOff, eNextKeyState = KS_OutlineLvOff; //RETURN fuer neuen Absatz mit AutoFormatierung else if( pACfg && pACfg->IsAutoFmtByInput() && @@ -1899,7 +1895,7 @@ KEYINPUT_CHECKTABLE_INSDEL: #endif if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark() || rSh.GetChar(FALSE)==CH_TXT_ATR_FORMELEMENT) { - eKeyState=KS_GotoNextFieldMark; + eKeyState=KS_GotoNextFieldMark; } else if( rSh.GetCurNumRule() && rSh.IsSttOfPara() && @@ -1954,7 +1950,7 @@ KEYINPUT_CHECKTABLE_INSDEL: BOOL bOld = rSh.ChgCrsrTimerFlag( FALSE ); #endif if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(FALSE)==CH_TXT_ATR_FORMELEMENT) { - eKeyState=KS_GotoPrevFieldMark; + eKeyState=KS_GotoPrevFieldMark; } else if( rSh.GetCurNumRule() && rSh.IsSttOfPara() && !rSh.HasReadonlySel() ) @@ -1991,7 +1987,7 @@ KEYINPUT_CHECKTABLE_INSDEL: SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); //if( pColl && 0 < pColl->GetOutlineLevel() && //#outline level,zhaojianwei // MAXLEVEL - 1 >= pColl->GetOutlineLevel() ) - if( pColl && + if( pColl && pColl->IsAssignedToListLevelOfOutlineStyle() && 0 < pColl->GetAssignedOutlineStyleLevel()) eKeyState = KS_OutlineUp; @@ -2369,14 +2365,14 @@ KEYINPUT_CHECKTABLE_INSDEL: nKS_NUMINDENTINC_Count = 2; break; - case KS_GotoNextFieldMark: + case KS_GotoNextFieldMark: { ::sw::mark::IFieldmark const * const pFieldmark = rSh.GetFieldmarkAfter(); if(pFieldmark) rSh.GotoFieldmark(pFieldmark); } break; - case KS_GotoPrevFieldMark: + case KS_GotoPrevFieldMark: { ::sw::mark::IFieldmark const * const pFieldmark = rSh.GetFieldmarkBefore(); if(pFieldmark) rSh.GotoFieldmark(pFieldmark); @@ -2607,7 +2603,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if (rView.GetPostItMgr()->IsHit(rMEvt.GetPosPixel())) return; - rView.GetPostItMgr()->SetActivePostIt(0); + rView.GetPostItMgr()->SetActiveSidebarWin(0); GrabFocus(); @@ -4675,8 +4671,10 @@ BOOL SwEditWin::IsDrawSelMode() void SwEditWin::GetFocus() { - if (rView.GetPostItMgr()->GetActivePostIt()) - rView.GetPostItMgr()->GetActivePostIt()->GrabFocus(); + if ( rView.GetPostItMgr()->HasActiveSidebarWin() ) + { + rView.GetPostItMgr()->GrabFocusOnActiveSidebarWin(); + } else { rView.GotFocus(); @@ -4775,7 +4773,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) aEvent.ExecutePosition.X = aPixPos.X(); aEvent.ExecutePosition.Y = aPixPos.Y(); Menu* pMenu = 0; - ::rtl::OUString sMenuName = + ::rtl::OUString sMenuName = ::rtl::OUString::createFromAscii( "private:resource/ReadonlyContextMenu"); if( GetView().TryContextMenuInterception( *pROPopup, sMenuName, pMenu, aEvent ) ) { diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx index b277c13949..3d9f6ee6c7 100644 --- a/sw/source/ui/docvw/edtwin2.cxx +++ b/sw/source/ui/docvw/edtwin2.cxx @@ -90,7 +90,6 @@ #include #endif -#include #include #include diff --git a/sw/source/ui/docvw/makefile.mk b/sw/source/ui/docvw/makefile.mk index 0ca95000b5..d2d15811d4 100644 --- a/sw/source/ui/docvw/makefile.mk +++ b/sw/source/ui/docvw/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -46,7 +46,8 @@ ENABLE_EXCEPTIONS=TRUE SRS1NAME=$(TARGET) SRC1FILES = \ access.src \ - docvw.src + docvw.src \ + annotation.src SLOFILES = \ $(SLO)$/edtdd.obj \ @@ -55,8 +56,14 @@ SLOFILES = \ $(SLO)$/edtwin3.obj \ $(SLO)$/romenu.obj \ $(SLO)$/srcedtw.obj \ - $(SLO)$/postit.obj \ - $(SLO)$/PostItMgr.obj + $(SLO)$/PostItMgr.obj \ + $(SLO)$/AnchorOverlayObject.obj \ + $(SLO)$/ShadowOverlayObject.obj \ + $(SLO)$/SidebarWin.obj \ + $(SLO)$/AnnotationWin.obj \ + $(SLO)$/AnnotationMenuButton.obj \ + $(SLO)$/SidebarTxtControl.obj \ + $(SLO)$/SidebarTxtControlAcc.obj # --- Tagets ------------------------------------------------------- diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx deleted file mode 100644 index 157a6e1997..0000000000 --- a/sw/source/ui/docvw/postit.cxx +++ /dev/null @@ -1,2486 +0,0 @@ -/************************************************************************* * - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: postit.cxx,v $ - * $Revision: 1.8.42.11 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -#include "precompiled_sw.hxx" -#include -#include - -#include -#include -#include - -#include -#include "viewopt.hxx" -#include "cmdid.h" - -#include // Polygon - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include //EditEngine flags -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include // FRound -#include - -#include -#include -#include - -#include -#include // SwPostItField -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace ::com::sun::star; - -#define METABUTTON_WIDTH 16 -#define METABUTTON_HEIGHT 18 -#define METABUTTON_AREA_WIDTH 30 -#define POSTIT_META_HEIGHT (sal_Int32) 30 -#define POSTIT_MINIMUMSIZE_WITHOUT_META 50 - -#define POSTIT_SHADOW_BRIGHT Color(180,180,180) -#define POSTIT_SHADOW_DARK Color(83,83,83) - -#define LINEBREAK rtl::OUString::createFromAscii("\n") -#define EMPTYSTRING rtl::OUString::createFromAscii("") - -TYPEINIT0(SwMarginWin); -TYPEINIT1(SwPostIt,SwMarginWin); -//TYPEINIT1(SwRedComment,SwMarginWin); - -Color ColorFromAlphaColor(UINT8 aTransparency, Color &aFront, Color &aBack ) -{ - return Color((UINT8)(aFront.GetRed() * aTransparency/(double)255 + aBack.GetRed() * (1-aTransparency/(double)255)), - (UINT8)(aFront.GetGreen() * aTransparency/(double)255 + aBack.GetGreen() * (1-aTransparency/(double)255)), - (UINT8)(aFront.GetBlue() * aTransparency/(double)255 + aBack.GetBlue() * (1-aTransparency/(double)255))); -} - -/************ PostItTxt **************************************/ -PostItTxt::PostItTxt(Window* pParent, WinBits nBits) : Window(pParent, nBits), mpOutlinerView(0),mMouseOver(false),mbShowPopup(FALSE) -{ - SetHelpId(26276); - AddEventListener( LINK( this, PostItTxt, WindowEventListener ) ); - mpMarginWin = static_cast(GetParent()); -} - -PostItTxt::~PostItTxt() -{ - RemoveEventListener( LINK( this, PostItTxt, WindowEventListener ) ); -} - -void PostItTxt::GetFocus() -{ - BOOL bLockView = mpMarginWin->DocView()->GetWrtShell().IsViewLocked(); - mpMarginWin->DocView()->GetWrtShell().LockView( TRUE ); - - if(mpMarginWin && !mpMarginWin->IsPreview()) - mpMarginWin->Mgr()->SetActivePostIt(mpMarginWin); - Window::GetFocus(); - if (!mMouseOver) - Invalidate(); - - mpMarginWin->DocView()->GetWrtShell().LockView( bLockView ); - mpMarginWin->Mgr()->MakeVisible(mpMarginWin); -} - -void PostItTxt::LoseFocus() -{ - // write the visible text back into the SwField - if ( mpMarginWin ) - mpMarginWin->UpdateData(); - - Window::LoseFocus(); - if (!mMouseOver) - Invalidate(); -} - -void PostItTxt::RequestHelp(const HelpEvent &rEvt) -{ - USHORT nResId = 0; - switch( mpMarginWin->GetStatus() ) - { - case SwPostItHelper::INSERTED: nResId = STR_REDLINE_INSERT; break; - case SwPostItHelper::DELETED: nResId = STR_REDLINE_DELETE; break; - default: nResId = 0; - } - - SwContentAtPos aCntntAtPos( SwContentAtPos::SW_REDLINE ); - if ( nResId && mpMarginWin->DocView()->GetWrtShell().GetContentAtPos( mpMarginWin->GetAnkorRect().Pos(), aCntntAtPos ) ) - { - String sTxt; - sTxt = SW_RESSTR( nResId ); - sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM(": " )); - sTxt += aCntntAtPos.aFnd.pRedl->GetAuthorString(); - sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " - " )); - sTxt += GetAppLangDateTimeString( aCntntAtPos.aFnd.pRedl->GetTimeStamp() ); - Help::ShowQuickHelp( this,PixelToLogic(Rectangle(rEvt.GetMousePosPixel(),Size(50,10))),sTxt); - } -} - -void PostItTxt::Paint( const Rectangle& rRect) -{ - if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) - { - if (mMouseOver || HasFocus()) - DrawGradient(Rectangle(Point(0,0),PixelToLogic(GetSizePixel())), - Gradient(GRADIENT_LINEAR,mpMarginWin->ColorDark(),mpMarginWin->ColorDark())); - else - DrawGradient(Rectangle(Point(0,0),PixelToLogic(GetSizePixel())), - Gradient(GRADIENT_LINEAR,mpMarginWin->ColorLight(),mpMarginWin->ColorDark())); - } - - mpOutlinerView->Paint( rRect ); - - if (mpMarginWin->GetStatus()==SwPostItHelper::DELETED) - { - SetLineColor(static_cast(mpMarginWin)->GetChangeColor()); - DrawLine(PixelToLogic(GetPosPixel()),PixelToLogic(GetPosPixel()+Point(GetSizePixel().Width(),GetSizePixel().Height()))); - DrawLine(PixelToLogic(GetPosPixel()+Point(GetSizePixel().Width(),0)),PixelToLogic(GetPosPixel()+Point(0,GetSizePixel().Height()))); - } -} - -void PostItTxt::KeyInput( const KeyEvent& rKeyEvt ) -{ - const KeyCode& rKeyCode = rKeyEvt.GetKeyCode(); - USHORT nKey = rKeyCode.GetCode(); - SwView* pView = mpMarginWin->DocView(); - if ((rKeyCode.IsMod1() && rKeyCode.IsMod2()) && ((nKey == KEY_PAGEUP) || (nKey == KEY_PAGEDOWN))) - mpMarginWin->SwitchToPostIt(nKey); - else - if ((nKey == KEY_ESCAPE) || (rKeyCode.IsMod1() && ((nKey == KEY_PAGEUP) || (nKey == KEY_PAGEDOWN)))) - mpMarginWin->SwitchToFieldPos(); - else - if (nKey == KEY_INSERT) - { - if (!rKeyCode.IsMod1() && !rKeyCode.IsMod2()) - mpMarginWin->ToggleInsMode(); - } - else - { - //let's make sure we see our note - mpMarginWin->Mgr()->MakeVisible(mpMarginWin); - - long aOldHeight = mpMarginWin->GetPostItTextHeight(); - bool bDone = false; - - /// HACK: need to switch off processing of Undo/Redo in Outliner - if ( !( (nKey == KEY_Z || nKey == KEY_Y) && rKeyCode.IsMod1()) ) - { - /* - SwPostItHelper::SwLayoutStatus aStatus = mpMarginWin->GetStatus(); - if ( (aStatus!=SwPostItHelper::DELETED) || - ( (aStatus==SwPostItHelper::DELETED) && (!mpMarginWin->Engine()->GetEditEngine().DoesKeyChangeText(rKeyEvt))) ) - */ - bool bIsProtected = mpMarginWin->IsProtected(); - if (!bIsProtected || (bIsProtected && !mpMarginWin->Engine()->GetEditEngine().DoesKeyChangeText(rKeyEvt)) ) - bDone = mpOutlinerView->PostKeyEvent( rKeyEvt ); - else - InfoBox( this, SW_RES( MSG_READONLY_CONTENT )).Execute(); - } - if (bDone) - mpMarginWin->ResizeIfNeccessary(aOldHeight,mpMarginWin->GetPostItTextHeight()); - else - { - // write back data first when showing navigator - if ( nKey==KEY_F5 ) - mpMarginWin->UpdateData(); - if (!pView->KeyInput(rKeyEvt)) - Window::KeyInput(rKeyEvt); - } - } - - pView->GetViewFrame()->GetBindings().InvalidateAll(FALSE); -} - -void PostItTxt::MouseMove( const MouseEvent& rMEvt ) -{ - if ( mpOutlinerView ) - { - mpOutlinerView->MouseMove( rMEvt ); - // mba: why does OutlinerView not handle the modifier setting?! - // this forces the postit to handle *all* pointer types - SetPointer( mpOutlinerView->GetPointer( rMEvt.GetPosPixel() ) ); - - const EditView& aEV = mpOutlinerView->GetEditView(); - const SvxFieldItem* pItem = aEV.GetFieldUnderMousePointer(); - if ( pItem ) - { - const SvxFieldData* pFld = pItem->GetField(); - const SvxURLField* pURL = PTR_CAST( SvxURLField, pFld ); - if ( pURL ) - { - String sURL( pURL->GetURL() ); - SvtSecurityOptions aSecOpts; - if ( aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK) ) - { - sURL.InsertAscii( ": ", 0 ); - sURL.Insert( ViewShell::GetShellRes()->aHyperlinkClick, 0 ); - } - Help::ShowQuickHelp( this,PixelToLogic(Rectangle(GetPosPixel(),Size(50,10))),sURL); - } - } - } -} - -void PostItTxt::MouseButtonDown( const MouseEvent& rMEvt ) -{ - if (mpOutlinerView ) - { - SvtSecurityOptions aSecOpts; - bool bExecuteMod = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK); - - if ( !bExecuteMod || (bExecuteMod && rMEvt.GetModifier() == KEY_MOD1)) - { - const EditView& aEV = mpOutlinerView->GetEditView(); - const SvxFieldItem* pItem = aEV.GetFieldUnderMousePointer(); - if ( pItem ) - { - const SvxFieldData* pFld = pItem->GetField(); - const SvxURLField* pURL = PTR_CAST( SvxURLField, pFld ); - if ( pURL ) - { - mpOutlinerView->MouseButtonDown( rMEvt ); - SwWrtShell &rSh = mpMarginWin->DocView()->GetWrtShell(); - String sURL( pURL->GetURL() ); - String sTarget( pURL->GetTargetFrame() ); - ::LoadURL( sURL, &rSh, URLLOAD_NOFILTER, &sTarget); - return; - } - } - } - } - - GrabFocus(); - if ( mpOutlinerView ) - mpOutlinerView->MouseButtonDown( rMEvt ); - mpMarginWin->DocView()->GetViewFrame()->GetBindings().InvalidateAll(FALSE); -} - -void PostItTxt::MouseButtonUp( const MouseEvent& rMEvt ) -{ - if ( mpOutlinerView ) - mpOutlinerView->MouseButtonUp( rMEvt ); -} - -IMPL_LINK(PostItTxt, OnlineSpellCallback, SpellCallbackInfo*, pInfo) -{ - if ( mpMarginWin && (pInfo->nCommand == SPELLCMD_STARTSPELLDLG) ) - mpMarginWin->DocView()->GetViewFrame()->GetDispatcher()->Execute( FN_SPELL_GRAMMAR_DIALOG, SFX_CALLMODE_ASYNCHRON); - return 0; -} - -IMPL_LINK( PostItTxt, Select, Menu*, pSelMenu ) -{ - mpMarginWin->ExecuteCommand( pSelMenu->GetCurItemId() ); - return 0; -} - -void PostItTxt::Command( const CommandEvent& rCEvt ) -{ - if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ) - { - if (!mpMarginWin->IsProtected() && - //if (!mpMarginWin->IsReadOnly() && (mpMarginWin->GetStatus()!=SwPostItHelper::DELETED) && - mpOutlinerView->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(),TRUE )) - { - Link aLink = LINK(this, PostItTxt, OnlineSpellCallback); - mpOutlinerView->ExecuteSpellPopup(rCEvt.GetMousePosPixel(),&aLink); - } - else - { - SfxPopupMenuManager* aMgr = mpMarginWin->DocView()->GetViewFrame()->GetDispatcher()->Popup(0, this,&rCEvt.GetMousePosPixel()); - XubString aText = ((PopupMenu*)aMgr->GetSVMenu())->GetItemText( FN_DELETE_NOTE_AUTHOR ); - SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, mpMarginWin->GetAuthor()); - aText = aRewriter.Apply(aText); - ((PopupMenu*)aMgr->GetSVMenu())->SetItemText(FN_DELETE_NOTE_AUTHOR,aText); - // SwPostItLinkForwarder_Impl aFwd( ((PopupMenu*)aMgr->GetSVMenu())->pSvMenu->GetSelectHdl(), mpPostIt ); - // ((PopupMenu*)aMgr->GetSVMenu())->pSvMenu->SetSelectHdl( LINK(&aFwd, SwPostItLinkForwarder_Impl, Select) ); - - ((PopupMenu*)aMgr->GetSVMenu())->SetSelectHdl( LINK(this, PostItTxt, Select) ); - - if (rCEvt.IsMouseEvent()) - ((PopupMenu*)aMgr->GetSVMenu())->Execute(this,rCEvt.GetMousePosPixel()); - else - { - const Size aSize = GetSizePixel(); - const Point aPos = Point( aSize.getWidth()/2, aSize.getHeight()/2 ); - ((PopupMenu*)aMgr->GetSVMenu())->Execute(this,aPos); - } - delete aMgr; - } - } - else - if (rCEvt.GetCommand() == COMMAND_WHEEL) - { - if (mpMarginWin->Scrollbar()->IsVisible()) - { - const CommandWheelData* pData = rCEvt.GetWheelData(); - if (pData->IsShift() || pData->IsMod1() || pData->IsMod2()) - { - mpMarginWin->DocView()->HandleWheelCommands(rCEvt); - } - else - { - HandleScrollCommand( rCEvt, 0 , mpMarginWin->Scrollbar()); - - /* - long nLines = pData->GetNotchDelta() * (long)pData->GetScrollLines(); - if ( ((mpMarginWin->Scrollbar()->GetRange().Min() == mpMarginWin->Scrollbar()->GetThumbPos()) && (nLines > 0)) || - ( (mpMarginWin->Scrollbar()->GetRange().Max() == mpMarginWin->Scrollbar()->GetThumbPos()+mpMarginWin->Scrollbar()->GetVisibleSize()) && (nLines < 0)) ) - { - mpMarginWin->DocView()->HandleWheelCommands(rCEvt); - } - else - { - HandleScrollCommand( rCEvt, 0 , mpMarginWin->Scrollbar()); - } - */ - } - } - else - { - mpMarginWin->DocView()->HandleWheelCommands(rCEvt); - } - } - else - { - if ( mpOutlinerView ) - mpOutlinerView->Command( rCEvt ); - else - Window::Command(rCEvt); - } -} - -void PostItTxt::DataChanged( const DataChangedEvent& aData) -{ - Window::DataChanged( aData ); -} - -IMPL_LINK( PostItTxt, WindowEventListener, VclSimpleEvent*, pWinEvent ) -{ - if ( pWinEvent && pWinEvent->ISA( VclWindowEvent ) ) - { - VclWindowEvent *pEvent = (VclWindowEvent*)pWinEvent; - if (pEvent->GetId() == VCLEVENT_WINDOW_MOUSEMOVE) - { - MouseEvent* pMouseEvt = (MouseEvent*)pEvent->GetData(); - if ( pMouseEvt->IsEnterWindow() ) - { - mMouseOver = true; - if (!mbShowPopup && !HasFocus()) - { - mpMarginWin->SetViewState(SS_VIEW); - Invalidate(); - } - } - else if ( pMouseEvt->IsLeaveWindow()) - { - if (mpMarginWin->IsPreview()) - { - //mpMarginWin->doLazyDelete(); - } - else - { - mMouseOver = false; - if (!mbShowPopup && !HasFocus()) - { - mpMarginWin->SetViewState(SS_NORMAL); - Invalidate(); - } - } - } - } - } - return sal_True; -} - -XubString PostItTxt::GetSurroundingText() const -{ - if( mpOutlinerView ) - return mpOutlinerView->GetSurroundingText(); - else - return XubString::EmptyString(); -} - -Selection PostItTxt::GetSurroundingTextSelection() const -{ - if( mpOutlinerView ) - return mpOutlinerView->GetSurroundingTextSelection(); - else - return Selection( 0, 0 ); -} - -/************** SwMarginWin***********************************++*/ -SwMarginWin::SwMarginWin(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits) -: Window(pParent, nBits), - mnEventId(0), - mpOutlinerView(0), - mpOutliner(0), - mpPostItTxt(0), - mpMeta(0), - mpVScrollbar(0), - mpAnkor(0), - mpShadow(0), - mpMgr(aMgr), - mbMeta(true), - nFlags(aBits), - mbMouseOverButton(false), - mpButtonPopup(0), - mbIsFollow(false) -{ - SwEditWin* aWin = static_cast(GetParent()); - mpView = &aWin->GetView(); - - SdrPaintWindow* pPaintWindow = mpView->GetDrawView()->GetPaintWindow(0); - if(pPaintWindow) - { - pOverlayManager = pPaintWindow->GetOverlayManager(); - - mpShadow = new SwPostItShadow(basegfx::B2DPoint(0,0),basegfx::B2DPoint(0,0),Color(0,0,0),SS_NORMAL); - mpShadow->setVisible(false); - pOverlayManager->add(*mpShadow); - } -} - -SwMarginWin::~SwMarginWin() -{ - if (mpOutlinerView) - { - delete mpOutlinerView; - } - - if (mpOutliner) - { - delete mpOutliner; - } - - if (mpMeta) - { - mpMeta->RemoveEventListener( LINK( mpPostItTxt, PostItTxt, WindowEventListener ) ); - delete mpMeta; - } - - if (mpPostItTxt) - { - delete mpPostItTxt; - } - - if (mpVScrollbar) - { - delete mpVScrollbar; - } - - if (mpAnkor) - { - if (mpAnkor->getOverlayManager()) - { - // remove this object from the chain - mpAnkor->getOverlayManager()->remove(*mpAnkor); - } - delete mpAnkor; - } - - if (mpShadow) - { - if (mpShadow->getOverlayManager()) - { - mpShadow->getOverlayManager()->remove(*mpShadow); - } - delete mpShadow; - } - - if (mpButtonPopup) - { - delete mpButtonPopup; - } - - if (mnEventId) - Application::RemoveUserEvent( mnEventId ); -} - -void SwMarginWin::Paint( const Rectangle& rRect) -{ - Window::Paint(rRect); - - if (mpMeta->IsVisible() ) - { - //draw left over space - if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) - SetFillColor(COL_BLACK); - else - SetFillColor(mColorDark); - SetLineColor(); - DrawRect(PixelToLogic(Rectangle(Point(mpMeta->GetPosPixel().X()+mpMeta->GetSizePixel().Width(),mpMeta->GetPosPixel().Y()),Size(GetMetaButtonAreaWidth(),mpMeta->GetSizePixel().Height())))); - - if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode()) - { - //draw rect around button - SetFillColor(COL_BLACK); - SetLineColor(COL_WHITE); - } - else - { - //draw button - Gradient aGradient; - if (mbMouseOverButton) - aGradient = Gradient(GRADIENT_LINEAR,ColorFromAlphaColor(80,mColorAnkor,mColorDark),ColorFromAlphaColor(15,mColorAnkor,mColorDark)); - else - aGradient = Gradient(GRADIENT_LINEAR,ColorFromAlphaColor(15,mColorAnkor,mColorDark),ColorFromAlphaColor(80,mColorAnkor,mColorDark)); - DrawGradient(mRectMetaButton,aGradient); - //draw rect around button - SetFillColor(); - SetLineColor(ColorFromAlphaColor(90,mColorAnkor,mColorDark)); - } - DrawRect(mRectMetaButton); - - if (IsPreview()) - { - Font aOldFont( GetFont()); - Font aFont(aOldFont); - Color aCol( COL_BLACK); - aFont.SetColor( aCol ); - aFont.SetHeight(200); - aFont.SetWeight(WEIGHT_MEDIUM); - SetFont( aFont ); - DrawText(mRectMetaButton,rtl::OUString::createFromAscii("Edit Note"),TEXT_DRAW_CENTER); - SetFont( aOldFont ); - } - else - { - //draw arrow - if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) - SetFillColor(COL_WHITE); - else - SetFillColor(COL_BLACK); - SetLineColor(); - DrawPolygon(Polygon(aPopupTriangle)); - } - } -} - -void SwMarginWin::SetPosSizePixelRect(long nX, long nY,long nWidth, long nHeight,const SwRect &aRect, const long aPageBorder) -{ - mbMeta = true; - mPosSize = Rectangle(Point(nX,nY),Size(nWidth,nHeight)); - mAnkorRect = aRect; - mPageBorder = aPageBorder; -} - -void SwMarginWin::SetSize( const Size& rNewSize ) -{ - mPosSize.SetSize(rNewSize); -} - -void SwMarginWin::SetVirtualPosSize( const Point& aPoint, const Size& aSize) -{ - mPosSize = Rectangle(aPoint,aSize); -} - -void SwMarginWin::TranslateTopPosition(const long aAmount) -{ - mPosSize.Move(0,aAmount); -} - -void SwMarginWin::ShowAnkorOnly(const Point &aPoint) -{ - HideNote(); - SetPosAndSize(); - if (mpAnkor) - { - mpAnkor->SetSixthPosition(basegfx::B2DPoint(aPoint.X(),aPoint.Y())); - mpAnkor->SetSeventhPosition(basegfx::B2DPoint(aPoint.X(),aPoint.Y())); - mpAnkor->SetAnkorState(AS_ALL); - mpAnkor->setVisible(true); - } - if (mpShadow) - mpShadow->setVisible(false); -} - -SfxItemSet SwMarginWin::DefaultItem() -{ - SfxItemSet aItem( mpView->GetDocShell()->GetPool() ); - aItem.Put(SvxFontHeightItem(200,100,EE_CHAR_FONTHEIGHT)); - aItem.Put(SvxFontItem(FAMILY_SWISS,GetSettings().GetStyleSettings().GetFieldFont().GetName(), - EMPTYSTRING,PITCH_DONTKNOW,RTL_TEXTENCODING_DONTKNOW,EE_CHAR_FONTINFO)); - return aItem; -} - -void SwMarginWin::InitControls() -{ - // actual window which holds the user text - mpPostItTxt = new PostItTxt(this, WB_NODIALOGCONTROL); - mpPostItTxt->SetPointer(Pointer(POINTER_TEXT)); - - // window control for author and date - mpMeta = new MultiLineEdit(this,0); - mpMeta->SetReadOnly(); - mpMeta->SetRightToLeft(Application::GetSettings().GetLayoutRTL()); - mpMeta->AlwaysDisableInput(true); - mpMeta->SetCallHandlersOnInputDisabled(true); - mpMeta->AddEventListener( LINK( mpPostItTxt, PostItTxt, WindowEventListener ) ); - AddEventListener( LINK( mpPostItTxt, PostItTxt, WindowEventListener ) ); - - // we should leave this setting alone, but for this we need a better layout algo - // with variable meta size height - AllSettings aSettings = mpMeta->GetSettings(); - StyleSettings aStyleSettings = aSettings.GetStyleSettings(); - Font aFont = aStyleSettings.GetFieldFont(); - aFont.SetHeight(8); - aStyleSettings.SetFieldFont(aFont); - aSettings.SetStyleSettings(aStyleSettings); - mpMeta->SetSettings(aSettings); - - SwDocShell* aShell = mpView->GetDocShell(); - mpOutliner = new Outliner(&aShell->GetPool(),OUTLINERMODE_TEXTOBJECT); - aShell->GetDoc()->SetCalcFieldValueHdl( mpOutliner ); - // mpOutliner->EnableUndo( FALSE ); - mpOutliner->SetUpdateMode( TRUE ); - Rescale(); - - OutputDevice* pDev = aShell->GetDoc()->getReferenceDevice(TRUE); - if ( pDev ) - { - mpOutliner->SetRefDevice( pDev ); - } - - mpOutlinerView = new OutlinerView ( mpOutliner, mpPostItTxt ); - mpOutlinerView->SetBackgroundColor(COL_TRANSPARENT); - mpOutliner->InsertView(mpOutlinerView ); - mpPostItTxt->SetTextView(mpOutlinerView); - mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,1,1) ) ); - - mpOutlinerView->SetAttribs(DefaultItem()); - - // TODO: ?? - EEHorizontalTextDirection aDefHoriTextDir = Application::GetSettings().GetLayoutRTL() ? EE_HTEXTDIR_R2L : EE_HTEXTDIR_L2R; - mpOutliner->SetDefaultHorizontalTextDirection( aDefHoriTextDir ); - - //create Scrollbars - mpVScrollbar = new ScrollBar(this, WB_3DLOOK |WB_VSCROLL|WB_DRAG); - mpVScrollbar->EnableNativeWidget(false); - mpVScrollbar->EnableRTL( false ); - mpVScrollbar->SetScrollHdl(LINK(this, SwMarginWin, ScrollHdl)); - mpVScrollbar->EnableDrag(); - mpVScrollbar->AddEventListener( LINK( mpPostItTxt, PostItTxt, WindowEventListener ) ); - - const SwViewOption* pVOpt = mpView->GetWrtShellPtr()->GetViewOptions(); - ULONG nCntrl = mpOutliner->GetControlWord(); - // TODO: crash when AUTOCOMPLETE enabled - nCntrl |= EE_CNTRL_MARKFIELDS | EE_CNTRL_PASTESPECIAL | EE_CNTRL_AUTOCORRECT | EV_CNTRL_AUTOSCROLL | EE_CNTRL_URLSFXEXECUTE; // | EE_CNTRL_AUTOCOMPLETE; - if (pVOpt->IsFieldShadings()) - nCntrl |= EE_CNTRL_MARKFIELDS; - else - nCntrl &= ~EE_CNTRL_MARKFIELDS; - if (pVOpt->IsOnlineSpell()) - nCntrl |= EE_CNTRL_ONLINESPELLING; - else - nCntrl &= ~EE_CNTRL_ONLINESPELLING; - mpOutliner->SetControlWord(nCntrl); - - sal_uInt16 aIndex = SW_MOD()->InsertRedlineAuthor(GetAuthor()); - SetColor(mpMgr->GetColorDark(aIndex),mpMgr->GetColorLight(aIndex),mpMgr->GetColorAnkor(aIndex)); - - CheckMetaText(); - SetPopup(); - SetLanguage(GetLanguage()); - View()->StartSpeller(); - SetPostItText(); - Engine()->CompleteOnlineSpelling(); - - mpMeta->Show(); - mpVScrollbar->Show(); - mpPostItTxt->Show(); -} - -void SwMarginWin::CheckMetaText() -{ - const LocaleDataWrapper& rLocalData = SvtSysLocale().GetLocaleData(); - String sMeta = GetAuthor(); - if (sMeta==String(EMPTYSTRING)) - sMeta = String(SW_RES(STR_NOAUTHOR)); - if (sMeta.Len() > 22) - { - sMeta.Erase(20); - sMeta = sMeta + rtl::OUString::createFromAscii("..."); - } - Date aDate = GetDate(); - if (aDate==Date()) - sMeta = sMeta + LINEBREAK + String(SW_RES(STR_POSTIT_TODAY)); - else - if (aDate == Date(Date()-1)) - sMeta = sMeta + LINEBREAK + String(SW_RES(STR_POSTIT_YESTERDAY)); - else - if (aDate.IsValid() ) - sMeta = sMeta + LINEBREAK + rLocalData.getDate(aDate); - else - sMeta = sMeta + LINEBREAK + String(SW_RES(STR_NODATE)); - if (GetTime()!=0) - sMeta = sMeta + rtl::OUString::createFromAscii(" ") + rLocalData.getTime( GetTime(),false ); - if (mpMeta->GetText() != sMeta) - mpMeta->SetText(sMeta); -} - -void SwMarginWin::Rescale() -{ - MapMode aMode = GetParent()->GetMapMode(); - aMode.SetOrigin( Point() ); - //aMode.SetScaleX( aMode.GetScaleX() * Fraction( 8, 10 ) ); - //aMode.SetScaleY( aMode.GetScaleY() * Fraction( 8, 10 ) ); - mpOutliner->SetRefMapMode( aMode ); - SetMapMode( aMode ); - mpPostItTxt->SetMapMode( aMode ); - if ( mpMeta ) - { - Font aFont( mpMeta->GetSettings().GetStyleSettings().GetFieldFont() ); - sal_Int32 nHeight = aFont.GetHeight(); - nHeight = nHeight * aMode.GetScaleY().GetNumerator() / aMode.GetScaleY().GetDenominator(); - aFont.SetHeight( nHeight ); - mpMeta->SetControlFont( aFont ); - } -} - -void SwMarginWin::SetPosAndSize() -{ - bool bChange = false; - - if (GetSizePixel() != mPosSize.GetSize()) - { - bChange = true; - SetSizePixel(mPosSize.GetSize()); - DoResize(); - } - - if (GetPosPixel().X() != mPosSize.TopLeft().X() || (abs(GetPosPixel().Y() - mPosSize.TopLeft().Y()) > 5) ) - { - bChange = true; - SetPosPixel(mPosSize.TopLeft()); - - Point aLineStart; - Point aLineEnd ; - if (mbMarginSide) - { - aLineStart = EditWin()->PixelToLogic( Point(GetPosPixel().X()+GetSizePixel().Width(),GetPosPixel().Y()-1) ); - aLineEnd = EditWin()->PixelToLogic( Point(GetPosPixel().X(),GetPosPixel().Y()-1) ); - } - else - { - aLineStart = EditWin()->PixelToLogic( Point(GetPosPixel().X(),GetPosPixel().Y()-1) ); - aLineEnd = EditWin()->PixelToLogic( Point(GetPosPixel().X()+GetSizePixel().Width(),GetPosPixel().Y()-1) ); - } - - if (!IsPreview()) - { - if (mpAnkor) - { - mpAnkor->SetAllPosition(basegfx::B2DPoint( mAnkorRect.Left() , mAnkorRect.Bottom() - 5* 15), - basegfx::B2DPoint( mAnkorRect.Left()-5*15 , mAnkorRect.Bottom()+5*15), - basegfx::B2DPoint( mAnkorRect.Left()+5*15 , mAnkorRect.Bottom()+5*15), - basegfx::B2DPoint( mAnkorRect.Left(), mAnkorRect.Bottom()+2*15), - basegfx::B2DPoint( mPageBorder ,mAnkorRect.Bottom()+2*15), - basegfx::B2DPoint( aLineStart.X(),aLineStart.Y()), - basegfx::B2DPoint( aLineEnd.X(),aLineEnd.Y())); - mpAnkor->SetHeight(mAnkorRect.Height()); - } - else - { - mpAnkor = new SwPostItAnkor(basegfx::B2DPoint( mAnkorRect.Left() , mAnkorRect.Bottom()-5*15), - basegfx::B2DPoint( mAnkorRect.Left()-5*15 , mAnkorRect.Bottom()+5*15), - basegfx::B2DPoint( mAnkorRect.Left()+5*15 , mAnkorRect.Bottom()+5*15), - basegfx::B2DPoint( mAnkorRect.Left(), mAnkorRect.Bottom()+2*15), - basegfx::B2DPoint( mPageBorder ,mAnkorRect.Bottom()+2*15), - basegfx::B2DPoint( aLineStart.X(),aLineStart.Y()), - basegfx::B2DPoint( aLineEnd.X(),aLineEnd.Y()) , - mColorAnkor, - false, - false); - mpAnkor->SetHeight(mAnkorRect.Height()); - mpAnkor->setVisible(true); - mpAnkor->SetAnkorState(AS_TRI); - if (HasChildPathFocus()) - { - mpAnkor->setLineSolid(true); - } - pOverlayManager->add(*mpAnkor); - } - } - } - else - { - if ( mpAnkor && (mpAnkor->getBasePosition() != basegfx::B2DPoint( mAnkorRect.Left() , mAnkorRect.Bottom()-5*15)) ) - mpAnkor->SetTriPosition(basegfx::B2DPoint( mAnkorRect.Left() , mAnkorRect.Bottom() - 5* 15), - basegfx::B2DPoint( mAnkorRect.Left()-5*15 , mAnkorRect.Bottom()+5*15), - basegfx::B2DPoint( mAnkorRect.Left()+5*15 , mAnkorRect.Bottom()+5*15), - basegfx::B2DPoint( mAnkorRect.Left(), mAnkorRect.Bottom()+2*15), - basegfx::B2DPoint( mPageBorder ,mAnkorRect.Bottom()+2*15)); - } - - if (bChange) - { - Point aStart = EditWin()->PixelToLogic(GetPosPixel()+Point(0,GetSizePixel().Height())); - Point aEnd = EditWin()->PixelToLogic(GetPosPixel()+Point(GetSizePixel().Width()-1,GetSizePixel().Height())); - mpShadow->SetPosition(basegfx::B2DPoint(aStart.X(),aStart.Y()), basegfx::B2DPoint(aEnd.X(),aEnd.Y())); - } - - if (mpMgr->ShowNotes()) - { - if (IsFollow() && !HasChildPathFocus()) - { - mpAnkor->SetAnkorState(AS_END); - } - else - { - mpAnkor->SetAnkorState(AS_ALL); - SwMarginWin* pWin = GetTopReplyNote(); - if (pWin) - pWin->Ankor()->SetAnkorState(AS_END); - } - } -} - -void SwMarginWin::DoResize() -{ - long aTextHeight = LogicToPixel( mpOutliner->CalcTextSize()).Height(); - long aHeight = GetSizePixel().Height(); - unsigned long aWidth = GetSizePixel().Width(); - - if (mbMeta) - { - aHeight -= GetMetaHeight(); - mpMeta->Show(); - mpPostItTxt->SetQuickHelpText(EMPTYSTRING); - } - else - { - mpMeta->Hide(); - mpPostItTxt->SetQuickHelpText(mpMeta->GetText()); - } - - if ((aTextHeight > aHeight) && !IsPreview()) - { // we need vertical scrollbars and have to reduce the width - aWidth -= GetScrollbarWidth(); - mpVScrollbar->Show(); - } - else - { - mpVScrollbar->Hide(); - } - - mpMeta->SetPosSizePixel(0,aHeight,GetSizePixel().Width()-GetMetaButtonAreaWidth(),GetMetaHeight()); - mpOutliner->SetPaperSize( PixelToLogic( Size(aWidth,aHeight) ) ) ; - mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) ); - if (!mpVScrollbar->IsVisible()) - { // if we do not have a scrollbar anymore, we want to see the complete text - mpOutlinerView->SetVisArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) ); - } - - if (!Application::GetSettings().GetLayoutRTL()) - { - mpPostItTxt->SetPosSizePixel(0, 0, aWidth, aHeight); - mpVScrollbar->SetPosSizePixel( aWidth, 0, GetScrollbarWidth(), aHeight); - } - else - { - mpPostItTxt->SetPosSizePixel((aTextHeight > aHeight) && !IsPreview() ? GetScrollbarWidth() : 0 , 0, aWidth, aHeight); - mpVScrollbar->SetPosSizePixel( 0, 0, GetScrollbarWidth(), aHeight); - } - - mpVScrollbar->SetVisibleSize( PixelToLogic(Size(0,aHeight)).Height() ); - mpVScrollbar->SetPageSize( PixelToLogic(Size(0,aHeight)).Height() * 8 / 10 ); - mpVScrollbar->SetLineSize( mpOutliner->GetTextHeight() / 10 ); - SetScrollbar(); - mpVScrollbar->SetRange( Range(0, mpOutliner->GetTextHeight())); - - //calculate rects for meta- button - const Fraction& fx( GetMapMode().GetScaleX() ); - const Fraction& fy( GetMapMode().GetScaleY() ); - - Point aPos( mpMeta->GetPosPixel()); - Point aBase( aPos.X() + aPos.X() + GetSizePixel().Width(), aPos.Y() ); - Point aLeft = PixelToLogic( Point( aBase.X() - (METABUTTON_WIDTH+5)*fx.GetNumerator()/fx.GetDenominator(), aBase.Y()+17*fy.GetNumerator()/fx.GetDenominator() ) ); - Point aRight = PixelToLogic( Point( aBase.X() - (METABUTTON_WIDTH-1)*fx.GetNumerator()/fx.GetDenominator(), aBase.Y()+17*fy.GetNumerator()/fy.GetDenominator() ) ); - Point aBottom = PixelToLogic( Point( aBase.X() - (METABUTTON_WIDTH+2)*fx.GetNumerator()/fx.GetDenominator(), aBase.Y()+20*fy.GetNumerator()/fy.GetDenominator() ) ); - - aPopupTriangle.clear(); - aPopupTriangle.append(basegfx::B2DPoint(aLeft.X(),aLeft.Y())); - aPopupTriangle.append(basegfx::B2DPoint(aRight.X(),aRight.Y())); - aPopupTriangle.append(basegfx::B2DPoint(aBottom.X(),aBottom.Y())); - aPopupTriangle.setClosed(true); - if (IsPreview()) - mRectMetaButton = PixelToLogic( Rectangle( Point( - aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH*4+10)*fx.GetNumerator()/fx.GetDenominator(), - aPos.Y()+5*fy.GetNumerator()/fy.GetDenominator() ), - Size( METABUTTON_WIDTH*4*fx.GetNumerator()/fx.GetDenominator(), METABUTTON_HEIGHT*fy.GetNumerator()/fy.GetDenominator() ) ) ); - else - mRectMetaButton = PixelToLogic( Rectangle( Point( - aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH+10)*fx.GetNumerator()/fx.GetDenominator(), - aPos.Y()+5*fy.GetNumerator()/fy.GetDenominator() ), - Size( METABUTTON_WIDTH*fx.GetNumerator()/fx.GetDenominator(), METABUTTON_HEIGHT*fy.GetNumerator()/fy.GetDenominator() ) ) ); -} - -void SwMarginWin::SetSizePixel( const Size& rNewSize ) -{ - Window::SetSizePixel(rNewSize); - - if (mpShadow) - { - Point aStart = EditWin()->PixelToLogic(GetPosPixel()+Point(0,GetSizePixel().Height())); - Point aEnd = EditWin()->PixelToLogic(GetPosPixel()+Point(GetSizePixel().Width()-1,GetSizePixel().Height())); - mpShadow->SetPosition(basegfx::B2DPoint(aStart.X(),aStart.Y()), basegfx::B2DPoint(aEnd.X(),aEnd.Y())); - } -} - -void SwMarginWin::SetScrollbar() -{ - mpVScrollbar->SetThumbPos( mpOutlinerView->GetVisArea().Top()+ mpOutlinerView->GetEditView().GetCursor()->GetOffsetY()); -} - -void SwMarginWin::ResizeIfNeccessary(long aOldHeight, long aNewHeight) -{ - if (aOldHeight != aNewHeight) - { - //check for lower border or next note - long aBorder = mpMgr->GetNextBorder(); - if (aBorder != -1) - { - if (aNewHeight > GetMinimumSizeWithoutMeta()) - { - long aNewLowerValue = GetPosPixel().Y() + aNewHeight + GetMetaHeight(); - if (aNewLowerValue < aBorder) - SetSizePixel(Size(GetSizePixel().Width(),aNewHeight+GetMetaHeight())); - else - SetSizePixel(Size(GetSizePixel().Width(),aBorder - GetPosPixel().Y())); - DoResize(); - Invalidate(); - } - else - { - if (GetSizePixel().Height() != GetMinimumSizeWithoutMeta() + GetMetaHeight()) - SetSizePixel(Size(GetSizePixel().Width(),GetMinimumSizeWithoutMeta() + GetMetaHeight())); - DoResize(); - Invalidate(); - } - } - else - { - DoResize(); - Invalidate(); - } - } - else - { - SetScrollbar(); - } -} - -void SwMarginWin::SetColor(Color aColorDark,Color aColorLight, Color aColorAnkor) -{ - mColorDark = aColorDark; - mColorLight = aColorLight; - mColorAnkor = aColorAnkor; - - if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) - { - //Wallpaper aWall(Gradient(GRADIENT_LINEAR,mColorLight,mColorDark)); - //mpPostItTxt->SetBackground(aWall); - - mpMeta->SetControlBackground(mColorDark); - AllSettings aSettings = mpMeta->GetSettings(); - StyleSettings aStyleSettings = aSettings.GetStyleSettings(); - aStyleSettings.SetFieldTextColor(aColorAnkor); - aSettings.SetStyleSettings(aStyleSettings); - mpMeta->SetSettings(aSettings); - - AllSettings aSettings2 = mpVScrollbar->GetSettings(); - StyleSettings aStyleSettings2 = aSettings2.GetStyleSettings(); - aStyleSettings2.SetButtonTextColor(Color(0,0,0)); - //aStyleSettings2.SetLightColor(mColorAnkor); - aStyleSettings2.SetCheckedColor(mColorLight); //hintergund - //aStyleSettings2.SetLightBorderColor(mColorAnkor); - aStyleSettings2.SetShadowColor(mColorAnkor); - aStyleSettings2.SetFaceColor(mColorDark); - aSettings2.SetStyleSettings(aStyleSettings2); - mpVScrollbar->SetSettings(aSettings2); - } -} - -void SwMarginWin::SetMarginSide(bool aMarginSide) -{ - mbMarginSide = aMarginSide; -} - -void SwMarginWin::SetReadonly(BOOL bSet) -{ - mbReadonly = bSet; - View()->SetReadOnly(bSet); -} - -void SwMarginWin::SetLanguage(const SvxLanguageItem aNewItem) -{ - Engine()->SetModifyHdl( Link() ); - ESelection aOld = View()->GetSelection(); - - ESelection aNewSelection( 0, 0, (USHORT)Engine()->GetParagraphCount()-1, USHRT_MAX ); - View()->SetSelection( aNewSelection ); - SfxItemSet aEditAttr(View()->GetAttribs()); - aEditAttr.Put(aNewItem); - View()->SetAttribs( aEditAttr ); - - View()->SetSelection(aOld); - Engine()->SetModifyHdl( LINK( this, SwPostIt, ModifyHdl ) ); - - const SwViewOption* pVOpt = DocView()->GetWrtShellPtr()->GetViewOptions(); - ULONG nCntrl = Engine()->GetControlWord(); - // turn off - if (!pVOpt->IsOnlineSpell()) - nCntrl &= ~EE_CNTRL_ONLINESPELLING; - else - nCntrl &= ~EE_CNTRL_ONLINESPELLING; - Engine()->SetControlWord(nCntrl); - - //turn back on - if (pVOpt->IsOnlineSpell()) - nCntrl |= EE_CNTRL_ONLINESPELLING; - else - nCntrl &= ~EE_CNTRL_ONLINESPELLING; - Engine()->SetControlWord(nCntrl); - - Engine()->CompleteOnlineSpelling(); - Invalidate(); -} - -void SwMarginWin::DataChanged( const DataChangedEvent& aEvent) -{ - Window::DataChanged( aEvent ); -} - -void SwMarginWin::GetFocus() -{ - if (mpPostItTxt) - mpPostItTxt->GrabFocus(); -} - -void SwMarginWin::LoseFocus() -{ -} - -void SwMarginWin::ShowNote() -{ - SetPosAndSize(); - if (!IsVisible()) - Window::Show(); - if (mpAnkor && !mpShadow->isVisible()) - mpShadow->setVisible(true); - if (mpAnkor && !mpAnkor->isVisible()) - mpAnkor->setVisible(true); -} - -void SwMarginWin::HideNote() -{ - if (IsVisible()) - Window::Hide(); - if (mpAnkor) - { - if (mpMgr->IsShowAnkor()) - mpAnkor->SetAnkorState(AS_TRI); - else - mpAnkor->setVisible(false); - } - if (mpShadow && mpShadow->isVisible()) - mpShadow->setVisible(false); -} - -void SwMarginWin::ActivatePostIt() -{ - mpMgr->AssureStdModeAtShell(); - - mpOutliner->ClearModifyFlag(); - mpOutliner->GetUndoManager().Clear(); - - CheckMetaText(); - SetViewState(SS_EDIT); - View()->ShowCursor(); - - mpOutlinerView->GetEditView().SetInsertMode(mpView->GetWrtShellPtr()->IsInsMode()); - - if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) - View()->SetBackgroundColor(mColorDark); - - // mpPostItTxt->SetBackground(Wallpaper(mColorDark)); -} - -void SwMarginWin::DeactivatePostIt() -{ - // remove selection, #i87073# - if (View()->GetEditView().HasSelection()) - { - ESelection aSelection = View()->GetEditView().GetSelection(); - aSelection.nEndPara = aSelection.nStartPara; - aSelection.nEndPos = aSelection.nStartPos; - View()->GetEditView().SetSelection(aSelection); - } - - mpOutliner->CompleteOnlineSpelling(); - - SetViewState(SS_NORMAL); - // write the visible text back into the SwField - UpdateData(); - - if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) - View()->SetBackgroundColor(COL_TRANSPARENT); - - //mpPostItTxt->SetBackground(Gradient(GRADIENT_LINEAR,mColorLight,mColorDark)); - - if ( !IsProtected() && - //if (!IsReadOnly() && (GetStatus()!=SwPostItHelper::DELETED) && - Engine()->GetEditEngine().GetText()==String(EMPTYSTRING) ) - mnEventId = Application::PostUserEvent( LINK( this, SwMarginWin, DeleteHdl), 0 ); -} - -void SwMarginWin::ToggleInsMode() -{ - if (!mpView->GetWrtShell().IsRedlineOn()) - { - //change outliner - mpOutlinerView->GetEditView().SetInsertMode(!mpOutlinerView->GetEditView().IsInsertMode()); - //change documnet - mpView->GetWrtShell().ToggleInsMode(); - //update statusbar - SfxBindings &rBnd = mpView->GetViewFrame()->GetBindings(); - rBnd.Invalidate(SID_ATTR_INSERT); - rBnd.Update(SID_ATTR_INSERT); - } -} - -void SwMarginWin::ExecuteCommand(USHORT nSlot) -{ - mpMgr->AssureStdModeAtShell(); - - switch (nSlot) - { - case FN_POSTIT: - case FN_REPLY: - { - // if this note is empty, it will be deleted once losing the focus, so no reply, but only a new note - // will be created - SwView* pView = DocView(); - if (Engine()->GetEditEngine().GetText() != String(EMPTYSTRING)) - { - OutlinerParaObject* pPara = new OutlinerParaObject(*View()->GetEditView().CreateTextObject()); - Mgr()->RegisterAnswer(pPara); - } - if (Mgr()->GetActivePostIt()) - Mgr()->SetActivePostIt(0); - SwitchToFieldPos(); - pView->GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT); - break; - } - case FN_DELETE_COMMENT: - case FN_DELETE_NOTE: - - //Delete(); // do not kill the parent of our open popup menu - mnEventId = Application::PostUserEvent( LINK( this, SwMarginWin, DeleteHdl), 0 ); - break; - /* - case FN_HIDE_NOTE: - if ( Mgr()->GetActivePostIt() == this ) - { - Mgr()->SetActivePostIt(0); - // put the cursor back into the document - SwitchToFieldPos(); - } - Mgr()->Hide(mpFld); - break; - */ - case FN_DELETE_ALL_NOTES: - case FN_HIDE_ALL_NOTES: - // not possible as slot as this would require that "this" is the active postit - DocView()->GetViewFrame()->GetBindings().Execute( nSlot, 0, 0, SFX_CALLMODE_ASYNCHRON ); - break; - case FN_DELETE_NOTE_AUTHOR: - case FN_HIDE_NOTE_AUTHOR: - { - // not possible as slot as this would require that "this" is the active postit - SfxStringItem aItem( nSlot, GetAuthor() ); - const SfxPoolItem* aItems[2]; - aItems[0] = &aItem; - aItems[1] = 0; - DocView()->GetViewFrame()->GetBindings().Execute( nSlot, aItems, 0, SFX_CALLMODE_ASYNCHRON ); - } - default: - mpView->GetViewFrame()->GetBindings().Execute( nSlot ); - break; - } -} - -bool SwMarginWin::CalcFollow() -{ - return false; -} - -SwEditWin* SwMarginWin::EditWin() -{ - return &mpView->GetEditWin(); -} - -String SwPostIt::GetAuthor() -{ - return mpFld->GetPar1(); -} - -Date SwPostIt::GetDate() -{ - return mpFld->GetDate(); -} - -Time SwPostIt::GetTime() -{ - return mpFld->GetTime(); -} - -long SwMarginWin::GetPostItTextHeight() -{ - return mpOutliner ? LogicToPixel(mpOutliner->CalcTextSize()).Height() : 0; -} - -void SwMarginWin::SwitchToPostIt(USHORT aDirection) -{ - if (mpMgr) - { - SwMarginWin* pPostIt = mpMgr->GetNextPostIt(aDirection, this); - if (pPostIt) - pPostIt->GrabFocus(); - } -} - -void SwMarginWin::MouseButtonDown( const MouseEvent& /*rMEvt */) -{ -} - -void SwMarginWin::MouseMove( const MouseEvent& rMEvt ) -{ - if (mRectMetaButton.IsInside(PixelToLogic(rMEvt.GetPosPixel()))) - { - if (!mbMouseOverButton) - { - Invalidate(mRectMetaButton); - mbMouseOverButton = true; - } - } - else - { - if (mbMouseOverButton) - { - Invalidate(mRectMetaButton); - mbMouseOverButton = false; - } - } -} - -void SwMarginWin::Delete() -{ - if ( Mgr()->GetActivePostIt() == this) - { - Mgr()->SetActivePostIt(0); - // if the note is empty, the previous line will send a delete event, but we are already there - if (mnEventId) - { - Application::RemoveUserEvent( mnEventId ); - mnEventId = 0; - } - } -} - -IMPL_LINK(SwMarginWin, ScrollHdl, ScrollBar*, pScroll) -{ - long nDiff = View()->GetEditView().GetVisArea().Top() - pScroll->GetThumbPos(); - View()->Scroll( 0, nDiff ); - return 0; -} - -IMPL_LINK(SwMarginWin, ModifyHdl, void*, pVoid) -{ - // no warnings, please - pVoid=0; - DocView()->GetDocShell()->SetModified(sal_True); - return 0; -} - -IMPL_LINK(SwMarginWin, DeleteHdl, void*, pVoid) -{ - // no warnings, please - pVoid=0; - mnEventId = 0; - Delete(); - return 0; -} - - -void SwMarginWin::ResetAttributes() -{ - mpOutlinerView->RemoveAttribsKeepLanguages(TRUE); - mpOutliner->RemoveFields(TRUE); - mpOutlinerView->SetAttribs(DefaultItem()); -} - -sal_Int32 SwMarginWin::GetScrollbarWidth() -{ - return mpView->GetWrtShell().GetViewOptions()->GetZoom() / 10; -} - -sal_Int32 SwMarginWin::GetMetaButtonAreaWidth() -{ - const Fraction& f( GetMapMode().GetScaleX() ); - if (IsPreview()) - return 3 * METABUTTON_AREA_WIDTH * f.GetNumerator() / f.GetDenominator(); - else - return METABUTTON_AREA_WIDTH * f.GetNumerator() / f.GetDenominator(); -} - -sal_Int32 SwMarginWin::GetMetaHeight() -{ - const Fraction& f( GetMapMode().GetScaleY() ); - return POSTIT_META_HEIGHT * f.GetNumerator() / f.GetDenominator(); -} - -sal_Int32 SwMarginWin::GetMinimumSizeWithMeta() -{ - return mpMgr->GetMinimumSizeWithMeta(); -} - -sal_Int32 SwMarginWin::GetMinimumSizeWithoutMeta() -{ - const Fraction& f( GetMapMode().GetScaleY() ); - return POSTIT_MINIMUMSIZE_WITHOUT_META * f.GetNumerator() / f.GetDenominator(); -} - -void SwMarginWin::SetSpellChecking() -{ - const SwViewOption* pVOpt = mpView->GetWrtShellPtr()->GetViewOptions(); - ULONG nCntrl = mpOutliner->GetControlWord(); - if (pVOpt->IsOnlineSpell()) - nCntrl |= EE_CNTRL_ONLINESPELLING; - else - nCntrl &= ~EE_CNTRL_ONLINESPELLING; - mpOutliner->SetControlWord(nCntrl); - - mpOutliner->CompleteOnlineSpelling(); - Invalidate(); -} - -void SwMarginWin::SetViewState(ShadowState bState) -{ - switch (bState) - { - case SS_EDIT: - { - if (mpAnkor) - { - mpAnkor->SetAnkorState(AS_ALL); - SwMarginWin* pWin = GetTopReplyNote(); - if (pWin) - pWin->Ankor()->SetAnkorState(AS_END); - mpAnkor->setLineSolid(true); - } - if (mpShadow) - mpShadow->SetShadowState(bState); - break; - } - case SS_VIEW: - { - if (mpAnkor) - mpAnkor->setLineSolid(true); - if (mpShadow) - mpShadow->SetShadowState(bState); - break; - } - case SS_NORMAL: - { - if (mpAnkor) - { - if (IsFollow()) - { - // if there is no visible parent note, we want to see the complete anchor ?? - //if (IsAnyStackParentVisible()) - mpAnkor->SetAnkorState(AS_END); - SwMarginWin* pTopWinSelf = GetTopReplyNote(); - SwMarginWin* pTopWinActive = mpMgr->GetActivePostIt() ? mpMgr->GetActivePostIt()->GetTopReplyNote() : 0; - if (pTopWinSelf && (pTopWinSelf!=pTopWinActive)) - { - if (pTopWinSelf!=mpMgr->GetActivePostIt()) - pTopWinSelf->Ankor()->setLineSolid(false); - pTopWinSelf->Ankor()->SetAnkorState(AS_ALL); - } - } - mpAnkor->setLineSolid(false); - } - if (mpShadow) - mpShadow->SetShadowState(bState); - break; - } - } -} - -bool SwMarginWin::IsAnyStackParentVisible() -{ - SwMarginWin* pMarginWin = mpMgr->GetNextPostIt(KEY_PAGEUP, this); - while (pMarginWin) - { - if (pMarginWin->IsFollow()) - { - pMarginWin = mpMgr->GetNextPostIt(KEY_PAGEUP, pMarginWin); - if (pMarginWin && pMarginWin->IsVisible()) - return true; - } - else - return pMarginWin && pMarginWin->IsVisible() ? true : false; - } - return false; -} - -SwMarginWin* SwMarginWin::GetTopReplyNote() -{ - SwMarginWin* pTopNote = 0; - SwMarginWin* pMarginWin = IsFollow() ? mpMgr->GetNextPostIt(KEY_PAGEUP, this) : 0; - while (pMarginWin) - { - pTopNote = pMarginWin; - pMarginWin = pMarginWin->IsFollow() ? mpMgr->GetNextPostIt(KEY_PAGEUP, pMarginWin) : 0; - } - return pTopNote; -} - -void SwMarginWin::SwitchToFieldPos() -{ - if ( Mgr()->GetActivePostIt() == this ) - Mgr()->SetActivePostIt(0); - GotoPos(); - sal_uInt32 aCount = MoveCaret(); - if (aCount) - DocView()->GetDocShell()->GetWrtShell()->SwCrsrShell::Right(aCount, 0, FALSE); - GrabFocusToDocument(); -} - -String SwMarginWin::GetAuthor() -{ - return String(EMPTYSTRING); -} - -Date SwMarginWin::GetDate() -{ - return Date(0); -} - -Time SwMarginWin::GetTime() -{ - return Time(0); -} - -SvxLanguageItem SwMarginWin::GetLanguage(void) -{ - return SvxLanguageItem(SwLangHelper::GetLanguage(DocView()->GetWrtShell(),RES_CHRATR_LANGUAGE),RES_CHRATR_LANGUAGE); -} - -/***** SwPostIt *********************************************/ -SwPostIt::SwPostIt( Window* pParent, WinBits nBits, SwFmtFld* aField,SwPostItMgr* aMgr,SwPostItBits aBits) - : SwMarginWin(pParent,nBits,aMgr,aBits), - mpFmtFld(aField), - mpFld( static_cast(aField->GetFld())), - mStatus(SwPostItHelper::INVISIBLE) -{ -} - -void SwPostIt::SetPostItText() -{ - // get text from SwPostItField and insert into our textview - Engine()->SetModifyHdl( Link() ); - Engine()->EnableUndo( FALSE ); - mpFld = static_cast(mpFmtFld->GetFld()); - if( mpFld->GetTextObject() ) - Engine()->SetText( *mpFld->GetTextObject() ); - else - { - Engine()->Clear(); - View()->SetAttribs(DefaultItem()); - View()->InsertText(mpFld->GetPar2(),false); - } - - Engine()->ClearModifyFlag(); - Engine()->GetUndoManager().Clear(); - Engine()->EnableUndo( TRUE ); - Engine()->SetModifyHdl( LINK( this, SwPostIt, ModifyHdl ) ); - Invalidate(); -} - -void SwPostIt::UpdateData() -{ - if ( Engine()->IsModified() ) - { - SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld(); - SwPosition aPosition( pTxtFld->GetTxtNode() ); - aPosition.nContent = *pTxtFld->GetStart(); - SwField* pOldField = mpFld->Copy(); - mpFld->SetPar2(Engine()->GetEditEngine().GetText()); - mpFld->SetTextObject(Engine()->CreateParaObject()); - DocView()->GetDocShell()->GetDoc()->AppendUndo(new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true)); - delete pOldField; - // so we get a new layout of notes (anchor position is still the same and we would otherwise not get one) - Mgr()->SetLayout(); - // #i98686# if we have several views, all notes should update their text - mpFmtFld->Broadcast(SwFmtFldHint( 0, SWFMTFLD_CHANGED)); - DocView()->GetDocShell()->SetModified(); - } - Engine()->ClearModifyFlag(); - Engine()->GetUndoManager().Clear(); -} - -void SwPostIt::SetChangeTracking(SwPostItHelper::SwLayoutStatus& aStatus,Color aColor) -{ - if ( (mStatus != aStatus) || (mChangeColor != aColor) ) - { - mStatus = aStatus; - mChangeColor = aColor; - Invalidate(); - } -} - -void SwPostIt::Delete() -{ - SwMarginWin::Delete(); - // we delete the field directly, the Mgr cleans up the PostIt by listening - DocView()->GetWrtShellPtr()->GotoField(*mpFmtFld); - GrabFocusToDocument(); - DocView()->GetWrtShellPtr()->DelRight(); -} - -void SwPostIt::GotoPos() -{ - DocView()->GetDocShell()->GetWrtShell()->GotoField(*mpFmtFld); -} - -sal_uInt32 SwPostIt::MoveCaret() -{ - // if this is an answer, do not skip over all following ones, but insert directly behind the current one - // but when just leaving a note, skip all following ones as well to continue typing - return Mgr()->IsAnswer() ? 1 : 1 + CountFollowing(); -} - -//returns true, if there is another note right before this note -bool SwPostIt::CalcFollow() -{ - SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld(); - SwPosition aPosition( pTxtFld->GetTxtNode() ); - aPosition.nContent = *pTxtFld->GetStart(); - SwTxtAttr * const pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt( - aPosition.nContent.GetIndex() - 1, RES_TXTATR_FIELD ); - const SwField* pFld = pTxtAttr ? pTxtAttr->GetFld().GetFld() : 0; - return pFld && (pFld->Which()== RES_POSTITFLD); -} - -// counts how many SwPostItField we have right after the current one -sal_uInt32 SwPostIt::CountFollowing() -{ - sal_uInt32 aCount = 1; // we start with 1, so we have to subtract one at the end again - SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld(); - SwPosition aPosition( pTxtFld->GetTxtNode() ); - aPosition.nContent = *pTxtFld->GetStart(); - - SwTxtAttr * pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt( - aPosition.nContent.GetIndex() + 1, RES_TXTATR_FIELD ); - SwField* pFld = pTxtAttr ? const_cast(pTxtAttr->GetFld().GetFld()) : 0; - while (pFld && (pFld->Which()== RES_POSTITFLD)) - { - aCount++; - pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt( - aPosition.nContent.GetIndex() + aCount, RES_TXTATR_FIELD ); - pFld = pTxtAttr ? const_cast(pTxtAttr->GetFld().GetFld()) : 0; - } - return aCount - 1; -} - -void SwPostIt::MouseButtonDown( const MouseEvent& rMEvt ) -{ - if (mRectMetaButton.IsInside(PixelToLogic(rMEvt.GetPosPixel())) && rMEvt.IsLeft()) - { - if (IsPreview()) - { - doLazyDelete(); - if (Mgr()) - { - SwPostIt* pPostIt = dynamic_cast(Mgr()->GetPostIt(mpFmtFld)); - if (pPostIt) - { - pPostIt->GrabFocus(); - Mgr()->MakeVisible(pPostIt); - } - } - - } - else - { - if ( mbReadonly ) - { - mpButtonPopup->EnableItem(FN_REPLY,false); - mpButtonPopup->EnableItem(FN_DELETE_NOTE,false); - mpButtonPopup->EnableItem(FN_DELETE_NOTE_AUTHOR,false); - mpButtonPopup->EnableItem(FN_DELETE_ALL_NOTES,false); - } - else - { - if (IsProtected()) - mpButtonPopup->EnableItem(FN_DELETE_NOTE,false); - else - mpButtonPopup->EnableItem(FN_DELETE_NOTE,true); - mpButtonPopup->EnableItem(FN_DELETE_NOTE_AUTHOR,true); - mpButtonPopup->EnableItem(FN_DELETE_ALL_NOTES,true); - } - SvtUserOptions aUserOpt; - String sAuthor; - if( !(sAuthor = aUserOpt.GetFullName()).Len()) - if( !(sAuthor = aUserOpt.GetID()).Len() ) - sAuthor = String( SW_RES( STR_REDLINE_UNKNOWN_AUTHOR )); - // do not allow to reply to ourself and no answer possible if this note is in a protected section - if ((sAuthor == GetAuthor()) || (IsProtected())) - mpButtonPopup->EnableItem(FN_REPLY,false); - else - mpButtonPopup->EnableItem(FN_REPLY,true); - - // show the popup menu and execute the selected command - ExecuteCommand( mpButtonPopup->Execute( this,Rectangle(LogicToPixel(mRectMetaButton.BottomLeft()),LogicToPixel(mRectMetaButton.BottomLeft())),POPUPMENU_EXECUTE_DOWN | POPUPMENU_NOMOUSEUPCLOSE) ); - } - } -} - -void SwPostIt::SetPopup() -{ - mpButtonPopup = new PopupMenu(SW_RES(MN_ANNOTATION_BUTTON)); - //mpButtonPopup->SetMenuFlags(MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES); - XubString aText = mpButtonPopup->GetItemText( FN_DELETE_NOTE_AUTHOR ); - SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1,GetAuthor()); - aText = aRewriter.Apply(aText); - mpButtonPopup->SetItemText(FN_DELETE_NOTE_AUTHOR,aText); -} - -void SwPostIt::InitAnswer(OutlinerParaObject* pText) -{ - //collect our old meta data - SwMarginWin* pWin = Mgr()->GetNextPostIt(KEY_PAGEUP, this); - const LocaleDataWrapper& rLocalData = SvtSysLocale().GetLocaleData(); - String aText = String(SW_RES(STR_REPLY)); - SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, pWin->GetAuthor()); - aText = aRewriter.Apply(aText); - aText.Append(String(rtl::OUString::createFromAscii(" (") + - String(rLocalData.getDate( pWin->GetDate())) + rtl::OUString::createFromAscii(", ") + - String(rLocalData.getTime( pWin->GetTime(),false)) + rtl::OUString::createFromAscii("): \""))); - View()->InsertText(aText,false); - - // insert old, selected text or "..." - // TOOD: iterate over all paragraphs, not only first one to find out if it is empty - if (pText->GetTextObject().GetText(0) != String(EMPTYSTRING)) - View()->GetEditView().InsertText(pText->GetTextObject()); - else - View()->InsertText(rtl::OUString::createFromAscii("..."),false); - View()->InsertText(rtl::OUString::createFromAscii("\"\n"),false); - - View()->SetSelection(ESelection(0x0,0x0,0xFFFF,0xFFFF)); - SfxItemSet aAnswerSet( DocView()->GetDocShell()->GetPool() ); - aAnswerSet.Put(SvxFontHeightItem(200,80,EE_CHAR_FONTHEIGHT)); - aAnswerSet.Put(SvxPostureItem(ITALIC_NORMAL,EE_CHAR_ITALIC)); - View()->SetAttribs(aAnswerSet); - View()->SetSelection(ESelection(0xFFFF,0xFFFF,0xFFFF,0xFFFF)); - - //remove all attributes and reset our standard ones - View()->GetEditView().RemoveAttribsKeepLanguages(true); - View()->SetAttribs(DefaultItem()); - // lets insert an undo step so the initial text can be easily deleted - // but do not use UpdateData() directly, would set modified state again and reentrance into Mgr - Engine()->SetModifyHdl( Link() ); - SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld(); - SwPosition aPosition( pTxtFld->GetTxtNode() ); - aPosition.nContent = *pTxtFld->GetStart(); - SwField* pOldField = mpFld->Copy(); - mpFld->SetPar2(Engine()->GetEditEngine().GetText()); - mpFld->SetTextObject(Engine()->CreateParaObject()); - DocView()->GetDocShell()->GetDoc()->AppendUndo(new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true)); - delete pOldField; - Engine()->SetModifyHdl( LINK( this, SwPostIt, ModifyHdl ) ); - Engine()->ClearModifyFlag(); - Engine()->GetUndoManager().Clear(); -} - -SvxLanguageItem SwPostIt::GetLanguage(void) -{ - // set initial language for outliner - USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( mpFld->GetLanguage() ); - USHORT nLangWhichId = 0; - switch (nScriptType) - { - case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE ; break; - case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break; - case SCRIPTTYPE_COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break; - default: DBG_ERROR("GetLanguage: wrong script tye"); - } - return SvxLanguageItem(mpFld->GetLanguage(),nLangWhichId); -} - -bool SwPostIt::IsProtected() -{ - bool aReturn; - aReturn = mpFmtFld ? (SwMarginWin::IsProtected() || (mStatus==SwPostItHelper::DELETED) || - mpFmtFld->IsProtect()) : (SwMarginWin::IsProtected() || (mStatus==SwPostItHelper::DELETED)); - return aReturn; -} - -/********** SwRedComment**************/ -/* -SwRedComment::SwRedComment( Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits,SwRedline* pRed) - : SwMarginWin(pParent,nBits,aMgr,aBits), - pRedline(pRed) -{ -} - -void SwRedComment::SetPopup() -{ - mpButtonPopup = new PopupMenu(SW_RES(MN_REDCOMMENT_BUTTON)); - //mpButtonPopup->SetMenuFlags(MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES); -} - -void SwRedComment::UpdateData() -{ - if ( Engine()->IsModified() ) - { - // so we get a new layout of notes (ankor position is still the same and we would otherwise not get one) - Mgr()->SetLayout(); - // SetRedline is calling SetModified already - DocView()->GetWrtShell().SetRedlineComment(Engine()->GetEditEngine().GetText()); - } - Engine()->ClearModifyFlag(); - Engine()->GetUndoManager().Clear(); -} - -void SwRedComment::SetPostItText() -{ - Engine()->SetModifyHdl( Link() ); - Engine()->EnableUndo( FALSE ); - - Engine()->Clear(); - View()->SetAttribs(DefaultItem()); - View()->InsertText(pRedline->GetComment(),false); - - Engine()->ClearModifyFlag(); - Engine()->GetUndoManager().Clear(); - Engine()->EnableUndo( TRUE ); - Engine()->SetModifyHdl( LINK( this, SwMarginWin, ModifyHdl ) ); - Invalidate(); -} - -void SwRedComment::DeactivatePostIt() -{ - SwMarginWin::DeactivatePostIt(); - // current Redline is still selected - DocView()->GetWrtShellPtr()->ClearMark(); -} - -void SwRedComment::ActivatePostIt() -{ - SwMarginWin::ActivatePostIt(); - - // do we want the redline selected? - // otherwise, SwRedComment::ActivatePostIt() as well as SwRedComment::DeactivatePostIt() - // can be thrown out completly - DocView()->GetDocShell()->GetWrtShell()->GotoRedline( - DocView()->GetDocShell()->GetWrtShell()->FindRedlineOfData(pRedline->GetRedlineData()),true); -} - -void SwRedComment::MouseButtonDown( const MouseEvent& rMEvt ) -{ - if (mRectMetaButton.IsInside(PixelToLogic(rMEvt.GetPosPixel())) && rMEvt.IsLeft()) - { - ExecuteCommand( mpButtonPopup->Execute( this,Rectangle(LogicToPixel(mRectMetaButton.BottomLeft()),LogicToPixel(mRectMetaButton.BottomLeft())),POPUPMENU_EXECUTE_DOWN | POPUPMENU_NOMOUSEUPCLOSE) ); - } -} - -void SwRedComment::Delete() -{ - SwMarginWin::Delete(); - // we are not neccessarily on our redline, so let's move there - GotoPos(); - DocView()->GetWrtShell().SetRedlineComment(EMPTYSTRING); - DocView()->GetWrtShell().ClearMark(); - // so we get a new layout of notes (ankor position is still the same and we would otherwise not get one) - Mgr()->SetLayout(); - Mgr()->RemoveItem(pRedline); -} - -void SwRedComment::GotoPos() -{ - DocView()->GetDocShell()->GetWrtShell()->GotoRedline( - DocView()->GetDocShell()->GetWrtShell()->FindRedlineOfData(pRedline->GetRedlineData())); -} - -String SwRedComment::GetAuthor() -{ - return pRedline->GetAuthorString(); -} - -Date SwRedComment::GetDate() -{ - return pRedline->GetTimeStamp().GetDate(); -} - -Time SwRedComment::GetTime() -{ - return pRedline->GetTimeStamp().GetTime(); -} - -bool SwRedComment::IsProtected() -{ - return SwMarginWin::IsProtected() || pRedline->Start()->nNode.GetNode().GetTxtNode()->IsInProtectSect(); -} -*/ - -////////////////////////////////////////////////////////////////////////////// -// helper SwPostItShadowPrimitive -// -// Used to allow view-dependent primitive definition. For that purpose, the -// initially created primitive (this one) always has to be view-independent, -// but the decomposition is made view-dependent. Very simple primitive which -// just remembers the discrete data and applies it at decomposition time. - -class SwPostItShadowPrimitive : public drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D -{ -private: - basegfx::B2DPoint maBasePosition; - basegfx::B2DPoint maSecondPosition; - ShadowState maShadowState; - -protected: - virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition( - const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; - -public: - SwPostItShadowPrimitive( - const basegfx::B2DPoint& rBasePosition, - const basegfx::B2DPoint& rSecondPosition, - ShadowState aShadowState) - : drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D(), - maBasePosition(rBasePosition), - maSecondPosition(rSecondPosition), - maShadowState(aShadowState) - {} - - // data access - const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; } - const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; } - ShadowState getShadowState() const { return maShadowState; } - - virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const; - - DeclPrimitrive2DIDBlock() -}; - -drawinglayer::primitive2d::Primitive2DSequence SwPostItShadowPrimitive::createLocalDecomposition( - const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) const -{ - // get logic sizes in object coordinate system - drawinglayer::primitive2d::Primitive2DSequence xRetval; - basegfx::B2DRange aRange(getBasePosition()); - - switch(maShadowState) - { - case SS_NORMAL: - { - aRange.expand(basegfx::B2DTuple(getSecondPosition().getX(), getSecondPosition().getY() + (2.0 * getDiscreteUnit()))); - const drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute( - drawinglayer::attribute::GRADIENTSTYLE_LINEAR, - 0.0, - 0.5, - 0.5, - 1800.0 * F_PI1800, - basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0), - basegfx::BColor(180.0/255.0,180.0/255.0,180.0/255.0), - 2); - - const drawinglayer::primitive2d::Primitive2DReference xReference( - new drawinglayer::primitive2d::FillGradientPrimitive2D( - aRange, - aFillGradientAttribute)); - - xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); - break; - } - case SS_VIEW: - { - aRange.expand(basegfx::B2DTuple(getSecondPosition().getX(), getSecondPosition().getY() + (4.0 * getDiscreteUnit()))); - const drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute( - drawinglayer::attribute::GRADIENTSTYLE_LINEAR, - 0.0, - 0.5, - 0.5, - 1800.0 * F_PI1800, - basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0), - basegfx::BColor(180.0/255.0,180.0/255.0,180.0/255.0), - 4); - - const drawinglayer::primitive2d::Primitive2DReference xReference( - new drawinglayer::primitive2d::FillGradientPrimitive2D( - aRange, - aFillGradientAttribute)); - - xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); - break; - } - case SS_EDIT: - { - aRange.expand(basegfx::B2DTuple(getSecondPosition().getX(), getSecondPosition().getY() + (4.0 * getDiscreteUnit()))); - const drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute( - drawinglayer::attribute::GRADIENTSTYLE_LINEAR, - 0.0, - 0.5, - 0.5, - 1800.0 * F_PI1800, - basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0), - basegfx::BColor(83.0/255.0,83.0/255.0,83.0/255.0), - 4); - - const drawinglayer::primitive2d::Primitive2DReference xReference( - new drawinglayer::primitive2d::FillGradientPrimitive2D( - aRange, - aFillGradientAttribute)); - - xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); - break; - } - default: - { - break; - } - } - - return xRetval; -} - -bool SwPostItShadowPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const -{ - if(drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::operator==(rPrimitive)) - { - const SwPostItShadowPrimitive& rCompare = static_cast< const SwPostItShadowPrimitive& >(rPrimitive); - - return (getBasePosition() == rCompare.getBasePosition() - && getSecondPosition() == rCompare.getSecondPosition() - && getShadowState() == rCompare.getShadowState()); - } - - return false; -} - -ImplPrimitrive2DIDBlock(SwPostItShadowPrimitive, PRIMITIVE2D_ID_SWPOSTITSHADOWPRIMITIVE) - -/****** SwPostItShadow ***********************************************************/ -SwPostItShadow::SwPostItShadow(const basegfx::B2DPoint& rBasePos,const basegfx::B2DPoint& rSecondPosition, - Color aBaseColor,ShadowState aState) - : OverlayObjectWithBasePosition(rBasePos, aBaseColor), - maSecondPosition(rSecondPosition), - mShadowState(aState) -{ -// mbAllowsAnimation = false; -} - -SwPostItShadow::~SwPostItShadow() -{ -} - -drawinglayer::primitive2d::Primitive2DSequence SwPostItShadow::createOverlayObjectPrimitive2DSequence() -{ - const drawinglayer::primitive2d::Primitive2DReference aReference( - new SwPostItShadowPrimitive( - getBasePosition(), - GetSecondPosition(), - GetShadowState())); - return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1); -} - -void SwPostItShadow::SetShadowState(ShadowState aState) -{ - if (mShadowState != aState) - { - mShadowState = aState; - - objectChange(); - } -} - -void SwPostItShadow::SetPosition(const basegfx::B2DPoint& rPoint1, - const basegfx::B2DPoint& rPoint2) -{ - if(!rPoint1.equal(getBasePosition()) || !rPoint2.equal(GetSecondPosition())) - { - maBasePosition = rPoint1; - maSecondPosition = rPoint2; - - objectChange(); - } -} - -////////////////////////////////////////////////////////////////////////////// -// helper class: Primitive for discrete visualisation - -class SwPostItAnkorPrimitive : public drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D -{ -private: - basegfx::B2DPolygon maTriangle; - basegfx::B2DPolygon maLine; - basegfx::B2DPolygon maLineTop; - AnkorState maAnkorState; - basegfx::BColor maColor; - - // discrete line width - double mfLogicLineWidth; - - // bitfield - bool mbShadow : 1; - bool mbLineSolid : 1; - -protected: - virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition( - const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; - -public: - SwPostItAnkorPrimitive( - const basegfx::B2DPolygon& rTriangle, - const basegfx::B2DPolygon& rLine, - const basegfx::B2DPolygon& rLineTop, - AnkorState aAnkorState, - const basegfx::BColor& rColor, - double fLogicLineWidth, - bool bShadow, - bool bLineSolid) - : drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D(), - maTriangle(rTriangle), - maLine(rLine), - maLineTop(rLineTop), - maAnkorState(aAnkorState), - maColor(rColor), - mfLogicLineWidth(fLogicLineWidth), - mbShadow(bShadow), - mbLineSolid(bLineSolid) - {} - - // data access - const basegfx::B2DPolygon& getTriangle() const { return maTriangle; } - const basegfx::B2DPolygon& getLine() const { return maLine; } - const basegfx::B2DPolygon& getLineTop() const { return maLineTop; } - AnkorState getAnkorState() const { return maAnkorState; } - const basegfx::BColor& getColor() const { return maColor; } - double getLogicLineWidth() const { return mfLogicLineWidth; } - bool getShadow() const { return mbShadow; } - bool getLineSolid() const { return mbLineSolid; } - - virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const; - - DeclPrimitrive2DIDBlock() -}; - -drawinglayer::primitive2d::Primitive2DSequence SwPostItAnkorPrimitive::createLocalDecomposition( - const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) const -{ - drawinglayer::primitive2d::Primitive2DSequence aRetval; - - if(AS_TRI == getAnkorState() || AS_ALL == getAnkorState() || AS_START == getAnkorState()) - { - // create triangle - const drawinglayer::primitive2d::Primitive2DReference aTriangle( - new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( - basegfx::B2DPolyPolygon(getTriangle()), - getColor())); - - drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aTriangle); - } - - if(AS_ALL == getAnkorState() || AS_START == getAnkorState()) - { - // create line start - const drawinglayer::attribute::LineAttribute aLineAttribute( - getColor(), - getLogicLineWidth() / (basegfx::fTools::equalZero(getDiscreteUnit()) ? 1.0 : getDiscreteUnit())); - - if(getLineSolid()) - { - const drawinglayer::primitive2d::Primitive2DReference aSolidLine( - new drawinglayer::primitive2d::PolygonStrokePrimitive2D( - getLine(), - aLineAttribute)); - - drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aSolidLine); - } - else - { - ::std::vector< double > aDotDashArray; - const double fDistance(3.0 * 15.0); - const double fDashLen(5.0 * 15.0); - - aDotDashArray.push_back(fDashLen); - aDotDashArray.push_back(fDistance); - - const drawinglayer::attribute::StrokeAttribute aStrokeAttribute( - aDotDashArray, - fDistance + fDashLen); - - const drawinglayer::primitive2d::Primitive2DReference aStrokedLine( - new drawinglayer::primitive2d::PolygonStrokePrimitive2D( - getLine(), - aLineAttribute, - aStrokeAttribute)); - - drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aStrokedLine); - } - } - - if(aRetval.hasElements() && getShadow()) - { - // shadow is only for triangle and line start, and in upper left - // and lower right direction, in different colors - const double fColorChange(20.0 / 255.0); - const basegfx::B3DTuple aColorChange(fColorChange, fColorChange, fColorChange); - basegfx::BColor aLighterColor(getColor() + aColorChange); - basegfx::BColor aDarkerColor(getColor() - aColorChange); - - aLighterColor.clamp(); - aDarkerColor.clamp(); - - // create shadow sequence - drawinglayer::primitive2d::Primitive2DSequence aShadows(2); - basegfx::B2DHomMatrix aTransform; - - aTransform.set(0, 2, -getDiscreteUnit()); - aTransform.set(1, 2, -getDiscreteUnit()); - - aShadows[0] = drawinglayer::primitive2d::Primitive2DReference( - new drawinglayer::primitive2d::ShadowPrimitive2D( - aTransform, - aLighterColor, - aRetval)); - - aTransform.set(0, 2, getDiscreteUnit()); - aTransform.set(1, 2, getDiscreteUnit()); - - aShadows[1] = drawinglayer::primitive2d::Primitive2DReference( - new drawinglayer::primitive2d::ShadowPrimitive2D( - aTransform, - aDarkerColor, - aRetval)); - - // add shadow before geometry to make it be proccessed first - const drawinglayer::primitive2d::Primitive2DSequence aTemporary(aRetval); - - aRetval = aShadows; - drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(aRetval, aTemporary); - } - - if(AS_ALL == getAnkorState() || AS_END == getAnkorState()) - { - // LineTop has to be created, too, but uses no shadow, so add after - // the other parts are created - const drawinglayer::attribute::LineAttribute aLineAttribute( - getColor(), - getLogicLineWidth() / (basegfx::fTools::equalZero(getDiscreteUnit()) ? 1.0 : getDiscreteUnit())); - - const drawinglayer::primitive2d::Primitive2DReference aLineTop( - new drawinglayer::primitive2d::PolygonStrokePrimitive2D( - getLineTop(), - aLineAttribute)); - - drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aLineTop); - } - - return aRetval; -} - -bool SwPostItAnkorPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const -{ - if(drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::operator==(rPrimitive)) - { - const SwPostItAnkorPrimitive& rCompare = static_cast< const SwPostItAnkorPrimitive& >(rPrimitive); - - return (getTriangle() == rCompare.getTriangle() - && getLine() == rCompare.getLine() - && getLineTop() == rCompare.getLineTop() - && getAnkorState() == rCompare.getAnkorState() - && getColor() == rCompare.getColor() - && getLogicLineWidth() == rCompare.getLogicLineWidth() - && getShadow() == rCompare.getShadow() - && getLineSolid() == rCompare.getLineSolid()); - } - - return false; -} - -ImplPrimitrive2DIDBlock(SwPostItAnkorPrimitive, PRIMITIVE2D_ID_SWPOSTITANKORPRIMITIVE) - -/****** SwPostItAnkor ***********************************************************/ - -void SwPostItAnkor::implEnsureGeometry() -{ - if(!maTriangle.count()) - { - maTriangle.append(getBasePosition()); - maTriangle.append(GetSecondPosition()); - maTriangle.append(GetThirdPosition()); - maTriangle.setClosed(true); - } - - if(!maLine.count()) - { - maLine.append(GetFourthPosition()); - maLine.append(GetFifthPosition()); - maLine.append(GetSixthPosition()); - } - - if(!maLineTop.count()) - { - maLineTop.append(GetSixthPosition()); - maLineTop.append(GetSeventhPosition()); - } -} - -void SwPostItAnkor::implResetGeometry() -{ - maTriangle.clear(); - maLine.clear(); - maLineTop.clear(); -} - -SwPostItAnkor::SwPostItAnkor(const basegfx::B2DPoint& rBasePos, - const basegfx::B2DPoint& rSecondPos, - const basegfx::B2DPoint& rThirdPos, - const basegfx::B2DPoint& rFourthPos, - const basegfx::B2DPoint& rFifthPos, - const basegfx::B2DPoint& rSixthPos, - const basegfx::B2DPoint& rSeventhPos, - Color aBaseColor, - bool bShadowedEffect, - bool bLineSolid) - : OverlayObjectWithBasePosition(rBasePos, aBaseColor), - maSecondPosition(rSecondPos), - maThirdPosition(rThirdPos), - maFourthPosition(rFourthPos), - maFifthPosition(rFifthPos), - maSixthPosition(rSixthPos), - maSeventhPosition(rSeventhPos), - maTriangle(), - maLine(), - maLineTop(), - mHeight(0), - mAnkorState(AS_ALL), - mbShadowedEffect(bShadowedEffect), - mbLineSolid(bLineSolid) -{ - //mbAllowsAnimation = true; -} - -SwPostItAnkor::~SwPostItAnkor() -{ -} - -drawinglayer::primitive2d::Primitive2DSequence SwPostItAnkor::createOverlayObjectPrimitive2DSequence() -{ - implEnsureGeometry(); - - const drawinglayer::primitive2d::Primitive2DReference aReference( - new SwPostItAnkorPrimitive( - maTriangle, - maLine, - maLineTop, - GetAnkorState(), - getBaseColor().getBColor(), - ANKORLINE_WIDTH * 15.0, - getShadowedEffect(), - getLineSolid())); - - return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1); -} - -void SwPostItAnkor::SetAllPosition(const basegfx::B2DPoint& rPoint1, - const basegfx::B2DPoint& rPoint2, - const basegfx::B2DPoint& rPoint3, - const basegfx::B2DPoint& rPoint4, - const basegfx::B2DPoint& rPoint5, - const basegfx::B2DPoint& rPoint6, - const basegfx::B2DPoint& rPoint7) -{ - if(rPoint1 != getBasePosition() - || rPoint2 != GetSecondPosition() - || rPoint3 != GetThirdPosition() - || rPoint4 != GetFourthPosition() - || rPoint5 != GetFifthPosition() - || rPoint6 != GetSixthPosition() - || rPoint7 != GetSeventhPosition()) - { - maBasePosition = rPoint1; - maSecondPosition = rPoint2; - maThirdPosition = rPoint3; - maFourthPosition = rPoint4; - maFifthPosition = rPoint5; - maSixthPosition = rPoint6; - maSeventhPosition = rPoint7; - - implResetGeometry(); - objectChange(); - } -} - -void SwPostItAnkor::SetSixthPosition(const basegfx::B2DPoint& rNew) -{ - if(rNew != maSixthPosition) - { - maSixthPosition = rNew; - implResetGeometry(); - objectChange(); - } -} - -void SwPostItAnkor::SetSeventhPosition(const basegfx::B2DPoint& rNew) -{ - if(rNew != maSeventhPosition) - { - maSeventhPosition = rNew; - implResetGeometry(); - objectChange(); - } -} - -void SwPostItAnkor::SetTriPosition(const basegfx::B2DPoint& rPoint1,const basegfx::B2DPoint& rPoint2,const basegfx::B2DPoint& rPoint3, - const basegfx::B2DPoint& rPoint4,const basegfx::B2DPoint& rPoint5) -{ - if(rPoint1 != getBasePosition() - || rPoint2 != GetSecondPosition() - || rPoint3 != GetThirdPosition() - || rPoint4 != GetFourthPosition() - || rPoint5 != GetFifthPosition()) - { - maBasePosition = rPoint1; - maSecondPosition = rPoint2; - maThirdPosition = rPoint3; - maFourthPosition = rPoint4; - maFifthPosition = rPoint5; - - implResetGeometry(); - objectChange(); - } -} - -void SwPostItAnkor::setLineSolid(bool bNew) -{ - if(bNew != getLineSolid()) - { - mbLineSolid = bNew; - objectChange(); - } -} - -void SwPostItAnkor::SetAnkorState(AnkorState aState) -{ - if (mAnkorState != aState) - { - mAnkorState = aState; - objectChange(); - } -} diff --git a/sw/source/ui/inc/SidebarWindowsConsts.hxx b/sw/source/ui/inc/SidebarWindowsConsts.hxx new file mode 100644 index 0000000000..378b2be079 --- /dev/null +++ b/sw/source/ui/inc/SidebarWindowsConsts.hxx @@ -0,0 +1,41 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SIDEBARWINDOWSCONSTS_HXX +#define _SIDEBARWINDOWSCONSTS_HXX + +namespace sw { namespace sidebarwindows { + +const sal_Int8 ANCHORLINE_WIDTH = 1; + +} } // end of namespace sw::sidebarwindows + +#endif diff --git a/sw/source/ui/makefile.mk b/sw/source/ui/makefile.mk index 10897eedbe..c0d459cd35 100644 --- a/sw/source/ui/makefile.mk +++ b/sw/source/ui/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -62,8 +62,8 @@ SUBLIBS1= \ $(SLB)$/dbui.lib \ $(SLB)$/dialog.lib \ $(SLB)$/dochdl.lib \ - $(SLB)$/docvw.lib \ - $(SLB)$/envelp.lib \ + $(SLB)$/docvw.lib \ + $(SLB)$/envelp.lib \ $(SLB)$/fldui.lib \ $(SLB)$/frmdlg.lib \ $(SLB)$/globdoc.lib diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 68b8e87c3b..d08d5ddc21 100755 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -99,8 +99,8 @@ #include #include "annotsh.hxx" #include "view.hxx" -#include "PostItMgr.hxx" -#include "postit.hxx" +#include +#include #include "swtypes.hxx" @@ -163,22 +163,23 @@ SwAnnotationShell::~SwAnnotationShell() SfxUndoManager* SwAnnotationShell::GetUndoManager() { SwPostItMgr* pPostItMgr = rView.GetPostItMgr(); - if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() ) + if ( !pPostItMgr || + !pPostItMgr->HasActiveSidebarWin() ) { DBG_ASSERT(pPostItMgr,"PostItMgr::Layout(): We are looping forever"); return 0; } - return &pPostItMgr->GetActivePostIt()->Engine()->GetUndoManager(); + return &pPostItMgr->GetActiveSidebarWin()->GetOutlinerView()->GetOutliner()->GetUndoManager(); } void SwAnnotationShell::Exec( SfxRequest &rReq ) { //TODO: clean this up!!!! SwPostItMgr* pPostItMgr = rView.GetPostItMgr(); - if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() ) + if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() ) return; - OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View(); + OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView(); SfxItemSet aEditAttr(pOLV->GetAttribs()); SfxItemSet aNewAttr(*aEditAttr.GetPool(), aEditAttr.GetRanges()); @@ -272,7 +273,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) } case FN_FORMAT_RESET: { - pPostItMgr->GetActivePostIt()->ResetAttributes(); + pPostItMgr->GetActiveSidebarWin()->ResetAttributes(); rReq.Done(); break; } @@ -323,7 +324,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) aSel.nEndPos++; pOLV->SetSelection(aSel); } - if (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED) + if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED) pOLV->InsertField(SvxFieldItem(aFld, EE_FEATURE_FIELD)); } break; @@ -353,7 +354,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) } case SID_CHARMAP: { - if (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED) + if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED) InsertSymbol(rReq); break; } @@ -362,7 +363,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) const SfxPoolItem* pItem = 0; if(pNewAttrs) pNewAttrs->GetItemState(nSlot, FALSE, &pItem ); - if (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED) + if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED) pOLV->InsertText(((const SfxStringItem *)pItem)->GetValue()); break; } @@ -580,10 +581,10 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) //SID_ATTR_PARA_ADJUST_BLOCK SwPostItMgr* pPostItMgr = rView.GetPostItMgr(); - if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() ) + if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() ) return; - OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View(); + OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView(); SfxItemSet aEditAttr(pOLV->GetAttribs()); SfxWhichIter aIter(rSet); @@ -767,7 +768,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) if(nEEWhich) rSet.Put(aEditAttr.Get(nEEWhich, sal_True), nWhich); - if (pPostItMgr->GetActivePostIt()->GetStatus()==SwPostItHelper::DELETED) + if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()==SwPostItHelper::DELETED) rSet.DisableItem( nWhich ); nWhich = aIter.NextWhich(); @@ -787,19 +788,19 @@ void SwAnnotationShell::StateSearch(SfxItemSet &rSet) void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq) { SwPostItMgr* pPostItMgr = rView.GetPostItMgr(); - if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() ) + if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() ) return; - OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View(); + OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView(); SfxItemSet aEditAttr(pOLV->GetAttribs()); SfxItemSet aNewAttr(*aEditAttr.GetPool(), aEditAttr.GetRanges()); - long aOldHeight = pPostItMgr->GetActivePostIt()->GetPostItTextHeight(); + long aOldHeight = pPostItMgr->GetActiveSidebarWin()->GetPostItTextHeight(); sal_uInt16 nSlot = rReq.GetSlot(); switch (nSlot) { case SID_CUT: - if ( (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED) && pOLV->HasSelection() ) + if ( (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED) && pOLV->HasSelection() ) pOLV->Cut(); break; case SID_COPY: @@ -807,12 +808,12 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq) pOLV->Copy(); break; case SID_PASTE: - if (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED) + if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED) pOLV->Paste(); break; case SID_PASTE_SPECIAL: { - if (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED) + if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractPasteDialog* pDlg = pFact->CreatePasteDialog( &rView.GetEditWin() ); @@ -855,19 +856,19 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq) break; } } - pPostItMgr->GetActivePostIt()->ResizeIfNeccessary(aOldHeight,pPostItMgr->GetActivePostIt()->GetPostItTextHeight()); + pPostItMgr->GetActiveSidebarWin()->ResizeIfNeccessary(aOldHeight,pPostItMgr->GetActiveSidebarWin()->GetPostItTextHeight()); } void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet) { SwPostItMgr* pPostItMgr = rView.GetPostItMgr(); - if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() ) + if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() ) return; - OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View(); + OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView(); TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( &rView.GetEditWin() ) ); bool bPastePossible = ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) || aDataHelper.HasFormat( SOT_FORMAT_RTF ) ); - bPastePossible = bPastePossible && (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED); + bPastePossible = bPastePossible && (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED); SfxWhichIter aIter(rSet); sal_uInt16 nWhich = aIter.FirstWhich(); @@ -878,7 +879,7 @@ void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet) { case SID_CUT: { - if ( (pPostItMgr->GetActivePostIt()->GetStatus()==SwPostItHelper::DELETED) || !pOLV->HasSelection() ) + if ( (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()==SwPostItHelper::DELETED) || !pOLV->HasSelection() ) rSet.DisableItem( nWhich ); } case SID_COPY: @@ -942,10 +943,10 @@ void SwAnnotationShell::StateStatusLine(SfxItemSet &rSet) void SwAnnotationShell::StateInsert(SfxItemSet &rSet) { SwPostItMgr* pPostItMgr = rView.GetPostItMgr(); - if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() ) + if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() ) return; - OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View(); + OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView(); SfxWhichIter aIter(rSet); sal_uInt16 nWhich = aIter.FirstWhich(); @@ -988,7 +989,7 @@ void SwAnnotationShell::StateInsert(SfxItemSet &rSet) break; } - if (pPostItMgr->GetActivePostIt()->GetStatus()==SwPostItHelper::DELETED) + if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()==SwPostItHelper::DELETED) rSet.DisableItem( nWhich ); nWhich = aIter.NextWhich(); @@ -1009,8 +1010,8 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq) case FN_POSTIT: case FN_DELETE_COMMENT: case FN_DELETE_NOTE: - if ( pPostItMgr->GetActivePostIt() ) - pPostItMgr->GetActivePostIt()->ExecuteCommand(nSlot); + if ( pPostItMgr->HasActiveSidebarWin() ) + pPostItMgr->GetActiveSidebarWin()->ExecuteCommand(nSlot); break; case FN_DELETE_ALL_NOTES: pPostItMgr->Delete(); @@ -1024,7 +1025,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq) } case FN_HIDE_NOTE: /* - if ( Mgr()->GetActivePostIt() == this ) + if ( Mgr()->GetActiveSidebarWin() == this ) { Mgr()->SetActivePostIt(0); // put the cursor back into the document @@ -1063,20 +1064,29 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet) case FN_HIDE_NOTE_AUTHOR: case FN_HIDE_ALL_NOTES: { - if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() || !pPostItMgr->GetActivePostIt()->ISA(SwPostIt)) + if ( !pPostItMgr || + !pPostItMgr->HasActiveAnnotationWin() ) + { rSet.DisableItem(nWhich); + } break; } case FN_DELETE_COMMENT: { - if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() ) //|| !pPostItMgr->GetActivePostIt()->ISA(SwRedComment)) + if ( !pPostItMgr || + !pPostItMgr->HasActiveSidebarWin() /*HasActiveRedCommentWin()*/ ) + { rSet.DisableItem(nWhich); + } break; } case FN_REPLY: { - if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() || !pPostItMgr->GetActivePostIt()->ISA(SwPostIt)) + if ( !pPostItMgr || + !pPostItMgr->HasActiveAnnotationWin() ) + { rSet.DisableItem(nWhich); + } else { SvtUserOptions aUserOpt; @@ -1084,7 +1094,7 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet) if( !(sAuthor = aUserOpt.GetFullName()).Len()) if( !(sAuthor = aUserOpt.GetID()).Len() ) sAuthor = String( SW_RES( STR_REDLINE_UNKNOWN_AUTHOR )); - if (sAuthor == pPostItMgr->GetActivePostIt()->GetAuthor()) + if (sAuthor == pPostItMgr->GetActiveSidebarWin()->GetAuthor()) rSet.DisableItem(nWhich); } break; @@ -1094,9 +1104,9 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet) break; } - if (pPostItMgr->GetActivePostIt()) + if (pPostItMgr->HasActiveSidebarWin()) { - if ( (pPostItMgr->GetActivePostIt()->IsProtected()) && + if ( (pPostItMgr->GetActiveSidebarWin()->IsProtected()) && ( (nSlotId==FN_DELETE_NOTE) || (nSlotId==FN_REPLY) ) ) rSet.DisableItem( nWhich ); } @@ -1107,10 +1117,10 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet) void SwAnnotationShell::ExecLingu(SfxRequest &rReq) { SwPostItMgr* pPostItMgr = rView.GetPostItMgr(); - if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() ) + if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() ) return; - OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View(); + OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView(); SfxItemSet aEditAttr(pOLV->GetAttribs()); sal_uInt16 nSlot = rReq.GetSlot(); SwWrtShell &rSh = rView.GetWrtShell(); @@ -1222,10 +1232,10 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq) void SwAnnotationShell::GetLinguState(SfxItemSet &rSet) { SwPostItMgr* pPostItMgr = rView.GetPostItMgr(); - if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() ) + if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() ) return; - OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View(); + OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView(); SfxItemSet aEditAttr(pOLV->GetAttribs()); SfxWhichIter aIter(rSet); @@ -1267,7 +1277,7 @@ void SwAnnotationShell::GetLinguState(SfxItemSet &rSet) break; } - if (pPostItMgr->GetActivePostIt()->GetStatus()==SwPostItHelper::DELETED) + if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()==SwPostItHelper::DELETED) rSet.DisableItem( nWhich ); nWhich = aIter.NextWhich(); @@ -1277,10 +1287,10 @@ void SwAnnotationShell::GetLinguState(SfxItemSet &rSet) void SwAnnotationShell::ExecTransliteration(SfxRequest &rReq) { SwPostItMgr* pPostItMgr = rView.GetPostItMgr(); - if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() ) + if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() ) return; - OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View(); + OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView(); using namespace ::com::sun::star::i18n; { @@ -1324,7 +1334,9 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq) SfxUndoManager* pUndoManager = GetUndoManager(); SwWrtShell &rSh = rView.GetWrtShell(); - long aOldHeight = rView.GetPostItMgr()->GetActivePostIt() ? rView.GetPostItMgr()->GetActivePostIt()->GetPostItTextHeight() : 0; + long aOldHeight = rView.GetPostItMgr()->HasActiveSidebarWin() + ? rView.GetPostItMgr()->GetActiveSidebarWin()->GetPostItTextHeight() + : 0; USHORT nId = rReq.GetSlot(); sal_uInt16 nCnt = 1; @@ -1384,14 +1396,14 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq) rView.GetViewFrame()->GetBindings().InvalidateAll(sal_False); - if (rView.GetPostItMgr()->GetActivePostIt()) - rView.GetPostItMgr()->GetActivePostIt()->ResizeIfNeccessary(aOldHeight,rView.GetPostItMgr()->GetActivePostIt()->GetPostItTextHeight()); + if (rView.GetPostItMgr()->HasActiveSidebarWin()) + rView.GetPostItMgr()->GetActiveSidebarWin()->ResizeIfNeccessary(aOldHeight,rView.GetPostItMgr()->GetActiveSidebarWin()->GetPostItTextHeight()); } void SwAnnotationShell::StateUndo(SfxItemSet &rSet) { SwPostItMgr* pPostItMgr = rView.GetPostItMgr(); - if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() ) + if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() ) return; SfxWhichIter aIter(rSet); @@ -1480,7 +1492,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet) } - if (pPostItMgr->GetActivePostIt()->GetStatus()==SwPostItHelper::DELETED) + if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()==SwPostItHelper::DELETED) rSet.DisableItem( nWhich ); nWhich = aIter.NextWhich(); @@ -1501,10 +1513,10 @@ void SwAnnotationShell::StateDisableItems( SfxItemSet &rSet ) void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) { SwPostItMgr* pPostItMgr = rView.GetPostItMgr(); - if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() ) + if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() ) return; - OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View(); + OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView(); const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = 0; diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx index 529ac59604..d4571d7089 100644 --- a/sw/source/ui/shells/textfld.cxx +++ b/sw/source/ui/shells/textfld.cxx @@ -1,7 +1,7 @@ /************ ************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -83,8 +83,7 @@ #include -#include "PostItMgr.hxx" -#include "postit.hxx" +#include using namespace nsSwDocInfoSubType; @@ -318,8 +317,11 @@ void SwTextShell::ExecField(SfxRequest &rReq) } break; case FN_DELETE_NOTE: - if ( GetView().GetPostItMgr() && GetView().GetPostItMgr()->GetActivePostIt() ) - GetView().GetPostItMgr()->GetActivePostIt()->Delete(); + if ( GetView().GetPostItMgr() && + GetView().GetPostItMgr()->HasActiveSidebarWin() ) + { + GetView().GetPostItMgr()->DeleteActiveSidebarWin(); + } break; case FN_DELETE_ALL_NOTES: if ( GetView().GetPostItMgr() ) @@ -333,8 +335,11 @@ void SwTextShell::ExecField(SfxRequest &rReq) } break; case FN_HIDE_NOTE: - if ( GetView().GetPostItMgr() && GetView().GetPostItMgr()->GetActivePostIt() ) - GetView().GetPostItMgr()->GetActivePostIt()->Hide(); + if ( GetView().GetPostItMgr() && + GetView().GetPostItMgr()->HasActiveSidebarWin() ) + { + GetView().GetPostItMgr()->HideActiveSidebarWin(); + } break; case FN_HIDE_ALL_NOTES: if ( GetView().GetPostItMgr() ) @@ -391,8 +396,8 @@ void SwTextShell::ExecField(SfxRequest &rReq) } break; case FN_REDLINE_COMMENT: - { - /* this code can be used once we want redline comments in the margin, all other stuff can + { + /* this code can be used once we want redline comments in the margin, all other stuff can then be deleted String sComment; const SwRedline *pRedline = rSh.GetCurrRedline(); @@ -630,7 +635,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) SwPostItMgr* pPostItMgr = GetView().GetPostItMgr(); if ( !pPostItMgr ) rSet.InvalidateItem( nWhich ); - else if ( !pPostItMgr->GetActivePostIt() ) + else if ( !pPostItMgr->HasActiveSidebarWin() ) { rSet.InvalidateItem( FN_DELETE_NOTE ); rSet.InvalidateItem( FN_HIDE_NOTE ); diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 191ff8ac0d..c58bb2f33d 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -221,7 +221,7 @@ void SwView::GotFocus() const SwAnnotationShell* pAsAnnotationShell = PTR_CAST( SwAnnotationShell, pTopShell ); if ( pAsAnnotationShell ) { - mpPostItMgr->SetActivePostIt(0); + mpPostItMgr->SetActiveSidebarWin(0); const_cast< SwView* >( this )->AttrChangedNotify( pWrtShell ); } } diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 493daabe92..625335491c 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -34,12 +34,6 @@ #include #include -// #ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_ -// #include -// #endif -// #ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_ -// #include -// #endif #include #include #include @@ -49,9 +43,6 @@ #include #include -// #ifndef _FILTER_HXX -// #include -// #endif #include #include #include @@ -146,11 +137,6 @@ #include #include -#include - -// #ifndef _FRMMGR_HXX -// #include -// #endif #include //#outline level,added by zhaojianwei @@ -1785,8 +1771,10 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) break; case SID_ATTR_INSERT: SwPostItMgr* pMgr = GetPostItMgr(); - if (pMgr && pMgr->GetActivePostIt()) - pMgr->GetActivePostIt()->ToggleInsMode(); + if ( pMgr && pMgr->HasActiveSidebarWin() ) + { + pMgr->ToggleInsModeOnActiveSidebarWin(); + } else rSh.ToggleInsMode(); bUp = TRUE; @@ -1801,9 +1789,6 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) } } - - - void SwView::InsFrmMode(USHORT nCols) { if ( pWrtShell->HasWholeTabSelection() ) diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx index 7fdf5789ad..4d999c6e96 100644 --- a/sw/source/ui/uiview/viewmdi.cxx +++ b/sw/source/ui/uiview/viewmdi.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -85,7 +85,6 @@ #include #include -#include USHORT SwView::nMoveType = NID_PGE; sal_Int32 SwView::nActMark = 0; @@ -134,7 +133,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, SwPostItMgr* pPostItMgr = GetPostItMgr(); if (pPostItMgr->HasNotes() && pPostItMgr->ShowNotes()) aPageSize.Width() += pPostItMgr->GetSidebarWidth() + pPostItMgr->GetSidebarBorderWidth(); - + const MapMode aTmpMap( MAP_TWIP ); const Size aWindowSize( GetEditWin().PixelToLogic( rEditSize, aTmpMap ) ); @@ -169,7 +168,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, { long nVisPercent = aWindowSize.Height() * 100 / aPageSize.Height(); nFac = Min( nFac, nVisPercent ); - } + } } else /*if( SVX_ZOOM_PAGEWIDTH_NOBORDER == eZoomType )*/ { @@ -243,7 +242,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, pWrtShell->UnlockPaint(); if( bUnLockView ) pWrtShell->LockView( FALSE ); - + if ( mpPostItMgr ) { mpPostItMgr->Rescale(); @@ -456,10 +455,10 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext ) break; case NID_MARK: { - // unselect + // unselect rSh.MoveCrsr(); rSh.EnterStdMode(); - + // collect navigator reminders IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess(); ::std::vector< const ::sw::mark::IMark* > vNavMarks; @@ -492,15 +491,15 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext ) break; case NID_POSTIT: { - SwMarginWin* pPostIt = pThis->GetPostItMgr()->GetActivePostIt(); + sw::sidebarwindows::SwSidebarWin* pPostIt = pThis->GetPostItMgr()->GetActiveSidebarWin(); if (pPostIt) - pThis->GetPostItMgr()->SetActivePostIt(0); + pThis->GetPostItMgr()->SetActiveSidebarWin(0); SwFieldType* pFldType = rSh.GetFldType(0, RES_POSTITFLD); if (rSh.MoveFldType(pFldType, bNext)) pThis->GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT); else //first/last item - pThis->GetPostItMgr()->SetActivePostIt(pPostIt); + pThis->GetPostItMgr()->SetActiveSidebarWin(pPostIt); } break; case NID_SRCH_REP: diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx index 1735041b3d..fcebc235c7 100644 --- a/sw/source/ui/uiview/viewsrch.cxx +++ b/sw/source/ui/uiview/viewsrch.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -157,7 +157,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) break; case FID_SEARCH_OFF: - if(pArgs) + if(pArgs) { // Dialog abmelden delete pSrchItem; @@ -605,7 +605,7 @@ void SwView::Replace() } else { - if (GetPostItMgr()->GetActivePostIt()) + if (GetPostItMgr()->HasActiveSidebarWin()) GetPostItMgr()->Replace(pSrchItem); sal_Bool bReplaced = pWrtShell->SwEditShell::Replace( pSrchItem->GetReplaceString(), pSrchItem->GetRegExp()); diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index 6c72511b85..a99955076f 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -109,7 +109,6 @@ #include #include #include -#include #include #include #include @@ -436,7 +435,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow) if ( (*i)->GetBroadCaster()->ISA(SwFmtFld)) // SwPostit { SwFmtFld* aFmtFld = static_cast((*i)->GetBroadCaster()); - if (aFmtFld->GetTxtFld() && aFmtFld->IsFldInDoc() && + if (aFmtFld->GetTxtFld() && aFmtFld->IsFldInDoc() && (*i)->mLayoutStatus!=SwPostItHelper::INVISIBLE ) { String sEntry = aFmtFld->GetFld()->GetPar2(); @@ -803,7 +802,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged) if ( (*i)->GetBroadCaster()->ISA(SwFmtFld)) // SwPostit { SwFmtFld* aFmtFld = static_cast((*i)->GetBroadCaster()); - if (aFmtFld->GetTxtFld() && aFmtFld->IsFldInDoc() && + if (aFmtFld->GetTxtFld() && aFmtFld->IsFldInDoc() && (*i)->mLayoutStatus!=SwPostItHelper::INVISIBLE ) { String sEntry = aFmtFld->GetFld()->GetPar2(); @@ -2673,7 +2672,7 @@ void SwContentTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry ) break; case 602: { - pActiveShell->GetView().GetPostItMgr()->SetActivePostIt(0); + pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(0); pActiveShell->GetView().GetPostItMgr()->Delete(); break; } @@ -2935,7 +2934,7 @@ void SwContentTree::EditEntry(SvLBoxEntry* pEntry, sal_uInt8 nMode) { if (((SwPostItContent*)pCnt)->IsPostIt()) { - pActiveShell->GetView().GetPostItMgr()->SetActivePostIt(0); + pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(0); pActiveShell->DelRight(); } /* @@ -3103,7 +3102,7 @@ void SwContentTree::GotoContent(SwContent* pCnt) if (((SwPostItContent*)pCnt)->IsPostIt()) pActiveShell->GotoFld(*((SwPostItContent*)pCnt)->GetPostIt()); else - pActiveShell->GetView().GetDocShell()->GetWrtShell()->GotoRedline( + pActiveShell->GetView().GetDocShell()->GetWrtShell()->GotoRedline( pActiveShell->GetView().GetDocShell()->GetWrtShell()->FindRedlineOfData(((SwPostItContent*)pCnt)->GetRedline()->GetRedlineData())); break; @@ -3143,7 +3142,7 @@ void SwContentTree::GotoContent(SwContent* pCnt) } SwView& rView = pActiveShell->GetView(); rView.StopShellTimer(); - rView.GetPostItMgr()->SetActivePostIt(0); + rView.GetPostItMgr()->SetActiveSidebarWin(0); rView.GetEditWin().GrabFocus(); } /*-----------------06.02.97 19.14------------------- diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 6294722f46..fc1bf6b263 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -1474,7 +1474,7 @@ SelectionType SwWrtShell::GetSelectionType() const // return nsSelectionType::SEL_TBL | nsSelectionType::SEL_TBL_CELLS; SwView &_rView = ((SwView&)GetView()); - if (_rView.GetPostItMgr() && _rView.GetPostItMgr()->GetActivePostIt() ) + if (_rView.GetPostItMgr() && _rView.GetPostItMgr()->HasActiveSidebarWin() ) return nsSelectionType::SEL_POSTIT; int nCnt; @@ -1800,7 +1800,7 @@ BOOL SwWrtShell::Pop( BOOL bOldCrsr ) --------------------------------------------------------------------*/ BOOL SwWrtShell::CanInsert() { - return (!(IsSelFrmMode() | IsObjSelected() | (GetView().GetDrawFuncPtr() != NULL) | (GetView().GetPostItMgr()->GetActivePostIt()!= NULL))); + return (!(IsSelFrmMode() | IsObjSelected() | (GetView().GetDrawFuncPtr() != NULL) | (GetView().GetPostItMgr()->GetActiveSidebarWin()!= NULL))); } // die Core erzeugt eine Selektion, das SttSelect muss gerufen werden diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk index 013dd4a09a..b0fba46b8e 100644 --- a/sw/util/makefile.mk +++ b/sw/util/makefile.mk @@ -52,7 +52,7 @@ sw_res_files= \ $(SRS)$/dialog.srs \ $(SRS)$/chrdlg.srs \ $(SRS)$/config.srs \ - $(SRS)$/dbui.srs \ + $(SRS)$/dbui.srs \ $(SRS)$/dochdl.srs \ $(SRS)$/docvw.srs \ $(SRS)$/envelp.srs \ @@ -68,7 +68,7 @@ sw_res_files= \ $(SRS)$/smartmenu.srs \ $(SRS)$/table.srs \ $(SRS)$/uiview.srs \ - $(SRS)$/undo.srs \ + $(SRS)$/undo.srs \ $(SRS)$/unocore.srs \ $(SRS)$/utlui.srs \ $(SRS)$/web.srs \ -- cgit v1.2.3 From d84c6232672bd584c3ba6b2cc3e673cbef64f765 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 12 Jan 2010 14:07:54 +0100 Subject: cws tl74: build errors/warnings after merge --- starmath/inc/dialog.hxx | 8 ++++---- sw/source/ui/shells/drwtxtex.cxx | 5 ++++- sw/source/ui/shells/textsh1.cxx | 6 +++--- 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'sw/source') diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index d373c97c3e..409372f901 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -498,22 +498,22 @@ public: // Dialog virtual short Execute(); - BOOL SmSymDefineDialog::SelectOldSymbolSet(const XubString &rSymbolSetName) + BOOL SelectOldSymbolSet(const XubString &rSymbolSetName) { return SelectSymbolSet(aOldSymbolSets, rSymbolSetName, FALSE); } - BOOL SmSymDefineDialog::SelectOldSymbol(const XubString &rSymbolName) + BOOL SelectOldSymbol(const XubString &rSymbolName) { return SelectSymbol(aOldSymbols, rSymbolName, FALSE); } - BOOL SmSymDefineDialog::SelectSymbolSet(const XubString &rSymbolSetName) + BOOL SelectSymbolSet(const XubString &rSymbolSetName) { return SelectSymbolSet(aSymbolSets, rSymbolSetName, FALSE); } - BOOL SmSymDefineDialog::SelectSymbol(const XubString &rSymbolName) + BOOL SelectSymbol(const XubString &rSymbolName) { return SelectSymbol(aSymbols, rSymbolName, FALSE); } diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index ae73130a03..057bc197bb 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -42,12 +42,15 @@ #include #include #include -#include +#include #include #include #include #include #include +#include +#include +#include #include #include #include diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 14997fe9c7..4ce9be95d8 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -414,10 +414,10 @@ void SwTextShell::Execute(SfxRequest &rReq) aReplaceText = pItem2->GetValue(); if (aReplaceText.Len() > 0) { - SwView &rView = rWrtSh.GetView(); + SwView &rView2 = rWrtSh.GetView(); const bool bSelection = rWrtSh.HasSelection(); - const String aLookUpText = rView.GetThesaurusLookUpText( bSelection ); - rView.InsertThesaurusSynonym( aReplaceText, aLookUpText, bSelection ); + const String aLookUpText = rView2.GetThesaurusLookUpText( bSelection ); + rView2.InsertThesaurusSynonym( aReplaceText, aLookUpText, bSelection ); } } break; -- cgit v1.2.3 From 2d7532433e28066a71d95e3ae9210b7831e33575 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 12 Jan 2010 16:02:50 +0100 Subject: sw33a11y01: #i88070# fix of compiler warnings for Linux, Solaris and MacOS X for the refactoring of the sidebar window code --- sw/inc/SidebarWin.hxx | 6 +++--- sw/source/ui/docvw/AnnotationMenuButton.cxx | 6 ++++-- sw/source/ui/docvw/SidebarTxtControlAcc.cxx | 4 ++++ sw/source/ui/docvw/SidebarWin.cxx | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx index bb80d82150..f3247e8af7 100644 --- a/sw/inc/SidebarWin.hxx +++ b/sw/inc/SidebarWin.hxx @@ -138,9 +138,9 @@ class SwSidebarWin : public Window bool IsPreview() { return nFlags & PB_Preview;} void SetColor(Color aColorDark,Color aColorLight, Color aColorAnchor); - Color ColorAnchor() { return mColorAnchor; } - Color ColorDark() { return mColorDark; } - Color ColorLight() { return mColorLight; } + const Color& ColorAnchor() { return mColorAnchor; } + const Color& ColorDark() { return mColorDark; } + const Color& ColorLight() { return mColorLight; } void Rescale(); void SetViewState(::sw::sidebarwindows::ViewState bViewState); diff --git a/sw/source/ui/docvw/AnnotationMenuButton.cxx b/sw/source/ui/docvw/AnnotationMenuButton.cxx index f0adb9a22f..877d5a3331 100644 --- a/sw/source/ui/docvw/AnnotationMenuButton.cxx +++ b/sw/source/ui/docvw/AnnotationMenuButton.cxx @@ -48,7 +48,9 @@ namespace sw { namespace annotation { -Color ColorFromAlphaColor(UINT8 aTransparency, Color &aFront, Color &aBack ) +Color ColorFromAlphaColor( const UINT8 aTransparency, + const Color &aFront, + const Color &aBack ) { return Color((UINT8)(aFront.GetRed() * aTransparency/(double)255 + aBack.GetRed() * (1-aTransparency/(double)255)), (UINT8)(aFront.GetGreen() * aTransparency/(double)255 + aBack.GetGreen() * (1-aTransparency/(double)255)), @@ -125,7 +127,7 @@ void AnnotationMenuButton::MouseButtonDown( const MouseEvent& rMEvt ) MenuButton::MouseButtonDown( rMEvt ); } -void AnnotationMenuButton::Paint( const Rectangle& rRect ) +void AnnotationMenuButton::Paint( const Rectangle& /*rRect*/ ) { if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) SetFillColor(COL_BLACK); diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx index 4354b27346..08a7c1b008 100644 --- a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx +++ b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx @@ -131,6 +131,10 @@ class SidebarTxtControlAccessibleContext : public VCLXAccessibleComponent virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + using WeakAggComponentImplHelperBase::addEventListener; + using WeakAggComponentImplHelperBase::removeEventListener; + virtual void SAL_CALL addEventListener ( const ::com::sun::star::uno::Reference< diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx index 85d59b71fa..88dd8b9a84 100644 --- a/sw/source/ui/docvw/SidebarWin.cxx +++ b/sw/source/ui/docvw/SidebarWin.cxx @@ -94,8 +94,8 @@ SwSidebarWin::SwSidebarWin( SwEditWin& rEditWin, SwPostItMgr& aMgr, SwPostItBits aBits) : Window(&rEditWin, nBits) - , mrView( rEditWin.GetView() ) , mrMgr(aMgr) + , mrView( rEditWin.GetView() ) , nFlags(aBits) , mnEventId(0) , mpOutlinerView(0) -- cgit v1.2.3 From fab737162080b255018845d08d5bc369c4001991 Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 12 Jan 2010 18:49:59 +0100 Subject: sb118: #i108269# first step of removing tcsh support --- sw/source/ui/dialog/makefile.mk | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/dialog/makefile.mk b/sw/source/ui/dialog/makefile.mk index ce90d6a3a6..33e1127e1c 100644 --- a/sw/source/ui/dialog/makefile.mk +++ b/sw/source/ui/dialog/makefile.mk @@ -90,11 +90,7 @@ $(INCCOM)$/swuilib.hxx: makefile.mk $(RM) $@ echo \#define DLL_NAME \"libswui$(DLLPOSTFIX)$(DLLPOST)\" >$@ .ELSE -.IF "$(USE_SHELL)"!="4nt" echo \#define DLL_NAME \"swui$(DLLPOSTFIX)$(DLLPOST)\" >$@ -.ELSE # "$(USE_SHELL)"!="4nt" - echo #define DLL_NAME "swui$(DLLPOSTFIX)$(DLLPOST)" >$@ -.ENDIF # "$(USE_SHELL)"!="4nt" .ENDIF $(SLO)$/swabstdlg.obj : $(INCCOM)$/swuilib.hxx -- cgit v1.2.3 From ddc19a94cef18baf30038b7a83e4cde5f6d575c2 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 13 Jan 2010 13:03:53 +0100 Subject: #i107826#: apply patch from cmc --- sw/source/core/doc/doccomp.cxx | 52 ++++++++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 12 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 58e3cccc6f..9b86bc5c48 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -969,6 +969,29 @@ BOOL SwCompareLine::Compare( const CompareLine& rLine ) const return CompareNode( rNode, ((SwCompareLine&)rLine).rNode ); } +namespace +{ + static String SimpleTableToText(const SwNode &rNode) + { + String sRet; + const SwNode* pEndNd = rNode.EndOfSectionNode(); + SwNodeIndex aIdx( rNode ); + while (&aIdx.GetNode() != pEndNd) + { + if (aIdx.GetNode().IsTxtNode()) + { + if (sRet.Len()) + { + sRet.Append( '\n' ); + } + sRet.Append( aIdx.GetNode().GetTxtNode()->GetExpandTxt() ); + } + aIdx++; + } + return sRet; + } +} + BOOL SwCompareLine::CompareNode( const SwNode& rDstNd, const SwNode& rSrcNd ) { if( rSrcNd.GetNodeType() != rDstNd.GetNodeType() ) @@ -989,6 +1012,13 @@ BOOL SwCompareLine::CompareNode( const SwNode& rDstNd, const SwNode& rSrcNd ) bRet = ( rTSrcNd.EndOfSectionIndex() - rTSrcNd.GetIndex() ) == ( rTDstNd.EndOfSectionIndex() - rTDstNd.GetIndex() ); + + // --> #i107826#: compare actual table content + if (bRet) + { + bRet = (SimpleTableToText(rSrcNd) == SimpleTableToText(rDstNd)); + } + // <-- } break; @@ -1043,6 +1073,15 @@ BOOL SwCompareLine::CompareNode( const SwNode& rDstNd, const SwNode& rSrcNd ) case ND_ENDNODE: bRet = rSrcNd.StartOfSectionNode()->GetNodeType() == rDstNd.StartOfSectionNode()->GetNodeType(); + + // --> #i107826#: compare actual table content + if (bRet && rSrcNd.StartOfSectionNode()->GetNodeType() == ND_TABLENODE) + { + bRet = CompareNode( + *rSrcNd.StartOfSectionNode(), *rDstNd.StartOfSectionNode()); + } + // <-- + break; } return bRet; @@ -1059,18 +1098,7 @@ String SwCompareLine::GetText() const case ND_TABLENODE: { - const SwNode* pEndNd = rNode.EndOfSectionNode(); - SwNodeIndex aIdx( rNode ); - while( &aIdx.GetNode() != pEndNd ) - { - if( aIdx.GetNode().IsTxtNode() ) - { - if( sRet.Len() ) - sRet.Append( '\n' ); - sRet.Append( ((SwTxtNode&)rNode).GetExpandTxt() ); - } - aIdx++; - } + sRet = SimpleTableToText(rNode); sRet.InsertAscii( "Tabelle: ", 0 ); } break; -- cgit v1.2.3 From 76a14d3dc8a87aa6b2df64bf0006cefa72f4ec34 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 13 Jan 2010 15:57:11 +0100 Subject: sw33bf02: #b6912256# - assure consistent Writer core attributes if list styles are deleted via UNO-API --- sw/source/core/SwNumberTree/SwNodeNum.cxx | 19 ++++++++++++++++++- sw/source/core/unocore/unocrsrhelper.cxx | 10 ++++------ 2 files changed, 22 insertions(+), 7 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx index 171c4de920..c13b396e76 100644 --- a/sw/source/core/SwNumberTree/SwNodeNum.cxx +++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx @@ -40,6 +40,10 @@ // --> OD 2007-10-31 #i83479# #include // <-- +// --> OD 2010-01-13 #b6912256# +#include +#include +// <-- // --> OD 2008-02-19 #refactorlists# SwNodeNum::SwNodeNum( SwTxtNode* pTxtNode ) @@ -492,8 +496,21 @@ void SwNodeNum::_UnregisterMeAndChildrenDueToRootDelete( SwNodeNum& rNodeNum ) SwTxtNode* pTxtNode( rNodeNum.GetTxtNode() ); if ( pTxtNode ) { - // --> OD 2008-03-13 #refactorlists# pTxtNode->RemoveFromList(); + // --> OD 2010-01-13 #b6912256# + // clear all list attributes and the list style + SvUShortsSort aResetAttrsArray; + aResetAttrsArray.Insert( RES_PARATR_LIST_ID ); + aResetAttrsArray.Insert( RES_PARATR_LIST_LEVEL ); + aResetAttrsArray.Insert( RES_PARATR_LIST_ISRESTART ); + aResetAttrsArray.Insert( RES_PARATR_LIST_RESTARTVALUE ); + aResetAttrsArray.Insert( RES_PARATR_LIST_ISCOUNTED ); + aResetAttrsArray.Insert( RES_PARATR_NUMRULE ); + SwPaM aPam( *pTxtNode ); + pTxtNode->GetDoc()->ResetAttrs( aPam, sal_False, + &aResetAttrsArray, + false ); + // <-- } } } diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 1ac40712b4..c091439463 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -231,13 +231,11 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry // <-- case FN_NUMBER_NEWSTART: { + // a multi selection is not considered const SwTxtNode* pTxtNd = rPam.GetNode()->GetTxtNode(); - // --> OD 2006-10-19 #134160# - make code robust: - // consider case that PaM doesn't denote a text node - const SwNumRule* pRule = pTxtNd ? pTxtNd->GetNumRule() : 0; + // --> OD 2010-01-13 #b6912256# + if ( pTxtNd && pTxtNd->IsInList() ) // <-- - // hier wird Multiselektion nicht beruecksichtigt - if( pRule ) { if( pAny ) { @@ -518,7 +516,7 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry } eNewState = aCharStyles.getLength() ? - PropertyState_DIRECT_VALUE : PropertyState_DEFAULT_VALUE;; + PropertyState_DIRECT_VALUE : PropertyState_DEFAULT_VALUE;; if(pAny) (*pAny) <<= aCharStyles; } -- cgit v1.2.3 From 9e947c9295f0e56c38ac72531a0b0988b4618173 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 13 Jan 2010 22:25:07 +0100 Subject: #i107450#: move more code out of svx --- sw/inc/IDocumentLinksAdministration.hxx | 9 +++------ sw/inc/doc.hxx | 8 ++++---- sw/inc/editsh.hxx | 11 ++++++----- sw/inc/pch/precompiled_sw.hxx | 6 +++--- sw/source/core/crsr/bookmrk.cxx | 2 +- sw/source/core/doc/doc.cxx | 8 ++++---- sw/source/core/doc/docbm.cxx | 2 +- sw/source/core/doc/docdde.cxx | 2 +- sw/source/core/doc/docnew.cxx | 6 +++--- sw/source/core/doc/swserv.cxx | 2 +- sw/source/core/docnode/ndsect.cxx | 2 +- sw/source/core/docnode/section.cxx | 4 ++-- sw/source/core/docnode/swbaslnk.cxx | 12 ++++++------ sw/source/core/edit/editsh.cxx | 2 +- sw/source/core/fields/ddefld.cxx | 2 +- sw/source/core/graphic/ndgrf.cxx | 8 ++++---- sw/source/core/ole/ndole.cxx | 2 +- sw/source/core/table/swtable.cxx | 2 +- sw/source/core/undo/unsect.cxx | 2 +- sw/source/core/unocore/unofield.cxx | 2 +- sw/source/filter/html/htmlfly.cxx | 2 +- sw/source/filter/html/swhtml.cxx | 4 ++-- sw/source/filter/html/wrthtml.cxx | 2 +- sw/source/ui/app/docsh.cxx | 5 ++--- sw/source/ui/app/docsh2.cxx | 2 +- sw/source/ui/app/docshini.cxx | 25 +------------------------ sw/source/ui/app/docst.cxx | 2 +- sw/source/ui/chrdlg/pardlg.cxx | 2 +- sw/source/ui/config/viewopt.cxx | 2 +- sw/source/ui/dbui/dbmgr.cxx | 2 +- sw/source/ui/dbui/mmoutputpage.cxx | 2 +- sw/source/ui/dialog/regionsw.cxx | 2 +- sw/source/ui/dialog/uiregionsw.cxx | 2 +- sw/source/ui/fmtui/tmpdlg.cxx | 2 +- sw/source/ui/inc/view.hxx | 3 +++ sw/source/ui/shells/basesh.cxx | 2 +- sw/source/ui/shells/textfld.cxx | 2 +- sw/source/ui/shells/textsh.cxx | 2 +- sw/source/ui/table/swtablerep.cxx | 2 +- sw/source/ui/table/tabledlg.cxx | 2 +- sw/source/ui/uiview/srcview.cxx | 2 +- sw/source/ui/uiview/view0.cxx | 8 ++++++++ sw/source/ui/uiview/view2.cxx | 2 +- sw/source/ui/uiview/viewprt.cxx | 2 +- sw/source/ui/uiview/viewstat.cxx | 2 +- sw/source/ui/uno/unotxdoc.cxx | 4 ++-- sw/source/ui/utlui/glbltree.cxx | 2 +- 47 files changed, 85 insertions(+), 100 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/IDocumentLinksAdministration.hxx b/sw/inc/IDocumentLinksAdministration.hxx index 739fd5d835..a797a40c74 100644 --- a/sw/inc/IDocumentLinksAdministration.hxx +++ b/sw/inc/IDocumentLinksAdministration.hxx @@ -34,11 +34,8 @@ #include class String; -class SvxLinkManager; - namespace com { namespace sun { namespace star { namespace uno { class Any; } } } } - -namespace sfx2 { class SvLinkSource; } +namespace sfx2 { class SvLinkSource; class LinkManager; } /** Document links administration interface */ @@ -55,11 +52,11 @@ namespace sfx2 { class SvLinkSource; } /** */ - virtual SvxLinkManager& GetLinkManager() = 0; + virtual sfx2::LinkManager& GetLinkManager() = 0; /** */ - virtual const SvxLinkManager& GetLinkManager() const = 0; + virtual const sfx2::LinkManager& GetLinkManager() const = 0; /** FME 2005-02-25 #i42634# Moved common code of SwReader::Read() and SwDocShell::UpdateLinks() to new SwDoc::UpdateLinks(): diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 302e8cf243..f784ceb1d7 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -114,7 +114,6 @@ class SvNumberFormatter; class SvStringsSort; class SvUShorts; class SvUShortsSort; -class SvxLinkManager; class SvxMacro; class SvxMacroTableDtor; class SvxBorderLine; @@ -238,6 +237,7 @@ namespace container { namespace sfx2 { class SvLinkSource; class IXmlIdRegistry; + class LinkManager; } //PageDescriptor-Schnittstelle, Array hier wegen inlines. @@ -354,7 +354,7 @@ class SW_DLLPUBLIC SwDoc : SfxObjectShellRef* pDocShRef; // fuers Kopieren von OLE-Nodes (wenn keine // DocShell gesetzt ist, muss dieser // Ref-Pointer gesetzt sein!!!!) - SvxLinkManager *pLinkMgr; // Liste von Verknuepften (Grafiken/DDE/OLE) + sfx2::LinkManager *pLinkMgr; // Liste von Verknuepften (Grafiken/DDE/OLE) SwAutoCorrExceptWord *pACEWord; // fuer die automatische Uebernahme von // autokorrigierten Woertern, die "zurueck" @@ -837,8 +837,8 @@ public: */ virtual bool IsVisibleLinks() const; virtual void SetVisibleLinks(bool bFlag); - virtual SvxLinkManager& GetLinkManager(); - virtual const SvxLinkManager& GetLinkManager() const; + virtual sfx2::LinkManager& GetLinkManager(); + virtual const sfx2::LinkManager& GetLinkManager() const; virtual void UpdateLinks(BOOL bUI); virtual bool GetData(const String& rItem, const String& rMimeType, ::com::sun::star::uno::Any& rValue) const; virtual bool SetData(const String& rItem, const String& rMimeType, const ::com::sun::star::uno::Any& rValue); diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 7985cc63ff..37ce330828 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -58,7 +58,6 @@ class SvUShortsSort; class SvNumberFormatter; class SfxPoolItem; class SfxItemSet; -class SvxLinkManager; class SvxAutoCorrect; class SwField; // fuer Felder @@ -121,7 +120,9 @@ struct SpellPortion; typedef std::vector SpellPortions; } - +namespace sfx2{ +class LinkManager; +} #define GETSELTXT_PARABRK_TO_BLANK 0 #define GETSELTXT_PARABRK_KEEP 1 @@ -849,8 +850,8 @@ public: // Optimierung UI void SetNewDoc(BOOL bNew = TRUE); - SvxLinkManager& GetLinkManager(); - inline const SvxLinkManager& GetLinkManager() const; + sfx2::LinkManager& GetLinkManager(); + inline const sfx2::LinkManager& GetLinkManager() const; // linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von // Numerierungen), optional kann man "um" den Offset stufen oder "auf" @@ -952,7 +953,7 @@ inline void SwEditShell::ApplyViewOptions( const SwViewOption &rOpt ) SwEditShell::EndAction(); } -inline const SvxLinkManager& SwEditShell::GetLinkManager() const +inline const sfx2::LinkManager& SwEditShell::GetLinkManager() const { return ((SwEditShell*)this)->GetLinkManager(); } /* diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 0591bc7dd0..046390d77c 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -714,7 +714,7 @@ #include "editeng/UnoForbiddenCharsTable.hxx" #include "editeng/acorrcfg.hxx" #include "svx/anchorid.hxx" -#include "svx/asiancfg.hxx" +#include "svl/asiancfg.hxx" #include "svx/checklbx.hxx" #include "svx/clipboardctl.hxx" #include "svx/clipfmtitem.hxx" @@ -753,7 +753,7 @@ #include "svx/grafctrl.hxx" #include "editeng/hangulhanja.hxx" #include "svx/hdft2.hxx" -#include "svx/htmlcfg.hxx" +#include "svtools/htmlcfg.hxx" #include "svx/htmlmode.hxx" #include "svx/hyperdlg.hxx" #include "svx/hyprlink.hxx" @@ -763,7 +763,7 @@ #include "svx/layctrl.hxx" #include "svx/lboxctrl.hxx" #include "svx/linectrl.hxx" -#include "svx/linkmgr.hxx" +#include "sfx2/linkmgr.hxx" #include "filter/msfilter/mscodec.hxx" #include "filter/msfilter/msdffimp.hxx" #include "filter/msfilter/msfiltertracer.hxx" diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 8918058c31..04f71851fd 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 4a9cd2f05a..0a0b6d21e1 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include #include @@ -1806,12 +1806,12 @@ void SwDoc::SetVisibleLinks(bool bFlag) mbVisibleLinks = bFlag; } -SvxLinkManager& SwDoc::GetLinkManager() +sfx2::LinkManager& SwDoc::GetLinkManager() { return *pLinkMgr; } -const SvxLinkManager& SwDoc::GetLinkManager() const +const sfx2::LinkManager& SwDoc::GetLinkManager() const { return *pLinkMgr; } @@ -1830,7 +1830,7 @@ bool SwDoc::LinksUpdated() const bool SwDoc::EmbedAllLinks() { BOOL bRet = FALSE; - SvxLinkManager& rLnkMgr = GetLinkManager(); + sfx2::LinkManager& rLnkMgr = GetLinkManager(); const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks(); if( rLnks.Count() ) { diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 80973abeca..5af4ddd6fd 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -57,7 +57,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/core/doc/docdde.cxx b/sw/source/core/doc/docdde.cxx index e5e0aa84a7..3ac733a8c6 100644 --- a/sw/source/core/doc/docdde.cxx +++ b/sw/source/core/doc/docdde.cxx @@ -42,7 +42,7 @@ #define _SVSTDARR_STRINGS #include -#include // LinkManager +#include // LinkManager #include #include #include diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 85c9029247..6d5e6768af 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include #include @@ -240,7 +240,7 @@ SwDoc::SwDoc() : pDocStat( new SwDocStat ), pDocShell( 0 ), pDocShRef( 0 ), - pLinkMgr( new SvxLinkManager( 0 ) ), + pLinkMgr( new sfx2::LinkManager( 0 ) ), pACEWord( 0 ), pURLStateChgd( 0 ), pNumberFormatter( 0 ), @@ -1139,7 +1139,7 @@ SwDoc* SwDoc::CreateCopy() const pDocStat( new SwDocStat ), pDocShell( 0 ), pDocShRef( 0 ), - pLinkMgr( new SvxLinkManager( 0 ) ), + pLinkMgr( new sfx2::LinkManager( 0 ) ), pACEWord( 0 ), pURLStateChgd( 0 ), pNumberFormatter( 0 ), diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx index 1d99c829a3..0228710258 100644 --- a/sw/source/core/doc/swserv.cxx +++ b/sw/source/core/doc/swserv.cxx @@ -33,7 +33,7 @@ #include -#include +#include #include #include #include diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 0b3bbc0b43..eaecf750b1 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -33,7 +33,7 @@ #include -#include +#include #include #include #include diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index d06c4bd52e..6e08336440 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include @@ -1276,7 +1276,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType, ULONG nDataFormat = SotExchange::GetFormatIdFromMimeType( rMimeType ); if( !pSectNd || !pDoc || pDoc->IsInDtor() || ChkNoDataFlag() || - SvxLinkManager::RegisterStatusInfoId() == nDataFormat ) + sfx2::LinkManager::RegisterStatusInfoId() == nDataFormat ) { // sollten wir schon wieder im Undo stehen? return ; diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index a3ce9a4565..33202d8b63 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -49,7 +49,7 @@ #ifndef _SVX_SVXIDS_HRC #include // fuer die EventIds #endif -#include +#include #include #include #include @@ -121,7 +121,7 @@ void SwBaseLink::DataChanged( const String& rMimeType, ULONG nFmt = SotExchange::GetFormatIdFromMimeType( rMimeType ); if( pCntntNode->IsNoTxtNode() && - nFmt == SvxLinkManager::RegisterStatusInfoId() ) + nFmt == sfx2::LinkManager::RegisterStatusInfoId() ) { // nur eine Statusaenderung - Events bedienen ? ::rtl::OUString sState; @@ -130,9 +130,9 @@ void SwBaseLink::DataChanged( const String& rMimeType, USHORT nEvent = 0; switch( sState.toInt32() ) { - case STATE_LOAD_OK: nEvent = SVX_EVENT_IMAGE_LOAD; break; - case STATE_LOAD_ERROR: nEvent = SVX_EVENT_IMAGE_ERROR; break; - case STATE_LOAD_ABORT: nEvent = SVX_EVENT_IMAGE_ABORT; break; + case sfx2::LinkManager::STATE_LOAD_OK: nEvent = SVX_EVENT_IMAGE_LOAD; break; + case sfx2::LinkManager::STATE_LOAD_ERROR: nEvent = SVX_EVENT_IMAGE_ERROR; break; + case sfx2::LinkManager::STATE_LOAD_ABORT: nEvent = SVX_EVENT_IMAGE_ABORT; break; } SwFrmFmt* pFmt; @@ -163,7 +163,7 @@ void SwBaseLink::DataChanged( const String& rMimeType, ((SwGrfNode*)pCntntNode)->SetGrafikArrived( bGraphicArrived ); Graphic aGrf; - if( SvxLinkManager::GetGraphicFromAny( rMimeType, rValue, aGrf ) && + if( sfx2::LinkManager::GetGraphicFromAny( rMimeType, rValue, aGrf ) && ( GRAPHIC_DEFAULT != aGrf.GetType() || GRAPHIC_DEFAULT != rGrfObj.GetType() ) ) { diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index c1e368a0b8..9c733a1b20 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -696,7 +696,7 @@ String SwEditShell::Calculate() } -SvxLinkManager& SwEditShell::GetLinkManager() +sfx2::LinkManager& SwEditShell::GetLinkManager() { return pDoc->GetLinkManager(); } diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx index 04cb0c7755..b22125a2a6 100644 --- a/sw/source/core/fields/ddefld.cxx +++ b/sw/source/core/fields/ddefld.cxx @@ -32,7 +32,7 @@ #include "precompiled_sw.hxx" -#include +#include #include #include #include diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index a451d444e1..03f7dc567a 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include @@ -678,7 +678,7 @@ void SwGrfNode::SetTwipSize( const Size& rSz ) void SwGrfNode::SetTransferPriority( USHORT nPrio ) { if( refLink.Is() && refLink->GetObj() ) - SvxLinkManager::SetTransferPriority( *refLink, nPrio ); + sfx2::LinkManager::SetTransferPriority( *refLink, nPrio ); } @@ -940,7 +940,7 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const aTmpGrf = aGrfObj.GetGraphic(); } - const sfx2::SvLinkManager& rMgr = getIDocumentLinksAdministration()->GetLinkManager(); + const sfx2::LinkManager& rMgr = getIDocumentLinksAdministration()->GetLinkManager(); String sFile, sFilter; if( IsLinkedFile() ) rMgr.GetDisplayNames( refLink, 0, &sFile, 0, &sFilter ); @@ -1040,7 +1040,7 @@ void DelAllGrfCacheEntries( SwDoc* pDoc ) if( pDoc ) { // alle Graphic-Links mit dem Namen aus dem Cache loeschen - const SvxLinkManager& rLnkMgr = pDoc->GetLinkManager(); + const sfx2::LinkManager& rLnkMgr = pDoc->GetLinkManager(); const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks(); SwGrfNode* pGrfNd; String sFileNm; diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 3ed18d128b..de609eab66 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #ifndef _OUTDEV_HXX //autogen #include diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 3d3c79029c..2d9491f70b 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx index 76f8efa306..5ceb92e781 100644 --- a/sw/source/core/undo/unsect.cxx +++ b/sw/source/core/undo/unsect.cxx @@ -32,7 +32,7 @@ #include "precompiled_sw.hxx" -#include +#include #include #include #include diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 95db40126e..2c9601cbae 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index 9e93c62da4..92654c1604 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 76fdbfb20c..0718a925bc 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -55,8 +55,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 5431cb0a8d..7694d10243 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index 07b45a3619..88bdcd1e85 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include #include @@ -61,7 +61,6 @@ #include #include #include -//#include #include #include #include @@ -111,7 +110,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 8e313b0536..24fddb257f 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx index 039357cde1..9fcd16f3f1 100644 --- a/sw/source/ui/app/docshini.cxx +++ b/sw/source/ui/app/docshini.cxx @@ -34,9 +34,7 @@ #include -#ifndef _SVX_DIALOGS_HRC #include -#endif #include #include #include @@ -46,45 +44,33 @@ #include #include #include -#include +#include #include #include #include #include -#ifndef _SVX_AKRNTEM_HXX #include -#endif #include #include #include #include #include #include -#ifndef _SVX_DRAWITEM_HXX //autogen - #include -#endif #include #include #include -#ifndef _SVX_TSTPITEM_HXX //autogen #include -#endif #include #include #include #include - #include #include #include #include -#ifndef _DOCSH_HXX #include -#endif -#ifndef _WDOCSH_HXX #include -#endif #include #include #include @@ -92,18 +78,12 @@ #include #include #include -#ifndef _DBMGR_HXX #include -#endif #include #include #include -#ifndef _MODCFG_HXX #include -#endif -#ifndef _GLOBDOC_HXX #include -#endif #include #include #include @@ -111,10 +91,7 @@ #include #include #include -#ifndef _GLOBALS_HRC #include -#endif - // #i18732# #include diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx index 7436a51af0..0613070324 100644 --- a/sw/source/ui/app/docst.cxx +++ b/sw/source/ui/app/docst.cxx @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index e7189fd524..613edcfdc0 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -40,7 +40,7 @@ #include #include -#include +#include #ifndef _SVSTDARR_STRINGSSORTDTOR #define _SVSTDARR_STRINGSSORTDTOR diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx index a2ba77b6cb..f3cdc32a3b 100644 --- a/sw/source/ui/config/viewopt.cxx +++ b/sw/source/ui/config/viewopt.cxx @@ -33,7 +33,7 @@ #include -#include +#include #ifndef _SVX_SVXIDS_HRC //autogen #include diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index dd5481d6e2..e784ab3d8d 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -116,7 +116,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index a7eb0c96b8..cf71cc2b1d 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -90,7 +90,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx index 12984f53d8..b49843a9b7 100644 --- a/sw/source/ui/dialog/regionsw.cxx +++ b/sw/source/ui/dialog/regionsw.cxx @@ -54,7 +54,7 @@ #include #endif -#include +#include #include #include #include diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 4a72998575..8a79620986 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index 3c74f67088..63b06c6e7b 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 6f227d26c0..02e570dfac 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -32,6 +32,7 @@ #include #include +#include #include #include #include // SfxObjectShellRef <-> SV_DECL_REF(SfxObjectShell) @@ -197,6 +198,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell static SearchAttrItemList* pReplList; + SvxHtmlOptions aHTMLOpt; Timer aTimer; //Fuer verzoegerte ChgLnks waehrend //einer Aktion String aPageStr; //Statusanzeige, aktuelle Seite @@ -306,6 +308,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell SW_DLLPRIVATE DECL_LINK( TimeoutHdl, Timer * ); SW_DLLPRIVATE DECL_LINK( UpdatePercentHdl, GraphicFilter* ); + SW_DLLPRIVATE DECL_LINK( HtmlOptionsHdl, void * ); inline long GetXScroll() const; inline long GetYScroll() const; diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 94418d255e..1dba8a3be6 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -38,7 +38,7 @@ #ifndef _SVX_SVXIDS_HRC #include #endif -#include +#include #include #include #include diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx index b0238213d9..141ee07a88 100644 --- a/sw/source/ui/shells/textfld.cxx +++ b/sw/source/ui/shells/textfld.cxx @@ -49,7 +49,7 @@ #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index f5db565d4a..edc3caf855 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -66,7 +66,7 @@ #include #include #include -#include +#include #include #include diff --git a/sw/source/ui/table/swtablerep.cxx b/sw/source/ui/table/swtablerep.cxx index 8e52b5cdd7..5b600803b4 100644 --- a/sw/source/ui/table/swtablerep.cxx +++ b/sw/source/ui/table/swtablerep.cxx @@ -48,7 +48,7 @@ #include #include -#include +#include #include #include diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 310ec525e3..f1a8e77f18 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index 326faf6ea5..aecb69590f 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx index c0f23314a3..3c717c45f4 100644 --- a/sw/source/ui/uiview/view0.cxx +++ b/sw/source/ui/uiview/view0.cxx @@ -48,6 +48,8 @@ #include #include #include +#include +#include #include #include #include @@ -554,3 +556,9 @@ void SwView::ExecViewOptions(SfxRequest &rReq) rReq.Done(); } +IMPL_LINK( SwView, HtmlOptionsHdl, void*, EMPTYARG ) +{ + // Invalidierung, falls blinkender Text erlaubt/verboten wurde + GetViewFrame()->GetBindings().Invalidate(SID_DRAW_TEXT_MARQUEE); + return 0; +} diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 07388f84b4..be2de5f6fe 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -86,7 +86,7 @@ #include #include #include -#include +#include #ifndef __RSC //autogen #include #endif diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx index 58fe6f505f..0a1b3c58c7 100644 --- a/sw/source/ui/uiview/viewprt.cxx +++ b/sw/source/ui/uiview/viewprt.cxx @@ -62,7 +62,7 @@ #include #include #include -#include +#include #include #include diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx index faa4082fd3..7deae78d34 100644 --- a/sw/source/ui/uiview/viewstat.cxx +++ b/sw/source/ui/uiview/viewstat.cxx @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index f36754f4d2..b30edd5dc7 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -88,7 +88,7 @@ #include #include #include -#include +#include #include #include #include @@ -2384,7 +2384,7 @@ void SwXTextDocument::updateLinks( ) throw(RuntimeException) if(!IsValid()) throw RuntimeException(); SwDoc* pDoc = pDocShell->GetDoc(); - SvxLinkManager& rLnkMan = pDoc->GetLinkManager(); + sfx2::LinkManager& rLnkMan = pDoc->GetLinkManager(); if( rLnkMan.GetLinks().Count() ) { UnoActionContext aAction(pDoc); diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx index 546b276a5b..b6df36061a 100644 --- a/sw/source/ui/utlui/glbltree.cxx +++ b/sw/source/ui/utlui/glbltree.cxx @@ -40,7 +40,7 @@ #endif #include #include -#include +#include #include #include #include -- cgit v1.2.3 From 5953467534b4124049a42bc53bee827e55e8bdba Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 14 Jan 2010 23:38:43 +0100 Subject: #107450#: warning for unused variable fixed --- sw/source/core/layout/paintfrm.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index ac0d78cccc..cf42cdb54b 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1685,7 +1685,7 @@ void MA_FASTCALL DrawGraphic( const SvxBrushItem *pBrush, else ((SvxBrushItem*)pBrush)->SetDoneLink( STATIC_LINK( rSh.GetDoc(), SwDoc, BackgroundDone ) ); - SfxObjectShell &rObjSh = *GETOBJSHELL(); + //SfxObjectShell &rObjSh = *GETOBJSHELL(); const Graphic* pGrf = pBrush->GetGraphic(); if( pGrf && GRAPHIC_NONE != pGrf->GetType() ) { -- cgit v1.2.3 From 5e9f2764be786025c18d4bc9971dc12e66e574e4 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 15 Jan 2010 00:20:57 +0100 Subject: solve some merge problems --- starmath/source/unomodel.cxx | 2 +- sw/source/core/view/vprint.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 5bb52e2fc3..be3e274a5f 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index cc6d5cafff..18854ad12f 100755 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -54,8 +54,8 @@ #include #include -#include -#include +#include +#include #include #include -- cgit v1.2.3 From 623b95ce2d93f131691dd4c36a0f0e7dbda3c360 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Mon, 18 Jan 2010 11:53:56 +0100 Subject: sw33a11y01: #i88070# method - adjust order of destruction --- sw/source/ui/docvw/SidebarWin.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx index 88dd8b9a84..1dc845f292 100644 --- a/sw/source/ui/docvw/SidebarWin.cxx +++ b/sw/source/ui/docvw/SidebarWin.cxx @@ -134,6 +134,11 @@ SwSidebarWin::~SwSidebarWin() delete mpOutlinerView; } + if (mpSidebarTxtControl) + { + delete mpSidebarTxtControl; + } + if (mpOutliner) { delete mpOutliner; @@ -151,11 +156,6 @@ SwSidebarWin::~SwSidebarWin() delete mpMetadataDate; } - if (mpSidebarTxtControl) - { - delete mpSidebarTxtControl; - } - if (mpVScrollbar) { mpVScrollbar->RemoveEventListener( LINK( this, SwSidebarWin, WindowEventListener ) ); -- cgit v1.2.3 From a2421a77c8ab0a091423734d49180a23ad0cfffd Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Mon, 18 Jan 2010 12:19:47 +0100 Subject: sw33a11y01: class - one-parameter constructors are now explicit --- sw/source/core/access/acccell.cxx | 12 +++++----- sw/source/core/access/acccontext.cxx | 5 ++-- sw/source/core/access/accfrmobj.hxx | 6 ++--- sw/source/core/access/accfrmobjmap.cxx | 2 +- sw/source/core/access/accmap.cxx | 34 ++++++++++++++++------------ sw/source/core/access/accselectionhelper.cxx | 8 +++---- 6 files changed, 35 insertions(+), 32 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx index 542924139d..18b2272ab3 100644 --- a/sw/source/core/access/acccell.cxx +++ b/sw/source/core/access/acccell.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -187,7 +187,7 @@ sal_Bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrm *pFrm ) void SwAccessibleCell::_InvalidateCursorPos() { - const SwFrm *pParent = GetParent( GetFrm(), IsInPagePreview() ); + const SwFrm *pParent = GetParent( SwFrmOrObj(GetFrm()), IsInPagePreview() ); ASSERT( pParent->IsTabFrm(), "parent is not a tab frame" ); const SwTabFrm *pTabFrm = static_cast< const SwTabFrm * >( pParent ); if( pTabFrm->IsFollow() ) @@ -256,21 +256,21 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleCell::getSupportedServiceNames() void SwAccessibleCell::Dispose( sal_Bool bRecursive ) { - const SwFrm *pParent = GetParent( GetFrm(), IsInPagePreview() ); + const SwFrm *pParent = GetParent( SwFrmOrObj(GetFrm()), IsInPagePreview() ); ::vos::ORef< SwAccessibleContext > xAccImpl( GetMap()->GetContextImpl( pParent, sal_False ) ); if( xAccImpl.isValid() ) - xAccImpl->DisposeChild( GetFrm(), bRecursive ); + xAccImpl->DisposeChild( SwFrmOrObj(GetFrm()), bRecursive ); SwAccessibleContext::Dispose( bRecursive ); } void SwAccessibleCell::InvalidatePosOrSize( const SwRect& rOldBox ) { - const SwFrm *pParent = GetParent( GetFrm(), IsInPagePreview() ); + const SwFrm *pParent = GetParent( SwFrmOrObj(GetFrm()), IsInPagePreview() ); ::vos::ORef< SwAccessibleContext > xAccImpl( GetMap()->GetContextImpl( pParent, sal_False ) ); if( xAccImpl.isValid() ) - xAccImpl->InvalidateChildPosOrSize( GetFrm(), rOldBox ); + xAccImpl->InvalidateChildPosOrSize( SwFrmOrObj(GetFrm()), rOldBox ); SwAccessibleContext::InvalidatePosOrSize( rOldBox ); } diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index edc64cfe99..a6fa3f8f54 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -61,12 +61,11 @@ #include #include #include -#ifndef _ACCCONTEXT_HXX #include -#endif #include #include + #if (OSL_DEBUG_LEVEL > 1) && defined TEST_MIB #define DBG_MSG( _msg ) \ lcl_SwAccessibleContext_DbgMsg( this, _msg, 0, sal_False ); @@ -659,7 +658,7 @@ sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleIndexInParent (void) GetMap()->GetContextImpl( pUpper, !bDisposing ) ); ASSERT( xAccImpl.isValid() || bDisposing, "no parent found" ); if( xAccImpl.isValid() ) - nIndex = xAccImpl->GetChildIndex( GetFrm() ); + nIndex = xAccImpl->GetChildIndex( SwFrmOrObj(GetFrm()) ); } return nIndex; diff --git a/sw/source/core/access/accfrmobj.hxx b/sw/source/core/access/accfrmobj.hxx index 2e08d93372..29e628acdb 100644 --- a/sw/source/core/access/accfrmobj.hxx +++ b/sw/source/core/access/accfrmobj.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,8 +45,8 @@ class SwFrmOrObj public: inline SwFrmOrObj(); - inline SwFrmOrObj( const SdrObject *pO ); - inline SwFrmOrObj( const SwFrm *pF ); + inline explicit SwFrmOrObj( const SdrObject *pO ); + inline explicit SwFrmOrObj( const SwFrm *pF ); inline SwFrmOrObj( const SwFrm *pF, const SdrObject *pO ); inline SwFrmOrObj( const SwFrmOrObj& r ); diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx index c82f5dfef3..cc016f5e5b 100644 --- a/sw/source/core/access/accfrmobjmap.cxx +++ b/sw/source/core/access/accfrmobjmap.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 4e3b9e7047..f07e840248 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -799,9 +799,10 @@ void SwAccessibleMap::InvalidateCursorPosition( ASSERT( pAccImpl->GetFrm(), "caret context is disposed" ); if( GetShell()->ActionPend() ) { - SwAccessibleEvent_Impl aEvent( - SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl, - pAccImpl->GetFrm(), ACC_STATE_CARET ); + SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, + pAccImpl, + SwFrmOrObj(pAccImpl->GetFrm()), + ACC_STATE_CARET ); AppendEvent( aEvent ); } else @@ -876,11 +877,10 @@ void SwAccessibleMap::DoInvalidateShapeSelection() } if( bChanged ) { - SwFrmOrObj aFrmOrObj( pShape->first ); - SwFrmOrObj aParent = - SwAccessibleFrame::GetParent( aFrmOrObj, - GetShell()->IsPreView() ); - aParents.push_back( aParent.GetSwFrm() ); + const SwFrm* pParent = SwAccessibleFrame::GetParent( + SwFrmOrObj( pShape->first ), + GetShell()->IsPreView() ); + aParents.push_back( pParent ); } } @@ -1888,9 +1888,10 @@ void SwAccessibleMap::InvalidateStates( tAccessibleStates _nStates, static_cast< SwAccessibleContext *>( xAcc.get() ); if( GetShell()->ActionPend() ) { - SwAccessibleEvent_Impl aEvent( - SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl, - pAccImpl->GetFrm(), _nStates ); + SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, + pAccImpl, + SwFrmOrObj(pAccImpl->GetFrm()), + _nStates ); AppendEvent( aEvent ); } else @@ -1930,9 +1931,11 @@ void SwAccessibleMap::_InvalidateRelationSet( const SwFrm* pFrm, static_cast< SwAccessibleContext *>( xAcc.get() ); if( GetShell()->ActionPend() ) { - SwAccessibleEvent_Impl aEvent( - SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl, pFrm, - bFrom ? ACC_STATE_RELATION_FROM : ACC_STATE_RELATION_TO ); + SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, + pAccImpl, SwFrmOrObj(pFrm), + ( bFrom + ? ACC_STATE_RELATION_FROM + : ACC_STATE_RELATION_TO ) ); AppendEvent( aEvent ); } else @@ -2001,7 +2004,8 @@ void SwAccessibleMap::InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm ) { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, - pAccImpl, &_rTxtFrm, + pAccImpl, + SwFrmOrObj( &_rTxtFrm ), ACC_STATE_TEXT_SELECTION_CHANGED ); AppendEvent( aEvent ); } diff --git a/sw/source/core/access/accselectionhelper.cxx b/sw/source/core/access/accselectionhelper.cxx index af05960348..c06fcfaf34 100644 --- a/sw/source/core/access/accselectionhelper.cxx +++ b/sw/source/core/access/accselectionhelper.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -206,8 +206,8 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( ) const SwFlyFrm *pFlyFrm = pFEShell->GetCurrFlyFrm(); if( pFlyFrm ) { - if( rContext.GetParent(pFlyFrm, rContext.IsInPagePreview()) == - rContext.GetFrm() ) + if( rContext.GetParent( SwFrmOrObj(pFlyFrm), rContext.IsInPagePreview()) == + rContext.GetFrm() ) { nCount = 1; } @@ -262,7 +262,7 @@ Reference SwAccessibleSelectionHelper::getSelectedAccessibleChild( if( pFlyFrm ) { if( 0 == nSelectedChildIndex && - rContext.GetParent(pFlyFrm, rContext.IsInPagePreview()) == + rContext.GetParent( SwFrmOrObj(pFlyFrm), rContext.IsInPagePreview()) == rContext.GetFrm() ) { aChild = pFlyFrm; -- cgit v1.2.3 From b80dd17615118e0052987654aff468d566050f87 Mon Sep 17 00:00:00 2001 From: os Date: Mon, 18 Jan 2010 16:38:57 +0100 Subject: #i108426# missing increment added --- sw/source/core/unocore/unostyle.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index bc3203f764..6aac093e95 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1266,6 +1266,7 @@ sal_Bool SwStyleProperties_Impl::GetProperty(const ::rtl::OUString& rName, uno:: bRet = sal_True; break; } + ++nPos; ++aIt; } -- cgit v1.2.3 From 7f18fd1297030f7adc6d6acd381676249e00e696 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Mon, 18 Jan 2010 18:37:54 +0100 Subject: masterfix: #i10000# bBoolVar does not exist, use rValue --- sw/source/ui/uno/unomod.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index acd16936ea..e06733b6cb 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -572,17 +572,17 @@ void SwXPrintSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, break; case HANDLE_PRINTSET_PROSPECT_RTL: { - bBoolVal = mpPrtOpt->IsPrintProspectRTL(); + rValue <<= mpPrtOpt->IsPrintProspectRTL(); } break; case HANDLE_PRINTSET_PLACEHOLDER: { - bBoolVal = mpPrtOpt->IsPrintTextPlaceholder(); + rValue <<= mpPrtOpt->IsPrintTextPlaceholder(); } break; case HANDLE_PRINTSET_HIDDEN_TEXT: { - bBoolVal = mpPrtOpt->IsPrintHiddenText(); + rValue <<= mpPrtOpt->IsPrintHiddenText(); } break; default: -- cgit v1.2.3 From 11496355b2d8d2185cd303640be66dc648f2b9aa Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Mon, 18 Jan 2010 19:01:17 +0100 Subject: masterfix: #i10000# syntax error fixed --- sw/source/core/view/vprint.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index 18854ad12f..b90e3f666b 100755 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -562,7 +562,7 @@ SwPrintUIOptions::SwPrintUIOptions( // 0 : all pages (left & right) // 1 : left pages // 2 : right pages - DBG_ASSERT( rDefaultPrintData.IsPrintLeftPage() || rDefaultPrintData.IsPrintRigthPage(), + DBG_ASSERT( rDefaultPrintData.IsPrintLeftPage() || rDefaultPrintData.IsPrintRightPage(), "unexpected value combination" ); sal_Int16 nPagesChoice = 0; if (rDefaultPrintData.IsPrintLeftPage() && !rDefaultPrintData.IsPrintRightPage()) -- cgit v1.2.3 From 731640b965c69f750855e21dc93cb2b88e94099c Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 19 Jan 2010 08:55:31 +0100 Subject: sw33a11y01: classes and - forward needed a11y information/events to instance --- sw/source/ui/docvw/SidebarTxtControlAcc.cxx | 46 ++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx index 08a7c1b008..e01041d79f 100644 --- a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx +++ b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -52,7 +53,7 @@ namespace sw { namespace sidebarwindows { // for <::accessibiliy::AccessibleTextHelper> instance // ============================================================================= class SidebarTextEditSource : public SvxEditSource, - public SfxBroadcaster + public SfxBroadcaster { public: SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl ); @@ -67,6 +68,7 @@ class SidebarTextEditSource : public SvxEditSource, virtual void UpdateData(); virtual SfxBroadcaster& GetBroadcaster() const; + DECL_LINK( NotifyHdl, EENotify* ); private: SidebarTxtControl& mrSidebarTxtControl; @@ -80,10 +82,12 @@ SidebarTextEditSource::SidebarTextEditSource( SidebarTxtControl& rSidebarTxtCont , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), NULL ) , mViewForwarder( *(rSidebarTxtControl.GetTextView()) ) { + mrSidebarTxtControl.GetTextView()->GetOutliner()->SetNotifyHdl( LINK(this, SidebarTextEditSource, NotifyHdl) ); } SidebarTextEditSource::~SidebarTextEditSource() { + mrSidebarTxtControl.GetTextView()->GetOutliner()->SetNotifyHdl( Link() ); } SvxEditSource* SidebarTextEditSource::Clone() const @@ -116,6 +120,22 @@ SfxBroadcaster& SidebarTextEditSource::GetBroadcaster() const return *( const_cast< SidebarTextEditSource* > (this) ); } +IMPL_LINK(SidebarTextEditSource, NotifyHdl, EENotify*, pNotify) +{ + if ( pNotify ) + { + ::std::auto_ptr< SfxHint > aHint( SvxEditSourceHelper::EENotification2Hint( pNotify ) ); + + if( aHint.get() ) + { + Broadcast( *aHint.get() ); + } + } + + return 0; +} + + // ============================================================================= // declaration and implementation of accessible context for instance // ============================================================================= @@ -146,6 +166,9 @@ class SidebarTxtControlAccessibleContext : public VCLXAccessibleComponent ::com::sun::star::accessibility::XAccessibleEventListener >& xListener) throw (::com::sun::star::uno::RuntimeException); + protected: + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + private: SidebarTxtControl& mrSidebarTxtControl; ::accessibility::AccessibleTextHelper* mpAccessibleTextHelper; @@ -193,6 +216,27 @@ void SAL_CALL SidebarTxtControlAccessibleContext::removeEventListener ( mpAccessibleTextHelper->RemoveEventListener(xListener); } +void SidebarTxtControlAccessibleContext::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) +{ + switch ( rVclWindowEvent.GetId() ) + { + case VCLEVENT_WINDOW_GETFOCUS: + case VCLEVENT_CONTROL_GETFOCUS: + { + mpAccessibleTextHelper->SetFocus( sal_True ); + } + break; + case VCLEVENT_WINDOW_LOSEFOCUS: + case VCLEVENT_CONTROL_LOSEFOCUS: + { + mpAccessibleTextHelper->SetFocus( sal_False ); + } + break; + } + + VCLXAccessibleComponent::ProcessWindowEvent( rVclWindowEvent ); +} + // ============================================================================= // implementaion of accessible for instance // ============================================================================= -- cgit v1.2.3 From ae122b06dd15e1ecc49150e284de1722e53ae6b4 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 19 Jan 2010 08:57:57 +0100 Subject: sw33a11y01: #i88070# classes and - minor refactoring --- sw/inc/PostItMgr.hxx | 18 ++++---- sw/inc/postithelper.hxx | 32 +++++++------ sw/source/core/fields/postithelper.cxx | 1 + sw/source/ui/docvw/PostItMgr.cxx | 84 ++++++++++++++-------------------- 4 files changed, 63 insertions(+), 72 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 1f26159fc7..0694ae4911 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -188,7 +188,14 @@ class SwPostItMgr: public SfxListener sal_Int32 GetSpaceBetween() const; void SetReadOnlyState(); DECL_LINK( CalcHdl, void*); - protected: + + sw::sidebarwindows::SwSidebarWin* GetSidebarWin(const SfxBroadcaster* pBroadcaster) const; + sw::annotation::SwAnnotationWin* GetAnnotationWin(const SwPostItField* pFld) const; + + void InsertItem( SfxBroadcaster* pItem, bool bCheckExistance, bool bFocus); + void RemoveItem( SfxBroadcaster* pBroadcast ); + + void Sort(const short aType); public: SwPostItMgr(SwView* aDoc); @@ -198,8 +205,6 @@ class SwPostItMgr: public SfxListener const_iterator begin() const { return mvPostItFlds.begin(); } const_iterator end() const { return mvPostItFlds.end(); } - void InsertItem( SfxBroadcaster* pItem, bool bCheckExistance, bool bFocus); - void RemoveItem( SfxBroadcaster* pBroadcast ); void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); void LayoutPostIts(); @@ -220,8 +225,6 @@ class SwPostItMgr: public SfxListener void CorrectPositions(); - void Sort(const short aType); - void SetLayout() { mbLayout = true; }; void Delete(String aAuthor); void Delete(); @@ -256,11 +259,6 @@ class SwPostItMgr: public SfxListener sal_Int32 GetMinimumSizeWithMeta() const; sal_Int32 GetSidebarScrollerHeight() const; - sw::sidebarwindows::SwSidebarWin* GetPostIt(const SfxBroadcaster* pBroadcaster) const; - sw::sidebarwindows::SwSidebarWin* GetPostIt(SfxBroadcaster* pBroadcaster) const; - sw::annotation::SwAnnotationWin* GetPostIt(const SwPostItField* pFld) const; - sw::annotation::SwAnnotationWin* GetPostIt(SwPostItField* pFld) const; - void SetShadowState(const SwPostItField* pFld,bool bCursor = true); void SetSpellChecking(); diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index 56ebe94228..5d9d58ed75 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -54,12 +54,23 @@ typedef sal_Int64 SwPostItBits; struct SwLayoutInfo { + SwFrm* mpAssociatedFrm; SwRect mPosition; SwRect mPageFrame; SwRect mPagePrtArea; unsigned long mnPageNumber; sw::sidebarwindows::SidebarPosition meSidebarPosition; USHORT mRedlineAuthor; + + SwLayoutInfo() + : mpAssociatedFrm(0) + , mPosition() + , mPageFrame() + , mPagePrtArea() + , mnPageNumber(1) + , meSidebarPosition(sw::sidebarwindows::SIDEBAR_NONE) + , mRedlineAuthor(0) + {} }; namespace SwPostItHelper @@ -82,22 +93,17 @@ public: sw::sidebarwindows::SwSidebarWin* pPostIt; bool bShow; bool bFocus; - sw::sidebarwindows::SidebarPosition meSidebarPosition; - SwRect mPos; - SwRect mFramePos; - SwRect mPagePos; - unsigned long mnPageNumber; + SwPostItHelper::SwLayoutStatus mLayoutStatus; - USHORT mRedlineAuthor; + SwLayoutInfo maLayoutInfo; + SwSidebarItem( const bool aShow, const bool aFocus) - : pPostIt(0), - bShow(aShow), - bFocus(aFocus), - meSidebarPosition(sw::sidebarwindows::SIDEBAR_NONE), - mnPageNumber(1), - mLayoutStatus( SwPostItHelper::INVISIBLE ), - mRedlineAuthor(0) + : pPostIt(0) + , bShow(aShow) + , bFocus(aFocus) + , mLayoutStatus( SwPostItHelper::INVISIBLE ) + , maLayoutInfo() {} virtual ~SwSidebarItem(){} virtual SwPosition GetPosition() = 0; diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx index af9fa02da7..5034cfcc07 100644 --- a/sw/source/core/fields/postithelper.cxx +++ b/sw/source/core/fields/postithelper.cxx @@ -71,6 +71,7 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( std::vector< SwLa { SwLayoutInfo aInfo; pTxtFrm->GetCharRect( aInfo.mPosition, rPos, 0 ); + aInfo.mpAssociatedFrm = pTxtFrm; aInfo.mPageFrame = pPage->Frm(); aInfo.mPagePrtArea = pPage->Prt(); aInfo.mPagePrtArea.Pos() += aInfo.mPageFrame.Pos(); diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index a8e1f3425e..7636d7cf87 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -118,12 +118,13 @@ bool comp_date( const SwPostItItem* a, const SwPostItItem* b) // if two notes are at the same position, sort by logical node position bool comp_pos(const SwSidebarItem *a, const SwSidebarItem *b) { - return (a->mPos.Bottom() == b->mPos.Bottom()) ? - ( ((a->mPos.Left() == b->mPos.Left()) && (a->GetBroadCaster()->ISA(SwFmtFld) && b->GetBroadCaster()->ISA(SwFmtFld)) ) ? - *(static_cast(a->GetBroadCaster())->GetTxtFld()->GetStart()) < - *(static_cast(b->GetBroadCaster())->GetTxtFld()->GetStart()) - : a->mPos.Left() < b->mPos.Left() ) - : a->mPos.Bottom() < b->mPos.Bottom(); + return (a->maLayoutInfo.mPosition.Bottom() == b->maLayoutInfo.mPosition.Bottom()) + ? ( ( (a->maLayoutInfo.mPosition.Left() == b->maLayoutInfo.mPosition.Left()) && + (a->GetBroadCaster()->ISA(SwFmtFld) && b->GetBroadCaster()->ISA(SwFmtFld)) ) + ? *(static_cast(a->GetBroadCaster())->GetTxtFld()->GetStart()) < + *(static_cast(b->GetBroadCaster())->GetTxtFld()->GetStart()) + : a->maLayoutInfo.mPosition.Left() < b->maLayoutInfo.mPosition.Left() ) + : a->maLayoutInfo.mPosition.Bottom() < b->maLayoutInfo.mPosition.Bottom(); } SwPostItMgr::SwPostItMgr(SwView* pView) @@ -487,22 +488,18 @@ bool SwPostItMgr::CalcRects() } //save old rect and visible state - SwRect aOldRect(pItem->mPos); + SwRect aOldRect(pItem->maLayoutInfo.mPosition); SwPostItHelper::SwLayoutStatus eOldStatus = pItem->mLayoutStatus; std::vector< SwLayoutInfo > aInfo; SwPosition aPosition = pItem->GetPosition(); pItem->mLayoutStatus = SwPostItHelper::getLayoutInfos( aInfo, aPosition ); if( aInfo.size() ) { - SwLayoutInfo& rInfo = aInfo[0]; - pItem->mPos = rInfo.mPosition; - pItem->mPagePos = rInfo.mPageFrame; - pItem->mFramePos = rInfo.mPagePrtArea; - pItem->meSidebarPosition = rInfo.meSidebarPosition; - pItem->mnPageNumber = rInfo.mnPageNumber; - pItem->mRedlineAuthor = rInfo.mRedlineAuthor; + pItem->maLayoutInfo = aInfo[0]; } - bChange = bChange || (pItem->mPos != aOldRect) || (eOldStatus != pItem->mLayoutStatus); + bChange = bChange || + ( pItem->maLayoutInfo.mPosition != aOldRect ) || + ( eOldStatus != pItem->mLayoutStatus ); } // show notes in right order in navigator @@ -530,7 +527,7 @@ bool SwPostItMgr::CalcRects() } } - const unsigned long aPageNum = pItem->mnPageNumber; + const unsigned long aPageNum = pItem->maLayoutInfo.mnPageNumber; if (aPageNum > mPages.size()) { const unsigned long nNumberOfPages = mPages.size(); @@ -538,8 +535,8 @@ bool SwPostItMgr::CalcRects() mPages.push_back( new SwPostItPageItem()); } mPages[aPageNum-1]->mList->push_back(pItem); - mPages[aPageNum-1]->mPageRect = pItem->mPagePos; - mPages[aPageNum-1]->eSidebarPosition = pItem->meSidebarPosition; + mPages[aPageNum-1]->mPageRect = pItem->maLayoutInfo.mPageFrame; + mPages[aPageNum-1]->eSidebarPosition = pItem->maLayoutInfo.meSidebarPosition; } if (!bChange && mpWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE)) @@ -637,19 +634,25 @@ void SwPostItMgr::LayoutPostIts() // x value for notes positioning mlPageBorder = mpEditWin->LogicToPixel( Point( mPages[n]->mPageRect.Left(), 0)).X() - GetSidebarWidth(true);// - GetSidebarBorderWidth(true); //bending point - mlPageEnd = mpWrtShell->getIDocumentSettingAccess()->get( IDocumentSettingAccess::BROWSE_MODE) ? pItem->mFramePos.Left() : mPages[n]->mPageRect.Left() + 350; + mlPageEnd = + mpWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) + ? pItem->maLayoutInfo.mPagePrtArea.Left() + : mPages[n]->mPageRect.Left() + 350; } else if (mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_RIGHT ) { // x value for notes positioning mlPageBorder = mpEditWin->LogicToPixel( Point(mPages[n]->mPageRect.Right(), 0)).X() + GetSidebarBorderWidth(true); //bending point - mlPageEnd = mpWrtShell->getIDocumentSettingAccess()->get( IDocumentSettingAccess::BROWSE_MODE) ? pItem->mFramePos.Right() : mPages[n]->mPageRect.Right() - 350; + mlPageEnd = + mpWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) + ? pItem->maLayoutInfo.mPagePrtArea.Right() : + mPages[n]->mPageRect.Right() - 350; } if (pItem->bShow) { - long Y = mpEditWin->LogicToPixel( Point(0,pItem->mPos.Bottom())).Y(); + long Y = mpEditWin->LogicToPixel( Point(0,pItem->maLayoutInfo.mPosition.Bottom())).Y(); long aPostItHeight = 0; if (!pPostIt) { @@ -669,7 +672,9 @@ void SwPostItMgr::LayoutPostIts() } } - pPostIt->SetChangeTracking(pItem->mLayoutStatus,GetColorAnkor(pItem->mRedlineAuthor)); + pPostIt->SetChangeTracking( + pItem->mLayoutStatus, + GetColorAnkor(pItem->maLayoutInfo.mRedlineAuthor)); pPostIt->SetSidebarPosition(mPages[n]->eSidebarPosition); pPostIt->SetFollow(pPostIt->CalcFollow()); aPostItHeight = ( pPostIt->GetPostItTextHeight() < pPostIt->GetMinimumSizeWithoutMeta() @@ -680,7 +685,7 @@ void SwPostItMgr::LayoutPostIts() Y - GetInitialAnchorDistance(), GetNoteWidth() , aPostItHeight, - pItem->mPos, + pItem->maLayoutInfo.mPosition, mlPageEnd ); if (pItem->bFocus) @@ -1362,7 +1367,7 @@ void SwPostItMgr::Sort(const short aType) } } -SwSidebarWin* SwPostItMgr::GetPostIt(SfxBroadcaster* pBroadcaster) const +SwSidebarWin* SwPostItMgr::GetSidebarWin( const SfxBroadcaster* pBroadcaster) const { for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { @@ -1372,27 +1377,7 @@ SwSidebarWin* SwPostItMgr::GetPostIt(SfxBroadcaster* pBroadcaster) const return NULL; } -sw::annotation::SwAnnotationWin* SwPostItMgr::GetPostIt(SwPostItField* pFld) const -{ - for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) - { - if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld() == pFld) ) - return dynamic_cast((*i)->pPostIt); - } - return NULL; -} - -SwSidebarWin* SwPostItMgr::GetPostIt( const SfxBroadcaster* pBroadcaster) const -{ - for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) - { - if ( (*i)->GetBroadCaster() == pBroadcaster) - return (*i)->pPostIt; - } - return NULL; -} - -sw::annotation::SwAnnotationWin* SwPostItMgr::GetPostIt(const SwPostItField* pFld) const +sw::annotation::SwAnnotationWin* SwPostItMgr::GetAnnotationWin(const SwPostItField* pFld) const { for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) { @@ -1505,12 +1490,13 @@ void SwPostItMgr::SetShadowState(const SwPostItField* pFld,bool bCursor) { // reset old one if still alive // TODO: does not work properly if mouse and cursor was set - sw::annotation::SwAnnotationWin* pOldPostIt = GetPostIt(mShadowState.mpShadowFld); + sw::annotation::SwAnnotationWin* pOldPostIt = + GetAnnotationWin(mShadowState.mpShadowFld); if (pOldPostIt && pOldPostIt->Shadow() && (pOldPostIt->Shadow()->GetShadowState() != SS_EDIT)) pOldPostIt->SetViewState(VS_NORMAL); } //set new one, if it is not currently edited - sw::annotation::SwAnnotationWin* pNewPostIt = GetPostIt(pFld); + sw::annotation::SwAnnotationWin* pNewPostIt = GetAnnotationWin(pFld); if (pNewPostIt && pNewPostIt->Shadow() && (pNewPostIt->Shadow()->GetShadowState() != SS_EDIT)) { pNewPostIt->SetViewState(VS_VIEW); @@ -1536,7 +1522,7 @@ void SwPostItMgr::SetShadowState(const SwPostItField* pFld,bool bCursor) if (!mShadowState.bCursor && !mShadowState.bMouse) { // reset old one if still alive - sw::annotation::SwAnnotationWin* pOldPostIt = GetPostIt(mShadowState.mpShadowFld); + sw::annotation::SwAnnotationWin* pOldPostIt = GetAnnotationWin(mShadowState.mpShadowFld); if (pOldPostIt && pOldPostIt->Shadow() && (pOldPostIt->Shadow()->GetShadowState() != SS_EDIT)) { pOldPostIt->SetViewState(VS_NORMAL); @@ -1900,7 +1886,7 @@ sal_uInt16 SwPostItMgr::FinishSearchReplace(const ::com::sun::star::util::Search sal_uInt16 SwPostItMgr::SearchReplace(const SwFmtFld &pFld, const ::com::sun::star::util::SearchOptions& rSearchOptions, bool bSrchForward) { sal_uInt16 aResult = 0; - SwSidebarWin* pWin = GetPostIt(&pFld); + SwSidebarWin* pWin = GetSidebarWin(&pFld); if (pWin) { ESelection aOldSelection = pWin->GetOutlinerView()->GetSelection(); -- cgit v1.2.3 From 1eeb972769928448d21ec149de675933926c8637 Mon Sep 17 00:00:00 2001 From: hb Date: Tue, 19 Jan 2010 12:56:39 +0100 Subject: merged DEV300_m69 --- sw/source/core/draw/dcontact.cxx | 29 +++++------------------------ sw/source/core/draw/dflyobj.cxx | 12 ++++++------ sw/source/core/unocore/unodraw.cxx | 15 ++++----------- sw/source/core/unocore/unotext.cxx | 4 ++-- sw/source/ui/chrdlg/ccoll.cxx | 8 -------- sw/source/ui/docvw/postit.cxx | 8 ++++---- sw/source/ui/uiview/srcview.cxx | 2 ++ sw/util/makefile.mk | 4 ---- 8 files changed, 23 insertions(+), 59 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 93f83256a9..43b29f9e33 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -44,7 +44,6 @@ #include #include #include -// AW, OD 2004-04-30 #i28501# #include #include #include @@ -69,31 +68,17 @@ #include #include #include - -// OD 2004-02-11 #110582#-2 #include - -// OD 18.06.2003 #108784# -#include -// OD 2004-05-24 #i28701# #include #include - -// AW: For VCOfDrawVirtObj and stuff -#ifndef _SDR_CONTACT_VIEWCONTACTOFVIRTOBJ_HXX +#include #include -#endif - -#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TRANSFORMPRIMITIVE2D_HXX #include -#endif - -#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFSDROBJ_HXX #include -#endif - #include +#include + using namespace ::com::sun::star; @@ -2605,9 +2590,7 @@ void SwDrawVirtObj::RecalcBoundRect() basegfx::B2DPolyPolygon SwDrawVirtObj::TakeXorPoly() const { basegfx::B2DPolyPolygon aRetval(rRefObj.TakeXorPoly()); - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate(GetOffset().X(), GetOffset().Y()); - aRetval.transform(aMatrix); + aRetval.transform(basegfx::tools::createTranslateB2DHomMatrix(GetOffset().X(), GetOffset().Y())); return aRetval; } @@ -2615,9 +2598,7 @@ basegfx::B2DPolyPolygon SwDrawVirtObj::TakeXorPoly() const basegfx::B2DPolyPolygon SwDrawVirtObj::TakeContour() const { basegfx::B2DPolyPolygon aRetval(rRefObj.TakeContour()); - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate(GetOffset().X(), GetOffset().Y()); - aRetval.transform(aMatrix); + aRetval.transform(basegfx::tools::createTranslateB2DHomMatrix(GetOffset().X(), GetOffset().Y())); return aRetval; } diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index ce2c6067f3..1e4d252f06 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -196,7 +196,7 @@ namespace drawinglayer { namespace primitive2d { - class SwVirtFlyDrawObjPrimitive : public BasePrimitive2D + class SwVirtFlyDrawObjPrimitive : public BufferedDecompositionPrimitive2D { private: const SwVirtFlyDrawObj& mrSwVirtFlyDrawObj; @@ -204,13 +204,13 @@ namespace drawinglayer protected: // method which is to be used to implement the local decomposition of a 2D primitive - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: SwVirtFlyDrawObjPrimitive( const SwVirtFlyDrawObj& rSwVirtFlyDrawObj, const basegfx::B2DRange &rOuterRange) - : BasePrimitive2D(), + : BufferedDecompositionPrimitive2D(), mrSwVirtFlyDrawObj(rSwVirtFlyDrawObj), maOuterRange(rOuterRange) { @@ -239,7 +239,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SwVirtFlyDrawObjPrimitive::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence SwVirtFlyDrawObjPrimitive::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; @@ -269,7 +269,7 @@ namespace drawinglayer bool SwVirtFlyDrawObjPrimitive::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const SwVirtFlyDrawObjPrimitive& rCompare = (SwVirtFlyDrawObjPrimitive&)rPrimitive; @@ -295,7 +295,7 @@ namespace drawinglayer getSwVirtFlyDrawObj().wrap_DoPaintObject(); // call parent - return BasePrimitive2D::get2DDecomposition(rViewInformation); + return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index a88f0a26c0..af1c09f5c2 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -75,19 +75,12 @@ #include #include #include -// OD 2004-05-05 #i28701# +#include #include -// --> OD 2004-11-10 #i35007# #include -// <-- -// --> OD 2005-03-10 #i44334#, #i44681# -// --> OD 2007-01-03 #i73079# - use correct matrix type #include -// <-- -// --> OD 2009-01-16 #i59051 +#include #include -// <-- - #include #include #include @@ -2860,8 +2853,8 @@ void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition ) // apply translation difference to PolyPolygonBezier. if ( aTranslateDiff.X != 0 || aTranslateDiff.Y != 0 ) { - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate( aTranslateDiff.X, aTranslateDiff.Y ); + const basegfx::B2DHomMatrix aMatrix(basegfx::tools::createTranslateB2DHomMatrix( + aTranslateDiff.X, aTranslateDiff.Y)); const sal_Int32 nOuterSequenceCount(aConvertedPath.Coordinates.getLength()); drawing::PointSequence* pInnerSequence = aConvertedPath.Coordinates.getArray(); diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 0373d8877a..3876f861b2 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -270,8 +270,8 @@ void SwXText::insertString(const uno::Reference< text::XTextRange >& xTextRange, sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); } - if(pRange && pRange->GetDoc() == GetDoc() || - pCursor && pCursor->GetDoc() == GetDoc()) + if( (pRange && pRange->GetDoc() == GetDoc()) || + (pCursor && pCursor->GetDoc() == GetDoc()) ) { const SwStartNode* pOwnStartNode = GetStartNode(); if(pCursor) diff --git a/sw/source/ui/chrdlg/ccoll.cxx b/sw/source/ui/chrdlg/ccoll.cxx index 6045cf87b5..c76e64381b 100644 --- a/sw/source/ui/chrdlg/ccoll.cxx +++ b/sw/source/ui/chrdlg/ccoll.cxx @@ -209,11 +209,7 @@ int SwCondCollItem::operator==( const SfxPoolItem& rItem) const const String& SwCondCollItem::GetStyle(USHORT nPos) const { -#ifndef IRIX return nPos < COND_COMMAND_COUNT ? sStyles[nPos] : aEmptyStr; -#else - return nPos < COND_COMMAND_COUNT ? (String)sStyles[nPos] : aEmptyStr; -#endif } /**************************************************************************** @@ -224,11 +220,7 @@ const String& SwCondCollItem::GetStyle(USHORT nPos) const void SwCondCollItem::SetStyle(const String* pStyle, USHORT nPos) { if( nPos < COND_COMMAND_COUNT ) -#ifndef IRIX sStyles[nPos] = pStyle ? *pStyle : aEmptyStr; -#else - sStyles[nPos] = pStyle ? (String)*pStyle : aEmptyStr; -#endif } diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx index c807e24ff8..8972b68f2d 100644 --- a/sw/source/ui/docvw/postit.cxx +++ b/sw/source/ui/docvw/postit.cxx @@ -1953,7 +1953,7 @@ private: ShadowState maShadowState; protected: - virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition( + virtual drawinglayer::primitive2d::Primitive2DSequence create2DDecomposition( const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: @@ -1977,7 +1977,7 @@ public: DeclPrimitrive2DIDBlock() }; -drawinglayer::primitive2d::Primitive2DSequence SwPostItShadowPrimitive::createLocalDecomposition( +drawinglayer::primitive2d::Primitive2DSequence SwPostItShadowPrimitive::create2DDecomposition( const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) const { // get logic sizes in object coordinate system @@ -2140,7 +2140,7 @@ private: bool mbLineSolid : 1; protected: - virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition( + virtual drawinglayer::primitive2d::Primitive2DSequence create2DDecomposition( const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: @@ -2179,7 +2179,7 @@ public: DeclPrimitrive2DIDBlock() }; -drawinglayer::primitive2d::Primitive2DSequence SwPostItAnkorPrimitive::createLocalDecomposition( +drawinglayer::primitive2d::Primitive2DSequence SwPostItAnkorPrimitive::create2DDecomposition( const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) const { drawinglayer::primitive2d::Primitive2DSequence aRetval; diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index 07cfce2d2e..b2c046a7c6 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -717,6 +717,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, if(!bApi) + { if(bNotFoundMessage) { InfoBox( 0, SW_RES(MSG_NOT_FOUND)).Execute(); @@ -728,6 +729,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, pTextView->SetSelection( TextSelection( aPaM, aPaM ) ); StartSearchAndReplace( rSearchItem, FALSE, FALSE, TRUE ); } + } } return nFound; } diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk index fc1ff731b4..08afadc106 100644 --- a/sw/util/makefile.mk +++ b/sw/util/makefile.mk @@ -43,10 +43,6 @@ USE_DEFFILE=TRUE # --- Allgemein ----------------------------------------------------------- -.IF "$(OS)"=="IRIX" -LINKFLAGS+=-Wl,-LD_LAYOUT:lgot_buffer=40 -.ENDIF - sw_res_files= \ $(SRS)$/app.srs \ $(SRS)$/dialog.srs \ -- cgit v1.2.3 From 2a5581fbf9dd12e4cf82112d0966e49321d51d96 Mon Sep 17 00:00:00 2001 From: os Date: Wed, 20 Jan 2010 15:33:56 +0100 Subject: #i108455# check configuration pointers before call of RemoveListener() --- sw/source/ui/app/apphdl.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index c9ca781e7c..010e00b204 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -768,15 +768,20 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) DELETEZ(pWebToolbarConfig) ; DELETEZ(pAuthorNames) ; DELETEZ(pDBConfig); - pColorConfig->RemoveListener(this); + if( pColorConfig ) + pColorConfig->RemoveListener(this); DELETEZ(pColorConfig); - pAccessibilityOptions->RemoveListener(this); + if( pAccessibilityOptions ) + pAccessibilityOptions->RemoveListener(this); DELETEZ(pAccessibilityOptions); - pCTLOptions->RemoveListener(this); + if(pCTLOptions) + pCTLOptions->RemoveListener(this); DELETEZ(pCTLOptions); - pUserOptions->RemoveListener(this); + if(pUserOptions) + pUserOptions->RemoveListener(this); DELETEZ(pUserOptions); - pUndoOptions->RemoveListener(this); + if(pUndoOptions) + pUndoOptions->RemoveListener(this); DELETEZ(pUndoOptions); } } -- cgit v1.2.3 From 51329b21635df64de4ca275558bab7543243909d Mon Sep 17 00:00:00 2001 From: os Date: Wed, 20 Jan 2010 15:50:24 +0100 Subject: #i108081# take care of OLE objects in mail merge --- sw/inc/doc.hxx | 2 +- sw/source/core/doc/docnew.cxx | 233 ++---------------------------------------- sw/source/ui/dbui/dbmgr.cxx | 7 +- sw/source/ui/uno/unotxdoc.cxx | 15 ++- 4 files changed, 20 insertions(+), 237 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 557f73ad13..d278e21348 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -2115,7 +2115,7 @@ public: ::sfx2::IXmlIdRegistry& GetXmlIdRegistry(); ::sw::MetaFieldManager & GetMetaFieldManager(); - SwDoc* CreateCopy() const; + SfxObjectShell* CreateCopy(bool bCallInitNew) const; }; diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index e791d5c4ad..dd177462e4 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -1069,14 +1069,10 @@ void SwDoc::InitTOXTypes() /*-- 08.05.2009 10:07:57--------------------------------------------------- -----------------------------------------------------------------------*/ -SwDoc* SwDoc::CreateCopy() const +SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const { SwDoc* pRet = new SwDoc; //copy settings -/* - //aNodes( this ), - //aUndoNodes( this ), - mpAttrPool(new SwAttrPool(this)),*/ USHORT __FAR_DATA aRangeOfDefaults[] = { RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_CHRATR_BEGIN, RES_CHRATR_END-1, @@ -1105,143 +1101,8 @@ SwDoc* SwDoc::CreateCopy() const if( aNewDefaults.Count() ) pRet->SetDefault( aNewDefaults ); - /* - pDfltFrmFmt( new SwFrmFmt( GetAttrPool(), sFrmFmtStr, 0 ) ), - pEmptyPageFmt( new SwFrmFmt( GetAttrPool(), sEmptyPageStr, pDfltFrmFmt ) ), - pColumnContFmt( new SwFrmFmt( GetAttrPool(), sColumnCntStr, pDfltFrmFmt ) ), - pDfltCharFmt( new SwCharFmt( GetAttrPool(), sCharFmtStr, 0 ) ), - pDfltTxtFmtColl( new SwTxtFmtColl( GetAttrPool(), sTxtCollStr ) ), - pDfltGrfFmtColl( new SwGrfFmtColl( GetAttrPool(), sGrfCollStr ) ), - pFrmFmtTbl( new SwFrmFmts() ), - pCharFmtTbl( new SwCharFmts() ), - pSpzFrmFmtTbl( new SwSpzFrmFmts() ), - pSectionFmtTbl( new SwSectionFmts() ), - pTblFrmFmtTbl( new SwFrmFmts() ), - pTxtFmtCollTbl( new SwTxtFmtColls() ), - pGrfFmtCollTbl( new SwGrfFmtColls() ), - pBookmarkTbl( new SwBookmarks( 0, 16 ) ), - pTOXTypes( new SwTOXTypes() ), - pDefTOXBases( new SwDefTOXBase_Impl() ), - pLayout( 0 ), // Rootframe des spezifischen Layouts. - pDrawModel( 0 ), - pUndos( new SwUndos( 0, 20 ) ), - pUpdtFlds( new SwDocUpdtFld() ), - pFldTypes( new SwFldTypes() ), - pVirDev( 0 ), - pPrt( 0 ), - pPrtData( 0 ), - pGlossaryDoc( 0 ), - pOutlineRule( 0 ), - pFtnInfo( new SwFtnInfo ), - pEndNoteInfo( new SwEndNoteInfo ), - pLineNumberInfo( new SwLineNumberInfo ), - pFtnIdxs( new SwFtnIdxs ), - pDocStat( new SwDocStat ), - pDocShell( 0 ), - pDocShRef( 0 ), - pLinkMgr( new SvxLinkManager( 0 ) ), - pACEWord( 0 ), - pURLStateChgd( 0 ), - pNumberFormatter( 0 ), - pNumRuleTbl( new SwNumRuleTbl ), - // --> OD 2008-03-26 #refactorlists# - maLists(), - maListStyleLists(), - // <-- - pRedlineTbl( new SwRedlineTbl ), - pAutoFmtRedlnComment( 0 ), - pUnoCrsrTbl( new SwUnoCrsrTbl( 0, 16 ) ), - pPgPViewPrtData( 0 ), - pExtInputRing( 0 ), - pLayouter( 0 ), - // --> OD 2008-03-07 #refactorlists# - pStyleAccess( 0 ), - // <-- - pLayoutCache( 0 ), - pUnoCallBack(new SwUnoCallBack(0)), - mpGrammarContact( 0 ), - aChartDataProviderImplRef(), - pChartControllerHelper( 0 ), - // --> OD 2007-10-31 #i83479# - mpListItemsList( new tImplSortedNodeNumList() ), - // <-- - nUndoPos( 0 ), - nUndoSavePos( 0 ), - nUndoCnt( 0 ), - nUndoSttEnd( 0 ), - nAutoFmtRedlnCommentNo( 0 ), - nLinkUpdMode( GLOBALSETTING ), - eFldUpdMode( AUTOUPD_GLOBALSETTING ), - eRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)), - eChrCmprType( CHARCOMPRESS_NONE ), - mReferenceCount(0), - mIdleBlockCount(0), - nLockExpFld( 0 ), - mbReadlineChecked(false), - mbWinEncryption(sal_False), - // --> OD 2005-02-11 #i38810# - mbLinksUpdated( sal_False ), - mbClipBoard( false ), - mbColumnSelection( false ), - // i#78591# - mbProtectForm(false),*/ pRet->n32DummyCompatabilityOptions1 = n32DummyCompatabilityOptions1; pRet->n32DummyCompatabilityOptions2 = n32DummyCompatabilityOptions2; - /* - mbStartIdleTimer(sal_False) -{ - RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDoc::SwDoc" ); - - mbGlossDoc = - mbModified = - mbDtor = - mbUndo = - mbPageNums = - mbLoaded = - mbUpdateExpFld = - mbNewDoc = - mbCopyIsMove = - mbNoDrawUndoObj = - mbBrowseMode = - mbInReading = - mbInXMLImport = - mbUpdateTOX = - mbInLoadAsynchron = - mbHTMLMode = - mbInCallModified = - mbIsGlobalDoc = - mbGlblDocSaveLinks = - mbIsLabelDoc = - mbIsAutoFmtRedline = - mbOLEPrtNotifyPending = - mbAllOLENotify = - mbIsRedlineMove = - mbInsOnlyTxtGlssry = - mbContains_MSVBasic = - mbKernAsianPunctuation = -#ifndef PRODUCT - mbXMLExport = -#endif - // --> OD 2006-03-21 #b6375613# - mbApplyWorkaroundForB6375613 = - // <-- - false; - - mbGroupUndo = - mbNewFldLst = - mbVisibleLinks = - mbPurgeOLE = - true; - - // - // COMPATIBILITY FLAGS START - // - - // Note: Any non-hidden compatibility flag should obtain its default - // by asking SvtCompatibilityOptions, see below. - // - const SvtCompatibilityOptions aOptions; - */ pRet->mbParaSpaceMax = mbParaSpaceMax ; pRet->mbParaSpaceMaxAtPages = mbParaSpaceMaxAtPages ; pRet->mbTabCompat = mbTabCompat ; @@ -1271,92 +1132,16 @@ SwDoc* SwDoc::CreateCopy() const // // COMPATIBILITY FLAGS END // - /* - pMacroTable = new SvxMacroTableDtor; - - mpGrammarContact = ::createGrammarContact(); - - // Formate - pFrmFmtTbl->Insert(pDfltFrmFmt, 0 ); - pCharFmtTbl->Insert(pDfltCharFmt, 0 ); - - // FmtColls - // TXT - pTxtFmtCollTbl->Insert(pDfltTxtFmtColl, 0 ); - // GRF - pGrfFmtCollTbl->Insert(pDfltGrfFmtColl, 0 ); - - // PageDesc, EmptyPageFmt und ColumnFmt anlegen - if ( !aPageDescs.Count() ) - GetPageDescFromPool( RES_POOLPAGE_STANDARD ); - - //Leere Seite Einstellen. - pEmptyPageFmt->SetFmtAttr( SwFmtFrmSize( ATT_FIX_SIZE ) ); - //BodyFmt fuer Spalten Einstellen. - pColumnContFmt->SetFmtAttr( SwFmtFillOrder( ATT_LEFT_TO_RIGHT ) ); - - _InitFieldTypes(); - - // lege (fuer die Filter) eine Default-OutlineNumRule an - // --> OD 2008-02-11 #newlistlevelattrs# - pOutlineRule = new SwNumRule( String::CreateFromAscii( SwNumRule::GetOutlineRuleName() ), - // --> OD 2008-06-06 #i89178# - numfunc::GetDefaultPositionAndSpaceMode(), - // <-- - OUTLINE_RULE ); - // <-- - // #115901# - AddNumRule(pOutlineRule); - // --> OD 2005-10-21 - counting of phantoms depends on - pOutlineRule->SetCountPhantoms( !get(IDocumentSettingAccess::OLD_NUMBERING) ); - // <-- - - new SwTxtNode( SwNodeIndex( aUndoNodes.GetEndOfContent() ), pDfltTxtFmtColl ); - new SwTxtNode( SwNodeIndex( aNodes.GetEndOfContent() ), - GetTxtCollFromPool( RES_POOLCOLL_STANDARD )); - - // den eigenen IdleTimer setzen - aIdleTimer.SetTimeout( 600 ); - aIdleTimer.SetTimeoutHdl( LINK(this, SwDoc, DoIdleJobs) ); - - aOLEModifiedTimer.SetTimeout( 1000 ); - aOLEModifiedTimer.SetTimeoutHdl( LINK( this, SwDoc, DoUpdateModifiedOLE )); - - // DBMgr anlegen - pNewDBMgr = new SwNewDBMgr; - - // create TOXTypes - ShellResource* pShellRes = ViewShell::GetShellRes(); - - SwTOXType * pNew = new SwTOXType(TOX_CONTENT, pShellRes->aTOXContentName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_INDEX, pShellRes->aTOXIndexName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_USER, pShellRes->aTOXUserName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_ILLUSTRATIONS, pShellRes->aTOXIllustrationsName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_OBJECTS, pShellRes->aTOXObjectsName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_TABLES, pShellRes->aTOXTablesName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_AUTHORITIES, pShellRes->aTOXAuthoritiesName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - - { - SfxItemSet aIgnorableParagraphItems( GetAttrPool(), - RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1, - 0 ); - pStyleAccess = createStyleManager( &aIgnorableParagraphItems ); - } - - ResetModified(); - -*/ - pRet->ReplaceStyles( *(SwDoc*)this ); + pRet->ReplaceStyles( * const_cast< SwDoc*>( this )); + SfxObjectShellRef aDocShellRef = const_cast< SwDocShell* >( GetDocShell() ); + pRet->SetRefForDocShell( boost::addressof(aDocShellRef) ); + SfxObjectShellRef xRetShell = new SwDocShell( pRet, SFX_CREATE_MODE_STANDARD ); + if( bCallInitNew ) + xRetShell->DoInitNew(); //copy content pRet->Paste( *this ); - return pRet; + pRet->SetRefForDocShell( 0 ); + return xRetShell; } /*-- 08.05.2009 10:52:40--------------------------------------------------- copy document content - code from SwFEShell::Paste( SwDoc* , BOOL ) diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 6573946433..a2f9d928f2 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -3239,9 +3239,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, } else { - SwDoc* pNewDoc = rSourceView.GetDocShell()->GetDoc()->CreateCopy(); - xWorkDocSh = new SwDocShell( pNewDoc, SFX_CREATE_MODE_STANDARD ); - xWorkDocSh->DoInitNew(); + xWorkDocSh = rSourceView.GetDocShell()->GetDoc()->CreateCopy(true); } //create a ViewFrame SwView* pWorkView = static_cast< SwView* >( SfxViewFrame::CreateViewFrame( *xWorkDocSh, 0, sal_True )->GetViewShell() ); @@ -3364,8 +3362,9 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, pTargetShell->SttDoc(); // } - catch( Exception& ) + catch( Exception& rEx) { + (void)rEx; DBG_ERROR("exception caught in SwNewDBMgr::MergeDocuments"); } DELETEZ(pImpl->pMergeData); diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 044c5bd78f..8e233c537c 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -107,6 +107,8 @@ #include #include #include +#include + // --> FME 2004-06-08 #i12836# enhanced pdf export #include @@ -2864,16 +2866,13 @@ uno::Reference< util::XCloneable > SwXTextDocument::createClone( ) throw (uno:: if(!IsValid()) throw RuntimeException(); //create a new document - hidden - copy the storage and return it - SwDoc* pCopyDoc = pDocShell->GetDoc()->CreateCopy(); - SfxObjectShell* pShell = new SwDocShell( pCopyDoc, SFX_CREATE_MODE_STANDARD ); - pShell->DoInitNew(); - - uno::Reference< embed::XStorage > xSourceStorage = getDocumentStorage(); + SfxObjectShell* pShell = pDocShell->GetDoc()->CreateCopy(false); uno::Reference< frame::XModel > xNewModel = pShell->GetModel(); - //copy this storage + uno::Reference< embed::XStorage > xNewStorage = ::comphelper::OStorageHelper::GetTemporaryStorage( ); + uno::Sequence< beans::PropertyValue > aTempMediaDescriptor; + storeToStorage( xNewStorage, aTempMediaDescriptor ); uno::Reference< document::XStorageBasedDocument > xStorageDoc( xNewModel, uno::UNO_QUERY ); - uno::Reference< embed::XStorage > xNewStorage = xStorageDoc->getDocumentStorage(); - xSourceStorage->copyToStorage( xNewStorage ); + xStorageDoc->loadFromStorage( xNewStorage, aTempMediaDescriptor ); return uno::Reference< util::XCloneable >( xNewModel, UNO_QUERY ); } /* -----------------------------20.06.00 09:54-------------------------------- -- cgit v1.2.3 From f239e153cda24497605c52c721846aa0831d0c49 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 20 Jan 2010 16:59:56 +0100 Subject: swunolocking1: #i108489#: fix crash: XTextRangeToSwPaM(): do not prematurely release newly created text cursor. SwXTextViewCursor::gotoRange(): do not throw IllegalArgumentException. --- sw/source/core/unocore/unoobj2.cxx | 7 ++++--- sw/source/ui/uno/unotxvw.cxx | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 40f1234896..d1f24c7544 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1160,10 +1160,11 @@ bool XTextRangeToSwPaM( SwUnoInternalPaM & rToFill, // if it's a text then create a temporary cursor there and re-use // the pCursor variable - if(pText) + // #i108489#: Reference in outside scope to keep cursor alive + uno::Reference< text::XTextCursor > xTextCursor; + if (pText) { - const uno::Reference< text::XTextCursor > xTextCursor = - pText->CreateCursor(); + xTextCursor.set( pText->CreateCursor() ); xTextCursor->gotoEnd(sal_True); const uno::Reference xCrsrTunnel( xTextCursor, uno::UNO_QUERY); diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index b9a1bd8fd2..3b7b10f516 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -1364,7 +1364,9 @@ void SwXTextViewCursor::gotoRange( SwUnoInternalPaM rDestPam(*m_pView->GetDocShell()->GetDoc()); if (!::sw::XTextRangeToSwPaM(rDestPam, xRange)) - throw IllegalArgumentException(); + { + throw uno::RuntimeException(); + } ShellModes eSelMode = m_pView->GetShellMode(); SwWrtShell& rSh = m_pView->GetWrtShell(); -- cgit v1.2.3 From 5c5e9208e9f3e836f3fb1d2052e333181aaa965f Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Thu, 21 Jan 2010 12:27:21 +0100 Subject: writerfilter07: new in SwNodes: ExpandRangeForTableBox, ExpandTableRanges --- sw/inc/ndarr.hxx | 9 +++++- sw/source/core/docnode/ndtbl.cxx | 63 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 70 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx index 7edfad173a..1caf9c1e2b 100644 --- a/sw/inc/ndarr.hxx +++ b/sw/inc/ndarr.hxx @@ -137,6 +137,9 @@ protected: public: ~SwNodes(); + typedef ::std::vector NodeRanges_t; + typedef ::std::vector TableRanges_t; + SwNodePtr operator[]( ULONG n ) const { return (SwNodePtr)BigPtrArray::operator[] ( n ); } @@ -278,8 +281,12 @@ public: SwTableBoxFmt* pBoxFmt, SwTxtFmtColl* pTxtColl, SwUndoTxtToTbl* pUndo = 0 ); + + SwNodeRange ExpandRangeForTableBox(const SwNodeRange & rRange); + TableRanges_t ExpandTableRanges(const TableRanges_t & rRanges); + //create a table from a vector of NodeRanges - API support - SwTableNode* TextToTable( const std::vector< std::vector >& rTableNodes, + SwTableNode* TextToTable( const TableRanges_t& rTableNodes, SwTableFmt* pTblFmt, SwTableLineFmt* pLineFmt, SwTableBoxFmt* pBoxFmt, diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 31f477752f..619ee8a42e 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1269,10 +1269,71 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector > return pNdTbl; } +SwNodeRange SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange) +{ + SwNodeIndex aNewStart = rRange.aStart; + SwNodeIndex aNewEnd = rRange.aEnd; + + SwNodeIndex aEndIndex = rRange.aEnd; + SwNodeIndex aIndex = rRange.aStart; + + while (aIndex < aEndIndex) + { + SwNode& rNode = aIndex.GetNode(); + + if (rNode.IsStartNode()) + { + // advance aIndex to the end node of this start node + SwNode * pEndNode = rNode.EndOfSectionNode(); + aIndex = *pEndNode; + + if (aIndex > aNewEnd) + aNewEnd = aIndex; + } + else if (rNode.IsEndNode()) + { + SwNode * pStartNode = rNode.StartOfSectionNode(); + SwNodeIndex aStartIndex = *pStartNode; + + if (aStartIndex < aNewStart) + aNewStart = aStartIndex; + } + + if (aIndex < aEndIndex) + ++aIndex; + } + + return SwNodeRange(aNewStart, aNewEnd); +} + +SwNodes::TableRanges_t SwNodes::ExpandTableRanges +(const SwNodes::TableRanges_t & rTableRanges) +{ + TableRanges_t aResult; + + TableRanges_t::const_iterator aRowEndIter = rTableRanges.end(); + for (TableRanges_t::const_iterator aRowIter = rTableRanges.begin(); + aRowIter != aRowEndIter; ++aRowIter) + { + NodeRanges_t aRowRanges; + NodeRanges_t::const_iterator aCellEndIter = aRowIter->end(); + for (NodeRanges_t::const_iterator aCellIter = aRowIter->begin(); + aCellIter != aCellEndIter; ++aCellIter) + { + SwNodeRange aRange = ExpandRangeForTableBox(*aCellIter); + aRowRanges.push_back(aRange); + } + + aResult.push_back(aRowRanges); + } + + return aResult; +} + /*-- 18.05.2006 08:23:28--------------------------------------------------- -----------------------------------------------------------------------*/ -SwTableNode* SwNodes::TextToTable( const std::vector< std::vector >& rTableNodes, +SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes, SwTableFmt* pTblFmt, SwTableLineFmt* pLineFmt, SwTableBoxFmt* pBoxFmt, -- cgit v1.2.3 From eedc855254f036389c2bdc4fef5c7e9890d3d264 Mon Sep 17 00:00:00 2001 From: C?dric Bosdonnat Date: Thu, 21 Jan 2010 13:58:49 +0100 Subject: cbosdo01: Changed the behaviour of nbsp autocorr * The Non-breaking space insertion autocorrection is now done when typing the :!?; character instead of the word separator following it. * Removed the custom quote replacement option in autocorrection. --- sw/source/core/edit/autofmt.cxx | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 529950a546..76ea895a15 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -1892,8 +1892,13 @@ void SwAutoFormat::BuildHeadLine( USHORT nLvl ) // dann lasse doch mal das AutoCorrect auf den akt. TextNode los void SwAutoFormat::AutoCorrect( xub_StrLen nPos ) { + SvxAutoCorrect* pATst = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + long aSvxFlags = pATst->GetFlags( ); + bool bReplaceQuote = ( aSvxFlags & ChgQuotes ) > 0; + bool bReplaceSglQuote = ( aSvxFlags & ChgSglQuotes ) > 0; + if( aFlags.bAFmtByInput || - (!aFlags.bAutoCorrect && !aFlags.bReplaceQuote && + (!aFlags.bAutoCorrect && !bReplaceQuote && !bReplaceSglQuote && !aFlags.bCptlSttSntnc && !aFlags.bCptlSttWrd && !aFlags.bChgOrdinalNumber && !aFlags.bChgToEnEmDash && !aFlags.bSetINetAttr && @@ -1915,7 +1920,6 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos ) aDelPam.GetPoint()->nContent.Assign( pAktTxtNd, 0 ); SwAutoCorrDoc aACorrDoc( *pEditShell, aDelPam ); - SvxAutoCorrect* pATst = SvxAutoCorrCfg::Get()->GetAutoCorrect(); SwTxtFrmInfo aFInfo( 0 ); @@ -1931,8 +1935,8 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos ) if( nPos == pTxt->Len() ) break; // das wars - if( aFlags.bReplaceQuote && - ( '\"' == cChar || '\'' == cChar ) && + if( ( ( bReplaceQuote && '\"' == cChar ) || + ( bReplaceSglQuote && '\'' == cChar ) ) && ( !nPos || ' ' == pTxt->GetChar( nPos-1 ) ) ) { // -------------------------------------- @@ -1985,7 +1989,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos ) { case '\"': case '\'': - if( aFlags.bReplaceQuote ) + if( ( cChar == '\"' && bReplaceQuote ) || ( cChar == '\'' && bReplaceSglQuote ) ) { // -------------------------------------- // beachte: Sonderfall Symbolfonts !!! @@ -2070,6 +2074,18 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos ) } } break; + case '/': + if ( aFlags.bAddNonBrkSpace ) + { + LanguageType eLang = (bGetLanguage && pAktTxtNd) + ? pAktTxtNd->GetLang( nSttPos ) + : LANGUAGE_SYSTEM; + + SetRedlineTxt( STR_AUTOFMTREDL_NON_BREAK_SPACE ); + if ( pATst->FnAddNonBrkSpace( aACorrDoc, *pTxt, nSttPos, nPos, eLang ) ) + --nPos; + } + break; case '.': case '!': @@ -2078,7 +2094,6 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos ) bFirstSent = TRUE; //alle Wortrenner loesen die Autokorrektur aus! // break; - default: //alle Wortrenner loesen die Autokorrektur aus! // case ' ': @@ -2126,6 +2141,12 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos ) LanguageType eLang = (bGetLanguage && pAktTxtNd) ? pAktTxtNd->GetLang( nSttPos ) : LANGUAGE_SYSTEM; + + if ( aFlags.bAddNonBrkSpace ) + { + SetRedlineTxt( STR_AUTOFMTREDL_NON_BREAK_SPACE ); + pATst->FnAddNonBrkSpace( aACorrDoc, *pTxt, nSttPos, nPos, eLang ); + } if( ( aFlags.bChgOrdinalNumber && SetRedlineTxt( STR_AUTOFMTREDL_ORDINAL ) && @@ -2133,9 +2154,6 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos ) ( aFlags.bChgToEnEmDash && SetRedlineTxt( STR_AUTOFMTREDL_DASH ) && pATst->FnChgToEnEmDash( aACorrDoc, *pTxt, nSttPos, nPos, eLang ) ) || - ( aFlags.bAddNonBrkSpace && - SetRedlineTxt( STR_AUTOFMTREDL_NON_BREAK_SPACE ) && - pATst->FnAddNonBrkSpace( aACorrDoc, *pTxt, nSttPos, nPos, eLang ) ) || ( aFlags.bSetINetAttr && ( nPos == pTxt->Len() || IsSpace( pTxt->GetChar( nPos )) ) && SetRedlineTxt( STR_AUTOFMTREDL_DETECT_URL ) && -- cgit v1.2.3 From 9692f65d5d44124ea9b484f983f3f164b24c807e Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Thu, 21 Jan 2010 15:05:05 +0100 Subject: writerfilter07: ExpandRangeForTableCell: Expand over surrounding StartNodes/EndNodes --- sw/source/core/docnode/ndtbl.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 619ee8a42e..2a2f97133c 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1303,6 +1303,18 @@ SwNodeRange SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange) ++aIndex; } + SwNode * pNode = &aIndex.GetNode(); + while (pNode->IsEndNode()) + { + SwNode * pStartNode = pNode->StartOfSectionNode(); + SwNodeIndex aStartIndex(*pStartNode); + aNewStart = aStartIndex; + aNewEnd = aIndex; + + ++aIndex; + pNode = &aIndex.GetNode(); + } + return SwNodeRange(aNewStart, aNewEnd); } -- cgit v1.2.3 From 8b3c9c97a77c72bdb6015f2b44c781eea3cae0bb Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Fri, 22 Jan 2010 13:09:54 +0100 Subject: writerfilter07: SwNodes::ExpandTableRanges not needed. Correct node range for each table cell in convertToTable --- sw/inc/ndarr.hxx | 3 +-- sw/source/core/docnode/ndtbl.cxx | 39 ++++++++++++++------------------------ sw/source/core/unocore/unotext.cxx | 22 +++++++++++++++++++-- 3 files changed, 35 insertions(+), 29 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx index 1caf9c1e2b..945c44ba14 100644 --- a/sw/inc/ndarr.hxx +++ b/sw/inc/ndarr.hxx @@ -282,8 +282,7 @@ public: SwTxtFmtColl* pTxtColl, SwUndoTxtToTbl* pUndo = 0 ); - SwNodeRange ExpandRangeForTableBox(const SwNodeRange & rRange); - TableRanges_t ExpandTableRanges(const TableRanges_t & rRanges); + SwNodeRange * ExpandRangeForTableBox(const SwNodeRange & rRange); //create a table from a vector of NodeRanges - API support SwTableNode* TextToTable( const TableRanges_t& rTableNodes, diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 2a2f97133c..4d93acbcbc 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1269,8 +1269,11 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector > return pNdTbl; } -SwNodeRange SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange) +SwNodeRange * SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange) { + SwNodeRange * pResult = NULL; + bool bChanged = false; + SwNodeIndex aNewStart = rRange.aStart; SwNodeIndex aNewEnd = rRange.aEnd; @@ -1288,7 +1291,10 @@ SwNodeRange SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange) aIndex = *pEndNode; if (aIndex > aNewEnd) + { aNewEnd = aIndex; + bChanged = true; + } } else if (rNode.IsEndNode()) { @@ -1296,7 +1302,10 @@ SwNodeRange SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange) SwNodeIndex aStartIndex = *pStartNode; if (aStartIndex < aNewStart) + { aNewStart = aStartIndex; + bChanged = true; + } } if (aIndex < aEndIndex) @@ -1310,36 +1319,16 @@ SwNodeRange SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange) SwNodeIndex aStartIndex(*pStartNode); aNewStart = aStartIndex; aNewEnd = aIndex; + bChanged = true; ++aIndex; pNode = &aIndex.GetNode(); } - return SwNodeRange(aNewStart, aNewEnd); -} - -SwNodes::TableRanges_t SwNodes::ExpandTableRanges -(const SwNodes::TableRanges_t & rTableRanges) -{ - TableRanges_t aResult; - - TableRanges_t::const_iterator aRowEndIter = rTableRanges.end(); - for (TableRanges_t::const_iterator aRowIter = rTableRanges.begin(); - aRowIter != aRowEndIter; ++aRowIter) - { - NodeRanges_t aRowRanges; - NodeRanges_t::const_iterator aCellEndIter = aRowIter->end(); - for (NodeRanges_t::const_iterator aCellIter = aRowIter->begin(); - aCellIter != aCellEndIter; ++aCellIter) - { - SwNodeRange aRange = ExpandRangeForTableBox(*aCellIter); - aRowRanges.push_back(aRange); - } - - aResult.push_back(aRowRanges); - } + if (bChanged) + pResult = new SwNodeRange(aNewStart, aNewEnd); - return aResult; + return pResult; } /*-- 18.05.2006 08:23:28--------------------------------------------------- diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 3876f861b2..88f49a0a5e 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1817,13 +1817,31 @@ uno::Reference< text::XTextTable > SwXText::convertToTable( const uno::Reference< text::XTextRange > xStartRange = pRow[nCell][0]; const uno::Reference< text::XTextRange > xEndRange = pRow[nCell][1]; SwUnoInternalPaM aStartCellPam(*pDoc); - SwUnoInternalPaM aEndCellPam(*pDoc); + SwUnoInternalPaM aEndCellPam(*pDoc); // !!! TODO - PaMs in tables and sections do not work here - the same applies to PaMs in frames !!! if(!SwXTextRange::XTextRangeToSwPaM(aStartCellPam, xStartRange) || !SwXTextRange::XTextRangeToSwPaM(aEndCellPam, xEndRange) ) throw lang::IllegalArgumentException(); + + SwNodeRange aTmpRange( aStartCellPam.Start()->nNode, aEndCellPam.End()->nNode); + SwNodeRange * pCorrectedRange = pDoc->GetNodes().ExpandRangeForTableBox(aTmpRange); + + if (pCorrectedRange != NULL) + { + SwPaM aNewStartPaM(pCorrectedRange->aStart, 0); + aStartCellPam = aNewStartPaM; + + xub_StrLen nEndLen = 0; + SwTxtNode * pTxtNode = pCorrectedRange->aEnd.GetNode().GetTxtNode(); + if (pTxtNode != NULL) + nEndLen = pTxtNode->Len(); + + SwPaM aNewEndPaM(pCorrectedRange->aEnd, nEndLen); + aEndCellPam = aNewEndPaM; + } + /** check the nodes between start and end it is allowed to have pairs of StartNode/EndNodes */ @@ -1852,7 +1870,7 @@ uno::Reference< text::XTextTable > SwXText::convertToTable( break; } } - + /** The vector NodeRanges has to contain consecutive nodes. In rTableRanges the ranges don't need to be full paragraphs but they have to follow each other. To process the ranges they have to be aligned on paragraph borders -- cgit v1.2.3 From b97e03468b1e6b658232599f9b146d86aa60a6df Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 22 Jan 2010 15:07:11 +0100 Subject: cbosdo02: #i107658# disabling enhanced fields for now --- sw/source/filter/ww8/ww8par3.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 4c3d564a69..fee4da44a5 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -259,7 +259,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr) const SvtFilterOptions* pOpt = SvtFilterOptions::Get(); sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields()); - + if (!bUseEnhFields) { SwDropDownField aFld((SwDropDownFieldType*)rDoc.GetSysFldType(RES_DROPDOWN)); @@ -280,16 +280,14 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr) } else { - //@TODO fix: copy pasting here!!!!!!!!!!!!!! - //REVIEW: don't let this throught.... sometime I forget to get rid of my proof of concept stuff. Please kindly remind me!!!!! - + // TODO: review me String aBookmarkName; WW8PLCFx_Book* pB = pPlcxMan->GetBook(); if (pB!=NULL) { WW8_CP currentCP=pF->nSCode; WW8_CP currentLen=pF->nLen; - + USHORT bkmFindIdx; String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx); -- cgit v1.2.3 From e951d5a9e37e0a677889567046b13ef13290cbfe Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Fri, 22 Jan 2010 15:25:50 +0000 Subject: cmcfixes71: #i108580#: fix sw strict aliasing warnings --- sw/source/core/docnode/ndtbl1.cxx | 8 ++++---- sw/source/core/layout/paintfrm.cxx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 7dbf247500..5658bdc372 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -176,8 +176,8 @@ BOOL lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes, inline void InsertLine( SvPtrarr& rLineArr, SwTableLine* pLine ) { - if( USHRT_MAX == rLineArr.GetPos( (void*&)pLine ) ) - rLineArr.Insert( (void*&)pLine, rLineArr.Count() ); + if( USHRT_MAX == rLineArr.GetPos( pLine ) ) + rLineArr.Insert( pLine, rLineArr.Count() ); } //----------------------------------------------------------------------------- @@ -560,8 +560,8 @@ BOOL SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) c #***********************************************************************/ inline void InsertCell( SvPtrarr& rCellArr, SwCellFrm* pCellFrm ) { - if( USHRT_MAX == rCellArr.GetPos( (void*&)pCellFrm ) ) - rCellArr.Insert( (void*&)pCellFrm, rCellArr.Count() ); + if( USHRT_MAX == rCellArr.GetPos( pCellFrm ) ) + rCellArr.Insert( pCellFrm, rCellArr.Count() ); } //----------------------------------------------------------------------------- diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 3a2948a8be..171acf1492 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -557,7 +557,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut ) (nL1b <= nL2b && nL1c + nAdd > nL2b)) ) { SwLineRect *pMSC = &rL2; - aCheck.Insert( (void*&)pMSC, aCheck.Count() ); + aCheck.Insert( pMSC, aCheck.Count() ); } } if ( aCheck.Count() < 2 ) -- cgit v1.2.3 From d6699cee9a61b1b4ded63d386b34439d8d29654d Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 22 Jan 2010 19:07:50 +0100 Subject: swunolocking1: fix regression: SwXParagraphEnumeration constructor really needs the start node as a parameter because determining it from the cursor cannot work in nested tables. --- sw/inc/unoparagraph.hxx | 6 ++++- sw/source/core/unocore/unoobj.cxx | 8 ++++++- sw/source/core/unocore/unoobj2.cxx | 45 ++++++++++---------------------------- sw/source/core/unocore/unotbl.cxx | 6 ++++- 4 files changed, 29 insertions(+), 36 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx index add936e9c7..8743737c33 100644 --- a/sw/inc/unoparagraph.hxx +++ b/sw/inc/unoparagraph.hxx @@ -55,7 +55,9 @@ struct SwPosition; class SwPaM; class SwUnoCrsr; +class SwStartNode; class SwTxtNode; +class SwTable; class SwXText; @@ -339,7 +341,9 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const & xParent, ::std::auto_ptr pCursor, - const CursorType eType); + const CursorType eType, + SwStartNode const*const pStartNode = 0, + SwTable const*const pTable = 0); // XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName() diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index a0903cf049..1cb0d4f660 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -3157,8 +3157,14 @@ SwXTextCursor::createEnumeration() throw (uno::RuntimeException) } const CursorType eSetType = (CURSOR_TBLTEXT == m_pImpl->m_eType) ? CURSOR_SELECTION_IN_TABLE : CURSOR_SELECTION; + SwTableNode const*const pStartNode( (CURSOR_TBLTEXT == m_pImpl->m_eType) + ? rUnoCursor.GetPoint()->nNode.GetNode().FindTableNode() + : 0); + SwTable const*const pTable( + (pStartNode) ? & pStartNode->GetTable() : 0 ); const uno::Reference< container::XEnumeration > xRet = - new SwXParagraphEnumeration(pParentText, pNewCrsr, eSetType); + new SwXParagraphEnumeration( + pParentText, pNewCrsr, eSetType, pStartNode, pTable); return xRet; } diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index d1f24c7544..cef43782d4 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -468,34 +468,6 @@ void SwUnoCursorHelper::GetCrsrAttr(SwPaM & rPam, * SwXParagraphEnumeration ******************************************************************/ -static SwStartNode * -lcl_InitStartNode(const CursorType eType, SwUnoCrsr *const pCursor) -{ - switch (eType) - { - case CURSOR_TBLTEXT: // table cell: pCursor points at first paragraph - return pCursor->Start()->nNode.GetNode().StartOfSectionNode(); - case CURSOR_SELECTION_IN_TABLE: // table - return pCursor->Start()->nNode.GetNode().FindTableNode(); - default: - return 0; - } -} - -static SwTable const* -lcl_InitTable(const CursorType eType, SwStartNode const*const pStartNode) -{ - switch (eType) - { - case CURSOR_TBLTEXT: // table cell - return & pStartNode->FindTableNode()->GetTable(); - case CURSOR_SELECTION_IN_TABLE: // table - return & static_cast(pStartNode)->GetTable(); - default: - return 0; - } -} - class SwXParagraphEnumeration::Impl : public SwClient { @@ -517,16 +489,17 @@ public: Impl( uno::Reference< text::XText > const& xParent, ::std::auto_ptr pCursor, - const CursorType eType) + const CursorType eType, + SwStartNode const*const pStartNode, SwTable const*const pTable) : SwClient( pCursor.release() ) , m_xParentText( xParent ) , m_eCursorType( eType ) // remember table and start node for later travelling // (used in export of tables in tables) - , m_pOwnStartNode( lcl_InitStartNode(eType, GetCursor()) ) + , m_pOwnStartNode( pStartNode ) // for import of tables in tables we have to remember the actual // table and start node of the current position in the enumeration. - , m_pOwnTable( lcl_InitTable(eType, m_pOwnStartNode) ) + , m_pOwnTable( pTable ) , m_nEndIndex( GetCursor()->End()->nNode.GetIndex() ) , m_nFirstParaStart( -1 ) , m_nLastParaEnd( -1 ) @@ -534,6 +507,10 @@ public: { OSL_ENSURE(m_xParentText.is(), "SwXParagraphEnumeration: no parent?"); OSL_ENSURE(GetRegisteredIn(), "SwXParagraphEnumeration: no cursor?"); + OSL_ENSURE( !((CURSOR_SELECTION_IN_TABLE == eType) || + (CURSOR_TBLTEXT == eType)) + || (m_pOwnTable && m_pOwnStartNode), + "SwXParagraphEnumeration: table type but no start node or table?"); if ((CURSOR_SELECTION == m_eCursorType) || (CURSOR_SELECTION_IN_TABLE == m_eCursorType)) @@ -576,8 +553,10 @@ void SwXParagraphEnumeration::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) SwXParagraphEnumeration::SwXParagraphEnumeration( uno::Reference< text::XText > const& xParent, ::std::auto_ptr pCursor, - const CursorType eType) - : m_pImpl( new SwXParagraphEnumeration::Impl(xParent, pCursor, eType) ) + const CursorType eType, + SwStartNode const*const pStartNode, SwTable const*const pTable) + : m_pImpl( new SwXParagraphEnumeration::Impl(xParent, pCursor, eType, + pStartNode, pTable) ) { } /*-- 10.12.98 11:52:12--------------------------------------------------- diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index d94cce8a73..a6e9b8cd10 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1227,8 +1227,12 @@ uno::Reference< container::XEnumeration > SwXCell::createEnumeration(void) thro GetDoc()->CreateUnoCrsr(aPos, sal_False)); pUnoCursor->Move(fnMoveForward, fnGoNode); + // remember table and start node for later travelling + // (used in export of tables in tables) + SwTable const*const pTable( & pSttNd->FindTableNode()->GetTable() ); SwXParagraphEnumeration *const pEnum = - new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_TBLTEXT); + new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_TBLTEXT, + pSttNd, pTable); aRef = pEnum; // // no Cursor in protected sections -- cgit v1.2.3 From dc864c5e6a61a394a5265f8e8df422c5a02ccd30 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Sat, 23 Jan 2010 12:35:22 +0000 Subject: cmcfixes71: #i108597# fix uninit warnings --- sw/source/core/fields/expfld.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index d620ff9f5f..20720b2126 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -1297,7 +1297,7 @@ BOOL SwSetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId ) break; case FIELD_PROP_DOUBLE: { - double fVal; + double fVal = 0.0; rAny >>= fVal; SetValue(fVal); } -- cgit v1.2.3 From 04a0db5999add54b3dca82c9a797b37d1ca92ffb Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Mon, 25 Jan 2010 11:29:30 +0100 Subject: hb33patches01: #i105645#: applied patch --- sw/source/core/layout/tabfrm.cxx | 156 +-------------------------------------- 1 file changed, 2 insertions(+), 154 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 2041797e54..d803072e74 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -1685,62 +1685,6 @@ BOOL MA_FASTCALL lcl_InnerCalcLayout( SwFrm *pFrm, return bRet; } -void MA_FASTCALL lcl_FirstTabCalc( SwTabFrm *pTab ) -{ - SWRECTFN( pTab ) - if ( !pTab->IsFollow() && !pTab->GetTable()->IsTblComplex() ) - { - SwLayoutFrm* pRow = (SwLayoutFrm*)pTab->Lower(); - // --> FME 2006-07-17 #134526# TabFrm without a lower? Better we check - // it before crashing. However, I still don't know how this can happen! - while ( pRow ) - { - SwLayoutFrm *pCell = (SwLayoutFrm*)pRow->Lower(); - SwFrm *pCnt = pCell->Lower(); - // --> OD 2006-11-08 #i70641# - make code robust - if ( pCnt ) - { - pCnt->Calc(); - const long nCellHeight = (pCell->Frm().*fnRect->fnGetHeight)(); - const long nCellY = (pCell->Frm().*fnRect->fnGetTop)()-1; - const long nCntHeight = (pCnt->Frm().*fnRect->fnGetHeight)(); - const long nCntY = (pCnt->Frm().*fnRect->fnGetTop)()-1; - if ( 0 != (pCell = (SwLayoutFrm*)pCell->GetNext()) ) - { - do - { - (pCell->Frm().*fnRect->fnSetTopAndHeight)( nCellY, nCellHeight ); - (pCell->Prt().*fnRect->fnSetHeight)( nCellHeight ); - pCell->_InvalidateAll(); - - pCnt = pCell->Lower(); - if ( pCnt ) - { - (pCnt->Frm().*fnRect->fnSetTopAndHeight)(nCntY, nCntHeight); - (pCnt->Prt().*fnRect->fnSetHeight)( nCntHeight ); - pCnt->_InvalidateAll(); - } - - pCell = (SwLayoutFrm*)pCell->GetNext(); - } while ( pCell ); - } - - SwTwips nRowTop = (pRow->Frm().*fnRect->fnGetTop)(); - SwTwips nUpBot = (pTab->GetUpper()->Frm().*fnRect->fnGetBottom)(); - if( (*fnRect->fnYDiff)( nUpBot, nRowTop ) < 0 ) - break; - } - // <-- - pRow = (SwLayoutFrm*)pRow->GetNext(); - } - } - SwFrm *pUp = pTab->GetUpper(); - long nBottom = (pUp->*fnRect->fnGetPrtBottom)(); - if ( pTab->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ) - nBottom += pUp->Grow( LONG_MAX, TRUE ); - lcl_CalcLowers( (SwLayoutFrm*)pTab->Lower(), pTab, LONG_MAX, false ); -} - void MA_FASTCALL lcl_RecalcRow( SwRowFrm& rRow, long nBottom ) { // --> OD 2004-10-05 #i26945# - For correct appliance of the 'straightforward @@ -2151,17 +2095,13 @@ void SwTabFrm::MakeAll() if ( !bValidSize || !bValidPrtArea ) { - // HB #i101593# no optimization as it leeds to not layouting certain nested tables - // const BOOL bOptLower = (Frm().*fnRect->fnGetHeight)() == 0; - const BOOL bOptLower = FALSE; - const long nOldPrtWidth = (Prt().*fnRect->fnGetWidth)(); const long nOldFrmWidth = (Frm().*fnRect->fnGetWidth)(); const Point aOldPrtPos = (Prt().*fnRect->fnGetPos)(); Format( pAttrs ); SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout(); - if ( /*!bOptLower &&*/ pLayout && + if ( pLayout && ((Prt().*fnRect->fnGetWidth)() != nOldPrtWidth || (Frm().*fnRect->fnGetWidth)() != nOldFrmWidth) ) { @@ -2172,100 +2112,8 @@ void SwTabFrm::MakeAll() pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this ); pAttrs = pAccess->Get(); } - if ( !bOptLower && aOldPrtPos != (Prt().*fnRect->fnGetPos)() ) + if ( aOldPrtPos != (Prt().*fnRect->fnGetPos)() ) aNotify.SetLowersComplete( FALSE ); - - if ( bOptLower && Lower() ) - { - //MA 24. May. 95: Optimierungsversuch! - //Ganz nigel nagel neu das Teil. Damit wir nicht n-fach - //MakeAll'en formatieren wir flugs den Inhalt. - //Das erste Format mussten wir allerdings abwarten, damit - //die Breiten Stimmen! - //MA: Fix, Kein Calc wenn evtl. noch Seitengebunde Flys - //an den Cntnt haengen (siehe frmtool.cxx, ~SwCntntNotify). - SwDoc *pDoc = GetFmt()->GetDoc(); - if ( !pDoc->GetSpzFrmFmts()->Count() || - pDoc->IsLoaded() || pDoc->IsNewDoc() ) - { - //MA 28. Nov. 95: Und wieder ein Trick, gleich mal sehen - //ob ein Rueckfluss lohnt. - if ( bMoveable && !GetPrev() ) - { - GetLeaf( MAKEPAGE_NONE, FALSE ); //setzt das BackMoveJump - if ( SwFlowFrm::IsMoveBwdJump() ) - { - BOOL bDummy; - SwFtnBossFrm *pOldBoss = bFtnsInDoc ? - FindFtnBossFrm( TRUE ) : 0; - const BOOL bOldPrev = GetPrev() != 0; - if ( MoveBwd( bDummy ) ) - { - SWREFRESHFN( this ) - bMovedBwd = TRUE; - if ( bFtnsInDoc ) - MoveLowerFtns( 0, pOldBoss, 0, TRUE ); - - long nOldTop = (Frm().*fnRect->fnGetTop)(); - MakePos(); - if( nOldTop != (Frm().*fnRect->fnGetTop)() ) - { - SwHTMLTableLayout *pHTMLLayout = - GetTable()->GetHTMLTableLayout(); - if( pHTMLLayout ) - { - delete pAccess; - bCalcLowers |= pHTMLLayout->Resize( - pHTMLLayout->GetBrowseWidthByTabFrm( - *this ), FALSE ); - pAccess= new SwBorderAttrAccess( - SwFrm::GetCache(), this ); - pAttrs = pAccess->Get(); - } - } - - if ( bOldPrev != (0 != GetPrev()) ) - { - //Abstand nicht vergessen! - bValidPrtArea = FALSE; - Format( pAttrs ); - } - if ( bKeep && KEEPTAB ) - { - // --> OD 2005-09-28 #b6329202# - // Consider case that table is inside another - // table, because it has to be avoided, that - // superior table is formatted. - // Thus, find next content, table or section - // and, if a section is found, get its first - // content. -// SwFrm *pNxt = FindNextCnt(); -// // FindNextCnt geht ggf. in einen Bereich -// // hinein, in eine Tabelle allerdings auch -// if( pNxt && pNxt->IsInTab() ) -// pNxt = pNxt->FindTabFrm(); -// if ( pNxt ) -// { -// pNxt->Calc(); -// if ( !GetNext() ) -// bValidPos = FALSE; -// } - if ( 0 != lcl_FormatNextCntntForKeep( this ) && - !GetNext() ) - { - bValidPos = FALSE; - } - // <-- - } - } - } - } - ::lcl_FirstTabCalc( this ); - bValidSize = bValidPrtArea = FALSE; - Format( pAttrs ); - aNotify.SetLowersComplete( TRUE ); - } - } } //Wenn ich der erste einer Kette bin koennte ich mal sehen ob -- cgit v1.2.3 From b6ebd2a8c6bd66704b31d7668cf7c3e0005875d1 Mon Sep 17 00:00:00 2001 From: os Date: Mon, 25 Jan 2010 11:36:33 +0100 Subject: #i108582# strict aliasing warning fixed (cmc) --- sw/source/ui/dbui/dbinsdlg.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index c4913d65f3..1939548be6 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -1937,7 +1937,7 @@ void SwInsertDBColAutoPilot::Load() SwInsDBColumn& rSet = *aDBColumns[ n ]; for( USHORT m = 0; m < pNewData->aDBColumns.Count() ; ++m ) { - const SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ]; + SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ]; if(rGet.sColumn == rSet.sColumn) { if( rGet.bHasFmt && !rGet.bIsDBFmt ) @@ -1949,8 +1949,10 @@ void SwInsertDBColAutoPilot::Load() { xub_StrLen nCheckPos; short nType; - rNFmtr.PutEntry( (String&)rGet.sUsrNumFmt, nCheckPos, nType, + String sTmpFmt = rGet.sUsrNumFmt; + rNFmtr.PutEntry( sTmpFmt, nCheckPos, nType, rSet.nUsrNumFmt, rGet.eUsrNumFmtLng ); + rGet.sUsrNumFmt = sTmpFmt; } } break; -- cgit v1.2.3 From beaf0cdf989fdabfa8adda54e45e7316ffe08f4c Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 26 Jan 2010 15:05:10 +0100 Subject: cws tl74: #i107721# further changes to new thesaurus dialog --- sw/source/ui/uiview/viewling.cxx | 56 ++-------------------------------------- 1 file changed, 2 insertions(+), 54 deletions(-) mode change 100644 => 100755 sw/source/ui/uiview/viewling.cxx (limited to 'sw/source') diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx old mode 100644 new mode 100755 index d83498ff8d..8bb25f00d0 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -265,21 +265,9 @@ void SwView::StartTextConversion( // do not do text conversion if it is active elsewhere if (GetWrtShell().HasConvIter()) { -// MessBox( 0, WB_OK, String( SW_RES( STR_SPELL_TITLE ) ), -// String( SW_RES( STR_MULT_INTERACT_SPELL_WARN ) ) ).Execute(); return; } -/* - SfxErrorContext aContext( ERRCTX_SVX_LINGU_SPELLING, aEmptyStr, pEditWin, - RID_SVXERRCTX, DIALOG_MGR() ); - - Reference< XSpellChecker1 > xSpell = ::GetSpellChecker(); - if(!xSpell.is()) - { // keine Arme keine Kekse - ErrorHandler::HandleError( ERRCODE_SVX_LINGU_LINGUNOTEXISTS ); - return; - } -*/ + SpellKontext(sal_True); const SwViewOption* pVOpt = pWrtShell->GetViewOptions(); @@ -642,12 +630,6 @@ void SwView::StartThesaurus() sal_Bool bOldIdle = pVOpt->IsIdle(); pVOpt->SetIdle( sal_False ); -#ifdef TL_NEVER -//!!! hier mu� noch was getan werden... (Umsetzung der Funktionalitaet) - // ErrorLink setzen, alten merken - Link aOldLnk = pSpell->ChgErrorLink(LINK(this, SwView, SpellError)); -#endif - // get initial LookUp text const sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection(); String aTmp = GetThesaurusLookUpText( bSelection ); @@ -656,47 +638,13 @@ void SwView::StartThesaurus() SvxThesaurusDialog *pDlg = NULL; if ( !xThes.is() || !xThes->hasLocale( SvxCreateLocale( eLang ) ) ) - { SpellError( &eLang ); - } else { // create dialog { //Scope for SwWait-Object SwWait aWait( *GetDocShell(), sal_True ); - pDlg = new SvxThesaurusDialog( &GetEditWin(), - xThes, aTmp, eLang ); - } - - { - // Hier wird der Thesaurus-Dialog im Applikationsfenster zentriert, - // und zwar oberhalb oder unterhalb der Cursorposition, je nachdem, - // wo mehr Platz ist. - - // Current Word: - SwRect aRect( pWrtShell->GetCharRect() ); - Point aTopPos = aRect.Pos(); - Point aBtmPos( aTopPos.X(), aRect.Bottom() ); - aTopPos = GetEditWin().LogicToPixel( aTopPos ); - aTopPos = GetEditWin().OutputToScreenPixel( aTopPos ); - aBtmPos = GetEditWin().LogicToPixel( aBtmPos ); - aBtmPos = GetEditWin().OutputToScreenPixel( aBtmPos ); - // ::frame::Desktop: - Rectangle aRct = GetEditWin().GetDesktopRectPixel(); - Point aWinTop( aRct.TopLeft() ); - Point aWinBtm( aRct.BottomRight() ); - if ( aTopPos.Y() - aWinTop.Y() > aWinBtm.Y() - aBtmPos.Y() ) - aWinBtm.Y() = aTopPos.Y(); - else - aWinTop.Y() = aBtmPos.Y(); - - Size aSz = pDlg->GetSizePixel(); - if ( aWinBtm.Y() - aWinTop.Y() > aSz.Height() ) - { - aWinTop.X() = ( aWinTop.X() + aWinBtm.X() - aSz.Width() ) / 2; - aWinTop.Y() = ( aWinTop.Y() + aWinBtm.Y() - aSz.Height() ) / 2; - pDlg->SetPosPixel( aWinTop ); - } + pDlg = new SvxThesaurusDialog( &GetEditWin(), xThes, aTmp, eLang ); } if ( pDlg->Execute()== RET_OK ) -- cgit v1.2.3 From ef978565e1a2d9dff15a3cc34542069b83eef716 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Wed, 27 Jan 2010 11:51:56 +0100 Subject: aw079: #i99147# attribute rework and others --- sw/source/core/draw/dflyobj.cxx | 16 +++++----------- sw/source/ui/docvw/postit.cxx | 1 - 2 files changed, 5 insertions(+), 12 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index 1e4d252f06..fc9f7d0aea 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -71,10 +71,9 @@ using namespace ::com::sun::star; // AW: For VCOfDrawVirtObj and stuff #include #include -#include #include #include -#include +#include using namespace ::com::sun::star; @@ -249,17 +248,12 @@ namespace drawinglayer // create an invisible HitTestPrimitive to allow hitting the object. Use a filled primitive // to get a HitTest which uses 'inside' as default object hit. The special cases from // the old SwVirtFlyDrawObj::CheckHit implementation are handled now in SwDrawView::PickObj; - // this removed the 'hack' to get a view from inside model data or to react on noll-tolerance + // this removed the 'hack' to get a view from inside model data or to react on null-tolerance // as it was done in the old implementation - const basegfx::B2DPolygon aOuterRangePolygon(basegfx::tools::createPolygonFromRect(getOuterRange())); - const basegfx::BColor aColor(0.0, 0.0, 0.0); - const Primitive2DReference aContentReference( - new PolyPolygonColorPrimitive2D( - basegfx::B2DPolyPolygon(aOuterRangePolygon), - aColor)); const Primitive2DReference aHitTestReference( - new HitTestPrimitive2D( - Primitive2DSequence(&aContentReference, 1))); + createFallbackHitTestPrimitive( + true, + basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(getOuterRange())))); aRetval = Primitive2DSequence(&aHitTestReference, 1); } diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx index 8972b68f2d..2fbf9c6c48 100644 --- a/sw/source/ui/docvw/postit.cxx +++ b/sw/source/ui/docvw/postit.cxx @@ -120,7 +120,6 @@ #include #include -#include #include #include #include -- cgit v1.2.3 From 05ccfde8aed5a4c3a167d2f39675d8bb3e202b1e Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 28 Jan 2010 17:21:44 +0100 Subject: aw079: #i99147# corrected diverse aspects of invisible object visualisation and interaction --- sw/inc/dcontact.hxx | 2 +- sw/source/core/draw/dflyobj.cxx | 11 +++++------ sw/source/core/inc/dflyobj.hxx | 5 ++++- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx index 8860f0e38f..a5c1dd4b60 100644 --- a/sw/inc/dcontact.hxx +++ b/sw/inc/dcontact.hxx @@ -305,7 +305,7 @@ class SwDrawVirtObj : public SdrVirtObj using SdrVirtObj::GetPlusHdl; - private: + protected: // AW: Need own sdr::contact::ViewContact since AnchorPos from parent is // not used but something own (top left of new SnapRect minus top left // of original SnapRect) diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index fc9f7d0aea..a48dd21a55 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -72,8 +72,7 @@ using namespace ::com::sun::star; #include #include #include -#include -#include +#include using namespace ::com::sun::star; @@ -245,15 +244,15 @@ namespace drawinglayer if(!getOuterRange().isEmpty()) { // currently this SW object has no primitive representation. As long as this is the case, - // create an invisible HitTestPrimitive to allow hitting the object. Use a filled primitive - // to get a HitTest which uses 'inside' as default object hit. The special cases from + // create invisible geometry to allow corfect HitTest and BoundRect calculations for the + // object. Use a filled primitive to get 'inside' as default object hit. The special cases from // the old SwVirtFlyDrawObj::CheckHit implementation are handled now in SwDrawView::PickObj; // this removed the 'hack' to get a view from inside model data or to react on null-tolerance // as it was done in the old implementation const Primitive2DReference aHitTestReference( - createFallbackHitTestPrimitive( + createHiddenGeometryPrimitives2D( true, - basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(getOuterRange())))); + getOuterRange())); aRetval = Primitive2DSequence(&aHitTestReference, 1); } diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx index 7f178d3ae8..468374108d 100644 --- a/sw/source/core/inc/dflyobj.hxx +++ b/sw/source/core/inc/dflyobj.hxx @@ -47,8 +47,10 @@ const UINT16 SwDrawFirst = 0x0001; class SwFlyDrawObj : public SdrObject { +private: virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); +protected: // #i95264# SwFlyDrawObj needs an own VC since createViewIndependentPrimitive2DSequence() // is called when RecalcBoundRect() is used virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); @@ -73,9 +75,10 @@ public: class SwVirtFlyDrawObj : public SdrVirtObj { +private: SwFlyFrm *pFlyFrm; -private: +protected: // AW: Need own sdr::contact::ViewContact since AnchorPos from parent is // not used but something own (top left of new SnapRect minus top left // of original SnapRect) -- cgit v1.2.3 From f34ac74e7de20dcdc24b547a7187c512397e33a1 Mon Sep 17 00:00:00 2001 From: Oliver Specht Date: Fri, 29 Jan 2010 15:14:32 +0000 Subject: #i108426# missing increment added --- sw/source/core/unocore/unostyle.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 979d542a75..e9c4872f9e 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1258,6 +1258,7 @@ sal_Bool SwStyleProperties_Impl::GetProperty(const ::rtl::OUString& rName, uno:: bRet = sal_True; break; } + ++nPos; ++aIt; } -- cgit v1.2.3 From efd9c790335b9ca9fbc0c68b748b4934267442ef Mon Sep 17 00:00:00 2001 From: Malte Timmermann Date: Mon, 1 Feb 2010 16:39:07 +0100 Subject: mtaccfixes: #110498# Enable zoom in preview even if AT support is turned on --- sw/source/ui/uiview/pview.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 0f09427a72..6228dc4cf6 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -1569,7 +1569,8 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) ASSERT(nWhich, leeres Set); SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout(); //#106746# zoom has to be disabled if Accessibility support is switched on - BOOL bZoomEnabled = !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport(); + // MT 2010/01, see #110498# + BOOL bZoomEnabled = TRUE; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport(); while(nWhich) { -- cgit v1.2.3 From 34c7926559f16a774b8921547d7b7ba3c3d1dccd Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 1 Feb 2010 17:03:02 +0100 Subject: ppp02: #i108649# fix accelerator --- sw/source/ui/config/optdlg.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src index 7170cbb247..56ce65f158 100755 --- a/sw/source/ui/config/optdlg.src +++ b/sw/source/ui/config/optdlg.src @@ -955,7 +955,7 @@ StringArray STR_PRINTOPTUI < "Contents"; >; < "Page ba~ckground"; >; < "Specifies whether to include colors and objects that are inserted to the background of the page (Format - Page - Background) in the printed document."; >; - < "~Pictures and objects"; >; + < "P~ictures and objects"; >; < "Specifies whether the graphics and drawing or OLE objects of your text document are printed"; >; < "Hidden te~xt"; >; < "Enable this option to print text that is marked as hidden."; >; -- cgit v1.2.3 From e1f612ea66216eac2d61ee4c972506b7528e2d1a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 1 Feb 2010 21:32:33 +0100 Subject: autorecovery: more sophisticated configuration data for interaction handlers The generic css.task.InteractionHandler implementation in module uui is now able to instantiate "sub handlers", i.e. components to delegate a request to, based on the type of the request, and some configuration data. The "old" (and now deprecated) configuration scheme at org.openoffice.ucb.InteractionHandler did not contain type information, so any handlers registered there were always called when no default implementation for a given request was available. The "new" configuration scheme at org.openoffice.Interaction contains UNO type information. That is, a given handler implementation can declare itself responsible for an arbitrary set of UNO types, and for each of those types, whether it is also responsible for sub types. The generic interaction handler implementation uses this configuration data, when it encounteres an interaction request it cannot fullfill itself, to instantiate a component to delegate the request to. As with the "old" data, such a component is required to support the css.task.XInteractionHandler2 interface. Also, if it supports css.lang.XInitialization, then it will be initialized with a name-value pair, the name being "Parent", the value being the XWindow interface of the parent window for any message boxes. As an examplary implementation for this feature, the css.sdb.InteractionHandler has been deprecated. Now the css.sdb.DatabaseInteractionHandler is reponsible for database-related interactions, and the new configuration scheme is pre-filled with data assigning this responsibility. Consequently, a lot of places previously creating an css.sdb.InteractionHandler have been modified to create the default css.task.InteractionHandler. --- sw/source/ui/dbui/addresslistdialog.cxx | 2 +- sw/source/ui/dbui/dbmgr.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index ec8ad0dc14..858a4b5a63 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -583,7 +583,7 @@ void SwAddressListDialog::DetectTablesAndQueries( uno::Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); uno::Reference< XInteractionHandler > xHandler( - xMgr->createInstance( C2U( "com.sun.star.sdb.InteractionHandler" )), UNO_QUERY); + xMgr->createInstance( C2U( "com.sun.star.task.InteractionHandler" )), UNO_QUERY); pUserData->xConnection = SharedConnection( xComplConnection->connectWithCompletion( xHandler ) ); } if(pUserData->xConnection.is()) diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index a2c3bd3971..a124aa6c1a 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1949,7 +1949,7 @@ uno::Reference< sdbc::XConnection> SwNewDBMgr::GetConnection(const String& rData { rxSource.set(xComplConnection,UNO_QUERY); Reference< XInteractionHandler > xHandler( - xMgr->createInstance( C2U( "com.sun.star.sdb.InteractionHandler" )), UNO_QUERY); + xMgr->createInstance( C2U( "com.sun.star.task.InteractionHandler" )), UNO_QUERY); xConnection = xComplConnection->connectWithCompletion( xHandler ); } } @@ -3100,7 +3100,7 @@ uno::Reference SwNewDBMgr::createCursor(const ::rtl::OUString& _sDat if ( xRowSet.is() ) { - uno::Reference< XInteractionHandler > xHandler(xMgr->createInstance(C2U("com.sun.star.sdb.InteractionHandler")), UNO_QUERY); + uno::Reference< XInteractionHandler > xHandler(xMgr->createInstance(C2U("com.sun.star.task.InteractionHandler")), UNO_QUERY); xRowSet->executeWithCompletion(xHandler); } xResultSet = uno::Reference(xRowSet, UNO_QUERY); -- cgit v1.2.3 From 2da170c8e3eafc01cbede9ced2c787236fb51d22 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 2 Feb 2010 09:46:49 +0100 Subject: errorneously added file removed --- sw/source/filter/ww8/docxexport.cxx | 29 ++++++++++++++++++++--------- sw/source/filter/ww8/docxexport.hxx | 5 +++-- sw/source/filter/ww8/docxexportfilter.cxx | 2 +- sw/source/filter/ww8/docxexportfilter.hxx | 4 ++-- sw/source/filter/ww8/makefile.mk | 4 ++++ sw/source/filter/ww8/wrtw8sty.cxx | 4 ---- sw/source/filter/ww8/wrtww8.hxx | 4 ---- sw/util/makefile.mk | 2 ++ sw/util/msword.map | 7 +++++-- 9 files changed, 37 insertions(+), 24 deletions(-) mode change 100755 => 100644 sw/util/msword.map (limited to 'sw/source') diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 694f75a18c..b66b059b6e 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -315,7 +315,7 @@ bool DocxExport::DisallowInheritingOutlineNumbering( const SwFmt& rFmt ) } void DocxExport::WriteHeadersFooters( BYTE nHeadFootFlags, - const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt ) + const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE /*nBreakCode*/ ) { // headers if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_EVEN ) @@ -336,6 +336,10 @@ void DocxExport::WriteHeadersFooters( BYTE nHeadFootFlags, if ( nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_FIRST ) WriteHeaderFooter( rFirstPageFmt, false, "first" ); + +#if OSL_DEBUG_LEVEL > 0 + fprintf( stderr, "DocxExport::WriteHeadersFooters() - nBreakCode introduced, but ignored\n" ); +#endif } void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, BYTE nMode ) @@ -350,6 +354,13 @@ void DocxExport::WriteFormData( const ::sw::mark::IFieldmark& /*rFieldmark*/ ) #endif } +void DocxExport::WriteHyperlinkData( const ::sw::mark::IFieldmark& /*rFieldmark*/ ) +{ +#if OSL_DEBUG_LEVEL > 0 + fprintf( stderr, "TODO DocxExport::WriteHyperlinkData()\n" ); +#endif +} + void DocxExport::DoComboBox(const rtl::OUString& rName, const rtl::OUString& rHelp, const rtl::OUString& rToolTip, @@ -543,7 +554,7 @@ void DocxExport::InitStyles() S( "styles.xml" ) ); ::sax_fastparser::FSHelperPtr pStylesFS = - m_pFilter->openOutputStreamWithSerializer( S( "word/styles.xml" ), + m_pFilter->openFragmentStreamWithSerializer( S( "word/styles.xml" ), S( "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml" ) ); // switch the serializer to redirect the output to word/styles.xml @@ -566,7 +577,7 @@ void DocxExport::WriteFootnotesEndnotes() S( "footnotes.xml" ) ); ::sax_fastparser::FSHelperPtr pFootnotesFS = - m_pFilter->openOutputStreamWithSerializer( S( "word/footnotes.xml" ), + m_pFilter->openFragmentStreamWithSerializer( S( "word/footnotes.xml" ), S( "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml" ) ); // switch the serializer to redirect the output to word/footnotes.xml @@ -587,7 +598,7 @@ void DocxExport::WriteFootnotesEndnotes() S( "endnotes.xml" ) ); ::sax_fastparser::FSHelperPtr pEndnotesFS = - m_pFilter->openOutputStreamWithSerializer( S( "word/endnotes.xml" ), + m_pFilter->openFragmentStreamWithSerializer( S( "word/endnotes.xml" ), S( "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml" ) ); // switch the serializer to redirect the output to word/endnotes.xml @@ -610,7 +621,7 @@ void DocxExport::WriteNumbering() S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering" ), S( "numbering.xml" ) ); - ::sax_fastparser::FSHelperPtr pNumberingFS = m_pFilter->openOutputStreamWithSerializer( S( "word/numbering.xml" ), + ::sax_fastparser::FSHelperPtr pNumberingFS = m_pFilter->openFragmentStreamWithSerializer( S( "word/numbering.xml" ), S( "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml" ) ); // switch the serializer to redirect the output to word/nubering.xml @@ -643,7 +654,7 @@ void DocxExport::WriteHeaderFooter( const SwFmt& rFmt, bool bHeader, const char* S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" ), aName ); - pFS = m_pFilter->openOutputStreamWithSerializer( OUStringBuffer().appendAscii( "word/" ).append( aName ).makeStringAndClear(), + pFS = m_pFilter->openFragmentStreamWithSerializer( OUStringBuffer().appendAscii( "word/" ).append( aName ).makeStringAndClear(), S( "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml" ) ); pFS->startElementNS( XML_w, XML_hdr, @@ -658,7 +669,7 @@ void DocxExport::WriteHeaderFooter( const SwFmt& rFmt, bool bHeader, const char* S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" ), aName ); - pFS = m_pFilter->openOutputStreamWithSerializer( OUStringBuffer().appendAscii( "word/" ).append( aName ).makeStringAndClear(), + pFS = m_pFilter->openFragmentStreamWithSerializer( OUStringBuffer().appendAscii( "word/" ).append( aName ).makeStringAndClear(), S( "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml" ) ); pFS->startElementNS( XML_w, XML_ftr, @@ -701,7 +712,7 @@ void DocxExport::WriteFonts() S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" ), S( "fontTable.xml" ) ); - ::sax_fastparser::FSHelperPtr pFS = m_pFilter->openOutputStreamWithSerializer( + ::sax_fastparser::FSHelperPtr pFS = m_pFilter->openFragmentStreamWithSerializer( S( "word/fontTable.xml" ), S( "application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml" ) ); @@ -789,7 +800,7 @@ DocxExport::DocxExport( DocxExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCur S( "word/document.xml" ) ); // the actual document - m_pDocumentFS = m_pFilter->openOutputStreamWithSerializer( S( "word/document.xml" ), + m_pDocumentFS = m_pFilter->openFragmentStreamWithSerializer( S( "word/document.xml" ), S( "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml" ) ); // the DrawingML access diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index 5b4031992e..183b1f3803 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -116,7 +116,7 @@ public: /// Output the actual headers and footers. virtual void WriteHeadersFooters( BYTE nHeadFootFlags, - const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt ); + const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE nBreakCode ); /// Write the field virtual void OutputField( const SwField* pFld, ww::eField eFldType, @@ -124,6 +124,7 @@ public: /// Write the data of the form field virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ); + virtual void WriteHyperlinkData( const ::sw::mark::IFieldmark& rFieldmark ); virtual void DoComboBox(const rtl::OUString &rName, const rtl::OUString &rHelp, @@ -157,7 +158,7 @@ protected: virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum ); - virtual void SectionBreaksAndFrames( const SwTxtNode& rNode ) {} + virtual void SectionBreaksAndFrames( const SwTxtNode& /*rNode*/ ) {} /// Get ready for a new section. virtual void PrepareNewPageDesc( const SfxItemSet* pSet, diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index 990b6e7306..c6995f05c4 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -79,7 +79,7 @@ bool DocxExportFilter::exportDocument() aExport.ExportDocument( true ); // FIXME support exporting selection only } - commit(); + commitStorage(); // delete the pCurPam if ( pCurPam ) diff --git a/sw/source/filter/ww8/docxexportfilter.hxx b/sw/source/filter/ww8/docxexportfilter.hxx index e1e6fde181..c308de21d9 100644 --- a/sw/source/filter/ww8/docxexportfilter.hxx +++ b/sw/source/filter/ww8/docxexportfilter.hxx @@ -33,7 +33,7 @@ #include #include -#include +#include #include @@ -48,7 +48,7 @@ public: virtual bool importDocument() { return false; } virtual const ::oox::drawingml::Theme* getCurrentTheme() const { return NULL; } virtual sal_Int32 getSchemeClr( sal_Int32 ) const { return 0; } - virtual const ::oox::vml::DrawingPtr getDrawings() { return ::oox::vml::DrawingPtr(); } + virtual ::oox::vml::Drawing* getVmlDrawing() { return NULL; } virtual ::oox::drawingml::chart::ChartConverter& getChartConverter() { static ::oox::drawingml::chart::ChartConverter aConverter; return aConverter; } virtual const ::oox::drawingml::table::TableStyleListPtr getTableStyles() { return ::oox::drawingml::table::TableStyleListPtr(); } diff --git a/sw/source/filter/ww8/makefile.mk b/sw/source/filter/ww8/makefile.mk index 164a8fef28..e7cdba51bf 100644 --- a/sw/source/filter/ww8/makefile.mk +++ b/sw/source/filter/ww8/makefile.mk @@ -62,6 +62,7 @@ EXCEPTIONSFILES = \ $(SLO)$/wrtw8num.obj \ $(SLO)$/wrtw8sty.obj \ $(SLO)$/wrtww8.obj \ + $(SLO)$/docxexportfilter.obj \ $(SLO)$/ww8atr.obj \ $(SLO)$/ww8par.obj \ $(SLO)$/ww8par6.obj \ @@ -81,6 +82,9 @@ SLOFILES = \ $(SLO)$/wrtw8sty.obj \ $(SLO)$/wrtww8.obj \ $(SLO)$/wrtww8gr.obj \ + $(SLO)$/docxattributeoutput.obj \ + $(SLO)$/docxexportfilter.obj \ + $(SLO)$/docxexport.obj \ $(SLO)$/ww8atr.obj \ $(SLO)$/ww8graf.obj \ $(SLO)$/ww8graf2.obj \ diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index e2caca9f01..13d6410558 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -698,7 +698,6 @@ bool wwFont::Write(SvStream *pTableStrm) const return true; } -#ifdef DOCX void wwFont::WriteDocx( const DocxAttributeOutput* rAttrOutput ) const { // no font embedding, panose id, subsetting, ... implemented @@ -713,7 +712,6 @@ void wwFont::WriteDocx( const DocxAttributeOutput* rAttrOutput ) const rAttrOutput->EndFont(); } -#endif bool operator<(const wwFont &r1, const wwFont &r2) { @@ -831,7 +829,6 @@ void wwFontHelper::WriteFontTable(SvStream *pTableStream, WW8Fib& rFib) } } -#ifdef DOCX void wwFontHelper::WriteFontTable( const DocxAttributeOutput& rAttrOutput ) { ::std::vector aFontList( AsVector() ); @@ -839,7 +836,6 @@ void wwFontHelper::WriteFontTable( const DocxAttributeOutput& rAttrOutput ) ::std::for_each( aFontList.begin(), aFontList.end(), ::std::bind2nd( ::std::mem_fun( &wwFont::WriteDocx ), &rAttrOutput ) ); } -#endif /* */ diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index dee667b1a1..704c9c0caa 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -296,9 +296,7 @@ public: wwFont( const String &rFamilyName, FontPitch ePitch, FontFamily eFamily, rtl_TextEncoding eChrSet, bool bWrtWW8 ); bool Write( SvStream *pTableStram ) const; -#ifdef DOCX void WriteDocx( const DocxAttributeOutput* rAttrOutput ) const; -#endif rtl::OUString GetFamilyName() const { return rtl::OUString( msFamilyNm ); } friend bool operator < (const wwFont &r1, const wwFont &r2); }; @@ -321,9 +319,7 @@ public: USHORT GetId(const SvxFontItem& rFont); USHORT GetId(const wwFont& rFont); void WriteFontTable( SvStream *pTableStream, WW8Fib& pFib ); -#ifdef DOCX void WriteFontTable( const DocxAttributeOutput& rAttrOutput ); -#endif }; class DrawObj diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk index 55aaf0f935..d6ab00d842 100644 --- a/sw/util/makefile.mk +++ b/sw/util/makefile.mk @@ -319,6 +319,8 @@ DEF4NAME=$(SHL4TARGET) SHL4STDLIBS= \ $(ISWLIB) \ + $(OOXLIB) \ + $(SAXLIB) \ $(SVXCORELIB) \ $(EDITENGLIB) \ $(MSFILTERLIB) \ diff --git a/sw/util/msword.map b/sw/util/msword.map old mode 100755 new mode 100644 index db60fc5ce8..5ea6fde2f3 --- a/sw/util/msword.map +++ b/sw/util/msword.map @@ -4,8 +4,11 @@ MSWORD_1_0 { ExportRTF; ImportDOC; ExportDOC; - SaveOrDelMSVBAStorage_ww8; - GetSaveWarningOfMSVBAStorage_ww8; + component_getImplementationEnvironment; + component_writeInfo; + component_getFactory; + SaveOrDelMSVBAStorage_ww8; + GetSaveWarningOfMSVBAStorage_ww8; local: *; }; -- cgit v1.2.3 From 57a08b00bf1783351625d30f0189f4e8d302e9c6 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 2 Feb 2010 09:51:58 +0100 Subject: rollback last change --- sw/source/filter/ww8/docxexport.cxx | 29 +++++++++-------------------- sw/source/filter/ww8/docxexport.hxx | 5 ++--- sw/source/filter/ww8/docxexportfilter.cxx | 2 +- sw/source/filter/ww8/docxexportfilter.hxx | 4 ++-- sw/source/filter/ww8/makefile.mk | 4 ---- sw/source/filter/ww8/wrtw8sty.cxx | 4 ++++ sw/source/filter/ww8/wrtww8.hxx | 4 ++++ sw/util/makefile.mk | 2 -- sw/util/msword.map | 7 ++----- 9 files changed, 24 insertions(+), 37 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index b66b059b6e..694f75a18c 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -315,7 +315,7 @@ bool DocxExport::DisallowInheritingOutlineNumbering( const SwFmt& rFmt ) } void DocxExport::WriteHeadersFooters( BYTE nHeadFootFlags, - const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE /*nBreakCode*/ ) + const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt ) { // headers if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_EVEN ) @@ -336,10 +336,6 @@ void DocxExport::WriteHeadersFooters( BYTE nHeadFootFlags, if ( nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_FIRST ) WriteHeaderFooter( rFirstPageFmt, false, "first" ); - -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "DocxExport::WriteHeadersFooters() - nBreakCode introduced, but ignored\n" ); -#endif } void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, BYTE nMode ) @@ -354,13 +350,6 @@ void DocxExport::WriteFormData( const ::sw::mark::IFieldmark& /*rFieldmark*/ ) #endif } -void DocxExport::WriteHyperlinkData( const ::sw::mark::IFieldmark& /*rFieldmark*/ ) -{ -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxExport::WriteHyperlinkData()\n" ); -#endif -} - void DocxExport::DoComboBox(const rtl::OUString& rName, const rtl::OUString& rHelp, const rtl::OUString& rToolTip, @@ -554,7 +543,7 @@ void DocxExport::InitStyles() S( "styles.xml" ) ); ::sax_fastparser::FSHelperPtr pStylesFS = - m_pFilter->openFragmentStreamWithSerializer( S( "word/styles.xml" ), + m_pFilter->openOutputStreamWithSerializer( S( "word/styles.xml" ), S( "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml" ) ); // switch the serializer to redirect the output to word/styles.xml @@ -577,7 +566,7 @@ void DocxExport::WriteFootnotesEndnotes() S( "footnotes.xml" ) ); ::sax_fastparser::FSHelperPtr pFootnotesFS = - m_pFilter->openFragmentStreamWithSerializer( S( "word/footnotes.xml" ), + m_pFilter->openOutputStreamWithSerializer( S( "word/footnotes.xml" ), S( "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml" ) ); // switch the serializer to redirect the output to word/footnotes.xml @@ -598,7 +587,7 @@ void DocxExport::WriteFootnotesEndnotes() S( "endnotes.xml" ) ); ::sax_fastparser::FSHelperPtr pEndnotesFS = - m_pFilter->openFragmentStreamWithSerializer( S( "word/endnotes.xml" ), + m_pFilter->openOutputStreamWithSerializer( S( "word/endnotes.xml" ), S( "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml" ) ); // switch the serializer to redirect the output to word/endnotes.xml @@ -621,7 +610,7 @@ void DocxExport::WriteNumbering() S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering" ), S( "numbering.xml" ) ); - ::sax_fastparser::FSHelperPtr pNumberingFS = m_pFilter->openFragmentStreamWithSerializer( S( "word/numbering.xml" ), + ::sax_fastparser::FSHelperPtr pNumberingFS = m_pFilter->openOutputStreamWithSerializer( S( "word/numbering.xml" ), S( "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml" ) ); // switch the serializer to redirect the output to word/nubering.xml @@ -654,7 +643,7 @@ void DocxExport::WriteHeaderFooter( const SwFmt& rFmt, bool bHeader, const char* S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" ), aName ); - pFS = m_pFilter->openFragmentStreamWithSerializer( OUStringBuffer().appendAscii( "word/" ).append( aName ).makeStringAndClear(), + pFS = m_pFilter->openOutputStreamWithSerializer( OUStringBuffer().appendAscii( "word/" ).append( aName ).makeStringAndClear(), S( "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml" ) ); pFS->startElementNS( XML_w, XML_hdr, @@ -669,7 +658,7 @@ void DocxExport::WriteHeaderFooter( const SwFmt& rFmt, bool bHeader, const char* S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" ), aName ); - pFS = m_pFilter->openFragmentStreamWithSerializer( OUStringBuffer().appendAscii( "word/" ).append( aName ).makeStringAndClear(), + pFS = m_pFilter->openOutputStreamWithSerializer( OUStringBuffer().appendAscii( "word/" ).append( aName ).makeStringAndClear(), S( "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml" ) ); pFS->startElementNS( XML_w, XML_ftr, @@ -712,7 +701,7 @@ void DocxExport::WriteFonts() S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" ), S( "fontTable.xml" ) ); - ::sax_fastparser::FSHelperPtr pFS = m_pFilter->openFragmentStreamWithSerializer( + ::sax_fastparser::FSHelperPtr pFS = m_pFilter->openOutputStreamWithSerializer( S( "word/fontTable.xml" ), S( "application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml" ) ); @@ -800,7 +789,7 @@ DocxExport::DocxExport( DocxExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCur S( "word/document.xml" ) ); // the actual document - m_pDocumentFS = m_pFilter->openFragmentStreamWithSerializer( S( "word/document.xml" ), + m_pDocumentFS = m_pFilter->openOutputStreamWithSerializer( S( "word/document.xml" ), S( "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml" ) ); // the DrawingML access diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index 183b1f3803..5b4031992e 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -116,7 +116,7 @@ public: /// Output the actual headers and footers. virtual void WriteHeadersFooters( BYTE nHeadFootFlags, - const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE nBreakCode ); + const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt ); /// Write the field virtual void OutputField( const SwField* pFld, ww::eField eFldType, @@ -124,7 +124,6 @@ public: /// Write the data of the form field virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ); - virtual void WriteHyperlinkData( const ::sw::mark::IFieldmark& rFieldmark ); virtual void DoComboBox(const rtl::OUString &rName, const rtl::OUString &rHelp, @@ -158,7 +157,7 @@ protected: virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum ); - virtual void SectionBreaksAndFrames( const SwTxtNode& /*rNode*/ ) {} + virtual void SectionBreaksAndFrames( const SwTxtNode& rNode ) {} /// Get ready for a new section. virtual void PrepareNewPageDesc( const SfxItemSet* pSet, diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index c6995f05c4..990b6e7306 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -79,7 +79,7 @@ bool DocxExportFilter::exportDocument() aExport.ExportDocument( true ); // FIXME support exporting selection only } - commitStorage(); + commit(); // delete the pCurPam if ( pCurPam ) diff --git a/sw/source/filter/ww8/docxexportfilter.hxx b/sw/source/filter/ww8/docxexportfilter.hxx index c308de21d9..e1e6fde181 100644 --- a/sw/source/filter/ww8/docxexportfilter.hxx +++ b/sw/source/filter/ww8/docxexportfilter.hxx @@ -33,7 +33,7 @@ #include #include -#include +#include #include @@ -48,7 +48,7 @@ public: virtual bool importDocument() { return false; } virtual const ::oox::drawingml::Theme* getCurrentTheme() const { return NULL; } virtual sal_Int32 getSchemeClr( sal_Int32 ) const { return 0; } - virtual ::oox::vml::Drawing* getVmlDrawing() { return NULL; } + virtual const ::oox::vml::DrawingPtr getDrawings() { return ::oox::vml::DrawingPtr(); } virtual ::oox::drawingml::chart::ChartConverter& getChartConverter() { static ::oox::drawingml::chart::ChartConverter aConverter; return aConverter; } virtual const ::oox::drawingml::table::TableStyleListPtr getTableStyles() { return ::oox::drawingml::table::TableStyleListPtr(); } diff --git a/sw/source/filter/ww8/makefile.mk b/sw/source/filter/ww8/makefile.mk index e7cdba51bf..164a8fef28 100644 --- a/sw/source/filter/ww8/makefile.mk +++ b/sw/source/filter/ww8/makefile.mk @@ -62,7 +62,6 @@ EXCEPTIONSFILES = \ $(SLO)$/wrtw8num.obj \ $(SLO)$/wrtw8sty.obj \ $(SLO)$/wrtww8.obj \ - $(SLO)$/docxexportfilter.obj \ $(SLO)$/ww8atr.obj \ $(SLO)$/ww8par.obj \ $(SLO)$/ww8par6.obj \ @@ -82,9 +81,6 @@ SLOFILES = \ $(SLO)$/wrtw8sty.obj \ $(SLO)$/wrtww8.obj \ $(SLO)$/wrtww8gr.obj \ - $(SLO)$/docxattributeoutput.obj \ - $(SLO)$/docxexportfilter.obj \ - $(SLO)$/docxexport.obj \ $(SLO)$/ww8atr.obj \ $(SLO)$/ww8graf.obj \ $(SLO)$/ww8graf2.obj \ diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 13d6410558..e2caca9f01 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -698,6 +698,7 @@ bool wwFont::Write(SvStream *pTableStrm) const return true; } +#ifdef DOCX void wwFont::WriteDocx( const DocxAttributeOutput* rAttrOutput ) const { // no font embedding, panose id, subsetting, ... implemented @@ -712,6 +713,7 @@ void wwFont::WriteDocx( const DocxAttributeOutput* rAttrOutput ) const rAttrOutput->EndFont(); } +#endif bool operator<(const wwFont &r1, const wwFont &r2) { @@ -829,6 +831,7 @@ void wwFontHelper::WriteFontTable(SvStream *pTableStream, WW8Fib& rFib) } } +#ifdef DOCX void wwFontHelper::WriteFontTable( const DocxAttributeOutput& rAttrOutput ) { ::std::vector aFontList( AsVector() ); @@ -836,6 +839,7 @@ void wwFontHelper::WriteFontTable( const DocxAttributeOutput& rAttrOutput ) ::std::for_each( aFontList.begin(), aFontList.end(), ::std::bind2nd( ::std::mem_fun( &wwFont::WriteDocx ), &rAttrOutput ) ); } +#endif /* */ diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 704c9c0caa..dee667b1a1 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -296,7 +296,9 @@ public: wwFont( const String &rFamilyName, FontPitch ePitch, FontFamily eFamily, rtl_TextEncoding eChrSet, bool bWrtWW8 ); bool Write( SvStream *pTableStram ) const; +#ifdef DOCX void WriteDocx( const DocxAttributeOutput* rAttrOutput ) const; +#endif rtl::OUString GetFamilyName() const { return rtl::OUString( msFamilyNm ); } friend bool operator < (const wwFont &r1, const wwFont &r2); }; @@ -319,7 +321,9 @@ public: USHORT GetId(const SvxFontItem& rFont); USHORT GetId(const wwFont& rFont); void WriteFontTable( SvStream *pTableStream, WW8Fib& pFib ); +#ifdef DOCX void WriteFontTable( const DocxAttributeOutput& rAttrOutput ); +#endif }; class DrawObj diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk index d6ab00d842..55aaf0f935 100644 --- a/sw/util/makefile.mk +++ b/sw/util/makefile.mk @@ -319,8 +319,6 @@ DEF4NAME=$(SHL4TARGET) SHL4STDLIBS= \ $(ISWLIB) \ - $(OOXLIB) \ - $(SAXLIB) \ $(SVXCORELIB) \ $(EDITENGLIB) \ $(MSFILTERLIB) \ diff --git a/sw/util/msword.map b/sw/util/msword.map index 5ea6fde2f3..db60fc5ce8 100644 --- a/sw/util/msword.map +++ b/sw/util/msword.map @@ -4,11 +4,8 @@ MSWORD_1_0 { ExportRTF; ImportDOC; ExportDOC; - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - SaveOrDelMSVBAStorage_ww8; - GetSaveWarningOfMSVBAStorage_ww8; + SaveOrDelMSVBAStorage_ww8; + GetSaveWarningOfMSVBAStorage_ww8; local: *; }; -- cgit v1.2.3 From 7becd5d52df7beac52b66c72bd8f340c1d99c789 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 2 Feb 2010 11:22:51 +0100 Subject: ppp02: #i108824# string updates --- starmath/source/smres.src | 2 +- sw/source/ui/config/optdlg.src | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/starmath/source/smres.src b/starmath/source/smres.src index 841c5746b9..7143c62526 100644 --- a/starmath/source/smres.src +++ b/starmath/source/smres.src @@ -3586,7 +3586,7 @@ StringArray RID_PRINTUIOPTIONS { < "%PRODUCTNAME %s"; >; < "Contents"; >; - < "~Title row"; >; + < "~Title"; >; < "Specifies whether you want the name of the document to be included in the printout"; >; < "~Formula text"; >; < "Specifies whether to include the contents of the \"Commands\" window at the bottom of the printout."; >; diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src index 7170cbb247..bcad734090 100755 --- a/sw/source/ui/config/optdlg.src +++ b/sw/source/ui/config/optdlg.src @@ -955,11 +955,11 @@ StringArray STR_PRINTOPTUI < "Contents"; >; < "Page ba~ckground"; >; < "Specifies whether to include colors and objects that are inserted to the background of the page (Format - Page - Background) in the printed document."; >; - < "~Pictures and objects"; >; + < "~Pictures and graphic objects"; >; < "Specifies whether the graphics and drawing or OLE objects of your text document are printed"; >; < "Hidden te~xt"; >; < "Enable this option to print text that is marked as hidden."; >; - < "~Text placeholder"; >; + < "~Text placeholders"; >; < "Enable this option to print text placeholders. Disable this option to leave the text placeholders blank in the printout."; >; < "Form control~s"; >; < "Specifies whether the form control fields of the text document are printed"; >; @@ -988,7 +988,7 @@ StringArray STR_PRINTOPTUI < "Select the Brochure option to print the document in brochure format."; >; < "Left-to-right script"; >; < "Right-to-left script"; >; - < "Ranges and copies"; >; + < "Range and copies"; >; < "~All pages"; >; < "Print the whole document."; >; < "Pa~ges"; >; -- cgit v1.2.3 From b38c796f8265edc2728e57a0b7accf294fb71b4f Mon Sep 17 00:00:00 2001 From: os Date: Tue, 2 Feb 2010 13:46:50 +0100 Subject: #i108736# acces to TableBorder: find top/left bottom/right cell --- sw/source/core/unocore/unotbl.cxx | 48 +++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 7 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index df3c089dcb..265f61eda6 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -498,6 +498,40 @@ String lcl_GetCellName( sal_Int32 nColumn, sal_Int32 nRow ) return sCellName; } +/** Find the top left or bottom right corner box in given table. + Consider nested lines when finding the box. + + @param i_pTable the table + + @param i_bTopLeft if true, find top left box, otherwise find bottom + right box + */ + +const SwTableBox* lcl_FindCornerTableBox(const SwTableLines& rTableLines, const bool i_bTopLeft) +{ + bool bFirst = true; + const SwTableBox* pBox = 0; + do + { + const SwTableLines& rLines(bFirst ? rTableLines : pBox->GetTabLines()); + bFirst = false; + OSL_ASSERT(rLines.Count() != 0); + if (rLines.Count() != 0) + { + const SwTableLine* pLine(rLines[i_bTopLeft ? 0 : rLines.Count() - 1]); + OSL_ASSERT(pLine); + const SwTableBoxes& rBoxes(pLine->GetTabBoxes()); + OSL_ASSERT(rBoxes.Count() != 0); + pBox = rBoxes[i_bTopLeft ? 0 : rBoxes.Count() - 1]; + OSL_ASSERT(pBox); + } + else + { + pBox = 0; + } + } while (pBox && !pBox->GetSttNd()); + return pBox; +} /* -----------------21.11.05 14:46------------------- @@ -3306,7 +3340,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, // hier muessen die Actions aufgehoben werden UnoActionRemoveContext aRemoveContext(pDoc); - SwTableBox* pTLBox = rLines[0]->GetTabBoxes()[0]; + const SwTableBox* pTLBox = lcl_FindCornerTableBox(rLines, true); const SwStartNode* pSttNd = pTLBox->GetSttNd(); SwPosition aPos(*pSttNd); // Cursor in die obere linke Zelle des Ranges setzen @@ -3316,7 +3350,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, SwTableLine* pLastLine = rLines[rLines.Count() - 1]; SwTableBoxes &rBoxes = pLastLine->GetTabBoxes(); - const SwTableBox* pBRBox = rBoxes[rBoxes.Count() -1]; + const SwTableBox* pBRBox = lcl_FindCornerTableBox(rLines, false); pUnoCrsr->SetMark(); pUnoCrsr->GetPoint()->nNode = *pBRBox->GetSttNd(); pUnoCrsr->Move( fnMoveForward, fnGoNode ); @@ -3501,7 +3535,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be // hier muessen die Actions aufgehoben werden UnoActionRemoveContext aRemoveContext(pDoc); - SwTableBox* pTLBox = rLines[0]->GetTabBoxes()[0]; + const SwTableBox* pTLBox = lcl_FindCornerTableBox(rLines, true); const SwStartNode* pSttNd = pTLBox->GetSttNd(); SwPosition aPos(*pSttNd); // Cursor in die obere linke Zelle des Ranges setzen @@ -3509,11 +3543,11 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be pUnoCrsr->Move( fnMoveForward, fnGoNode ); pUnoCrsr->SetRemainInSection( sal_False ); - SwTableLine* pLastLine = rLines[rLines.Count() - 1]; - SwTableBoxes &rBoxes = pLastLine->GetTabBoxes(); - const SwTableBox* pBRBox = rBoxes[rBoxes.Count() -1]; + const SwTableBox* pBRBox = lcl_FindCornerTableBox(rLines, false); pUnoCrsr->SetMark(); - pUnoCrsr->GetPoint()->nNode = *pBRBox->GetSttNd(); + const SwStartNode* pLastNd = pBRBox->GetSttNd(); + pUnoCrsr->GetPoint()->nNode = *pLastNd; + pUnoCrsr->Move( fnMoveForward, fnGoNode ); SwUnoTableCrsr* pCrsr = dynamic_cast(pUnoCrsr); pCrsr->MakeBoxSels(); -- cgit v1.2.3 From 827ed04a7e8185989da9a9faf25eb0939a95920f Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Tue, 2 Feb 2010 14:05:24 +0100 Subject: cbosdo02: #i107658# fixing build breakers --- sw/source/filter/ww8/ww8par3.cxx | 2 +- sw/source/filter/ww8/ww8par5.cxx | 2 +- sw/source/ui/uiview/viewling.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index fee4da44a5..cb651de2f2 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -312,7 +312,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr) if ( pFieldmark != NULL ) { uno::Sequence< ::rtl::OUString > vListEntries(aFormula.maListEntries.size()); - copy(aFormula.maListEntries.begin(), aFormula.maListEntries.end(), ::comphelper::stl_begin(vListEntries)); + ::std::copy(aFormula.maListEntries.begin(), aFormula.maListEntries.end(), ::comphelper::stl_begin(vListEntries)); (*pFieldmark->GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY)] = uno::makeAny(vListEntries); sal_Int32 nIndex = aFormula.fDropdownIndex < aFormula.maListEntries.size() ? aFormula.fDropdownIndex : 0; (*pFieldmark->GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_RESULT)] = uno::makeAny(nIndex); diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 0cbaea1cba..9ad53429de 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -95,7 +95,7 @@ #include "ww8par2.hxx" #include "writerhelper.hxx" #include "fields.hxx" -#include +#include #include // #i24377# diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index 2188146305..cdb3d7a973 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -1062,7 +1062,7 @@ BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM ) aFldDlg.SetPosPixel(pEditWin->OutputToScreenPixel(aPixPos)); /*short ret=*/aFldDlg.Execute(); - int selection=aFldDlg.getSelection(); + sal_Int32 selection=aFldDlg.getSelection(); if (selection>=0) { (*fieldBM->GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_RESULT)] = makeAny(selection); } -- cgit v1.2.3 From 9375cbb8669ab223ba2d770369ea9387d2a2c260 Mon Sep 17 00:00:00 2001 From: os Date: Tue, 2 Feb 2010 14:58:27 +0100 Subject: #i107142# crash in mail merge of single-paragraph-documents fixed --- sw/source/core/docnode/nodes.cxx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 489d1c4dcf..c2396b0d3f 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -2057,11 +2057,19 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, // falls aEnd-1 auf keinem ContentNode steht, dann suche den vorherigen aRg.aEnd--; - while( (( pAktNode = (*this)[ aRg.aEnd ])->GetStartNode() && - !pAktNode->IsSectionNode() ) || - ( pAktNode->IsEndNode() && - ND_STARTNODE == pAktNode->pStartOfSection->GetNodeType()) ) - aRg.aEnd--; + // #i107142#: if aEnd is start node of a special section, do nothing. + // Otherwise this could lead to crash: going through all previous + // special section nodes and then one before the first. + if (aRg.aEnd.GetNode().StartOfSectionIndex() != 0) + { + while( (( pAktNode = (*this)[ aRg.aEnd ])->GetStartNode() && + !pAktNode->IsSectionNode() ) || + ( pAktNode->IsEndNode() && + ND_STARTNODE == pAktNode->pStartOfSection->GetNodeType()) ) + { + aRg.aEnd--; + } + } aRg.aEnd++; // wird im selben Array's verschoben, dann ueberpruefe die Einfuegepos. -- cgit v1.2.3 From f1aeeea9bb12eeb72af91ace0e4710c52c7bc4ed Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 2 Feb 2010 15:11:26 +0100 Subject: sw33a11y01: #i88070# - accessible Writer comments - part 1 --- sw/inc/AnnotationWin.hxx | 6 +- sw/inc/PostItMgr.hxx | 35 +- sw/inc/SidebarWin.hxx | 12 +- sw/inc/accmap.hxx | 91 +----- sw/inc/postithelper.hxx | 16 +- sw/inc/viewsh.hxx | 10 +- sw/source/core/access/acccell.cxx | 30 +- sw/source/core/access/acccell.hxx | 6 +- sw/source/core/access/acccontext.cxx | 285 +++++++++++----- sw/source/core/access/acccontext.hxx | 33 +- sw/source/core/access/accdoc.cxx | 8 +- sw/source/core/access/accfootnote.hxx | 12 +- sw/source/core/access/accframe.cxx | 268 ++++++++-------- sw/source/core/access/accframe.hxx | 120 ++++--- sw/source/core/access/accframebase.hxx | 12 +- sw/source/core/access/accfrmobj.cxx | 382 ++++++++++++++++++++-- sw/source/core/access/accfrmobj.hxx | 210 +++--------- sw/source/core/access/accfrmobjmap.cxx | 150 ++++++--- sw/source/core/access/accfrmobjmap.hxx | 94 +++--- sw/source/core/access/accfrmobjslist.cxx | 129 +++++--- sw/source/core/access/accfrmobjslist.hxx | 191 +++++------ sw/source/core/access/accmap.cxx | 446 +++++++++++++++----------- sw/source/core/access/accpara.cxx | 43 +-- sw/source/core/access/accpara.hxx | 20 +- sw/source/core/access/accselectionhelper.cxx | 75 ++--- sw/source/core/access/acctable.cxx | 108 +++---- sw/source/core/access/acctable.hxx | 18 +- sw/source/core/fields/postithelper.cxx | 58 +++- sw/source/core/inc/viewimp.hxx | 13 +- sw/source/core/view/viewsh.cxx | 9 + sw/source/ui/docvw/AnnotationWin.cxx | 7 +- sw/source/ui/docvw/PostItMgr.cxx | 126 ++++++-- sw/source/ui/docvw/SidebarTxtControl.cxx | 57 ++-- sw/source/ui/docvw/SidebarTxtControl.hxx | 10 +- sw/source/ui/docvw/SidebarTxtControlAcc.cxx | 88 ++++- sw/source/ui/docvw/SidebarWin.cxx | 72 ++++- sw/source/ui/docvw/SidebarWinAcc.cxx | 156 +++++++++ sw/source/ui/docvw/SidebarWinAcc.hxx | 67 ++++ sw/source/ui/docvw/edtwin.cxx | 2 +- sw/source/ui/docvw/frmsidebarwincontainer.cxx | 204 ++++++++++++ sw/source/ui/docvw/frmsidebarwincontainer.hxx | 73 +++++ sw/source/ui/docvw/makefile.mk | 2 + 42 files changed, 2458 insertions(+), 1296 deletions(-) create mode 100644 sw/source/ui/docvw/SidebarWinAcc.cxx create mode 100644 sw/source/ui/docvw/SidebarWinAcc.hxx create mode 100644 sw/source/ui/docvw/frmsidebarwincontainer.cxx create mode 100644 sw/source/ui/docvw/frmsidebarwincontainer.hxx (limited to 'sw/source') diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx index 634182068b..93b35694c8 100644 --- a/sw/inc/AnnotationWin.hxx +++ b/sw/inc/AnnotationWin.hxx @@ -35,6 +35,7 @@ #include class PopupMenu; +class OutlinerParaObject; namespace sw { namespace annotation { @@ -43,9 +44,10 @@ class SwAnnotationWin : public sw::sidebarwindows::SwSidebarWin public: SwAnnotationWin( SwEditWin& rEditWin, WinBits nBits, - SwFmtFld* aField, SwPostItMgr& aMgr, - SwPostItBits aBits ); + SwPostItBits aBits, + SwSidebarItem& rSidebarItem, + SwFmtFld* aField ); virtual ~SwAnnotationWin(); virtual void UpdateData(); diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 0694ae4911..c1abefd5d9 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -62,8 +62,11 @@ namespace sw { namespace annotation { }} namespace sw { namespace sidebarwindows { class SwSidebarWin; + class SwFrmSidebarWinContainer; }} class SwSidebarItem; +class SwFrm; +class Window; #define SORT_POS 1 #define SORT_AUTHOR 2 @@ -108,23 +111,23 @@ struct FieldShadowState class SwNoteProps: public utl::ConfigItem { private: - bool bIsShowAnkor; + bool bIsShowAnchor; public: SwNoteProps() : ConfigItem(::rtl::OUString::createFromAscii("Office.Writer/Notes")) - , bIsShowAnkor(false) + , bIsShowAnchor(false) { const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames = GetPropertyNames(); ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aValues = GetProperties(rNames); const ::com::sun::star::uno::Any* pValues = aValues.getConstArray(); DBG_ASSERT(aValues.getLength() == rNames.getLength(), "GetProperties failed"); if (aValues.getLength()) - pValues[0]>>=bIsShowAnkor; + pValues[0]>>=bIsShowAnchor; } - bool IsShowAnkor() + bool IsShowAnchor() { - return bIsShowAnkor; + return bIsShowAnchor; } ::com::sun::star::uno::Sequence< ::rtl::OUString >& GetPropertyNames() { @@ -163,7 +166,10 @@ class SwPostItMgr: public SfxListener bool mbDeleteNote; FieldShadowState mShadowState; OutlinerParaObject* mpAnswer; - bool mpIsShowAnkor; + bool mbIsShowAnchor; + + // data structure to collect the instances for certain instances. + sw::sidebarwindows::SwFrmSidebarWinContainer* mpFrmSidebarWinContainer; typedef std::list::iterator SwSidebarWin_iterator; @@ -216,7 +222,7 @@ class SwPostItMgr: public SfxListener bool ShowScrollbar(const unsigned long aPage) const; bool HasNotes() const ; bool ShowNotes() const; - bool IsShowAnkor() { return mpIsShowAnkor;} + bool IsShowAnchor() { return mbIsShowAnchor;} unsigned long GetSidebarWidth(bool bPx = false) const; unsigned long GetSidebarBorderWidth(bool bPx = false) const; unsigned long GetNoteWidth(); @@ -265,7 +271,7 @@ class SwPostItMgr: public SfxListener Color GetColorDark(sal_uInt16 aAuthorIndex); Color GetColorLight(sal_uInt16 aAuthorIndex); - Color GetColorAnkor(sal_uInt16 aAuthorIndex); + Color GetColorAnchor(sal_uInt16 aAuthorIndex); bool ShowPreview(const SwField* pFld,SwFmtFld*& pFmtFld) const; @@ -278,7 +284,18 @@ class SwPostItMgr: public SfxListener sal_uInt16 SearchReplace(const SwFmtFld &pFld, const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward); sal_uInt16 FinishSearchReplace(const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward); - void AssureStdModeAtShell(); + void AssureStdModeAtShell(); + + void ConnectSidebarWinToFrm( const SwFrm& rFrm, + const SwFmtFld& rFmtFld, + sw::sidebarwindows::SwSidebarWin& rSidebarWin ); + void DisconnectSidebarWinFromFrm( const SwFrm& rFrm, + sw::sidebarwindows::SwSidebarWin& rSidebarWin ); + bool HasFrmConnectedSidebarWins( const SwFrm& rFrm ); + Window* GetSidebarWinForFrmByIndex( const SwFrm& rFrm, + const sal_Int32 nIndex ); + void GetAllSidebarWinForFrm( const SwFrm& rFrm, + std::vector< Window* >* pChildren ); }; #endif diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx index f3247e8af7..7e7605ee60 100644 --- a/sw/inc/SidebarWin.hxx +++ b/sw/inc/SidebarWin.hxx @@ -47,7 +47,6 @@ class SwPostItMgr; class SwPostItField; -class SwFmtFld; class OutlinerView; class Outliner; class ScrollBar; @@ -56,7 +55,8 @@ class SwView; class Edit; class MenuButton; //class SwRedline; -class OutlinerParaObject; +class SwFrm; + namespace sw { namespace sidebarwindows { @@ -75,7 +75,8 @@ class SwSidebarWin : public Window SwSidebarWin( SwEditWin& rEditWin, WinBits nBits, SwPostItMgr& aMgr, - SwPostItBits aBits ); + SwPostItBits aBits, + SwSidebarItem& rSidebarItem ); virtual ~SwSidebarWin(); void SetSize( const Size& rNewSize ); @@ -175,6 +176,9 @@ class SwSidebarWin : public Window void SetLanguage(const SvxLanguageItem aNewItem); + void ChangeSidebarItem( SwSidebarItem& rSidebarItem ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); + protected: virtual void DataChanged( const DataChangedEvent& aEvent); virtual void LoseFocus(); @@ -232,6 +236,8 @@ class SwSidebarWin : public Window bool mbReadonly; bool mbIsFollow; + + SwSidebarItem& mrSidebarItem; }; } } // eof namespace sw::sidebarwindows diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index 236fb429d4..728ce3fb08 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -36,14 +36,15 @@ #include #include #include -#include "viewsh.hxx" #include #include #include +class ViewShell; class Rectangle; class SwFrm; +class SwTxtFrm; class SwPageFrm; class SwAccessibleContext; class SwAccessibleContextMap_Impl; @@ -51,85 +52,18 @@ class SwAccessibleEventList_Impl; class SwAccessibleEventMap_Impl; class SwShapeList_Impl; class SdrObject; -namespace accessibility { class AccessibleShape; } +namespace accessibility { + class AccessibleShape; +} class SwAccessibleShapeMap_Impl; struct SwAccessibleEvent_Impl; -// --> OD 2005-12-13 #i27301# class SwAccessibleSelectedParas_Impl; -// <-- class SwRect; class MapMode; class SwAccPreviewData; -// OD 14.01.2003 #103492# -#ifndef _PREVWPAGE_HXX -#include -#endif - -// helper class that stores preview data -class SwAccPreviewData -{ - typedef std::vector Rectangles; - Rectangles maPreviewRects; - Rectangles maLogicRects; - - SwRect maVisArea; - Fraction maScale; - - const SwPageFrm *mpSelPage; - - /** adjust logic page retangle to its visible part - - OD 17.01.2003 #103492# - - @author OD - - @param _iorLogicPgSwRect - input/output parameter - reference to the logic page rectangle, which - has to be adjusted. - - @param _rPrevwPgSwRect - input parameter - constant reference to the corresponding preview page - rectangle; needed to determine the visible part of the logic page rectangle. - - @param _rPrevwWinSize - input paramter - constant reference to the preview window size in TWIP; - needed to determine the visible part of the logic page rectangle - */ - void AdjustLogicPgRectToVisibleArea( SwRect& _iorLogicPgSwRect, - const SwRect& _rPrevwPgSwRect, - const Size& _rPrevwWinSize ); - -public: - SwAccPreviewData(); - ~SwAccPreviewData(); - - // OD 14.01.2003 #103492# - complete re-factoring of method due to new - // page/print preview functionality. - void Update( const std::vector& _rPrevwPages, - const Fraction& _rScale, - const SwPageFrm* _pSelectedPageFrm, - const Size& _rPrevwWinSize ); - - // OD 14.01.2003 #103492# - complete re-factoring of method due to new - // page/print preview functionality. - void InvalidateSelection( const SwPageFrm* _pSelectedPageFrm ); - - const SwRect& GetVisArea() const; - - MapMode GetMapModeForPreview( ) const; - - /** Adjust the MapMode so that the preview page appears at the - * proper position. rPoint identifies the page for which the - * MapMode should be adjusted. If bFromPreview is true, rPoint is - * a preview coordinate; else it's a document coordinate. */ - // OD 17.01.2003 #103492# - delete unused 3rd parameter. - void AdjustMapMode( MapMode& rMapMode, - const Point& rPoint ) const; - - inline const SwPageFrm *GetSelPage() const { return mpSelPage; } - - void DisposePage(const SwPageFrm *pPageFrm ); -}; +struct PrevwPage; +class Window; +class SwFmtFld; // real states for events #define ACC_STATE_EDITABLE 0x01 @@ -249,14 +183,7 @@ public: return mpVSh; } - inline const SwRect& GetVisArea() const - { - DBG_ASSERT( !GetShell()->IsPreView() || (mpPreview != NULL), - "preview without preview data?" ); - return GetShell()->IsPreView() - ? mpPreview->GetVisArea() - : GetShell()->VisArea(); - } + const SwRect& GetVisArea() const; /** get size of a dedicated preview page diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index 5d9d58ed75..4f9d04dc4a 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -54,7 +54,7 @@ typedef sal_Int64 SwPostItBits; struct SwLayoutInfo { - SwFrm* mpAssociatedFrm; + const SwFrm* mpAnchorFrm; SwRect mPosition; SwRect mPageFrame; SwRect mPagePrtArea; @@ -63,7 +63,7 @@ struct SwLayoutInfo USHORT mRedlineAuthor; SwLayoutInfo() - : mpAssociatedFrm(0) + : mpAnchorFrm(0) , mPosition() , mPageFrame() , mPagePrtArea() @@ -106,9 +106,9 @@ public: , maLayoutInfo() {} virtual ~SwSidebarItem(){} - virtual SwPosition GetPosition() = 0; + virtual SwPosition GetAnchorPosition() const = 0; virtual bool UseElement() = 0; - virtual SwFmtFld* GetFmtFld() = 0; + virtual SwFmtFld* GetFmtFld() const = 0; virtual SfxBroadcaster* GetBroadCaster() const = 0; virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin, WinBits nBits, @@ -126,9 +126,9 @@ public: : SwSidebarItem(aShow,aFocus), pRedline(pRed) {} virtual ~SwRedCommentItem() {} - virtual SwPosition GetPosition(); + virtual SwPosition GetAnchorPosition() const; virtual bool UseElement(); - virtual SwFmtFld* GetFmtFld() {return 0; } + virtual SwFmtFld* GetFmtFld() const {return 0; } virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast (pRedline); } virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin, WinBits nBits, @@ -150,9 +150,9 @@ class SwAnnotationItem: public SwSidebarItem , pFmtFld(p) {} virtual ~SwAnnotationItem() {} - virtual SwPosition GetPosition(); + virtual SwPosition GetAnchorPosition() const; virtual bool UseElement(); - virtual SwFmtFld* GetFmtFld() {return pFmtFld;} + virtual SwFmtFld* GetFmtFld() const {return pFmtFld;} virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast (pFmtFld); } virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin, WinBits nBits, diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index 36fe5919ed..0ed2517ff4 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -78,19 +78,15 @@ struct ShellResource; class SwRegionRects; class SwFrm; class SvtAccessibilityOptions; -// OD 12.12.2002 #103492# class SwPagePreviewLayout; -// --> OD 2005-12-01 #i27138# class SwTxtFrm; -// <-- class BitmapEx; struct SwAccessibilityOptions; class Region; class SwPostItMgr; - -// #i74769# class SdrPaintWindow; +class SwAccessibleMap; //JP 19.07.98: - Bug 52312 // define fuer Flags, die im CTOR oder den darunter liegenden Schichten @@ -266,7 +262,7 @@ public: sal_Bool SmoothScroll( long lXDiff, long lYDiff, const Rectangle* );//Browser void EnableSmooth( sal_Bool b ) { bEnableSmooth = b; } - const SwRect &VisArea() const { return aVisArea; } + const SwRect& VisArea() const { return aVisArea; } //Es wird, wenn notwendig, soweit gescrollt, dass das //uebergebene Rect im sichtbaren Ausschnitt liegt. void MakeVisible( const SwRect & ); @@ -575,6 +571,8 @@ public: */ void InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm ); + SwAccessibleMap* GetAccessibleMap(); + ViewShell( ViewShell&, Window *pWin = 0, OutputDevice *pOut = 0, long nFlags = 0 ); ViewShell( SwDoc& rDoc, Window *pWin, diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx index 18b2272ab3..5958adead0 100644 --- a/sw/source/core/access/acccell.cxx +++ b/sw/source/core/access/acccell.cxx @@ -44,6 +44,7 @@ #include #include "crsrsh.hxx" #include "viscrs.hxx" +#include #include #include "frmfmt.hxx" #include "cellatr.hxx" @@ -59,6 +60,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::accessibility; using ::rtl::OUString; +using namespace sw::access; const sal_Char sServiceName[] = "com.sun.star.table.AccessibleCellView"; const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleCellView"; @@ -86,8 +88,7 @@ sal_Bool SwAccessibleCell::IsSelected() return bRet; } -void SwAccessibleCell::GetStates( - ::utl::AccessibleStateSetHelper& rStateSet ) +void SwAccessibleCell::GetStates( ::utl::AccessibleStateSetHelper& rStateSet ) { SwAccessibleContext::GetStates( rStateSet ); @@ -107,11 +108,10 @@ void SwAccessibleCell::GetStates( } } -SwAccessibleCell::SwAccessibleCell( - SwAccessibleMap *pInitMap, - const SwCellFrm *pCellFrm ) : - SwAccessibleContext( pInitMap, AccessibleRole::TABLE_CELL, pCellFrm ), - bIsSelected( sal_False ) +SwAccessibleCell::SwAccessibleCell( SwAccessibleMap *pInitMap, + const SwCellFrm *pCellFrm ) + : SwAccessibleContext( pInitMap, AccessibleRole::TABLE_CELL, pCellFrm ) + , bIsSelected( sal_False ) { vos::OGuard aGuard(Application::GetSolarMutex()); OUString sBoxName( pCellFrm->GetTabBox()->GetName() ); @@ -148,11 +148,11 @@ sal_Bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrm *pFrm ) { sal_Bool bChanged = sal_False; - const SwFrmOrObjSList aVisList( GetVisArea(), pFrm ); - SwFrmOrObjSList::const_iterator aIter( aVisList.begin() ); + const SwAccessibleChildSList aVisList( GetVisArea(), *pFrm, *GetMap() ); + SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) { - const SwFrmOrObj& rLower = *aIter; + const SwAccessibleChild& rLower = *aIter; const SwFrm *pLower = rLower.GetSwFrm(); if( pLower ) { @@ -187,7 +187,7 @@ sal_Bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrm *pFrm ) void SwAccessibleCell::_InvalidateCursorPos() { - const SwFrm *pParent = GetParent( SwFrmOrObj(GetFrm()), IsInPagePreview() ); + const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() ); ASSERT( pParent->IsTabFrm(), "parent is not a tab frame" ); const SwTabFrm *pTabFrm = static_cast< const SwTabFrm * >( pParent ); if( pTabFrm->IsFollow() ) @@ -256,21 +256,21 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleCell::getSupportedServiceNames() void SwAccessibleCell::Dispose( sal_Bool bRecursive ) { - const SwFrm *pParent = GetParent( SwFrmOrObj(GetFrm()), IsInPagePreview() ); + const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() ); ::vos::ORef< SwAccessibleContext > xAccImpl( GetMap()->GetContextImpl( pParent, sal_False ) ); if( xAccImpl.isValid() ) - xAccImpl->DisposeChild( SwFrmOrObj(GetFrm()), bRecursive ); + xAccImpl->DisposeChild( SwAccessibleChild(GetFrm()), bRecursive ); SwAccessibleContext::Dispose( bRecursive ); } void SwAccessibleCell::InvalidatePosOrSize( const SwRect& rOldBox ) { - const SwFrm *pParent = GetParent( SwFrmOrObj(GetFrm()), IsInPagePreview() ); + const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() ); ::vos::ORef< SwAccessibleContext > xAccImpl( GetMap()->GetContextImpl( pParent, sal_False ) ); if( xAccImpl.isValid() ) - xAccImpl->InvalidateChildPosOrSize( SwFrmOrObj(GetFrm()), rOldBox ); + xAccImpl->InvalidateChildPosOrSize( SwAccessibleChild(GetFrm()), rOldBox ); SwAccessibleContext::InvalidatePosOrSize( rOldBox ); } diff --git a/sw/source/core/access/acccell.hxx b/sw/source/core/access/acccell.hxx index 0afb510652..e10815a46e 100644 --- a/sw/source/core/access/acccell.hxx +++ b/sw/source/core/access/acccell.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -29,12 +29,12 @@ ************************************************************************/ #ifndef _ACCCELL_HXX #define _ACCCELL_HXX -#ifndef _ACCCONTEXT_HXX + #include "acccontext.hxx" -#endif #include class SwCellFrm; +class SwFrmFmt; class SwAccessibleCell : public SwAccessibleContext, ::com::sun::star::accessibility::XAccessibleValue diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index a6fa3f8f54..7908726aa2 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -41,8 +41,8 @@ #endif // #if (OSL_DEBUG_LEVEL > 1) && defined TEST_MIB #include #include -#include "errhdl.hxx" -#include "swtypes.hxx" +#include +#include #include #include @@ -54,9 +54,12 @@ #include #include #include -#include "fesh.hxx" +#include #include #include +#include +#include +#include #include #include #include @@ -64,7 +67,9 @@ #include #include #include +#include +using namespace sw::access; #if (OSL_DEBUG_LEVEL > 1) && defined TEST_MIB #define DBG_MSG( _msg ) \ @@ -93,10 +98,10 @@ using ::rtl::OUString; void SwAccessibleContext::InitStates() { - bIsShowingState = IsShowing(); + bIsShowingState = GetMap() ? IsShowing( *(GetMap()) ) : sal_False; ViewShell *pVSh = GetMap()->GetShell(); - bIsEditableState = pVSh && IsEditable( pVSh ); + bIsEditableState = pVSh && IsEditable( pVSh ); bIsOpaqueState = pVSh && IsOpaque( pVSh ); bIsDefuncState = sal_False; } @@ -167,21 +172,20 @@ enum Action { NONE, SCROLLED, SCROLLED_WITHIN, SCROLLED_IN, SCROLLED_OUT }; void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, - const SwRect& rOldVisArea ) + const SwRect& rOldVisArea ) { const SwRect& rNewVisArea = GetVisArea(); - SwFrmOrObj aFrm( pFrm ); - sal_Bool bVisibleOnly = aFrm.IsVisibleChildrenOnly(); + SwAccessibleChild aFrm( pFrm ); + bool bVisibleOnly = aFrm.IsVisibleChildrenOnly(); uno::Reference < XAccessible > xAcc; - const SwFrmOrObjSList aList( pFrm ); - SwFrmOrObjSList::const_iterator aIter( aList.begin() ); + const SwAccessibleChildSList aList( *pFrm, *(GetMap()) ); + SwAccessibleChildSList::const_iterator aIter( aList.begin() ); while( aIter != aList.end() ) { - const SwFrmOrObj& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); - SwRect aBox( rLower.GetBox() ); + const SwAccessibleChild& rLower = *aIter; + const SwRect aBox( rLower.GetBox( *(GetMap()) ) ); if( rLower.IsAccessible( GetShell()->IsPreView() ) ) { Action eAction = NONE; @@ -214,8 +218,9 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, } if( NONE != eAction ) { - if( pLower ) + if ( rLower.GetSwFrm() ) { + const SwFrm* pLower( rLower.GetSwFrm() ); ::vos::ORef< SwAccessibleContext > xAccImpl = GetMap()->GetContextImpl( pLower, SCROLLED_OUT == eAction || SCROLLED_IN == eAction ); @@ -244,10 +249,10 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, ChildrenScrolled( pLower, rOldVisArea ); } } - else + else if ( rLower.GetDrawObject() ) { ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl = - GetMap()->GetContextImpl( rLower.GetSdrObject(), + GetMap()->GetContextImpl( rLower.GetDrawObject(), this, SCROLLED_OUT == eAction || SCROLLED_IN == eAction ); @@ -262,7 +267,7 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, GetMap() ); break; case SCROLLED_IN: - ScrolledInShape( rLower.GetSdrObject(), + ScrolledInShape( rLower.GetDrawObject(), xAccImpl.getBodyPtr() ); break; case SCROLLED_OUT: @@ -270,7 +275,7 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, xAccImpl->ViewForwarderChanged( ::accessibility::IAccessibleViewForwarderListener::VISIBLE_AREA, GetMap() ); - DisposeShape( rLower.GetSdrObject(), + DisposeShape( rLower.GetDrawObject(), xAccImpl.getBodyPtr() ); } break; @@ -279,14 +284,40 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, } } } + else if ( rLower.GetWindow() ) + { + switch( eAction ) + { + case SCROLLED: + case SCROLLED_WITHIN: + // nothing to do + break; + case SCROLLED_IN: + { + AccessibleEventObject aEvent; + aEvent.EventId = AccessibleEventId::CHILD; + uno::Reference< XAccessible > xAcc = + rLower.GetWindow()->GetAccessible(); + aEvent.NewValue <<= xAcc; + FireAccessibleEvent( aEvent ); + } + break; + case SCROLLED_OUT: + DisposeChild( rLower, sal_False ); + break; + case NONE: + break; + } + } } } - else if( pLower && (!bVisibleOnly || - aBox.IsOver( rOldVisArea ) || - aBox.IsOver( rNewVisArea )) ) + else if ( rLower.GetSwFrm() && + ( !bVisibleOnly || + aBox.IsOver( rOldVisArea ) || + aBox.IsOver( rNewVisArea ) ) ) { // There are no unaccessible SdrObjects that need to be notified - ChildrenScrolled( pLower, rOldVisArea ); + ChildrenScrolled( rLower.GetSwFrm(), rOldVisArea ); } ++aIter; } @@ -299,7 +330,7 @@ void SwAccessibleContext::Scrolled( const SwRect& rOldVisArea ) ChildrenScrolled( GetFrm(), rOldVisArea ); sal_Bool bIsOldShowingState; - sal_Bool bIsNewShowingState = IsShowing(); + sal_Bool bIsNewShowingState = IsShowing( *(GetMap()) ); { vos::OGuard aGuard( aMutex ); bIsOldShowingState = bIsShowingState; @@ -329,7 +360,7 @@ void SwAccessibleContext::ScrolledIn() "Vis area of child is wrong. Did it exist already?" ); // Send child event at parent. That's all we have to do here. - const SwFrm *pParent = GetParent(); + const SwFrm* pParent = GetParent(); ::vos::ORef< SwAccessibleContext > xParentImpl( GetMap()->GetContextImpl( pParent, sal_False ) ); uno::Reference < XAccessibleContext > xThis( this ); @@ -381,13 +412,13 @@ void SwAccessibleContext::ScrolledOut( const SwRect& rOldVisArea ) void SwAccessibleContext::InvalidateChildrenStates( const SwFrm* _pFrm, tAccessibleStates _nStates ) { - const SwFrmOrObjSList aVisList( GetVisArea(), _pFrm ); + const SwAccessibleChildSList aVisList( GetVisArea(), *_pFrm, *(GetMap()) ); - SwFrmOrObjSList::const_iterator aIter( aVisList.begin() ); + SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) { - const SwFrmOrObj& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); + const SwAccessibleChild& rLower = *aIter; + const SwFrm* pLower = rLower.GetSwFrm(); if( pLower ) { ::vos::ORef< SwAccessibleContext > xAccImpl; @@ -398,10 +429,15 @@ void SwAccessibleContext::InvalidateChildrenStates( const SwFrm* _pFrm, else InvalidateChildrenStates( pLower, _nStates ); } - else + else if ( rLower.GetDrawObject() ) { // TODO: SdrObjects } + else if ( rLower.GetWindow() ) + { + // nothing to do ? + } + ++aIter; } } @@ -410,12 +446,12 @@ void SwAccessibleContext::InvalidateChildrenStates( const SwFrm* _pFrm, void SwAccessibleContext::DisposeChildren( const SwFrm *pFrm, sal_Bool bRecursive ) { - const SwFrmOrObjSList aVisList( GetVisArea(), pFrm ); - SwFrmOrObjSList::const_iterator aIter( aVisList.begin() ); + const SwAccessibleChildSList aVisList( GetVisArea(), *pFrm, *(GetMap()) ); + SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) { - const SwFrmOrObj& rLower = *aIter; - const SwFrm *pLower = rLower.GetSwFrm(); + const SwAccessibleChild& rLower = *aIter; + const SwFrm* pLower = rLower.GetSwFrm(); if( pLower ) { ::vos::ORef< SwAccessibleContext > xAccImpl; @@ -426,13 +462,17 @@ void SwAccessibleContext::DisposeChildren( const SwFrm *pFrm, else if( bRecursive ) DisposeChildren( pLower, bRecursive ); } - else + else if ( rLower.GetDrawObject() ) { ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl( - GetMap()->GetContextImpl( rLower.GetSdrObject(), + GetMap()->GetContextImpl( rLower.GetDrawObject(), this, sal_False ) ); if( xAccImpl.isValid() ) - DisposeShape( rLower.GetSdrObject(), xAccImpl.getBodyPtr() ); + DisposeShape( rLower.GetDrawObject(), xAccImpl.getBodyPtr() ); + } + else if ( rLower.GetWindow() ) + { + DisposeChild( rLower, sal_False ); } ++aIter; } @@ -530,16 +570,14 @@ sal_Bool SwAccessibleContext::IsEditableState() SwAccessibleContext::SwAccessibleContext( SwAccessibleMap *pM, sal_Int16 nR, - const SwFrm *pF ) : - SwAccessibleFrame( pM->GetVisArea().SVRect(), pF, - pM->GetShell()->IsPreView() ), - pMap( pM ), - nClientId(0), - nRole( nR ), - bDisposing( sal_False ), - // --> OD 2008-03-10 #i85634# - bRegisteredAtAccessibleMap( true ) - // <-- + const SwFrm *pF ) + : SwAccessibleFrame( pM->GetVisArea().SVRect(), pF, + pM->GetShell()->IsPreView() ) + , pMap( pM ) + , nClientId(0) + , nRole( nR ) + , bDisposing( sal_False ) + , bRegisteredAtAccessibleMap( true ) { InitStates(); DBG_MSG_CD( "constructed" ) @@ -550,11 +588,7 @@ SwAccessibleContext::~SwAccessibleContext() vos::OGuard aGuard(Application::GetSolarMutex()); DBG_MSG_CD( "destructed" ) - // --> OD 2008-03-10 #i85634# -// if( GetFrm() && GetMap() ) -// GetMap()->RemoveContext( GetFrm() ); RemoveFrmFromAccessibleMap(); - // <-- } uno::Reference< XAccessibleContext > SAL_CALL @@ -572,7 +606,7 @@ sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleChildCount( void ) CHECK_FOR_DEFUNC( XAccessibleContext ) - return bDisposing ? 0 : GetChildCount(); + return bDisposing ? 0 : GetChildCount( *(GetMap()) ); } uno::Reference< XAccessible> SAL_CALL @@ -583,7 +617,7 @@ uno::Reference< XAccessible> SAL_CALL CHECK_FOR_DEFUNC( XAccessibleContext ) - const SwFrmOrObj aChild( GetChild( nIndex ) ); + const SwAccessibleChild aChild( GetChild( *(GetMap()), nIndex ) ); if( !aChild.IsValid() ) { uno::Reference < XAccessibleContext > xThis( this ); @@ -604,14 +638,18 @@ uno::Reference< XAccessible> SAL_CALL xChild = xChildImpl.getBodyPtr(); } } - else + else if ( aChild.GetDrawObject() ) { ::vos::ORef < ::accessibility::AccessibleShape > xChildImpl( - GetMap()->GetContextImpl( aChild.GetSdrObject(), + GetMap()->GetContextImpl( aChild.GetDrawObject(), this, !bDisposing ) ); if( xChildImpl.isValid() ) xChild = xChildImpl.getBodyPtr(); } + else if ( aChild.GetWindow() ) + { + xChild = aChild.GetWindow()->GetAccessible(); + } return xChild; } @@ -658,7 +696,7 @@ sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleIndexInParent (void) GetMap()->GetContextImpl( pUpper, !bDisposing ) ); ASSERT( xAccImpl.isValid() || bDisposing, "no parent found" ); if( xAccImpl.isValid() ) - nIndex = xAccImpl->GetChildIndex( SwFrmOrObj(GetFrm()) ); + nIndex = xAccImpl->GetChildIndex( *(GetMap()), SwAccessibleChild(GetFrm()) ); } return nIndex; @@ -794,20 +832,24 @@ uno::Reference< XAccessible > SAL_CALL SwAccessibleContext::getAccessibleAtPoint Point aPixPoint( aPoint.X, aPoint.Y ); // px rel to parent if( !GetFrm()->IsRootFrm() ) { - SwRect aLogBounds( GetBounds( GetFrm() ) ); // twip rel to doc root + SwRect aLogBounds( GetBounds( *(GetMap()), GetFrm() ) ); // twip rel to doc root Point aPixPos( GetMap()->CoreToPixel( aLogBounds.SVRect() ).TopLeft() ); aPixPoint.X() += aPixPos.X(); aPixPoint.Y() += aPixPos.Y(); } - const SwFrmOrObj aChild( GetChildAtPixel( aPixPoint, GetMap() ) ); + const SwAccessibleChild aChild( GetChildAtPixel( aPixPoint, *(GetMap()) ) ); if( aChild.GetSwFrm() ) { xAcc = GetMap()->GetContext( aChild.GetSwFrm() ); } - else if( aChild.GetSdrObject() ) + else if( aChild.GetDrawObject() ) + { + xAcc = GetMap()->GetContext( aChild.GetDrawObject(), this ); + } + else if ( aChild.GetWindow() ) { - xAcc = GetMap()->GetContext( aChild.GetSdrObject(), this ); + xAcc = aChild.GetWindow()->GetAccessible(); } return xAcc; @@ -845,7 +887,7 @@ awt::Rectangle SAL_CALL SwAccessibleContext::getBoundsImpl(sal_Bool bRelative) CHECK_FOR_WINDOW( XAccessibleComponent, pWin && pParent ) - SwRect aLogBounds( GetBounds( GetFrm() ) ); // twip rel to doc root + SwRect aLogBounds( GetBounds( *(GetMap()), GetFrm() ) ); // twip rel to doc root Rectangle aPixBounds( 0, 0, 0, 0 ); if( GetFrm()->IsPageFrm() && static_cast < const SwPageFrm * >( GetFrm() )->IsEmptyPage() ) @@ -864,7 +906,7 @@ awt::Rectangle SAL_CALL SwAccessibleContext::getBoundsImpl(sal_Bool bRelative) aPixBounds = GetMap()->CoreToPixel( aLogBounds.SVRect() ); if( !pParent->IsRootFrm() && bRelative) { - SwRect aParentLogBounds( GetBounds( pParent ) ); // twip rel to doc root + SwRect aParentLogBounds( GetBounds( *(GetMap()), pParent ) ); // twip rel to doc root Point aParentPixPos( GetMap()->CoreToPixel( aParentLogBounds.SVRect() ).TopLeft() ); aPixBounds.Move( -aParentPixPos.X(), -aParentPixPos.Y() ); } @@ -1089,24 +1131,20 @@ void SwAccessibleContext::Dispose( sal_Bool bRecursive ) DBG_MSG_CD( "dispose" ) } - // --> OD 2008-03-10 #i85634# -// if( GetFrm() && GetMap() ) -// GetMap()->RemoveContext( GetFrm() ); RemoveFrmFromAccessibleMap(); - // <-- ClearFrm(); pMap = 0; bDisposing = sal_False; } -void SwAccessibleContext::DisposeChild( const SwFrmOrObj& rChildFrmOrObj, +void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrmOrObj, sal_Bool bRecursive ) { vos::OGuard aGuard(Application::GetSolarMutex()); - SwFrmOrObj aFrmOrObj( GetFrm() ); - if( IsShowing( rChildFrmOrObj ) || !aFrmOrObj.IsVisibleChildrenOnly() ) + if( IsShowing( *(GetMap()), rChildFrmOrObj ) || + !SwAccessibleChild( GetFrm() ).IsVisibleChildrenOnly() ) { // If the object could have existed before, than there is nothing to do, // because no wrapper exists now and therefor no one is interested to @@ -1118,14 +1156,23 @@ void SwAccessibleContext::DisposeChild( const SwFrmOrObj& rChildFrmOrObj, sal_True ); xAccImpl->Dispose( bRecursive ); } - else + else if ( rChildFrmOrObj.GetDrawObject() ) { ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl = - GetMap()->GetContextImpl( rChildFrmOrObj.GetSdrObject(), + GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(), this, sal_True ); - DisposeShape( rChildFrmOrObj.GetSdrObject(), + DisposeShape( rChildFrmOrObj.GetDrawObject(), xAccImpl.getBodyPtr() ); } + else if ( rChildFrmOrObj.GetWindow() ) + { + AccessibleEventObject aEvent; + aEvent.EventId = AccessibleEventId::CHILD; + uno::Reference< XAccessible > xAcc = + rChildFrmOrObj.GetWindow()->GetAccessible(); + aEvent.NewValue <<= xAcc; + FireAccessibleEvent( aEvent ); + } } else if( bRecursive && rChildFrmOrObj.GetSwFrm() ) DisposeChildren( rChildFrmOrObj.GetSwFrm(), bRecursive ); @@ -1138,7 +1185,7 @@ void SwAccessibleContext::InvalidatePosOrSize( const SwRect& ) ASSERT( GetFrm() && !GetFrm()->Frm().IsEmpty(), "context should have a size" ); sal_Bool bIsOldShowingState; - sal_Bool bIsNewShowingState = IsShowing(); + sal_Bool bIsNewShowingState = IsShowing( *(GetMap()) ); { vos::OGuard aShowingStateGuard( aMutex ); bIsOldShowingState = bIsShowingState; @@ -1156,7 +1203,7 @@ void SwAccessibleContext::InvalidatePosOrSize( const SwRect& ) FireVisibleDataEvent(); } - SwFrmOrObj aParent( GetParent() ); + SwAccessibleChild aParent( GetParent() ); if( !bIsNewShowingState && aParent.IsVisibleChildrenOnly() ) { // The frame is now invisible -> dispose it @@ -1169,7 +1216,7 @@ void SwAccessibleContext::InvalidatePosOrSize( const SwRect& ) } void SwAccessibleContext::InvalidateChildPosOrSize( - const SwFrmOrObj& rChildFrmOrObj, + const SwAccessibleChild& rChildFrmOrObj, const SwRect& rOldFrm ) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -1178,10 +1225,10 @@ void SwAccessibleContext::InvalidateChildPosOrSize( !rChildFrmOrObj.GetSwFrm()->Frm().IsEmpty(), "child context should have a size" ); - SwFrmOrObj aFrm( GetFrm() ); - sal_Bool bNew = rOldFrm.IsEmpty() || - (rOldFrm.Left() == 0 && rOldFrm.Top() == 0); - if( IsShowing( rChildFrmOrObj ) ) + SwAccessibleChild aFrm( GetFrm() ); + const bool bNew = rOldFrm.IsEmpty() || + ( rOldFrm.Left() == 0 && rOldFrm.Top() == 0 ); + if( IsShowing( *(GetMap()), rChildFrmOrObj ) ) { // If the object could have existed before, than there is nothing to do, // because no wrapper exists now and therefor no one is interested to @@ -1196,15 +1243,15 @@ void SwAccessibleContext::InvalidateChildPosOrSize( sal_True ); xAccImpl->ScrolledIn(); } - else + else if ( rChildFrmOrObj.GetDrawObject() ) { ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl = - GetMap()->GetContextImpl( rChildFrmOrObj.GetSdrObject(), + GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(), this, sal_True ); // --> OD 2004-11-29 #i37790# if ( xAccImpl.isValid() ) { - ScrolledInShape( rChildFrmOrObj.GetSdrObject(), + ScrolledInShape( rChildFrmOrObj.GetDrawObject(), xAccImpl.getBodyPtr() ); } else @@ -1214,6 +1261,13 @@ void SwAccessibleContext::InvalidateChildPosOrSize( } // <-- } + else if ( rChildFrmOrObj.GetWindow() ) + { + AccessibleEventObject aEvent; + aEvent.EventId = AccessibleEventId::CHILD; + aEvent.NewValue <<= (rChildFrmOrObj.GetWindow()->GetAccessible()); + FireAccessibleEvent( aEvent ); + } } } else @@ -1233,14 +1287,19 @@ void SwAccessibleContext::InvalidateChildPosOrSize( xAccImpl->SetParent( this ); xAccImpl->Dispose( sal_True ); } - else + else if ( rChildFrmOrObj.GetDrawObject() ) { ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl = - GetMap()->GetContextImpl( rChildFrmOrObj.GetSdrObject(), + GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(), this, sal_True ); - DisposeShape( rChildFrmOrObj.GetSdrObject(), + DisposeShape( rChildFrmOrObj.GetDrawObject(), xAccImpl.getBodyPtr() ); } + else if ( rChildFrmOrObj.GetWindow() ) + { + ASSERT( false, + " - not expected to handle dispose of child of type ." ); + } } } } @@ -1424,13 +1483,67 @@ OUString SwAccessibleContext::GetResource( sal_uInt16 nResId, return OUString( sStr ); } -// --> OD 2008-03-10 #i85634# void SwAccessibleContext::RemoveFrmFromAccessibleMap() { if( bRegisteredAtAccessibleMap && GetFrm() && GetMap() ) GetMap()->RemoveContext( GetFrm() ); } -// <-- + +bool SwAccessibleContext::HasAdditionalAccessibleChildren() +{ + bool bRet( false ); + + if ( GetFrm()->IsTxtFrm() ) + { + SwPostItMgr* pPostItMgr = GetMap()->GetShell()->GetPostItMgr(); + if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) + { + bRet = pPostItMgr->HasFrmConnectedSidebarWins( *(GetFrm()) ); + } + } + + return bRet; +} +/** get additional accessible child by index + + OD 2010-01-27 #i88070# + + @author OD +*/ +Window* SwAccessibleContext::GetAdditionalAccessibleChild( const sal_Int32 nIndex ) +{ + Window* pAdditionalAccessibleChild( 0 ); + + if ( GetFrm()->IsTxtFrm() ) + { + SwPostItMgr* pPostItMgr = GetMap()->GetShell()->GetPostItMgr(); + if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) + { + pAdditionalAccessibleChild = + pPostItMgr->GetSidebarWinForFrmByIndex( *(GetFrm()), nIndex ); + } + } + + return pAdditionalAccessibleChild; +} + +/** get all additional accessible children + + OD 2010-01-27 #i88070# + + @author OD +*/ +void SwAccessibleContext::GetAdditionalAccessibleChildren( std::vector< Window* >* pChildren ) +{ + if ( GetFrm()->IsTxtFrm() ) + { + SwPostItMgr* pPostItMgr = GetMap()->GetShell()->GetPostItMgr(); + if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) + { + pPostItMgr->GetAllSidebarWinForFrm( *(GetFrm()), pChildren ); + } + } +} #if (OSL_DEBUG_LEVEL > 1) && defined TEST_MIB void lcl_SwAccessibleContext_DbgMsg( SwAccessibleContext *pThisAcc, diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx index af7a744ef8..3316c3298d 100644 --- a/sw/source/core/access/acccontext.hxx +++ b/sw/source/core/access/acccontext.hxx @@ -43,8 +43,14 @@ class SwAccessibleMap; class SwCrsrShell; class SdrObject; class SwPaM; -namespace utl { class AccessibleStateSetHelper; } -namespace accessibility { class AccessibleShape; } +namespace utl { + class AccessibleStateSetHelper; +} +namespace accessibility { + class AccessibleShape; +} +class SwFmtFld; +class SwAccessibleChildContainer; const sal_Char sAccessibleServiceName[] = "com.sun.star.accessibility.Accessible"; @@ -342,13 +348,13 @@ public: virtual void Dispose( sal_Bool bRecursive = sal_False ); // The child object is not visible an longer and should be destroyed - virtual void DisposeChild( const SwFrmOrObj& rFrmOrObj, sal_Bool bRecursive ); + virtual void DisposeChild( const sw::access::SwAccessibleChild& rFrmOrObj, sal_Bool bRecursive ); // The object has been moved by the layout virtual void InvalidatePosOrSize( const SwRect& rFrm ); // The vhild object has been moved by the layout - virtual void InvalidateChildPosOrSize( const SwFrmOrObj& rFrmOrObj, + virtual void InvalidateChildPosOrSize( const sw::access::SwAccessibleChild& rFrmOrObj, const SwRect& rFrm ); // The content may have changed (but it hasn't tohave changed) @@ -384,6 +390,25 @@ public: */ void InvalidateAttr(); + bool HasAdditionalAccessibleChildren(); + + /** get additional child by index + + OD 2010-01-27 #i88070# + + @author OD + */ + Window* GetAdditionalAccessibleChild( const sal_Int32 nIndex ); + + /** get all additional accessible children + + OD 2010-01-27 #i88070# + + @author OD + */ + void GetAdditionalAccessibleChildren( std::vector< Window* >* pChildren ); + + const ::rtl::OUString& GetName() const { return sName; } virtual sal_Bool HasCursor(); // required by map to remember that object diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index fe6df813ff..35b36b3ef4 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -158,8 +158,10 @@ uno::Reference< XAccessible> SAL_CALL if( mpChildWin ) { CHECK_FOR_DEFUNC( XAccessibleContext ) - if( nIndex == GetChildCount() ) + if ( nIndex == GetChildCount( *(GetMap()) ) ) + { return mpChildWin->GetAccessible(); + } } return SwAccessibleContext::getAccessibleChild( nIndex ); @@ -189,7 +191,7 @@ sal_Int32 SAL_CALL SwAccessibleDocumentBase::getAccessibleIndexInParent (void) return -1L; } -OUString SAL_CALL SwAccessibleDocumentBase::getAccessibleDescription (void) +OUString SAL_CALL SwAccessibleDocumentBase::getAccessibleDescription (void) throw (uno::RuntimeException) { return GetResource( STR_ACCESS_DOC_DESC ); diff --git a/sw/source/core/access/accfootnote.hxx b/sw/source/core/access/accfootnote.hxx index 4a18550342..d6fd702167 100644 --- a/sw/source/core/access/accfootnote.hxx +++ b/sw/source/core/access/accfootnote.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -29,9 +29,13 @@ ************************************************************************/ #ifndef _ACCFOOTNOTE_HXX #define _ACCFOOTNOTE_HXX -#ifndef _ACCCONTEXT_HXX -#include "acccontext.hxx" -#endif + +#include + +#include + +class SwAccessibleMap; +class SwFtnFrm; class SwAccessibleFootnote : public SwAccessibleContext { diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx index ce6c2ad0e1..ad243c8cfb 100644 --- a/sw/source/core/access/accframe.cxx +++ b/sw/source/core/access/accframe.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -55,22 +55,24 @@ #include #include +using namespace sw::access; // Regarding visibilily (or in terms of accessibility: regarding the showing // state): A frame is visible and therfor contained in the tree if its frame // size overlaps with the visible area. The bounding box however is the // frame's paint area. -sal_Int32 SwAccessibleFrame::GetChildCount( const SwRect& rVisArea, - const SwFrm *pFrm, - sal_Bool bInPagePreview ) +/* static */ sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap& rAccMap, + const SwRect& rVisArea, + const SwFrm *pFrm, + sal_Bool bInPagePreview ) { sal_Int32 nCount = 0; - const SwFrmOrObjSList aVisList( rVisArea, pFrm ); - SwFrmOrObjSList::const_iterator aIter( aVisList.begin() ); + const SwAccessibleChildSList aVisList( rVisArea, *pFrm, rAccMap ); + SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) { - const SwFrmOrObj& rLower = *aIter; + const SwAccessibleChild& rLower = *aIter; if( rLower.IsAccessible( bInPagePreview ) ) { nCount++; @@ -78,7 +80,8 @@ sal_Int32 SwAccessibleFrame::GetChildCount( const SwRect& rVisArea, else if( rLower.GetSwFrm() ) { // There are no unaccessible SdrObjects that count - nCount += GetChildCount( rVisArea, rLower.GetSwFrm(), + nCount += GetChildCount( rAccMap, + rVisArea, rLower.GetSwFrm(), bInPagePreview ); } ++aIter; @@ -87,23 +90,25 @@ sal_Int32 SwAccessibleFrame::GetChildCount( const SwRect& rVisArea, return nCount; } -SwFrmOrObj SwAccessibleFrame::GetChild( const SwRect& rVisArea, - const SwFrm *pFrm, - sal_Int32& rPos, - sal_Bool bInPagePreview ) +/* static */ SwAccessibleChild SwAccessibleFrame::GetChild( + SwAccessibleMap& rAccMap, + const SwRect& rVisArea, + const SwFrm& rFrm, + sal_Int32& rPos, + sal_Bool bInPagePreview ) { - SwFrmOrObj aRet; + SwAccessibleChild aRet; if( rPos >= 0 ) { - if( SwFrmOrObjMap::IsSortingRequired( pFrm ) ) + if( SwAccessibleChildMap::IsSortingRequired( rFrm ) ) { // We need a sorted list here - const SwFrmOrObjMap aVisMap( rVisArea, pFrm ); - SwFrmOrObjMap::const_iterator aIter( aVisMap.begin() ); + const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap ); + SwAccessibleChildMap::const_iterator aIter( aVisMap.begin() ); while( aIter != aVisMap.end() && !aRet.IsValid() ) { - const SwFrmOrObj& rLower = (*aIter).second; + const SwAccessibleChild& rLower = (*aIter).second; if( rLower.IsAccessible( bInPagePreview ) ) { if( 0 == rPos ) @@ -114,7 +119,8 @@ SwFrmOrObj SwAccessibleFrame::GetChild( const SwRect& rVisArea, else if( rLower.GetSwFrm() ) { // There are no unaccessible SdrObjects that count - aRet = GetChild( rVisArea, rLower.GetSwFrm(), rPos, + aRet = GetChild( rAccMap, + rVisArea, *(rLower.GetSwFrm()), rPos, bInPagePreview ); } ++aIter; @@ -124,11 +130,11 @@ SwFrmOrObj SwAccessibleFrame::GetChild( const SwRect& rVisArea, { // The unsorted list is sorted enough, because it return lower // frames in the correct order. - const SwFrmOrObjSList aVisList( rVisArea, pFrm ); - SwFrmOrObjSList::const_iterator aIter( aVisList.begin() ); + const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap ); + SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() && !aRet.IsValid() ) { - const SwFrmOrObj& rLower = *aIter; + const SwAccessibleChild& rLower = *aIter; if( rLower.IsAccessible( bInPagePreview ) ) { if( 0 == rPos ) @@ -139,7 +145,8 @@ SwFrmOrObj SwAccessibleFrame::GetChild( const SwRect& rVisArea, else if( rLower.GetSwFrm() ) { // There are no unaccessible SdrObjects that count - aRet = GetChild( rVisArea, rLower.GetSwFrm(), rPos, + aRet = GetChild( rAccMap, + rVisArea, *(rLower.GetSwFrm()), rPos, bInPagePreview ); } ++aIter; @@ -150,22 +157,24 @@ SwFrmOrObj SwAccessibleFrame::GetChild( const SwRect& rVisArea, return aRet; } -sal_Bool SwAccessibleFrame::GetChildIndex( const SwRect& rVisArea, - const SwFrm *pFrm, - const SwFrmOrObj& rChild, - sal_Int32& rPos, - sal_Bool bInPagePreview ) +/* static */ sal_Bool SwAccessibleFrame::GetChildIndex( + SwAccessibleMap& rAccMap, + const SwRect& rVisArea, + const SwFrm& rFrm, + const SwAccessibleChild& rChild, + sal_Int32& rPos, + sal_Bool bInPagePreview ) { sal_Bool bFound = sal_False; - if( SwFrmOrObjMap::IsSortingRequired( pFrm ) ) + if( SwAccessibleChildMap::IsSortingRequired( rFrm ) ) { // We need a sorted list here - const SwFrmOrObjMap aVisMap( rVisArea, pFrm ); - SwFrmOrObjMap::const_iterator aIter( aVisMap.begin() ); + const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap ); + SwAccessibleChildMap::const_iterator aIter( aVisMap.begin() ); while( aIter != aVisMap.end() && !bFound ) { - const SwFrmOrObj& rLower = (*aIter).second; + const SwAccessibleChild& rLower = (*aIter).second; if( rLower.IsAccessible( bInPagePreview ) ) { if( rChild == rLower ) @@ -176,7 +185,8 @@ sal_Bool SwAccessibleFrame::GetChildIndex( const SwRect& rVisArea, else if( rLower.GetSwFrm() ) { // There are no unaccessible SdrObjects that count - bFound = GetChildIndex( rVisArea, rLower.GetSwFrm(), rChild, + bFound = GetChildIndex( rAccMap, + rVisArea, *(rLower.GetSwFrm()), rChild, rPos, bInPagePreview ); } ++aIter; @@ -186,11 +196,11 @@ sal_Bool SwAccessibleFrame::GetChildIndex( const SwRect& rVisArea, { // The unsorted list is sorted enough, because it return lower // frames in the correct order. - const SwFrmOrObjSList aVisList( rVisArea, pFrm ); - SwFrmOrObjSList::const_iterator aIter( aVisList.begin() ); + const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap ); + SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() && !bFound ) { - const SwFrmOrObj& rLower = *aIter; + const SwAccessibleChild& rLower = *aIter; if( rLower.IsAccessible( bInPagePreview ) ) { if( rChild == rLower ) @@ -201,7 +211,8 @@ sal_Bool SwAccessibleFrame::GetChildIndex( const SwRect& rVisArea, else if( rLower.GetSwFrm() ) { // There are no unaccessible SdrObjects that count - bFound = GetChildIndex( rVisArea, rLower.GetSwFrm(), rChild, + bFound = GetChildIndex( rAccMap, + rVisArea, *(rLower.GetSwFrm()), rChild, rPos, bInPagePreview ); } ++aIter; @@ -211,31 +222,31 @@ sal_Bool SwAccessibleFrame::GetChildIndex( const SwRect& rVisArea, return bFound; } -SwFrmOrObj SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, - const SwFrm *pFrm, +SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, + const SwFrm& rFrm, const Point& rPixPos, sal_Bool bInPagePreview, - const SwAccessibleMap *pMap ) + SwAccessibleMap& rAccMap ) { - SwFrmOrObj aRet; + SwAccessibleChild aRet; - if( SwFrmOrObjMap::IsSortingRequired( pFrm ) ) + if( SwAccessibleChildMap::IsSortingRequired( rFrm ) ) { // We need a sorted list here, and we have to reverse iterate, // because objects in front should be returned. - const SwFrmOrObjMap aVisMap( rVisArea, pFrm ); - SwFrmOrObjMap::const_reverse_iterator aRIter( aVisMap.rbegin() ); + const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap ); + SwAccessibleChildMap::const_reverse_iterator aRIter( aVisMap.rbegin() ); while( aRIter != aVisMap.rend() && !aRet.IsValid() ) { - const SwFrmOrObj& rLower = (*aRIter).second; + const SwAccessibleChild& rLower = (*aRIter).second; // A frame is returned if it's frame size is inside the visarea // and the positiion is inside the frame's paint area. if( rLower.IsAccessible( bInPagePreview ) ) { - SwRect aLogBounds( rLower.GetBounds( ) ); + SwRect aLogBounds( rLower.GetBounds( rAccMap ) ); if( !aLogBounds.IsEmpty() ) { - Rectangle aPixBounds( pMap->CoreToPixel( aLogBounds.SVRect() ) ); + Rectangle aPixBounds( rAccMap.CoreToPixel( aLogBounds.SVRect() ) ); if( aPixBounds.IsInside( rPixPos ) ) aRet = rLower; } @@ -243,8 +254,8 @@ SwFrmOrObj SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, else if( rLower.GetSwFrm() ) { // There are no unaccessible SdrObjects that count - aRet = GetChildAtPixel( rVisArea, rLower.GetSwFrm(), rPixPos, - bInPagePreview, pMap ); + aRet = GetChildAtPixel( rVisArea, *(rLower.GetSwFrm()), rPixPos, + bInPagePreview, rAccMap ); } aRIter++; } @@ -254,19 +265,19 @@ SwFrmOrObj SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, // The unsorted list is sorted enough, because it returns lower // frames in the correct order. Morover, we can iterate forward, // because the lowers don't overlap! - const SwFrmOrObjSList aVisList( rVisArea, pFrm ); - SwFrmOrObjSList::const_iterator aIter( aVisList.begin() ); + const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap ); + SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() && !aRet.IsValid() ) { - const SwFrmOrObj& rLower = *aIter; + const SwAccessibleChild& rLower = *aIter; // A frame is returned if it's frame size is inside the visarea // and the positiion is inside the frame's paint area. if( rLower.IsAccessible( bInPagePreview ) ) { - SwRect aLogBounds( rLower.GetBounds( ) ); + SwRect aLogBounds( rLower.GetBounds( rAccMap ) ); if( !aLogBounds.IsEmpty() ) { - Rectangle aPixBounds( pMap->CoreToPixel( aLogBounds.SVRect() ) ); + Rectangle aPixBounds( rAccMap.CoreToPixel( aLogBounds.SVRect() ) ); if( aPixBounds.IsInside( rPixPos ) ) aRet = rLower; } @@ -274,8 +285,8 @@ SwFrmOrObj SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, else if( rLower.GetSwFrm() ) { // There are no unaccessible SdrObjects that count - aRet = GetChildAtPixel( rVisArea, rLower.GetSwFrm(), rPixPos, - bInPagePreview, pMap ); + aRet = GetChildAtPixel( rVisArea, *(rLower.GetSwFrm()), rPixPos, + bInPagePreview, rAccMap ); } ++aIter; } @@ -284,18 +295,20 @@ SwFrmOrObj SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, return aRet; } -void SwAccessibleFrame::GetChildren( const SwRect& rVisArea, const SwFrm *pFrm, - ::std::list< SwFrmOrObj >& rChildren, - sal_Bool bInPagePreview ) +/* static */ void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap, + const SwRect& rVisArea, + const SwFrm& rFrm, + ::std::list< SwAccessibleChild >& rChildren, + sal_Bool bInPagePreview ) { - if( SwFrmOrObjMap::IsSortingRequired( pFrm ) ) + if( SwAccessibleChildMap::IsSortingRequired( rFrm ) ) { // We need a sorted list here - const SwFrmOrObjMap aVisMap( rVisArea, pFrm ); - SwFrmOrObjMap::const_iterator aIter( aVisMap.begin() ); + const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap ); + SwAccessibleChildMap::const_iterator aIter( aVisMap.begin() ); while( aIter != aVisMap.end() ) { - const SwFrmOrObj& rLower = (*aIter).second; + const SwAccessibleChild& rLower = (*aIter).second; if( rLower.IsAccessible( bInPagePreview ) ) { rChildren.push_back( rLower ); @@ -303,8 +316,8 @@ void SwAccessibleFrame::GetChildren( const SwRect& rVisArea, const SwFrm *pFrm, else if( rLower.GetSwFrm() ) { // There are no unaccessible SdrObjects that count - GetChildren( rVisArea, rLower.GetSwFrm(), rChildren, - bInPagePreview ); + GetChildren( rAccMap, rVisArea, *(rLower.GetSwFrm()), + rChildren, bInPagePreview ); } ++aIter; } @@ -313,11 +326,11 @@ void SwAccessibleFrame::GetChildren( const SwRect& rVisArea, const SwFrm *pFrm, { // The unsorted list is sorted enough, because it return lower // frames in the correct order. - const SwFrmOrObjSList aVisList( rVisArea, pFrm ); - SwFrmOrObjSList::const_iterator aIter( aVisList.begin() ); + const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap ); + SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) { - const SwFrmOrObj& rLower = *aIter; + const SwAccessibleChild& rLower = *aIter; if( rLower.IsAccessible( bInPagePreview ) ) { rChildren.push_back( rLower ); @@ -325,21 +338,22 @@ void SwAccessibleFrame::GetChildren( const SwRect& rVisArea, const SwFrm *pFrm, else if( rLower.GetSwFrm() ) { // There are no unaccessible SdrObjects that count - GetChildren( rVisArea, rLower.GetSwFrm(), rChildren, - bInPagePreview ); + GetChildren( rAccMap, rVisArea, *(rLower.GetSwFrm()), + rChildren, bInPagePreview ); } ++aIter; } } } -SwRect SwAccessibleFrame::GetBounds( const SwFrm *pFrm ) +SwRect SwAccessibleFrame::GetBounds( const SwAccessibleMap& rAccMap, + const SwFrm *pFrm ) { if( !pFrm ) pFrm = GetFrm(); - SwFrmOrObj aFrm( pFrm ); - SwRect aBounds( aFrm.GetBounds().Intersection( maVisArea ) ); + SwAccessibleChild aFrm( pFrm ); + SwRect aBounds( aFrm.GetBounds( rAccMap ).Intersection( maVisArea ) ); return aBounds; } @@ -362,7 +376,7 @@ sal_Bool SwAccessibleFrame::IsEditable( ViewShell *pVSh ) const sal_Bool SwAccessibleFrame::IsOpaque( ViewShell *pVSh ) const { - SwFrmOrObj aFrm( GetFrm() ); + SwAccessibleChild aFrm( GetFrm() ); if( !aFrm.GetSwFrm() ) return sal_False; @@ -426,71 +440,10 @@ SwAccessibleFrame::~SwAccessibleFrame() { } -const SwFrm *SwAccessibleFrame::GetParent( const SwFrmOrObj& rFrmOrObj, - sal_Bool bInPagePreview ) +/* static */ const SwFrm* SwAccessibleFrame::GetParent( const SwAccessibleChild& rFrmOrObj, + sal_Bool bInPagePreview ) { - SwFrmOrObj aParent; - const SwFrm *pFrm = rFrmOrObj.GetSwFrm(); - if( pFrm ) - { - if( pFrm->IsFlyFrm() ) - { - const SwFlyFrm *pFly = static_cast< const SwFlyFrm *>( pFrm ); - if( pFly->IsFlyInCntFrm() ) - { - // For FLY_IN_CNTNT the parent is the anchor - aParent = pFly->GetAnchorFrm(); - ASSERT( aParent.IsAccessible( bInPagePreview ), - "parent is not accessible" ); - } - else - { - // In any other case the parent is the root frm - // (in page preview, the page frame) - if( bInPagePreview ) - aParent = pFly->FindPageFrm(); - else - aParent = pFly->FindRootFrm(); - } - } - else - { - SwFrmOrObj aUpper( pFrm->GetUpper() ); - while( aUpper.GetSwFrm() && !aUpper.IsAccessible(bInPagePreview) ) - aUpper = aUpper.GetSwFrm()->GetUpper(); - aParent = aUpper; - } - } - else if( rFrmOrObj.GetSdrObject() ) - { - const SwDrawContact *pContact = - static_cast< const SwDrawContact* >( - GetUserCall( rFrmOrObj.GetSdrObject() ) ); - ASSERT( pContact, "sdr contact is missing" ); - if( pContact ) - { - const SwFrmFmt *pFrmFmt = pContact->GetFmt(); - ASSERT( pFrmFmt, "frame format is missing" ); - if( pFrmFmt && FLY_IN_CNTNT == pFrmFmt->GetAnchor().GetAnchorId() ) - { - // For FLY_IN_CNTNT the parent is the anchor - aParent = pContact->GetAnchorFrm(); - ASSERT( aParent.IsAccessible( bInPagePreview ), - "parent is not accessible" ); - - } - else - { - // In any other case the parent is the root frm - if( bInPagePreview ) - aParent = pContact->GetAnchorFrm()->FindPageFrm(); - else - aParent = pContact->GetAnchorFrm()->FindRootFrm(); - } - } - } - - return aParent.GetSwFrm(); + return rFrmOrObj.GetParent( bInPagePreview ); } String SwAccessibleFrame::GetFormattedPageNumber() const @@ -504,3 +457,44 @@ String SwAccessibleFrame::GetFormattedPageNumber() const String sRet( FormatNumber( nPageNum, nFmt ) ); return sRet; } + +sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap& rAccMap ) const +{ + return GetChildCount( rAccMap, maVisArea, mpFrm, IsInPagePreview() ); +} + +sw::access::SwAccessibleChild SwAccessibleFrame::GetChild( + SwAccessibleMap& rAccMap, + sal_Int32 nPos ) const +{ + return SwAccessibleFrame::GetChild( rAccMap, maVisArea, *mpFrm, nPos, IsInPagePreview() ); +} + +sal_Int32 SwAccessibleFrame::GetChildIndex( SwAccessibleMap& rAccMap, + const sw::access::SwAccessibleChild& rChild ) const +{ + sal_Int32 nPos = 0; + return GetChildIndex( rAccMap, maVisArea, *mpFrm, rChild, nPos, IsInPagePreview() ) + ? nPos + : -1L; +} + +sw::access::SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( + const Point& rPos, + SwAccessibleMap& rAccMap ) const +{ + return GetChildAtPixel( maVisArea, *mpFrm, rPos, IsInPagePreview(), rAccMap ); +} + +void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap, + ::std::list< sw::access::SwAccessibleChild >& rChildren ) const +{ + GetChildren( rAccMap, maVisArea, *mpFrm, rChildren, IsInPagePreview() ); +} + +sal_Bool SwAccessibleFrame::IsShowing( const SwAccessibleMap& rAccMap, + const sw::access::SwAccessibleChild& rFrmOrObj ) const +{ + return IsShowing( rFrmOrObj.GetBox( rAccMap ) ); +} + diff --git a/sw/source/core/access/accframe.hxx b/sw/source/core/access/accframe.hxx index b0b916fe92..316932335a 100644 --- a/sw/source/core/access/accframe.hxx +++ b/sw/source/core/access/accframe.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,14 +30,22 @@ #ifndef _ACCFRAME_HXX #define _ACCFRAME_HXX +#include + #include +#include #include #include -// Any method of this class must be called with an acquired solar mutex! - class SwAccessibleMap; +class SwFrm; +class ViewShell; +namespace sw { namespace access { + class SwAccessibleChild; +}} + +// Any method of this class must be called with an acquired solar mutex! class SwAccessibleFrame { @@ -48,26 +56,34 @@ class SwAccessibleFrame protected: // --> OD 2007-06-29 #i77106# // method needs to be called by new class - static sal_Int32 GetChildCount( const SwRect& rVisArea, + static sal_Int32 GetChildCount( SwAccessibleMap& rAccMap, + const SwRect& rVisArea, const SwFrm *pFrm, sal_Bool bInPagePreview ); private: - static SwFrmOrObj GetChild( const SwRect& rVisArea, - const SwFrm *pFrm, - sal_Int32& rPos, - sal_Bool bInPagePreview); - static sal_Bool GetChildIndex( const SwRect& rVisArea, - const SwFrm *pFrm, - const SwFrmOrObj& rChild, - sal_Int32& rPos, - sal_Bool bInPagePreview ); - static SwFrmOrObj GetChildAtPixel( const SwRect& rVisArea, - const SwFrm *pFrm, - const Point& rPos, - sal_Bool bInPagePreview, - const SwAccessibleMap *pMap ); - static void GetChildren( const SwRect& rVisArea, const SwFrm *pFrm, - ::std::list< SwFrmOrObj >& rChildren, + static sw::access::SwAccessibleChild GetChild( SwAccessibleMap& rAccMap, + const SwRect& rVisArea, + const SwFrm& rFrm, + sal_Int32& rPos, + sal_Bool bInPagePreview); + + static sal_Bool GetChildIndex( SwAccessibleMap& rAccMap, + const SwRect& rVisArea, + const SwFrm& rFrm, + const sw::access::SwAccessibleChild& rChild, + sal_Int32& rPos, + sal_Bool bInPagePreview ); + + static sw::access::SwAccessibleChild GetChildAtPixel( const SwRect& rVisArea, + const SwFrm& rFrm, + const Point& rPos, + sal_Bool bInPagePreview, + SwAccessibleMap& rAccMap ); + + static void GetChildren( SwAccessibleMap& rAccMap, + const SwRect& rVisArea, + const SwFrm& rFrm, + ::std::list< sw::access::SwAccessibleChild >& rChildren, sal_Bool bInPagePreview ); protected: @@ -76,9 +92,10 @@ protected: sal_Bool IsOpaque( ViewShell *pVSh ) const; + sal_Bool IsShowing( const SwAccessibleMap& rAccMap, + const sw::access::SwAccessibleChild& rFrmOrObj ) const; inline sal_Bool IsShowing( const SwRect& rFrm ) const; - inline sal_Bool IsShowing( const SwFrmOrObj& rFrmOrObj ) const; - inline sal_Bool IsShowing() const; + inline sal_Bool IsShowing( const SwAccessibleMap& rAccMap ) const; inline sal_Bool IsInPagePreview() const { @@ -100,14 +117,15 @@ public: const SwFrm *GetFrm() const { return mpFrm; }; - static const SwFrm *GetParent( const SwFrmOrObj& rFrmOrObj, + static const SwFrm* GetParent( const sw::access::SwAccessibleChild& rFrmOrObj, sal_Bool bInPagePreview ); protected: // Return the bounding box of the frame clipped to the vis area. If // no frame is specified, use this' frame. - SwRect GetBounds( const SwFrm *pFrm=0 ); + SwRect GetBounds( const SwAccessibleMap& rAccMap, + const SwFrm *pFrm = 0 ); // Return the upper that has a context attached. This might be // another one than the immediate upper. @@ -115,12 +133,15 @@ protected: // Return the lower count or the nth lower, there the lowers have a // not be same one as the SwFrm's lowers - inline sal_Int32 GetChildCount() const; - inline SwFrmOrObj GetChild( sal_Int32 nPos ) const; - inline sal_Int32 GetChildIndex( const SwFrmOrObj& rChild ) const; - inline SwFrmOrObj GetChildAtPixel( const Point& rPos, - const SwAccessibleMap *pMap ) const; - inline void GetChildren( ::std::list< SwFrmOrObj >& rChildren ) const; + sal_Int32 GetChildCount( SwAccessibleMap& rAccMap ) const; + sw::access::SwAccessibleChild GetChild( SwAccessibleMap& rAccMap, + sal_Int32 nPos ) const; + sal_Int32 GetChildIndex( SwAccessibleMap& rAccMap, + const sw::access::SwAccessibleChild& rChild ) const; + sw::access::SwAccessibleChild GetChildAtPixel( const Point& rPos, + SwAccessibleMap& rAccMap ) const; + void GetChildren( SwAccessibleMap& rAccMap, + ::std::list< sw::access::SwAccessibleChild >& rChildren ) const; inline void SetVisArea( const SwRect& rNewVisArea ) { @@ -141,48 +162,17 @@ inline sal_Bool SwAccessibleFrame::IsShowing( const SwRect& rFrm ) const return rFrm.IsOver( maVisArea ); } -inline sal_Bool SwAccessibleFrame::IsShowing( const SwFrmOrObj& rFrmOrObj ) const -{ - return IsShowing( rFrmOrObj.GetBox() ); -} - -inline sal_Bool SwAccessibleFrame::IsShowing() const +inline sal_Bool SwAccessibleFrame::IsShowing( const SwAccessibleMap& rAccMap ) const { - SwFrmOrObj aFrmOrObj( GetFrm() ); - return IsShowing( aFrmOrObj ); + sw::access::SwAccessibleChild aFrmOrObj( GetFrm() ); + return IsShowing( rAccMap, aFrmOrObj ); } inline const SwFrm *SwAccessibleFrame::GetParent() const { - SwFrmOrObj aFrmOrObj( GetFrm() ); + sw::access::SwAccessibleChild aFrmOrObj( GetFrm() ); return GetParent( aFrmOrObj, IsInPagePreview() ); } -inline sal_Int32 SwAccessibleFrame::GetChildCount() const -{ - return GetChildCount( maVisArea, mpFrm, IsInPagePreview() ); -} - -inline SwFrmOrObj SwAccessibleFrame::GetChild( sal_Int32 nPos ) const -{ - return GetChild( maVisArea, mpFrm, nPos, IsInPagePreview() ); -} - -inline sal_Int32 SwAccessibleFrame::GetChildIndex( const SwFrmOrObj& rChild ) const -{ - sal_Int32 nPos = 0; - return GetChildIndex( maVisArea, mpFrm, rChild, nPos, IsInPagePreview() ) ? nPos : -1L; -} - -inline SwFrmOrObj SwAccessibleFrame::GetChildAtPixel( const Point& rPos, - const SwAccessibleMap *pMap ) const -{ - return GetChildAtPixel( maVisArea, mpFrm, rPos, IsInPagePreview(), pMap ); -} - -inline void SwAccessibleFrame::GetChildren( ::std::list< SwFrmOrObj >& rChildren ) const -{ - GetChildren( maVisArea, mpFrm, rChildren, IsInPagePreview() ); -} #endif diff --git a/sw/source/core/access/accframebase.hxx b/sw/source/core/access/accframebase.hxx index b475af5be9..f4a5b52deb 100644 --- a/sw/source/core/access/accframebase.hxx +++ b/sw/source/core/access/accframebase.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -29,13 +29,15 @@ ************************************************************************/ #ifndef _ACCFRAMEBASE_HXX #define _ACCFRAMEBASE_HXX -#ifndef _ACCCONTEXT_HXX -#include "acccontext.hxx" -#endif + +#include + +#include class SwFlyFrm; -class SwAccessibleFrameBase : public SwAccessibleContext, public SwClient +class SwAccessibleFrameBase : public SwAccessibleContext, + public SwClient { sal_Bool bIsSelected; // protected by base class mutex diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx index 3102cc958e..a620b95ddc 100644 --- a/sw/source/core/access/accfrmobj.cxx +++ b/sw/source/core/access/accfrmobj.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,36 +31,382 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include #include -#include -sal_Bool SwFrmOrObj::IsAccessible( sal_Bool bPagePreview ) const +#include + +namespace css = ::com::sun::star; + +namespace sw { namespace access { + +SwAccessibleChild::SwAccessibleChild() + : mpDrawObj( 0 ) + , mpFrm( 0 ) + , mpWindow( 0 ) +{} + +SwAccessibleChild::SwAccessibleChild( const SdrObject* pDrawObj ) + : mpFrm( 0 ) + , mpDrawObj( 0 ) + , mpWindow( 0 ) +{ + Init( pDrawObj ); +} + +SwAccessibleChild::SwAccessibleChild( const SwFrm* pFrm ) + : mpFrm( 0 ) + , mpDrawObj( 0 ) + , mpWindow( 0 ) { - return ( pFrm && pFrm->IsAccessibleFrm() && - ( !pFrm->IsCellFrm() || - static_cast( pFrm )->GetTabBox()->GetSttNd() != 0 ) && - !pFrm->IsInCoveredCell() && - ( bPagePreview || !pFrm->IsPageFrm() ) ) || - pObj; + Init( pFrm ); } -sal_Bool SwFrmOrObj::IsBoundAsChar() const +SwAccessibleChild::SwAccessibleChild( Window* pWindow ) + : mpFrm( 0 ) + , mpDrawObj( 0 ) + , mpWindow( 0 ) { - // currently only SwFrms are accessible - if( pFrm ) + Init( pWindow ); +} + + +SwAccessibleChild::SwAccessibleChild( const SwFrm* pFrm, + const SdrObject* pDrawObj ) +{ + if ( pFrm ) { - return pFrm->IsFlyFrm() && - static_cast< const SwFlyFrm *>(pFrm)->IsFlyInCntFrm(); + Init( pFrm ); } else { - const SwFrmFmt *pFrmFmt = pObj ? ::FindFrmFmt( pObj ) : 0; - return pFrmFmt ? static_cast(FLY_IN_CNTNT == pFrmFmt->GetAnchor().GetAnchorId()) - : sal_False; + Init( pDrawObj ); + } + ASSERT( (!pFrm || pFrm == mpFrm) && (!pDrawObj || pDrawObj == mpDrawObj), + "invalid frame/object combination" ); + +} + +void SwAccessibleChild::Init( const SdrObject* pDrawObj ) +{ + mpDrawObj = pDrawObj; + mpFrm = mpDrawObj && mpDrawObj->ISA(SwVirtFlyDrawObj) + ? static_cast < const SwVirtFlyDrawObj * >( mpDrawObj )->GetFlyFrm() + : 0; + mpWindow = 0; +} + +void SwAccessibleChild::Init( const SwFrm* pFrm ) +{ + mpFrm = pFrm; + mpDrawObj = mpFrm && mpFrm->IsFlyFrm() + ? static_cast < const SwFlyFrm * >( mpFrm )->GetVirtDrawObj() + : 0; + mpWindow = 0; +} + +void SwAccessibleChild::Init( Window* pWindow ) +{ + mpWindow = pWindow; + mpFrm = 0; + mpDrawObj = 0; +} + +bool SwAccessibleChild::IsAccessible( sal_Bool bPagePreview ) const +{ + bool bRet( false ); + + if ( mpFrm ) + { + bRet = mpFrm->IsAccessibleFrm() && + ( !mpFrm->IsCellFrm() || + static_cast( mpFrm )->GetTabBox()->GetSttNd() != 0 ) && + !mpFrm->IsInCoveredCell() && + ( bPagePreview || + !mpFrm->IsPageFrm() ); + } + else if ( mpDrawObj ) + { + bRet = true; } + else if ( mpWindow ) + { + bRet = true; + } + + return bRet; } +bool SwAccessibleChild::IsBoundAsChar() const +{ + bool bRet( false ); + + if ( mpFrm ) + { + bRet = mpFrm->IsFlyFrm() && + static_cast< const SwFlyFrm *>(mpFrm)->IsFlyInCntFrm(); + } + else if ( mpDrawObj ) + { + const SwFrmFmt* mpFrmFmt = ::FindFrmFmt( mpDrawObj ); + bRet = mpFrmFmt + ? (FLY_IN_CNTNT == mpFrmFmt->GetAnchor().GetAnchorId()) + : false; + } + else if ( mpWindow ) + { + bRet = false; + } + + return bRet; +} + +SwAccessibleChild::SwAccessibleChild( const SwAccessibleChild& r ) + : mpFrm( r.mpFrm ) + , mpDrawObj( r.mpDrawObj ) + , mpWindow( r.mpWindow ) +{} + +SwAccessibleChild& SwAccessibleChild::operator=( const SwAccessibleChild& r ) +{ + mpDrawObj = r.mpDrawObj; + mpFrm = r.mpFrm; + mpWindow = r.mpWindow; + + return *this; +} + +SwAccessibleChild& SwAccessibleChild::operator=( const SdrObject* pDrawObj ) +{ + Init( pDrawObj ); + return *this; +} + +SwAccessibleChild& SwAccessibleChild::operator=( const SwFrm* pFrm ) +{ + Init( pFrm ); + return *this; +} + +SwAccessibleChild& SwAccessibleChild::operator=( Window* pWindow ) +{ + Init( pWindow ); + return *this; +} + +bool SwAccessibleChild::operator==( const SwAccessibleChild& r ) const +{ + return mpFrm == r.mpFrm && + mpDrawObj == r.mpDrawObj && + mpWindow == r.mpWindow; +} + +bool SwAccessibleChild::IsValid() const +{ + return mpFrm != 0 || + mpDrawObj != 0 || + mpWindow != 0; +} + +const SdrObject* SwAccessibleChild::GetDrawObject() const +{ + return mpDrawObj; +} + +const SwFrm *SwAccessibleChild::GetSwFrm() const +{ + return mpFrm; +} + +Window* SwAccessibleChild::GetWindow() const +{ + return mpWindow; +} + +bool SwAccessibleChild::IsVisibleChildrenOnly() const +{ + bool bRet( false ); + + if ( !mpFrm ) + { + bRet = true; + } + else + { + bRet = mpFrm->IsRootFrm() || + !( mpFrm->IsTabFrm() || + mpFrm->IsInTab() || + ( IsBoundAsChar() && + static_cast(mpFrm)->GetAnchorFrm()->IsInTab() ) ); + } + + return bRet; +} + +SwRect SwAccessibleChild::GetBox( const SwAccessibleMap& rAccMap ) const +{ + SwRect aBox; + + if ( mpFrm ) + { + if ( mpFrm->IsPageFrm() && + static_cast< const SwPageFrm * >( mpFrm )->IsEmptyPage() ) + { + aBox = SwRect( mpFrm->Frm().Left(), mpFrm->Frm().Top()-1, 1, 1 ); + } + else if ( mpFrm->IsTabFrm() ) + { + aBox = SwRect( mpFrm->Frm() ); + aBox.Intersection( mpFrm->GetUpper()->Frm() ); + } + else + { + aBox = mpFrm->Frm(); + } + } + else if( mpDrawObj ) + { + aBox = SwRect( mpDrawObj->GetCurrentBoundRect() ); + } + else if ( mpWindow ) + { + MapMode aDest( MAP_TWIP ); + aBox = SwRect( rAccMap.GetShell()->GetWin()->PixelToLogic( mpWindow->GetPosPixel(), aDest ), + rAccMap.GetShell()->GetWin()->PixelToLogic( mpWindow->GetSizePixel(), aDest ) ); + } + + return aBox; +} + +SwRect SwAccessibleChild::GetBounds( const SwAccessibleMap& rAccMap ) const +{ + SwRect aBound; + + if( mpFrm ) + { + if( mpFrm->IsPageFrm() && + static_cast< const SwPageFrm * >( mpFrm )->IsEmptyPage() ) + { + aBound = SwRect( mpFrm->Frm().Left(), mpFrm->Frm().Top()-1, 0, 0 ); + } + else + aBound = mpFrm->PaintArea(); + } + else if( mpDrawObj ) + { + aBound = GetBox( rAccMap ); + } + else if ( mpWindow ) + { + aBound = GetBox( rAccMap ); + } + + return aBound; +} + +const SwFrm* SwAccessibleChild::GetParent( const sal_Bool bInPagePreview ) const +{ + const SwFrm* pParent( 0 ); + + if ( mpFrm ) + { + if( mpFrm->IsFlyFrm() ) + { + const SwFlyFrm* pFly = static_cast< const SwFlyFrm *>( mpFrm ); + if( pFly->IsFlyInCntFrm() ) + { + // For FLY_IN_CNTNT the parent is the anchor + pParent = pFly->GetAnchorFrm(); + ASSERT( SwAccessibleChild( pParent ).IsAccessible( bInPagePreview ), + "parent is not accessible" ); + } + else + { + // In any other case the parent is the root frm + // (in page preview, the page frame) + if( bInPagePreview ) + pParent = pFly->FindPageFrm(); + else + pParent = pFly->FindRootFrm(); + } + } + else + { + SwAccessibleChild aUpper( mpFrm->GetUpper() ); + while( aUpper.GetSwFrm() && !aUpper.IsAccessible(bInPagePreview) ) + { + aUpper = aUpper.GetSwFrm()->GetUpper(); + } + pParent = aUpper.GetSwFrm(); + } + } + else if( mpDrawObj ) + { + const SwDrawContact *pContact = + static_cast< const SwDrawContact* >( GetUserCall( mpDrawObj ) ); + ASSERT( pContact, "sdr contact is missing" ); + if( pContact ) + { + const SwFrmFmt *pFrmFmt = pContact->GetFmt(); + ASSERT( pFrmFmt, "frame format is missing" ); + if( pFrmFmt && FLY_IN_CNTNT == pFrmFmt->GetAnchor().GetAnchorId() ) + { + // For FLY_IN_CNTNT the parent is the anchor + pParent = pContact->GetAnchorFrm(); + ASSERT( SwAccessibleChild( pParent ).IsAccessible( bInPagePreview ), + "parent is not accessible" ); + + } + else + { + // In any other case the parent is the root frm + if( bInPagePreview ) + pParent = pContact->GetAnchorFrm()->FindPageFrm(); + else + pParent = pContact->GetAnchorFrm()->FindRootFrm(); + } + } + } + else if ( mpWindow ) + { + css::uno::Reference < css::accessibility::XAccessible > xAcc = + mpWindow->GetAccessible(); + if ( xAcc.is() ) + { + css::uno::Reference < css::accessibility::XAccessibleContext > xAccContext = + xAcc->getAccessibleContext(); + if ( xAccContext.is() ) + { + css::uno::Reference < css::accessibility::XAccessible > xAccParent = + xAccContext->getAccessibleParent(); + if ( xAccParent.is() ) + { + SwAccessibleContext* pAccParentImpl = + dynamic_cast< SwAccessibleContext *>( xAccParent.get() ); + if ( pAccParentImpl ) + { + pParent = pAccParentImpl->GetFrm(); + } + } + } + } + } + + return pParent; +} + +} } // eof of namespace sw::access + diff --git a/sw/source/core/access/accfrmobj.hxx b/sw/source/core/access/accfrmobj.hxx index 29e628acdb..9cdff0be34 100644 --- a/sw/source/core/access/accfrmobj.hxx +++ b/sw/source/core/access/accfrmobj.hxx @@ -29,192 +29,62 @@ ************************************************************************/ #ifndef _ACCFRMOBJ_HXX #define _ACCFRMOBJ_HXX -#include -#include -#include -#include -class SwFrmOrObj -{ - const SdrObject *pObj; - const SwFrm *pFrm; - - inline void Init( const SdrObject *pO ); - inline void Init( const SwFrm *pF ); - -public: - - inline SwFrmOrObj(); - inline explicit SwFrmOrObj( const SdrObject *pO ); - inline explicit SwFrmOrObj( const SwFrm *pF ); - inline SwFrmOrObj( const SwFrm *pF, const SdrObject *pO ); - inline SwFrmOrObj( const SwFrmOrObj& r ); +#include - inline SwFrmOrObj& operator=( const SwFrmOrObj& r ); - inline SwFrmOrObj& operator=( const SdrObject *pO ); - inline SwFrmOrObj& operator=( const SwFrm *pF ); +class SwAccessibleMap; +class SwFrm; +class SdrObject; +class Window; +class SwRect; - inline sal_Bool operator==( const SwFrmOrObj& r ) const; - inline sal_Bool operator==( const SdrObject *pO ) const; - inline sal_Bool operator==( const SwFrm *pF ) const; - - inline sal_Bool IsValid() const; - - inline const SdrObject *GetSdrObject() const; - inline const SwFrm *GetSwFrm() const; - - sal_Bool IsAccessible( sal_Bool bPagePreview ) const; - sal_Bool IsBoundAsChar() const; - inline sal_Bool IsVisibleChildrenOnly() const; - inline SwRect GetBox() const; - inline SwRect GetBounds() const; -}; +namespace sw { namespace access { -inline void SwFrmOrObj::Init( const SdrObject *pO ) +class SwAccessibleChild { - pObj = pO; - // #110094#-1 - pFrm = pObj && pObj->ISA(SwVirtFlyDrawObj) - ? static_cast < const SwVirtFlyDrawObj * >( pObj )->GetFlyFrm() - : 0; -} - -inline void SwFrmOrObj::Init( const SwFrm *pF ) -{ - pFrm = pF; - pObj = pFrm && pFrm->IsFlyFrm() - ? static_cast < const SwFlyFrm * >( pFrm )->GetVirtDrawObj() - : 0; -} + public: + SwAccessibleChild(); + explicit SwAccessibleChild( const SdrObject* pDrawObj ); + explicit SwAccessibleChild( const SwFrm* pFrm ); + explicit SwAccessibleChild( Window* pWindow ); + SwAccessibleChild( const SwFrm* pFrm, + const SdrObject* pDrawObj ); -inline SwFrmOrObj::SwFrmOrObj() : - pObj( 0 ), pFrm( 0 ) -{} + SwAccessibleChild( const SwAccessibleChild& r ); + SwAccessibleChild& operator=( const SwAccessibleChild& r ); -inline SwFrmOrObj::SwFrmOrObj( const SdrObject *pO ) -{ - Init( pO ); -} + SwAccessibleChild& operator=( const SdrObject* pDrawObj ); + SwAccessibleChild& operator=( const SwFrm* pFrm ); + SwAccessibleChild& operator=( Window* pWindow ); -inline SwFrmOrObj::SwFrmOrObj( const SwFrm *pF ) -{ - Init( pF ); -} + bool operator==( const SwAccessibleChild& r ) const; -inline SwFrmOrObj::SwFrmOrObj( const SwFrm *pF, const SdrObject *pO ) -{ - if( pF ) - Init( pF ); - else - Init( pO ); - ASSERT( (!pF || pF == pFrm) && (!pO || pO == pObj), - "invalid frame/object combination" ); + bool IsValid() const; -} + const SwFrm* GetSwFrm() const; + const SdrObject* GetDrawObject() const; + Window* GetWindow() const; -inline SwFrmOrObj::SwFrmOrObj( const SwFrmOrObj& r ) : - pObj( r.pObj ), pFrm( r.pFrm ) -{} + const SwFrm* GetParent( const sal_Bool bInPagePreview ) const; -inline SwFrmOrObj& SwFrmOrObj::operator=( const SwFrmOrObj& r ) -{ - pObj = r.pObj; - pFrm = r.pFrm; - return *this; -} + bool IsAccessible( sal_Bool bPagePreview ) const; + bool IsBoundAsChar() const; -inline SwFrmOrObj& SwFrmOrObj::operator=( const SdrObject *pO ) -{ - Init( pO ); - return *this; -} + bool IsVisibleChildrenOnly() const; + SwRect GetBox( const SwAccessibleMap& rAccMap ) const; + SwRect GetBounds( const SwAccessibleMap& rAccMap ) const; -inline SwFrmOrObj& SwFrmOrObj::operator=( const SwFrm *pF ) -{ - Init( pF ); - return *this; -} + private: + const SwFrm* mpFrm; + const SdrObject* mpDrawObj; + Window* mpWindow; -inline sal_Bool SwFrmOrObj::operator==( const SwFrmOrObj& r ) const -{ - return pObj == r.pObj && pFrm == r.pFrm; -} - -inline sal_Bool SwFrmOrObj::operator==( const SdrObject *pO ) const -{ - return pObj == pO; -} - -inline sal_Bool SwFrmOrObj::operator==( const SwFrm *pF ) const -{ - return pFrm == pF; -} - -inline sal_Bool SwFrmOrObj::IsValid() const -{ - return pObj != 0 || pFrm != 0; -} - -inline const SdrObject *SwFrmOrObj::GetSdrObject() const -{ - return pObj; -} - -inline const SwFrm *SwFrmOrObj::GetSwFrm() const -{ - return pFrm; -} - -inline sal_Bool SwFrmOrObj::IsVisibleChildrenOnly() const -{ - return !pFrm || pFrm->IsRootFrm() || - !( pFrm->IsTabFrm() || pFrm->IsInTab() || - ( IsBoundAsChar() && - static_cast(pFrm)->GetAnchorFrm()->IsInTab()) ); -} + void Init( const SdrObject* pDrawObj ); + void Init( const SwFrm* pFrm ); + void Init( Window* pWindow ); +}; -inline SwRect SwFrmOrObj::GetBox() const -{ - if( pFrm ) - { - if( pFrm->IsPageFrm() && - static_cast< const SwPageFrm * >( pFrm )->IsEmptyPage() ) - { - SwRect aBox( pFrm->Frm().Left(), pFrm->Frm().Top()-1, 1, 1 ); - return aBox; - } - else if ( pFrm->IsTabFrm() ) - { - SwRect aBox( pFrm->Frm() ); - aBox.Intersection( pFrm->GetUpper()->Frm() ); - return aBox; - } - else - return pFrm->Frm(); - } - else if( pObj ) - return SwRect( pObj->GetCurrentBoundRect() ); - else - return SwRect(); -} - -inline SwRect SwFrmOrObj::GetBounds() const -{ - if( pFrm ) - { - if( pFrm->IsPageFrm() && - static_cast< const SwPageFrm * >( pFrm )->IsEmptyPage() ) - { - SwRect aBox( pFrm->Frm().Left(), pFrm->Frm().Top()-1, 0, 0 ); - return aBox; - } - else - return pFrm->PaintArea(); - } - else if( pObj ) - return SwRect( pObj->GetCurrentBoundRect() ); - return SwRect(); -} +} } // eof of namespace sw::access #endif diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx index cc016f5e5b..a28084324f 100644 --- a/sw/source/core/access/accfrmobjmap.cxx +++ b/sw/source/core/access/accfrmobjmap.cxx @@ -31,95 +31,139 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include +#include +#include +#include +#include #include #include #include #include #include -// OD 2004-05-24 #i28701# #include +#include -#ifndef _ACCFFRMOBJMAP_HXX -#include -#endif - -::std::pair< SwFrmOrObjMap::iterator, bool > SwFrmOrObjMap::insert( - sal_uInt32 nPos, const SwFrmOrObj& rLower ) -{ - SwFrmOrObjMapKey aKey( SwFrmOrObjMapKey::TEXT, nPos ); - value_type aEntry( aKey, rLower ); - return _SwFrmOrObjMap::insert( aEntry ); -} - -::std::pair< SwFrmOrObjMap::iterator, bool > SwFrmOrObjMap::insert( - const SdrObject *pObj, const SwFrmOrObj& rLower, const SwDoc *pDoc ) -{ - if( !bLayerIdsValid ) - { - nHellId = pDoc->GetHellId(); - nControlsId = pDoc->GetControlsId(); - bLayerIdsValid = sal_True; - } +#include - SdrLayerID nLayer = pObj->GetLayer(); - SwFrmOrObjMapKey::LayerId eLayerId = (nHellId == nLayer) - ? SwFrmOrObjMapKey::HELL - : ((nControlsId == nLayer) ? SwFrmOrObjMapKey::CONTROLS - : SwFrmOrObjMapKey::HEAVEN); - SwFrmOrObjMapKey aKey( eLayerId, pObj->GetOrdNum() ); - value_type aEntry( aKey, rLower ); - return _SwFrmOrObjMap::insert( aEntry ); -} +using namespace sw::access; -SwFrmOrObjMap::SwFrmOrObjMap( - const SwRect& rVisArea, const SwFrm *pFrm ) : - bLayerIdsValid( sal_False ) +SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, + const SwFrm& rFrm, + SwAccessibleMap& rAccMap ) + : nHellId( rAccMap.GetShell()->GetDoc()->GetHellId() ) + , nControlsId( rAccMap.GetShell()->GetDoc()->GetControlsId() ) { - SwFrmOrObj aFrm( pFrm ); - sal_Bool bVisibleOnly = aFrm.IsVisibleChildrenOnly(); + const bool bVisibleOnly = SwAccessibleChild( &rFrm ).IsVisibleChildrenOnly(); sal_uInt32 nPos = 0; - SwFrmOrObj aLower( pFrm->GetLower() ); + SwAccessibleChild aLower( rFrm.GetLower() ); while( aLower.GetSwFrm() ) { - if( !bVisibleOnly || aLower.GetBox().IsOver( rVisArea ) ) - insert( nPos++, aLower ); + if ( !bVisibleOnly || + aLower.GetBox( rAccMap ).IsOver( rVisArea ) ) + { + insert( nPos++, SwAccessibleChildMapKey::TEXT, aLower ); + } aLower = aLower.GetSwFrm()->GetNext(); } - if( pFrm->IsPageFrm() ) + if ( rFrm.IsPageFrm() ) { ASSERT( bVisibleOnly, "page frame within tab frame???" ); const SwPageFrm *pPgFrm = - static_cast< const SwPageFrm * >( pFrm ); + static_cast< const SwPageFrm * >( &rFrm ); const SwSortedObjs *pObjs = pPgFrm->GetSortedObjs(); - if( pObjs ) + if ( pObjs ) { - const SwDoc *pDoc = pPgFrm->GetFmt()->GetDoc(); for( sal_uInt16 i=0; iCount(); i++ ) { aLower = (*pObjs)[i]->GetDrawObj(); - if( aLower.GetBox().IsOver( rVisArea ) ) - insert( aLower.GetSdrObject(), aLower, pDoc ); + if ( aLower.GetBox( rAccMap ).IsOver( rVisArea ) ) + { + insert( aLower.GetDrawObject(), aLower ); + } } } } - else if( pFrm->IsTxtFrm() ) + else if( rFrm.IsTxtFrm() ) { - const SwDoc *pDoc = static_cast< const SwTxtFrm * >( pFrm )->GetNode() - ->GetDoc(); - const SwSortedObjs *pObjs = pFrm->GetDrawObjs(); - if( pObjs ) + const SwSortedObjs *pObjs = rFrm.GetDrawObjs(); + if ( pObjs ) { for( sal_uInt16 i=0; iCount(); i++ ) { aLower = (*pObjs)[i]->GetDrawObj(); - if( aLower.IsBoundAsChar() && - (!bVisibleOnly || aLower.GetBox().IsOver( rVisArea )) ) - insert( aLower.GetSdrObject(), aLower, pDoc ); + if ( aLower.IsBoundAsChar() && + ( !bVisibleOnly || + aLower.GetBox( rAccMap ).IsOver( rVisArea ) ) ) + { + insert( aLower.GetDrawObject(), aLower ); + } + } + } + + { + ::vos::ORef < SwAccessibleContext > xAccImpl = + rAccMap.GetContextImpl( &rFrm, sal_False ); + if( xAccImpl.isValid() ) + { + SwAccessibleContext* pAccImpl = xAccImpl.getBodyPtr(); + if ( pAccImpl && + pAccImpl->HasAdditionalAccessibleChildren() ) + { + std::vector< Window* >* pAdditionalChildren = + new std::vector< Window* >(); + pAccImpl->GetAdditionalAccessibleChildren( pAdditionalChildren ); + + sal_Int32 nCounter( 0 ); + for ( std::vector< Window* >::iterator aIter = pAdditionalChildren->begin(); + aIter != pAdditionalChildren->end(); + ++aIter ) + { + aLower = (*aIter); + insert( ++nCounter, SwAccessibleChildMapKey::XWINDOW, aLower ); + } + + delete pAdditionalChildren; + } } } } } + +::std::pair< SwAccessibleChildMap::iterator, bool > SwAccessibleChildMap::insert( + const sal_uInt32 nPos, + const SwAccessibleChildMapKey::LayerId eLayerId, + const SwAccessibleChild& rLower ) +{ + SwAccessibleChildMapKey aKey( eLayerId, nPos ); + value_type aEntry( aKey, rLower ); + return _SwAccessibleChildMap::insert( aEntry ); +} + +::std::pair< SwAccessibleChildMap::iterator, bool > SwAccessibleChildMap::insert( + const SdrObject *pObj, + const SwAccessibleChild& rLower ) +{ + const SdrLayerID nLayer = pObj->GetLayer(); + SwAccessibleChildMapKey::LayerId eLayerId = + (nHellId == nLayer) + ? SwAccessibleChildMapKey::HELL + : ( (nControlsId == nLayer) + ? SwAccessibleChildMapKey::CONTROLS + : SwAccessibleChildMapKey::HEAVEN ); + SwAccessibleChildMapKey aKey( eLayerId, pObj->GetOrdNum() ); + value_type aEntry( aKey, rLower ); + return _SwAccessibleChildMap::insert( aEntry ); +} + +/* static */ sal_Bool SwAccessibleChildMap::IsSortingRequired( const SwFrm& rFrm ) +{ + return ( rFrm.IsPageFrm() && + static_cast< const SwPageFrm& >( rFrm ).GetSortedObjs() ) || + ( rFrm.IsTxtFrm() && + rFrm.GetDrawObjs() ); +} diff --git a/sw/source/core/access/accfrmobjmap.hxx b/sw/source/core/access/accfrmobjmap.hxx index bfd83cb4ac..be83922c65 100644 --- a/sw/source/core/access/accfrmobjmap.hxx +++ b/sw/source/core/access/accfrmobjmap.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -29,79 +29,71 @@ ************************************************************************/ #ifndef _ACCFRMOBJMAP_HXX #define _ACCFRMOBJMAP_HXX + #include +#include + #include +class SwAccessibleMap; class SwDoc; +class SwRect; +class SwFrm; +class SdrObject; -class SwFrmOrObjMapKey +class SwAccessibleChildMapKey { public: - enum LayerId { INVALID, HELL, TEXT, HEAVEN, CONTROLS }; + enum LayerId { INVALID, HELL, TEXT, HEAVEN, CONTROLS, XWINDOW }; + + inline SwAccessibleChildMapKey() + : eLayerId( INVALID ) + , nOrdNum( 0 ) + {} + + inline SwAccessibleChildMapKey( LayerId eId, sal_uInt32 nOrd ) + : eLayerId( eId ) + , nOrdNum( nOrd ) + {} + + inline bool operator()( const SwAccessibleChildMapKey& r1, + const SwAccessibleChildMapKey& r2 ) const + { + return (r1.eLayerId == r2.eLayerId) + ? (r1.nOrdNum < r2.nOrdNum) + : (r1.eLayerId < r2.eLayerId); + } + private: LayerId eLayerId; sal_uInt32 nOrdNum; -public: - - inline SwFrmOrObjMapKey(); - inline SwFrmOrObjMapKey( LayerId eId, sal_uInt32 nOrd ); - - inline sal_Bool operator()( const SwFrmOrObjMapKey& r1, - const SwFrmOrObjMapKey& r2 ) const; }; -typedef ::std::map < SwFrmOrObjMapKey, SwFrmOrObj, SwFrmOrObjMapKey > - _SwFrmOrObjMap; +typedef ::std::map < SwAccessibleChildMapKey, sw::access::SwAccessibleChild, SwAccessibleChildMapKey > + _SwAccessibleChildMap; -class SwFrmOrObjMap : public _SwFrmOrObjMap +class SwAccessibleChildMap : public _SwAccessibleChildMap { - SdrLayerID nHellId; - SdrLayerID nControlsId; - sal_Bool bLayerIdsValid; + const SdrLayerID nHellId; + const SdrLayerID nControlsId; - ::std::pair< iterator, bool > insert( sal_uInt32 nPos, - const SwFrmOrObj& rLower ); - ::std::pair< iterator, bool > insert( const SdrObject *pObj, - const SwFrmOrObj& rLower, - const SwDoc *pDoc ); + ::std::pair< iterator, bool > insert( const sal_uInt32 nPos, + const SwAccessibleChildMapKey::LayerId eLayerId, + const sw::access::SwAccessibleChild& rLower ); + ::std::pair< iterator, bool > insert( const SdrObject* pObj, + const sw::access::SwAccessibleChild& rLower ); public: - SwFrmOrObjMap( const SwRect& rVisArea, const SwFrm *pFrm ); + SwAccessibleChildMap( const SwRect& rVisArea, + const SwFrm& rFrm, + SwAccessibleMap& rAccMap ); - inline static sal_Bool IsSortingRequired( const SwFrm *pFrm ); + static sal_Bool IsSortingRequired( const SwFrm& rFrm ); }; -inline SwFrmOrObjMapKey::SwFrmOrObjMapKey() : - eLayerId( INVALID ), - nOrdNum( 0 ) -{ -} - -inline SwFrmOrObjMapKey::SwFrmOrObjMapKey( - LayerId eId, sal_uInt32 nOrd ) : - eLayerId( eId ), - nOrdNum( nOrd ) -{ -} - -inline sal_Bool SwFrmOrObjMapKey::operator()( - const SwFrmOrObjMapKey& r1, - const SwFrmOrObjMapKey& r2 ) const -{ - return (r1.eLayerId == r2.eLayerId) ? (r1.nOrdNum < r2.nOrdNum) : - (r1.eLayerId < r2.eLayerId); -} - -inline sal_Bool SwFrmOrObjMap::IsSortingRequired( const SwFrm *pFrm ) -{ - return ( pFrm->IsPageFrm() && - static_cast< const SwPageFrm * >( pFrm )->GetSortedObjs() ) || - (pFrm->IsTxtFrm() && pFrm->GetDrawObjs() ); -} - #endif diff --git a/sw/source/core/access/accfrmobjslist.cxx b/sw/source/core/access/accfrmobjslist.cxx index 8b69b01375..74c4cc1ae2 100644 --- a/sw/source/core/access/accfrmobjslist.cxx +++ b/sw/source/core/access/accfrmobjslist.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,97 +31,144 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include +#include +#include #include -// OD 2004-05-24 #i28701# #include -#include +#include +using namespace ::sw::access; -SwFrmOrObjSList_const_iterator::SwFrmOrObjSList_const_iterator( - const SwFrmOrObjSList& rLst, sal_Bool ) : - rList( rLst ), aCurr( rList.pFrm->GetLower() ), nNextObj( 0 ) +SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator( + const SwAccessibleChildSList& rLst, + SwAccessibleMap& rAccMap ) + : rList( rLst ), + aCurr( rList.GetFrm().GetLower() ), + nNextObj( 0 ) { if( !aCurr.GetSwFrm() ) { - if( rList.pFrm->IsPageFrm() ) + const SwFrm& rFrm = rList.GetFrm(); + if( rFrm.IsPageFrm() ) { - const SwPageFrm *pPgFrm = - static_cast< const SwPageFrm * >( rList.pFrm ); - const SwSortedObjs *pObjs = pPgFrm->GetSortedObjs(); + const SwPageFrm& rPgFrm = static_cast< const SwPageFrm& >( rFrm ); + const SwSortedObjs *pObjs = rPgFrm.GetSortedObjs(); if( pObjs && pObjs->Count() ) + { aCurr = (*pObjs)[nNextObj++]->GetDrawObj(); + } } - else if( rList.pFrm->IsTxtFrm() ) + else if( rFrm.IsTxtFrm() ) { - const SwSortedObjs *pObjs = rList.pFrm->GetDrawObjs(); - if( pObjs && pObjs->Count() ) + const SwSortedObjs *pObjs = rFrm.GetDrawObjs(); + if ( pObjs && pObjs->Count() ) { aCurr = (*pObjs)[nNextObj++]->GetDrawObj(); while( aCurr.IsValid() && !aCurr.IsBoundAsChar() ) + { aCurr = (nNextObj < pObjs->Count()) - ? (*pObjs)[nNextObj++]->GetDrawObj() - : static_cast< const SdrObject *>( 0 ); - + ? (*pObjs)[nNextObj++]->GetDrawObj() + : static_cast< const SdrObject *>( 0 ); + } + } + if ( !aCurr.IsValid() ) + { + ::vos::ORef < SwAccessibleContext > xAccImpl = + rAccMap.GetContextImpl( &rFrm, sal_False ); + if( xAccImpl.isValid() ) + { + SwAccessibleContext* pAccImpl = xAccImpl.getBodyPtr(); + aCurr = SwAccessibleChild( pAccImpl->GetAdditionalAccessibleChild( 0 ) ); + ++nNextObj; + } } } } - if( rList.bVisibleOnly ) + + if( rList.IsVisibleOnly() ) { // Find the first visible while( aCurr.IsValid() && - !aCurr.GetBox().IsOver( rList.aVisArea ) ) + !aCurr.GetBox( rAccMap ).IsOver( rList.GetVisArea() ) ) + { next(); + } } } -SwFrmOrObjSList_const_iterator& SwFrmOrObjSList_const_iterator::next() +SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::next() { - sal_Bool bGetSdrObject = sal_False; - if( aCurr.GetSdrObject() ) + bool bNextTaken( true ); + if( aCurr.GetDrawObject() || aCurr.GetWindow() ) { - bGetSdrObject = sal_True; + bNextTaken = false; } else if( aCurr.GetSwFrm() ) { aCurr = aCurr.GetSwFrm()->GetNext(); if( !aCurr.GetSwFrm() ) - bGetSdrObject = sal_True; + { + bNextTaken = false; + } } - if( bGetSdrObject ) + if( !bNextTaken ) { - if( rList.pFrm->IsPageFrm() ) + const SwFrm& rFrm = rList.GetFrm(); + if( rFrm.IsPageFrm() ) { - const SwPageFrm *pPgFrm = - static_cast< const SwPageFrm * >( rList.pFrm ); - const SwSortedObjs *pObjs = pPgFrm->GetSortedObjs(); - aCurr = (pObjs && nNextObj < pObjs->Count()) - ? (*pObjs)[nNextObj++]->GetDrawObj() - : static_cast< const SdrObject *>( 0 ); + const SwPageFrm& rPgFrm = static_cast< const SwPageFrm& >( rFrm ); + const SwSortedObjs *pObjs = rPgFrm.GetSortedObjs(); + aCurr = ( pObjs && nNextObj < pObjs->Count() ) + ? (*pObjs)[nNextObj++]->GetDrawObj() + : static_cast< const SdrObject *>( 0 ); } - else if( rList.pFrm->IsTxtFrm() ) + else if( rFrm.IsTxtFrm() ) { - const SwSortedObjs *pObjs = rList.pFrm->GetDrawObjs(); - aCurr = (pObjs && nNextObj < pObjs->Count()) - ? (*pObjs)[nNextObj++]->GetDrawObj() - : static_cast< const SdrObject *>( 0 ); + const SwSortedObjs* pObjs = rFrm.GetDrawObjs(); + const sal_uInt32 nObjsCount = pObjs ? pObjs->Count() : 0; + aCurr = ( pObjs && nNextObj < nObjsCount ) + ? (*pObjs)[nNextObj++]->GetDrawObj() + : static_cast< const SdrObject *>( 0 ); while( aCurr.IsValid() && !aCurr.IsBoundAsChar() ) - aCurr = (nNextObj < pObjs->Count()) - ? (*pObjs)[nNextObj++]->GetDrawObj() - : static_cast< const SdrObject *>( 0 ); + { + aCurr = ( nNextObj < nObjsCount ) + ? (*pObjs)[nNextObj++]->GetDrawObj() + : static_cast< const SdrObject *>( 0 ); + } + if ( !aCurr.IsValid() ) + { + ::vos::ORef < SwAccessibleContext > xAccImpl = + rList.GetAccMap().GetContextImpl( &rFrm, sal_False ); + if( xAccImpl.isValid() ) + { + SwAccessibleContext* pAccImpl = xAccImpl.getBodyPtr(); + aCurr = SwAccessibleChild( pAccImpl->GetAdditionalAccessibleChild( nNextObj - nObjsCount ) ); + ++nNextObj; + } + } } } return *this; } -SwFrmOrObjSList_const_iterator& SwFrmOrObjSList_const_iterator::next_visible() +SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::next_visible() { next(); while( aCurr.IsValid() && - !aCurr.GetBox().IsOver( rList.aVisArea ) ) + !aCurr.GetBox( rList.GetAccMap() ).IsOver( rList.GetVisArea() ) ) + { next(); + } return *this; } + +SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::operator++() +{ + return rList.IsVisibleOnly() ? next_visible() : next(); +} + diff --git a/sw/source/core/access/accfrmobjslist.hxx b/sw/source/core/access/accfrmobjslist.hxx index 8debda313a..df4192ef18 100644 --- a/sw/source/core/access/accfrmobjslist.hxx +++ b/sw/source/core/access/accfrmobjslist.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,117 +31,118 @@ #define _ACCFRMOBJSLIST_HXX #include +#include -class SwFrmOrObjSList; - -class SwFrmOrObjSList_const_iterator -{ - friend class SwFrmOrObjSList; - const SwFrmOrObjSList& rList; // The frame we are iterating over - SwFrmOrObj aCurr; // The current object - sal_uInt16 nNextObj; // The index of the current sdr object - - inline SwFrmOrObjSList_const_iterator( const SwFrmOrObjSList& rLst ); - SwFrmOrObjSList_const_iterator( const SwFrmOrObjSList& rLst, sal_Bool ); +class SwAccessibleMap; -// SwFrmOrObjSList_const_iterator& begin(); - SwFrmOrObjSList_const_iterator& next(); - SwFrmOrObjSList_const_iterator& next_visible(); +class SwAccessibleChildSList; -public: - - inline SwFrmOrObjSList_const_iterator( - const SwFrmOrObjSList_const_iterator& rIter ); - inline sal_Bool operator==( - const SwFrmOrObjSList_const_iterator& r ) const; - inline sal_Bool operator!=( - const SwFrmOrObjSList_const_iterator& r ) const; - inline SwFrmOrObjSList_const_iterator& operator++(); - inline const SwFrmOrObj& operator*() const; -}; - -// An iterator to iterate over a frame's child in any order -class SwFrmOrObjSList +class SwAccessibleChildSList_const_iterator { - friend class SwFrmOrObjSList_const_iterator; +private: + friend class SwAccessibleChildSList; - SwRect aVisArea; - const SwFrm *pFrm; // The frame we are iterating over - sal_Bool bVisibleOnly; - -public: + const SwAccessibleChildSList& rList; // The frame we are iterating over + sw::access::SwAccessibleChild aCurr; // The current object + sal_uInt16 nNextObj; // The index of the current sdr object - typedef SwFrmOrObjSList_const_iterator const_iterator; + inline SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList& rLst ) + : rList( rLst ) + , nNextObj( 0 ) + {} - inline SwFrmOrObjSList( const SwFrm *pF ); - inline SwFrmOrObjSList( const SwRect& rVisArea, const SwFrm *pF ); + SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList& rLst, + SwAccessibleMap& rAccMap ); - inline const_iterator begin() const; - inline const_iterator end() const; -}; - -inline SwFrmOrObjSList_const_iterator::SwFrmOrObjSList_const_iterator( - const SwFrmOrObjSList& rLst ) : - rList( rLst ), nNextObj( 0 ) -{ -} + SwAccessibleChildSList_const_iterator& next(); + SwAccessibleChildSList_const_iterator& next_visible(); -inline SwFrmOrObjSList_const_iterator::SwFrmOrObjSList_const_iterator( - const SwFrmOrObjSList_const_iterator& rIter ) : - rList( rIter.rList ), - aCurr( rIter.aCurr ), - nNextObj( rIter.nNextObj ) -{ -} +public: -inline sal_Bool SwFrmOrObjSList_const_iterator::operator==( - const SwFrmOrObjSList_const_iterator& r ) const -{ - return aCurr == r.aCurr; -} + inline SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList_const_iterator& rIter ) + : rList( rIter.rList ) + , aCurr( rIter.aCurr ) + , nNextObj( rIter.nNextObj ) + {} -inline sal_Bool SwFrmOrObjSList_const_iterator::operator!=( - const SwFrmOrObjSList_const_iterator& r ) const -{ - return !(aCurr == r.aCurr); -} + inline sal_Bool operator==( const SwAccessibleChildSList_const_iterator& r ) const + { + return aCurr == r.aCurr; + } -inline SwFrmOrObjSList_const_iterator& SwFrmOrObjSList_const_iterator::operator++() -{ - return rList.bVisibleOnly ? next_visible() : next(); -} + inline sal_Bool operator!=( + const SwAccessibleChildSList_const_iterator& r ) const + { + return !(*this == r); + } -inline const SwFrmOrObj& SwFrmOrObjSList_const_iterator::operator*() const -{ - return aCurr; -} + SwAccessibleChildSList_const_iterator& operator++(); -inline SwFrmOrObjSList::SwFrmOrObjSList( const SwFrm *pF ) : - pFrm( pF ), - bVisibleOnly( sal_False ) -{ -} + inline const sw::access::SwAccessibleChild& operator*() const + { + return aCurr; + } +}; -inline SwFrmOrObjSList::SwFrmOrObjSList( const SwRect& rVisArea, - const SwFrm *pF ) : - aVisArea( rVisArea ), - pFrm( pF ) +// An iterator to iterate over a frame's child in any order +class SwAccessibleChildSList { - SwFrmOrObj aFrm( pFrm ); - bVisibleOnly = aFrm.IsVisibleChildrenOnly(); -} + const SwRect maVisArea; + const SwFrm& mrFrm; + const sal_Bool mbVisibleOnly; + SwAccessibleMap& mrAccMap; -inline SwFrmOrObjSList_const_iterator SwFrmOrObjSList::begin() const -{ -// SwFrmOrObjSList_const_iterator aIter2( *this ); -// aIter2.begin(); -// return aIter2; - return SwFrmOrObjSList_const_iterator( *this, sal_True ); -} +public: -inline SwFrmOrObjSList_const_iterator SwFrmOrObjSList::end() const -{ - return SwFrmOrObjSList_const_iterator( *this ); -} + typedef SwAccessibleChildSList_const_iterator const_iterator; + + inline SwAccessibleChildSList( const SwFrm& rFrm, + SwAccessibleMap& rAccMap ) + : maVisArea() + , mrFrm( rFrm ) + , mbVisibleOnly( sal_False ) + , mrAccMap( rAccMap ) + {} + + inline SwAccessibleChildSList( const SwRect& rVisArea, + const SwFrm& rFrm, + SwAccessibleMap& rAccMap ) + : maVisArea( rVisArea ) + , mrFrm( rFrm ) + , mbVisibleOnly( sw::access::SwAccessibleChild( &rFrm ).IsVisibleChildrenOnly() ) + , mrAccMap( rAccMap ) + { + } + + inline const_iterator begin() const + { + return SwAccessibleChildSList_const_iterator( *this, mrAccMap ); + } + + inline const_iterator end() const + { + return SwAccessibleChildSList_const_iterator( *this ); + } + + inline const SwFrm& GetFrm() const + { + return mrFrm; + } + + inline sal_Bool IsVisibleOnly() const + { + return mbVisibleOnly; + } + + inline const SwRect& GetVisArea() const + { + return maVisArea; + } + + inline SwAccessibleMap& GetAccMap() const + { + return mrAccMap; + } +}; #endif diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index f07e840248..6a712281e7 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -42,9 +42,7 @@ #include #include #include -#ifndef _ACCCONTEXT_HXX #include -#endif #include #include #include @@ -56,7 +54,7 @@ #include #include #include -#include "fesh.hxx" +#include #include #include #include @@ -64,10 +62,9 @@ #include #include #include +#include #include -#ifndef IDOCUMENTDRAWMODELACCESS_HXX_INCLUDED #include -#endif #include #include #include @@ -80,10 +77,13 @@ #include #include // <-- +#include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::accessibility; using ::rtl::OUString; +using namespace ::sw::access; struct SwFrmFunc { @@ -332,7 +332,7 @@ private: SwRect maOldBox; // the old bounds for CHILD_POS_CHANGED // and POS_CHANGED uno::WeakReference < XAccessible > mxAcc; // The object that fires the event - SwFrmOrObj maFrmOrObj; // the child for CHILD_POS_CHANGED and + SwAccessibleChild maFrmOrObj; // the child for CHILD_POS_CHANGED and // the same as xAcc for any other // event type EventType meType; // The event type @@ -345,7 +345,7 @@ private: public: SwAccessibleEvent_Impl( EventType eT, SwAccessibleContext *pA, - const SwFrmOrObj& rFrmOrObj ) + const SwAccessibleChild& rFrmOrObj ) : mxAcc( pA ), maFrmOrObj( rFrmOrObj ), meType( eT ), @@ -353,7 +353,7 @@ public: {} SwAccessibleEvent_Impl( EventType eT, - const SwFrmOrObj& rFrmOrObj ) + const SwAccessibleChild& rFrmOrObj ) : maFrmOrObj( rFrmOrObj ), meType( eT ), mnStates( 0 ) @@ -372,7 +372,7 @@ public: SwAccessibleEvent_Impl( EventType eT, SwAccessibleContext *pA, - const SwFrmOrObj& rFrmOrObj, + const SwAccessibleChild& rFrmOrObj, const SwRect& rR ) : maOldBox( rR ), mxAcc( pA ), @@ -388,7 +388,7 @@ public: // --> OD 2005-12-12 #i27301# - use new type definition for parameter <_nStates> SwAccessibleEvent_Impl( EventType eT, SwAccessibleContext *pA, - const SwFrmOrObj& rFrmOrObj, + const SwAccessibleChild& rFrmOrObj, const tAccessibleStates _nStates ) : mxAcc( pA ), maFrmOrObj( rFrmOrObj ), @@ -428,7 +428,7 @@ public: maOldBox = rOldBox; } - inline const SwFrmOrObj& GetFrmOrObj() const + inline const SwAccessibleChild& GetFrmOrObj() const { return maFrmOrObj; } @@ -527,22 +527,26 @@ public: //------------------------------------------------------------------------------ -struct SwFrmOrObjFunc +struct SwAccessibleChildFunc { - sal_Bool operator()( const SwFrmOrObj& r1, - const SwFrmOrObj& r2 ) const + sal_Bool operator()( const SwAccessibleChild& r1, + const SwAccessibleChild& r2 ) const { const void *p1 = r1.GetSwFrm() - ? static_cast < const void * >( r1.GetSwFrm()) - : static_cast < const void * >( r1.GetSdrObject() ); + ? static_cast < const void * >( r1.GetSwFrm()) + : ( r1.GetDrawObject() + ? static_cast < const void * >( r1.GetDrawObject() ) + : static_cast < const void * >( r1.GetWindow() ) ); const void *p2 = r2.GetSwFrm() - ? static_cast < const void * >( r2.GetSwFrm()) - : static_cast < const void * >( r2.GetSdrObject() ); + ? static_cast < const void * >( r2.GetSwFrm()) + : ( r2.GetDrawObject() + ? static_cast < const void * >( r2.GetDrawObject() ) + : static_cast < const void * >( r2.GetWindow() ) ); return p1 < p2; } }; -typedef ::std::map < SwFrmOrObj, SwAccessibleEventList_Impl::iterator, - SwFrmOrObjFunc > _SwAccessibleEventMap_Impl; +typedef ::std::map < SwAccessibleChild, SwAccessibleEventList_Impl::iterator, + SwAccessibleChildFunc > _SwAccessibleEventMap_Impl; class SwAccessibleEventMap_Impl: public _SwAccessibleEventMap_Impl { @@ -580,6 +584,222 @@ typedef ::std::map< uno::WeakReference < XAccessible >, class SwAccessibleSelectedParas_Impl: public _SwAccessibleSelectedParas_Impl {}; // <-- + +// helper class that stores preview data +class SwAccPreviewData +{ + typedef std::vector Rectangles; + Rectangles maPreviewRects; + Rectangles maLogicRects; + + SwRect maVisArea; + Fraction maScale; + + const SwPageFrm *mpSelPage; + + /** adjust logic page retangle to its visible part + + OD 17.01.2003 #103492# + + @author OD + + @param _iorLogicPgSwRect + input/output parameter - reference to the logic page rectangle, which + has to be adjusted. + + @param _rPrevwPgSwRect + input parameter - constant reference to the corresponding preview page + rectangle; needed to determine the visible part of the logic page rectangle. + + @param _rPrevwWinSize + input paramter - constant reference to the preview window size in TWIP; + needed to determine the visible part of the logic page rectangle + */ + void AdjustLogicPgRectToVisibleArea( SwRect& _iorLogicPgSwRect, + const SwRect& _rPrevwPgSwRect, + const Size& _rPrevwWinSize ); + +public: + SwAccPreviewData(); + ~SwAccPreviewData(); + + // OD 14.01.2003 #103492# - complete re-factoring of method due to new + // page/print preview functionality. + void Update( const SwAccessibleMap& rAccMap, + const std::vector& _rPrevwPages, + const Fraction& _rScale, + const SwPageFrm* _pSelectedPageFrm, + const Size& _rPrevwWinSize ); + + // OD 14.01.2003 #103492# - complete re-factoring of method due to new + // page/print preview functionality. + void InvalidateSelection( const SwPageFrm* _pSelectedPageFrm ); + + const SwRect& GetVisArea() const; + + MapMode GetMapModeForPreview( ) const; + + /** Adjust the MapMode so that the preview page appears at the + * proper position. rPoint identifies the page for which the + * MapMode should be adjusted. If bFromPreview is true, rPoint is + * a preview coordinate; else it's a document coordinate. */ + // OD 17.01.2003 #103492# - delete unused 3rd parameter. + void AdjustMapMode( MapMode& rMapMode, + const Point& rPoint ) const; + + inline const SwPageFrm *GetSelPage() const { return mpSelPage; } + + void DisposePage(const SwPageFrm *pPageFrm ); +}; + +SwAccPreviewData::SwAccPreviewData() : + mpSelPage( 0 ) +{ +} + +SwAccPreviewData::~SwAccPreviewData() +{ +} + +// OD 13.01.2003 #103492# - complete re-factoring of method due to new page/print +// preview functionality. +void SwAccPreviewData::Update( const SwAccessibleMap& rAccMap, + const std::vector& _rPrevwPages, + const Fraction& _rScale, + const SwPageFrm* _pSelectedPageFrm, + const Size& _rPrevwWinSize ) +{ + // store preview scaling, maximal preview page size and selected page + maScale = _rScale; + mpSelPage = _pSelectedPageFrm; + + // prepare loop on preview pages + maPreviewRects.clear(); + maLogicRects.clear(); + SwAccessibleChild aPage; + maVisArea.Clear(); + + // loop on preview pages to calculate , and + // + for ( std::vector::const_iterator aPageIter = _rPrevwPages.begin(); + aPageIter != _rPrevwPages.end(); + ++aPageIter ) + { + aPage = (*aPageIter)->pPage; + + // add preview page rectangle to + Rectangle aPrevwPgRect( (*aPageIter)->aPrevwWinPos, (*aPageIter)->aPageSize ); + maPreviewRects.push_back( aPrevwPgRect ); + + // add logic page rectangle to + SwRect aLogicPgSwRect( aPage.GetBox( rAccMap ) ); + Rectangle aLogicPgRect( aLogicPgSwRect.SVRect() ); + maLogicRects.push_back( aLogicPgRect ); + // union visible area with visible part of logic page rectangle + if ( (*aPageIter)->bVisible ) + { + if ( !(*aPageIter)->pPage->IsEmptyPage() ) + { + AdjustLogicPgRectToVisibleArea( aLogicPgSwRect, + SwRect( aPrevwPgRect ), + _rPrevwWinSize ); + } + if ( maVisArea.IsEmpty() ) + maVisArea = aLogicPgSwRect; + else + maVisArea.Union( aLogicPgSwRect ); + } + } +} + +// OD 16.01.2003 #103492# - complete re-factoring of method due to new page/print +// preview functionality. +void SwAccPreviewData::InvalidateSelection( const SwPageFrm* _pSelectedPageFrm ) +{ + mpSelPage = _pSelectedPageFrm; + ASSERT( mpSelPage, "selected page not found" ); +} + +struct ContainsPredicate +{ + const Point& mrPoint; + ContainsPredicate( const Point& rPoint ) : mrPoint(rPoint) {} + bool operator() ( const Rectangle& rRect ) const + { + return rRect.IsInside( mrPoint ) ? true : false; + } +}; + +const SwRect& SwAccPreviewData::GetVisArea() const +{ + return maVisArea; +} + +void SwAccPreviewData::AdjustMapMode( MapMode& rMapMode, + const Point& rPoint ) const +{ + // adjust scale + rMapMode.SetScaleX( maScale ); + rMapMode.SetScaleY( maScale ); + + // find proper rectangle + Rectangles::const_iterator aBegin = maLogicRects.begin(); + Rectangles::const_iterator aEnd = maLogicRects.end(); + Rectangles::const_iterator aFound = ::std::find_if( aBegin, aEnd, + ContainsPredicate( rPoint ) ); + + if( aFound != aEnd ) + { + // found! set new origin + Point aPoint = (maPreviewRects.begin() + (aFound - aBegin))->TopLeft(); + aPoint -= (maLogicRects.begin() + (aFound-aBegin))->TopLeft(); + rMapMode.SetOrigin( aPoint ); + } + // else: don't adjust MapMode +} + +void SwAccPreviewData::DisposePage(const SwPageFrm *pPageFrm ) +{ + if( mpSelPage == pPageFrm ) + mpSelPage = 0; +} + +/** adjust logic page retangle to its visible part + + OD 17.01.2003 #103492# + + @author OD +*/ +void SwAccPreviewData::AdjustLogicPgRectToVisibleArea( + SwRect& _iorLogicPgSwRect, + const SwRect& _rPrevwPgSwRect, + const Size& _rPrevwWinSize ) +{ + // determine preview window rectangle + const SwRect aPrevwWinSwRect( Point( 0, 0 ), _rPrevwWinSize ); + // calculate visible preview page rectangle + SwRect aVisPrevwPgSwRect( _rPrevwPgSwRect ); + aVisPrevwPgSwRect.Intersection( aPrevwWinSwRect ); + // adjust logic page rectangle + SwTwips nTmpDiff; + // left + nTmpDiff = aVisPrevwPgSwRect.Left() - _rPrevwPgSwRect.Left(); + if ( nTmpDiff > 0 ) + _iorLogicPgSwRect.Left( _iorLogicPgSwRect.Left() + nTmpDiff ); + // top + nTmpDiff = aVisPrevwPgSwRect.Top() - _rPrevwPgSwRect.Top(); + if ( nTmpDiff > 0 ) + _iorLogicPgSwRect.Top( _iorLogicPgSwRect.Top() + nTmpDiff ); + // right + nTmpDiff = _rPrevwPgSwRect.Right() - aVisPrevwPgSwRect.Right(); + if ( nTmpDiff > 0 ) + _iorLogicPgSwRect.Right( _iorLogicPgSwRect.Right() - nTmpDiff ); + // bottom + nTmpDiff = _rPrevwPgSwRect.Bottom() - aVisPrevwPgSwRect.Bottom(); + if ( nTmpDiff > 0 ) + _iorLogicPgSwRect.Bottom( _iorLogicPgSwRect.Bottom() - nTmpDiff ); +} + //------------------------------------------------------------------------------ static sal_Bool AreInSameTable( const uno::Reference< XAccessible >& rAcc, const SwFrm *pFrm ) @@ -801,7 +1021,7 @@ void SwAccessibleMap::InvalidateCursorPosition( { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl, - SwFrmOrObj(pAccImpl->GetFrm()), + SwAccessibleChild(pAccImpl->GetFrm()), ACC_STATE_CARET ); AppendEvent( aEvent ); } @@ -878,7 +1098,7 @@ void SwAccessibleMap::DoInvalidateShapeSelection() if( bChanged ) { const SwFrm* pParent = SwAccessibleFrame::GetParent( - SwFrmOrObj( pShape->first ), + SwAccessibleChild( pShape->first ), GetShell()->IsPreView() ); aParents.push_back( pParent ); } @@ -1169,7 +1389,7 @@ uno::Reference SwAccessibleMap::GetDocumentPreview( // create & update preview data object if( mpPreview == NULL ) mpPreview = new SwAccPreviewData(); - mpPreview->Update( _rPrevwPages, _rScale, _pSelectedPageFrm, _rPrevwWinSize ); + mpPreview->Update( *this, _rPrevwPages, _rScale, _pSelectedPageFrm, _rPrevwWinSize ); uno::Reference xAcc = _GetDocumentView( sal_True ); return xAcc; @@ -1464,7 +1684,7 @@ void SwAccessibleMap::RemoveContext( const SdrObject *pObj ) void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj, sal_Bool bRecursive ) { - SwFrmOrObj aFrmOrObj( pFrm, pObj ); + SwAccessibleChild aFrmOrObj( pFrm, pObj ); // Indeed, the following assert checks the frame's accessible flag, // because that's the one that is evaluated in the layout. The frame @@ -1517,7 +1737,7 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj, mpShapeMap ) { SwAccessibleShapeMap_Impl::iterator aIter = - mpShapeMap->find( aFrmOrObj.GetSdrObject() ); + mpShapeMap->find( aFrmOrObj.GetDrawObject() ); if( aIter != mpShapeMap->end() ) { uno::Reference < XAccessible > xAcc( (*aIter).second ); @@ -1577,7 +1797,7 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj, } else if( xShapeAccImpl.isValid() ) { - RemoveContext( aFrmOrObj.GetSdrObject() ); + RemoveContext( aFrmOrObj.GetDrawObject() ); xShapeAccImpl->dispose(); } @@ -1590,7 +1810,7 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm, const SdrObject *pObj, const SwRect& rOldBox ) { - SwFrmOrObj aFrmOrObj( pFrm, pObj ); + SwAccessibleChild aFrmOrObj( pFrm, pObj ); if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) ) { ::vos::ORef< SwAccessibleContext > xAccImpl; @@ -1672,7 +1892,7 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm, void SwAccessibleMap::InvalidateContent( const SwFrm *pFrm ) { - SwFrmOrObj aFrmOrObj( pFrm ); + SwAccessibleChild aFrmOrObj( pFrm ); if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) ) { uno::Reference < XAccessible > xAcc; @@ -1711,7 +1931,7 @@ void SwAccessibleMap::InvalidateContent( const SwFrm *pFrm ) // --> OD 2009-01-06 #i88069# void SwAccessibleMap::InvalidateAttr( const SwTxtFrm& rTxtFrm ) { - SwFrmOrObj aFrmOrObj( &rTxtFrm ); + SwAccessibleChild aFrmOrObj( &rTxtFrm ); if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) ) { uno::Reference < XAccessible > xAcc; @@ -1750,7 +1970,7 @@ void SwAccessibleMap::InvalidateAttr( const SwTxtFrm& rTxtFrm ) void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) { - SwFrmOrObj aFrmOrObj( pFrm ); + SwAccessibleChild aFrmOrObj( pFrm ); sal_Bool bShapeSelected = sal_False; const ViewShell *pVSh = GetShell(); if( pVSh->ISA( SwCrsrShell ) ) @@ -1876,7 +2096,7 @@ void SwAccessibleMap::InvalidateStates( tAccessibleStates _nStates, const SwFrm* _pFrm ) { // Start with the frame or the first upper that is accessible - SwFrmOrObj aFrmOrObj( _pFrm ); + SwAccessibleChild aFrmOrObj( _pFrm ); while( aFrmOrObj.GetSwFrm() && !aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) ) aFrmOrObj = aFrmOrObj.GetSwFrm()->GetUpper(); @@ -1890,7 +2110,7 @@ void SwAccessibleMap::InvalidateStates( tAccessibleStates _nStates, { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl, - SwFrmOrObj(pAccImpl->GetFrm()), + SwAccessibleChild(pAccImpl->GetFrm()), _nStates ); AppendEvent( aEvent ); } @@ -1906,7 +2126,7 @@ void SwAccessibleMap::_InvalidateRelationSet( const SwFrm* pFrm, sal_Bool bFrom ) { // first, see if this frame is accessible, and if so, get the respective - SwFrmOrObj aFrmOrObj( pFrm ); + SwAccessibleChild aFrmOrObj( pFrm ); if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) ) { uno::Reference < XAccessible > xAcc; @@ -1932,7 +2152,7 @@ void SwAccessibleMap::_InvalidateRelationSet( const SwFrm* pFrm, if( GetShell()->ActionPend() ) { SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, - pAccImpl, SwFrmOrObj(pFrm), + pAccImpl, SwAccessibleChild(pFrm), ( bFrom ? ACC_STATE_RELATION_FROM : ACC_STATE_RELATION_TO ) ); @@ -1977,7 +2197,7 @@ void SwAccessibleMap::InvalidateParaFlowRelation( const SwTxtFrm& _rTxtFrm, void SwAccessibleMap::InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm ) { // first, see if this frame is accessible, and if so, get the respective - SwFrmOrObj aFrmOrObj( &_rTxtFrm ); + SwAccessibleChild aFrmOrObj( &_rTxtFrm ); if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) ) { uno::Reference < XAccessible > xAcc; @@ -2005,7 +2225,7 @@ void SwAccessibleMap::InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm ) SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl, - SwFrmOrObj( &_rTxtFrm ), + SwAccessibleChild( &_rTxtFrm ), ACC_STATE_TEXT_SELECTION_CHANGED ); AppendEvent( aEvent ); } @@ -2029,7 +2249,7 @@ void SwAccessibleMap::UpdatePreview( const std::vector& _rPrevwPages DBG_ASSERT( mpPreview != NULL, "no preview data?" ); // OD 15.01.2003 #103492# - adjustments for changed method signature - mpPreview->Update( _rPrevwPages, _rScale, _pSelectedPageFrm, _rPrevwWinSize ); + mpPreview->Update( *this, _rPrevwPages, _rScale, _pSelectedPageFrm, _rPrevwWinSize ); // propagate change of VisArea through the document's // accessibility tree; this will also send appropriate scroll @@ -2619,153 +2839,13 @@ void SwAccessibleMap::InvalidateTextSelectionOfAllParas() } } -// -// SwAccPreviewData -// - -SwAccPreviewData::SwAccPreviewData() : - mpSelPage( 0 ) +const SwRect& SwAccessibleMap::GetVisArea() const { -} + DBG_ASSERT( !GetShell()->IsPreView() || (mpPreview != NULL), + "preview without preview data?" ); -SwAccPreviewData::~SwAccPreviewData() -{ + return GetShell()->IsPreView() + ? mpPreview->GetVisArea() + : GetShell()->VisArea(); } -// OD 13.01.2003 #103492# - complete re-factoring of method due to new page/print -// preview functionality. -void SwAccPreviewData::Update( const std::vector& _rPrevwPages, - const Fraction& _rScale, - const SwPageFrm* _pSelectedPageFrm, - const Size& _rPrevwWinSize ) -{ - // store preview scaling, maximal preview page size and selected page - maScale = _rScale; - mpSelPage = _pSelectedPageFrm; - - // prepare loop on preview pages - maPreviewRects.clear(); - maLogicRects.clear(); - SwFrmOrObj aPage; - maVisArea.Clear(); - - // loop on preview pages to calculate , and - // - for ( std::vector::const_iterator aPageIter = _rPrevwPages.begin(); - aPageIter != _rPrevwPages.end(); - ++aPageIter ) - { - aPage = (*aPageIter)->pPage; - - // add preview page rectangle to - Rectangle aPrevwPgRect( (*aPageIter)->aPrevwWinPos, (*aPageIter)->aPageSize ); - maPreviewRects.push_back( aPrevwPgRect ); - - // add logic page rectangle to - SwRect aLogicPgSwRect( aPage.GetBox() ); - Rectangle aLogicPgRect( aLogicPgSwRect.SVRect() ); - maLogicRects.push_back( aLogicPgRect ); - // union visible area with visible part of logic page rectangle - if ( (*aPageIter)->bVisible ) - { - if ( !(*aPageIter)->pPage->IsEmptyPage() ) - { - AdjustLogicPgRectToVisibleArea( aLogicPgSwRect, - SwRect( aPrevwPgRect ), - _rPrevwWinSize ); - } - if ( maVisArea.IsEmpty() ) - maVisArea = aLogicPgSwRect; - else - maVisArea.Union( aLogicPgSwRect ); - } - } -} - -// OD 16.01.2003 #103492# - complete re-factoring of method due to new page/print -// preview functionality. -void SwAccPreviewData::InvalidateSelection( const SwPageFrm* _pSelectedPageFrm ) -{ - mpSelPage = _pSelectedPageFrm; - ASSERT( mpSelPage, "selected page not found" ); -} - -struct ContainsPredicate -{ - const Point& mrPoint; - ContainsPredicate( const Point& rPoint ) : mrPoint(rPoint) {} - bool operator() ( const Rectangle& rRect ) const - { - return rRect.IsInside( mrPoint ) ? true : false; - } -}; - -const SwRect& SwAccPreviewData::GetVisArea() const -{ - return maVisArea; -} - -void SwAccPreviewData::AdjustMapMode( MapMode& rMapMode, - const Point& rPoint ) const -{ - // adjust scale - rMapMode.SetScaleX( maScale ); - rMapMode.SetScaleY( maScale ); - - // find proper rectangle - Rectangles::const_iterator aBegin = maLogicRects.begin(); - Rectangles::const_iterator aEnd = maLogicRects.end(); - Rectangles::const_iterator aFound = ::std::find_if( aBegin, aEnd, - ContainsPredicate( rPoint ) ); - - if( aFound != aEnd ) - { - // found! set new origin - Point aPoint = (maPreviewRects.begin() + (aFound - aBegin))->TopLeft(); - aPoint -= (maLogicRects.begin() + (aFound-aBegin))->TopLeft(); - rMapMode.SetOrigin( aPoint ); - } - // else: don't adjust MapMode -} - -void SwAccPreviewData::DisposePage(const SwPageFrm *pPageFrm ) -{ - if( mpSelPage == pPageFrm ) - mpSelPage = 0; -} - -/** adjust logic page retangle to its visible part - - OD 17.01.2003 #103492# - - @author OD -*/ -void SwAccPreviewData::AdjustLogicPgRectToVisibleArea( - SwRect& _iorLogicPgSwRect, - const SwRect& _rPrevwPgSwRect, - const Size& _rPrevwWinSize ) -{ - // determine preview window rectangle - const SwRect aPrevwWinSwRect( Point( 0, 0 ), _rPrevwWinSize ); - // calculate visible preview page rectangle - SwRect aVisPrevwPgSwRect( _rPrevwPgSwRect ); - aVisPrevwPgSwRect.Intersection( aPrevwWinSwRect ); - // adjust logic page rectangle - SwTwips nTmpDiff; - // left - nTmpDiff = aVisPrevwPgSwRect.Left() - _rPrevwPgSwRect.Left(); - if ( nTmpDiff > 0 ) - _iorLogicPgSwRect.Left( _iorLogicPgSwRect.Left() + nTmpDiff ); - // top - nTmpDiff = aVisPrevwPgSwRect.Top() - _rPrevwPgSwRect.Top(); - if ( nTmpDiff > 0 ) - _iorLogicPgSwRect.Top( _iorLogicPgSwRect.Top() + nTmpDiff ); - // right - nTmpDiff = _rPrevwPgSwRect.Right() - aVisPrevwPgSwRect.Right(); - if ( nTmpDiff > 0 ) - _iorLogicPgSwRect.Right( _iorLogicPgSwRect.Right() - nTmpDiff ); - // bottom - nTmpDiff = _rPrevwPgSwRect.Bottom() - aVisPrevwPgSwRect.Bottom(); - if ( nTmpDiff > 0 ) - _iorLogicPgSwRect.Bottom( _iorLogicPgSwRect.Bottom() - nTmpDiff ); -} diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index a48e36d134..6088f78148 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -31,12 +31,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" #include +#include #include #include #include #include #include -#include "fesh.hxx" +#include #include #include #include @@ -52,48 +53,32 @@ #include #include #include -#include "accpara.hxx" -#ifndef _ACCESS_HRC -#include "access.hrc" -#endif -#include "accportions.hxx" +#include +#include +#include #include // for ExecuteAtViewShell(...) #include // for ExecuteAtViewShell(...) #include // for ExecuteAtViewShell(...) #include // for GetWordBoundary // for get/setCharacterAttribute(...) -#include "unocrsr.hxx" -#include "unoobj.hxx" -#include "unoport.hxx" -#include "doc.hxx" -#include "crsskip.hxx" +#include +#include +#include +#include +#include #include #include #include -// --> OD 2005-12-02 #i27138# #include #include -// <-- #include -// --> OD 2006-07-12 #i63870# #include -// <-- -// --> OD 2007-01-15 #i72800# #include -// <-- -// --> OD 2007-01-15 #i73371# #include -// <-- -// --> OD 2007-01-17 #i71385# #include #include -// <-- -// --> OD 2007-11-12 #i82637# #include -// <-- -// --> OD 2008-05-26 #i71360# #include -// <-- #include @@ -1546,7 +1531,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl( uno::Sequence< ::rtl::OUString > aDummy; _getDefaultAttributesImpl( aDummy, aDefAttrSeq, true ); // <-- - + const SfxItemPropertyMap* pPropMap = aSwMapProvider.GetPropertySet( PROPERTY_MAP_TEXT_CURSOR )->getPropertyMap(); PropertyEntryVector_t aPropertyEntries = pPropMap->getPropertyEntries(); @@ -1691,7 +1676,7 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds( CHECK_FOR_WINDOW( XAccessibleComponent, pWin ); Rectangle aScreenRect( GetMap()->CoreToPixel( aCoreRect.SVRect() )); - SwRect aFrmLogBounds( GetBounds() ); // twip rel to doc root + SwRect aFrmLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root Point aFrmPixPos( GetMap()->CoreToPixel( aFrmLogBounds.SVRect() ).TopLeft() ); aScreenRect.Move( -aFrmPixPos.X(), -aFrmPixPos.Y() ); @@ -1729,7 +1714,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint ) Window *pWin = GetWindow(); CHECK_FOR_WINDOW( XAccessibleComponent, pWin ); Point aPoint( rPoint.X, rPoint.Y ); - SwRect aLogBounds( GetBounds( GetFrm() ) ); // twip rel to doc root + SwRect aLogBounds( GetBounds( *(GetMap()), GetFrm() ) ); // twip rel to doc root Point aPixPos( GetMap()->CoreToPixel( aLogBounds.SVRect() ).TopLeft() ); aPoint.X() += aPixPos.X(); aPoint.Y() += aPixPos.Y(); @@ -2557,7 +2542,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getNumberOfLineWithCaret() Rectangle aScreenRect( GetMap()->CoreToPixel( aCursorCoreRect.SVRect() )); - SwRect aFrmLogBounds( GetBounds() ); // twip rel to doc root + SwRect aFrmLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root Point aFrmPixPos( GetMap()->CoreToPixel( aFrmLogBounds.SVRect() ).TopLeft() ); aScreenRect.Move( -aFrmPixPos.X(), -aFrmPixPos.Y() ); diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx index 057bebe337..09a50922c4 100644 --- a/sw/source/core/access/accpara.hxx +++ b/sw/source/core/access/accpara.hxx @@ -29,24 +29,16 @@ ************************************************************************/ #ifndef _ACCPARA_HXX #define _ACCPARA_HXX -#ifndef _ACCCONTEXT_HXX -#include "acccontext.hxx" -#endif + +#include #include #include #include -// --> OD 2008-05-19 #i71360# #include -// <-- -// --> OD 2008-05-29 #i89175# #include -// <-- - -// --> OD 2006-07-11 #i63870# #include #include -// <-- -#include "accselectionhelper.hxx" +#include class SwTxtFrm; class SwTxtNode; @@ -70,15 +62,9 @@ class SwAccessibleParagraph : public ::com::sun::star::accessibility::XAccessibleEditableText, public com::sun::star::accessibility::XAccessibleSelection, public com::sun::star::accessibility::XAccessibleHypertext, - // --> OD 2008-05-19 #i71360# public com::sun::star::accessibility::XAccessibleTextMarkup, - // <-- - // --> OD 2008-05-29 #i89175# public com::sun::star::accessibility::XAccessibleMultiLineText, - // <-- - // --> OD 2006-07-11 #i63870# public ::com::sun::star::accessibility::XAccessibleTextAttributes - // <-- { friend class SwAccessibleHyperlink; diff --git a/sw/source/core/access/accselectionhelper.cxx b/sw/source/core/access/accselectionhelper.cxx index c06fcfaf34..e4b8aa2a55 100644 --- a/sw/source/core/access/accselectionhelper.cxx +++ b/sw/source/core/access/accselectionhelper.cxx @@ -35,15 +35,14 @@ #include #include -#ifndef _ACCCONTEXT_HXX #include -#endif #include #include #include -#include "fesh.hxx" +#include #include // for SolarMutex #include +#include using namespace ::com::sun::star; @@ -53,7 +52,7 @@ using ::com::sun::star::accessibility::XAccessible; using ::com::sun::star::accessibility::XAccessibleContext; using ::com::sun::star::accessibility::XAccessibleSelection; - +using namespace ::sw::access; SwAccessibleSelectionHelper::SwAccessibleSelectionHelper( SwAccessibleContext& rCtxt ) : @@ -103,7 +102,8 @@ void SwAccessibleSelectionHelper::selectAccessibleChild( vos::OGuard aGuard(Application::GetSolarMutex()); // Get the respective child as SwFrm (also do index checking), ... - const SwFrmOrObj aChild = rContext.GetChild( nChildIndex ); + const SwAccessibleChild aChild = rContext.GetChild( *(rContext.GetMap()), + nChildIndex ); if( !aChild.IsValid() ) throwIndexOutOfBoundsException(); @@ -113,7 +113,7 @@ void SwAccessibleSelectionHelper::selectAccessibleChild( SwFEShell* pFEShell = GetFEShell(); if( pFEShell != NULL ) { - const SdrObject *pObj = aChild.GetSdrObject(); + const SdrObject *pObj = aChild.GetDrawObject(); if( pObj ) { bRet = rContext.Select( const_cast< SdrObject *>( pObj ), 0==aChild.GetSwFrm()); @@ -132,7 +132,8 @@ sal_Bool SwAccessibleSelectionHelper::isAccessibleChildSelected( vos::OGuard aGuard(Application::GetSolarMutex()); // Get the respective child as SwFrm (also do index checking), ... - const SwFrmOrObj aChild = rContext.GetChild( nChildIndex ); + const SwAccessibleChild aChild = rContext.GetChild( *(rContext.GetMap()), + nChildIndex ); if( !aChild.IsValid() ) throwIndexOutOfBoundsException(); @@ -141,13 +142,13 @@ sal_Bool SwAccessibleSelectionHelper::isAccessibleChildSelected( SwFEShell* pFEShell = GetFEShell(); if( pFEShell ) { - if( aChild.GetSwFrm() != 0 ) + if ( aChild.GetSwFrm() != 0 ) { bRet = (pFEShell->GetCurrFlyFrm() == aChild.GetSwFrm()); } - else + else if ( aChild.GetDrawObject() ) { - bRet = pFEShell->IsObjSelected( *aChild.GetSdrObject() ); + bRet = pFEShell->IsObjSelected( *aChild.GetDrawObject() ); } } @@ -171,15 +172,15 @@ void SwAccessibleSelectionHelper::selectAllAccessibleChildren( ) SwFEShell* pFEShell = GetFEShell(); if( pFEShell ) { - ::std::list< SwFrmOrObj > aChildren; - rContext.GetChildren( aChildren ); + ::std::list< SwAccessibleChild > aChildren; + rContext.GetChildren( *(rContext.GetMap()), aChildren ); - ::std::list< SwFrmOrObj >::const_iterator aIter = aChildren.begin(); - ::std::list< SwFrmOrObj >::const_iterator aEndIter = aChildren.end(); + ::std::list< SwAccessibleChild >::const_iterator aIter = aChildren.begin(); + ::std::list< SwAccessibleChild >::const_iterator aEndIter = aChildren.end(); while( aIter != aEndIter ) { - const SwFrmOrObj& rChild = *aIter; - const SdrObject *pObj = rChild.GetSdrObject(); + const SwAccessibleChild& rChild = *aIter; + const SdrObject* pObj = rChild.GetDrawObject(); const SwFrm* pFrm = rChild.GetSwFrm(); if( pObj && !(pFrm != 0 && pFEShell->IsObjSelected()) ) { @@ -203,10 +204,10 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( ) SwFEShell* pFEShell = GetFEShell(); if( pFEShell != 0 ) { - const SwFlyFrm *pFlyFrm = pFEShell->GetCurrFlyFrm(); + const SwFlyFrm* pFlyFrm = pFEShell->GetCurrFlyFrm(); if( pFlyFrm ) { - if( rContext.GetParent( SwFrmOrObj(pFlyFrm), rContext.IsInPagePreview()) == + if( rContext.GetParent( SwAccessibleChild(pFlyFrm), rContext.IsInPagePreview()) == rContext.GetFrm() ) { nCount = 1; @@ -217,20 +218,20 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( ) sal_uInt16 nSelObjs = pFEShell->IsObjSelected(); if( nSelObjs > 0 ) { - ::std::list< SwFrmOrObj > aChildren; - rContext.GetChildren( aChildren ); + ::std::list< SwAccessibleChild > aChildren; + rContext.GetChildren( *(rContext.GetMap()), aChildren ); - ::std::list< SwFrmOrObj >::const_iterator aIter = + ::std::list< SwAccessibleChild >::const_iterator aIter = aChildren.begin(); - ::std::list< SwFrmOrObj >::const_iterator aEndIter = + ::std::list< SwAccessibleChild >::const_iterator aEndIter = aChildren.end(); while( aIter != aEndIter && nCount < nSelObjs ) { - const SwFrmOrObj& rChild = *aIter; - if( rChild.GetSdrObject() && !rChild.GetSwFrm() && + const SwAccessibleChild& rChild = *aIter; + if( rChild.GetDrawObject() && !rChild.GetSwFrm() && rContext.GetParent(rChild, rContext.IsInPagePreview()) == rContext.GetFrm() && - pFEShell->IsObjSelected( *rChild.GetSdrObject() ) ) + pFEShell->IsObjSelected( *rChild.GetDrawObject() ) ) { nCount++; } @@ -257,12 +258,12 @@ Reference SwAccessibleSelectionHelper::getSelectedAccessibleChild( if( 0 == pFEShell ) throwIndexOutOfBoundsException(); - SwFrmOrObj aChild; + SwAccessibleChild aChild; const SwFlyFrm *pFlyFrm = pFEShell->GetCurrFlyFrm(); if( pFlyFrm ) { if( 0 == nSelectedChildIndex && - rContext.GetParent( SwFrmOrObj(pFlyFrm), rContext.IsInPagePreview()) == + rContext.GetParent( SwAccessibleChild(pFlyFrm), rContext.IsInPagePreview()) == rContext.GetFrm() ) { aChild = pFlyFrm; @@ -274,18 +275,18 @@ Reference SwAccessibleSelectionHelper::getSelectedAccessibleChild( if( 0 == nSelObjs || nSelectedChildIndex >= nSelObjs ) throwIndexOutOfBoundsException(); - ::std::list< SwFrmOrObj > aChildren; - rContext.GetChildren( aChildren ); + ::std::list< SwAccessibleChild > aChildren; + rContext.GetChildren( *(rContext.GetMap()), aChildren ); - ::std::list< SwFrmOrObj >::const_iterator aIter = aChildren.begin(); - ::std::list< SwFrmOrObj >::const_iterator aEndIter = aChildren.end(); + ::std::list< SwAccessibleChild >::const_iterator aIter = aChildren.begin(); + ::std::list< SwAccessibleChild >::const_iterator aEndIter = aChildren.end(); while( aIter != aEndIter && !aChild.IsValid() ) { - const SwFrmOrObj& rChild = *aIter; - if( rChild.GetSdrObject() && !rChild.GetSwFrm() && + const SwAccessibleChild& rChild = *aIter; + if( rChild.GetDrawObject() && !rChild.GetSwFrm() && rContext.GetParent(rChild, rContext.IsInPagePreview()) == rContext.GetFrm() && - pFEShell->IsObjSelected( *rChild.GetSdrObject() ) ) + pFEShell->IsObjSelected( *rChild.GetDrawObject() ) ) { if( 0 == nSelectedChildIndex ) aChild = rChild; @@ -312,10 +313,10 @@ Reference SwAccessibleSelectionHelper::getSelectedAccessibleChild( xChild = xChildImpl.getBodyPtr(); } } - else + else if ( aChild.GetDrawObject() ) { ::vos::ORef < ::accessibility::AccessibleShape > xChildImpl( - rContext.GetMap()->GetContextImpl( aChild.GetSdrObject(), + rContext.GetMap()->GetContextImpl( aChild.GetDrawObject(), &rContext, sal_True ) ); if( xChildImpl.isValid() ) xChild = xChildImpl.getBodyPtr(); @@ -331,6 +332,6 @@ void SwAccessibleSelectionHelper::deselectAccessibleChild( { // return sal_False // we can't deselect if( nChildIndex < 0 || - nChildIndex >= rContext.GetChildCount() ) + nChildIndex >= rContext.GetChildCount( *(rContext.GetMap()) ) ) throwIndexOutOfBoundsException(); } diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index 828dc2a500..b607313397 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,26 +45,23 @@ #include #include #include -// --> OD 2007-06-27 #i77106# #include -// <-- #include #include -#include "crsrsh.hxx" -#include "viscrs.hxx" +#include +#include #include -#include "fesh.hxx" +#include #include -#include "accmap.hxx" -#ifndef _ACCESS_HRC -#include "access.hrc" -#endif +#include +#include #include using namespace ::com::sun::star; using namespace ::com::sun::star::accessibility; using ::rtl::OUString; using ::rtl::OUStringBuffer; +using namespace ::sw::access; const sal_Char sServiceName[] = "com.sun.star.table.AccessibleTableView"; const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleTableView"; @@ -86,15 +83,14 @@ public: class SwAccessibleTableData_Impl { + SwAccessibleMap& mrAccMap; Int32Set_Impl maRows; Int32Set_Impl maColumns; Int32PairList_Impl maExtents; // cell extends for event processing only Point maTabFrmPos; const SwTabFrm *mpTabFrm; sal_Bool mbIsInPagePreview; - // --> OD 2007-06-27 #i77106# bool mbOnlyTableColumnHeader; - // <-- void CollectData( const SwFrm *pFrm ); void CollectExtents( const SwFrm *pFrm ); @@ -117,7 +113,8 @@ class SwAccessibleTableData_Impl public: // --> OD 2007-06-27 #i77106# // add third optional parameter , default value - SwAccessibleTableData_Impl( const SwTabFrm *pTabFrm, + SwAccessibleTableData_Impl( SwAccessibleMap& rAccMap, + const SwTabFrm *pTabFrm, sal_Bool bIsInPagePreview, bool bOnlyTableColumnHeader = false ); // <-- @@ -157,12 +154,12 @@ public: void SwAccessibleTableData_Impl::CollectData( const SwFrm *pFrm ) { - const SwFrmOrObjSList aList( pFrm ); - SwFrmOrObjSList::const_iterator aIter( aList.begin() ); - SwFrmOrObjSList::const_iterator aEndIter( aList.end() ); + const SwAccessibleChildSList aList( *pFrm, mrAccMap ); + SwAccessibleChildSList::const_iterator aIter( aList.begin() ); + SwAccessibleChildSList::const_iterator aEndIter( aList.end() ); while( aIter != aEndIter ) { - const SwFrmOrObj& rLower = *aIter; + const SwAccessibleChild& rLower = *aIter; const SwFrm *pLower = rLower.GetSwFrm(); if( pLower ) { @@ -192,12 +189,12 @@ void SwAccessibleTableData_Impl::CollectData( const SwFrm *pFrm ) void SwAccessibleTableData_Impl::CollectExtents( const SwFrm *pFrm ) { - const SwFrmOrObjSList aList( pFrm ); - SwFrmOrObjSList::const_iterator aIter( aList.begin() ); - SwFrmOrObjSList::const_iterator aEndIter( aList.end() ); + const SwAccessibleChildSList aList( *pFrm, mrAccMap ); + SwAccessibleChildSList::const_iterator aIter( aList.begin() ); + SwAccessibleChildSList::const_iterator aEndIter( aList.end() ); while( aIter != aEndIter ) { - const SwFrmOrObj& rLower = *aIter; + const SwAccessibleChild& rLower = *aIter; const SwFrm *pLower = rLower.GetSwFrm(); if( pLower ) { @@ -233,12 +230,12 @@ sal_Bool SwAccessibleTableData_Impl::FindCell( { sal_Bool bFound = sal_False; - const SwFrmOrObjSList aList( pFrm ); - SwFrmOrObjSList::const_iterator aIter( aList.begin() ); - SwFrmOrObjSList::const_iterator aEndIter( aList.end() ); + const SwAccessibleChildSList aList( *pFrm, mrAccMap ); + SwAccessibleChildSList::const_iterator aIter( aList.begin() ); + SwAccessibleChildSList::const_iterator aEndIter( aList.end() ); while( !bFound && aIter != aEndIter ) { - const SwFrmOrObj& rLower = *aIter; + const SwAccessibleChild& rLower = *aIter; const SwFrm *pLower = rLower.GetSwFrm(); ASSERT( pLower, "child should be a frame" ); if( pLower ) @@ -285,15 +282,15 @@ void SwAccessibleTableData_Impl::GetSelection( SwAccTableSelHander_Impl& rSelHdl, sal_Bool bColumns ) const { - const SwFrmOrObjSList aList( pFrm ); - SwFrmOrObjSList::const_iterator aIter( aList.begin() ); - SwFrmOrObjSList::const_iterator aEndIter( aList.end() ); + const SwAccessibleChildSList aList( *pFrm, mrAccMap ); + SwAccessibleChildSList::const_iterator aIter( aList.begin() ); + SwAccessibleChildSList::const_iterator aEndIter( aList.end() ); while( aIter != aEndIter ) { - const SwFrmOrObj& rLower = *aIter; + const SwAccessibleChild& rLower = *aIter; const SwFrm *pLower = rLower.GetSwFrm(); ASSERT( pLower, "child should be a frame" ); - const SwRect& rBox = rLower.GetBox(); + const SwRect& rBox = rLower.GetBox( mrAccMap ); if( pLower && rBox.IsOver( rArea ) ) { if( rLower.IsAccessible( mbIsInPagePreview ) ) @@ -433,15 +430,15 @@ sal_Bool SwAccessibleTableData_Impl::CompareExtents( return sal_True; } -SwAccessibleTableData_Impl::SwAccessibleTableData_Impl( const SwTabFrm *pTabFrm, +SwAccessibleTableData_Impl::SwAccessibleTableData_Impl( SwAccessibleMap& rAccMap, + const SwTabFrm *pTabFrm, sal_Bool bIsInPagePreview, bool bOnlyTableColumnHeader ) - : maTabFrmPos( pTabFrm->Frm().Pos() ), - mpTabFrm( pTabFrm ), - mbIsInPagePreview( bIsInPagePreview ), - // --> OD 2007-06-27 #i77106# - mbOnlyTableColumnHeader( bOnlyTableColumnHeader ) - // <-- + : mrAccMap( rAccMap ) + , maTabFrmPos( pTabFrm->Frm().Pos() ) + , mpTabFrm( pTabFrm ) + , mbIsInPagePreview( bIsInPagePreview ) + , mbOnlyTableColumnHeader( bOnlyTableColumnHeader ) { CollectData( mpTabFrm ); CollectExtents( mpTabFrm ); @@ -644,7 +641,7 @@ const SwTableBox* SwAccessibleTable::GetTableBox( sal_Int32 nChildIndex ) const const SwTableBox* pBox = NULL; // get table box for 'our' table cell - SwFrmOrObj aCell( GetChild( nChildIndex ) ); + SwAccessibleChild aCell( GetChild( *(const_cast(GetMap())), nChildIndex ) ); if( aCell.GetSwFrm() ) { const SwFrm* pChildFrm = aCell.GetSwFrm(); @@ -858,7 +855,7 @@ uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTable::getImplementationId() SwAccessibleTableData_Impl* SwAccessibleTable::CreateNewTableData() { const SwTabFrm* pTabFrm = static_cast( GetFrm() ); - return new SwAccessibleTableData_Impl( pTabFrm, IsInPagePreview() ); + return new SwAccessibleTableData_Impl( *GetMap(), pTabFrm, IsInPagePreview() ); } // <-- @@ -1179,9 +1176,11 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleIndex( CHECK_FOR_DEFUNC( XAccessibleTable ) - SwFrmOrObj aCell( GetTableData().GetCell( nRow, nColumn, sal_False, this )); - if( aCell.IsValid() ) - nRet = GetChildIndex( aCell ); + SwAccessibleChild aCell( GetTableData().GetCell( nRow, nColumn, sal_False, this )); + if ( aCell.IsValid() ) + { + nRet = GetChildIndex( *(GetMap()), aCell ); + } return nRet; } @@ -1203,8 +1202,8 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRow( sal_Int32 nChildIndex ) } // <-- - SwFrmOrObj aCell( GetChild( nChildIndex ) ); - if( aCell.GetSwFrm() ) + SwAccessibleChild aCell( GetChild( *(GetMap()), nChildIndex ) ); + if ( aCell.GetSwFrm() ) { sal_Int32 nTop = aCell.GetSwFrm()->Frm().Top(); nTop -= GetFrm()->Frm().Top(); @@ -1242,8 +1241,8 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumn( } // <-- - SwFrmOrObj aCell( GetChild( nChildIndex ) ); - if( aCell.GetSwFrm() ) + SwAccessibleChild aCell( GetChild( *(GetMap()), nChildIndex ) ); + if ( aCell.GetSwFrm() ) { sal_Int32 nLeft = aCell.GetSwFrm()->Frm().Left(); nLeft -= GetFrm()->Frm().Left(); @@ -1310,8 +1309,8 @@ void SwAccessibleTable::Dispose( sal_Bool bRecursive ) SwAccessibleContext::Dispose( bRecursive ); } -void SwAccessibleTable::DisposeChild( const SwFrmOrObj& rChildFrmOrObj, - sal_Bool bRecursive ) +void SwAccessibleTable::DisposeChild( const SwAccessibleChild& rChildFrmOrObj, + sal_Bool bRecursive ) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -1333,7 +1332,7 @@ void SwAccessibleTable::DisposeChild( const SwFrmOrObj& rChildFrmOrObj, SwAccessibleContext::DisposeChild( rChildFrmOrObj, bRecursive ); } -void SwAccessibleTable::InvalidateChildPosOrSize( const SwFrmOrObj& rChildFrmOrObj, +void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChildFrmOrObj, const SwRect& rOldBox ) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -1664,7 +1663,7 @@ SwAccessibleTableColHeaders::SwAccessibleTableColHeaders( SwAccessibleMap *pMap2 SwAccessibleTableData_Impl* SwAccessibleTableColHeaders::CreateNewTableData() { const SwTabFrm* pTabFrm = static_cast( GetFrm() ); - return new SwAccessibleTableData_Impl( pTabFrm, IsInPagePreview(), true ); + return new SwAccessibleTableData_Impl( *(GetMap()), pTabFrm, IsInPagePreview(), true ); } @@ -1690,11 +1689,11 @@ sal_Int32 SAL_CALL SwAccessibleTableColHeaders::getAccessibleChildCount(void) sal_Int32 nCount = 0; const SwTabFrm* pTabFrm = static_cast( GetFrm() ); - const SwFrmOrObjSList aVisList( GetVisArea(), pTabFrm ); - SwFrmOrObjSList::const_iterator aIter( aVisList.begin() ); + const SwAccessibleChildSList aVisList( GetVisArea(), *pTabFrm, *(GetMap()) ); + SwAccessibleChildSList::const_iterator aIter( aVisList.begin() ); while( aIter != aVisList.end() ) { - const SwFrmOrObj& rLower = *aIter; + const SwAccessibleChild& rLower = *aIter; if( rLower.IsAccessible( IsInPagePreview() ) ) { nCount++; @@ -1705,7 +1704,8 @@ sal_Int32 SAL_CALL SwAccessibleTableColHeaders::getAccessibleChildCount(void) if ( !rLower.GetSwFrm()->IsRowFrm() || pTabFrm->IsInHeadline( *(rLower.GetSwFrm()) ) ) { - nCount += SwAccessibleFrame::GetChildCount( GetVisArea(), + nCount += SwAccessibleFrame::GetChildCount( *(GetMap()), + GetVisArea(), rLower.GetSwFrm(), IsInPagePreview() ); } diff --git a/sw/source/core/access/acctable.hxx b/sw/source/core/access/acctable.hxx index b04f3edaec..7ea6f3a83d 100644 --- a/sw/source/core/access/acctable.hxx +++ b/sw/source/core/access/acctable.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,13 +32,16 @@ #include #include -#ifndef _ACCCONTEXT_HXX -#include "acccontext.hxx" -#endif +#include class SwTabFrm; class SwAccessibleTableData_Impl; class SwTableBox; +class SwSelBoxes; + +namespace sw { namespace access { + class SwAccessibleChild; +} } class SwAccessibleTable : public SwAccessibleContext, @@ -221,9 +224,10 @@ public: // The object is not visible an longer and should be destroyed virtual void Dispose( sal_Bool bRecursive = sal_False ); - virtual void DisposeChild( const SwFrmOrObj& rFrmOrObj, sal_Bool bRecursive ); - virtual void InvalidateChildPosOrSize( const SwFrmOrObj& rFrmOrObj, - const SwRect& rFrm ); + virtual void DisposeChild( const sw::access::SwAccessibleChild& rFrmOrObj, + sal_Bool bRecursive ); + virtual void InvalidateChildPosOrSize( const sw::access::SwAccessibleChild& rFrmOrObj, + const SwRect& rFrm ); //===== XAccessibleSelection ============================================ diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx index 5034cfcc07..3b2fbc69d0 100644 --- a/sw/source/core/fields/postithelper.cxx +++ b/sw/source/core/fields/postithelper.cxx @@ -45,12 +45,50 @@ #include #include #include +#include #include #include #include #include +namespace { + +struct LayoutInfoOrder +{ + bool operator()( const SwLayoutInfo& rLayoutInfo, + const SwLayoutInfo& rNewLayoutInfo ) + { + if ( rLayoutInfo.mnPageNumber != rNewLayoutInfo.mnPageNumber ) + { + // corresponding instances are on different pages + return rLayoutInfo.mnPageNumber < rNewLayoutInfo.mnPageNumber; + } + else + { + // corresponding instances are in different repeating table header rows + ASSERT( rLayoutInfo.mpAnchorFrm->FindTabFrm(), + " - table frame not found" ); + ASSERT( rNewLayoutInfo.mpAnchorFrm->FindTabFrm(), + " - table frame not found" ); + const SwTabFrm* pLayoutInfoTabFrm( rLayoutInfo.mpAnchorFrm->FindTabFrm() ); + const SwTabFrm* pNewLayoutInfoTabFrm( rNewLayoutInfo.mpAnchorFrm->FindTabFrm() ); + const SwTabFrm* pTmpTabFrm( pNewLayoutInfoTabFrm ); + while ( pTmpTabFrm && pTmpTabFrm->GetFollow() ) + { + pTmpTabFrm = static_cast(pTmpTabFrm->GetFollow()->GetFrm()); + if ( pTmpTabFrm == pLayoutInfoTabFrm ) + { + return false; + } + } + return true; + } + } +}; + +} // eof anonymous namespace + SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( std::vector< SwLayoutInfo >& rInfo, SwPosition& rPos ) { SwLayoutStatus aRet = INVISIBLE; @@ -71,7 +109,7 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( std::vector< SwLa { SwLayoutInfo aInfo; pTxtFrm->GetCharRect( aInfo.mPosition, rPos, 0 ); - aInfo.mpAssociatedFrm = pTxtFrm; + aInfo.mpAnchorFrm = pTxtFrm; aInfo.mPageFrame = pPage->Frm(); aInfo.mPagePrtArea = pPage->Prt(); aInfo.mPagePrtArea.Pos() += aInfo.mPageFrame.Pos(); @@ -96,7 +134,14 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( std::vector< SwLa } } } - rInfo.push_back( aInfo ); + + { + std::vector< SwLayoutInfo >::iterator aInsPosIter = + std::lower_bound( rInfo.begin(), rInfo.end(), + aInfo, LayoutInfoOrder() ); + + rInfo.insert( aInsPosIter, aInfo ); + } } } } @@ -147,7 +192,7 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( std::vector< SwLa return aRet; } -SwPosition SwAnnotationItem::GetPosition() +SwPosition SwAnnotationItem::GetAnchorPosition() const { SwTxtFld* pFld = pFmtFld->GetTxtFld(); //if( pFld ) @@ -173,11 +218,14 @@ sw::sidebarwindows::SwSidebarWin* SwAnnotationItem::GetSidebarWindow( SwPostItMgr& aMgr, SwPostItBits aBits) { - return new sw::annotation::SwAnnotationWin( rEditWin, nBits, pFmtFld, aMgr, aBits ); + return new sw::annotation::SwAnnotationWin( rEditWin, nBits, + aMgr, aBits, + *this, + pFmtFld ); } /* -SwPosition SwRedCommentItem::GetPosition() +SwPosition SwRedCommentItem::GetAnchorPosition() { return *pRedline->Start(); } diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx index e4735c0e5c..8ad084e72b 100644 --- a/sw/source/core/inc/viewimp.hxx +++ b/sw/source/core/inc/viewimp.hxx @@ -38,8 +38,8 @@ #include -#include "swtypes.hxx" -#include "swrect.hxx" +#include +#include class ViewShell; class SwFlyFrm; @@ -57,17 +57,10 @@ struct SdrPaintProcRec; class SwAccessibleMap; class SdrObject; class Fraction; -// OD 12.12.2002 #103492# class SwPagePreviewLayout; -// OD 15.01.2003 #103492# -#ifndef _PREVWPAGE_HXX -#include -#endif -// OD 15.01.2003 #103492# +struct PrevwPage; #include -// --> OD 2005-12-01 #i27138# class SwTxtFrm; -// <-- class SwViewImp { diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index b501f6b1dd..45ed8a9e8f 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -2606,6 +2606,15 @@ void ViewShell::InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm ) } } +SwAccessibleMap* ViewShell::GetAccessibleMap() +{ + if ( Imp()->IsAccessible() ) + { + return &(Imp()->GetAccessibleMap()); + } + + return 0; +} /* -----------------------------06.05.2002 13:23------------------------------ ---------------------------------------------------------------------------*/ diff --git a/sw/source/ui/docvw/AnnotationWin.cxx b/sw/source/ui/docvw/AnnotationWin.cxx index b278432091..492cf16002 100644 --- a/sw/source/ui/docvw/AnnotationWin.cxx +++ b/sw/source/ui/docvw/AnnotationWin.cxx @@ -68,10 +68,11 @@ namespace sw { namespace annotation { SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin, WinBits nBits, - SwFmtFld* aField, SwPostItMgr& aMgr, - SwPostItBits aBits) - : SwSidebarWin( rEditWin, nBits, aMgr, aBits ) + SwPostItBits aBits, + SwSidebarItem& rSidebarItem, + SwFmtFld* aField ) + : SwSidebarWin( rEditWin, nBits, aMgr, aBits, rSidebarItem ) , mpFmtFld(aField) , mpFld( static_cast(aField->GetFld())) , mpButtonPopup(0) diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 7636d7cf87..74fe23be51 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -90,8 +91,8 @@ #include "swevent.hxx" -// distance between ankor Y and initial note position -#define POSTIT_INITIAL_ANKOR_DISTANCE 20 +// distance between Anchor Y and initial note position +#define POSTIT_INITIAL_ANCHOR_DISTANCE 20 //distance between two postits #define POSTIT_SPACE_BETWEEN 8 #define POSTIT_MINIMUMSIZE_WITH_META 60 @@ -114,17 +115,22 @@ bool comp_date( const SwPostItItem* a, const SwPostItItem* b) } */ -// if position is on the same line, sort by x (Left) position, otherwise by y(Bottom) position -// if two notes are at the same position, sort by logical node position -bool comp_pos(const SwSidebarItem *a, const SwSidebarItem *b) +// +bool comp_pos(const SwSidebarItem* a, const SwSidebarItem* b) { - return (a->maLayoutInfo.mPosition.Bottom() == b->maLayoutInfo.mPosition.Bottom()) - ? ( ( (a->maLayoutInfo.mPosition.Left() == b->maLayoutInfo.mPosition.Left()) && - (a->GetBroadCaster()->ISA(SwFmtFld) && b->GetBroadCaster()->ISA(SwFmtFld)) ) - ? *(static_cast(a->GetBroadCaster())->GetTxtFld()->GetStart()) < - *(static_cast(b->GetBroadCaster())->GetTxtFld()->GetStart()) - : a->maLayoutInfo.mPosition.Left() < b->maLayoutInfo.mPosition.Left() ) - : a->maLayoutInfo.mPosition.Bottom() < b->maLayoutInfo.mPosition.Bottom(); + // --> OD 2010-01-19 #i88070# + // sort by anchor position +//// if position is on the same line, sort by x (Left) position, otherwise by y(Bottom) position +//// if two notes are at the same position, sort by logical node position +// return (a->maLayoutInfo.mPosition.Bottom() == b->maLayoutInfo.mPosition.Bottom()) +// ? ( ( (a->maLayoutInfo.mPosition.Left() == b->maLayoutInfo.mPosition.Left()) && +// (a->GetBroadCaster()->ISA(SwFmtFld) && b->GetBroadCaster()->ISA(SwFmtFld)) ) +// ? *(static_cast(a->GetBroadCaster())->GetTxtFld()->GetStart()) < +// *(static_cast(b->GetBroadCaster())->GetTxtFld()->GetStart()) +// : a->maLayoutInfo.mPosition.Left() < b->maLayoutInfo.mPosition.Left() ) +// : a->maLayoutInfo.mPosition.Bottom() < b->maLayoutInfo.mPosition.Bottom(); + return a->GetAnchorPosition() < b->GetAnchorPosition(); + // <-- } SwPostItMgr::SwPostItMgr(SwView* pView) @@ -140,12 +146,14 @@ SwPostItMgr::SwPostItMgr(SwView* pView) , mbReadOnly(mpView->GetDocShell()->IsReadOnly()) , mbDeleteNote(true) , mpAnswer(0) + , mbIsShowAnchor( false ) + , mpFrmSidebarWinContainer( 0 ) { if(!mpView->GetDrawView() ) mpView->GetWrtShell().MakeDrawView(); SwNoteProps aProps; - mpIsShowAnkor = aProps.IsShowAnkor(); + mbIsShowAnchor = aProps.IsShowAnchor(); //make sure we get the colour yellow always, even if not the first one of comments or redlining SW_MOD()->GetRedlineAuthor(); @@ -167,6 +175,8 @@ SwPostItMgr::SwPostItMgr(SwView* pView) SwPostItMgr::~SwPostItMgr() { + delete mpFrmSidebarWinContainer; + if ( mnEventId ) Application::RemoveUserEvent( mnEventId ); // forget about all our Sidebar windows @@ -491,8 +501,10 @@ bool SwPostItMgr::CalcRects() SwRect aOldRect(pItem->maLayoutInfo.mPosition); SwPostItHelper::SwLayoutStatus eOldStatus = pItem->mLayoutStatus; std::vector< SwLayoutInfo > aInfo; - SwPosition aPosition = pItem->GetPosition(); - pItem->mLayoutStatus = SwPostItHelper::getLayoutInfos( aInfo, aPosition ); + { + SwPosition aPosition = pItem->GetAnchorPosition(); + pItem->mLayoutStatus = SwPostItHelper::getLayoutInfos( aInfo, aPosition ); + } if( aInfo.size() ) { pItem->maLayoutInfo = aInfo[0]; @@ -503,7 +515,7 @@ bool SwPostItMgr::CalcRects() } // show notes in right order in navigator - //prevent ankors during layout to overlap, e.g. when moving a frame + //prevent Anchors during layout to overlap, e.g. when moving a frame Sort(SORT_POS); // sort the items into the right page vector, so layout can be done by page @@ -674,7 +686,7 @@ void SwPostItMgr::LayoutPostIts() pPostIt->SetChangeTracking( pItem->mLayoutStatus, - GetColorAnkor(pItem->maLayoutInfo.mRedlineAuthor)); + GetColorAnchor(pItem->maLayoutInfo.mRedlineAuthor)); pPostIt->SetSidebarPosition(mPages[n]->eSidebarPosition); pPostIt->SetFollow(pPostIt->CalcFollow()); aPostItHeight = ( pPostIt->GetPostItTextHeight() < pPostIt->GetMinimumSizeWithoutMeta() @@ -687,6 +699,7 @@ void SwPostItMgr::LayoutPostIts() aPostItHeight, pItem->maLayoutInfo.mPosition, mlPageEnd ); + pPostIt->ChangeSidebarItem( *pItem ); if (pItem->bFocus) { @@ -1659,23 +1672,23 @@ void SwPostItMgr::CorrectPositions() return; // yeah, I know, if this is a left page it could be wrong, but finding the page and the note is probably not even faster than just doing it - const long aAnkorX = mpEditWin->LogicToPixel( Point((long)(pFirstPostIt->Anchor()->GetSixthPosition().getX()),0)).X(); - const long aAnkorY = mpEditWin->LogicToPixel( Point(0,(long)(pFirstPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1; - if (Point(aAnkorX,aAnkorY) != pFirstPostIt->GetPosPixel()) + const long aAnchorX = mpEditWin->LogicToPixel( Point((long)(pFirstPostIt->Anchor()->GetSixthPosition().getX()),0)).X(); + const long aAnchorY = mpEditWin->LogicToPixel( Point(0,(long)(pFirstPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1; + if (Point(aAnchorX,aAnchorY) != pFirstPostIt->GetPosPixel()) { - long aAnkorPosX = 0; - long aAnkorPosY = 0; + long aAnchorPosX = 0; + long aAnchorPosY = 0; for (unsigned long n=0;nmList->begin(); i!= mPages[n]->mList->end(); i++) { if ((*i)->bShow && (*i)->pPostIt) { - aAnkorPosX = mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT + aAnchorPosX = mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT ? mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Anchor()->GetSeventhPosition().getX()),0)).X() : mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Anchor()->GetSixthPosition().getX()),0)).X(); - aAnkorPosY = mpEditWin->LogicToPixel( Point(0,(long)((*i)->pPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1; - (*i)->pPostIt->SetPosPixel(Point(aAnkorPosX,aAnkorPosY)); + aAnchorPosY = mpEditWin->LogicToPixel( Point(0,(long)((*i)->pPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1; + (*i)->pPostIt->SetPosPixel(Point(aAnchorPosX,aAnchorPosY)); } } } @@ -1746,16 +1759,16 @@ Color SwPostItMgr::GetColorLight(sal_uInt16 aAuthorIndex) return Color(COL_WHITE); } -Color SwPostItMgr::GetColorAnkor(sal_uInt16 aAuthorIndex) +Color SwPostItMgr::GetColorAnchor(sal_uInt16 aAuthorIndex) { if (!Application::GetSettings().GetStyleSettings().GetHighContrastMode()) { - static const Color aArrayAnkor[] = { + static const Color aArrayAnchor[] = { COL_AUTHOR1_DARK, COL_AUTHOR2_DARK, COL_AUTHOR3_DARK, COL_AUTHOR4_DARK, COL_AUTHOR5_DARK, COL_AUTHOR6_DARK, COL_AUTHOR7_DARK, COL_AUTHOR8_DARK, COL_AUTHOR9_DARK }; - return Color( aArrayAnkor[ aAuthorIndex % (sizeof( aArrayAnkor ) / sizeof( aArrayAnkor[0] ))]); + return Color( aArrayAnchor[ aAuthorIndex % (sizeof( aArrayAnchor ) / sizeof( aArrayAnchor[0] ))]); } else return Color(COL_WHITE); @@ -1813,7 +1826,7 @@ void SwPostItMgr::Rescale() sal_Int32 SwPostItMgr::GetInitialAnchorDistance() const { const Fraction& f( mpEditWin->GetMapMode().GetScaleY() ); - return POSTIT_INITIAL_ANKOR_DISTANCE * f.GetNumerator() / f.GetDenominator(); + return POSTIT_INITIAL_ANCHOR_DISTANCE * f.GetNumerator() / f.GetDenominator(); } sal_Int32 SwPostItMgr::GetSpaceBetween() const @@ -1984,3 +1997,58 @@ void SwPostItMgr::ToggleInsModeOnActiveSidebarWin() mpActivePostIt->ToggleInsMode(); } } + +void SwPostItMgr::ConnectSidebarWinToFrm( const SwFrm& rFrm, + const SwFmtFld& rFmtFld, + SwSidebarWin& rSidebarWin ) +{ + if ( mpFrmSidebarWinContainer == 0 ) + { + mpFrmSidebarWinContainer = new SwFrmSidebarWinContainer(); + } + + mpFrmSidebarWinContainer->insert( rFrm, rFmtFld, rSidebarWin ); +} + +void SwPostItMgr::DisconnectSidebarWinFromFrm( const SwFrm& rFrm, + SwSidebarWin& rSidebarWin ) +{ + if ( mpFrmSidebarWinContainer != 0 ) + { + mpFrmSidebarWinContainer->remove( rFrm, rSidebarWin ); + } +} + +bool SwPostItMgr::HasFrmConnectedSidebarWins( const SwFrm& rFrm ) +{ + bool bRet( false ); + + if ( mpFrmSidebarWinContainer != 0 ) + { + bRet = !mpFrmSidebarWinContainer->empty( rFrm ); + } + + return bRet; +} + +Window* SwPostItMgr::GetSidebarWinForFrmByIndex( const SwFrm& rFrm, + const sal_Int32 nIndex ) +{ + Window* pSidebarWin( 0 ); + + if ( mpFrmSidebarWinContainer != 0 ) + { + pSidebarWin = mpFrmSidebarWinContainer->get( rFrm, nIndex ); + } + + return pSidebarWin; +} + +void SwPostItMgr::GetAllSidebarWinForFrm( const SwFrm& rFrm, + std::vector< Window* >* pChildren ) +{ + if ( mpFrmSidebarWinContainer != 0 ) + { + mpFrmSidebarWinContainer->getAll( rFrm, pChildren ); + } +} diff --git a/sw/source/ui/docvw/SidebarTxtControl.cxx b/sw/source/ui/docvw/SidebarTxtControl.cxx index 7b421327e4..8cd3503136 100644 --- a/sw/source/ui/docvw/SidebarTxtControl.cxx +++ b/sw/source/ui/docvw/SidebarTxtControl.cxx @@ -75,7 +75,6 @@ SidebarTxtControl::SidebarTxtControl( SwSidebarWin& rSidebarWin, SwView& rDocView, SwPostItMgr& rPostItMgr ) : Control( &rSidebarWin, nBits ) - , mpOutlinerView(0) , mrSidebarWin( rSidebarWin ) , mrDocView( rDocView ) , mrPostItMgr( rPostItMgr ) @@ -89,6 +88,11 @@ SidebarTxtControl::~SidebarTxtControl() RemoveEventListener( LINK( &mrSidebarWin, SwSidebarWin, WindowEventListener ) ); } +OutlinerView* SidebarTxtControl::GetTextView() const +{ + return mrSidebarWin.GetOutlinerView(); +} + void SidebarTxtControl::GetFocus() { Window::GetFocus(); @@ -155,7 +159,10 @@ void SidebarTxtControl::Paint( const Rectangle& rRect) } } - mpOutlinerView->Paint( rRect ); + if ( GetTextView() ) + { + GetTextView()->Paint( rRect ); + } if ( mrSidebarWin.GetLayoutStatus()==SwPostItHelper::DELETED ) { @@ -210,7 +217,7 @@ void SidebarTxtControl::KeyInput( const KeyEvent& rKeyEvt ) ( bIsProtected && !mrSidebarWin.GetOutlinerView()->GetOutliner()->GetEditEngine().DoesKeyChangeText(rKeyEvt)) ) { - bDone = mpOutlinerView->PostKeyEvent( rKeyEvt ); + bDone = GetTextView() && GetTextView()->PostKeyEvent( rKeyEvt ); } else { @@ -234,14 +241,15 @@ void SidebarTxtControl::KeyInput( const KeyEvent& rKeyEvt ) void SidebarTxtControl::MouseMove( const MouseEvent& rMEvt ) { - if ( mpOutlinerView ) + if ( GetTextView() ) { - mpOutlinerView->MouseMove( rMEvt ); + OutlinerView* pOutlinerView( GetTextView() ); + pOutlinerView->MouseMove( rMEvt ); // mba: why does OutlinerView not handle the modifier setting?! // this forces the postit to handle *all* pointer types - SetPointer( mpOutlinerView->GetPointer( rMEvt.GetPosPixel() ) ); + SetPointer( pOutlinerView->GetPointer( rMEvt.GetPosPixel() ) ); - const EditView& aEV = mpOutlinerView->GetEditView(); + const EditView& aEV = pOutlinerView->GetEditView(); const SvxFieldItem* pItem = aEV.GetFieldUnderMousePointer(); if ( pItem ) { @@ -264,14 +272,14 @@ void SidebarTxtControl::MouseMove( const MouseEvent& rMEvt ) void SidebarTxtControl::MouseButtonDown( const MouseEvent& rMEvt ) { - if (mpOutlinerView ) + if ( GetTextView() ) { SvtSecurityOptions aSecOpts; bool bExecuteMod = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK); if ( !bExecuteMod || (bExecuteMod && rMEvt.GetModifier() == KEY_MOD1)) { - const EditView& aEV = mpOutlinerView->GetEditView(); + const EditView& aEV = GetTextView()->GetEditView(); const SvxFieldItem* pItem = aEV.GetFieldUnderMousePointer(); if ( pItem ) { @@ -279,7 +287,7 @@ void SidebarTxtControl::MouseButtonDown( const MouseEvent& rMEvt ) const SvxURLField* pURL = PTR_CAST( SvxURLField, pFld ); if ( pURL ) { - mpOutlinerView->MouseButtonDown( rMEvt ); + GetTextView()->MouseButtonDown( rMEvt ); SwWrtShell &rSh = mrDocView.GetWrtShell(); String sURL( pURL->GetURL() ); String sTarget( pURL->GetTargetFrame() ); @@ -291,15 +299,17 @@ void SidebarTxtControl::MouseButtonDown( const MouseEvent& rMEvt ) } GrabFocus(); - if ( mpOutlinerView ) - mpOutlinerView->MouseButtonDown( rMEvt ); + if ( GetTextView() ) + { + GetTextView()->MouseButtonDown( rMEvt ); + } mrDocView.GetViewFrame()->GetBindings().InvalidateAll(FALSE); } void SidebarTxtControl::MouseButtonUp( const MouseEvent& rMEvt ) { - if ( mpOutlinerView ) - mpOutlinerView->MouseButtonUp( rMEvt ); + if ( GetTextView() ) + GetTextView()->MouseButtonUp( rMEvt ); } IMPL_LINK( SidebarTxtControl, OnlineSpellCallback, SpellCallbackInfo*, pInfo ) @@ -321,11 +331,12 @@ void SidebarTxtControl::Command( const CommandEvent& rCEvt ) { if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ) { - if (!mrSidebarWin.IsProtected() && - mpOutlinerView->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(),TRUE )) + if ( !mrSidebarWin.IsProtected() && + GetTextView() && + GetTextView()->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(),TRUE )) { Link aLink = LINK(this, SidebarTxtControl, OnlineSpellCallback); - mpOutlinerView->ExecuteSpellPopup(rCEvt.GetMousePosPixel(),&aLink); + GetTextView()->ExecuteSpellPopup(rCEvt.GetMousePosPixel(),&aLink); } else { @@ -373,8 +384,8 @@ void SidebarTxtControl::Command( const CommandEvent& rCEvt ) } else { - if ( mpOutlinerView ) - mpOutlinerView->Command( rCEvt ); + if ( GetTextView() ) + GetTextView()->Command( rCEvt ); else Window::Command(rCEvt); } @@ -382,16 +393,16 @@ void SidebarTxtControl::Command( const CommandEvent& rCEvt ) XubString SidebarTxtControl::GetSurroundingText() const { - if( mpOutlinerView ) - return mpOutlinerView->GetSurroundingText(); + if( GetTextView() ) + return GetTextView()->GetSurroundingText(); else return XubString::EmptyString(); } Selection SidebarTxtControl::GetSurroundingTextSelection() const { - if( mpOutlinerView ) - return mpOutlinerView->GetSurroundingTextSelection(); + if( GetTextView() ) + return GetTextView()->GetSurroundingTextSelection(); else return Selection( 0, 0 ); } diff --git a/sw/source/ui/docvw/SidebarTxtControl.hxx b/sw/source/ui/docvw/SidebarTxtControl.hxx index 5ce309e5f2..ba517fff6b 100644 --- a/sw/source/ui/docvw/SidebarTxtControl.hxx +++ b/sw/source/ui/docvw/SidebarTxtControl.hxx @@ -46,7 +46,6 @@ class SwSidebarWin; class SidebarTxtControl : public Control { private: - OutlinerView* mpOutlinerView; SwSidebarWin& mrSidebarWin; SwView& mrDocView; SwPostItMgr& mrPostItMgr; @@ -76,14 +75,7 @@ class SidebarTxtControl : public Control virtual void GetFocus(); - inline void SetTextView( OutlinerView* aEditView ) - { - mpOutlinerView = aEditView; - } - inline OutlinerView* GetTextView() const - { - return mpOutlinerView; - } + OutlinerView* GetTextView() const; DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*); diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx index e01041d79f..82049b954e 100644 --- a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx +++ b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx @@ -44,6 +44,7 @@ #include #include + namespace css = ::com::sun::star; namespace sw { namespace sidebarwindows { @@ -82,12 +83,18 @@ SidebarTextEditSource::SidebarTextEditSource( SidebarTxtControl& rSidebarTxtCont , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), NULL ) , mViewForwarder( *(rSidebarTxtControl.GetTextView()) ) { - mrSidebarTxtControl.GetTextView()->GetOutliner()->SetNotifyHdl( LINK(this, SidebarTextEditSource, NotifyHdl) ); + if ( mrSidebarTxtControl.GetTextView() ) + { + mrSidebarTxtControl.GetTextView()->GetOutliner()->SetNotifyHdl( LINK(this, SidebarTextEditSource, NotifyHdl) ); + } } SidebarTextEditSource::~SidebarTextEditSource() { - mrSidebarTxtControl.GetTextView()->GetOutliner()->SetNotifyHdl( Link() ); + if ( mrSidebarTxtControl.GetTextView() ) + { + mrSidebarTxtControl.GetTextView()->GetOutliner()->SetNotifyHdl( Link() ); + } } SvxEditSource* SidebarTextEditSource::Clone() const @@ -172,12 +179,17 @@ class SidebarTxtControlAccessibleContext : public VCLXAccessibleComponent private: SidebarTxtControl& mrSidebarTxtControl; ::accessibility::AccessibleTextHelper* mpAccessibleTextHelper; + + ::vos::OMutex maMutex; + + void defunc(); }; SidebarTxtControlAccessibleContext::SidebarTxtControlAccessibleContext( SidebarTxtControl& rSidebarTxtControl ) : VCLXAccessibleComponent( rSidebarTxtControl.GetWindowPeer() ) , mrSidebarTxtControl( rSidebarTxtControl ) , mpAccessibleTextHelper( 0 ) + , maMutex() { ::std::auto_ptr pEditSource( new SidebarTextEditSource( mrSidebarTxtControl ) ); @@ -186,52 +198,94 @@ SidebarTxtControlAccessibleContext::SidebarTxtControlAccessibleContext( SidebarT } SidebarTxtControlAccessibleContext::~SidebarTxtControlAccessibleContext() +{ + defunc(); +} + +void SidebarTxtControlAccessibleContext::defunc() { delete mpAccessibleTextHelper; + mpAccessibleTextHelper = 0; } sal_Int32 SAL_CALL SidebarTxtControlAccessibleContext::getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException) { - return mpAccessibleTextHelper->GetChildCount(); + vos::OGuard aGuard( maMutex ); + + sal_Int32 nChildCount( 0 ); + + if ( mpAccessibleTextHelper ) + { + nChildCount = mpAccessibleTextHelper->GetChildCount(); + } + + return nChildCount; } css::uno::Reference< css::accessibility::XAccessible > SAL_CALL SidebarTxtControlAccessibleContext::getAccessibleChild( sal_Int32 i ) throw ( css::lang::IndexOutOfBoundsException, css::uno::RuntimeException ) { - return mpAccessibleTextHelper->GetChild( i ); + vos::OGuard aGuard( maMutex ); + + css::uno::Reference< css::accessibility::XAccessible > xChild; + + if ( mpAccessibleTextHelper ) + { + xChild = mpAccessibleTextHelper->GetChild( i ); + } + + return xChild; } void SAL_CALL SidebarTxtControlAccessibleContext::addEventListener ( const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener) throw (css::uno::RuntimeException) { - mpAccessibleTextHelper->AddEventListener(xListener); + vos::OGuard aGuard( maMutex ); + + if ( mpAccessibleTextHelper ) + { + mpAccessibleTextHelper->AddEventListener(xListener); + } } void SAL_CALL SidebarTxtControlAccessibleContext::removeEventListener ( const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener) throw (css::uno::RuntimeException) { - mpAccessibleTextHelper->RemoveEventListener(xListener); + vos::OGuard aGuard( maMutex ); + + if ( mpAccessibleTextHelper ) + { + mpAccessibleTextHelper->RemoveEventListener(xListener); + } } void SidebarTxtControlAccessibleContext::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { - switch ( rVclWindowEvent.GetId() ) + if ( mpAccessibleTextHelper ) { - case VCLEVENT_WINDOW_GETFOCUS: - case VCLEVENT_CONTROL_GETFOCUS: - { - mpAccessibleTextHelper->SetFocus( sal_True ); - } - break; - case VCLEVENT_WINDOW_LOSEFOCUS: - case VCLEVENT_CONTROL_LOSEFOCUS: + switch ( rVclWindowEvent.GetId() ) { - mpAccessibleTextHelper->SetFocus( sal_False ); + case VCLEVENT_OBJECT_DYING: + { + defunc(); + } + break; + case VCLEVENT_WINDOW_GETFOCUS: + case VCLEVENT_CONTROL_GETFOCUS: + { + mpAccessibleTextHelper->SetFocus( sal_True ); + } + break; + case VCLEVENT_WINDOW_LOSEFOCUS: + case VCLEVENT_CONTROL_LOSEFOCUS: + { + mpAccessibleTextHelper->SetFocus( sal_False ); + } + break; } - break; } VCLXAccessibleComponent::ProcessWindowEvent( rVclWindowEvent ); diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx index 1dc845f292..683d513255 100644 --- a/sw/source/ui/docvw/SidebarWin.cxx +++ b/sw/source/ui/docvw/SidebarWin.cxx @@ -31,6 +31,7 @@ #include "precompiled_sw.hxx" #include +#include #include #include @@ -92,7 +93,8 @@ namespace sw { namespace sidebarwindows { SwSidebarWin::SwSidebarWin( SwEditWin& rEditWin, WinBits nBits, SwPostItMgr& aMgr, - SwPostItBits aBits) + SwPostItBits aBits, + SwSidebarItem& rSidebarItem ) : Window(&rEditWin, nBits) , mrMgr(aMgr) , mrView( rEditWin.GetView() ) @@ -119,24 +121,34 @@ SwSidebarWin::SwSidebarWin( SwEditWin& rEditWin, , mLayoutStatus( SwPostItHelper::INVISIBLE ) , mbReadonly( false ) , mbIsFollow( false ) + , mrSidebarItem( rSidebarItem ) { mpShadow = ShadowOverlayObject::CreateShadowOverlayObject( mrView ); if ( mpShadow ) { mpShadow->setVisible(false); } + + mrMgr.ConnectSidebarWinToFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm), + *(mrSidebarItem.GetFmtFld()), + *this ); } SwSidebarWin::~SwSidebarWin() { - if (mpOutlinerView) + if ( mpSidebarTxtControl ) { - delete mpOutlinerView; + if ( mpOutlinerView ) + { + mpOutlinerView->SetWindow( 0 ); + } + delete mpSidebarTxtControl; } - if (mpSidebarTxtControl) + if ( mpOutlinerView ) { - delete mpSidebarTxtControl; + delete mpOutlinerView; + mpOutlinerView = 0; } if (mpOutliner) @@ -160,11 +172,14 @@ SwSidebarWin::~SwSidebarWin() { mpVScrollbar->RemoveEventListener( LINK( this, SwSidebarWin, WindowEventListener ) ); delete mpVScrollbar; + mpVScrollbar = 0; } AnchorOverlayObject::DestroyAnchorOverlayObject( mpAnchor ); + mpAnchor = 0; ShadowOverlayObject::DestroyShadowOverlayObject( mpShadow ); + mpShadow = 0; delete mpMenuButton; @@ -189,10 +204,12 @@ void SwSidebarWin::Paint( const Rectangle& rRect) } SetLineColor(); DrawRect( PixelToLogic( - Rectangle( Point( mpMetadataAuthor->GetPosPixel().X()+mpMetadataAuthor->GetSizePixel().Width(), + Rectangle( Point( mpMetadataAuthor->GetPosPixel().X() + + mpMetadataAuthor->GetSizePixel().Width(), mpMetadataAuthor->GetPosPixel().Y() ), - Size( GetMetaButtonAreaWidth(), - GetSizePixel().Height() - mpMetadataAuthor->GetPosPixel().Y() ) ) ) ); + Size( GetMetaButtonAreaWidth(), + mpMetadataAuthor->GetSizePixel().Height() + + mpMetadataDate->GetSizePixel().Height() ) ) ) ); } } @@ -308,7 +325,6 @@ void SwSidebarWin::InitControls() mpOutlinerView = new OutlinerView ( mpOutliner, mpSidebarTxtControl ); mpOutlinerView->SetBackgroundColor(COL_TRANSPARENT); mpOutliner->InsertView(mpOutlinerView ); - mpSidebarTxtControl->SetTextView(mpOutlinerView); mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,1,1) ) ); mpOutlinerView->SetAttribs(DefaultItem()); @@ -342,7 +358,7 @@ void SwSidebarWin::InitControls() sal_uInt16 aIndex = SW_MOD()->InsertRedlineAuthor(GetAuthor()); SetColor( mrMgr.GetColorDark(aIndex), mrMgr.GetColorLight(aIndex), - mrMgr.GetColorAnkor(aIndex)); + mrMgr.GetColorAnchor(aIndex)); CheckMetaText(); @@ -800,7 +816,7 @@ void SwSidebarWin::HideNote() Window::Hide(); if (mpAnchor) { - if (mrMgr.IsShowAnkor()) + if (mrMgr.IsShowAnchor()) mpAnchor->SetAnchorState(AS_TRI); else mpAnchor->setVisible(false); @@ -1188,7 +1204,39 @@ bool SwSidebarWin::IsScrollbarVisible() const return HasScrollbar() && mpVScrollbar->IsVisible(); } -} } // eof of namespace sw::sidebarwindows:: +void SwSidebarWin::ChangeSidebarItem( SwSidebarItem& rSidebarItem ) +{ + const bool bAnchorChanged = mrSidebarItem.maLayoutInfo.mpAnchorFrm != + rSidebarItem.maLayoutInfo.mpAnchorFrm; + if ( bAnchorChanged ) + { + mrMgr.DisconnectSidebarWinFromFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm), + *this ); + } + + mrSidebarItem = rSidebarItem; + + if ( bAnchorChanged ) + { + mrMgr.ConnectSidebarWinToFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm), + *(mrSidebarItem.GetFmtFld()), + *this ); + } +} + +css::uno::Reference< css::accessibility::XAccessible > SwSidebarWin::CreateAccessible() +{ + SidebarWinAccessible* pAcc( new SidebarWinAccessible( *this, + mrView.GetWrtShell(), + mrSidebarItem ) ); + css::uno::Reference< css::awt::XWindowPeer > xWinPeer( pAcc ); + SetWindowPeer( xWinPeer, pAcc ); + + css::uno::Reference< css::accessibility::XAccessible > xAcc( xWinPeer, css::uno::UNO_QUERY ); + return xAcc; +} + +} } // eof of namespace sw::sidebarwindows /********** SwRedComment**************/ /* diff --git a/sw/source/ui/docvw/SidebarWinAcc.cxx b/sw/source/ui/docvw/SidebarWinAcc.cxx new file mode 100644 index 0000000000..a484f2068c --- /dev/null +++ b/sw/source/ui/docvw/SidebarWinAcc.cxx @@ -0,0 +1,156 @@ +/************************************************************************* * + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#include "precompiled_sw.hxx" + +#include + +#include +#include +#include +#include + +namespace css = ::com::sun::star; + +namespace sw { namespace sidebarwindows { + +// ============================================================================= +// declaration and implementation of accessible context for instance +// ============================================================================= +class SidebarWinAccessibleContext : public VCLXAccessibleComponent +{ + public: + explicit SidebarWinAccessibleContext( SwSidebarWin& rSidebarWin, + ViewShell& rViewShell, + const SwFrm* pAnchorFrm ) + : VCLXAccessibleComponent( rSidebarWin.GetWindowPeer() ) + , mrViewShell( rViewShell ) + , mpAnchorFrm( pAnchorFrm ) + , maMutex() + {} + + virtual ~SidebarWinAccessibleContext() + {} + + void ChangeAnchor( const SwFrm* pAnchorFrm ) + { + vos::OGuard aGuard(maMutex); + + mpAnchorFrm = pAnchorFrm; + } + + css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleParent() throw (css::uno::RuntimeException) + { + vos::OGuard aGuard(maMutex); + + css::uno::Reference< css::accessibility::XAccessible > xAccParent; + + if ( mpAnchorFrm && + mrViewShell.GetAccessibleMap() ) + { + xAccParent = mrViewShell.GetAccessibleMap()->GetContext( mpAnchorFrm, sal_False ); + } + + return xAccParent; + } + + sal_Int32 SAL_CALL getAccessibleIndexInParent() throw (css::uno::RuntimeException) + { + vos::OGuard aGuard(maMutex); + + if ( mpAnchorFrm && + mrViewShell.GetAccessibleMap() ) + { + // ODsTODO + + } + + return -1; + } + + private: + ViewShell& mrViewShell; + const SwFrm* mpAnchorFrm; + + ::vos::OMutex maMutex; +}; + +// ============================================================================= +// implementaion of accessible for instance +// ============================================================================= +SidebarWinAccessible::SidebarWinAccessible( SwSidebarWin& rSidebarWin, + ViewShell& rViewShell, + const SwSidebarItem& rSidebarItem ) + : VCLXWindow() + , mrSidebarWin( rSidebarWin ) + , mrViewShell( rViewShell ) + , mpAnchorFrm( rSidebarItem.maLayoutInfo.mpAnchorFrm ) + , bAccContextCreated( false ) +{ + SetWindow( &mrSidebarWin ); +} + +SidebarWinAccessible::~SidebarWinAccessible() +{ +} + +void SidebarWinAccessible::ChangeSidebarItem( const SwSidebarItem& rSidebarItem ) +{ + if ( bAccContextCreated ) + { + css::uno::Reference< css::accessibility::XAccessibleContext > xAcc + = getAccessibleContext(); + if ( xAcc.is() ) + { + SidebarWinAccessibleContext* pAccContext = + dynamic_cast(xAcc.get()); + if ( pAccContext ) + { + pAccContext->ChangeAnchor( rSidebarItem.maLayoutInfo.mpAnchorFrm ); + } + } + } +} + +css::uno::Reference< css::accessibility::XAccessibleContext > SidebarWinAccessible::CreateAccessibleContext() +{ + SidebarWinAccessibleContext* pAccContext = + new SidebarWinAccessibleContext( mrSidebarWin, + mrViewShell, + mpAnchorFrm ); + css::uno::Reference< css::accessibility::XAccessibleContext > xAcc( pAccContext ); + bAccContextCreated = true; + return xAcc; +} + +} } // end of namespace sw::sidebarwindows + diff --git a/sw/source/ui/docvw/SidebarWinAcc.hxx b/sw/source/ui/docvw/SidebarWinAcc.hxx new file mode 100644 index 0000000000..0abe1acbfa --- /dev/null +++ b/sw/source/ui/docvw/SidebarWinAcc.hxx @@ -0,0 +1,67 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SIDEBARWINACC_HXX +#define _SIDEBARWINACC_HXX + +#include + +class ViewShell; +class SwSidebarItem; +class SwFrm; + +namespace sw { namespace sidebarwindows { + +class SwSidebarWin; + +class SidebarWinAccessible : public VCLXWindow +{ + public: + explicit SidebarWinAccessible( SwSidebarWin& rSidebarWin, + ViewShell& rViewShell, + const SwSidebarItem& rSidebarItem ); + virtual ~SidebarWinAccessible(); + + virtual com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessibleContext > + CreateAccessibleContext(); + + void ChangeSidebarItem( const SwSidebarItem& rSidebarItem ); + + private: + SwSidebarWin& mrSidebarWin; + ViewShell& mrViewShell; + const SwFrm* mpAnchorFrm; + bool bAccContextCreated; +}; + +} } // end of namespace sw::sidebarwindows + +#endif diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 0fc1c2ae94..36fddeb73d 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -1354,7 +1354,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) const KeyCode& rKeyCode = aKeyEvent.GetKeyCode(); sal_Unicode aCh = aKeyEvent.GetCharCode(); - // enable switching to notes ankor with Ctrl - Alt - Page Up/Down + // enable switching to notes anchor with Ctrl - Alt - Page Up/Down // pressing this inside a note will switch to next/previous note if ((rKeyCode.IsMod1() && rKeyCode.IsMod2()) && ((rKeyCode.GetCode() == KEY_PAGEUP) || (rKeyCode.GetCode() == KEY_PAGEDOWN))) { diff --git a/sw/source/ui/docvw/frmsidebarwincontainer.cxx b/sw/source/ui/docvw/frmsidebarwincontainer.cxx new file mode 100644 index 0000000000..4fe9f55a14 --- /dev/null +++ b/sw/source/ui/docvw/frmsidebarwincontainer.cxx @@ -0,0 +1,204 @@ + /************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sw.hxx" + +#include + +#include +#include +#include +#include + +namespace { + struct SidebarWinKey + { + const xub_StrLen mnIndex; + + explicit SidebarWinKey( const xub_StrLen nIndex ) + : mnIndex( nIndex ) + {} + + bool operator < ( const SidebarWinKey& SidebarWinKey ) const + { + return mnIndex < SidebarWinKey.mnIndex; + } + }; + + struct SidebarWinOrder + { + sal_Bool operator()( const SidebarWinKey& rSidebarWinKeyA, + const SidebarWinKey& rSidebarWinKeyB ) const + { + return rSidebarWinKeyA < rSidebarWinKeyB; + } + }; + + typedef ::std::map < SidebarWinKey, sw::sidebarwindows::SwSidebarWin*, SidebarWinOrder > SidebarWinContainer; + + struct FrmKey + { + const SwFrm* mpFrm; + + explicit FrmKey( const SwFrm* pFrm ) + : mpFrm( pFrm ) + {} + + bool operator < ( const FrmKey& rFrmKey ) const + { + return mpFrm < rFrmKey.mpFrm; + } + }; + + struct FrmOrder + { + sal_Bool operator()( const FrmKey& rFrmKeyA, + const FrmKey& rFrmKeyB ) const + { + return rFrmKeyA < rFrmKeyB; + } + }; + + typedef ::std::map < FrmKey, SidebarWinContainer, FrmOrder > _FrmSidebarWinContainer; +} + +namespace sw { namespace sidebarwindows { + +class FrmSidebarWinContainer : public _FrmSidebarWinContainer +{ +}; + +SwFrmSidebarWinContainer::SwFrmSidebarWinContainer() + : mpFrmSidebarWinContainer( new FrmSidebarWinContainer() ) +{} + +SwFrmSidebarWinContainer::~SwFrmSidebarWinContainer() +{ + mpFrmSidebarWinContainer->clear(); + delete mpFrmSidebarWinContainer; +} + +void SwFrmSidebarWinContainer::insert( const SwFrm& rFrm, + const SwFmtFld& rFmtFld, + SwSidebarWin& rSidebarWin ) +{ + FrmKey aFrmKey( &rFrm ); + SidebarWinContainer& rSidebarWinContainer = (*mpFrmSidebarWinContainer)[ aFrmKey ]; + + SidebarWinKey aSidebarWinKey( *(rFmtFld.GetTxtFld()->GetStart()) ); + if ( rSidebarWinContainer.empty() || + rSidebarWinContainer.find( aSidebarWinKey) != rSidebarWinContainer.end() ) + { + rSidebarWinContainer[ aSidebarWinKey ] = &rSidebarWin; + } +} + +void SwFrmSidebarWinContainer::remove( const SwFrm& rFrm, + const SwSidebarWin& rSidebarWin ) +{ + FrmKey aFrmKey( &rFrm ); + FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey ); + if ( aFrmIter != mpFrmSidebarWinContainer->end() ) + { + SidebarWinContainer& rSidebarWinContainer = (*aFrmIter).second; + for ( SidebarWinContainer::iterator aIter = rSidebarWinContainer.begin(); + aIter != rSidebarWinContainer.end(); + ++aIter ) + { + if ( (*aIter).second == &rSidebarWin ) + { + rSidebarWinContainer.erase( aIter ); + break; + } + } + } +} + +bool SwFrmSidebarWinContainer::empty( const SwFrm& rFrm ) +{ + bool bEmpty( true ); + + FrmKey aFrmKey( &rFrm ); + FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey ); + if ( aFrmIter != mpFrmSidebarWinContainer->end() ) + { + bEmpty = (*aFrmIter).second.empty(); + } + + return bEmpty; +} + +SwSidebarWin* SwFrmSidebarWinContainer::get( const SwFrm& rFrm, + const sal_Int32 nIndex ) +{ + SwSidebarWin* pRet( 0 ); + + FrmKey aFrmKey( &rFrm ); + FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey ); + if ( aFrmIter != mpFrmSidebarWinContainer->end() ) + { + SidebarWinContainer& rSidebarWinContainer = (*aFrmIter).second; + sal_Int32 nCounter( nIndex ); + for ( SidebarWinContainer::iterator aIter = rSidebarWinContainer.begin(); + nCounter >= 0 && aIter != rSidebarWinContainer.end(); + ++aIter ) + { + if ( nCounter == 0 ) + { + pRet = (*aIter).second; + break; + } + } + } + + return pRet; +} + +void SwFrmSidebarWinContainer::getAll( const SwFrm& rFrm, + std::vector< Window* >* pSidebarWins ) +{ + pSidebarWins->clear(); + + FrmKey aFrmKey( &rFrm ); + FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey ); + if ( aFrmIter != mpFrmSidebarWinContainer->end() ) + { + SidebarWinContainer& rSidebarWinContainer = (*aFrmIter).second; + for ( SidebarWinContainer::iterator aIter = rSidebarWinContainer.begin(); + aIter != rSidebarWinContainer.end(); + ++aIter ) + { + pSidebarWins->push_back( (*aIter).second ); + } + } +} + +} } // eof of namespace sw::sidebarwindows:: diff --git a/sw/source/ui/docvw/frmsidebarwincontainer.hxx b/sw/source/ui/docvw/frmsidebarwincontainer.hxx new file mode 100644 index 0000000000..6144d955b3 --- /dev/null +++ b/sw/source/ui/docvw/frmsidebarwincontainer.hxx @@ -0,0 +1,73 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _FRMSIDEBARWINCONTAINER_HXX +#define _FRMSIDEBARWINCONTAINER_HXX + +#include +#include + +class SwFrm; +class SwFmtFld; +class Window; + +namespace sw { namespace sidebarwindows { + +class SwSidebarWin; +class FrmSidebarWinContainer; + +class SwFrmSidebarWinContainer +{ + public: + SwFrmSidebarWinContainer(); + ~SwFrmSidebarWinContainer(); + + void insert( const SwFrm& rFrm, + const SwFmtFld& rFmtFld, + SwSidebarWin& rSidebarWin ); + + void remove( const SwFrm& rFrm, + const SwSidebarWin& rSidebarWin ); + + bool empty( const SwFrm& rFrm ); + + SwSidebarWin* get( const SwFrm& rFrm, + const sal_Int32 nIndex ); + + void getAll( const SwFrm& rFrm, + std::vector< Window* >* pSidebarWins ); + + private: + FrmSidebarWinContainer* mpFrmSidebarWinContainer; +}; + +} } // eof of namespace sw::sidebarwindows:: + +#endif + diff --git a/sw/source/ui/docvw/makefile.mk b/sw/source/ui/docvw/makefile.mk index d2d15811d4..d55b4f4d80 100644 --- a/sw/source/ui/docvw/makefile.mk +++ b/sw/source/ui/docvw/makefile.mk @@ -57,9 +57,11 @@ SLOFILES = \ $(SLO)$/romenu.obj \ $(SLO)$/srcedtw.obj \ $(SLO)$/PostItMgr.obj \ + $(SLO)$/frmsidebarwincontainer.obj \ $(SLO)$/AnchorOverlayObject.obj \ $(SLO)$/ShadowOverlayObject.obj \ $(SLO)$/SidebarWin.obj \ + $(SLO)$/SidebarWinAcc.obj \ $(SLO)$/AnnotationWin.obj \ $(SLO)$/AnnotationMenuButton.obj \ $(SLO)$/SidebarTxtControl.obj \ -- cgit v1.2.3 From e4dbffca8f431b3f76ad923e1c2c4355ae1c0466 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 2 Feb 2010 16:39:44 +0100 Subject: sw33a11y01: fix compiler warnings --- sw/source/core/access/acccontext.cxx | 2 -- sw/source/core/access/accfrmobj.cxx | 4 ++-- sw/source/ui/docvw/frmsidebarwincontainer.cxx | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index 7908726aa2..b2a5079857 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -178,8 +178,6 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, SwAccessibleChild aFrm( pFrm ); bool bVisibleOnly = aFrm.IsVisibleChildrenOnly(); - uno::Reference < XAccessible > xAcc; - const SwAccessibleChildSList aList( *pFrm, *(GetMap()) ); SwAccessibleChildSList::const_iterator aIter( aList.begin() ); while( aIter != aList.end() ) diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx index a620b95ddc..c71e272602 100644 --- a/sw/source/core/access/accfrmobj.cxx +++ b/sw/source/core/access/accfrmobj.cxx @@ -54,8 +54,8 @@ namespace css = ::com::sun::star; namespace sw { namespace access { SwAccessibleChild::SwAccessibleChild() - : mpDrawObj( 0 ) - , mpFrm( 0 ) + : mpFrm( 0 ) + , mpDrawObj( 0 ) , mpWindow( 0 ) {} diff --git a/sw/source/ui/docvw/frmsidebarwincontainer.cxx b/sw/source/ui/docvw/frmsidebarwincontainer.cxx index 4fe9f55a14..457c11761e 100644 --- a/sw/source/ui/docvw/frmsidebarwincontainer.cxx +++ b/sw/source/ui/docvw/frmsidebarwincontainer.cxx @@ -47,9 +47,9 @@ namespace { : mnIndex( nIndex ) {} - bool operator < ( const SidebarWinKey& SidebarWinKey ) const + bool operator < ( const SidebarWinKey& rSidebarWinKey ) const { - return mnIndex < SidebarWinKey.mnIndex; + return mnIndex < rSidebarWinKey.mnIndex; } }; -- cgit v1.2.3 From 58804f5fcad4798d8a5266ed7ffa70fa3ea94374 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 3 Feb 2010 16:26:18 +0100 Subject: sw33a11y01: #i88070# - accessible Writer comments - fixes and part 2 --- sw/inc/SidebarWin.hxx | 1 + sw/inc/accmap.hxx | 18 ++++++--- sw/source/core/access/accframe.hxx | 8 ++-- sw/source/core/access/accfrmobj.cxx | 15 +++++-- sw/source/core/access/accfrmobj.hxx | 3 +- sw/source/core/access/accmap.cxx | 56 +++++++++++++++++++++++---- sw/source/core/view/viewimp.cxx | 4 +- sw/source/ui/docvw/PostItMgr.cxx | 20 ++++++++-- sw/source/ui/docvw/SidebarWin.cxx | 20 ++++++++-- sw/source/ui/docvw/SidebarWinAcc.cxx | 10 +++-- sw/source/ui/docvw/frmsidebarwincontainer.cxx | 18 +++++++-- sw/source/ui/docvw/frmsidebarwincontainer.hxx | 4 +- 12 files changed, 135 insertions(+), 42 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx index 7e7605ee60..ea22583ba4 100644 --- a/sw/inc/SidebarWin.hxx +++ b/sw/inc/SidebarWin.hxx @@ -238,6 +238,7 @@ class SwSidebarWin : public Window bool mbIsFollow; SwSidebarItem& mrSidebarItem; + const SwFrm* mpAnchorFrm; }; } } // eof namespace sw::sidebarwindows diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index 728ce3fb08..e99fa40975 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -63,7 +63,6 @@ class MapMode; class SwAccPreviewData; struct PrevwPage; class Window; -class SwFmtFld; // real states for events #define ACC_STATE_EDITABLE 0x01 @@ -91,7 +90,7 @@ typedef sal_uInt16 tAccessibleStates; class SwAccessibleMap : public accessibility::IAccessibleViewForwarder, public accessibility::IAccessibleParent { - ::vos::OMutex maMutex; + mutable ::vos::OMutex maMutex; ::vos::OMutex maEventMutex; SwAccessibleContextMap_Impl *mpFrmMap; SwAccessibleShapeMap_Impl *mpShapeMap; @@ -204,10 +203,14 @@ public: void RemoveContext( const SdrObject *pObj ); // Dispose frame and its children if bRecursive is set - void Dispose( const SwFrm *pFrm, const SdrObject *pObj, - sal_Bool bRecursive=sal_False ); - - void InvalidatePosOrSize( const SwFrm *pFrm, const SdrObject *pObj, + void Dispose( const SwFrm* pFrm, + const SdrObject* pObj, + Window* pWindow, + sal_Bool bRecursive = sal_False ); + + void InvalidatePosOrSize( const SwFrm* pFrm, + const SdrObject* pObj, + Window* pWindow, const SwRect& rOldFrm ); void InvalidateContent( const SwFrm *pFrm ); @@ -263,6 +266,9 @@ public: */ void InvalidateTextSelectionOfAllParas(); + sal_Int32 GetChildIndex( const SwFrm& rParentFrm, + Window& rChild ) const; + // update preview data (and fire events if necessary) // OD 15.01.2003 #103492# - complete re-factoring of method due to new // page/print preview functionality. diff --git a/sw/source/core/access/accframe.hxx b/sw/source/core/access/accframe.hxx index 316932335a..031948d881 100644 --- a/sw/source/core/access/accframe.hxx +++ b/sw/source/core/access/accframe.hxx @@ -114,12 +114,14 @@ protected: public: // Return the SwFrm this context is attached to. - const SwFrm *GetFrm() const { return mpFrm; }; - + const SwFrm* GetFrm() const { return mpFrm; }; static const SwFrm* GetParent( const sw::access::SwAccessibleChild& rFrmOrObj, sal_Bool bInPagePreview ); + sal_Int32 GetChildIndex( SwAccessibleMap& rAccMap, + const sw::access::SwAccessibleChild& rChild ) const; + protected: // Return the bounding box of the frame clipped to the vis area. If @@ -136,8 +138,6 @@ protected: sal_Int32 GetChildCount( SwAccessibleMap& rAccMap ) const; sw::access::SwAccessibleChild GetChild( SwAccessibleMap& rAccMap, sal_Int32 nPos ) const; - sal_Int32 GetChildIndex( SwAccessibleMap& rAccMap, - const sw::access::SwAccessibleChild& rChild ) const; sw::access::SwAccessibleChild GetChildAtPixel( const Point& rPos, SwAccessibleMap& rAccMap ) const; void GetChildren( SwAccessibleMap& rAccMap, diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx index c71e272602..7add8f133a 100644 --- a/sw/source/core/access/accfrmobj.cxx +++ b/sw/source/core/access/accfrmobj.cxx @@ -85,18 +85,25 @@ SwAccessibleChild::SwAccessibleChild( Window* pWindow ) SwAccessibleChild::SwAccessibleChild( const SwFrm* pFrm, - const SdrObject* pDrawObj ) + const SdrObject* pDrawObj, + Window* pWindow ) { if ( pFrm ) { Init( pFrm ); } - else + else if ( pDrawObj ) { Init( pDrawObj ); } - ASSERT( (!pFrm || pFrm == mpFrm) && (!pDrawObj || pDrawObj == mpDrawObj), - "invalid frame/object combination" ); + else if ( pWindow ) + { + Init( pWindow ); + } + ASSERT( (!pFrm || pFrm == mpFrm) && + (!pDrawObj || pDrawObj == mpDrawObj) && + (!pWindow || pWindow == mpWindow), + "invalid frame/object/window combination" ); } diff --git a/sw/source/core/access/accfrmobj.hxx b/sw/source/core/access/accfrmobj.hxx index 9cdff0be34..70c71f259e 100644 --- a/sw/source/core/access/accfrmobj.hxx +++ b/sw/source/core/access/accfrmobj.hxx @@ -48,7 +48,8 @@ class SwAccessibleChild explicit SwAccessibleChild( const SwFrm* pFrm ); explicit SwAccessibleChild( Window* pWindow ); SwAccessibleChild( const SwFrm* pFrm, - const SdrObject* pDrawObj ); + const SdrObject* pDrawObj, + Window* pWindow ); SwAccessibleChild( const SwAccessibleChild& r ); SwAccessibleChild& operator=( const SwAccessibleChild& r ); diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 6a712281e7..7a7982fa92 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -1681,10 +1681,12 @@ void SwAccessibleMap::RemoveContext( const SdrObject *pObj ) } -void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj, +void SwAccessibleMap::Dispose( const SwFrm *pFrm, + const SdrObject *pObj, + Window* pWindow, sal_Bool bRecursive ) { - SwAccessibleChild aFrmOrObj( pFrm, pObj ); + SwAccessibleChild aFrmOrObj( pFrm, pObj, pWindow ); // Indeed, the following assert checks the frame's accessible flag, // because that's the one that is evaluated in the layout. The frame @@ -1693,11 +1695,11 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj, ASSERT( !aFrmOrObj.GetSwFrm() || aFrmOrObj.GetSwFrm()->IsAccessibleFrm(), "non accessible frame should be disposed" ); - ::vos::ORef< SwAccessibleContext > xAccImpl; - ::vos::ORef< SwAccessibleContext > xParentAccImpl; - ::vos::ORef< ::accessibility::AccessibleShape > xShapeAccImpl; if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) ) { + ::vos::ORef< SwAccessibleContext > xAccImpl; + ::vos::ORef< SwAccessibleContext > xParentAccImpl; + ::vos::ORef< ::accessibility::AccessibleShape > xShapeAccImpl; // get accessible context for frame { vos::OGuard aGuard( maMutex ); @@ -1808,9 +1810,10 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj, void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm, const SdrObject *pObj, + Window* pWindow, const SwRect& rOldBox ) { - SwAccessibleChild aFrmOrObj( pFrm, pObj ); + SwAccessibleChild aFrmOrObj( pFrm, pObj, pWindow ); if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) ) { ::vos::ORef< SwAccessibleContext > xAccImpl; @@ -2238,6 +2241,43 @@ void SwAccessibleMap::InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm ) } } +sal_Int32 SwAccessibleMap::GetChildIndex( const SwFrm& rParentFrm, + Window& rChild ) const +{ + sal_Int32 nIndex( -1 ); + + SwAccessibleChild aFrmOrObj( &rParentFrm ); + if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) ) + { + uno::Reference < XAccessible > xAcc; + { + vos::OGuard aGuard( maMutex ); + + if( mpFrmMap ) + { + SwAccessibleContextMap_Impl::iterator aIter = + mpFrmMap->find( aFrmOrObj.GetSwFrm() ); + if( aIter != mpFrmMap->end() ) + { + xAcc = (*aIter).second; + } + } + } + + if( xAcc.is() ) + { + SwAccessibleContext *pAccImpl = + static_cast< SwAccessibleContext *>( xAcc.get() ); + + nIndex = pAccImpl->GetChildIndex( const_cast(*this), + SwAccessibleChild( &rChild ) ); + } + } + + return nIndex; +} + + // OD 15.01.2003 #103492# - complete re-factoring of method due to new page/print // preview functionality. void SwAccessibleMap::UpdatePreview( const std::vector& _rPrevwPages, @@ -2474,7 +2514,7 @@ sal_Bool SwAccessibleMap::ReplaceChild ( // Also get keep parent. uno::Reference < XAccessible > xParent( pCurrentChild->getAccessibleParent() ); pCurrentChild = 0; // well be realease by dispose - Dispose( 0, pObj ); + Dispose( 0, pObj, 0 ); { vos::OGuard aGuard( maMutex ); @@ -2511,7 +2551,7 @@ sal_Bool SwAccessibleMap::ReplaceChild ( } SwRect aEmptyRect; - InvalidatePosOrSize( 0, pObj, aEmptyRect ); + InvalidatePosOrSize( 0, pObj, 0, aEmptyRect ); return sal_True; } diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx index 5eb6ba17a2..1367f9df2c 100644 --- a/sw/source/core/view/viewimp.cxx +++ b/sw/source/core/view/viewimp.cxx @@ -442,7 +442,7 @@ void SwViewImp::DisposeAccessible( const SwFrm *pFrm, do { if( pTmp->Imp()->IsAccessible() ) - pTmp->Imp()->GetAccessibleMap().Dispose( pFrm, pObj, bRecursive ); + pTmp->Imp()->GetAccessibleMap().Dispose( pFrm, pObj, 0, bRecursive ); pTmp = (ViewShell *)pTmp->GetNext(); } while ( pTmp != pVSh ); } @@ -456,7 +456,7 @@ void SwViewImp::MoveAccessible( const SwFrm *pFrm, const SdrObject *pObj, do { if( pTmp->Imp()->IsAccessible() ) - pTmp->Imp()->GetAccessibleMap().InvalidatePosOrSize( pFrm, pObj, + pTmp->Imp()->GetAccessibleMap().InvalidatePosOrSize( pFrm, pObj, 0, rOldFrm ); pTmp = (ViewShell *)pTmp->GetNext(); } while ( pTmp != pVSh ); diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 74fe23be51..f4bd74c2ef 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -175,8 +176,6 @@ SwPostItMgr::SwPostItMgr(SwView* pView) SwPostItMgr::~SwPostItMgr() { - delete mpFrmSidebarWinContainer; - if ( mnEventId ) Application::RemoveUserEvent( mnEventId ); // forget about all our Sidebar windows @@ -186,6 +185,9 @@ SwPostItMgr::~SwPostItMgr() for(std::vector::iterator i = mPages.begin(); i!= mPages.end() ; i++) delete (*i); mPages.clear(); + + delete mpFrmSidebarWinContainer; + mpFrmSidebarWinContainer = 0; } void SwPostItMgr::CheckForRemovedPostIts() @@ -2007,7 +2009,12 @@ void SwPostItMgr::ConnectSidebarWinToFrm( const SwFrm& rFrm, mpFrmSidebarWinContainer = new SwFrmSidebarWinContainer(); } - mpFrmSidebarWinContainer->insert( rFrm, rFmtFld, rSidebarWin ); + const bool bInserted = mpFrmSidebarWinContainer->insert( rFrm, rFmtFld, rSidebarWin ); + if ( bInserted && + mpWrtShell->GetAccessibleMap() ) + { + mpWrtShell->GetAccessibleMap()->InvalidatePosOrSize( 0, 0, &rSidebarWin, SwRect() ); + } } void SwPostItMgr::DisconnectSidebarWinFromFrm( const SwFrm& rFrm, @@ -2015,7 +2022,12 @@ void SwPostItMgr::DisconnectSidebarWinFromFrm( const SwFrm& rFrm, { if ( mpFrmSidebarWinContainer != 0 ) { - mpFrmSidebarWinContainer->remove( rFrm, rSidebarWin ); + const bool bRemoved = mpFrmSidebarWinContainer->remove( rFrm, rSidebarWin ); + if ( bRemoved && + mpWrtShell->GetAccessibleMap() ) + { + mpWrtShell->GetAccessibleMap()->Dispose( 0, 0, &rSidebarWin ); + } } } diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx index 683d513255..b6276669d5 100644 --- a/sw/source/ui/docvw/SidebarWin.cxx +++ b/sw/source/ui/docvw/SidebarWin.cxx @@ -122,6 +122,7 @@ SwSidebarWin::SwSidebarWin( SwEditWin& rEditWin, , mbReadonly( false ) , mbIsFollow( false ) , mrSidebarItem( rSidebarItem ) + , mpAnchorFrm( rSidebarItem.maLayoutInfo.mpAnchorFrm ) { mpShadow = ShadowOverlayObject::CreateShadowOverlayObject( mrView ); if ( mpShadow ) @@ -136,6 +137,9 @@ SwSidebarWin::SwSidebarWin( SwEditWin& rEditWin, SwSidebarWin::~SwSidebarWin() { + mrMgr.DisconnectSidebarWinFromFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm), + *this ); + if ( mpSidebarTxtControl ) { if ( mpOutlinerView ) @@ -1206,15 +1210,23 @@ bool SwSidebarWin::IsScrollbarVisible() const void SwSidebarWin::ChangeSidebarItem( SwSidebarItem& rSidebarItem ) { - const bool bAnchorChanged = mrSidebarItem.maLayoutInfo.mpAnchorFrm != - rSidebarItem.maLayoutInfo.mpAnchorFrm; + const bool bAnchorChanged = mpAnchorFrm != rSidebarItem.maLayoutInfo.mpAnchorFrm; if ( bAnchorChanged ) { - mrMgr.DisconnectSidebarWinFromFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm), - *this ); + mrMgr.DisconnectSidebarWinFromFrm( *(mpAnchorFrm), *this ); } mrSidebarItem = rSidebarItem; + mpAnchorFrm = mrSidebarItem.maLayoutInfo.mpAnchorFrm; + + if ( GetWindowPeer() ) + { + SidebarWinAccessible* pAcc = + static_cast( GetWindowPeer() ); + ASSERT( dynamic_cast( GetWindowPeer() ), + " - unexpected type of window peer -> crash possible!" ); + pAcc->ChangeSidebarItem( mrSidebarItem ); + } if ( bAnchorChanged ) { diff --git a/sw/source/ui/docvw/SidebarWinAcc.cxx b/sw/source/ui/docvw/SidebarWinAcc.cxx index a484f2068c..65bf4c7920 100644 --- a/sw/source/ui/docvw/SidebarWinAcc.cxx +++ b/sw/source/ui/docvw/SidebarWinAcc.cxx @@ -87,14 +87,16 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent { vos::OGuard aGuard(maMutex); - if ( mpAnchorFrm && + sal_Int32 nIndex( -1 ); + + if ( mpAnchorFrm && GetWindow() && mrViewShell.GetAccessibleMap() ) { - // ODsTODO - + nIndex = mrViewShell.GetAccessibleMap()->GetChildIndex( *mpAnchorFrm, + *GetWindow() ); } - return -1; + return nIndex; } private: diff --git a/sw/source/ui/docvw/frmsidebarwincontainer.cxx b/sw/source/ui/docvw/frmsidebarwincontainer.cxx index 457c11761e..b5e406dcf6 100644 --- a/sw/source/ui/docvw/frmsidebarwincontainer.cxx +++ b/sw/source/ui/docvw/frmsidebarwincontainer.cxx @@ -106,24 +106,31 @@ SwFrmSidebarWinContainer::~SwFrmSidebarWinContainer() delete mpFrmSidebarWinContainer; } -void SwFrmSidebarWinContainer::insert( const SwFrm& rFrm, +bool SwFrmSidebarWinContainer::insert( const SwFrm& rFrm, const SwFmtFld& rFmtFld, SwSidebarWin& rSidebarWin ) { + bool bInserted( false ); + FrmKey aFrmKey( &rFrm ); SidebarWinContainer& rSidebarWinContainer = (*mpFrmSidebarWinContainer)[ aFrmKey ]; SidebarWinKey aSidebarWinKey( *(rFmtFld.GetTxtFld()->GetStart()) ); if ( rSidebarWinContainer.empty() || - rSidebarWinContainer.find( aSidebarWinKey) != rSidebarWinContainer.end() ) + rSidebarWinContainer.find( aSidebarWinKey) == rSidebarWinContainer.end() ) { rSidebarWinContainer[ aSidebarWinKey ] = &rSidebarWin; + bInserted = true; } + + return bInserted; } -void SwFrmSidebarWinContainer::remove( const SwFrm& rFrm, +bool SwFrmSidebarWinContainer::remove( const SwFrm& rFrm, const SwSidebarWin& rSidebarWin ) { + bool bRemoved( false ); + FrmKey aFrmKey( &rFrm ); FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey ); if ( aFrmIter != mpFrmSidebarWinContainer->end() ) @@ -136,10 +143,13 @@ void SwFrmSidebarWinContainer::remove( const SwFrm& rFrm, if ( (*aIter).second == &rSidebarWin ) { rSidebarWinContainer.erase( aIter ); + bRemoved = true; break; } } } + + return bRemoved; } bool SwFrmSidebarWinContainer::empty( const SwFrm& rFrm ) @@ -176,6 +186,8 @@ SwSidebarWin* SwFrmSidebarWinContainer::get( const SwFrm& rFrm, pRet = (*aIter).second; break; } + + --nCounter; } } diff --git a/sw/source/ui/docvw/frmsidebarwincontainer.hxx b/sw/source/ui/docvw/frmsidebarwincontainer.hxx index 6144d955b3..1583f36a0b 100644 --- a/sw/source/ui/docvw/frmsidebarwincontainer.hxx +++ b/sw/source/ui/docvw/frmsidebarwincontainer.hxx @@ -48,11 +48,11 @@ class SwFrmSidebarWinContainer SwFrmSidebarWinContainer(); ~SwFrmSidebarWinContainer(); - void insert( const SwFrm& rFrm, + bool insert( const SwFrm& rFrm, const SwFmtFld& rFmtFld, SwSidebarWin& rSidebarWin ); - void remove( const SwFrm& rFrm, + bool remove( const SwFrm& rFrm, const SwSidebarWin& rSidebarWin ); bool empty( const SwFrm& rFrm ); -- cgit v1.2.3 From cab470220bab46e5f81877351dafbb68d7b4ab72 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 3 Feb 2010 17:38:46 +0100 Subject: ppp02: #i108740# distibguish between preferred and formatting paper size --- sw/source/ui/uno/unotxdoc.cxx | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index b75f8af5f6..3774663ea8 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2853,6 +2853,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( if (m_pRenderData) { awt::Size aPageSize; + awt::Size aPreferredPageSize; Size aTmpSize; if (bIsSwSrcView || bPrintProspect) { @@ -2870,21 +2871,19 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( Printer *pPrinter = dynamic_cast< Printer * >(lcl_GetOutputDevice( *m_pPrintUIOptions )); if (pPrinter) { + // HTML source view and prospect adapt to the printer's paper size + aTmpSize = pPrinter->GetPaperSize(); + aTmpSize = pPrinter->LogicToLogic( aTmpSize, + pPrinter->GetMapMode(), MapMode( MAP_100TH_MM )); + aPageSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() ); if (bPrintProspect) { - aTmpSize = pDoc->GetPageSize( USHORT(nRenderer + 1), bIsSkipEmptyPages ); // we just state what output size we would need - // the rest is nowadays up to vcl - aPageSize = awt::Size ( TWIP_TO_MM100( 2 * aTmpSize.Width() ), - TWIP_TO_MM100( aTmpSize.Height() )); - } - else - { - // printing HTML source view - aTmpSize = pPrinter->GetPaperSize(); - aTmpSize = pPrinter->LogicToLogic( aTmpSize, - pPrinter->GetMapMode(), MapMode( MAP_100TH_MM )); - aPageSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() ); + // which may cause vcl to set that page size on the printer + // (if available and not overriden by the user) + aTmpSize = pDoc->GetPageSize( USHORT(nRenderer + 1), bIsSkipEmptyPages ); + aPreferredPageSize = awt::Size ( TWIP_TO_MM100( 2 * aTmpSize.Width() ), + TWIP_TO_MM100( aTmpSize.Height() )); } } } @@ -2900,6 +2899,12 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( aRenderer[0].Value <<= aPageSize; aRenderer[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageIncludesNonprintableArea" ) ); aRenderer[1].Value <<= sal_True; + if( aPreferredPageSize.Width && aPreferredPageSize.Height ) + { + aRenderer.realloc(3); + aRenderer[2].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PreferredPageSize" ) ); + aRenderer[2].Value <<= aPreferredPageSize; + } } m_pPrintUIOptions->appendPrintUIOptions( aRenderer ); -- cgit v1.2.3 From c22af94551699a4c069824bdde06f8ebf124bad3 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 3 Feb 2010 20:49:55 +0000 Subject: cmcfixes71: #i108919# && || gcc ambiguous warning --- sw/source/core/unocore/unoobj.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index f046719f85..f3a6fde894 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -843,7 +843,7 @@ void SwXTextCursor::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) if (!GetRegisteredIn() || // if the cursor leaves its designated section, it becomes invalid - (pOld != NULL) && (pOld->Which() == RES_UNOCURSOR_LEAVES_SECTION)) + ((pOld != NULL) && (pOld->Which() == RES_UNOCURSOR_LEAVES_SECTION))) { Invalidate(); } -- cgit v1.2.3 From 1bb26a75a4fabe4553c5db5ea673a62b3e3e5e38 Mon Sep 17 00:00:00 2001 From: os Date: Thu, 4 Feb 2010 12:32:20 +0100 Subject: #i108920# GotoNext/PrevMark: Check if field exists --- sw/source/ui/shells/basesh.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 993772ad76..f90cf2c5e8 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -709,8 +709,9 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSh.EndSelect(); } BOOL bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK); - if (bRet) - rSh.ClickToField(*rSh.GetCurFld()); + SwField* pCurField = bRet ? rSh.GetCurFld() : 0; + if (pCurField) + rSh.ClickToField(*pCurField); rReq.SetReturnValue(SfxBoolItem( nSlot, bRet)); } } -- cgit v1.2.3 From 9dc3fff62a1921244b72df3a0d80cca25ce2d618 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 4 Feb 2010 14:13:58 +0100 Subject: autorecovery: post-rebase build problems solved --- sw/source/core/doc/docnew.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 4fbc5f3b7d..6639ab6b90 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -172,12 +172,12 @@ void StartGrammarChecking( SwDoc &rDoc ) // check for a visible view bool bVisible = false; const SwDocShell *pDocShell = rDoc.GetDocShell(); - SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, 0, sal_False ); + SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, sal_False ); while (pFrame && !bVisible) { if (pFrame->IsVisible()) bVisible = true; - pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, 0, sal_False ); + pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, sal_False ); } //!! only documents with visible views need to be checked -- cgit v1.2.3 From f6f692ef52d5df77023eb5a0d6e4b02cf7ff41c9 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 4 Feb 2010 15:40:20 +0100 Subject: sw33bf02: correction needed to general changes between DEV300_m68 and DEV300_m71 --- sw/inc/viewsh.hxx | 2 +- sw/source/core/doc/doclay.cxx | 8 ++++---- sw/source/core/frmedt/fefly1.cxx | 2 +- sw/source/core/layout/atrfrm.cxx | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index 876b71dffe..0f037cbd86 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -192,7 +192,7 @@ class SW_DLLPUBLIC ViewShell : public Ring SW_DLLPRIVATE sal_Bool CheckInvalidForPaint( const SwRect & );//Direkt Paint oder lieber //eine Aktion ausloesen. - SW_DLLPRIVATE void PrepareForPrint( const SwPrtOptions &rOptions ); + SW_DLLPRIVATE void PrepareForPrint( const SwPrintData &rOptions ); SW_DLLPRIVATE void ImplApplyViewOptions( const SwViewOption &rOpt ); diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 3059d9c5a9..d0e0fb4451 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -657,9 +657,9 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos, // --> OD 2010-01-07 #i107811# // Assure that at-page anchored fly frames have a page num or a content anchor set. if ( !pAnchor || - ( FLY_PAGE != pAnchor->GetAnchorId() && + ( FLY_AT_PAGE != pAnchor->GetAnchorId() && !pAnchor->GetCntntAnchor() ) || - ( FLY_PAGE == pAnchor->GetAnchorId() && + ( FLY_AT_PAGE == pAnchor->GetAnchorId() && !pAnchor->GetCntntAnchor() && pAnchor->GetPageNum() == 0 ) ) { @@ -680,8 +680,8 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos, } eAnchorId = aAnch.GetAnchorId(); - if ( FLY_PAGE != eAnchorId || - ( FLY_PAGE == eAnchorId && + if ( FLY_AT_PAGE != eAnchorId || + ( FLY_AT_PAGE == eAnchorId && ( !pAnchor || aAnch.GetPageNum() == 0 ) ) ) { diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index d31f51f631..29e696c3ac 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -919,7 +919,7 @@ void SwFEShell::InsertDrawObj( SdrObject& rDrawObj, SET_CURR_SHELL( this ); SfxItemSet rFlyAttrSet( GetDoc()->GetAttrPool(), aFrmFmtSetRange ); - rFlyAttrSet.Put( SwFmtAnchor( FLY_AT_CNTNT )); + rFlyAttrSet.Put( SwFmtAnchor( FLY_AT_PARA )); // --> OD 2009-12-29 #i89920# rFlyAttrSet.Put( SwFmtSurround( SURROUND_THROUGHT ) ); rDrawObj.SetLayer( getIDocumentDrawModelAccess()->GetHeavenId() ); diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index c3315bd197..fbb7671ab2 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -2829,7 +2829,7 @@ void SwFlyFrmFmt::MakeFrms() } else { - aAnchorAttr.SetType( FLY_AT_CNTNT ); + aAnchorAttr.SetType( FLY_AT_PARA ); SetFmtAttr( aAnchorAttr ); MakeFrms(); return; -- cgit v1.2.3 From 2d09abd8481803e2944408a5f47e44f24ae26abc Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 4 Feb 2010 18:07:27 +0100 Subject: ppp02: #i108543# check whether ViewOptions need to be reinitialized --- sw/inc/printdata.hxx | 1 + sw/inc/unotxdoc.hxx | 3 +++ sw/source/core/view/vprint.cxx | 5 +++++ sw/source/ui/uno/unotxdoc.cxx | 2 ++ 4 files changed, 11 insertions(+) (limited to 'sw/source') diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx index 3c77e72639..544af87bed 100755 --- a/sw/inc/printdata.hxx +++ b/sw/inc/printdata.hxx @@ -267,6 +267,7 @@ public: void DeletePostItData(); bool IsViewOptionAdjust() const { return m_pViewOptionAdjust != 0; } + bool NeedNewViewOptionAdjust( const SwWrtShell& ) const; void ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &rViewOptions ); void ViewOptionAdjust( const SwPrtOptions *pPrtOptions ); void ViewOptionAdjustStop(); diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index e12eb89cfa..d7a3e96ef9 100755 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -610,6 +610,9 @@ public: ~SwViewOptionAdjust_Impl(); void AdjustViewOptions( const SwPrtOptions *pPrtOptions ); + + bool checkShell( const SwWrtShell& rCompare ) const + { return &rCompare == &m_rShell; } }; diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index b90e3f666b..8e3ea79a28 100755 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -281,6 +281,11 @@ void SwRenderData::DeletePostItData() } } +bool SwRenderData::NeedNewViewOptionAdjust( const SwWrtShell& rCompare ) const +{ + return m_pViewOptionAdjust ? ! m_pViewOptionAdjust->checkShell( rCompare ) : true; +} + void SwRenderData::ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &rViewOptions ) { diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 3774663ea8..f06e71313d 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2723,6 +2723,8 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( const TypeId aSwViewTypeId = TYPE(SwView); if (pView->IsA(aSwViewTypeId)) { + if (m_pRenderData && m_pRenderData->NeedNewViewOptionAdjust( *pWrtShell ) ) + m_pRenderData->ViewOptionAdjustStop(); if (m_pRenderData && !m_pRenderData->IsViewOptionAdjust()) m_pRenderData->ViewOptionAdjustStart( *pWrtShell, *pWrtShell->GetViewOptions() ); } -- cgit v1.2.3 From 725da7339665d533415142869577b7af3d95cc34 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 5 Feb 2010 00:10:48 +0100 Subject: cws svxsplit: some corrections after merge --- sw/source/filter/html/htmlforw.cxx | 1 - sw/source/filter/xml/xmlfonte.cxx | 1 - sw/source/ui/ribbar/conrect.cxx | 1 - 3 files changed, 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 5ca95cfb11..370875d5ba 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -63,7 +63,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx index 40f602da6a..8125747cad 100644 --- a/sw/source/filter/xml/xmlfonte.cxx +++ b/sw/source/filter/xml/xmlfonte.cxx @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/ui/ribbar/conrect.cxx b/sw/source/ui/ribbar/conrect.cxx index a9cd0b9ff5..cfd9d9251e 100644 --- a/sw/source/ui/ribbar/conrect.cxx +++ b/sw/source/ui/ribbar/conrect.cxx @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3 From 60ce966867cb60f830c9dc109a6c5c24a9626cb3 Mon Sep 17 00:00:00 2001 From: C?dric Bosdonnat Date: Fri, 5 Feb 2010 10:44:14 +0100 Subject: cbosdo03: fixed a wrong property for image import + clenaup --- sw/source/core/unocore/unotext.cxx | 5 ----- 1 file changed, 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 5b8b5f88d9..f7cbb36e01 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -79,8 +79,6 @@ #include #include - -using namespace std; using namespace ::com::sun::star; using ::rtl::OUString; @@ -1871,9 +1869,6 @@ void SwXText::copyText( const uno::Reference< text::XTextCopy >& xSource ) throw ( uno::RuntimeException ) { -#if DEBUG - clog << "TODO - SwXText::copyText()" << endl; -#endif uno::Reference< lang::XUnoTunnel > xTTunnel( xSource, uno::UNO_QUERY_THROW ); SwXText* pText = 0; pText = reinterpret_cast< SwXText* >( -- cgit v1.2.3 From 65c1bfdc3cd50bdd836a68c30e809f0bfbc8ea1f Mon Sep 17 00:00:00 2001 From: os Date: Mon, 8 Feb 2010 12:08:54 +0100 Subject: #i103024# display and use of tab stops fixed --- sw/source/core/text/txttab.cxx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index ed4f7059a0..c4bd93c1a7 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -192,13 +192,8 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto ) } SwTwips nCount = nSearchPos; - // Bei negativen Werten rundet "/" auf, "%" liefert negative Reste, - // bei positiven Werten rundet "/" ab, "%" liefert positvie Reste! - if ( nCount < 0 ) - nCount = 0; - nCount /= nDefTabDist; - nNextPos = ( nCount + 1 ) * nDefTabDist ; + nNextPos = nCount < 0 || (!nCount && nSearchPos <= 0)? nCount * nDefTabDist :( nCount + 1 ) * nDefTabDist ; // --> FME 2004-09-21 #117919 Minimum tab stop width is 1 or 51 twips: const SwTwips nMinimumTabWidth = pFrm->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_COMPAT) ? 0 : 50; // <-- -- cgit v1.2.3 From a5594a2708fcd4018eaf87268e543c8c8ef447bd Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Tue, 9 Feb 2010 18:39:47 +0100 Subject: cbosdo02: merge fixes --- sw/inc/unobookmark.hxx | 44 +++-- sw/source/core/crsr/bookmrk.cxx | 11 -- sw/source/core/unocore/unobkm.cxx | 390 ++++++++++++++++++++++---------------- sw/source/ui/docvw/edtwin.cxx | 22 ++- 4 files changed, 271 insertions(+), 196 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unobookmark.hxx b/sw/inc/unobookmark.hxx index 46d0054551..bdf829ea16 100644 --- a/sw/inc/unobookmark.hxx +++ b/sw/inc/unobookmark.hxx @@ -202,6 +202,34 @@ public: }; +class SwXFieldmarkParameters + : public ::cppu::WeakImplHelper1< ::com::sun::star::container::XNameContainer> + , private SwClient +{ + public: + SwXFieldmarkParameters(::sw::mark::IFieldmark* const pFieldmark) + { + pFieldmark->Add(this); + } + + // XNameContainer + virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeByName( const ::rtl::OUString& Name ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + // XNameReplace + virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + // XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException); + //SwClient + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + private: + ::sw::mark::IFieldmark::parameter_map_t* getCoreParameters() throw (::com::sun::star::uno::RuntimeException); +}; + typedef cppu::ImplInheritanceHelper1< SwXBookmark, ::com::sun::star::text::XFormField > SwXFieldmark_Base; @@ -223,19 +251,11 @@ public: ::com::sun::star::text::XTextRange > & xTextRange) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - virtual ::rtl::OUString SAL_CALL getDescription() - throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int16 SAL_CALL getType() - throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int16 SAL_CALL getRes() - throw (::com::sun::star::uno::RuntimeException); - - virtual void SAL_CALL setDescription(const ::rtl::OUString& rDescription) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setType(::sal_Int16 fieldType) + virtual ::rtl::OUString SAL_CALL getFieldType(void) + throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setFieldType(const ::rtl::OUString& description ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setRes(::sal_Int16 res) + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > SAL_CALL getParameters( ) throw (::com::sun::star::uno::RuntimeException); }; diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 385d4fb85f..2228c4e213 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -271,17 +271,6 @@ namespace sw { namespace mark uno::Reference< rdf::XMetadatable > Bookmark::MakeUnoObject() { - // re-use existing SwXBookmark - SwClientIter iter( *this ); - SwClient * pClient( iter.First( TYPE( SwXBookmark ) ) ); - while (pClient) { - SwXBookmark *const pBookmark( dynamic_cast(pClient) ); - if (pBookmark && pBookmark->GetCoreObject() == this) { - return pBookmark; - } - pClient = iter.Next(); - } - // create new SwXBookmark SwDoc *const pDoc( GetMarkPos().GetDoc() ); OSL_ENSURE(pDoc, "Bookmark::MakeUnoObject: no doc?"); diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index 9ad0a1051b..da0f334bef 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -55,7 +55,7 @@ using namespace ::sw::mark; using namespace ::com::sun::star; using ::rtl::OUString; -using ::rtl::OUStringBuffer; + namespace { @@ -202,15 +202,15 @@ const uno::Sequence< sal_Int8 > & SwXBookmark::getUnoTunnelId() sal_Int64 SAL_CALL SwXBookmark::getSomething(const uno::Sequence< sal_Int8 >& rId) - throw(uno::RuntimeException) +throw (uno::RuntimeException) { return ::sw::UnoTunnelImpl(rId, this); - } +} void SwXBookmark::attachToRangeEx( const uno::Reference< text::XTextRange > & xTextRange, IDocumentMarkAccess::MarkType eType) - throw(lang::IllegalArgumentException, uno::RuntimeException) +throw (lang::IllegalArgumentException, uno::RuntimeException) { if (m_pImpl->m_pRegisteredBookmark) { @@ -232,116 +232,146 @@ void SwXBookmark::attachToRangeEx( (pRange) ? pRange->GetDoc() : ((pCursor) ? pCursor->GetDoc() : 0); if (!pDoc) { - m_pDoc = pDc; - SwUnoInternalPaM aPam(*m_pDoc); - SwXTextRange::XTextRangeToSwPaM(aPam, xTextRange); - UnoActionContext aCont(m_pDoc); - if(!m_aName.Len()) - m_aName = OUString::createFromAscii("Bookmark"); - if(eType == IDocumentMarkAccess::BOOKMARK && ::sw::mark::CrossRefNumItemBookmark::IsLegalName(m_aName)) - eType = IDocumentMarkAccess::CROSSREF_NUMITEM_BOOKMARK; - else if(eType == IDocumentMarkAccess::BOOKMARK && ::sw::mark::CrossRefHeadingBookmark::IsLegalName(m_aName)) - eType = IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK; - registerInMark(m_pDoc->getIDocumentMarkAccess()->makeMark(aPam, m_aName, eType)); - // --> OD 2007-10-23 #i81002# - // Check, if bookmark has been created. - // E.g., the creation of a cross-reference bookmark is suppress, - // if the PaM isn't a valid one for cross-reference bookmarks. - if(!m_pRegisteredBookmark) - { - OSL_ENSURE(false, - "" - " - could not create Mark."); - throw lang::IllegalArgumentException(); - } - // <-- + throw lang::IllegalArgumentException(); + } + + m_pImpl->m_pDoc = pDoc; + SwUnoInternalPaM aPam(*m_pImpl->m_pDoc); + ::sw::XTextRangeToSwPaM(aPam, xTextRange); + UnoActionContext aCont(m_pImpl->m_pDoc); + if (!m_pImpl->m_sMarkName.getLength()) + { + m_pImpl->m_sMarkName = OUString::createFromAscii("Bookmark"); + } + if ((eType == IDocumentMarkAccess::BOOKMARK) && + ::sw::mark::CrossRefNumItemBookmark::IsLegalName(m_pImpl->m_sMarkName)) + { + eType = IDocumentMarkAccess::CROSSREF_NUMITEM_BOOKMARK; + } + else if ((eType == IDocumentMarkAccess::BOOKMARK) && + ::sw::mark::CrossRefHeadingBookmark::IsLegalName(m_pImpl->m_sMarkName)) + { + eType = IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK; } - else + m_pImpl->registerInMark(*this, + m_pImpl->m_pDoc->getIDocumentMarkAccess()->makeMark( + aPam, m_pImpl->m_sMarkName, eType)); + // --> OD 2007-10-23 #i81002# + // Check, if bookmark has been created. + // E.g., the creation of a cross-reference bookmark is suppress, + // if the PaM isn't a valid one for cross-reference bookmarks. + if (!m_pImpl->m_pRegisteredBookmark) + { + OSL_ENSURE(false, + "" + " - could not create Mark."); throw lang::IllegalArgumentException(); + } + // <-- } -void SwXBookmark::attachToRange(const uno::Reference< text::XTextRange > & xTextRange) - throw( lang::IllegalArgumentException, uno::RuntimeException ) +void SwXBookmark::attachToRange( + const uno::Reference< text::XTextRange > & xTextRange) +throw (lang::IllegalArgumentException, uno::RuntimeException) { attachToRangeEx(xTextRange, IDocumentMarkAccess::BOOKMARK); } -void SwXBookmark::attach(const uno::Reference< text::XTextRange > & xTextRange) - throw( lang::IllegalArgumentException, uno::RuntimeException ) +void SAL_CALL +SwXBookmark::attach(const uno::Reference< text::XTextRange > & xTextRange) +throw (lang::IllegalArgumentException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); attachToRange( xTextRange ); } -uno::Reference< text::XTextRange > SwXBookmark::getAnchor(void) - throw( uno::RuntimeException ) +uno::Reference< text::XTextRange > SAL_CALL +SwXBookmark::getAnchor() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - uno::Reference< text::XTextRange > aRet; - if(m_pRegisteredBookmark) - aRet = SwXTextRange::CreateTextRangeFromPosition( - m_pDoc, - m_pRegisteredBookmark->GetMarkPos(), - m_pRegisteredBookmark->IsExpanded() ? &m_pRegisteredBookmark->GetOtherMarkPos() : NULL); - else + + if (!m_pImpl->m_pRegisteredBookmark) + { throw uno::RuntimeException(); - return aRet; + } + return SwXTextRange::CreateXTextRange( + *m_pImpl->m_pDoc, + m_pImpl->m_pRegisteredBookmark->GetMarkPos(), + (m_pImpl->m_pRegisteredBookmark->IsExpanded()) + ? &m_pImpl->m_pRegisteredBookmark->GetOtherMarkPos() : NULL); } -void SwXBookmark::dispose(void) - throw( uno::RuntimeException ) +void SAL_CALL SwXBookmark::dispose() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(m_pRegisteredBookmark) - GetDoc()->getIDocumentMarkAccess()->deleteMark(m_pRegisteredBookmark); - else - throw uno::RuntimeException(); + if (m_pImpl->m_pRegisteredBookmark) + { + m_pImpl->m_pDoc->getIDocumentMarkAccess()->deleteMark( + m_pImpl->m_pRegisteredBookmark); + } } -void SwXBookmark::addEventListener(const uno::Reference< lang::XEventListener > & aListener) - throw( uno::RuntimeException ) +void SAL_CALL SwXBookmark::addEventListener( + const uno::Reference< lang::XEventListener > & xListener) +throw (uno::RuntimeException) { - if(!m_pRegisteredBookmark) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->m_pRegisteredBookmark) + { throw uno::RuntimeException(); - m_aLstnrCntnr.AddListener(aListener); + } + m_pImpl->m_ListenerContainer.AddListener(xListener); } -void SwXBookmark::removeEventListener(const uno::Reference< lang::XEventListener > & aListener) - throw( uno::RuntimeException ) +void SAL_CALL SwXBookmark::removeEventListener( + const uno::Reference< lang::XEventListener > & xListener) +throw (uno::RuntimeException) { - if(!m_pRegisteredBookmark || !m_aLstnrCntnr.RemoveListener(aListener)) + vos::OGuard g(Application::GetSolarMutex()); + + if (!m_pImpl->m_pRegisteredBookmark || + !m_pImpl->m_ListenerContainer.RemoveListener(xListener)) + { throw uno::RuntimeException(); + } } -OUString SwXBookmark::getName(void) - throw(uno::RuntimeException) +OUString SAL_CALL SwXBookmark::getName() +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - OUString sRet; - if(m_pRegisteredBookmark) - sRet = m_pRegisteredBookmark->GetName(); - else - sRet = m_aName; - return sRet; + + return (m_pImpl->m_pRegisteredBookmark) + ? m_pImpl->m_pRegisteredBookmark->GetName() + : m_pImpl->m_sMarkName; } -void SwXBookmark::setName(const OUString& rName) - throw(uno::RuntimeException) +void SAL_CALL SwXBookmark::setName(const OUString& rName) +throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - if(!m_pRegisteredBookmark) - m_aName = rName; - if(!m_pRegisteredBookmark || getName() == rName) + + if (!m_pImpl->m_pRegisteredBookmark) + { + m_pImpl->m_sMarkName = rName; + } + if (!m_pImpl->m_pRegisteredBookmark || (getName() == rName)) + { return; - IDocumentMarkAccess* const pMarkAccess = m_pDoc->getIDocumentMarkAccess(); + } + IDocumentMarkAccess *const pMarkAccess = + m_pImpl->m_pDoc->getIDocumentMarkAccess(); if(pMarkAccess->findMark(rName) != pMarkAccess->getMarksEnd()) + { throw uno::RuntimeException(); + } - SwPaM aPam(m_pRegisteredBookmark->GetMarkPos()); - if(m_pRegisteredBookmark->IsExpanded()) + SwPaM aPam(m_pImpl->m_pRegisteredBookmark->GetMarkPos()); + if (m_pImpl->m_pRegisteredBookmark->IsExpanded()) { aPam.SetMark(); - *aPam.GetMark() = m_pRegisteredBookmark->GetOtherMarkPos(); + *aPam.GetMark() = m_pImpl->m_pRegisteredBookmark->GetOtherMarkPos(); } SwRewriter aRewriter; @@ -349,162 +379,197 @@ void SwXBookmark::setName(const OUString& rName) aRewriter.AddRule(UNDO_ARG2, SW_RES(STR_YIELDS)); aRewriter.AddRule(UNDO_ARG3, lcl_QuoteName(rName)); - m_pDoc->StartUndo(UNDO_BOOKMARK_RENAME, &aRewriter); - pMarkAccess->renameMark(m_pRegisteredBookmark, rName); - m_pDoc->EndUndo(UNDO_BOOKMARK_RENAME, NULL); + m_pImpl->m_pDoc->StartUndo(UNDO_BOOKMARK_RENAME, &aRewriter); + pMarkAccess->renameMark(m_pImpl->m_pRegisteredBookmark, rName); + m_pImpl->m_pDoc->EndUndo(UNDO_BOOKMARK_RENAME, NULL); } -OUString SwXBookmark::getImplementationName(void) throw( uno::RuntimeException ) +OUString SAL_CALL +SwXBookmark::getImplementationName() throw (uno::RuntimeException) { return OUString::createFromAscii("SwXBookmark"); } -sal_Bool SwXBookmark::supportsService(const OUString& rServiceName) - throw( uno::RuntimeException ) +static char const*const g_ServicesBookmark[] = { - return !rServiceName.compareToAscii("com.sun.star.text.Bookmark") || - !rServiceName.compareToAscii("com.sun.star.document.LinkTarget") || - !rServiceName.compareToAscii("com.sun.star.text.TextContent"); -} + "com.sun.star.text.TextContent", + "com.sun.star.text.Bookmark", + "com.sun.star.document.LinkTarget", +}; +static const size_t g_nServicesBookmark( + sizeof(g_ServicesBookmark)/sizeof(g_ServicesBookmark[0])); -uno::Sequence< OUString > SwXBookmark::getSupportedServiceNames(void) - throw( uno::RuntimeException ) +sal_Bool SAL_CALL SwXBookmark::supportsService(const OUString& rServiceName) +throw (uno::RuntimeException) { - uno::Sequence< OUString > aRet(3); - aRet[0] = OUString::createFromAscii("com.sun.star.text.Bookmark"); - aRet[1] = OUString::createFromAscii("com.sun.star.document.LinkTarget"); - aRet[2] = OUString::createFromAscii("com.sun.star.text.TextContent"); - return aRet; + return ::sw::SupportsServiceImpl( + g_nServicesBookmark, g_ServicesBookmark, rServiceName); } -void SwXBookmark::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) +uno::Sequence< OUString > SAL_CALL +SwXBookmark::getSupportedServiceNames() throw (uno::RuntimeException) { - ClientModify(this, pOld, pNew); - if(!GetRegisteredIn()) - { - m_pRegisteredBookmark = NULL; - m_pDoc = NULL; - m_aLstnrCntnr.Disposing(); - } + return ::sw::GetSupportedServiceNamesImpl( + g_nServicesBookmark, g_ServicesBookmark); } // MetadatableMixin ::sfx2::Metadatable* SwXBookmark::GetCoreObject() { - return dynamic_cast< ::sfx2::Metadatable* >( GetBookmark() ); + return dynamic_cast< ::sfx2::Metadatable* >(m_pImpl->m_pRegisteredBookmark); } uno::Reference SwXBookmark::GetModel() { - if (GetDoc()) + if (m_pImpl->m_pDoc) { - SwDocShell const * const pShell( GetDoc()->GetDocShell() ); + SwDocShell const * const pShell( m_pImpl->m_pDoc->GetDocShell() ); return (pShell) ? pShell->GetModel() : 0; } return 0; } -uno::Reference< beans::XPropertySetInfo > SwXBookmark::getPropertySetInfo(void) - throw( uno::RuntimeException ) +uno::Reference< beans::XPropertySetInfo > SAL_CALL +SwXBookmark::getPropertySetInfo() throw (uno::RuntimeException) { - static uno::Reference< beans::XPropertySetInfo > aRef; - if(!aRef.is()) - { - aRef = aSwMapProvider.GetPropertySet(PROPERTY_MAP_BOOKMARK)->getPropertySetInfo(); - } - return aRef; + vos::OGuard g(Application::GetSolarMutex()); + + static uno::Reference< beans::XPropertySetInfo > xRef( + aSwMapProvider.GetPropertySet(PROPERTY_MAP_BOOKMARK) + ->getPropertySetInfo() ); + return xRef; } -void SwXBookmark::setPropertyValue(const OUString& PropertyName, const uno::Any& /*aValue*/) - throw( beans::UnknownPropertyException, - beans::PropertyVetoException, - lang::IllegalArgumentException, - lang::WrappedTargetException, - uno::RuntimeException ) +void SAL_CALL +SwXBookmark::setPropertyValue(const OUString& PropertyName, + const uno::Any& /*rValue*/) +throw (beans::UnknownPropertyException, beans::PropertyVetoException, + lang::IllegalArgumentException, lang::WrappedTargetException, + uno::RuntimeException) { // nothing to set here - throw IllegalArgumentException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + PropertyName, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw lang::IllegalArgumentException( ::rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("Property is read-only: ")) + + PropertyName, static_cast< cppu::OWeakObject * >(this), 0 ); } -uno::Any SwXBookmark::getPropertyValue(const OUString& rPropertyName) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) +uno::Any SAL_CALL SwXBookmark::getPropertyValue(const OUString& rPropertyName) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) { + vos::OGuard g(Application::GetSolarMutex()); + uno::Any aRet; - if(!SwXParagraph::getDefaultTextContentValue(aRet, rPropertyName)) + if (! ::sw::GetDefaultTextContentValue(aRet, rPropertyName)) { if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_LINK_DISPLAY_NAME))) + { aRet <<= getName(); + } } return aRet; } -void SwXBookmark::addPropertyChangeListener(const OUString& /*PropertyName*/, - const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) -{ } +void SAL_CALL +SwXBookmark::addPropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) +{ + OSL_ENSURE(false, + "SwXBookmark::addPropertyChangeListener(): not implemented"); +} -void SwXBookmark::removePropertyChangeListener(const OUString& /*PropertyName*/, - const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) -{ } +void SAL_CALL +SwXBookmark::removePropertyChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) +{ + OSL_ENSURE(false, + "SwXBookmark::removePropertyChangeListener(): not implemented"); +} -void SwXBookmark::addVetoableChangeListener(const OUString& /*PropertyName*/, - const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) -{ } +void SAL_CALL +SwXBookmark::addVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) +{ + OSL_ENSURE(false, + "SwXBookmark::addVetoableChangeListener(): not implemented"); +} -void SwXBookmark::removeVetoableChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) - throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) -{ } +void SAL_CALL +SwXBookmark::removeVetoableChangeListener( + const ::rtl::OUString& /*rPropertyName*/, + const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/) +throw (beans::UnknownPropertyException, lang::WrappedTargetException, + uno::RuntimeException) +{ + OSL_ENSURE(false, + "SwXBookmark::removeVetoableChangeListener(): not implemented"); +} +/****************************************************************** + * SwXFieldmark + ******************************************************************/ -void SwXFieldmarkParameters::insertByName(const OUString& aName, const Any& aElement) - throw (IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException) +SwXFieldmark::SwXFieldmark(bool _isReplacementObject, ::sw::mark::IMark* pBkm, SwDoc* pDc) + : SwXFieldmark_Base(pBkm, pDc) + , isReplacementObject(_isReplacementObject) +{ } + +void SwXFieldmarkParameters::insertByName(const OUString& aName, const uno::Any& aElement) + throw (lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); IFieldmark::parameter_map_t* pParameters = getCoreParameters(); if(pParameters->find(aName) != pParameters->end()) - throw ElementExistException(); + throw container::ElementExistException(); (*pParameters)[aName] = aElement; } void SwXFieldmarkParameters::removeByName(const OUString& aName) - throw (NoSuchElementException, WrappedTargetException, RuntimeException) + throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); if(!getCoreParameters()->erase(aName)) - throw NoSuchElementException(); + throw container::NoSuchElementException(); } -void SwXFieldmarkParameters::replaceByName(const OUString& aName, const Any& aElement) - throw (IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException) +void SwXFieldmarkParameters::replaceByName(const OUString& aName, const uno::Any& aElement) + throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); IFieldmark::parameter_map_t* pParameters = getCoreParameters(); IFieldmark::parameter_map_t::iterator pEntry = pParameters->find(aName); if(pEntry == pParameters->end()) - throw NoSuchElementException(); + throw container::NoSuchElementException(); pEntry->second = aElement; } -Any SwXFieldmarkParameters::getByName(const OUString& aName) - throw (NoSuchElementException, WrappedTargetException, RuntimeException) +uno::Any SwXFieldmarkParameters::getByName(const OUString& aName) + throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); IFieldmark::parameter_map_t* pParameters = getCoreParameters(); IFieldmark::parameter_map_t::iterator pEntry = pParameters->find(aName); if(pEntry == pParameters->end()) - throw NoSuchElementException(); + throw container::NoSuchElementException(); return pEntry->second; } -Sequence SwXFieldmarkParameters::getElementNames() - throw (RuntimeException) +uno::Sequence SwXFieldmarkParameters::getElementNames() + throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); IFieldmark::parameter_map_t* pParameters = getCoreParameters(); - Sequence vResult(pParameters->size()); + uno::Sequence vResult(pParameters->size()); OUString* pOutEntry = vResult.getArray(); for(IFieldmark::parameter_map_t::iterator pEntry = pParameters->begin(); pEntry!=pParameters->end(); ++pEntry, ++pOutEntry) *pOutEntry = pEntry->first; @@ -512,21 +577,21 @@ Sequence SwXFieldmarkParameters::getElementNames() } ::sal_Bool SwXFieldmarkParameters::hasByName(const OUString& aName) - throw (RuntimeException) + throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); IFieldmark::parameter_map_t* pParameters = getCoreParameters(); return (pParameters->find(aName) != pParameters->end()); } -Type SwXFieldmarkParameters::getElementType() - throw (RuntimeException) +uno::Type SwXFieldmarkParameters::getElementType() + throw (uno::RuntimeException) { return ::cppu::UnoType< ::cppu::UnoVoidType>::get(); } ::sal_Bool SwXFieldmarkParameters::hasElements() - throw (RuntimeException) + throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); return !getCoreParameters()->empty(); @@ -539,18 +604,14 @@ void SwXFieldmarkParameters::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew) IFieldmark::parameter_map_t* SwXFieldmarkParameters::getCoreParameters() - throw (RuntimeException) + throw (uno::RuntimeException) { const IFieldmark* pFieldmark = dynamic_cast< const IFieldmark* >(GetRegisteredIn()); if(!pFieldmark) - throw RuntimeException(); + throw uno::RuntimeException(); return const_cast< IFieldmark* >(pFieldmark)->GetParameters(); } -SwXFieldmark::SwXFieldmark(bool _isReplacementObject, ::sw::mark::IMark* pBkm, SwDoc* pDc) - : SwXFieldmark_Base(pBkm, pDc) - , isReplacementObject(_isReplacementObject) -{ } void SwXFieldmark::attachToRange( const uno::Reference < text::XTextRange >& xTextRange ) throw(lang::IllegalArgumentException, uno::RuntimeException) @@ -565,7 +626,7 @@ void SwXFieldmark::attachToRange( const uno::Reference < text::XTextRange >& xTe vos::OGuard aGuard(Application::GetSolarMutex()); const IFieldmark *pBkm = dynamic_cast(GetBookmark()); if(!pBkm) - throw RuntimeException(); + throw uno::RuntimeException(); return pBkm->GetFieldname(); } @@ -573,18 +634,21 @@ void SwXFieldmark::setFieldType(const::rtl::OUString & fieldType) throw(uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - IFieldmark *pBkm = dynamic_cast(GetBookmark()); + IFieldmark *pBkm = const_cast( + dynamic_cast(GetBookmark())); if(!pBkm) - throw RuntimeException(); + throw uno::RuntimeException(); pBkm->SetFieldname(fieldType); } -Reference SwXFieldmark::getParameters() +uno::Reference SwXFieldmark::getParameters() throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - IFieldmark *pBkm = dynamic_cast(GetBookmark()); + IFieldmark *pBkm = const_cast( + dynamic_cast(GetBookmark())); if(!pBkm) throw uno::RuntimeException(); - return Reference(new SwXFieldmarkParameters(pBkm)); + return uno::Reference(new SwXFieldmarkParameters(pBkm)); } + diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index dc201d8f81..a1dc0432d3 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -1083,11 +1083,13 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb ) rSh.StartAllAction(); if( bSet ) rSh.SetFlyFrmAttr( aSet ); - BOOL bSetPos = FLY_IN_CNTNT != eAnchorId; + BOOL bSetPos = (FLY_AS_CHAR != eAnchorId); if(bSetPos && bWeb) { - if(FLY_PAGE != eAnchorId) + if (FLY_AT_PAGE != eAnchorId) + { bSetPos = FALSE; + } else { bSetPos = (::GetHtmlMode(rView.GetDocShell()) & HTMLMODE_SOME_ABS_POS) ? @@ -1758,7 +1760,7 @@ KEYINPUT_CHECKTABLE_INSDEL: !rSh.GetCurNumRule()->IsOutlineRule() && !rSh.HasSelection() && rSh.IsSttPara() && rSh.IsEndPara() ) - eKeyState = KS_NumOff, eNextKeyState = KS_OutlineLvOff; + eKeyState = KS_NumOff, eNextKeyState = KS_OutlineLvOff; //RETURN fuer neuen Absatz mit AutoFormatierung else if( pACfg && pACfg->IsAutoFmtByInput() && @@ -1892,7 +1894,7 @@ KEYINPUT_CHECKTABLE_INSDEL: #endif if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark() || rSh.GetChar(FALSE)==CH_TXT_ATR_FORMELEMENT) { - eKeyState=KS_GotoNextFieldMark; + eKeyState=KS_GotoNextFieldMark; } else if( rSh.GetCurNumRule() && rSh.IsSttOfPara() && @@ -1947,7 +1949,7 @@ KEYINPUT_CHECKTABLE_INSDEL: BOOL bOld = rSh.ChgCrsrTimerFlag( FALSE ); #endif if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(FALSE)==CH_TXT_ATR_FORMELEMENT) { - eKeyState=KS_GotoPrevFieldMark; + eKeyState=KS_GotoPrevFieldMark; } else if( rSh.GetCurNumRule() && rSh.IsSttOfPara() && !rSh.HasReadonlySel() ) @@ -1984,7 +1986,7 @@ KEYINPUT_CHECKTABLE_INSDEL: SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); //if( pColl && 0 < pColl->GetOutlineLevel() && //#outline level,zhaojianwei // MAXLEVEL - 1 >= pColl->GetOutlineLevel() ) - if( pColl && + if( pColl && pColl->IsAssignedToListLevelOfOutlineStyle() && 0 < pColl->GetAssignedOutlineStyleLevel()) eKeyState = KS_OutlineUp; @@ -2362,14 +2364,14 @@ KEYINPUT_CHECKTABLE_INSDEL: nKS_NUMINDENTINC_Count = 2; break; - case KS_GotoNextFieldMark: + case KS_GotoNextFieldMark: { ::sw::mark::IFieldmark const * const pFieldmark = rSh.GetFieldmarkAfter(); if(pFieldmark) rSh.GotoFieldmark(pFieldmark); } break; - case KS_GotoPrevFieldMark: + case KS_GotoPrevFieldMark: { ::sw::mark::IFieldmark const * const pFieldmark = rSh.GetFieldmarkBefore(); if(pFieldmark) rSh.GotoFieldmark(pFieldmark); @@ -4224,7 +4226,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) } } } - else // if ( SwContentAtPos::SW_INETATTR == aCntntAtPos.eCntntAtPos ) + else // if ( SwContentAtPos::SW_INETATTR == aCntntAtPos.eCntntAtPos ) { if ( bExecHyperlinks ) rSh.ClickToINetAttr( *(SwFmtINetFmt*)aCntntAtPos.aFnd.pAttr, nFilter ); @@ -4791,7 +4793,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) aEvent.ExecutePosition.X = aPixPos.X(); aEvent.ExecutePosition.Y = aPixPos.Y(); Menu* pMenu = 0; - ::rtl::OUString sMenuName = + ::rtl::OUString sMenuName = ::rtl::OUString::createFromAscii( "private:resource/ReadonlyContextMenu"); if( GetView().TryContextMenuInterception( *pROPopup, sMenuName, pMenu, aEvent ) ) { -- cgit v1.2.3 From abb9a922d44e9a4d5cdc57becff73de86ba954fd Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 10 Feb 2010 13:53:11 +0100 Subject: sw33a11y01: #i88070# - accessible Writer comments - part 3 --- sw/inc/access.hrc | 35 +++++++++++++++-------------- sw/source/ui/docvw/AnnotationMenuButton.cxx | 24 ++++++++++++++++++-- sw/source/ui/docvw/AnnotationMenuButton.hxx | 1 + sw/source/ui/docvw/PostItMgr.cxx | 2 +- sw/source/ui/docvw/SidebarWin.cxx | 10 +++++++++ sw/source/ui/docvw/SidebarWinAcc.cxx | 6 ++++- sw/source/ui/docvw/access.src | 18 ++++++++++++++- 7 files changed, 74 insertions(+), 22 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/access.hrc b/sw/inc/access.hrc index a02a1703fc..161fc4de5c 100644 --- a/sw/inc/access.hrc +++ b/sw/inc/access.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,28 +33,29 @@ #include "rcid.hrc" -// --> OD 2004-09-27 #117970# - remove STR_ACCESS_PARAGRAPH_NAME, STR_ACCESS_HEADING_NAME -// STR_ACCESS_PARAGRAPH_DESC and STR_ACCESS_HEADING_DESC -#define STR_ACCESS_DOC_NAME (RC_ACCESS_BEGIN + 1) -#define STR_ACCESS_DOC_DESC (RC_ACCESS_BEGIN + 2) -#define STR_ACCESS_HEADING_WITH_NUM_DESC (RC_ACCESS_BEGIN + 3) -#define STR_ACCESS_HEADER_NAME (RC_ACCESS_BEGIN + 4) -#define STR_ACCESS_HEADER_DESC (RC_ACCESS_BEGIN + 5) -#define STR_ACCESS_FOOTER_NAME (RC_ACCESS_BEGIN + 6) -#define STR_ACCESS_FOOTER_DESC (RC_ACCESS_BEGIN + 7) +#define STR_ACCESS_DOC_NAME (RC_ACCESS_BEGIN + 1) +#define STR_ACCESS_DOC_DESC (RC_ACCESS_BEGIN + 2) +#define STR_ACCESS_HEADING_WITH_NUM_DESC (RC_ACCESS_BEGIN + 3) +#define STR_ACCESS_HEADER_NAME (RC_ACCESS_BEGIN + 4) +#define STR_ACCESS_HEADER_DESC (RC_ACCESS_BEGIN + 5) +#define STR_ACCESS_FOOTER_NAME (RC_ACCESS_BEGIN + 6) +#define STR_ACCESS_FOOTER_DESC (RC_ACCESS_BEGIN + 7) #define STR_ACCESS_FOOTNOTE_NAME (RC_ACCESS_BEGIN + 8) #define STR_ACCESS_FOOTNOTE_DESC (RC_ACCESS_BEGIN + 9) -#define STR_ACCESS_ENDNOTE_NAME (RC_ACCESS_BEGIN + 10) -#define STR_ACCESS_ENDNOTE_DESC (RC_ACCESS_BEGIN + 11) -#define STR_ACCESS_REPLACEMENT_POSTIT (RC_ACCESS_BEGIN + 12) -#define STR_ACCESS_REPLACEMENT_FRAME (RC_ACCESS_BEGIN + 13) -#define STR_ACCESS_REPLACEMENT_BULLET_GRAPHICS (RC_ACCESS_BEGIN + 14) +#define STR_ACCESS_ENDNOTE_NAME (RC_ACCESS_BEGIN + 10) +#define STR_ACCESS_ENDNOTE_DESC (RC_ACCESS_BEGIN + 11) +#define STR_ACCESS_REPLACEMENT_POSTIT (RC_ACCESS_BEGIN + 12) +#define STR_ACCESS_REPLACEMENT_FRAME (RC_ACCESS_BEGIN + 13) +#define STR_ACCESS_REPLACEMENT_BULLET_GRAPHICS (RC_ACCESS_BEGIN + 14) #define STR_ACCESS_TABLE_DESC (RC_ACCESS_BEGIN + 15) #define STR_ACCESS_PAGE_NAME (RC_ACCESS_BEGIN + 16) #define STR_ACCESS_PAGE_DESC (RC_ACCESS_BEGIN + 17) -// <-- +#define STR_ACCESS_ANNOTATION_AUTHOR_NAME (RC_ACCESS_BEGIN + 18) +#define STR_ACCESS_ANNOTATION_DATE_NAME (RC_ACCESS_BEGIN + 19) +#define STR_ACCESS_ANNOTATION_BUTTON_NAME (RC_ACCESS_BEGIN + 20) +#define STR_ACCESS_ANNOTATION_BUTTON_DESC (RC_ACCESS_BEGIN + 21) -#define ACCESS_ACT_END STR_ACCESS_PAGE_DESC +#define ACCESS_ACT_END STR_ACCESS_PAGE_DESC #if ACCESS_ACT_END > RC_ACCESS_END #error Resource-Id Ueberlauf in #file, #line diff --git a/sw/source/ui/docvw/AnnotationMenuButton.cxx b/sw/source/ui/docvw/AnnotationMenuButton.cxx index 877d5a3331..f0d31b0d59 100644 --- a/sw/source/ui/docvw/AnnotationMenuButton.cxx +++ b/sw/source/ui/docvw/AnnotationMenuButton.cxx @@ -35,6 +35,7 @@ #include #include +#include #include @@ -48,8 +49,8 @@ namespace sw { namespace annotation { -Color ColorFromAlphaColor( const UINT8 aTransparency, - const Color &aFront, +Color ColorFromAlphaColor( const UINT8 aTransparency, + const Color &aFront, const Color &aBack ) { return Color((UINT8)(aFront.GetRed() * aTransparency/(double)255 + aBack.GetRed() * (1-aTransparency/(double)255)), @@ -62,6 +63,10 @@ AnnotationMenuButton::AnnotationMenuButton( sw::sidebarwindows::SwSidebarWin& rS , mrSidebarWin( rSidebarWin ) { AddEventListener( LINK( &mrSidebarWin, sw::sidebarwindows::SwSidebarWin, WindowEventListener ) ); + + SetAccessibleName( SW_RES( STR_ACCESS_ANNOTATION_BUTTON_NAME ) ); + SetAccessibleDescription( SW_RES( STR_ACCESS_ANNOTATION_BUTTON_DESC ) ); + SetQuickHelpText( GetAccessibleDescription() ); } AnnotationMenuButton::~AnnotationMenuButton() @@ -198,5 +203,20 @@ void AnnotationMenuButton::Paint( const Rectangle& /*rRect*/ ) } } +void AnnotationMenuButton::KeyInput( const KeyEvent& rKeyEvt ) +{ + const KeyCode& rKeyCode = rKeyEvt.GetKeyCode(); + const USHORT nKey = rKeyCode.GetCode(); + if ( nKey == KEY_TAB ) + { + mrSidebarWin.ActivatePostIt(); + mrSidebarWin.GrabFocus(); + } + else + { + MenuButton::KeyInput( rKeyEvt ); + } +} + } } // end of namespace sw::annotation diff --git a/sw/source/ui/docvw/AnnotationMenuButton.hxx b/sw/source/ui/docvw/AnnotationMenuButton.hxx index bfef9b3018..c74719f1ca 100644 --- a/sw/source/ui/docvw/AnnotationMenuButton.hxx +++ b/sw/source/ui/docvw/AnnotationMenuButton.hxx @@ -52,6 +52,7 @@ class AnnotationMenuButton : public MenuButton // overloaded methods virtual void MouseButtonDown( const MouseEvent& rMEvt ); virtual void Paint( const Rectangle& rRect ); + virtual void KeyInput( const KeyEvent& rKeyEvt ); private: sw::sidebarwindows::SwSidebarWin& mrSidebarWin; diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index f4bd74c2ef..b10339cc28 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -671,7 +671,7 @@ void SwPostItMgr::LayoutPostIts() if (!pPostIt) { pPostIt = (*i)->GetSidebarWindow( mpView->GetEditWin(), - WINDOW_CONTROL|WB_NODIALOGCONTROL, + WB_DIALOGCONTROL, *this, 0 ); pPostIt->InitControls(); diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx index b6276669d5..1bd0afa94a 100644 --- a/sw/source/ui/docvw/SidebarWin.cxx +++ b/sw/source/ui/docvw/SidebarWin.cxx @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -140,6 +141,8 @@ SwSidebarWin::~SwSidebarWin() mrMgr.DisconnectSidebarWinFromFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm), *this ); + Disable(); + if ( mpSidebarTxtControl ) { if ( mpOutlinerView ) @@ -147,6 +150,7 @@ SwSidebarWin::~SwSidebarWin() mpOutlinerView->SetWindow( 0 ); } delete mpSidebarTxtControl; + mpSidebarTxtControl = 0; } if ( mpOutlinerView ) @@ -158,18 +162,21 @@ SwSidebarWin::~SwSidebarWin() if (mpOutliner) { delete mpOutliner; + mpOutliner = 0; } if (mpMetadataAuthor) { mpMetadataAuthor->RemoveEventListener( LINK( this, SwSidebarWin, WindowEventListener ) ); delete mpMetadataAuthor; + mpMetadataAuthor = 0; } if (mpMetadataDate) { mpMetadataDate->RemoveEventListener( LINK( this, SwSidebarWin, WindowEventListener ) ); delete mpMetadataDate; + mpMetadataDate = 0; } if (mpVScrollbar) @@ -186,6 +193,7 @@ SwSidebarWin::~SwSidebarWin() mpShadow = 0; delete mpMenuButton; + mpMenuButton = 0; if (mnEventId) Application::RemoveUserEvent( mnEventId ); @@ -280,6 +288,7 @@ void SwSidebarWin::InitControls() // window controls for author and date mpMetadataAuthor = new Edit( this, 0 ); + mpMetadataAuthor->SetAccessibleName( SW_RES( STR_ACCESS_ANNOTATION_AUTHOR_NAME ) ); mpMetadataAuthor->SetReadOnly(); mpMetadataAuthor->AlwaysDisableInput(true); mpMetadataAuthor->SetCallHandlersOnInputDisabled(true); @@ -297,6 +306,7 @@ void SwSidebarWin::InitControls() } mpMetadataDate = new Edit( this, 0 ); + mpMetadataDate->SetAccessibleName( SW_RES( STR_ACCESS_ANNOTATION_DATE_NAME ) ); mpMetadataDate->SetReadOnly(); mpMetadataDate->AlwaysDisableInput(true); mpMetadataDate->SetCallHandlersOnInputDisabled(true); diff --git a/sw/source/ui/docvw/SidebarWinAcc.cxx b/sw/source/ui/docvw/SidebarWinAcc.cxx index 65bf4c7920..794a2ce6a7 100644 --- a/sw/source/ui/docvw/SidebarWinAcc.cxx +++ b/sw/source/ui/docvw/SidebarWinAcc.cxx @@ -38,6 +38,8 @@ #include #include +#include + namespace css = ::com::sun::star; namespace sw { namespace sidebarwindows { @@ -55,7 +57,9 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent , mrViewShell( rViewShell ) , mpAnchorFrm( pAnchorFrm ) , maMutex() - {} + { + rSidebarWin.SetAccessibleRole( css::accessibility::AccessibleRole::COMMENT ); + } virtual ~SidebarWinAccessibleContext() {} diff --git a/sw/source/ui/docvw/access.src b/sw/source/ui/docvw/access.src index e73ee278c2..b88eacb052 100644 --- a/sw/source/ui/docvw/access.src +++ b/sw/source/ui/docvw/access.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -86,4 +86,20 @@ String STR_ACCESS_PAGE_DESC { Text [ en-US ] = "Page: $(ARG1)"; }; +String STR_ACCESS_ANNOTATION_AUTHOR_NAME +{ + Text [ en-US ] = "Author"; +}; +String STR_ACCESS_ANNOTATION_DATE_NAME +{ + Text [ en-US ] = "Date"; +}; +String STR_ACCESS_ANNOTATION_BUTTON_NAME +{ + Text [ en-US ] = "Actions"; +}; +String STR_ACCESS_ANNOTATION_BUTTON_DESC +{ + Text [ en-US ] = "Activate this button to open a list of actions which can be performed on this comment and other comments"; +}; -- cgit v1.2.3 From ebd882ad6733ad1959a70ed9931e26999cba7307 Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Wed, 10 Feb 2010 14:28:02 +0100 Subject: dba33f: #i108959# check if null before calling --- sw/source/ui/app/apphdl.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index c9ca781e7c..db7c1def05 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -768,15 +768,20 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) DELETEZ(pWebToolbarConfig) ; DELETEZ(pAuthorNames) ; DELETEZ(pDBConfig); - pColorConfig->RemoveListener(this); + if ( pColorConfig ) + pColorConfig->RemoveListener(this); DELETEZ(pColorConfig); - pAccessibilityOptions->RemoveListener(this); + if ( pAccessibilityOptions ) + pAccessibilityOptions->RemoveListener(this); DELETEZ(pAccessibilityOptions); - pCTLOptions->RemoveListener(this); + if ( pCTLOptions ) + pCTLOptions->RemoveListener(this); DELETEZ(pCTLOptions); - pUserOptions->RemoveListener(this); + if ( pUserOptions ) + pUserOptions->RemoveListener(this); DELETEZ(pUserOptions); - pUndoOptions->RemoveListener(this); + if ( pUndoOptions ) + pUndoOptions->RemoveListener(this); DELETEZ(pUndoOptions); } } -- cgit v1.2.3 From 8a2222b6246e32c6ecf70cb9c99a8ff7548af924 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Fri, 12 Feb 2010 15:01:35 +0100 Subject: changefileheader2: #i109125#: change source file copyright notice from Sun Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision) --- starmath/inc/action.hxx | 5 +-- starmath/inc/applicat.hxx | 5 +-- starmath/inc/config.hxx | 5 +-- starmath/inc/dialog.hxx | 7 +--- starmath/inc/document.hxx | 5 +-- starmath/inc/edit.hxx | 5 +-- starmath/inc/format.hxx | 5 +-- starmath/inc/makefile.mk | 6 +-- starmath/inc/node.hxx | 5 +-- starmath/inc/parse.hxx | 5 +-- starmath/inc/pch/precompiled_starmath.cxx | 5 +-- starmath/inc/pch/precompiled_starmath.hxx | 5 +-- starmath/inc/rect.hxx | 5 +-- starmath/inc/smdll.hxx | 5 +-- starmath/inc/smmod.hxx | 5 +-- starmath/inc/starmath.hrc | 5 +-- starmath/inc/symbol.hxx | 5 +-- starmath/inc/toolbox.hxx | 5 +-- starmath/inc/types.hxx | 5 +-- starmath/inc/unomodel.hxx | 5 +-- starmath/inc/utility.hxx | 5 +-- starmath/inc/view.hxx | 5 +-- starmath/qa/unoapi/makefile.mk | 6 +-- starmath/sdi/makefile.mk | 8 +--- starmath/sdi/smath.sdi | 5 +-- starmath/sdi/smitems.sdi | 5 +-- starmath/sdi/smslots.sdi | 7 +--- starmath/source/accessibility.cxx | 5 +-- starmath/source/accessibility.hxx | 5 +-- starmath/source/action.cxx | 5 +-- starmath/source/cfgitem.cxx | 5 +-- starmath/source/cfgitem.hxx | 5 +-- starmath/source/commands.src | 5 +-- starmath/source/config.cxx | 7 +--- starmath/source/detreg.cxx | 5 +-- starmath/source/dialog.cxx | 5 +-- starmath/source/dialog.hrc | 5 +-- starmath/source/document.cxx | 7 +--- starmath/source/edit.cxx | 5 +-- starmath/source/eqnolefilehdr.cxx | 5 +-- starmath/source/eqnolefilehdr.hxx | 5 +-- starmath/source/format.cxx | 5 +-- starmath/source/makefile.mk | 6 +-- starmath/source/math_pch.cxx | 5 +-- starmath/source/mathmlexport.cxx | 49 ++++++++++------------ starmath/source/mathmlexport.hxx | 49 ++++++++++------------ starmath/source/mathmlimport.cxx | 7 +--- starmath/source/mathmlimport.hxx | 49 ++++++++++------------ starmath/source/mathtype.cxx | 5 +-- starmath/source/mathtype.hxx | 5 +-- starmath/source/menu_tmpl.src | 5 +-- starmath/source/node.cxx | 5 +-- starmath/source/parse.cxx | 5 +-- starmath/source/rect.cxx | 5 +-- starmath/source/register.cxx | 5 +-- starmath/source/smdetect.cxx | 5 +-- starmath/source/smdetect.hxx | 5 +-- starmath/source/smdll.cxx | 5 +-- starmath/source/smmod.cxx | 5 +-- starmath/source/smres.src | 5 +-- starmath/source/symbol.cxx | 5 +-- starmath/source/symbol.src | 5 +-- starmath/source/toolbox.cxx | 5 +-- starmath/source/toolbox.hrc | 5 +-- starmath/source/typemap.cxx | 5 +-- starmath/source/types.cxx | 5 +-- starmath/source/unodoc.cxx | 5 +-- starmath/source/unomodel.cxx | 5 +-- starmath/source/utility.cxx | 5 +-- starmath/source/view.cxx | 7 +--- starmath/util/hidother.src | 5 +-- starmath/util/makefile.mk | 6 +-- sw/inc/EnhancedPDFExportHelper.hxx | 5 +-- sw/inc/HandleAnchorNodeChg.hxx | 5 +-- sw/inc/IDocumentChartDataProviderAccess.hxx | 5 +-- sw/inc/IDocumentContentOperations.hxx | 7 +--- sw/inc/IDocumentDeviceAccess.hxx | 5 +-- sw/inc/IDocumentDrawModelAccess.hxx | 5 +-- sw/inc/IDocumentExternalData.hxx | 7 +--- sw/inc/IDocumentFieldsAccess.hxx | 5 +-- sw/inc/IDocumentLayoutAccess.hxx | 5 +-- sw/inc/IDocumentLineNumberAccess.hxx | 5 +-- sw/inc/IDocumentLinksAdministration.hxx | 5 +-- sw/inc/IDocumentListItems.hxx | 5 +-- sw/inc/IDocumentListsAccess.hxx | 7 +--- sw/inc/IDocumentMarkAccess.hxx | 5 +-- sw/inc/IDocumentOutlineNodes.hxx | 5 +-- sw/inc/IDocumentRedlineAccess.hxx | 5 +-- sw/inc/IDocumentSettingAccess.hxx | 7 +--- sw/inc/IDocumentState.hxx | 5 +-- sw/inc/IDocumentStatistics.hxx | 5 +-- sw/inc/IDocumentStylePoolAccess.hxx | 5 +-- sw/inc/IDocumentTimerAccess.hxx | 5 +-- sw/inc/IDocumentUndoRedo.hxx | 5 +-- sw/inc/IGrammarContact.hxx | 5 +-- sw/inc/IInterface.hxx | 5 +-- sw/inc/IMark.hxx | 5 +-- sw/inc/PostItMgr.hxx | 5 +-- sw/inc/RefreshListenerContainer.hxx | 5 +-- sw/inc/SwAppletImpl.hxx | 5 +-- sw/inc/SwCapObjType.hxx | 5 +-- sw/inc/SwGetPoolIdFromName.hxx | 5 +-- sw/inc/SwNodeNum.hxx | 5 +-- sw/inc/SwNumberTree.hxx | 7 +--- sw/inc/SwNumberTreeTypes.hxx | 7 +--- sw/inc/SwRewriter.hxx | 5 +-- sw/inc/SwSmartTagMgr.hxx | 5 +-- sw/inc/SwStyleNameMapper.hxx | 5 +-- sw/inc/SwUndoField.hxx | 5 +-- sw/inc/SwUndoFmt.hxx | 5 +-- sw/inc/SwUndoPageDesc.hxx | 5 +-- sw/inc/SwUndoTOXChange.hxx | 5 +-- sw/inc/SwXMLSectionList.hxx | 5 +-- sw/inc/TextCursorHelper.hxx | 5 +-- sw/inc/access.hrc | 5 +-- sw/inc/accessibilityoptions.hxx | 5 +-- sw/inc/accmap.hxx | 7 +--- sw/inc/acmplwrd.hxx | 5 +-- sw/inc/anchoreddrawobject.hxx | 5 +-- sw/inc/anchoredobject.hxx | 5 +-- sw/inc/authfld.hxx | 5 +-- sw/inc/authratr.hxx | 5 +-- sw/inc/bparr.hxx | 5 +-- sw/inc/breakit.hxx | 5 +-- sw/inc/calbck.hxx | 5 +-- sw/inc/calc.hxx | 5 +-- sw/inc/ccoll.hxx | 5 +-- sw/inc/cellatr.hxx | 5 +-- sw/inc/cellfml.hxx | 5 +-- sw/inc/charatr.hxx | 5 +-- sw/inc/charfmt.hxx | 5 +-- sw/inc/chcmprse.hxx | 5 +-- sw/inc/checkit.hxx | 5 +-- sw/inc/chpfld.hxx | 5 +-- sw/inc/chrdlg.hrc | 5 +-- sw/inc/cmdid.h | 7 +--- sw/inc/colwd.hxx | 5 +-- sw/inc/comcore.hrc | 5 +-- sw/inc/crsrsh.hxx | 7 +--- sw/inc/crsskip.hxx | 5 +-- sw/inc/crstate.hxx | 5 +-- sw/inc/cshtyp.hxx | 5 +-- sw/inc/dbfld.hxx | 5 +-- sw/inc/dbgoutsw.hxx | 5 +-- sw/inc/dbmgr.hxx | 5 +-- sw/inc/dbui.hrc | 5 +-- sw/inc/dcontact.hxx | 5 +-- sw/inc/ddefld.hxx | 5 +-- sw/inc/dialog.hrc | 5 +-- sw/inc/dlelstnr.hxx | 5 +-- sw/inc/dobjfac.hxx | 5 +-- sw/inc/doc.hxx | 7 +--- sw/inc/docary.hxx | 5 +-- sw/inc/docfac.hxx | 5 +-- sw/inc/dochdl.hrc | 5 +-- sw/inc/docsh.hxx | 5 +-- sw/inc/docstat.hxx | 5 +-- sw/inc/docstyle.hxx | 5 +-- sw/inc/docufld.hxx | 5 +-- sw/inc/dpage.hxx | 5 +-- sw/inc/drawdoc.hxx | 5 +-- sw/inc/edglbldc.hxx | 5 +-- sw/inc/edimp.hxx | 5 +-- sw/inc/editsh.hxx | 7 +--- sw/inc/envelp.hrc | 5 +-- sw/inc/errhdl.hxx | 7 +--- sw/inc/error.h | 5 +-- sw/inc/expfld.hxx | 5 +-- sw/inc/extinput.hxx | 5 +-- sw/inc/fchrfmt.hxx | 5 +-- sw/inc/fesh.hxx | 7 +--- sw/inc/fldbas.hxx | 7 +--- sw/inc/flddat.hxx | 5 +-- sw/inc/flddropdown.hxx | 5 +-- sw/inc/fldinit.hxx | 5 +-- sw/inc/fldui.hrc | 5 +-- sw/inc/fldupde.hxx | 5 +-- sw/inc/flyenum.hxx | 5 +-- sw/inc/flypos.hxx | 5 +-- sw/inc/fmtanchr.hxx | 5 +-- sw/inc/fmtautofmt.hxx | 5 +-- sw/inc/fmtclbl.hxx | 5 +-- sw/inc/fmtclds.hxx | 5 +-- sw/inc/fmtcnct.hxx | 5 +-- sw/inc/fmtcntnt.hxx | 5 +-- sw/inc/fmtcol.hxx | 5 +-- sw/inc/fmtcolfunc.hxx | 5 +-- sw/inc/fmteiro.hxx | 5 +-- sw/inc/fmtflcnt.hxx | 5 +-- sw/inc/fmtfld.hxx | 5 +-- sw/inc/fmtfollowtextflow.hxx | 5 +-- sw/inc/fmtfordr.hxx | 5 +-- sw/inc/fmtfsize.hxx | 5 +-- sw/inc/fmtftn.hxx | 5 +-- sw/inc/fmtftntx.hxx | 5 +-- sw/inc/fmthdft.hxx | 5 +-- sw/inc/fmtinfmt.hxx | 5 +-- sw/inc/fmtline.hxx | 5 +-- sw/inc/fmtlsplt.hxx | 5 +-- sw/inc/fmtmeta.hxx | 7 +--- sw/inc/fmtornt.hxx | 5 +-- sw/inc/fmtpdsc.hxx | 5 +-- sw/inc/fmtrfmrk.hxx | 5 +-- sw/inc/fmtrowsplt.hxx | 5 +-- sw/inc/fmtruby.hxx | 5 +-- sw/inc/fmtsrnd.hxx | 5 +-- sw/inc/fmtsrndenum.hxx | 5 +-- sw/inc/fmtui.hrc | 5 +-- sw/inc/fmturl.hxx | 5 +-- sw/inc/fmtwrapinfluenceonobjpos.hxx | 5 +-- sw/inc/format.hxx | 7 +--- sw/inc/frmatr.hxx | 5 +-- sw/inc/frmfmt.hxx | 7 +--- sw/inc/ftnidx.hxx | 5 +-- sw/inc/ftninfo.hxx | 5 +-- sw/inc/globals.hrc | 5 +-- sw/inc/globdoc.hxx | 5 +-- sw/inc/grfatr.hxx | 5 +-- sw/inc/helpid.h | 5 +-- sw/inc/hfspacingitem.hxx | 5 +-- sw/inc/hhcwrp.hxx | 5 +-- sw/inc/hintids.hxx | 7 +--- sw/inc/hints.hxx | 5 +-- sw/inc/htmltbl.hxx | 5 +-- sw/inc/index.hrc | 5 +-- sw/inc/index.hxx | 7 +--- sw/inc/inetfld.hxx | 5 +-- sw/inc/init.hxx | 5 +-- sw/inc/io.hxx | 5 +-- sw/inc/iodetect.hxx | 5 +-- sw/inc/istyleaccess.hxx | 5 +-- sw/inc/itabenum.hxx | 5 +-- sw/inc/lineinfo.hxx | 5 +-- sw/inc/linkenum.hxx | 5 +-- sw/inc/list.hxx | 7 +--- sw/inc/listfunc.hxx | 7 +--- sw/inc/makefile.mk | 8 +--- sw/inc/mdiexp.hxx | 7 +--- sw/inc/modcfg.hxx | 5 +-- sw/inc/modeltoviewhelper.hxx | 5 +-- sw/inc/ndarr.hxx | 7 +--- sw/inc/ndgrf.hxx | 7 +--- sw/inc/ndhints.hxx | 7 +--- sw/inc/ndindex.hxx | 7 +--- sw/inc/ndnotxt.hxx | 7 +--- sw/inc/ndole.hxx | 7 +--- sw/inc/ndtxt.hxx | 7 +--- sw/inc/ndtyp.hxx | 5 +-- sw/inc/newhdl.hxx | 5 +-- sw/inc/node.hxx | 7 +--- sw/inc/numrule.hxx | 7 +--- sw/inc/pagedesc.hxx | 5 +-- sw/inc/pageiter.hxx | 5 +-- sw/inc/pam.hxx | 5 +-- sw/inc/paratr.hxx | 7 +--- sw/inc/pausethreadstarting.hxx | 5 +-- sw/inc/pch/precompiled_sw.cxx | 5 +-- sw/inc/pch/precompiled_sw.hxx | 7 +--- sw/inc/poolfmt.hrc | 5 +-- sw/inc/poolfmt.hxx | 5 +-- sw/inc/postit.hxx | 8 +--- sw/inc/postithelper.hxx | 5 +-- sw/inc/printdata.hxx | 5 +-- sw/inc/pvprtdat.hxx | 5 +-- sw/inc/rcid.hrc | 5 +-- sw/inc/redline.hxx | 5 +-- sw/inc/redlnaut.hxx | 5 +-- sw/inc/reffld.hxx | 5 +-- sw/inc/ring.hxx | 5 +-- sw/inc/rolbck.hxx | 7 +--- sw/inc/rubylist.hxx | 5 +-- sw/inc/section.hxx | 5 +-- sw/inc/shellid.hxx | 5 +-- sw/inc/shellio.hxx | 5 +-- sw/inc/shellres.hxx | 5 +-- sw/inc/sortopt.hxx | 5 +-- sw/inc/splargs.hxx | 5 +-- sw/inc/statstr.hrc | 5 +-- sw/inc/stringhash.hxx | 5 +-- sw/inc/sw.mk | 6 +-- sw/inc/sw_primitivetypes2d.hxx | 6 +-- sw/inc/swabstdlg.hxx | 5 +-- sw/inc/swacorr.hxx | 5 +-- sw/inc/swatrset.hxx | 5 +-- sw/inc/swbaslnk.hxx | 5 +-- sw/inc/swcalwrp.hxx | 5 +-- sw/inc/swcli.hxx | 5 +-- sw/inc/swcrsr.hxx | 5 +-- sw/inc/swdbdata.hxx | 5 +-- sw/inc/swdbtoolsclient.hxx | 5 +-- sw/inc/swddetbl.hxx | 5 +-- sw/inc/swdll.hxx | 5 +-- sw/inc/swerror.h | 5 +-- sw/inc/swevent.hxx | 7 +--- sw/inc/swfltopt.hxx | 5 +-- sw/inc/swgstr.hxx | 5 +-- sw/inc/swhints.hxx | 5 +-- sw/inc/swmodule.hxx | 7 +--- sw/inc/swpre.mk | 6 +-- sw/inc/swprtopt.hxx | 5 +-- sw/inc/swrect.hxx | 5 +-- sw/inc/swregion.hxx | 5 +-- sw/inc/swserv.hxx | 5 +-- sw/inc/swstyle.h | 5 +-- sw/inc/swtable.hxx | 7 +--- sw/inc/swtblfmt.hxx | 5 +-- sw/inc/swtypes.hxx | 5 +-- sw/inc/swundo.hxx | 7 +--- sw/inc/swunodef.hxx | 5 +-- sw/inc/swunohelper.hxx | 5 +-- sw/inc/swurl.hxx | 5 +-- sw/inc/swwait.hxx | 5 +-- sw/inc/tabcol.hxx | 5 +-- sw/inc/tblafmt.hxx | 5 +-- sw/inc/tblenum.hxx | 5 +-- sw/inc/tblsel.hxx | 5 +-- sw/inc/tgrditem.hxx | 5 +-- sw/inc/tox.hxx | 5 +-- sw/inc/toxe.hxx | 5 +-- sw/inc/toxinit.hxx | 5 +-- sw/inc/toxwrap.hxx | 5 +-- sw/inc/txatbase.hxx | 5 +-- sw/inc/txatritr.hxx | 5 +-- sw/inc/txtatr.hxx | 7 +--- sw/inc/txtflcnt.hxx | 5 +-- sw/inc/txtfld.hxx | 5 +-- sw/inc/txtftn.hxx | 5 +-- sw/inc/txtinet.hxx | 5 +-- sw/inc/txtrfmrk.hxx | 5 +-- sw/inc/txttxmrk.hxx | 5 +-- sw/inc/undobj.hxx | 7 +--- sw/inc/unoatxt.hxx | 5 +-- sw/inc/unobaseclass.hxx | 5 +-- sw/inc/unobookmark.hxx | 8 +--- sw/inc/unochart.hxx | 5 +-- sw/inc/unocoll.hxx | 5 +-- sw/inc/unocore.hrc | 7 +--- sw/inc/unocrsr.hxx | 5 +-- sw/inc/unocrsrhelper.hxx | 5 +-- sw/inc/unodraw.hxx | 7 +--- sw/inc/unoevent.hxx | 5 +-- sw/inc/unoevtlstnr.hxx | 5 +-- sw/inc/unofield.hxx | 5 +-- sw/inc/unoflatpara.hxx | 7 +--- sw/inc/unofootnote.hxx | 8 +--- sw/inc/unoframe.hxx | 5 +-- sw/inc/unoidx.hxx | 5 +-- sw/inc/unomailmerge.hxx | 5 +-- sw/inc/unomap.hxx | 5 +-- sw/inc/unomid.h | 5 +-- sw/inc/unomod.hxx | 5 +-- sw/inc/unoparaframeenum.hxx | 8 +--- sw/inc/unoparagraph.hxx | 8 +--- sw/inc/unoport.hxx | 5 +-- sw/inc/unoprnms.hxx | 7 +--- sw/inc/unoredline.hxx | 5 +-- sw/inc/unoredlines.hxx | 5 +-- sw/inc/unorefmark.hxx | 8 +--- sw/inc/unosection.hxx | 8 +--- sw/inc/unosett.hxx | 5 +-- sw/inc/unosrch.hxx | 5 +-- sw/inc/unostyle.hxx | 7 +--- sw/inc/unotbl.hxx | 5 +-- sw/inc/unotext.hxx | 8 +--- sw/inc/unotextbodyhf.hxx | 8 +--- sw/inc/unotextcursor.hxx | 8 +--- sw/inc/unotextmarkup.hxx | 5 +-- sw/inc/unotextrange.hxx | 8 +--- sw/inc/unotxdoc.hxx | 5 +-- sw/inc/usrfld.hxx | 5 +-- sw/inc/viewopt.hxx | 7 +--- sw/inc/viewsh.hxx | 7 +--- sw/inc/viscrs.hxx | 7 +--- sw/inc/warnpassword.hxx | 5 +-- sw/inc/wdocsh.hxx | 5 +-- .../accessibility/AccessibleRelationSet.java | 5 +-- sw/qa/complex/accessibility/makefile.mk | 6 +-- sw/qa/complex/checkColor/makefile.mk | 6 +-- .../CheckIndeterminateState.java | 5 +-- sw/qa/complex/indeterminateState/makefile.mk | 6 +-- sw/qa/complex/writer/CheckBookmarks.java | 7 +--- sw/qa/complex/writer/CheckFlies.java | 7 +--- .../complex/writer/CheckIndexedPropertyValues.java | 5 +-- sw/qa/complex/writer/CheckNamedPropertyValues.java | 5 +-- .../complex/writer/TextPortionEnumerationTest.java | 7 +--- sw/qa/complex/writer/makefile.mk | 6 +-- sw/qa/core/Test-BigPtrArray.cxx | 7 +--- sw/qa/core/bigpointerarray-new.cxx | 5 +-- sw/qa/core/bigpointerarray-new.hxx | 5 +-- sw/qa/core/export.map | 6 +-- sw/qa/core/makefile.mk | 8 +--- sw/qa/unoapi/makefile.mk | 6 +-- sw/sdi/_annotsh.sdi | 7 +--- sw/sdi/_basesh.sdi | 7 +--- sw/sdi/_beziers.sdi | 5 +-- sw/sdi/_docsh.sdi | 7 +--- sw/sdi/_drwbase.sdi | 5 +-- sw/sdi/_formsh.sdi | 5 +-- sw/sdi/_frmsh.sdi | 7 +--- sw/sdi/_grfsh.sdi | 5 +-- sw/sdi/_listsh.sdi | 5 +-- sw/sdi/_mediash.sdi | 5 +-- sw/sdi/_olesh.sdi | 5 +-- sw/sdi/_tabsh.sdi | 5 +-- sw/sdi/_textsh.sdi | 5 +-- sw/sdi/_viewsh.sdi | 7 +--- sw/sdi/annotsh.sdi | 5 +-- sw/sdi/basesh.sdi | 5 +-- sw/sdi/beziersh.sdi | 5 +-- sw/sdi/docsh.sdi | 7 +--- sw/sdi/drawsh.sdi | 5 +-- sw/sdi/drwbassh.sdi | 5 +-- sw/sdi/drwtxtsh.sdi | 7 +--- sw/sdi/formsh.sdi | 5 +-- sw/sdi/frmsh.sdi | 5 +-- sw/sdi/grfsh.sdi | 5 +-- sw/sdi/listsh.sdi | 5 +-- sw/sdi/makefile.mk | 8 +--- sw/sdi/mediash.sdi | 5 +-- sw/sdi/olesh.sdi | 5 +-- sw/sdi/swinterf.c | 5 +-- sw/sdi/switems.sdi | 5 +-- sw/sdi/swslots.hrc | 5 +-- sw/sdi/swslots.sdi | 7 +--- sw/sdi/swslots.src | 5 +-- sw/sdi/tabsh.sdi | 5 +-- sw/sdi/textsh.sdi | 5 +-- sw/sdi/viewsh.sdi | 7 +--- sw/sdi/wbasesh.sdi | 5 +-- sw/sdi/wbeziers.sdi | 5 +-- sw/sdi/wdocsh.sdi | 7 +--- sw/sdi/wdrwbase.sdi | 5 +-- sw/sdi/wformsh.sdi | 5 +-- sw/sdi/wfrmsh.sdi | 5 +-- sw/sdi/wgrfsh.sdi | 5 +-- sw/sdi/wlistsh.sdi | 5 +-- sw/sdi/wolesh.sdi | 5 +-- sw/sdi/wrtapp.sdi | 5 +-- sw/sdi/wtabsh.sdi | 5 +-- sw/sdi/wtextsh.sdi | 5 +-- sw/sdi/wviewsh.sdi | 7 +--- sw/source/core/SwNumberTree/SwNodeNum.cxx | 7 +--- sw/source/core/SwNumberTree/SwNumberTree.cxx | 7 +--- sw/source/core/SwNumberTree/makefile.mk | 6 +-- sw/source/core/access/acccell.cxx | 5 +-- sw/source/core/access/acccell.hxx | 5 +-- sw/source/core/access/acccontext.cxx | 7 +--- sw/source/core/access/acccontext.hxx | 7 +--- sw/source/core/access/accdoc.cxx | 5 +-- sw/source/core/access/accdoc.hxx | 5 +-- sw/source/core/access/accembedded.cxx | 5 +-- sw/source/core/access/accembedded.hxx | 5 +-- sw/source/core/access/accfootnote.cxx | 5 +-- sw/source/core/access/accfootnote.hxx | 5 +-- sw/source/core/access/accframe.cxx | 5 +-- sw/source/core/access/accframe.hxx | 5 +-- sw/source/core/access/accframebase.cxx | 5 +-- sw/source/core/access/accframebase.hxx | 5 +-- sw/source/core/access/accfrmobj.cxx | 5 +-- sw/source/core/access/accfrmobj.hxx | 5 +-- sw/source/core/access/accfrmobjmap.cxx | 5 +-- sw/source/core/access/accfrmobjmap.hxx | 5 +-- sw/source/core/access/accfrmobjslist.cxx | 5 +-- sw/source/core/access/accfrmobjslist.hxx | 5 +-- sw/source/core/access/accgraphic.cxx | 5 +-- sw/source/core/access/accgraphic.hxx | 5 +-- sw/source/core/access/accheaderfooter.cxx | 5 +-- sw/source/core/access/accheaderfooter.hxx | 5 +-- sw/source/core/access/acchyperlink.cxx | 5 +-- sw/source/core/access/acchyperlink.hxx | 5 +-- sw/source/core/access/acchypertextdata.cxx | 5 +-- sw/source/core/access/acchypertextdata.hxx | 5 +-- sw/source/core/access/accmap.cxx | 7 +--- sw/source/core/access/accnotextframe.cxx | 7 +--- sw/source/core/access/accnotextframe.hxx | 7 +--- sw/source/core/access/accpage.cxx | 5 +-- sw/source/core/access/accpage.hxx | 5 +-- sw/source/core/access/accpara.cxx | 7 +--- sw/source/core/access/accpara.hxx | 7 +--- sw/source/core/access/accportions.cxx | 7 +--- sw/source/core/access/accportions.hxx | 7 +--- sw/source/core/access/accpreview.cxx | 5 +-- sw/source/core/access/accpreview.hxx | 5 +-- sw/source/core/access/accselectionhelper.cxx | 5 +-- sw/source/core/access/accselectionhelper.hxx | 5 +-- sw/source/core/access/acctable.cxx | 5 +-- sw/source/core/access/acctable.hxx | 5 +-- sw/source/core/access/acctextframe.cxx | 7 +--- sw/source/core/access/acctextframe.hxx | 7 +--- sw/source/core/access/makefile.mk | 8 +--- sw/source/core/access/textmarkuphelper.cxx | 7 +--- sw/source/core/access/textmarkuphelper.hxx | 7 +--- sw/source/core/attr/calbck.cxx | 7 +--- sw/source/core/attr/cellatr.cxx | 5 +-- sw/source/core/attr/fmtfollowtextflow.cxx | 5 +-- sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx | 5 +-- sw/source/core/attr/format.cxx | 5 +-- sw/source/core/attr/hints.cxx | 7 +--- sw/source/core/attr/makefile.mk | 6 +-- sw/source/core/attr/swatrset.cxx | 7 +--- sw/source/core/bastyp/SwSmartTagMgr.cxx | 5 +-- sw/source/core/bastyp/bparr.cxx | 5 +-- sw/source/core/bastyp/breakit.cxx | 7 +--- sw/source/core/bastyp/calc.cxx | 7 +--- sw/source/core/bastyp/checkit.cxx | 5 +-- sw/source/core/bastyp/index.cxx | 7 +--- sw/source/core/bastyp/init.cxx | 7 +--- sw/source/core/bastyp/makefile.mk | 6 +-- sw/source/core/bastyp/ring.cxx | 5 +-- sw/source/core/bastyp/swcache.cxx | 7 +--- sw/source/core/bastyp/swrect.cxx | 7 +--- sw/source/core/bastyp/swregion.cxx | 5 +-- sw/source/core/bastyp/swtypes.cxx | 5 +-- sw/source/core/bastyp/tabcol.cxx | 5 +-- sw/source/core/crsr/BlockCursor.cxx | 5 +-- sw/source/core/crsr/BlockCursor.hxx | 5 +-- sw/source/core/crsr/IBlockCursor.hxx | 5 +-- sw/source/core/crsr/bookmrk.cxx | 5 +-- sw/source/core/crsr/callnk.cxx | 5 +-- sw/source/core/crsr/callnk.hxx | 5 +-- sw/source/core/crsr/crbm.cxx | 5 +-- sw/source/core/crsr/crossrefbookmark.cxx | 5 +-- sw/source/core/crsr/crsrsh.cxx | 5 +-- sw/source/core/crsr/crstrvl.cxx | 7 +--- sw/source/core/crsr/crstrvl1.cxx | 5 +-- sw/source/core/crsr/findattr.cxx | 5 +-- sw/source/core/crsr/findcoll.cxx | 5 +-- sw/source/core/crsr/findfmt.cxx | 5 +-- sw/source/core/crsr/findtxt.cxx | 5 +-- sw/source/core/crsr/makefile.mk | 6 +-- sw/source/core/crsr/pam.cxx | 7 +--- sw/source/core/crsr/paminit.cxx | 5 +-- sw/source/core/crsr/swcrsr.cxx | 5 +-- sw/source/core/crsr/trvlcol.cxx | 5 +-- sw/source/core/crsr/trvlfnfl.cxx | 5 +-- sw/source/core/crsr/trvlreg.cxx | 5 +-- sw/source/core/crsr/trvltbl.cxx | 7 +--- sw/source/core/crsr/unocrsr.cxx | 5 +-- sw/source/core/crsr/viscrs.cxx | 7 +--- sw/source/core/doc/SwStyleNameMapper.cxx | 5 +-- sw/source/core/doc/acmplwrd.cxx | 5 +-- sw/source/core/doc/dbgoutsw.cxx | 7 +--- sw/source/core/doc/doc.cxx | 7 +--- sw/source/core/doc/docbasic.cxx | 5 +-- sw/source/core/doc/docbm.cxx | 8 +--- sw/source/core/doc/docchart.cxx | 5 +-- sw/source/core/doc/doccomp.cxx | 5 +-- sw/source/core/doc/doccorr.cxx | 7 +--- sw/source/core/doc/docdde.cxx | 5 +-- sw/source/core/doc/docdesc.cxx | 5 +-- sw/source/core/doc/docdraw.cxx | 7 +--- sw/source/core/doc/docedt.cxx | 7 +--- sw/source/core/doc/docfld.cxx | 7 +--- sw/source/core/doc/docfly.cxx | 7 +--- sw/source/core/doc/docfmt.cxx | 7 +--- sw/source/core/doc/docftn.cxx | 5 +-- sw/source/core/doc/docglbl.cxx | 5 +-- sw/source/core/doc/docglos.cxx | 5 +-- sw/source/core/doc/doclay.cxx | 7 +--- sw/source/core/doc/docnew.cxx | 7 +--- sw/source/core/doc/docnum.cxx | 7 +--- sw/source/core/doc/docredln.cxx | 7 +--- sw/source/core/doc/docruby.cxx | 5 +-- sw/source/core/doc/docsort.cxx | 5 +-- sw/source/core/doc/docstat.cxx | 5 +-- sw/source/core/doc/doctxm.cxx | 7 +--- sw/source/core/doc/docxforms.cxx | 5 +-- sw/source/core/doc/extinput.cxx | 5 +-- sw/source/core/doc/fmtcol.cxx | 7 +--- sw/source/core/doc/ftnidx.cxx | 5 +-- sw/source/core/doc/gctable.cxx | 5 +-- sw/source/core/doc/htmltbl.cxx | 7 +--- sw/source/core/doc/lineinfo.cxx | 5 +-- sw/source/core/doc/list.cxx | 7 +--- sw/source/core/doc/makefile.mk | 8 +--- sw/source/core/doc/notxtfrm.cxx | 7 +--- sw/source/core/doc/number.cxx | 7 +--- sw/source/core/doc/poolfmt.cxx | 7 +--- sw/source/core/doc/sortopt.cxx | 5 +-- sw/source/core/doc/swserv.cxx | 5 +-- sw/source/core/doc/swstylemanager.cxx | 5 +-- sw/source/core/doc/swstylemanager.hxx | 5 +-- sw/source/core/doc/tblafmt.cxx | 7 +--- sw/source/core/doc/tblcpy.cxx | 5 +-- sw/source/core/doc/tblrwcl.cxx | 5 +-- sw/source/core/doc/visiturl.cxx | 5 +-- sw/source/core/docnode/cancellablejob.cxx | 5 +-- sw/source/core/docnode/cancellablejob.hxx | 5 +-- sw/source/core/docnode/finalthreadmanager.cxx | 5 +-- sw/source/core/docnode/makefile.mk | 6 +-- sw/source/core/docnode/ndcopy.cxx | 7 +--- sw/source/core/docnode/ndindex.cxx | 7 +--- sw/source/core/docnode/ndnotxt.cxx | 7 +--- sw/source/core/docnode/ndnum.cxx | 7 +--- sw/source/core/docnode/ndsect.cxx | 7 +--- sw/source/core/docnode/ndtbl.cxx | 5 +-- sw/source/core/docnode/ndtbl1.cxx | 7 +--- sw/source/core/docnode/node.cxx | 7 +--- sw/source/core/docnode/node2lay.cxx | 5 +-- sw/source/core/docnode/nodes.cxx | 7 +--- sw/source/core/docnode/observablethread.cxx | 5 +-- sw/source/core/docnode/pausethreadstarting.cxx | 5 +-- .../core/docnode/retrievedinputstreamdata.cxx | 5 +-- sw/source/core/docnode/retrieveinputstream.cxx | 5 +-- .../core/docnode/retrieveinputstreamconsumer.cxx | 5 +-- sw/source/core/docnode/section.cxx | 5 +-- sw/source/core/docnode/swbaslnk.cxx | 5 +-- sw/source/core/docnode/swthreadjoiner.cxx | 5 +-- sw/source/core/docnode/swthreadmanager.cxx | 5 +-- sw/source/core/docnode/threadlistener.cxx | 5 +-- sw/source/core/docnode/threadmanager.cxx | 5 +-- sw/source/core/draw/dcontact.cxx | 7 +--- sw/source/core/draw/dflyobj.cxx | 5 +-- sw/source/core/draw/dobjfac.cxx | 5 +-- sw/source/core/draw/dpage.cxx | 7 +--- sw/source/core/draw/drawdoc.cxx | 7 +--- sw/source/core/draw/dview.cxx | 7 +--- sw/source/core/draw/makefile.mk | 6 +-- sw/source/core/edit/acorrect.cxx | 5 +-- sw/source/core/edit/autofmt.cxx | 7 +--- sw/source/core/edit/edatmisc.cxx | 5 +-- sw/source/core/edit/edattr.cxx | 5 +-- sw/source/core/edit/eddel.cxx | 5 +-- sw/source/core/edit/edfcol.cxx | 5 +-- sw/source/core/edit/edfld.cxx | 5 +-- sw/source/core/edit/edfldexp.cxx | 5 +-- sw/source/core/edit/edfmt.cxx | 5 +-- sw/source/core/edit/edglbldc.cxx | 5 +-- sw/source/core/edit/edglss.cxx | 5 +-- sw/source/core/edit/editsh.cxx | 7 +--- sw/source/core/edit/edlingu.cxx | 5 +-- sw/source/core/edit/ednumber.cxx | 7 +--- sw/source/core/edit/edredln.cxx | 5 +-- sw/source/core/edit/edsect.cxx | 5 +-- sw/source/core/edit/edtab.cxx | 5 +-- sw/source/core/edit/edtox.cxx | 5 +-- sw/source/core/edit/edundo.cxx | 5 +-- sw/source/core/edit/edws.cxx | 5 +-- sw/source/core/edit/makefile.mk | 6 +-- sw/source/core/except/dbgloop.cxx | 5 +-- sw/source/core/except/errhdl.cxx | 5 +-- sw/source/core/except/makefile.mk | 8 +--- sw/source/core/fields/authfld.cxx | 5 +-- sw/source/core/fields/cellfml.cxx | 5 +-- sw/source/core/fields/chpfld.cxx | 5 +-- sw/source/core/fields/dbfld.cxx | 5 +-- sw/source/core/fields/ddefld.cxx | 5 +-- sw/source/core/fields/ddetbl.cxx | 5 +-- sw/source/core/fields/docufld.cxx | 7 +--- sw/source/core/fields/expfld.cxx | 5 +-- sw/source/core/fields/fldbas.cxx | 7 +--- sw/source/core/fields/flddat.cxx | 5 +-- sw/source/core/fields/flddropdown.cxx | 5 +-- sw/source/core/fields/fldlst.cxx | 5 +-- sw/source/core/fields/macrofld.cxx | 5 +-- sw/source/core/fields/makefile.mk | 6 +-- sw/source/core/fields/postithelper.cxx | 5 +-- sw/source/core/fields/reffld.cxx | 5 +-- sw/source/core/fields/scrptfld.cxx | 5 +-- sw/source/core/fields/tblcalc.cxx | 5 +-- sw/source/core/fields/textapi.cxx | 5 +-- sw/source/core/fields/usrfld.cxx | 5 +-- sw/source/core/frmedt/fecopy.cxx | 7 +--- sw/source/core/frmedt/fedesc.cxx | 7 +--- sw/source/core/frmedt/fefly1.cxx | 7 +--- sw/source/core/frmedt/feflyole.cxx | 7 +--- sw/source/core/frmedt/feshview.cxx | 7 +--- sw/source/core/frmedt/fetab.cxx | 7 +--- sw/source/core/frmedt/fews.cxx | 5 +-- sw/source/core/frmedt/makefile.mk | 6 +-- sw/source/core/frmedt/tblsel.cxx | 5 +-- sw/source/core/graphic/grfatr.cxx | 5 +-- sw/source/core/graphic/makefile.mk | 6 +-- sw/source/core/graphic/ndgrf.cxx | 7 +--- sw/source/core/inc/GetMetricVal.hxx | 5 +-- sw/source/core/inc/MarkManager.hxx | 5 +-- sw/source/core/inc/SwGrammarMarkUp.hxx | 5 +-- sw/source/core/inc/SwPortionHandler.hxx | 5 +-- sw/source/core/inc/SwXMLBlockExport.hxx | 5 +-- sw/source/core/inc/SwXMLBlockImport.hxx | 5 +-- sw/source/core/inc/SwXMLBlockListContext.hxx | 5 +-- sw/source/core/inc/SwXMLTextBlocks.hxx | 5 +-- sw/source/core/inc/SwXTextDefaults.hxx | 5 +-- sw/source/core/inc/acorrect.hxx | 5 +-- sw/source/core/inc/anchoredobjectposition.hxx | 5 +-- .../core/inc/ascharanchoredobjectposition.hxx | 5 +-- sw/source/core/inc/blink.hxx | 5 +-- sw/source/core/inc/bodyfrm.hxx | 5 +-- sw/source/core/inc/bookmrk.hxx | 5 +-- sw/source/core/inc/cellfrm.hxx | 5 +-- sw/source/core/inc/cntfrm.hxx | 5 +-- sw/source/core/inc/colfrm.hxx | 5 +-- sw/source/core/inc/crossrefbookmark.hxx | 5 +-- sw/source/core/inc/dbg_lay.hxx | 7 +--- sw/source/core/inc/dbgloop.hxx | 7 +--- sw/source/core/inc/dflyobj.hxx | 5 +-- sw/source/core/inc/docfld.hxx | 5 +-- sw/source/core/inc/docsort.hxx | 5 +-- sw/source/core/inc/doctxm.hxx | 5 +-- sw/source/core/inc/drawdev.hxx | 5 +-- sw/source/core/inc/drawfont.hxx | 7 +--- sw/source/core/inc/dview.hxx | 7 +--- sw/source/core/inc/environmentofanchoredobject.hxx | 5 +-- sw/source/core/inc/finalthreadmanager.hxx | 5 +-- sw/source/core/inc/flowfrm.hxx | 5 +-- sw/source/core/inc/flyfrm.hxx | 7 +--- sw/source/core/inc/flyfrms.hxx | 5 +-- sw/source/core/inc/fntcache.hxx | 7 +--- sw/source/core/inc/frame.hxx | 5 +-- sw/source/core/inc/frminf.hxx | 5 +-- sw/source/core/inc/frmtool.hxx | 7 +--- sw/source/core/inc/ftnboss.hxx | 5 +-- sw/source/core/inc/ftnfrm.hxx | 7 +--- sw/source/core/inc/hffrm.hxx | 5 +-- sw/source/core/inc/ifinishedthreadlistener.hxx | 5 +-- sw/source/core/inc/ithreadlistenerowner.hxx | 5 +-- sw/source/core/inc/layact.hxx | 7 +--- sw/source/core/inc/laycache.hxx | 7 +--- sw/source/core/inc/layfrm.hxx | 5 +-- sw/source/core/inc/layouter.hxx | 5 +-- sw/source/core/inc/makefile.mk | 6 +-- sw/source/core/inc/movedfwdfrmsbyobjpos.hxx | 5 +-- sw/source/core/inc/mvsave.hxx | 5 +-- sw/source/core/inc/node2lay.hxx | 5 +-- sw/source/core/inc/noteurl.hxx | 5 +-- sw/source/core/inc/notxtfrm.hxx | 5 +-- sw/source/core/inc/objectformatter.hxx | 5 +-- sw/source/core/inc/observablethread.hxx | 5 +-- sw/source/core/inc/pagefrm.hxx | 5 +-- sw/source/core/inc/pamtyp.hxx | 5 +-- sw/source/core/inc/ptqueue.hxx | 5 +-- sw/source/core/inc/retrievedinputstreamdata.hxx | 5 +-- sw/source/core/inc/retrieveinputstream.hxx | 5 +-- sw/source/core/inc/retrieveinputstreamconsumer.hxx | 5 +-- sw/source/core/inc/rootfrm.hxx | 7 +--- sw/source/core/inc/rowfrm.hxx | 5 +-- sw/source/core/inc/scriptinfo.hxx | 7 +--- sw/source/core/inc/scrrect.hxx | 5 +-- sw/source/core/inc/sectfrm.hxx | 5 +-- sw/source/core/inc/setmapvirtdev.hxx | 5 +-- sw/source/core/inc/sortedobjs.hxx | 5 +-- sw/source/core/inc/sortedobjsimpl.hxx | 5 +-- sw/source/core/inc/swblocks.hxx | 5 +-- sw/source/core/inc/swcache.hxx | 7 +--- sw/source/core/inc/swfntcch.hxx | 7 +--- sw/source/core/inc/swfont.hxx | 5 +-- sw/source/core/inc/swselectionlist.hxx | 5 +-- sw/source/core/inc/swthreadjoiner.hxx | 5 +-- sw/source/core/inc/swthreadmanager.hxx | 5 +-- sw/source/core/inc/tabfrm.hxx | 5 +-- sw/source/core/inc/tblrwcl.hxx | 7 +--- sw/source/core/inc/textapi.hxx | 5 +-- sw/source/core/inc/threadlistener.hxx | 5 +-- sw/source/core/inc/threadmanager.hxx | 5 +-- .../core/inc/tocntntanchoredobjectposition.hxx | 5 +-- .../core/inc/tolayoutanchoredobjectposition.hxx | 5 +-- sw/source/core/inc/toxhlp.hxx | 5 +-- sw/source/core/inc/txmsrt.hxx | 5 +-- sw/source/core/inc/txtfrm.hxx | 7 +--- sw/source/core/inc/txttypes.hxx | 5 +-- sw/source/core/inc/undoflystrattr.hxx | 7 +--- sw/source/core/inc/unofldmid.h | 5 +-- sw/source/core/inc/unometa.hxx | 7 +--- sw/source/core/inc/viewimp.hxx | 7 +--- sw/source/core/inc/visiturl.hxx | 5 +-- sw/source/core/inc/wrong.hxx | 5 +-- sw/source/core/layout/anchoreddrawobject.cxx | 5 +-- sw/source/core/layout/anchoredobject.cxx | 5 +-- sw/source/core/layout/atrfrm.cxx | 7 +--- sw/source/core/layout/calcmove.cxx | 7 +--- sw/source/core/layout/colfrm.cxx | 7 +--- sw/source/core/layout/dbg_lay.cxx | 7 +--- sw/source/core/layout/findfrm.cxx | 5 +-- sw/source/core/layout/flowfrm.cxx | 7 +--- sw/source/core/layout/fly.cxx | 7 +--- sw/source/core/layout/flycnt.cxx | 7 +--- sw/source/core/layout/flyincnt.cxx | 7 +--- sw/source/core/layout/flylay.cxx | 7 +--- sw/source/core/layout/flypos.cxx | 5 +-- sw/source/core/layout/frmtool.cxx | 7 +--- sw/source/core/layout/ftnfrm.cxx | 7 +--- sw/source/core/layout/hffrm.cxx | 5 +-- sw/source/core/layout/layact.cxx | 7 +--- sw/source/core/layout/laycache.cxx | 7 +--- sw/source/core/layout/layhelp.hxx | 5 +-- sw/source/core/layout/layouter.cxx | 7 +--- sw/source/core/layout/makefile.mk | 8 +--- sw/source/core/layout/movedfwdfrmsbyobjpos.cxx | 5 +-- sw/source/core/layout/newfrm.cxx | 7 +--- sw/source/core/layout/objectformatter.cxx | 5 +-- sw/source/core/layout/objectformatterlayfrm.cxx | 5 +-- sw/source/core/layout/objectformatterlayfrm.hxx | 5 +-- sw/source/core/layout/objectformattertxtfrm.cxx | 5 +-- sw/source/core/layout/objectformattertxtfrm.hxx | 5 +-- sw/source/core/layout/objstmpconsiderwrapinfl.cxx | 5 +-- sw/source/core/layout/objstmpconsiderwrapinfl.hxx | 5 +-- sw/source/core/layout/pagechg.cxx | 7 +--- sw/source/core/layout/pagedesc.cxx | 5 +-- sw/source/core/layout/paintfrm.cxx | 7 +--- sw/source/core/layout/sectfrm.cxx | 7 +--- sw/source/core/layout/softpagebreak.cxx | 5 +-- sw/source/core/layout/sortedobjs.cxx | 5 +-- sw/source/core/layout/sortedobjsimpl.cxx | 5 +-- sw/source/core/layout/ssfrm.cxx | 7 +--- sw/source/core/layout/swselectionlist.cxx | 5 +-- sw/source/core/layout/tabfrm.cxx | 7 +--- sw/source/core/layout/trvlfrm.cxx | 7 +--- sw/source/core/layout/unusedf.cxx | 7 +--- sw/source/core/layout/virtoutp.cxx | 7 +--- sw/source/core/layout/virtoutp.hxx | 5 +-- sw/source/core/layout/wsfrm.cxx | 7 +--- sw/source/core/makefile.mk | 8 +--- .../objectpositioning/anchoredobjectposition.cxx | 5 +-- .../ascharanchoredobjectposition.cxx | 5 +-- .../environmentofanchoredobject.cxx | 5 +-- sw/source/core/objectpositioning/makefile.mk | 6 +-- .../tocntntanchoredobjectposition.cxx | 5 +-- .../tolayoutanchoredobjectposition.cxx | 5 +-- sw/source/core/ole/makefile.mk | 6 +-- sw/source/core/ole/ndole.cxx | 7 +--- sw/source/core/para/makefile.mk | 6 +-- sw/source/core/para/paratr.cxx | 7 +--- sw/source/core/sw3io/makefile.mk | 6 +-- sw/source/core/sw3io/sw3convert.cxx | 5 +-- sw/source/core/sw3io/swacorr.cxx | 5 +-- sw/source/core/swg/SwXMLBlockExport.cxx | 5 +-- sw/source/core/swg/SwXMLBlockImport.cxx | 5 +-- sw/source/core/swg/SwXMLBlockListContext.cxx | 5 +-- sw/source/core/swg/SwXMLSectionList.cxx | 5 +-- sw/source/core/swg/SwXMLTextBlocks.cxx | 5 +-- sw/source/core/swg/SwXMLTextBlocks1.cxx | 5 +-- sw/source/core/swg/makefile.mk | 6 +-- sw/source/core/swg/swblocks.cxx | 5 +-- sw/source/core/table/makefile.mk | 6 +-- sw/source/core/table/swnewtable.cxx | 7 +--- sw/source/core/table/swtable.cxx | 7 +--- sw/source/core/text/EnhancedPDFExportHelper.cxx | 7 +--- sw/source/core/text/SwGrammarMarkUp.cxx | 5 +-- sw/source/core/text/atrhndl.hxx | 5 +-- sw/source/core/text/atrstck.cxx | 5 +-- sw/source/core/text/blink.cxx | 5 +-- sw/source/core/text/frmcrsr.cxx | 7 +--- sw/source/core/text/frmform.cxx | 7 +--- sw/source/core/text/frminf.cxx | 5 +-- sw/source/core/text/frmpaint.cxx | 7 +--- sw/source/core/text/guess.cxx | 7 +--- sw/source/core/text/guess.hxx | 5 +-- sw/source/core/text/inftxt.cxx | 7 +--- sw/source/core/text/inftxt.hxx | 7 +--- sw/source/core/text/itradj.cxx | 7 +--- sw/source/core/text/itratr.cxx | 5 +-- sw/source/core/text/itratr.hxx | 5 +-- sw/source/core/text/itrcrsr.cxx | 7 +--- sw/source/core/text/itrform2.cxx | 7 +--- sw/source/core/text/itrform2.hxx | 5 +-- sw/source/core/text/itrpaint.cxx | 7 +--- sw/source/core/text/itrpaint.hxx | 5 +-- sw/source/core/text/itrtxt.cxx | 5 +-- sw/source/core/text/itrtxt.hxx | 7 +--- sw/source/core/text/makefile.mk | 8 +--- sw/source/core/text/noteurl.cxx | 5 +-- sw/source/core/text/pordrop.hxx | 5 +-- sw/source/core/text/porexp.cxx | 5 +-- sw/source/core/text/porexp.hxx | 5 +-- sw/source/core/text/porfld.cxx | 7 +--- sw/source/core/text/porfld.hxx | 7 +--- sw/source/core/text/porfly.cxx | 5 +-- sw/source/core/text/porfly.hxx | 5 +-- sw/source/core/text/porftn.hxx | 5 +-- sw/source/core/text/porglue.cxx | 7 +--- sw/source/core/text/porglue.hxx | 5 +-- sw/source/core/text/porhyph.hxx | 5 +-- sw/source/core/text/porlay.cxx | 4 +- sw/source/core/text/porlay.hxx | 7 +--- sw/source/core/text/porlin.cxx | 7 +--- sw/source/core/text/porlin.hxx | 7 +--- sw/source/core/text/pormulti.cxx | 7 +--- sw/source/core/text/pormulti.hxx | 7 +--- sw/source/core/text/porref.cxx | 5 +-- sw/source/core/text/porref.hxx | 5 +-- sw/source/core/text/porrst.cxx | 5 +-- sw/source/core/text/porrst.hxx | 5 +-- sw/source/core/text/portab.hxx | 5 +-- sw/source/core/text/portox.cxx | 5 +-- sw/source/core/text/portox.hxx | 5 +-- sw/source/core/text/portxt.cxx | 7 +--- sw/source/core/text/portxt.hxx | 5 +-- sw/source/core/text/possiz.hxx | 5 +-- sw/source/core/text/redlnitr.cxx | 5 +-- sw/source/core/text/redlnitr.hxx | 5 +-- sw/source/core/text/txtcache.cxx | 5 +-- sw/source/core/text/txtcache.hxx | 5 +-- sw/source/core/text/txtcfg.hxx | 5 +-- sw/source/core/text/txtdrop.cxx | 5 +-- sw/source/core/text/txtfld.cxx | 5 +-- sw/source/core/text/txtfly.cxx | 7 +--- sw/source/core/text/txtfly.hxx | 7 +--- sw/source/core/text/txtfrm.cxx | 7 +--- sw/source/core/text/txtftn.cxx | 7 +--- sw/source/core/text/txthyph.cxx | 7 +--- sw/source/core/text/txtinit.cxx | 7 +--- sw/source/core/text/txtio.cxx | 5 +-- sw/source/core/text/txtpaint.cxx | 7 +--- sw/source/core/text/txtpaint.hxx | 7 +--- sw/source/core/text/txttab.cxx | 7 +--- sw/source/core/text/widorp.cxx | 5 +-- sw/source/core/text/widorp.hxx | 5 +-- sw/source/core/text/wrong.cxx | 5 +-- sw/source/core/tox/makefile.mk | 6 +-- sw/source/core/tox/tox.cxx | 5 +-- sw/source/core/tox/toxhlp.cxx | 7 +--- sw/source/core/tox/txmsrt.cxx | 7 +--- sw/source/core/txtnode/SwGrammarContact.cxx | 5 +-- sw/source/core/txtnode/atrfld.cxx | 5 +-- sw/source/core/txtnode/atrflyin.cxx | 5 +-- sw/source/core/txtnode/atrftn.cxx | 5 +-- sw/source/core/txtnode/atrref.cxx | 5 +-- sw/source/core/txtnode/atrtox.cxx | 5 +-- sw/source/core/txtnode/chrfmt.cxx | 5 +-- sw/source/core/txtnode/fmtatr2.cxx | 7 +--- sw/source/core/txtnode/fntcache.cxx | 7 +--- sw/source/core/txtnode/fntcap.cxx | 7 +--- sw/source/core/txtnode/makefile.mk | 8 +--- sw/source/core/txtnode/modeltoviewhelper.cxx | 5 +-- sw/source/core/txtnode/ndhints.cxx | 7 +--- sw/source/core/txtnode/ndtxt.cxx | 7 +--- sw/source/core/txtnode/swfntcch.cxx | 5 +-- sw/source/core/txtnode/swfont.cxx | 7 +--- sw/source/core/txtnode/thints.cxx | 7 +--- sw/source/core/txtnode/txatbase.cxx | 5 +-- sw/source/core/txtnode/txatritr.cxx | 5 +-- sw/source/core/txtnode/txtatr2.cxx | 7 +--- sw/source/core/txtnode/txtedt.cxx | 7 +--- sw/source/core/undo/SwRewriter.cxx | 5 +-- sw/source/core/undo/SwUndoField.cxx | 5 +-- sw/source/core/undo/SwUndoFmt.cxx | 5 +-- sw/source/core/undo/SwUndoPageDesc.cxx | 5 +-- sw/source/core/undo/SwUndoTOXChange.cxx | 5 +-- sw/source/core/undo/docundo.cxx | 7 +--- sw/source/core/undo/makefile.mk | 8 +--- sw/source/core/undo/rolbck.cxx | 7 +--- sw/source/core/undo/unattr.cxx | 8 +--- sw/source/core/undo/unbkmk.cxx | 5 +-- sw/source/core/undo/undel.cxx | 5 +-- sw/source/core/undo/undo.hrc | 7 +--- sw/source/core/undo/undo.src | 7 +--- sw/source/core/undo/undobj.cxx | 7 +--- sw/source/core/undo/undobj1.cxx | 7 +--- sw/source/core/undo/undoflystrattr.cxx | 7 +--- sw/source/core/undo/undraw.cxx | 5 +-- sw/source/core/undo/unfmco.cxx | 5 +-- sw/source/core/undo/unins.cxx | 5 +-- sw/source/core/undo/unmove.cxx | 5 +-- sw/source/core/undo/unnum.cxx | 5 +-- sw/source/core/undo/unoutl.cxx | 5 +-- sw/source/core/undo/unovwr.cxx | 5 +-- sw/source/core/undo/unredln.cxx | 5 +-- sw/source/core/undo/unsect.cxx | 5 +-- sw/source/core/undo/unsort.cxx | 5 +-- sw/source/core/undo/unspnd.cxx | 5 +-- sw/source/core/undo/untbl.cxx | 5 +-- sw/source/core/undo/untblk.cxx | 5 +-- sw/source/core/unocore/SwXTextDefaults.cxx | 5 +-- sw/source/core/unocore/TextCursorHelper.cxx | 5 +-- sw/source/core/unocore/XMLRangeHelper.cxx | 5 +-- sw/source/core/unocore/XMLRangeHelper.hxx | 5 +-- sw/source/core/unocore/makefile.mk | 6 +-- sw/source/core/unocore/swunohelper.cxx | 5 +-- sw/source/core/unocore/unobkm.cxx | 5 +-- sw/source/core/unocore/unochart.cxx | 5 +-- sw/source/core/unocore/unocoll.cxx | 7 +--- sw/source/core/unocore/unocore.src | 7 +--- sw/source/core/unocore/unocrsrhelper.cxx | 8 +--- sw/source/core/unocore/unodraw.cxx | 7 +--- sw/source/core/unocore/unoevent.cxx | 5 +-- sw/source/core/unocore/unoevtlstnr.cxx | 5 +-- sw/source/core/unocore/unofield.cxx | 5 +-- sw/source/core/unocore/unoflatpara.cxx | 5 +-- sw/source/core/unocore/unoframe.cxx | 7 +--- sw/source/core/unocore/unoftn.cxx | 5 +-- sw/source/core/unocore/unoidx.cxx | 5 +-- sw/source/core/unocore/unomap.cxx | 7 +--- sw/source/core/unocore/unoobj.cxx | 7 +--- sw/source/core/unocore/unoobj2.cxx | 5 +-- sw/source/core/unocore/unoparagraph.cxx | 5 +-- sw/source/core/unocore/unoport.cxx | 5 +-- sw/source/core/unocore/unoportenum.cxx | 5 +-- sw/source/core/unocore/unoprnms.cxx | 7 +--- sw/source/core/unocore/unoredline.cxx | 5 +-- sw/source/core/unocore/unoredlines.cxx | 5 +-- sw/source/core/unocore/unorefmk.cxx | 5 +-- sw/source/core/unocore/unosect.cxx | 7 +--- sw/source/core/unocore/unosett.cxx | 7 +--- sw/source/core/unocore/unosrch.cxx | 5 +-- sw/source/core/unocore/unostyle.cxx | 7 +--- sw/source/core/unocore/unotbl.cxx | 6 +-- sw/source/core/unocore/unotext.cxx | 5 +-- sw/source/core/unocore/unotextmarkup.cxx | 5 +-- sw/source/core/view/makefile.mk | 6 +-- sw/source/core/view/pagepreviewlayout.cxx | 5 +-- sw/source/core/view/scrrect.cxx | 5 +-- sw/source/core/view/vdraw.cxx | 7 +--- sw/source/core/view/viewimp.cxx | 7 +--- sw/source/core/view/viewpg.cxx | 5 +-- sw/source/core/view/viewsh.cxx | 7 +--- sw/source/core/view/vnew.cxx | 5 +-- sw/source/core/view/vprint.cxx | 6 +-- sw/source/filter/ascii/ascatr.cxx | 5 +-- sw/source/filter/ascii/makefile.mk | 6 +-- sw/source/filter/ascii/parasc.cxx | 5 +-- sw/source/filter/ascii/wrtasc.cxx | 5 +-- sw/source/filter/ascii/wrtasc.hxx | 5 +-- sw/source/filter/basflt/docfact.cxx | 5 +-- sw/source/filter/basflt/fltini.cxx | 5 +-- sw/source/filter/basflt/iodetect.cxx | 5 +-- sw/source/filter/basflt/makefile.mk | 6 +-- sw/source/filter/basflt/shellio.cxx | 7 +--- sw/source/filter/html/SwAppletImpl.cxx | 5 +-- sw/source/filter/html/css1atr.cxx | 7 +--- sw/source/filter/html/css1kywd.cxx | 5 +-- sw/source/filter/html/css1kywd.hxx | 5 +-- sw/source/filter/html/htmlatr.cxx | 7 +--- sw/source/filter/html/htmlbas.cxx | 5 +-- sw/source/filter/html/htmlcss1.cxx | 5 +-- sw/source/filter/html/htmlctxt.cxx | 5 +-- sw/source/filter/html/htmldraw.cxx | 5 +-- sw/source/filter/html/htmlfld.cxx | 7 +--- sw/source/filter/html/htmlfld.hxx | 5 +-- sw/source/filter/html/htmlfldw.cxx | 5 +-- sw/source/filter/html/htmlfly.cxx | 7 +--- sw/source/filter/html/htmlfly.hxx | 5 +-- sw/source/filter/html/htmlflyt.cxx | 5 +-- sw/source/filter/html/htmlform.cxx | 5 +-- sw/source/filter/html/htmlform.hxx | 5 +-- sw/source/filter/html/htmlforw.cxx | 5 +-- sw/source/filter/html/htmlftn.cxx | 7 +--- sw/source/filter/html/htmlgrin.cxx | 7 +--- sw/source/filter/html/htmlnum.cxx | 7 +--- sw/source/filter/html/htmlnum.hxx | 5 +-- sw/source/filter/html/htmlplug.cxx | 7 +--- sw/source/filter/html/htmlsect.cxx | 5 +-- sw/source/filter/html/htmltab.cxx | 7 +--- sw/source/filter/html/htmltabw.cxx | 7 +--- sw/source/filter/html/htmlvsh.hxx | 5 +-- sw/source/filter/html/makefile.mk | 6 +-- sw/source/filter/html/parcss1.cxx | 5 +-- sw/source/filter/html/parcss1.hxx | 5 +-- sw/source/filter/html/svxcss1.cxx | 7 +--- sw/source/filter/html/svxcss1.hxx | 5 +-- sw/source/filter/html/swcss1.hxx | 5 +-- sw/source/filter/html/swhtml.cxx | 7 +--- sw/source/filter/html/swhtml.hxx | 7 +--- sw/source/filter/html/wrthtml.cxx | 5 +-- sw/source/filter/html/wrthtml.hxx | 5 +-- sw/source/filter/inc/fltbase.hxx | 5 +-- sw/source/filter/inc/fltglbls.hxx | 5 +-- sw/source/filter/inc/fltini.hxx | 5 +-- sw/source/filter/inc/fltshell.hxx | 5 +-- sw/source/filter/inc/makefile.mk | 6 +-- sw/source/filter/inc/msfilter.hxx | 5 +-- sw/source/filter/inc/rtf.hxx | 5 +-- sw/source/filter/inc/wrt_fn.hxx | 5 +-- sw/source/filter/inc/wrtswtbl.hxx | 7 +--- sw/source/filter/inc/wwstyles.hxx | 5 +-- sw/source/filter/makefile.mk | 6 +-- sw/source/filter/rtf/makefile.mk | 6 +-- sw/source/filter/rtf/rtfatr.cxx | 7 +--- sw/source/filter/rtf/rtffld.cxx | 5 +-- sw/source/filter/rtf/rtffly.cxx | 7 +--- sw/source/filter/rtf/rtfnum.cxx | 7 +--- sw/source/filter/rtf/rtftbl.cxx | 7 +--- sw/source/filter/rtf/swparrtf.cxx | 7 +--- sw/source/filter/rtf/swparrtf.hxx | 7 +--- sw/source/filter/rtf/wrtrtf.cxx | 5 +-- sw/source/filter/rtf/wrtrtf.hxx | 5 +-- sw/source/filter/writer/makefile.mk | 6 +-- sw/source/filter/writer/writer.cxx | 7 +--- sw/source/filter/writer/wrt_fn.cxx | 5 +-- sw/source/filter/writer/wrtswtbl.cxx | 7 +--- sw/source/filter/ww1/fltshell.cxx | 7 +--- sw/source/filter/ww1/makefile.mk | 6 +-- sw/source/filter/ww1/w1class.cxx | 5 +-- sw/source/filter/ww1/w1class.hxx | 5 +-- sw/source/filter/ww1/w1filter.cxx | 5 +-- sw/source/filter/ww1/w1par.cxx | 5 +-- sw/source/filter/ww1/w1par.hxx | 5 +-- sw/source/filter/ww1/w1sprm.cxx | 7 +--- sw/source/filter/ww1/w1struct.hxx | 5 +-- sw/source/filter/ww8/WW8FFData.cxx | 5 +-- sw/source/filter/ww8/WW8FFData.hxx | 5 +-- sw/source/filter/ww8/WW8FibData.cxx | 5 +-- sw/source/filter/ww8/WW8FibData.hxx | 5 +-- sw/source/filter/ww8/WW8Sttbf.cxx | 5 +-- sw/source/filter/ww8/WW8Sttbf.hxx | 5 +-- sw/source/filter/ww8/WW8TableInfo.cxx | 5 +-- sw/source/filter/ww8/WW8TableInfo.hxx | 5 +-- sw/source/filter/ww8/attributeoutputbase.hxx | 5 +-- sw/source/filter/ww8/docxattributeoutput.cxx | 7 +--- sw/source/filter/ww8/docxattributeoutput.hxx | 5 +-- sw/source/filter/ww8/docxexport.cxx | 5 +-- sw/source/filter/ww8/docxexport.hxx | 5 +-- sw/source/filter/ww8/docxexportfilter.cxx | 5 +-- sw/source/filter/ww8/docxexportfilter.hxx | 5 +-- sw/source/filter/ww8/docxfootnotes.hxx | 5 +-- sw/source/filter/ww8/dump/dump8.cxx | 5 +-- sw/source/filter/ww8/dump/dump8a.cxx | 5 +-- sw/source/filter/ww8/dump/makefile.mk | 6 +-- sw/source/filter/ww8/dump/msvbasic.cxx | 5 +-- sw/source/filter/ww8/dump/msvbasic.hxx | 5 +-- sw/source/filter/ww8/dump/ww8darr.cxx | 5 +-- sw/source/filter/ww8/dump/ww8darr.hxx | 5 +-- sw/source/filter/ww8/dump/ww8dout.cxx | 5 +-- sw/source/filter/ww8/dump/ww8dout.hxx | 5 +-- sw/source/filter/ww8/dump/ww8scan.cxx | 5 +-- sw/source/filter/ww8/dump/ww8scan.hxx | 5 +-- sw/source/filter/ww8/dump/ww8struc.hxx | 5 +-- sw/source/filter/ww8/escher.hxx | 5 +-- sw/source/filter/ww8/fields.cxx | 5 +-- sw/source/filter/ww8/fields.hxx | 5 +-- sw/source/filter/ww8/hash_wrap.hxx | 5 +-- sw/source/filter/ww8/makefile.mk | 6 +-- sw/source/filter/ww8/needed_cast.hxx | 5 +-- sw/source/filter/ww8/sortedarray.hxx | 5 +-- sw/source/filter/ww8/staticassert.hxx | 5 +-- sw/source/filter/ww8/styles.cxx | 5 +-- sw/source/filter/ww8/tracer.cxx | 5 +-- sw/source/filter/ww8/tracer.hxx | 5 +-- sw/source/filter/ww8/types.hxx | 5 +-- sw/source/filter/ww8/typessw.hxx | 5 +-- sw/source/filter/ww8/writerhelper.cxx | 7 +--- sw/source/filter/ww8/writerhelper.hxx | 7 +--- sw/source/filter/ww8/writerwordglue.cxx | 5 +-- sw/source/filter/ww8/writerwordglue.hxx | 5 +-- sw/source/filter/ww8/wrtw8esh.cxx | 6 +-- sw/source/filter/ww8/wrtw8nds.cxx | 7 +--- sw/source/filter/ww8/wrtw8num.cxx | 7 +--- sw/source/filter/ww8/wrtw8sty.cxx | 5 +-- sw/source/filter/ww8/wrtww8.cxx | 7 +--- sw/source/filter/ww8/wrtww8.hxx | 5 +-- sw/source/filter/ww8/wrtww8gr.cxx | 5 +-- sw/source/filter/ww8/ww8atr.cxx | 7 +--- sw/source/filter/ww8/ww8attributeoutput.hxx | 5 +-- sw/source/filter/ww8/ww8glsy.cxx | 5 +-- sw/source/filter/ww8/ww8glsy.hxx | 5 +-- sw/source/filter/ww8/ww8graf.cxx | 7 +--- sw/source/filter/ww8/ww8graf.hxx | 5 +-- sw/source/filter/ww8/ww8graf2.cxx | 5 +-- sw/source/filter/ww8/ww8par.cxx | 7 +--- sw/source/filter/ww8/ww8par.hxx | 5 +-- sw/source/filter/ww8/ww8par2.cxx | 7 +--- sw/source/filter/ww8/ww8par2.hxx | 5 +-- sw/source/filter/ww8/ww8par3.cxx | 7 +--- sw/source/filter/ww8/ww8par4.cxx | 5 +-- sw/source/filter/ww8/ww8par5.cxx | 5 +-- sw/source/filter/ww8/ww8par6.cxx | 7 +--- sw/source/filter/ww8/ww8scan.cxx | 7 +--- sw/source/filter/ww8/ww8scan.hxx | 5 +-- sw/source/filter/ww8/ww8struc.hxx | 5 +-- sw/source/filter/xml/ForbiddenCharactersEnum.hxx | 5 +-- sw/source/filter/xml/XMLRedlineImportHelper.cxx | 7 +--- sw/source/filter/xml/XMLRedlineImportHelper.hxx | 5 +-- sw/source/filter/xml/makefile.mk | 6 +-- sw/source/filter/xml/swxml.cxx | 7 +--- sw/source/filter/xml/wrtxml.cxx | 7 +--- sw/source/filter/xml/wrtxml.hxx | 5 +-- sw/source/filter/xml/xmlbrsh.cxx | 5 +-- sw/source/filter/xml/xmlbrshe.hxx | 5 +-- sw/source/filter/xml/xmlbrshi.hxx | 5 +-- sw/source/filter/xml/xmlexp.cxx | 5 +-- sw/source/filter/xml/xmlexp.hxx | 5 +-- sw/source/filter/xml/xmlexpit.cxx | 5 +-- sw/source/filter/xml/xmlexpit.hxx | 5 +-- sw/source/filter/xml/xmlfmt.cxx | 5 +-- sw/source/filter/xml/xmlfmte.cxx | 7 +--- sw/source/filter/xml/xmlfonte.cxx | 5 +-- sw/source/filter/xml/xmlimp.cxx | 7 +--- sw/source/filter/xml/xmlimp.hxx | 5 +-- sw/source/filter/xml/xmlimpit.cxx | 5 +-- sw/source/filter/xml/xmlimpit.hxx | 5 +-- sw/source/filter/xml/xmlitem.cxx | 5 +-- sw/source/filter/xml/xmlitem.hxx | 5 +-- sw/source/filter/xml/xmliteme.cxx | 5 +-- sw/source/filter/xml/xmlitemi.cxx | 5 +-- sw/source/filter/xml/xmlitemm.cxx | 5 +-- sw/source/filter/xml/xmlithlp.cxx | 5 +-- sw/source/filter/xml/xmlithlp.hxx | 5 +-- sw/source/filter/xml/xmlitmap.hxx | 5 +-- sw/source/filter/xml/xmlitmpr.cxx | 5 +-- sw/source/filter/xml/xmlmeta.cxx | 5 +-- sw/source/filter/xml/xmlscript.cxx | 5 +-- sw/source/filter/xml/xmltble.cxx | 7 +--- sw/source/filter/xml/xmltbli.cxx | 7 +--- sw/source/filter/xml/xmltbli.hxx | 5 +-- sw/source/filter/xml/xmltext.cxx | 5 +-- sw/source/filter/xml/xmltexte.cxx | 7 +--- sw/source/filter/xml/xmltexte.hxx | 5 +-- sw/source/filter/xml/xmltexti.cxx | 5 +-- sw/source/filter/xml/xmltexti.hxx | 5 +-- sw/source/ui/app/app.src | 5 +-- sw/source/ui/app/appenv.cxx | 5 +-- sw/source/ui/app/apphdl.cxx | 7 +--- sw/source/ui/app/applab.cxx | 5 +-- sw/source/ui/app/appopt.cxx | 7 +--- sw/source/ui/app/docsh.cxx | 7 +--- sw/source/ui/app/docsh2.cxx | 7 +--- sw/source/ui/app/docshdrw.cxx | 5 +-- sw/source/ui/app/docshini.cxx | 7 +--- sw/source/ui/app/docst.cxx | 7 +--- sw/source/ui/app/docstyle.cxx | 7 +--- sw/source/ui/app/error.src | 5 +-- sw/source/ui/app/mainwn.cxx | 5 +-- sw/source/ui/app/makefile.mk | 6 +-- sw/source/ui/app/mn.src | 7 +--- sw/source/ui/app/swdll.cxx | 7 +--- sw/source/ui/app/swmodul1.cxx | 7 +--- sw/source/ui/app/swmodule.cxx | 7 +--- sw/source/ui/app/swwait.cxx | 5 +-- sw/source/ui/cctrl/actctrl.cxx | 5 +-- sw/source/ui/cctrl/makefile.mk | 6 +-- sw/source/ui/cctrl/popbox.cxx | 5 +-- sw/source/ui/cctrl/swlbox.cxx | 5 +-- sw/source/ui/chrdlg/break.cxx | 5 +-- sw/source/ui/chrdlg/break.hrc | 5 +-- sw/source/ui/chrdlg/ccoll.cxx | 5 +-- sw/source/ui/chrdlg/ccoll.hrc | 5 +-- sw/source/ui/chrdlg/ccoll.src | 5 +-- sw/source/ui/chrdlg/chardlg.cxx | 5 +-- sw/source/ui/chrdlg/chardlg.hrc | 5 +-- sw/source/ui/chrdlg/chardlg.src | 5 +-- sw/source/ui/chrdlg/chrdlg.src | 5 +-- sw/source/ui/chrdlg/drpcps.cxx | 5 +-- sw/source/ui/chrdlg/drpcps.hrc | 5 +-- sw/source/ui/chrdlg/drpcps.src | 5 +-- sw/source/ui/chrdlg/makefile.mk | 6 +-- sw/source/ui/chrdlg/numpara.cxx | 5 +-- sw/source/ui/chrdlg/numpara.hrc | 5 +-- sw/source/ui/chrdlg/numpara.src | 5 +-- sw/source/ui/chrdlg/paradlg.hrc | 5 +-- sw/source/ui/chrdlg/paradlg.src | 5 +-- sw/source/ui/chrdlg/pardlg.cxx | 5 +-- sw/source/ui/chrdlg/swbreak.src | 5 +-- sw/source/ui/chrdlg/swuiccoll.cxx | 5 +-- sw/source/ui/chrdlg/tblnumfm.cxx | 5 +-- sw/source/ui/config/barcfg.cxx | 5 +-- sw/source/ui/config/caption.cxx | 5 +-- sw/source/ui/config/cfgitems.cxx | 7 +--- sw/source/ui/config/config.hrc | 5 +-- sw/source/ui/config/dbconfig.cxx | 5 +-- sw/source/ui/config/fontcfg.cxx | 7 +--- sw/source/ui/config/mailconfigpage.cxx | 5 +-- sw/source/ui/config/mailconfigpage.hrc | 5 +-- sw/source/ui/config/mailconfigpage.src | 5 +-- sw/source/ui/config/makefile.mk | 6 +-- sw/source/ui/config/modcfg.cxx | 5 +-- sw/source/ui/config/optcomp.cxx | 5 +-- sw/source/ui/config/optcomp.hrc | 5 +-- sw/source/ui/config/optcomp.src | 5 +-- sw/source/ui/config/optdlg.hrc | 5 +-- sw/source/ui/config/optdlg.src | 5 +-- sw/source/ui/config/optload.cxx | 5 +-- sw/source/ui/config/optload.hrc | 5 +-- sw/source/ui/config/optload.src | 5 +-- sw/source/ui/config/optpage.cxx | 7 +--- sw/source/ui/config/prtopt.cxx | 5 +-- sw/source/ui/config/redlopt.hrc | 5 +-- sw/source/ui/config/redlopt.src | 5 +-- sw/source/ui/config/uinums.cxx | 7 +--- sw/source/ui/config/usrpref.cxx | 5 +-- sw/source/ui/config/viewopt.cxx | 7 +--- sw/source/ui/dbui/addresslistdialog.cxx | 7 +--- sw/source/ui/dbui/addresslistdialog.hrc | 5 +-- sw/source/ui/dbui/addresslistdialog.hxx | 5 +-- sw/source/ui/dbui/addresslistdialog.src | 5 +-- sw/source/ui/dbui/createaddresslistdialog.cxx | 7 +--- sw/source/ui/dbui/createaddresslistdialog.hrc | 5 +-- sw/source/ui/dbui/createaddresslistdialog.hxx | 5 +-- sw/source/ui/dbui/createaddresslistdialog.src | 5 +-- sw/source/ui/dbui/customizeaddresslistdialog.cxx | 5 +-- sw/source/ui/dbui/customizeaddresslistdialog.hrc | 5 +-- sw/source/ui/dbui/customizeaddresslistdialog.hxx | 5 +-- sw/source/ui/dbui/customizeaddresslistdialog.src | 5 +-- sw/source/ui/dbui/dbinsdlg.cxx | 5 +-- sw/source/ui/dbui/dbinsdlg.hrc | 5 +-- sw/source/ui/dbui/dbinsdlg.src | 5 +-- sw/source/ui/dbui/dbmgr.cxx | 7 +--- sw/source/ui/dbui/dbtablepreviewdialog.cxx | 5 +-- sw/source/ui/dbui/dbtablepreviewdialog.hrc | 5 +-- sw/source/ui/dbui/dbtablepreviewdialog.hxx | 5 +-- sw/source/ui/dbui/dbtablepreviewdialog.src | 5 +-- sw/source/ui/dbui/dbtree.cxx | 7 +--- sw/source/ui/dbui/dbui.cxx | 5 +-- sw/source/ui/dbui/dbui.src | 5 +-- sw/source/ui/dbui/maildispatcher.cxx | 5 +-- sw/source/ui/dbui/mailmergechildwindow.cxx | 5 +-- sw/source/ui/dbui/mailmergechildwindow.hrc | 5 +-- sw/source/ui/dbui/mailmergechildwindow.src | 5 +-- sw/source/ui/dbui/mailmergehelper.cxx | 5 +-- sw/source/ui/dbui/mailmergewizard.cxx | 5 +-- sw/source/ui/dbui/mailmergewizard.hrc | 5 +-- sw/source/ui/dbui/mailmergewizard.src | 5 +-- sw/source/ui/dbui/makefile.mk | 6 +-- sw/source/ui/dbui/mmaddressblockpage.cxx | 5 +-- sw/source/ui/dbui/mmaddressblockpage.hrc | 5 +-- sw/source/ui/dbui/mmaddressblockpage.hxx | 5 +-- sw/source/ui/dbui/mmaddressblockpage.src | 5 +-- sw/source/ui/dbui/mmconfigitem.cxx | 5 +-- sw/source/ui/dbui/mmdocselectpage.cxx | 7 +--- sw/source/ui/dbui/mmdocselectpage.hrc | 5 +-- sw/source/ui/dbui/mmdocselectpage.hxx | 5 +-- sw/source/ui/dbui/mmdocselectpage.src | 5 +-- sw/source/ui/dbui/mmgreetingspage.cxx | 7 +--- sw/source/ui/dbui/mmgreetingspage.hrc | 5 +-- sw/source/ui/dbui/mmgreetingspage.hxx | 5 +-- sw/source/ui/dbui/mmgreetingspage.src | 5 +-- sw/source/ui/dbui/mmlayoutpage.cxx | 5 +-- sw/source/ui/dbui/mmlayoutpage.hrc | 5 +-- sw/source/ui/dbui/mmlayoutpage.hxx | 5 +-- sw/source/ui/dbui/mmlayoutpage.src | 5 +-- sw/source/ui/dbui/mmmergepage.cxx | 5 +-- sw/source/ui/dbui/mmmergepage.hrc | 5 +-- sw/source/ui/dbui/mmmergepage.hxx | 5 +-- sw/source/ui/dbui/mmmergepage.src | 5 +-- sw/source/ui/dbui/mmoutputpage.cxx | 7 +--- sw/source/ui/dbui/mmoutputpage.hrc | 5 +-- sw/source/ui/dbui/mmoutputpage.hxx | 5 +-- sw/source/ui/dbui/mmoutputpage.src | 5 +-- sw/source/ui/dbui/mmoutputtypepage.cxx | 5 +-- sw/source/ui/dbui/mmoutputtypepage.hrc | 5 +-- sw/source/ui/dbui/mmoutputtypepage.hxx | 5 +-- sw/source/ui/dbui/mmoutputtypepage.src | 5 +-- sw/source/ui/dbui/mmpreparemergepage.cxx | 5 +-- sw/source/ui/dbui/mmpreparemergepage.hrc | 5 +-- sw/source/ui/dbui/mmpreparemergepage.hxx | 5 +-- sw/source/ui/dbui/mmpreparemergepage.src | 5 +-- sw/source/ui/dbui/selectdbtabledialog.cxx | 5 +-- sw/source/ui/dbui/selectdbtabledialog.hrc | 5 +-- sw/source/ui/dbui/selectdbtabledialog.hxx | 5 +-- sw/source/ui/dbui/selectdbtabledialog.src | 5 +-- sw/source/ui/dbui/swdbtoolsclient.cxx | 5 +-- sw/source/ui/dialog/SwSpellDialogChildWindow.cxx | 7 +--- sw/source/ui/dialog/abstract.cxx | 5 +-- sw/source/ui/dialog/abstract.hrc | 5 +-- sw/source/ui/dialog/abstract.src | 5 +-- sw/source/ui/dialog/addrdlg.cxx | 5 +-- sw/source/ui/dialog/ascfldlg.cxx | 7 +--- sw/source/ui/dialog/ascfldlg.hrc | 5 +-- sw/source/ui/dialog/ascfldlg.src | 5 +-- sw/source/ui/dialog/dialog.src | 5 +-- sw/source/ui/dialog/docstdlg.cxx | 5 +-- sw/source/ui/dialog/docstdlg.hrc | 5 +-- sw/source/ui/dialog/docstdlg.src | 5 +-- sw/source/ui/dialog/macassgn.cxx | 5 +-- sw/source/ui/dialog/makefile.mk | 6 +-- sw/source/ui/dialog/regionsw.cxx | 5 +-- sw/source/ui/dialog/regionsw.hrc | 5 +-- sw/source/ui/dialog/regionsw.src | 5 +-- sw/source/ui/dialog/swabstdlg.cxx | 5 +-- sw/source/ui/dialog/swdialmgr.cxx | 5 +-- sw/source/ui/dialog/swdlgfact.cxx | 5 +-- sw/source/ui/dialog/swdlgfact.hxx | 5 +-- sw/source/ui/dialog/swuiexp.cxx | 5 +-- sw/source/ui/dialog/swwrtshitem.cxx | 5 +-- sw/source/ui/dialog/uiregionsw.cxx | 5 +-- sw/source/ui/dialog/wordcountdialog.cxx | 5 +-- sw/source/ui/dialog/wordcountdialog.hrc | 5 +-- sw/source/ui/dialog/wordcountdialog.src | 5 +-- sw/source/ui/dochdl/dochdl.src | 5 +-- sw/source/ui/dochdl/gloshdl.cxx | 5 +-- sw/source/ui/dochdl/makefile.mk | 6 +-- sw/source/ui/dochdl/selglos.cxx | 5 +-- sw/source/ui/dochdl/selglos.hrc | 5 +-- sw/source/ui/dochdl/selglos.src | 5 +-- sw/source/ui/dochdl/swdtflvr.cxx | 5 +-- sw/source/ui/docvw/PostItMgr.cxx | 6 +-- sw/source/ui/docvw/access.src | 5 +-- sw/source/ui/docvw/docvw.hrc | 5 +-- sw/source/ui/docvw/docvw.src | 5 +-- sw/source/ui/docvw/edtdd.cxx | 5 +-- sw/source/ui/docvw/edtwin.cxx | 7 +--- sw/source/ui/docvw/edtwin2.cxx | 7 +--- sw/source/ui/docvw/edtwin3.cxx | 5 +-- sw/source/ui/docvw/makefile.mk | 6 +-- sw/source/ui/docvw/postit.cxx | 7 +--- sw/source/ui/docvw/romenu.cxx | 7 +--- sw/source/ui/docvw/romenu.hxx | 5 +-- sw/source/ui/docvw/srcedtw.cxx | 7 +--- sw/source/ui/envelp/envelp.src | 5 +-- sw/source/ui/envelp/envfmt.cxx | 5 +-- sw/source/ui/envelp/envfmt.hrc | 5 +-- sw/source/ui/envelp/envfmt.hxx | 5 +-- sw/source/ui/envelp/envfmt.src | 5 +-- sw/source/ui/envelp/envimg.cxx | 7 +--- sw/source/ui/envelp/envlop.hrc | 5 +-- sw/source/ui/envelp/envlop.src | 5 +-- sw/source/ui/envelp/envlop1.cxx | 5 +-- sw/source/ui/envelp/envprt.cxx | 5 +-- sw/source/ui/envelp/envprt.hrc | 5 +-- sw/source/ui/envelp/envprt.hxx | 5 +-- sw/source/ui/envelp/envprt.src | 5 +-- sw/source/ui/envelp/label.hrc | 5 +-- sw/source/ui/envelp/label.src | 5 +-- sw/source/ui/envelp/label1.cxx | 5 +-- sw/source/ui/envelp/labelcfg.cxx | 5 +-- sw/source/ui/envelp/labelexp.cxx | 5 +-- sw/source/ui/envelp/labfmt.cxx | 5 +-- sw/source/ui/envelp/labfmt.hrc | 5 +-- sw/source/ui/envelp/labfmt.hxx | 5 +-- sw/source/ui/envelp/labfmt.src | 5 +-- sw/source/ui/envelp/labimg.cxx | 7 +--- sw/source/ui/envelp/labimp.hxx | 5 +-- sw/source/ui/envelp/labprt.cxx | 7 +--- sw/source/ui/envelp/labprt.hrc | 5 +-- sw/source/ui/envelp/labprt.hxx | 5 +-- sw/source/ui/envelp/labprt.src | 5 +-- sw/source/ui/envelp/mailmrge.cxx | 7 +--- sw/source/ui/envelp/mailmrge.hrc | 5 +-- sw/source/ui/envelp/mailmrge.src | 5 +-- sw/source/ui/envelp/makefile.mk | 6 +-- sw/source/ui/envelp/swuilabimp.hxx | 5 +-- sw/source/ui/envelp/syncbtn.cxx | 5 +-- sw/source/ui/fldui/DropDownFieldDialog.cxx | 5 +-- sw/source/ui/fldui/DropDownFieldDialog.hrc | 5 +-- sw/source/ui/fldui/DropDownFieldDialog.src | 5 +-- sw/source/ui/fldui/FldRefTreeListBox.cxx | 5 +-- sw/source/ui/fldui/FldRefTreeListBox.hxx | 5 +-- sw/source/ui/fldui/changedb.cxx | 7 +--- sw/source/ui/fldui/changedb.hrc | 5 +-- sw/source/ui/fldui/changedb.src | 5 +-- sw/source/ui/fldui/flddb.cxx | 5 +-- sw/source/ui/fldui/flddb.hxx | 5 +-- sw/source/ui/fldui/flddb.src | 5 +-- sw/source/ui/fldui/flddinf.cxx | 5 +-- sw/source/ui/fldui/flddinf.hxx | 5 +-- sw/source/ui/fldui/flddinf.src | 5 +-- sw/source/ui/fldui/flddok.cxx | 5 +-- sw/source/ui/fldui/flddok.hxx | 5 +-- sw/source/ui/fldui/flddok.src | 5 +-- sw/source/ui/fldui/fldedt.cxx | 5 +-- sw/source/ui/fldui/fldfunc.cxx | 5 +-- sw/source/ui/fldui/fldfunc.hxx | 5 +-- sw/source/ui/fldui/fldfunc.src | 5 +-- sw/source/ui/fldui/fldmgr.cxx | 5 +-- sw/source/ui/fldui/fldpage.cxx | 5 +-- sw/source/ui/fldui/fldpage.hxx | 5 +-- sw/source/ui/fldui/fldref.cxx | 5 +-- sw/source/ui/fldui/fldref.hxx | 5 +-- sw/source/ui/fldui/fldref.src | 5 +-- sw/source/ui/fldui/fldtdlg.cxx | 5 +-- sw/source/ui/fldui/fldtdlg.hrc | 5 +-- sw/source/ui/fldui/fldtdlg.src | 5 +-- sw/source/ui/fldui/fldui.src | 5 +-- sw/source/ui/fldui/fldvar.cxx | 5 +-- sw/source/ui/fldui/fldvar.hxx | 5 +-- sw/source/ui/fldui/fldvar.src | 5 +-- sw/source/ui/fldui/fldwrap.cxx | 5 +-- sw/source/ui/fldui/inpdlg.cxx | 5 +-- sw/source/ui/fldui/inpdlg.hrc | 5 +-- sw/source/ui/fldui/inpdlg.src | 5 +-- sw/source/ui/fldui/javaedit.cxx | 5 +-- sw/source/ui/fldui/javaedit.hrc | 5 +-- sw/source/ui/fldui/javaedit.src | 5 +-- sw/source/ui/fldui/makefile.mk | 6 +-- sw/source/ui/fldui/xfldui.cxx | 5 +-- sw/source/ui/fmtui/fmtui.src | 5 +-- sw/source/ui/fmtui/makefile.mk | 6 +-- sw/source/ui/fmtui/tmpdlg.cxx | 5 +-- sw/source/ui/fmtui/tmpdlg.src | 5 +-- sw/source/ui/frmdlg/colex.cxx | 5 +-- sw/source/ui/frmdlg/colmgr.cxx | 5 +-- sw/source/ui/frmdlg/column.cxx | 5 +-- sw/source/ui/frmdlg/column.hrc | 5 +-- sw/source/ui/frmdlg/column.src | 5 +-- sw/source/ui/frmdlg/cption.cxx | 5 +-- sw/source/ui/frmdlg/cption.hrc | 5 +-- sw/source/ui/frmdlg/cption.src | 5 +-- sw/source/ui/frmdlg/frmdlg.cxx | 5 +-- sw/source/ui/frmdlg/frmmgr.cxx | 5 +-- sw/source/ui/frmdlg/frmpage.cxx | 7 +--- sw/source/ui/frmdlg/frmpage.hrc | 5 +-- sw/source/ui/frmdlg/frmpage.src | 5 +-- sw/source/ui/frmdlg/frmui.src | 5 +-- sw/source/ui/frmdlg/makefile.mk | 6 +-- sw/source/ui/frmdlg/pattern.cxx | 5 +-- sw/source/ui/frmdlg/pattern.hrc | 5 +-- sw/source/ui/frmdlg/uiborder.cxx | 5 +-- sw/source/ui/frmdlg/wrap.cxx | 5 +-- sw/source/ui/frmdlg/wrap.hrc | 5 +-- sw/source/ui/frmdlg/wrap.src | 5 +-- sw/source/ui/globdoc/globdoc.cxx | 7 +--- sw/source/ui/globdoc/globdoc.src | 5 +-- sw/source/ui/globdoc/makefile.mk | 6 +-- sw/source/ui/inc/DropDownFieldDialog.hxx | 5 +-- sw/source/ui/inc/SwSpellDialogChildWindow.hxx | 5 +-- sw/source/ui/inc/SwXFilterOptions.hxx | 5 +-- sw/source/ui/inc/abstract.hxx | 5 +-- sw/source/ui/inc/actctrl.hxx | 5 +-- sw/source/ui/inc/addrdlg.hxx | 5 +-- sw/source/ui/inc/annotsh.hxx | 5 +-- sw/source/ui/inc/app.hrc | 5 +-- sw/source/ui/inc/ascfldlg.hxx | 5 +-- sw/source/ui/inc/autoedit.hxx | 5 +-- sw/source/ui/inc/barcfg.hxx | 5 +-- sw/source/ui/inc/basesh.hxx | 5 +-- sw/source/ui/inc/beziersh.hxx | 5 +-- sw/source/ui/inc/bmpwin.hxx | 5 +-- sw/source/ui/inc/bookctrl.hxx | 5 +-- sw/source/ui/inc/bookmark.hxx | 5 +-- sw/source/ui/inc/break.hxx | 5 +-- sw/source/ui/inc/caption.hxx | 5 +-- sw/source/ui/inc/cfgdesc.hxx | 5 +-- sw/source/ui/inc/cfgid.h | 5 +-- sw/source/ui/inc/cfgitems.hxx | 7 +--- sw/source/ui/inc/changedb.hxx | 5 +-- sw/source/ui/inc/chartins.hxx | 5 +-- sw/source/ui/inc/chldwrap.hxx | 5 +-- sw/source/ui/inc/chrdlg.hxx | 5 +-- sw/source/ui/inc/cnttab.hxx | 5 +-- sw/source/ui/inc/colex.hxx | 5 +-- sw/source/ui/inc/colmgr.hxx | 5 +-- sw/source/ui/inc/column.hxx | 5 +-- sw/source/ui/inc/conarc.hxx | 5 +-- sw/source/ui/inc/concustomshape.hxx | 5 +-- sw/source/ui/inc/condedit.hxx | 5 +-- sw/source/ui/inc/conform.hxx | 5 +-- sw/source/ui/inc/conpoly.hxx | 5 +-- sw/source/ui/inc/conrect.hxx | 5 +-- sw/source/ui/inc/content.hxx | 5 +-- sw/source/ui/inc/conttree.hxx | 5 +-- sw/source/ui/inc/convert.hxx | 5 +-- sw/source/ui/inc/cption.hxx | 5 +-- sw/source/ui/inc/dbconfig.hxx | 5 +-- sw/source/ui/inc/dbinsdlg.hxx | 5 +-- sw/source/ui/inc/dbtree.hxx | 5 +-- sw/source/ui/inc/dbui.hxx | 5 +-- sw/source/ui/inc/dialmgr.hxx | 5 +-- sw/source/ui/inc/docfnote.hxx | 5 +-- sw/source/ui/inc/docstdlg.hxx | 5 +-- sw/source/ui/inc/drawbase.hxx | 5 +-- sw/source/ui/inc/drawsh.hxx | 5 +-- sw/source/ui/inc/drformsh.hxx | 5 +-- sw/source/ui/inc/drpcps.hxx | 5 +-- sw/source/ui/inc/drwbassh.hxx | 5 +-- sw/source/ui/inc/drwtxtsh.hxx | 5 +-- sw/source/ui/inc/dselect.hxx | 5 +-- sw/source/ui/inc/edtwin.hxx | 5 +-- sw/source/ui/inc/envimg.hxx | 5 +-- sw/source/ui/inc/envlop.hxx | 5 +-- sw/source/ui/inc/fldedt.hxx | 5 +-- sw/source/ui/inc/fldmgr.hxx | 5 +-- sw/source/ui/inc/fldtdlg.hxx | 5 +-- sw/source/ui/inc/fldwrap.hxx | 5 +-- sw/source/ui/inc/fontcfg.hxx | 5 +-- sw/source/ui/inc/formatclipboard.hxx | 5 +-- sw/source/ui/inc/formedt.hxx | 5 +-- sw/source/ui/inc/frmdlg.hxx | 5 +-- sw/source/ui/inc/frmmgr.hxx | 5 +-- sw/source/ui/inc/frmpage.hxx | 5 +-- sw/source/ui/inc/frmsh.hxx | 5 +-- sw/source/ui/inc/frmui.hrc | 5 +-- sw/source/ui/inc/globals.h | 5 +-- sw/source/ui/inc/globdoc.hrc | 5 +-- sw/source/ui/inc/glosbib.hxx | 5 +-- sw/source/ui/inc/glosdoc.hxx | 5 +-- sw/source/ui/inc/gloshdl.hxx | 5 +-- sw/source/ui/inc/gloslst.hxx | 5 +-- sw/source/ui/inc/glossary.hxx | 5 +-- sw/source/ui/inc/glshell.hxx | 5 +-- sw/source/ui/inc/grfsh.hxx | 5 +-- sw/source/ui/inc/hidfunc.h | 5 +-- sw/source/ui/inc/hyp.hxx | 5 +-- sw/source/ui/inc/idxmrk.hxx | 5 +-- sw/source/ui/inc/imaildsplistener.hxx | 5 +-- sw/source/ui/inc/initui.hxx | 5 +-- sw/source/ui/inc/inpdlg.hxx | 5 +-- sw/source/ui/inc/inputwin.hxx | 5 +-- sw/source/ui/inc/insfnote.hxx | 5 +-- sw/source/ui/inc/insrule.hxx | 5 +-- sw/source/ui/inc/instable.hxx | 5 +-- sw/source/ui/inc/javaedit.hxx | 5 +-- sw/source/ui/inc/label.hxx | 5 +-- sw/source/ui/inc/labelcfg.hxx | 5 +-- sw/source/ui/inc/labimg.hxx | 5 +-- sw/source/ui/inc/langhelper.hxx | 5 +-- sw/source/ui/inc/linenum.hxx | 5 +-- sw/source/ui/inc/listsh.hxx | 5 +-- sw/source/ui/inc/macassgn.hxx | 5 +-- sw/source/ui/inc/mailconfigpage.hxx | 5 +-- sw/source/ui/inc/maildispatcher.hxx | 5 +-- sw/source/ui/inc/mailmergechildwindow.hxx | 5 +-- sw/source/ui/inc/mailmergehelper.hxx | 5 +-- sw/source/ui/inc/mailmergewizard.hxx | 5 +-- sw/source/ui/inc/mailmrge.hxx | 5 +-- sw/source/ui/inc/makefile.mk | 6 +-- sw/source/ui/inc/mediash.hxx | 5 +-- sw/source/ui/inc/mergetbl.hxx | 5 +-- sw/source/ui/inc/misc.hrc | 5 +-- sw/source/ui/inc/mmconfigitem.hxx | 5 +-- sw/source/ui/inc/multmrk.hxx | 5 +-- sw/source/ui/inc/navicfg.hxx | 5 +-- sw/source/ui/inc/navicont.hxx | 5 +-- sw/source/ui/inc/navipi.hxx | 5 +-- sw/source/ui/inc/num.hxx | 7 +--- sw/source/ui/inc/numberingtypelistbox.hxx | 5 +-- sw/source/ui/inc/numfmtlb.hxx | 5 +-- sw/source/ui/inc/numpara.hxx | 5 +-- sw/source/ui/inc/numprevw.hxx | 5 +-- sw/source/ui/inc/olesh.hxx | 5 +-- sw/source/ui/inc/olmenu.hxx | 5 +-- sw/source/ui/inc/optcomp.hxx | 7 +--- sw/source/ui/inc/optload.hxx | 5 +-- sw/source/ui/inc/optpage.hxx | 7 +--- sw/source/ui/inc/outline.hxx | 5 +-- sw/source/ui/inc/pardlg.hxx | 5 +-- sw/source/ui/inc/pattern.hxx | 5 +-- sw/source/ui/inc/pgfnote.hxx | 5 +-- sw/source/ui/inc/pggrid.hxx | 5 +-- sw/source/ui/inc/popbox.hxx | 5 +-- sw/source/ui/inc/popup.hrc | 5 +-- sw/source/ui/inc/prcntfld.hxx | 5 +-- sw/source/ui/inc/prtopt.hxx | 5 +-- sw/source/ui/inc/pview.hxx | 5 +-- sw/source/ui/inc/redlndlg.hxx | 5 +-- sw/source/ui/inc/regionsw.hxx | 5 +-- sw/source/ui/inc/ribbar.hrc | 5 +-- sw/source/ui/inc/rowht.hxx | 5 +-- sw/source/ui/inc/scroll.hxx | 5 +-- sw/source/ui/inc/selglos.hxx | 5 +-- sw/source/ui/inc/sharedconnection.hxx | 5 +-- sw/source/ui/inc/shdwcrsr.hxx | 5 +-- sw/source/ui/inc/shells.hrc | 5 +-- sw/source/ui/inc/split.hxx | 5 +-- sw/source/ui/inc/splittbl.hxx | 5 +-- sw/source/ui/inc/srcedtw.hxx | 7 +--- sw/source/ui/inc/srcview.hxx | 5 +-- sw/source/ui/inc/srtdlg.hxx | 5 +-- sw/source/ui/inc/stmenu.hxx | 5 +-- sw/source/ui/inc/swcont.hxx | 5 +-- sw/source/ui/inc/swdtflvr.hxx | 5 +-- sw/source/ui/inc/swlbox.hxx | 5 +-- sw/source/ui/inc/swmn_tmpl.hrc | 5 +-- sw/source/ui/inc/swmodalredlineacceptdlg.hxx | 5 +-- sw/source/ui/inc/swrenamexnameddlg.hxx | 5 +-- sw/source/ui/inc/swtablerep.hxx | 5 +-- sw/source/ui/inc/swuiccoll.hxx | 5 +-- sw/source/ui/inc/swuicnttab.hxx | 5 +-- sw/source/ui/inc/swuiidxmrk.hxx | 5 +-- sw/source/ui/inc/swuipardlg.hxx | 5 +-- sw/source/ui/inc/swvset.hxx | 5 +-- sw/source/ui/inc/swwrtshitem.hxx | 5 +-- sw/source/ui/inc/syncbtn.hxx | 5 +-- sw/source/ui/inc/table.hrc | 5 +-- sw/source/ui/inc/tabledlg.hxx | 5 +-- sw/source/ui/inc/tablemgr.hxx | 5 +-- sw/source/ui/inc/tabsh.hxx | 5 +-- sw/source/ui/inc/tautofmt.hxx | 5 +-- sw/source/ui/inc/tblctrl.hxx | 5 +-- sw/source/ui/inc/tblnumfm.hxx | 5 +-- sw/source/ui/inc/tbxanchr.hxx | 5 +-- sw/source/ui/inc/tbxmgr.hxx | 5 +-- sw/source/ui/inc/textcontrolcombo.hxx | 5 +-- sw/source/ui/inc/textsh.hxx | 5 +-- sw/source/ui/inc/tmpdlg.hxx | 5 +-- sw/source/ui/inc/tmplctrl.hxx | 5 +-- sw/source/ui/inc/toolbox_tmpl.hrc | 5 +-- sw/source/ui/inc/toxmgr.hxx | 5 +-- sw/source/ui/inc/uiborder.hxx | 5 +-- sw/source/ui/inc/uiitems.hxx | 5 +-- sw/source/ui/inc/uinums.hxx | 5 +-- sw/source/ui/inc/uitool.hxx | 5 +-- sw/source/ui/inc/uivwimp.hxx | 5 +-- sw/source/ui/inc/unodispatch.hxx | 5 +-- sw/source/ui/inc/unotools.hxx | 5 +-- sw/source/ui/inc/unotxvw.hxx | 5 +-- sw/source/ui/inc/usrpref.hxx | 5 +-- sw/source/ui/inc/utlui.hrc | 5 +-- sw/source/ui/inc/view.hxx | 7 +--- sw/source/ui/inc/viewlayoutctrl.hxx | 5 +-- sw/source/ui/inc/web.hrc | 5 +-- sw/source/ui/inc/wformsh.hxx | 5 +-- sw/source/ui/inc/wfrmsh.hxx | 5 +-- sw/source/ui/inc/wgrfsh.hxx | 5 +-- sw/source/ui/inc/wlistsh.hxx | 5 +-- sw/source/ui/inc/wolesh.hxx | 5 +-- sw/source/ui/inc/wordcountdialog.hxx | 5 +-- sw/source/ui/inc/workctrl.hxx | 5 +-- sw/source/ui/inc/wrap.hxx | 5 +-- sw/source/ui/inc/wrtsh.hxx | 7 +--- sw/source/ui/inc/wtabsh.hxx | 5 +-- sw/source/ui/inc/wtextsh.hxx | 5 +-- sw/source/ui/inc/wview.hxx | 5 +-- sw/source/ui/inc/zoomctrl.hxx | 5 +-- sw/source/ui/index/cntex.cxx | 5 +-- sw/source/ui/index/cnttab.cxx | 7 +--- sw/source/ui/index/cnttab.hrc | 5 +-- sw/source/ui/index/cnttab.src | 5 +-- sw/source/ui/index/idxmrk.cxx | 5 +-- sw/source/ui/index/idxmrk.hrc | 5 +-- sw/source/ui/index/idxmrk.src | 5 +-- sw/source/ui/index/makefile.mk | 6 +-- sw/source/ui/index/multmrk.cxx | 5 +-- sw/source/ui/index/multmrk.hrc | 5 +-- sw/source/ui/index/multmrk.src | 5 +-- sw/source/ui/index/swuiidxmrk.cxx | 5 +-- sw/source/ui/index/toxmgr.cxx | 5 +-- sw/source/ui/lingu/hhcwrp.cxx | 5 +-- sw/source/ui/lingu/hyp.cxx | 5 +-- sw/source/ui/lingu/makefile.mk | 6 +-- sw/source/ui/lingu/olmenu.cxx | 7 +--- sw/source/ui/lingu/olmenu.hrc | 5 +-- sw/source/ui/lingu/olmenu.src | 5 +-- sw/source/ui/lingu/sdrhhcwrap.cxx | 5 +-- sw/source/ui/lingu/sdrhhcwrap.hxx | 5 +-- sw/source/ui/makefile.mk | 6 +-- sw/source/ui/misc/autocorr.src | 5 +-- sw/source/ui/misc/bookmark.cxx | 5 +-- sw/source/ui/misc/bookmark.hrc | 5 +-- sw/source/ui/misc/bookmark.src | 5 +-- sw/source/ui/misc/docfnote.cxx | 5 +-- sw/source/ui/misc/docfnote.hrc | 5 +-- sw/source/ui/misc/docfnote.src | 5 +-- sw/source/ui/misc/glosbib.cxx | 7 +--- sw/source/ui/misc/glosbib.hrc | 5 +-- sw/source/ui/misc/glosbib.src | 5 +-- sw/source/ui/misc/glosdoc.cxx | 7 +--- sw/source/ui/misc/glossary.cxx | 7 +--- sw/source/ui/misc/glossary.hrc | 5 +-- sw/source/ui/misc/glossary.src | 5 +-- sw/source/ui/misc/glshell.cxx | 5 +-- sw/source/ui/misc/impfnote.hxx | 5 +-- sw/source/ui/misc/insfnote.cxx | 5 +-- sw/source/ui/misc/insfnote.hrc | 5 +-- sw/source/ui/misc/insfnote.src | 5 +-- sw/source/ui/misc/insrule.cxx | 5 +-- sw/source/ui/misc/insrule.hrc | 5 +-- sw/source/ui/misc/insrule.src | 5 +-- sw/source/ui/misc/linenum.cxx | 5 +-- sw/source/ui/misc/linenum.hrc | 5 +-- sw/source/ui/misc/linenum.src | 5 +-- sw/source/ui/misc/makefile.mk | 6 +-- sw/source/ui/misc/num.cxx | 7 +--- sw/source/ui/misc/num.hrc | 5 +-- sw/source/ui/misc/num.src | 5 +-- sw/source/ui/misc/numberingtypelistbox.cxx | 5 +-- sw/source/ui/misc/numberingtypelistbox.src | 5 +-- sw/source/ui/misc/outline.cxx | 5 +-- sw/source/ui/misc/outline.hrc | 5 +-- sw/source/ui/misc/outline.src | 5 +-- sw/source/ui/misc/pgfnote.cxx | 5 +-- sw/source/ui/misc/pgfnote.hrc | 5 +-- sw/source/ui/misc/pgfnote.src | 5 +-- sw/source/ui/misc/pggrid.cxx | 5 +-- sw/source/ui/misc/pggrid.hrc | 5 +-- sw/source/ui/misc/pggrid.src | 7 +--- sw/source/ui/misc/redlndlg.cxx | 5 +-- sw/source/ui/misc/redlndlg.hrc | 5 +-- sw/source/ui/misc/redlndlg.src | 5 +-- sw/source/ui/misc/srtdlg.cxx | 5 +-- sw/source/ui/misc/srtdlg.hrc | 5 +-- sw/source/ui/misc/srtdlg.src | 5 +-- sw/source/ui/misc/swmodalredlineacceptdlg.cxx | 5 +-- sw/source/ui/ribbar/conarc.cxx | 5 +-- sw/source/ui/ribbar/concustomshape.cxx | 5 +-- sw/source/ui/ribbar/conform.cxx | 5 +-- sw/source/ui/ribbar/conpoly.cxx | 5 +-- sw/source/ui/ribbar/conrect.cxx | 5 +-- sw/source/ui/ribbar/drawbase.cxx | 5 +-- sw/source/ui/ribbar/dselect.cxx | 5 +-- sw/source/ui/ribbar/inputwin.cxx | 5 +-- sw/source/ui/ribbar/inputwin.hrc | 5 +-- sw/source/ui/ribbar/inputwin.src | 5 +-- sw/source/ui/ribbar/makefile.mk | 6 +-- sw/source/ui/ribbar/tblctrl.cxx | 5 +-- sw/source/ui/ribbar/tblctrl.hrc | 5 +-- sw/source/ui/ribbar/tblctrl.src | 5 +-- sw/source/ui/ribbar/tbxanchr.cxx | 5 +-- sw/source/ui/ribbar/tbxanchr.src | 5 +-- sw/source/ui/ribbar/tbxmgr.cxx | 5 +-- sw/source/ui/ribbar/workctrl.cxx | 5 +-- sw/source/ui/ribbar/workctrl.hrc | 5 +-- sw/source/ui/ribbar/workctrl.src | 5 +-- sw/source/ui/shells/annotsh.cxx | 7 +--- sw/source/ui/shells/basesh.cxx | 7 +--- sw/source/ui/shells/beziersh.cxx | 5 +-- sw/source/ui/shells/drawdlg.cxx | 5 +-- sw/source/ui/shells/drawsh.cxx | 5 +-- sw/source/ui/shells/drformsh.cxx | 5 +-- sw/source/ui/shells/drwbassh.cxx | 5 +-- sw/source/ui/shells/drwtxtex.cxx | 7 +--- sw/source/ui/shells/drwtxtsh.cxx | 7 +--- sw/source/ui/shells/frmsh.cxx | 7 +--- sw/source/ui/shells/grfsh.cxx | 7 +--- sw/source/ui/shells/grfshex.cxx | 5 +-- sw/source/ui/shells/langhelper.cxx | 5 +-- sw/source/ui/shells/listsh.cxx | 7 +--- sw/source/ui/shells/makefile.mk | 6 +-- sw/source/ui/shells/mediash.cxx | 5 +-- sw/source/ui/shells/olesh.cxx | 5 +-- sw/source/ui/shells/shells.src | 5 +-- sw/source/ui/shells/slotadd.cxx | 5 +-- sw/source/ui/shells/tabsh.cxx | 7 +--- sw/source/ui/shells/textdrw.cxx | 5 +-- sw/source/ui/shells/textfld.cxx | 7 +--- sw/source/ui/shells/textglos.cxx | 5 +-- sw/source/ui/shells/textidx.cxx | 5 +-- sw/source/ui/shells/textsh.cxx | 7 +--- sw/source/ui/shells/textsh1.cxx | 7 +--- sw/source/ui/shells/textsh2.cxx | 7 +--- sw/source/ui/shells/txtattr.cxx | 5 +-- sw/source/ui/shells/txtcrsr.cxx | 5 +-- sw/source/ui/shells/txtnum.cxx | 7 +--- sw/source/ui/smartmenu/makefile.mk | 6 +-- sw/source/ui/smartmenu/stmenu.cxx | 5 +-- sw/source/ui/smartmenu/stmenu.hrc | 5 +-- sw/source/ui/smartmenu/stmenu.src | 5 +-- sw/source/ui/table/chartins.cxx | 5 +-- sw/source/ui/table/chartins.hrc | 5 +-- sw/source/ui/table/chartins.src | 5 +-- sw/source/ui/table/colwd.cxx | 5 +-- sw/source/ui/table/colwd.hrc | 5 +-- sw/source/ui/table/colwd.src | 5 +-- sw/source/ui/table/convert.cxx | 5 +-- sw/source/ui/table/convert.hrc | 5 +-- sw/source/ui/table/convert.src | 5 +-- sw/source/ui/table/instable.cxx | 5 +-- sw/source/ui/table/instable.hrc | 5 +-- sw/source/ui/table/instable.src | 5 +-- sw/source/ui/table/makefile.mk | 6 +-- sw/source/ui/table/mergetbl.cxx | 5 +-- sw/source/ui/table/mergetbl.hrc | 5 +-- sw/source/ui/table/mergetbl.src | 5 +-- sw/source/ui/table/rowht.cxx | 5 +-- sw/source/ui/table/rowht.hrc | 5 +-- sw/source/ui/table/rowht.src | 5 +-- sw/source/ui/table/splittbl.cxx | 5 +-- sw/source/ui/table/splittbl.hrc | 5 +-- sw/source/ui/table/splittbl.src | 5 +-- sw/source/ui/table/swtablerep.cxx | 5 +-- sw/source/ui/table/table.src | 5 +-- sw/source/ui/table/tabledlg.cxx | 5 +-- sw/source/ui/table/tabledlg.hrc | 5 +-- sw/source/ui/table/tabledlg.src | 7 +--- sw/source/ui/table/tablemgr.cxx | 5 +-- sw/source/ui/table/tablepg.hxx | 5 +-- sw/source/ui/table/tautofmt.cxx | 5 +-- sw/source/ui/table/tautofmt.hrc | 5 +-- sw/source/ui/table/tautofmt.src | 5 +-- sw/source/ui/uiview/formatclipboard.cxx | 5 +-- sw/source/ui/uiview/makefile.mk | 6 +-- sw/source/ui/uiview/pview.cxx | 7 +--- sw/source/ui/uiview/pview.hrc | 5 +-- sw/source/ui/uiview/pview.src | 5 +-- sw/source/ui/uiview/scroll.cxx | 5 +-- sw/source/ui/uiview/srcview.cxx | 7 +--- sw/source/ui/uiview/swcli.cxx | 5 +-- sw/source/ui/uiview/uivwimp.cxx | 7 +--- sw/source/ui/uiview/view.cxx | 7 +--- sw/source/ui/uiview/view.hrc | 5 +-- sw/source/ui/uiview/view.src | 5 +-- sw/source/ui/uiview/view0.cxx | 7 +--- sw/source/ui/uiview/view1.cxx | 5 +-- sw/source/ui/uiview/view2.cxx | 7 +--- sw/source/ui/uiview/viewcoll.cxx | 5 +-- sw/source/ui/uiview/viewdlg.cxx | 5 +-- sw/source/ui/uiview/viewdlg2.cxx | 5 +-- sw/source/ui/uiview/viewdraw.cxx | 5 +-- sw/source/ui/uiview/viewfunc.hxx | 5 +-- sw/source/ui/uiview/viewling.cxx | 5 +-- sw/source/ui/uiview/viewmdi.cxx | 5 +-- sw/source/ui/uiview/viewport.cxx | 7 +--- sw/source/ui/uiview/viewprt.cxx | 7 +--- sw/source/ui/uiview/viewsrch.cxx | 7 +--- sw/source/ui/uiview/viewstat.cxx | 7 +--- sw/source/ui/uiview/viewtab.cxx | 7 +--- sw/source/ui/uno/RefreshListenerContainer.cxx | 5 +-- sw/source/ui/uno/SwXDocumentSettings.cxx | 7 +--- sw/source/ui/uno/SwXDocumentSettings.hxx | 5 +-- sw/source/ui/uno/SwXFilterOptions.cxx | 5 +-- sw/source/ui/uno/SwXPrintPreviewSettings.cxx | 5 +-- sw/source/ui/uno/SwXPrintPreviewSettings.hxx | 5 +-- sw/source/ui/uno/detreg.cxx | 5 +-- sw/source/ui/uno/dlelstnr.cxx | 7 +--- sw/source/ui/uno/makefile.mk | 6 +-- sw/source/ui/uno/swdet2.cxx | 7 +--- sw/source/ui/uno/swdetect.cxx | 7 +--- sw/source/ui/uno/swdetect.hxx | 5 +-- sw/source/ui/uno/unoatxt.cxx | 5 +-- sw/source/ui/uno/unodefaults.cxx | 5 +-- sw/source/ui/uno/unodefaults.hxx | 5 +-- sw/source/ui/uno/unodispatch.cxx | 5 +-- sw/source/ui/uno/unodoc.cxx | 5 +-- sw/source/ui/uno/unofreg.cxx | 5 +-- sw/source/ui/uno/unomailmerge.cxx | 7 +--- sw/source/ui/uno/unomod.cxx | 7 +--- sw/source/ui/uno/unomodule.cxx | 5 +-- sw/source/ui/uno/unomodule.hxx | 5 +-- sw/source/ui/uno/unotxdoc.cxx | 7 +--- sw/source/ui/uno/unotxvw.cxx | 7 +--- sw/source/ui/uno/warnpassword.cxx | 5 +-- sw/source/ui/utlui/attrdesc.cxx | 5 +-- sw/source/ui/utlui/attrdesc.hrc | 5 +-- sw/source/ui/utlui/attrdesc.src | 5 +-- sw/source/ui/utlui/bookctrl.cxx | 5 +-- sw/source/ui/utlui/condedit.cxx | 5 +-- sw/source/ui/utlui/content.cxx | 5 +-- sw/source/ui/utlui/glbltree.cxx | 5 +-- sw/source/ui/utlui/gloslst.cxx | 7 +--- sw/source/ui/utlui/gloslst.hrc | 5 +-- sw/source/ui/utlui/gloslst.src | 5 +-- sw/source/ui/utlui/initui.cxx | 5 +-- sw/source/ui/utlui/initui.hrc | 5 +-- sw/source/ui/utlui/initui.src | 5 +-- sw/source/ui/utlui/makefile.mk | 6 +-- sw/source/ui/utlui/navicfg.cxx | 5 +-- sw/source/ui/utlui/navipi.cxx | 5 +-- sw/source/ui/utlui/navipi.hrc | 5 +-- sw/source/ui/utlui/navipi.src | 5 +-- sw/source/ui/utlui/numfmtlb.cxx | 5 +-- sw/source/ui/utlui/poolfmt.src | 5 +-- sw/source/ui/utlui/prcntfld.cxx | 5 +-- sw/source/ui/utlui/shdwcrsr.cxx | 5 +-- sw/source/ui/utlui/swrenamexnameddlg.cxx | 5 +-- sw/source/ui/utlui/textcontrolcombo.cxx | 5 +-- sw/source/ui/utlui/tmplctrl.cxx | 5 +-- sw/source/ui/utlui/uiitems.cxx | 5 +-- sw/source/ui/utlui/uitool.cxx | 5 +-- sw/source/ui/utlui/unotools.cxx | 5 +-- sw/source/ui/utlui/unotools.hrc | 5 +-- sw/source/ui/utlui/unotools.src | 5 +-- sw/source/ui/utlui/utlui.src | 5 +-- sw/source/ui/utlui/viewlayoutctrl.cxx | 5 +-- sw/source/ui/utlui/zoomctrl.cxx | 5 +-- sw/source/ui/vba/makefile.mk | 6 +-- sw/source/ui/vba/service.cxx | 5 +-- sw/source/ui/vba/vbaaddin.cxx | 5 +-- sw/source/ui/vba/vbaaddin.hxx | 5 +-- sw/source/ui/vba/vbaaddins.cxx | 5 +-- sw/source/ui/vba/vbaaddins.hxx | 5 +-- sw/source/ui/vba/vbaapplication.cxx | 5 +-- sw/source/ui/vba/vbaapplication.hxx | 5 +-- sw/source/ui/vba/vbaautotextentry.cxx | 5 +-- sw/source/ui/vba/vbaautotextentry.hxx | 5 +-- sw/source/ui/vba/vbabookmark.cxx | 5 +-- sw/source/ui/vba/vbabookmark.hxx | 5 +-- sw/source/ui/vba/vbabookmarks.cxx | 5 +-- sw/source/ui/vba/vbabookmarks.hxx | 5 +-- sw/source/ui/vba/vbaborders.cxx | 5 +-- sw/source/ui/vba/vbaborders.hxx | 5 +-- sw/source/ui/vba/vbadialog.cxx | 5 +-- sw/source/ui/vba/vbadialog.hxx | 5 +-- sw/source/ui/vba/vbadialogs.cxx | 5 +-- sw/source/ui/vba/vbadialogs.hxx | 5 +-- sw/source/ui/vba/vbadocument.cxx | 5 +-- sw/source/ui/vba/vbadocument.hxx | 5 +-- sw/source/ui/vba/vbadocumentproperties.cxx | 5 +-- sw/source/ui/vba/vbadocumentproperties.hxx | 5 +-- sw/source/ui/vba/vbadocuments.cxx | 5 +-- sw/source/ui/vba/vbadocuments.hxx | 5 +-- sw/source/ui/vba/vbafield.cxx | 5 +-- sw/source/ui/vba/vbafield.hxx | 5 +-- sw/source/ui/vba/vbafind.cxx | 5 +-- sw/source/ui/vba/vbafind.hxx | 5 +-- sw/source/ui/vba/vbaglobals.cxx | 5 +-- sw/source/ui/vba/vbaglobals.hxx | 5 +-- sw/source/ui/vba/vbaheaderfooter.cxx | 5 +-- sw/source/ui/vba/vbaheaderfooter.hxx | 5 +-- sw/source/ui/vba/vbaheaderfooterhelper.cxx | 5 +-- sw/source/ui/vba/vbaheaderfooterhelper.hxx | 5 +-- sw/source/ui/vba/vbainformationhelper.cxx | 5 +-- sw/source/ui/vba/vbainformationhelper.hxx | 5 +-- sw/source/ui/vba/vbaoptions.cxx | 5 +-- sw/source/ui/vba/vbaoptions.hxx | 5 +-- sw/source/ui/vba/vbapagesetup.cxx | 5 +-- sw/source/ui/vba/vbapagesetup.hxx | 5 +-- sw/source/ui/vba/vbapane.cxx | 5 +-- sw/source/ui/vba/vbapane.hxx | 5 +-- sw/source/ui/vba/vbapanes.cxx | 5 +-- sw/source/ui/vba/vbapanes.hxx | 5 +-- sw/source/ui/vba/vbaparagraph.cxx | 5 +-- sw/source/ui/vba/vbaparagraph.hxx | 5 +-- sw/source/ui/vba/vbaparagraphformat.cxx | 5 +-- sw/source/ui/vba/vbaparagraphformat.hxx | 5 +-- sw/source/ui/vba/vbarange.cxx | 5 +-- sw/source/ui/vba/vbarange.hxx | 5 +-- sw/source/ui/vba/vbarangehelper.cxx | 5 +-- sw/source/ui/vba/vbarangehelper.hxx | 5 +-- sw/source/ui/vba/vbareplacement.cxx | 5 +-- sw/source/ui/vba/vbareplacement.hxx | 5 +-- sw/source/ui/vba/vbasection.cxx | 5 +-- sw/source/ui/vba/vbasection.hxx | 5 +-- sw/source/ui/vba/vbasections.cxx | 5 +-- sw/source/ui/vba/vbasections.hxx | 5 +-- sw/source/ui/vba/vbaselection.cxx | 5 +-- sw/source/ui/vba/vbaselection.hxx | 5 +-- sw/source/ui/vba/vbastyle.cxx | 5 +-- sw/source/ui/vba/vbastyle.hxx | 5 +-- sw/source/ui/vba/vbastyles.cxx | 5 +-- sw/source/ui/vba/vbastyles.hxx | 5 +-- sw/source/ui/vba/vbasystem.cxx | 5 +-- sw/source/ui/vba/vbasystem.hxx | 5 +-- sw/source/ui/vba/vbatemplate.cxx | 5 +-- sw/source/ui/vba/vbatemplate.hxx | 5 +-- sw/source/ui/vba/vbavariable.cxx | 5 +-- sw/source/ui/vba/vbavariable.hxx | 5 +-- sw/source/ui/vba/vbavariables.cxx | 5 +-- sw/source/ui/vba/vbavariables.hxx | 5 +-- sw/source/ui/vba/vbaview.cxx | 5 +-- sw/source/ui/vba/vbaview.hxx | 5 +-- sw/source/ui/vba/vbawindow.cxx | 5 +-- sw/source/ui/vba/vbawindow.hxx | 5 +-- sw/source/ui/vba/vbawrapformat.cxx | 5 +-- sw/source/ui/vba/vbawrapformat.hxx | 5 +-- sw/source/ui/vba/wordvbahelper.cxx | 5 +-- sw/source/ui/vba/wordvbahelper.hxx | 5 +-- sw/source/ui/web/makefile.mk | 6 +-- sw/source/ui/web/wdocsh.cxx | 5 +-- sw/source/ui/web/web.src | 5 +-- sw/source/ui/web/wformsh.cxx | 5 +-- sw/source/ui/web/wfrmsh.cxx | 5 +-- sw/source/ui/web/wgrfsh.cxx | 5 +-- sw/source/ui/web/wlistsh.cxx | 5 +-- sw/source/ui/web/wolesh.cxx | 5 +-- sw/source/ui/web/wtabsh.cxx | 5 +-- sw/source/ui/web/wtextsh.cxx | 5 +-- sw/source/ui/web/wview.cxx | 5 +-- sw/source/ui/wrtsh/delete.cxx | 7 +--- sw/source/ui/wrtsh/makefile.mk | 6 +-- sw/source/ui/wrtsh/move.cxx | 5 +-- sw/source/ui/wrtsh/select.cxx | 5 +-- sw/source/ui/wrtsh/wrtsh.hrc | 5 +-- sw/source/ui/wrtsh/wrtsh.src | 5 +-- sw/source/ui/wrtsh/wrtsh1.cxx | 7 +--- sw/source/ui/wrtsh/wrtsh2.cxx | 5 +-- sw/source/ui/wrtsh/wrtsh3.cxx | 5 +-- sw/source/ui/wrtsh/wrtsh4.cxx | 7 +--- sw/source/ui/wrtsh/wrtundo.cxx | 5 +-- sw/uiconfig/layout/makefile.mk | 6 +-- sw/util/hidother.hrc | 5 +-- sw/util/hidother.src | 5 +-- sw/util/makefile.mk | 8 +--- 2039 files changed, 2515 insertions(+), 8735 deletions(-) (limited to 'sw/source') diff --git a/starmath/inc/action.hxx b/starmath/inc/action.hxx index 33e5a7f4f5..50a77dbf21 100644 --- a/starmath/inc/action.hxx +++ b/starmath/inc/action.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: action.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/applicat.hxx b/starmath/inc/applicat.hxx index bef74d8ddc..1c29e26d1d 100644 --- a/starmath/inc/applicat.hxx +++ b/starmath/inc/applicat.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: applicat.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/config.hxx b/starmath/inc/config.hxx index 2af382d399..0fa37b49bb 100644 --- a/starmath/inc/config.hxx +++ b/starmath/inc/config.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: config.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index e759705483..3e5ec1d296 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dialog.hxx,v $ - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index 2ddf7fcf92..ec2f41305e 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: document.hxx,v $ - * $Revision: 1.35.26.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx index c6e3121ced..274dddd258 100644 --- a/starmath/inc/edit.hxx +++ b/starmath/inc/edit.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edit.hxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx index 4d30b5252e..7b8a09ac82 100644 --- a/starmath/inc/format.hxx +++ b/starmath/inc/format.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: format.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/makefile.mk b/starmath/inc/makefile.mk index efff07a65c..930e5281c6 100644 --- a/starmath/inc/makefile.mk +++ b/starmath/inc/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index e46bae6d8c..99545ec541 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: node.hxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx index cf4758fe8c..9577c91f0a 100644 --- a/starmath/inc/parse.hxx +++ b/starmath/inc/parse.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: parse.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/pch/precompiled_starmath.cxx b/starmath/inc/pch/precompiled_starmath.cxx index 347dffc482..75f679f436 100644 --- a/starmath/inc/pch/precompiled_starmath.cxx +++ b/starmath/inc/pch/precompiled_starmath.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: precompiled_starmath.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/pch/precompiled_starmath.hxx b/starmath/inc/pch/precompiled_starmath.hxx index 9bad70879f..cefebf1a2b 100644 --- a/starmath/inc/pch/precompiled_starmath.hxx +++ b/starmath/inc/pch/precompiled_starmath.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: precompiled_starmath.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx index 472b03b2f4..78d98d593f 100644 --- a/starmath/inc/rect.hxx +++ b/starmath/inc/rect.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rect.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/smdll.hxx b/starmath/inc/smdll.hxx index 1368916b64..01a1f22a7a 100644 --- a/starmath/inc/smdll.hxx +++ b/starmath/inc/smdll.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: smdll.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx index e7d947cf27..9956f81dfe 100644 --- a/starmath/inc/smmod.hxx +++ b/starmath/inc/smmod.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: smmod.hxx,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc index 0de1c6d023..6b23adc03c 100644 --- a/starmath/inc/starmath.hrc +++ b/starmath/inc/starmath.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: starmath.hrc,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx index f2949aa5f5..17a353a039 100644 --- a/starmath/inc/symbol.hxx +++ b/starmath/inc/symbol.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: symbol.hxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/toolbox.hxx b/starmath/inc/toolbox.hxx index b87f20a98c..b41102f57e 100644 --- a/starmath/inc/toolbox.hxx +++ b/starmath/inc/toolbox.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: toolbox.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/types.hxx b/starmath/inc/types.hxx index 781ce9b19d..a3c1872961 100644 --- a/starmath/inc/types.hxx +++ b/starmath/inc/types.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: types.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/unomodel.hxx b/starmath/inc/unomodel.hxx index 5cd53723dd..03a3cf6014 100644 --- a/starmath/inc/unomodel.hxx +++ b/starmath/inc/unomodel.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unomodel.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx index a8ce47e068..7ccf6fa015 100644 --- a/starmath/inc/utility.hxx +++ b/starmath/inc/utility.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: utility.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx index ef277013da..76f64c60c8 100644 --- a/starmath/inc/view.hxx +++ b/starmath/inc/view.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: view.hxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/qa/unoapi/makefile.mk b/starmath/qa/unoapi/makefile.mk index c37570b3af..93169ee517 100644 --- a/starmath/qa/unoapi/makefile.mk +++ b/starmath/qa/unoapi/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.6 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/sdi/makefile.mk b/starmath/sdi/makefile.mk index f868756f59..a2d965bc22 100644 --- a/starmath/sdi/makefile.mk +++ b/starmath/sdi/makefile.mk @@ -1,15 +1,11 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.8 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/sdi/smath.sdi b/starmath/sdi/smath.sdi index 9d1bd22ebb..f62dd0b5c4 100644 --- a/starmath/sdi/smath.sdi +++ b/starmath/sdi/smath.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: smath.sdi,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/sdi/smitems.sdi b/starmath/sdi/smitems.sdi index a071a52f83..af62aa70bb 100644 --- a/starmath/sdi/smitems.sdi +++ b/starmath/sdi/smitems.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svxitems.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/sdi/smslots.sdi b/starmath/sdi/smslots.sdi index 88bd108bdd..bf4eaad64d 100644 --- a/starmath/sdi/smslots.sdi +++ b/starmath/sdi/smslots.sdi @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: smslots.sdi,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index ec5c005d68..2197ead90f 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accessibility.cxx,v $ - * $Revision: 1.38 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx index 3c0c3fcc63..927011a5e5 100644 --- a/starmath/source/accessibility.hxx +++ b/starmath/source/accessibility.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accessibility.hxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/action.cxx b/starmath/source/action.cxx index 81e4a374ca..6265c19d73 100644 --- a/starmath/source/action.cxx +++ b/starmath/source/action.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: action.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index 693fe32fa2..277d806f8e 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cfgitem.cxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx index bc62a7a6d3..77d00e2dca 100644 --- a/starmath/source/cfgitem.hxx +++ b/starmath/source/cfgitem.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cfgitem.hxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/commands.src b/starmath/source/commands.src index 038f30d49f..0b42320ad7 100644 --- a/starmath/source/commands.src +++ b/starmath/source/commands.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: commands.src,v $ - * $Revision: 1.31 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/config.cxx b/starmath/source/config.cxx index 3a8034f51f..b06be09534 100644 --- a/starmath/source/config.cxx +++ b/starmath/source/config.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: config.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/detreg.cxx b/starmath/source/detreg.cxx index 8e9d5d1d26..602c99bb1b 100644 --- a/starmath/source/detreg.cxx +++ b/starmath/source/detreg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: detreg.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index fe16822b6e..52cd03109b 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dialog.cxx,v $ - * $Revision: 1.44 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/dialog.hrc b/starmath/source/dialog.hrc index 0890e5839f..026c17e700 100644 --- a/starmath/source/dialog.hrc +++ b/starmath/source/dialog.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dialog.hrc,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index c7ea88fd0c..830cf5cf32 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: document.cxx,v $ - * $Revision: 1.94.26.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index 6e9a1827f3..861ef894b4 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edit.cxx,v $ - * $Revision: 1.40 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/eqnolefilehdr.cxx b/starmath/source/eqnolefilehdr.cxx index 8992af5211..9eb2ffc5f3 100644 --- a/starmath/source/eqnolefilehdr.cxx +++ b/starmath/source/eqnolefilehdr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: eqnolefilehdr.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/eqnolefilehdr.hxx b/starmath/source/eqnolefilehdr.hxx index 1fbe4db167..e5efed22c0 100644 --- a/starmath/source/eqnolefilehdr.hxx +++ b/starmath/source/eqnolefilehdr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: eqnolefilehdr.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx index c187a9e65b..8609443e6a 100644 --- a/starmath/source/format.cxx +++ b/starmath/source/format.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: format.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk index 53f6569dcf..c3091423c1 100644 --- a/starmath/source/makefile.mk +++ b/starmath/source/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.35 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/math_pch.cxx b/starmath/source/math_pch.cxx index 7a58e8aa62..8864bd4e49 100644 --- a/starmath/source/math_pch.cxx +++ b/starmath/source/math_pch.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: math_pch.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index c9b12abcdb..f8638c4c05 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -1,31 +1,28 @@ /************************************************************************* * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: x $ - * $Revision: 1.00 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * ************************************************************************/ // MARKER(update_precomp.py): autogen include statement, do not remove diff --git a/starmath/source/mathmlexport.hxx b/starmath/source/mathmlexport.hxx index fa76076e66..e32bda03c1 100644 --- a/starmath/source/mathmlexport.hxx +++ b/starmath/source/mathmlexport.hxx @@ -1,31 +1,28 @@ /************************************************************************* * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: x $ - * $Revision: 1.00 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * ************************************************************************/ #ifndef _MATHMLEXPORT_HXX_ diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index 56b35a96c6..4f3e9adc17 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: x $ - * $Revision: 1.00 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/mathmlimport.hxx b/starmath/source/mathmlimport.hxx index ed46efa823..a6e1ba6000 100644 --- a/starmath/source/mathmlimport.hxx +++ b/starmath/source/mathmlimport.hxx @@ -1,31 +1,28 @@ /************************************************************************* * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: x $ - * $Revision: 1.00 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * ************************************************************************/ #ifndef _MATHMLIMPORT_HXX_ diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index f2a3d0e1c7..1b15ae096a 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mathtype.cxx,v $ - * $Revision: 1.40 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx index 6a36b384bf..7e3b7e0844 100644 --- a/starmath/source/mathtype.hxx +++ b/starmath/source/mathtype.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mathtype.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/menu_tmpl.src b/starmath/source/menu_tmpl.src index 7be1b733c3..70348c73d0 100644 --- a/starmath/source/menu_tmpl.src +++ b/starmath/source/menu_tmpl.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: menu_tmpl.src,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 1ed55a5514..16b3495a1f 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: node.cxx,v $ - * $Revision: 1.42 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index b48e7541aa..457a3c90f1 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: parse.cxx,v $ - * $Revision: 1.35 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx index 789c3bcd05..9f753ec5fe 100644 --- a/starmath/source/rect.cxx +++ b/starmath/source/rect.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rect.cxx,v $ - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/register.cxx b/starmath/source/register.cxx index 3a5179ed2f..7e393fe606 100644 --- a/starmath/source/register.cxx +++ b/starmath/source/register.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: register.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx index 0fcc3f61da..bc01b2d7c9 100644 --- a/starmath/source/smdetect.cxx +++ b/starmath/source/smdetect.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: smdetect.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/smdetect.hxx b/starmath/source/smdetect.hxx index e297ea6e33..214b2c9122 100644 --- a/starmath/source/smdetect.hxx +++ b/starmath/source/smdetect.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: smdetect.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/smdll.cxx b/starmath/source/smdll.cxx index 9b18a1cd7e..2b4b90499a 100644 --- a/starmath/source/smdll.cxx +++ b/starmath/source/smdll.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: smdll.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx index bc6c0ba57d..aa1f2b36bb 100644 --- a/starmath/source/smmod.cxx +++ b/starmath/source/smmod.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: smmod.cxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/smres.src b/starmath/source/smres.src index 841c5746b9..9a17e1352f 100644 --- a/starmath/source/smres.src +++ b/starmath/source/smres.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: smres.src,v $ - * $Revision: 1.118 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index 1e2aeb781a..7ed0ff1c7c 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: symbol.cxx,v $ - * $Revision: 1.31 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/symbol.src b/starmath/source/symbol.src index 2b9c112ca5..dbac415495 100644 --- a/starmath/source/symbol.src +++ b/starmath/source/symbol.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: symbol.src,v $ - * $Revision: 1.53 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx index 64be515246..d5995e10a7 100644 --- a/starmath/source/toolbox.cxx +++ b/starmath/source/toolbox.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: toolbox.cxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/toolbox.hrc b/starmath/source/toolbox.hrc index 2dc2c6d2e1..9b15d99e20 100644 --- a/starmath/source/toolbox.hrc +++ b/starmath/source/toolbox.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: toolbox.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/typemap.cxx b/starmath/source/typemap.cxx index a76a819f7d..bfea7318b3 100644 --- a/starmath/source/typemap.cxx +++ b/starmath/source/typemap.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: typemap.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/types.cxx b/starmath/source/types.cxx index eb5b06920a..e190edb79e 100644 --- a/starmath/source/types.cxx +++ b/starmath/source/types.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: types.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/unodoc.cxx b/starmath/source/unodoc.cxx index e6dc669255..180c3581cd 100644 --- a/starmath/source/unodoc.cxx +++ b/starmath/source/unodoc.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unodoc.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index be3e274a5f..8613145ba3 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unomodel.cxx,v $ - * $Revision: 1.49 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx index fea4e39f61..520181e3c1 100644 --- a/starmath/source/utility.cxx +++ b/starmath/source/utility.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: utility.cxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index c26d210447..eddd0c3da0 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: view.cxx,v $ - * $Revision: 1.53 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/util/hidother.src b/starmath/util/hidother.src index 7449cabf2b..5a87a5709e 100644 --- a/starmath/util/hidother.src +++ b/starmath/util/hidother.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: hidother.src,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/starmath/util/makefile.mk b/starmath/util/makefile.mk index 0e11dc46aa..52fe395061 100644 --- a/starmath/util/makefile.mk +++ b/starmath/util/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.20 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx index dc5335f589..4ace87c9d2 100644 --- a/sw/inc/EnhancedPDFExportHelper.hxx +++ b/sw/inc/EnhancedPDFExportHelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: EnhancedPDFExportHelper.hxx,v $ - * $Revision: 1.10.174.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/HandleAnchorNodeChg.hxx b/sw/inc/HandleAnchorNodeChg.hxx index 531d40ec69..53ae1b7b90 100644 --- a/sw/inc/HandleAnchorNodeChg.hxx +++ b/sw/inc/HandleAnchorNodeChg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: HandleAnchorNodeChg.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentChartDataProviderAccess.hxx b/sw/inc/IDocumentChartDataProviderAccess.hxx index e77e4f4921..dd673e18c0 100644 --- a/sw/inc/IDocumentChartDataProviderAccess.hxx +++ b/sw/inc/IDocumentChartDataProviderAccess.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentChartDataProviderAccess.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx index b5830d72b2..7e47af6b6c 100644 --- a/sw/inc/IDocumentContentOperations.hxx +++ b/sw/inc/IDocumentContentOperations.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentContentOperations.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentDeviceAccess.hxx b/sw/inc/IDocumentDeviceAccess.hxx index 0ac8c3951c..55e8ecfda5 100755 --- a/sw/inc/IDocumentDeviceAccess.hxx +++ b/sw/inc/IDocumentDeviceAccess.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentDeviceAccess.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentDrawModelAccess.hxx b/sw/inc/IDocumentDrawModelAccess.hxx index 475112fe3c..77db126b58 100644 --- a/sw/inc/IDocumentDrawModelAccess.hxx +++ b/sw/inc/IDocumentDrawModelAccess.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentDrawModelAccess.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentExternalData.hxx b/sw/inc/IDocumentExternalData.hxx index 85f9347050..c0b2f037b0 100644 --- a/sw/inc/IDocumentExternalData.hxx +++ b/sw/inc/IDocumentExternalData.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: $ - * $Revision:$ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentFieldsAccess.hxx b/sw/inc/IDocumentFieldsAccess.hxx index e303ab3224..4822ce1427 100644 --- a/sw/inc/IDocumentFieldsAccess.hxx +++ b/sw/inc/IDocumentFieldsAccess.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentFieldsAccess.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentLayoutAccess.hxx b/sw/inc/IDocumentLayoutAccess.hxx index d589c019df..1854661525 100644 --- a/sw/inc/IDocumentLayoutAccess.hxx +++ b/sw/inc/IDocumentLayoutAccess.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentLayoutAccess.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentLineNumberAccess.hxx b/sw/inc/IDocumentLineNumberAccess.hxx index 6ba6e486d2..17b258aea7 100644 --- a/sw/inc/IDocumentLineNumberAccess.hxx +++ b/sw/inc/IDocumentLineNumberAccess.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentLineNumberAccess.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentLinksAdministration.hxx b/sw/inc/IDocumentLinksAdministration.hxx index 739fd5d835..61f32f957d 100644 --- a/sw/inc/IDocumentLinksAdministration.hxx +++ b/sw/inc/IDocumentLinksAdministration.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentLinksAdministration.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentListItems.hxx b/sw/inc/IDocumentListItems.hxx index 6b612c0f26..ecd349d33b 100644 --- a/sw/inc/IDocumentListItems.hxx +++ b/sw/inc/IDocumentListItems.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentListItems.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentListsAccess.hxx b/sw/inc/IDocumentListsAccess.hxx index b0baae2211..3310d6de86 100644 --- a/sw/inc/IDocumentListsAccess.hxx +++ b/sw/inc/IDocumentListsAccess.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentListsAccess.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx index e31eec0131..8239be80b8 100644 --- a/sw/inc/IDocumentMarkAccess.hxx +++ b/sw/inc/IDocumentMarkAccess.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentMarkAccess.hxx,v $ - * $Revision: 1.4.42.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentOutlineNodes.hxx b/sw/inc/IDocumentOutlineNodes.hxx index 186974600b..d5947b9c9c 100644 --- a/sw/inc/IDocumentOutlineNodes.hxx +++ b/sw/inc/IDocumentOutlineNodes.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentOutlineNodes.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentRedlineAccess.hxx b/sw/inc/IDocumentRedlineAccess.hxx index ee9b4db5aa..1aeae8231d 100644 --- a/sw/inc/IDocumentRedlineAccess.hxx +++ b/sw/inc/IDocumentRedlineAccess.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentRedlineAccess.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx index 9c509f7f05..58a6df6401 100644 --- a/sw/inc/IDocumentSettingAccess.hxx +++ b/sw/inc/IDocumentSettingAccess.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentSettingAccess.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentState.hxx b/sw/inc/IDocumentState.hxx index f9ccbfb50d..f548c000f1 100644 --- a/sw/inc/IDocumentState.hxx +++ b/sw/inc/IDocumentState.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentState.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentStatistics.hxx b/sw/inc/IDocumentStatistics.hxx index 6da67f531d..9e2aa1582b 100644 --- a/sw/inc/IDocumentStatistics.hxx +++ b/sw/inc/IDocumentStatistics.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentStatistics.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentStylePoolAccess.hxx b/sw/inc/IDocumentStylePoolAccess.hxx index 21b15e010b..c44327318f 100644 --- a/sw/inc/IDocumentStylePoolAccess.hxx +++ b/sw/inc/IDocumentStylePoolAccess.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentStylePoolAccess.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentTimerAccess.hxx b/sw/inc/IDocumentTimerAccess.hxx index 8929e381e4..d8286bf2ae 100644 --- a/sw/inc/IDocumentTimerAccess.hxx +++ b/sw/inc/IDocumentTimerAccess.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentTimerAccess.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IDocumentUndoRedo.hxx b/sw/inc/IDocumentUndoRedo.hxx index c6fe811e6f..ed0502d7e1 100644 --- a/sw/inc/IDocumentUndoRedo.hxx +++ b/sw/inc/IDocumentUndoRedo.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IDocumentUndoRedo.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IGrammarContact.hxx b/sw/inc/IGrammarContact.hxx index 5e62da2893..f524588530 100644 --- a/sw/inc/IGrammarContact.hxx +++ b/sw/inc/IGrammarContact.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IGrammarContact.hxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IInterface.hxx b/sw/inc/IInterface.hxx index fdf0dedddf..9f943050e7 100644 --- a/sw/inc/IInterface.hxx +++ b/sw/inc/IInterface.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IInterface.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/IMark.hxx b/sw/inc/IMark.hxx index 8507b1d2eb..7f7e8cf2e8 100644 --- a/sw/inc/IMark.hxx +++ b/sw/inc/IMark.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: bookmrk.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index e2060e83d4..e12a614d3b 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PostItMgr.hxx,v $ - * $Revision: 1.8.84.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/RefreshListenerContainer.hxx b/sw/inc/RefreshListenerContainer.hxx index f7102c73f3..4de32d0c3f 100644 --- a/sw/inc/RefreshListenerContainer.hxx +++ b/sw/inc/RefreshListenerContainer.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: RefreshListenerContainer.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/SwAppletImpl.hxx b/sw/inc/SwAppletImpl.hxx index 051bc5b174..13e395ac91 100644 --- a/sw/inc/SwAppletImpl.hxx +++ b/sw/inc/SwAppletImpl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwAppletImpl.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/SwCapObjType.hxx b/sw/inc/SwCapObjType.hxx index deea363a10..4bc09855a7 100644 --- a/sw/inc/SwCapObjType.hxx +++ b/sw/inc/SwCapObjType.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwCapObjType.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/SwGetPoolIdFromName.hxx b/sw/inc/SwGetPoolIdFromName.hxx index 7b3b981a03..60b19c088c 100644 --- a/sw/inc/SwGetPoolIdFromName.hxx +++ b/sw/inc/SwGetPoolIdFromName.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwGetPoolIdFromName.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/SwNodeNum.hxx b/sw/inc/SwNodeNum.hxx index ceba16e623..7c22345e5b 100644 --- a/sw/inc/SwNodeNum.hxx +++ b/sw/inc/SwNodeNum.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwNodeNum.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx index 7f4c88b608..68950ce9e0 100644 --- a/sw/inc/SwNumberTree.hxx +++ b/sw/inc/SwNumberTree.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwNumberTree.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/SwNumberTreeTypes.hxx b/sw/inc/SwNumberTreeTypes.hxx index cb2a5ed988..5404c5bd8a 100644 --- a/sw/inc/SwNumberTreeTypes.hxx +++ b/sw/inc/SwNumberTreeTypes.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwNumberTreeTypes.hxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/SwRewriter.hxx b/sw/inc/SwRewriter.hxx index 6ca614fade..723d9d73df 100644 --- a/sw/inc/SwRewriter.hxx +++ b/sw/inc/SwRewriter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwRewriter.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/SwSmartTagMgr.hxx b/sw/inc/SwSmartTagMgr.hxx index 11815d0bf2..05978aee30 100644 --- a/sw/inc/SwSmartTagMgr.hxx +++ b/sw/inc/SwSmartTagMgr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwSmartTagMgr.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/SwStyleNameMapper.hxx b/sw/inc/SwStyleNameMapper.hxx index e12e97fdab..8ae4c87002 100644 --- a/sw/inc/SwStyleNameMapper.hxx +++ b/sw/inc/SwStyleNameMapper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwStyleNameMapper.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx index d53db41450..bac0bbcc8a 100644 --- a/sw/inc/SwUndoField.hxx +++ b/sw/inc/SwUndoField.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwUndoField.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/SwUndoFmt.hxx b/sw/inc/SwUndoFmt.hxx index 01967d9650..488acf0cf7 100644 --- a/sw/inc/SwUndoFmt.hxx +++ b/sw/inc/SwUndoFmt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwUndoFmt.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/SwUndoPageDesc.hxx b/sw/inc/SwUndoPageDesc.hxx index cb6714c3e4..775cbfdecb 100644 --- a/sw/inc/SwUndoPageDesc.hxx +++ b/sw/inc/SwUndoPageDesc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwUndoPageDesc.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/SwUndoTOXChange.hxx b/sw/inc/SwUndoTOXChange.hxx index 720edef90b..be08cf1f4e 100644 --- a/sw/inc/SwUndoTOXChange.hxx +++ b/sw/inc/SwUndoTOXChange.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwUndoTOXChange.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/SwXMLSectionList.hxx b/sw/inc/SwXMLSectionList.hxx index 8f46f0e105..6dcae75f4a 100644 --- a/sw/inc/SwXMLSectionList.hxx +++ b/sw/inc/SwXMLSectionList.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXMLSectionList.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/TextCursorHelper.hxx b/sw/inc/TextCursorHelper.hxx index 1449cb3ad6..18ecaab0bb 100644 --- a/sw/inc/TextCursorHelper.hxx +++ b/sw/inc/TextCursorHelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TextCursorHelper.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/access.hrc b/sw/inc/access.hrc index a02a1703fc..f1215375fb 100644 --- a/sw/inc/access.hrc +++ b/sw/inc/access.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: access.hrc,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/accessibilityoptions.hxx b/sw/inc/accessibilityoptions.hxx index d9464747c0..5d4aa5b846 100644 --- a/sw/inc/accessibilityoptions.hxx +++ b/sw/inc/accessibilityoptions.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accessibilityoptions.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index 236fb429d4..5137cdbe34 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accmap.hxx,v $ - * $Revision: 1.29 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/acmplwrd.hxx b/sw/inc/acmplwrd.hxx index 0167fdbaae..94ab1f89e4 100644 --- a/sw/inc/acmplwrd.hxx +++ b/sw/inc/acmplwrd.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: acmplwrd.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/anchoreddrawobject.hxx b/sw/inc/anchoreddrawobject.hxx index f2b8362d35..22968f87e4 100644 --- a/sw/inc/anchoreddrawobject.hxx +++ b/sw/inc/anchoreddrawobject.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: anchoreddrawobject.hxx,v $ - * $Revision: 1.15.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/anchoredobject.hxx b/sw/inc/anchoredobject.hxx index ea85b7fbf9..70f852bee8 100644 --- a/sw/inc/anchoredobject.hxx +++ b/sw/inc/anchoredobject.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: anchoredobject.hxx,v $ - * $Revision: 1.22.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx index d1fb7475a1..de3a149e15 100644 --- a/sw/inc/authfld.hxx +++ b/sw/inc/authfld.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: authfld.hxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/authratr.hxx b/sw/inc/authratr.hxx index 7fd320e949..f6332511c5 100644 --- a/sw/inc/authratr.hxx +++ b/sw/inc/authratr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: authratr.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/bparr.hxx b/sw/inc/bparr.hxx index 0fbdaef769..364f966b9e 100644 --- a/sw/inc/bparr.hxx +++ b/sw/inc/bparr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: bparr.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/breakit.hxx b/sw/inc/breakit.hxx index 5901718c7e..563339764a 100644 --- a/sw/inc/breakit.hxx +++ b/sw/inc/breakit.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: breakit.hxx,v $ - * $Revision: 1.12.112.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index 3c9970bfe2..3dbcb88857 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: calbck.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx index 476f0ccadc..5b5a052861 100644 --- a/sw/inc/calc.hxx +++ b/sw/inc/calc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: calc.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx index ac731756c8..a8546b8024 100644 --- a/sw/inc/ccoll.hxx +++ b/sw/inc/ccoll.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ccoll.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx index 27521f5e40..7fe6cc53e3 100644 --- a/sw/inc/cellatr.hxx +++ b/sw/inc/cellatr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cellatr.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx index 150c2c9c52..75792569ad 100644 --- a/sw/inc/cellfml.hxx +++ b/sw/inc/cellfml.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cellfml.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/charatr.hxx b/sw/inc/charatr.hxx index 9c82b6b12c..ca2ff32f7f 100644 --- a/sw/inc/charatr.hxx +++ b/sw/inc/charatr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: charatr.hxx,v $ - * $Revision: 1.15.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/charfmt.hxx b/sw/inc/charfmt.hxx index 4723a9ec75..c7ae5c0f36 100644 --- a/sw/inc/charfmt.hxx +++ b/sw/inc/charfmt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: charfmt.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/chcmprse.hxx b/sw/inc/chcmprse.hxx index f52d7edfd9..15ff788fcb 100644 --- a/sw/inc/chcmprse.hxx +++ b/sw/inc/chcmprse.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chcmprse.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/checkit.hxx b/sw/inc/checkit.hxx index 317624dfdd..0aed8c90bb 100644 --- a/sw/inc/checkit.hxx +++ b/sw/inc/checkit.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: checkit.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/chpfld.hxx b/sw/inc/chpfld.hxx index 992c73dcfc..8c9784e147 100644 --- a/sw/inc/chpfld.hxx +++ b/sw/inc/chpfld.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chpfld.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/chrdlg.hrc b/sw/inc/chrdlg.hrc index 3f79983a56..7e3175a3a3 100644 --- a/sw/inc/chrdlg.hrc +++ b/sw/inc/chrdlg.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chrdlg.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index a87925bb84..cf5bcd55ba 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cmdid.h,v $ - * $Revision: 1.84.34.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/colwd.hxx b/sw/inc/colwd.hxx index ea8e609be6..ba121cd37f 100644 --- a/sw/inc/colwd.hxx +++ b/sw/inc/colwd.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: colwd.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/comcore.hrc b/sw/inc/comcore.hrc index 826081455f..11ea529b48 100644 --- a/sw/inc/comcore.hrc +++ b/sw/inc/comcore.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: comcore.hrc,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index a98e7c69a0..6fb9794893 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: crsrsh.hxx,v $ - * $Revision: 1.46 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/crsskip.hxx b/sw/inc/crsskip.hxx index 3d006bec57..8b1eaa3e78 100644 --- a/sw/inc/crsskip.hxx +++ b/sw/inc/crsskip.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: crsskip.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx index 7f1a1741d1..4ac37bdbfe 100644 --- a/sw/inc/crstate.hxx +++ b/sw/inc/crstate.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: crstate.hxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/cshtyp.hxx b/sw/inc/cshtyp.hxx index 0a2ec77db9..9c6b8bf0a1 100644 --- a/sw/inc/cshtyp.hxx +++ b/sw/inc/cshtyp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cshtyp.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx index a98c1e2d17..ae287f7954 100644 --- a/sw/inc/dbfld.hxx +++ b/sw/inc/dbfld.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbfld.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/dbgoutsw.hxx b/sw/inc/dbgoutsw.hxx index a4803e36a9..3a75a7e88d 100644 --- a/sw/inc/dbgoutsw.hxx +++ b/sw/inc/dbgoutsw.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbgoutsw.hxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index 7ad83d658c..594d1fefac 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbmgr.hxx,v $ - * $Revision: 1.37 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc index 0b87bb396c..98e1ecf8ec 100644 --- a/sw/inc/dbui.hrc +++ b/sw/inc/dbui.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbui.hrc,v $ - * $Revision: 1.8.66.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx index 0f5ca9b9b3..7e2203ac1a 100644 --- a/sw/inc/dcontact.hxx +++ b/sw/inc/dcontact.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dcontact.hxx,v $ - * $Revision: 1.26.210.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx index 95606216b1..52a9af6285 100644 --- a/sw/inc/ddefld.hxx +++ b/sw/inc/ddefld.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ddefld.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/dialog.hrc b/sw/inc/dialog.hrc index c252d18a8e..564b8da3b0 100644 --- a/sw/inc/dialog.hrc +++ b/sw/inc/dialog.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dialog.hrc,v $ - * $Revision: 1.7.240.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/dlelstnr.hxx b/sw/inc/dlelstnr.hxx index 93c4d1cd5b..de4afd7264 100644 --- a/sw/inc/dlelstnr.hxx +++ b/sw/inc/dlelstnr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dlelstnr.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/dobjfac.hxx b/sw/inc/dobjfac.hxx index d236fd6378..c7ad9cc411 100644 --- a/sw/inc/dobjfac.hxx +++ b/sw/inc/dobjfac.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dobjfac.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index c5c31bf721..4621285439 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: doc.hxx,v $ - * $Revision: 1.157 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx index bc237c4d3a..7db04d9bf2 100644 --- a/sw/inc/docary.hxx +++ b/sw/inc/docary.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docary.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/docfac.hxx b/sw/inc/docfac.hxx index c8181fcfb2..24ceabe42f 100644 --- a/sw/inc/docfac.hxx +++ b/sw/inc/docfac.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docfac.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/dochdl.hrc b/sw/inc/dochdl.hrc index adfbd810e6..b423351723 100644 --- a/sw/inc/dochdl.hrc +++ b/sw/inc/dochdl.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dochdl.hrc,v $ - * $Revision: 1.5.240.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index fb2c78a2e2..68511add6b 100755 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docsh.hxx,v $ - * $Revision: 1.48.72.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/docstat.hxx b/sw/inc/docstat.hxx index bc7f8111fd..dc4bbf240b 100644 --- a/sw/inc/docstat.hxx +++ b/sw/inc/docstat.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docstat.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx index fa2d2fc760..10fe239239 100644 --- a/sw/inc/docstyle.hxx +++ b/sw/inc/docstyle.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docstyle.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx index a6c7fa320a..4b3986243e 100644 --- a/sw/inc/docufld.hxx +++ b/sw/inc/docufld.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docufld.hxx,v $ - * $Revision: 1.17.82.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/dpage.hxx b/sw/inc/dpage.hxx index 021fab61b0..0f53829087 100644 --- a/sw/inc/dpage.hxx +++ b/sw/inc/dpage.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dpage.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/drawdoc.hxx b/sw/inc/drawdoc.hxx index 8041382628..cf2336e076 100644 --- a/sw/inc/drawdoc.hxx +++ b/sw/inc/drawdoc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drawdoc.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/edglbldc.hxx b/sw/inc/edglbldc.hxx index 9b4f22f24d..f79095f81c 100644 --- a/sw/inc/edglbldc.hxx +++ b/sw/inc/edglbldc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edglbldc.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/edimp.hxx b/sw/inc/edimp.hxx index 08e23418e4..25422e7285 100644 --- a/sw/inc/edimp.hxx +++ b/sw/inc/edimp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edimp.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 0a67b971fd..75085b8837 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: editsh.hxx,v $ - * $Revision: 1.70 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/envelp.hrc b/sw/inc/envelp.hrc index a115705dad..42a23e1ccd 100644 --- a/sw/inc/envelp.hrc +++ b/sw/inc/envelp.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: envelp.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/errhdl.hxx b/sw/inc/errhdl.hxx index 5ecc797ab5..8c2da3b237 100644 --- a/sw/inc/errhdl.hxx +++ b/sw/inc/errhdl.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: errhdl.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/error.h b/sw/inc/error.h index 9079c57192..b27d12e2c5 100644 --- a/sw/inc/error.h +++ b/sw/inc/error.h @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: error.h,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx index d9f51852b8..46fd26cf77 100644 --- a/sw/inc/expfld.hxx +++ b/sw/inc/expfld.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: expfld.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/extinput.hxx b/sw/inc/extinput.hxx index 818b8ce797..df8ebe1cb0 100644 --- a/sw/inc/extinput.hxx +++ b/sw/inc/extinput.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: extinput.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx index a21b642d24..73766c6e97 100644 --- a/sw/inc/fchrfmt.hxx +++ b/sw/inc/fchrfmt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fchrfmt.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 9673b41855..b7a2b0cb53 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fesh.hxx,v $ - * $Revision: 1.63.212.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index 6490164812..e7bea38aae 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldbas.hxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx index 600b32fa87..6bc30d8c2d 100644 --- a/sw/inc/flddat.hxx +++ b/sw/inc/flddat.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flddat.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx index 45d1a9b250..4a7bcf0d8a 100644 --- a/sw/inc/flddropdown.hxx +++ b/sw/inc/flddropdown.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flddropdown.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fldinit.hxx b/sw/inc/fldinit.hxx index 5d565d29ee..6357224e97 100644 --- a/sw/inc/fldinit.hxx +++ b/sw/inc/fldinit.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldinit.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fldui.hrc b/sw/inc/fldui.hrc index 5ac6a742b2..7ebaf11c14 100644 --- a/sw/inc/fldui.hrc +++ b/sw/inc/fldui.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldui.hrc,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fldupde.hxx b/sw/inc/fldupde.hxx index 9a7e2a07e2..473af2760e 100644 --- a/sw/inc/fldupde.hxx +++ b/sw/inc/fldupde.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldupde.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/flyenum.hxx b/sw/inc/flyenum.hxx index f3b0dc7e09..9601195710 100644 --- a/sw/inc/flyenum.hxx +++ b/sw/inc/flyenum.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flyenum.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/flypos.hxx b/sw/inc/flypos.hxx index 43ee823fa1..7140efa754 100644 --- a/sw/inc/flypos.hxx +++ b/sw/inc/flypos.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flypos.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx index d2f6d76c12..569a80e530 100644 --- a/sw/inc/fmtanchr.hxx +++ b/sw/inc/fmtanchr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtanchr.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtautofmt.hxx b/sw/inc/fmtautofmt.hxx index 590d770547..4e6bb26d41 100644 --- a/sw/inc/fmtautofmt.hxx +++ b/sw/inc/fmtautofmt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtautofmt.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtclbl.hxx b/sw/inc/fmtclbl.hxx index a3e8fa442e..4d4f65ed11 100644 --- a/sw/inc/fmtclbl.hxx +++ b/sw/inc/fmtclbl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtclbl.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtclds.hxx b/sw/inc/fmtclds.hxx index d70b241b60..b3da5b8c34 100644 --- a/sw/inc/fmtclds.hxx +++ b/sw/inc/fmtclds.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtclds.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtcnct.hxx b/sw/inc/fmtcnct.hxx index bb1e7aadc3..93e45c2879 100644 --- a/sw/inc/fmtcnct.hxx +++ b/sw/inc/fmtcnct.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtcnct.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtcntnt.hxx b/sw/inc/fmtcntnt.hxx index 0adec4eedd..bc49157993 100644 --- a/sw/inc/fmtcntnt.hxx +++ b/sw/inc/fmtcntnt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtcntnt.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx index b10707cd09..549af2040f 100644 --- a/sw/inc/fmtcol.hxx +++ b/sw/inc/fmtcol.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtcol.hxx,v $ - * $Revision: 1.13.144.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtcolfunc.hxx b/sw/inc/fmtcolfunc.hxx index 25d6008e65..e8fa27fe8f 100644 --- a/sw/inc/fmtcolfunc.hxx +++ b/sw/inc/fmtcolfunc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtcolfunc.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmteiro.hxx b/sw/inc/fmteiro.hxx index 6de1fc8603..6ecde946e3 100644 --- a/sw/inc/fmteiro.hxx +++ b/sw/inc/fmteiro.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmteiro.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtflcnt.hxx b/sw/inc/fmtflcnt.hxx index b4c21d7315..2edc85be46 100644 --- a/sw/inc/fmtflcnt.hxx +++ b/sw/inc/fmtflcnt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtflcnt.hxx,v $ - * $Revision: 1.6.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx index f311530079..cfcef25a0e 100644 --- a/sw/inc/fmtfld.hxx +++ b/sw/inc/fmtfld.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtfld.hxx,v $ - * $Revision: 1.9.118.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtfollowtextflow.hxx b/sw/inc/fmtfollowtextflow.hxx index 9738eb26d2..eab97abc4c 100644 --- a/sw/inc/fmtfollowtextflow.hxx +++ b/sw/inc/fmtfollowtextflow.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtfollowtextflow.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtfordr.hxx b/sw/inc/fmtfordr.hxx index 3d6353d140..2aa9987c98 100644 --- a/sw/inc/fmtfordr.hxx +++ b/sw/inc/fmtfordr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtfordr.hxx,v $ - * $Revision: 1.8.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx index e3b365ef00..e781191064 100644 --- a/sw/inc/fmtfsize.hxx +++ b/sw/inc/fmtfsize.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtfsize.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx index 0f903e375a..ab1a63663b 100644 --- a/sw/inc/fmtftn.hxx +++ b/sw/inc/fmtftn.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtftn.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx index 2648a3489f..dd55cfa7fe 100644 --- a/sw/inc/fmtftntx.hxx +++ b/sw/inc/fmtftntx.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtftntx.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx index 743200f92a..4bf5ba73c8 100644 --- a/sw/inc/fmthdft.hxx +++ b/sw/inc/fmthdft.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmthdft.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtinfmt.hxx b/sw/inc/fmtinfmt.hxx index 0031d03b0a..0a6d5fc996 100644 --- a/sw/inc/fmtinfmt.hxx +++ b/sw/inc/fmtinfmt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtinfmt.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtline.hxx b/sw/inc/fmtline.hxx index e38cd780b5..f9aa5a450a 100644 --- a/sw/inc/fmtline.hxx +++ b/sw/inc/fmtline.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtline.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtlsplt.hxx b/sw/inc/fmtlsplt.hxx index bd5cf11b1a..3bbd329b1f 100644 --- a/sw/inc/fmtlsplt.hxx +++ b/sw/inc/fmtlsplt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtlsplt.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx index 616c4cddc1..45a988f750 100755 --- a/sw/inc/fmtmeta.hxx +++ b/sw/inc/fmtmeta.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtmeta.hxx,v $ - * $Revision: 1.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx index f1bc3a3088..cce80a7acd 100644 --- a/sw/inc/fmtornt.hxx +++ b/sw/inc/fmtornt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtornt.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx index d0aaec8a2e..1577b3a5fe 100644 --- a/sw/inc/fmtpdsc.hxx +++ b/sw/inc/fmtpdsc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtpdsc.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtrfmrk.hxx b/sw/inc/fmtrfmrk.hxx index 3a163bc5d7..b98f6d4b7e 100644 --- a/sw/inc/fmtrfmrk.hxx +++ b/sw/inc/fmtrfmrk.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtrfmrk.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtrowsplt.hxx b/sw/inc/fmtrowsplt.hxx index 627663b8ec..02365d5828 100644 --- a/sw/inc/fmtrowsplt.hxx +++ b/sw/inc/fmtrowsplt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtrowsplt.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtruby.hxx b/sw/inc/fmtruby.hxx index 49bcdb8bad..7324f44c91 100644 --- a/sw/inc/fmtruby.hxx +++ b/sw/inc/fmtruby.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtruby.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtsrnd.hxx b/sw/inc/fmtsrnd.hxx index 643e4f6293..3f12c5c630 100644 --- a/sw/inc/fmtsrnd.hxx +++ b/sw/inc/fmtsrnd.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtsrnd.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtsrndenum.hxx b/sw/inc/fmtsrndenum.hxx index d1c9f05caf..d256e4a743 100644 --- a/sw/inc/fmtsrndenum.hxx +++ b/sw/inc/fmtsrndenum.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtsrndenum.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtui.hrc b/sw/inc/fmtui.hrc index ee1d0556b8..4b2e0c513b 100644 --- a/sw/inc/fmtui.hrc +++ b/sw/inc/fmtui.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtui.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmturl.hxx b/sw/inc/fmturl.hxx index be9c08fde3..f28f33f9bd 100644 --- a/sw/inc/fmturl.hxx +++ b/sw/inc/fmturl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmturl.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/fmtwrapinfluenceonobjpos.hxx b/sw/inc/fmtwrapinfluenceonobjpos.hxx index 072dab4a25..6616f92bd3 100644 --- a/sw/inc/fmtwrapinfluenceonobjpos.hxx +++ b/sw/inc/fmtwrapinfluenceonobjpos.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtwrapinfluenceonobjpos.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx index 9bb5b1e6b7..cdf9044845 100644 --- a/sw/inc/format.hxx +++ b/sw/inc/format.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: format.hxx,v $ - * $Revision: 1.32.140.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/frmatr.hxx b/sw/inc/frmatr.hxx index fc70f4b638..7837a96eea 100644 --- a/sw/inc/frmatr.hxx +++ b/sw/inc/frmatr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmatr.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx index 9b77c79991..2dcd4c865e 100644 --- a/sw/inc/frmfmt.hxx +++ b/sw/inc/frmfmt.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmfmt.hxx,v $ - * $Revision: 1.15.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/ftnidx.hxx b/sw/inc/ftnidx.hxx index e4e119439f..b39303e7bb 100644 --- a/sw/inc/ftnidx.hxx +++ b/sw/inc/ftnidx.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ftnidx.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx index ec66693082..e8cfcf3535 100644 --- a/sw/inc/ftninfo.hxx +++ b/sw/inc/ftninfo.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ftninfo.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc index 452b563d60..39b7b7f61b 100644 --- a/sw/inc/globals.hrc +++ b/sw/inc/globals.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: globals.hrc,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/globdoc.hxx b/sw/inc/globdoc.hxx index 9357e215aa..126ed23fef 100644 --- a/sw/inc/globdoc.hxx +++ b/sw/inc/globdoc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: globdoc.hxx,v $ - * $Revision: 1.8.146.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx index f329184436..943e4ef372 100644 --- a/sw/inc/grfatr.hxx +++ b/sw/inc/grfatr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: grfatr.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h index f471ed217b..0ff576a0cc 100644 --- a/sw/inc/helpid.h +++ b/sw/inc/helpid.h @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: helpid.h,v $ - * $Revision: 1.32 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/hfspacingitem.hxx b/sw/inc/hfspacingitem.hxx index 269834eaf4..10d99533a0 100644 --- a/sw/inc/hfspacingitem.hxx +++ b/sw/inc/hfspacingitem.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: hfspacingitem.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx index 6f10de127d..78d69fcd37 100644 --- a/sw/inc/hhcwrp.hxx +++ b/sw/inc/hhcwrp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: hhcwrp.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx index f3dcb30d01..8bfbe25919 100644 --- a/sw/inc/hintids.hxx +++ b/sw/inc/hintids.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: hintids.hxx,v $ - * $Revision: 1.36.136.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx index 615ba6dec3..e1d0c14250 100644 --- a/sw/inc/hints.hxx +++ b/sw/inc/hints.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: hints.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx index 8192d81cb8..0ebcfdb75d 100644 --- a/sw/inc/htmltbl.hxx +++ b/sw/inc/htmltbl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmltbl.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/index.hrc b/sw/inc/index.hrc index 81172aa525..235277402a 100644 --- a/sw/inc/index.hrc +++ b/sw/inc/index.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: index.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx index d6b15660f0..bf09e85b76 100644 --- a/sw/inc/index.hxx +++ b/sw/inc/index.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: index.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/inetfld.hxx b/sw/inc/inetfld.hxx index aa0534fe8a..cca9ce5466 100644 --- a/sw/inc/inetfld.hxx +++ b/sw/inc/inetfld.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: inetfld.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/init.hxx b/sw/inc/init.hxx index c71e930605..1403c3e764 100644 --- a/sw/inc/init.hxx +++ b/sw/inc/init.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: init.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/io.hxx b/sw/inc/io.hxx index 4536c3acd3..731d2e61fd 100644 --- a/sw/inc/io.hxx +++ b/sw/inc/io.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: io.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx index 784a583ed9..9f79a4ddf2 100644 --- a/sw/inc/iodetect.hxx +++ b/sw/inc/iodetect.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: iodetect.cxx,v $ - * $Revision: 1.31 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/istyleaccess.hxx b/sw/inc/istyleaccess.hxx index dffced6c25..357054beda 100644 --- a/sw/inc/istyleaccess.hxx +++ b/sw/inc/istyleaccess.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: istyleaccess.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/itabenum.hxx b/sw/inc/itabenum.hxx index 19593501ab..fd342b2cb3 100644 --- a/sw/inc/itabenum.hxx +++ b/sw/inc/itabenum.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: itabenum.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx index 1e1fe9c97a..2e314d130a 100644 --- a/sw/inc/lineinfo.hxx +++ b/sw/inc/lineinfo.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: lineinfo.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/linkenum.hxx b/sw/inc/linkenum.hxx index e86c8a8d3f..98c0734816 100644 --- a/sw/inc/linkenum.hxx +++ b/sw/inc/linkenum.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: linkenum.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/list.hxx b/sw/inc/list.hxx index c301773582..35e1e1626a 100644 --- a/sw/inc/list.hxx +++ b/sw/inc/list.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: list.hxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/listfunc.hxx b/sw/inc/listfunc.hxx index b867e87ebe..3937f11877 100644 --- a/sw/inc/listfunc.hxx +++ b/sw/inc/listfunc.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: listfunc.hxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/makefile.mk b/sw/inc/makefile.mk index 16adca8192..b5efd14c81 100644 --- a/sw/inc/makefile.mk +++ b/sw/inc/makefile.mk @@ -1,15 +1,11 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx index 29c1e3467c..cdfc4b564c 100644 --- a/sw/inc/mdiexp.hxx +++ b/sw/inc/mdiexp.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mdiexp.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx index f46de58ff6..0dd9594a75 100644 --- a/sw/inc/modcfg.hxx +++ b/sw/inc/modcfg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: modcfg.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/modeltoviewhelper.hxx b/sw/inc/modeltoviewhelper.hxx index edc27ed167..b911e1f5d4 100644 --- a/sw/inc/modeltoviewhelper.hxx +++ b/sw/inc/modeltoviewhelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: modeltoviewhelper.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx index 7edfad173a..bfe1dfcd7f 100644 --- a/sw/inc/ndarr.hxx +++ b/sw/inc/ndarr.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndarr.hxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx index fcef33fdba..54423e7089 100644 --- a/sw/inc/ndgrf.hxx +++ b/sw/inc/ndgrf.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndgrf.hxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx index 67cb843675..6369b39ca8 100644 --- a/sw/inc/ndhints.hxx +++ b/sw/inc/ndhints.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndhints.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/ndindex.hxx b/sw/inc/ndindex.hxx index 6326b490b6..efb518c145 100644 --- a/sw/inc/ndindex.hxx +++ b/sw/inc/ndindex.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndindex.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx index 4097627f91..aa58a32e4c 100644 --- a/sw/inc/ndnotxt.hxx +++ b/sw/inc/ndnotxt.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndnotxt.hxx,v $ - * $Revision: 1.10.212.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx index f05a2784b1..798603d95e 100644 --- a/sw/inc/ndole.hxx +++ b/sw/inc/ndole.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndole.hxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 635052103e..aef62c8cc9 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndtxt.hxx,v $ - * $Revision: 1.61 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/ndtyp.hxx b/sw/inc/ndtyp.hxx index 0bd01f28d5..cebf250d8a 100644 --- a/sw/inc/ndtyp.hxx +++ b/sw/inc/ndtyp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndtyp.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/newhdl.hxx b/sw/inc/newhdl.hxx index 2535da89e1..9d7efb2b42 100644 --- a/sw/inc/newhdl.hxx +++ b/sw/inc/newhdl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: newhdl.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index 42d9fecd74..629145fa68 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: node.hxx,v $ - * $Revision: 1.22.144.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx index 1035cb9fe5..a442e3548f 100644 --- a/sw/inc/numrule.hxx +++ b/sw/inc/numrule.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: numrule.hxx,v $ - * $Revision: 1.39.78.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index 3c734f4d5a..3ebdb9a948 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pagedesc.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/pageiter.hxx b/sw/inc/pageiter.hxx index 79b7ee90b8..44a0a23157 100644 --- a/sw/inc/pageiter.hxx +++ b/sw/inc/pageiter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pageiter.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index 2041e91d10..2d206e36b0 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pam.hxx,v $ - * $Revision: 1.19.172.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx index cdc2a16b85..f6dcfaa891 100644 --- a/sw/inc/paratr.hxx +++ b/sw/inc/paratr.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: paratr.hxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/pausethreadstarting.hxx b/sw/inc/pausethreadstarting.hxx index fd96d68288..2addc37698 100644 --- a/sw/inc/pausethreadstarting.hxx +++ b/sw/inc/pausethreadstarting.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pausethreadstarting.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/pch/precompiled_sw.cxx b/sw/inc/pch/precompiled_sw.cxx index 05b4de10c2..5079f66171 100644 --- a/sw/inc/pch/precompiled_sw.cxx +++ b/sw/inc/pch/precompiled_sw.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: precompiled_sw.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index e8aadd472a..c632f30c23 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: precompiled_sw.hxx,v $ - * $Revision: 1.5.222.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/poolfmt.hrc b/sw/inc/poolfmt.hrc index 226e409251..c73baa70ec 100644 --- a/sw/inc/poolfmt.hrc +++ b/sw/inc/poolfmt.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: poolfmt.hrc,v $ - * $Revision: 1.7.224.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/poolfmt.hxx b/sw/inc/poolfmt.hxx index c6244468da..d75c3146c4 100644 --- a/sw/inc/poolfmt.hxx +++ b/sw/inc/poolfmt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: poolfmt.hxx,v $ - * $Revision: 1.7.224.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/postit.hxx b/sw/inc/postit.hxx index ddc75cc6e6..20f0808793 100644 --- a/sw/inc/postit.hxx +++ b/sw/inc/postit.hxx @@ -1,15 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: postit.hxx,v $ - * - * $Revision: 1.8.84.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index 5ff4bbbab4..7ef25ede3c 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: postithelper.hxx,v $ - * $Revision: 1.2.118.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx index 3c77e72639..9ad0d46732 100755 --- a/sw/inc/printdata.hxx +++ b/sw/inc/printdata.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: printdata.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/pvprtdat.hxx b/sw/inc/pvprtdat.hxx index ccad659b1e..1c5831d746 100644 --- a/sw/inc/pvprtdat.hxx +++ b/sw/inc/pvprtdat.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pvprtdat.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/rcid.hrc b/sw/inc/rcid.hrc index a4613da4c6..c5f7d7d6d0 100644 --- a/sw/inc/rcid.hrc +++ b/sw/inc/rcid.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rcid.hrc,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx index 9840c23f66..d93757c609 100644 --- a/sw/inc/redline.hxx +++ b/sw/inc/redline.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: redline.hxx,v $ - * $Revision: 1.14.180.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/redlnaut.hxx b/sw/inc/redlnaut.hxx index fb112562ff..fcdbbca5e7 100644 --- a/sw/inc/redlnaut.hxx +++ b/sw/inc/redlnaut.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: redlnaut.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx index 4c7ea6e7e4..581933917e 100644 --- a/sw/inc/reffld.hxx +++ b/sw/inc/reffld.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: reffld.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx index 86b002b6ef..9037550a68 100644 --- a/sw/inc/ring.hxx +++ b/sw/inc/ring.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ring.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/rolbck.hxx b/sw/inc/rolbck.hxx index c8f8561138..05fa3f20bf 100644 --- a/sw/inc/rolbck.hxx +++ b/sw/inc/rolbck.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rolbck.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/rubylist.hxx b/sw/inc/rubylist.hxx index cbd023286e..2ef54c3bdb 100644 --- a/sw/inc/rubylist.hxx +++ b/sw/inc/rubylist.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rubylist.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index 9c290e55b1..6d0622228b 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: section.hxx,v $ - * $Revision: 1.13.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/shellid.hxx b/sw/inc/shellid.hxx index df82192175..65af84827e 100644 --- a/sw/inc/shellid.hxx +++ b/sw/inc/shellid.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: shellid.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index 375036631a..a31daa325a 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: shellio.hxx,v $ - * $Revision: 1.39 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/shellres.hxx b/sw/inc/shellres.hxx index 4080e32418..65412940bc 100644 --- a/sw/inc/shellres.hxx +++ b/sw/inc/shellres.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: shellres.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/sortopt.hxx b/sw/inc/sortopt.hxx index 245f8ea94a..89d1f9a5a7 100644 --- a/sw/inc/sortopt.hxx +++ b/sw/inc/sortopt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sortopt.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx index a91a3686bc..fea153b69c 100644 --- a/sw/inc/splargs.hxx +++ b/sw/inc/splargs.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: splargs.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/statstr.hrc b/sw/inc/statstr.hrc index 705b3ca004..84e58fa582 100644 --- a/sw/inc/statstr.hrc +++ b/sw/inc/statstr.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: statstr.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/stringhash.hxx b/sw/inc/stringhash.hxx index e034f5458b..7be9eba8d5 100644 --- a/sw/inc/stringhash.hxx +++ b/sw/inc/stringhash.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: stringhash.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/sw.mk b/sw/inc/sw.mk index e827ec1560..c14f5abc83 100644 --- a/sw/inc/sw.mk +++ b/sw/inc/sw.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: sw.mk,v $ -# -# $Revision: 1.15 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/sw_primitivetypes2d.hxx b/sw/inc/sw_primitivetypes2d.hxx index 44541fc91e..3d1ef30711 100644 --- a/sw/inc/sw_primitivetypes2d.hxx +++ b/sw/inc/sw_primitivetypes2d.hxx @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sd_primitivetypes2d.hxx,v $ - * - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 65456e9597..0cd441e5d2 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swabstdlg.hxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swacorr.hxx b/sw/inc/swacorr.hxx index e6e20b3fb6..732d587391 100644 --- a/sw/inc/swacorr.hxx +++ b/sw/inc/swacorr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swacorr.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx index 35f18717db..dabbd69049 100644 --- a/sw/inc/swatrset.hxx +++ b/sw/inc/swatrset.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swatrset.hxx,v $ - * $Revision: 1.27.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swbaslnk.hxx b/sw/inc/swbaslnk.hxx index af0c2eb115..3c6f728d37 100644 --- a/sw/inc/swbaslnk.hxx +++ b/sw/inc/swbaslnk.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swbaslnk.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swcalwrp.hxx b/sw/inc/swcalwrp.hxx index 8935008998..6a0bc65dab 100644 --- a/sw/inc/swcalwrp.hxx +++ b/sw/inc/swcalwrp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swcalwrp.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swcli.hxx b/sw/inc/swcli.hxx index 52ebbab1ab..de9a6ea61c 100644 --- a/sw/inc/swcli.hxx +++ b/sw/inc/swcli.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swcli.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index 40d605b57c..a21d6cbf59 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swcrsr.hxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swdbdata.hxx b/sw/inc/swdbdata.hxx index 3c74f1bc62..06de673fec 100644 --- a/sw/inc/swdbdata.hxx +++ b/sw/inc/swdbdata.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swdbdata.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swdbtoolsclient.hxx b/sw/inc/swdbtoolsclient.hxx index be6ef96200..3fdf045862 100644 --- a/sw/inc/swdbtoolsclient.hxx +++ b/sw/inc/swdbtoolsclient.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swdbtoolsclient.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swddetbl.hxx b/sw/inc/swddetbl.hxx index 0eb8d6442b..ca1d42074b 100644 --- a/sw/inc/swddetbl.hxx +++ b/sw/inc/swddetbl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swddetbl.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swdll.hxx b/sw/inc/swdll.hxx index 2178c31b57..4f0e515111 100644 --- a/sw/inc/swdll.hxx +++ b/sw/inc/swdll.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swdll.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swerror.h b/sw/inc/swerror.h index 2224ff0a66..78184a37c0 100644 --- a/sw/inc/swerror.h +++ b/sw/inc/swerror.h @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swerror.h,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx index ad6bee69dd..f0c0465be1 100644 --- a/sw/inc/swevent.hxx +++ b/sw/inc/swevent.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swevent.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swfltopt.hxx b/sw/inc/swfltopt.hxx index be51b02bc8..34c31cdca5 100644 --- a/sw/inc/swfltopt.hxx +++ b/sw/inc/swfltopt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swfltopt.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swgstr.hxx b/sw/inc/swgstr.hxx index 8c16f5a26d..45801bf35d 100644 --- a/sw/inc/swgstr.hxx +++ b/sw/inc/swgstr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swgstr.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swhints.hxx b/sw/inc/swhints.hxx index 1b7fd9b27a..450fabc912 100644 --- a/sw/inc/swhints.hxx +++ b/sw/inc/swhints.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swhints.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx index d8de7b5c50..24e7fa0fc8 100644 --- a/sw/inc/swmodule.hxx +++ b/sw/inc/swmodule.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swmodule.hxx,v $ - * $Revision: 1.34 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swpre.mk b/sw/inc/swpre.mk index 1e974475f8..b19440a01a 100644 --- a/sw/inc/swpre.mk +++ b/sw/inc/swpre.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: swpre.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swprtopt.hxx b/sw/inc/swprtopt.hxx index b45856591d..b2c83b8ab1 100644 --- a/sw/inc/swprtopt.hxx +++ b/sw/inc/swprtopt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swprtopt.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx index dd191916f8..39ef9c5287 100644 --- a/sw/inc/swrect.hxx +++ b/sw/inc/swrect.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swrect.hxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swregion.hxx b/sw/inc/swregion.hxx index 1dd2c5aa70..0719b799c6 100644 --- a/sw/inc/swregion.hxx +++ b/sw/inc/swregion.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swregion.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swserv.hxx b/sw/inc/swserv.hxx index 4ec227692a..439d20d4f7 100644 --- a/sw/inc/swserv.hxx +++ b/sw/inc/swserv.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swserv.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swstyle.h b/sw/inc/swstyle.h index 854ffee2ea..f44560f8a7 100644 --- a/sw/inc/swstyle.h +++ b/sw/inc/swstyle.h @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swstyle.h,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index e506bbe0fe..86f8e31d99 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swtable.hxx,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx index f1d3a1e075..e94ba5c5e8 100644 --- a/sw/inc/swtblfmt.hxx +++ b/sw/inc/swtblfmt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swtblfmt.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx index 70bebb09fe..c43ef74c7b 100644 --- a/sw/inc/swtypes.hxx +++ b/sw/inc/swtypes.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swtypes.hxx,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx index 6e98953205..c6016d5ce3 100644 --- a/sw/inc/swundo.hxx +++ b/sw/inc/swundo.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swundo.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swunodef.hxx b/sw/inc/swunodef.hxx index b43b382f54..97b8ec13e8 100644 --- a/sw/inc/swunodef.hxx +++ b/sw/inc/swunodef.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swunodef.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swunohelper.hxx b/sw/inc/swunohelper.hxx index f55d181df5..a3a62fd466 100644 --- a/sw/inc/swunohelper.hxx +++ b/sw/inc/swunohelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swunohelper.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swurl.hxx b/sw/inc/swurl.hxx index 5f0508a22a..4d0fc2f68f 100644 --- a/sw/inc/swurl.hxx +++ b/sw/inc/swurl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swurl.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/swwait.hxx b/sw/inc/swwait.hxx index 4a3d40468b..2318c46799 100644 --- a/sw/inc/swwait.hxx +++ b/sw/inc/swwait.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swwait.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/tabcol.hxx b/sw/inc/tabcol.hxx index 55f474e810..7cc930048f 100644 --- a/sw/inc/tabcol.hxx +++ b/sw/inc/tabcol.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tabcol.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx index ececf6e0c4..f1bf29e673 100644 --- a/sw/inc/tblafmt.hxx +++ b/sw/inc/tblafmt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tblafmt.hxx,v $ - * $Revision: 1.9.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/tblenum.hxx b/sw/inc/tblenum.hxx index 86d1f8b117..6e3796e11a 100644 --- a/sw/inc/tblenum.hxx +++ b/sw/inc/tblenum.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tblenum.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx index 71b32a77a9..fbf0ce32c0 100644 --- a/sw/inc/tblsel.hxx +++ b/sw/inc/tblsel.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tblsel.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/tgrditem.hxx b/sw/inc/tgrditem.hxx index b5995249cf..3b8240c660 100644 --- a/sw/inc/tgrditem.hxx +++ b/sw/inc/tgrditem.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tgrditem.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx index 88ab5c3010..eed086a4e8 100644 --- a/sw/inc/tox.hxx +++ b/sw/inc/tox.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tox.hxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/toxe.hxx b/sw/inc/toxe.hxx index 4ce53ba17c..82e76211ec 100644 --- a/sw/inc/toxe.hxx +++ b/sw/inc/toxe.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: toxe.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/toxinit.hxx b/sw/inc/toxinit.hxx index 1e148bcc9b..1479c5cfff 100644 --- a/sw/inc/toxinit.hxx +++ b/sw/inc/toxinit.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: toxinit.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/toxwrap.hxx b/sw/inc/toxwrap.hxx index 859954f50d..3503c96159 100644 --- a/sw/inc/toxwrap.hxx +++ b/sw/inc/toxwrap.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: toxwrap.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx index 01014b424b..23a75dd3e5 100644 --- a/sw/inc/txatbase.hxx +++ b/sw/inc/txatbase.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txatbase.hxx,v $ - * $Revision: 1.22.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx index 1c78f134c6..ad143d11f0 100644 --- a/sw/inc/txatritr.hxx +++ b/sw/inc/txatritr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txatritr.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx index e8163914eb..f9cb755e44 100644 --- a/sw/inc/txtatr.hxx +++ b/sw/inc/txtatr.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtatr.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/txtflcnt.hxx b/sw/inc/txtflcnt.hxx index 6ea16ab1b8..93fc2b89ca 100644 --- a/sw/inc/txtflcnt.hxx +++ b/sw/inc/txtflcnt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtflcnt.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx index ec4d399b02..f9918e2c90 100644 --- a/sw/inc/txtfld.hxx +++ b/sw/inc/txtfld.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtfld.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx index 4b247b561a..e7fee60630 100644 --- a/sw/inc/txtftn.hxx +++ b/sw/inc/txtftn.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtftn.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/txtinet.hxx b/sw/inc/txtinet.hxx index c3597d5b2b..177247befe 100644 --- a/sw/inc/txtinet.hxx +++ b/sw/inc/txtinet.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtinet.hxx,v $ - * $Revision: 1.7.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/txtrfmrk.hxx b/sw/inc/txtrfmrk.hxx index 7260e19fb4..7ed27800f0 100644 --- a/sw/inc/txtrfmrk.hxx +++ b/sw/inc/txtrfmrk.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtrfmrk.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/txttxmrk.hxx b/sw/inc/txttxmrk.hxx index 908dd71222..29eb7452f1 100644 --- a/sw/inc/txttxmrk.hxx +++ b/sw/inc/txttxmrk.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txttxmrk.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index 9c5f337460..c3b04e2e1b 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: undobj.hxx,v $ - * $Revision: 1.44 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unoatxt.hxx b/sw/inc/unoatxt.hxx index d9194cebd5..7c72070c54 100644 --- a/sw/inc/unoatxt.hxx +++ b/sw/inc/unoatxt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoatxt.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unobaseclass.hxx b/sw/inc/unobaseclass.hxx index 5c04700776..b4ab709f29 100644 --- a/sw/inc/unobaseclass.hxx +++ b/sw/inc/unobaseclass.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unobaseclass.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unobookmark.hxx b/sw/inc/unobookmark.hxx index 46d0054551..b53c0c8c98 100644 --- a/sw/inc/unobookmark.hxx +++ b/sw/inc/unobookmark.hxx @@ -1,15 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoobj.hxx,v $ - * - * $Revision: 1.49 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx index a251851c31..f3b39129f8 100644 --- a/sw/inc/unochart.hxx +++ b/sw/inc/unochart.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unochart.hxx,v $ - * $Revision: 1.6.256.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx index 8a90e6541a..bf6ba2852c 100644 --- a/sw/inc/unocoll.hxx +++ b/sw/inc/unocoll.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unocoll.hxx,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unocore.hrc b/sw/inc/unocore.hrc index 94c3a4cb87..67ef961aa3 100644 --- a/sw/inc/unocore.hrc +++ b/sw/inc/unocore.hrc @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unocore.hrc,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx index eb263fb7fc..dd2b2d1dc9 100644 --- a/sw/inc/unocrsr.hxx +++ b/sw/inc/unocrsr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unocrsr.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx index 2a25fb24ac..5af5df2e51 100644 --- a/sw/inc/unocrsrhelper.hxx +++ b/sw/inc/unocrsrhelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unocrsrhelper.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx index 3112d11a81..1e1f1ee329 100644 --- a/sw/inc/unodraw.hxx +++ b/sw/inc/unodraw.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unodraw.hxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unoevent.hxx b/sw/inc/unoevent.hxx index 912197d6ac..b65432457d 100644 --- a/sw/inc/unoevent.hxx +++ b/sw/inc/unoevent.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoevent.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unoevtlstnr.hxx b/sw/inc/unoevtlstnr.hxx index c19197e13a..bb8cca5bc0 100644 --- a/sw/inc/unoevtlstnr.hxx +++ b/sw/inc/unoevtlstnr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoevtlstnr.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unofield.hxx b/sw/inc/unofield.hxx index db14db8957..ef29b1a058 100644 --- a/sw/inc/unofield.hxx +++ b/sw/inc/unofield.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unofield.hxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unoflatpara.hxx b/sw/inc/unoflatpara.hxx index 48234363f0..70cbf8b334 100644 --- a/sw/inc/unoflatpara.hxx +++ b/sw/inc/unoflatpara.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoflatpara.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unofootnote.hxx b/sw/inc/unofootnote.hxx index 8d9a65d963..c538ea9fa8 100644 --- a/sw/inc/unofootnote.hxx +++ b/sw/inc/unofootnote.hxx @@ -1,15 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoobj.hxx,v $ - * - * $Revision: 1.49 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx index 1d7b17cf22..000703870c 100644 --- a/sw/inc/unoframe.hxx +++ b/sw/inc/unoframe.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoframe.hxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unoidx.hxx b/sw/inc/unoidx.hxx index d262e1784a..a4feb762f5 100644 --- a/sw/inc/unoidx.hxx +++ b/sw/inc/unoidx.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoidx.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unomailmerge.hxx b/sw/inc/unomailmerge.hxx index 67f6429e95..47dc5000f1 100644 --- a/sw/inc/unomailmerge.hxx +++ b/sw/inc/unomailmerge.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unomailmerge.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx index 2ca6e80b6d..114b9e9438 100644 --- a/sw/inc/unomap.hxx +++ b/sw/inc/unomap.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unomap.hxx,v $ - * $Revision: 1.63 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unomid.h b/sw/inc/unomid.h index 60a78985c4..3330337814 100644 --- a/sw/inc/unomid.h +++ b/sw/inc/unomid.h @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unomid.h,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unomod.hxx b/sw/inc/unomod.hxx index 088bb1b1b4..3e7a778f82 100644 --- a/sw/inc/unomod.hxx +++ b/sw/inc/unomod.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unomod.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unoparaframeenum.hxx b/sw/inc/unoparaframeenum.hxx index 7e5b43f1e6..af94521fe5 100644 --- a/sw/inc/unoparaframeenum.hxx +++ b/sw/inc/unoparaframeenum.hxx @@ -1,15 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoobj.hxx,v $ - * - * $Revision: 1.49 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx index 8743737c33..af7115e35d 100644 --- a/sw/inc/unoparagraph.hxx +++ b/sw/inc/unoparagraph.hxx @@ -1,15 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoobj.hxx,v $ - * - * $Revision: 1.49 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unoport.hxx b/sw/inc/unoport.hxx index 70accec12f..aa04b0de4b 100644 --- a/sw/inc/unoport.hxx +++ b/sw/inc/unoport.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoport.hxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx index 14338d4540..85e1c9728b 100644 --- a/sw/inc/unoprnms.hxx +++ b/sw/inc/unoprnms.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoprnms.hxx,v $ - * $Revision: 1.129.100.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unoredline.hxx b/sw/inc/unoredline.hxx index a2449c6f0a..71f7526156 100644 --- a/sw/inc/unoredline.hxx +++ b/sw/inc/unoredline.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoredline.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unoredlines.hxx b/sw/inc/unoredlines.hxx index f87ac44188..d4080bc2c3 100644 --- a/sw/inc/unoredlines.hxx +++ b/sw/inc/unoredlines.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoredlines.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unorefmark.hxx b/sw/inc/unorefmark.hxx index 61b6d09df0..4a61f4119a 100644 --- a/sw/inc/unorefmark.hxx +++ b/sw/inc/unorefmark.hxx @@ -1,15 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoobj.hxx,v $ - * - * $Revision: 1.49 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unosection.hxx b/sw/inc/unosection.hxx index 6f3eb1794c..849aafdf6b 100644 --- a/sw/inc/unosection.hxx +++ b/sw/inc/unosection.hxx @@ -1,15 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoobj.hxx,v $ - * - * $Revision: 1.49 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx index 423d9639e2..8f5c836717 100644 --- a/sw/inc/unosett.hxx +++ b/sw/inc/unosett.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unosett.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unosrch.hxx b/sw/inc/unosrch.hxx index 29d7333ccc..763f40ca08 100644 --- a/sw/inc/unosrch.hxx +++ b/sw/inc/unosrch.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unosrch.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx index f2f48add60..96c29ad063 100644 --- a/sw/inc/unostyle.hxx +++ b/sw/inc/unostyle.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unostyle.hxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index 7b2272b090..ab6f6c60d7 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unotbl.hxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unotext.hxx b/sw/inc/unotext.hxx index 3c805da512..ff95bf6420 100644 --- a/sw/inc/unotext.hxx +++ b/sw/inc/unotext.hxx @@ -1,15 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoobj.hxx,v $ - * - * $Revision: 1.49 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unotextbodyhf.hxx b/sw/inc/unotextbodyhf.hxx index 8fd4e8c2a4..7d0df1974f 100644 --- a/sw/inc/unotextbodyhf.hxx +++ b/sw/inc/unotextbodyhf.hxx @@ -1,15 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoobj.hxx,v $ - * - * $Revision: 1.49 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx index e976af91e1..05c9aeb9eb 100644 --- a/sw/inc/unotextcursor.hxx +++ b/sw/inc/unotextcursor.hxx @@ -1,15 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoobj.hxx,v $ - * - * $Revision: 1.49 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unotextmarkup.hxx b/sw/inc/unotextmarkup.hxx index ef416b3bd2..33c497e79e 100644 --- a/sw/inc/unotextmarkup.hxx +++ b/sw/inc/unotextmarkup.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unotextmarkup.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx index 164b35b703..5a99c386be 100644 --- a/sw/inc/unotextrange.hxx +++ b/sw/inc/unotextrange.hxx @@ -1,15 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoobj.hxx,v $ - * - * $Revision: 1.49 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index e12eb89cfa..bed66aa207 100755 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unotxdoc.hxx,v $ - * $Revision: 1.29 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx index e2695c40c5..0af250bf61 100644 --- a/sw/inc/usrfld.hxx +++ b/sw/inc/usrfld.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: usrfld.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx index e7e3baa02c..823e81f1ae 100755 --- a/sw/inc/viewopt.hxx +++ b/sw/inc/viewopt.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewopt.hxx,v $ - * $Revision: 1.31 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index 74a32626cc..c2ca76b45b 100755 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewsh.hxx,v $ - * $Revision: 1.65.40.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx index 7988aaf209..90165b6025 100644 --- a/sw/inc/viscrs.hxx +++ b/sw/inc/viscrs.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viscrs.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/warnpassword.hxx b/sw/inc/warnpassword.hxx index 45b8cc0d85..2b541a14d6 100644 --- a/sw/inc/warnpassword.hxx +++ b/sw/inc/warnpassword.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: warnpassword.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/inc/wdocsh.hxx b/sw/inc/wdocsh.hxx index 6d70b3e36b..36f3ff1a22 100644 --- a/sw/inc/wdocsh.hxx +++ b/sw/inc/wdocsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wdocsh.hxx,v $ - * $Revision: 1.12.146.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/complex/accessibility/AccessibleRelationSet.java b/sw/qa/complex/accessibility/AccessibleRelationSet.java index 17e7a635bb..eb9b4fe31b 100644 --- a/sw/qa/complex/accessibility/AccessibleRelationSet.java +++ b/sw/qa/complex/accessibility/AccessibleRelationSet.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: AccessibleRelationSet.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/complex/accessibility/makefile.mk b/sw/qa/complex/accessibility/makefile.mk index 696a72d545..e4096829bb 100644 --- a/sw/qa/complex/accessibility/makefile.mk +++ b/sw/qa/complex/accessibility/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.5.198.1 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/complex/checkColor/makefile.mk b/sw/qa/complex/checkColor/makefile.mk index d9f7060a83..3048fb8fff 100755 --- a/sw/qa/complex/checkColor/makefile.mk +++ b/sw/qa/complex/checkColor/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4.198.1 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/complex/indeterminateState/CheckIndeterminateState.java b/sw/qa/complex/indeterminateState/CheckIndeterminateState.java index 2a87634123..c7c35e30bd 100755 --- a/sw/qa/complex/indeterminateState/CheckIndeterminateState.java +++ b/sw/qa/complex/indeterminateState/CheckIndeterminateState.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CheckIndeterminateState.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/complex/indeterminateState/makefile.mk b/sw/qa/complex/indeterminateState/makefile.mk index 731822e032..8850da116f 100755 --- a/sw/qa/complex/indeterminateState/makefile.mk +++ b/sw/qa/complex/indeterminateState/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4.198.1 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/complex/writer/CheckBookmarks.java b/sw/qa/complex/writer/CheckBookmarks.java index c8f4a03554..d50916f51a 100644 --- a/sw/qa/complex/writer/CheckBookmarks.java +++ b/sw/qa/complex/writer/CheckBookmarks.java @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: $ - * $Revision: $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/complex/writer/CheckFlies.java b/sw/qa/complex/writer/CheckFlies.java index a54b02a3b5..89a85b8e1c 100644 --- a/sw/qa/complex/writer/CheckFlies.java +++ b/sw/qa/complex/writer/CheckFlies.java @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: $ - * $Revision: $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/complex/writer/CheckIndexedPropertyValues.java b/sw/qa/complex/writer/CheckIndexedPropertyValues.java index 870fbebcdd..0f6f6a25f7 100755 --- a/sw/qa/complex/writer/CheckIndexedPropertyValues.java +++ b/sw/qa/complex/writer/CheckIndexedPropertyValues.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CheckIndexedPropertyValues.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/complex/writer/CheckNamedPropertyValues.java b/sw/qa/complex/writer/CheckNamedPropertyValues.java index c42fc0969c..7eefc334bb 100755 --- a/sw/qa/complex/writer/CheckNamedPropertyValues.java +++ b/sw/qa/complex/writer/CheckNamedPropertyValues.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CheckNamedPropertyValues.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java index 8110c82a6e..d96de76a82 100755 --- a/sw/qa/complex/writer/TextPortionEnumerationTest.java +++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: $ - * $Revision: $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/complex/writer/makefile.mk b/sw/qa/complex/writer/makefile.mk index 9aa7e95c9a..ae2a15f821 100755 --- a/sw/qa/complex/writer/makefile.mk +++ b/sw/qa/complex/writer/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.5.198.1 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/core/Test-BigPtrArray.cxx b/sw/qa/core/Test-BigPtrArray.cxx index 965f71224c..30e78f6f98 100644 --- a/sw/qa/core/Test-BigPtrArray.cxx +++ b/sw/qa/core/Test-BigPtrArray.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Test-BigPtrArray.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/core/bigpointerarray-new.cxx b/sw/qa/core/bigpointerarray-new.cxx index f687ab9ff3..a920a46b10 100644 --- a/sw/qa/core/bigpointerarray-new.cxx +++ b/sw/qa/core/bigpointerarray-new.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: bigpointerarray-new.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/core/bigpointerarray-new.hxx b/sw/qa/core/bigpointerarray-new.hxx index 51a769beb2..22574e0f7f 100644 --- a/sw/qa/core/bigpointerarray-new.hxx +++ b/sw/qa/core/bigpointerarray-new.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: bigpointerarray-new.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/core/export.map b/sw/qa/core/export.map index 916aec8fc0..e9b19ca5b5 100644 --- a/sw/qa/core/export.map +++ b/sw/qa/core/export.map @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: export.map,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/core/makefile.mk b/sw/qa/core/makefile.mk index 3982536b28..02e69f45da 100644 --- a/sw/qa/core/makefile.mk +++ b/sw/qa/core/makefile.mk @@ -1,15 +1,11 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/qa/unoapi/makefile.mk b/sw/qa/unoapi/makefile.mk index 7e01e4819d..777c108c9e 100644 --- a/sw/qa/unoapi/makefile.mk +++ b/sw/qa/unoapi/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.7 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/_annotsh.sdi b/sw/sdi/_annotsh.sdi index d98339ee40..8b4fc8a502 100755 --- a/sw/sdi/_annotsh.sdi +++ b/sw/sdi/_annotsh.sdi @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: _annotsh.sdi,v $ - * $Revision: 1.6.82.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/_basesh.sdi b/sw/sdi/_basesh.sdi index 0a37050a4d..23ec6b00bb 100644 --- a/sw/sdi/_basesh.sdi +++ b/sw/sdi/_basesh.sdi @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: _basesh.sdi,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/_beziers.sdi b/sw/sdi/_beziers.sdi index 1af3b16cad..a62eff5a5f 100644 --- a/sw/sdi/_beziers.sdi +++ b/sw/sdi/_beziers.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: _beziers.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/_docsh.sdi b/sw/sdi/_docsh.sdi index de0be1f9a5..0d49499344 100644 --- a/sw/sdi/_docsh.sdi +++ b/sw/sdi/_docsh.sdi @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: _docsh.sdi,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/_drwbase.sdi b/sw/sdi/_drwbase.sdi index 9a61214999..513cd17ed5 100644 --- a/sw/sdi/_drwbase.sdi +++ b/sw/sdi/_drwbase.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: _drwbase.sdi,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/_formsh.sdi b/sw/sdi/_formsh.sdi index 727404ffb9..d72f46bad8 100644 --- a/sw/sdi/_formsh.sdi +++ b/sw/sdi/_formsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: _formsh.sdi,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/_frmsh.sdi b/sw/sdi/_frmsh.sdi index 8081d8e043..82d6afff7f 100644 --- a/sw/sdi/_frmsh.sdi +++ b/sw/sdi/_frmsh.sdi @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: _frmsh.sdi,v $ - * $Revision: 1.6.190.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/_grfsh.sdi b/sw/sdi/_grfsh.sdi index 3d82330ec2..161db94235 100644 --- a/sw/sdi/_grfsh.sdi +++ b/sw/sdi/_grfsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: _grfsh.sdi,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/_listsh.sdi b/sw/sdi/_listsh.sdi index 1e8a6a2e66..526aa6ca24 100644 --- a/sw/sdi/_listsh.sdi +++ b/sw/sdi/_listsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: _listsh.sdi,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/_mediash.sdi b/sw/sdi/_mediash.sdi index bc324db613..a8d7017959 100644 --- a/sw/sdi/_mediash.sdi +++ b/sw/sdi/_mediash.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: _mediash.sdi,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/_olesh.sdi b/sw/sdi/_olesh.sdi index 5c44cfbfce..6527479e42 100644 --- a/sw/sdi/_olesh.sdi +++ b/sw/sdi/_olesh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: _olesh.sdi,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/_tabsh.sdi b/sw/sdi/_tabsh.sdi index c10d652a7a..87789266d2 100644 --- a/sw/sdi/_tabsh.sdi +++ b/sw/sdi/_tabsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: _tabsh.sdi,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi index b09e5f74b1..e8f2489860 100644 --- a/sw/sdi/_textsh.sdi +++ b/sw/sdi/_textsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: _textsh.sdi,v $ - * $Revision: 1.42.208.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi index 5e5316fc61..bd2995290b 100644 --- a/sw/sdi/_viewsh.sdi +++ b/sw/sdi/_viewsh.sdi @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: _viewsh.sdi,v $ - * $Revision: 1.34 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/annotsh.sdi b/sw/sdi/annotsh.sdi index eb842e6ab0..4166fa681e 100755 --- a/sw/sdi/annotsh.sdi +++ b/sw/sdi/annotsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: annotsh.sdi,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/basesh.sdi b/sw/sdi/basesh.sdi index 5c3d8c8452..f274b23fd6 100644 --- a/sw/sdi/basesh.sdi +++ b/sw/sdi/basesh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: basesh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/beziersh.sdi b/sw/sdi/beziersh.sdi index 657be1d831..7f429368ac 100644 --- a/sw/sdi/beziersh.sdi +++ b/sw/sdi/beziersh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: beziersh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/docsh.sdi b/sw/sdi/docsh.sdi index d1619df2f1..9750d0b15d 100644 --- a/sw/sdi/docsh.sdi +++ b/sw/sdi/docsh.sdi @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docsh.sdi,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/drawsh.sdi b/sw/sdi/drawsh.sdi index 77cc9a681e..d5bdc13314 100644 --- a/sw/sdi/drawsh.sdi +++ b/sw/sdi/drawsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drawsh.sdi,v $ - * $Revision: 1.9.190.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/drwbassh.sdi b/sw/sdi/drwbassh.sdi index f308b17dc8..693f6d0cd1 100644 --- a/sw/sdi/drwbassh.sdi +++ b/sw/sdi/drwbassh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drwbassh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/drwtxtsh.sdi b/sw/sdi/drwtxtsh.sdi index cb87291b0d..fd8c577d2a 100644 --- a/sw/sdi/drwtxtsh.sdi +++ b/sw/sdi/drwtxtsh.sdi @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drwtxtsh.sdi,v $ - * $Revision: 1.20.82.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/formsh.sdi b/sw/sdi/formsh.sdi index 87fc44b1b1..eff53e4e56 100644 --- a/sw/sdi/formsh.sdi +++ b/sw/sdi/formsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: formsh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/frmsh.sdi b/sw/sdi/frmsh.sdi index 72192f16ad..e43ea0bedf 100644 --- a/sw/sdi/frmsh.sdi +++ b/sw/sdi/frmsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmsh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/grfsh.sdi b/sw/sdi/grfsh.sdi index dd31e90c04..5118a6aa3a 100644 --- a/sw/sdi/grfsh.sdi +++ b/sw/sdi/grfsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: grfsh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/listsh.sdi b/sw/sdi/listsh.sdi index ef70dfc6ce..b2a25dd2de 100644 --- a/sw/sdi/listsh.sdi +++ b/sw/sdi/listsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: listsh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/makefile.mk b/sw/sdi/makefile.mk index 016b0df6cb..e539c7a055 100644 --- a/sw/sdi/makefile.mk +++ b/sw/sdi/makefile.mk @@ -1,15 +1,11 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.11 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/mediash.sdi b/sw/sdi/mediash.sdi index 6564a69ae4..d7f30beca9 100644 --- a/sw/sdi/mediash.sdi +++ b/sw/sdi/mediash.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mediash.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/olesh.sdi b/sw/sdi/olesh.sdi index dc2a97f835..0135b5e1db 100644 --- a/sw/sdi/olesh.sdi +++ b/sw/sdi/olesh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: olesh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/swinterf.c b/sw/sdi/swinterf.c index 00bad87820..1a984ea98c 100644 --- a/sw/sdi/swinterf.c +++ b/sw/sdi/swinterf.c @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swinterf.c,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/switems.sdi b/sw/sdi/switems.sdi index 1e338dacda..10043b33f6 100644 --- a/sw/sdi/switems.sdi +++ b/sw/sdi/switems.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: switems.sdi,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/swslots.hrc b/sw/sdi/swslots.hrc index 94e4700414..9ae1dba370 100644 --- a/sw/sdi/swslots.hrc +++ b/sw/sdi/swslots.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swslots.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/swslots.sdi b/sw/sdi/swslots.sdi index 8eea2b6903..eb43955b8f 100644 --- a/sw/sdi/swslots.sdi +++ b/sw/sdi/swslots.sdi @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swslots.sdi,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/swslots.src b/sw/sdi/swslots.src index d22f32ae37..b67716ca8b 100644 --- a/sw/sdi/swslots.src +++ b/sw/sdi/swslots.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swslots.src,v $ - * $Revision: 1.133 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/tabsh.sdi b/sw/sdi/tabsh.sdi index 015b8be392..0cd70ec8ce 100644 --- a/sw/sdi/tabsh.sdi +++ b/sw/sdi/tabsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tabsh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/textsh.sdi b/sw/sdi/textsh.sdi index af5497fcd5..f91b3e562a 100644 --- a/sw/sdi/textsh.sdi +++ b/sw/sdi/textsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textsh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/viewsh.sdi b/sw/sdi/viewsh.sdi index 87d8b906a5..bd72740b5e 100644 --- a/sw/sdi/viewsh.sdi +++ b/sw/sdi/viewsh.sdi @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewsh.sdi,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/wbasesh.sdi b/sw/sdi/wbasesh.sdi index 26276a7eaa..ad6e51ac28 100644 --- a/sw/sdi/wbasesh.sdi +++ b/sw/sdi/wbasesh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wbasesh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/wbeziers.sdi b/sw/sdi/wbeziers.sdi index 4fcb9da6f3..7e1cd48fe1 100644 --- a/sw/sdi/wbeziers.sdi +++ b/sw/sdi/wbeziers.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wbeziers.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/wdocsh.sdi b/sw/sdi/wdocsh.sdi index 711bb4620f..da4748cbeb 100644 --- a/sw/sdi/wdocsh.sdi +++ b/sw/sdi/wdocsh.sdi @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wdocsh.sdi,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/wdrwbase.sdi b/sw/sdi/wdrwbase.sdi index a7d084c9d5..f1d96dd888 100644 --- a/sw/sdi/wdrwbase.sdi +++ b/sw/sdi/wdrwbase.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wdrwbase.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/wformsh.sdi b/sw/sdi/wformsh.sdi index 3beef0d8af..da70c19571 100644 --- a/sw/sdi/wformsh.sdi +++ b/sw/sdi/wformsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wformsh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/wfrmsh.sdi b/sw/sdi/wfrmsh.sdi index 2d38ca9c38..35f2e660ed 100644 --- a/sw/sdi/wfrmsh.sdi +++ b/sw/sdi/wfrmsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wfrmsh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/wgrfsh.sdi b/sw/sdi/wgrfsh.sdi index 52732ba7bf..8be0befce1 100644 --- a/sw/sdi/wgrfsh.sdi +++ b/sw/sdi/wgrfsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wgrfsh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/wlistsh.sdi b/sw/sdi/wlistsh.sdi index 13f5ca60c3..5b707320cb 100644 --- a/sw/sdi/wlistsh.sdi +++ b/sw/sdi/wlistsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wlistsh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/wolesh.sdi b/sw/sdi/wolesh.sdi index e21853cc20..27049790f6 100644 --- a/sw/sdi/wolesh.sdi +++ b/sw/sdi/wolesh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wolesh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/wrtapp.sdi b/sw/sdi/wrtapp.sdi index d3723afb88..515268d3ac 100644 --- a/sw/sdi/wrtapp.sdi +++ b/sw/sdi/wrtapp.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtapp.sdi,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/wtabsh.sdi b/sw/sdi/wtabsh.sdi index 1fcfb2cc99..f91a363131 100644 --- a/sw/sdi/wtabsh.sdi +++ b/sw/sdi/wtabsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wtabsh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/wtextsh.sdi b/sw/sdi/wtextsh.sdi index 4a40d8b2e1..3345baa4c2 100644 --- a/sw/sdi/wtextsh.sdi +++ b/sw/sdi/wtextsh.sdi @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wtextsh.sdi,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/sdi/wviewsh.sdi b/sw/sdi/wviewsh.sdi index c65183d7db..ac08b00ebd 100644 --- a/sw/sdi/wviewsh.sdi +++ b/sw/sdi/wviewsh.sdi @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wviewsh.sdi,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx index 171c4de920..740cb2700d 100644 --- a/sw/source/core/SwNumberTree/SwNodeNum.cxx +++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwNodeNum.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx index 8f9caf5f02..3a17177afb 100644 --- a/sw/source/core/SwNumberTree/SwNumberTree.cxx +++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwNumberTree.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/SwNumberTree/makefile.mk b/sw/source/core/SwNumberTree/makefile.mk index e929578e24..d67a3f321a 100644 --- a/sw/source/core/SwNumberTree/makefile.mk +++ b/sw/source/core/SwNumberTree/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.5 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx index 542924139d..774bcbb142 100644 --- a/sw/source/core/access/acccell.cxx +++ b/sw/source/core/access/acccell.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: acccell.cxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/acccell.hxx b/sw/source/core/access/acccell.hxx index 0afb510652..b556b076d5 100644 --- a/sw/source/core/access/acccell.hxx +++ b/sw/source/core/access/acccell.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: acccell.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index edc64cfe99..94db31770b 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: acccontext.cxx,v $ - * $Revision: 1.59 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx index af7a744ef8..b9b0dcf0bd 100644 --- a/sw/source/core/access/acccontext.hxx +++ b/sw/source/core/access/acccontext.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: acccontext.hxx,v $ - * $Revision: 1.43 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index fe6df813ff..6455cd6f96 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accdoc.cxx,v $ - * $Revision: 1.34 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accdoc.hxx b/sw/source/core/access/accdoc.hxx index 71c8ba07e3..38f5c1272f 100644 --- a/sw/source/core/access/accdoc.hxx +++ b/sw/source/core/access/accdoc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accdoc.hxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accembedded.cxx b/sw/source/core/access/accembedded.cxx index 857c80b9ea..b1fbd3a372 100644 --- a/sw/source/core/access/accembedded.cxx +++ b/sw/source/core/access/accembedded.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accembedded.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accembedded.hxx b/sw/source/core/access/accembedded.hxx index ffaf57ca8c..5d4e47692e 100644 --- a/sw/source/core/access/accembedded.hxx +++ b/sw/source/core/access/accembedded.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accembedded.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accfootnote.cxx b/sw/source/core/access/accfootnote.cxx index f3d9ca1db2..567426b2a5 100644 --- a/sw/source/core/access/accfootnote.cxx +++ b/sw/source/core/access/accfootnote.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accfootnote.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accfootnote.hxx b/sw/source/core/access/accfootnote.hxx index 4a18550342..26789409b6 100644 --- a/sw/source/core/access/accfootnote.hxx +++ b/sw/source/core/access/accfootnote.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accfootnote.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx index 573383b7c7..c01e7958c7 100644 --- a/sw/source/core/access/accframe.cxx +++ b/sw/source/core/access/accframe.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accframe.cxx,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accframe.hxx b/sw/source/core/access/accframe.hxx index b0b916fe92..f1be372f4b 100644 --- a/sw/source/core/access/accframe.hxx +++ b/sw/source/core/access/accframe.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accframe.hxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx index 4da64c055a..b8f6d0def6 100644 --- a/sw/source/core/access/accframebase.cxx +++ b/sw/source/core/access/accframebase.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accframebase.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accframebase.hxx b/sw/source/core/access/accframebase.hxx index b475af5be9..2ff7c1f2d4 100644 --- a/sw/source/core/access/accframebase.hxx +++ b/sw/source/core/access/accframebase.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accframebase.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx index 88b6b0e8b8..199067d424 100644 --- a/sw/source/core/access/accfrmobj.cxx +++ b/sw/source/core/access/accfrmobj.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accfrmobj.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accfrmobj.hxx b/sw/source/core/access/accfrmobj.hxx index 2e08d93372..85cf65e420 100644 --- a/sw/source/core/access/accfrmobj.hxx +++ b/sw/source/core/access/accfrmobj.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accfrmobj.hxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx index c82f5dfef3..389712e2c9 100644 --- a/sw/source/core/access/accfrmobjmap.cxx +++ b/sw/source/core/access/accfrmobjmap.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accfrmobjmap.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accfrmobjmap.hxx b/sw/source/core/access/accfrmobjmap.hxx index bfd83cb4ac..9126f519c9 100644 --- a/sw/source/core/access/accfrmobjmap.hxx +++ b/sw/source/core/access/accfrmobjmap.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accfrmobjmap.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accfrmobjslist.cxx b/sw/source/core/access/accfrmobjslist.cxx index 8b69b01375..2745b9dc98 100644 --- a/sw/source/core/access/accfrmobjslist.cxx +++ b/sw/source/core/access/accfrmobjslist.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accfrmobjslist.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accfrmobjslist.hxx b/sw/source/core/access/accfrmobjslist.hxx index 8debda313a..d71a9dc173 100644 --- a/sw/source/core/access/accfrmobjslist.hxx +++ b/sw/source/core/access/accfrmobjslist.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accfrmobjslist.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accgraphic.cxx b/sw/source/core/access/accgraphic.cxx index b9f23015bf..5c10611a1f 100644 --- a/sw/source/core/access/accgraphic.cxx +++ b/sw/source/core/access/accgraphic.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accgraphic.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accgraphic.hxx b/sw/source/core/access/accgraphic.hxx index 8e5a3157a6..03118e8add 100644 --- a/sw/source/core/access/accgraphic.hxx +++ b/sw/source/core/access/accgraphic.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accgraphic.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accheaderfooter.cxx b/sw/source/core/access/accheaderfooter.cxx index a4ebb472c5..fedc0796a9 100644 --- a/sw/source/core/access/accheaderfooter.cxx +++ b/sw/source/core/access/accheaderfooter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accheaderfooter.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accheaderfooter.hxx b/sw/source/core/access/accheaderfooter.hxx index 938bf392af..1b3b4a6c0f 100644 --- a/sw/source/core/access/accheaderfooter.hxx +++ b/sw/source/core/access/accheaderfooter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accheaderfooter.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/acchyperlink.cxx b/sw/source/core/access/acchyperlink.cxx index 901ea100e7..fd831d09a0 100644 --- a/sw/source/core/access/acchyperlink.cxx +++ b/sw/source/core/access/acchyperlink.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: acchyperlink.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/acchyperlink.hxx b/sw/source/core/access/acchyperlink.hxx index 561c54a42d..d4d831a827 100644 --- a/sw/source/core/access/acchyperlink.hxx +++ b/sw/source/core/access/acchyperlink.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: acchyperlink.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/acchypertextdata.cxx b/sw/source/core/access/acchypertextdata.cxx index bfa04e3db2..be5596073c 100644 --- a/sw/source/core/access/acchypertextdata.cxx +++ b/sw/source/core/access/acchypertextdata.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: acchypertextdata.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/acchypertextdata.hxx b/sw/source/core/access/acchypertextdata.hxx index ee3d6db17c..2dd85dfc5a 100644 --- a/sw/source/core/access/acchypertextdata.hxx +++ b/sw/source/core/access/acchypertextdata.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: acchypertextdata.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index e59faa3f38..6892ab59c5 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accmap.cxx,v $ - * $Revision: 1.59 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx index 4bb7c73362..40e9652f1e 100644 --- a/sw/source/core/access/accnotextframe.cxx +++ b/sw/source/core/access/accnotextframe.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accnotextframe.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accnotextframe.hxx b/sw/source/core/access/accnotextframe.hxx index 203f135588..dd312f3c67 100644 --- a/sw/source/core/access/accnotextframe.hxx +++ b/sw/source/core/access/accnotextframe.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accnotextframe.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accpage.cxx b/sw/source/core/access/accpage.cxx index bba991661b..e5b66300d5 100644 --- a/sw/source/core/access/accpage.cxx +++ b/sw/source/core/access/accpage.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accpage.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accpage.hxx b/sw/source/core/access/accpage.hxx index 149afde466..dc364f79c8 100644 --- a/sw/source/core/access/accpage.hxx +++ b/sw/source/core/access/accpage.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accpage.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index d931f65a18..2b0b4923f6 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accpara.cxx,v $ - * $Revision: 1.78 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx index 057bebe337..ef87275fe9 100644 --- a/sw/source/core/access/accpara.hxx +++ b/sw/source/core/access/accpara.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accpara.hxx,v $ - * $Revision: 1.41 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx index 48f4b23136..0586210675 100644 --- a/sw/source/core/access/accportions.cxx +++ b/sw/source/core/access/accportions.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accportions.cxx,v $ - * $Revision: 1.35 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx index ab866dbc37..f27d11617d 100644 --- a/sw/source/core/access/accportions.hxx +++ b/sw/source/core/access/accportions.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accportions.hxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accpreview.cxx b/sw/source/core/access/accpreview.cxx index 7389e99545..cc38f1a63c 100644 --- a/sw/source/core/access/accpreview.cxx +++ b/sw/source/core/access/accpreview.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accpreview.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accpreview.hxx b/sw/source/core/access/accpreview.hxx index 9ee980e72a..d1a2bfd914 100644 --- a/sw/source/core/access/accpreview.hxx +++ b/sw/source/core/access/accpreview.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accpreview.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accselectionhelper.cxx b/sw/source/core/access/accselectionhelper.cxx index af05960348..bb0bc084f9 100644 --- a/sw/source/core/access/accselectionhelper.cxx +++ b/sw/source/core/access/accselectionhelper.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accselectionhelper.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/accselectionhelper.hxx b/sw/source/core/access/accselectionhelper.hxx index 405db4f54c..cf1dcd68e2 100644 --- a/sw/source/core/access/accselectionhelper.hxx +++ b/sw/source/core/access/accselectionhelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: accselectionhelper.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index 828dc2a500..e3908d6741 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: acctable.cxx,v $ - * $Revision: 1.33 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/acctable.hxx b/sw/source/core/access/acctable.hxx index b04f3edaec..93c0725ae1 100644 --- a/sw/source/core/access/acctable.hxx +++ b/sw/source/core/access/acctable.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: acctable.hxx,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx index d91a9ef514..65aa72151c 100644 --- a/sw/source/core/access/acctextframe.cxx +++ b/sw/source/core/access/acctextframe.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: acctextframe.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/acctextframe.hxx b/sw/source/core/access/acctextframe.hxx index 27c84b3fdb..de355feeeb 100644 --- a/sw/source/core/access/acctextframe.hxx +++ b/sw/source/core/access/acctextframe.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: acctextframe.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/makefile.mk b/sw/source/core/access/makefile.mk index 402933f129..20ffdad321 100644 --- a/sw/source/core/access/makefile.mk +++ b/sw/source/core/access/makefile.mk @@ -1,15 +1,11 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.15 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/textmarkuphelper.cxx b/sw/source/core/access/textmarkuphelper.cxx index be68370f7d..da1d334975 100644 --- a/sw/source/core/access/textmarkuphelper.cxx +++ b/sw/source/core/access/textmarkuphelper.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textmarkuphelper.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/access/textmarkuphelper.hxx b/sw/source/core/access/textmarkuphelper.hxx index 6dda5c74f5..8456a5828d 100644 --- a/sw/source/core/access/textmarkuphelper.hxx +++ b/sw/source/core/access/textmarkuphelper.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textmarkuphelper.hxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index 860178c5b9..34788c2663 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: calbck.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx index 9f548bfae7..7285d1520d 100644 --- a/sw/source/core/attr/cellatr.cxx +++ b/sw/source/core/attr/cellatr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cellatr.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/attr/fmtfollowtextflow.cxx b/sw/source/core/attr/fmtfollowtextflow.cxx index 788e4960fd..0eb131e6b4 100644 --- a/sw/source/core/attr/fmtfollowtextflow.cxx +++ b/sw/source/core/attr/fmtfollowtextflow.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtfollowtextflow.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx index da3f7b25fc..f7383f1758 100644 --- a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx +++ b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtwrapinfluenceonobjpos.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index c9d6abadae..dca6f4928b 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: format.cxx,v $ - * $Revision: 1.17.146.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx index 8351496ecb..230801b664 100644 --- a/sw/source/core/attr/hints.cxx +++ b/sw/source/core/attr/hints.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: hints.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/attr/makefile.mk b/sw/source/core/attr/makefile.mk index b260e6a123..a3827d4776 100644 --- a/sw/source/core/attr/makefile.mk +++ b/sw/source/core/attr/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.6 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx index 23a2d4772d..4aa31639d2 100644 --- a/sw/source/core/attr/swatrset.cxx +++ b/sw/source/core/attr/swatrset.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swatrset.cxx,v $ - * $Revision: 1.16.140.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/bastyp/SwSmartTagMgr.cxx b/sw/source/core/bastyp/SwSmartTagMgr.cxx index b4f831c0e5..695db08c75 100644 --- a/sw/source/core/bastyp/SwSmartTagMgr.cxx +++ b/sw/source/core/bastyp/SwSmartTagMgr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwSmartTagMgr.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/bastyp/bparr.cxx b/sw/source/core/bastyp/bparr.cxx index c5c83fb764..c3a4b2ff90 100644 --- a/sw/source/core/bastyp/bparr.cxx +++ b/sw/source/core/bastyp/bparr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: bparr.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx index 9541707ea9..5783aae4e4 100644 --- a/sw/source/core/bastyp/breakit.cxx +++ b/sw/source/core/bastyp/breakit.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: breakit.cxx,v $ - * $Revision: 1.16.112.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index dae28acc73..a32ac29c3c 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: calc.cxx,v $ - * $Revision: 1.44.174.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/bastyp/checkit.cxx b/sw/source/core/bastyp/checkit.cxx index 9f272d54db..be8219e720 100644 --- a/sw/source/core/bastyp/checkit.cxx +++ b/sw/source/core/bastyp/checkit.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: checkit.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/bastyp/index.cxx b/sw/source/core/bastyp/index.cxx index d05cf8d72a..a42023beff 100644 --- a/sw/source/core/bastyp/index.cxx +++ b/sw/source/core/bastyp/index.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: index.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index 6f9fdb7546..64532e8773 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: init.cxx,v $ - * $Revision: 1.66.138.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/bastyp/makefile.mk b/sw/source/core/bastyp/makefile.mk index ab4fcbd2f0..8333dabd5f 100644 --- a/sw/source/core/bastyp/makefile.mk +++ b/sw/source/core/bastyp/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.9 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/bastyp/ring.cxx b/sw/source/core/bastyp/ring.cxx index 958fb6c034..bb19ef6be2 100644 --- a/sw/source/core/bastyp/ring.cxx +++ b/sw/source/core/bastyp/ring.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ring.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx index 67383227ca..d6a909da9e 100644 --- a/sw/source/core/bastyp/swcache.cxx +++ b/sw/source/core/bastyp/swcache.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swcache.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx index 25580a96e4..4593888ff4 100644 --- a/sw/source/core/bastyp/swrect.cxx +++ b/sw/source/core/bastyp/swrect.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swrect.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/bastyp/swregion.cxx b/sw/source/core/bastyp/swregion.cxx index d2926f6d7e..a28e60f75f 100644 --- a/sw/source/core/bastyp/swregion.cxx +++ b/sw/source/core/bastyp/swregion.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swregion.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/bastyp/swtypes.cxx b/sw/source/core/bastyp/swtypes.cxx index d7049832bc..58120c97c9 100644 --- a/sw/source/core/bastyp/swtypes.cxx +++ b/sw/source/core/bastyp/swtypes.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swtypes.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/bastyp/tabcol.cxx b/sw/source/core/bastyp/tabcol.cxx index aa9da2df61..48ebfb1c96 100644 --- a/sw/source/core/bastyp/tabcol.cxx +++ b/sw/source/core/bastyp/tabcol.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tabcol.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/BlockCursor.cxx b/sw/source/core/crsr/BlockCursor.cxx index 7d41e1359e..bbf8544a2f 100644 --- a/sw/source/core/crsr/BlockCursor.cxx +++ b/sw/source/core/crsr/BlockCursor.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: BlockCursor.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/BlockCursor.hxx b/sw/source/core/crsr/BlockCursor.hxx index 08e988927b..5d3fa06beb 100644 --- a/sw/source/core/crsr/BlockCursor.hxx +++ b/sw/source/core/crsr/BlockCursor.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: BlockCursor.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/IBlockCursor.hxx b/sw/source/core/crsr/IBlockCursor.hxx index c17fc9a6ea..da565f8b20 100644 --- a/sw/source/core/crsr/IBlockCursor.hxx +++ b/sw/source/core/crsr/IBlockCursor.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IBlockCursor.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 403daf4db3..0e8ab5319a 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: bookmrk.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx index 8c26aeb6eb..9e37e408e3 100644 --- a/sw/source/core/crsr/callnk.cxx +++ b/sw/source/core/crsr/callnk.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: callnk.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/callnk.hxx b/sw/source/core/crsr/callnk.hxx index 32bc41dd99..7820252428 100644 --- a/sw/source/core/crsr/callnk.hxx +++ b/sw/source/core/crsr/callnk.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: callnk.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx index 0d6a63e251..888a139ada 100644 --- a/sw/source/core/crsr/crbm.cxx +++ b/sw/source/core/crsr/crbm.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: crbm.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/crossrefbookmark.cxx b/sw/source/core/crsr/crossrefbookmark.cxx index 8ae112a783..64c37c9746 100644 --- a/sw/source/core/crsr/crossrefbookmark.cxx +++ b/sw/source/core/crsr/crossrefbookmark.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: crossrefbookmark.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index bf99e590b2..80ab3c89e4 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: crsrsh.cxx,v $ - * $Revision: 1.76 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index a39ccb99c9..b3bc75550b 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: crstrvl.cxx,v $ - * $Revision: 1.28 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/crstrvl1.cxx b/sw/source/core/crsr/crstrvl1.cxx index bd14e87a8a..b240921998 100644 --- a/sw/source/core/crsr/crstrvl1.cxx +++ b/sw/source/core/crsr/crstrvl1.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: crstrvl1.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx index 2808184f8c..80c93287e8 100644 --- a/sw/source/core/crsr/findattr.cxx +++ b/sw/source/core/crsr/findattr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: findattr.cxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/findcoll.cxx b/sw/source/core/crsr/findcoll.cxx index 60fc08bdcf..d56c887df0 100644 --- a/sw/source/core/crsr/findcoll.cxx +++ b/sw/source/core/crsr/findcoll.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: findcoll.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/findfmt.cxx b/sw/source/core/crsr/findfmt.cxx index 30794c5209..e93235b959 100644 --- a/sw/source/core/crsr/findfmt.cxx +++ b/sw/source/core/crsr/findfmt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: findfmt.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index d715f78e33..7001dd5ca4 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: findtxt.cxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/makefile.mk b/sw/source/core/crsr/makefile.mk index 57cb499dec..6d579171dc 100644 --- a/sw/source/core/crsr/makefile.mk +++ b/sw/source/core/crsr/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.8 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index d7823ec532..f6a4898a45 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pam.cxx,v $ - * $Revision: 1.23.12.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/paminit.cxx b/sw/source/core/crsr/paminit.cxx index 050ff02936..34b0814d52 100644 --- a/sw/source/core/crsr/paminit.cxx +++ b/sw/source/core/crsr/paminit.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: paminit.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index b938d5ace5..d5c0ff18a1 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swcrsr.cxx,v $ - * $Revision: 1.59 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/trvlcol.cxx b/sw/source/core/crsr/trvlcol.cxx index e3784a3ef4..716de1368a 100644 --- a/sw/source/core/crsr/trvlcol.cxx +++ b/sw/source/core/crsr/trvlcol.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: trvlcol.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx index 6d02926031..c75ea7b4fc 100644 --- a/sw/source/core/crsr/trvlfnfl.cxx +++ b/sw/source/core/crsr/trvlfnfl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: trvlfnfl.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx index 3fc27beadc..f239ab2806 100644 --- a/sw/source/core/crsr/trvlreg.cxx +++ b/sw/source/core/crsr/trvlreg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: trvlreg.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index 76bdb74d5b..8292666593 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: trvltbl.cxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/unocrsr.cxx b/sw/source/core/crsr/unocrsr.cxx index 1b4a5dfd5c..6b958dc00a 100644 --- a/sw/source/core/crsr/unocrsr.cxx +++ b/sw/source/core/crsr/unocrsr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unocrsr.cxx,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 1e0d6b3703..2875018d4a 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viscrs.cxx,v $ - * $Revision: 1.31 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx index 691b966521..0a13cced38 100644 --- a/sw/source/core/doc/SwStyleNameMapper.cxx +++ b/sw/source/core/doc/SwStyleNameMapper.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwStyleNameMapper.cxx,v $ - * $Revision: 1.15.224.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx index c1bebf848c..6129c51db4 100644 --- a/sw/source/core/doc/acmplwrd.cxx +++ b/sw/source/core/doc/acmplwrd.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: acmplwrd.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx index de37b13d76..2bfb6b8d98 100644 --- a/sw/source/core/doc/dbgoutsw.cxx +++ b/sw/source/core/doc/dbgoutsw.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbgoutsw.cxx,v $ - * $Revision: 1.27.18.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 7789021939..694c5f499c 100755 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: doc.cxx,v $ - * $Revision: 1.71 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx index 51dc3132b6..fc88148156 100644 --- a/sw/source/core/doc/docbasic.cxx +++ b/sw/source/core/doc/docbasic.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docbasic.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 5af1944799..bf2e8266f3 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -1,15 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docbm.cxx,v $ - * - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx index 1be7f1a654..1555e79593 100644 --- a/sw/source/core/doc/docchart.cxx +++ b/sw/source/core/doc/docchart.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docchart.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 58e3cccc6f..20bcb177f2 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: doccomp.cxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx index 1e1c22d47f..b3b5682eba 100644 --- a/sw/source/core/doc/doccorr.cxx +++ b/sw/source/core/doc/doccorr.cxx @@ -2,15 +2,12 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: doccorr.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. - * + * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. diff --git a/sw/source/core/doc/docdde.cxx b/sw/source/core/doc/docdde.cxx index e5e0aa84a7..1a46084454 100644 --- a/sw/source/core/doc/docdde.cxx +++ b/sw/source/core/doc/docdde.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docdde.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index 91cca2add7..196bb5e4ec 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docdesc.cxx,v $ - * $Revision: 1.43 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index 048b87904d..5c56862230 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docdraw.cxx,v $ - * $Revision: 1.45 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 3cde597133..f02d73f436 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docedt.cxx,v $ - * $Revision: 1.48 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 50baa4b4a9..54cb12e9db 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docfld.cxx,v $ - * $Revision: 1.34 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index 21fdff6df1..20055dd8d5 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docfly.cxx,v $ - * $Revision: 1.34 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 3033eaf9a2..3ed071e950 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docfmt.cxx,v $ - * $Revision: 1.52 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx index 8a147d8b58..9af54315b2 100644 --- a/sw/source/core/doc/docftn.cxx +++ b/sw/source/core/doc/docftn.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docftn.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index d3f3cbf535..140ef24b95 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docglbl.cxx,v $ - * $Revision: 1.25 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx index 39b1065201..fbfed56371 100644 --- a/sw/source/core/doc/docglos.cxx +++ b/sw/source/core/doc/docglos.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docglos.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index ed6ba6187b..849c24b644 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: doclay.cxx,v $ - * $Revision: 1.59 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 4fbc5f3b7d..82f0e3cbb1 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docnew.cxx,v $ - * $Revision: 1.89 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index a3bca434cc..f1b8b4048d 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docnum.cxx,v $ - * $Revision: 1.78 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index b1cbd29eb7..39477281aa 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docredln.cxx,v $ - * $Revision: 1.51.122.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx index 37d743c0d3..2ef195e72e 100644 --- a/sw/source/core/doc/docruby.cxx +++ b/sw/source/core/doc/docruby.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docruby.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index 7ceaffdbda..b8d3da0879 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docsort.cxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docstat.cxx b/sw/source/core/doc/docstat.cxx index 8455adb859..103d84f98d 100644 --- a/sw/source/core/doc/docstat.cxx +++ b/sw/source/core/doc/docstat.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docstat.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 67fd5c7288..54b62003a5 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: doctxm.cxx,v $ - * $Revision: 1.53 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/docxforms.cxx b/sw/source/core/doc/docxforms.cxx index cc2807ce43..a95bd65f44 100644 --- a/sw/source/core/doc/docxforms.cxx +++ b/sw/source/core/doc/docxforms.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docxforms.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx index 8cd8229f74..a13347f9d5 100644 --- a/sw/source/core/doc/extinput.cxx +++ b/sw/source/core/doc/extinput.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: extinput.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx index 372dbba83e..8c11ba3964 100644 --- a/sw/source/core/doc/fmtcol.cxx +++ b/sw/source/core/doc/fmtcol.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtcol.cxx,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx index b0a8cb67af..1e82d711d7 100644 --- a/sw/source/core/doc/ftnidx.cxx +++ b/sw/source/core/doc/ftnidx.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ftnidx.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx index 4e69adef3a..a42956055a 100644 --- a/sw/source/core/doc/gctable.cxx +++ b/sw/source/core/doc/gctable.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: gctable.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx index 8d21b72435..ad29e27474 100644 --- a/sw/source/core/doc/htmltbl.cxx +++ b/sw/source/core/doc/htmltbl.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmltbl.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/lineinfo.cxx b/sw/source/core/doc/lineinfo.cxx index 764a63de8c..19a19c4d42 100644 --- a/sw/source/core/doc/lineinfo.cxx +++ b/sw/source/core/doc/lineinfo.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: lineinfo.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx index 4aa146e876..105d4c7685 100644 --- a/sw/source/core/doc/list.cxx +++ b/sw/source/core/doc/list.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: list.cxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/makefile.mk b/sw/source/core/doc/makefile.mk index c7459cd164..5a65b2de24 100644 --- a/sw/source/core/doc/makefile.mk +++ b/sw/source/core/doc/makefile.mk @@ -1,15 +1,11 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.24 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 2e9bfcb732..95bc778718 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: notxtfrm.cxx,v $ - * $Revision: 1.43.54.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 7d45261f9c..379ed409d5 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: number.cxx,v $ - * $Revision: 1.53.76.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx index 3067fc74a4..93cdcc51f5 100644 --- a/sw/source/core/doc/poolfmt.cxx +++ b/sw/source/core/doc/poolfmt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: poolfmt.cxx,v $ - * $Revision: 1.54.108.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/sortopt.cxx b/sw/source/core/doc/sortopt.cxx index d4f4caf4a7..6bfa6ff0b9 100644 --- a/sw/source/core/doc/sortopt.cxx +++ b/sw/source/core/doc/sortopt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sortopt.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx index 1d99c829a3..7f6f43539c 100644 --- a/sw/source/core/doc/swserv.cxx +++ b/sw/source/core/doc/swserv.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swserv.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/swstylemanager.cxx b/sw/source/core/doc/swstylemanager.cxx index f2be9ef5ab..5efd535319 100644 --- a/sw/source/core/doc/swstylemanager.cxx +++ b/sw/source/core/doc/swstylemanager.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swstylemanager.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/swstylemanager.hxx b/sw/source/core/doc/swstylemanager.hxx index f2442bd449..31ab93871a 100644 --- a/sw/source/core/doc/swstylemanager.hxx +++ b/sw/source/core/doc/swstylemanager.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swstylemanager.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 32beedc352..c783f9af11 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tblafmt.cxx,v $ - * $Revision: 1.22.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx index 0982e9ade9..1e8cc6ed2b 100644 --- a/sw/source/core/doc/tblcpy.cxx +++ b/sw/source/core/doc/tblcpy.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tblcpy.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 2f3fb01501..f84173596a 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tblrwcl.cxx,v $ - * $Revision: 1.29 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx index 8cb750ea4a..3d8b05a717 100644 --- a/sw/source/core/doc/visiturl.cxx +++ b/sw/source/core/doc/visiturl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: visiturl.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/cancellablejob.cxx b/sw/source/core/docnode/cancellablejob.cxx index 31fab28cca..d867485589 100644 --- a/sw/source/core/docnode/cancellablejob.cxx +++ b/sw/source/core/docnode/cancellablejob.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cancellablejob.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/cancellablejob.hxx b/sw/source/core/docnode/cancellablejob.hxx index b98a6a9ee3..72d4e2d3a1 100644 --- a/sw/source/core/docnode/cancellablejob.hxx +++ b/sw/source/core/docnode/cancellablejob.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cancellablejob.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/finalthreadmanager.cxx b/sw/source/core/docnode/finalthreadmanager.cxx index 442870a194..1321fb3c20 100644 --- a/sw/source/core/docnode/finalthreadmanager.cxx +++ b/sw/source/core/docnode/finalthreadmanager.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: finalthreadmanager.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/makefile.mk b/sw/source/core/docnode/makefile.mk index d380ef1e5f..d3e5df64b6 100644 --- a/sw/source/core/docnode/makefile.mk +++ b/sw/source/core/docnode/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.10 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index 68f1559055..fbc6f23504 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndcopy.cxx,v $ - * $Revision: 1.34.74.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/ndindex.cxx b/sw/source/core/docnode/ndindex.cxx index 5d0e64f890..370426640e 100644 --- a/sw/source/core/docnode/ndindex.cxx +++ b/sw/source/core/docnode/ndindex.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndindex.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx index 7bc5b9e721..69d45dffef 100644 --- a/sw/source/core/docnode/ndnotxt.cxx +++ b/sw/source/core/docnode/ndnotxt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndnotxt.cxx,v $ - * $Revision: 1.13.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/ndnum.cxx b/sw/source/core/docnode/ndnum.cxx index 15996c48a9..ac20cb804d 100644 --- a/sw/source/core/docnode/ndnum.cxx +++ b/sw/source/core/docnode/ndnum.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndnum.cxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 0b3bbc0b43..f57e41de69 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndsect.cxx,v $ - * $Revision: 1.35 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index a98ec01f95..32941dd26c 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndtbl.cxx,v $ - * $Revision: 1.57 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 7dbf247500..e3d8e8c320 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndtbl1.cxx,v $ - * $Revision: 1.25 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 84d709538a..3b01af69ed 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: node.cxx,v $ - * $Revision: 1.45 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx index 3208873a4e..8f19d3b1e4 100644 --- a/sw/source/core/docnode/node2lay.cxx +++ b/sw/source/core/docnode/node2lay.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: node2lay.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index e437493f54..e46b7a47f9 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: nodes.cxx,v $ - * $Revision: 1.35 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/observablethread.cxx b/sw/source/core/docnode/observablethread.cxx index ddd18ecc90..31b13326c8 100644 --- a/sw/source/core/docnode/observablethread.cxx +++ b/sw/source/core/docnode/observablethread.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: observablethread.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/pausethreadstarting.cxx b/sw/source/core/docnode/pausethreadstarting.cxx index 79210a90bd..3018b673d0 100644 --- a/sw/source/core/docnode/pausethreadstarting.cxx +++ b/sw/source/core/docnode/pausethreadstarting.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pausethreadstarting.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/retrievedinputstreamdata.cxx b/sw/source/core/docnode/retrievedinputstreamdata.cxx index 520a5c9c09..92c87f8eaf 100644 --- a/sw/source/core/docnode/retrievedinputstreamdata.cxx +++ b/sw/source/core/docnode/retrievedinputstreamdata.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: retrievedinputstreamdata.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/retrieveinputstream.cxx b/sw/source/core/docnode/retrieveinputstream.cxx index 28513057ac..9269b0691c 100644 --- a/sw/source/core/docnode/retrieveinputstream.cxx +++ b/sw/source/core/docnode/retrieveinputstream.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: retrieveinputstream.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/retrieveinputstreamconsumer.cxx b/sw/source/core/docnode/retrieveinputstreamconsumer.cxx index e373b29f7f..2ca7e536b9 100644 --- a/sw/source/core/docnode/retrieveinputstreamconsumer.cxx +++ b/sw/source/core/docnode/retrieveinputstreamconsumer.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: retrieveinputstreamconsumer.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 0706e3d888..7523ab2834 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: section.cxx,v $ - * $Revision: 1.31 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index 47961a47ea..1d6553d244 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swbaslnk.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/swthreadjoiner.cxx b/sw/source/core/docnode/swthreadjoiner.cxx index 025498c324..96bc06cb99 100644 --- a/sw/source/core/docnode/swthreadjoiner.cxx +++ b/sw/source/core/docnode/swthreadjoiner.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swthreadjoiner.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/swthreadmanager.cxx b/sw/source/core/docnode/swthreadmanager.cxx index 8b173a1221..bcd0392066 100644 --- a/sw/source/core/docnode/swthreadmanager.cxx +++ b/sw/source/core/docnode/swthreadmanager.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swthreadmanager.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/threadlistener.cxx b/sw/source/core/docnode/threadlistener.cxx index 28fa34dc7a..a577711c03 100644 --- a/sw/source/core/docnode/threadlistener.cxx +++ b/sw/source/core/docnode/threadlistener.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: threadlistener.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/docnode/threadmanager.cxx b/sw/source/core/docnode/threadmanager.cxx index f3bf3c0411..d13d74df99 100644 --- a/sw/source/core/docnode/threadmanager.cxx +++ b/sw/source/core/docnode/threadmanager.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: threadmanager.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 9ee5b8305c..b709777cbc 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dcontact.cxx,v $ - * $Revision: 1.61.210.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index 1e4d252f06..2e9f1f1304 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dflyobj.cxx,v $ - * $Revision: 1.27.22.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/draw/dobjfac.cxx b/sw/source/core/draw/dobjfac.cxx index 727def6c3a..508d33815b 100644 --- a/sw/source/core/draw/dobjfac.cxx +++ b/sw/source/core/draw/dobjfac.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dobjfac.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx index 11fb6bad6b..0ac98e34df 100644 --- a/sw/source/core/draw/dpage.cxx +++ b/sw/source/core/draw/dpage.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dpage.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx index ddafb79647..1953250367 100644 --- a/sw/source/core/draw/drawdoc.cxx +++ b/sw/source/core/draw/drawdoc.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drawdoc.cxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index eb88a28f0e..0f597d7edb 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dview.cxx,v $ - * $Revision: 1.30 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/draw/makefile.mk b/sw/source/core/draw/makefile.mk index 8c37303922..a57b1b530e 100644 --- a/sw/source/core/draw/makefile.mk +++ b/sw/source/core/draw/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.6 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index 29b3968c34..0c30dc98bf 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: acorrect.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 48ab1530a4..19f67ec1b6 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: autofmt.cxx,v $ - * $Revision: 1.42 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx index 0c8952ff81..25770ba33b 100644 --- a/sw/source/core/edit/edatmisc.cxx +++ b/sw/source/core/edit/edatmisc.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edatmisc.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index 431887c0bf..2f220cd481 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edattr.cxx,v $ - * $Revision: 1.47 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index 823dee6054..906732a199 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: eddel.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 273316e069..5e30894090 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edfcol.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx index 82e915cdfe..86df811542 100644 --- a/sw/source/core/edit/edfld.cxx +++ b/sw/source/core/edit/edfld.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edfld.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/edfldexp.cxx b/sw/source/core/edit/edfldexp.cxx index 182317c223..ff548882ff 100644 --- a/sw/source/core/edit/edfldexp.cxx +++ b/sw/source/core/edit/edfldexp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edfldexp.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx index d3bcf716d4..ee35ed384a 100644 --- a/sw/source/core/edit/edfmt.cxx +++ b/sw/source/core/edit/edfmt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edfmt.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx index 5e87946247..39d7b0eac9 100644 --- a/sw/source/core/edit/edglbldc.cxx +++ b/sw/source/core/edit/edglbldc.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edglbldc.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx index 980bc00080..40d24fd3db 100644 --- a/sw/source/core/edit/edglss.cxx +++ b/sw/source/core/edit/edglss.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edglss.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index e2bf9d439e..d5dd2f7868 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: editsh.cxx,v $ - * $Revision: 1.58 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index c10370979a..c0fdeabce8 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edlingu.cxx,v $ - * $Revision: 1.31 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index e04d62c4f5..9c56f54563 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ednumber.cxx,v $ - * $Revision: 1.28 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/edredln.cxx b/sw/source/core/edit/edredln.cxx index 2144cb750c..9fc470a40d 100644 --- a/sw/source/core/edit/edredln.cxx +++ b/sw/source/core/edit/edredln.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edredln.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index ad36b898fd..d0886cd145 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edsect.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx index 7bc8f0e310..d139d0c899 100644 --- a/sw/source/core/edit/edtab.cxx +++ b/sw/source/core/edit/edtab.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edtab.cxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index aade7c6041..28f0dd48c8 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edtox.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx index ff05de666d..c9c1d5ce13 100644 --- a/sw/source/core/edit/edundo.cxx +++ b/sw/source/core/edit/edundo.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edundo.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx index 90dc9a70db..3584929282 100644 --- a/sw/source/core/edit/edws.cxx +++ b/sw/source/core/edit/edws.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edws.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/edit/makefile.mk b/sw/source/core/edit/makefile.mk index c1476284c4..a7820b4058 100644 --- a/sw/source/core/edit/makefile.mk +++ b/sw/source/core/edit/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.13 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/except/dbgloop.cxx b/sw/source/core/except/dbgloop.cxx index 4d45f84001..266a0817a2 100644 --- a/sw/source/core/except/dbgloop.cxx +++ b/sw/source/core/except/dbgloop.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbgloop.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/except/errhdl.cxx b/sw/source/core/except/errhdl.cxx index 9927e6ef3f..2c48c28c1c 100644 --- a/sw/source/core/except/errhdl.cxx +++ b/sw/source/core/except/errhdl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: errhdl.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/except/makefile.mk b/sw/source/core/except/makefile.mk index 660eb8faf5..19450849b5 100644 --- a/sw/source/core/except/makefile.mk +++ b/sw/source/core/except/makefile.mk @@ -1,15 +1,11 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index be59f24541..845e0d9b92 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: authfld.cxx,v $ - * $Revision: 1.34 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index a62957faa5..d92d8ce0e5 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cellfml.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/chpfld.cxx b/sw/source/core/fields/chpfld.cxx index 15c2e23c01..693d7ce324 100644 --- a/sw/source/core/fields/chpfld.cxx +++ b/sw/source/core/fields/chpfld.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chpfld.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx index cd0b383173..92ad0ed940 100644 --- a/sw/source/core/fields/dbfld.cxx +++ b/sw/source/core/fields/dbfld.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbfld.cxx,v $ - * $Revision: 1.31 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx index 04cb0c7755..93005eca0d 100644 --- a/sw/source/core/fields/ddefld.cxx +++ b/sw/source/core/fields/ddefld.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ddefld.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/ddetbl.cxx b/sw/source/core/fields/ddetbl.cxx index ba496601c6..7299b80927 100644 --- a/sw/source/core/fields/ddetbl.cxx +++ b/sw/source/core/fields/ddetbl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ddetbl.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 35b4bf6331..4a4fba0eb8 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docufld.cxx,v $ - * $Revision: 1.51.16.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 311ad59135..b43747c5f7 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: expfld.cxx,v $ - * $Revision: 1.35 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index 33861fb8de..a6565383b3 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldbas.cxx,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx index f5d15510d8..321b0b5120 100644 --- a/sw/source/core/fields/flddat.cxx +++ b/sw/source/core/fields/flddat.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flddat.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/flddropdown.cxx b/sw/source/core/fields/flddropdown.cxx index af36690bda..25f7fbf722 100644 --- a/sw/source/core/fields/flddropdown.cxx +++ b/sw/source/core/fields/flddropdown.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flddropdown.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/fldlst.cxx b/sw/source/core/fields/fldlst.cxx index b8f3be064e..d47c62da4d 100644 --- a/sw/source/core/fields/fldlst.cxx +++ b/sw/source/core/fields/fldlst.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldlst.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/macrofld.cxx b/sw/source/core/fields/macrofld.cxx index 92ba9ae5a2..1471d46b29 100644 --- a/sw/source/core/fields/macrofld.cxx +++ b/sw/source/core/fields/macrofld.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: macrofld.cxx,v $ - * $Revision: 1.13.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/makefile.mk b/sw/source/core/fields/makefile.mk index 965927ed7a..280fff6aae 100644 --- a/sw/source/core/fields/makefile.mk +++ b/sw/source/core/fields/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.12 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx index 9a4542b628..3c8f35d7b3 100644 --- a/sw/source/core/fields/postithelper.cxx +++ b/sw/source/core/fields/postithelper.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: postithelper.cxx,v $ - * $Revision: 1.2.118.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 12062bb3fb..27ff35a4ae 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: reffld.cxx,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/scrptfld.cxx b/sw/source/core/fields/scrptfld.cxx index a1bc1952bc..b9e64b2d70 100644 --- a/sw/source/core/fields/scrptfld.cxx +++ b/sw/source/core/fields/scrptfld.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: scrptfld.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx index 2352fb9e1b..5b43ea2627 100644 --- a/sw/source/core/fields/tblcalc.cxx +++ b/sw/source/core/fields/tblcalc.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tblcalc.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/textapi.cxx b/sw/source/core/fields/textapi.cxx index ff794a0b6b..ad7b7c2af4 100755 --- a/sw/source/core/fields/textapi.cxx +++ b/sw/source/core/fields/textapi.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textapi.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx index 32227567a7..aff0e3801d 100644 --- a/sw/source/core/fields/usrfld.cxx +++ b/sw/source/core/fields/usrfld.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: usrfld.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index e606befaf2..69b17c3d3a 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fecopy.cxx,v $ - * $Revision: 1.53 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx index 8cca232fb4..680ec57e4c 100644 --- a/sw/source/core/frmedt/fedesc.cxx +++ b/sw/source/core/frmedt/fedesc.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fedesc.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 267ec0eb09..8fd374aedb 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fefly1.cxx,v $ - * $Revision: 1.45 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/frmedt/feflyole.cxx b/sw/source/core/frmedt/feflyole.cxx index caabbee173..d2523b70e0 100644 --- a/sw/source/core/frmedt/feflyole.cxx +++ b/sw/source/core/frmedt/feflyole.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: feflyole.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index d7e0e4e02e..124a935939 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: feshview.cxx,v $ - * $Revision: 1.61.136.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 202f223754..6e8f69618c 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fetab.cxx,v $ - * $Revision: 1.48 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index fd2939fc27..c7516d421f 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fews.cxx,v $ - * $Revision: 1.48 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/frmedt/makefile.mk b/sw/source/core/frmedt/makefile.mk index eff3bc44fd..8b277f8994 100644 --- a/sw/source/core/frmedt/makefile.mk +++ b/sw/source/core/frmedt/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.8 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 6979478c33..15c96636bc 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tblsel.cxx,v $ - * $Revision: 1.52 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/graphic/grfatr.cxx b/sw/source/core/graphic/grfatr.cxx index 66c1fd5f64..ccf92efec3 100644 --- a/sw/source/core/graphic/grfatr.cxx +++ b/sw/source/core/graphic/grfatr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: grfatr.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/graphic/makefile.mk b/sw/source/core/graphic/makefile.mk index f48c439890..bb637de666 100644 --- a/sw/source/core/graphic/makefile.mk +++ b/sw/source/core/graphic/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.9 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index f4efffd15a..ea21a11448 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndgrf.cxx,v $ - * $Revision: 1.48 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/GetMetricVal.hxx b/sw/source/core/inc/GetMetricVal.hxx index 1759e46a23..2c66a00bc4 100644 --- a/sw/source/core/inc/GetMetricVal.hxx +++ b/sw/source/core/inc/GetMetricVal.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: GetMetricVal.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx index 605b15d67c..8cd6b19e91 100644 --- a/sw/source/core/inc/MarkManager.hxx +++ b/sw/source/core/inc/MarkManager.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: $ - * $Revision: $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/SwGrammarMarkUp.hxx b/sw/source/core/inc/SwGrammarMarkUp.hxx index d662a51ead..73d4871812 100644 --- a/sw/source/core/inc/SwGrammarMarkUp.hxx +++ b/sw/source/core/inc/SwGrammarMarkUp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwGrammarMarkUp.hxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/SwPortionHandler.hxx b/sw/source/core/inc/SwPortionHandler.hxx index bd053230ff..a467aaca9a 100644 --- a/sw/source/core/inc/SwPortionHandler.hxx +++ b/sw/source/core/inc/SwPortionHandler.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwPortionHandler.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/SwXMLBlockExport.hxx b/sw/source/core/inc/SwXMLBlockExport.hxx index ded093cd4b..e2cdca658b 100644 --- a/sw/source/core/inc/SwXMLBlockExport.hxx +++ b/sw/source/core/inc/SwXMLBlockExport.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXMLBlockExport.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/SwXMLBlockImport.hxx b/sw/source/core/inc/SwXMLBlockImport.hxx index 0e8c48cc3a..6fb7e3a987 100644 --- a/sw/source/core/inc/SwXMLBlockImport.hxx +++ b/sw/source/core/inc/SwXMLBlockImport.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXMLBlockImport.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/SwXMLBlockListContext.hxx b/sw/source/core/inc/SwXMLBlockListContext.hxx index ed3ed13851..8b3ed7cf5f 100644 --- a/sw/source/core/inc/SwXMLBlockListContext.hxx +++ b/sw/source/core/inc/SwXMLBlockListContext.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXMLBlockListContext.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/SwXMLTextBlocks.hxx b/sw/source/core/inc/SwXMLTextBlocks.hxx index c660af1a17..4f4aabf775 100644 --- a/sw/source/core/inc/SwXMLTextBlocks.hxx +++ b/sw/source/core/inc/SwXMLTextBlocks.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXMLTextBlocks.hxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/SwXTextDefaults.hxx b/sw/source/core/inc/SwXTextDefaults.hxx index 7a7426cbf6..6776017b8b 100644 --- a/sw/source/core/inc/SwXTextDefaults.hxx +++ b/sw/source/core/inc/SwXTextDefaults.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXTextDefaults.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/acorrect.hxx b/sw/source/core/inc/acorrect.hxx index 7cb24ed6b8..fee4bdbc6e 100644 --- a/sw/source/core/inc/acorrect.hxx +++ b/sw/source/core/inc/acorrect.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: acorrect.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/anchoredobjectposition.hxx b/sw/source/core/inc/anchoredobjectposition.hxx index 8c98a1f89c..5296f1eecf 100644 --- a/sw/source/core/inc/anchoredobjectposition.hxx +++ b/sw/source/core/inc/anchoredobjectposition.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: anchoredobjectposition.hxx,v $ - * $Revision: 1.12.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/ascharanchoredobjectposition.hxx b/sw/source/core/inc/ascharanchoredobjectposition.hxx index 415402e5e0..66b569414a 100644 --- a/sw/source/core/inc/ascharanchoredobjectposition.hxx +++ b/sw/source/core/inc/ascharanchoredobjectposition.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ascharanchoredobjectposition.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/blink.hxx b/sw/source/core/inc/blink.hxx index 8ca7dbbc99..8c240d77a1 100644 --- a/sw/source/core/inc/blink.hxx +++ b/sw/source/core/inc/blink.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: blink.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/bodyfrm.hxx b/sw/source/core/inc/bodyfrm.hxx index 8e44fca829..7c7ed603b3 100644 --- a/sw/source/core/inc/bodyfrm.hxx +++ b/sw/source/core/inc/bodyfrm.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: bodyfrm.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx index c281e69b18..c5d48463bc 100644 --- a/sw/source/core/inc/bookmrk.hxx +++ b/sw/source/core/inc/bookmrk.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: $ - * $Revision: $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx index f23470bb7c..b3ca5e9956 100644 --- a/sw/source/core/inc/cellfrm.hxx +++ b/sw/source/core/inc/cellfrm.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cellfrm.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/cntfrm.hxx b/sw/source/core/inc/cntfrm.hxx index d24f9b5cdc..aea77372ab 100644 --- a/sw/source/core/inc/cntfrm.hxx +++ b/sw/source/core/inc/cntfrm.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cntfrm.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/colfrm.hxx b/sw/source/core/inc/colfrm.hxx index 8fbe8397e9..9f14d6f016 100644 --- a/sw/source/core/inc/colfrm.hxx +++ b/sw/source/core/inc/colfrm.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: colfrm.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/crossrefbookmark.hxx b/sw/source/core/inc/crossrefbookmark.hxx index d175b2130d..168f33f229 100644 --- a/sw/source/core/inc/crossrefbookmark.hxx +++ b/sw/source/core/inc/crossrefbookmark.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: crossrefbookmark.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/dbg_lay.hxx b/sw/source/core/inc/dbg_lay.hxx index f2be6d6d8c..f4fb85c6b8 100644 --- a/sw/source/core/inc/dbg_lay.hxx +++ b/sw/source/core/inc/dbg_lay.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbg_lay.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/dbgloop.hxx b/sw/source/core/inc/dbgloop.hxx index eb446bb4df..177bf78a08 100644 --- a/sw/source/core/inc/dbgloop.hxx +++ b/sw/source/core/inc/dbgloop.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbgloop.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx index 7f178d3ae8..c8b476d72e 100644 --- a/sw/source/core/inc/dflyobj.hxx +++ b/sw/source/core/inc/dflyobj.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dflyobj.hxx,v $ - * $Revision: 1.11.24.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/docfld.hxx b/sw/source/core/inc/docfld.hxx index e1ce44fe15..2c18cdeca7 100644 --- a/sw/source/core/inc/docfld.hxx +++ b/sw/source/core/inc/docfld.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docfld.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/docsort.hxx b/sw/source/core/inc/docsort.hxx index d67ee8c102..1298105361 100644 --- a/sw/source/core/inc/docsort.hxx +++ b/sw/source/core/inc/docsort.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docsort.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/doctxm.hxx b/sw/source/core/inc/doctxm.hxx index 174c6225fa..1f5dde7381 100644 --- a/sw/source/core/inc/doctxm.hxx +++ b/sw/source/core/inc/doctxm.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: doctxm.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/drawdev.hxx b/sw/source/core/inc/drawdev.hxx index 04687b0351..d7e1b5c886 100644 --- a/sw/source/core/inc/drawdev.hxx +++ b/sw/source/core/inc/drawdev.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drawdev.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/drawfont.hxx b/sw/source/core/inc/drawfont.hxx index d1144b0076..2ef9a5fe57 100644 --- a/sw/source/core/inc/drawfont.hxx +++ b/sw/source/core/inc/drawfont.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drawfont.hxx,v $ - * $Revision: 1.40 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/dview.hxx b/sw/source/core/inc/dview.hxx index f566a1c218..512c556d6d 100644 --- a/sw/source/core/inc/dview.hxx +++ b/sw/source/core/inc/dview.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dview.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/environmentofanchoredobject.hxx b/sw/source/core/inc/environmentofanchoredobject.hxx index ca39c31c2c..c491febc70 100644 --- a/sw/source/core/inc/environmentofanchoredobject.hxx +++ b/sw/source/core/inc/environmentofanchoredobject.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: environmentofanchoredobject.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/finalthreadmanager.hxx b/sw/source/core/inc/finalthreadmanager.hxx index a68266403a..1e5b088cac 100644 --- a/sw/source/core/inc/finalthreadmanager.hxx +++ b/sw/source/core/inc/finalthreadmanager.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: finalthreadmanager.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx index c00269fae1..3805421006 100644 --- a/sw/source/core/inc/flowfrm.hxx +++ b/sw/source/core/inc/flowfrm.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flowfrm.hxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx index 4de6f3d3d2..1ea99ac067 100644 --- a/sw/source/core/inc/flyfrm.hxx +++ b/sw/source/core/inc/flyfrm.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flyfrm.hxx,v $ - * $Revision: 1.24.212.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx index 0980bbff18..4f9987eec5 100644 --- a/sw/source/core/inc/flyfrms.hxx +++ b/sw/source/core/inc/flyfrms.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flyfrms.hxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx index d5d1c38494..1344302308 100644 --- a/sw/source/core/inc/fntcache.hxx +++ b/sw/source/core/inc/fntcache.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fntcache.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 5b84b1600a..552793dc1c 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frame.hxx,v $ - * $Revision: 1.58 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/frminf.hxx b/sw/source/core/inc/frminf.hxx index f118af8fa8..6e8e72730e 100644 --- a/sw/source/core/inc/frminf.hxx +++ b/sw/source/core/inc/frminf.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frminf.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index 1cb76b9255..b6a3da3323 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmtool.hxx,v $ - * $Revision: 1.28 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/ftnboss.hxx b/sw/source/core/inc/ftnboss.hxx index 41e0200aef..3afb4a508a 100644 --- a/sw/source/core/inc/ftnboss.hxx +++ b/sw/source/core/inc/ftnboss.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ftnboss.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/ftnfrm.hxx b/sw/source/core/inc/ftnfrm.hxx index 8702569b98..74e346c575 100644 --- a/sw/source/core/inc/ftnfrm.hxx +++ b/sw/source/core/inc/ftnfrm.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ftnfrm.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/hffrm.hxx b/sw/source/core/inc/hffrm.hxx index 68b78e5d7e..06a76dfecd 100644 --- a/sw/source/core/inc/hffrm.hxx +++ b/sw/source/core/inc/hffrm.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: hffrm.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/ifinishedthreadlistener.hxx b/sw/source/core/inc/ifinishedthreadlistener.hxx index 1215deb267..429f62ae37 100644 --- a/sw/source/core/inc/ifinishedthreadlistener.hxx +++ b/sw/source/core/inc/ifinishedthreadlistener.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ifinishedthreadlistener.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/ithreadlistenerowner.hxx b/sw/source/core/inc/ithreadlistenerowner.hxx index 3f0e8dd697..2c93daa266 100644 --- a/sw/source/core/inc/ithreadlistenerowner.hxx +++ b/sw/source/core/inc/ithreadlistenerowner.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ithreadlistenerowner.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx index 439c2e8b28..b7b360395d 100644 --- a/sw/source/core/inc/layact.hxx +++ b/sw/source/core/inc/layact.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: layact.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/laycache.hxx b/sw/source/core/inc/laycache.hxx index 336d680835..a2250a8c7b 100644 --- a/sw/source/core/inc/laycache.hxx +++ b/sw/source/core/inc/laycache.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: laycache.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx index 579acf1882..9ade91ac84 100644 --- a/sw/source/core/inc/layfrm.hxx +++ b/sw/source/core/inc/layfrm.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: layfrm.hxx,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/layouter.hxx b/sw/source/core/inc/layouter.hxx index 3101ecba2e..8dde3c43d2 100644 --- a/sw/source/core/inc/layouter.hxx +++ b/sw/source/core/inc/layouter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: layouter.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/makefile.mk b/sw/source/core/inc/makefile.mk index 3c33d006ed..1b35ca4954 100644 --- a/sw/source/core/inc/makefile.mk +++ b/sw/source/core/inc/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/movedfwdfrmsbyobjpos.hxx b/sw/source/core/inc/movedfwdfrmsbyobjpos.hxx index d8d748226f..36ac1b89de 100644 --- a/sw/source/core/inc/movedfwdfrmsbyobjpos.hxx +++ b/sw/source/core/inc/movedfwdfrmsbyobjpos.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: movedfwdfrmsbyobjpos.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx index 9efae5c769..0f821849cb 100644 --- a/sw/source/core/inc/mvsave.hxx +++ b/sw/source/core/inc/mvsave.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mvsave.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/node2lay.hxx b/sw/source/core/inc/node2lay.hxx index 3b530ccdf8..42bbfe77a4 100644 --- a/sw/source/core/inc/node2lay.hxx +++ b/sw/source/core/inc/node2lay.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: node2lay.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/noteurl.hxx b/sw/source/core/inc/noteurl.hxx index 68909e562e..088f5ba06c 100644 --- a/sw/source/core/inc/noteurl.hxx +++ b/sw/source/core/inc/noteurl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: noteurl.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx index 10a9af2812..0da68a3a53 100644 --- a/sw/source/core/inc/notxtfrm.hxx +++ b/sw/source/core/inc/notxtfrm.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: notxtfrm.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/objectformatter.hxx b/sw/source/core/inc/objectformatter.hxx index 3ad7764d95..fe2e7edadd 100644 --- a/sw/source/core/inc/objectformatter.hxx +++ b/sw/source/core/inc/objectformatter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: objectformatter.hxx,v $ - * $Revision: 1.8.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/observablethread.hxx b/sw/source/core/inc/observablethread.hxx index cb098e4dd3..9d4beb18f4 100644 --- a/sw/source/core/inc/observablethread.hxx +++ b/sw/source/core/inc/observablethread.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: observablethread.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx index fb9da90497..ab152f1fb4 100644 --- a/sw/source/core/inc/pagefrm.hxx +++ b/sw/source/core/inc/pagefrm.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pagefrm.hxx,v $ - * $Revision: 1.25.144.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/pamtyp.hxx b/sw/source/core/inc/pamtyp.hxx index ac3fd48fbf..989b9506a1 100644 --- a/sw/source/core/inc/pamtyp.hxx +++ b/sw/source/core/inc/pamtyp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pamtyp.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/ptqueue.hxx b/sw/source/core/inc/ptqueue.hxx index d6d4b09882..f847d8be9c 100644 --- a/sw/source/core/inc/ptqueue.hxx +++ b/sw/source/core/inc/ptqueue.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ptqueue.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/retrievedinputstreamdata.hxx b/sw/source/core/inc/retrievedinputstreamdata.hxx index d1548176db..c1dac2c84c 100644 --- a/sw/source/core/inc/retrievedinputstreamdata.hxx +++ b/sw/source/core/inc/retrievedinputstreamdata.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: retrievedinputstreamdata.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/retrieveinputstream.hxx b/sw/source/core/inc/retrieveinputstream.hxx index 54907603b6..86d22fc68d 100644 --- a/sw/source/core/inc/retrieveinputstream.hxx +++ b/sw/source/core/inc/retrieveinputstream.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: retrieveinputstream.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/retrieveinputstreamconsumer.hxx b/sw/source/core/inc/retrieveinputstreamconsumer.hxx index 39058b690a..e49dbe6cf9 100644 --- a/sw/source/core/inc/retrieveinputstreamconsumer.hxx +++ b/sw/source/core/inc/retrieveinputstreamconsumer.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: retrieveinputstreamconsumer.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx index 899995a7df..5de7604ae7 100644 --- a/sw/source/core/inc/rootfrm.hxx +++ b/sw/source/core/inc/rootfrm.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rootfrm.hxx,v $ - * $Revision: 1.29 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/rowfrm.hxx b/sw/source/core/inc/rowfrm.hxx index 0f0a61e1b0..22375c7788 100644 --- a/sw/source/core/inc/rowfrm.hxx +++ b/sw/source/core/inc/rowfrm.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rowfrm.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx index 9c875a8a70..efeb702ad9 100644 --- a/sw/source/core/inc/scriptinfo.hxx +++ b/sw/source/core/inc/scriptinfo.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: scriptinfo.hxx,v $ - * $Revision: 1.21.112.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/scrrect.hxx b/sw/source/core/inc/scrrect.hxx index e3827e1d17..b880f3ed33 100644 --- a/sw/source/core/inc/scrrect.hxx +++ b/sw/source/core/inc/scrrect.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: scrrect.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx index 46adcf260c..a00b2510fc 100644 --- a/sw/source/core/inc/sectfrm.hxx +++ b/sw/source/core/inc/sectfrm.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sectfrm.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/setmapvirtdev.hxx b/sw/source/core/inc/setmapvirtdev.hxx index 2db1e229fd..7839db618a 100644 --- a/sw/source/core/inc/setmapvirtdev.hxx +++ b/sw/source/core/inc/setmapvirtdev.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: setmapvirtdev.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/sortedobjs.hxx b/sw/source/core/inc/sortedobjs.hxx index 86c4ceb84f..b6a7cbcdf5 100644 --- a/sw/source/core/inc/sortedobjs.hxx +++ b/sw/source/core/inc/sortedobjs.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sortedobjs.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/sortedobjsimpl.hxx b/sw/source/core/inc/sortedobjsimpl.hxx index fb5404cbe5..ee12de32b0 100644 --- a/sw/source/core/inc/sortedobjsimpl.hxx +++ b/sw/source/core/inc/sortedobjsimpl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sortedobjsimpl.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx index c994dc8be9..e0a699c1b2 100644 --- a/sw/source/core/inc/swblocks.hxx +++ b/sw/source/core/inc/swblocks.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swblocks.hxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx index bc4f5d34ac..73cd1ec53d 100644 --- a/sw/source/core/inc/swcache.hxx +++ b/sw/source/core/inc/swcache.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swcache.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/swfntcch.hxx b/sw/source/core/inc/swfntcch.hxx index 3f5c861d60..a54f627393 100644 --- a/sw/source/core/inc/swfntcch.hxx +++ b/sw/source/core/inc/swfntcch.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swfntcch.hxx,v $ - * $Revision: 1.7.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx index 9cd9e16ac7..6cfe4737df 100644 --- a/sw/source/core/inc/swfont.hxx +++ b/sw/source/core/inc/swfont.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swfont.hxx,v $ - * $Revision: 1.37.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/swselectionlist.hxx b/sw/source/core/inc/swselectionlist.hxx index 22253bfa71..f6c1a83259 100644 --- a/sw/source/core/inc/swselectionlist.hxx +++ b/sw/source/core/inc/swselectionlist.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swselectionlist.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/swthreadjoiner.hxx b/sw/source/core/inc/swthreadjoiner.hxx index 0f88eba84a..83cccdc36e 100644 --- a/sw/source/core/inc/swthreadjoiner.hxx +++ b/sw/source/core/inc/swthreadjoiner.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swthreadjoiner.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/swthreadmanager.hxx b/sw/source/core/inc/swthreadmanager.hxx index 1029efb217..f6c0514007 100644 --- a/sw/source/core/inc/swthreadmanager.hxx +++ b/sw/source/core/inc/swthreadmanager.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swthreadmanager.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx index 7620848a9f..0383152d00 100644 --- a/sw/source/core/inc/tabfrm.hxx +++ b/sw/source/core/inc/tabfrm.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tabfrm.hxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/tblrwcl.hxx b/sw/source/core/inc/tblrwcl.hxx index a909a02fd9..c80cac0405 100644 --- a/sw/source/core/inc/tblrwcl.hxx +++ b/sw/source/core/inc/tblrwcl.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tblrwcl.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/textapi.hxx b/sw/source/core/inc/textapi.hxx index 722c5e4122..bad3d841a2 100755 --- a/sw/source/core/inc/textapi.hxx +++ b/sw/source/core/inc/textapi.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textapi.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/threadlistener.hxx b/sw/source/core/inc/threadlistener.hxx index 7b4b2b3ad5..d53b85008b 100644 --- a/sw/source/core/inc/threadlistener.hxx +++ b/sw/source/core/inc/threadlistener.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: threadlistener.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/threadmanager.hxx b/sw/source/core/inc/threadmanager.hxx index b2ba34258a..14dbc0b057 100644 --- a/sw/source/core/inc/threadmanager.hxx +++ b/sw/source/core/inc/threadmanager.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: threadmanager.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/tocntntanchoredobjectposition.hxx b/sw/source/core/inc/tocntntanchoredobjectposition.hxx index 4ae5d0e6d9..639e3d5286 100644 --- a/sw/source/core/inc/tocntntanchoredobjectposition.hxx +++ b/sw/source/core/inc/tocntntanchoredobjectposition.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tocntntanchoredobjectposition.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/tolayoutanchoredobjectposition.hxx b/sw/source/core/inc/tolayoutanchoredobjectposition.hxx index 71becb9e1e..468786aec6 100644 --- a/sw/source/core/inc/tolayoutanchoredobjectposition.hxx +++ b/sw/source/core/inc/tolayoutanchoredobjectposition.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tolayoutanchoredobjectposition.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/toxhlp.hxx b/sw/source/core/inc/toxhlp.hxx index 638c69c652..51b1d8013a 100644 --- a/sw/source/core/inc/toxhlp.hxx +++ b/sw/source/core/inc/toxhlp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: toxhlp.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx index 0427138f98..ca494527fc 100644 --- a/sw/source/core/inc/txmsrt.hxx +++ b/sw/source/core/inc/txmsrt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txmsrt.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index fa57b4aacf..bde145fc06 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtfrm.hxx,v $ - * $Revision: 1.56.110.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/txttypes.hxx b/sw/source/core/inc/txttypes.hxx index eaa9a95a9c..b545e24677 100644 --- a/sw/source/core/inc/txttypes.hxx +++ b/sw/source/core/inc/txttypes.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txttypes.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/undoflystrattr.hxx b/sw/source/core/inc/undoflystrattr.hxx index 86bffc64bd..28b205a827 100644 --- a/sw/source/core/inc/undoflystrattr.hxx +++ b/sw/source/core/inc/undoflystrattr.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwUndoPageDesc.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/unofldmid.h b/sw/source/core/inc/unofldmid.h index 7cac35e138..c97f43785c 100644 --- a/sw/source/core/inc/unofldmid.h +++ b/sw/source/core/inc/unofldmid.h @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unofldmid.h,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/unometa.hxx b/sw/source/core/inc/unometa.hxx index 39f81caa90..3728925270 100755 --- a/sw/source/core/inc/unometa.hxx +++ b/sw/source/core/inc/unometa.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unometa.hxx,v $ - * $Revision: 1.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx index 84d0ac738d..5092ede30e 100644 --- a/sw/source/core/inc/viewimp.hxx +++ b/sw/source/core/inc/viewimp.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewimp.hxx,v $ - * $Revision: 1.36.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/visiturl.hxx b/sw/source/core/inc/visiturl.hxx index 59c7239959..3e77783b2a 100644 --- a/sw/source/core/inc/visiturl.hxx +++ b/sw/source/core/inc/visiturl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: visiturl.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx index 50aa25d1a5..e4e0ba33f9 100644 --- a/sw/source/core/inc/wrong.hxx +++ b/sw/source/core/inc/wrong.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrong.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx index 7762216928..7bba94cd49 100644 --- a/sw/source/core/layout/anchoreddrawobject.cxx +++ b/sw/source/core/layout/anchoreddrawobject.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: anchoreddrawobject.cxx,v $ - * $Revision: 1.26.144.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx index 25aee1b555..8704bb0e05 100644 --- a/sw/source/core/layout/anchoredobject.cxx +++ b/sw/source/core/layout/anchoredobject.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: anchoredobject.cxx,v $ - * $Revision: 1.27.212.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index a8519847d2..98f6d7212f 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: atrfrm.cxx,v $ - * $Revision: 1.72.144.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 02f901a3fc..b59bb2689f 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: calcmove.cxx,v $ - * $Revision: 1.73.252.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx index 8515889c10..3d6479fc39 100644 --- a/sw/source/core/layout/colfrm.cxx +++ b/sw/source/core/layout/colfrm.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: colfrm.cxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index 35cf44542f..4f53e680bc 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbg_lay.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index e192364635..1f7856c192 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: findfrm.cxx,v $ - * $Revision: 1.48 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 1073421e01..568532cf53 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flowfrm.cxx,v $ - * $Revision: 1.71 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 83909c17ed..5d9ca68ee1 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fly.cxx,v $ - * $Revision: 1.92.110.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index ece6233db2..79d8fbaf7d 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flycnt.cxx,v $ - * $Revision: 1.66 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx index 0efea0085e..7956827165 100644 --- a/sw/source/core/layout/flyincnt.cxx +++ b/sw/source/core/layout/flyincnt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flyincnt.cxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index 61654a68c2..ca62621da0 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flylay.cxx,v $ - * $Revision: 1.55 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/flypos.cxx b/sw/source/core/layout/flypos.cxx index 27571f6527..68ec82b436 100644 --- a/sw/source/core/layout/flypos.cxx +++ b/sw/source/core/layout/flypos.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flypos.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 8593e53dee..d8f9eb4dac 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmtool.cxx,v $ - * $Revision: 1.107 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index d413deeb86..4af8e3a86f 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ftnfrm.cxx,v $ - * $Revision: 1.36 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx index c766427f4a..91b03d2994 100644 --- a/sw/source/core/layout/hffrm.cxx +++ b/sw/source/core/layout/hffrm.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: hffrm.cxx,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 5eb767a656..89b32959dd 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: layact.cxx,v $ - * $Revision: 1.75 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index 767a16abb3..62ca54d3cb 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: laycache.cxx,v $ - * $Revision: 1.31 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx index 0d8c5feaf1..5965d0b9ab 100644 --- a/sw/source/core/layout/layhelp.hxx +++ b/sw/source/core/layout/layhelp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: layhelp.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx index 99bb2a5763..a052a482e6 100644 --- a/sw/source/core/layout/layouter.cxx +++ b/sw/source/core/layout/layouter.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: layouter.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/makefile.mk b/sw/source/core/layout/makefile.mk index 234ee77c55..7019203aa2 100644 --- a/sw/source/core/layout/makefile.mk +++ b/sw/source/core/layout/makefile.mk @@ -1,15 +1,11 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.20 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx b/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx index 02c3c09efa..d894652e01 100644 --- a/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx +++ b/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: movedfwdfrmsbyobjpos.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index 3abc28b7e2..b8f04d8649 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: newfrm.cxx,v $ - * $Revision: 1.33 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx index a89e2cd07e..3315fd5149 100644 --- a/sw/source/core/layout/objectformatter.cxx +++ b/sw/source/core/layout/objectformatter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: objectformatter.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/objectformatterlayfrm.cxx b/sw/source/core/layout/objectformatterlayfrm.cxx index 5e64949073..e2ae6e0dec 100644 --- a/sw/source/core/layout/objectformatterlayfrm.cxx +++ b/sw/source/core/layout/objectformatterlayfrm.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: objectformatterlayfrm.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/objectformatterlayfrm.hxx b/sw/source/core/layout/objectformatterlayfrm.hxx index 70c71bafd1..2e0da29151 100644 --- a/sw/source/core/layout/objectformatterlayfrm.hxx +++ b/sw/source/core/layout/objectformatterlayfrm.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: objectformatterlayfrm.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx index c1956e4b22..9c044e11e0 100644 --- a/sw/source/core/layout/objectformattertxtfrm.cxx +++ b/sw/source/core/layout/objectformattertxtfrm.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: objectformattertxtfrm.cxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/objectformattertxtfrm.hxx b/sw/source/core/layout/objectformattertxtfrm.hxx index a4d8426011..1e509a0560 100644 --- a/sw/source/core/layout/objectformattertxtfrm.hxx +++ b/sw/source/core/layout/objectformattertxtfrm.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: objectformattertxtfrm.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/objstmpconsiderwrapinfl.cxx b/sw/source/core/layout/objstmpconsiderwrapinfl.cxx index 76bb81e40d..68589b67c5 100644 --- a/sw/source/core/layout/objstmpconsiderwrapinfl.cxx +++ b/sw/source/core/layout/objstmpconsiderwrapinfl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: objstmpconsiderwrapinfl.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/objstmpconsiderwrapinfl.hxx b/sw/source/core/layout/objstmpconsiderwrapinfl.hxx index f9843141bd..840066086b 100644 --- a/sw/source/core/layout/objstmpconsiderwrapinfl.hxx +++ b/sw/source/core/layout/objstmpconsiderwrapinfl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: objstmpconsiderwrapinfl.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 42f9208d6a..08ffb41c97 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pagechg.cxx,v $ - * $Revision: 1.57 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx index f47ee65f12..36cb638cf9 100644 --- a/sw/source/core/layout/pagedesc.cxx +++ b/sw/source/core/layout/pagedesc.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pagedesc.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 3a2948a8be..880d625bc1 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: paintfrm.cxx,v $ - * $Revision: 1.121.110.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index e06b2751b3..6f95840cff 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sectfrm.cxx,v $ - * $Revision: 1.55 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/softpagebreak.cxx b/sw/source/core/layout/softpagebreak.cxx index 40ac959ee0..c9f231762d 100644 --- a/sw/source/core/layout/softpagebreak.cxx +++ b/sw/source/core/layout/softpagebreak.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: softpagebreak.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/sortedobjs.cxx b/sw/source/core/layout/sortedobjs.cxx index 0305978cb3..03279e7410 100644 --- a/sw/source/core/layout/sortedobjs.cxx +++ b/sw/source/core/layout/sortedobjs.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sortedobjs.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/sortedobjsimpl.cxx b/sw/source/core/layout/sortedobjsimpl.cxx index 024e35a355..e9374704b7 100644 --- a/sw/source/core/layout/sortedobjsimpl.cxx +++ b/sw/source/core/layout/sortedobjsimpl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sortedobjsimpl.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index 21b78c69eb..2ce9e3d128 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ssfrm.cxx,v $ - * $Revision: 1.51 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/swselectionlist.cxx b/sw/source/core/layout/swselectionlist.cxx index 50a149cb74..3ed327cd0d 100644 --- a/sw/source/core/layout/swselectionlist.cxx +++ b/sw/source/core/layout/swselectionlist.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swselectionlist.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index ed95d13c43..075d48e420 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tabfrm.cxx,v $ - * $Revision: 1.105.58.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index ba43b3a096..02a1f9eb84 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: trvlfrm.cxx,v $ - * $Revision: 1.63 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx index bbbf10a090..1c5d00a744 100644 --- a/sw/source/core/layout/unusedf.cxx +++ b/sw/source/core/layout/unusedf.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unusedf.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/virtoutp.cxx b/sw/source/core/layout/virtoutp.cxx index 61877ab397..f82dfa2ab4 100644 --- a/sw/source/core/layout/virtoutp.cxx +++ b/sw/source/core/layout/virtoutp.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: virtoutp.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/virtoutp.hxx b/sw/source/core/layout/virtoutp.hxx index 96c020640f..378e44b78a 100644 --- a/sw/source/core/layout/virtoutp.hxx +++ b/sw/source/core/layout/virtoutp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: virtoutp.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index f2e0671866..7f1f17c655 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wsfrm.cxx,v $ - * $Revision: 1.86.124.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/makefile.mk b/sw/source/core/makefile.mk index d87e67b218..2701445fb8 100644 --- a/sw/source/core/makefile.mk +++ b/sw/source/core/makefile.mk @@ -1,15 +1,11 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.15 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index 4b1b751fa7..6f7dea5000 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: anchoredobjectposition.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx index 40f0c5d727..a28672b46e 100644 --- a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ascharanchoredobjectposition.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/objectpositioning/environmentofanchoredobject.cxx b/sw/source/core/objectpositioning/environmentofanchoredobject.cxx index 01119a9ba3..516e64c2ea 100644 --- a/sw/source/core/objectpositioning/environmentofanchoredobject.cxx +++ b/sw/source/core/objectpositioning/environmentofanchoredobject.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: environmentofanchoredobject.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/objectpositioning/makefile.mk b/sw/source/core/objectpositioning/makefile.mk index 41a695581b..4192414d9b 100644 --- a/sw/source/core/objectpositioning/makefile.mk +++ b/sw/source/core/objectpositioning/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index f1e317dac4..a156dd22ab 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tocntntanchoredobjectposition.cxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx index 99a5cf2a6d..74f282a15c 100644 --- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tolayoutanchoredobjectposition.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/ole/makefile.mk b/sw/source/core/ole/makefile.mk index b859c16dbc..8aaf9ed419 100644 --- a/sw/source/core/ole/makefile.mk +++ b/sw/source/core/ole/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.5 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 3ed18d128b..97e98ebc3c 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndole.cxx,v $ - * $Revision: 1.44 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/para/makefile.mk b/sw/source/core/para/makefile.mk index 648e647bee..7005bf0e98 100644 --- a/sw/source/core/para/makefile.mk +++ b/sw/source/core/para/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx index fd03467c01..e29c02eb6e 100644 --- a/sw/source/core/para/paratr.cxx +++ b/sw/source/core/para/paratr.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: paratr.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/sw3io/makefile.mk b/sw/source/core/sw3io/makefile.mk index b5bb1faaf4..01a50f5df7 100644 --- a/sw/source/core/sw3io/makefile.mk +++ b/sw/source/core/sw3io/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.7 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/sw3io/sw3convert.cxx b/sw/source/core/sw3io/sw3convert.cxx index 35a72dc8e2..2080cdb38e 100644 --- a/sw/source/core/sw3io/sw3convert.cxx +++ b/sw/source/core/sw3io/sw3convert.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sw3convert.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/sw3io/swacorr.cxx b/sw/source/core/sw3io/swacorr.cxx index 4d7fa4f325..93b6c52e85 100644 --- a/sw/source/core/sw3io/swacorr.cxx +++ b/sw/source/core/sw3io/swacorr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swacorr.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/swg/SwXMLBlockExport.cxx b/sw/source/core/swg/SwXMLBlockExport.cxx index c672c41a19..7ab6588ab3 100644 --- a/sw/source/core/swg/SwXMLBlockExport.cxx +++ b/sw/source/core/swg/SwXMLBlockExport.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXMLBlockExport.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/swg/SwXMLBlockImport.cxx b/sw/source/core/swg/SwXMLBlockImport.cxx index 32ec8376a3..fc23257abb 100644 --- a/sw/source/core/swg/SwXMLBlockImport.cxx +++ b/sw/source/core/swg/SwXMLBlockImport.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXMLBlockImport.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/swg/SwXMLBlockListContext.cxx b/sw/source/core/swg/SwXMLBlockListContext.cxx index ba23ea6e58..b331065484 100644 --- a/sw/source/core/swg/SwXMLBlockListContext.cxx +++ b/sw/source/core/swg/SwXMLBlockListContext.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXMLBlockListContext.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx index 07a1781116..bf167dba29 100644 --- a/sw/source/core/swg/SwXMLSectionList.cxx +++ b/sw/source/core/swg/SwXMLSectionList.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXMLSectionList.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx index 8eba626632..8c078d53aa 100644 --- a/sw/source/core/swg/SwXMLTextBlocks.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXMLTextBlocks.cxx,v $ - * $Revision: 1.39.136.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx index 8fff214edd..dac78f4e59 100644 --- a/sw/source/core/swg/SwXMLTextBlocks1.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXMLTextBlocks1.cxx,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/swg/makefile.mk b/sw/source/core/swg/makefile.mk index 38811cf717..c7aa25ec5d 100644 --- a/sw/source/core/swg/makefile.mk +++ b/sw/source/core/swg/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.11 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx index f9f8f07f1c..120a25cb65 100644 --- a/sw/source/core/swg/swblocks.cxx +++ b/sw/source/core/swg/swblocks.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swblocks.cxx,v $ - * $Revision: 1.25 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/table/makefile.mk b/sw/source/core/table/makefile.mk index 8b6e1d3815..d63101e30a 100644 --- a/sw/source/core/table/makefile.mk +++ b/sw/source/core/table/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx index cf1d6a8ed2..d6c6f20620 100644 --- a/sw/source/core/table/swnewtable.cxx +++ b/sw/source/core/table/swnewtable.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swnewtable.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 67361127e8..3347ec13c8 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swtable.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 5dd37c429e..f0cc9e13cb 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: EnhancedPDFExportHelper.cxx,v $ - * $Revision: 1.26.138.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/SwGrammarMarkUp.cxx b/sw/source/core/text/SwGrammarMarkUp.cxx index e060f4f59c..30240dadd5 100644 --- a/sw/source/core/text/SwGrammarMarkUp.cxx +++ b/sw/source/core/text/SwGrammarMarkUp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwGrammarMarkUp.cxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx index 4d9a2909d2..e1b0311f61 100644 --- a/sw/source/core/text/atrhndl.hxx +++ b/sw/source/core/text/atrhndl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: atrhndl.hxx,v $ - * $Revision: 1.5.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx index 23e2a0e8e2..2622d8c251 100644 --- a/sw/source/core/text/atrstck.cxx +++ b/sw/source/core/text/atrstck.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: atrstck.cxx,v $ - * $Revision: 1.30.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/blink.cxx b/sw/source/core/text/blink.cxx index f06345c2e2..c127568c5d 100644 --- a/sw/source/core/text/blink.cxx +++ b/sw/source/core/text/blink.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: blink.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index 33abb7b176..a2283f1bc1 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmcrsr.cxx,v $ - * $Revision: 1.44.212.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index d396a7e247..d357bc18f7 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmform.cxx,v $ - * $Revision: 1.71 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx index d310912075..3bfdb03eb7 100644 --- a/sw/source/core/text/frminf.cxx +++ b/sw/source/core/text/frminf.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frminf.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index dde34d4215..fb2a11ef7f 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmpaint.cxx,v $ - * $Revision: 1.60.68.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx index b1c2eaefb5..298dd792b1 100644 --- a/sw/source/core/text/guess.cxx +++ b/sw/source/core/text/guess.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: guess.cxx,v $ - * $Revision: 1.50 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/guess.hxx b/sw/source/core/text/guess.hxx index 753b214f0e..4b86f76750 100644 --- a/sw/source/core/text/guess.hxx +++ b/sw/source/core/text/guess.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: guess.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index f374020964..1b9f0437c6 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: inftxt.cxx,v $ - * $Revision: 1.123.20.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index c03a94d090..d1276213c7 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: inftxt.hxx,v $ - * $Revision: 1.60 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx index b4b16d3f3e..a38d137ee9 100644 --- a/sw/source/core/text/itradj.cxx +++ b/sw/source/core/text/itradj.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: itradj.cxx,v $ - * $Revision: 1.24.112.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index b02f0310e4..a686dd6a1e 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: itratr.cxx,v $ - * $Revision: 1.40 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx index 80e877dccf..fc960d0002 100644 --- a/sw/source/core/text/itratr.hxx +++ b/sw/source/core/text/itratr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: itratr.hxx,v $ - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx index b40398463f..631a577d38 100644 --- a/sw/source/core/text/itrcrsr.cxx +++ b/sw/source/core/text/itrcrsr.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: itrcrsr.cxx,v $ - * $Revision: 1.81.40.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 40c5b05cd5..64cfc2374d 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: itrform2.cxx,v $ - * $Revision: 1.107.20.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/itrform2.hxx b/sw/source/core/text/itrform2.hxx index ec6fce1958..3b0f1a0f86 100644 --- a/sw/source/core/text/itrform2.hxx +++ b/sw/source/core/text/itrform2.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: itrform2.hxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx index 3bed270774..598e4eed8d 100644 --- a/sw/source/core/text/itrpaint.cxx +++ b/sw/source/core/text/itrpaint.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: itrpaint.cxx,v $ - * $Revision: 1.47.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/itrpaint.hxx b/sw/source/core/text/itrpaint.hxx index c366ca7a65..9eb0604e09 100644 --- a/sw/source/core/text/itrpaint.hxx +++ b/sw/source/core/text/itrpaint.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: itrpaint.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx index 5919ff1b1a..7cbac4a4a7 100644 --- a/sw/source/core/text/itrtxt.cxx +++ b/sw/source/core/text/itrtxt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: itrtxt.cxx,v $ - * $Revision: 1.34 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx index 021741ea4a..4ad84d201d 100644 --- a/sw/source/core/text/itrtxt.hxx +++ b/sw/source/core/text/itrtxt.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: itrtxt.hxx,v $ - * $Revision: 1.21.40.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/makefile.mk b/sw/source/core/text/makefile.mk index d710c97979..0076a17487 100644 --- a/sw/source/core/text/makefile.mk +++ b/sw/source/core/text/makefile.mk @@ -1,15 +1,11 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.16 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/noteurl.cxx b/sw/source/core/text/noteurl.cxx index 25e3c0da06..5a2f16280b 100644 --- a/sw/source/core/text/noteurl.cxx +++ b/sw/source/core/text/noteurl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: noteurl.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx index 7e87671a9a..03f908a2c1 100644 --- a/sw/source/core/text/pordrop.hxx +++ b/sw/source/core/text/pordrop.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pordrop.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx index cef17646f7..15df50d761 100644 --- a/sw/source/core/text/porexp.cxx +++ b/sw/source/core/text/porexp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porexp.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porexp.hxx b/sw/source/core/text/porexp.hxx index 165d95da9f..d3aff44646 100644 --- a/sw/source/core/text/porexp.hxx +++ b/sw/source/core/text/porexp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porexp.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 913ca9e393..5ec2d65986 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porfld.cxx,v $ - * $Revision: 1.62.110.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx index 5f52d45631..a77f7eec50 100644 --- a/sw/source/core/text/porfld.hxx +++ b/sw/source/core/text/porfld.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porfld.hxx,v $ - * $Revision: 1.16.100.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx index c8fba54dbc..e828c57a64 100644 --- a/sw/source/core/text/porfly.cxx +++ b/sw/source/core/text/porfly.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porfly.cxx,v $ - * $Revision: 1.38 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porfly.hxx b/sw/source/core/text/porfly.hxx index 7f754ef94f..86adb7dfaa 100644 --- a/sw/source/core/text/porfly.hxx +++ b/sw/source/core/text/porfly.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porfly.hxx,v $ - * $Revision: 1.14.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porftn.hxx b/sw/source/core/text/porftn.hxx index c25b86574f..5aa6a03c56 100644 --- a/sw/source/core/text/porftn.hxx +++ b/sw/source/core/text/porftn.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porftn.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx index f207c80ad8..a4fc537108 100644 --- a/sw/source/core/text/porglue.cxx +++ b/sw/source/core/text/porglue.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porglue.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porglue.hxx b/sw/source/core/text/porglue.hxx index 8c31c03526..d75faf86a0 100644 --- a/sw/source/core/text/porglue.hxx +++ b/sw/source/core/text/porglue.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porglue.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porhyph.hxx b/sw/source/core/text/porhyph.hxx index 8448e748f7..ad9af7e0f7 100644 --- a/sw/source/core/text/porhyph.hxx +++ b/sw/source/core/text/porhyph.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porhyph.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 73ad538c74..cd41563259 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -1,8 +1,8 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx index e2345e5ecf..84c9e48a15 100644 --- a/sw/source/core/text/porlay.hxx +++ b/sw/source/core/text/porlay.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porlay.hxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx index ba32938900..71f2c20b83 100644 --- a/sw/source/core/text/porlin.cxx +++ b/sw/source/core/text/porlin.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porlin.cxx,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx index e21d07b9f4..119ec7d3b0 100644 --- a/sw/source/core/text/porlin.hxx +++ b/sw/source/core/text/porlin.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porlin.hxx,v $ - * $Revision: 1.17.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index ea8b756212..20e2b54e51 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pormulti.cxx,v $ - * $Revision: 1.89.112.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx index 54395bf5c6..5e271fa0cc 100644 --- a/sw/source/core/text/pormulti.hxx +++ b/sw/source/core/text/pormulti.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pormulti.hxx,v $ - * $Revision: 1.26.112.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porref.cxx b/sw/source/core/text/porref.cxx index 967d738a07..7ccd76c074 100644 --- a/sw/source/core/text/porref.cxx +++ b/sw/source/core/text/porref.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porref.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porref.hxx b/sw/source/core/text/porref.hxx index ed5da4cf67..9af20f9b63 100644 --- a/sw/source/core/text/porref.hxx +++ b/sw/source/core/text/porref.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porref.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx index 0fa509e517..d5f42aaf6a 100644 --- a/sw/source/core/text/porrst.cxx +++ b/sw/source/core/text/porrst.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porrst.cxx,v $ - * $Revision: 1.44 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/porrst.hxx b/sw/source/core/text/porrst.hxx index ce97aa1be5..fbbfb02709 100644 --- a/sw/source/core/text/porrst.hxx +++ b/sw/source/core/text/porrst.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: porrst.hxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/portab.hxx b/sw/source/core/text/portab.hxx index 547eb1fb51..9c1957f949 100644 --- a/sw/source/core/text/portab.hxx +++ b/sw/source/core/text/portab.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: portab.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/portox.cxx b/sw/source/core/text/portox.cxx index e1d1da20b0..d358cd0411 100644 --- a/sw/source/core/text/portox.cxx +++ b/sw/source/core/text/portox.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: portox.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/portox.hxx b/sw/source/core/text/portox.hxx index 3426cc0901..d2c1228753 100644 --- a/sw/source/core/text/portox.hxx +++ b/sw/source/core/text/portox.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: portox.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 6eeb5492e2..7a0e8ec6d1 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: portxt.cxx,v $ - * $Revision: 1.51.112.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/portxt.hxx b/sw/source/core/text/portxt.hxx index 240d40acca..d6133eafed 100644 --- a/sw/source/core/text/portxt.hxx +++ b/sw/source/core/text/portxt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: portxt.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/possiz.hxx b/sw/source/core/text/possiz.hxx index 4f09146cf9..ffcb2fa872 100644 --- a/sw/source/core/text/possiz.hxx +++ b/sw/source/core/text/possiz.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: possiz.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx index 2563b10615..4257c7ad23 100644 --- a/sw/source/core/text/redlnitr.cxx +++ b/sw/source/core/text/redlnitr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: redlnitr.cxx,v $ - * $Revision: 1.42 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/redlnitr.hxx b/sw/source/core/text/redlnitr.hxx index f172b4fa3e..756ef61024 100644 --- a/sw/source/core/text/redlnitr.hxx +++ b/sw/source/core/text/redlnitr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: redlnitr.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/txtcache.cxx b/sw/source/core/text/txtcache.cxx index 79d87f6811..8b2eb4d9c8 100644 --- a/sw/source/core/text/txtcache.cxx +++ b/sw/source/core/text/txtcache.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtcache.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/txtcache.hxx b/sw/source/core/text/txtcache.hxx index 7604edfbd1..c9c23f2bef 100644 --- a/sw/source/core/text/txtcache.hxx +++ b/sw/source/core/text/txtcache.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtcache.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/txtcfg.hxx b/sw/source/core/text/txtcfg.hxx index 57a5050588..829195591c 100644 --- a/sw/source/core/text/txtcfg.hxx +++ b/sw/source/core/text/txtcfg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtcfg.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx index 475beaecb3..488fca171f 100644 --- a/sw/source/core/text/txtdrop.cxx +++ b/sw/source/core/text/txtdrop.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtdrop.cxx,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index 4eae178d3e..64d20d0d4c 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtfld.cxx,v $ - * $Revision: 1.30.136.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index 4604129abf..1f5db72435 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtfly.cxx,v $ - * $Revision: 1.65.22.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/txtfly.hxx b/sw/source/core/text/txtfly.hxx index 899d260902..f325ee3a5a 100644 --- a/sw/source/core/text/txtfly.hxx +++ b/sw/source/core/text/txtfly.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtfly.hxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index d7a82edd16..301fc121de 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtfrm.cxx,v $ - * $Revision: 1.108.30.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx index 83ecf7a7ec..5b91d6bc49 100644 --- a/sw/source/core/text/txtftn.cxx +++ b/sw/source/core/text/txtftn.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtftn.cxx,v $ - * $Revision: 1.51.208.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx index 722cae6b04..904887628a 100644 --- a/sw/source/core/text/txthyph.cxx +++ b/sw/source/core/text/txthyph.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txthyph.cxx,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/txtinit.cxx b/sw/source/core/text/txtinit.cxx index f7f6091377..0c58a7d7ef 100644 --- a/sw/source/core/text/txtinit.cxx +++ b/sw/source/core/text/txtinit.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtinit.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/txtio.cxx b/sw/source/core/text/txtio.cxx index 890c67ab4f..c226e0d538 100644 --- a/sw/source/core/text/txtio.cxx +++ b/sw/source/core/text/txtio.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtio.cxx,v $ - * $Revision: 1.17.208.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/txtpaint.cxx b/sw/source/core/text/txtpaint.cxx index 2b3cabec23..13e15515f4 100644 --- a/sw/source/core/text/txtpaint.cxx +++ b/sw/source/core/text/txtpaint.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtpaint.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/txtpaint.hxx b/sw/source/core/text/txtpaint.hxx index e997858351..a1a313b6be 100644 --- a/sw/source/core/text/txtpaint.hxx +++ b/sw/source/core/text/txtpaint.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtpaint.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index ed4f7059a0..36ccbc6c5f 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txttab.cxx,v $ - * $Revision: 1.33 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx index d7ea1cf5cb..3f068c1761 100644 --- a/sw/source/core/text/widorp.cxx +++ b/sw/source/core/text/widorp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: widorp.cxx,v $ - * $Revision: 1.22.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/widorp.hxx b/sw/source/core/text/widorp.hxx index 01d8bd79c9..4c88ee3b00 100644 --- a/sw/source/core/text/widorp.hxx +++ b/sw/source/core/text/widorp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: widorp.hxx,v $ - * $Revision: 1.8.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx index 7888802984..e0d8343f02 100644 --- a/sw/source/core/text/wrong.cxx +++ b/sw/source/core/text/wrong.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrong.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/tox/makefile.mk b/sw/source/core/tox/makefile.mk index 84ddbe668a..60de374491 100644 --- a/sw/source/core/tox/makefile.mk +++ b/sw/source/core/tox/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.7 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index 268d6a3aaa..f9ddb08709 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tox.cxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/tox/toxhlp.cxx b/sw/source/core/tox/toxhlp.cxx index 69aefa9f66..50d1d3b804 100644 --- a/sw/source/core/tox/toxhlp.cxx +++ b/sw/source/core/tox/toxhlp.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: toxhlp.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index 63e551e8c8..0d8ea0fabe 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txmsrt.cxx,v $ - * $Revision: 1.31 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/SwGrammarContact.cxx b/sw/source/core/txtnode/SwGrammarContact.cxx index 913fefcd6e..41b494cfbf 100644 --- a/sw/source/core/txtnode/SwGrammarContact.cxx +++ b/sw/source/core/txtnode/SwGrammarContact.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwGrammarContact.cxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index 4ddfae6a0b..ce1dd11493 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: atrfld.cxx,v $ - * $Revision: 1.16.190.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx index e4c5d0f10a..bad8b4a5d5 100644 --- a/sw/source/core/txtnode/atrflyin.cxx +++ b/sw/source/core/txtnode/atrflyin.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: atrflyin.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx index 8beccc1cfa..5334358a07 100644 --- a/sw/source/core/txtnode/atrftn.cxx +++ b/sw/source/core/txtnode/atrftn.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: atrftn.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/atrref.cxx b/sw/source/core/txtnode/atrref.cxx index 831d604fb3..556ad0374c 100644 --- a/sw/source/core/txtnode/atrref.cxx +++ b/sw/source/core/txtnode/atrref.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: atrref.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/atrtox.cxx b/sw/source/core/txtnode/atrtox.cxx index 4cee6eef1b..baae103f8f 100644 --- a/sw/source/core/txtnode/atrtox.cxx +++ b/sw/source/core/txtnode/atrtox.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: atrtox.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/chrfmt.cxx b/sw/source/core/txtnode/chrfmt.cxx index 4e3101aab4..d85a265bda 100644 --- a/sw/source/core/txtnode/chrfmt.cxx +++ b/sw/source/core/txtnode/chrfmt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chrfmt.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index 54e73302aa..dde5c7a551 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtatr2.cxx,v $ - * $Revision: 1.30 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 2b30826062..138f31df38 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fntcache.cxx,v $ - * $Revision: 1.98.56.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx index 0ad7ca6278..4c07fa756a 100644 --- a/sw/source/core/txtnode/fntcap.cxx +++ b/sw/source/core/txtnode/fntcap.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fntcap.cxx,v $ - * $Revision: 1.27.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/makefile.mk b/sw/source/core/txtnode/makefile.mk index 36c6e09d6b..f03f96c426 100644 --- a/sw/source/core/txtnode/makefile.mk +++ b/sw/source/core/txtnode/makefile.mk @@ -1,15 +1,11 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.14 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx b/sw/source/core/txtnode/modeltoviewhelper.cxx index d904f87957..a9ea696ea8 100644 --- a/sw/source/core/txtnode/modeltoviewhelper.cxx +++ b/sw/source/core/txtnode/modeltoviewhelper.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: modeltoviewhelper.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx index 79c66ba8b7..321e32de7e 100644 --- a/sw/source/core/txtnode/ndhints.cxx +++ b/sw/source/core/txtnode/ndhints.cxx @@ -1,16 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndhints.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index ee663716f0..d89cc3b1cc 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ndtxt.cxx,v $ - * $Revision: 1.86.66.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/swfntcch.cxx b/sw/source/core/txtnode/swfntcch.cxx index f00f8aac1f..fff8a021a9 100644 --- a/sw/source/core/txtnode/swfntcch.cxx +++ b/sw/source/core/txtnode/swfntcch.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swfntcch.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index 15a973b122..83a46b8b50 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swfont.cxx,v $ - * $Revision: 1.59.24.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 5384f4f73b..22a2b8a9db 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: thints.cxx,v $ - * $Revision: 1.65.62.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/txatbase.cxx b/sw/source/core/txtnode/txatbase.cxx index 5617ba35b0..d8d44d9650 100644 --- a/sw/source/core/txtnode/txatbase.cxx +++ b/sw/source/core/txtnode/txatbase.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txatbase.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx index cb3c9e4666..06926ffba0 100644 --- a/sw/source/core/txtnode/txatritr.cxx +++ b/sw/source/core/txtnode/txatritr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txatritr.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx index 104d6d457f..dc65b6aa76 100644 --- a/sw/source/core/txtnode/txtatr2.cxx +++ b/sw/source/core/txtnode/txtatr2.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtatr2.cxx,v $ - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 6677d2b647..92ab864ec3 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtedt.cxx,v $ - * $Revision: 1.92 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/SwRewriter.cxx b/sw/source/core/undo/SwRewriter.cxx index 2267497a31..07e51eb1c5 100644 --- a/sw/source/core/undo/SwRewriter.cxx +++ b/sw/source/core/undo/SwRewriter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwRewriter.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx index a324432c90..ccc1f4d211 100644 --- a/sw/source/core/undo/SwUndoField.cxx +++ b/sw/source/core/undo/SwUndoField.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwUndoField.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/SwUndoFmt.cxx b/sw/source/core/undo/SwUndoFmt.cxx index 473aeb2cc9..339f3374f2 100644 --- a/sw/source/core/undo/SwUndoFmt.cxx +++ b/sw/source/core/undo/SwUndoFmt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwUndoFmt.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx index d7ee78b070..b6eb8797ec 100644 --- a/sw/source/core/undo/SwUndoPageDesc.cxx +++ b/sw/source/core/undo/SwUndoPageDesc.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwUndoPageDesc.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/SwUndoTOXChange.cxx b/sw/source/core/undo/SwUndoTOXChange.cxx index 8368b8507c..8c1d6dcd8c 100644 --- a/sw/source/core/undo/SwUndoTOXChange.cxx +++ b/sw/source/core/undo/SwUndoTOXChange.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwUndoTOXChange.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx index ab797b488e..f596898aae 100644 --- a/sw/source/core/undo/docundo.cxx +++ b/sw/source/core/undo/docundo.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docundo.cxx,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/makefile.mk b/sw/source/core/undo/makefile.mk index 4c7a332eec..d6e6766a0f 100644 --- a/sw/source/core/undo/makefile.mk +++ b/sw/source/core/undo/makefile.mk @@ -1,15 +1,11 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.10 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index 4540a7dcd0..137eb27eab 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rolbck.cxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index de590d974d..5bb8f5a188 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -1,15 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unattr.cxx,v $ - * - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx index 6bc403478d..1240b3e8de 100644 --- a/sw/source/core/undo/unbkmk.cxx +++ b/sw/source/core/undo/unbkmk.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unbkmk.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index df8eaf2a0a..966957619e 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: undel.cxx,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/undo.hrc b/sw/source/core/undo/undo.hrc index 2b96ba202a..707ff307be 100644 --- a/sw/source/core/undo/undo.hrc +++ b/sw/source/core/undo/undo.hrc @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: undo.hrc,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/undo.src b/sw/source/core/undo/undo.src index 2cf91da28b..4ad1e70b78 100644 --- a/sw/source/core/undo/undo.src +++ b/sw/source/core/undo/undo.src @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: undo.src,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 83c4713e84..0a16b89699 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: undobj.cxx,v $ - * $Revision: 1.29.52.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx index dc2fc49eae..07446350c2 100644 --- a/sw/source/core/undo/undobj1.cxx +++ b/sw/source/core/undo/undobj1.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: undobj1.cxx,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/undoflystrattr.cxx b/sw/source/core/undo/undoflystrattr.cxx index 767f300a53..b5795a1db8 100644 --- a/sw/source/core/undo/undoflystrattr.cxx +++ b/sw/source/core/undo/undoflystrattr.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwUndoPageDesc.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx index 475c6dc6df..b61462014c 100644 --- a/sw/source/core/undo/undraw.cxx +++ b/sw/source/core/undo/undraw.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: undraw.cxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/unfmco.cxx b/sw/source/core/undo/unfmco.cxx index c591075f8d..8157147e1b 100644 --- a/sw/source/core/undo/unfmco.cxx +++ b/sw/source/core/undo/unfmco.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unfmco.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index 36fc9bde50..5984b08f4a 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unins.cxx,v $ - * $Revision: 1.33 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx index a7491da0c8..164e3abe5c 100644 --- a/sw/source/core/undo/unmove.cxx +++ b/sw/source/core/undo/unmove.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unmove.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx index dd2d59fc17..ca27beb49c 100644 --- a/sw/source/core/undo/unnum.cxx +++ b/sw/source/core/undo/unnum.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unnum.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/unoutl.cxx b/sw/source/core/undo/unoutl.cxx index 27c85f7b1e..c519cb2938 100644 --- a/sw/source/core/undo/unoutl.cxx +++ b/sw/source/core/undo/unoutl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoutl.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx index d91db0515e..22f9db9706 100644 --- a/sw/source/core/undo/unovwr.cxx +++ b/sw/source/core/undo/unovwr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unovwr.cxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx index 8ce47d86dc..b2a7442f8e 100644 --- a/sw/source/core/undo/unredln.cxx +++ b/sw/source/core/undo/unredln.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unredln.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx index 76f8efa306..3a43d81361 100644 --- a/sw/source/core/undo/unsect.cxx +++ b/sw/source/core/undo/unsect.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unsect.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx index e5f4a1c25c..9405a491c8 100644 --- a/sw/source/core/undo/unsort.cxx +++ b/sw/source/core/undo/unsort.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unsort.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx index 0e39363c67..99e0edd355 100644 --- a/sw/source/core/undo/unspnd.cxx +++ b/sw/source/core/undo/unspnd.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unspnd.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index b6249bd0c6..bf490b680d 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: untbl.cxx,v $ - * $Revision: 1.41 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx index fdbc7b74cf..4893f6a90a 100644 --- a/sw/source/core/undo/untblk.cxx +++ b/sw/source/core/undo/untblk.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: untblk.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx index 7d1c1cb43d..16f71c45f1 100644 --- a/sw/source/core/unocore/SwXTextDefaults.cxx +++ b/sw/source/core/unocore/SwXTextDefaults.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXTextDefaults.cxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/TextCursorHelper.cxx b/sw/source/core/unocore/TextCursorHelper.cxx index 6e8fb9efe4..682e8d2012 100644 --- a/sw/source/core/unocore/TextCursorHelper.cxx +++ b/sw/source/core/unocore/TextCursorHelper.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TextCursorHelper.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/XMLRangeHelper.cxx b/sw/source/core/unocore/XMLRangeHelper.cxx index c3f807035a..22922c1f30 100644 --- a/sw/source/core/unocore/XMLRangeHelper.cxx +++ b/sw/source/core/unocore/XMLRangeHelper.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLRangeHelper.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/XMLRangeHelper.hxx b/sw/source/core/unocore/XMLRangeHelper.hxx index 60f2bf5380..653a833cc9 100644 --- a/sw/source/core/unocore/XMLRangeHelper.hxx +++ b/sw/source/core/unocore/XMLRangeHelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLRangeHelper.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/makefile.mk b/sw/source/core/unocore/makefile.mk index 31c6f4f726..09e6371ada 100644 --- a/sw/source/core/unocore/makefile.mk +++ b/sw/source/core/unocore/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.21 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx index f954b79827..969d4995a8 100644 --- a/sw/source/core/unocore/swunohelper.cxx +++ b/sw/source/core/unocore/swunohelper.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swunohelper.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index b0cb38b78f..3aad931525 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unobkm.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 218d7e1e63..480288810a 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unochart.cxx,v $ - * $Revision: 1.18.36.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 8bb33a4fdb..9e6fba9f4a 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unocoll.cxx,v $ - * $Revision: 1.41 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unocore.src b/sw/source/core/unocore/unocore.src index d2a1071b2c..1827049dd6 100644 --- a/sw/source/core/unocore/unocore.src +++ b/sw/source/core/unocore/unocore.src @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unocore.src,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index a48e37a8f5..c68e874df5 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -1,15 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unocrsrhelper.cxx,v $ - * - * $Revision: 1.35 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 7d685b6e9c..b04a542bd6 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unodraw.cxx,v $ - * $Revision: 1.82 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unoevent.cxx b/sw/source/core/unocore/unoevent.cxx index af6d731aa1..8115ba8780 100644 --- a/sw/source/core/unocore/unoevent.cxx +++ b/sw/source/core/unocore/unoevent.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoevent.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unoevtlstnr.cxx b/sw/source/core/unocore/unoevtlstnr.cxx index f72aace753..8a8a25ea28 100644 --- a/sw/source/core/unocore/unoevtlstnr.cxx +++ b/sw/source/core/unocore/unoevtlstnr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoevtlstnr.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 8105d65bff..d544f2083d 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unofield.cxx,v $ - * $Revision: 1.108 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index d45125c2d2..65b4906f4b 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoflatpara.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index afea552fd2..f90bd49127 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoframe.cxx,v $ - * $Revision: 1.124 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index 3a1509a276..ce57ccc750 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoftn.cxx,v $ - * $Revision: 1.31 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 19dda1dd91..973d0f9f01 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoidx.cxx,v $ - * $Revision: 1.68 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index 4e7789b27f..93b99fa99f 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unomap.cxx,v $ - * $Revision: 1.213.54.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index f046719f85..40d1ea4089 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoobj.cxx,v $ - * $Revision: 1.111.80.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index accb3c2991..03e2735b7e 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoobj2.cxx,v $ - * $Revision: 1.70 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 93051e05f0..cda9c822ad 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoparagraph.cxx,v $ - * $Revision: 1.41 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index c2094ffae7..9cd61d1b24 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoport.cxx,v $ - * $Revision: 1.43 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index be4befde2f..0a5115b768 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoportenum.cxx,v $ - * $Revision: 1.42 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx index 3c75ee9af9..36c066dc5a 100644 --- a/sw/source/core/unocore/unoprnms.cxx +++ b/sw/source/core/unocore/unoprnms.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoprnms.cxx,v $ - * $Revision: 1.139.100.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index 4e7122560f..23d99cd17b 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoredline.cxx,v $ - * $Revision: 1.34 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unoredlines.cxx b/sw/source/core/unocore/unoredlines.cxx index 05c70eb723..e9916a0fef 100644 --- a/sw/source/core/unocore/unoredlines.cxx +++ b/sw/source/core/unocore/unoredlines.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoredlines.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index b3fe08f3a3..ea84ff33b5 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unorefmk.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index d4ab7f0813..b25640b4a2 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unosect.cxx,v $ - * $Revision: 1.60 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 4f20d516fe..c8149fe635 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unosett.cxx,v $ - * $Revision: 1.59 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx index dfb21c071c..3b52e17236 100644 --- a/sw/source/core/unocore/unosrch.cxx +++ b/sw/source/core/unocore/unosrch.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unosrch.cxx,v $ - * $Revision: 1.19.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 979d542a75..0a6a948ead 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unostyle.cxx,v $ - * $Revision: 1.83.24.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 1fcc59f1da..b644106bbe 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unotbl.cxx,v $ - * - * $Revision: 1.123 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index ddbb40bccf..133ad4d278 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unotext.cxx,v $ - * $Revision: 1.41 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/unocore/unotextmarkup.cxx b/sw/source/core/unocore/unotextmarkup.cxx index 9aca9a4c85..4e2da7ef6d 100644 --- a/sw/source/core/unocore/unotextmarkup.cxx +++ b/sw/source/core/unocore/unotextmarkup.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unotextmarkup.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/view/makefile.mk b/sw/source/core/view/makefile.mk index 56cfb7d6ed..aa010e6b60 100644 --- a/sw/source/core/view/makefile.mk +++ b/sw/source/core/view/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.7 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index fc62061a19..7b538316bf 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pagepreviewlayout.cxx,v $ - * $Revision: 1.15.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/view/scrrect.cxx b/sw/source/core/view/scrrect.cxx index 87b718425d..b3d44821d2 100644 --- a/sw/source/core/view/scrrect.cxx +++ b/sw/source/core/view/scrrect.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: scrrect.cxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx index 201bd24b03..20e12f2e3c 100644 --- a/sw/source/core/view/vdraw.cxx +++ b/sw/source/core/view/vdraw.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vdraw.cxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx index 5eb6ba17a2..ac63ccb5d7 100644 --- a/sw/source/core/view/viewimp.cxx +++ b/sw/source/core/view/viewimp.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewimp.cxx,v $ - * $Revision: 1.41 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx index 5fd28d45be..71ae36288e 100755 --- a/sw/source/core/view/viewpg.cxx +++ b/sw/source/core/view/viewpg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewpg.cxx,v $ - * $Revision: 1.31 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 7d280ff1b6..8236d0292f 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewsh.cxx,v $ - * $Revision: 1.87.42.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx index b10bae4795..71e90b05a2 100644 --- a/sw/source/core/view/vnew.cxx +++ b/sw/source/core/view/vnew.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vnew.cxx,v $ - * $Revision: 1.31.210.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index b90e3f666b..d2c3f0b481 100755 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -1,15 +1,11 @@ /************************************************************************** - * * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vprint.cxx,v $ - * $Revision: 1.46 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index 9b509a8eeb..2a1362042d 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ascatr.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ascii/makefile.mk b/sw/source/filter/ascii/makefile.mk index 9a999895cf..e2bd2bef25 100644 --- a/sw/source/filter/ascii/makefile.mk +++ b/sw/source/filter/ascii/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index b713190564..5e9626c25d 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: parasc.cxx,v $ - * $Revision: 1.30 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx index c7f29d105b..bc4882cfd1 100644 --- a/sw/source/filter/ascii/wrtasc.cxx +++ b/sw/source/filter/ascii/wrtasc.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtasc.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ascii/wrtasc.hxx b/sw/source/filter/ascii/wrtasc.hxx index ab8d08b307..04aa2b125a 100644 --- a/sw/source/filter/ascii/wrtasc.hxx +++ b/sw/source/filter/ascii/wrtasc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtasc.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/basflt/docfact.cxx b/sw/source/filter/basflt/docfact.cxx index 3d30752acd..d048d00778 100644 --- a/sw/source/filter/basflt/docfact.cxx +++ b/sw/source/filter/basflt/docfact.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docfact.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index 428e50da1f..bd0d4f0c0e 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fltini.cxx,v $ - * $Revision: 1.59 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index da6d0a7b6e..4958e24bbb 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: iodetect.cxx,v $ - * $Revision: 1.31 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/basflt/makefile.mk b/sw/source/filter/basflt/makefile.mk index b2f848d331..7713d12657 100644 --- a/sw/source/filter/basflt/makefile.mk +++ b/sw/source/filter/basflt/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.12 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index d4483831d9..b7570f1fcf 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: shellio.cxx,v $ - * $Revision: 1.58 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx index ab82fd2bd1..5601124e75 100644 --- a/sw/source/filter/html/SwAppletImpl.cxx +++ b/sw/source/filter/html/SwAppletImpl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwAppletImpl.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 3fd0513632..12ff06be43 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: css1atr.cxx,v $ - * $Revision: 1.44.138.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/css1kywd.cxx b/sw/source/filter/html/css1kywd.cxx index 1660cc2f09..5bde86df2e 100644 --- a/sw/source/filter/html/css1kywd.cxx +++ b/sw/source/filter/html/css1kywd.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: css1kywd.cxx,v $ - * $Revision: 1.8.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/css1kywd.hxx b/sw/source/filter/html/css1kywd.hxx index c88c988427..4c374bf818 100644 --- a/sw/source/filter/html/css1kywd.hxx +++ b/sw/source/filter/html/css1kywd.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: css1kywd.hxx,v $ - * $Revision: 1.5.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 3962ac7469..3b0bc33066 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlatr.cxx,v $ - * $Revision: 1.41.140.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx index 7bec01cd7c..48d1e293ed 100644 --- a/sw/source/filter/html/htmlbas.cxx +++ b/sw/source/filter/html/htmlbas.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlbas.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 51d3e62c82..cc3cac8b26 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlcss1.cxx,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index bfde0b1db2..fa447a817d 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlctxt.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmldraw.cxx b/sw/source/filter/html/htmldraw.cxx index 51fd729c56..dd59bf8480 100644 --- a/sw/source/filter/html/htmldraw.cxx +++ b/sw/source/filter/html/htmldraw.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmldraw.cxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx index ec07acdfa0..c1f7d34bd3 100644 --- a/sw/source/filter/html/htmlfld.cxx +++ b/sw/source/filter/html/htmlfld.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlfld.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlfld.hxx b/sw/source/filter/html/htmlfld.hxx index 519cfb4f84..b139c8c72b 100644 --- a/sw/source/filter/html/htmlfld.hxx +++ b/sw/source/filter/html/htmlfld.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlfld.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx index 4027ddc7be..cc0ee03a24 100644 --- a/sw/source/filter/html/htmlfldw.cxx +++ b/sw/source/filter/html/htmlfldw.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlfldw.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index 22cd272d7e..16c935fdae 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlfly.cxx,v $ - * $Revision: 1.28 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx index fef71ea0b5..16c0405371 100644 --- a/sw/source/filter/html/htmlfly.hxx +++ b/sw/source/filter/html/htmlfly.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlfly.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlflyt.cxx b/sw/source/filter/html/htmlflyt.cxx index dcf509fa1f..dffa3c761e 100644 --- a/sw/source/filter/html/htmlflyt.cxx +++ b/sw/source/filter/html/htmlflyt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlflyt.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 9c35e6d4a3..eca172ddf8 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlform.cxx,v $ - * $Revision: 1.27.94.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlform.hxx b/sw/source/filter/html/htmlform.hxx index dd56234afb..a54b2659cc 100644 --- a/sw/source/filter/html/htmlform.hxx +++ b/sw/source/filter/html/htmlform.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlform.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 7259f7456f..643e83f401 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlforw.cxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx index e0051c67f3..21fb5d0716 100644 --- a/sw/source/filter/html/htmlftn.cxx +++ b/sw/source/filter/html/htmlftn.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlftn.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index b69d5fabc0..65d72b4064 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlgrin.cxx,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx index bd70ff6d9c..a5ee2ed38a 100644 --- a/sw/source/filter/html/htmlnum.cxx +++ b/sw/source/filter/html/htmlnum.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlnum.cxx,v $ - * $Revision: 1.29 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlnum.hxx b/sw/source/filter/html/htmlnum.hxx index 823f08b63e..2df081dcd1 100644 --- a/sw/source/filter/html/htmlnum.hxx +++ b/sw/source/filter/html/htmlnum.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlnum.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index fab6e845e0..ce66f713dd 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlplug.cxx,v $ - * $Revision: 1.29 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index e8ed0babd7..24a452f3d7 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlsect.cxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index c4f47c68a9..c40beb791a 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmltab.cxx,v $ - * $Revision: 1.28.186.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index 38f8680372..88f352f49c 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmltabw.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/htmlvsh.hxx b/sw/source/filter/html/htmlvsh.hxx index fdc378d6b2..82e1c1df1f 100644 --- a/sw/source/filter/html/htmlvsh.hxx +++ b/sw/source/filter/html/htmlvsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlvsh.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/makefile.mk b/sw/source/filter/html/makefile.mk index 69ec0086be..b99cc67894 100644 --- a/sw/source/filter/html/makefile.mk +++ b/sw/source/filter/html/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.10 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx index 40bb93ee15..3f3c46f5db 100644 --- a/sw/source/filter/html/parcss1.cxx +++ b/sw/source/filter/html/parcss1.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: parcss1.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/parcss1.hxx b/sw/source/filter/html/parcss1.hxx index 5e20880548..822bd6525e 100644 --- a/sw/source/filter/html/parcss1.hxx +++ b/sw/source/filter/html/parcss1.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: parcss1.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index d2f40c1253..6cd25907a8 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svxcss1.cxx,v $ - * $Revision: 1.20.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx index c24b07bda4..4ec7cd7bea 100644 --- a/sw/source/filter/html/svxcss1.hxx +++ b/sw/source/filter/html/svxcss1.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svxcss1.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/swcss1.hxx b/sw/source/filter/html/swcss1.hxx index 490bf9e9b7..ae57527a13 100644 --- a/sw/source/filter/html/swcss1.hxx +++ b/sw/source/filter/html/swcss1.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swcss1.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 5f32140265..3de3114497 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swhtml.cxx,v $ - * $Revision: 1.51.98.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index bb89c877dc..e46a52e52c 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swhtml.hxx,v $ - * $Revision: 1.18.100.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 1a74d5a129..d13909c2ec 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrthtml.cxx,v $ - * $Revision: 1.40 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index d3f112ed8b..c422babf17 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrthtml.hxx,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/inc/fltbase.hxx b/sw/source/filter/inc/fltbase.hxx index b774cf0f6b..3959f1cc98 100644 --- a/sw/source/filter/inc/fltbase.hxx +++ b/sw/source/filter/inc/fltbase.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fltbase.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/inc/fltglbls.hxx b/sw/source/filter/inc/fltglbls.hxx index 328a857f21..12b6431701 100644 --- a/sw/source/filter/inc/fltglbls.hxx +++ b/sw/source/filter/inc/fltglbls.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fltglbls.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/inc/fltini.hxx b/sw/source/filter/inc/fltini.hxx index b608ac8ddd..7a9ad65f39 100644 --- a/sw/source/filter/inc/fltini.hxx +++ b/sw/source/filter/inc/fltini.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fltini.hxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx index fbc2662c84..33ccb6415e 100644 --- a/sw/source/filter/inc/fltshell.hxx +++ b/sw/source/filter/inc/fltshell.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fltshell.hxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/inc/makefile.mk b/sw/source/filter/inc/makefile.mk index 3c33d006ed..1b35ca4954 100644 --- a/sw/source/filter/inc/makefile.mk +++ b/sw/source/filter/inc/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx index 64c12c2840..f9cbd310a2 100644 --- a/sw/source/filter/inc/msfilter.hxx +++ b/sw/source/filter/inc/msfilter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: msfilter.hxx,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/inc/rtf.hxx b/sw/source/filter/inc/rtf.hxx index 989466aae1..9b1b6530df 100644 --- a/sw/source/filter/inc/rtf.hxx +++ b/sw/source/filter/inc/rtf.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rtf.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/inc/wrt_fn.hxx b/sw/source/filter/inc/wrt_fn.hxx index e8e8c28b73..9bff549e4c 100644 --- a/sw/source/filter/inc/wrt_fn.hxx +++ b/sw/source/filter/inc/wrt_fn.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrt_fn.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx index 7797d227bf..f97a68c840 100644 --- a/sw/source/filter/inc/wrtswtbl.hxx +++ b/sw/source/filter/inc/wrtswtbl.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtswtbl.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/inc/wwstyles.hxx b/sw/source/filter/inc/wwstyles.hxx index 521e328598..d5517a25ca 100644 --- a/sw/source/filter/inc/wwstyles.hxx +++ b/sw/source/filter/inc/wwstyles.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wwstyles.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/makefile.mk b/sw/source/filter/makefile.mk index 0f8e016588..c2b343eb8b 100644 --- a/sw/source/filter/makefile.mk +++ b/sw/source/filter/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.8 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/rtf/makefile.mk b/sw/source/filter/rtf/makefile.mk index 8c06c4bec3..2ff764d730 100644 --- a/sw/source/filter/rtf/makefile.mk +++ b/sw/source/filter/rtf/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.6 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx index 46426620b3..ec6d1af772 100644 --- a/sw/source/filter/rtf/rtfatr.cxx +++ b/sw/source/filter/rtf/rtfatr.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rtfatr.cxx,v $ - * $Revision: 1.75.136.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/rtf/rtffld.cxx b/sw/source/filter/rtf/rtffld.cxx index d273a129ca..73b4fd3bf5 100644 --- a/sw/source/filter/rtf/rtffld.cxx +++ b/sw/source/filter/rtf/rtffld.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rtffld.cxx,v $ - * $Revision: 1.33 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx index 0e3dffa2dc..5eed946e43 100644 --- a/sw/source/filter/rtf/rtffly.cxx +++ b/sw/source/filter/rtf/rtffly.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rtffly.cxx,v $ - * $Revision: 1.35 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx index 85954250bf..d0d28e8aca 100644 --- a/sw/source/filter/rtf/rtfnum.cxx +++ b/sw/source/filter/rtf/rtfnum.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rtfnum.cxx,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx index c3a56f64e3..f6349c74f1 100644 --- a/sw/source/filter/rtf/rtftbl.cxx +++ b/sw/source/filter/rtf/rtftbl.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rtftbl.cxx,v $ - * $Revision: 1.40 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index 1050ac0986..bc475dd768 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swparrtf.cxx,v $ - * $Revision: 1.81.82.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/rtf/swparrtf.hxx b/sw/source/filter/rtf/swparrtf.hxx index 77b7ed14a1..2d57871bf4 100644 --- a/sw/source/filter/rtf/swparrtf.hxx +++ b/sw/source/filter/rtf/swparrtf.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swparrtf.hxx,v $ - * $Revision: 1.34 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx index 100c2ab209..f465354e8f 100644 --- a/sw/source/filter/rtf/wrtrtf.cxx +++ b/sw/source/filter/rtf/wrtrtf.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtrtf.cxx,v $ - * $Revision: 1.42.208.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/rtf/wrtrtf.hxx b/sw/source/filter/rtf/wrtrtf.hxx index b71a577049..1c51a21dcf 100644 --- a/sw/source/filter/rtf/wrtrtf.hxx +++ b/sw/source/filter/rtf/wrtrtf.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtrtf.hxx,v $ - * $Revision: 1.18.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/writer/makefile.mk b/sw/source/filter/writer/makefile.mk index 4d8a27c0fd..d08caa9eb4 100644 --- a/sw/source/filter/writer/makefile.mk +++ b/sw/source/filter/writer/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.5 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 289b67670a..384ca676c4 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: writer.cxx,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/writer/wrt_fn.cxx b/sw/source/filter/writer/wrt_fn.cxx index 2b56c3c9e6..6d10785737 100644 --- a/sw/source/filter/writer/wrt_fn.cxx +++ b/sw/source/filter/writer/wrt_fn.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrt_fn.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx index ce6aed9876..61988fd8fc 100644 --- a/sw/source/filter/writer/wrtswtbl.cxx +++ b/sw/source/filter/writer/wrtswtbl.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtswtbl.cxx,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx index 6e7097f97e..8e792e714e 100644 --- a/sw/source/filter/ww1/fltshell.cxx +++ b/sw/source/filter/ww1/fltshell.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fltshell.cxx,v $ - * $Revision: 1.29 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww1/makefile.mk b/sw/source/filter/ww1/makefile.mk index 7ff1003a52..4f751cbaea 100644 --- a/sw/source/filter/ww1/makefile.mk +++ b/sw/source/filter/ww1/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.6 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww1/w1class.cxx b/sw/source/filter/ww1/w1class.cxx index a137ca479f..09c9f4be3d 100644 --- a/sw/source/filter/ww1/w1class.cxx +++ b/sw/source/filter/ww1/w1class.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: w1class.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww1/w1class.hxx b/sw/source/filter/ww1/w1class.hxx index 11664f3f6a..990b8e6bdc 100644 --- a/sw/source/filter/ww1/w1class.hxx +++ b/sw/source/filter/ww1/w1class.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: w1class.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx index b932a49c18..30f1cf583c 100644 --- a/sw/source/filter/ww1/w1filter.cxx +++ b/sw/source/filter/ww1/w1filter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: w1filter.cxx,v $ - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww1/w1par.cxx b/sw/source/filter/ww1/w1par.cxx index adcbc30866..94029769ed 100644 --- a/sw/source/filter/ww1/w1par.cxx +++ b/sw/source/filter/ww1/w1par.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: w1par.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww1/w1par.hxx b/sw/source/filter/ww1/w1par.hxx index 58fea550cb..5f7e88bf5d 100644 --- a/sw/source/filter/ww1/w1par.hxx +++ b/sw/source/filter/ww1/w1par.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: w1par.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx index 83a8fd68ba..badcd4675f 100644 --- a/sw/source/filter/ww1/w1sprm.cxx +++ b/sw/source/filter/ww1/w1sprm.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: w1sprm.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww1/w1struct.hxx b/sw/source/filter/ww1/w1struct.hxx index 3a7f4b771c..aff8fbd79d 100644 --- a/sw/source/filter/ww1/w1struct.hxx +++ b/sw/source/filter/ww1/w1struct.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: w1struct.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/WW8FFData.cxx b/sw/source/filter/ww8/WW8FFData.cxx index bafeab2afd..15235a19f4 100644 --- a/sw/source/filter/ww8/WW8FFData.cxx +++ b/sw/source/filter/ww8/WW8FFData.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8FFData.cxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/WW8FFData.hxx b/sw/source/filter/ww8/WW8FFData.hxx index 5b8b8babea..017b71c65b 100644 --- a/sw/source/filter/ww8/WW8FFData.hxx +++ b/sw/source/filter/ww8/WW8FFData.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8FFData.hxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/WW8FibData.cxx b/sw/source/filter/ww8/WW8FibData.cxx index 230e65f034..b44c636de4 100644 --- a/sw/source/filter/ww8/WW8FibData.cxx +++ b/sw/source/filter/ww8/WW8FibData.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile:$ - * $Revision:$ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/WW8FibData.hxx b/sw/source/filter/ww8/WW8FibData.hxx index 07bea0b2a1..a17362ad3a 100644 --- a/sw/source/filter/ww8/WW8FibData.hxx +++ b/sw/source/filter/ww8/WW8FibData.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile:$ - * $Revision:$ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/WW8Sttbf.cxx b/sw/source/filter/ww8/WW8Sttbf.cxx index 946147a3de..ad4d9b95af 100644 --- a/sw/source/filter/ww8/WW8Sttbf.cxx +++ b/sw/source/filter/ww8/WW8Sttbf.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8par2.hxx,v $ - * $Revision: 1.47.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/WW8Sttbf.hxx b/sw/source/filter/ww8/WW8Sttbf.hxx index 6e6bc29dc6..029cbbf26a 100644 --- a/sw/source/filter/ww8/WW8Sttbf.hxx +++ b/sw/source/filter/ww8/WW8Sttbf.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8par2.hxx,v $ - * $Revision: 1.47.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index 965d997955..f0d65a7544 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8TableInfo.cxx,v $ - * $Revision: 1.1.2.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index 0db4637465..620fa620e4 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8TableInfo.hxx,v $ - * $Revision: 1.1.2.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index cf6c68cafb..06dc70726a 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile$ - * $Revision$ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 9480f67382..6ab9608903 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile$ - * $Revision$ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index d751e6cf7a..e1edbd6109 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile$ - * $Revision$ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 694f75a18c..195dd04ecf 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile$ - * $Revision$ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index 5b4031992e..06d39a68d7 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile$ - * $Revision$ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index 990b6e7306..ac01fab4f1 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile$ - * $Revision$ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/docxexportfilter.hxx b/sw/source/filter/ww8/docxexportfilter.hxx index e1e6fde181..e1d0b3d239 100644 --- a/sw/source/filter/ww8/docxexportfilter.hxx +++ b/sw/source/filter/ww8/docxexportfilter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile$ - * $Revision$ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/docxfootnotes.hxx b/sw/source/filter/ww8/docxfootnotes.hxx index b594f88f58..e31b3ce65b 100644 --- a/sw/source/filter/ww8/docxfootnotes.hxx +++ b/sw/source/filter/ww8/docxfootnotes.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile$ - * $Revision$ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/dump/dump8.cxx b/sw/source/filter/ww8/dump/dump8.cxx index 180ead42ca..32c5a3f54c 100644 --- a/sw/source/filter/ww8/dump/dump8.cxx +++ b/sw/source/filter/ww8/dump/dump8.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dump8.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/dump/dump8a.cxx b/sw/source/filter/ww8/dump/dump8a.cxx index d4d6b888a0..26e007e87d 100644 --- a/sw/source/filter/ww8/dump/dump8a.cxx +++ b/sw/source/filter/ww8/dump/dump8a.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dump8a.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/dump/makefile.mk b/sw/source/filter/ww8/dump/makefile.mk index ad01ade597..695eddc9d1 100644 --- a/sw/source/filter/ww8/dump/makefile.mk +++ b/sw/source/filter/ww8/dump/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.9 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/dump/msvbasic.cxx b/sw/source/filter/ww8/dump/msvbasic.cxx index ae638c622c..899c497644 100644 --- a/sw/source/filter/ww8/dump/msvbasic.cxx +++ b/sw/source/filter/ww8/dump/msvbasic.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: msvbasic.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/dump/msvbasic.hxx b/sw/source/filter/ww8/dump/msvbasic.hxx index f8b84c632c..d0a45ea488 100644 --- a/sw/source/filter/ww8/dump/msvbasic.hxx +++ b/sw/source/filter/ww8/dump/msvbasic.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: msvbasic.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/dump/ww8darr.cxx b/sw/source/filter/ww8/dump/ww8darr.cxx index e0cdc3b447..b1671bb887 100644 --- a/sw/source/filter/ww8/dump/ww8darr.cxx +++ b/sw/source/filter/ww8/dump/ww8darr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8darr.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/dump/ww8darr.hxx b/sw/source/filter/ww8/dump/ww8darr.hxx index 21f068990c..2659d0263c 100644 --- a/sw/source/filter/ww8/dump/ww8darr.hxx +++ b/sw/source/filter/ww8/dump/ww8darr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8darr.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/dump/ww8dout.cxx b/sw/source/filter/ww8/dump/ww8dout.cxx index 38b159ff8e..e2ce247b96 100644 --- a/sw/source/filter/ww8/dump/ww8dout.cxx +++ b/sw/source/filter/ww8/dump/ww8dout.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8dout.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/dump/ww8dout.hxx b/sw/source/filter/ww8/dump/ww8dout.hxx index ccfe15f5be..9e9ef93d60 100644 --- a/sw/source/filter/ww8/dump/ww8dout.hxx +++ b/sw/source/filter/ww8/dump/ww8dout.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8dout.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/dump/ww8scan.cxx b/sw/source/filter/ww8/dump/ww8scan.cxx index cdbee639ca..dc33079091 100644 --- a/sw/source/filter/ww8/dump/ww8scan.cxx +++ b/sw/source/filter/ww8/dump/ww8scan.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8scan.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/dump/ww8scan.hxx b/sw/source/filter/ww8/dump/ww8scan.hxx index e24f3a85b7..8a0ede2343 100644 --- a/sw/source/filter/ww8/dump/ww8scan.hxx +++ b/sw/source/filter/ww8/dump/ww8scan.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8scan.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/dump/ww8struc.hxx b/sw/source/filter/ww8/dump/ww8struc.hxx index 876feb7942..bcba23a711 100644 --- a/sw/source/filter/ww8/dump/ww8struc.hxx +++ b/sw/source/filter/ww8/dump/ww8struc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8struc.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx index 86c0357793..7ccc875591 100644 --- a/sw/source/filter/ww8/escher.hxx +++ b/sw/source/filter/ww8/escher.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: escher.hxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/fields.cxx b/sw/source/filter/ww8/fields.cxx index 4e73dae967..33d83067fd 100644 --- a/sw/source/filter/ww8/fields.cxx +++ b/sw/source/filter/ww8/fields.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fields.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/fields.hxx b/sw/source/filter/ww8/fields.hxx index d545ac4435..8db334c8b3 100644 --- a/sw/source/filter/ww8/fields.hxx +++ b/sw/source/filter/ww8/fields.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fields.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/hash_wrap.hxx b/sw/source/filter/ww8/hash_wrap.hxx index 99d8e1fc72..af078e50d4 100644 --- a/sw/source/filter/ww8/hash_wrap.hxx +++ b/sw/source/filter/ww8/hash_wrap.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: hash_wrap.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/makefile.mk b/sw/source/filter/ww8/makefile.mk index 164a8fef28..b25887e3e2 100644 --- a/sw/source/filter/ww8/makefile.mk +++ b/sw/source/filter/ww8/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.22.172.2 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/needed_cast.hxx b/sw/source/filter/ww8/needed_cast.hxx index f20680900b..38a5ac8552 100644 --- a/sw/source/filter/ww8/needed_cast.hxx +++ b/sw/source/filter/ww8/needed_cast.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: needed_cast.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/sortedarray.hxx b/sw/source/filter/ww8/sortedarray.hxx index a8aca3ff3d..07067b9ee7 100644 --- a/sw/source/filter/ww8/sortedarray.hxx +++ b/sw/source/filter/ww8/sortedarray.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sortedarray.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/staticassert.hxx b/sw/source/filter/ww8/staticassert.hxx index 586ad18a35..f446d86773 100644 --- a/sw/source/filter/ww8/staticassert.hxx +++ b/sw/source/filter/ww8/staticassert.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: staticassert.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/styles.cxx b/sw/source/filter/ww8/styles.cxx index 91231fcfea..86115b1dda 100644 --- a/sw/source/filter/ww8/styles.cxx +++ b/sw/source/filter/ww8/styles.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: styles.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/tracer.cxx b/sw/source/filter/ww8/tracer.cxx index a8541139ef..eab5903737 100644 --- a/sw/source/filter/ww8/tracer.cxx +++ b/sw/source/filter/ww8/tracer.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tracer.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/tracer.hxx b/sw/source/filter/ww8/tracer.hxx index 9d00f84704..d5fe7bdc9d 100644 --- a/sw/source/filter/ww8/tracer.hxx +++ b/sw/source/filter/ww8/tracer.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tracer.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/types.hxx b/sw/source/filter/ww8/types.hxx index 1007a95ed0..8e70a179d5 100644 --- a/sw/source/filter/ww8/types.hxx +++ b/sw/source/filter/ww8/types.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: types.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/typessw.hxx b/sw/source/filter/ww8/typessw.hxx index 249157dca1..a10a963880 100644 --- a/sw/source/filter/ww8/typessw.hxx +++ b/sw/source/filter/ww8/typessw.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: typessw.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 6ead178825..6822158a8b 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: writerhelper.cxx,v $ - * $Revision: 1.29 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx index 68a474b227..a81fd845a3 100644 --- a/sw/source/filter/ww8/writerhelper.hxx +++ b/sw/source/filter/ww8/writerhelper.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: writerhelper.hxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx index 071bc6dce1..68a299776c 100644 --- a/sw/source/filter/ww8/writerwordglue.cxx +++ b/sw/source/filter/ww8/writerwordglue.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: writerwordglue.cxx,v $ - * $Revision: 1.28.216.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/writerwordglue.hxx b/sw/source/filter/ww8/writerwordglue.hxx index 88bf6a79ac..cf57c58b97 100644 --- a/sw/source/filter/ww8/writerwordglue.hxx +++ b/sw/source/filter/ww8/writerwordglue.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: writerwordglue.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 27c0903e76..30ca3bc462 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -1,15 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtw8esh.cxx,v $ - * $Revision: 1.105.10.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 05153480bd..068acc4306 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtw8nds.cxx,v $ - * $Revision: 1.109.40.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index 9f30ac7f2b..eee8497567 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtw8num.cxx,v $ - * $Revision: 1.47 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 935bf36f00..3f1c2a4cde 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtw8sty.cxx,v $ - * $Revision: 1.50 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index ccf8c0e741..49d7c71bc2 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtww8.cxx,v $ - * $Revision: 1.91.98.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index dee667b1a1..745b258fcc 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtww8.hxx,v $ - * $Revision: 1.76.172.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index f1f5781555..1b05bba31b 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtww8gr.cxx,v $ - * $Revision: 1.54 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index b0a40f6b54..7219446b0f 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8atr.cxx,v $ - * $Revision: 1.113.40.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx index f0fcfce991..c8b39265d0 100644 --- a/sw/source/filter/ww8/ww8attributeoutput.hxx +++ b/sw/source/filter/ww8/ww8attributeoutput.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile$ - * $Revision$ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx index 429e62ce83..20b51cc662 100644 --- a/sw/source/filter/ww8/ww8glsy.cxx +++ b/sw/source/filter/ww8/ww8glsy.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8glsy.cxx,v $ - * $Revision: 1.30 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8glsy.hxx b/sw/source/filter/ww8/ww8glsy.hxx index bc6addfe53..caffe1d0c3 100644 --- a/sw/source/filter/ww8/ww8glsy.hxx +++ b/sw/source/filter/ww8/ww8glsy.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8glsy.hxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index f8f6303e81..c2c6d2fdbf 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8graf.cxx,v $ - * $Revision: 1.154.30.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8graf.hxx b/sw/source/filter/ww8/ww8graf.hxx index 4b76f6b081..fc3b508b3c 100644 --- a/sw/source/filter/ww8/ww8graf.hxx +++ b/sw/source/filter/ww8/ww8graf.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8graf.hxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx index d6db64e57d..3cda705e01 100644 --- a/sw/source/filter/ww8/ww8graf2.cxx +++ b/sw/source/filter/ww8/ww8graf2.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8graf2.cxx,v $ - * $Revision: 1.75 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 2120fee8fa..2d8d625ca6 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8par.cxx,v $ - * $Revision: 1.199.12.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 662b6d36f3..030f780b18 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8par.hxx,v $ - * $Revision: 1.159.12.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 24e69665c0..c027cd39b5 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8par2.cxx,v $ - * $Revision: 1.145.76.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx index d8730b0c55..b3f565ef41 100644 --- a/sw/source/filter/ww8/ww8par2.hxx +++ b/sw/source/filter/ww8/ww8par2.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8par2.hxx,v $ - * $Revision: 1.47.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 5925751f3c..33b82a7b2b 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8par3.cxx,v $ - * $Revision: 1.93.92.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index 75f7554179..a52019db93 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8par4.cxx,v $ - * $Revision: 1.62 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 4dca5848aa..be333457e8 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8par5.cxx,v $ - * $Revision: 1.110.40.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 90530c310f..1e71aa183b 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8par6.cxx,v $ - * $Revision: 1.188.8.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index f5e62d7aad..5fd6d59733 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8scan.cxx,v $ - * $Revision: 1.142.12.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index 107bde4aa4..9e8c9ce320 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8scan.hxx,v $ - * $Revision: 1.85.12.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx index bb9c9cfc82..4073322a90 100644 --- a/sw/source/filter/ww8/ww8struc.hxx +++ b/sw/source/filter/ww8/ww8struc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ww8struc.hxx,v $ - * $Revision: 1.39 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/ForbiddenCharactersEnum.hxx b/sw/source/filter/xml/ForbiddenCharactersEnum.hxx index b50a8c1c82..7c78fb97f8 100644 --- a/sw/source/filter/xml/ForbiddenCharactersEnum.hxx +++ b/sw/source/filter/xml/ForbiddenCharactersEnum.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ForbiddenCharactersEnum.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index c0f195a1a4..d1d13cffc7 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLRedlineImportHelper.cxx,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.hxx b/sw/source/filter/xml/XMLRedlineImportHelper.hxx index be08ffbd9e..bd02f8617e 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.hxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLRedlineImportHelper.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/makefile.mk b/sw/source/filter/xml/makefile.mk index dcf9a88870..c1191fe3fa 100644 --- a/sw/source/filter/xml/makefile.mk +++ b/sw/source/filter/xml/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.20 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index af5caae2ee..dbf2cc0b81 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swxml.cxx,v $ - * $Revision: 1.84 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index b67efcd4fd..c3d48e4fcd 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtxml.cxx,v $ - * $Revision: 1.62 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/wrtxml.hxx b/sw/source/filter/xml/wrtxml.hxx index d03c889dcb..420f1c2d8a 100644 --- a/sw/source/filter/xml/wrtxml.hxx +++ b/sw/source/filter/xml/wrtxml.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtxml.hxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlbrsh.cxx b/sw/source/filter/xml/xmlbrsh.cxx index fc2b637d0d..1a3041f1a0 100644 --- a/sw/source/filter/xml/xmlbrsh.cxx +++ b/sw/source/filter/xml/xmlbrsh.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlbrsh.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlbrshe.hxx b/sw/source/filter/xml/xmlbrshe.hxx index 1d1b3696b9..9e56f6a3c8 100644 --- a/sw/source/filter/xml/xmlbrshe.hxx +++ b/sw/source/filter/xml/xmlbrshe.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlbrshe.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlbrshi.hxx b/sw/source/filter/xml/xmlbrshi.hxx index d39e740e70..83328ca87d 100644 --- a/sw/source/filter/xml/xmlbrshi.hxx +++ b/sw/source/filter/xml/xmlbrshi.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlbrshi.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index e4149fa60f..259680bff1 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlexp.cxx,v $ - * $Revision: 1.91 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx index 9a7d1df2f5..9441026493 100644 --- a/sw/source/filter/xml/xmlexp.hxx +++ b/sw/source/filter/xml/xmlexp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlexp.hxx,v $ - * $Revision: 1.36 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index 37f906d66f..e69a971011 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlexpit.cxx,v $ - * $Revision: 1.25 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlexpit.hxx b/sw/source/filter/xml/xmlexpit.hxx index 39e090815e..0ced7b8442 100644 --- a/sw/source/filter/xml/xmlexpit.hxx +++ b/sw/source/filter/xml/xmlexpit.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlexpit.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx index c3f19af3d2..432c4cfe9e 100644 --- a/sw/source/filter/xml/xmlfmt.cxx +++ b/sw/source/filter/xml/xmlfmt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlfmt.cxx,v $ - * $Revision: 1.40 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx index 3136f7b2fd..93efbc47b2 100644 --- a/sw/source/filter/xml/xmlfmte.cxx +++ b/sw/source/filter/xml/xmlfmte.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlfmte.cxx,v $ - * $Revision: 1.51 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx index f2503ec54e..5f49f16aca 100644 --- a/sw/source/filter/xml/xmlfonte.cxx +++ b/sw/source/filter/xml/xmlfonte.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlfonte.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index b7c76dafd8..3462403b60 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlimp.cxx,v $ - * $Revision: 1.107 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx index 1e3c761fa2..e5f4c8ff0e 100644 --- a/sw/source/filter/xml/xmlimp.hxx +++ b/sw/source/filter/xml/xmlimp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlimp.hxx,v $ - * $Revision: 1.35 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index 2f452eb807..5f307ab6d6 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlimpit.cxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlimpit.hxx b/sw/source/filter/xml/xmlimpit.hxx index 7bcd4df83c..365354debc 100644 --- a/sw/source/filter/xml/xmlimpit.hxx +++ b/sw/source/filter/xml/xmlimpit.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlimpit.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlitem.cxx b/sw/source/filter/xml/xmlitem.cxx index ea07b66cf9..83761e9b14 100644 --- a/sw/source/filter/xml/xmlitem.cxx +++ b/sw/source/filter/xml/xmlitem.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlitem.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlitem.hxx b/sw/source/filter/xml/xmlitem.hxx index c2274d1dbf..b5a6813288 100644 --- a/sw/source/filter/xml/xmlitem.hxx +++ b/sw/source/filter/xml/xmlitem.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlitem.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx index 63ca631f1a..ceac04f6e0 100644 --- a/sw/source/filter/xml/xmliteme.cxx +++ b/sw/source/filter/xml/xmliteme.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmliteme.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx index b3faf5e685..f664cea12c 100644 --- a/sw/source/filter/xml/xmlitemi.cxx +++ b/sw/source/filter/xml/xmlitemi.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlitemi.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlitemm.cxx b/sw/source/filter/xml/xmlitemm.cxx index 32c0b1f612..68e8b70bca 100644 --- a/sw/source/filter/xml/xmlitemm.cxx +++ b/sw/source/filter/xml/xmlitemm.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlitemm.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx index 2de4a4bed2..731e5d079c 100644 --- a/sw/source/filter/xml/xmlithlp.cxx +++ b/sw/source/filter/xml/xmlithlp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlithlp.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlithlp.hxx b/sw/source/filter/xml/xmlithlp.hxx index 63a3a837be..a582f44772 100644 --- a/sw/source/filter/xml/xmlithlp.hxx +++ b/sw/source/filter/xml/xmlithlp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlithlp.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlitmap.hxx b/sw/source/filter/xml/xmlitmap.hxx index 5ef6feec88..c48c0f2b23 100644 --- a/sw/source/filter/xml/xmlitmap.hxx +++ b/sw/source/filter/xml/xmlitmap.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlitmap.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlitmpr.cxx b/sw/source/filter/xml/xmlitmpr.cxx index c231e41b38..c913d9fd7c 100644 --- a/sw/source/filter/xml/xmlitmpr.cxx +++ b/sw/source/filter/xml/xmlitmpr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlitmpr.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx index d6ebfb2d25..4c4405f48a 100644 --- a/sw/source/filter/xml/xmlmeta.cxx +++ b/sw/source/filter/xml/xmlmeta.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlmeta.cxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmlscript.cxx b/sw/source/filter/xml/xmlscript.cxx index 61f4a6df4d..740916dbda 100644 --- a/sw/source/filter/xml/xmlscript.cxx +++ b/sw/source/filter/xml/xmlscript.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmlscript.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index 4378eb99df..a8a56614a7 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmltble.cxx,v $ - * $Revision: 1.48 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 2af534923e..7d6ab368d8 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmltbli.cxx,v $ - * $Revision: 1.65 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx index 1fceac3718..10858ef3ad 100644 --- a/sw/source/filter/xml/xmltbli.hxx +++ b/sw/source/filter/xml/xmltbli.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmltbli.hxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmltext.cxx b/sw/source/filter/xml/xmltext.cxx index 98aa5f4fbd..817e03dacd 100644 --- a/sw/source/filter/xml/xmltext.cxx +++ b/sw/source/filter/xml/xmltext.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmltext.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 04387b13e8..f41ea30c4a 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmltexte.cxx,v $ - * $Revision: 1.49 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmltexte.hxx b/sw/source/filter/xml/xmltexte.hxx index 9829f6af5c..6ab66626f3 100644 --- a/sw/source/filter/xml/xmltexte.hxx +++ b/sw/source/filter/xml/xmltexte.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmltexte.hxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 00534cd5e5..383e34c503 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmltexti.cxx,v $ - * $Revision: 1.54 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/filter/xml/xmltexti.hxx b/sw/source/filter/xml/xmltexti.hxx index 891c5239fa..1e3ea92f89 100644 --- a/sw/source/filter/xml/xmltexti.hxx +++ b/sw/source/filter/xml/xmltexti.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xmltexti.hxx,v $ - * $Revision: 1.28 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/app.src b/sw/source/ui/app/app.src index 985d4ddc95..4794e789f4 100644 --- a/sw/source/ui/app/app.src +++ b/sw/source/ui/app/app.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: app.src,v $ - * $Revision: 1.120 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx index b31b84e86d..1a527f1e2e 100644 --- a/sw/source/ui/app/appenv.cxx +++ b/sw/source/ui/app/appenv.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: appenv.cxx,v $ - * $Revision: 1.33 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index c9ca781e7c..bed5bc41b9 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: apphdl.cxx,v $ - * $Revision: 1.68 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index a90c3beeaf..dd5befcee4 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: applab.cxx,v $ - * $Revision: 1.34.46.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx index dd95c398eb..d49a97fde8 100644 --- a/sw/source/ui/app/appopt.cxx +++ b/sw/source/ui/app/appopt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: appopt.cxx,v $ - * $Revision: 1.36 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index 8cb2cdb66c..2b928feb0b 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docsh.cxx,v $ - * $Revision: 1.79.188.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index d614c74673..8f952da4ab 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docsh2.cxx,v $ - * $Revision: 1.103.144.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/docshdrw.cxx b/sw/source/ui/app/docshdrw.cxx index ab1d4d4f62..fcca30ab44 100644 --- a/sw/source/ui/app/docshdrw.cxx +++ b/sw/source/ui/app/docshdrw.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docshdrw.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx index 7853c7f8fd..a7df1ede83 100644 --- a/sw/source/ui/app/docshini.cxx +++ b/sw/source/ui/app/docshini.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docshini.cxx,v $ - * $Revision: 1.67 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx index eb8b090d3f..a5738bbb0f 100644 --- a/sw/source/ui/app/docst.cxx +++ b/sw/source/ui/app/docst.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docst.cxx,v $ - * $Revision: 1.36.136.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx index e4c324ce3e..728ea20915 100644 --- a/sw/source/ui/app/docstyle.cxx +++ b/sw/source/ui/app/docstyle.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docstyle.cxx,v $ - * $Revision: 1.35 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/error.src b/sw/source/ui/app/error.src index 28a8d84adf..fa13048357 100644 --- a/sw/source/ui/app/error.src +++ b/sw/source/ui/app/error.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: error.src,v $ - * $Revision: 1.53 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/mainwn.cxx b/sw/source/ui/app/mainwn.cxx index 486d4d0c54..052be9d6d8 100644 --- a/sw/source/ui/app/mainwn.cxx +++ b/sw/source/ui/app/mainwn.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mainwn.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/makefile.mk b/sw/source/ui/app/makefile.mk index d3a4cd242d..943f1004eb 100644 --- a/sw/source/ui/app/makefile.mk +++ b/sw/source/ui/app/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.21 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src index bebfd0fa1c..a0351700ff 100644 --- a/sw/source/ui/app/mn.src +++ b/sw/source/ui/app/mn.src @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mn.src,v $ - * $Revision: 1.53.118.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/swdll.cxx b/sw/source/ui/app/swdll.cxx index 965708ca15..c97d18514f 100644 --- a/sw/source/ui/app/swdll.cxx +++ b/sw/source/ui/app/swdll.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swdll.cxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx index 50d2e81697..ba05043659 100644 --- a/sw/source/ui/app/swmodul1.cxx +++ b/sw/source/ui/app/swmodul1.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swmodul1.cxx,v $ - * $Revision: 1.45 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx index fe2c630dcb..148c6650d6 100644 --- a/sw/source/ui/app/swmodule.cxx +++ b/sw/source/ui/app/swmodule.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swmodule.cxx,v $ - * $Revision: 1.67 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/app/swwait.cxx b/sw/source/ui/app/swwait.cxx index 83a2968c89..46ef17c400 100644 --- a/sw/source/ui/app/swwait.cxx +++ b/sw/source/ui/app/swwait.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swwait.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx index 2122bc9b46..d9d813f918 100644 --- a/sw/source/ui/cctrl/actctrl.cxx +++ b/sw/source/ui/cctrl/actctrl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: actctrl.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/cctrl/makefile.mk b/sw/source/ui/cctrl/makefile.mk index 24600e5415..c724f287fc 100644 --- a/sw/source/ui/cctrl/makefile.mk +++ b/sw/source/ui/cctrl/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.7 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/cctrl/popbox.cxx b/sw/source/ui/cctrl/popbox.cxx index 892611ca8a..2d4ff3cfc3 100644 --- a/sw/source/ui/cctrl/popbox.cxx +++ b/sw/source/ui/cctrl/popbox.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: popbox.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx index 9e705b1a7a..d43fd46df5 100644 --- a/sw/source/ui/cctrl/swlbox.cxx +++ b/sw/source/ui/cctrl/swlbox.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swlbox.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index 39445817f1..fbc2e0cd8c 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: break.cxx,v $ - * $Revision: 1.16.224.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/break.hrc b/sw/source/ui/chrdlg/break.hrc index 294cdc823c..c1da83565e 100644 --- a/sw/source/ui/chrdlg/break.hrc +++ b/sw/source/ui/chrdlg/break.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: break.hrc,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/ccoll.cxx b/sw/source/ui/chrdlg/ccoll.cxx index c76e64381b..7ac0680cbb 100644 --- a/sw/source/ui/chrdlg/ccoll.cxx +++ b/sw/source/ui/chrdlg/ccoll.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ccoll.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/ccoll.hrc b/sw/source/ui/chrdlg/ccoll.hrc index c6171788ba..9bab797751 100644 --- a/sw/source/ui/chrdlg/ccoll.hrc +++ b/sw/source/ui/chrdlg/ccoll.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ccoll.hrc,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/ccoll.src b/sw/source/ui/chrdlg/ccoll.src index 4d75f3e7bc..0d8baf2b2b 100644 --- a/sw/source/ui/chrdlg/ccoll.src +++ b/sw/source/ui/chrdlg/ccoll.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ccoll.src,v $ - * $Revision: 1.44 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 44ee430c60..cc6909b95a 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chardlg.cxx,v $ - * $Revision: 1.30 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/chardlg.hrc b/sw/source/ui/chrdlg/chardlg.hrc index 13ca4ab0d7..625a016a06 100644 --- a/sw/source/ui/chrdlg/chardlg.hrc +++ b/sw/source/ui/chrdlg/chardlg.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chardlg.hrc,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/chardlg.src b/sw/source/ui/chrdlg/chardlg.src index 60986ea399..e6a6a82729 100644 --- a/sw/source/ui/chrdlg/chardlg.src +++ b/sw/source/ui/chrdlg/chardlg.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chardlg.src,v $ - * $Revision: 1.52 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/chrdlg.src b/sw/source/ui/chrdlg/chrdlg.src index 3efdade804..27e897e29e 100644 --- a/sw/source/ui/chrdlg/chrdlg.src +++ b/sw/source/ui/chrdlg/chrdlg.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chrdlg.src,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index 4fc483c056..1cedc8c6c3 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drpcps.cxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/drpcps.hrc b/sw/source/ui/chrdlg/drpcps.hrc index c5b7b18122..4c6cf06ceb 100644 --- a/sw/source/ui/chrdlg/drpcps.hrc +++ b/sw/source/ui/chrdlg/drpcps.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drpcps.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/drpcps.src b/sw/source/ui/chrdlg/drpcps.src index 84d9df2b19..ae3da330c4 100644 --- a/sw/source/ui/chrdlg/drpcps.src +++ b/sw/source/ui/chrdlg/drpcps.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drpcps.src,v $ - * $Revision: 1.39 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/makefile.mk b/sw/source/ui/chrdlg/makefile.mk index 4213461f41..42aad1aedd 100644 --- a/sw/source/ui/chrdlg/makefile.mk +++ b/sw/source/ui/chrdlg/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.6 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 1f6dd1e124..3742fd242c 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: numpara.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/numpara.hrc b/sw/source/ui/chrdlg/numpara.hrc index b4743d5578..4b5e2834db 100644 --- a/sw/source/ui/chrdlg/numpara.hrc +++ b/sw/source/ui/chrdlg/numpara.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: numpara.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/numpara.src b/sw/source/ui/chrdlg/numpara.src index 1ac19a4e3a..14ed11fa0a 100644 --- a/sw/source/ui/chrdlg/numpara.src +++ b/sw/source/ui/chrdlg/numpara.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: numpara.src,v $ - * $Revision: 1.41 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/paradlg.hrc b/sw/source/ui/chrdlg/paradlg.hrc index fa36c8d9f6..a1b243ec1a 100644 --- a/sw/source/ui/chrdlg/paradlg.hrc +++ b/sw/source/ui/chrdlg/paradlg.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: paradlg.hrc,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/paradlg.src b/sw/source/ui/chrdlg/paradlg.src index fde8669a90..636e29f967 100644 --- a/sw/source/ui/chrdlg/paradlg.src +++ b/sw/source/ui/chrdlg/paradlg.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: paradlg.src,v $ - * $Revision: 1.36 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index e7189fd524..b97c54ae50 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pardlg.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/swbreak.src b/sw/source/ui/chrdlg/swbreak.src index 0007f66e5a..c626278748 100644 --- a/sw/source/ui/chrdlg/swbreak.src +++ b/sw/source/ui/chrdlg/swbreak.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swbreak.src,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx index fe6aba72ae..7fb20bf3f8 100644 --- a/sw/source/ui/chrdlg/swuiccoll.cxx +++ b/sw/source/ui/chrdlg/swuiccoll.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swuiccoll.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/chrdlg/tblnumfm.cxx b/sw/source/ui/chrdlg/tblnumfm.cxx index 350b5bf049..96a10fd0f8 100644 --- a/sw/source/ui/chrdlg/tblnumfm.cxx +++ b/sw/source/ui/chrdlg/tblnumfm.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tblnumfm.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/barcfg.cxx b/sw/source/ui/config/barcfg.cxx index 6686652bd9..91731c9e0a 100644 --- a/sw/source/ui/config/barcfg.cxx +++ b/sw/source/ui/config/barcfg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: barcfg.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/caption.cxx b/sw/source/ui/config/caption.cxx index f06266e5cc..d311a677cf 100644 --- a/sw/source/ui/config/caption.cxx +++ b/sw/source/ui/config/caption.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: caption.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx index 43702e834c..184c7782ae 100644 --- a/sw/source/ui/config/cfgitems.cxx +++ b/sw/source/ui/config/cfgitems.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cfgitems.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/config.hrc b/sw/source/ui/config/config.hrc index 79b8e8fa7b..e5a6ef2f9a 100644 --- a/sw/source/ui/config/config.hrc +++ b/sw/source/ui/config/config.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: config.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/dbconfig.cxx b/sw/source/ui/config/dbconfig.cxx index e87cc6dc9f..e189fe7d38 100644 --- a/sw/source/ui/config/dbconfig.cxx +++ b/sw/source/ui/config/dbconfig.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbconfig.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/fontcfg.cxx b/sw/source/ui/config/fontcfg.cxx index 348244774e..48455b77bb 100644 --- a/sw/source/ui/config/fontcfg.cxx +++ b/sw/source/ui/config/fontcfg.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fontcfg.cxx,v $ - * $Revision: 1.24.224.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index d4a0c25a59..e8752bd08f 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailconfigpage.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/mailconfigpage.hrc b/sw/source/ui/config/mailconfigpage.hrc index f0f6d6eb1c..0a52c94287 100644 --- a/sw/source/ui/config/mailconfigpage.hrc +++ b/sw/source/ui/config/mailconfigpage.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailconfigpage.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/mailconfigpage.src b/sw/source/ui/config/mailconfigpage.src index d3b51a6c11..f76f01ccab 100644 --- a/sw/source/ui/config/mailconfigpage.src +++ b/sw/source/ui/config/mailconfigpage.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailconfigpage.src,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/makefile.mk b/sw/source/ui/config/makefile.mk index 02ed4d0759..4b8ed01ca9 100644 --- a/sw/source/ui/config/makefile.mk +++ b/sw/source/ui/config/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.15 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx index fa89402682..cd6b4ae623 100644 --- a/sw/source/ui/config/modcfg.cxx +++ b/sw/source/ui/config/modcfg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: modcfg.cxx,v $ - * $Revision: 1.32 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index d4fec5d027..53603031e1 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: optcomp.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/optcomp.hrc b/sw/source/ui/config/optcomp.hrc index dd6ee2326f..f378ff7393 100644 --- a/sw/source/ui/config/optcomp.hrc +++ b/sw/source/ui/config/optcomp.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: optcomp.hrc,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/optcomp.src b/sw/source/ui/config/optcomp.src index 0ac2bdacdc..3682b49477 100644 --- a/sw/source/ui/config/optcomp.src +++ b/sw/source/ui/config/optcomp.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: optcomp.src,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc index 462d0628cf..31f2e7041f 100644 --- a/sw/source/ui/config/optdlg.hrc +++ b/sw/source/ui/config/optdlg.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: optdlg.hrc,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src index 7170cbb247..3d81942c92 100755 --- a/sw/source/ui/config/optdlg.src +++ b/sw/source/ui/config/optdlg.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: optdlg.src,v $ - * $Revision: 1.106 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 3898e5ca36..808ad95fcd 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: optload.cxx,v $ - * $Revision: 1.34 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/optload.hrc b/sw/source/ui/config/optload.hrc index 86d8e8bcf0..89aff7204c 100644 --- a/sw/source/ui/config/optload.hrc +++ b/sw/source/ui/config/optload.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: optload.hrc,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/optload.src b/sw/source/ui/config/optload.src index 9cc2becdc3..618c0db35b 100644 --- a/sw/source/ui/config/optload.src +++ b/sw/source/ui/config/optload.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: optload.src,v $ - * $Revision: 1.78 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 81e887f90f..7144eec2b2 100755 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: optpage.cxx,v $ - * $Revision: 1.61 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/prtopt.cxx b/sw/source/ui/config/prtopt.cxx index de5f4ab93f..b6631686df 100644 --- a/sw/source/ui/config/prtopt.cxx +++ b/sw/source/ui/config/prtopt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: prtopt.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/redlopt.hrc b/sw/source/ui/config/redlopt.hrc index 5cd50c7ec8..f77f84b664 100644 --- a/sw/source/ui/config/redlopt.hrc +++ b/sw/source/ui/config/redlopt.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: redlopt.hrc,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/redlopt.src b/sw/source/ui/config/redlopt.src index 5513ace199..2d5da19772 100644 --- a/sw/source/ui/config/redlopt.src +++ b/sw/source/ui/config/redlopt.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: redlopt.src,v $ - * $Revision: 1.53 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx index ce2e162685..bae737aaef 100644 --- a/sw/source/ui/config/uinums.cxx +++ b/sw/source/ui/config/uinums.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: uinums.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx index 44623ea8ad..2571361b6d 100644 --- a/sw/source/ui/config/usrpref.cxx +++ b/sw/source/ui/config/usrpref.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: usrpref.cxx,v $ - * $Revision: 1.39 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx index bfd650b8a4..4a87ac3c59 100644 --- a/sw/source/ui/config/viewopt.cxx +++ b/sw/source/ui/config/viewopt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewopt.cxx,v $ - * $Revision: 1.34 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index ec8ad0dc14..0d79743eb1 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: addresslistdialog.cxx,v $ - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/addresslistdialog.hrc b/sw/source/ui/dbui/addresslistdialog.hrc index 59d77eec7b..4715507951 100644 --- a/sw/source/ui/dbui/addresslistdialog.hrc +++ b/sw/source/ui/dbui/addresslistdialog.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: addresslistdialog.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/addresslistdialog.hxx b/sw/source/ui/dbui/addresslistdialog.hxx index d680dbc916..30f0e26ab5 100644 --- a/sw/source/ui/dbui/addresslistdialog.hxx +++ b/sw/source/ui/dbui/addresslistdialog.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: addresslistdialog.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/addresslistdialog.src b/sw/source/ui/dbui/addresslistdialog.src index 7bb7e7d928..64fcaf7806 100644 --- a/sw/source/ui/dbui/addresslistdialog.src +++ b/sw/source/ui/dbui/addresslistdialog.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: addresslistdialog.src,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index dc96002db7..2d0c1d0a00 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: createaddresslistdialog.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/createaddresslistdialog.hrc b/sw/source/ui/dbui/createaddresslistdialog.hrc index 8c7e20c20b..90554fae05 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.hrc +++ b/sw/source/ui/dbui/createaddresslistdialog.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: createaddresslistdialog.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/createaddresslistdialog.hxx b/sw/source/ui/dbui/createaddresslistdialog.hxx index 76d827a1f9..39cd1bc33a 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.hxx +++ b/sw/source/ui/dbui/createaddresslistdialog.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: createaddresslistdialog.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/createaddresslistdialog.src b/sw/source/ui/dbui/createaddresslistdialog.src index 64b9173f1b..c1c0c1c748 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.src +++ b/sw/source/ui/dbui/createaddresslistdialog.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: createaddresslistdialog.src,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx index 698c1b7c2b..e1787da26d 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx +++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: customizeaddresslistdialog.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.hrc b/sw/source/ui/dbui/customizeaddresslistdialog.hrc index f21ba0b6ae..af09b30c59 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.hrc +++ b/sw/source/ui/dbui/customizeaddresslistdialog.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: customizeaddresslistdialog.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.hxx b/sw/source/ui/dbui/customizeaddresslistdialog.hxx index e572b92c67..68139828a1 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.hxx +++ b/sw/source/ui/dbui/customizeaddresslistdialog.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: customizeaddresslistdialog.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.src b/sw/source/ui/dbui/customizeaddresslistdialog.src index b2d3c175ed..05892d90ec 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.src +++ b/sw/source/ui/dbui/customizeaddresslistdialog.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: customizeaddresslistdialog.src,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index c4913d65f3..0226df25ef 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbinsdlg.cxx,v $ - * $Revision: 1.63 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/dbinsdlg.hrc b/sw/source/ui/dbui/dbinsdlg.hrc index 72f208739d..4bc8164f8e 100644 --- a/sw/source/ui/dbui/dbinsdlg.hrc +++ b/sw/source/ui/dbui/dbinsdlg.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbinsdlg.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/dbinsdlg.src b/sw/source/ui/dbui/dbinsdlg.src index 65f878af36..d08305dde1 100644 --- a/sw/source/ui/dbui/dbinsdlg.src +++ b/sw/source/ui/dbui/dbinsdlg.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbinsdlg.src,v $ - * $Revision: 1.48 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 410d728431..e920cfa3e0 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbmgr.cxx,v $ - * $Revision: 1.132.44.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx index afdc966550..53b55be334 100644 --- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx +++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbtablepreviewdialog.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.hrc b/sw/source/ui/dbui/dbtablepreviewdialog.hrc index 6c37838dc6..a260f9fa98 100644 --- a/sw/source/ui/dbui/dbtablepreviewdialog.hrc +++ b/sw/source/ui/dbui/dbtablepreviewdialog.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbtablepreviewdialog.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.hxx b/sw/source/ui/dbui/dbtablepreviewdialog.hxx index 6367fd8fb6..e121c3f893 100644 --- a/sw/source/ui/dbui/dbtablepreviewdialog.hxx +++ b/sw/source/ui/dbui/dbtablepreviewdialog.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbtablepreviewdialog.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.src b/sw/source/ui/dbui/dbtablepreviewdialog.src index 02c215fdb3..3ad385ebbd 100644 --- a/sw/source/ui/dbui/dbtablepreviewdialog.src +++ b/sw/source/ui/dbui/dbtablepreviewdialog.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbtablepreviewdialog.src,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx index 46d8efb01d..4b31760592 100644 --- a/sw/source/ui/dbui/dbtree.cxx +++ b/sw/source/ui/dbui/dbtree.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbtree.cxx,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/dbui.cxx b/sw/source/ui/dbui/dbui.cxx index 7e52652e9b..79f3b62297 100644 --- a/sw/source/ui/dbui/dbui.cxx +++ b/sw/source/ui/dbui/dbui.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbui.cxx,v $ - * $Revision: 1.7.136.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/dbui.src b/sw/source/ui/dbui/dbui.src index 62f17960cc..f85d02090c 100644 --- a/sw/source/ui/dbui/dbui.src +++ b/sw/source/ui/dbui/dbui.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbui.src,v $ - * $Revision: 1.34.66.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/maildispatcher.cxx b/sw/source/ui/dbui/maildispatcher.cxx index 183764a5b2..354541e744 100644 --- a/sw/source/ui/dbui/maildispatcher.cxx +++ b/sw/source/ui/dbui/maildispatcher.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: maildispatcher.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx index d02480a6ef..e03b129034 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.cxx +++ b/sw/source/ui/dbui/mailmergechildwindow.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailmergechildwindow.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mailmergechildwindow.hrc b/sw/source/ui/dbui/mailmergechildwindow.hrc index 552d0c2f01..edba002b0d 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.hrc +++ b/sw/source/ui/dbui/mailmergechildwindow.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailmergechildwindow.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mailmergechildwindow.src b/sw/source/ui/dbui/mailmergechildwindow.src index a33f24d268..187f50b584 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.src +++ b/sw/source/ui/dbui/mailmergechildwindow.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailmergechildwindow.src,v $ - * $Revision: 1.11.240.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx index 31d8ad4274..d9a56fa166 100644 --- a/sw/source/ui/dbui/mailmergehelper.cxx +++ b/sw/source/ui/dbui/mailmergehelper.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailmergehelper.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index 6df323da4a..33f024ef99 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailmergewizard.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mailmergewizard.hrc b/sw/source/ui/dbui/mailmergewizard.hrc index 391cae7c00..02a2c08130 100644 --- a/sw/source/ui/dbui/mailmergewizard.hrc +++ b/sw/source/ui/dbui/mailmergewizard.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailmergewizard.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mailmergewizard.src b/sw/source/ui/dbui/mailmergewizard.src index e32711c55a..ad7d574800 100644 --- a/sw/source/ui/dbui/mailmergewizard.src +++ b/sw/source/ui/dbui/mailmergewizard.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailmergewizard.src,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/makefile.mk b/sw/source/ui/dbui/makefile.mk index 40d6807c2e..c2477b02ca 100644 --- a/sw/source/ui/dbui/makefile.mk +++ b/sw/source/ui/dbui/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.14 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index e310882e72..d179e02e51 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmaddressblockpage.cxx,v $ - * $Revision: 1.25 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmaddressblockpage.hrc b/sw/source/ui/dbui/mmaddressblockpage.hrc index e98a3feb37..99887597a2 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.hrc +++ b/sw/source/ui/dbui/mmaddressblockpage.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmaddressblockpage.hrc,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx index f3f879debb..8bbd2fdc8d 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.hxx +++ b/sw/source/ui/dbui/mmaddressblockpage.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmaddressblockpage.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmaddressblockpage.src b/sw/source/ui/dbui/mmaddressblockpage.src index 6ef91aaf28..7052b27f25 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.src +++ b/sw/source/ui/dbui/mmaddressblockpage.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmaddressblockpage.src,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx index dda498ab1d..09c4b01d63 100644 --- a/sw/source/ui/dbui/mmconfigitem.cxx +++ b/sw/source/ui/dbui/mmconfigitem.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmconfigitem.cxx,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx index 423185fb0b..57b3b15cfc 100644 --- a/sw/source/ui/dbui/mmdocselectpage.cxx +++ b/sw/source/ui/dbui/mmdocselectpage.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmdocselectpage.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmdocselectpage.hrc b/sw/source/ui/dbui/mmdocselectpage.hrc index e6e5bc9327..d2ebb3ae84 100644 --- a/sw/source/ui/dbui/mmdocselectpage.hrc +++ b/sw/source/ui/dbui/mmdocselectpage.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmdocselectpage.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx index 4d709ecff4..f9f4cc897c 100644 --- a/sw/source/ui/dbui/mmdocselectpage.hxx +++ b/sw/source/ui/dbui/mmdocselectpage.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmdocselectpage.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmdocselectpage.src b/sw/source/ui/dbui/mmdocselectpage.src index b3c80a7abc..ace679af4f 100644 --- a/sw/source/ui/dbui/mmdocselectpage.src +++ b/sw/source/ui/dbui/mmdocselectpage.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmdocselectpage.src,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index 03bd610213..4e287a5a28 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmgreetingspage.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmgreetingspage.hrc b/sw/source/ui/dbui/mmgreetingspage.hrc index 81d4d0ef72..508c247f97 100644 --- a/sw/source/ui/dbui/mmgreetingspage.hrc +++ b/sw/source/ui/dbui/mmgreetingspage.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmgreetingspage.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx index 9ca2b4d5cf..c41e804da8 100644 --- a/sw/source/ui/dbui/mmgreetingspage.hxx +++ b/sw/source/ui/dbui/mmgreetingspage.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmgreetingspage.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmgreetingspage.src b/sw/source/ui/dbui/mmgreetingspage.src index 78c40cd51f..fff77d9240 100644 --- a/sw/source/ui/dbui/mmgreetingspage.src +++ b/sw/source/ui/dbui/mmgreetingspage.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmgreetingspage.src,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index 05f38af1e7..9e3ddfd099 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmlayoutpage.cxx,v $ - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmlayoutpage.hrc b/sw/source/ui/dbui/mmlayoutpage.hrc index 6bc2f0f5d2..10d334e62a 100644 --- a/sw/source/ui/dbui/mmlayoutpage.hrc +++ b/sw/source/ui/dbui/mmlayoutpage.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmlayoutpage.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx index 1f53132fbd..79bc1e1d15 100644 --- a/sw/source/ui/dbui/mmlayoutpage.hxx +++ b/sw/source/ui/dbui/mmlayoutpage.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmlayoutpage.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmlayoutpage.src b/sw/source/ui/dbui/mmlayoutpage.src index beec9673be..07582a45ef 100644 --- a/sw/source/ui/dbui/mmlayoutpage.src +++ b/sw/source/ui/dbui/mmlayoutpage.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmlayoutpage.src,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmmergepage.cxx b/sw/source/ui/dbui/mmmergepage.cxx index a8a0f48c27..275ae56ece 100644 --- a/sw/source/ui/dbui/mmmergepage.cxx +++ b/sw/source/ui/dbui/mmmergepage.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmmergepage.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmmergepage.hrc b/sw/source/ui/dbui/mmmergepage.hrc index daaeb0eb7a..b7c3762c83 100644 --- a/sw/source/ui/dbui/mmmergepage.hrc +++ b/sw/source/ui/dbui/mmmergepage.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmmergepage.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmmergepage.hxx b/sw/source/ui/dbui/mmmergepage.hxx index 53e9a70cc9..2b8ade72dc 100644 --- a/sw/source/ui/dbui/mmmergepage.hxx +++ b/sw/source/ui/dbui/mmmergepage.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmmergepage.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmmergepage.src b/sw/source/ui/dbui/mmmergepage.src index a9895aaa9a..fd9fffc0de 100644 --- a/sw/source/ui/dbui/mmmergepage.src +++ b/sw/source/ui/dbui/mmmergepage.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmmergepage.src,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index f77ff57503..5ccb4b2be0 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmoutputpage.cxx,v $ - * $Revision: 1.23.136.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmoutputpage.hrc b/sw/source/ui/dbui/mmoutputpage.hrc index 7c329ca118..ec64620eb0 100644 --- a/sw/source/ui/dbui/mmoutputpage.hrc +++ b/sw/source/ui/dbui/mmoutputpage.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmoutputpage.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx index 5432ce1a83..f6e3987d1e 100644 --- a/sw/source/ui/dbui/mmoutputpage.hxx +++ b/sw/source/ui/dbui/mmoutputpage.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmoutputpage.hxx,v $ - * $Revision: 1.10.136.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmoutputpage.src b/sw/source/ui/dbui/mmoutputpage.src index 24f12cdf68..29e54bbb40 100644 --- a/sw/source/ui/dbui/mmoutputpage.src +++ b/sw/source/ui/dbui/mmoutputpage.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmoutputpage.src,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx index 276749ae73..3885286239 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.cxx +++ b/sw/source/ui/dbui/mmoutputtypepage.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmoutputtypepage.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmoutputtypepage.hrc b/sw/source/ui/dbui/mmoutputtypepage.hrc index 3854f15090..da8d34fe58 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.hrc +++ b/sw/source/ui/dbui/mmoutputtypepage.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmoutputtypepage.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmoutputtypepage.hxx b/sw/source/ui/dbui/mmoutputtypepage.hxx index eced05b180..9486b057d1 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.hxx +++ b/sw/source/ui/dbui/mmoutputtypepage.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmoutputtypepage.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmoutputtypepage.src b/sw/source/ui/dbui/mmoutputtypepage.src index 69b22322a7..a6dd74cc7a 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.src +++ b/sw/source/ui/dbui/mmoutputtypepage.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmoutputtypepage.src,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmpreparemergepage.cxx b/sw/source/ui/dbui/mmpreparemergepage.cxx index 934a9e7056..a6dc5d09c1 100644 --- a/sw/source/ui/dbui/mmpreparemergepage.cxx +++ b/sw/source/ui/dbui/mmpreparemergepage.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmpreparemergepage.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmpreparemergepage.hrc b/sw/source/ui/dbui/mmpreparemergepage.hrc index 88ef0ba7fd..d5a89256d4 100644 --- a/sw/source/ui/dbui/mmpreparemergepage.hrc +++ b/sw/source/ui/dbui/mmpreparemergepage.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmpreparemergepage.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmpreparemergepage.hxx b/sw/source/ui/dbui/mmpreparemergepage.hxx index ede73bba0d..25aded367e 100644 --- a/sw/source/ui/dbui/mmpreparemergepage.hxx +++ b/sw/source/ui/dbui/mmpreparemergepage.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmpreparemergepage.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/mmpreparemergepage.src b/sw/source/ui/dbui/mmpreparemergepage.src index 9e3322e39e..b1ecd375d4 100644 --- a/sw/source/ui/dbui/mmpreparemergepage.src +++ b/sw/source/ui/dbui/mmpreparemergepage.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmpreparemergepage.src,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index c1be0ed1d6..51277a1fed 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: selectdbtabledialog.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/selectdbtabledialog.hrc b/sw/source/ui/dbui/selectdbtabledialog.hrc index edf9b1090c..a5c55ff480 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.hrc +++ b/sw/source/ui/dbui/selectdbtabledialog.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: selectdbtabledialog.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/selectdbtabledialog.hxx b/sw/source/ui/dbui/selectdbtabledialog.hxx index 4215d0797f..fe3721c482 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.hxx +++ b/sw/source/ui/dbui/selectdbtabledialog.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: selectdbtabledialog.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/selectdbtabledialog.src b/sw/source/ui/dbui/selectdbtabledialog.src index b77827b1b7..467cb8333e 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.src +++ b/sw/source/ui/dbui/selectdbtabledialog.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: selectdbtabledialog.src,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dbui/swdbtoolsclient.cxx b/sw/source/ui/dbui/swdbtoolsclient.cxx index bcaf8ae973..786c60be65 100644 --- a/sw/source/ui/dbui/swdbtoolsclient.cxx +++ b/sw/source/ui/dbui/swdbtoolsclient.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swdbtoolsclient.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx index 6f8bd1f466..ea961f6cc6 100644 --- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwSpellDialogChildWindow.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/abstract.cxx b/sw/source/ui/dialog/abstract.cxx index 6b8e7a0d7b..a265d03af1 100644 --- a/sw/source/ui/dialog/abstract.cxx +++ b/sw/source/ui/dialog/abstract.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: abstract.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/abstract.hrc b/sw/source/ui/dialog/abstract.hrc index db2155e5bd..a42781e454 100644 --- a/sw/source/ui/dialog/abstract.hrc +++ b/sw/source/ui/dialog/abstract.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: abstract.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/abstract.src b/sw/source/ui/dialog/abstract.src index 8659abb60b..ab5a86394b 100644 --- a/sw/source/ui/dialog/abstract.src +++ b/sw/source/ui/dialog/abstract.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: abstract.src,v $ - * $Revision: 1.30 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/addrdlg.cxx b/sw/source/ui/dialog/addrdlg.cxx index 0c26f8fa90..4fe00e88cd 100644 --- a/sw/source/ui/dialog/addrdlg.cxx +++ b/sw/source/ui/dialog/addrdlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: addrdlg.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index 6907737855..15f59b5c8a 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ascfldlg.cxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/ascfldlg.hrc b/sw/source/ui/dialog/ascfldlg.hrc index dca96003e3..efbafaa00b 100644 --- a/sw/source/ui/dialog/ascfldlg.hrc +++ b/sw/source/ui/dialog/ascfldlg.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ascfldlg.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/ascfldlg.src b/sw/source/ui/dialog/ascfldlg.src index ad03b2e70b..f10fed8a87 100644 --- a/sw/source/ui/dialog/ascfldlg.src +++ b/sw/source/ui/dialog/ascfldlg.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ascfldlg.src,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/dialog.src b/sw/source/ui/dialog/dialog.src index 2e27bafe58..f3df744189 100644 --- a/sw/source/ui/dialog/dialog.src +++ b/sw/source/ui/dialog/dialog.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dialog.src,v $ - * $Revision: 1.30.240.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx index 6ec4cdb16f..b96fa4f1ee 100644 --- a/sw/source/ui/dialog/docstdlg.cxx +++ b/sw/source/ui/dialog/docstdlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docstdlg.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/docstdlg.hrc b/sw/source/ui/dialog/docstdlg.hrc index 91c8b3929a..358b2770ea 100644 --- a/sw/source/ui/dialog/docstdlg.hrc +++ b/sw/source/ui/dialog/docstdlg.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docstdlg.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/docstdlg.src b/sw/source/ui/dialog/docstdlg.src index 0dc9dad7b6..5926321d88 100644 --- a/sw/source/ui/dialog/docstdlg.src +++ b/sw/source/ui/dialog/docstdlg.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docstdlg.src,v $ - * $Revision: 1.34 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx index 50e76dcfc5..c79e7874dd 100644 --- a/sw/source/ui/dialog/macassgn.cxx +++ b/sw/source/ui/dialog/macassgn.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: macassgn.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/makefile.mk b/sw/source/ui/dialog/makefile.mk index ce90d6a3a6..54b7784946 100644 --- a/sw/source/ui/dialog/makefile.mk +++ b/sw/source/ui/dialog/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.22 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx index 9a35c75d0d..2cbc828108 100644 --- a/sw/source/ui/dialog/regionsw.cxx +++ b/sw/source/ui/dialog/regionsw.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: regionsw.cxx,v $ - * $Revision: 1.40 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/regionsw.hrc b/sw/source/ui/dialog/regionsw.hrc index d9ce36ba8a..d396053ab2 100644 --- a/sw/source/ui/dialog/regionsw.hrc +++ b/sw/source/ui/dialog/regionsw.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: regionsw.hrc,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/regionsw.src b/sw/source/ui/dialog/regionsw.src index aa7d3f7e17..e0da42f07f 100644 --- a/sw/source/ui/dialog/regionsw.src +++ b/sw/source/ui/dialog/regionsw.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: regionsw.src,v $ - * $Revision: 1.59 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/swabstdlg.cxx b/sw/source/ui/dialog/swabstdlg.cxx index 596ee4ea07..2214dc5608 100644 --- a/sw/source/ui/dialog/swabstdlg.cxx +++ b/sw/source/ui/dialog/swabstdlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swabstdlg.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/swdialmgr.cxx b/sw/source/ui/dialog/swdialmgr.cxx index 17d0c66707..37d6762d35 100644 --- a/sw/source/ui/dialog/swdialmgr.cxx +++ b/sw/source/ui/dialog/swdialmgr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swdialmgr.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 10c153c484..4d787d859d 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swdlgfact.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 8e31e93b8a..3c12709bd6 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swdlgfact.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx index b04188074b..5a2f03205e 100644 --- a/sw/source/ui/dialog/swuiexp.cxx +++ b/sw/source/ui/dialog/swuiexp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swuiexp.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/swwrtshitem.cxx b/sw/source/ui/dialog/swwrtshitem.cxx index 65c49fe428..7c0ef68bd2 100644 --- a/sw/source/ui/dialog/swwrtshitem.cxx +++ b/sw/source/ui/dialog/swwrtshitem.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swwrtshitem.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index e34dc9387e..737523b9b0 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: uiregionsw.cxx,v $ - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx index 8ae35e684a..51e928eff7 100644 --- a/sw/source/ui/dialog/wordcountdialog.cxx +++ b/sw/source/ui/dialog/wordcountdialog.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wordcountdialog.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/wordcountdialog.hrc b/sw/source/ui/dialog/wordcountdialog.hrc index 155f03948c..ccb6391cf9 100644 --- a/sw/source/ui/dialog/wordcountdialog.hrc +++ b/sw/source/ui/dialog/wordcountdialog.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wordcountdialog.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dialog/wordcountdialog.src b/sw/source/ui/dialog/wordcountdialog.src index 002dd49fc5..d2d4676b35 100644 --- a/sw/source/ui/dialog/wordcountdialog.src +++ b/sw/source/ui/dialog/wordcountdialog.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wordcountdialog.src,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dochdl/dochdl.src b/sw/source/ui/dochdl/dochdl.src index 9d83668b55..fb4db99410 100644 --- a/sw/source/ui/dochdl/dochdl.src +++ b/sw/source/ui/dochdl/dochdl.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dochdl.src,v $ - * $Revision: 1.48.240.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx index c82bbb4d75..60cc42212f 100644 --- a/sw/source/ui/dochdl/gloshdl.cxx +++ b/sw/source/ui/dochdl/gloshdl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: gloshdl.cxx,v $ - * $Revision: 1.32.240.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dochdl/makefile.mk b/sw/source/ui/dochdl/makefile.mk index 73974c4646..48400052f5 100644 --- a/sw/source/ui/dochdl/makefile.mk +++ b/sw/source/ui/dochdl/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.9 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dochdl/selglos.cxx b/sw/source/ui/dochdl/selglos.cxx index 741118aec6..1c05981991 100644 --- a/sw/source/ui/dochdl/selglos.cxx +++ b/sw/source/ui/dochdl/selglos.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: selglos.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dochdl/selglos.hrc b/sw/source/ui/dochdl/selglos.hrc index 5e4103cfc5..f42c5f2633 100644 --- a/sw/source/ui/dochdl/selglos.hrc +++ b/sw/source/ui/dochdl/selglos.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: selglos.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dochdl/selglos.src b/sw/source/ui/dochdl/selglos.src index b34f29525b..81162518c1 100644 --- a/sw/source/ui/dochdl/selglos.src +++ b/sw/source/ui/dochdl/selglos.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: selglos.src,v $ - * $Revision: 1.28 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index a1589281d5..f2399f7fff 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swdtflvr.cxx,v $ - * $Revision: 1.120 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 17673cd387..e2e0e04ef2 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PostItMgr.cxx,v $ - * - * $Revision: 1.12.34.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/docvw/access.src b/sw/source/ui/docvw/access.src index e73ee278c2..99d05eafc3 100644 --- a/sw/source/ui/docvw/access.src +++ b/sw/source/ui/docvw/access.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: access.src,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/docvw/docvw.hrc b/sw/source/ui/docvw/docvw.hrc index 09b6e42f14..998c71401e 100644 --- a/sw/source/ui/docvw/docvw.hrc +++ b/sw/source/ui/docvw/docvw.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docvw.hrc,v $ - * $Revision: 1.11.190.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/docvw/docvw.src b/sw/source/ui/docvw/docvw.src index 74da4994c7..741d8ea391 100644 --- a/sw/source/ui/docvw/docvw.src +++ b/sw/source/ui/docvw/docvw.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docvw.src,v $ - * $Revision: 1.52.140.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx index 82577b37ae..e63c2583cc 100644 --- a/sw/source/ui/docvw/edtdd.cxx +++ b/sw/source/ui/docvw/edtdd.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edtdd.cxx,v $ - * $Revision: 1.29 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 6a22daafde..ef243cd184 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edtwin.cxx,v $ - * $Revision: 1.164 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx index 7771bd4058..56fc548b6a 100644 --- a/sw/source/ui/docvw/edtwin2.cxx +++ b/sw/source/ui/docvw/edtwin2.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edtwin2.cxx,v $ - * $Revision: 1.31.130.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/docvw/edtwin3.cxx b/sw/source/ui/docvw/edtwin3.cxx index ff951764bb..9b5dcd9df5 100644 --- a/sw/source/ui/docvw/edtwin3.cxx +++ b/sw/source/ui/docvw/edtwin3.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edtwin3.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/docvw/makefile.mk b/sw/source/ui/docvw/makefile.mk index 0ca95000b5..c3644c83f2 100644 --- a/sw/source/ui/docvw/makefile.mk +++ b/sw/source/ui/docvw/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.7 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx index 8972b68f2d..0b75454310 100644 --- a/sw/source/ui/docvw/postit.cxx +++ b/sw/source/ui/docvw/postit.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: postit.cxx,v $ - * $Revision: 1.8.42.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx index 8d8451188f..828f2e25e1 100644 --- a/sw/source/ui/docvw/romenu.cxx +++ b/sw/source/ui/docvw/romenu.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: romenu.cxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/docvw/romenu.hxx b/sw/source/ui/docvw/romenu.hxx index d332821ba6..55f238fdca 100644 --- a/sw/source/ui/docvw/romenu.hxx +++ b/sw/source/ui/docvw/romenu.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: romenu.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx index ed2d42db0c..de9e72cca9 100644 --- a/sw/source/ui/docvw/srcedtw.cxx +++ b/sw/source/ui/docvw/srcedtw.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: srcedtw.cxx,v $ - * $Revision: 1.21.252.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/envelp.src b/sw/source/ui/envelp/envelp.src index 9721b48e6b..285f488709 100644 --- a/sw/source/ui/envelp/envelp.src +++ b/sw/source/ui/envelp/envelp.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: envelp.src,v $ - * $Revision: 1.35 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index 7114470d0e..0f1d62f81f 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: envfmt.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/envfmt.hrc b/sw/source/ui/envelp/envfmt.hrc index 51c29fef2c..df10c15a12 100644 --- a/sw/source/ui/envelp/envfmt.hrc +++ b/sw/source/ui/envelp/envfmt.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: envfmt.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx index 3478dde394..9c45d6b3c0 100644 --- a/sw/source/ui/envelp/envfmt.hxx +++ b/sw/source/ui/envelp/envfmt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: envfmt.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/envfmt.src b/sw/source/ui/envelp/envfmt.src index d1bf947c18..16987430b7 100644 --- a/sw/source/ui/envelp/envfmt.src +++ b/sw/source/ui/envelp/envfmt.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: envfmt.src,v $ - * $Revision: 1.29 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx index fefe09f318..c0d369f11b 100644 --- a/sw/source/ui/envelp/envimg.cxx +++ b/sw/source/ui/envelp/envimg.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: envimg.cxx,v $ - * $Revision: 1.13.176.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/envlop.hrc b/sw/source/ui/envelp/envlop.hrc index e1a8c92f20..359b9f2419 100644 --- a/sw/source/ui/envelp/envlop.hrc +++ b/sw/source/ui/envelp/envlop.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: envlop.hrc,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/envlop.src b/sw/source/ui/envelp/envlop.src index 86ec9e28a3..2c025633b0 100644 --- a/sw/source/ui/envelp/envlop.src +++ b/sw/source/ui/envelp/envlop.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: envlop.src,v $ - * $Revision: 1.38 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 604b6d5592..12b0f1f38f 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: envlop1.cxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx index 46b3c4d47b..b7c155a72a 100644 --- a/sw/source/ui/envelp/envprt.cxx +++ b/sw/source/ui/envelp/envprt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: envprt.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/envprt.hrc b/sw/source/ui/envelp/envprt.hrc index 39afbede48..b5a8a034c1 100644 --- a/sw/source/ui/envelp/envprt.hrc +++ b/sw/source/ui/envelp/envprt.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: envprt.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx index e628c3d170..0ac2d90ca4 100644 --- a/sw/source/ui/envelp/envprt.hxx +++ b/sw/source/ui/envelp/envprt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: envprt.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/envprt.src b/sw/source/ui/envelp/envprt.src index 3397ef9e5c..25a92fcda2 100644 --- a/sw/source/ui/envelp/envprt.src +++ b/sw/source/ui/envelp/envprt.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: envprt.src,v $ - * $Revision: 1.34 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/label.hrc b/sw/source/ui/envelp/label.hrc index 2074711ffb..9457fff866 100644 --- a/sw/source/ui/envelp/label.hrc +++ b/sw/source/ui/envelp/label.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: label.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/label.src b/sw/source/ui/envelp/label.src index e8d60f356a..f2200a0c44 100644 --- a/sw/source/ui/envelp/label.src +++ b/sw/source/ui/envelp/label.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: label.src,v $ - * $Revision: 1.59 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index 493e74c76a..05c2cf90be 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: label1.cxx,v $ - * $Revision: 1.38 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/labelcfg.cxx b/sw/source/ui/envelp/labelcfg.cxx index a5b17d1256..4cd165e6ca 100644 --- a/sw/source/ui/envelp/labelcfg.cxx +++ b/sw/source/ui/envelp/labelcfg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: labelcfg.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx index 0b0f557bbb..604677395e 100644 --- a/sw/source/ui/envelp/labelexp.cxx +++ b/sw/source/ui/envelp/labelexp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: labelexp.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index 2048ac0b81..feae56b71e 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: labfmt.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/labfmt.hrc b/sw/source/ui/envelp/labfmt.hrc index 8f1c86157e..96e511038f 100644 --- a/sw/source/ui/envelp/labfmt.hrc +++ b/sw/source/ui/envelp/labfmt.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: labfmt.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx index 35e9639383..8b3be95f5e 100644 --- a/sw/source/ui/envelp/labfmt.hxx +++ b/sw/source/ui/envelp/labfmt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: labfmt.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/labfmt.src b/sw/source/ui/envelp/labfmt.src index 53640b84a6..8d39f44b58 100644 --- a/sw/source/ui/envelp/labfmt.src +++ b/sw/source/ui/envelp/labfmt.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: labfmt.src,v $ - * $Revision: 1.29 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/labimg.cxx b/sw/source/ui/envelp/labimg.cxx index 63a21637b4..2b436c9e7b 100644 --- a/sw/source/ui/envelp/labimg.cxx +++ b/sw/source/ui/envelp/labimg.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: labimg.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/labimp.hxx b/sw/source/ui/envelp/labimp.hxx index b48170a6f1..be3fa2c537 100644 --- a/sw/source/ui/envelp/labimp.hxx +++ b/sw/source/ui/envelp/labimp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: labimp.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx index 0726587513..59b4d9684c 100644 --- a/sw/source/ui/envelp/labprt.cxx +++ b/sw/source/ui/envelp/labprt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: labprt.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/labprt.hrc b/sw/source/ui/envelp/labprt.hrc index 9f2ec12cc4..56cc1e09cd 100644 --- a/sw/source/ui/envelp/labprt.hrc +++ b/sw/source/ui/envelp/labprt.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: labprt.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx index b11fdf0a1e..e64f7d739d 100644 --- a/sw/source/ui/envelp/labprt.hxx +++ b/sw/source/ui/envelp/labprt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: labprt.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/labprt.src b/sw/source/ui/envelp/labprt.src index 7d39017ab0..b6452f56ce 100644 --- a/sw/source/ui/envelp/labprt.src +++ b/sw/source/ui/envelp/labprt.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: labprt.src,v $ - * $Revision: 1.35 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index de4f58fb80..948b65bbd5 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailmrge.cxx,v $ - * $Revision: 1.39 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/mailmrge.hrc b/sw/source/ui/envelp/mailmrge.hrc index a5401993d6..f98c69c75b 100644 --- a/sw/source/ui/envelp/mailmrge.hrc +++ b/sw/source/ui/envelp/mailmrge.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailmrge.hrc,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/mailmrge.src b/sw/source/ui/envelp/mailmrge.src index a4742ecade..f87f08478a 100644 --- a/sw/source/ui/envelp/mailmrge.src +++ b/sw/source/ui/envelp/mailmrge.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailmrge.src,v $ - * $Revision: 1.44 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/makefile.mk b/sw/source/ui/envelp/makefile.mk index 5e5105d3d4..3010601b0a 100644 --- a/sw/source/ui/envelp/makefile.mk +++ b/sw/source/ui/envelp/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.10 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx index 3aa32ebfe1..49e12d0017 100644 --- a/sw/source/ui/envelp/swuilabimp.hxx +++ b/sw/source/ui/envelp/swuilabimp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swuilabimp.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/envelp/syncbtn.cxx b/sw/source/ui/envelp/syncbtn.cxx index 05d7e0fa4e..dba0170d20 100644 --- a/sw/source/ui/envelp/syncbtn.cxx +++ b/sw/source/ui/envelp/syncbtn.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: syncbtn.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx index baa268b274..a32e6634b2 100644 --- a/sw/source/ui/fldui/DropDownFieldDialog.cxx +++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DropDownFieldDialog.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/DropDownFieldDialog.hrc b/sw/source/ui/fldui/DropDownFieldDialog.hrc index f9a0eae0ba..2d3f1955e0 100644 --- a/sw/source/ui/fldui/DropDownFieldDialog.hrc +++ b/sw/source/ui/fldui/DropDownFieldDialog.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DropDownFieldDialog.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/DropDownFieldDialog.src b/sw/source/ui/fldui/DropDownFieldDialog.src index 96d0cf02f7..25f6c4ac15 100644 --- a/sw/source/ui/fldui/DropDownFieldDialog.src +++ b/sw/source/ui/fldui/DropDownFieldDialog.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DropDownFieldDialog.src,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/FldRefTreeListBox.cxx b/sw/source/ui/fldui/FldRefTreeListBox.cxx index 8af2296d63..3d81ea70b3 100644 --- a/sw/source/ui/fldui/FldRefTreeListBox.cxx +++ b/sw/source/ui/fldui/FldRefTreeListBox.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FldRefTreeListBox.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/FldRefTreeListBox.hxx b/sw/source/ui/fldui/FldRefTreeListBox.hxx index c1b0dae3f1..93867695be 100644 --- a/sw/source/ui/fldui/FldRefTreeListBox.hxx +++ b/sw/source/ui/fldui/FldRefTreeListBox.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FldRefTreeListBox.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx index 79ccb9ed2c..bd35309e68 100644 --- a/sw/source/ui/fldui/changedb.cxx +++ b/sw/source/ui/fldui/changedb.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: changedb.cxx,v $ - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/changedb.hrc b/sw/source/ui/fldui/changedb.hrc index 894a941806..7ab2765eab 100644 --- a/sw/source/ui/fldui/changedb.hrc +++ b/sw/source/ui/fldui/changedb.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: changedb.hrc,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/changedb.src b/sw/source/ui/fldui/changedb.src index f17ce4b543..a461a1d7ac 100644 --- a/sw/source/ui/fldui/changedb.src +++ b/sw/source/ui/fldui/changedb.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: changedb.src,v $ - * $Revision: 1.35 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index efa33e0f67..274bbdf12f 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flddb.cxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx index b973ec5cd7..88ffe343ab 100644 --- a/sw/source/ui/fldui/flddb.hxx +++ b/sw/source/ui/fldui/flddb.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flddb.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/flddb.src b/sw/source/ui/fldui/flddb.src index abc65d46ad..e7bc8b99f9 100644 --- a/sw/source/ui/fldui/flddb.src +++ b/sw/source/ui/fldui/flddb.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flddb.src,v $ - * $Revision: 1.35 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 47f10db6fb..dabb6b91e5 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flddinf.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx index 66e78ae64c..3c86b53c1b 100644 --- a/sw/source/ui/fldui/flddinf.hxx +++ b/sw/source/ui/fldui/flddinf.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flddinf.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/flddinf.src b/sw/source/ui/fldui/flddinf.src index d3cfef8f30..9f65b88fa3 100644 --- a/sw/source/ui/fldui/flddinf.src +++ b/sw/source/ui/fldui/flddinf.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flddinf.src,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index c8ef4e7a33..9437b1d514 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flddok.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx index 715ef9553a..655a1e730f 100644 --- a/sw/source/ui/fldui/flddok.hxx +++ b/sw/source/ui/fldui/flddok.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flddok.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/flddok.src b/sw/source/ui/fldui/flddok.src index 2490d28bd6..6a60f8b53f 100644 --- a/sw/source/ui/fldui/flddok.src +++ b/sw/source/ui/fldui/flddok.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: flddok.src,v $ - * $Revision: 1.25 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index ffc3e84ba7..a905de6b30 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldedt.cxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index ad518a0336..21b8e84cc7 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldfunc.cxx,v $ - * $Revision: 1.22.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx index 5db2865803..baa011fea8 100644 --- a/sw/source/ui/fldui/fldfunc.hxx +++ b/sw/source/ui/fldui/fldfunc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldfunc.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldfunc.src b/sw/source/ui/fldui/fldfunc.src index 940d8fd5d3..ca67c448fb 100644 --- a/sw/source/ui/fldui/fldfunc.src +++ b/sw/source/ui/fldui/fldfunc.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldfunc.src,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx index a767990c23..04a94e8bbf 100644 --- a/sw/source/ui/fldui/fldmgr.cxx +++ b/sw/source/ui/fldui/fldmgr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldmgr.cxx,v $ - * $Revision: 1.53 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx index 1c293a75f4..385ed8d60f 100644 --- a/sw/source/ui/fldui/fldpage.cxx +++ b/sw/source/ui/fldui/fldpage.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldpage.cxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx index 7595daa35e..c7f07e3d14 100644 --- a/sw/source/ui/fldui/fldpage.hxx +++ b/sw/source/ui/fldui/fldpage.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldpage.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 886ea2704c..10ee25b477 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldref.cxx,v $ - * $Revision: 1.12.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx index 35dae2f8e1..b7024d6531 100644 --- a/sw/source/ui/fldui/fldref.hxx +++ b/sw/source/ui/fldui/fldref.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldref.hxx,v $ - * $Revision: 1.4.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldref.src b/sw/source/ui/fldui/fldref.src index 056b290b4a..8abf02e980 100644 --- a/sw/source/ui/fldui/fldref.src +++ b/sw/source/ui/fldui/fldref.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldref.src,v $ - * $Revision: 1.29 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index e594b04e8b..7aa6cb0ad7 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldtdlg.cxx,v $ - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldtdlg.hrc b/sw/source/ui/fldui/fldtdlg.hrc index 89ab095c05..eaa88e5d1d 100644 --- a/sw/source/ui/fldui/fldtdlg.hrc +++ b/sw/source/ui/fldui/fldtdlg.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldtdlg.hrc,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldtdlg.src b/sw/source/ui/fldui/fldtdlg.src index 880e08d416..c83c0b0e9e 100644 --- a/sw/source/ui/fldui/fldtdlg.src +++ b/sw/source/ui/fldui/fldtdlg.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldtdlg.src,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldui.src b/sw/source/ui/fldui/fldui.src index 403869ebee..142e450773 100644 --- a/sw/source/ui/fldui/fldui.src +++ b/sw/source/ui/fldui/fldui.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldui.src,v $ - * $Revision: 1.57 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 99a63ab894..c3a2f6dd47 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldvar.cxx,v $ - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx index 0bae413b09..01d07e898e 100644 --- a/sw/source/ui/fldui/fldvar.hxx +++ b/sw/source/ui/fldui/fldvar.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldvar.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldvar.src b/sw/source/ui/fldui/fldvar.src index 63e0add38f..eda28b7fb4 100644 --- a/sw/source/ui/fldui/fldvar.src +++ b/sw/source/ui/fldui/fldvar.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldvar.src,v $ - * $Revision: 1.28 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/fldwrap.cxx b/sw/source/ui/fldui/fldwrap.cxx index 15d21b0c13..30d56623d8 100644 --- a/sw/source/ui/fldui/fldwrap.cxx +++ b/sw/source/ui/fldui/fldwrap.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldwrap.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx index 949cb9c207..d8cd6988a0 100644 --- a/sw/source/ui/fldui/inpdlg.cxx +++ b/sw/source/ui/fldui/inpdlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: inpdlg.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/inpdlg.hrc b/sw/source/ui/fldui/inpdlg.hrc index c9682a4689..8a7a3eea90 100644 --- a/sw/source/ui/fldui/inpdlg.hrc +++ b/sw/source/ui/fldui/inpdlg.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: inpdlg.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/inpdlg.src b/sw/source/ui/fldui/inpdlg.src index 1ebe6f0e5f..f615b68f48 100644 --- a/sw/source/ui/fldui/inpdlg.src +++ b/sw/source/ui/fldui/inpdlg.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: inpdlg.src,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index 8d721a48fe..3d24c5d095 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: javaedit.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/javaedit.hrc b/sw/source/ui/fldui/javaedit.hrc index c41d7a09f7..7c996e832e 100644 --- a/sw/source/ui/fldui/javaedit.hrc +++ b/sw/source/ui/fldui/javaedit.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: javaedit.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/javaedit.src b/sw/source/ui/fldui/javaedit.src index 3acc650b0c..ffeb2b84e8 100644 --- a/sw/source/ui/fldui/javaedit.src +++ b/sw/source/ui/fldui/javaedit.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: javaedit.src,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/makefile.mk b/sw/source/ui/fldui/makefile.mk index 23160cf80f..ee9dbff9cf 100644 --- a/sw/source/ui/fldui/makefile.mk +++ b/sw/source/ui/fldui/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.11 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fldui/xfldui.cxx b/sw/source/ui/fldui/xfldui.cxx index b19fe54023..b5765c3fb3 100644 --- a/sw/source/ui/fldui/xfldui.cxx +++ b/sw/source/ui/fldui/xfldui.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: xfldui.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fmtui/fmtui.src b/sw/source/ui/fmtui/fmtui.src index f3c73ad19d..2f68cbdc56 100644 --- a/sw/source/ui/fmtui/fmtui.src +++ b/sw/source/ui/fmtui/fmtui.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmtui.src,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fmtui/makefile.mk b/sw/source/ui/fmtui/makefile.mk index 208608c1f9..37ad48df00 100644 --- a/sw/source/ui/fmtui/makefile.mk +++ b/sw/source/ui/fmtui/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.6 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index d8f316875a..5ec3caa50b 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tmpdlg.cxx,v $ - * $Revision: 1.25 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/fmtui/tmpdlg.src b/sw/source/ui/fmtui/tmpdlg.src index 08fc15e2f0..3d9e8df617 100644 --- a/sw/source/ui/fmtui/tmpdlg.src +++ b/sw/source/ui/fmtui/tmpdlg.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tmpdlg.src,v $ - * $Revision: 1.52 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/colex.cxx b/sw/source/ui/frmdlg/colex.cxx index d042ce7dca..7a0e85efb3 100644 --- a/sw/source/ui/frmdlg/colex.cxx +++ b/sw/source/ui/frmdlg/colex.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: colex.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/colmgr.cxx b/sw/source/ui/frmdlg/colmgr.cxx index c403174a67..360c9aead8 100644 --- a/sw/source/ui/frmdlg/colmgr.cxx +++ b/sw/source/ui/frmdlg/colmgr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: colmgr.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index c7298118cd..525312112c 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: column.cxx,v $ - * $Revision: 1.37 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/column.hrc b/sw/source/ui/frmdlg/column.hrc index d3fabd46e5..172674a6b3 100644 --- a/sw/source/ui/frmdlg/column.hrc +++ b/sw/source/ui/frmdlg/column.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: column.hrc,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/column.src b/sw/source/ui/frmdlg/column.src index 0abc1cc3fa..449fbbf121 100644 --- a/sw/source/ui/frmdlg/column.src +++ b/sw/source/ui/frmdlg/column.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: column.src,v $ - * $Revision: 1.55 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index 9fe8885018..5e7167b6bc 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cption.cxx,v $ - * $Revision: 1.29 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/cption.hrc b/sw/source/ui/frmdlg/cption.hrc index 3e7748a9a5..b85b6215a5 100644 --- a/sw/source/ui/frmdlg/cption.hrc +++ b/sw/source/ui/frmdlg/cption.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cption.hrc,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/cption.src b/sw/source/ui/frmdlg/cption.src index 6b01820bad..da651a4573 100644 --- a/sw/source/ui/frmdlg/cption.src +++ b/sw/source/ui/frmdlg/cption.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cption.src,v $ - * $Revision: 1.44 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index b484810ed9..c69a2b5601 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmdlg.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/frmmgr.cxx b/sw/source/ui/frmdlg/frmmgr.cxx index 359b3a595b..5ef3cca8ff 100644 --- a/sw/source/ui/frmdlg/frmmgr.cxx +++ b/sw/source/ui/frmdlg/frmmgr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmmgr.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 8908f1f4a3..11ed2dca66 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmpage.cxx,v $ - * $Revision: 1.67 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/frmpage.hrc b/sw/source/ui/frmdlg/frmpage.hrc index 07a2515cb3..a1f213ee6b 100644 --- a/sw/source/ui/frmdlg/frmpage.hrc +++ b/sw/source/ui/frmdlg/frmpage.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmpage.hrc,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/frmpage.src b/sw/source/ui/frmdlg/frmpage.src index f0829319d1..5ce84d4552 100644 --- a/sw/source/ui/frmdlg/frmpage.src +++ b/sw/source/ui/frmdlg/frmpage.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmpage.src,v $ - * $Revision: 1.67.240.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/frmui.src b/sw/source/ui/frmdlg/frmui.src index cf18123918..2b58742fc0 100644 --- a/sw/source/ui/frmdlg/frmui.src +++ b/sw/source/ui/frmdlg/frmui.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmui.src,v $ - * $Revision: 1.39 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/makefile.mk b/sw/source/ui/frmdlg/makefile.mk index 10493732fb..a7addb0b94 100644 --- a/sw/source/ui/frmdlg/makefile.mk +++ b/sw/source/ui/frmdlg/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.15 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/pattern.cxx b/sw/source/ui/frmdlg/pattern.cxx index b54ac76a5b..e8b0ac664d 100644 --- a/sw/source/ui/frmdlg/pattern.cxx +++ b/sw/source/ui/frmdlg/pattern.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pattern.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/pattern.hrc b/sw/source/ui/frmdlg/pattern.hrc index 7f1d321e08..1a4750e234 100644 --- a/sw/source/ui/frmdlg/pattern.hrc +++ b/sw/source/ui/frmdlg/pattern.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pattern.hrc,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/uiborder.cxx b/sw/source/ui/frmdlg/uiborder.cxx index 6904621557..560961951a 100644 --- a/sw/source/ui/frmdlg/uiborder.cxx +++ b/sw/source/ui/frmdlg/uiborder.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: uiborder.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index 8b4771ca69..e0769528bd 100644 --- a/sw/source/ui/frmdlg/wrap.cxx +++ b/sw/source/ui/frmdlg/wrap.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrap.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/wrap.hrc b/sw/source/ui/frmdlg/wrap.hrc index 444445df52..077d8af659 100644 --- a/sw/source/ui/frmdlg/wrap.hrc +++ b/sw/source/ui/frmdlg/wrap.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrap.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/frmdlg/wrap.src b/sw/source/ui/frmdlg/wrap.src index e894f6fff0..6810f55e1a 100644 --- a/sw/source/ui/frmdlg/wrap.src +++ b/sw/source/ui/frmdlg/wrap.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrap.src,v $ - * $Revision: 1.38 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/globdoc/globdoc.cxx b/sw/source/ui/globdoc/globdoc.cxx index d759144f02..8bcc5d8553 100644 --- a/sw/source/ui/globdoc/globdoc.cxx +++ b/sw/source/ui/globdoc/globdoc.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: globdoc.cxx,v $ - * $Revision: 1.16.146.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/globdoc/globdoc.src b/sw/source/ui/globdoc/globdoc.src index fd79e88700..9c8b19ac10 100644 --- a/sw/source/ui/globdoc/globdoc.src +++ b/sw/source/ui/globdoc/globdoc.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: globdoc.src,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/globdoc/makefile.mk b/sw/source/ui/globdoc/makefile.mk index 2a63b210da..d75eb7af88 100644 --- a/sw/source/ui/globdoc/makefile.mk +++ b/sw/source/ui/globdoc/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.5 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/DropDownFieldDialog.hxx b/sw/source/ui/inc/DropDownFieldDialog.hxx index c8664cdd69..3308f5e4b1 100644 --- a/sw/source/ui/inc/DropDownFieldDialog.hxx +++ b/sw/source/ui/inc/DropDownFieldDialog.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DropDownFieldDialog.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx index cdbd86a372..5628aed15b 100644 --- a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx +++ b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwSpellDialogChildWindow.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/SwXFilterOptions.hxx b/sw/source/ui/inc/SwXFilterOptions.hxx index 918191616d..383d6f992f 100644 --- a/sw/source/ui/inc/SwXFilterOptions.hxx +++ b/sw/source/ui/inc/SwXFilterOptions.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXFilterOptions.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/abstract.hxx b/sw/source/ui/inc/abstract.hxx index e36a100a78..2df6f6c0c9 100644 --- a/sw/source/ui/inc/abstract.hxx +++ b/sw/source/ui/inc/abstract.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: abstract.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/actctrl.hxx b/sw/source/ui/inc/actctrl.hxx index 70ddedadcc..3015667304 100644 --- a/sw/source/ui/inc/actctrl.hxx +++ b/sw/source/ui/inc/actctrl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: actctrl.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/addrdlg.hxx b/sw/source/ui/inc/addrdlg.hxx index 9c7946dde3..7bc6d9b759 100644 --- a/sw/source/ui/inc/addrdlg.hxx +++ b/sw/source/ui/inc/addrdlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: addrdlg.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/annotsh.hxx b/sw/source/ui/inc/annotsh.hxx index cb8f485283..51bb596061 100755 --- a/sw/source/ui/inc/annotsh.hxx +++ b/sw/source/ui/inc/annotsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: annotsh.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/app.hrc b/sw/source/ui/inc/app.hrc index a3d739965d..0ecc117ba9 100644 --- a/sw/source/ui/inc/app.hrc +++ b/sw/source/ui/inc/app.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: app.hrc,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/ascfldlg.hxx b/sw/source/ui/inc/ascfldlg.hxx index ec4f161146..0bdec40ba8 100644 --- a/sw/source/ui/inc/ascfldlg.hxx +++ b/sw/source/ui/inc/ascfldlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ascfldlg.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/autoedit.hxx b/sw/source/ui/inc/autoedit.hxx index a9d37325d0..ab9a16fb6b 100644 --- a/sw/source/ui/inc/autoedit.hxx +++ b/sw/source/ui/inc/autoedit.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: autoedit.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/barcfg.hxx b/sw/source/ui/inc/barcfg.hxx index e214a772c6..1e55db4027 100644 --- a/sw/source/ui/inc/barcfg.hxx +++ b/sw/source/ui/inc/barcfg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: barcfg.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/basesh.hxx b/sw/source/ui/inc/basesh.hxx index 9bd2ed0af3..9a0e0b48d6 100644 --- a/sw/source/ui/inc/basesh.hxx +++ b/sw/source/ui/inc/basesh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: basesh.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/beziersh.hxx b/sw/source/ui/inc/beziersh.hxx index 06a419d878..e2f5dd5957 100644 --- a/sw/source/ui/inc/beziersh.hxx +++ b/sw/source/ui/inc/beziersh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: beziersh.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/bmpwin.hxx b/sw/source/ui/inc/bmpwin.hxx index 4e50d2160d..8f60ed3e13 100644 --- a/sw/source/ui/inc/bmpwin.hxx +++ b/sw/source/ui/inc/bmpwin.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: bmpwin.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/bookctrl.hxx b/sw/source/ui/inc/bookctrl.hxx index c1cfd1cfcf..426aedf11d 100644 --- a/sw/source/ui/inc/bookctrl.hxx +++ b/sw/source/ui/inc/bookctrl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: bookctrl.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/bookmark.hxx b/sw/source/ui/inc/bookmark.hxx index 4efbe19ce6..b6678c4088 100644 --- a/sw/source/ui/inc/bookmark.hxx +++ b/sw/source/ui/inc/bookmark.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: bookmark.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/break.hxx b/sw/source/ui/inc/break.hxx index ea3a15a1a1..eab0047edf 100644 --- a/sw/source/ui/inc/break.hxx +++ b/sw/source/ui/inc/break.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: break.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/caption.hxx b/sw/source/ui/inc/caption.hxx index 69f21a3d3b..ffadad1520 100644 --- a/sw/source/ui/inc/caption.hxx +++ b/sw/source/ui/inc/caption.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: caption.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/cfgdesc.hxx b/sw/source/ui/inc/cfgdesc.hxx index e22a7737e7..8ea0b20e0e 100644 --- a/sw/source/ui/inc/cfgdesc.hxx +++ b/sw/source/ui/inc/cfgdesc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cfgdesc.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/cfgid.h b/sw/source/ui/inc/cfgid.h index 7b1ce17c21..9496aa6373 100644 --- a/sw/source/ui/inc/cfgid.h +++ b/sw/source/ui/inc/cfgid.h @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cfgid.h,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/cfgitems.hxx b/sw/source/ui/inc/cfgitems.hxx index 0d2cfac506..04d43865cf 100644 --- a/sw/source/ui/inc/cfgitems.hxx +++ b/sw/source/ui/inc/cfgitems.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cfgitems.hxx,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/changedb.hxx b/sw/source/ui/inc/changedb.hxx index 895e8982db..7720f6e817 100644 --- a/sw/source/ui/inc/changedb.hxx +++ b/sw/source/ui/inc/changedb.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: changedb.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/chartins.hxx b/sw/source/ui/inc/chartins.hxx index ba7762c02e..db4abe27a7 100644 --- a/sw/source/ui/inc/chartins.hxx +++ b/sw/source/ui/inc/chartins.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chartins.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/chldwrap.hxx b/sw/source/ui/inc/chldwrap.hxx index 7181bc2bfd..dd3023aab7 100644 --- a/sw/source/ui/inc/chldwrap.hxx +++ b/sw/source/ui/inc/chldwrap.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chldwrap.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/chrdlg.hxx b/sw/source/ui/inc/chrdlg.hxx index 61879cd6a3..7381eb331b 100644 --- a/sw/source/ui/inc/chrdlg.hxx +++ b/sw/source/ui/inc/chrdlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chrdlg.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/cnttab.hxx b/sw/source/ui/inc/cnttab.hxx index 63a60f5d0b..9697900eaf 100644 --- a/sw/source/ui/inc/cnttab.hxx +++ b/sw/source/ui/inc/cnttab.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cnttab.hxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/colex.hxx b/sw/source/ui/inc/colex.hxx index 78b82d83b5..0b1af48e30 100644 --- a/sw/source/ui/inc/colex.hxx +++ b/sw/source/ui/inc/colex.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: colex.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/colmgr.hxx b/sw/source/ui/inc/colmgr.hxx index 03d7820918..78117429aa 100644 --- a/sw/source/ui/inc/colmgr.hxx +++ b/sw/source/ui/inc/colmgr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: colmgr.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/column.hxx b/sw/source/ui/inc/column.hxx index 6f07392f98..7da371213a 100644 --- a/sw/source/ui/inc/column.hxx +++ b/sw/source/ui/inc/column.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: column.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/conarc.hxx b/sw/source/ui/inc/conarc.hxx index 56470820b3..98d9413062 100644 --- a/sw/source/ui/inc/conarc.hxx +++ b/sw/source/ui/inc/conarc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: conarc.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/concustomshape.hxx b/sw/source/ui/inc/concustomshape.hxx index 600ad71521..ba87a0a414 100644 --- a/sw/source/ui/inc/concustomshape.hxx +++ b/sw/source/ui/inc/concustomshape.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: concustomshape.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/condedit.hxx b/sw/source/ui/inc/condedit.hxx index e1f3959036..ad8c9b1e8d 100644 --- a/sw/source/ui/inc/condedit.hxx +++ b/sw/source/ui/inc/condedit.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: condedit.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/conform.hxx b/sw/source/ui/inc/conform.hxx index 04e31d85ec..e9a0dc8f54 100644 --- a/sw/source/ui/inc/conform.hxx +++ b/sw/source/ui/inc/conform.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: conform.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/conpoly.hxx b/sw/source/ui/inc/conpoly.hxx index 5294c833fe..9f14b9a138 100644 --- a/sw/source/ui/inc/conpoly.hxx +++ b/sw/source/ui/inc/conpoly.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: conpoly.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/conrect.hxx b/sw/source/ui/inc/conrect.hxx index 66e1d840a0..dd143f3425 100644 --- a/sw/source/ui/inc/conrect.hxx +++ b/sw/source/ui/inc/conrect.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: conrect.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/content.hxx b/sw/source/ui/inc/content.hxx index 6d99ee4eaa..12d4f3557f 100644 --- a/sw/source/ui/inc/content.hxx +++ b/sw/source/ui/inc/content.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: content.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/conttree.hxx b/sw/source/ui/inc/conttree.hxx index 767b0d5640..2e0d8e458c 100644 --- a/sw/source/ui/inc/conttree.hxx +++ b/sw/source/ui/inc/conttree.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: conttree.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/convert.hxx b/sw/source/ui/inc/convert.hxx index 59bdf3d54f..5b80bdc2b7 100644 --- a/sw/source/ui/inc/convert.hxx +++ b/sw/source/ui/inc/convert.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: convert.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/cption.hxx b/sw/source/ui/inc/cption.hxx index 97eb9fc1f2..96b0bd0911 100644 --- a/sw/source/ui/inc/cption.hxx +++ b/sw/source/ui/inc/cption.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cption.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/dbconfig.hxx b/sw/source/ui/inc/dbconfig.hxx index ea7431a8e5..39efabdef4 100644 --- a/sw/source/ui/inc/dbconfig.hxx +++ b/sw/source/ui/inc/dbconfig.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbconfig.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/dbinsdlg.hxx b/sw/source/ui/inc/dbinsdlg.hxx index d6b60f1734..737825f3b5 100644 --- a/sw/source/ui/inc/dbinsdlg.hxx +++ b/sw/source/ui/inc/dbinsdlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbinsdlg.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/dbtree.hxx b/sw/source/ui/inc/dbtree.hxx index 2bc381762d..70403bd343 100644 --- a/sw/source/ui/inc/dbtree.hxx +++ b/sw/source/ui/inc/dbtree.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbtree.hxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/dbui.hxx b/sw/source/ui/inc/dbui.hxx index f23c0896e0..fda482126a 100644 --- a/sw/source/ui/inc/dbui.hxx +++ b/sw/source/ui/inc/dbui.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dbui.hxx,v $ - * $Revision: 1.5.136.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/dialmgr.hxx b/sw/source/ui/inc/dialmgr.hxx index 3a2627a196..a5e8bb8864 100644 --- a/sw/source/ui/inc/dialmgr.hxx +++ b/sw/source/ui/inc/dialmgr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dialmgr.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/docfnote.hxx b/sw/source/ui/inc/docfnote.hxx index 2b8de8e3fe..678ee196d7 100644 --- a/sw/source/ui/inc/docfnote.hxx +++ b/sw/source/ui/inc/docfnote.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docfnote.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/docstdlg.hxx b/sw/source/ui/inc/docstdlg.hxx index c4c9cd0726..db7d707e23 100644 --- a/sw/source/ui/inc/docstdlg.hxx +++ b/sw/source/ui/inc/docstdlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docstdlg.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/drawbase.hxx b/sw/source/ui/inc/drawbase.hxx index 5887c16702..1d1543b42c 100644 --- a/sw/source/ui/inc/drawbase.hxx +++ b/sw/source/ui/inc/drawbase.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drawbase.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/drawsh.hxx b/sw/source/ui/inc/drawsh.hxx index ac4037ed4e..13f5c6a071 100644 --- a/sw/source/ui/inc/drawsh.hxx +++ b/sw/source/ui/inc/drawsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drawsh.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/drformsh.hxx b/sw/source/ui/inc/drformsh.hxx index fed1f63b0a..863f88f6a4 100644 --- a/sw/source/ui/inc/drformsh.hxx +++ b/sw/source/ui/inc/drformsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drformsh.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/drpcps.hxx b/sw/source/ui/inc/drpcps.hxx index 2c190f96c3..42132634e7 100644 --- a/sw/source/ui/inc/drpcps.hxx +++ b/sw/source/ui/inc/drpcps.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drpcps.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/drwbassh.hxx b/sw/source/ui/inc/drwbassh.hxx index fa607c38e2..5b74d23af6 100644 --- a/sw/source/ui/inc/drwbassh.hxx +++ b/sw/source/ui/inc/drwbassh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drwbassh.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/drwtxtsh.hxx b/sw/source/ui/inc/drwtxtsh.hxx index 6f0d307921..93b1fbc579 100644 --- a/sw/source/ui/inc/drwtxtsh.hxx +++ b/sw/source/ui/inc/drwtxtsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drwtxtsh.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/dselect.hxx b/sw/source/ui/inc/dselect.hxx index ba26002680..81579d2539 100644 --- a/sw/source/ui/inc/dselect.hxx +++ b/sw/source/ui/inc/dselect.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dselect.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/edtwin.hxx b/sw/source/ui/inc/edtwin.hxx index aa5bafbf6a..1e557a2949 100644 --- a/sw/source/ui/inc/edtwin.hxx +++ b/sw/source/ui/inc/edtwin.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: edtwin.hxx,v $ - * $Revision: 1.32 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/envimg.hxx b/sw/source/ui/inc/envimg.hxx index 71dfe242b1..ed767d2552 100644 --- a/sw/source/ui/inc/envimg.hxx +++ b/sw/source/ui/inc/envimg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: envimg.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/envlop.hxx b/sw/source/ui/inc/envlop.hxx index c0780063ec..0e9f584734 100644 --- a/sw/source/ui/inc/envlop.hxx +++ b/sw/source/ui/inc/envlop.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: envlop.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/fldedt.hxx b/sw/source/ui/inc/fldedt.hxx index f059a4ea22..118cabd3e1 100644 --- a/sw/source/ui/inc/fldedt.hxx +++ b/sw/source/ui/inc/fldedt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldedt.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/fldmgr.hxx b/sw/source/ui/inc/fldmgr.hxx index b2989611a5..5f92d302e0 100644 --- a/sw/source/ui/inc/fldmgr.hxx +++ b/sw/source/ui/inc/fldmgr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldmgr.hxx,v $ - * $Revision: 1.16.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/fldtdlg.hxx b/sw/source/ui/inc/fldtdlg.hxx index 80466cdeba..456c951611 100644 --- a/sw/source/ui/inc/fldtdlg.hxx +++ b/sw/source/ui/inc/fldtdlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldtdlg.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/fldwrap.hxx b/sw/source/ui/inc/fldwrap.hxx index 8344677a9e..aa57f7ab18 100644 --- a/sw/source/ui/inc/fldwrap.hxx +++ b/sw/source/ui/inc/fldwrap.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fldwrap.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/fontcfg.hxx b/sw/source/ui/inc/fontcfg.hxx index 11b854ec77..69721d3439 100644 --- a/sw/source/ui/inc/fontcfg.hxx +++ b/sw/source/ui/inc/fontcfg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fontcfg.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/formatclipboard.hxx b/sw/source/ui/inc/formatclipboard.hxx index 5d3fbdd222..b01ef7c58b 100644 --- a/sw/source/ui/inc/formatclipboard.hxx +++ b/sw/source/ui/inc/formatclipboard.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: formatclipboard.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/formedt.hxx b/sw/source/ui/inc/formedt.hxx index 6ee8de6fb8..5efa1621b2 100644 --- a/sw/source/ui/inc/formedt.hxx +++ b/sw/source/ui/inc/formedt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: formedt.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/frmdlg.hxx b/sw/source/ui/inc/frmdlg.hxx index 83422da141..fa39f4b293 100644 --- a/sw/source/ui/inc/frmdlg.hxx +++ b/sw/source/ui/inc/frmdlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmdlg.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/frmmgr.hxx b/sw/source/ui/inc/frmmgr.hxx index 4d54559701..8f9fedbb13 100644 --- a/sw/source/ui/inc/frmmgr.hxx +++ b/sw/source/ui/inc/frmmgr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmmgr.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx index fb20ab92fc..a858c23199 100644 --- a/sw/source/ui/inc/frmpage.hxx +++ b/sw/source/ui/inc/frmpage.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmpage.hxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/frmsh.hxx b/sw/source/ui/inc/frmsh.hxx index 1d6db44837..08bca4af76 100644 --- a/sw/source/ui/inc/frmsh.hxx +++ b/sw/source/ui/inc/frmsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmsh.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/frmui.hrc b/sw/source/ui/inc/frmui.hrc index f9e0504e21..bb06c71576 100644 --- a/sw/source/ui/inc/frmui.hrc +++ b/sw/source/ui/inc/frmui.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmui.hrc,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/globals.h b/sw/source/ui/inc/globals.h index cda63826f9..d176d54163 100644 --- a/sw/source/ui/inc/globals.h +++ b/sw/source/ui/inc/globals.h @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: globals.h,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/globdoc.hrc b/sw/source/ui/inc/globdoc.hrc index eab2654e90..1a27e62362 100644 --- a/sw/source/ui/inc/globdoc.hrc +++ b/sw/source/ui/inc/globdoc.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: globdoc.hrc,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/glosbib.hxx b/sw/source/ui/inc/glosbib.hxx index 20b1a9981f..ee8b73aaeb 100644 --- a/sw/source/ui/inc/glosbib.hxx +++ b/sw/source/ui/inc/glosbib.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: glosbib.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/glosdoc.hxx b/sw/source/ui/inc/glosdoc.hxx index 53ff1d9947..343c3a6ca1 100644 --- a/sw/source/ui/inc/glosdoc.hxx +++ b/sw/source/ui/inc/glosdoc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: glosdoc.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/gloshdl.hxx b/sw/source/ui/inc/gloshdl.hxx index 9564866282..0e8b181f23 100644 --- a/sw/source/ui/inc/gloshdl.hxx +++ b/sw/source/ui/inc/gloshdl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: gloshdl.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/gloslst.hxx b/sw/source/ui/inc/gloslst.hxx index db50b3c70f..b2a0013018 100644 --- a/sw/source/ui/inc/gloslst.hxx +++ b/sw/source/ui/inc/gloslst.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: gloslst.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/glossary.hxx b/sw/source/ui/inc/glossary.hxx index 484a5d470d..369b4d16fe 100644 --- a/sw/source/ui/inc/glossary.hxx +++ b/sw/source/ui/inc/glossary.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: glossary.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/glshell.hxx b/sw/source/ui/inc/glshell.hxx index 336d13104b..f9730f54e8 100644 --- a/sw/source/ui/inc/glshell.hxx +++ b/sw/source/ui/inc/glshell.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: glshell.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/grfsh.hxx b/sw/source/ui/inc/grfsh.hxx index 2e8aaced10..7c1e576ebb 100644 --- a/sw/source/ui/inc/grfsh.hxx +++ b/sw/source/ui/inc/grfsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: grfsh.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/hidfunc.h b/sw/source/ui/inc/hidfunc.h index ce3943ee60..9766f35f2c 100644 --- a/sw/source/ui/inc/hidfunc.h +++ b/sw/source/ui/inc/hidfunc.h @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: hidfunc.h,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/hyp.hxx b/sw/source/ui/inc/hyp.hxx index a1761b6d42..5b546a187d 100644 --- a/sw/source/ui/inc/hyp.hxx +++ b/sw/source/ui/inc/hyp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: hyp.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/idxmrk.hxx b/sw/source/ui/inc/idxmrk.hxx index ca6e51fac9..429db80af8 100644 --- a/sw/source/ui/inc/idxmrk.hxx +++ b/sw/source/ui/inc/idxmrk.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: idxmrk.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/imaildsplistener.hxx b/sw/source/ui/inc/imaildsplistener.hxx index 84c7d9b353..90d6e16450 100644 --- a/sw/source/ui/inc/imaildsplistener.hxx +++ b/sw/source/ui/inc/imaildsplistener.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: imaildsplistener.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/initui.hxx b/sw/source/ui/inc/initui.hxx index 7a7e429d1e..7f180c9176 100644 --- a/sw/source/ui/inc/initui.hxx +++ b/sw/source/ui/inc/initui.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: initui.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/inpdlg.hxx b/sw/source/ui/inc/inpdlg.hxx index 25620228ba..5c19fcc0ee 100644 --- a/sw/source/ui/inc/inpdlg.hxx +++ b/sw/source/ui/inc/inpdlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: inpdlg.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/inputwin.hxx b/sw/source/ui/inc/inputwin.hxx index 21d6dca472..5b88d13bc9 100644 --- a/sw/source/ui/inc/inputwin.hxx +++ b/sw/source/ui/inc/inputwin.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: inputwin.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/insfnote.hxx b/sw/source/ui/inc/insfnote.hxx index b9b434a2c8..7ff65ce3f0 100644 --- a/sw/source/ui/inc/insfnote.hxx +++ b/sw/source/ui/inc/insfnote.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: insfnote.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/insrule.hxx b/sw/source/ui/inc/insrule.hxx index 14c8953516..dc35db20dc 100644 --- a/sw/source/ui/inc/insrule.hxx +++ b/sw/source/ui/inc/insrule.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: insrule.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/instable.hxx b/sw/source/ui/inc/instable.hxx index f79dee8660..4782108971 100644 --- a/sw/source/ui/inc/instable.hxx +++ b/sw/source/ui/inc/instable.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: instable.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/javaedit.hxx b/sw/source/ui/inc/javaedit.hxx index cabdfcc03d..7eadaa7c34 100644 --- a/sw/source/ui/inc/javaedit.hxx +++ b/sw/source/ui/inc/javaedit.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: javaedit.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/label.hxx b/sw/source/ui/inc/label.hxx index 6cee259003..819c56c00e 100644 --- a/sw/source/ui/inc/label.hxx +++ b/sw/source/ui/inc/label.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: label.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/labelcfg.hxx b/sw/source/ui/inc/labelcfg.hxx index b0e4e79c3b..17a2341746 100644 --- a/sw/source/ui/inc/labelcfg.hxx +++ b/sw/source/ui/inc/labelcfg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: labelcfg.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/labimg.hxx b/sw/source/ui/inc/labimg.hxx index e5cd139236..91162ff271 100644 --- a/sw/source/ui/inc/labimg.hxx +++ b/sw/source/ui/inc/labimg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: labimg.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/langhelper.hxx b/sw/source/ui/inc/langhelper.hxx index 5bac26f161..419bfb33ad 100755 --- a/sw/source/ui/inc/langhelper.hxx +++ b/sw/source/ui/inc/langhelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: langhelper.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/linenum.hxx b/sw/source/ui/inc/linenum.hxx index b4ca3d39eb..75b358d07a 100644 --- a/sw/source/ui/inc/linenum.hxx +++ b/sw/source/ui/inc/linenum.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: linenum.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/listsh.hxx b/sw/source/ui/inc/listsh.hxx index f8c5536287..8817b145e0 100644 --- a/sw/source/ui/inc/listsh.hxx +++ b/sw/source/ui/inc/listsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: listsh.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/macassgn.hxx b/sw/source/ui/inc/macassgn.hxx index 4818e410f0..b824d2ebc2 100644 --- a/sw/source/ui/inc/macassgn.hxx +++ b/sw/source/ui/inc/macassgn.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: macassgn.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/mailconfigpage.hxx b/sw/source/ui/inc/mailconfigpage.hxx index 4e9d20ec06..ef0d409eb0 100644 --- a/sw/source/ui/inc/mailconfigpage.hxx +++ b/sw/source/ui/inc/mailconfigpage.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailconfigpage.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/maildispatcher.hxx b/sw/source/ui/inc/maildispatcher.hxx index b88569191f..e2c0d9170b 100644 --- a/sw/source/ui/inc/maildispatcher.hxx +++ b/sw/source/ui/inc/maildispatcher.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: maildispatcher.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/mailmergechildwindow.hxx b/sw/source/ui/inc/mailmergechildwindow.hxx index 1e901f0ff1..d741320bf6 100644 --- a/sw/source/ui/inc/mailmergechildwindow.hxx +++ b/sw/source/ui/inc/mailmergechildwindow.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailmergechildwindow.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/mailmergehelper.hxx b/sw/source/ui/inc/mailmergehelper.hxx index 4d5a4ffc5a..f8381bca2b 100644 --- a/sw/source/ui/inc/mailmergehelper.hxx +++ b/sw/source/ui/inc/mailmergehelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailmergehelper.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/mailmergewizard.hxx b/sw/source/ui/inc/mailmergewizard.hxx index a34b570d07..123703f2fe 100644 --- a/sw/source/ui/inc/mailmergewizard.hxx +++ b/sw/source/ui/inc/mailmergewizard.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailmergewizard.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/mailmrge.hxx b/sw/source/ui/inc/mailmrge.hxx index c67ebe752b..6c434498d1 100644 --- a/sw/source/ui/inc/mailmrge.hxx +++ b/sw/source/ui/inc/mailmrge.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mailmrge.hxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/makefile.mk b/sw/source/ui/inc/makefile.mk index bd301b452c..cb9b968dcc 100644 --- a/sw/source/ui/inc/makefile.mk +++ b/sw/source/ui/inc/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.5 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/mediash.hxx b/sw/source/ui/inc/mediash.hxx index 7d39a28b65..fb71c50e16 100644 --- a/sw/source/ui/inc/mediash.hxx +++ b/sw/source/ui/inc/mediash.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mediash.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/mergetbl.hxx b/sw/source/ui/inc/mergetbl.hxx index 7d06717d3e..0f57a98f3e 100644 --- a/sw/source/ui/inc/mergetbl.hxx +++ b/sw/source/ui/inc/mergetbl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mergetbl.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/misc.hrc b/sw/source/ui/inc/misc.hrc index 1afc04476f..72db977303 100644 --- a/sw/source/ui/inc/misc.hrc +++ b/sw/source/ui/inc/misc.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: misc.hrc,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/mmconfigitem.hxx b/sw/source/ui/inc/mmconfigitem.hxx index c86c38c9d3..5d70bb433c 100644 --- a/sw/source/ui/inc/mmconfigitem.hxx +++ b/sw/source/ui/inc/mmconfigitem.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mmconfigitem.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/multmrk.hxx b/sw/source/ui/inc/multmrk.hxx index 6a8516fe6f..e42c072d6f 100644 --- a/sw/source/ui/inc/multmrk.hxx +++ b/sw/source/ui/inc/multmrk.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: multmrk.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/navicfg.hxx b/sw/source/ui/inc/navicfg.hxx index af60f5dfe2..c214f723c9 100644 --- a/sw/source/ui/inc/navicfg.hxx +++ b/sw/source/ui/inc/navicfg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: navicfg.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/navicont.hxx b/sw/source/ui/inc/navicont.hxx index 5cf8c16773..f9a0dd9fe5 100644 --- a/sw/source/ui/inc/navicont.hxx +++ b/sw/source/ui/inc/navicont.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: navicont.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/navipi.hxx b/sw/source/ui/inc/navipi.hxx index 012ed8c8dd..9e38b25672 100644 --- a/sw/source/ui/inc/navipi.hxx +++ b/sw/source/ui/inc/navipi.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: navipi.hxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/num.hxx b/sw/source/ui/inc/num.hxx index d321b4c57c..4dd77ffe98 100644 --- a/sw/source/ui/inc/num.hxx +++ b/sw/source/ui/inc/num.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: num.hxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/numberingtypelistbox.hxx b/sw/source/ui/inc/numberingtypelistbox.hxx index fffa8c0cd1..792dfe3743 100644 --- a/sw/source/ui/inc/numberingtypelistbox.hxx +++ b/sw/source/ui/inc/numberingtypelistbox.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: numberingtypelistbox.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/numfmtlb.hxx b/sw/source/ui/inc/numfmtlb.hxx index 62cc045fe5..50ebd6546f 100644 --- a/sw/source/ui/inc/numfmtlb.hxx +++ b/sw/source/ui/inc/numfmtlb.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: numfmtlb.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/numpara.hxx b/sw/source/ui/inc/numpara.hxx index e7093b9238..6b62baa694 100644 --- a/sw/source/ui/inc/numpara.hxx +++ b/sw/source/ui/inc/numpara.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: numpara.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/numprevw.hxx b/sw/source/ui/inc/numprevw.hxx index c8e12a2873..977503c967 100644 --- a/sw/source/ui/inc/numprevw.hxx +++ b/sw/source/ui/inc/numprevw.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: numprevw.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/olesh.hxx b/sw/source/ui/inc/olesh.hxx index 73fc01a1e6..7785209890 100644 --- a/sw/source/ui/inc/olesh.hxx +++ b/sw/source/ui/inc/olesh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: olesh.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/olmenu.hxx b/sw/source/ui/inc/olmenu.hxx index da3a68e6c5..3f433c249b 100644 --- a/sw/source/ui/inc/olmenu.hxx +++ b/sw/source/ui/inc/olmenu.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: olmenu.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/optcomp.hxx b/sw/source/ui/inc/optcomp.hxx index b40f0a67a6..a564cc0715 100644 --- a/sw/source/ui/inc/optcomp.hxx +++ b/sw/source/ui/inc/optcomp.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: optcomp.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/optload.hxx b/sw/source/ui/inc/optload.hxx index 4bcba74d90..4adfb96399 100644 --- a/sw/source/ui/inc/optload.hxx +++ b/sw/source/ui/inc/optload.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: optload.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx index 519b0c0fc1..60e15f866b 100644 --- a/sw/source/ui/inc/optpage.hxx +++ b/sw/source/ui/inc/optpage.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: optpage.hxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/outline.hxx b/sw/source/ui/inc/outline.hxx index e99aa6b4a2..dbe36d92f6 100644 --- a/sw/source/ui/inc/outline.hxx +++ b/sw/source/ui/inc/outline.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: outline.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/pardlg.hxx b/sw/source/ui/inc/pardlg.hxx index 6605e8bb16..a8b0f03db1 100644 --- a/sw/source/ui/inc/pardlg.hxx +++ b/sw/source/ui/inc/pardlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pardlg.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/pattern.hxx b/sw/source/ui/inc/pattern.hxx index f0148dbdd2..9e3ab6d629 100644 --- a/sw/source/ui/inc/pattern.hxx +++ b/sw/source/ui/inc/pattern.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pattern.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/pgfnote.hxx b/sw/source/ui/inc/pgfnote.hxx index 07d1b75d3c..9f7a324577 100644 --- a/sw/source/ui/inc/pgfnote.hxx +++ b/sw/source/ui/inc/pgfnote.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pgfnote.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/pggrid.hxx b/sw/source/ui/inc/pggrid.hxx index 582433f0e0..281009ae6c 100644 --- a/sw/source/ui/inc/pggrid.hxx +++ b/sw/source/ui/inc/pggrid.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pggrid.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/popbox.hxx b/sw/source/ui/inc/popbox.hxx index 08c90a4577..378961ffc1 100644 --- a/sw/source/ui/inc/popbox.hxx +++ b/sw/source/ui/inc/popbox.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: popbox.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/popup.hrc b/sw/source/ui/inc/popup.hrc index ec3e853ea5..72fc074b52 100644 --- a/sw/source/ui/inc/popup.hrc +++ b/sw/source/ui/inc/popup.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: popup.hrc,v $ - * $Revision: 1.6.190.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/prcntfld.hxx b/sw/source/ui/inc/prcntfld.hxx index 0a2e132005..f5356235ae 100644 --- a/sw/source/ui/inc/prcntfld.hxx +++ b/sw/source/ui/inc/prcntfld.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: prcntfld.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/prtopt.hxx b/sw/source/ui/inc/prtopt.hxx index 47ffc772f9..c46e93a138 100644 --- a/sw/source/ui/inc/prtopt.hxx +++ b/sw/source/ui/inc/prtopt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: prtopt.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx index 38dcd6a40d..b2a72cca4f 100644 --- a/sw/source/ui/inc/pview.hxx +++ b/sw/source/ui/inc/pview.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pview.hxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/redlndlg.hxx b/sw/source/ui/inc/redlndlg.hxx index e59d1519ec..5c70eeae63 100644 --- a/sw/source/ui/inc/redlndlg.hxx +++ b/sw/source/ui/inc/redlndlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: redlndlg.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/regionsw.hxx b/sw/source/ui/inc/regionsw.hxx index a7347c0aa7..2be870781a 100644 --- a/sw/source/ui/inc/regionsw.hxx +++ b/sw/source/ui/inc/regionsw.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: regionsw.hxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/ribbar.hrc b/sw/source/ui/inc/ribbar.hrc index 1ce5635014..892261512a 100644 --- a/sw/source/ui/inc/ribbar.hrc +++ b/sw/source/ui/inc/ribbar.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ribbar.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/rowht.hxx b/sw/source/ui/inc/rowht.hxx index 1d4c8d9634..5e6e6502bc 100644 --- a/sw/source/ui/inc/rowht.hxx +++ b/sw/source/ui/inc/rowht.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rowht.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/scroll.hxx b/sw/source/ui/inc/scroll.hxx index 6b6258ef87..dec1460844 100644 --- a/sw/source/ui/inc/scroll.hxx +++ b/sw/source/ui/inc/scroll.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: scroll.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/selglos.hxx b/sw/source/ui/inc/selglos.hxx index ee512ab715..b5f8190163 100644 --- a/sw/source/ui/inc/selglos.hxx +++ b/sw/source/ui/inc/selglos.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: selglos.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/sharedconnection.hxx b/sw/source/ui/inc/sharedconnection.hxx index 624e3c82e3..b90c827732 100644 --- a/sw/source/ui/inc/sharedconnection.hxx +++ b/sw/source/ui/inc/sharedconnection.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sharedconnection.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/shdwcrsr.hxx b/sw/source/ui/inc/shdwcrsr.hxx index 0b253290c0..abd9a1fc12 100644 --- a/sw/source/ui/inc/shdwcrsr.hxx +++ b/sw/source/ui/inc/shdwcrsr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: shdwcrsr.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/shells.hrc b/sw/source/ui/inc/shells.hrc index feb200c8ff..243c4fcf92 100644 --- a/sw/source/ui/inc/shells.hrc +++ b/sw/source/ui/inc/shells.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: shells.hrc,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/split.hxx b/sw/source/ui/inc/split.hxx index 3a909b5d3b..d058276c54 100644 --- a/sw/source/ui/inc/split.hxx +++ b/sw/source/ui/inc/split.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: split.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/splittbl.hxx b/sw/source/ui/inc/splittbl.hxx index 102da59e98..eb610de647 100644 --- a/sw/source/ui/inc/splittbl.hxx +++ b/sw/source/ui/inc/splittbl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: splittbl.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/srcedtw.hxx b/sw/source/ui/inc/srcedtw.hxx index 0db95e3c71..4df24cefc3 100644 --- a/sw/source/ui/inc/srcedtw.hxx +++ b/sw/source/ui/inc/srcedtw.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: srcedtw.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/srcview.hxx b/sw/source/ui/inc/srcview.hxx index e0a093f099..06487fdea3 100755 --- a/sw/source/ui/inc/srcview.hxx +++ b/sw/source/ui/inc/srcview.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: srcview.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/srtdlg.hxx b/sw/source/ui/inc/srtdlg.hxx index 9399b75623..76cc70baa4 100644 --- a/sw/source/ui/inc/srtdlg.hxx +++ b/sw/source/ui/inc/srtdlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: srtdlg.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/stmenu.hxx b/sw/source/ui/inc/stmenu.hxx index cdec4b1581..553f86f0e1 100644 --- a/sw/source/ui/inc/stmenu.hxx +++ b/sw/source/ui/inc/stmenu.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: stmenu.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/swcont.hxx b/sw/source/ui/inc/swcont.hxx index 1b34a5fded..e0da2a8694 100644 --- a/sw/source/ui/inc/swcont.hxx +++ b/sw/source/ui/inc/swcont.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swcont.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx index f92cf66e24..3e93acb021 100644 --- a/sw/source/ui/inc/swdtflvr.hxx +++ b/sw/source/ui/inc/swdtflvr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swdtflvr.hxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx index fcd59427a9..5488f0ef2b 100644 --- a/sw/source/ui/inc/swlbox.hxx +++ b/sw/source/ui/inc/swlbox.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swlbox.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/swmn_tmpl.hrc b/sw/source/ui/inc/swmn_tmpl.hrc index f7753db76e..ff71288bcc 100644 --- a/sw/source/ui/inc/swmn_tmpl.hrc +++ b/sw/source/ui/inc/swmn_tmpl.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swmn_tmpl.hrc,v $ - * $Revision: 1.15.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/swmodalredlineacceptdlg.hxx b/sw/source/ui/inc/swmodalredlineacceptdlg.hxx index ccea98b5cf..b73ec454a1 100644 --- a/sw/source/ui/inc/swmodalredlineacceptdlg.hxx +++ b/sw/source/ui/inc/swmodalredlineacceptdlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swmodalredlineacceptdlg.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/swrenamexnameddlg.hxx b/sw/source/ui/inc/swrenamexnameddlg.hxx index d9f2845a97..b4dbfaed74 100644 --- a/sw/source/ui/inc/swrenamexnameddlg.hxx +++ b/sw/source/ui/inc/swrenamexnameddlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swrenamexnameddlg.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/swtablerep.hxx b/sw/source/ui/inc/swtablerep.hxx index 739b66e051..c9bbaff6b9 100644 --- a/sw/source/ui/inc/swtablerep.hxx +++ b/sw/source/ui/inc/swtablerep.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swtablerep.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/swuiccoll.hxx b/sw/source/ui/inc/swuiccoll.hxx index 0113dd0ee4..eab682ea40 100644 --- a/sw/source/ui/inc/swuiccoll.hxx +++ b/sw/source/ui/inc/swuiccoll.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swuiccoll.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx index 1cc3886d7c..5bb247187d 100644 --- a/sw/source/ui/inc/swuicnttab.hxx +++ b/sw/source/ui/inc/swuicnttab.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swuicnttab.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/swuiidxmrk.hxx b/sw/source/ui/inc/swuiidxmrk.hxx index 4ed098cc7a..de05db1b82 100644 --- a/sw/source/ui/inc/swuiidxmrk.hxx +++ b/sw/source/ui/inc/swuiidxmrk.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swuiidxmrk.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/swuipardlg.hxx b/sw/source/ui/inc/swuipardlg.hxx index 91bd40b7b0..1dbec7f72c 100644 --- a/sw/source/ui/inc/swuipardlg.hxx +++ b/sw/source/ui/inc/swuipardlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swuipardlg.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/swvset.hxx b/sw/source/ui/inc/swvset.hxx index 9297b44d0a..cec1f7b21e 100644 --- a/sw/source/ui/inc/swvset.hxx +++ b/sw/source/ui/inc/swvset.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swvset.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/swwrtshitem.hxx b/sw/source/ui/inc/swwrtshitem.hxx index 378461021e..2469ef806e 100644 --- a/sw/source/ui/inc/swwrtshitem.hxx +++ b/sw/source/ui/inc/swwrtshitem.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swwrtshitem.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/syncbtn.hxx b/sw/source/ui/inc/syncbtn.hxx index 25070e3dd9..bd99b185b8 100644 --- a/sw/source/ui/inc/syncbtn.hxx +++ b/sw/source/ui/inc/syncbtn.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: syncbtn.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/table.hrc b/sw/source/ui/inc/table.hrc index 3294331c86..721c6de5b6 100644 --- a/sw/source/ui/inc/table.hrc +++ b/sw/source/ui/inc/table.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: table.hrc,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/tabledlg.hxx b/sw/source/ui/inc/tabledlg.hxx index 405fe9fee7..8ef084bb6a 100644 --- a/sw/source/ui/inc/tabledlg.hxx +++ b/sw/source/ui/inc/tabledlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tabledlg.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/tablemgr.hxx b/sw/source/ui/inc/tablemgr.hxx index 9b51bc4176..8ada860a62 100644 --- a/sw/source/ui/inc/tablemgr.hxx +++ b/sw/source/ui/inc/tablemgr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tablemgr.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/tabsh.hxx b/sw/source/ui/inc/tabsh.hxx index 076e2c0087..f2a8b99de9 100644 --- a/sw/source/ui/inc/tabsh.hxx +++ b/sw/source/ui/inc/tabsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tabsh.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/tautofmt.hxx b/sw/source/ui/inc/tautofmt.hxx index c66f676b5d..ca455b4432 100644 --- a/sw/source/ui/inc/tautofmt.hxx +++ b/sw/source/ui/inc/tautofmt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tautofmt.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/tblctrl.hxx b/sw/source/ui/inc/tblctrl.hxx index cae366f354..897d9dc0ac 100644 --- a/sw/source/ui/inc/tblctrl.hxx +++ b/sw/source/ui/inc/tblctrl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tblctrl.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/tblnumfm.hxx b/sw/source/ui/inc/tblnumfm.hxx index f5ccdb9235..64f7fa1526 100644 --- a/sw/source/ui/inc/tblnumfm.hxx +++ b/sw/source/ui/inc/tblnumfm.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tblnumfm.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/tbxanchr.hxx b/sw/source/ui/inc/tbxanchr.hxx index d9bfdcb939..21670abfd0 100644 --- a/sw/source/ui/inc/tbxanchr.hxx +++ b/sw/source/ui/inc/tbxanchr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tbxanchr.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/tbxmgr.hxx b/sw/source/ui/inc/tbxmgr.hxx index 305e6aab8b..4a744f8e66 100644 --- a/sw/source/ui/inc/tbxmgr.hxx +++ b/sw/source/ui/inc/tbxmgr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tbxmgr.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/textcontrolcombo.hxx b/sw/source/ui/inc/textcontrolcombo.hxx index efd9acb420..d367cf3b29 100644 --- a/sw/source/ui/inc/textcontrolcombo.hxx +++ b/sw/source/ui/inc/textcontrolcombo.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textcontrolcombo.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/textsh.hxx b/sw/source/ui/inc/textsh.hxx index 2b307a69ca..3212bd7a63 100644 --- a/sw/source/ui/inc/textsh.hxx +++ b/sw/source/ui/inc/textsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textsh.hxx,v $ - * $Revision: 1.16.188.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/tmpdlg.hxx b/sw/source/ui/inc/tmpdlg.hxx index 4fc4cfb802..7f9b8f7de0 100644 --- a/sw/source/ui/inc/tmpdlg.hxx +++ b/sw/source/ui/inc/tmpdlg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tmpdlg.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/tmplctrl.hxx b/sw/source/ui/inc/tmplctrl.hxx index e402fcd31c..4a97d0f80d 100644 --- a/sw/source/ui/inc/tmplctrl.hxx +++ b/sw/source/ui/inc/tmplctrl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tmplctrl.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/toolbox_tmpl.hrc b/sw/source/ui/inc/toolbox_tmpl.hrc index af8e64abaf..8c73a70c60 100644 --- a/sw/source/ui/inc/toolbox_tmpl.hrc +++ b/sw/source/ui/inc/toolbox_tmpl.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: toolbox_tmpl.hrc,v $ - * $Revision: 1.5.210.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/toxmgr.hxx b/sw/source/ui/inc/toxmgr.hxx index b94ea2fe98..ca5d93560d 100644 --- a/sw/source/ui/inc/toxmgr.hxx +++ b/sw/source/ui/inc/toxmgr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: toxmgr.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/uiborder.hxx b/sw/source/ui/inc/uiborder.hxx index fc550f0de5..239af9a741 100644 --- a/sw/source/ui/inc/uiborder.hxx +++ b/sw/source/ui/inc/uiborder.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: uiborder.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/uiitems.hxx b/sw/source/ui/inc/uiitems.hxx index 872f023208..d430abb712 100644 --- a/sw/source/ui/inc/uiitems.hxx +++ b/sw/source/ui/inc/uiitems.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: uiitems.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/uinums.hxx b/sw/source/ui/inc/uinums.hxx index b7c053e83f..38e18b1a8f 100644 --- a/sw/source/ui/inc/uinums.hxx +++ b/sw/source/ui/inc/uinums.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: uinums.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/uitool.hxx b/sw/source/ui/inc/uitool.hxx index 0cf4572120..65abd12ea6 100644 --- a/sw/source/ui/inc/uitool.hxx +++ b/sw/source/ui/inc/uitool.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: uitool.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/uivwimp.hxx b/sw/source/ui/inc/uivwimp.hxx index 52f87ec183..d8131f51de 100644 --- a/sw/source/ui/inc/uivwimp.hxx +++ b/sw/source/ui/inc/uivwimp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: uivwimp.hxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/unodispatch.hxx b/sw/source/ui/inc/unodispatch.hxx index d3b05d9764..5deae6b3fa 100644 --- a/sw/source/ui/inc/unodispatch.hxx +++ b/sw/source/ui/inc/unodispatch.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unodispatch.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/unotools.hxx b/sw/source/ui/inc/unotools.hxx index 4ce0a550d4..007860d710 100644 --- a/sw/source/ui/inc/unotools.hxx +++ b/sw/source/ui/inc/unotools.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unotools.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx index eeaf98e92b..828016c6e3 100644 --- a/sw/source/ui/inc/unotxvw.hxx +++ b/sw/source/ui/inc/unotxvw.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unotxvw.hxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/usrpref.hxx b/sw/source/ui/inc/usrpref.hxx index 00a328d165..9f3f3e4f39 100644 --- a/sw/source/ui/inc/usrpref.hxx +++ b/sw/source/ui/inc/usrpref.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: usrpref.hxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/utlui.hrc b/sw/source/ui/inc/utlui.hrc index 8e8ffa80e3..17961add66 100644 --- a/sw/source/ui/inc/utlui.hrc +++ b/sw/source/ui/inc/utlui.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: utlui.hrc,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index fcce44fc6f..6e20d75534 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: view.hxx,v $ - * $Revision: 1.60 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/viewlayoutctrl.hxx b/sw/source/ui/inc/viewlayoutctrl.hxx index 7f4ded700d..cc1c7a9c42 100644 --- a/sw/source/ui/inc/viewlayoutctrl.hxx +++ b/sw/source/ui/inc/viewlayoutctrl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewlayoutctrl.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/web.hrc b/sw/source/ui/inc/web.hrc index ccc11fb97b..7f6f1b8c85 100644 --- a/sw/source/ui/inc/web.hrc +++ b/sw/source/ui/inc/web.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: web.hrc,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/wformsh.hxx b/sw/source/ui/inc/wformsh.hxx index b97ee9cfe2..3f2831df86 100644 --- a/sw/source/ui/inc/wformsh.hxx +++ b/sw/source/ui/inc/wformsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wformsh.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/wfrmsh.hxx b/sw/source/ui/inc/wfrmsh.hxx index 27362feb0f..894c9112bb 100644 --- a/sw/source/ui/inc/wfrmsh.hxx +++ b/sw/source/ui/inc/wfrmsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wfrmsh.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/wgrfsh.hxx b/sw/source/ui/inc/wgrfsh.hxx index ce0ca0132f..b15a51a127 100644 --- a/sw/source/ui/inc/wgrfsh.hxx +++ b/sw/source/ui/inc/wgrfsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wgrfsh.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/wlistsh.hxx b/sw/source/ui/inc/wlistsh.hxx index fbf89560f0..9482127053 100644 --- a/sw/source/ui/inc/wlistsh.hxx +++ b/sw/source/ui/inc/wlistsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wlistsh.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/wolesh.hxx b/sw/source/ui/inc/wolesh.hxx index 80de475681..7e8faa25ce 100644 --- a/sw/source/ui/inc/wolesh.hxx +++ b/sw/source/ui/inc/wolesh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wolesh.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/wordcountdialog.hxx b/sw/source/ui/inc/wordcountdialog.hxx index b0674e2276..d3d7a7d756 100644 --- a/sw/source/ui/inc/wordcountdialog.hxx +++ b/sw/source/ui/inc/wordcountdialog.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wordcountdialog.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/workctrl.hxx b/sw/source/ui/inc/workctrl.hxx index 18e59ee919..6996ea1109 100644 --- a/sw/source/ui/inc/workctrl.hxx +++ b/sw/source/ui/inc/workctrl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: workctrl.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/wrap.hxx b/sw/source/ui/inc/wrap.hxx index fb157414c9..47486064e6 100644 --- a/sw/source/ui/inc/wrap.hxx +++ b/sw/source/ui/inc/wrap.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrap.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx index b3929abdcc..7df8200e5f 100644 --- a/sw/source/ui/inc/wrtsh.hxx +++ b/sw/source/ui/inc/wrtsh.hxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtsh.hxx,v $ - * $Revision: 1.47 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/wtabsh.hxx b/sw/source/ui/inc/wtabsh.hxx index 4a988d77b4..63f4eeed43 100644 --- a/sw/source/ui/inc/wtabsh.hxx +++ b/sw/source/ui/inc/wtabsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wtabsh.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/wtextsh.hxx b/sw/source/ui/inc/wtextsh.hxx index c7710a72e4..2dc2f8c12b 100644 --- a/sw/source/ui/inc/wtextsh.hxx +++ b/sw/source/ui/inc/wtextsh.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wtextsh.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/wview.hxx b/sw/source/ui/inc/wview.hxx index 1dd4274ec5..935a677a71 100644 --- a/sw/source/ui/inc/wview.hxx +++ b/sw/source/ui/inc/wview.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wview.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/inc/zoomctrl.hxx b/sw/source/ui/inc/zoomctrl.hxx index cb3b144fed..53a36d6dcc 100644 --- a/sw/source/ui/inc/zoomctrl.hxx +++ b/sw/source/ui/inc/zoomctrl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: zoomctrl.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index 5397e97102..6eb78b7da8 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cntex.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 502d54b2d7..83e524611a 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cnttab.cxx,v $ - * $Revision: 1.79 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/index/cnttab.hrc b/sw/source/ui/index/cnttab.hrc index 856d245531..5b80e4342b 100644 --- a/sw/source/ui/index/cnttab.hrc +++ b/sw/source/ui/index/cnttab.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cnttab.hrc,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src index 51fbd03358..8220ed42ba 100644 --- a/sw/source/ui/index/cnttab.src +++ b/sw/source/ui/index/cnttab.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cnttab.src,v $ - * $Revision: 1.77 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/index/idxmrk.cxx b/sw/source/ui/index/idxmrk.cxx index 956754c5c7..04fe78e9d1 100644 --- a/sw/source/ui/index/idxmrk.cxx +++ b/sw/source/ui/index/idxmrk.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: idxmrk.cxx,v $ - * $Revision: 1.37 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/index/idxmrk.hrc b/sw/source/ui/index/idxmrk.hrc index fc8d888a3e..263da88f93 100644 --- a/sw/source/ui/index/idxmrk.hrc +++ b/sw/source/ui/index/idxmrk.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: idxmrk.hrc,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/index/idxmrk.src b/sw/source/ui/index/idxmrk.src index 304275e44e..6a4ce1934d 100644 --- a/sw/source/ui/index/idxmrk.src +++ b/sw/source/ui/index/idxmrk.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: idxmrk.src,v $ - * $Revision: 1.44 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/index/makefile.mk b/sw/source/ui/index/makefile.mk index cdbd4264e2..647b579e53 100644 --- a/sw/source/ui/index/makefile.mk +++ b/sw/source/ui/index/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.9 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/index/multmrk.cxx b/sw/source/ui/index/multmrk.cxx index fee0252842..ec329f1985 100644 --- a/sw/source/ui/index/multmrk.cxx +++ b/sw/source/ui/index/multmrk.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: multmrk.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/index/multmrk.hrc b/sw/source/ui/index/multmrk.hrc index 00dd7f7894..d46f373598 100644 --- a/sw/source/ui/index/multmrk.hrc +++ b/sw/source/ui/index/multmrk.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: multmrk.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/index/multmrk.src b/sw/source/ui/index/multmrk.src index 4945e5701a..83db407d1a 100644 --- a/sw/source/ui/index/multmrk.src +++ b/sw/source/ui/index/multmrk.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: multmrk.src,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 812d5f1e7f..66f063a46b 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swuiidxmrk.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/index/toxmgr.cxx b/sw/source/ui/index/toxmgr.cxx index e32529b619..f705dc0d94 100644 --- a/sw/source/ui/index/toxmgr.cxx +++ b/sw/source/ui/index/toxmgr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: toxmgr.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx index e41c5ba97f..5c712dee6a 100644 --- a/sw/source/ui/lingu/hhcwrp.cxx +++ b/sw/source/ui/lingu/hhcwrp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: hhcwrp.cxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/lingu/hyp.cxx b/sw/source/ui/lingu/hyp.cxx index dff6ed9d1d..6e2c555dd3 100644 --- a/sw/source/ui/lingu/hyp.cxx +++ b/sw/source/ui/lingu/hyp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: hyp.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/lingu/makefile.mk b/sw/source/ui/lingu/makefile.mk index 78a26cb148..617910a610 100644 --- a/sw/source/ui/lingu/makefile.mk +++ b/sw/source/ui/lingu/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.10 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index ddce0b731d..bf1026ba43 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: olmenu.cxx,v $ - * $Revision: 1.41 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/lingu/olmenu.hrc b/sw/source/ui/lingu/olmenu.hrc index 6387d2ee36..900c470545 100644 --- a/sw/source/ui/lingu/olmenu.hrc +++ b/sw/source/ui/lingu/olmenu.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: olmenu.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/lingu/olmenu.src b/sw/source/ui/lingu/olmenu.src index be8946625c..3910c13201 100644 --- a/sw/source/ui/lingu/olmenu.src +++ b/sw/source/ui/lingu/olmenu.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: olmenu.src,v $ - * $Revision: 1.40 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/lingu/sdrhhcwrap.cxx b/sw/source/ui/lingu/sdrhhcwrap.cxx index 5de9a802b4..2266469a55 100644 --- a/sw/source/ui/lingu/sdrhhcwrap.cxx +++ b/sw/source/ui/lingu/sdrhhcwrap.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sdrhhcwrap.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/lingu/sdrhhcwrap.hxx b/sw/source/ui/lingu/sdrhhcwrap.hxx index 1471cb8302..197587e916 100644 --- a/sw/source/ui/lingu/sdrhhcwrap.hxx +++ b/sw/source/ui/lingu/sdrhhcwrap.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sdrhhcwrap.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/makefile.mk b/sw/source/ui/makefile.mk index 10897eedbe..fa1dea2bac 100644 --- a/sw/source/ui/makefile.mk +++ b/sw/source/ui/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.14 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/autocorr.src b/sw/source/ui/misc/autocorr.src index f7c6a9c3a9..3c5ab355aa 100644 --- a/sw/source/ui/misc/autocorr.src +++ b/sw/source/ui/misc/autocorr.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: autocorr.src,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 146e75031e..22da987d57 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: bookmark.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/bookmark.hrc b/sw/source/ui/misc/bookmark.hrc index 5240ba3bf5..ce808a6fa5 100644 --- a/sw/source/ui/misc/bookmark.hrc +++ b/sw/source/ui/misc/bookmark.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: bookmark.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/bookmark.src b/sw/source/ui/misc/bookmark.src index 4031d0119b..9ca4254eb6 100644 --- a/sw/source/ui/misc/bookmark.src +++ b/sw/source/ui/misc/bookmark.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: bookmark.src,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 9ae7ccbd15..b6f075b6b4 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docfnote.cxx,v $ - * $Revision: 1.19.224.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/docfnote.hrc b/sw/source/ui/misc/docfnote.hrc index 14f5bbedff..fc40676715 100644 --- a/sw/source/ui/misc/docfnote.hrc +++ b/sw/source/ui/misc/docfnote.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docfnote.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/docfnote.src b/sw/source/ui/misc/docfnote.src index 3450790885..bdb4d55eb2 100644 --- a/sw/source/ui/misc/docfnote.src +++ b/sw/source/ui/misc/docfnote.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: docfnote.src,v $ - * $Revision: 1.36 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 17250df77b..5374ddd2e2 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: glosbib.cxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/glosbib.hrc b/sw/source/ui/misc/glosbib.hrc index 7ca129cbbf..2322dc63f2 100644 --- a/sw/source/ui/misc/glosbib.hrc +++ b/sw/source/ui/misc/glosbib.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: glosbib.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/glosbib.src b/sw/source/ui/misc/glosbib.src index 4190b638e4..75a03eb85e 100644 --- a/sw/source/ui/misc/glosbib.src +++ b/sw/source/ui/misc/glosbib.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: glosbib.src,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx index 6dc1fd4fd0..8c13ab80fd 100644 --- a/sw/source/ui/misc/glosdoc.cxx +++ b/sw/source/ui/misc/glosdoc.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: glosdoc.cxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 10a6a2bf6c..057365509e 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: glossary.cxx,v $ - * $Revision: 1.49 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/glossary.hrc b/sw/source/ui/misc/glossary.hrc index 284a72fb7e..52208bc962 100644 --- a/sw/source/ui/misc/glossary.hrc +++ b/sw/source/ui/misc/glossary.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: glossary.hrc,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/glossary.src b/sw/source/ui/misc/glossary.src index 2fa9b77344..12d6ab9e81 100644 --- a/sw/source/ui/misc/glossary.src +++ b/sw/source/ui/misc/glossary.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: glossary.src,v $ - * $Revision: 1.42 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx index 83a97bd4c1..bb35bcb29e 100644 --- a/sw/source/ui/misc/glshell.cxx +++ b/sw/source/ui/misc/glshell.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: glshell.cxx,v $ - * $Revision: 1.17.236.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx index 989a2fd177..0ea21406b5 100644 --- a/sw/source/ui/misc/impfnote.hxx +++ b/sw/source/ui/misc/impfnote.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: impfnote.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index ac45a05afb..588c5fb6b4 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: insfnote.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/insfnote.hrc b/sw/source/ui/misc/insfnote.hrc index b00a9dab16..104693acea 100644 --- a/sw/source/ui/misc/insfnote.hrc +++ b/sw/source/ui/misc/insfnote.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: insfnote.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/insfnote.src b/sw/source/ui/misc/insfnote.src index b86cc51e9c..fda4b92b0d 100644 --- a/sw/source/ui/misc/insfnote.src +++ b/sw/source/ui/misc/insfnote.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: insfnote.src,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/insrule.cxx b/sw/source/ui/misc/insrule.cxx index 03facdece9..666fdffeb9 100644 --- a/sw/source/ui/misc/insrule.cxx +++ b/sw/source/ui/misc/insrule.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: insrule.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/insrule.hrc b/sw/source/ui/misc/insrule.hrc index 89274fb8df..8e2477bc34 100644 --- a/sw/source/ui/misc/insrule.hrc +++ b/sw/source/ui/misc/insrule.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: insrule.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/insrule.src b/sw/source/ui/misc/insrule.src index ec1b587edd..41e10db226 100644 --- a/sw/source/ui/misc/insrule.src +++ b/sw/source/ui/misc/insrule.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: insrule.src,v $ - * $Revision: 1.21.240.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx index 08918c0d2b..918d18128d 100644 --- a/sw/source/ui/misc/linenum.cxx +++ b/sw/source/ui/misc/linenum.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: linenum.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/linenum.hrc b/sw/source/ui/misc/linenum.hrc index b0be592e79..93e17b64eb 100644 --- a/sw/source/ui/misc/linenum.hrc +++ b/sw/source/ui/misc/linenum.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: linenum.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/linenum.src b/sw/source/ui/misc/linenum.src index 730cb47425..61cee918d7 100644 --- a/sw/source/ui/misc/linenum.src +++ b/sw/source/ui/misc/linenum.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: linenum.src,v $ - * $Revision: 1.34 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/makefile.mk b/sw/source/ui/misc/makefile.mk index a0f2484f48..72d9f80aec 100644 --- a/sw/source/ui/misc/makefile.mk +++ b/sw/source/ui/misc/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.14.236.1 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 656f076800..2c694fe1d1 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: num.cxx,v $ - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/num.hrc b/sw/source/ui/misc/num.hrc index 2bd599d67a..6156208ff9 100644 --- a/sw/source/ui/misc/num.hrc +++ b/sw/source/ui/misc/num.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: num.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/num.src b/sw/source/ui/misc/num.src index 4989207714..0fbc45eb1c 100644 --- a/sw/source/ui/misc/num.src +++ b/sw/source/ui/misc/num.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: num.src,v $ - * $Revision: 1.39 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx index 75d4186e9e..86e4f12ed5 100644 --- a/sw/source/ui/misc/numberingtypelistbox.cxx +++ b/sw/source/ui/misc/numberingtypelistbox.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: numberingtypelistbox.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/numberingtypelistbox.src b/sw/source/ui/misc/numberingtypelistbox.src index 6d226d4fbd..96bf9142a6 100644 --- a/sw/source/ui/misc/numberingtypelistbox.src +++ b/sw/source/ui/misc/numberingtypelistbox.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: numberingtypelistbox.src,v $ - * $Revision: 1.20.252.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 4440cbcde3..0022fd8b1d 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: outline.cxx,v $ - * $Revision: 1.41 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/outline.hrc b/sw/source/ui/misc/outline.hrc index 9a6399f811..2d24c71954 100644 --- a/sw/source/ui/misc/outline.hrc +++ b/sw/source/ui/misc/outline.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: outline.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/outline.src b/sw/source/ui/misc/outline.src index a1c4f99cde..64dd97494a 100644 --- a/sw/source/ui/misc/outline.src +++ b/sw/source/ui/misc/outline.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: outline.src,v $ - * $Revision: 1.34 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index 2116375b9a..35c810098f 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pgfnote.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/pgfnote.hrc b/sw/source/ui/misc/pgfnote.hrc index d287883612..c213f29f30 100644 --- a/sw/source/ui/misc/pgfnote.hrc +++ b/sw/source/ui/misc/pgfnote.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pgfnote.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/pgfnote.src b/sw/source/ui/misc/pgfnote.src index 5e64578504..18acc28267 100644 --- a/sw/source/ui/misc/pgfnote.src +++ b/sw/source/ui/misc/pgfnote.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pgfnote.src,v $ - * $Revision: 1.32 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index 78ff19288e..c2405b6bea 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pggrid.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/pggrid.hrc b/sw/source/ui/misc/pggrid.hrc index 2c9d57678c..695bad1e76 100644 --- a/sw/source/ui/misc/pggrid.hrc +++ b/sw/source/ui/misc/pggrid.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pggrid.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/pggrid.src b/sw/source/ui/misc/pggrid.src index a7bdd513d2..76bd70201d 100644 --- a/sw/source/ui/misc/pggrid.src +++ b/sw/source/ui/misc/pggrid.src @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pggrid.src,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx index 4b29b408b1..e2b7e6a151 100644 --- a/sw/source/ui/misc/redlndlg.cxx +++ b/sw/source/ui/misc/redlndlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: redlndlg.cxx,v $ - * $Revision: 1.29.190.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/redlndlg.hrc b/sw/source/ui/misc/redlndlg.hrc index cfaccebf1f..927d247c79 100644 --- a/sw/source/ui/misc/redlndlg.hrc +++ b/sw/source/ui/misc/redlndlg.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: redlndlg.hrc,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/redlndlg.src b/sw/source/ui/misc/redlndlg.src index 05066494ca..3af8626ee8 100644 --- a/sw/source/ui/misc/redlndlg.src +++ b/sw/source/ui/misc/redlndlg.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: redlndlg.src,v $ - * $Revision: 1.31 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 306e99e7dd..6265a3e252 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: srtdlg.cxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/srtdlg.hrc b/sw/source/ui/misc/srtdlg.hrc index 441353a735..034852718d 100644 --- a/sw/source/ui/misc/srtdlg.hrc +++ b/sw/source/ui/misc/srtdlg.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: srtdlg.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/srtdlg.src b/sw/source/ui/misc/srtdlg.src index d8c79de946..8a1eb3a3ee 100644 --- a/sw/source/ui/misc/srtdlg.src +++ b/sw/source/ui/misc/srtdlg.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: srtdlg.src,v $ - * $Revision: 1.35 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx index 710185118b..2e11521aaa 100644 --- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx +++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swmodalredlineacceptdlg.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/conarc.cxx b/sw/source/ui/ribbar/conarc.cxx index eb7a7dc536..d20cef3c92 100644 --- a/sw/source/ui/ribbar/conarc.cxx +++ b/sw/source/ui/ribbar/conarc.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: conarc.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/concustomshape.cxx b/sw/source/ui/ribbar/concustomshape.cxx index 32059b83f9..f6dfc3c17f 100644 --- a/sw/source/ui/ribbar/concustomshape.cxx +++ b/sw/source/ui/ribbar/concustomshape.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: concustomshape.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/conform.cxx b/sw/source/ui/ribbar/conform.cxx index 5137c35390..60ff9e7e13 100644 --- a/sw/source/ui/ribbar/conform.cxx +++ b/sw/source/ui/ribbar/conform.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: conform.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/conpoly.cxx b/sw/source/ui/ribbar/conpoly.cxx index 13f1092343..3fdeff53f8 100644 --- a/sw/source/ui/ribbar/conpoly.cxx +++ b/sw/source/ui/ribbar/conpoly.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: conpoly.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/conrect.cxx b/sw/source/ui/ribbar/conrect.cxx index d676b8eaaf..8013ff0882 100644 --- a/sw/source/ui/ribbar/conrect.cxx +++ b/sw/source/ui/ribbar/conrect.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: conrect.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/drawbase.cxx b/sw/source/ui/ribbar/drawbase.cxx index 89bfd4081d..737b367bda 100644 --- a/sw/source/ui/ribbar/drawbase.cxx +++ b/sw/source/ui/ribbar/drawbase.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drawbase.cxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/dselect.cxx b/sw/source/ui/ribbar/dselect.cxx index 59c540564f..08ac58062d 100644 --- a/sw/source/ui/ribbar/dselect.cxx +++ b/sw/source/ui/ribbar/dselect.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dselect.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx index 3f129b9848..174634af48 100644 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: inputwin.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/inputwin.hrc b/sw/source/ui/ribbar/inputwin.hrc index cc1497a17c..e55fa18e3e 100644 --- a/sw/source/ui/ribbar/inputwin.hrc +++ b/sw/source/ui/ribbar/inputwin.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: inputwin.hrc,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/inputwin.src b/sw/source/ui/ribbar/inputwin.src index dbee5db5ad..e8f8fa58f5 100644 --- a/sw/source/ui/ribbar/inputwin.src +++ b/sw/source/ui/ribbar/inputwin.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: inputwin.src,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/makefile.mk b/sw/source/ui/ribbar/makefile.mk index fa0b6a9488..72acc79307 100644 --- a/sw/source/ui/ribbar/makefile.mk +++ b/sw/source/ui/ribbar/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.7 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/tblctrl.cxx b/sw/source/ui/ribbar/tblctrl.cxx index 99e8bb76b7..96a03fe357 100644 --- a/sw/source/ui/ribbar/tblctrl.cxx +++ b/sw/source/ui/ribbar/tblctrl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tblctrl.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/tblctrl.hrc b/sw/source/ui/ribbar/tblctrl.hrc index 7bba778c1f..fcc31d473e 100644 --- a/sw/source/ui/ribbar/tblctrl.hrc +++ b/sw/source/ui/ribbar/tblctrl.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tblctrl.hrc,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/tblctrl.src b/sw/source/ui/ribbar/tblctrl.src index 5a04514a9d..afc5949983 100644 --- a/sw/source/ui/ribbar/tblctrl.src +++ b/sw/source/ui/ribbar/tblctrl.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tblctrl.src,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/tbxanchr.cxx b/sw/source/ui/ribbar/tbxanchr.cxx index 0448bc3b5a..ba6865e827 100644 --- a/sw/source/ui/ribbar/tbxanchr.cxx +++ b/sw/source/ui/ribbar/tbxanchr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tbxanchr.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/tbxanchr.src b/sw/source/ui/ribbar/tbxanchr.src index 4e07b2ec56..9aa3763ea4 100644 --- a/sw/source/ui/ribbar/tbxanchr.src +++ b/sw/source/ui/ribbar/tbxanchr.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tbxanchr.src,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/tbxmgr.cxx b/sw/source/ui/ribbar/tbxmgr.cxx index 516b2a97e2..c4f05a7b6e 100644 --- a/sw/source/ui/ribbar/tbxmgr.cxx +++ b/sw/source/ui/ribbar/tbxmgr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tbxmgr.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx index e692364362..fbf42ecc08 100644 --- a/sw/source/ui/ribbar/workctrl.cxx +++ b/sw/source/ui/ribbar/workctrl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: workctrl.cxx,v $ - * $Revision: 1.33 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/workctrl.hrc b/sw/source/ui/ribbar/workctrl.hrc index a6a69b8a4e..108cf44ee8 100644 --- a/sw/source/ui/ribbar/workctrl.hrc +++ b/sw/source/ui/ribbar/workctrl.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: workctrl.hrc,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/ribbar/workctrl.src b/sw/source/ui/ribbar/workctrl.src index 453ec69fbf..c50da95313 100644 --- a/sw/source/ui/ribbar/workctrl.src +++ b/sw/source/ui/ribbar/workctrl.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: workctrl.src,v $ - * $Revision: 1.53 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 443b181cbc..879588365b 100755 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: annotsh.cxx,v $ - * $Revision: 1.7.82.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 50add375c8..01d60284bf 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: basesh.cxx,v $ - * $Revision: 1.87 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/beziersh.cxx b/sw/source/ui/shells/beziersh.cxx index c370ebdfbe..ba2a52b899 100644 --- a/sw/source/ui/shells/beziersh.cxx +++ b/sw/source/ui/shells/beziersh.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: beziersh.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/drawdlg.cxx b/sw/source/ui/shells/drawdlg.cxx index 464c1b4e59..fad82ace6f 100644 --- a/sw/source/ui/shells/drawdlg.cxx +++ b/sw/source/ui/shells/drawdlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drawdlg.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx index cd2c4c6a17..c29109397f 100644 --- a/sw/source/ui/shells/drawsh.cxx +++ b/sw/source/ui/shells/drawsh.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drawsh.cxx,v $ - * $Revision: 1.20.190.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/drformsh.cxx b/sw/source/ui/shells/drformsh.cxx index 6ec599bc6d..1dc73fcdb8 100644 --- a/sw/source/ui/shells/drformsh.cxx +++ b/sw/source/ui/shells/drformsh.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drformsh.cxx,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx index c5f0cb2a35..86720f24be 100644 --- a/sw/source/ui/shells/drwbassh.cxx +++ b/sw/source/ui/shells/drwbassh.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drwbassh.cxx,v $ - * $Revision: 1.29 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index 784fcb1f84..01f2f2ebe2 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drwtxtex.cxx,v $ - * $Revision: 1.46.82.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index a1012eac8c..8dd0ae01cd 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drwtxtsh.cxx,v $ - * $Revision: 1.42.190.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 06f5231665..b70952f691 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frmsh.cxx,v $ - * $Revision: 1.22.190.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx index b820b319a5..b2a1cc9a58 100644 --- a/sw/source/ui/shells/grfsh.cxx +++ b/sw/source/ui/shells/grfsh.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: grfsh.cxx,v $ - * $Revision: 1.33 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/grfshex.cxx b/sw/source/ui/shells/grfshex.cxx index 8cf626538a..6c54ec9624 100644 --- a/sw/source/ui/shells/grfshex.cxx +++ b/sw/source/ui/shells/grfshex.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: grfshex.cxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx index 3fa52625b2..2a2b22d5a0 100755 --- a/sw/source/ui/shells/langhelper.cxx +++ b/sw/source/ui/shells/langhelper.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: langhelper.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/listsh.cxx b/sw/source/ui/shells/listsh.cxx index c5190449dd..5b27ddd6a3 100644 --- a/sw/source/ui/shells/listsh.cxx +++ b/sw/source/ui/shells/listsh.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: listsh.cxx,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk index 2e4a96c990..4123040225 100644 --- a/sw/source/ui/shells/makefile.mk +++ b/sw/source/ui/shells/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.14 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/mediash.cxx b/sw/source/ui/shells/mediash.cxx index 3688b33269..cd17e47cc1 100644 --- a/sw/source/ui/shells/mediash.cxx +++ b/sw/source/ui/shells/mediash.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mediash.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/olesh.cxx b/sw/source/ui/shells/olesh.cxx index 6d787f266b..537af7b0f2 100644 --- a/sw/source/ui/shells/olesh.cxx +++ b/sw/source/ui/shells/olesh.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: olesh.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/shells.src b/sw/source/ui/shells/shells.src index 92434115d7..42b3b0029a 100644 --- a/sw/source/ui/shells/shells.src +++ b/sw/source/ui/shells/shells.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: shells.src,v $ - * $Revision: 1.54 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/slotadd.cxx b/sw/source/ui/shells/slotadd.cxx index 6668f61d12..a5b0b2d71b 100644 --- a/sw/source/ui/shells/slotadd.cxx +++ b/sw/source/ui/shells/slotadd.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: slotadd.cxx,v $ - * $Revision: 1.30.124.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx index d86a79f0e9..1cca9a274b 100644 --- a/sw/source/ui/shells/tabsh.cxx +++ b/sw/source/ui/shells/tabsh.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tabsh.cxx,v $ - * $Revision: 1.46.212.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx index 0cb414385a..95f6710cc8 100644 --- a/sw/source/ui/shells/textdrw.cxx +++ b/sw/source/ui/shells/textdrw.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textdrw.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx index b0238213d9..bfb88fe9ee 100644 --- a/sw/source/ui/shells/textfld.cxx +++ b/sw/source/ui/shells/textfld.cxx @@ -1,14 +1,11 @@ /************ ************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textfld.cxx,v $ - * $Revision: 1.38.190.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/textglos.cxx b/sw/source/ui/shells/textglos.cxx index 2135e33452..117320a9c9 100644 --- a/sw/source/ui/shells/textglos.cxx +++ b/sw/source/ui/shells/textglos.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textglos.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx index 8e88eded78..332e2ce400 100644 --- a/sw/source/ui/shells/textidx.cxx +++ b/sw/source/ui/shells/textidx.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textidx.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index fe9cda4f7c..b41e43fc36 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textsh.cxx,v $ - * $Revision: 1.63 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 09ba7b28cc..733413ff07 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textsh1.cxx,v $ - * $Revision: 1.70.84.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/textsh2.cxx b/sw/source/ui/shells/textsh2.cxx index a56889491b..e08db985ec 100644 --- a/sw/source/ui/shells/textsh2.cxx +++ b/sw/source/ui/shells/textsh2.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textsh2.cxx,v $ - * $Revision: 1.28 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx index 29fc07107a..50a347c3ee 100644 --- a/sw/source/ui/shells/txtattr.cxx +++ b/sw/source/ui/shells/txtattr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtattr.cxx,v $ - * $Revision: 1.28.140.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/txtcrsr.cxx b/sw/source/ui/shells/txtcrsr.cxx index 888f5560ec..08d5f1be56 100644 --- a/sw/source/ui/shells/txtcrsr.cxx +++ b/sw/source/ui/shells/txtcrsr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtcrsr.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/shells/txtnum.cxx b/sw/source/ui/shells/txtnum.cxx index 6b4be8da6e..0907a3cfc3 100644 --- a/sw/source/ui/shells/txtnum.cxx +++ b/sw/source/ui/shells/txtnum.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: txtnum.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/smartmenu/makefile.mk b/sw/source/ui/smartmenu/makefile.mk index 6e32a668d9..1950430cf3 100644 --- a/sw/source/ui/smartmenu/makefile.mk +++ b/sw/source/ui/smartmenu/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/smartmenu/stmenu.cxx b/sw/source/ui/smartmenu/stmenu.cxx index 39bd1908f8..c27f206d01 100644 --- a/sw/source/ui/smartmenu/stmenu.cxx +++ b/sw/source/ui/smartmenu/stmenu.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: stmenu.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/smartmenu/stmenu.hrc b/sw/source/ui/smartmenu/stmenu.hrc index 7d2bdb6b28..a31fbca218 100644 --- a/sw/source/ui/smartmenu/stmenu.hrc +++ b/sw/source/ui/smartmenu/stmenu.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: stmenu.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/smartmenu/stmenu.src b/sw/source/ui/smartmenu/stmenu.src index 5ef6639ec1..e4e30192d7 100644 --- a/sw/source/ui/smartmenu/stmenu.src +++ b/sw/source/ui/smartmenu/stmenu.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: stmenu.src,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx index 1032536616..5649fca2b8 100644 --- a/sw/source/ui/table/chartins.cxx +++ b/sw/source/ui/table/chartins.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chartins.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/chartins.hrc b/sw/source/ui/table/chartins.hrc index c3fd341e1d..92b4d1ff4b 100644 --- a/sw/source/ui/table/chartins.hrc +++ b/sw/source/ui/table/chartins.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chartins.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/chartins.src b/sw/source/ui/table/chartins.src index 0f08808732..6c30097791 100644 --- a/sw/source/ui/table/chartins.src +++ b/sw/source/ui/table/chartins.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chartins.src,v $ - * $Revision: 1.36 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/colwd.cxx b/sw/source/ui/table/colwd.cxx index 3258814537..a5b4d9cf9c 100644 --- a/sw/source/ui/table/colwd.cxx +++ b/sw/source/ui/table/colwd.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: colwd.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/colwd.hrc b/sw/source/ui/table/colwd.hrc index 6629743934..e7526f79d5 100644 --- a/sw/source/ui/table/colwd.hrc +++ b/sw/source/ui/table/colwd.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: colwd.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/colwd.src b/sw/source/ui/table/colwd.src index 7d1693aaa9..cd34b41bd5 100644 --- a/sw/source/ui/table/colwd.src +++ b/sw/source/ui/table/colwd.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: colwd.src,v $ - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index d2f0e792dd..9418e7fbaf 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: convert.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/convert.hrc b/sw/source/ui/table/convert.hrc index 26d2cd34e1..e86906dd20 100644 --- a/sw/source/ui/table/convert.hrc +++ b/sw/source/ui/table/convert.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: convert.hrc,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/convert.src b/sw/source/ui/table/convert.src index ea4b4c6e87..50baa2bb9a 100644 --- a/sw/source/ui/table/convert.src +++ b/sw/source/ui/table/convert.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: convert.src,v $ - * $Revision: 1.29.240.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index 7ba412363f..a81074c8df 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: instable.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/instable.hrc b/sw/source/ui/table/instable.hrc index 8df443efae..b11bf61929 100644 --- a/sw/source/ui/table/instable.hrc +++ b/sw/source/ui/table/instable.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: instable.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/instable.src b/sw/source/ui/table/instable.src index 11ea4ca90c..3930bb36ab 100644 --- a/sw/source/ui/table/instable.src +++ b/sw/source/ui/table/instable.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: instable.src,v $ - * $Revision: 1.32.240.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/makefile.mk b/sw/source/ui/table/makefile.mk index 5e39d0af3a..8b2ba850d1 100644 --- a/sw/source/ui/table/makefile.mk +++ b/sw/source/ui/table/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.8 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/mergetbl.cxx b/sw/source/ui/table/mergetbl.cxx index c96fe69302..2e96a58846 100644 --- a/sw/source/ui/table/mergetbl.cxx +++ b/sw/source/ui/table/mergetbl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mergetbl.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/mergetbl.hrc b/sw/source/ui/table/mergetbl.hrc index 833475ddf6..f4598011ad 100644 --- a/sw/source/ui/table/mergetbl.hrc +++ b/sw/source/ui/table/mergetbl.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mergetbl.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/mergetbl.src b/sw/source/ui/table/mergetbl.src index 9903dd3e77..97ef9cb2cd 100644 --- a/sw/source/ui/table/mergetbl.src +++ b/sw/source/ui/table/mergetbl.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mergetbl.src,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/rowht.cxx b/sw/source/ui/table/rowht.cxx index 00cd7fc555..9bfdbe74e5 100644 --- a/sw/source/ui/table/rowht.cxx +++ b/sw/source/ui/table/rowht.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rowht.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/rowht.hrc b/sw/source/ui/table/rowht.hrc index 2174e89a16..564c5bf61b 100644 --- a/sw/source/ui/table/rowht.hrc +++ b/sw/source/ui/table/rowht.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rowht.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/rowht.src b/sw/source/ui/table/rowht.src index 70e2248aad..ea3ac27474 100644 --- a/sw/source/ui/table/rowht.src +++ b/sw/source/ui/table/rowht.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: rowht.src,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/splittbl.cxx b/sw/source/ui/table/splittbl.cxx index b12d5011b6..9763755886 100644 --- a/sw/source/ui/table/splittbl.cxx +++ b/sw/source/ui/table/splittbl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: splittbl.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/splittbl.hrc b/sw/source/ui/table/splittbl.hrc index 4990729ff7..c57b0e499f 100644 --- a/sw/source/ui/table/splittbl.hrc +++ b/sw/source/ui/table/splittbl.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: splittbl.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/splittbl.src b/sw/source/ui/table/splittbl.src index 52822b0269..e58d64ab96 100644 --- a/sw/source/ui/table/splittbl.src +++ b/sw/source/ui/table/splittbl.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: splittbl.src,v $ - * $Revision: 1.25 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/swtablerep.cxx b/sw/source/ui/table/swtablerep.cxx index a2bcfcb920..1967874e7b 100644 --- a/sw/source/ui/table/swtablerep.cxx +++ b/sw/source/ui/table/swtablerep.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swtablerep.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/table.src b/sw/source/ui/table/table.src index 14d01f3ebe..7c0194be77 100644 --- a/sw/source/ui/table/table.src +++ b/sw/source/ui/table/table.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: table.src,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index b7561449a4..63a5df9159 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tabledlg.cxx,v $ - * $Revision: 1.35.136.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/tabledlg.hrc b/sw/source/ui/table/tabledlg.hrc index fd747caaeb..1640c623d9 100644 --- a/sw/source/ui/table/tabledlg.hrc +++ b/sw/source/ui/table/tabledlg.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tabledlg.hrc,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/tabledlg.src b/sw/source/ui/table/tabledlg.src index 998f9c30d6..0dd3607c2d 100644 --- a/sw/source/ui/table/tabledlg.src +++ b/sw/source/ui/table/tabledlg.src @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tabledlg.src,v $ - * $Revision: 1.38.66.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/tablemgr.cxx b/sw/source/ui/table/tablemgr.cxx index 55f3fd6ed8..16958e3fc1 100644 --- a/sw/source/ui/table/tablemgr.cxx +++ b/sw/source/ui/table/tablemgr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tablemgr.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx index 84c3bf9aed..f4b00f5062 100644 --- a/sw/source/ui/table/tablepg.hxx +++ b/sw/source/ui/table/tablepg.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tablepg.hxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 44b7d8ff04..a0a2f1c41e 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tautofmt.cxx,v $ - * $Revision: 1.24.190.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/tautofmt.hrc b/sw/source/ui/table/tautofmt.hrc index 7ba94d8ff5..5f107ebbc3 100644 --- a/sw/source/ui/table/tautofmt.hrc +++ b/sw/source/ui/table/tautofmt.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tautofmt.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/table/tautofmt.src b/sw/source/ui/table/tautofmt.src index d50359aba8..ab314e0932 100644 --- a/sw/source/ui/table/tautofmt.src +++ b/sw/source/ui/table/tautofmt.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tautofmt.src,v $ - * $Revision: 1.37 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx index cce491f677..b01087cfb5 100644 --- a/sw/source/ui/uiview/formatclipboard.cxx +++ b/sw/source/ui/uiview/formatclipboard.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: formatclipboard.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/makefile.mk b/sw/source/ui/uiview/makefile.mk index 28ab2271a8..d06bb58a7d 100644 --- a/sw/source/ui/uiview/makefile.mk +++ b/sw/source/ui/uiview/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.12 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 0f09427a72..9594712a9f 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pview.cxx,v $ - * $Revision: 1.70 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/pview.hrc b/sw/source/ui/uiview/pview.hrc index 25e68194fd..d30f90e396 100644 --- a/sw/source/ui/uiview/pview.hrc +++ b/sw/source/ui/uiview/pview.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pview.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/pview.src b/sw/source/ui/uiview/pview.src index ed778b5e31..57fb35d27a 100644 --- a/sw/source/ui/uiview/pview.src +++ b/sw/source/ui/uiview/pview.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pview.src,v $ - * $Revision: 1.35 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx index 0196d9283d..f063a69732 100644 --- a/sw/source/ui/uiview/scroll.cxx +++ b/sw/source/ui/uiview/scroll.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: scroll.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index 57b7835c4e..f0c2c49b64 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: srcview.cxx,v $ - * $Revision: 1.59 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx index dd1a9603b8..996ab9b235 100644 --- a/sw/source/ui/uiview/swcli.cxx +++ b/sw/source/ui/uiview/swcli.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swcli.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx index 1930856661..d58e80a542 100644 --- a/sw/source/ui/uiview/uivwimp.cxx +++ b/sw/source/ui/uiview/uivwimp.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: uivwimp.cxx,v $ - * $Revision: 1.25 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 0ccb309100..01b111a18c 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: view.cxx,v $ - * $Revision: 1.112.94.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/view.hrc b/sw/source/ui/uiview/view.hrc index e22d1a264d..a2b828bb2c 100644 --- a/sw/source/ui/uiview/view.hrc +++ b/sw/source/ui/uiview/view.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: view.hrc,v $ - * $Revision: 1.5.240.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/view.src b/sw/source/ui/uiview/view.src index a643c9a136..0667bf5c35 100644 --- a/sw/source/ui/uiview/view.src +++ b/sw/source/ui/uiview/view.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: view.src,v $ - * $Revision: 1.52.110.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx index bf8bf5a2b6..f2ec8e1476 100644 --- a/sw/source/ui/uiview/view0.cxx +++ b/sw/source/ui/uiview/view0.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: view0.cxx,v $ - * $Revision: 1.29 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/view1.cxx b/sw/source/ui/uiview/view1.cxx index a26e519f72..94ec7895b8 100644 --- a/sw/source/ui/uiview/view1.cxx +++ b/sw/source/ui/uiview/view1.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: view1.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index cac139f875..3adc033497 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: view2.cxx,v $ - * $Revision: 1.90 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/viewcoll.cxx b/sw/source/ui/uiview/viewcoll.cxx index 1688c3dfe7..355d199aef 100644 --- a/sw/source/ui/uiview/viewcoll.cxx +++ b/sw/source/ui/uiview/viewcoll.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewcoll.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/viewdlg.cxx b/sw/source/ui/uiview/viewdlg.cxx index 8b715474ce..ee778e29dc 100644 --- a/sw/source/ui/uiview/viewdlg.cxx +++ b/sw/source/ui/uiview/viewdlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewdlg.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/viewdlg2.cxx b/sw/source/ui/uiview/viewdlg2.cxx index bc772202ce..27f017c517 100644 --- a/sw/source/ui/uiview/viewdlg2.cxx +++ b/sw/source/ui/uiview/viewdlg2.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewdlg2.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx index 9ab1df6a91..2dfe022e02 100644 --- a/sw/source/ui/uiview/viewdraw.cxx +++ b/sw/source/ui/uiview/viewdraw.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewdraw.cxx,v $ - * $Revision: 1.40 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/viewfunc.hxx b/sw/source/ui/uiview/viewfunc.hxx index e3f2dda1c7..09502fa6dd 100644 --- a/sw/source/ui/uiview/viewfunc.hxx +++ b/sw/source/ui/uiview/viewfunc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewfunc.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index 92a6cc8fcb..710616fa70 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewling.cxx,v $ - * $Revision: 1.38 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx index 7fdf5789ad..10eff585f7 100644 --- a/sw/source/ui/uiview/viewmdi.cxx +++ b/sw/source/ui/uiview/viewmdi.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewmdi.cxx,v $ - * $Revision: 1.24.140.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx index 708372d35d..48552c8f9c 100644 --- a/sw/source/ui/uiview/viewport.cxx +++ b/sw/source/ui/uiview/viewport.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewport.cxx,v $ - * $Revision: 1.47 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx index 46b7e12a2e..1cdf207019 100644 --- a/sw/source/ui/uiview/viewprt.cxx +++ b/sw/source/ui/uiview/viewprt.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewprt.cxx,v $ - * $Revision: 1.42 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx index 85c965ee65..6ca95c01f7 100644 --- a/sw/source/ui/uiview/viewsrch.cxx +++ b/sw/source/ui/uiview/viewsrch.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewsrch.cxx,v $ - * $Revision: 1.32 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx index 183498c31c..31613db2c6 100644 --- a/sw/source/ui/uiview/viewstat.cxx +++ b/sw/source/ui/uiview/viewstat.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewstat.cxx,v $ - * $Revision: 1.42 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index c1f532748e..f2ff01536f 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewtab.cxx,v $ - * $Revision: 1.44 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/RefreshListenerContainer.cxx b/sw/source/ui/uno/RefreshListenerContainer.cxx index cf97ddb08a..a57353254d 100644 --- a/sw/source/ui/uno/RefreshListenerContainer.cxx +++ b/sw/source/ui/uno/RefreshListenerContainer.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: RefreshListenerContainer.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index 88b9e291a4..df8e740438 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXDocumentSettings.cxx,v $ - * $Revision: 1.66 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/SwXDocumentSettings.hxx b/sw/source/ui/uno/SwXDocumentSettings.hxx index 1fadbcecec..b9eb996326 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.hxx +++ b/sw/source/ui/uno/SwXDocumentSettings.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXDocumentSettings.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/SwXFilterOptions.cxx b/sw/source/ui/uno/SwXFilterOptions.cxx index c55bf6ff57..128c278e28 100644 --- a/sw/source/ui/uno/SwXFilterOptions.cxx +++ b/sw/source/ui/uno/SwXFilterOptions.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXFilterOptions.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/SwXPrintPreviewSettings.cxx b/sw/source/ui/uno/SwXPrintPreviewSettings.cxx index 0cbe81757b..ba39ed59a2 100644 --- a/sw/source/ui/uno/SwXPrintPreviewSettings.cxx +++ b/sw/source/ui/uno/SwXPrintPreviewSettings.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXPrintPreviewSettings.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/SwXPrintPreviewSettings.hxx b/sw/source/ui/uno/SwXPrintPreviewSettings.hxx index 31a77ecfba..8cbc3e0567 100644 --- a/sw/source/ui/uno/SwXPrintPreviewSettings.hxx +++ b/sw/source/ui/uno/SwXPrintPreviewSettings.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SwXPrintPreviewSettings.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/detreg.cxx b/sw/source/ui/uno/detreg.cxx index 376685b698..3a7741e2a5 100644 --- a/sw/source/ui/uno/detreg.cxx +++ b/sw/source/ui/uno/detreg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: detreg.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/dlelstnr.cxx b/sw/source/ui/uno/dlelstnr.cxx index d9b4c83795..c09a35bf5d 100644 --- a/sw/source/ui/uno/dlelstnr.cxx +++ b/sw/source/ui/uno/dlelstnr.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dlelstnr.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/makefile.mk b/sw/source/ui/uno/makefile.mk index 41b2cc73ca..32210b2162 100644 --- a/sw/source/ui/uno/makefile.mk +++ b/sw/source/ui/uno/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.20 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/swdet2.cxx b/sw/source/ui/uno/swdet2.cxx index 4d369d2b7e..d021c7fc82 100644 --- a/sw/source/ui/uno/swdet2.cxx +++ b/sw/source/ui/uno/swdet2.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swdet2.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx index d0fcf366ee..d89eae9917 100644 --- a/sw/source/ui/uno/swdetect.cxx +++ b/sw/source/ui/uno/swdetect.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swdetect.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/swdetect.hxx b/sw/source/ui/uno/swdetect.hxx index b1369cae78..3677bd7f89 100644 --- a/sw/source/ui/uno/swdetect.hxx +++ b/sw/source/ui/uno/swdetect.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swdetect.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx index 74158364f2..329aa0ecf5 100644 --- a/sw/source/ui/uno/unoatxt.cxx +++ b/sw/source/ui/uno/unoatxt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoatxt.cxx,v $ - * $Revision: 1.42 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/unodefaults.cxx b/sw/source/ui/uno/unodefaults.cxx index 8a931e74db..bc22cbe144 100644 --- a/sw/source/ui/uno/unodefaults.cxx +++ b/sw/source/ui/uno/unodefaults.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unodefaults.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/unodefaults.hxx b/sw/source/ui/uno/unodefaults.hxx index d920e8e001..a96785a283 100644 --- a/sw/source/ui/uno/unodefaults.hxx +++ b/sw/source/ui/uno/unodefaults.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unodefaults.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/unodispatch.cxx b/sw/source/ui/uno/unodispatch.cxx index 02e669d3b2..a64f4582a7 100644 --- a/sw/source/ui/uno/unodispatch.cxx +++ b/sw/source/ui/uno/unodispatch.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unodispatch.cxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/unodoc.cxx b/sw/source/ui/uno/unodoc.cxx index 23d014bf59..b2843ee5ae 100644 --- a/sw/source/ui/uno/unodoc.cxx +++ b/sw/source/ui/uno/unodoc.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unodoc.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/unofreg.cxx b/sw/source/ui/uno/unofreg.cxx index 50e770923a..8be7174c77 100644 --- a/sw/source/ui/uno/unofreg.cxx +++ b/sw/source/ui/uno/unofreg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unofreg.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index d9966ac213..3a8ee250b3 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unomailmerge.cxx,v $ - * $Revision: 1.26.206.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index 4d077c5b9f..50c19caaac 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unomod.cxx,v $ - * $Revision: 1.33 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/unomodule.cxx b/sw/source/ui/uno/unomodule.cxx index 43a3e0995b..fe0041d04e 100644 --- a/sw/source/ui/uno/unomodule.cxx +++ b/sw/source/ui/uno/unomodule.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unomodule.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/unomodule.hxx b/sw/source/ui/uno/unomodule.hxx index 741cc4e022..4292c47a68 100644 --- a/sw/source/ui/uno/unomodule.hxx +++ b/sw/source/ui/uno/unomodule.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unomodule.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index c46d668dac..99c14814ac 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unotxdoc.cxx,v $ - * $Revision: 1.134 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index e2b40a8a9e..3f64f9add0 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unotxvw.cxx,v $ - * $Revision: 1.71 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/uno/warnpassword.cxx b/sw/source/ui/uno/warnpassword.cxx index 1af8e77c25..5eefdc23a1 100644 --- a/sw/source/ui/uno/warnpassword.cxx +++ b/sw/source/ui/uno/warnpassword.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: warnpassword.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx index 75b8b6188a..9c34066341 100644 --- a/sw/source/ui/utlui/attrdesc.cxx +++ b/sw/source/ui/utlui/attrdesc.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: attrdesc.cxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/attrdesc.hrc b/sw/source/ui/utlui/attrdesc.hrc index fa7cdbf437..08c6f7ec26 100644 --- a/sw/source/ui/utlui/attrdesc.hrc +++ b/sw/source/ui/utlui/attrdesc.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: attrdesc.hrc,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/attrdesc.src b/sw/source/ui/utlui/attrdesc.src index 374bb92898..3317cdbccf 100644 --- a/sw/source/ui/utlui/attrdesc.src +++ b/sw/source/ui/utlui/attrdesc.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: attrdesc.src,v $ - * $Revision: 1.44 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/bookctrl.cxx b/sw/source/ui/utlui/bookctrl.cxx index 40dc397900..4bab9e8ca1 100644 --- a/sw/source/ui/utlui/bookctrl.cxx +++ b/sw/source/ui/utlui/bookctrl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: bookctrl.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/condedit.cxx b/sw/source/ui/utlui/condedit.cxx index e9808af539..8929abb006 100644 --- a/sw/source/ui/utlui/condedit.cxx +++ b/sw/source/ui/utlui/condedit.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: condedit.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index c031c4f546..c417c21c47 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: content.cxx,v $ - * $Revision: 1.55.34.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx index 546b276a5b..848fafc963 100644 --- a/sw/source/ui/utlui/glbltree.cxx +++ b/sw/source/ui/utlui/glbltree.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: glbltree.cxx,v $ - * $Revision: 1.40 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/gloslst.cxx b/sw/source/ui/utlui/gloslst.cxx index ce6143a817..a34b874a3b 100644 --- a/sw/source/ui/utlui/gloslst.cxx +++ b/sw/source/ui/utlui/gloslst.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: gloslst.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/gloslst.hrc b/sw/source/ui/utlui/gloslst.hrc index 9cb53ef21e..0d3fe2b0f5 100644 --- a/sw/source/ui/utlui/gloslst.hrc +++ b/sw/source/ui/utlui/gloslst.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: gloslst.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/gloslst.src b/sw/source/ui/utlui/gloslst.src index 7cbcc536ef..1ccf855ffe 100644 --- a/sw/source/ui/utlui/gloslst.src +++ b/sw/source/ui/utlui/gloslst.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: gloslst.src,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx index 6a2c3f1f30..65731de981 100644 --- a/sw/source/ui/utlui/initui.cxx +++ b/sw/source/ui/utlui/initui.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: initui.cxx,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/initui.hrc b/sw/source/ui/utlui/initui.hrc index cfeb63ebda..34d7e788c7 100644 --- a/sw/source/ui/utlui/initui.hrc +++ b/sw/source/ui/utlui/initui.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: initui.hrc,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/initui.src b/sw/source/ui/utlui/initui.src index 55f0a496b8..619b208f37 100644 --- a/sw/source/ui/utlui/initui.src +++ b/sw/source/ui/utlui/initui.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: initui.src,v $ - * $Revision: 1.45 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/makefile.mk b/sw/source/ui/utlui/makefile.mk index 9620f28c97..7f2aa91c0e 100644 --- a/sw/source/ui/utlui/makefile.mk +++ b/sw/source/ui/utlui/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.15 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/navicfg.cxx b/sw/source/ui/utlui/navicfg.cxx index 7e5bcd7f92..d822ee3761 100644 --- a/sw/source/ui/utlui/navicfg.cxx +++ b/sw/source/ui/utlui/navicfg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: navicfg.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index e42f5205ab..576504f915 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: navipi.cxx,v $ - * $Revision: 1.46 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/navipi.hrc b/sw/source/ui/utlui/navipi.hrc index a2d853fb6c..e8a6dc2e39 100644 --- a/sw/source/ui/utlui/navipi.hrc +++ b/sw/source/ui/utlui/navipi.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: navipi.hrc,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/navipi.src b/sw/source/ui/utlui/navipi.src index be75a67695..fd83ec9067 100644 --- a/sw/source/ui/utlui/navipi.src +++ b/sw/source/ui/utlui/navipi.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: navipi.src,v $ - * $Revision: 1.60 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx index 5d5bb06349..0658932191 100644 --- a/sw/source/ui/utlui/numfmtlb.cxx +++ b/sw/source/ui/utlui/numfmtlb.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: numfmtlb.cxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/poolfmt.src b/sw/source/ui/utlui/poolfmt.src index 340e00ea21..e7bd9dd7d5 100644 --- a/sw/source/ui/utlui/poolfmt.src +++ b/sw/source/ui/utlui/poolfmt.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: poolfmt.src,v $ - * $Revision: 1.50.224.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/prcntfld.cxx b/sw/source/ui/utlui/prcntfld.cxx index f0454e4c63..b22fcbd6d9 100644 --- a/sw/source/ui/utlui/prcntfld.cxx +++ b/sw/source/ui/utlui/prcntfld.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: prcntfld.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/shdwcrsr.cxx b/sw/source/ui/utlui/shdwcrsr.cxx index 248af8d69b..d241a82df5 100644 --- a/sw/source/ui/utlui/shdwcrsr.cxx +++ b/sw/source/ui/utlui/shdwcrsr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: shdwcrsr.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx index 1cba05bef1..7c774be049 100644 --- a/sw/source/ui/utlui/swrenamexnameddlg.cxx +++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swrenamexnameddlg.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/textcontrolcombo.cxx b/sw/source/ui/utlui/textcontrolcombo.cxx index 65b4284a19..2c94ea5232 100644 --- a/sw/source/ui/utlui/textcontrolcombo.cxx +++ b/sw/source/ui/utlui/textcontrolcombo.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textcontrolcombo.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/tmplctrl.cxx b/sw/source/ui/utlui/tmplctrl.cxx index 05cf66e911..22b07193b2 100644 --- a/sw/source/ui/utlui/tmplctrl.cxx +++ b/sw/source/ui/utlui/tmplctrl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tmplctrl.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/uiitems.cxx b/sw/source/ui/utlui/uiitems.cxx index 9d68727158..e4b3a8f7eb 100644 --- a/sw/source/ui/utlui/uiitems.cxx +++ b/sw/source/ui/utlui/uiitems.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: uiitems.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx index 755a07a058..4a34146315 100644 --- a/sw/source/ui/utlui/uitool.cxx +++ b/sw/source/ui/utlui/uitool.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: uitool.cxx,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx index 9e38253d32..3185a4bae4 100644 --- a/sw/source/ui/utlui/unotools.cxx +++ b/sw/source/ui/utlui/unotools.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unotools.cxx,v $ - * $Revision: 1.30 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/unotools.hrc b/sw/source/ui/utlui/unotools.hrc index 2e5c6fb47d..2213012bfc 100644 --- a/sw/source/ui/utlui/unotools.hrc +++ b/sw/source/ui/utlui/unotools.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unotools.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/unotools.src b/sw/source/ui/utlui/unotools.src index 753850f76f..aa4be8804c 100644 --- a/sw/source/ui/utlui/unotools.src +++ b/sw/source/ui/utlui/unotools.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unotools.src,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/utlui.src b/sw/source/ui/utlui/utlui.src index 34d9186fa6..ffa5fc8c7c 100644 --- a/sw/source/ui/utlui/utlui.src +++ b/sw/source/ui/utlui/utlui.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: utlui.src,v $ - * $Revision: 1.53.240.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/viewlayoutctrl.cxx b/sw/source/ui/utlui/viewlayoutctrl.cxx index 23478588f5..79751fd17d 100644 --- a/sw/source/ui/utlui/viewlayoutctrl.cxx +++ b/sw/source/ui/utlui/viewlayoutctrl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewlayoutctrl.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/utlui/zoomctrl.cxx b/sw/source/ui/utlui/zoomctrl.cxx index 7a49743b46..986cf6463c 100644 --- a/sw/source/ui/utlui/zoomctrl.cxx +++ b/sw/source/ui/utlui/zoomctrl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: zoomctrl.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/makefile.mk b/sw/source/ui/vba/makefile.mk index f4c604f5d4..c09f813200 100644 --- a/sw/source/ui/vba/makefile.mk +++ b/sw/source/ui/vba/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.6 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/service.cxx b/sw/source/ui/vba/service.cxx index 84f82ca825..fee2847650 100644 --- a/sw/source/ui/vba/service.cxx +++ b/sw/source/ui/vba/service.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: service.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaaddin.cxx b/sw/source/ui/vba/vbaaddin.cxx index 745523ae93..418a2dcd41 100644 --- a/sw/source/ui/vba/vbaaddin.cxx +++ b/sw/source/ui/vba/vbaaddin.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaaddin.hxx b/sw/source/ui/vba/vbaaddin.hxx index aa744e628d..585d2f865e 100644 --- a/sw/source/ui/vba/vbaaddin.hxx +++ b/sw/source/ui/vba/vbaaddin.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaaddins.cxx b/sw/source/ui/vba/vbaaddins.cxx index 351bda2830..62faf145c6 100644 --- a/sw/source/ui/vba/vbaaddins.cxx +++ b/sw/source/ui/vba/vbaaddins.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaaddins.hxx b/sw/source/ui/vba/vbaaddins.hxx index dfab837bed..6d3c269af4 100644 --- a/sw/source/ui/vba/vbaaddins.hxx +++ b/sw/source/ui/vba/vbaaddins.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx index 243acca522..4d7bccda56 100644 --- a/sw/source/ui/vba/vbaapplication.cxx +++ b/sw/source/ui/vba/vbaapplication.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbaapplication.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaapplication.hxx b/sw/source/ui/vba/vbaapplication.hxx index 7d57680170..66f9bca50b 100644 --- a/sw/source/ui/vba/vbaapplication.hxx +++ b/sw/source/ui/vba/vbaapplication.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbaapplication.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaautotextentry.cxx b/sw/source/ui/vba/vbaautotextentry.cxx index 46cf12c18d..5d098a2992 100644 --- a/sw/source/ui/vba/vbaautotextentry.cxx +++ b/sw/source/ui/vba/vbaautotextentry.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaautotextentry.hxx b/sw/source/ui/vba/vbaautotextentry.hxx index 5dc9cc321b..62575243b4 100644 --- a/sw/source/ui/vba/vbaautotextentry.hxx +++ b/sw/source/ui/vba/vbaautotextentry.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbabookmark.cxx b/sw/source/ui/vba/vbabookmark.cxx index c7328f4664..bb67fac461 100644 --- a/sw/source/ui/vba/vbabookmark.cxx +++ b/sw/source/ui/vba/vbabookmark.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbabookmark.hxx b/sw/source/ui/vba/vbabookmark.hxx index 00d8d3456d..b8af460742 100644 --- a/sw/source/ui/vba/vbabookmark.hxx +++ b/sw/source/ui/vba/vbabookmark.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbabookmarks.cxx b/sw/source/ui/vba/vbabookmarks.cxx index 0b80600ef2..17d1741ce8 100644 --- a/sw/source/ui/vba/vbabookmarks.cxx +++ b/sw/source/ui/vba/vbabookmarks.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbabookmarks.hxx b/sw/source/ui/vba/vbabookmarks.hxx index cbdafe60d5..5efef7a31a 100644 --- a/sw/source/ui/vba/vbabookmarks.hxx +++ b/sw/source/ui/vba/vbabookmarks.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx index 142d86225f..634ab630cd 100644 --- a/sw/source/ui/vba/vbaborders.cxx +++ b/sw/source/ui/vba/vbaborders.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbaborders.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaborders.hxx b/sw/source/ui/vba/vbaborders.hxx index e8897e9c2c..a64ba27654 100644 --- a/sw/source/ui/vba/vbaborders.hxx +++ b/sw/source/ui/vba/vbaborders.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbaborders.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbadialog.cxx b/sw/source/ui/vba/vbadialog.cxx index fee57c54cd..0e96be4c15 100644 --- a/sw/source/ui/vba/vbadialog.cxx +++ b/sw/source/ui/vba/vbadialog.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbadialog.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbadialog.hxx b/sw/source/ui/vba/vbadialog.hxx index 0a54b1428b..41f066a938 100644 --- a/sw/source/ui/vba/vbadialog.hxx +++ b/sw/source/ui/vba/vbadialog.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbadialog.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbadialogs.cxx b/sw/source/ui/vba/vbadialogs.cxx index 0ffdc3a928..b52fe83a27 100644 --- a/sw/source/ui/vba/vbadialogs.cxx +++ b/sw/source/ui/vba/vbadialogs.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbadialogs.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbadialogs.hxx b/sw/source/ui/vba/vbadialogs.hxx index e680b25c8b..224a50cb08 100644 --- a/sw/source/ui/vba/vbadialogs.hxx +++ b/sw/source/ui/vba/vbadialogs.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbadialogs.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx index 9f5bd51e5b..98692d56ca 100644 --- a/sw/source/ui/vba/vbadocument.cxx +++ b/sw/source/ui/vba/vbadocument.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbadocument.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbadocument.hxx b/sw/source/ui/vba/vbadocument.hxx index a0e3971b67..4602e9ab08 100644 --- a/sw/source/ui/vba/vbadocument.hxx +++ b/sw/source/ui/vba/vbadocument.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbadocument.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx index 0d9d824f1b..475ca93751 100644 --- a/sw/source/ui/vba/vbadocumentproperties.cxx +++ b/sw/source/ui/vba/vbadocumentproperties.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbadocument.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbadocumentproperties.hxx b/sw/source/ui/vba/vbadocumentproperties.hxx index a75c6a6ca9..9ab704eff3 100644 --- a/sw/source/ui/vba/vbadocumentproperties.hxx +++ b/sw/source/ui/vba/vbadocumentproperties.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbadocument.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx index 28978ae078..dc8a592f9e 100644 --- a/sw/source/ui/vba/vbadocuments.cxx +++ b/sw/source/ui/vba/vbadocuments.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbadocuments.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbadocuments.hxx b/sw/source/ui/vba/vbadocuments.hxx index 4b59b1da8c..7f1c89510e 100644 --- a/sw/source/ui/vba/vbadocuments.hxx +++ b/sw/source/ui/vba/vbadocuments.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx index 345632669b..8e9661d0af 100644 --- a/sw/source/ui/vba/vbafield.cxx +++ b/sw/source/ui/vba/vbafield.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: $ - * $Revision: $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbafield.hxx b/sw/source/ui/vba/vbafield.hxx index ab284164d3..f421179d35 100644 --- a/sw/source/ui/vba/vbafield.hxx +++ b/sw/source/ui/vba/vbafield.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: $ - * $Revision: $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx index d226cddf9b..56c0e6a446 100644 --- a/sw/source/ui/vba/vbafind.cxx +++ b/sw/source/ui/vba/vbafind.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbafind.hxx b/sw/source/ui/vba/vbafind.hxx index b274a19a02..292d9292a7 100644 --- a/sw/source/ui/vba/vbafind.hxx +++ b/sw/source/ui/vba/vbafind.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaglobals.cxx b/sw/source/ui/vba/vbaglobals.cxx index ac143ed878..0770ea3196 100644 --- a/sw/source/ui/vba/vbaglobals.cxx +++ b/sw/source/ui/vba/vbaglobals.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbaglobals.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaglobals.hxx b/sw/source/ui/vba/vbaglobals.hxx index 1123dafa33..ad6ce95bce 100644 --- a/sw/source/ui/vba/vbaglobals.hxx +++ b/sw/source/ui/vba/vbaglobals.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbaglobals.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaheaderfooter.cxx b/sw/source/ui/vba/vbaheaderfooter.cxx index 954834d7c1..ec3b0cef27 100644 --- a/sw/source/ui/vba/vbaheaderfooter.cxx +++ b/sw/source/ui/vba/vbaheaderfooter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaheaderfooter.hxx b/sw/source/ui/vba/vbaheaderfooter.hxx index 264aab8e61..2c4832d7d3 100644 --- a/sw/source/ui/vba/vbaheaderfooter.hxx +++ b/sw/source/ui/vba/vbaheaderfooter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.cxx b/sw/source/ui/vba/vbaheaderfooterhelper.cxx index 4069b85691..80ecd25123 100644 --- a/sw/source/ui/vba/vbaheaderfooterhelper.cxx +++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.hxx b/sw/source/ui/vba/vbaheaderfooterhelper.hxx index 2dffc59b61..b1bcfab09e 100644 --- a/sw/source/ui/vba/vbaheaderfooterhelper.hxx +++ b/sw/source/ui/vba/vbaheaderfooterhelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbahelper.hxx,v $ - * $Revision: 1.5.32.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbainformationhelper.cxx b/sw/source/ui/vba/vbainformationhelper.cxx index e062ed09bb..b2f24406f4 100644 --- a/sw/source/ui/vba/vbainformationhelper.cxx +++ b/sw/source/ui/vba/vbainformationhelper.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbainformationhelper.hxx b/sw/source/ui/vba/vbainformationhelper.hxx index 96241bb75e..0cf436cef5 100644 --- a/sw/source/ui/vba/vbainformationhelper.hxx +++ b/sw/source/ui/vba/vbainformationhelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaoptions.cxx b/sw/source/ui/vba/vbaoptions.cxx index d6efc4d831..34f1e2a588 100644 --- a/sw/source/ui/vba/vbaoptions.cxx +++ b/sw/source/ui/vba/vbaoptions.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microoptionss, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaoptions.hxx b/sw/source/ui/vba/vbaoptions.hxx index 77ed77453b..0a1c1f8f61 100644 --- a/sw/source/ui/vba/vbaoptions.hxx +++ b/sw/source/ui/vba/vbaoptions.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbasystem.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbapagesetup.cxx b/sw/source/ui/vba/vbapagesetup.cxx index 1403d05063..892f2a918f 100644 --- a/sw/source/ui/vba/vbapagesetup.cxx +++ b/sw/source/ui/vba/vbapagesetup.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile$ - * $Revision$ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbapagesetup.hxx b/sw/source/ui/vba/vbapagesetup.hxx index a9747c942a..8449b7f908 100644 --- a/sw/source/ui/vba/vbapagesetup.hxx +++ b/sw/source/ui/vba/vbapagesetup.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile$ - * $Revision$ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbapane.cxx b/sw/source/ui/vba/vbapane.cxx index 6a5973dd18..3fcd415c1d 100644 --- a/sw/source/ui/vba/vbapane.cxx +++ b/sw/source/ui/vba/vbapane.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbapane.hxx b/sw/source/ui/vba/vbapane.hxx index d2501c01cc..c9b11d99aa 100644 --- a/sw/source/ui/vba/vbapane.hxx +++ b/sw/source/ui/vba/vbapane.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbapanes.cxx b/sw/source/ui/vba/vbapanes.cxx index 58c4763491..b97991a550 100644 --- a/sw/source/ui/vba/vbapanes.cxx +++ b/sw/source/ui/vba/vbapanes.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbapanes.hxx b/sw/source/ui/vba/vbapanes.hxx index 98e89035ab..6294e81ba5 100644 --- a/sw/source/ui/vba/vbapanes.hxx +++ b/sw/source/ui/vba/vbapanes.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaparagraph.cxx b/sw/source/ui/vba/vbaparagraph.cxx index 94360a6099..075ea6f107 100644 --- a/sw/source/ui/vba/vbaparagraph.cxx +++ b/sw/source/ui/vba/vbaparagraph.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaparagraph.hxx b/sw/source/ui/vba/vbaparagraph.hxx index a20d21ac6a..4c2cc448e5 100644 --- a/sw/source/ui/vba/vbaparagraph.hxx +++ b/sw/source/ui/vba/vbaparagraph.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx index c695a2164f..dbcadac1e3 100644 --- a/sw/source/ui/vba/vbaparagraphformat.cxx +++ b/sw/source/ui/vba/vbaparagraphformat.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaparagraphformat.hxx b/sw/source/ui/vba/vbaparagraphformat.hxx index 0a5561f11d..4a061b96b7 100644 --- a/sw/source/ui/vba/vbaparagraphformat.hxx +++ b/sw/source/ui/vba/vbaparagraphformat.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx index 64d13837b1..02427c984e 100644 --- a/sw/source/ui/vba/vbarange.cxx +++ b/sw/source/ui/vba/vbarange.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbarange.hxx b/sw/source/ui/vba/vbarange.hxx index d0d47b7872..cbb9941100 100644 --- a/sw/source/ui/vba/vbarange.hxx +++ b/sw/source/ui/vba/vbarange.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbarangehelper.cxx b/sw/source/ui/vba/vbarangehelper.cxx index 5df01b883f..337fd9d6ae 100644 --- a/sw/source/ui/vba/vbarangehelper.cxx +++ b/sw/source/ui/vba/vbarangehelper.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbarangehelper.hxx b/sw/source/ui/vba/vbarangehelper.hxx index 5e478999d7..530c7e1fa1 100644 --- a/sw/source/ui/vba/vbarangehelper.hxx +++ b/sw/source/ui/vba/vbarangehelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbareplacement.cxx b/sw/source/ui/vba/vbareplacement.cxx index b9f6ce717b..2bd7dcfa58 100644 --- a/sw/source/ui/vba/vbareplacement.cxx +++ b/sw/source/ui/vba/vbareplacement.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbareplacement.hxx b/sw/source/ui/vba/vbareplacement.hxx index 63df4d9dab..c0f66af45f 100644 --- a/sw/source/ui/vba/vbareplacement.hxx +++ b/sw/source/ui/vba/vbareplacement.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbasection.cxx b/sw/source/ui/vba/vbasection.cxx index 4d1848bbe1..4df6f0b5b3 100644 --- a/sw/source/ui/vba/vbasection.cxx +++ b/sw/source/ui/vba/vbasection.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbasection.hxx b/sw/source/ui/vba/vbasection.hxx index 8e8bb15c89..9dd4058699 100644 --- a/sw/source/ui/vba/vbasection.hxx +++ b/sw/source/ui/vba/vbasection.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx index c2bc7c3a73..8e6cbee60e 100644 --- a/sw/source/ui/vba/vbasections.cxx +++ b/sw/source/ui/vba/vbasections.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbasections.hxx b/sw/source/ui/vba/vbasections.hxx index c247ce1e9a..9cb35cf74e 100644 --- a/sw/source/ui/vba/vbasections.hxx +++ b/sw/source/ui/vba/vbasections.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index 386e523a3c..17d4e2f5a3 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaselection.hxx b/sw/source/ui/vba/vbaselection.hxx index 1deb725d3a..afbf79a6c3 100644 --- a/sw/source/ui/vba/vbaselection.hxx +++ b/sw/source/ui/vba/vbaselection.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbastyle.cxx b/sw/source/ui/vba/vbastyle.cxx index 44ef92479f..a8bb6bee9c 100644 --- a/sw/source/ui/vba/vbastyle.cxx +++ b/sw/source/ui/vba/vbastyle.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbastyle.hxx b/sw/source/ui/vba/vbastyle.hxx index 709f43d83b..bfa12e0caa 100644 --- a/sw/source/ui/vba/vbastyle.hxx +++ b/sw/source/ui/vba/vbastyle.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: $ - * $Revision: $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx index bdc31da4fa..58a88e2e79 100644 --- a/sw/source/ui/vba/vbastyles.cxx +++ b/sw/source/ui/vba/vbastyles.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbastyles.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbastyles.hxx b/sw/source/ui/vba/vbastyles.hxx index 6bd3d21057..76e08c6ba2 100644 --- a/sw/source/ui/vba/vbastyles.hxx +++ b/sw/source/ui/vba/vbastyles.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbastyles.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx index d497ff2787..1a03c99b84 100644 --- a/sw/source/ui/vba/vbasystem.cxx +++ b/sw/source/ui/vba/vbasystem.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbasystem.hxx b/sw/source/ui/vba/vbasystem.hxx index a88e0d9928..3745bf96eb 100644 --- a/sw/source/ui/vba/vbasystem.hxx +++ b/sw/source/ui/vba/vbasystem.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbasystem.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx index 136a9ec43a..71dc7acd85 100644 --- a/sw/source/ui/vba/vbatemplate.cxx +++ b/sw/source/ui/vba/vbatemplate.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbatemplate.hxx b/sw/source/ui/vba/vbatemplate.hxx index 29453e344b..4e33599604 100644 --- a/sw/source/ui/vba/vbatemplate.hxx +++ b/sw/source/ui/vba/vbatemplate.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbavariable.cxx b/sw/source/ui/vba/vbavariable.cxx index 35be7a9567..1799c7b505 100644 --- a/sw/source/ui/vba/vbavariable.cxx +++ b/sw/source/ui/vba/vbavariable.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbavariable.hxx b/sw/source/ui/vba/vbavariable.hxx index 533d0d20e6..868597915d 100644 --- a/sw/source/ui/vba/vbavariable.hxx +++ b/sw/source/ui/vba/vbavariable.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbavariables.cxx b/sw/source/ui/vba/vbavariables.cxx index 6098454594..85b64f6542 100644 --- a/sw/source/ui/vba/vbavariables.cxx +++ b/sw/source/ui/vba/vbavariables.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbavariables.hxx b/sw/source/ui/vba/vbavariables.hxx index ceaed61a25..739c875571 100644 --- a/sw/source/ui/vba/vbavariables.hxx +++ b/sw/source/ui/vba/vbavariables.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaview.cxx b/sw/source/ui/vba/vbaview.cxx index 01459846cd..2cf6194454 100644 --- a/sw/source/ui/vba/vbaview.cxx +++ b/sw/source/ui/vba/vbaview.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbaview.hxx b/sw/source/ui/vba/vbaview.hxx index 020ca77c1c..ebb89ac700 100644 --- a/sw/source/ui/vba/vbaview.hxx +++ b/sw/source/ui/vba/vbaview.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: - * $Revision: - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbawindow.cxx b/sw/source/ui/vba/vbawindow.cxx index bf41730c6a..255df83b4e 100644 --- a/sw/source/ui/vba/vbawindow.cxx +++ b/sw/source/ui/vba/vbawindow.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbawindow.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbawindow.hxx b/sw/source/ui/vba/vbawindow.hxx index 8d4af66ef7..a32dbcab4a 100644 --- a/sw/source/ui/vba/vbawindow.hxx +++ b/sw/source/ui/vba/vbawindow.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbawindow.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbawrapformat.cxx b/sw/source/ui/vba/vbawrapformat.cxx index e5a126a6ca..4b711f1b2b 100644 --- a/sw/source/ui/vba/vbawrapformat.cxx +++ b/sw/source/ui/vba/vbawrapformat.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbawrapformat.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/vbawrapformat.hxx b/sw/source/ui/vba/vbawrapformat.hxx index 4da7c690e4..9980d4999c 100644 --- a/sw/source/ui/vba/vbawrapformat.hxx +++ b/sw/source/ui/vba/vbawrapformat.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbafillformat.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx index b1bb076550..e489b0b69d 100644 --- a/sw/source/ui/vba/wordvbahelper.cxx +++ b/sw/source/ui/vba/wordvbahelper.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbahelper.cxx,v $ - * $Revision: 1.5.32.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/vba/wordvbahelper.hxx b/sw/source/ui/vba/wordvbahelper.hxx index 65cdbae6bf..489cf25ea3 100644 --- a/sw/source/ui/vba/wordvbahelper.hxx +++ b/sw/source/ui/vba/wordvbahelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: vbahelper.hxx,v $ - * $Revision: 1.5.32.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/web/makefile.mk b/sw/source/ui/web/makefile.mk index c7e69e272c..2b1eb7590b 100644 --- a/sw/source/ui/web/makefile.mk +++ b/sw/source/ui/web/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.7 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/web/wdocsh.cxx b/sw/source/ui/web/wdocsh.cxx index 1615188977..d23fa2ae48 100644 --- a/sw/source/ui/web/wdocsh.cxx +++ b/sw/source/ui/web/wdocsh.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wdocsh.cxx,v $ - * $Revision: 1.16.146.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/web/web.src b/sw/source/ui/web/web.src index d7d60ddde5..8485ae0e80 100644 --- a/sw/source/ui/web/web.src +++ b/sw/source/ui/web/web.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: web.src,v $ - * $Revision: 1.39 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/web/wformsh.cxx b/sw/source/ui/web/wformsh.cxx index 82a2e6a7e2..a69d5e100f 100644 --- a/sw/source/ui/web/wformsh.cxx +++ b/sw/source/ui/web/wformsh.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wformsh.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/web/wfrmsh.cxx b/sw/source/ui/web/wfrmsh.cxx index c1fe63132f..f7356e1db8 100644 --- a/sw/source/ui/web/wfrmsh.cxx +++ b/sw/source/ui/web/wfrmsh.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wfrmsh.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/web/wgrfsh.cxx b/sw/source/ui/web/wgrfsh.cxx index 19f0b6f544..6af91fe1eb 100644 --- a/sw/source/ui/web/wgrfsh.cxx +++ b/sw/source/ui/web/wgrfsh.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wgrfsh.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/web/wlistsh.cxx b/sw/source/ui/web/wlistsh.cxx index 754ab85ff5..3b2b9b84ec 100644 --- a/sw/source/ui/web/wlistsh.cxx +++ b/sw/source/ui/web/wlistsh.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wlistsh.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/web/wolesh.cxx b/sw/source/ui/web/wolesh.cxx index cc5bdb73d8..dbe936c975 100644 --- a/sw/source/ui/web/wolesh.cxx +++ b/sw/source/ui/web/wolesh.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wolesh.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/web/wtabsh.cxx b/sw/source/ui/web/wtabsh.cxx index 5576216dd6..c1d6f3db79 100644 --- a/sw/source/ui/web/wtabsh.cxx +++ b/sw/source/ui/web/wtabsh.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wtabsh.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/web/wtextsh.cxx b/sw/source/ui/web/wtextsh.cxx index f380ee6f3f..c35ab62f76 100644 --- a/sw/source/ui/web/wtextsh.cxx +++ b/sw/source/ui/web/wtextsh.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wtextsh.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx index e86558c2ad..db44cbf379 100644 --- a/sw/source/ui/web/wview.cxx +++ b/sw/source/ui/web/wview.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wview.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/wrtsh/delete.cxx b/sw/source/ui/wrtsh/delete.cxx index ba283bf95a..fdb9d0c175 100644 --- a/sw/source/ui/wrtsh/delete.cxx +++ b/sw/source/ui/wrtsh/delete.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: delete.cxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/wrtsh/makefile.mk b/sw/source/ui/wrtsh/makefile.mk index b082743e6f..baeb3acd25 100644 --- a/sw/source/ui/wrtsh/makefile.mk +++ b/sw/source/ui/wrtsh/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.8 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/wrtsh/move.cxx b/sw/source/ui/wrtsh/move.cxx index e44305ef14..3e649a9057 100644 --- a/sw/source/ui/wrtsh/move.cxx +++ b/sw/source/ui/wrtsh/move.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: move.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx index e7f0a00645..c6b2cae6e6 100644 --- a/sw/source/ui/wrtsh/select.cxx +++ b/sw/source/ui/wrtsh/select.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: select.cxx,v $ - * $Revision: 1.33 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/wrtsh/wrtsh.hrc b/sw/source/ui/wrtsh/wrtsh.hrc index f60208d457..deccbdbbf7 100644 --- a/sw/source/ui/wrtsh/wrtsh.hrc +++ b/sw/source/ui/wrtsh/wrtsh.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtsh.hrc,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/wrtsh/wrtsh.src b/sw/source/ui/wrtsh/wrtsh.src index 821d0e3260..377f9aef8f 100644 --- a/sw/source/ui/wrtsh/wrtsh.src +++ b/sw/source/ui/wrtsh/wrtsh.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtsh.src,v $ - * $Revision: 1.46 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index f372bebac0..7febbd01fc 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtsh1.cxx,v $ - * $Revision: 1.72 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx index 6738faa0d5..632edc8c1f 100644 --- a/sw/source/ui/wrtsh/wrtsh2.cxx +++ b/sw/source/ui/wrtsh/wrtsh2.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtsh2.cxx,v $ - * $Revision: 1.33 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/wrtsh/wrtsh3.cxx b/sw/source/ui/wrtsh/wrtsh3.cxx index d8092b8974..2f277f67f2 100644 --- a/sw/source/ui/wrtsh/wrtsh3.cxx +++ b/sw/source/ui/wrtsh/wrtsh3.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtsh3.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/wrtsh/wrtsh4.cxx b/sw/source/ui/wrtsh/wrtsh4.cxx index 5180849304..f1c9c63556 100644 --- a/sw/source/ui/wrtsh/wrtsh4.cxx +++ b/sw/source/ui/wrtsh/wrtsh4.cxx @@ -1,14 +1,11 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtsh4.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/source/ui/wrtsh/wrtundo.cxx b/sw/source/ui/wrtsh/wrtundo.cxx index f90dd3606a..7ea609d14e 100644 --- a/sw/source/ui/wrtsh/wrtundo.cxx +++ b/sw/source/ui/wrtsh/wrtundo.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: wrtundo.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/uiconfig/layout/makefile.mk b/sw/uiconfig/layout/makefile.mk index b577653b1f..9437db7a00 100644 --- a/sw/uiconfig/layout/makefile.mk +++ b/sw/uiconfig/layout/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.2 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/util/hidother.hrc b/sw/util/hidother.hrc index 551db97aac..edca337519 100644 --- a/sw/util/hidother.hrc +++ b/sw/util/hidother.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: hidother.hrc,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/util/hidother.src b/sw/util/hidother.src index 3cb7ec3b45..5f992c0872 100644 --- a/sw/util/hidother.src +++ b/sw/util/hidother.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: hidother.src,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk index 08afadc106..b2ccec41c1 100644 --- a/sw/util/makefile.mk +++ b/sw/util/makefile.mk @@ -1,15 +1,11 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.74 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify -- cgit v1.2.3 From c792efbc7b18e1a9c2577e0a429f3082cc312624 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Fri, 12 Feb 2010 16:56:44 +0100 Subject: changefileheader2: #i10000#: convert files with CR/LF characters to CR only --- starmath/source/mathmlexport.cxx | 3084 +++++++++++++++--------------- starmath/source/mathmlexport.hxx | 240 +-- starmath/source/mathmlimport.hxx | 648 +++---- sw/source/core/layout/flowfrm.cxx | 8 +- sw/source/core/txtnode/fmtatr2.cxx | 2 +- sw/source/core/unocore/unocrsrhelper.cxx | 2 +- sw/source/core/view/viewpg.cxx | 6 +- 7 files changed, 1995 insertions(+), 1995 deletions(-) (limited to 'sw/source') diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index f8638c4c05..8188f6dc37 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -1,5 +1,5 @@ -/************************************************************************* - * +/************************************************************************* + * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. @@ -23,1543 +23,1543 @@ * * for a copy of the LGPLv3 License. * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_starmath.hxx" - -/* - Warning: The SvXMLElementExport helper class creates the beginning and - closing tags of xml elements in its constructor and destructor, so theres - hidden stuff going on, on occasion the ordering of these classes declarations - may be significant -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "mathmlexport.hxx" -#include "mathtype.hxx" -#include -#include -#include -#include - -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::container; -using namespace ::com::sun::star::document; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star; -using namespace ::xmloff::token; - -using ::rtl::OUString; -using ::rtl::OUStringBuffer; - -#define EXPORT_SVC_NAME RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.XMLExportFilter") - -#undef WANTEXCEPT - - -//////////////////////////////////////////////////////////// - -sal_Bool SmXMLExportWrapper::Export(SfxMedium &rMedium) -{ - sal_Bool bRet=sal_True; - uno::Reference - xServiceFactory(utl::getProcessServiceFactory()); - DBG_ASSERT(xServiceFactory.is(),"got no service manager"); - - //Get model - uno::Reference< lang::XComponent > xModelComp(xModel, uno::UNO_QUERY ); - - sal_Bool bEmbedded = sal_False; - uno::Reference xTunnel; - xTunnel = uno::Reference (xModel,uno::UNO_QUERY); - SmModel *pModel = reinterpret_cast - (xTunnel->getSomething(SmModel::getUnoTunnelId())); - - SmDocShell *pDocShell = pModel ? - static_cast(pModel->GetObjectShell()) : 0; - if ( pDocShell && - SFX_CREATE_MODE_EMBEDDED == pDocShell->GetCreateMode() ) - bEmbedded = sal_True; - - uno::Reference xStatusIndicator; - if (!bEmbedded) - { - if (pDocShell /*&& pDocShell->GetMedium()*/) - { - DBG_ASSERT( pDocShell->GetMedium() == &rMedium, - "different SfxMedium found" ); - - SfxItemSet* pSet = rMedium.GetItemSet(); - if (pSet) - { - const SfxUnoAnyItem* pItem = static_cast( - pSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL) ); - if (pItem) - pItem->GetValue() >>= xStatusIndicator; - } - } - - // set progress range and start status indicator - if (xStatusIndicator.is()) - { - sal_Int32 nProgressRange = bFlat ? 1 : 3; - xStatusIndicator->start(String(SmResId(STR_STATSTR_WRITING)), - nProgressRange); - } - } - - - // create XPropertySet with three properties for status indicator - comphelper::PropertyMapEntry aInfoMap[] = - { - { "UsePrettyPrinting", sizeof("UsePrettyPrinting")-1, 0, - &::getBooleanCppuType(), - beans::PropertyAttribute::MAYBEVOID, 0}, - { "BaseURI", sizeof("BaseURI")-1, 0, - &::getCppuType( (OUString *)0 ), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { "StreamRelPath", sizeof("StreamRelPath")-1, 0, - &::getCppuType( (OUString *)0 ), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { "StreamName", sizeof("StreamName")-1, 0, - &::getCppuType( (OUString *)0 ), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { NULL, 0, 0, NULL, 0, 0 } - }; - uno::Reference< beans::XPropertySet > xInfoSet( - comphelper::GenericPropertySet_CreateInstance( - new comphelper::PropertySetInfo( aInfoMap ) ) ); - - SvtSaveOptions aSaveOpt; - OUString sUsePrettyPrinting(RTL_CONSTASCII_USTRINGPARAM("UsePrettyPrinting")); - sal_Bool bUsePrettyPrinting( bFlat || aSaveOpt.IsPrettyPrinting() ); - Any aAny; - aAny.setValue( &bUsePrettyPrinting, ::getBooleanCppuType() ); - xInfoSet->setPropertyValue( sUsePrettyPrinting, aAny ); - - // Set base URI - OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("BaseURI") ); - xInfoSet->setPropertyValue( sPropName, makeAny( rMedium.GetBaseURL( true ) ) ); - - sal_Int32 nSteps=0; - if (xStatusIndicator.is()) - xStatusIndicator->setValue(nSteps++); - if (!bFlat) //Storage (Package) of Stream - { - uno::Reference < embed::XStorage > xStg = rMedium.GetOutputStorage(); - sal_Bool bOASIS = ( SotStorage::GetVersion( xStg ) > SOFFICE_FILEFORMAT_60 ); - - // TODO/LATER: handle the case of embedded links gracefully - if ( bEmbedded ) //&& !pStg->IsRoot() ) - { - OUString aName; - if ( rMedium.GetItemSet() ) - { - const SfxStringItem* pDocHierarchItem = static_cast( - rMedium.GetItemSet()->GetItem(SID_DOC_HIERARCHICALNAME) ); - if ( pDocHierarchItem ) - aName = pDocHierarchItem->GetValue(); - } - - if ( aName.getLength() ) - { - sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath")); - xInfoSet->setPropertyValue( sPropName, makeAny( aName ) ); - } - } - - if ( !bEmbedded ) - { - if (xStatusIndicator.is()) - xStatusIndicator->setValue(nSteps++); - - bRet = WriteThroughComponent( - xStg, xModelComp, "meta.xml", xServiceFactory, xInfoSet, - (bOASIS ? "com.sun.star.comp.Math.XMLOasisMetaExporter" - : "com.sun.star.comp.Math.XMLMetaExporter"), - sal_False); - } - if ( bRet ) - { - if (xStatusIndicator.is()) - xStatusIndicator->setValue(nSteps++); - - bRet = WriteThroughComponent( - xStg, xModelComp, "content.xml", xServiceFactory, xInfoSet, - "com.sun.star.comp.Math.XMLContentExporter"); - } - - if ( bRet ) - { - if (xStatusIndicator.is()) - xStatusIndicator->setValue(nSteps++); - - bRet = WriteThroughComponent( - xStg, xModelComp, "settings.xml", xServiceFactory, xInfoSet, - (bOASIS ? "com.sun.star.comp.Math.XMLOasisSettingsExporter" - : "com.sun.star.comp.Math.XMLSettingsExporter") ); - } - } - else - { - SvStream *pStream = rMedium.GetOutStream(); - uno::Reference xOut( - new utl::OOutputStreamWrapper(*pStream) ); - - if (xStatusIndicator.is()) - xStatusIndicator->setValue(nSteps++); - - bRet = WriteThroughComponent( - xOut, xModelComp, xServiceFactory, xInfoSet, - "com.sun.star.comp.Math.XMLContentExporter"); - } - - if (xStatusIndicator.is()) - xStatusIndicator->end(); - - return bRet; -} - - -/// export through an XML exporter component (output stream version) -sal_Bool SmXMLExportWrapper::WriteThroughComponent( - Reference xOutputStream, - Reference xComponent, - Reference & rFactory, - Reference & rPropSet, - const sal_Char* pComponentName ) -{ - DBG_ASSERT(xOutputStream.is(), "I really need an output stream!"); - DBG_ASSERT(xComponent.is(), "Need component!"); - DBG_ASSERT(NULL != pComponentName, "Need component name!"); - - // get component - Reference< io::XActiveDataSource > xSaxWriter( - rFactory->createInstance( - OUString::createFromAscii("com.sun.star.xml.sax.Writer") ), - UNO_QUERY ); - DBG_ASSERT( xSaxWriter.is(), "can't instantiate XML writer" ); - if (!xSaxWriter.is()) - return sal_False; - - // connect XML writer to output stream - xSaxWriter->setOutputStream( xOutputStream ); - - // prepare arguments (prepend doc handler to given arguments) - Reference xDocHandler( xSaxWriter,UNO_QUERY); - - Sequence aArgs( 2 ); - aArgs[0] <<= xDocHandler; - aArgs[1] <<= rPropSet; - - // get filter component - Reference< document::XExporter > xExporter( - rFactory->createInstanceWithArguments( - OUString::createFromAscii(pComponentName), aArgs), UNO_QUERY); - DBG_ASSERT( xExporter.is(), - "can't instantiate export filter component" ); - if ( !xExporter.is() ) - return sal_False; - - - // connect model and filter - xExporter->setSourceDocument( xComponent ); - - // filter! - Reference < XFilter > xFilter( xExporter, UNO_QUERY ); - uno::Sequence< PropertyValue > aProps(0); - xFilter->filter( aProps ); - - uno::Reference xFilterTunnel; - xFilterTunnel = uno::Reference - ( xFilter, uno::UNO_QUERY ); - SmXMLExport *pFilter = reinterpret_cast< SmXMLExport * >( - sal::static_int_cast< sal_uIntPtr >( - xFilterTunnel->getSomething( SmXMLExport::getUnoTunnelId() ))); - return pFilter ? pFilter->GetSuccess() : sal_True; -} - - -/// export through an XML exporter component (storage version) -sal_Bool SmXMLExportWrapper::WriteThroughComponent( - const Reference < embed::XStorage >& xStorage, - Reference xComponent, - const sal_Char* pStreamName, - Reference & rFactory, - Reference & rPropSet, - const sal_Char* pComponentName, - sal_Bool bCompress - ) -{ - DBG_ASSERT(xStorage.is(), "Need storage!"); - DBG_ASSERT(NULL != pStreamName, "Need stream name!"); - - // open stream - Reference < io::XStream > xStream; - OUString sStreamName = OUString::createFromAscii(pStreamName); - try - { - xStream = xStorage->openStreamElement( sStreamName, - embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE ); - } - catch ( uno::Exception& ) - { - DBG_ERROR( "Can't create output stream in package!" ); - return sal_False; - } - - String aPropName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("MediaType") ) ); - OUString aMime( RTL_CONSTASCII_USTRINGPARAM("text/xml") ); - uno::Any aAny; - aAny <<= aMime; - - uno::Reference < beans::XPropertySet > xSet( xStream, uno::UNO_QUERY ); - xSet->setPropertyValue( aPropName, aAny ); - - if ( !bCompress ) - { - aPropName = String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("Compressed") ); - sal_Bool bFalse = sal_False; - aAny.setValue( &bFalse, ::getBooleanCppuType() ); - xSet->setPropertyValue( aPropName, aAny ); - } - - // even plain stream must be encrypted in encrypted document - OUString aTmpPropName( RTL_CONSTASCII_USTRINGPARAM("UseCommonStoragePasswordEncryption") ); - sal_Bool bTrue = sal_True; - aAny.setValue( &bTrue, ::getBooleanCppuType() ); - xSet->setPropertyValue( aTmpPropName, aAny ); - - // set Base URL - if ( rPropSet.is() ) - { - OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("StreamName") ); - rPropSet->setPropertyValue( sPropName, makeAny( sStreamName ) ); - } - - // write the stuff - sal_Bool bRet = WriteThroughComponent( xStream->getOutputStream(), xComponent, rFactory, - rPropSet, pComponentName ); - - // stream is closed by SAX parser - //if ( bRet ) - // xStream->getOutputStream()->closeOutput(); - - return bRet; -} - -//////////////////////////////////////////////////////////// - -// #110680# -SmXMLExport::SmXMLExport( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, - sal_uInt16 nExportFlags) -: SvXMLExport( xServiceFactory, MAP_INCH, XML_MATH, nExportFlags ) , - pTree(0) , - bSuccess(sal_False) -{ -} - -sal_Int64 SAL_CALL SmXMLExport::getSomething( - const uno::Sequence< sal_Int8 >& rId ) -throw(uno::RuntimeException) -{ - if ( rId.getLength() == 16 && - 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16 ) ) - return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_uIntPtr >(this)); - - return SvXMLExport::getSomething( rId ); -} - -const uno::Sequence< sal_Int8 > & SmXMLExport::getUnoTunnelId() throw() -{ - static uno::Sequence< sal_Int8 > * pSeq = 0; - if ( !pSeq ) - { - osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() ); - if ( !pSeq ) - { - static uno::Sequence< sal_Int8 > aSeq( 16 ); - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); - pSeq = &aSeq; - } - } - return *pSeq; -} - -OUString SAL_CALL SmXMLExport_getImplementationName() throw() -{ - return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLExporter" ) ); -} - -uno::Sequence< OUString > SAL_CALL SmXMLExport_getSupportedServiceNames() - throw() -{ - const OUString aServiceName( EXPORT_SVC_NAME ); - const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; -} - -uno::Reference< uno::XInterface > SAL_CALL SmXMLExport_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr) - throw( uno::Exception ) -{ - // #110680# - // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_ALL ); - // EXPORT_OASIS is required here allthough there is no differrence between - // OOo and OASIS, because without the flag, a transformation to OOo would - // be chained in. - return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_OASIS|EXPORT_ALL ); -} - -//////////////////////////////////////////////////////////// - -OUString SAL_CALL SmXMLExportMetaOOO_getImplementationName() throw() -{ - return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLMetaExporter" ) ); -} - -uno::Sequence< OUString > SAL_CALL SmXMLExportMetaOOO_getSupportedServiceNames() - throw() -{ - const OUString aServiceName( EXPORT_SVC_NAME ); - const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; -} - -uno::Reference< uno::XInterface > SAL_CALL SmXMLExportMetaOOO_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr) -throw( uno::Exception ) -{ - // #110680# - // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_META ); - return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_META ); -} - -//////////////////////////////////////////////////////////// - -OUString SAL_CALL SmXMLExportMeta_getImplementationName() throw() -{ - return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLOasisMetaExporter" ) ); -} - -uno::Sequence< OUString > SAL_CALL SmXMLExportMeta_getSupportedServiceNames() -throw() -{ - const OUString aServiceName( EXPORT_SVC_NAME ); - const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; -} - -uno::Reference< uno::XInterface > SAL_CALL SmXMLExportMeta_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr) -throw( uno::Exception ) -{ - // #110680# - // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_META ); - return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_OASIS|EXPORT_META ); -} - -//////////////////////////////////////////////////////////// - -OUString SAL_CALL SmXMLExportSettingsOOO_getImplementationName() throw() -{ - return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLSettingsExporter" ) ); -} - -uno::Sequence< OUString > SAL_CALL SmXMLExportSettingsOOO_getSupportedServiceNames() -throw() -{ - const OUString aServiceName( EXPORT_SVC_NAME ); - const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; -} - -uno::Reference< uno::XInterface > SAL_CALL SmXMLExportSettingsOOO_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr) -throw( uno::Exception ) -{ - // #110680# - // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_SETTINGS ); - return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_SETTINGS ); -} - -//////////////////////////////////////////////////////////// - -OUString SAL_CALL SmXMLExportSettings_getImplementationName() throw() -{ - return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLOasisSettingsExporter" ) ); -} - -uno::Sequence< OUString > SAL_CALL SmXMLExportSettings_getSupportedServiceNames() -throw() -{ - const OUString aServiceName( EXPORT_SVC_NAME ); - const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; -} - -uno::Reference< uno::XInterface > SAL_CALL SmXMLExportSettings_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr) -throw( uno::Exception ) -{ - // #110680# - // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_SETTINGS ); - return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_OASIS|EXPORT_SETTINGS ); -} - -//////////////////////////////////////////////////////////// - -OUString SAL_CALL SmXMLExportContent_getImplementationName() throw() -{ - return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLContentExporter" ) ); -} - -uno::Sequence< OUString > SAL_CALL SmXMLExportContent_getSupportedServiceNames() - throw() -{ - const OUString aServiceName( EXPORT_SVC_NAME ); - const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; -} - -uno::Reference< uno::XInterface > SAL_CALL SmXMLExportContent_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr) -throw( uno::Exception ) -{ - // #110680# - // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_CONTENT ); - // The EXPORT_OASIS flag is only required to avoid that a transformer is - // chanied in - return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_OASIS|EXPORT_CONTENT ); -} - -//////////////////////////////////////////////////////////// - -// XServiceInfo -// override empty method from parent class -rtl::OUString SAL_CALL SmXMLExport::getImplementationName() -throw(uno::RuntimeException) -{ - OUString aTxt; - switch( getExportFlags() ) - { - case EXPORT_META: - aTxt = SmXMLExportMeta_getImplementationName(); - break; - case EXPORT_SETTINGS: - aTxt = SmXMLExportSettings_getImplementationName(); - break; - case EXPORT_CONTENT: - aTxt = SmXMLExportContent_getImplementationName(); - break; - case EXPORT_ALL: - default: - aTxt = SmXMLExport_getImplementationName(); - break; - } - return aTxt; -} - -sal_uInt32 SmXMLExport::exportDoc(enum XMLTokenEnum eClass) -{ - if ( (getExportFlags() & EXPORT_CONTENT) == 0 ) - { - SvXMLExport::exportDoc( eClass ); - } - else - { - uno::Reference xModel = GetModel(); - uno::Reference xTunnel; - xTunnel = uno::Reference (xModel,uno::UNO_QUERY); - SmModel *pModel = reinterpret_cast - (xTunnel->getSomething(SmModel::getUnoTunnelId())); - - if (pModel) - { - SmDocShell *pDocShell = - static_cast(pModel->GetObjectShell()); - pTree = pDocShell->GetFormulaTree(); - aText = pDocShell->GetText(); - } - - GetDocHandler()->startDocument(); - - /*Add xmlns line*/ - SvXMLAttributeList &rList = GetAttrList(); - - // make use of a default namespace - ResetNamespaceMap(); // Math doesn't need namespaces from xmloff, since it now uses default namespaces (because that is common with current MathML usage in the web) - _GetNamespaceMap().Add( OUString::createFromAscii(""), GetXMLToken(XML_N_MATH), XML_NAMESPACE_MATH ); - - rList.AddAttribute(GetNamespaceMap().GetAttrNameByKey(XML_NAMESPACE_MATH_IDX), - GetNamespaceMap().GetNameByKey( XML_NAMESPACE_MATH_IDX)); - - //I think we need something like ImplExportEntities(); - _ExportContent(); - GetDocHandler()->endDocument(); - } - - bSuccess=sal_True; - return 0; -} - -void SmXMLExport::_ExportContent() -{ - SvXMLElementExport aEquation(*this, XML_NAMESPACE_MATH, XML_MATH, sal_True, sal_True); - SvXMLElementExport *pSemantics=0; - - if (aText.Len()) - { - pSemantics = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, - XML_SEMANTICS, sal_True, sal_True); - } - - ExportNodes(pTree, 0); - - if (aText.Len()) - { - // Convert symbol names - uno::Reference xModel = GetModel(); - uno::Reference xTunnel; - xTunnel = uno::Reference (xModel,uno::UNO_QUERY); - SmModel *pModel = reinterpret_cast - (xTunnel->getSomething(SmModel::getUnoTunnelId())); - SmDocShell *pDocShell = pModel ? - static_cast(pModel->GetObjectShell()) : 0; - DBG_ASSERT( pDocShell, "doc shell missing" ); - if (pDocShell) - { - SmParser &rParser = pDocShell->GetParser(); - BOOL bVal = rParser.IsExportSymbolNames(); - rParser.SetExportSymbolNames( TRUE ); - SmNode *pTmpTree = rParser.Parse( aText ); - aText = rParser.GetText(); - delete pTmpTree; - rParser.SetExportSymbolNames( bVal ); - } - - AddAttribute(XML_NAMESPACE_MATH, XML_ENCODING, - OUString(RTL_CONSTASCII_USTRINGPARAM("StarMath 5.0"))); - SvXMLElementExport aAnnotation(*this, XML_NAMESPACE_MATH, - XML_ANNOTATION, sal_True, sal_False); - GetDocHandler()->characters(OUString( aText )); - } - delete pSemantics; -} - -void SmXMLExport::GetViewSettings( Sequence < PropertyValue >& aProps) -{ - uno::Reference xModel = GetModel(); - if ( !xModel.is() ) - return; - - uno::Reference xTunnel; - xTunnel = uno::Reference (xModel,uno::UNO_QUERY); - SmModel *pModel = reinterpret_cast - (xTunnel->getSomething(SmModel::getUnoTunnelId())); - - if ( !pModel ) - return; - - SmDocShell *pDocShell = - static_cast(pModel->GetObjectShell()); - if ( !pDocShell ) - return; - - aProps.realloc( 4 ); - PropertyValue *pValue = aProps.getArray(); - sal_Int32 nIndex = 0; - - Rectangle aRect( pDocShell->GetVisArea() ); - - pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaTop") ); - pValue[nIndex++].Value <<= aRect.Top(); - - pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaLeft") ); - pValue[nIndex++].Value <<= aRect.Left(); - - pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaWidth") ); - pValue[nIndex++].Value <<= aRect.GetWidth(); - - pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaHeight") ); - pValue[nIndex++].Value <<= aRect.GetHeight(); -} - -void SmXMLExport::GetConfigurationSettings( Sequence < PropertyValue > & rProps) -{ - Reference < XPropertySet > xProps ( GetModel(), UNO_QUERY ); - if ( xProps.is() ) - { - Reference< XPropertySetInfo > xPropertySetInfo = xProps->getPropertySetInfo(); - if (xPropertySetInfo.is()) - { - Sequence< Property > aProps = xPropertySetInfo->getProperties(); - sal_Int32 nCount(aProps.getLength()); - if (nCount > 0) - { - rProps.realloc(nCount); - PropertyValue* pProps = rProps.getArray(); - if (pProps) - { - const OUString sFormula ( RTL_CONSTASCII_USTRINGPARAM ( "Formula" ) ); - const OUString sBasicLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "BasicLibraries" ) ); - const OUString sDialogLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "DialogLibraries" ) ); - const OUString sRuntimeUID ( RTL_CONSTASCII_USTRINGPARAM ( "RuntimeUID" ) ); - for (sal_Int32 i = 0; i < nCount; i++, pProps++) - { - const OUString &rPropName = aProps[i].Name; - if (rPropName != sFormula && - rPropName != sBasicLibraries && - rPropName != sDialogLibraries && - rPropName != sRuntimeUID) - { - pProps->Name = rPropName; - pProps->Value = xProps->getPropertyValue(rPropName); - } - } - } - } - } - } -} - -void SmXMLExport::ExportLine(const SmNode *pNode, int nLevel) -{ - ExportExpression(pNode, nLevel); -} - -void SmXMLExport::ExportBinaryHorizontal(const SmNode *pNode, int nLevel) -{ - ExportExpression(pNode, nLevel); -} - -void SmXMLExport::ExportUnaryHorizontal(const SmNode *pNode, int nLevel) -{ - ExportExpression(pNode, nLevel); -} - -void SmXMLExport::ExportExpression(const SmNode *pNode, int nLevel) -{ - SvXMLElementExport *pRow=0; - ULONG nSize = pNode->GetNumSubNodes(); - - if (nSize > 1) - pRow = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MROW, sal_True, sal_True); - - //if (nSize) - //{ - for (USHORT i = 0; i < nSize; i++) - if (const SmNode *pTemp = pNode->GetSubNode(i)) - ExportNodes(pTemp, nLevel+1); - //} -#if 0 - else - { - //This saves us from situations like "a newline" where the - //lack of a term following the newline would otherwise create - //a incorrect token like - SvXMLElementExport aDummy(*this, XML_NAMESPACE_MATH, XML_MI, sal_True, sal_False); - sal_Unicode nArse[2] = {'\n','\0'}; - GetDocHandler()->characters(nArse); - } -#endif - - delete pRow; -} - -void SmXMLExport::ExportBinaryVertical(const SmNode *pNode, int nLevel) -{ - DBG_ASSERT(pNode->GetNumSubNodes()==3,"Bad Fraction"); - SvXMLElementExport aFraction(*this, XML_NAMESPACE_MATH, XML_MFRAC, sal_True, sal_True); - ExportNodes(pNode->GetSubNode(0), nLevel); - ExportNodes(pNode->GetSubNode(2), nLevel); -} - -void SmXMLExport::ExportTable(const SmNode *pNode, int nLevel) -{ - SvXMLElementExport *pTable=0; - - USHORT nSize = pNode->GetNumSubNodes(); - - //If the list ends in newline then the last entry has - //no subnodes, the newline is superfulous so we just drop - //the last node, inclusion would create a bad MathML - //table - if (nSize >= 1 && pNode->GetSubNode(nSize-1)->GetNumSubNodes() == 0) - --nSize; - - // try to avoid creating a mtable element when the formula consists only - // of a single output line - if (nLevel || (nSize >1)) - pTable = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MTABLE, sal_True, sal_True); - - for (USHORT i = 0; i < nSize; i++) - if (const SmNode *pTemp = pNode->GetSubNode(i)) - { - SvXMLElementExport *pRow=0; - SvXMLElementExport *pCell=0; - if (pTable) - { - pRow = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MTR, sal_True, sal_True); - pCell = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MTD, sal_True, sal_True); - } - ExportNodes(pTemp, nLevel+1); - delete pCell; - delete pRow; - } - - delete pTable; -} - -void SmXMLExport::ExportMath(const SmNode *pNode, int /*nLevel*/) -{ - const SmMathSymbolNode *pTemp = static_cast(pNode); - SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO, sal_True, sal_False); - sal_Unicode nArse[2]; - nArse[0] = pTemp->GetText().GetChar(0); - sal_Unicode cTmp = ConvertMathToMathML( nArse[0] ); - if (cTmp != 0) - nArse[0] = cTmp; - DBG_ASSERT(nArse[0] != 0xffff,"Non existant symbol"); - nArse[1] = 0; - GetDocHandler()->characters(nArse); -} - -void SmXMLExport::ExportText(const SmNode *pNode, int /*nLevel*/) -{ - SvXMLElementExport *pText; - const SmTextNode *pTemp = static_cast(pNode); - switch (pNode->GetToken().eType) - { - default: - case TIDENT: - { - //Note that we change the fontstyle to italic for strings that - //are italic and longer than a single character. - sal_Bool bIsItalic = IsItalic( pTemp->GetFont() ); - if ((pTemp->GetText().Len() > 1) && bIsItalic) - AddAttribute(XML_NAMESPACE_MATH, XML_MATHVARIANT, XML_ITALIC); - else if ((pTemp->GetText().Len() == 1) && !bIsItalic) - AddAttribute(XML_NAMESPACE_MATH, XML_MATHVARIANT, XML_NORMAL); - pText = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MI,sal_True,sal_False); - break; - } - case TNUMBER: - pText = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MN,sal_True,sal_False); - break; - case TTEXT: - pText = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MTEXT,sal_True,sal_False); - break; - } - GetDocHandler()->characters(OUString(pTemp->GetText().GetBuffer())); - delete pText; -} - -void SmXMLExport::ExportBlank(const SmNode * /*pNode*/, int /*nLevel*/) -{ - //!! exports an empty tag since for example "~_~" is allowed in - //!! Math (so it has no sense at all) but must not result in an empty - //!! tag in MathML !! - - SvXMLElementExport *pText; - //const SmBlankNode *pTemp = static_cast(pNode); - - pText = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MI, sal_True, sal_False); - - GetDocHandler()->characters( OUString() ); - delete pText; -} - -void SmXMLExport::ExportSubSupScript(const SmNode *pNode, int nLevel) -{ - const SmNode *pSub = 0; - const SmNode *pSup = 0; - const SmNode *pCSub = 0; - const SmNode *pCSup = 0; - const SmNode *pLSub = 0; - const SmNode *pLSup = 0; - SvXMLElementExport *pThing = 0, *pThing2 = 0; - - //if we have prescripts at all then we must use the tensor notation - - //This is one of those excellent locations where scope is vital to - //arrange the construction and destruction of the element helper - //classes correctly - pLSub = pNode->GetSubNode(LSUB+1); - pLSup = pNode->GetSubNode(LSUP+1); - if (pLSub || pLSup) - { - SvXMLElementExport aMultiScripts(*this, XML_NAMESPACE_MATH, - XML_MMULTISCRIPTS, sal_True, sal_True); - - - if (NULL != (pCSub = pNode->GetSubNode(CSUB+1)) - && NULL != (pCSup = pNode->GetSubNode(CSUP+1))) - { - pThing2 = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, - XML_MUNDEROVER, sal_True,sal_True); - } - else if (NULL != (pCSub = pNode->GetSubNode(CSUB+1))) - { - pThing2 = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, - XML_MUNDER, sal_True,sal_True); - } - else if (NULL != (pCSup = pNode->GetSubNode(CSUP+1))) - { - pThing2 = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, - XML_MOVER, sal_True,sal_True); - } - - ExportNodes(pNode->GetSubNode(0), nLevel+1); //Main Term - - if (pCSub) - ExportNodes(pCSub, nLevel+1); - if (pCSup) - ExportNodes(pCSup, nLevel+1); - delete pThing2; - - pSub = pNode->GetSubNode(RSUB+1); - pSup = pNode->GetSubNode(RSUP+1); - if (pSub || pSup) - { - if (pSub) - ExportNodes(pSub, nLevel+1); - else - { - SvXMLElementExport aNone(*this, XML_NAMESPACE_MATH, XML_NONE,sal_True,sal_True); - } - if (pSup) - ExportNodes(pSup, nLevel+1); - else - { - SvXMLElementExport aNone(*this, XML_NAMESPACE_MATH, XML_NONE,sal_True,sal_True); - } - } - - //Seperator element between suffix and prefix sub/sup pairs - { - SvXMLElementExport aPrescripts(*this, XML_NAMESPACE_MATH, - XML_MPRESCRIPTS, sal_True,sal_True); - } - - if (pLSub) - ExportNodes(pLSub, nLevel+1); - else - { - SvXMLElementExport aNone(*this, XML_NAMESPACE_MATH, XML_NONE, - sal_True,sal_True); - - } - if (pLSup) - ExportNodes(pLSup, nLevel+1); - else - { - SvXMLElementExport aNone(*this, XML_NAMESPACE_MATH, XML_NONE, - sal_True,sal_True); - - } - } - else - { - if (NULL != (pSub = pNode->GetSubNode(RSUB+1)) && - NULL != (pSup = pNode->GetSubNode(RSUP+1))) - { - pThing = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, - XML_MSUBSUP, sal_True,sal_True); - } - else if (NULL != (pSub = pNode->GetSubNode(RSUB+1))) - { - pThing = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MSUB, - sal_True,sal_True); - } - else if (NULL != (pSup = pNode->GetSubNode(RSUP+1))) - { - pThing = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MSUP, - sal_True,sal_True); - } - - if (NULL != (pCSub = pNode->GetSubNode(CSUB+1)) - && NULL != (pCSup=pNode->GetSubNode(CSUP+1))) - { - pThing2 = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, - XML_MUNDEROVER, sal_True,sal_True); - } - else if (NULL != (pCSub = pNode->GetSubNode(CSUB+1))) - { - pThing2 = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, - XML_MUNDER, sal_True,sal_True); - } - else if (NULL != (pCSup = pNode->GetSubNode(CSUP+1))) - { - pThing2 = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, - XML_MOVER, sal_True,sal_True); - } - ExportNodes(pNode->GetSubNode(0), nLevel+1); //Main Term - - if (pCSub) - ExportNodes(pCSub, nLevel+1); - if (pCSup) - ExportNodes(pCSup, nLevel+1); - delete pThing2; - - if (pSub) - ExportNodes(pSub, nLevel+1); - if (pSup) - ExportNodes(pSup, nLevel+1); - delete pThing; - } -} - -void SmXMLExport::ExportBrace(const SmNode *pNode, int nLevel) -{ - const SmNode *pTemp; - const SmNode *pLeft=pNode->GetSubNode(0); - const SmNode *pRight=pNode->GetSubNode(2); - SvXMLElementExport *pFences=0,*pRow=0; - if ( ((pLeft) && (pLeft->GetToken().eType != TNONE)) && - ((pRight) && (pRight->GetToken().eType != TNONE)) && - (pNode->GetScaleMode() == SCALE_HEIGHT)) - { - sal_Unicode nArse[2]; - nArse[1] = 0; - nArse[0] = static_cast< - const SmMathSymbolNode* >(pLeft)->GetText().GetChar(0); - DBG_ASSERT(nArse[0] != 0xffff,"Non existant symbol"); - AddAttribute(XML_NAMESPACE_MATH, XML_OPEN,nArse); - nArse[0] = static_cast< - const SmMathSymbolNode* >(pRight)->GetText().GetChar(0); - DBG_ASSERT(nArse[0] != 0xffff,"Non existant symbol"); - AddAttribute(XML_NAMESPACE_MATH, XML_CLOSE,nArse); - pFences = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MFENCED, - sal_True,sal_True); - } - else if (pLeft && (pLeft->GetToken().eType != TNONE)) - { - pRow = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MROW, - sal_True, sal_True); - if (pNode->GetScaleMode() == SCALE_HEIGHT) - AddAttribute(XML_NAMESPACE_MATH, XML_STRETCHY, XML_TRUE); - else - AddAttribute(XML_NAMESPACE_MATH, XML_STRETCHY, XML_FALSE); - ExportNodes(pLeft, nLevel+1); - } - else - pRow = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MROW, - sal_True, sal_True); - - if (NULL != (pTemp = pNode->GetSubNode(1))) - ExportNodes(pTemp, nLevel+1); - if (pFences) - delete pFences; - else if (pRight && (pRight->GetToken().eType != TNONE)) - { - if (pNode->GetScaleMode() == SCALE_HEIGHT) - AddAttribute(XML_NAMESPACE_MATH, XML_STRETCHY, XML_TRUE); - else - AddAttribute(XML_NAMESPACE_MATH, XML_STRETCHY, XML_FALSE); - ExportNodes(pRight, nLevel+1); - } - delete pRow; -} - -void SmXMLExport::ExportRoot(const SmNode *pNode, int nLevel) -{ - if (pNode->GetSubNode(0)) - { - SvXMLElementExport aRoot(*this, XML_NAMESPACE_MATH, XML_MROOT,sal_True, - sal_True); - ExportNodes(pNode->GetSubNode(2), nLevel+1); - ExportNodes(pNode->GetSubNode(0), nLevel+1); - } - else - { - SvXMLElementExport aSqrt(*this, XML_NAMESPACE_MATH, XML_MSQRT,sal_True, - sal_True); - ExportNodes(pNode->GetSubNode(2), nLevel+1); - } -} - -void SmXMLExport::ExportOperator(const SmNode *pNode, int nLevel) -{ - /*we need to either use content or font and size attributes - *here*/ -#if 0 - { - SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO, - sal_True,sal_False); - SmTextNode *pTemp = (SmTextNode *)pNode->GetSubNode(0); - GetDocHandler()->characters(pTemp->GetText()); - } -#endif - SvXMLElementExport aRow(*this, XML_NAMESPACE_MATH, XML_MROW, - sal_True, sal_True); - ExportNodes(pNode->GetSubNode(0), nLevel+1); - ExportNodes(pNode->GetSubNode(1), nLevel+1); -} - -void SmXMLExport::ExportAttributes(const SmNode *pNode, int nLevel) -{ - SvXMLElementExport *pElement=0; - - if (pNode->GetToken().eType == TUNDERLINE) - { - AddAttribute(XML_NAMESPACE_MATH, XML_ACCENTUNDER, - XML_TRUE); - pElement = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MUNDER, - sal_True,sal_True); - } - else if (pNode->GetToken().eType != TOVERSTRIKE) - { - AddAttribute(XML_NAMESPACE_MATH, XML_ACCENT, - XML_TRUE); - pElement = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MOVER, - sal_True,sal_True); - } - - ExportNodes(pNode->GetSubNode(1), nLevel+1); - switch (pNode->GetToken().eType) - { - case TOVERLINE: - { - //proper entity support required - SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO, - sal_True,sal_True); -#if 0 - GetDocHandler()->characters( - OUString(RTL_CONSTASCII_USTRINGPARAM("&overbar;"))); -#else - sal_Unicode nArse[2] = {0xAF,0x00}; -#endif - GetDocHandler()->characters(nArse); - } - break; - case TUNDERLINE: - { - //proper entity support required - SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO, - sal_True,sal_True); -#if 0 - GetDocHandler()->characters( - OUString(RTL_CONSTASCII_USTRINGPARAM("&underbar;"))); -#else - sal_Unicode nArse[2] = {0x0332,0x00}; -#endif - GetDocHandler()->characters(nArse); - } - break; - case TOVERSTRIKE: - break; - default: - ExportNodes(pNode->GetSubNode(0), nLevel+1); - break; - } - delete pElement; -} - -static bool lcl_HasEffectOnMathvariant( const SmTokenType eType ) -{ - return eType == TBOLD || eType == TNBOLD || - eType == TITALIC || eType == TNBOLD || - eType == TSANS || eType == TSERIF || eType == TFIXED; -} - -void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel) -{ - SvXMLElementExport *pElement = 0; - - // - // gather the mathvariant attribut relevant data from all - // successively following SmFontNodes... - // - int nBold = -1; // for the following variables: -1 = yet undefined; 0 = false; 1 = true; - int nItalic = -1; // for the following variables: -1 = yet undefined; 0 = false; 1 = true; - int nSansSerifFixed = -1; - SmTokenType eNodeType = TUNKNOWN; - while (lcl_HasEffectOnMathvariant( (eNodeType = pNode->GetToken().eType) )) - { - switch (eNodeType) - { - case TBOLD : nBold = 1; break; - case TNBOLD : nBold = 0; break; - case TITALIC : nItalic = 1; break; - case TNITALIC : nItalic = 0; break; - case TSANS : nSansSerifFixed = 0; break; - case TSERIF : nSansSerifFixed = 1; break; - case TFIXED : nSansSerifFixed = 2; break; - default: - DBG_ASSERT( 0, "unexpected case" ); - } - // According to the parser every node that is to be evaluated heres - // has a single non-zero subnode at index 1!! Thus we only need to check - // that single node for follow-up nodes that have an effect on the attribute. - if (pNode->GetNumSubNodes() > 1 && pNode->GetSubNode(1) && - lcl_HasEffectOnMathvariant( pNode->GetSubNode(1)->GetToken().eType)) - { - pNode = pNode->GetSubNode(1); - } - else - break; - } - - switch (pNode->GetToken().eType) - { - //wrap a phantom element around everything*/ - case TPHANTOM: - pElement = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, - XML_MPHANTOM, sal_True,sal_True); - break; - case TBLACK: - AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_BLACK); - break; - case TWHITE: - AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_WHITE); - break; - case TRED: - AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_RED); - break; - case TGREEN: - AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_GREEN); - break; - case TBLUE: - AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_BLUE); - break; - case TCYAN: - AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_AQUA); - break; - case TMAGENTA: - AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_FUCHSIA); - break; - case TYELLOW: - AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_YELLOW); - break; - case TSIZE: - { - const SmFontNode *pFontNode = static_cast(pNode); - const Fraction &aFrac = pFontNode->GetSizeParameter(); - - OUStringBuffer sStrBuf; - switch(pFontNode->GetSizeType()) - { - case FNTSIZ_MULTIPLY: - SvXMLUnitConverter::convertDouble(sStrBuf, - static_cast(aFrac*Fraction(100.00))); - sStrBuf.append(static_cast('%')); - break; - case FNTSIZ_DIVIDE: - SvXMLUnitConverter::convertDouble(sStrBuf, - static_cast(Fraction(100.00)/aFrac)); - sStrBuf.append(static_cast('%')); - break; - case FNTSIZ_ABSOLUT: - SvXMLUnitConverter::convertDouble(sStrBuf, - static_cast(aFrac)); - sStrBuf.append( - GetXMLToken(XML_UNIT_PT)); - break; - default: - { - //The problem here is that the wheels fall off because - //font size is stored in 100th's of a mm not pts, and - //rounding errors take their toll on the original - //value specified in points. - - //Must fix StarMath to retain the original pt values - Fraction aTemp = Sm100th_mmToPts(pFontNode->GetFont(). - GetSize().Height()); - - if (pFontNode->GetSizeType() == FNTSIZ_MINUS) - aTemp-=aFrac; - else - aTemp+=aFrac; - - double mytest = static_cast(aTemp); - - mytest = ::rtl::math::round(mytest,1); - SvXMLUnitConverter::convertDouble(sStrBuf,mytest); - sStrBuf.append(GetXMLToken(XML_UNIT_PT)); - } - break; - } - - OUString sStr(sStrBuf.makeStringAndClear()); - AddAttribute(XML_NAMESPACE_MATH, XML_MATHSIZE, sStr); - } - break; - case TBOLD: - case TITALIC: - case TNBOLD: - case TNITALIC: - case TFIXED: - case TSANS: - case TSERIF: - { - // nBold: -1 = yet undefined; 0 = false; 1 = true; - // nItalic: -1 = yet undefined; 0 = false; 1 = true; - // nSansSerifFixed: -1 = undefined; 0 = sans; 1 = serif; 2 = fixed; - const sal_Char *pText = "normal"; - if (nSansSerifFixed == -1 || nSansSerifFixed == 1) - { - pText = "normal"; - if (nBold == 1 && nItalic != 1) - pText = "bold"; - else if (nBold != 1 && nItalic == 1) - pText = "italic"; - else if (nBold == 1 && nItalic == 1) - pText = "bold-italic"; - } - else if (nSansSerifFixed == 0) - { - pText = "sans-serif"; - if (nBold == 1 && nItalic != 1) - pText = "bold-sans-serif"; - else if (nBold != 1 && nItalic == 1) - pText = "sans-serif-italic"; - else if (nBold == 1 && nItalic == 1) - pText = "sans-serif-bold-italic"; - } - else if (nSansSerifFixed == 2) - pText = "monospace"; // no modifiers allowed for monospace ... - else - { - DBG_ASSERT( 0, "unexpected case" ); - } - AddAttribute(XML_NAMESPACE_MATH, XML_MATHVARIANT, A2OU(pText)); - } - break; - default: - break; - - } -#if 0 - if (pNode->GetNumSubNodes() > 1) //or in the future is a node that - //cannot take the currently supported - //properties -#endif - //for now we will just always export with a style and not worry about - //anyone else for the moment. - { - //wrap a style around it - SvXMLElementExport aStyle(*this, XML_NAMESPACE_MATH, XML_MSTYLE, sal_True,sal_True); - ExportExpression(pNode, nLevel); - } -#if 0 - else - ExportNodes(pNode->GetSubNode(0), nLevel+1); -#endif - - delete pElement; -} - - -void SmXMLExport::ExportVerticalBrace(const SmNode *pNode, int nLevel) -{ - //Place the overbrace value OVER a vertical brace and then place that - //expression OVER the overbrace value, If someone can find a - //dedicated term in MathML to handle this overbrace/underbrace concept - //let me know. C. - XMLTokenEnum which; - - switch (pNode->GetToken().eType) - { - case TOVERBRACE: - default: - which = XML_MOVER; - break; - case TUNDERBRACE: - which = XML_MUNDER; - break; - } - - DBG_ASSERT(pNode->GetNumSubNodes()==3,"Bad Vertical Brace"); - SvXMLElementExport aOver1(*this, XML_NAMESPACE_MATH,which, sal_True, sal_True); - {//Scoping - // using accents will draw the over-/underbraces too close to the base - // see http://www.w3.org/TR/MathML2/chapter3.html#id.3.4.5.2 - // also XML_ACCENT is illegal with XML_MUNDER. Thus no XML_ACCENT attribut here! -// AddAttribute(XML_NAMESPACE_MATH, XML_ACCENT, XML_TRUE); - SvXMLElementExport aOver2(*this, XML_NAMESPACE_MATH,which, sal_True, sal_True); - ExportNodes(pNode->GetSubNode(0), nLevel); - ExportNodes(pNode->GetSubNode(1), nLevel); - } - ExportNodes(pNode->GetSubNode(2), nLevel); -} - -void SmXMLExport::ExportMatrix(const SmNode *pNode, int nLevel) -{ - SvXMLElementExport aTable(*this, XML_NAMESPACE_MATH, XML_MTABLE, sal_True, sal_True); - const SmMatrixNode *pMatrix = static_cast(pNode); - USHORT i=0; - for (ULONG y = 0; y < pMatrix->GetNumRows(); y++) - { - SvXMLElementExport aRow(*this, XML_NAMESPACE_MATH, XML_MTR, sal_True, sal_True); - for (ULONG x = 0; x < pMatrix->GetNumCols(); x++) - if (const SmNode *pTemp = pNode->GetSubNode(i++)) - { - SvXMLElementExport aCell(*this, XML_NAMESPACE_MATH, XML_MTD, sal_True, sal_True); - ExportNodes(pTemp, nLevel+1); - } - } -} - -void SmXMLExport::ExportNodes(const SmNode *pNode, int nLevel) -{ - if (!pNode) - return; - switch(pNode->GetType()) - { - case NTABLE: - ExportTable(pNode, nLevel); - break; - case NALIGN: - case NBRACEBODY: - case NEXPRESSION: - ExportExpression(pNode, nLevel); - break; - case NLINE: - ExportLine(pNode, nLevel); - break; - case NTEXT: - ExportText(pNode, nLevel); - break; - case NSPECIAL: //NSPECIAL requires some sort of Entity preservation in the XML engine. - case NGLYPH_SPECIAL: - case NMATH: - { - sal_Unicode cTmp = 0; - const SmTextNode *pTemp = static_cast< const SmTextNode * >(pNode); - if (pTemp->GetText().Len() > 0) - cTmp = ConvertMathToMathML( pTemp->GetText().GetChar(0) ); - if (cTmp == 0) - { - // no conversion to MathML implemented -> export it as text - // thus at least it will not vanish into nothing - ExportText(pNode, nLevel); - } - else - { - //To fully handle generic MathML we need to implement the full - //operator dictionary, we will generate MathML with explicit - //stretchiness for now. - sal_Int16 nLength = GetAttrList().getLength(); - sal_Bool bAddStretch=sal_True; - for ( sal_Int16 i = 0; i < nLength; i++ ) - { - OUString sLocalName; - sal_uInt16 nPrefix = GetNamespaceMap().GetKeyByAttrName( - GetAttrList().getNameByIndex(i), &sLocalName ); - - if ( ( XML_NAMESPACE_MATH == nPrefix ) && - IsXMLToken(sLocalName, XML_STRETCHY) ) - { - bAddStretch = sal_False; - break; - } - } - if (bAddStretch) - { - AddAttribute(XML_NAMESPACE_MATH, XML_STRETCHY, XML_FALSE); - } - ExportMath(pNode, nLevel); - } - } - break; - case NPLACE: - ExportMath(pNode, nLevel); - break; - case NBINHOR: - ExportBinaryHorizontal(pNode, nLevel); - break; - case NUNHOR: - ExportUnaryHorizontal(pNode, nLevel); - break; - case NBRACE: - ExportBrace(pNode, nLevel); - break; - case NBINVER: - ExportBinaryVertical(pNode, nLevel); - break; - case NSUBSUP: - ExportSubSupScript(pNode, nLevel); - break; - case NROOT: - ExportRoot(pNode, nLevel); - break; - case NOPER: - ExportOperator(pNode, nLevel); - break; - case NATTRIBUT: - ExportAttributes(pNode, nLevel); - break; - case NFONT: - ExportFont(pNode, nLevel); - break; - case NVERTICAL_BRACE: - ExportVerticalBrace(pNode, nLevel); - break; - case NMATRIX: - ExportMatrix(pNode, nLevel); - break; - case NBLANK: - ExportBlank(pNode, nLevel); - break; - default: - DBG_ASSERT( 0, "Warning: failed to export a node?" ); - break; - -#if 0 - default: - { - ULONG nSize = pNode->GetNumSubNodes(); - for (ULONG i = 0; i < nSize; i++) - if (SmNode *pTemp = pNode->GetSubNode(i)) - ExportNodes(pTemp, nLevel+1); - } - break; -#endif - } -} - -//////////////////////////////////////////////////////////// - + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_starmath.hxx" + +/* + Warning: The SvXMLElementExport helper class creates the beginning and + closing tags of xml elements in its constructor and destructor, so theres + hidden stuff going on, on occasion the ordering of these classes declarations + may be significant +*/ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "mathmlexport.hxx" +#include "mathtype.hxx" +#include +#include +#include +#include + +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::container; +using namespace ::com::sun::star::document; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star; +using namespace ::xmloff::token; + +using ::rtl::OUString; +using ::rtl::OUStringBuffer; + +#define EXPORT_SVC_NAME RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.XMLExportFilter") + +#undef WANTEXCEPT + + +//////////////////////////////////////////////////////////// + +sal_Bool SmXMLExportWrapper::Export(SfxMedium &rMedium) +{ + sal_Bool bRet=sal_True; + uno::Reference + xServiceFactory(utl::getProcessServiceFactory()); + DBG_ASSERT(xServiceFactory.is(),"got no service manager"); + + //Get model + uno::Reference< lang::XComponent > xModelComp(xModel, uno::UNO_QUERY ); + + sal_Bool bEmbedded = sal_False; + uno::Reference xTunnel; + xTunnel = uno::Reference (xModel,uno::UNO_QUERY); + SmModel *pModel = reinterpret_cast + (xTunnel->getSomething(SmModel::getUnoTunnelId())); + + SmDocShell *pDocShell = pModel ? + static_cast(pModel->GetObjectShell()) : 0; + if ( pDocShell && + SFX_CREATE_MODE_EMBEDDED == pDocShell->GetCreateMode() ) + bEmbedded = sal_True; + + uno::Reference xStatusIndicator; + if (!bEmbedded) + { + if (pDocShell /*&& pDocShell->GetMedium()*/) + { + DBG_ASSERT( pDocShell->GetMedium() == &rMedium, + "different SfxMedium found" ); + + SfxItemSet* pSet = rMedium.GetItemSet(); + if (pSet) + { + const SfxUnoAnyItem* pItem = static_cast( + pSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL) ); + if (pItem) + pItem->GetValue() >>= xStatusIndicator; + } + } + + // set progress range and start status indicator + if (xStatusIndicator.is()) + { + sal_Int32 nProgressRange = bFlat ? 1 : 3; + xStatusIndicator->start(String(SmResId(STR_STATSTR_WRITING)), + nProgressRange); + } + } + + + // create XPropertySet with three properties for status indicator + comphelper::PropertyMapEntry aInfoMap[] = + { + { "UsePrettyPrinting", sizeof("UsePrettyPrinting")-1, 0, + &::getBooleanCppuType(), + beans::PropertyAttribute::MAYBEVOID, 0}, + { "BaseURI", sizeof("BaseURI")-1, 0, + &::getCppuType( (OUString *)0 ), + beans::PropertyAttribute::MAYBEVOID, 0 }, + { "StreamRelPath", sizeof("StreamRelPath")-1, 0, + &::getCppuType( (OUString *)0 ), + beans::PropertyAttribute::MAYBEVOID, 0 }, + { "StreamName", sizeof("StreamName")-1, 0, + &::getCppuType( (OUString *)0 ), + beans::PropertyAttribute::MAYBEVOID, 0 }, + { NULL, 0, 0, NULL, 0, 0 } + }; + uno::Reference< beans::XPropertySet > xInfoSet( + comphelper::GenericPropertySet_CreateInstance( + new comphelper::PropertySetInfo( aInfoMap ) ) ); + + SvtSaveOptions aSaveOpt; + OUString sUsePrettyPrinting(RTL_CONSTASCII_USTRINGPARAM("UsePrettyPrinting")); + sal_Bool bUsePrettyPrinting( bFlat || aSaveOpt.IsPrettyPrinting() ); + Any aAny; + aAny.setValue( &bUsePrettyPrinting, ::getBooleanCppuType() ); + xInfoSet->setPropertyValue( sUsePrettyPrinting, aAny ); + + // Set base URI + OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("BaseURI") ); + xInfoSet->setPropertyValue( sPropName, makeAny( rMedium.GetBaseURL( true ) ) ); + + sal_Int32 nSteps=0; + if (xStatusIndicator.is()) + xStatusIndicator->setValue(nSteps++); + if (!bFlat) //Storage (Package) of Stream + { + uno::Reference < embed::XStorage > xStg = rMedium.GetOutputStorage(); + sal_Bool bOASIS = ( SotStorage::GetVersion( xStg ) > SOFFICE_FILEFORMAT_60 ); + + // TODO/LATER: handle the case of embedded links gracefully + if ( bEmbedded ) //&& !pStg->IsRoot() ) + { + OUString aName; + if ( rMedium.GetItemSet() ) + { + const SfxStringItem* pDocHierarchItem = static_cast( + rMedium.GetItemSet()->GetItem(SID_DOC_HIERARCHICALNAME) ); + if ( pDocHierarchItem ) + aName = pDocHierarchItem->GetValue(); + } + + if ( aName.getLength() ) + { + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath")); + xInfoSet->setPropertyValue( sPropName, makeAny( aName ) ); + } + } + + if ( !bEmbedded ) + { + if (xStatusIndicator.is()) + xStatusIndicator->setValue(nSteps++); + + bRet = WriteThroughComponent( + xStg, xModelComp, "meta.xml", xServiceFactory, xInfoSet, + (bOASIS ? "com.sun.star.comp.Math.XMLOasisMetaExporter" + : "com.sun.star.comp.Math.XMLMetaExporter"), + sal_False); + } + if ( bRet ) + { + if (xStatusIndicator.is()) + xStatusIndicator->setValue(nSteps++); + + bRet = WriteThroughComponent( + xStg, xModelComp, "content.xml", xServiceFactory, xInfoSet, + "com.sun.star.comp.Math.XMLContentExporter"); + } + + if ( bRet ) + { + if (xStatusIndicator.is()) + xStatusIndicator->setValue(nSteps++); + + bRet = WriteThroughComponent( + xStg, xModelComp, "settings.xml", xServiceFactory, xInfoSet, + (bOASIS ? "com.sun.star.comp.Math.XMLOasisSettingsExporter" + : "com.sun.star.comp.Math.XMLSettingsExporter") ); + } + } + else + { + SvStream *pStream = rMedium.GetOutStream(); + uno::Reference xOut( + new utl::OOutputStreamWrapper(*pStream) ); + + if (xStatusIndicator.is()) + xStatusIndicator->setValue(nSteps++); + + bRet = WriteThroughComponent( + xOut, xModelComp, xServiceFactory, xInfoSet, + "com.sun.star.comp.Math.XMLContentExporter"); + } + + if (xStatusIndicator.is()) + xStatusIndicator->end(); + + return bRet; +} + + +/// export through an XML exporter component (output stream version) +sal_Bool SmXMLExportWrapper::WriteThroughComponent( + Reference xOutputStream, + Reference xComponent, + Reference & rFactory, + Reference & rPropSet, + const sal_Char* pComponentName ) +{ + DBG_ASSERT(xOutputStream.is(), "I really need an output stream!"); + DBG_ASSERT(xComponent.is(), "Need component!"); + DBG_ASSERT(NULL != pComponentName, "Need component name!"); + + // get component + Reference< io::XActiveDataSource > xSaxWriter( + rFactory->createInstance( + OUString::createFromAscii("com.sun.star.xml.sax.Writer") ), + UNO_QUERY ); + DBG_ASSERT( xSaxWriter.is(), "can't instantiate XML writer" ); + if (!xSaxWriter.is()) + return sal_False; + + // connect XML writer to output stream + xSaxWriter->setOutputStream( xOutputStream ); + + // prepare arguments (prepend doc handler to given arguments) + Reference xDocHandler( xSaxWriter,UNO_QUERY); + + Sequence aArgs( 2 ); + aArgs[0] <<= xDocHandler; + aArgs[1] <<= rPropSet; + + // get filter component + Reference< document::XExporter > xExporter( + rFactory->createInstanceWithArguments( + OUString::createFromAscii(pComponentName), aArgs), UNO_QUERY); + DBG_ASSERT( xExporter.is(), + "can't instantiate export filter component" ); + if ( !xExporter.is() ) + return sal_False; + + + // connect model and filter + xExporter->setSourceDocument( xComponent ); + + // filter! + Reference < XFilter > xFilter( xExporter, UNO_QUERY ); + uno::Sequence< PropertyValue > aProps(0); + xFilter->filter( aProps ); + + uno::Reference xFilterTunnel; + xFilterTunnel = uno::Reference + ( xFilter, uno::UNO_QUERY ); + SmXMLExport *pFilter = reinterpret_cast< SmXMLExport * >( + sal::static_int_cast< sal_uIntPtr >( + xFilterTunnel->getSomething( SmXMLExport::getUnoTunnelId() ))); + return pFilter ? pFilter->GetSuccess() : sal_True; +} + + +/// export through an XML exporter component (storage version) +sal_Bool SmXMLExportWrapper::WriteThroughComponent( + const Reference < embed::XStorage >& xStorage, + Reference xComponent, + const sal_Char* pStreamName, + Reference & rFactory, + Reference & rPropSet, + const sal_Char* pComponentName, + sal_Bool bCompress + ) +{ + DBG_ASSERT(xStorage.is(), "Need storage!"); + DBG_ASSERT(NULL != pStreamName, "Need stream name!"); + + // open stream + Reference < io::XStream > xStream; + OUString sStreamName = OUString::createFromAscii(pStreamName); + try + { + xStream = xStorage->openStreamElement( sStreamName, + embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE ); + } + catch ( uno::Exception& ) + { + DBG_ERROR( "Can't create output stream in package!" ); + return sal_False; + } + + String aPropName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("MediaType") ) ); + OUString aMime( RTL_CONSTASCII_USTRINGPARAM("text/xml") ); + uno::Any aAny; + aAny <<= aMime; + + uno::Reference < beans::XPropertySet > xSet( xStream, uno::UNO_QUERY ); + xSet->setPropertyValue( aPropName, aAny ); + + if ( !bCompress ) + { + aPropName = String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("Compressed") ); + sal_Bool bFalse = sal_False; + aAny.setValue( &bFalse, ::getBooleanCppuType() ); + xSet->setPropertyValue( aPropName, aAny ); + } + + // even plain stream must be encrypted in encrypted document + OUString aTmpPropName( RTL_CONSTASCII_USTRINGPARAM("UseCommonStoragePasswordEncryption") ); + sal_Bool bTrue = sal_True; + aAny.setValue( &bTrue, ::getBooleanCppuType() ); + xSet->setPropertyValue( aTmpPropName, aAny ); + + // set Base URL + if ( rPropSet.is() ) + { + OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("StreamName") ); + rPropSet->setPropertyValue( sPropName, makeAny( sStreamName ) ); + } + + // write the stuff + sal_Bool bRet = WriteThroughComponent( xStream->getOutputStream(), xComponent, rFactory, + rPropSet, pComponentName ); + + // stream is closed by SAX parser + //if ( bRet ) + // xStream->getOutputStream()->closeOutput(); + + return bRet; +} + +//////////////////////////////////////////////////////////// + +// #110680# +SmXMLExport::SmXMLExport( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, + sal_uInt16 nExportFlags) +: SvXMLExport( xServiceFactory, MAP_INCH, XML_MATH, nExportFlags ) , + pTree(0) , + bSuccess(sal_False) +{ +} + +sal_Int64 SAL_CALL SmXMLExport::getSomething( + const uno::Sequence< sal_Int8 >& rId ) +throw(uno::RuntimeException) +{ + if ( rId.getLength() == 16 && + 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), + rId.getConstArray(), 16 ) ) + return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_uIntPtr >(this)); + + return SvXMLExport::getSomething( rId ); +} + +const uno::Sequence< sal_Int8 > & SmXMLExport::getUnoTunnelId() throw() +{ + static uno::Sequence< sal_Int8 > * pSeq = 0; + if ( !pSeq ) + { + osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() ); + if ( !pSeq ) + { + static uno::Sequence< sal_Int8 > aSeq( 16 ); + rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); + pSeq = &aSeq; + } + } + return *pSeq; +} + +OUString SAL_CALL SmXMLExport_getImplementationName() throw() +{ + return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLExporter" ) ); +} + +uno::Sequence< OUString > SAL_CALL SmXMLExport_getSupportedServiceNames() + throw() +{ + const OUString aServiceName( EXPORT_SVC_NAME ); + const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); + return aSeq; +} + +uno::Reference< uno::XInterface > SAL_CALL SmXMLExport_createInstance( + const uno::Reference< lang::XMultiServiceFactory > & rSMgr) + throw( uno::Exception ) +{ + // #110680# + // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_ALL ); + // EXPORT_OASIS is required here allthough there is no differrence between + // OOo and OASIS, because without the flag, a transformation to OOo would + // be chained in. + return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_OASIS|EXPORT_ALL ); +} + +//////////////////////////////////////////////////////////// + +OUString SAL_CALL SmXMLExportMetaOOO_getImplementationName() throw() +{ + return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLMetaExporter" ) ); +} + +uno::Sequence< OUString > SAL_CALL SmXMLExportMetaOOO_getSupportedServiceNames() + throw() +{ + const OUString aServiceName( EXPORT_SVC_NAME ); + const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); + return aSeq; +} + +uno::Reference< uno::XInterface > SAL_CALL SmXMLExportMetaOOO_createInstance( + const uno::Reference< lang::XMultiServiceFactory > & rSMgr) +throw( uno::Exception ) +{ + // #110680# + // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_META ); + return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_META ); +} + +//////////////////////////////////////////////////////////// + +OUString SAL_CALL SmXMLExportMeta_getImplementationName() throw() +{ + return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLOasisMetaExporter" ) ); +} + +uno::Sequence< OUString > SAL_CALL SmXMLExportMeta_getSupportedServiceNames() +throw() +{ + const OUString aServiceName( EXPORT_SVC_NAME ); + const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); + return aSeq; +} + +uno::Reference< uno::XInterface > SAL_CALL SmXMLExportMeta_createInstance( + const uno::Reference< lang::XMultiServiceFactory > & rSMgr) +throw( uno::Exception ) +{ + // #110680# + // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_META ); + return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_OASIS|EXPORT_META ); +} + +//////////////////////////////////////////////////////////// + +OUString SAL_CALL SmXMLExportSettingsOOO_getImplementationName() throw() +{ + return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLSettingsExporter" ) ); +} + +uno::Sequence< OUString > SAL_CALL SmXMLExportSettingsOOO_getSupportedServiceNames() +throw() +{ + const OUString aServiceName( EXPORT_SVC_NAME ); + const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); + return aSeq; +} + +uno::Reference< uno::XInterface > SAL_CALL SmXMLExportSettingsOOO_createInstance( + const uno::Reference< lang::XMultiServiceFactory > & rSMgr) +throw( uno::Exception ) +{ + // #110680# + // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_SETTINGS ); + return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_SETTINGS ); +} + +//////////////////////////////////////////////////////////// + +OUString SAL_CALL SmXMLExportSettings_getImplementationName() throw() +{ + return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLOasisSettingsExporter" ) ); +} + +uno::Sequence< OUString > SAL_CALL SmXMLExportSettings_getSupportedServiceNames() +throw() +{ + const OUString aServiceName( EXPORT_SVC_NAME ); + const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); + return aSeq; +} + +uno::Reference< uno::XInterface > SAL_CALL SmXMLExportSettings_createInstance( + const uno::Reference< lang::XMultiServiceFactory > & rSMgr) +throw( uno::Exception ) +{ + // #110680# + // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_SETTINGS ); + return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_OASIS|EXPORT_SETTINGS ); +} + +//////////////////////////////////////////////////////////// + +OUString SAL_CALL SmXMLExportContent_getImplementationName() throw() +{ + return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLContentExporter" ) ); +} + +uno::Sequence< OUString > SAL_CALL SmXMLExportContent_getSupportedServiceNames() + throw() +{ + const OUString aServiceName( EXPORT_SVC_NAME ); + const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); + return aSeq; +} + +uno::Reference< uno::XInterface > SAL_CALL SmXMLExportContent_createInstance( + const uno::Reference< lang::XMultiServiceFactory > & rSMgr) +throw( uno::Exception ) +{ + // #110680# + // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_CONTENT ); + // The EXPORT_OASIS flag is only required to avoid that a transformer is + // chanied in + return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_OASIS|EXPORT_CONTENT ); +} + +//////////////////////////////////////////////////////////// + +// XServiceInfo +// override empty method from parent class +rtl::OUString SAL_CALL SmXMLExport::getImplementationName() +throw(uno::RuntimeException) +{ + OUString aTxt; + switch( getExportFlags() ) + { + case EXPORT_META: + aTxt = SmXMLExportMeta_getImplementationName(); + break; + case EXPORT_SETTINGS: + aTxt = SmXMLExportSettings_getImplementationName(); + break; + case EXPORT_CONTENT: + aTxt = SmXMLExportContent_getImplementationName(); + break; + case EXPORT_ALL: + default: + aTxt = SmXMLExport_getImplementationName(); + break; + } + return aTxt; +} + +sal_uInt32 SmXMLExport::exportDoc(enum XMLTokenEnum eClass) +{ + if ( (getExportFlags() & EXPORT_CONTENT) == 0 ) + { + SvXMLExport::exportDoc( eClass ); + } + else + { + uno::Reference xModel = GetModel(); + uno::Reference xTunnel; + xTunnel = uno::Reference (xModel,uno::UNO_QUERY); + SmModel *pModel = reinterpret_cast + (xTunnel->getSomething(SmModel::getUnoTunnelId())); + + if (pModel) + { + SmDocShell *pDocShell = + static_cast(pModel->GetObjectShell()); + pTree = pDocShell->GetFormulaTree(); + aText = pDocShell->GetText(); + } + + GetDocHandler()->startDocument(); + + /*Add xmlns line*/ + SvXMLAttributeList &rList = GetAttrList(); + + // make use of a default namespace + ResetNamespaceMap(); // Math doesn't need namespaces from xmloff, since it now uses default namespaces (because that is common with current MathML usage in the web) + _GetNamespaceMap().Add( OUString::createFromAscii(""), GetXMLToken(XML_N_MATH), XML_NAMESPACE_MATH ); + + rList.AddAttribute(GetNamespaceMap().GetAttrNameByKey(XML_NAMESPACE_MATH_IDX), + GetNamespaceMap().GetNameByKey( XML_NAMESPACE_MATH_IDX)); + + //I think we need something like ImplExportEntities(); + _ExportContent(); + GetDocHandler()->endDocument(); + } + + bSuccess=sal_True; + return 0; +} + +void SmXMLExport::_ExportContent() +{ + SvXMLElementExport aEquation(*this, XML_NAMESPACE_MATH, XML_MATH, sal_True, sal_True); + SvXMLElementExport *pSemantics=0; + + if (aText.Len()) + { + pSemantics = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, + XML_SEMANTICS, sal_True, sal_True); + } + + ExportNodes(pTree, 0); + + if (aText.Len()) + { + // Convert symbol names + uno::Reference xModel = GetModel(); + uno::Reference xTunnel; + xTunnel = uno::Reference (xModel,uno::UNO_QUERY); + SmModel *pModel = reinterpret_cast + (xTunnel->getSomething(SmModel::getUnoTunnelId())); + SmDocShell *pDocShell = pModel ? + static_cast(pModel->GetObjectShell()) : 0; + DBG_ASSERT( pDocShell, "doc shell missing" ); + if (pDocShell) + { + SmParser &rParser = pDocShell->GetParser(); + BOOL bVal = rParser.IsExportSymbolNames(); + rParser.SetExportSymbolNames( TRUE ); + SmNode *pTmpTree = rParser.Parse( aText ); + aText = rParser.GetText(); + delete pTmpTree; + rParser.SetExportSymbolNames( bVal ); + } + + AddAttribute(XML_NAMESPACE_MATH, XML_ENCODING, + OUString(RTL_CONSTASCII_USTRINGPARAM("StarMath 5.0"))); + SvXMLElementExport aAnnotation(*this, XML_NAMESPACE_MATH, + XML_ANNOTATION, sal_True, sal_False); + GetDocHandler()->characters(OUString( aText )); + } + delete pSemantics; +} + +void SmXMLExport::GetViewSettings( Sequence < PropertyValue >& aProps) +{ + uno::Reference xModel = GetModel(); + if ( !xModel.is() ) + return; + + uno::Reference xTunnel; + xTunnel = uno::Reference (xModel,uno::UNO_QUERY); + SmModel *pModel = reinterpret_cast + (xTunnel->getSomething(SmModel::getUnoTunnelId())); + + if ( !pModel ) + return; + + SmDocShell *pDocShell = + static_cast(pModel->GetObjectShell()); + if ( !pDocShell ) + return; + + aProps.realloc( 4 ); + PropertyValue *pValue = aProps.getArray(); + sal_Int32 nIndex = 0; + + Rectangle aRect( pDocShell->GetVisArea() ); + + pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaTop") ); + pValue[nIndex++].Value <<= aRect.Top(); + + pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaLeft") ); + pValue[nIndex++].Value <<= aRect.Left(); + + pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaWidth") ); + pValue[nIndex++].Value <<= aRect.GetWidth(); + + pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaHeight") ); + pValue[nIndex++].Value <<= aRect.GetHeight(); +} + +void SmXMLExport::GetConfigurationSettings( Sequence < PropertyValue > & rProps) +{ + Reference < XPropertySet > xProps ( GetModel(), UNO_QUERY ); + if ( xProps.is() ) + { + Reference< XPropertySetInfo > xPropertySetInfo = xProps->getPropertySetInfo(); + if (xPropertySetInfo.is()) + { + Sequence< Property > aProps = xPropertySetInfo->getProperties(); + sal_Int32 nCount(aProps.getLength()); + if (nCount > 0) + { + rProps.realloc(nCount); + PropertyValue* pProps = rProps.getArray(); + if (pProps) + { + const OUString sFormula ( RTL_CONSTASCII_USTRINGPARAM ( "Formula" ) ); + const OUString sBasicLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "BasicLibraries" ) ); + const OUString sDialogLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "DialogLibraries" ) ); + const OUString sRuntimeUID ( RTL_CONSTASCII_USTRINGPARAM ( "RuntimeUID" ) ); + for (sal_Int32 i = 0; i < nCount; i++, pProps++) + { + const OUString &rPropName = aProps[i].Name; + if (rPropName != sFormula && + rPropName != sBasicLibraries && + rPropName != sDialogLibraries && + rPropName != sRuntimeUID) + { + pProps->Name = rPropName; + pProps->Value = xProps->getPropertyValue(rPropName); + } + } + } + } + } + } +} + +void SmXMLExport::ExportLine(const SmNode *pNode, int nLevel) +{ + ExportExpression(pNode, nLevel); +} + +void SmXMLExport::ExportBinaryHorizontal(const SmNode *pNode, int nLevel) +{ + ExportExpression(pNode, nLevel); +} + +void SmXMLExport::ExportUnaryHorizontal(const SmNode *pNode, int nLevel) +{ + ExportExpression(pNode, nLevel); +} + +void SmXMLExport::ExportExpression(const SmNode *pNode, int nLevel) +{ + SvXMLElementExport *pRow=0; + ULONG nSize = pNode->GetNumSubNodes(); + + if (nSize > 1) + pRow = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MROW, sal_True, sal_True); + + //if (nSize) + //{ + for (USHORT i = 0; i < nSize; i++) + if (const SmNode *pTemp = pNode->GetSubNode(i)) + ExportNodes(pTemp, nLevel+1); + //} +#if 0 + else + { + //This saves us from situations like "a newline" where the + //lack of a term following the newline would otherwise create + //a incorrect token like + SvXMLElementExport aDummy(*this, XML_NAMESPACE_MATH, XML_MI, sal_True, sal_False); + sal_Unicode nArse[2] = {'\n','\0'}; + GetDocHandler()->characters(nArse); + } +#endif + + delete pRow; +} + +void SmXMLExport::ExportBinaryVertical(const SmNode *pNode, int nLevel) +{ + DBG_ASSERT(pNode->GetNumSubNodes()==3,"Bad Fraction"); + SvXMLElementExport aFraction(*this, XML_NAMESPACE_MATH, XML_MFRAC, sal_True, sal_True); + ExportNodes(pNode->GetSubNode(0), nLevel); + ExportNodes(pNode->GetSubNode(2), nLevel); +} + +void SmXMLExport::ExportTable(const SmNode *pNode, int nLevel) +{ + SvXMLElementExport *pTable=0; + + USHORT nSize = pNode->GetNumSubNodes(); + + //If the list ends in newline then the last entry has + //no subnodes, the newline is superfulous so we just drop + //the last node, inclusion would create a bad MathML + //table + if (nSize >= 1 && pNode->GetSubNode(nSize-1)->GetNumSubNodes() == 0) + --nSize; + + // try to avoid creating a mtable element when the formula consists only + // of a single output line + if (nLevel || (nSize >1)) + pTable = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MTABLE, sal_True, sal_True); + + for (USHORT i = 0; i < nSize; i++) + if (const SmNode *pTemp = pNode->GetSubNode(i)) + { + SvXMLElementExport *pRow=0; + SvXMLElementExport *pCell=0; + if (pTable) + { + pRow = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MTR, sal_True, sal_True); + pCell = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MTD, sal_True, sal_True); + } + ExportNodes(pTemp, nLevel+1); + delete pCell; + delete pRow; + } + + delete pTable; +} + +void SmXMLExport::ExportMath(const SmNode *pNode, int /*nLevel*/) +{ + const SmMathSymbolNode *pTemp = static_cast(pNode); + SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO, sal_True, sal_False); + sal_Unicode nArse[2]; + nArse[0] = pTemp->GetText().GetChar(0); + sal_Unicode cTmp = ConvertMathToMathML( nArse[0] ); + if (cTmp != 0) + nArse[0] = cTmp; + DBG_ASSERT(nArse[0] != 0xffff,"Non existant symbol"); + nArse[1] = 0; + GetDocHandler()->characters(nArse); +} + +void SmXMLExport::ExportText(const SmNode *pNode, int /*nLevel*/) +{ + SvXMLElementExport *pText; + const SmTextNode *pTemp = static_cast(pNode); + switch (pNode->GetToken().eType) + { + default: + case TIDENT: + { + //Note that we change the fontstyle to italic for strings that + //are italic and longer than a single character. + sal_Bool bIsItalic = IsItalic( pTemp->GetFont() ); + if ((pTemp->GetText().Len() > 1) && bIsItalic) + AddAttribute(XML_NAMESPACE_MATH, XML_MATHVARIANT, XML_ITALIC); + else if ((pTemp->GetText().Len() == 1) && !bIsItalic) + AddAttribute(XML_NAMESPACE_MATH, XML_MATHVARIANT, XML_NORMAL); + pText = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MI,sal_True,sal_False); + break; + } + case TNUMBER: + pText = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MN,sal_True,sal_False); + break; + case TTEXT: + pText = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MTEXT,sal_True,sal_False); + break; + } + GetDocHandler()->characters(OUString(pTemp->GetText().GetBuffer())); + delete pText; +} + +void SmXMLExport::ExportBlank(const SmNode * /*pNode*/, int /*nLevel*/) +{ + //!! exports an empty tag since for example "~_~" is allowed in + //!! Math (so it has no sense at all) but must not result in an empty + //!! tag in MathML !! + + SvXMLElementExport *pText; + //const SmBlankNode *pTemp = static_cast(pNode); + + pText = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MI, sal_True, sal_False); + + GetDocHandler()->characters( OUString() ); + delete pText; +} + +void SmXMLExport::ExportSubSupScript(const SmNode *pNode, int nLevel) +{ + const SmNode *pSub = 0; + const SmNode *pSup = 0; + const SmNode *pCSub = 0; + const SmNode *pCSup = 0; + const SmNode *pLSub = 0; + const SmNode *pLSup = 0; + SvXMLElementExport *pThing = 0, *pThing2 = 0; + + //if we have prescripts at all then we must use the tensor notation + + //This is one of those excellent locations where scope is vital to + //arrange the construction and destruction of the element helper + //classes correctly + pLSub = pNode->GetSubNode(LSUB+1); + pLSup = pNode->GetSubNode(LSUP+1); + if (pLSub || pLSup) + { + SvXMLElementExport aMultiScripts(*this, XML_NAMESPACE_MATH, + XML_MMULTISCRIPTS, sal_True, sal_True); + + + if (NULL != (pCSub = pNode->GetSubNode(CSUB+1)) + && NULL != (pCSup = pNode->GetSubNode(CSUP+1))) + { + pThing2 = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, + XML_MUNDEROVER, sal_True,sal_True); + } + else if (NULL != (pCSub = pNode->GetSubNode(CSUB+1))) + { + pThing2 = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, + XML_MUNDER, sal_True,sal_True); + } + else if (NULL != (pCSup = pNode->GetSubNode(CSUP+1))) + { + pThing2 = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, + XML_MOVER, sal_True,sal_True); + } + + ExportNodes(pNode->GetSubNode(0), nLevel+1); //Main Term + + if (pCSub) + ExportNodes(pCSub, nLevel+1); + if (pCSup) + ExportNodes(pCSup, nLevel+1); + delete pThing2; + + pSub = pNode->GetSubNode(RSUB+1); + pSup = pNode->GetSubNode(RSUP+1); + if (pSub || pSup) + { + if (pSub) + ExportNodes(pSub, nLevel+1); + else + { + SvXMLElementExport aNone(*this, XML_NAMESPACE_MATH, XML_NONE,sal_True,sal_True); + } + if (pSup) + ExportNodes(pSup, nLevel+1); + else + { + SvXMLElementExport aNone(*this, XML_NAMESPACE_MATH, XML_NONE,sal_True,sal_True); + } + } + + //Seperator element between suffix and prefix sub/sup pairs + { + SvXMLElementExport aPrescripts(*this, XML_NAMESPACE_MATH, + XML_MPRESCRIPTS, sal_True,sal_True); + } + + if (pLSub) + ExportNodes(pLSub, nLevel+1); + else + { + SvXMLElementExport aNone(*this, XML_NAMESPACE_MATH, XML_NONE, + sal_True,sal_True); + + } + if (pLSup) + ExportNodes(pLSup, nLevel+1); + else + { + SvXMLElementExport aNone(*this, XML_NAMESPACE_MATH, XML_NONE, + sal_True,sal_True); + + } + } + else + { + if (NULL != (pSub = pNode->GetSubNode(RSUB+1)) && + NULL != (pSup = pNode->GetSubNode(RSUP+1))) + { + pThing = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, + XML_MSUBSUP, sal_True,sal_True); + } + else if (NULL != (pSub = pNode->GetSubNode(RSUB+1))) + { + pThing = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MSUB, + sal_True,sal_True); + } + else if (NULL != (pSup = pNode->GetSubNode(RSUP+1))) + { + pThing = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MSUP, + sal_True,sal_True); + } + + if (NULL != (pCSub = pNode->GetSubNode(CSUB+1)) + && NULL != (pCSup=pNode->GetSubNode(CSUP+1))) + { + pThing2 = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, + XML_MUNDEROVER, sal_True,sal_True); + } + else if (NULL != (pCSub = pNode->GetSubNode(CSUB+1))) + { + pThing2 = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, + XML_MUNDER, sal_True,sal_True); + } + else if (NULL != (pCSup = pNode->GetSubNode(CSUP+1))) + { + pThing2 = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, + XML_MOVER, sal_True,sal_True); + } + ExportNodes(pNode->GetSubNode(0), nLevel+1); //Main Term + + if (pCSub) + ExportNodes(pCSub, nLevel+1); + if (pCSup) + ExportNodes(pCSup, nLevel+1); + delete pThing2; + + if (pSub) + ExportNodes(pSub, nLevel+1); + if (pSup) + ExportNodes(pSup, nLevel+1); + delete pThing; + } +} + +void SmXMLExport::ExportBrace(const SmNode *pNode, int nLevel) +{ + const SmNode *pTemp; + const SmNode *pLeft=pNode->GetSubNode(0); + const SmNode *pRight=pNode->GetSubNode(2); + SvXMLElementExport *pFences=0,*pRow=0; + if ( ((pLeft) && (pLeft->GetToken().eType != TNONE)) && + ((pRight) && (pRight->GetToken().eType != TNONE)) && + (pNode->GetScaleMode() == SCALE_HEIGHT)) + { + sal_Unicode nArse[2]; + nArse[1] = 0; + nArse[0] = static_cast< + const SmMathSymbolNode* >(pLeft)->GetText().GetChar(0); + DBG_ASSERT(nArse[0] != 0xffff,"Non existant symbol"); + AddAttribute(XML_NAMESPACE_MATH, XML_OPEN,nArse); + nArse[0] = static_cast< + const SmMathSymbolNode* >(pRight)->GetText().GetChar(0); + DBG_ASSERT(nArse[0] != 0xffff,"Non existant symbol"); + AddAttribute(XML_NAMESPACE_MATH, XML_CLOSE,nArse); + pFences = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MFENCED, + sal_True,sal_True); + } + else if (pLeft && (pLeft->GetToken().eType != TNONE)) + { + pRow = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MROW, + sal_True, sal_True); + if (pNode->GetScaleMode() == SCALE_HEIGHT) + AddAttribute(XML_NAMESPACE_MATH, XML_STRETCHY, XML_TRUE); + else + AddAttribute(XML_NAMESPACE_MATH, XML_STRETCHY, XML_FALSE); + ExportNodes(pLeft, nLevel+1); + } + else + pRow = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MROW, + sal_True, sal_True); + + if (NULL != (pTemp = pNode->GetSubNode(1))) + ExportNodes(pTemp, nLevel+1); + if (pFences) + delete pFences; + else if (pRight && (pRight->GetToken().eType != TNONE)) + { + if (pNode->GetScaleMode() == SCALE_HEIGHT) + AddAttribute(XML_NAMESPACE_MATH, XML_STRETCHY, XML_TRUE); + else + AddAttribute(XML_NAMESPACE_MATH, XML_STRETCHY, XML_FALSE); + ExportNodes(pRight, nLevel+1); + } + delete pRow; +} + +void SmXMLExport::ExportRoot(const SmNode *pNode, int nLevel) +{ + if (pNode->GetSubNode(0)) + { + SvXMLElementExport aRoot(*this, XML_NAMESPACE_MATH, XML_MROOT,sal_True, + sal_True); + ExportNodes(pNode->GetSubNode(2), nLevel+1); + ExportNodes(pNode->GetSubNode(0), nLevel+1); + } + else + { + SvXMLElementExport aSqrt(*this, XML_NAMESPACE_MATH, XML_MSQRT,sal_True, + sal_True); + ExportNodes(pNode->GetSubNode(2), nLevel+1); + } +} + +void SmXMLExport::ExportOperator(const SmNode *pNode, int nLevel) +{ + /*we need to either use content or font and size attributes + *here*/ +#if 0 + { + SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO, + sal_True,sal_False); + SmTextNode *pTemp = (SmTextNode *)pNode->GetSubNode(0); + GetDocHandler()->characters(pTemp->GetText()); + } +#endif + SvXMLElementExport aRow(*this, XML_NAMESPACE_MATH, XML_MROW, + sal_True, sal_True); + ExportNodes(pNode->GetSubNode(0), nLevel+1); + ExportNodes(pNode->GetSubNode(1), nLevel+1); +} + +void SmXMLExport::ExportAttributes(const SmNode *pNode, int nLevel) +{ + SvXMLElementExport *pElement=0; + + if (pNode->GetToken().eType == TUNDERLINE) + { + AddAttribute(XML_NAMESPACE_MATH, XML_ACCENTUNDER, + XML_TRUE); + pElement = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MUNDER, + sal_True,sal_True); + } + else if (pNode->GetToken().eType != TOVERSTRIKE) + { + AddAttribute(XML_NAMESPACE_MATH, XML_ACCENT, + XML_TRUE); + pElement = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MOVER, + sal_True,sal_True); + } + + ExportNodes(pNode->GetSubNode(1), nLevel+1); + switch (pNode->GetToken().eType) + { + case TOVERLINE: + { + //proper entity support required + SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO, + sal_True,sal_True); +#if 0 + GetDocHandler()->characters( + OUString(RTL_CONSTASCII_USTRINGPARAM("&overbar;"))); +#else + sal_Unicode nArse[2] = {0xAF,0x00}; +#endif + GetDocHandler()->characters(nArse); + } + break; + case TUNDERLINE: + { + //proper entity support required + SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO, + sal_True,sal_True); +#if 0 + GetDocHandler()->characters( + OUString(RTL_CONSTASCII_USTRINGPARAM("&underbar;"))); +#else + sal_Unicode nArse[2] = {0x0332,0x00}; +#endif + GetDocHandler()->characters(nArse); + } + break; + case TOVERSTRIKE: + break; + default: + ExportNodes(pNode->GetSubNode(0), nLevel+1); + break; + } + delete pElement; +} + +static bool lcl_HasEffectOnMathvariant( const SmTokenType eType ) +{ + return eType == TBOLD || eType == TNBOLD || + eType == TITALIC || eType == TNBOLD || + eType == TSANS || eType == TSERIF || eType == TFIXED; +} + +void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel) +{ + SvXMLElementExport *pElement = 0; + + // + // gather the mathvariant attribut relevant data from all + // successively following SmFontNodes... + // + int nBold = -1; // for the following variables: -1 = yet undefined; 0 = false; 1 = true; + int nItalic = -1; // for the following variables: -1 = yet undefined; 0 = false; 1 = true; + int nSansSerifFixed = -1; + SmTokenType eNodeType = TUNKNOWN; + while (lcl_HasEffectOnMathvariant( (eNodeType = pNode->GetToken().eType) )) + { + switch (eNodeType) + { + case TBOLD : nBold = 1; break; + case TNBOLD : nBold = 0; break; + case TITALIC : nItalic = 1; break; + case TNITALIC : nItalic = 0; break; + case TSANS : nSansSerifFixed = 0; break; + case TSERIF : nSansSerifFixed = 1; break; + case TFIXED : nSansSerifFixed = 2; break; + default: + DBG_ASSERT( 0, "unexpected case" ); + } + // According to the parser every node that is to be evaluated heres + // has a single non-zero subnode at index 1!! Thus we only need to check + // that single node for follow-up nodes that have an effect on the attribute. + if (pNode->GetNumSubNodes() > 1 && pNode->GetSubNode(1) && + lcl_HasEffectOnMathvariant( pNode->GetSubNode(1)->GetToken().eType)) + { + pNode = pNode->GetSubNode(1); + } + else + break; + } + + switch (pNode->GetToken().eType) + { + //wrap a phantom element around everything*/ + case TPHANTOM: + pElement = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, + XML_MPHANTOM, sal_True,sal_True); + break; + case TBLACK: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_BLACK); + break; + case TWHITE: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_WHITE); + break; + case TRED: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_RED); + break; + case TGREEN: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_GREEN); + break; + case TBLUE: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_BLUE); + break; + case TCYAN: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_AQUA); + break; + case TMAGENTA: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_FUCHSIA); + break; + case TYELLOW: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_YELLOW); + break; + case TSIZE: + { + const SmFontNode *pFontNode = static_cast(pNode); + const Fraction &aFrac = pFontNode->GetSizeParameter(); + + OUStringBuffer sStrBuf; + switch(pFontNode->GetSizeType()) + { + case FNTSIZ_MULTIPLY: + SvXMLUnitConverter::convertDouble(sStrBuf, + static_cast(aFrac*Fraction(100.00))); + sStrBuf.append(static_cast('%')); + break; + case FNTSIZ_DIVIDE: + SvXMLUnitConverter::convertDouble(sStrBuf, + static_cast(Fraction(100.00)/aFrac)); + sStrBuf.append(static_cast('%')); + break; + case FNTSIZ_ABSOLUT: + SvXMLUnitConverter::convertDouble(sStrBuf, + static_cast(aFrac)); + sStrBuf.append( + GetXMLToken(XML_UNIT_PT)); + break; + default: + { + //The problem here is that the wheels fall off because + //font size is stored in 100th's of a mm not pts, and + //rounding errors take their toll on the original + //value specified in points. + + //Must fix StarMath to retain the original pt values + Fraction aTemp = Sm100th_mmToPts(pFontNode->GetFont(). + GetSize().Height()); + + if (pFontNode->GetSizeType() == FNTSIZ_MINUS) + aTemp-=aFrac; + else + aTemp+=aFrac; + + double mytest = static_cast(aTemp); + + mytest = ::rtl::math::round(mytest,1); + SvXMLUnitConverter::convertDouble(sStrBuf,mytest); + sStrBuf.append(GetXMLToken(XML_UNIT_PT)); + } + break; + } + + OUString sStr(sStrBuf.makeStringAndClear()); + AddAttribute(XML_NAMESPACE_MATH, XML_MATHSIZE, sStr); + } + break; + case TBOLD: + case TITALIC: + case TNBOLD: + case TNITALIC: + case TFIXED: + case TSANS: + case TSERIF: + { + // nBold: -1 = yet undefined; 0 = false; 1 = true; + // nItalic: -1 = yet undefined; 0 = false; 1 = true; + // nSansSerifFixed: -1 = undefined; 0 = sans; 1 = serif; 2 = fixed; + const sal_Char *pText = "normal"; + if (nSansSerifFixed == -1 || nSansSerifFixed == 1) + { + pText = "normal"; + if (nBold == 1 && nItalic != 1) + pText = "bold"; + else if (nBold != 1 && nItalic == 1) + pText = "italic"; + else if (nBold == 1 && nItalic == 1) + pText = "bold-italic"; + } + else if (nSansSerifFixed == 0) + { + pText = "sans-serif"; + if (nBold == 1 && nItalic != 1) + pText = "bold-sans-serif"; + else if (nBold != 1 && nItalic == 1) + pText = "sans-serif-italic"; + else if (nBold == 1 && nItalic == 1) + pText = "sans-serif-bold-italic"; + } + else if (nSansSerifFixed == 2) + pText = "monospace"; // no modifiers allowed for monospace ... + else + { + DBG_ASSERT( 0, "unexpected case" ); + } + AddAttribute(XML_NAMESPACE_MATH, XML_MATHVARIANT, A2OU(pText)); + } + break; + default: + break; + + } +#if 0 + if (pNode->GetNumSubNodes() > 1) //or in the future is a node that + //cannot take the currently supported + //properties +#endif + //for now we will just always export with a style and not worry about + //anyone else for the moment. + { + //wrap a style around it + SvXMLElementExport aStyle(*this, XML_NAMESPACE_MATH, XML_MSTYLE, sal_True,sal_True); + ExportExpression(pNode, nLevel); + } +#if 0 + else + ExportNodes(pNode->GetSubNode(0), nLevel+1); +#endif + + delete pElement; +} + + +void SmXMLExport::ExportVerticalBrace(const SmNode *pNode, int nLevel) +{ + //Place the overbrace value OVER a vertical brace and then place that + //expression OVER the overbrace value, If someone can find a + //dedicated term in MathML to handle this overbrace/underbrace concept + //let me know. C. + XMLTokenEnum which; + + switch (pNode->GetToken().eType) + { + case TOVERBRACE: + default: + which = XML_MOVER; + break; + case TUNDERBRACE: + which = XML_MUNDER; + break; + } + + DBG_ASSERT(pNode->GetNumSubNodes()==3,"Bad Vertical Brace"); + SvXMLElementExport aOver1(*this, XML_NAMESPACE_MATH,which, sal_True, sal_True); + {//Scoping + // using accents will draw the over-/underbraces too close to the base + // see http://www.w3.org/TR/MathML2/chapter3.html#id.3.4.5.2 + // also XML_ACCENT is illegal with XML_MUNDER. Thus no XML_ACCENT attribut here! +// AddAttribute(XML_NAMESPACE_MATH, XML_ACCENT, XML_TRUE); + SvXMLElementExport aOver2(*this, XML_NAMESPACE_MATH,which, sal_True, sal_True); + ExportNodes(pNode->GetSubNode(0), nLevel); + ExportNodes(pNode->GetSubNode(1), nLevel); + } + ExportNodes(pNode->GetSubNode(2), nLevel); +} + +void SmXMLExport::ExportMatrix(const SmNode *pNode, int nLevel) +{ + SvXMLElementExport aTable(*this, XML_NAMESPACE_MATH, XML_MTABLE, sal_True, sal_True); + const SmMatrixNode *pMatrix = static_cast(pNode); + USHORT i=0; + for (ULONG y = 0; y < pMatrix->GetNumRows(); y++) + { + SvXMLElementExport aRow(*this, XML_NAMESPACE_MATH, XML_MTR, sal_True, sal_True); + for (ULONG x = 0; x < pMatrix->GetNumCols(); x++) + if (const SmNode *pTemp = pNode->GetSubNode(i++)) + { + SvXMLElementExport aCell(*this, XML_NAMESPACE_MATH, XML_MTD, sal_True, sal_True); + ExportNodes(pTemp, nLevel+1); + } + } +} + +void SmXMLExport::ExportNodes(const SmNode *pNode, int nLevel) +{ + if (!pNode) + return; + switch(pNode->GetType()) + { + case NTABLE: + ExportTable(pNode, nLevel); + break; + case NALIGN: + case NBRACEBODY: + case NEXPRESSION: + ExportExpression(pNode, nLevel); + break; + case NLINE: + ExportLine(pNode, nLevel); + break; + case NTEXT: + ExportText(pNode, nLevel); + break; + case NSPECIAL: //NSPECIAL requires some sort of Entity preservation in the XML engine. + case NGLYPH_SPECIAL: + case NMATH: + { + sal_Unicode cTmp = 0; + const SmTextNode *pTemp = static_cast< const SmTextNode * >(pNode); + if (pTemp->GetText().Len() > 0) + cTmp = ConvertMathToMathML( pTemp->GetText().GetChar(0) ); + if (cTmp == 0) + { + // no conversion to MathML implemented -> export it as text + // thus at least it will not vanish into nothing + ExportText(pNode, nLevel); + } + else + { + //To fully handle generic MathML we need to implement the full + //operator dictionary, we will generate MathML with explicit + //stretchiness for now. + sal_Int16 nLength = GetAttrList().getLength(); + sal_Bool bAddStretch=sal_True; + for ( sal_Int16 i = 0; i < nLength; i++ ) + { + OUString sLocalName; + sal_uInt16 nPrefix = GetNamespaceMap().GetKeyByAttrName( + GetAttrList().getNameByIndex(i), &sLocalName ); + + if ( ( XML_NAMESPACE_MATH == nPrefix ) && + IsXMLToken(sLocalName, XML_STRETCHY) ) + { + bAddStretch = sal_False; + break; + } + } + if (bAddStretch) + { + AddAttribute(XML_NAMESPACE_MATH, XML_STRETCHY, XML_FALSE); + } + ExportMath(pNode, nLevel); + } + } + break; + case NPLACE: + ExportMath(pNode, nLevel); + break; + case NBINHOR: + ExportBinaryHorizontal(pNode, nLevel); + break; + case NUNHOR: + ExportUnaryHorizontal(pNode, nLevel); + break; + case NBRACE: + ExportBrace(pNode, nLevel); + break; + case NBINVER: + ExportBinaryVertical(pNode, nLevel); + break; + case NSUBSUP: + ExportSubSupScript(pNode, nLevel); + break; + case NROOT: + ExportRoot(pNode, nLevel); + break; + case NOPER: + ExportOperator(pNode, nLevel); + break; + case NATTRIBUT: + ExportAttributes(pNode, nLevel); + break; + case NFONT: + ExportFont(pNode, nLevel); + break; + case NVERTICAL_BRACE: + ExportVerticalBrace(pNode, nLevel); + break; + case NMATRIX: + ExportMatrix(pNode, nLevel); + break; + case NBLANK: + ExportBlank(pNode, nLevel); + break; + default: + DBG_ASSERT( 0, "Warning: failed to export a node?" ); + break; + +#if 0 + default: + { + ULONG nSize = pNode->GetNumSubNodes(); + for (ULONG i = 0; i < nSize; i++) + if (SmNode *pTemp = pNode->GetSubNode(i)) + ExportNodes(pTemp, nLevel+1); + } + break; +#endif + } +} + +//////////////////////////////////////////////////////////// + diff --git a/starmath/source/mathmlexport.hxx b/starmath/source/mathmlexport.hxx index e32bda03c1..36a30e308d 100644 --- a/starmath/source/mathmlexport.hxx +++ b/starmath/source/mathmlexport.hxx @@ -1,5 +1,5 @@ -/************************************************************************* - * +/************************************************************************* + * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. @@ -23,121 +23,121 @@ * * for a copy of the LGPLv3 License. * - ************************************************************************/ - -#ifndef _MATHMLEXPORT_HXX_ -#define _MATHMLEXPORT_HXX_ - -#include -#include -#include -#include - -#include - -class SfxMedium; -namespace com { namespace sun { namespace star { - namespace io { - class XInputStream; - class XOutputStream; } - namespace beans { - class XPropertySet; } -} } } - - -//////////////////////////////////////////////////////////// - -class SmXMLExportWrapper -{ - com::sun::star::uno::Reference xModel; - sal_Bool bFlat; //set true for export to flat .mml, set false for - //export to a .sxm (or whatever) package -public: - SmXMLExportWrapper(com::sun::star::uno::Reference &rRef) - : xModel(rRef), bFlat(sal_True) {} - - sal_Bool Export(SfxMedium &rMedium); - void SetFlat(sal_Bool bIn) {bFlat = bIn;} - - sal_Bool WriteThroughComponent( - ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > - xOutputStream, - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > - xComponent, - ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory > & rFactory, - ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > & rPropSet, - const sal_Char* pComponentName ); - - sal_Bool WriteThroughComponent( - const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor, - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > - xComponent, - const sal_Char* pStreamName, - ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory > & rFactory, - ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > & rPropSet, - const sal_Char* pComponentName, - sal_Bool bCompress=sal_True ); -}; - -//////////////////////////////////////////////////////////// - -class SmXMLExport : public SvXMLExport -{ - const SmNode * pTree; - String aText; - sal_Bool bSuccess; - -protected: - void ExportNodes(const SmNode *pNode, int nLevel); - void ExportTable(const SmNode *pNode, int nLevel); - void ExportLine(const SmNode *pNode, int nLevel); - void ExportExpression(const SmNode *pNode, int nLevel); - void ExportText(const SmNode *pNode, int nLevel); - void ExportMath(const SmNode *pNode, int nLevel); - void ExportPolygon(const SmNode *pNode, int nLevel); - void ExportBinaryHorizontal(const SmNode *pNode, int nLevel); - void ExportUnaryHorizontal(const SmNode *pNode, int nLevel); - void ExportBrace(const SmNode *pNode, int nLevel); - void ExportBinaryVertical(const SmNode *pNode, int nLevel); - void ExportSubSupScript(const SmNode *pNode, int nLevel); - void ExportRoot(const SmNode *pNode, int nLevel); - void ExportOperator(const SmNode *pNode, int nLevel); - void ExportAttributes(const SmNode *pNode, int nLevel); - void ExportFont(const SmNode *pNode, int nLevel); - void ExportVerticalBrace(const SmNode *pNode, int nLevel); - void ExportMatrix(const SmNode *pNode, int nLevel); - void ExportBlank(const SmNode *pNode, int nLevel); - -public: - // #110680# - SmXMLExport( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, - sal_uInt16 nExportFlags=EXPORT_ALL); - virtual ~SmXMLExport() {}; - - // XServiceInfo (override parent method) - ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); - - // XUnoTunnel - sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException); - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw(); - - void _ExportAutoStyles() {} - void _ExportMasterStyles() {} - void _ExportContent(); - sal_uInt32 exportDoc(enum ::xmloff::token::XMLTokenEnum eClass); - - virtual void GetViewSettings(com::sun::star::uno::Sequence& aProps); - virtual void GetConfigurationSettings(com::sun::star::uno::Sequence& aProps); - - sal_Bool GetSuccess() {return bSuccess;} -}; - -//////////////////////////////////////////////////////////// - -#endif - + ************************************************************************/ + +#ifndef _MATHMLEXPORT_HXX_ +#define _MATHMLEXPORT_HXX_ + +#include +#include +#include +#include + +#include + +class SfxMedium; +namespace com { namespace sun { namespace star { + namespace io { + class XInputStream; + class XOutputStream; } + namespace beans { + class XPropertySet; } +} } } + + +//////////////////////////////////////////////////////////// + +class SmXMLExportWrapper +{ + com::sun::star::uno::Reference xModel; + sal_Bool bFlat; //set true for export to flat .mml, set false for + //export to a .sxm (or whatever) package +public: + SmXMLExportWrapper(com::sun::star::uno::Reference &rRef) + : xModel(rRef), bFlat(sal_True) {} + + sal_Bool Export(SfxMedium &rMedium); + void SetFlat(sal_Bool bIn) {bFlat = bIn;} + + sal_Bool WriteThroughComponent( + ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > + xOutputStream, + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > + xComponent, + ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XMultiServiceFactory > & rFactory, + ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropSet, + const sal_Char* pComponentName ); + + sal_Bool WriteThroughComponent( + const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor, + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > + xComponent, + const sal_Char* pStreamName, + ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XMultiServiceFactory > & rFactory, + ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropSet, + const sal_Char* pComponentName, + sal_Bool bCompress=sal_True ); +}; + +//////////////////////////////////////////////////////////// + +class SmXMLExport : public SvXMLExport +{ + const SmNode * pTree; + String aText; + sal_Bool bSuccess; + +protected: + void ExportNodes(const SmNode *pNode, int nLevel); + void ExportTable(const SmNode *pNode, int nLevel); + void ExportLine(const SmNode *pNode, int nLevel); + void ExportExpression(const SmNode *pNode, int nLevel); + void ExportText(const SmNode *pNode, int nLevel); + void ExportMath(const SmNode *pNode, int nLevel); + void ExportPolygon(const SmNode *pNode, int nLevel); + void ExportBinaryHorizontal(const SmNode *pNode, int nLevel); + void ExportUnaryHorizontal(const SmNode *pNode, int nLevel); + void ExportBrace(const SmNode *pNode, int nLevel); + void ExportBinaryVertical(const SmNode *pNode, int nLevel); + void ExportSubSupScript(const SmNode *pNode, int nLevel); + void ExportRoot(const SmNode *pNode, int nLevel); + void ExportOperator(const SmNode *pNode, int nLevel); + void ExportAttributes(const SmNode *pNode, int nLevel); + void ExportFont(const SmNode *pNode, int nLevel); + void ExportVerticalBrace(const SmNode *pNode, int nLevel); + void ExportMatrix(const SmNode *pNode, int nLevel); + void ExportBlank(const SmNode *pNode, int nLevel); + +public: + // #110680# + SmXMLExport( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, + sal_uInt16 nExportFlags=EXPORT_ALL); + virtual ~SmXMLExport() {}; + + // XServiceInfo (override parent method) + ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); + + // XUnoTunnel + sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException); + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw(); + + void _ExportAutoStyles() {} + void _ExportMasterStyles() {} + void _ExportContent(); + sal_uInt32 exportDoc(enum ::xmloff::token::XMLTokenEnum eClass); + + virtual void GetViewSettings(com::sun::star::uno::Sequence& aProps); + virtual void GetConfigurationSettings(com::sun::star::uno::Sequence& aProps); + + sal_Bool GetSuccess() {return bSuccess;} +}; + +//////////////////////////////////////////////////////////// + +#endif + diff --git a/starmath/source/mathmlimport.hxx b/starmath/source/mathmlimport.hxx index a6e1ba6000..4272dc2be8 100644 --- a/starmath/source/mathmlimport.hxx +++ b/starmath/source/mathmlimport.hxx @@ -1,5 +1,5 @@ -/************************************************************************* - * +/************************************************************************* + * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. @@ -23,325 +23,325 @@ * * for a copy of the LGPLv3 License. * - ************************************************************************/ - -#ifndef _MATHMLIMPORT_HXX_ -#define _MATHMLIMPORT_HXX_ - -#include -#include -#include -#include - -#include - -class SfxMedium; -namespace com { namespace sun { namespace star { - namespace io { - class XInputStream; - class XOutputStream; } - namespace beans { - class XPropertySet; } -} } } - -//////////////////////////////////////////////////////////// - -class SmXMLImportWrapper -{ - com::sun::star::uno::Reference xModel; - -public: - SmXMLImportWrapper(com::sun::star::uno::Reference &rRef) - : xModel(rRef) {} - - ULONG Import(SfxMedium &rMedium); - - ULONG ReadThroughComponent( - ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInputStream, - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xModelComponent, - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rFactory, - ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > & rPropSet, - const sal_Char* pFilterName, - sal_Bool bEncrypted ); - - ULONG ReadThroughComponent( - const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xModelComponent, - const sal_Char* pStreamName, - const sal_Char* pCompatibilityStreamName, - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rFactory, - ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > & rPropSet, - const sal_Char* pFilterName ); -}; - -//////////////////////////////////////////////////////////// - -class SmXMLImport : public SvXMLImport -{ - SvXMLTokenMap *pPresLayoutElemTokenMap; - SvXMLTokenMap *pPresLayoutAttrTokenMap; - SvXMLTokenMap *pFencedAttrTokenMap; - SvXMLTokenMap *pOperatorAttrTokenMap; - SvXMLTokenMap *pAnnotationAttrTokenMap; - SvXMLTokenMap *pPresElemTokenMap; - SvXMLTokenMap *pPresScriptEmptyElemTokenMap; - SvXMLTokenMap *pPresTableElemTokenMap; - SvXMLTokenMap *pColorTokenMap; - - SmNodeStack aNodeStack; - sal_Bool bSuccess; - String aText; - -public: - // #110680# - SmXMLImport( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, - sal_uInt16 nImportFlags=IMPORT_ALL); - virtual ~SmXMLImport() throw (); - - // XServiceInfo (override parent method) - ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); - - // XUnoTunnel - sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException); - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw(); - - void SAL_CALL endDocument(void) - throw( ::com::sun::star::xml::sax::SAXException, - ::com::sun::star::uno::RuntimeException ); - - SvXMLImportContext *CreateContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateMathContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateRowContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateFracContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateNumberContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateTextContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateAnnotationContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateStringContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateIdentifierContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateOperatorContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateSpaceContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateSqrtContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateRootContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateStyleContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreatePaddedContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreatePhantomContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateFencedContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateErrorContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateSubContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateSupContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateSubSupContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateUnderContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateOverContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateUnderOverContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateMultiScriptsContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateNoneContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreatePrescriptsContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateTableContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateTableRowContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateTableCellContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateAlignGroupContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - SvXMLImportContext *CreateActionContext(sal_uInt16 nPrefix, - const rtl::OUString &rLocalName, - const com::sun::star::uno::Reference < - com::sun::star::xml::sax::XAttributeList> &xAttrList); - - const SvXMLTokenMap &GetPresLayoutElemTokenMap(); - const SvXMLTokenMap &GetPresLayoutAttrTokenMap(); - const SvXMLTokenMap &GetFencedAttrTokenMap(); - const SvXMLTokenMap &GetOperatorAttrTokenMap(); - const SvXMLTokenMap &GetAnnotationAttrTokenMap(); - const SvXMLTokenMap &GetPresElemTokenMap(); - const SvXMLTokenMap &GetPresScriptEmptyElemTokenMap(); - const SvXMLTokenMap &GetPresTableElemTokenMap(); - const SvXMLTokenMap &GetColorTokenMap(); - - SmNodeStack & GetNodeStack() {return aNodeStack;} - SmNode *GetTree() { return aNodeStack.Pop();} - sal_Bool GetSuccess() { return bSuccess; } - String &GetText() { return aText;} - - virtual void SetViewSettings(const com::sun::star::uno::Sequence& aViewProps); - virtual void SetConfigurationSettings(const com::sun::star::uno::Sequence& aViewProps); -}; - -//////////////////////////////////////////////////////////// - -enum SmXMLMathElemTokenMap -{ - XML_TOK_MATH -}; - -enum SmXMLPresLayoutElemTokenMap -{ - XML_TOK_SEMANTICS, - XML_TOK_MSTYLE, - XML_TOK_MERROR, - XML_TOK_MPHANTOM, - XML_TOK_MROW, - XML_TOK_MFRAC, - XML_TOK_MSQRT, - XML_TOK_MROOT, - XML_TOK_MSUB, - XML_TOK_MSUP, - XML_TOK_MSUBSUP, - XML_TOK_MMULTISCRIPTS, - XML_TOK_MUNDER, - XML_TOK_MOVER, - XML_TOK_MUNDEROVER, - XML_TOK_MTABLE, - XML_TOK_MACTION, - XML_TOK_MFENCED, - XML_TOK_MPADDED -}; - -enum SmXMLPresLayoutAttrTokenMap -{ - XML_TOK_FONTWEIGHT, - XML_TOK_FONTSTYLE, - XML_TOK_FONTSIZE, - XML_TOK_FONTFAMILY, - XML_TOK_COLOR -}; - - -enum SmXMLFencedAttrTokenMap -{ - XML_TOK_OPEN, - XML_TOK_CLOSE -}; - - -enum SmXMLPresTableElemTokenMap -{ - XML_TOK_MTR, - XML_TOK_MTD -}; - -enum SmXMLPresElemTokenMap -{ - XML_TOK_ANNOTATION, - XML_TOK_MI, - XML_TOK_MN, - XML_TOK_MO, - XML_TOK_MTEXT, - XML_TOK_MSPACE, - XML_TOK_MS, - XML_TOK_MALIGNGROUP -}; - -enum SmXMLPresScriptEmptyElemTokenMap -{ - XML_TOK_MPRESCRIPTS, - XML_TOK_NONE -}; - -enum SmXMLOperatorAttrTokenMap -{ - XML_TOK_STRETCHY -}; - -enum SmXMLAnnotationAttrTokenMap -{ - XML_TOK_ENCODING -}; - -//////////////////////////////////////////////////////////// - -#endif - + ************************************************************************/ + +#ifndef _MATHMLIMPORT_HXX_ +#define _MATHMLIMPORT_HXX_ + +#include +#include +#include +#include + +#include + +class SfxMedium; +namespace com { namespace sun { namespace star { + namespace io { + class XInputStream; + class XOutputStream; } + namespace beans { + class XPropertySet; } +} } } + +//////////////////////////////////////////////////////////// + +class SmXMLImportWrapper +{ + com::sun::star::uno::Reference xModel; + +public: + SmXMLImportWrapper(com::sun::star::uno::Reference &rRef) + : xModel(rRef) {} + + ULONG Import(SfxMedium &rMedium); + + ULONG ReadThroughComponent( + ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInputStream, + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xModelComponent, + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rFactory, + ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropSet, + const sal_Char* pFilterName, + sal_Bool bEncrypted ); + + ULONG ReadThroughComponent( + const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xModelComponent, + const sal_Char* pStreamName, + const sal_Char* pCompatibilityStreamName, + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rFactory, + ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropSet, + const sal_Char* pFilterName ); +}; + +//////////////////////////////////////////////////////////// + +class SmXMLImport : public SvXMLImport +{ + SvXMLTokenMap *pPresLayoutElemTokenMap; + SvXMLTokenMap *pPresLayoutAttrTokenMap; + SvXMLTokenMap *pFencedAttrTokenMap; + SvXMLTokenMap *pOperatorAttrTokenMap; + SvXMLTokenMap *pAnnotationAttrTokenMap; + SvXMLTokenMap *pPresElemTokenMap; + SvXMLTokenMap *pPresScriptEmptyElemTokenMap; + SvXMLTokenMap *pPresTableElemTokenMap; + SvXMLTokenMap *pColorTokenMap; + + SmNodeStack aNodeStack; + sal_Bool bSuccess; + String aText; + +public: + // #110680# + SmXMLImport( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, + sal_uInt16 nImportFlags=IMPORT_ALL); + virtual ~SmXMLImport() throw (); + + // XServiceInfo (override parent method) + ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); + + // XUnoTunnel + sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException); + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw(); + + void SAL_CALL endDocument(void) + throw( ::com::sun::star::xml::sax::SAXException, + ::com::sun::star::uno::RuntimeException ); + + SvXMLImportContext *CreateContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateMathContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateRowContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateFracContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateNumberContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateTextContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateAnnotationContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateStringContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateIdentifierContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateOperatorContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateSpaceContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateSqrtContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateRootContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateStyleContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreatePaddedContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreatePhantomContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateFencedContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateErrorContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateSubContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateSupContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateSubSupContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateUnderContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateOverContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateUnderOverContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateMultiScriptsContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateNoneContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreatePrescriptsContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateTableContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateTableRowContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateTableCellContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateAlignGroupContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + SvXMLImportContext *CreateActionContext(sal_uInt16 nPrefix, + const rtl::OUString &rLocalName, + const com::sun::star::uno::Reference < + com::sun::star::xml::sax::XAttributeList> &xAttrList); + + const SvXMLTokenMap &GetPresLayoutElemTokenMap(); + const SvXMLTokenMap &GetPresLayoutAttrTokenMap(); + const SvXMLTokenMap &GetFencedAttrTokenMap(); + const SvXMLTokenMap &GetOperatorAttrTokenMap(); + const SvXMLTokenMap &GetAnnotationAttrTokenMap(); + const SvXMLTokenMap &GetPresElemTokenMap(); + const SvXMLTokenMap &GetPresScriptEmptyElemTokenMap(); + const SvXMLTokenMap &GetPresTableElemTokenMap(); + const SvXMLTokenMap &GetColorTokenMap(); + + SmNodeStack & GetNodeStack() {return aNodeStack;} + SmNode *GetTree() { return aNodeStack.Pop();} + sal_Bool GetSuccess() { return bSuccess; } + String &GetText() { return aText;} + + virtual void SetViewSettings(const com::sun::star::uno::Sequence& aViewProps); + virtual void SetConfigurationSettings(const com::sun::star::uno::Sequence& aViewProps); +}; + +//////////////////////////////////////////////////////////// + +enum SmXMLMathElemTokenMap +{ + XML_TOK_MATH +}; + +enum SmXMLPresLayoutElemTokenMap +{ + XML_TOK_SEMANTICS, + XML_TOK_MSTYLE, + XML_TOK_MERROR, + XML_TOK_MPHANTOM, + XML_TOK_MROW, + XML_TOK_MFRAC, + XML_TOK_MSQRT, + XML_TOK_MROOT, + XML_TOK_MSUB, + XML_TOK_MSUP, + XML_TOK_MSUBSUP, + XML_TOK_MMULTISCRIPTS, + XML_TOK_MUNDER, + XML_TOK_MOVER, + XML_TOK_MUNDEROVER, + XML_TOK_MTABLE, + XML_TOK_MACTION, + XML_TOK_MFENCED, + XML_TOK_MPADDED +}; + +enum SmXMLPresLayoutAttrTokenMap +{ + XML_TOK_FONTWEIGHT, + XML_TOK_FONTSTYLE, + XML_TOK_FONTSIZE, + XML_TOK_FONTFAMILY, + XML_TOK_COLOR +}; + + +enum SmXMLFencedAttrTokenMap +{ + XML_TOK_OPEN, + XML_TOK_CLOSE +}; + + +enum SmXMLPresTableElemTokenMap +{ + XML_TOK_MTR, + XML_TOK_MTD +}; + +enum SmXMLPresElemTokenMap +{ + XML_TOK_ANNOTATION, + XML_TOK_MI, + XML_TOK_MN, + XML_TOK_MO, + XML_TOK_MTEXT, + XML_TOK_MSPACE, + XML_TOK_MS, + XML_TOK_MALIGNGROUP +}; + +enum SmXMLPresScriptEmptyElemTokenMap +{ + XML_TOK_MPRESCRIPTS, + XML_TOK_NONE +}; + +enum SmXMLOperatorAttrTokenMap +{ + XML_TOK_STRETCHY +}; + +enum SmXMLAnnotationAttrTokenMap +{ + XML_TOK_ENCODING +}; + +//////////////////////////////////////////////////////////// + +#endif + diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 568532cf53..0c6841b254 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -510,10 +510,10 @@ BOOL SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling, pParent->pLower = pStart; else //Modified for #i100782#,04/03/2009 - //If the pParent has more than 1 child nodes, former design will - //ignore them directly without any collection work. It will make some - //dangling pointers. This lead the crash... - //The new design will find the last child of pParent in loop way, and + //If the pParent has more than 1 child nodes, former design will + //ignore them directly without any collection work. It will make some + //dangling pointers. This lead the crash... + //The new design will find the last child of pParent in loop way, and //add the pStart after the last child. // pParent->Lower()->pNext = pStart; { diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index dde5c7a551..3833ede9ef 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -184,7 +184,7 @@ BOOL SwFmtAutoFmt::QueryValue( uno::Any& rVal, BYTE ) const BOOL SwFmtAutoFmt::PutValue( const uno::Any& , BYTE ) { - //the format is not renameable via API + //the format is not renameable via API return FALSE; } diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index c68e874df5..04df65234e 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -529,7 +529,7 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry } eNewState = aCharStyles.getLength() ? - PropertyState_DIRECT_VALUE : PropertyState_DEFAULT_VALUE;; + PropertyState_DIRECT_VALUE : PropertyState_DEFAULT_VALUE;; if(pAny) (*pAny) <<= aCharStyles; } diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx index 71ae36288e..91f89299e8 100755 --- a/sw/source/core/view/viewpg.cxx +++ b/sw/source/core/view/viewpg.cxx @@ -94,11 +94,11 @@ void ViewShell::AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions // print brochure // OD 05.05.2003 #i14016# - consider empty pages on calculation of the scaling // for a page to be printed. -void ViewShell::PrintProspect( - OutputDevice *pOutDev, +void ViewShell::PrintProspect( + OutputDevice *pOutDev, const SwPrintData &rPrintData, sal_Int32 nRenderer // the index in the vector of prospect pages to be printed - ) + ) { const sal_Int32 nMaxRenderer = rPrintData.GetRenderData().GetPagePairsForProspectPrinting().size() - 1; #if OSL_DEBUG_LEVEL > 1 -- cgit v1.2.3 From 60e4c97b08e830952e038261486a3f5fa6928c3b Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Mon, 15 Feb 2010 09:41:19 +0100 Subject: sw33bf02: #i107834# - remove applied patch for deeper investigation --- sw/source/core/txtnode/fntcache.cxx | 9 --------- 1 file changed, 9 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index a2fbb8ca4e..7fc5d7ed0b 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -484,10 +484,6 @@ static sal_Char __READONLY_DATA sStandardString[] = "Dies ist der Teststring"; pScrFont = pPrtFont; FontMetric aMet = pPrt->GetFontMetric( ); - //Don't loose "faked" properties of the logical font that don't truly - //exist in the physical font metrics which vcl which fake up for us - aMet.SetWeight(pScrFont->GetWeight()); - aMet.SetItalic(pScrFont->GetItalic()); bSymbol = RTL_TEXTENCODING_SYMBOL == aMet.GetCharSet(); @@ -528,11 +524,6 @@ static sal_Char __READONLY_DATA sStandardString[] = "Dies ist der Teststring"; pPrt->SetFont( aFnt2 ); aMet = pPrt->GetFontMetric( ); - //Don't loose "faked" properties of the logical font that don't - //truly exist in the physical font metrics which vcl which fake - //up for us - aMet.SetWeight(aFnt2.GetWeight()); - aMet.SetItalic(aFnt2.GetItalic()); } const XubString aStandardStr( sStandardString, -- cgit v1.2.3 From 82071aac2264b925f3e7a18cc59241d2ce4b40ba Mon Sep 17 00:00:00 2001 From: os Date: Mon, 15 Feb 2010 09:51:03 +0100 Subject: unused code removed --- sw/source/core/unocore/unotbl.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 309d14b24c..868a9fc07d 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -3362,8 +3362,8 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, pUnoCrsr->Move( fnMoveForward, fnGoNode ); pUnoCrsr->SetRemainInSection( sal_False ); - SwTableLine* pLastLine = rLines[rLines.Count() - 1]; - SwTableBoxes &rBoxes = pLastLine->GetTabBoxes(); + + const SwTableBox* pBRBox = lcl_FindCornerTableBox(rLines, false); pUnoCrsr->SetMark(); pUnoCrsr->GetPoint()->nNode = *pBRBox->GetSttNd(); -- cgit v1.2.3 From d6b93440e32273b513b5c45579c5096f21cc8f37 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 16 Feb 2010 14:30:17 +0100 Subject: sw33a11y01: #i88070# - accessible Writer comments - part 4 --- sw/inc/PostItMgr.hxx | 3 +- sw/inc/access.hrc | 2 +- sw/source/core/access/acccontext.cxx | 74 ++++++++++++++++---------------- sw/source/core/access/accfrmobj.cxx | 20 +++++++-- sw/source/core/access/accfrmobj.hxx | 7 +++ sw/source/core/access/accfrmobjmap.cxx | 10 +++-- sw/source/core/access/accfrmobjslist.cxx | 6 ++- sw/source/core/access/accfrmobjslist.hxx | 10 ++--- sw/source/core/view/viewsh.cxx | 9 ++++ sw/source/ui/docvw/SidebarWinAcc.cxx | 4 +- sw/source/ui/uiview/viewmdi.cxx | 12 +++--- 11 files changed, 96 insertions(+), 61 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index c1abefd5d9..211c6e59c6 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -196,7 +196,6 @@ class SwPostItMgr: public SfxListener DECL_LINK( CalcHdl, void*); sw::sidebarwindows::SwSidebarWin* GetSidebarWin(const SfxBroadcaster* pBroadcaster) const; - sw::annotation::SwAnnotationWin* GetAnnotationWin(const SwPostItField* pFld) const; void InsertItem( SfxBroadcaster* pItem, bool bCheckExistance, bool bFocus); void RemoveItem( SfxBroadcaster* pBroadcast ); @@ -248,6 +247,8 @@ class SwPostItMgr: public SfxListener bool IsHit(const Point &aPointPixel); Color GetArrowColor(USHORT aDirection,unsigned long aPage) const; + sw::annotation::SwAnnotationWin* GetAnnotationWin(const SwPostItField* pFld) const; + sw::sidebarwindows::SwSidebarWin* GetNextPostIt( USHORT aDirection, sw::sidebarwindows::SwSidebarWin* aPostIt); long GetNextBorder(); diff --git a/sw/inc/access.hrc b/sw/inc/access.hrc index 161fc4de5c..88fe747091 100644 --- a/sw/inc/access.hrc +++ b/sw/inc/access.hrc @@ -55,7 +55,7 @@ #define STR_ACCESS_ANNOTATION_BUTTON_NAME (RC_ACCESS_BEGIN + 20) #define STR_ACCESS_ANNOTATION_BUTTON_DESC (RC_ACCESS_BEGIN + 21) -#define ACCESS_ACT_END STR_ACCESS_PAGE_DESC +#define ACCESS_ACT_END STR_ACCESS_ANNOTATION_BUTTON_DESC #if ACCESS_ACT_END > RC_ACCESS_END #error Resource-Id Ueberlauf in #file, #line diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index b2a5079857..fee48dfe64 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -175,8 +175,7 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, const SwRect& rOldVisArea ) { const SwRect& rNewVisArea = GetVisArea(); - SwAccessibleChild aFrm( pFrm ); - bool bVisibleOnly = aFrm.IsVisibleChildrenOnly(); + const bool bVisibleChildrenOnly = SwAccessibleChild( pFrm ).IsVisibleChildrenOnly(); const SwAccessibleChildSList aList( *pFrm, *(GetMap()) ); SwAccessibleChildSList::const_iterator aIter( aList.begin() ); @@ -195,20 +194,31 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, } else { - if( bVisibleOnly ) + if ( bVisibleChildrenOnly && + !rLower.AlwaysIncludeAsChild() ) + { eAction = SCROLLED_IN; + } else + { eAction = SCROLLED; + } } } else if( aBox.IsOver( rOldVisArea ) ) { - if( bVisibleOnly ) + if ( bVisibleChildrenOnly && + !rLower.AlwaysIncludeAsChild() ) + { eAction = SCROLLED_OUT; + } else + { eAction = SCROLLED; + } } - else if( !bVisibleOnly ) + else if( !bVisibleChildrenOnly || + rLower.AlwaysIncludeAsChild() ) { // This wouldn't be required if the SwAccessibleFrame, // wouldn't know about the vis area. @@ -218,6 +228,8 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, { if ( rLower.GetSwFrm() ) { + ASSERT( !rLower.AlwaysIncludeAsChild(), + " - always included child not considered!" ); const SwFrm* pLower( rLower.GetSwFrm() ); ::vos::ORef< SwAccessibleContext > xAccImpl = GetMap()->GetContextImpl( pLower, SCROLLED_OUT == eAction || @@ -249,6 +261,8 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, } else if ( rLower.GetDrawObject() ) { + ASSERT( !rLower.AlwaysIncludeAsChild(), + " - always included child not considered!" ); ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl = GetMap()->GetContextImpl( rLower.GetDrawObject(), this, @@ -284,33 +298,14 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm, } else if ( rLower.GetWindow() ) { - switch( eAction ) - { - case SCROLLED: - case SCROLLED_WITHIN: - // nothing to do - break; - case SCROLLED_IN: - { - AccessibleEventObject aEvent; - aEvent.EventId = AccessibleEventId::CHILD; - uno::Reference< XAccessible > xAcc = - rLower.GetWindow()->GetAccessible(); - aEvent.NewValue <<= xAcc; - FireAccessibleEvent( aEvent ); - } - break; - case SCROLLED_OUT: - DisposeChild( rLower, sal_False ); - break; - case NONE: - break; - } + // nothing to do - as such children are always included as children. + ASSERT( rLower.AlwaysIncludeAsChild(), + " - not always included child not considered!" ); } } } else if ( rLower.GetSwFrm() && - ( !bVisibleOnly || + ( !bVisibleChildrenOnly || aBox.IsOver( rOldVisArea ) || aBox.IsOver( rNewVisArea ) ) ) { @@ -1141,8 +1136,9 @@ void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrmOrObj, { vos::OGuard aGuard(Application::GetSolarMutex()); - if( IsShowing( *(GetMap()), rChildFrmOrObj ) || - !SwAccessibleChild( GetFrm() ).IsVisibleChildrenOnly() ) + if ( IsShowing( *(GetMap()), rChildFrmOrObj ) || + rChildFrmOrObj.AlwaysIncludeAsChild() || + !SwAccessibleChild( GetFrm() ).IsVisibleChildrenOnly() ) { // If the object could have existed before, than there is nothing to do, // because no wrapper exists now and therefor no one is interested to @@ -1168,7 +1164,7 @@ void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrmOrObj, aEvent.EventId = AccessibleEventId::CHILD; uno::Reference< XAccessible > xAcc = rChildFrmOrObj.GetWindow()->GetAccessible(); - aEvent.NewValue <<= xAcc; + aEvent.OldValue <<= xAcc; FireAccessibleEvent( aEvent ); } } @@ -1201,8 +1197,8 @@ void SwAccessibleContext::InvalidatePosOrSize( const SwRect& ) FireVisibleDataEvent(); } - SwAccessibleChild aParent( GetParent() ); - if( !bIsNewShowingState && aParent.IsVisibleChildrenOnly() ) + if( !bIsNewShowingState && + SwAccessibleChild( GetParent() ).IsVisibleChildrenOnly() ) { // The frame is now invisible -> dispose it Dispose( sal_True ); @@ -1223,7 +1219,13 @@ void SwAccessibleContext::InvalidateChildPosOrSize( !rChildFrmOrObj.GetSwFrm()->Frm().IsEmpty(), "child context should have a size" ); - SwAccessibleChild aFrm( GetFrm() ); + if ( rChildFrmOrObj.AlwaysIncludeAsChild() ) + { + // nothing to do; + return; + } + + const bool bVisibleChildrenOnly = SwAccessibleChild( GetFrm() ).IsVisibleChildrenOnly(); const bool bNew = rOldFrm.IsEmpty() || ( rOldFrm.Left() == 0 && rOldFrm.Top() == 0 ); if( IsShowing( *(GetMap()), rChildFrmOrObj ) ) @@ -1231,7 +1233,7 @@ void SwAccessibleContext::InvalidateChildPosOrSize( // If the object could have existed before, than there is nothing to do, // because no wrapper exists now and therefor no one is interested to // get notified of the movement. - if( bNew || (aFrm.IsVisibleChildrenOnly() && !IsShowing( rOldFrm )) ) + if( bNew || (bVisibleChildrenOnly && !IsShowing( rOldFrm )) ) { if( rChildFrmOrObj.GetSwFrm() ) { @@ -1274,7 +1276,7 @@ void SwAccessibleContext::InvalidateChildPosOrSize( // needs to be send. However, there is no wrapper existing, and so // no notifications for grandchildren are required. If the are // grandgrandchildren, they would be notified by the layout. - if( aFrm.IsVisibleChildrenOnly() && + if( bVisibleChildrenOnly && !bNew && IsShowing( rOldFrm ) ) { if( rChildFrmOrObj.GetSwFrm() ) diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx index 7add8f133a..e02cfaef31 100644 --- a/sw/source/core/access/accfrmobj.cxx +++ b/sw/source/core/access/accfrmobj.cxx @@ -290,10 +290,10 @@ SwRect SwAccessibleChild::GetBox( const SwAccessibleMap& rAccMap ) const } else if ( mpWindow ) { - MapMode aDest( MAP_TWIP ); - aBox = SwRect( rAccMap.GetShell()->GetWin()->PixelToLogic( mpWindow->GetPosPixel(), aDest ), - rAccMap.GetShell()->GetWin()->PixelToLogic( mpWindow->GetSizePixel(), aDest ) ); - } + aBox = SwRect( rAccMap.GetShell()->GetWin()->PixelToLogic( + Rectangle( mpWindow->GetPosPixel(), + mpWindow->GetSizePixel() ) ) ); +} return aBox; } @@ -324,6 +324,18 @@ SwRect SwAccessibleChild::GetBounds( const SwAccessibleMap& rAccMap ) const return aBound; } +bool SwAccessibleChild::AlwaysIncludeAsChild() const +{ + bool bAlwaysIncludedAsChild( false ); + + if ( mpWindow ) + { + bAlwaysIncludedAsChild = true; + } + + return bAlwaysIncludedAsChild; +} + const SwFrm* SwAccessibleChild::GetParent( const sal_Bool bInPagePreview ) const { const SwFrm* pParent( 0 ); diff --git a/sw/source/core/access/accfrmobj.hxx b/sw/source/core/access/accfrmobj.hxx index 70c71f259e..cdd8c3ccc8 100644 --- a/sw/source/core/access/accfrmobj.hxx +++ b/sw/source/core/access/accfrmobj.hxx @@ -75,6 +75,13 @@ class SwAccessibleChild SwRect GetBox( const SwAccessibleMap& rAccMap ) const; SwRect GetBounds( const SwAccessibleMap& rAccMap ) const; + /** indicating, if accessible child is included even, if the corresponding + object is not visible. + + @author OD + */ + bool AlwaysIncludeAsChild() const; + private: const SwFrm* mpFrm; const SdrObject* mpDrawObj; diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx index a28084324f..db691af0cd 100644 --- a/sw/source/core/access/accfrmobjmap.cxx +++ b/sw/source/core/access/accfrmobjmap.cxx @@ -55,13 +55,14 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, : nHellId( rAccMap.GetShell()->GetDoc()->GetHellId() ) , nControlsId( rAccMap.GetShell()->GetDoc()->GetControlsId() ) { - const bool bVisibleOnly = SwAccessibleChild( &rFrm ).IsVisibleChildrenOnly(); + const bool bVisibleChildrenOnly = SwAccessibleChild( &rFrm ).IsVisibleChildrenOnly(); sal_uInt32 nPos = 0; SwAccessibleChild aLower( rFrm.GetLower() ); while( aLower.GetSwFrm() ) { - if ( !bVisibleOnly || + if ( !bVisibleChildrenOnly || + aLower.AlwaysIncludeAsChild() || aLower.GetBox( rAccMap ).IsOver( rVisArea ) ) { insert( nPos++, SwAccessibleChildMapKey::TEXT, aLower ); @@ -72,7 +73,7 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, if ( rFrm.IsPageFrm() ) { - ASSERT( bVisibleOnly, "page frame within tab frame???" ); + ASSERT( bVisibleChildrenOnly, "page frame within tab frame???" ); const SwPageFrm *pPgFrm = static_cast< const SwPageFrm * >( &rFrm ); const SwSortedObjs *pObjs = pPgFrm->GetSortedObjs(); @@ -97,7 +98,8 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, { aLower = (*pObjs)[i]->GetDrawObj(); if ( aLower.IsBoundAsChar() && - ( !bVisibleOnly || + ( !bVisibleChildrenOnly || + aLower.AlwaysIncludeAsChild() || aLower.GetBox( rAccMap ).IsOver( rVisArea ) ) ) { insert( aLower.GetDrawObject(), aLower ); diff --git a/sw/source/core/access/accfrmobjslist.cxx b/sw/source/core/access/accfrmobjslist.cxx index 74c4cc1ae2..0a6fa4825c 100644 --- a/sw/source/core/access/accfrmobjslist.cxx +++ b/sw/source/core/access/accfrmobjslist.cxx @@ -87,10 +87,11 @@ SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator( } } - if( rList.IsVisibleOnly() ) + if( rList.IsVisibleChildrenOnly() ) { // Find the first visible while( aCurr.IsValid() && + !aCurr.AlwaysIncludeAsChild() && !aCurr.GetBox( rAccMap ).IsOver( rList.GetVisArea() ) ) { next(); @@ -159,6 +160,7 @@ SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::ne { next(); while( aCurr.IsValid() && + !aCurr.AlwaysIncludeAsChild() && !aCurr.GetBox( rList.GetAccMap() ).IsOver( rList.GetVisArea() ) ) { next(); @@ -169,6 +171,6 @@ SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::ne SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::operator++() { - return rList.IsVisibleOnly() ? next_visible() : next(); + return rList.IsVisibleChildrenOnly() ? next_visible() : next(); } diff --git a/sw/source/core/access/accfrmobjslist.hxx b/sw/source/core/access/accfrmobjslist.hxx index df4192ef18..df622c1c53 100644 --- a/sw/source/core/access/accfrmobjslist.hxx +++ b/sw/source/core/access/accfrmobjslist.hxx @@ -89,7 +89,7 @@ class SwAccessibleChildSList { const SwRect maVisArea; const SwFrm& mrFrm; - const sal_Bool mbVisibleOnly; + const sal_Bool mbVisibleChildrenOnly; SwAccessibleMap& mrAccMap; public: @@ -100,7 +100,7 @@ public: SwAccessibleMap& rAccMap ) : maVisArea() , mrFrm( rFrm ) - , mbVisibleOnly( sal_False ) + , mbVisibleChildrenOnly( sal_False ) , mrAccMap( rAccMap ) {} @@ -109,7 +109,7 @@ public: SwAccessibleMap& rAccMap ) : maVisArea( rVisArea ) , mrFrm( rFrm ) - , mbVisibleOnly( sw::access::SwAccessibleChild( &rFrm ).IsVisibleChildrenOnly() ) + , mbVisibleChildrenOnly( sw::access::SwAccessibleChild( &rFrm ).IsVisibleChildrenOnly() ) , mrAccMap( rAccMap ) { } @@ -129,9 +129,9 @@ public: return mrFrm; } - inline sal_Bool IsVisibleOnly() const + inline sal_Bool IsVisibleChildrenOnly() const { - return mbVisibleOnly; + return mbVisibleChildrenOnly; } inline const SwRect& GetVisArea() const diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 45ed8a9e8f..f15c7663ed 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1314,6 +1314,15 @@ void ViewShell::VisPortChgd( const SwRect &rRect) GetWin()->Update(); Imp()->bPaintInScroll = FALSE; + // --> OD 2010-02-11 #i88070# + if ( pPostItMgr ) + { + pPostItMgr->Rescale(); + pPostItMgr->CalcRects(); + pPostItMgr->LayoutPostIts(); + } + // <-- + if ( !bScrolled && pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) pPostItMgr->CorrectPositions(); diff --git a/sw/source/ui/docvw/SidebarWinAcc.cxx b/sw/source/ui/docvw/SidebarWinAcc.cxx index 794a2ce6a7..214913963d 100644 --- a/sw/source/ui/docvw/SidebarWinAcc.cxx +++ b/sw/source/ui/docvw/SidebarWinAcc.cxx @@ -71,7 +71,7 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent mpAnchorFrm = pAnchorFrm; } - css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() throw (css::uno::RuntimeException) { vos::OGuard aGuard(maMutex); @@ -87,7 +87,7 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent return xAccParent; } - sal_Int32 SAL_CALL getAccessibleIndexInParent() throw (css::uno::RuntimeException) + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw (css::uno::RuntimeException) { vos::OGuard aGuard(maMutex); diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx index 4d999c6e96..ca0c24b28e 100644 --- a/sw/source/ui/uiview/viewmdi.cxx +++ b/sw/source/ui/uiview/viewmdi.cxx @@ -243,12 +243,12 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, if( bUnLockView ) pWrtShell->LockView( FALSE ); - if ( mpPostItMgr ) - { - mpPostItMgr->Rescale(); - mpPostItMgr->CalcRects(); - mpPostItMgr->LayoutPostIts(); - } +// if ( mpPostItMgr ) +// { +// mpPostItMgr->Rescale(); +// mpPostItMgr->CalcRects(); +// mpPostItMgr->LayoutPostIts(); +// } // eZoom = eZoomType; } -- cgit v1.2.3 From 9f7f11dc86ec37c5efd3b1c92e3a919cddea54e9 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 16 Feb 2010 15:35:40 +0100 Subject: #108327# handling of paper tray for printing --- sw/inc/printdata.hxx | 10 +- sw/source/core/doc/doc.cxx | 31 ++- sw/source/core/view/makefile.mk | 11 +- sw/source/core/view/printdata.cxx | 546 +++++++++++++++++++++++++++++++++++++ sw/source/core/view/vprint.cxx | 560 +------------------------------------- sw/source/ui/uno/unotxdoc.cxx | 42 ++- 6 files changed, 635 insertions(+), 565 deletions(-) mode change 100644 => 100755 sw/source/core/view/makefile.mk create mode 100755 sw/source/core/view/printdata.cxx mode change 100644 => 100755 sw/source/ui/uno/unotxdoc.cxx (limited to 'sw/source') diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx index 544af87bed..c5281fa369 100755 --- a/sw/inc/printdata.hxx +++ b/sw/inc/printdata.hxx @@ -233,6 +233,9 @@ class SwRenderData std::set< sal_Int32 > m_aValidPages; // the set of possible pages (see StringRangeEnumerator::getRangesFromString ) std::map< sal_Int32, const SwPageFrm * > m_aValidStartFrames; // the map of start frames for those pages + // printer paper tray to use for each of the m_aValidPages above + std::map< sal_Int32, sal_Int32 > m_aPrinterPaperTrays; + // vector of pages and their order to be printed (duplicates and any order allowed!) // (see 'render' in unotxdoc.cxx) std::vector< sal_Int32 > m_aPagesToPrint; @@ -287,13 +290,18 @@ public: const std::set< sal_Int32 > & GetValidPagesSet() const { return m_aValidPages; } ValidStartFramesMap_t & GetValidStartFrames() { return m_aValidStartFrames; } const ValidStartFramesMap_t & GetValidStartFrames() const { return m_aValidStartFrames; } + + // a map for printer paper tray numbers to use for each document page + // a value of -1 for the tray means that there is no specific tray defined + std::map< sal_Int32, sal_Int32 > GetPrinterPaperTrays() { return m_aPrinterPaperTrays; } + const std::map< sal_Int32, sal_Int32 > GetPrinterPaperTrays() const { return m_aPrinterPaperTrays; } // used for 'normal' printing // A page value of 0 as entry indicates that this page is not from the document but // from the post-it document. (See also GetPostItStartFrame below) std::vector< sal_Int32 > & GetPagesToPrint() { return m_aPagesToPrint; } const std::vector< sal_Int32 > & GetPagesToPrint() const { return m_aPagesToPrint; } - + // used for 'normal' printing with post-its // - if the map entry will be NULL then the respective page to be printed is from // the document. In that case use the value from GetPagesToPrint at the same index to diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 7789021939..cfbcd9b7b1 100755 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -58,9 +59,11 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -1180,6 +1183,23 @@ static void lcl_FormatPostIt( } +// provide the paper tray to use according to the page style in use, +// but do that only if the respective item is NOT just the default item +static sal_Int32 lcl_GetPaperBin( const SwPageFrm *pStartFrm ) +{ + sal_Int32 nRes = -1; + + const SwFrmFmt &rFmt = pStartFrm->GetPageDesc()->GetMaster(); + const SfxPoolItem *pItem = NULL; + SfxItemState eState = rFmt.GetItemState( RES_PAPER_BIN, FALSE, &pItem ); + const SvxPaperBinItem *pPaperBinItem = dynamic_cast< const SvxPaperBinItem * >(pItem); + if (eState > SFX_ITEM_DEFAULT && pPaperBinItem) + nRes = pPaperBinItem->GetValue(); + + return nRes; +} + + void SwDoc::CalculatePagesForPrinting( /* out */ SwRenderData &rData, const SwPrintUIOptions &rOptions, @@ -1256,6 +1276,7 @@ void SwDoc::CalculatePagesForPrinting( nPageNo = nFirstPageNo; + std::map< sal_Int32, sal_Int32 > &rPrinterPaperTrays = rData.GetPrinterPaperTrays(); std::set< sal_Int32 > &rValidPages = rData.GetValidPagesSet(); std::map< sal_Int32, const SwPageFrm * > &rValidStartFrms = rData.GetValidStartFrames(); rValidPages.clear(); @@ -1271,9 +1292,10 @@ void SwDoc::CalculatePagesForPrinting( if ( bPrintEmptyPages || pStPage->Frm().Height() ) // <-- { - // pStPage->GetUpper()->Paint( pStPage->Frm() ); rValidPages.insert( nPageNo ); rValidStartFrms[ nPageNo ] = pStPage; + + rPrinterPaperTrays[ nPageNo ] = lcl_GetPaperBin( pStPage ); } } @@ -1529,8 +1551,9 @@ void SwDoc::CalculatePagePairsForProspectPrinting( const SwPrintUIOptions &rOptions, sal_Int32 nDocPageCount ) { - std::set< sal_Int32 > &rValidPagesSet = rData.GetValidPagesSet(); - std::map< sal_Int32, const SwPageFrm * > &rValidStartFrms = rData.GetValidStartFrames(); + std::map< sal_Int32, sal_Int32 > &rPrinterPaperTrays = rData.GetPrinterPaperTrays(); + std::set< sal_Int32 > &rValidPagesSet = rData.GetValidPagesSet(); + std::map< sal_Int32, const SwPageFrm * > &rValidStartFrms = rData.GetValidStartFrames(); std::vector< std::pair< sal_Int32, sal_Int32 > > &rPagePairs = rData.GetPagePairsForProspectPrinting(); rPagePairs.clear(); @@ -1562,6 +1585,8 @@ void SwDoc::CalculatePagePairsForProspectPrinting( rValidPagesSet.insert( nPageNum ); rValidStartFrms[ nPageNum ] = pPageFrm; pPageFrm = (SwPageFrm*)pPageFrm->GetNext(); + + rPrinterPaperTrays[ nPageNum ] = lcl_GetPaperBin( pStPage ); } DBG_ASSERT( nPageNum == nDocPageCount, "unexpected number of pages" ); diff --git a/sw/source/core/view/makefile.mk b/sw/source/core/view/makefile.mk old mode 100644 new mode 100755 index 56cfb7d6ed..c1718618a7 --- a/sw/source/core/view/makefile.mk +++ b/sw/source/core/view/makefile.mk @@ -48,10 +48,13 @@ SLOFILES = \ $(SLO)$/vdraw.obj \ $(SLO)$/viewimp.obj \ $(SLO)$/viewsh.obj \ - $(SLO)$/viewpg.obj \ - $(SLO)$/vnew.obj \ - $(SLO)$/vprint.obj \ - $(SLO)$/pagepreviewlayout.obj + $(SLO)$/pagepreviewlayout.obj \ + $(SLO)$/printdata.obj \ + $(SLO)$/viewpg.obj \ + $(SLO)$/vnew.obj \ + $(SLO)$/vprint.obj + + EXCEPTIONSFILES = \ $(SLO)$/pagepreviewlayout.obj diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx new file mode 100755 index 0000000000..d329b69854 --- /dev/null +++ b/sw/source/core/view/printdata.cxx @@ -0,0 +1,546 @@ +/************************************************************************** + * + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: vprint.cxx,v $ + * $Revision: 1.46 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sw.hxx" + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + + +extern bool lcl_GetPostIts( IDocumentFieldsAccess* pIDFA, _SetGetExpFlds * pSrtLst ); + + +using namespace ::com::sun::star; +using ::rtl::OUString; + + +////////////////////////////////////////////////////////////////////// + +SwRenderData::SwRenderData() +{ + m_pPostItFields = 0; + m_pPostItDoc = 0; + m_pPostItShell = 0; + + m_pViewOptionAdjust = 0; + m_pPrtOptions = 0; +} + + +SwRenderData::~SwRenderData() +{ + delete m_pViewOptionAdjust; m_pViewOptionAdjust = 0; + delete m_pPrtOptions; m_pPrtOptions = 0; + DBG_ASSERT( !m_pPostItShell, "m_pPostItShell should already have been deleted" ); + DBG_ASSERT( !m_pPostItDoc, "m_pPostItDoc should already have been deleted" ); + DBG_ASSERT( !m_pPostItFields, " should already have been deleted" ); +} + + +void SwRenderData::CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev ) +{ + DBG_ASSERT( !m_pPostItFields && !m_pPostItDoc && !m_pPostItShell, "some post-it data already exists" ); + m_pPostItFields = new _SetGetExpFlds; + lcl_GetPostIts( pDoc, m_pPostItFields ); + m_pPostItDoc = new SwDoc; + + //!! Disable spell and grammar checking in the temporary document. + //!! Otherwise the grammar checker might process it and crash if we later on + //!! simply delete this document while he is still at it. + SwViewOption aViewOpt( *pViewOpt ); + aViewOpt.SetOnlineSpell( FALSE ); + + m_pPostItShell = new ViewShell( *m_pPostItDoc, 0, &aViewOpt, pOutDev ); +} + + +void SwRenderData::DeletePostItData() +{ + if (HasPostItData()) + { + m_pPostItDoc->setPrinter( 0, false, false ); //damit am echten DOC der Drucker bleibt + delete m_pPostItShell; //Nimmt das PostItDoc mit ins Grab. + delete m_pPostItFields; + m_pPostItDoc = 0; + m_pPostItShell = 0; + m_pPostItFields = 0; + } +} + +bool SwRenderData::NeedNewViewOptionAdjust( const SwWrtShell& rCompare ) const +{ + return m_pViewOptionAdjust ? ! m_pViewOptionAdjust->checkShell( rCompare ) : true; +} + + +void SwRenderData::ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &rViewOptions ) +{ + if (m_pViewOptionAdjust) + { + DBG_ASSERT( 0, "error: there should be no ViewOptionAdjust active when calling this function" ); + } + m_pViewOptionAdjust = new SwViewOptionAdjust_Impl( rSh, rViewOptions ); +} + + +void SwRenderData::ViewOptionAdjust( const SwPrtOptions *pPrtOptions ) +{ + m_pViewOptionAdjust->AdjustViewOptions( pPrtOptions ); +} + + +void SwRenderData::ViewOptionAdjustStop() +{ + if (m_pViewOptionAdjust) + { + delete m_pViewOptionAdjust; + m_pViewOptionAdjust = 0; + } +} + + +void SwRenderData::MakeSwPrtOptions( + SwPrtOptions &rOptions, + const SwDocShell *pDocShell, + const SwPrintUIOptions *pOpt, + const SwRenderData *pData, + bool bIsPDFExport ) +{ + if (!pDocShell || !pOpt || !pData) + return; + + // get default print options + const TypeId aSwWebDocShellTypeId = TYPE(SwWebDocShell); + BOOL bWeb = pDocShell->IsA( aSwWebDocShellTypeId ); + rOptions.MakeOptions( bWeb ); + + // get print options to use from provided properties + rOptions.bPrintGraphic = pOpt->IsPrintGraphics(); + rOptions.bPrintTable = pOpt->IsPrintTables(); + rOptions.bPrintDraw = pOpt->IsPrintDrawings(); + rOptions.bPrintControl = pOpt->IsPrintFormControls(); + rOptions.bPrintLeftPages = pOpt->IsPrintLeftPages(); + rOptions.bPrintRightPages = pOpt->IsPrintRightPages(); + rOptions.bPrintPageBackground = pOpt->IsPrintPageBackground(); + rOptions.bPrintEmptyPages = pOpt->IsPrintEmptyPages( bIsPDFExport ); + // bUpdateFieldsInPrinting <-- not set here; mail merge only + rOptions.bPaperFromSetup = pOpt->IsPaperFromSetup(); + rOptions.bPrintReverse = pOpt->IsPrintReverse(); + rOptions.bPrintProspect = pOpt->IsPrintProspect(); + rOptions.bPrintProspectRTL = pOpt->IsPrintProspectRTL(); + // bPrintSingleJobs <-- not set here; mail merge and or configuration + // bModified <-- not set here; mail merge only + rOptions.bPrintBlackFont = pOpt->IsPrintWithBlackTextColor(); + rOptions.bPrintHiddenText = pOpt->IsPrintHiddenText(); + rOptions.bPrintTextPlaceholder = pOpt->IsPrintTextPlaceholders(); + rOptions.nPrintPostIts = pOpt->GetPrintPostItsType(); + + //! needs to be set after MakeOptions since the assignment operation in that + //! function will destroy the pointers + rOptions.SetPrintUIOptions( pOpt ); + rOptions.SetRenderData( pData ); + + // rOptions.aMulti is not used anymore in the XRenderable API + // Thus we set it to a dummy value here. + rOptions.aMulti = MultiSelection( Range( 1, 1 ) ); + + //! Note: Since for PDF export of (multi-)selection a temporary + //! document is created that contains only the selects parts, + //! and thus that document is to printed in whole the, + //! rOptions.bPrintSelection parameter will be false. + if (bIsPDFExport) + rOptions.bPrintSelection = FALSE; +} + + +////////////////////////////////////////////////////////////////////// + +SwPrintUIOptions::SwPrintUIOptions( + bool bWeb, + bool bSwSrcView, + bool bHasSelection, + bool bHasPostIts, + const SwPrintData &rDefaultPrintData ) : + m_pLast( NULL ), + m_rDefaultPrintData( rDefaultPrintData ) +{ + ResStringArray aLocalizedStrings( SW_RES( STR_PRINTOPTUI ) ); + + DBG_ASSERT( aLocalizedStrings.Count() >= 44, "resource incomplete" ); + if( aLocalizedStrings.Count() < 44 ) // bad resource ? + return; + + // printing HTML sources does not have any valid UI options. + // Its just the source code that gets printed ... + if (bSwSrcView) + { + m_aUIProperties.realloc( 0 ); + return; + } + + // check if CTL is enabled + SvtLanguageOptions aLangOpt; + bool bCTL = aLangOpt.IsCTLFontEnabled(); + + // create sequence of print UI options + // (5 options are not available for Writer-Web) + const int nCTLOpts = bCTL ? 1 : 0; + const int nNumProps = nCTLOpts + (bWeb ? 14 : 20); + m_aUIProperties.realloc( nNumProps ); + int nIdx = 0; + + // create "writer" section (new tab page in dialog) + SvtModuleOptions aModOpt; + String aAppGroupname( aLocalizedStrings.GetString( 0 ) ); + aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), + aModOpt.GetModuleName( SvtModuleOptions::E_SWRITER ) ); + m_aUIProperties[ nIdx++ ].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() ); + + // create sub section for Contents + m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() ); + + // create a bool option for background + bool bDefaultVal = rDefaultPrintData.IsPrintPageBackground(); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 2 ), + aLocalizedStrings.GetString( 3 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPageBackground" ) ), + bDefaultVal ); + + // create a bool option for pictures/graphics AND OLE and drawing objects as well + bDefaultVal = rDefaultPrintData.IsPrintGraphic() || rDefaultPrintData.IsPrintDraw(); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ), + aLocalizedStrings.GetString( 5 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPicturesAndObjects" ) ), + bDefaultVal ); + if (!bWeb) + { + // create a bool option for hidden text + bDefaultVal = rDefaultPrintData.IsPrintHiddenText(); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 6 ), + aLocalizedStrings.GetString( 7 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintHiddenText" ) ), + bDefaultVal ); + + // create a bool option for place holder + bDefaultVal = rDefaultPrintData.IsPrintTextPlaceholder(); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 8 ), + aLocalizedStrings.GetString( 9 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintTextPlaceholder" ) ), + bDefaultVal ); + } + + // create a bool option for controls + bDefaultVal = rDefaultPrintData.IsPrintControl(); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 10 ), + aLocalizedStrings.GetString( 11 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintControls" ) ), + bDefaultVal ); + + // create sub section for Color + m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 12 ), rtl::OUString() ); + + // create a bool option for printing text with black font color + bDefaultVal = rDefaultPrintData.IsPrintBlackFont(); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 13 ), + aLocalizedStrings.GetString( 14 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintBlackFonts" ) ), + bDefaultVal ); + + if (!bWeb) + { + // create subgroup for misc options + m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 15 ) ), rtl::OUString() ); + + // create a bool option for printing automatically inserted blank pages + bDefaultVal = rDefaultPrintData.IsPrintEmptyPages(); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 16 ), + aLocalizedStrings.GetString( 17 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintEmptyPages" ) ), + bDefaultVal ); + } + + // create a bool option for paper tray + bDefaultVal = rDefaultPrintData.IsPaperFromSetup(); + vcl::PrinterOptionsHelper::UIControlOptions aPaperTrayOpt; + aPaperTrayOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OptionsPageOptGroup" ) ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 18 ), + aLocalizedStrings.GetString( 19 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPaperFromSetup" ) ), + bDefaultVal, + aPaperTrayOpt + ); + + // print range selection + vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt; + aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) ); + aPrintRangeOpt.mbInternalOnly = sal_True; + m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 37 ) ), + rtl::OUString(), + aPrintRangeOpt + ); + + // create a choice for the content to create + rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ); + uno::Sequence< rtl::OUString > aChoices( bHasSelection ? 3 : 2 ); + uno::Sequence< rtl::OUString > aHelpText( bHasSelection ? 3 : 2 ); + aChoices[0] = aLocalizedStrings.GetString( 38 ); + aHelpText[0] = aLocalizedStrings.GetString( 39 ); + aChoices[1] = aLocalizedStrings.GetString( 40 ); + aHelpText[1] = aLocalizedStrings.GetString( 41 ); + if (bHasSelection) + { + aChoices[2] = aLocalizedStrings.GetString( 42 ); + aHelpText[2] = aLocalizedStrings.GetString( 43 ); + } + m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(), + aHelpText, + aPrintRangeName, + aChoices, + bHasSelection ? 2 /*enable 'Selection' radio button*/ : 0 /* enable 'All pages' */); + // create a an Edit dependent on "Pages" selected + vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True ); + m_aUIProperties[nIdx++].Value = getEditControlOpt( rtl::OUString(), + rtl::OUString(), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ), + rtl::OUString(), + aPageRangeOpt + ); + // print content selection + vcl::PrinterOptionsHelper::UIControlOptions aContentsOpt; + aContentsOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobPage" ) ); + m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 20 ) ), + rtl::OUString(), + aContentsOpt + ); + // create a list box for notes content + const sal_Int16 nPrintPostIts = rDefaultPrintData.GetPrintPostIts(); + aChoices.realloc( 4 ); + aChoices[0] = aLocalizedStrings.GetString( 21 ); + aChoices[1] = aLocalizedStrings.GetString( 22 ); + aChoices[2] = aLocalizedStrings.GetString( 23 ); + aChoices[3] = aLocalizedStrings.GetString( 24 ); + aHelpText.realloc( 2 ); + aHelpText[0] = aLocalizedStrings.GetString( 25 ); + aHelpText[1] = aLocalizedStrings.GetString( 25 ); + vcl::PrinterOptionsHelper::UIControlOptions aAnnotOpt( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ), 0, sal_False ); + aAnnotOpt.mbEnabled = bHasPostIts; + m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 26 ), + aHelpText, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintAnnotationMode" ) ), + aChoices, + nPrintPostIts, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), + aAnnotOpt + ); + + // create subsection for Page settings + vcl::PrinterOptionsHelper::UIControlOptions aPageSetOpt; + aPageSetOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutPage" ) ); + + if (!bWeb) + { + m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 27 ) ), + rtl::OUString(), + aPageSetOpt + ); + uno::Sequence< rtl::OUString > aRLChoices( 3 ); + aRLChoices[0] = aLocalizedStrings.GetString( 28 ); + aRLChoices[1] = aLocalizedStrings.GetString( 29 ); + aRLChoices[2] = aLocalizedStrings.GetString( 30 ); + uno::Sequence< rtl::OUString > aRLHelp( 1 ); + aRLHelp[0] = aLocalizedStrings.GetString( 31 ); + // create a choice option for all/left/right pages + // 0 : all pages (left & right) + // 1 : left pages + // 2 : right pages + DBG_ASSERT( rDefaultPrintData.IsPrintLeftPage() || rDefaultPrintData.IsPrintRightPage(), + "unexpected value combination" ); + sal_Int16 nPagesChoice = 0; + if (rDefaultPrintData.IsPrintLeftPage() && !rDefaultPrintData.IsPrintRightPage()) + nPagesChoice = 1; + else if (!rDefaultPrintData.IsPrintLeftPage() && rDefaultPrintData.IsPrintRightPage()) + nPagesChoice = 2; + m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 32 ), + aRLHelp, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintLeftRightPages" ) ), + aRLChoices, + nPagesChoice, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ) + ); + } + + // create a bool option for brochure + bDefaultVal = rDefaultPrintData.IsPrintProspect(); + rtl::OUString aBrochurePropertyName( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 33 ), + aLocalizedStrings.GetString( 34 ), + aBrochurePropertyName, + bDefaultVal, + aPageSetOpt + ); + + if (bCTL) + { + // create a bool option for brochure RTL dependent on brochure + uno::Sequence< rtl::OUString > aBRTLChoices( 2 ); + aBRTLChoices[0] = aLocalizedStrings.GetString( 35 ); + aBRTLChoices[1] = aLocalizedStrings.GetString( 36 ); + vcl::PrinterOptionsHelper::UIControlOptions aBrochureRTLOpt( aBrochurePropertyName, -1, sal_True ); + aBrochureRTLOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutPage" ) ); + // RTL brochure choices + // 0 : left-to-right + // 1 : right-to-left + const sal_Int16 nBRTLChoice = rDefaultPrintData.IsPrintProspectRTL() ? 1 : 0; + m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( rtl::OUString(), + uno::Sequence< rtl::OUString >(), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspectRTL" ) ), + aBRTLChoices, + nBRTLChoice, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), + aBrochureRTLOpt + ); + } + + + DBG_ASSERT( nIdx == nNumProps, "number of added properties is not as expected" ); +} + + +SwPrintUIOptions::~SwPrintUIOptions() +{ +} + +bool SwPrintUIOptions::IsPrintLeftPages() const +{ + // take care of different property names for the option. + // for compatibility the old name should win (may still be used for PDF export or via Uno API) + + // 0: left and right pages + // 1: left pages only + // 2: right pages only + sal_Int64 nLRPages = getIntValue( "PrintLeftRightPages", 0 /* default: all */ ); + bool bRes = nLRPages == 0 || nLRPages == 1; + bRes = getBoolValue( "PrintLeftPages", bRes /* <- default value if property is not found */ ); + return bRes; +} + +bool SwPrintUIOptions::IsPrintRightPages() const +{ + // take care of different property names for the option. + // for compatibility the old name should win (may still be used for PDF export or via Uno API) + + sal_Int64 nLRPages = getIntValue( "PrintLeftRightPages", 0 /* default: all */ ); + bool bRes = nLRPages == 0 || nLRPages == 2; + bRes = getBoolValue( "PrintRightPages", bRes /* <- default value if property is not found */ ); + return bRes; +} + +bool SwPrintUIOptions::IsPrintEmptyPages( bool bIsPDFExport ) const +{ + // take care of different property names for the option. + + bool bRes = bIsPDFExport ? + !getBoolValue( "IsSkipEmptyPages", sal_True ) : + getBoolValue( "PrintEmptyPages", sal_True ); + return bRes; +} + +bool SwPrintUIOptions::IsPrintTables() const +{ + // take care of different property names currently in use for this option. + // for compatibility the old name should win (may still be used for PDF export or via Uno API) + +// bool bRes = getBoolValue( "PrintTablesGraphicsAndDiagrams", sal_True ); +// bRes = getBoolValue( "PrintTables", bRes ); +// return bRes; + // for now it was decided that tables should always be printed + return true; +} + +bool SwPrintUIOptions::IsPrintGraphics() const +{ + // take care of different property names for the option. + // for compatibility the old name should win (may still be used for PDF export or via Uno API) + + bool bRes = getBoolValue( "PrintPicturesAndObjects", sal_True ); + bRes = getBoolValue( "PrintGraphics", bRes ); + return bRes; +} + +bool SwPrintUIOptions::IsPrintDrawings() const +{ + // take care of different property names for the option. + // for compatibility the old name should win (may still be used for PDF export or via Uno API) + + bool bRes = getBoolValue( "PrintPicturesAndObjects", sal_True ); + bRes = getBoolValue( "PrintDrawings", bRes ); + return bRes; +} + +bool SwPrintUIOptions::processPropertiesAndCheckFormat( const uno::Sequence< beans::PropertyValue >& i_rNewProp ) +{ + bool bChanged = processProperties( i_rNewProp ); + + uno::Reference< awt::XDevice > xRenderDevice; + uno::Any aVal( getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RenderDevice" ) ) ) ); + aVal >>= xRenderDevice; + + OutputDevice* pOut = 0; + if (xRenderDevice.is()) + { + VCLXDevice* pDevice = VCLXDevice::GetImplementation( xRenderDevice ); + pOut = pDevice ? pDevice->GetOutputDevice() : 0; + } + bChanged = bChanged || (pOut != m_pLast); + if( pOut ) + m_pLast = pOut; + + return bChanged; +} + +////////////////////////////////////////////////////////////////////// + diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index 8e3ea79a28..d4f2d67064 100755 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -35,35 +35,27 @@ #include #include +#include +#include #include -#include -#include -#include -#include -#include #include -#include -#include - -#include #include +#include #include +#include #include #include #include +#include +#include #include - #include -#include - -#include -#include +#include +#include #include - #include -#include #include #include #include @@ -87,9 +79,7 @@ #include #include // fuer RES_POOLPAGE_JAKET #include // Ansteuern der Statusleiste -#ifndef _STATSTR_HRC #include // -- " -- -#endif #include #include #include // MinPrtLine @@ -97,13 +87,6 @@ #include // SwFmtPageDesc #include -#define JOBSET_ERR_DEFAULT 0 -#define JOBSET_ERR_ERROR 1 -#define JOBSET_ERR_ISSTARTET 2 - - -extern bool lcl_GetPostIts( IDocumentFieldsAccess* pIDFA, _SetGetExpFlds * pSrtLst ); - using namespace ::com::sun::star; @@ -214,505 +197,6 @@ void SwPaintQueue::Remove( ViewShell *pSh ) } } -/*****************************************************************************/ - -const XubString& SwPrtOptions::MakeNextJobName() -{ - static char __READONLY_DATA sDelim[] = " - "; - USHORT nDelim = sJobName.SearchAscii( sDelim ); - if( STRING_NOTFOUND == nDelim ) - sJobName.AppendAscii(sDelim); - else - sJobName.Erase( nDelim + 3/*Zeichen!*/ ); - - return sJobName += XubString::CreateFromInt32( ++nJobNo ); -} - -/*****************************************************************************/ - -SwRenderData::SwRenderData() -{ - m_pPostItFields = 0; - m_pPostItDoc = 0; - m_pPostItShell = 0; - - m_pViewOptionAdjust = 0; - m_pPrtOptions = 0; -} - - -SwRenderData::~SwRenderData() -{ - delete m_pViewOptionAdjust; m_pViewOptionAdjust = 0; - delete m_pPrtOptions; m_pPrtOptions = 0; - DBG_ASSERT( !m_pPostItShell, "m_pPostItShell should already have been deleted" ); - DBG_ASSERT( !m_pPostItDoc, "m_pPostItDoc should already have been deleted" ); - DBG_ASSERT( !m_pPostItFields, " should already have been deleted" ); -} - - -void SwRenderData::CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev ) -{ - DBG_ASSERT( !m_pPostItFields && !m_pPostItDoc && !m_pPostItShell, "some post-it data already exists" ); - m_pPostItFields = new _SetGetExpFlds; - lcl_GetPostIts( pDoc, m_pPostItFields ); - m_pPostItDoc = new SwDoc; - - //!! Disable spell and grammar checking in the temporary document. - //!! Otherwise the grammar checker might process it and crash if we later on - //!! simply delete this document while he is still at it. - SwViewOption aViewOpt( *pViewOpt ); - aViewOpt.SetOnlineSpell( FALSE ); - - m_pPostItShell = new ViewShell( *m_pPostItDoc, 0, &aViewOpt, pOutDev ); -} - - -void SwRenderData::DeletePostItData() -{ - if (HasPostItData()) - { - m_pPostItDoc->setPrinter( 0, false, false ); //damit am echten DOC der Drucker bleibt - delete m_pPostItShell; //Nimmt das PostItDoc mit ins Grab. - delete m_pPostItFields; - m_pPostItDoc = 0; - m_pPostItShell = 0; - m_pPostItFields = 0; - } -} - -bool SwRenderData::NeedNewViewOptionAdjust( const SwWrtShell& rCompare ) const -{ - return m_pViewOptionAdjust ? ! m_pViewOptionAdjust->checkShell( rCompare ) : true; -} - - -void SwRenderData::ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &rViewOptions ) -{ - if (m_pViewOptionAdjust) - { - DBG_ASSERT( 0, "error: there should be no ViewOptionAdjust active when calling this function" ); - } - m_pViewOptionAdjust = new SwViewOptionAdjust_Impl( rSh, rViewOptions ); -} - - -void SwRenderData::ViewOptionAdjust( const SwPrtOptions *pPrtOptions ) -{ - m_pViewOptionAdjust->AdjustViewOptions( pPrtOptions ); -} - - -void SwRenderData::ViewOptionAdjustStop() -{ - if (m_pViewOptionAdjust) - { - delete m_pViewOptionAdjust; - m_pViewOptionAdjust = 0; - } -} - - -void SwRenderData::MakeSwPrtOptions( - SwPrtOptions &rOptions, - const SwDocShell *pDocShell, - const SwPrintUIOptions *pOpt, - const SwRenderData *pData, - bool bIsPDFExport ) -{ - if (!pDocShell || !pOpt || !pData) - return; - - // get default print options - const TypeId aSwWebDocShellTypeId = TYPE(SwWebDocShell); - BOOL bWeb = pDocShell->IsA( aSwWebDocShellTypeId ); - rOptions.MakeOptions( bWeb ); - - // get print options to use from provided properties - rOptions.bPrintGraphic = pOpt->IsPrintGraphics(); - rOptions.bPrintTable = pOpt->IsPrintTables(); - rOptions.bPrintDraw = pOpt->IsPrintDrawings(); - rOptions.bPrintControl = pOpt->IsPrintFormControls(); - rOptions.bPrintLeftPages = pOpt->IsPrintLeftPages(); - rOptions.bPrintRightPages = pOpt->IsPrintRightPages(); - rOptions.bPrintPageBackground = pOpt->IsPrintPageBackground(); - rOptions.bPrintEmptyPages = pOpt->IsPrintEmptyPages( bIsPDFExport ); - // bUpdateFieldsInPrinting <-- not set here; mail merge only - rOptions.bPaperFromSetup = pOpt->IsPaperFromSetup(); - rOptions.bPrintReverse = pOpt->IsPrintReverse(); - rOptions.bPrintProspect = pOpt->IsPrintProspect(); - rOptions.bPrintProspectRTL = pOpt->IsPrintProspectRTL(); - // bPrintSingleJobs <-- not set here; mail merge and or configuration - // bModified <-- not set here; mail merge only - rOptions.bPrintBlackFont = pOpt->IsPrintWithBlackTextColor(); - rOptions.bPrintHiddenText = pOpt->IsPrintHiddenText(); - rOptions.bPrintTextPlaceholder = pOpt->IsPrintTextPlaceholders(); - rOptions.nPrintPostIts = pOpt->GetPrintPostItsType(); - - //! needs to be set after MakeOptions since the assignment operation in that - //! function will destroy the pointers - rOptions.SetPrintUIOptions( pOpt ); - rOptions.SetRenderData( pData ); - - // rOptions.aMulti is not used anymore in the XRenderable API - // Thus we set it to a dummy value here. - rOptions.aMulti = MultiSelection( Range( 1, 1 ) ); - - //! Note: Since for PDF export of (multi-)selection a temporary - //! document is created that contains only the selects parts, - //! and thus that document is to printed in whole the, - //! rOptions.bPrintSelection parameter will be false. - if (bIsPDFExport) - rOptions.bPrintSelection = FALSE; -} - - -/*****************************************************************************/ - -SwPrintUIOptions::SwPrintUIOptions( - bool bWeb, - bool bSwSrcView, - bool bHasSelection, - bool bHasPostIts, - const SwPrintData &rDefaultPrintData ) : - m_pLast( NULL ), - m_rDefaultPrintData( rDefaultPrintData ) -{ - ResStringArray aLocalizedStrings( SW_RES( STR_PRINTOPTUI ) ); - - DBG_ASSERT( aLocalizedStrings.Count() >= 44, "resource incomplete" ); - if( aLocalizedStrings.Count() < 44 ) // bad resource ? - return; - - // printing HTML sources does not have any valid UI options. - // Its just the source code that gets printed ... - if (bSwSrcView) - { - m_aUIProperties.realloc( 0 ); - return; - } - - // check if CTL is enabled - SvtLanguageOptions aLangOpt; - bool bCTL = aLangOpt.IsCTLFontEnabled(); - - // create sequence of print UI options - // (5 options are not available for Writer-Web) - const int nCTLOpts = bCTL ? 1 : 0; - const int nNumProps = nCTLOpts + (bWeb ? 14 : 20); - m_aUIProperties.realloc( nNumProps ); - int nIdx = 0; - - // create "writer" section (new tab page in dialog) - SvtModuleOptions aModOpt; - String aAppGroupname( aLocalizedStrings.GetString( 0 ) ); - aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), - aModOpt.GetModuleName( SvtModuleOptions::E_SWRITER ) ); - m_aUIProperties[ nIdx++ ].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() ); - - // create sub section for Contents - m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() ); - - // create a bool option for background - bool bDefaultVal = rDefaultPrintData.IsPrintPageBackground(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 2 ), - aLocalizedStrings.GetString( 3 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPageBackground" ) ), - bDefaultVal ); - - // create a bool option for pictures/graphics AND OLE and drawing objects as well - bDefaultVal = rDefaultPrintData.IsPrintGraphic() || rDefaultPrintData.IsPrintDraw(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ), - aLocalizedStrings.GetString( 5 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPicturesAndObjects" ) ), - bDefaultVal ); - if (!bWeb) - { - // create a bool option for hidden text - bDefaultVal = rDefaultPrintData.IsPrintHiddenText(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 6 ), - aLocalizedStrings.GetString( 7 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintHiddenText" ) ), - bDefaultVal ); - - // create a bool option for place holder - bDefaultVal = rDefaultPrintData.IsPrintTextPlaceholder(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 8 ), - aLocalizedStrings.GetString( 9 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintTextPlaceholder" ) ), - bDefaultVal ); - } - - // create a bool option for controls - bDefaultVal = rDefaultPrintData.IsPrintControl(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 10 ), - aLocalizedStrings.GetString( 11 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintControls" ) ), - bDefaultVal ); - - // create sub section for Color - m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 12 ), rtl::OUString() ); - - // create a bool option for printing text with black font color - bDefaultVal = rDefaultPrintData.IsPrintBlackFont(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 13 ), - aLocalizedStrings.GetString( 14 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintBlackFonts" ) ), - bDefaultVal ); - - if (!bWeb) - { - // create subgroup for misc options - m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 15 ) ), rtl::OUString() ); - - // create a bool option for printing automatically inserted blank pages - bDefaultVal = rDefaultPrintData.IsPrintEmptyPages(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 16 ), - aLocalizedStrings.GetString( 17 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintEmptyPages" ) ), - bDefaultVal ); - } - - // create a bool option for paper tray - bDefaultVal = rDefaultPrintData.IsPaperFromSetup(); - vcl::PrinterOptionsHelper::UIControlOptions aPaperTrayOpt; - aPaperTrayOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OptionsPageOptGroup" ) ); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 18 ), - aLocalizedStrings.GetString( 19 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPaperFromSetup" ) ), - bDefaultVal, - aPaperTrayOpt - ); - - // print range selection - vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt; - aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) ); - aPrintRangeOpt.mbInternalOnly = sal_True; - m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 37 ) ), - rtl::OUString(), - aPrintRangeOpt - ); - - // create a choice for the content to create - rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ); - uno::Sequence< rtl::OUString > aChoices( bHasSelection ? 3 : 2 ); - uno::Sequence< rtl::OUString > aHelpText( bHasSelection ? 3 : 2 ); - aChoices[0] = aLocalizedStrings.GetString( 38 ); - aHelpText[0] = aLocalizedStrings.GetString( 39 ); - aChoices[1] = aLocalizedStrings.GetString( 40 ); - aHelpText[1] = aLocalizedStrings.GetString( 41 ); - if (bHasSelection) - { - aChoices[2] = aLocalizedStrings.GetString( 42 ); - aHelpText[2] = aLocalizedStrings.GetString( 43 ); - } - m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(), - aHelpText, - aPrintRangeName, - aChoices, - bHasSelection ? 2 /*enable 'Selection' radio button*/ : 0 /* enable 'All pages' */); - // create a an Edit dependent on "Pages" selected - vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True ); - m_aUIProperties[nIdx++].Value = getEditControlOpt( rtl::OUString(), - rtl::OUString(), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ), - rtl::OUString(), - aPageRangeOpt - ); - // print content selection - vcl::PrinterOptionsHelper::UIControlOptions aContentsOpt; - aContentsOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobPage" ) ); - m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 20 ) ), - rtl::OUString(), - aContentsOpt - ); - // create a list box for notes content - const sal_Int16 nPrintPostIts = rDefaultPrintData.GetPrintPostIts(); - aChoices.realloc( 4 ); - aChoices[0] = aLocalizedStrings.GetString( 21 ); - aChoices[1] = aLocalizedStrings.GetString( 22 ); - aChoices[2] = aLocalizedStrings.GetString( 23 ); - aChoices[3] = aLocalizedStrings.GetString( 24 ); - aHelpText.realloc( 2 ); - aHelpText[0] = aLocalizedStrings.GetString( 25 ); - aHelpText[1] = aLocalizedStrings.GetString( 25 ); - vcl::PrinterOptionsHelper::UIControlOptions aAnnotOpt( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ), 0, sal_False ); - aAnnotOpt.mbEnabled = bHasPostIts; - m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 26 ), - aHelpText, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintAnnotationMode" ) ), - aChoices, - nPrintPostIts, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), - aAnnotOpt - ); - - // create subsection for Page settings - vcl::PrinterOptionsHelper::UIControlOptions aPageSetOpt; - aPageSetOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutPage" ) ); - - if (!bWeb) - { - m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 27 ) ), - rtl::OUString(), - aPageSetOpt - ); - uno::Sequence< rtl::OUString > aRLChoices( 3 ); - aRLChoices[0] = aLocalizedStrings.GetString( 28 ); - aRLChoices[1] = aLocalizedStrings.GetString( 29 ); - aRLChoices[2] = aLocalizedStrings.GetString( 30 ); - uno::Sequence< rtl::OUString > aRLHelp( 1 ); - aRLHelp[0] = aLocalizedStrings.GetString( 31 ); - // create a choice option for all/left/right pages - // 0 : all pages (left & right) - // 1 : left pages - // 2 : right pages - DBG_ASSERT( rDefaultPrintData.IsPrintLeftPage() || rDefaultPrintData.IsPrintRightPage(), - "unexpected value combination" ); - sal_Int16 nPagesChoice = 0; - if (rDefaultPrintData.IsPrintLeftPage() && !rDefaultPrintData.IsPrintRightPage()) - nPagesChoice = 1; - else if (!rDefaultPrintData.IsPrintLeftPage() && rDefaultPrintData.IsPrintRightPage()) - nPagesChoice = 2; - m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 32 ), - aRLHelp, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintLeftRightPages" ) ), - aRLChoices, - nPagesChoice, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ) - ); - } - - // create a bool option for brochure - bDefaultVal = rDefaultPrintData.IsPrintProspect(); - rtl::OUString aBrochurePropertyName( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 33 ), - aLocalizedStrings.GetString( 34 ), - aBrochurePropertyName, - bDefaultVal, - aPageSetOpt - ); - - if (bCTL) - { - // create a bool option for brochure RTL dependent on brochure - uno::Sequence< rtl::OUString > aBRTLChoices( 2 ); - aBRTLChoices[0] = aLocalizedStrings.GetString( 35 ); - aBRTLChoices[1] = aLocalizedStrings.GetString( 36 ); - vcl::PrinterOptionsHelper::UIControlOptions aBrochureRTLOpt( aBrochurePropertyName, -1, sal_True ); - aBrochureRTLOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutPage" ) ); - // RTL brochure choices - // 0 : left-to-right - // 1 : right-to-left - const sal_Int16 nBRTLChoice = rDefaultPrintData.IsPrintProspectRTL() ? 1 : 0; - m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( rtl::OUString(), - uno::Sequence< rtl::OUString >(), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspectRTL" ) ), - aBRTLChoices, - nBRTLChoice, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), - aBrochureRTLOpt - ); - } - - - DBG_ASSERT( nIdx == nNumProps, "number of added properties is not as expected" ); -} - - -SwPrintUIOptions::~SwPrintUIOptions() -{ -} - -bool SwPrintUIOptions::IsPrintLeftPages() const -{ - // take care of different property names for the option. - // for compatibility the old name should win (may still be used for PDF export or via Uno API) - - // 0: left and right pages - // 1: left pages only - // 2: right pages only - sal_Int64 nLRPages = getIntValue( "PrintLeftRightPages", 0 /* default: all */ ); - bool bRes = nLRPages == 0 || nLRPages == 1; - bRes = getBoolValue( "PrintLeftPages", bRes /* <- default value if property is not found */ ); - return bRes; -} - -bool SwPrintUIOptions::IsPrintRightPages() const -{ - // take care of different property names for the option. - // for compatibility the old name should win (may still be used for PDF export or via Uno API) - - sal_Int64 nLRPages = getIntValue( "PrintLeftRightPages", 0 /* default: all */ ); - bool bRes = nLRPages == 0 || nLRPages == 2; - bRes = getBoolValue( "PrintRightPages", bRes /* <- default value if property is not found */ ); - return bRes; -} - -bool SwPrintUIOptions::IsPrintEmptyPages( bool bIsPDFExport ) const -{ - // take care of different property names for the option. - - bool bRes = bIsPDFExport ? - !getBoolValue( "IsSkipEmptyPages", sal_True ) : - getBoolValue( "PrintEmptyPages", sal_True ); - return bRes; -} - -bool SwPrintUIOptions::IsPrintTables() const -{ - // take care of different property names currently in use for this option. - // for compatibility the old name should win (may still be used for PDF export or via Uno API) - -// bool bRes = getBoolValue( "PrintTablesGraphicsAndDiagrams", sal_True ); -// bRes = getBoolValue( "PrintTables", bRes ); -// return bRes; - // for now it was decided that tables should always be printed - return true; -} - -bool SwPrintUIOptions::IsPrintGraphics() const -{ - // take care of different property names for the option. - // for compatibility the old name should win (may still be used for PDF export or via Uno API) - - bool bRes = getBoolValue( "PrintPicturesAndObjects", sal_True ); - bRes = getBoolValue( "PrintGraphics", bRes ); - return bRes; -} - -bool SwPrintUIOptions::IsPrintDrawings() const -{ - // take care of different property names for the option. - // for compatibility the old name should win (may still be used for PDF export or via Uno API) - - bool bRes = getBoolValue( "PrintPicturesAndObjects", sal_True ); - bRes = getBoolValue( "PrintDrawings", bRes ); - return bRes; -} - -bool SwPrintUIOptions::processPropertiesAndCheckFormat( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& i_rNewProp ) -{ - bool bChanged = processProperties( i_rNewProp ); - - uno::Reference< awt::XDevice > xRenderDevice; - uno::Any aVal( getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RenderDevice" ) ) ) ); - aVal >>= xRenderDevice; - - OutputDevice* pOut = 0; - if (xRenderDevice.is()) - { - VCLXDevice* pDevice = VCLXDevice::GetImplementation( xRenderDevice ); - pOut = pDevice ? pDevice->GetOutputDevice() : 0; - } - bChanged = bChanged || (pOut != m_pLast); - if( pOut ) - m_pLast = pOut; - - return bChanged; -} - - /****************************************************************************** * Methode : void SetSwVisArea( ViewShell *pSh, Point aPrtOffset, ... * Beschreibung: @@ -856,33 +340,6 @@ void ViewShell::ChgAllPageSize( Size &rSz ) } -void lcl_SetState( SfxProgress& rProgress, ULONG nPage, ULONG nMax, - const XubString *pStr, ULONG nAct, ULONG nCnt, ULONG nOffs, ULONG nPageNo ) -{ - XubString aTmp = XubString::CreateFromInt64( nPageNo ); - if( pStr ) - { - aTmp += ' '; - aTmp += *pStr; - if( nCnt ) - { - nMax *= 2; - rProgress.SetStateText( (nAct-1)*nMax+nPage+nOffs, - aTmp, nCnt*nMax ); - } - else - rProgress.SetStateText( nPage, aTmp, nMax ); - } - else - { - aTmp += ' '; aTmp += '('; aTmp += XubString::CreateFromInt64( nPage ); - aTmp += '/'; aTmp += XubString::CreateFromInt64( nMax ); aTmp += ')'; - rProgress.SetStateText( nPage, aTmp, nMax ); - } -} - - - void ViewShell::CalcPagesForPrint( USHORT nMax ) { SET_CURR_SHELL( this ); @@ -1403,3 +860,4 @@ void ViewShell::PrepareForPrint( const SwPrintData &rOptions ) } } } + diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx old mode 100644 new mode 100755 index 405473c870..cd2d5f7945 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2818,6 +2818,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( m_pPrintUIOptions->processProperties( rxOptions ); const bool bPrintProspect = m_pPrintUIOptions->getBoolValue( "PrintProspect", false ); const bool bIsSkipEmptyPages = !m_pPrintUIOptions->IsPrintEmptyPages( bIsPDFExport ); + const bool bPrintPaperFromSetup = m_pPrintUIOptions->getBoolValue( "PrintPaperFromSetup", false ); SwDoc *pDoc = GetRenderDoc( pView, rSelection, bIsPDFExport ); DBG_ASSERT( pDoc && pView, "doc or view shell missing!" ); @@ -2845,6 +2846,26 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( uno::Sequence< beans::PropertyValue > aRenderer; if (m_pRenderData) { + const USHORT nPage = nRenderer + 1; + + // get paper tray to use ... + sal_Int32 nPrinterPaperTray = -1; + if (bPrintPaperFromSetup) + { + // ... from printer setup + Printer *pPrinter = dynamic_cast< Printer * >(lcl_GetOutputDevice( *m_pPrintUIOptions )); + if (pPrinter) + nPrinterPaperTray = pPrinter->GetPaperBin(); + } + else + { + // ... from individual page style (see the page tab in Format/Page dialog) + const std::map< sal_Int32, sal_Int32 > &rPaperTrays = m_pRenderData->GetPrinterPaperTrays(); + std::map< sal_Int32, sal_Int32 >::const_iterator aIt( rPaperTrays.find( nPage ) ); + if (aIt != rPaperTrays.end()) + nPrinterPaperTray = aIt->second; + } + awt::Size aPageSize; awt::Size aPreferredPageSize; Size aTmpSize; @@ -2874,7 +2895,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( // we just state what output size we would need // which may cause vcl to set that page size on the printer // (if available and not overriden by the user) - aTmpSize = pDoc->GetPageSize( USHORT(nRenderer + 1), bIsSkipEmptyPages ); + aTmpSize = pDoc->GetPageSize( nPage, bIsSkipEmptyPages ); aPreferredPageSize = awt::Size ( TWIP_TO_MM100( 2 * aTmpSize.Width() ), TWIP_TO_MM100( aTmpSize.Height() )); } @@ -2882,22 +2903,31 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( } else { - aTmpSize = pDoc->GetPageSize( USHORT(nRenderer + 1), bIsSkipEmptyPages ); + aTmpSize = pDoc->GetPageSize( nPage, bIsSkipEmptyPages ); aPageSize = awt::Size ( TWIP_TO_MM100( aTmpSize.Width() ), TWIP_TO_MM100( aTmpSize.Height() )); } + sal_Int32 nLen = 2; aRenderer.realloc(2); aRenderer[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ); aRenderer[0].Value <<= aPageSize; aRenderer[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageIncludesNonprintableArea" ) ); aRenderer[1].Value <<= sal_True; - if( aPreferredPageSize.Width && aPreferredPageSize.Height ) + if (aPreferredPageSize.Width && aPreferredPageSize.Height) { - aRenderer.realloc(3); - aRenderer[2].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PreferredPageSize" ) ); - aRenderer[2].Value <<= aPreferredPageSize; + ++nLen; + aRenderer.realloc( nLen ); + aRenderer[ nLen - 1 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PreferredPageSize" ) ); + aRenderer[ nLen - 1 ].Value <<= aPreferredPageSize; } + if (nPrinterPaperTray >= 0) + { + ++nLen; + aRenderer.realloc( nLen ); + aRenderer[ nLen - 1 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PrinterPaperTray" ) ); + aRenderer[ nLen - 1 ].Value <<= nPrinterPaperTray; + } } m_pPrintUIOptions->appendPrintUIOptions( aRenderer ); -- cgit v1.2.3 From bad10880eb6d346b280af6c55519a4b3c0c442cc Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 16 Feb 2010 15:46:24 +0100 Subject: #i109267# assertion removed --- sw/source/core/view/viewsh.cxx | 2 -- 1 file changed, 2 deletions(-) mode change 100644 => 100755 sw/source/core/view/viewsh.cxx (limited to 'sw/source') diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx old mode 100644 new mode 100755 index 7d280ff1b6..f48208d8a9 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -2282,8 +2282,6 @@ void ViewShell::ApplyViewOptions( const SwViewOption &rOpt ) void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt ) { - ASSERT( !(*pOpt == rOpt), "ViewShell::ApplyViewOptions: "); - Window *pMyWin = GetWin(); if( !pMyWin ) { -- cgit v1.2.3 From 7472c766250d205aa32dcc31fc312bbb6d910d8e Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 16 Feb 2010 16:03:23 +0100 Subject: #i109267# assertion fixed; quick return introduced --- sw/source/core/view/viewsh.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index f48208d8a9..d383ee3519 100755 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -2282,6 +2282,9 @@ void ViewShell::ApplyViewOptions( const SwViewOption &rOpt ) void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt ) { + if (*pOpt == rOpt) + return; + Window *pMyWin = GetWin(); if( !pMyWin ) { -- cgit v1.2.3 From 39ff68073c8f2c84659bbd3302304f52215be595 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Tue, 16 Feb 2010 17:26:41 +0100 Subject: hb33issues01: #i109284# SwRTFWriter::OutBookmarks: Do not read name of NULL bookmark pointer --- sw/source/filter/rtf/wrtrtf.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx index 65828f6d53..393c5f1d48 100644 --- a/sw/source/filter/rtf/wrtrtf.cxx +++ b/sw/source/filter/rtf/wrtrtf.cxx @@ -1305,8 +1305,17 @@ void SwRTFWriter::OutBookmarks( xub_StrLen nCntntPos) Strm() << '}'; } OutComment( *this, OOO_STRING_SVTOOLS_RTF_BKMKEND ) << ' '; - RTFOutFuncs::Out_String( Strm(), pAsBookmark->GetName(), + + { + ::rtl::OUString aEmpty; + ::rtl::OUString & rBookmarkName = aEmpty; + + if (pAsBookmark) + rBookmarkName = pAsBookmark->GetName(); + + RTFOutFuncs::Out_String( Strm(), rBookmarkName, eDefaultEncoding, bWriteHelpFmt ) << '}'; + } if(++nBkmkTabPos >= pMarkAccess->getMarksCount()) nBkmkTabPos = -1; -- cgit v1.2.3 From 7aa9ec6a9be48c63725ce9abab74d2c8a0b688d0 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 17 Feb 2010 10:06:40 +0100 Subject: sw33a11y01: #i104008# method - notify accessible object about attribute change of paragraph's characters --- sw/inc/viewsh.hxx | 4 +++- sw/source/core/inc/viewimp.hxx | 2 +- sw/source/core/text/txtfrm.cxx | 7 +++++++ 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index 0ed2517ff4..a956c2d5d1 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -560,9 +560,11 @@ public: */ void InvalidateAccessibleParaTextSelection(); - /** invalidate attributes for paragraphs + /** invalidate attributes for paragraphs and paragraph's characters OD 2009-01-06 #i88069# + OD 2010-02-16 #i104008# - usage also for changes of the attributes of + paragraph's characters. @author OD diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx index 8ad084e72b..c0e01a944e 100644 --- a/sw/source/core/inc/viewimp.hxx +++ b/sw/source/core/inc/viewimp.hxx @@ -194,7 +194,7 @@ private: */ void _InvalidateAccessibleParaTextSelection(); - /** invalidate attributes for paragraphs + /** invalidate attributes for paragraphs and paragraph's characters OD 2009-01-06 #i88069# implementation for wrapper method diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 8da2cbf4fb..7f416bfede 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -1031,6 +1031,13 @@ void SwTxtFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ) SET_SCRIPT_INVAL( nPos ) } } + + // --> OD 2010-02-16 #i104008# + if ( GetShell() ) + { + GetShell()->InvalidateAccessibleParaAttrs( *this ); + } + // <-- } break; case RES_OBJECTDYING: -- cgit v1.2.3 From 8ec1d33fe021f0a971bb32c61fedba82a3c00abd Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Wed, 17 Feb 2010 11:06:26 +0100 Subject: hb33patches1: #i109325# applied patch --- sw/source/filter/ww8/ww8scan.cxx | 7 ++----- sw/source/filter/ww8/ww8scan.hxx | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index f5e62d7aad..a277259839 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -2124,7 +2124,7 @@ xub_StrLen WW8ScannerBase::WW8ReadString( SvStream& rStrm, String& rStr, // Bei nStartPos < 0 wird das erste Element des PLCFs genommen WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF, - long nStruct, long nStartPos, bool bNoEnd) + long nStruct, long nStartPos) : nIdx(0), nStru(nStruct) { nIMax = ( nPLCF - 4 ) / ( 4 + nStruct ); @@ -2140,8 +2140,6 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF, pPLCF_PosArray[nIdx] = SWAPLONG( pPLCF_PosArray[nIdx] ); nIdx = 0; #endif // OSL_BIGENDIAN - if( bNoEnd ) - nIMax++; if( nStruct ) // Pointer auf Inhalts-Array pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1]; else @@ -4007,8 +4005,7 @@ WW8PLCFx_Book::WW8PLCFx_Book(SvStream* pTblSt, const WW8Fib& rFib) { pBook[0] = new WW8PLCFspecial(pTblSt,rFib.fcPlcfbkf,rFib.lcbPlcfbkf,4); - pBook[1] = new WW8PLCFspecial( pTblSt, rFib.fcPlcfbkl, rFib.lcbPlcfbkl, - 0, -1, true); + pBook[1] = new WW8PLCFspecial(pTblSt,rFib.fcPlcfbkl,rFib.lcbPlcfbkl,0); rtl_TextEncoding eStructChrSet = WW8Fib::GetFIBCharset(rFib.chseTables); diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index 107bde4aa4..858b9cbeeb 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -223,7 +223,7 @@ private: long nStru; public: WW8PLCFspecial( SvStream* pSt, long nFilePos, long nPLCF, - long nStruct, long nStartPos = -1, bool bNoEnd = false); + long nStruct, long nStartPos = -1 ); ~WW8PLCFspecial() { delete[] pPLCF_PosArray; } long GetIdx() const { return nIdx; } void SetIdx( long nI ) { nIdx = nI; } -- cgit v1.2.3 From 4be6b9fd223e15559c16b09120b48814cdd708d2 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 17 Feb 2010 11:59:30 +0100 Subject: #i108805# patch for crash applied --- sw/source/ui/uno/unotxdoc.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sw/source') diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index cd2d5f7945..19da482149 100755 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -3115,6 +3116,12 @@ void SAL_CALL SwXTextDocument::render( { lcl_DisposeView( m_pHiddenViewFrame, pDocShell ); m_pHiddenViewFrame = 0; + + // prevent crash described in #i108805 + SwDocShell *pRenderDocShell = pDoc->GetDocShell(); + SfxItemSet *pSet = pRenderDocShell->GetMedium()->GetItemSet(); + pSet->Put( SfxBoolItem( SID_HIDDEN, sal_False ) ); + } } } -- cgit v1.2.3 From eb8ee35b1ab29d9f6d05e09b27499fdb448f2817 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 18 Feb 2010 10:03:42 +0100 Subject: sw33a11y01: #i103961# - correct notification of accessible objects for insertion and deletion of table cells --- sw/source/core/access/acctable.cxx | 12 +++------ sw/source/core/inc/cellfrm.hxx | 6 ++++- sw/source/core/layout/tabfrm.cxx | 50 ++++++++++++++++++++++++++++++++------ sw/source/core/layout/wsfrm.cxx | 24 +----------------- 4 files changed, 51 insertions(+), 41 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index b607313397..964ada18a6 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -1360,15 +1360,9 @@ void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChil } } - // There are two reason why this method has been called. The first one - // is there is no context for pFrm. The method is them called by - // the map, and we have to call our superclass. - // The other situation is that we have been call by a call to get notified - // about its change. We then must not call the superclass - ASSERT( rChildFrmOrObj.GetSwFrm(), "frame expected" ); - uno::Reference< XAccessible > xAcc( GetMap()->GetContext( rChildFrmOrObj.GetSwFrm(), sal_False ) ); - if( !xAcc.is() ) - SwAccessibleContext::InvalidateChildPosOrSize( rChildFrmOrObj, rOldBox ); + // --> OD 2010-02-18 #i013961# - always call super class method + SwAccessibleContext::InvalidateChildPosOrSize( rChildFrmOrObj, rOldBox ); + // <-- } diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx index b5740a9d36..51ca14d9cc 100644 --- a/sw/source/core/inc/cellfrm.hxx +++ b/sw/source/core/inc/cellfrm.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -54,6 +54,10 @@ public: virtual void Paint( const SwRect& ) const; virtual void CheckDirection( BOOL bVert ); + // --> OD 2010-02-17 #i103961# + virtual void Cut(); + // <-- + const SwTableBox *GetTabBox() const { return pTabBox; } // used for breaking table rows: diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 0ba077e799..8a3c7bb837 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -4781,6 +4781,30 @@ void SwRowFrm::Cut() { pTab->FindMaster()->InvalidatePos(); } + + // --> OD 2010-02-17 #i103961# + // notification for accessibility + { + SwRootFrm *pRootFrm = FindRootFrm(); + if( pRootFrm && pRootFrm->IsAnyShellAccessible() ) + { + ViewShell* pVSh = pRootFrm->GetCurrShell(); + if ( pVSh && pVSh->Imp() ) + { + SwFrm* pCellFrm( GetLower() ); + while ( pCellFrm ) + { + ASSERT( pCellFrm->IsCellFrm(), + " - unexpected type of SwRowFrm lower." ); + pVSh->Imp()->DisposeAccessibleFrm( pCellFrm ); + + pCellFrm = pCellFrm->GetNext(); + } + } + } + } + // <-- + SwLayoutFrm::Cut(); } @@ -5660,15 +5684,25 @@ long SwCellFrm::GetLayoutRowSpan() const return nRet; } -/************************************************************************* -|* -|* SwCellFrm::Modify() -|* -|* Ersterstellung MA 20. Dec. 96 -|* Letzte Aenderung MA 20. Dec. 96 -|* -|*************************************************************************/ +// --> OD 2010-02-17 #i103961# +void SwCellFrm::Cut() +{ + // notification for accessibility + { + SwRootFrm *pRootFrm = FindRootFrm(); + if( pRootFrm && pRootFrm->IsAnyShellAccessible() ) + { + ViewShell* pVSh = pRootFrm->GetCurrShell(); + if ( pVSh && pVSh->Imp() ) + { + pVSh->Imp()->DisposeAccessibleFrm( this ); + } + } + } + SwLayoutFrm::Cut(); +} +// <-- // // Helper functions for repeated headlines: diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index d00d3e3459..4928549e35 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -768,28 +768,6 @@ void SwFrm::Remove() { ASSERT( pUpper, "Removen ohne Upper?" ); - // --> OD 2004-09-27 #114344# - inform accessibility API - dispose table the - // frame is in - before frame is 'removed from the layout' and - // only for cell frames and row frames. - if ( IsInTab() && ( IsRowFrm() || IsCellFrm() ) ) - { - SwTabFrm* pTableFrm = FindTabFrm(); - if( pTableFrm != NULL && - pTableFrm->IsAccessibleFrm() && - pTableFrm->GetFmt() != NULL ) - { - SwRootFrm *pRootFrm = pTableFrm->FindRootFrm(); - if( pRootFrm != NULL && - pRootFrm->IsAnyShellAccessible() ) - { - ViewShell* pShell = pRootFrm->GetCurrShell(); - if( pShell != NULL ) - pShell->Imp()->DisposeAccessibleFrm( pTableFrm, sal_True ); - } - } - } - // <-- - if( pPrev ) // einer aus der Mitte wird removed pPrev->pNext = pNext; -- cgit v1.2.3 From 1f791c69939311671c762b7da0ffad4752d53d7f Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 18 Feb 2010 11:27:43 +0100 Subject: fix a snafu --- sw/source/core/view/printdata.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index d329b69854..d67b820fc9 100755 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include #include -- cgit v1.2.3 From 5b09355330a4d75e97189dcc0837cb411e91e933 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 19 Feb 2010 11:58:34 +0100 Subject: ppp02: #i108327# set papertray if necessary --- sw/source/ui/uno/unotxdoc.cxx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 19da482149..2480e55150 100755 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2851,14 +2851,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( // get paper tray to use ... sal_Int32 nPrinterPaperTray = -1; - if (bPrintPaperFromSetup) - { - // ... from printer setup - Printer *pPrinter = dynamic_cast< Printer * >(lcl_GetOutputDevice( *m_pPrintUIOptions )); - if (pPrinter) - nPrinterPaperTray = pPrinter->GetPaperBin(); - } - else + if (! bPrintPaperFromSetup) { // ... from individual page style (see the page tab in Format/Page dialog) const std::map< sal_Int32, sal_Int32 > &rPaperTrays = m_pRenderData->GetPrinterPaperTrays(); -- cgit v1.2.3 From a7806adca87c56bdae6bf363f7935deb1b48d263 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 19 Feb 2010 13:01:03 +0100 Subject: dba33f: #i108572# SwXShape::AddExistingShapeToFmt: allow for the given SdrObject to be an object list, and iterate over all elements --- sw/source/core/unocore/unodraw.cxx | 42 +++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 16 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 7d685b6e9c..3d160bce9c 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -1055,25 +1056,34 @@ SwXShape::SwXShape(uno::Reference< uno::XInterface > & xShape) : -----------------------------------------------------------------------*/ void SwXShape::AddExistingShapeToFmt( SdrObject& _rObj ) { - SwXShape* pSwShape = NULL; - uno::Reference< lang::XUnoTunnel > xShapeTunnel( _rObj.getWeakUnoShape(), uno::UNO_QUERY ); - if ( xShapeTunnel.is() ) - pSwShape = reinterpret_cast< SwXShape * >( - sal::static_int_cast< sal_IntPtr >( xShapeTunnel->getSomething( SwXShape::getUnoTunnelId() ) ) ); - if ( pSwShape ) + SdrObjListIter aIter( _rObj, IM_DEEPNOGROUPS ); + while ( aIter.IsMore() ) { - if ( pSwShape->m_bDescriptor ) - { - SwFrmFmt* pFmt = ::FindFrmFmt( &const_cast< SdrObject& >( _rObj ) ); - if ( pFmt ) - pFmt->Add( pSwShape ); - pSwShape->m_bDescriptor = sal_False; - } + SdrObject* pCurrent = aIter.Next(); + OSL_ENSURE( pCurrent, "SwXShape::AddExistingShapeToFmt: invalid object list element!" ); + if ( !pCurrent ) + continue; - if ( !pSwShape->pImpl->bInitializedPropertyNotifier ) + SwXShape* pSwShape = NULL; + uno::Reference< lang::XUnoTunnel > xShapeTunnel( pCurrent->getWeakUnoShape(), uno::UNO_QUERY ); + if ( xShapeTunnel.is() ) + pSwShape = reinterpret_cast< SwXShape * >( + sal::static_int_cast< sal_IntPtr >( xShapeTunnel->getSomething( SwXShape::getUnoTunnelId() ) ) ); + if ( pSwShape ) { - lcl_addShapePropertyEventFactories( _rObj, *pSwShape ); - pSwShape->pImpl->bInitializedPropertyNotifier = true; + if ( pSwShape->m_bDescriptor ) + { + SwFrmFmt* pFmt = ::FindFrmFmt( const_cast< SdrObject* >( pCurrent ) ); + if ( pFmt ) + pFmt->Add( pSwShape ); + pSwShape->m_bDescriptor = sal_False; + } + + if ( !pSwShape->pImpl->bInitializedPropertyNotifier ) + { + lcl_addShapePropertyEventFactories( *pCurrent, *pSwShape ); + pSwShape->pImpl->bInitializedPropertyNotifier = true; + } } } } -- cgit v1.2.3 From c1b215344e59a44ec5117d0c12aa9646f0e62abe Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 19 Feb 2010 13:37:28 +0100 Subject: ppp02: #i109401# use correct page range --- sw/source/core/doc/doc.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index cfbcd9b7b1..a559386317 100755 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1561,6 +1561,18 @@ void SwDoc::CalculatePagePairsForProspectPrinting( rValidStartFrms.clear(); rtl::OUString aPageRange = rOptions.getStringValue( "PageRange", rtl::OUString() ); + // PageContent : + // 0 -> print all pages (default if aPageRange is empty) + // 1 -> print range according to PageRange + // 2 -> print selection + const sal_Int32 nContent = rOptions.getIntValue( "PrintContent", 0 ); + if (0 == nContent) + { + // set page range to print to 'all pages' + aPageRange = OUString::valueOf( (sal_Int32)1 ); + aPageRange += OUString::valueOf( (sal_Unicode)'-'); + aPageRange += OUString::valueOf( nDocPageCount ); + } StringRangeEnumerator aRange( aPageRange, 1, nDocPageCount, 0 ); DBG_ASSERT( pLayout, "no layout present" ); -- cgit v1.2.3 From b3d8c1e0448c7cbfaf1d836e3388aaf056e4fa83 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 19 Feb 2010 22:40:09 +0100 Subject: dba33f: use Ctrl-F5 to toggle the focus between a control and the document. At least in Writer. In this course, SID_FM_GRABCONTROLFOCUS has been renamed to SID_FM_TOGGLECONTROLFOCUS (with the UNO slot name also being affected.). Also, now Writer handles the SID_FM_TOGGLECONTROLFOCUS slot (instead of the FmFormShell), and calls the newly introduced ToggleControlFocus at the FmFormShell. A part of SwFEShell::GotoObj has been outsourced into SwFEShell::GetBestObject, which now can deliver the object (not only object group) of the given type, which is neares to the current position. --- sw/inc/fesh.hxx | 6 + sw/sdi/_textsh.sdi | 5 + sw/source/core/frmedt/feshview.cxx | 350 ++++++++++++++++++++----------------- sw/source/ui/inc/view.hxx | 1 + sw/source/ui/shells/txtcrsr.cxx | 36 ++++ sw/source/ui/uno/unotxvw.cxx | 2 +- 6 files changed, 239 insertions(+), 161 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 9673b41855..ebfdede74f 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -66,6 +66,11 @@ class SwFrmFmt; struct SwSortOptions; class SdrMarkList; +namespace svx +{ + class ISdrObjectFilter; +} + // return values for GetFrmType() und GetSelFrmType(). //! values can be combined via logival or @@ -467,6 +472,7 @@ public: BOOL GetObjAttr( SfxItemSet &rSet ) const; BOOL SetObjAttr( const SfxItemSet &rSet ); + const SdrObject* GetBestObject( BOOL bNext, USHORT eType = GOTOOBJ_DRAW_ANY, BOOL bFlat = TRUE, const ::svx::ISdrObjectFilter* pFilter = NULL ); BOOL GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType = GOTOOBJ_DRAW_ANY); //Setzen vom DragMode (z.B. Rotate), tut nix bei Rahmenselektion. diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi index b09e5f74b1..f476c2f298 100644 --- a/sw/sdi/_textsh.sdi +++ b/sw/sdi/_textsh.sdi @@ -475,6 +475,11 @@ interface BaseText // // Goto - Methoden // + SID_FM_TOGGLECONTROLFOCUS + [ + ExecMethod = ExecMoveMisc ; + StateMethod = NoState ; + ] FN_CNTNT_TO_NEXT_FRAME // status(final|play) [ ExecMethod = ExecMoveMisc ; diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index d7e0e4e02e..3ce5880bec 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -37,6 +37,8 @@ #define _FESHVIEW_ONLY_INLINE_NEEDED #endif +#include +#include #include #include #include @@ -1275,197 +1277,225 @@ BOOL lcl_IsControlGroup( const SdrObject *pObj ) return bRet; } -BOOL SwFEShell::GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType ) +namespace { - if( !Imp()->HasDrawView() ) - return FALSE; - else + class MarkableObjectsOnly : public ::svx::ISdrObjectFilter { - const SdrObject *pBest = 0, - *pTop = 0; - - const long nTmp = bNext ? LONG_MAX : 0; - Point aBestPos( nTmp, nTmp ); - Point aTopPos( nTmp, nTmp ); - Point aCurPos; - Point aPos; - BOOL bRet = FALSE; - BOOL bNoDraw = 0 == (GOTOOBJ_DRAW_ANY & eType); - BOOL bNoFly = 0 == (GOTOOBJ_FLY_ANY & eType); - - if( !bNoFly && bNoDraw ) + public: + MarkableObjectsOnly( SdrPageView* i_pPV ) + :m_pPV( i_pPV ) { - SwFlyFrm *pFly = GetCurrFrm( FALSE )->FindFlyFrm(); - if( pFly ) - pBest = pFly->GetVirtDrawObj(); } - const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - SdrPageView* pPV = Imp()->GetDrawView()->GetSdrPageView(); - if( !pBest || rMrkList.GetMarkCount() == 1 ) + virtual bool includeObject( const SdrObject& i_rObject ) const { - // Ausgangspunkt bestimmen. - SdrObjList* pList = NULL; - if ( rMrkList.GetMarkCount() ) - { - const SdrObject* pStartObj = rMrkList.GetMark(0)->GetMarkedSdrObj(); - if( pStartObj->ISA(SwVirtFlyDrawObj) ) - aPos = ((SwVirtFlyDrawObj*)pStartObj)->GetFlyFrm()->Frm().Pos(); - else - aPos = pStartObj->GetSnapRect().TopLeft(); + return m_pPV && m_pPV->GetView().IsObjMarkable( const_cast< SdrObject* >( &i_rObject ), m_pPV ); + } - // If an object inside a group is selected, we want to - // iterate over the group members. - if ( ! pStartObj->GetUserCall() ) - pList = pStartObj->GetObjList(); - } + private: + SdrPageView* m_pPV; + }; +} + +const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType, BOOL bFlat, const ::svx::ISdrObjectFilter* pFilter ) +{ + if( !Imp()->HasDrawView() ) + return NULL; + + const SdrObject *pBest = 0, + *pTop = 0; + + const long nTmp = bNext ? LONG_MAX : 0; + Point aBestPos( nTmp, nTmp ); + Point aTopPos( nTmp, nTmp ); + Point aCurPos; + Point aPos; + BOOL bNoDraw = 0 == (GOTOOBJ_DRAW_ANY & eType); + BOOL bNoFly = 0 == (GOTOOBJ_FLY_ANY & eType); + + if( !bNoFly && bNoDraw ) + { + SwFlyFrm *pFly = GetCurrFrm( FALSE )->FindFlyFrm(); + if( pFly ) + pBest = pFly->GetVirtDrawObj(); + } + const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); + SdrPageView* pPV = Imp()->GetDrawView()->GetSdrPageView(); + + MarkableObjectsOnly aDefaultFilter( pPV ); + if ( !pFilter ) + pFilter = &aDefaultFilter; + + if( !pBest || rMrkList.GetMarkCount() == 1 ) + { + // Ausgangspunkt bestimmen. + SdrObjList* pList = NULL; + if ( rMrkList.GetMarkCount() ) + { + const SdrObject* pStartObj = rMrkList.GetMark(0)->GetMarkedSdrObj(); + if( pStartObj->ISA(SwVirtFlyDrawObj) ) + aPos = ((SwVirtFlyDrawObj*)pStartObj)->GetFlyFrm()->Frm().Pos(); else - { - // If no object is selected, we check if we just entered a group. - // In this case we want to iterate over the group members. - aPos = GetCharRect().Center(); - const SdrObject* pStartObj = pPV ? pPV->GetAktGroup() : 0; - if ( pStartObj && pStartObj->ISA( SdrObjGroup ) ) - pList = pStartObj->GetSubList(); - } + aPos = pStartObj->GetSnapRect().TopLeft(); - if ( ! pList ) - { - // Here we are if - // A No object has been selected and no group has been entered or - // B An object has been selected and it is not inside a group - pList = getIDocumentDrawModelAccess()->GetDrawModel()->GetPage( 0 ); - } + // If an object inside a group is selected, we want to + // iterate over the group members. + if ( ! pStartObj->GetUserCall() ) + pList = pStartObj->GetObjList(); + } + else + { + // If no object is selected, we check if we just entered a group. + // In this case we want to iterate over the group members. + aPos = GetCharRect().Center(); + const SdrObject* pStartObj = pPV ? pPV->GetAktGroup() : 0; + if ( pStartObj && pStartObj->ISA( SdrObjGroup ) ) + pList = pStartObj->GetSubList(); + } + + if ( ! pList ) + { + // Here we are if + // A No object has been selected and no group has been entered or + // B An object has been selected and it is not inside a group + pList = getIDocumentDrawModelAccess()->GetDrawModel()->GetPage( 0 ); + } - ASSERT( pList, "No object list to iterate" ) + ASSERT( pList, "No object list to iterate" ) - const ULONG nObjs = pList->GetObjCount(); - for( ULONG nObj = 0; nObj < nObjs; ++nObj ) + SdrObjListIter aObjIter( *pList, bFlat ? IM_FLAT : IM_DEEPNOGROUPS ); + while ( aObjIter.IsMore() ) + { + SdrObject* pObj = aObjIter.Next(); + BOOL bFlyFrm = pObj->ISA(SwVirtFlyDrawObj); + if( ( bNoFly && bFlyFrm ) || + ( bNoDraw && !bFlyFrm ) || + ( eType == GOTOOBJ_DRAW_SIMPLE && lcl_IsControlGroup( pObj ) ) || + ( eType == GOTOOBJ_DRAW_CONTROL && !lcl_IsControlGroup( pObj ) ) || + ( pFilter && !pFilter->includeObject( *pObj ) ) ) + continue; + if( bFlyFrm ) { - SdrObject* pObj = pList->GetObj( nObj ); - BOOL bFlyFrm = pObj->ISA(SwVirtFlyDrawObj); - if( ( bNoFly && bFlyFrm ) || - ( bNoDraw && !bFlyFrm ) || - ( eType == GOTOOBJ_DRAW_SIMPLE && lcl_IsControlGroup( pObj ) ) || - ( eType == GOTOOBJ_DRAW_CONTROL && !lcl_IsControlGroup( pObj ) ) || - ( pPV && ! pPV->GetView().IsObjMarkable( pObj, pPV ) ) ) - continue; - if( bFlyFrm ) + SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pObj; + SwFlyFrm *pFly = pO->GetFlyFrm(); + if( GOTOOBJ_FLY_ANY != ( GOTOOBJ_FLY_ANY & eType ) ) { - SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pObj; - SwFlyFrm *pFly = pO->GetFlyFrm(); - if( GOTOOBJ_FLY_ANY != ( GOTOOBJ_FLY_ANY & eType ) ) + switch ( eType ) { - switch ( eType ) - { - case GOTOOBJ_FLY_FRM: - if ( pFly->Lower() && pFly->Lower()->IsNoTxtFrm() ) - continue; - break; - case GOTOOBJ_FLY_GRF: - if ( pFly->Lower() && - (pFly->Lower()->IsLayoutFrm() || - !((SwCntntFrm*)pFly->Lower())->GetNode()->GetGrfNode())) - continue; - break; - case GOTOOBJ_FLY_OLE: - if ( pFly->Lower() && - (pFly->Lower()->IsLayoutFrm() || - !((SwCntntFrm*)pFly->Lower())->GetNode()->GetOLENode())) - continue; - break; - } + case GOTOOBJ_FLY_FRM: + if ( pFly->Lower() && pFly->Lower()->IsNoTxtFrm() ) + continue; + break; + case GOTOOBJ_FLY_GRF: + if ( pFly->Lower() && + (pFly->Lower()->IsLayoutFrm() || + !((SwCntntFrm*)pFly->Lower())->GetNode()->GetGrfNode())) + continue; + break; + case GOTOOBJ_FLY_OLE: + if ( pFly->Lower() && + (pFly->Lower()->IsLayoutFrm() || + !((SwCntntFrm*)pFly->Lower())->GetNode()->GetOLENode())) + continue; + break; } - aCurPos = pFly->Frm().Pos(); } - else - aCurPos = pObj->GetCurrentBoundRect().TopLeft(); + aCurPos = pFly->Frm().Pos(); + } + else + aCurPos = pObj->GetCurrentBoundRect().TopLeft(); - // Sonderfall wenn ein anderes Obj auf selber Y steht. - if( aCurPos != aPos && // nur wenn ich es nicht selber bin - aCurPos.Y() == aPos.Y() && // ist die Y Position gleich - (bNext? (aCurPos.X() > aPos.X()) : // liegt neben mir - (aCurPos.X() < aPos.X())) ) // " reverse + // Sonderfall wenn ein anderes Obj auf selber Y steht. + if( aCurPos != aPos && // nur wenn ich es nicht selber bin + aCurPos.Y() == aPos.Y() && // ist die Y Position gleich + (bNext? (aCurPos.X() > aPos.X()) : // liegt neben mir + (aCurPos.X() < aPos.X())) ) // " reverse + { + aBestPos = Point( nTmp, nTmp ); + SdrObjListIter aTmpIter( *pList, bFlat ? IM_FLAT : IM_DEEPNOGROUPS ); + while ( aTmpIter.IsMore() ) { - aBestPos = Point( nTmp, nTmp ); - for( ULONG i = 0; i < nObjs; ++i ) + SdrObject* pTmpObj = aTmpIter.Next(); + bFlyFrm = pTmpObj->ISA(SwVirtFlyDrawObj); + if( ( bNoFly && bFlyFrm ) || ( bNoDraw && !bFlyFrm ) ) + continue; + if( bFlyFrm ) { - SdrObject *pTmpObj = pList->GetObj( i ); - bFlyFrm = pTmpObj->ISA(SwVirtFlyDrawObj); - if( ( bNoFly && bFlyFrm ) || ( bNoDraw && !bFlyFrm ) ) - continue; - if( bFlyFrm ) - { - SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pTmpObj; - aCurPos = pO->GetFlyFrm()->Frm().Pos(); - } - else - aCurPos = pTmpObj->GetCurrentBoundRect().TopLeft(); - - if( aCurPos != aPos && aCurPos.Y() == aPos.Y() && - (bNext? (aCurPos.X() > aPos.X()) : // liegt neben mir - (aCurPos.X() < aPos.X())) && // " reverse - (bNext? (aCurPos.X() < aBestPos.X()) : // besser als Beste - (aCurPos.X() > aBestPos.X())) ) // " reverse - { - aBestPos = aCurPos; - pBest = pTmpObj; - } + SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pTmpObj; + aCurPos = pO->GetFlyFrm()->Frm().Pos(); } - break; - } - - if( (bNext? (aPos.Y() < aCurPos.Y()) : // nur unter mir - (aPos.Y() > aCurPos.Y())) && // " reverse - (bNext? (aBestPos.Y() > aCurPos.Y()) : // naeher drunter - (aBestPos.Y() < aCurPos.Y())) || // " reverse - (aBestPos.Y() == aCurPos.Y() && - (bNext? (aBestPos.X() > aCurPos.X()) : // weiter links - (aBestPos.X() < aCurPos.X())))) // " reverse - - { - aBestPos = aCurPos; - pBest = pObj; - } + else + aCurPos = pTmpObj->GetCurrentBoundRect().TopLeft(); - if( (bNext? (aTopPos.Y() > aCurPos.Y()) : // hoeher als Beste - (aTopPos.Y() < aCurPos.Y())) || // " reverse - (aTopPos.Y() == aCurPos.Y() && - (bNext? (aTopPos.X() > aCurPos.X()) : // weiter links - (aTopPos.X() < aCurPos.X())))) // " reverse - { - aTopPos = aCurPos; - pTop = pObj; + if( aCurPos != aPos && aCurPos.Y() == aPos.Y() && + (bNext? (aCurPos.X() > aPos.X()) : // liegt neben mir + (aCurPos.X() < aPos.X())) && // " reverse + (bNext? (aCurPos.X() < aBestPos.X()) : // besser als Beste + (aCurPos.X() > aBestPos.X())) ) // " reverse + { + aBestPos = aCurPos; + pBest = pTmpObj; + } } + break; } - // leider nichts gefunden - if( (bNext? (aBestPos.X() == LONG_MAX) : (aBestPos.X() == 0)) ) - pBest = pTop; - } - if( pBest ) - { - BOOL bFlyFrm = pBest->ISA(SwVirtFlyDrawObj); - if( bFlyFrm ) + if( (bNext? (aPos.Y() < aCurPos.Y()) : // nur unter mir + (aPos.Y() > aCurPos.Y())) && // " reverse + (bNext? (aBestPos.Y() > aCurPos.Y()) : // naeher drunter + (aBestPos.Y() < aCurPos.Y())) || // " reverse + (aBestPos.Y() == aCurPos.Y() && + (bNext? (aBestPos.X() > aCurPos.X()) : // weiter links + (aBestPos.X() < aCurPos.X())))) // " reverse + { - SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pBest; - const SwRect& rFrm = pO->GetFlyFrm()->Frm(); - SelectObj( rFrm.Pos(), 0, (SdrObject*)pBest ); - if( !ActionPend() ) - MakeVisible( rFrm ); + aBestPos = aCurPos; + pBest = pObj; } - else + + if( (bNext? (aTopPos.Y() > aCurPos.Y()) : // hoeher als Beste + (aTopPos.Y() < aCurPos.Y())) || // " reverse + (aTopPos.Y() == aCurPos.Y() && + (bNext? (aTopPos.X() > aCurPos.X()) : // weiter links + (aTopPos.X() < aCurPos.X())))) // " reverse { - SelectObj( Point(), 0, (SdrObject*)pBest ); - if( !ActionPend() ) - MakeVisible( pBest->GetCurrentBoundRect() ); + aTopPos = aCurPos; + pTop = pObj; } - CallChgLnk(); - bRet = TRUE; } - return bRet; + // leider nichts gefunden + if( (bNext? (aBestPos.X() == LONG_MAX) : (aBestPos.X() == 0)) ) + pBest = pTop; } + + return pBest; +} + +BOOL SwFEShell::GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType ) +{ + const SdrObject* pBest = GetBestObject( bNext, eType ); + + if ( !pBest ) + return FALSE; + + BOOL bFlyFrm = pBest->ISA(SwVirtFlyDrawObj); + if( bFlyFrm ) + { + SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pBest; + const SwRect& rFrm = pO->GetFlyFrm()->Frm(); + SelectObj( rFrm.Pos(), 0, (SdrObject*)pBest ); + if( !ActionPend() ) + MakeVisible( rFrm ); + } + else + { + SelectObj( Point(), 0, (SdrObject*)pBest ); + if( !ActionPend() ) + MakeVisible( pBest->GetCurrentBoundRect() ); + } + CallChgLnk(); + return TRUE; } /************************************************************************* diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index fcce44fc6f..5012406cf8 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -597,6 +597,7 @@ public: SwDocShell *GetDocShell(); inline const SwDocShell *GetDocShell() const; inline FmFormShell *GetFormShell() { return pFormShell; } + inline const FmFormShell *GetFormShell() const { return pFormShell; } //damit in DToren der SubShells ggf. pShell zurueckgesetzt werden kann void ResetSubShell() { pShell = 0; } diff --git a/sw/source/ui/shells/txtcrsr.cxx b/sw/source/ui/shells/txtcrsr.cxx index 888f5560ec..7a5cbb65fc 100644 --- a/sw/source/ui/shells/txtcrsr.cxx +++ b/sw/source/ui/shells/txtcrsr.cxx @@ -50,6 +50,8 @@ #include #include #include +#include +#include #ifndef _CMDID_H #include @@ -59,6 +61,10 @@ #include #endif +#include +#include +#include + using namespace ::com::sun::star; void SwTextShell::ExecBasicMove(SfxRequest &rReq) @@ -249,6 +255,36 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) BOOL bSetRetVal = TRUE, bRet = TRUE; switch ( nSlot ) { + case SID_FM_TOGGLECONTROLFOCUS: + { + const SwDoc* pDoc = rSh.GetDoc(); + const SwDocShell* pDocShell = pDoc ? pDoc->GetDocShell() : NULL; + const SwView* pView = pDocShell ? pDocShell->GetView() : NULL; + const FmFormShell* pFormShell = pView ? pView->GetFormShell() : NULL; + SdrView* pDrawView = pView ? pView->GetDrawView() : NULL; + Window* pWindow = pView ? pView->GetWrtShell().GetWin() : NULL; + + OSL_ENSURE( pFormShell && pDrawView && pWindow, "SwXTextView::ExecMoveMisc: no chance!" ); + if ( !pFormShell || !pDrawView || !pWindow ) + break; + + ::std::auto_ptr< ::svx::ISdrObjectFilter > pFilter( pFormShell->CreateFocusableControlFilter( + *pDrawView, *pWindow ) ); + if ( !pFilter.get() ) + break; + + const SdrObject* pNearestControl = rSh.GetBestObject( TRUE, GOTOOBJ_DRAW_CONTROL, FALSE, pFilter.get() ); + if ( !pNearestControl ) + break; + + const SdrUnoObj* pUnoObject = dynamic_cast< const SdrUnoObj* >( pNearestControl ); + OSL_ENSURE( pUnoObject, "SwTextShell::ExecMoveMisc: GetBestObject returned nonsense!" ); + if ( !pUnoObject ) + break; + + pFormShell->ToggleControlFocus( *pUnoObject, *pDrawView, *pWindow ); + } + break; case FN_CNTNT_TO_NEXT_FRAME: bRet = rSh.GotoObj(TRUE, GOTOOBJ_GOTO_ANY); if(bRet) diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index e2b40a8a9e..038e52d984 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -713,7 +713,7 @@ uno::Reference< form::runtime::XFormController > SAL_CALL SwXTextView::getFormCo FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL; SdrView* pDrawView = pView2 ? pView2->GetDrawView() : NULL; Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : NULL; - DBG_ASSERT( pFormShell && pDrawView && pWindow, "SwXTextView::GetControl: how could I?" ); + DBG_ASSERT( pFormShell && pDrawView && pWindow, "SwXTextView::getFormController: how could I?" ); uno::Reference< form::runtime::XFormController > xController; if ( pFormShell && pDrawView && pWindow ) -- cgit v1.2.3 From cc0654bfdfc32c37c646b2bd41ea5a7e6db69f6c Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 23 Feb 2010 15:57:52 +0100 Subject: #i103700# empty pages and 'print selection' --- sw/source/core/doc/doc.cxx | 6 +++++- sw/source/core/view/printdata.cxx | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index cfbcd9b7b1..c405a88072 100755 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1210,11 +1210,15 @@ void SwDoc::CalculatePagesForPrinting( if (!pLayout) return; + const sal_Int32 nContent = rOptions.getIntValue( "PrintContent", 0 ); + const bool bPrintSelection = nContent == 2; + // properties to take into account when calcualting the set of pages // (PDF export UI does not allow for selecting left or right pages only) bool bPrintLeftPages = bIsPDFExport ? true : rOptions.IsPrintLeftPages(); bool bPrintRightPages = bIsPDFExport ? true : rOptions.IsPrintRightPages(); - bool bPrintEmptyPages = rOptions.IsPrintEmptyPages( bIsPDFExport ); + // #i103700# printing selections should not allow for automatic inserting empty pages + bool bPrintEmptyPages = bPrintSelection ? false : rOptions.IsPrintEmptyPages( bIsPDFExport ); Range aPages( 1, nDocPageCount ); diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index d329b69854..381c37c20c 100755 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -158,6 +158,10 @@ void SwRenderData::MakeSwPrtOptions( BOOL bWeb = pDocShell->IsA( aSwWebDocShellTypeId ); rOptions.MakeOptions( bWeb ); + const sal_Int32 nContent = pOpt->getIntValue( "PrintContent", 0 ); + const bool bPrintSelection = nContent == 2; + + // get print options to use from provided properties rOptions.bPrintGraphic = pOpt->IsPrintGraphics(); rOptions.bPrintTable = pOpt->IsPrintTables(); -- cgit v1.2.3 From 77d73e4857ceda592e78a541e524b272a08e2c26 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 24 Feb 2010 10:47:49 +0100 Subject: sw33a11y01: #i108125# - provide tracked changes of type insertion, deletion and format change at a paragraph as text markup at the UNO-A11y-API --- sw/inc/unotextmarkup.hxx | 3 +- sw/source/core/access/accmap.cxx | 4 +- sw/source/core/access/accpara.cxx | 373 ++++++++++++++--------- sw/source/core/access/accpara.hxx | 21 +- sw/source/core/access/makefile.mk | 3 +- sw/source/core/access/parachangetrackinginfo.cxx | 231 ++++++++++++++ sw/source/core/access/parachangetrackinginfo.hxx | 59 ++++ sw/source/core/access/textmarkuphelper.cxx | 55 +++- sw/source/core/access/textmarkuphelper.hxx | 29 +- sw/source/core/inc/wrong.hxx | 10 +- 10 files changed, 603 insertions(+), 185 deletions(-) create mode 100644 sw/source/core/access/parachangetrackinginfo.cxx create mode 100644 sw/source/core/access/parachangetrackinginfo.hxx (limited to 'sw/source') diff --git a/sw/inc/unotextmarkup.hxx b/sw/inc/unotextmarkup.hxx index ef416b3bd2..ec7adced2a 100644 --- a/sw/inc/unotextmarkup.hxx +++ b/sw/inc/unotextmarkup.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,7 +45,6 @@ namespace com { namespace sun { namespace star { namespace container { } } } } class SwTxtNode; -class SwWrongList; class SfxPoolItem; /** Implementation of the css::text::XTextMarkup interface diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 7a7982fa92..0bad70829b 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -1420,8 +1420,8 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm, { case FRM_TXT: mnPara++; - pAcc = new SwAccessibleParagraph( this, - static_cast< const SwTxtFrm * >( pFrm ) ); + pAcc = new SwAccessibleParagraph( *this, + static_cast< const SwTxtFrm& >( *pFrm ) ); break; case FRM_HEADER: pAcc = new SwAccessibleHeaderFooter( this, diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 6088f78148..0297313894 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -79,15 +79,15 @@ #include #include #include +// --> OD 2010-02-22 #i10825# +#include +#include +// <-- #include using namespace ::com::sun::star; -using namespace ::com::sun::star::i18n; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::uno; using namespace ::com::sun::star::accessibility; -using ::rtl::OUString; using beans::PropertyValue; using beans::XMultiPropertySet; @@ -119,15 +119,15 @@ const SwTxtNode* SwAccessibleParagraph::GetTxtNode() const return pNode; } -OUString SwAccessibleParagraph::GetString() +::rtl::OUString SwAccessibleParagraph::GetString() { return GetPortionData().GetAccessibleString(); } -OUString SwAccessibleParagraph::GetDescription() +::rtl::OUString SwAccessibleParagraph::GetDescription() { // --> OD 2004-09-29 #117933# - provide empty description for paragraphs - return OUString(); + return ::rtl::OUString(); // <-- } @@ -376,11 +376,11 @@ void SwAccessibleParagraph::GetStates( void SwAccessibleParagraph::_InvalidateContent( sal_Bool bVisibleDataFired ) { - OUString sOldText( GetString() ); + ::rtl::OUString sOldText( GetString() ); ClearPortionData(); - const OUString& rText = GetString(); + const ::rtl::OUString& rText = GetString(); if( rText != sOldText ) { @@ -412,8 +412,8 @@ void SwAccessibleParagraph::_InvalidateContent( sal_Bool bVisibleDataFired ) if( bNewIsHeading != bOldIsHeading || rText != sOldText ) { - OUString sNewDesc( GetDescription() ); - OUString sOldDesc; + ::rtl::OUString sNewDesc( GetDescription() ); + ::rtl::OUString sOldDesc; { vos::OGuard aGuard( aMutex ); sOldDesc = sDesc; @@ -490,19 +490,27 @@ void SwAccessibleParagraph::_InvalidateFocus() } SwAccessibleParagraph::SwAccessibleParagraph( - SwAccessibleMap* pInitMap, - const SwTxtFrm *pTxtFrm ) : - SwAccessibleContext( pInitMap, AccessibleRole::PARAGRAPH, pTxtFrm ), - pPortionData( NULL ), - pHyperTextData( NULL ), - nOldCaretPos( -1 ), - aSelectionHelper( *this ) + SwAccessibleMap& rInitMap, + const SwTxtFrm& rTxtFrm ) + // --> OD 2010-02-24 #i108125# + : SwClient( const_cast(rTxtFrm.GetTxtNode()) ) + // <-- + , SwAccessibleContext( &rInitMap, AccessibleRole::PARAGRAPH, &rTxtFrm ) + , sDesc() + , pPortionData( NULL ) + , pHyperTextData( NULL ) + , nOldCaretPos( -1 ) + , bIsHeading( sal_False ) + , aSelectionHelper( *this ) + // --> OD 2010-02-19 #i108125# + , mpParaChangeTrackInfo( new SwParaChangeTrackingInfo( rTxtFrm ) ) + // <-- { vos::OGuard aGuard(Application::GetSolarMutex()); bIsHeading = IsHeading(); // --> OD 2004-09-27 #117970# - set an empty accessibility name for paragraphs - SetName( OUString() ); + SetName( ::rtl::OUString() ); // <-- // If this object has the focus, then it is remembered by the map itself. @@ -515,6 +523,9 @@ SwAccessibleParagraph::~SwAccessibleParagraph() delete pPortionData; delete pHyperTextData; + // --> OD 2010-02-22 #i108125# + delete mpParaChangeTrackInfo; + // <-- } sal_Bool SwAccessibleParagraph::HasCursor() @@ -635,8 +646,8 @@ sal_Bool SwAccessibleParagraph::IsValidRange( sal_Bool SwAccessibleParagraph::GetCharBoundary( - Boundary& rBound, - const OUString&, + i18n::Boundary& rBound, + const ::rtl::OUString&, sal_Int32 nPos ) { rBound.startPos = nPos; @@ -645,8 +656,8 @@ sal_Bool SwAccessibleParagraph::GetCharBoundary( } sal_Bool SwAccessibleParagraph::GetWordBoundary( - Boundary& rBound, - const OUString& rText, + i18n::Boundary& rBound, + const ::rtl::OUString& rText, sal_Int32 nPos ) { sal_Bool bRet = sal_False; @@ -658,12 +669,12 @@ sal_Bool SwAccessibleParagraph::GetWordBoundary( { // get locale for this position USHORT nModelPos = GetPortionData().GetModelPosition( nPos ); - Locale aLocale = pBreakIt->GetLocale( + lang::Locale aLocale = pBreakIt->GetLocale( GetTxtNode()->GetLang( nModelPos ) ); // which type of word are we interested in? // (DICTIONARY_WORD includes punctuation, ANY_WORD doesn't.) - const USHORT nWordType = WordType::ANY_WORD; + const USHORT nWordType = i18n::WordType::ANY_WORD; // get word boundary, as the Break-Iterator sees fit. rBound = pBreakIt->GetBreakIter()->getWordBoundary( @@ -684,8 +695,8 @@ sal_Bool SwAccessibleParagraph::GetWordBoundary( } sal_Bool SwAccessibleParagraph::GetSentenceBoundary( - Boundary& rBound, - const OUString&, + i18n::Boundary& rBound, + const ::rtl::OUString&, sal_Int32 nPos ) { GetPortionData().GetSentenceBoundary( rBound, nPos ); @@ -693,8 +704,8 @@ sal_Bool SwAccessibleParagraph::GetSentenceBoundary( } sal_Bool SwAccessibleParagraph::GetLineBoundary( - Boundary& rBound, - const OUString& rText, + i18n::Boundary& rBound, + const ::rtl::OUString& rText, sal_Int32 nPos ) { if( rText.getLength() == nPos ) @@ -705,8 +716,8 @@ sal_Bool SwAccessibleParagraph::GetLineBoundary( } sal_Bool SwAccessibleParagraph::GetParagraphBoundary( - Boundary& rBound, - const OUString& rText, + i18n::Boundary& rBound, + const ::rtl::OUString& rText, sal_Int32 ) { rBound.startPos = 0; @@ -715,8 +726,8 @@ sal_Bool SwAccessibleParagraph::GetParagraphBoundary( } sal_Bool SwAccessibleParagraph::GetAttributeBoundary( - Boundary& rBound, - const OUString&, + i18n::Boundary& rBound, + const ::rtl::OUString&, sal_Int32 nPos ) { GetPortionData().GetAttributeBoundary( rBound, nPos ); @@ -724,8 +735,8 @@ sal_Bool SwAccessibleParagraph::GetAttributeBoundary( } sal_Bool SwAccessibleParagraph::GetGlyphBoundary( - Boundary& rBound, - const OUString& rText, + i18n::Boundary& rBound, + const ::rtl::OUString& rText, sal_Int32 nPos ) { sal_Bool bRet = sal_False; @@ -738,11 +749,11 @@ sal_Bool SwAccessibleParagraph::GetGlyphBoundary( { // get locale for this position USHORT nModelPos = GetPortionData().GetModelPosition( nPos ); - Locale aLocale = pBreakIt->GetLocale( + lang::Locale aLocale = pBreakIt->GetLocale( GetTxtNode()->GetLang( nModelPos ) ); // get word boundary, as the Break-Iterator sees fit. - const USHORT nIterMode = CharacterIteratorMode::SKIPCELL; + const USHORT nIterMode = i18n::CharacterIteratorMode::SKIPCELL; sal_Int32 nDone = 0; rBound.endPos = pBreakIt->GetBreakIter()->nextCharacters( rText, nPos, aLocale, nIterMode, 1, nDone ); @@ -764,20 +775,20 @@ sal_Bool SwAccessibleParagraph::GetGlyphBoundary( sal_Bool SwAccessibleParagraph::GetTextBoundary( - Boundary& rBound, - const OUString& rText, + i18n::Boundary& rBound, + const ::rtl::OUString& rText, sal_Int32 nPos, sal_Int16 nTextType ) throw ( - IndexOutOfBoundsException, - IllegalArgumentException, + lang::IndexOutOfBoundsException, + lang::IllegalArgumentException, uno::RuntimeException) { // error checking if( !( AccessibleTextType::LINE == nTextType ? IsValidPosition( nPos, rText.getLength() ) : IsValidChar( nPos, rText.getLength() ) ) ) - throw IndexOutOfBoundsException(); + throw lang::IndexOutOfBoundsException(); sal_Bool bRet; @@ -812,13 +823,13 @@ sal_Bool SwAccessibleParagraph::GetTextBoundary( break; default: - throw IllegalArgumentException( ); + throw lang::IllegalArgumentException( ); } return bRet; } -OUString SAL_CALL SwAccessibleParagraph::getAccessibleDescription (void) +::rtl::OUString SAL_CALL SwAccessibleParagraph::getAccessibleDescription (void) throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -832,7 +843,7 @@ OUString SAL_CALL SwAccessibleParagraph::getAccessibleDescription (void) return sDesc; } -Locale SAL_CALL SwAccessibleParagraph::getLocale (void) +lang::Locale SAL_CALL SwAccessibleParagraph::getLocale (void) throw (IllegalAccessibleComponentStateException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -844,7 +855,7 @@ Locale SAL_CALL SwAccessibleParagraph::getLocale (void) } const SwTxtNode *pTxtNd = pTxtFrm->GetTxtNode(); - Locale aLoc( pBreakIt->GetLocale( pTxtNd->GetLang( 0 ) ) ); + lang::Locale aLoc( pBreakIt->GetLocale( pTxtNd->GetLang( 0 ) ) ); return aLoc; } @@ -997,10 +1008,10 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getBackground() } // <-- -OUString SAL_CALL SwAccessibleParagraph::getImplementationName() +::rtl::OUString SAL_CALL SwAccessibleParagraph::getImplementationName() throw( uno::RuntimeException ) { - return OUString(RTL_CONSTASCII_USTRINGPARAM(sImplementationName)); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sImplementationName)); } sal_Bool SAL_CALL SwAccessibleParagraph::supportsService( @@ -1013,13 +1024,13 @@ sal_Bool SAL_CALL SwAccessibleParagraph::supportsService( sizeof(sAccessibleServiceName)-1 ); } -Sequence< OUString > SAL_CALL SwAccessibleParagraph::getSupportedServiceNames() +uno::Sequence< ::rtl::OUString > SAL_CALL SwAccessibleParagraph::getSupportedServiceNames() throw( uno::RuntimeException ) { - Sequence< OUString > aRet(2); - OUString* pArray = aRet.getArray(); - pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(sServiceName) ); - pArray[1] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleServiceName) ); + uno::Sequence< ::rtl::OUString > aRet(2); + ::rtl::OUString* pArray = aRet.getArray(); + pArray[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(sServiceName) ); + pArray[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleServiceName) ); return aRet; } @@ -1027,10 +1038,10 @@ Sequence< OUString > SAL_CALL SwAccessibleParagraph::getSupportedServiceNames() //===== XInterface ======================================================= // -Any SwAccessibleParagraph::queryInterface( const Type& rType ) - throw (RuntimeException) +uno::Any SwAccessibleParagraph::queryInterface( const uno::Type& rType ) + throw (uno::RuntimeException) { - Any aRet; + uno::Any aRet; if ( rType == ::getCppuType((uno::Reference *)0) ) { uno::Reference aAccText = (XAccessibleText *) *this; // resolve ambiguity @@ -1082,9 +1093,9 @@ Any SwAccessibleParagraph::queryInterface( const Type& rType ) } //====== XTypeProvider ==================================================== -Sequence< Type > SAL_CALL SwAccessibleParagraph::getTypes() throw(RuntimeException) +uno::Sequence< uno::Type > SAL_CALL SwAccessibleParagraph::getTypes() throw(uno::RuntimeException) { - Sequence< Type > aTypes( SwAccessibleContext::getTypes() ); + uno::Sequence< uno::Type > aTypes( SwAccessibleContext::getTypes() ); sal_Int32 nIndex = aTypes.getLength(); // --> OD 2006-07-13 #i63870# @@ -1093,7 +1104,7 @@ Sequence< Type > SAL_CALL SwAccessibleParagraph::getTypes() throw(RuntimeExcepti // add type accessibility::XAccessibleTextMarkup and accessibility::XAccessibleMultiLineText aTypes.realloc( nIndex + 6 ); - Type* pTypes = aTypes.getArray(); + uno::Type* pTypes = aTypes.getArray(); pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleEditableText > * >( 0 ) ); pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleTextAttributes > * >( 0 ) ); pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleSelection > * >( 0 ) ); @@ -1105,11 +1116,11 @@ Sequence< Type > SAL_CALL SwAccessibleParagraph::getTypes() throw(RuntimeExcepti return aTypes; } -Sequence< sal_Int8 > SAL_CALL SwAccessibleParagraph::getImplementationId() - throw(RuntimeException) +uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleParagraph::getImplementationId() + throw(uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - static Sequence< sal_Int8 > aId( 16 ); + static uno::Sequence< sal_Int8 > aId( 16 ); static sal_Bool bInit = sal_False; if(!bInit) { @@ -1125,7 +1136,7 @@ Sequence< sal_Int8 > SAL_CALL SwAccessibleParagraph::getImplementationId() // sal_Int32 SwAccessibleParagraph::getCaretPosition() - throw (RuntimeException) + throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -1147,7 +1158,7 @@ sal_Int32 SwAccessibleParagraph::getCaretPosition() } sal_Bool SAL_CALL SwAccessibleParagraph::setCaretPosition( sal_Int32 nIndex ) - throw (IndexOutOfBoundsException, uno::RuntimeException) + throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -1157,7 +1168,7 @@ sal_Bool SAL_CALL SwAccessibleParagraph::setCaretPosition( sal_Int32 nIndex ) sal_Int32 nLength = GetString().getLength(); if ( ! IsValidPosition( nIndex, nLength ) ) { - throw IndexOutOfBoundsException(); + throw lang::IndexOutOfBoundsException(); } sal_Bool bRet = sal_False; @@ -1180,13 +1191,13 @@ sal_Bool SAL_CALL SwAccessibleParagraph::setCaretPosition( sal_Int32 nIndex ) } sal_Unicode SwAccessibleParagraph::getCharacter( sal_Int32 nIndex ) - throw (IndexOutOfBoundsException, uno::RuntimeException) + throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this ); - OUString sText( GetString() ); + ::rtl::OUString sText( GetString() ); // return character (if valid) if( IsValidChar(nIndex, sText.getLength() ) ) @@ -1194,25 +1205,25 @@ sal_Unicode SwAccessibleParagraph::getCharacter( sal_Int32 nIndex ) return sText.getStr()[nIndex]; } else - throw IndexOutOfBoundsException(); + throw lang::IndexOutOfBoundsException(); } // --> OD 2006-07-20 #i63870# // re-implement method on behalf of methods <_getDefaultAttributesImpl(..)> and // <_getRunAttributesImpl(..)> -Sequence SwAccessibleParagraph::getCharacterAttributes( +uno::Sequence SwAccessibleParagraph::getCharacterAttributes( sal_Int32 nIndex, const uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) - throw (IndexOutOfBoundsException, uno::RuntimeException) + throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this ); - const OUString& rText = GetString(); + const ::rtl::OUString& rText = GetString(); if( ! IsValidChar( nIndex, rText.getLength() ) ) - throw IndexOutOfBoundsException(); + throw lang::IndexOutOfBoundsException(); // retrieve default character attributes tAccParaPropValMap aDefAttrSeq; @@ -1223,7 +1234,7 @@ Sequence SwAccessibleParagraph::getCharacterAttributes( _getRunAttributesImpl( nIndex, aRequestedAttributes, aRunAttrSeq ); // merge default and run attributes - Sequence< PropertyValue > aValues( aDefAttrSeq.size() ); + uno::Sequence< PropertyValue > aValues( aDefAttrSeq.size() ); PropertyValue* pValues = aValues.getArray(); sal_Int32 i = 0; for ( tAccParaPropValMap::const_iterator aDefIter = aDefAttrSeq.begin(); @@ -1341,7 +1352,7 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl( const SfxPoolItem* pItem = pSet->GetItem( aPropIt->nWID ); if ( pItem ) { - Any aVal; + uno::Any aVal; pItem->QueryValue( aVal, aPropIt->nMemberId ); PropertyValue rPropVal; @@ -1359,14 +1370,14 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl( // add property value entry for the paragraph style if ( !bOnlyCharAttrs && pTxtNode->GetTxtColl() ) { - const OUString sParaStyleName = - OUString::createFromAscii( + const ::rtl::OUString sParaStyleName = + ::rtl::OUString::createFromAscii( GetPropName( UNO_NAME_PARA_STYLE_NAME ).pName ); if ( aDefAttrSeq.find( sParaStyleName ) == aDefAttrSeq.end() ) { PropertyValue rPropVal; rPropVal.Name = sParaStyleName; - Any aVal( makeAny( OUString( pTxtNode->GetTxtColl()->GetName() ) ) ); + uno::Any aVal( uno::makeAny( ::rtl::OUString( pTxtNode->GetTxtColl()->GetName() ) ) ); rPropVal.Value = aVal; rPropVal.Handle = -1; rPropVal.State = beans::PropertyState_DEFAULT_VALUE; @@ -1380,8 +1391,8 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl( // resolve value text::WritingMode2::PAGE of property value entry WritingMode if ( !bOnlyCharAttrs && GetFrm() ) { - const OUString sWritingMode = - OUString::createFromAscii( + const ::rtl::OUString sWritingMode = + ::rtl::OUString::createFromAscii( GetPropName( UNO_NAME_WRITING_MODE ).pName ); tAccParaPropValMap::iterator aIter = aDefAttrSeq.find( sWritingMode ); if ( aIter != aDefAttrSeq.end() ) @@ -1434,7 +1445,7 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl( } else { - const OUString* pReqAttrs = aRequestedAttributes.getConstArray(); + const ::rtl::OUString* pReqAttrs = aRequestedAttributes.getConstArray(); const sal_Int32 nLength = aRequestedAttributes.getLength(); for( sal_Int32 i = 0; i < nLength; ++i ) { @@ -1447,8 +1458,8 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl( } } -Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes( - const Sequence< ::rtl::OUString >& aRequestedAttributes ) +uno::Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes( + const uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw ( uno::RuntimeException ) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -1457,7 +1468,7 @@ Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes( tAccParaPropValMap aDefAttrSeq; _getDefaultAttributesImpl( aRequestedAttributes, aDefAttrSeq ); - Sequence< PropertyValue > aValues( aDefAttrSeq.size() ); + uno::Sequence< PropertyValue > aValues( aDefAttrSeq.size() ); PropertyValue* pValues = aValues.getArray(); sal_Int32 i = 0; for ( tAccParaPropValMap::const_iterator aIter = aDefAttrSeq.begin(); @@ -1544,7 +1555,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl( // the corresponding default character attributes, are excluded. if ( aSet.GetItemState( aPropIt->nWID, TRUE, &pItem ) == SFX_ITEM_SET ) { - Any aVal; + uno::Any aVal; pItem->QueryValue( aVal, aPropIt->nMemberId ); PropertyValue rPropVal; @@ -1572,7 +1583,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl( } else { - const OUString* pReqAttrs = aRequestedAttributes.getConstArray(); + const ::rtl::OUString* pReqAttrs = aRequestedAttributes.getConstArray(); const sal_Int32 nLength = aRequestedAttributes.getLength(); for( sal_Int32 i = 0; i < nLength; ++i ) { @@ -1588,27 +1599,27 @@ void SwAccessibleParagraph::_getRunAttributesImpl( delete pPaM; } -Sequence< PropertyValue > SwAccessibleParagraph::getRunAttributes( +uno::Sequence< PropertyValue > SwAccessibleParagraph::getRunAttributes( sal_Int32 nIndex, - const Sequence< ::rtl::OUString >& aRequestedAttributes ) - throw ( IndexOutOfBoundsException, + const uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { vos::OGuard aGuard(Application::GetSolarMutex()); CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this ); { - const OUString& rText = GetString(); + const ::rtl::OUString& rText = GetString(); if ( !IsValidChar( nIndex, rText.getLength() ) ) { - throw IndexOutOfBoundsException(); + throw lang::IndexOutOfBoundsException(); } } tAccParaPropValMap aRunAttrSeq; _getRunAttributesImpl( nIndex, aRequestedAttributes, aRunAttrSeq ); - Sequence< PropertyValue > aValues( aRunAttrSeq.size() ); + uno::Sequence< PropertyValue > aValues( aRunAttrSeq.size() ); PropertyValue* pValues = aValues.getArray(); sal_Int32 i = 0; for ( tAccParaPropValMap::const_iterator aIter = aRunAttrSeq.begin(); @@ -1625,7 +1636,7 @@ Sequence< PropertyValue > SwAccessibleParagraph::getRunAttributes( awt::Rectangle SwAccessibleParagraph::getCharacterBounds( sal_Int32 nIndex ) - throw (IndexOutOfBoundsException, uno::RuntimeException) + throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -1636,7 +1647,7 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds( IsValidChar -> IsValidPosition */ if( ! (IsValidPosition( nIndex, GetString().getLength() ) ) ) - throw IndexOutOfBoundsException(); + throw lang::IndexOutOfBoundsException(); /* #i12332# */ sal_Bool bBehindText = sal_False; @@ -1688,7 +1699,7 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds( } sal_Int32 SwAccessibleParagraph::getCharacterCount() - throw (RuntimeException) + throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -1698,7 +1709,7 @@ sal_Int32 SwAccessibleParagraph::getCharacterCount() } sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint ) - throw (RuntimeException) + throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -1774,8 +1785,8 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint ) : -1L; } -OUString SwAccessibleParagraph::getSelectedText() - throw (RuntimeException) +::rtl::OUString SwAccessibleParagraph::getSelectedText() + throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -1783,11 +1794,13 @@ OUString SwAccessibleParagraph::getSelectedText() sal_Int32 nStart, nEnd; sal_Bool bSelected = GetSelection( nStart, nEnd ); - return bSelected ? GetString().copy( nStart, nEnd - nStart ) : OUString(); + return bSelected + ? GetString().copy( nStart, nEnd - nStart ) + : ::rtl::OUString(); } sal_Int32 SwAccessibleParagraph::getSelectionStart() - throw (RuntimeException) + throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -1799,7 +1812,7 @@ sal_Int32 SwAccessibleParagraph::getSelectionStart() } sal_Int32 SwAccessibleParagraph::getSelectionEnd() - throw (RuntimeException) + throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -1811,7 +1824,7 @@ sal_Int32 SwAccessibleParagraph::getSelectionEnd() } sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) - throw (IndexOutOfBoundsException, uno::RuntimeException) + throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -1821,7 +1834,7 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n sal_Int32 nLength = GetString().getLength(); if ( ! IsValidRange( nStartIndex, nEndIndex, nLength ) ) { - throw IndexOutOfBoundsException(); + throw lang::IndexOutOfBoundsException(); } sal_Bool bRet = sal_False; @@ -1846,8 +1859,8 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n return bRet; } -OUString SwAccessibleParagraph::getText() - throw (RuntimeException) +::rtl::OUString SwAccessibleParagraph::getText() + throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -1856,15 +1869,15 @@ OUString SwAccessibleParagraph::getText() return GetString(); } -OUString SwAccessibleParagraph::getTextRange( +::rtl::OUString SwAccessibleParagraph::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) - throw (IndexOutOfBoundsException, uno::RuntimeException) + throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this ); - OUString sText( GetString() ); + ::rtl::OUString sText( GetString() ); if ( IsValidRange( nStartIndex, nEndIndex, sText.getLength() ) ) { @@ -1872,7 +1885,7 @@ OUString SwAccessibleParagraph::getTextRange( return sText.copy(nStartIndex, nEndIndex-nStartIndex ); } else - throw IndexOutOfBoundsException(); + throw lang::IndexOutOfBoundsException(); } /*accessibility::*/TextSegment SwAccessibleParagraph::getTextAtIndex( sal_Int32 nIndex, sal_Int16 nTextType ) throw (lang::IndexOutOfBoundsException, lang::IllegalArgumentException, uno::RuntimeException) @@ -1885,7 +1898,7 @@ OUString SwAccessibleParagraph::getTextRange( aResult.SegmentStart = -1; aResult.SegmentEnd = -1; - const OUString rText = GetString(); + const ::rtl::OUString rText = GetString(); // implement the silly specification that first position after // text must return an empty string, rather than throwing an // IndexOutOfBoundsException, except for LINE, where the last @@ -1894,7 +1907,7 @@ OUString SwAccessibleParagraph::getTextRange( return aResult; // with error checking - Boundary aBound; + i18n::Boundary aBound; sal_Bool bWord = GetTextBoundary( aBound, rText, nIndex, nTextType ); DBG_ASSERT( aBound.startPos >= 0, "illegal boundary" ); @@ -1917,14 +1930,14 @@ OUString SwAccessibleParagraph::getTextRange( CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this ); - const OUString rText = GetString(); + const ::rtl::OUString rText = GetString(); /*accessibility::*/TextSegment aResult; aResult.SegmentStart = -1; aResult.SegmentEnd = -1; // get starting pos - Boundary aBound; + i18n::Boundary aBound; if (nIndex == rText.getLength()) aBound.startPos = aBound.endPos = nIndex; else @@ -1964,7 +1977,7 @@ OUString SwAccessibleParagraph::getTextRange( /*accessibility::*/TextSegment aResult; aResult.SegmentStart = -1; aResult.SegmentEnd = -1; - const OUString rText = GetString(); + const ::rtl::OUString rText = GetString(); // implement the silly specification that first position after // text must return an empty string, rather than throwing an @@ -1974,7 +1987,7 @@ OUString SwAccessibleParagraph::getTextRange( // get first word, then skip to next word - Boundary aBound; + i18n::Boundary aBound; GetTextBoundary( aBound, rText, nIndex, nTextType ); sal_Bool bWord = sal_False; while( !bWord ) @@ -1996,7 +2009,7 @@ OUString SwAccessibleParagraph::getTextRange( } sal_Bool SwAccessibleParagraph::copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) - throw (IndexOutOfBoundsException, uno::RuntimeException) + throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this ); vos::OGuard aGuard(Application::GetSolarMutex()); @@ -2013,7 +2026,7 @@ sal_Bool SwAccessibleParagraph::copyText( sal_Int32 nStartIndex, sal_Int32 nEndI // sal_Bool SwAccessibleParagraph::cutText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) - throw (IndexOutOfBoundsException, uno::RuntimeException) + throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { CHECK_FOR_DEFUNC( XAccessibleEditableText ); vos::OGuard aGuard(Application::GetSolarMutex()); @@ -2028,7 +2041,7 @@ sal_Bool SwAccessibleParagraph::cutText( sal_Int32 nStartIndex, sal_Int32 nEndIn } sal_Bool SwAccessibleParagraph::pasteText( sal_Int32 nIndex ) - throw (IndexOutOfBoundsException, uno::RuntimeException) + throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { CHECK_FOR_DEFUNC( XAccessibleEditableText ); vos::OGuard aGuard(Application::GetSolarMutex()); @@ -2043,27 +2056,27 @@ sal_Bool SwAccessibleParagraph::pasteText( sal_Int32 nIndex ) } sal_Bool SwAccessibleParagraph::deleteText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) - throw (IndexOutOfBoundsException, uno::RuntimeException) + throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { - return replaceText( nStartIndex, nEndIndex, OUString() ); + return replaceText( nStartIndex, nEndIndex, ::rtl::OUString() ); } -sal_Bool SwAccessibleParagraph::insertText( const OUString& sText, sal_Int32 nIndex ) - throw (IndexOutOfBoundsException, uno::RuntimeException) +sal_Bool SwAccessibleParagraph::insertText( const ::rtl::OUString& sText, sal_Int32 nIndex ) + throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { return replaceText( nIndex, nIndex, sText ); } sal_Bool SwAccessibleParagraph::replaceText( sal_Int32 nStartIndex, sal_Int32 nEndIndex, - const OUString& sReplacement ) - throw (IndexOutOfBoundsException, uno::RuntimeException) + const ::rtl::OUString& sReplacement ) + throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); CHECK_FOR_DEFUNC( XAccessibleEditableText ); - const OUString& rText = GetString(); + const ::rtl::OUString& rText = GetString(); if( IsValidRange( nStartIndex, nEndIndex, rText.getLength() ) ) { @@ -2099,7 +2112,7 @@ sal_Bool SwAccessibleParagraph::replaceText( return bSuccess; } else - throw IndexOutOfBoundsException(); + throw lang::IndexOutOfBoundsException(); } struct IndexCompare @@ -2116,16 +2129,16 @@ struct IndexCompare sal_Bool SwAccessibleParagraph::setAttributes( sal_Int32 nStartIndex, sal_Int32 nEndIndex, - const Sequence& rAttributeSet ) - throw (IndexOutOfBoundsException, uno::RuntimeException) + const uno::Sequence& rAttributeSet ) + throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); CHECK_FOR_DEFUNC( XAccessibleEditableText ); - const OUString& rText = GetString(); + const ::rtl::OUString& rText = GetString(); if( ! IsValidRange( nStartIndex, nEndIndex, rText.getLength() ) ) - throw IndexOutOfBoundsException(); + throw lang::IndexOutOfBoundsException(); if( !IsEditableState() ) return sal_False; @@ -2146,10 +2159,10 @@ sal_Bool SwAccessibleParagraph::setAttributes( sort( &pIndices[0], &pIndices[nLength], IndexCompare(pPairs) ); // create sorted sequences accoring to index array - Sequence aNames( nLength ); - OUString* pNames = aNames.getArray(); - Sequence aValues( nLength ); - Any* pValues = aValues.getArray(); + uno::Sequence< ::rtl::OUString > aNames( nLength ); + ::rtl::OUString* pNames = aNames.getArray(); + uno::Sequence< uno::Any > aValues( nLength ); + uno::Any* pValues = aValues.getArray(); for( i = 0; i < nLength; i++ ) { const PropertyValue& rVal = pPairs[pIndices[i]]; @@ -2173,8 +2186,8 @@ sal_Bool SwAccessibleParagraph::setAttributes( return bRet; } -sal_Bool SwAccessibleParagraph::setText( const OUString& sText ) - throw (RuntimeException) +sal_Bool SwAccessibleParagraph::setText( const ::rtl::OUString& sText ) + throw (uno::RuntimeException) { return replaceText(0, GetString().getLength(), sText); } @@ -2183,7 +2196,7 @@ sal_Bool SwAccessibleParagraph::setText( const OUString& sText ) void SwAccessibleParagraph::selectAccessibleChild( sal_Int32 nChildIndex ) - throw ( IndexOutOfBoundsException, + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { CHECK_FOR_DEFUNC( XAccessibleSelection ); @@ -2193,7 +2206,7 @@ void SwAccessibleParagraph::selectAccessibleChild( sal_Bool SwAccessibleParagraph::isAccessibleChildSelected( sal_Int32 nChildIndex ) - throw ( IndexOutOfBoundsException, + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { CHECK_FOR_DEFUNC( XAccessibleSelection ); @@ -2227,7 +2240,7 @@ sal_Int32 SwAccessibleParagraph::getSelectedAccessibleChildCount( ) uno::Reference SwAccessibleParagraph::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) - throw ( IndexOutOfBoundsException, + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException) { CHECK_FOR_DEFUNC( XAccessibleSelection ); @@ -2238,7 +2251,7 @@ uno::Reference SwAccessibleParagraph::getSelectedAccessibleChild( // --> OD 2004-11-16 #111714# - index has to be treated as global child index. void SwAccessibleParagraph::deselectAccessibleChild( sal_Int32 nChildIndex ) - throw ( IndexOutOfBoundsException, + throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) { CHECK_FOR_DEFUNC( XAccessibleSelection ); @@ -2300,7 +2313,7 @@ const SwTxtAttr *SwHyperlinkIter_Impl::next() }; sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkCount() - throw (RuntimeException) + throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -2322,7 +2335,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkCount() uno::Reference< XAccessibleHyperlink > SAL_CALL SwAccessibleParagraph::getHyperLink( sal_Int32 nLinkIndex ) - throw (IndexOutOfBoundsException, uno::RuntimeException) + throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); CHECK_FOR_DEFUNC( XAccessibleHypertext ); @@ -2371,13 +2384,13 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL } if( !xRet.is() ) - throw IndexOutOfBoundsException(); + throw lang::IndexOutOfBoundsException(); return xRet; } sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkIndex( sal_Int32 nCharIndex ) - throw (IndexOutOfBoundsException, uno::RuntimeException) + throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); CHECK_FOR_DEFUNC( XAccessibleHypertext ); @@ -2386,7 +2399,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkIndex( sal_Int32 nCharInde sal_Int32 nLength = GetString().getLength(); if ( ! IsValidPosition( nCharIndex, nLength ) ) { - throw IndexOutOfBoundsException(); + throw lang::IndexOutOfBoundsException(); } sal_Int32 nRet = -1; @@ -2415,13 +2428,30 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkIndex( sal_Int32 nCharInde } // --> OD 2008-05-26 #i71360# +// --> OD 2010-02-22 #i108125# - adjustments for change tracking text markup sal_Int32 SAL_CALL SwAccessibleParagraph::getTextMarkupCount( sal_Int32 nTextMarkupType ) throw (lang::IllegalArgumentException, uno::RuntimeException) { - SwTextMarkupHelper aTextMarkupHelper( *GetTxtNode(), GetPortionData() ); + std::auto_ptr pTextMarkupHelper; + switch ( nTextMarkupType ) + { + case text::TextMarkupType::TRACK_CHANGE_INSERTION: + case text::TextMarkupType::TRACK_CHANGE_DELETION: + case text::TextMarkupType::TRACK_CHANGE_FORMATCHANGE: + { + pTextMarkupHelper.reset( new SwTextMarkupHelper( + GetPortionData(), + *(mpParaChangeTrackInfo->getChangeTrackingTextMarkupList( nTextMarkupType ) )) ); + } + break; + default: + { + pTextMarkupHelper.reset( new SwTextMarkupHelper( GetPortionData(), *GetTxtNode() ) ); + } + } - return aTextMarkupHelper.getTextMarkupCount( nTextMarkupType ); + return pTextMarkupHelper->getTextMarkupCount( nTextMarkupType ); } /*accessibility::*/TextSegment SAL_CALL @@ -2431,9 +2461,25 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getTextMarkupCount( sal_Int32 nTextMar lang::IllegalArgumentException, uno::RuntimeException) { - SwTextMarkupHelper aTextMarkupHelper( *GetTxtNode(), GetPortionData() ); + std::auto_ptr pTextMarkupHelper; + switch ( nTextMarkupType ) + { + case text::TextMarkupType::TRACK_CHANGE_INSERTION: + case text::TextMarkupType::TRACK_CHANGE_DELETION: + case text::TextMarkupType::TRACK_CHANGE_FORMATCHANGE: + { + pTextMarkupHelper.reset( new SwTextMarkupHelper( + GetPortionData(), + *(mpParaChangeTrackInfo->getChangeTrackingTextMarkupList( nTextMarkupType ) )) ); + } + break; + default: + { + pTextMarkupHelper.reset( new SwTextMarkupHelper( GetPortionData(), *GetTxtNode() ) ); + } + } - return aTextMarkupHelper.getTextMarkup( nTextMarkupIndex, nTextMarkupType ); + return pTextMarkupHelper->getTextMarkup( nTextMarkupIndex, nTextMarkupType ); } uno::Sequence< /*accessibility::*/TextSegment > SAL_CALL @@ -2450,9 +2496,25 @@ uno::Sequence< /*accessibility::*/TextSegment > SAL_CALL throw lang::IndexOutOfBoundsException(); } - SwTextMarkupHelper aTextMarkupHelper( *GetTxtNode(), GetPortionData() ); + std::auto_ptr pTextMarkupHelper; + switch ( nTextMarkupType ) + { + case text::TextMarkupType::TRACK_CHANGE_INSERTION: + case text::TextMarkupType::TRACK_CHANGE_DELETION: + case text::TextMarkupType::TRACK_CHANGE_FORMATCHANGE: + { + pTextMarkupHelper.reset( new SwTextMarkupHelper( + GetPortionData(), + *(mpParaChangeTrackInfo->getChangeTrackingTextMarkupList( nTextMarkupType ) )) ); + } + break; + default: + { + pTextMarkupHelper.reset( new SwTextMarkupHelper( GetPortionData(), *GetTxtNode() ) ); + } + } - return aTextMarkupHelper.getTextMarkupAtIndex( nCharIndex, nTextMarkupType ); + return pTextMarkupHelper->getTextMarkupAtIndex( nCharIndex, nTextMarkupType ); } // <-- @@ -2484,7 +2546,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getLineNumberAtIndex( sal_Int32 nIndex throw lang::IndexOutOfBoundsException(); } - Boundary aLineBound; + i18n::Boundary aLineBound; GetPortionData().GetBoundaryOfLine( nLineNo, aLineBound ); /*accessibility::*/TextSegment aTextAtLine; @@ -2526,7 +2588,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getNumberOfLineWithCaret() // special handling for cursor positioned at end of text line via End key if ( nCaretPos != 0 ) { - Boundary aLineBound; + i18n::Boundary aLineBound; GetPortionData().GetBoundaryOfLine( nLineNo, aLineBound ); if ( nCaretPos == aLineBound.startPos ) { @@ -2564,4 +2626,11 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getNumberOfLineWithCaret() return nLineNo; } +// --> OD 2010-02-19 #i108125# +void SwAccessibleParagraph::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) +{ + mpParaChangeTrackInfo->reset(); + + SwClient::Modify( pOld, pNew ); +} // <-- diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx index 09a50922c4..a486040897 100644 --- a/sw/source/core/access/accpara.hxx +++ b/sw/source/core/access/accpara.hxx @@ -39,6 +39,9 @@ #include #include #include +// --> OD 2010-02-19 #i108125# +#include +// <-- class SwTxtFrm; class SwTxtNode; @@ -46,6 +49,10 @@ class SwPaM; class SwAccessiblePortionData; class SwAccessibleHyperTextData; class SwXTextPortion; +// --> OD 2010-02-19 #i108125# +class SwParaChangeTrackingInfo; +// <-- + namespace rtl { class OUString; } namespace com { namespace sun { namespace star { namespace i18n { struct Boundary; } @@ -58,6 +65,9 @@ typedef ::std::hash_map< ::rtl::OUString, ::std::equal_to< ::rtl::OUString > > tAccParaPropValMap; class SwAccessibleParagraph : + // --> OD 2010-02-19 #i108125# + public SwClient, + // <-- public SwAccessibleContext, public ::com::sun::star::accessibility::XAccessibleEditableText, public com::sun::star::accessibility::XAccessibleSelection, @@ -87,6 +97,9 @@ class SwAccessibleParagraph : // implementation for XAccessibleSelection SwAccessibleSelectionHelper aSelectionHelper; + // --> OD 2010-02-19 #i108125# + SwParaChangeTrackingInfo* mpParaChangeTrackInfo; + // <-- /// get the SwTxtNode (requires frame; check before) const SwTxtNode* GetTxtNode() const; @@ -226,13 +239,17 @@ protected: public: - SwAccessibleParagraph( SwAccessibleMap* pInitMap, - const SwTxtFrm *pTxtFrm ); + SwAccessibleParagraph( SwAccessibleMap& rInitMap, + const SwTxtFrm& rTxtFrm ); inline operator ::com::sun::star::accessibility::XAccessibleText *(); virtual sal_Bool HasCursor(); // required by map to remember that object + // --> OD 2010-02-19 #i108125# + virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew); + // <-- + //===== XAccessibleContext ============================================== /// Return this object's description. diff --git a/sw/source/core/access/makefile.mk b/sw/source/core/access/makefile.mk index 402933f129..a514d70625 100644 --- a/sw/source/core/access/makefile.mk +++ b/sw/source/core/access/makefile.mk @@ -67,7 +67,8 @@ SLOFILES = \ $(SLO)$/accselectionhelper.obj \ $(SLO)$/acctable.obj \ $(SLO)$/acctextframe.obj \ - $(SLO)$/textmarkuphelper.obj + $(SLO)$/textmarkuphelper.obj \ + $(SLO)$/parachangetrackinginfo.obj EXCEPTIONSFILES= \ $(SLO)$/acccell.obj \ diff --git a/sw/source/core/access/parachangetrackinginfo.cxx b/sw/source/core/access/parachangetrackinginfo.cxx new file mode 100644 index 0000000000..7c1e25f05c --- /dev/null +++ b/sw/source/core/access/parachangetrackinginfo.cxx @@ -0,0 +1,231 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_sw.hxx" + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace css = com::sun::star; + +namespace { + void initChangeTrackTextMarkupLists( const SwTxtFrm& rTxtFrm, + SwWrongList*& opChangeTrackInsertionTextMarkupList, + SwWrongList*& opChangeTrackDeletionTextMarkupList, + SwWrongList*& opChangeTrackFormatChangeTextMarkupList ) + { + opChangeTrackInsertionTextMarkupList = new SwWrongList( WRONGLIST_CHANGETRACKING ); + opChangeTrackDeletionTextMarkupList = new SwWrongList( WRONGLIST_CHANGETRACKING ); + opChangeTrackFormatChangeTextMarkupList = new SwWrongList( WRONGLIST_CHANGETRACKING ); + + if ( !rTxtFrm.GetTxtNode() ) + { + ASSERT( false, + " instance!" ); + return; + } + const SwTxtNode& rTxtNode( *(rTxtFrm.GetTxtNode()) ); + + const IDocumentRedlineAccess* pIDocChangeTrack( rTxtNode.getIDocumentRedlineAccess() ); + if ( !pIDocChangeTrack ) + { + ASSERT( false, + " instance!" ); + return; + } + + if ( !IDocumentRedlineAccess::IsShowChanges( pIDocChangeTrack->GetRedlineMode() ) || + pIDocChangeTrack->GetRedlineTbl().Count() == 0 ) + { + // nothing to do --> empty change track text markup lists. + return; + } + + const sal_uInt16 nIdxOfFirstRedlineForTxtNode = + pIDocChangeTrack->GetRedlinePos( rTxtNode, USHRT_MAX ); + if ( nIdxOfFirstRedlineForTxtNode == USHRT_MAX ) + { + // nothing to do --> empty change track text markup lists. + return; + } + + const xub_StrLen nTxtFrmTextStartPos = rTxtFrm.IsFollow() + ? rTxtFrm.GetOfst() + : 0; + const xub_StrLen nTxtFrmTextEndPos = rTxtFrm.HasFollow() + ? rTxtFrm.GetFollow()->GetOfst() + : rTxtFrm.GetTxt().Len(); + + // iteration over the redlines which overlap with the text node. + const SwRedlineTbl& rRedlineTbl = pIDocChangeTrack->GetRedlineTbl(); + const USHORT nRedlineCount( rRedlineTbl.Count() ); + for ( sal_uInt16 nActRedline = nIdxOfFirstRedlineForTxtNode; + nActRedline < nRedlineCount; + ++nActRedline) + { + const SwRedline* pActRedline = rRedlineTbl[ nActRedline ]; + if ( pActRedline->Start()->nNode > rTxtNode.GetIndex() ) + { + break; + } + + xub_StrLen nTxtNodeChangeTrackStart( STRING_LEN ); + xub_StrLen nTxtNodeChangeTrackEnd( STRING_LEN ); + pActRedline->CalcStartEnd( rTxtNode.GetIndex(), + nTxtNodeChangeTrackStart, + nTxtNodeChangeTrackEnd ); + if ( nTxtNodeChangeTrackStart > nTxtFrmTextEndPos || + nTxtNodeChangeTrackEnd < nTxtFrmTextStartPos ) + { + // Consider only redlines which overlap with the text frame's text. + continue; + } + + SwWrongList* pMarkupList( 0 ); + switch ( pActRedline->GetType() ) + { + case nsRedlineType_t::REDLINE_INSERT: + { + pMarkupList = opChangeTrackInsertionTextMarkupList; + } + break; + case nsRedlineType_t::REDLINE_DELETE: + { + pMarkupList = opChangeTrackDeletionTextMarkupList; + } + break; + case nsRedlineType_t::REDLINE_FORMAT: + { + pMarkupList = opChangeTrackFormatChangeTextMarkupList; + } + break; + default: + { + // other types are not considered + } + } + if ( pMarkupList ) + { + const xub_StrLen nTxtFrmChangeTrackStart = + nTxtNodeChangeTrackStart <= nTxtFrmTextStartPos + ? nTxtFrmTextStartPos + : nTxtNodeChangeTrackStart; + + const xub_StrLen nTxtFrmChangeTrackEnd = + nTxtNodeChangeTrackEnd >= nTxtFrmTextEndPos + ? nTxtFrmTextEndPos + : nTxtNodeChangeTrackEnd; + + pMarkupList->Insert( rtl::OUString(), 0, + nTxtFrmChangeTrackStart, + nTxtFrmChangeTrackEnd - nTxtFrmChangeTrackStart, + pMarkupList->Count() ); + } + } // eof iteration over the redlines which overlap with the text node + } +} // eof anonymous namespace + +SwParaChangeTrackingInfo::SwParaChangeTrackingInfo( const SwTxtFrm& rTxtFrm ) + : mrTxtFrm( rTxtFrm ) + , mpChangeTrackInsertionTextMarkupList( 0 ) + , mpChangeTrackDeletionTextMarkupList( 0 ) + , mpChangeTrackFormatChangeTextMarkupList( 0 ) +{ +} + + +SwParaChangeTrackingInfo::~SwParaChangeTrackingInfo() +{ + reset(); +} + +void SwParaChangeTrackingInfo::reset() +{ + delete mpChangeTrackInsertionTextMarkupList; + mpChangeTrackInsertionTextMarkupList = 0; + + delete mpChangeTrackDeletionTextMarkupList; + mpChangeTrackDeletionTextMarkupList = 0; + + delete mpChangeTrackFormatChangeTextMarkupList; + mpChangeTrackFormatChangeTextMarkupList = 0; +} + +const SwWrongList* SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList( const sal_Int32 nTextMarkupType ) +{ + SwWrongList* pChangeTrackingTextMarkupList = 0; + + if ( mpChangeTrackInsertionTextMarkupList == 0 ) + { + ASSERT( mpChangeTrackDeletionTextMarkupList == 0, + " expected to be NULL." ); + ASSERT( mpChangeTrackFormatChangeTextMarkupList == 0, + " expected to be NULL." ); + initChangeTrackTextMarkupLists( mrTxtFrm, + mpChangeTrackInsertionTextMarkupList, + mpChangeTrackDeletionTextMarkupList, + mpChangeTrackFormatChangeTextMarkupList ); + } + + switch ( nTextMarkupType ) + { + case css::text::TextMarkupType::TRACK_CHANGE_INSERTION: + { + pChangeTrackingTextMarkupList = mpChangeTrackInsertionTextMarkupList; + } + break; + case css::text::TextMarkupType::TRACK_CHANGE_DELETION: + { + pChangeTrackingTextMarkupList = mpChangeTrackDeletionTextMarkupList; + } + break; + case css::text::TextMarkupType::TRACK_CHANGE_FORMATCHANGE: + { + pChangeTrackingTextMarkupList = mpChangeTrackFormatChangeTextMarkupList; + } + break; + default: + { + ASSERT( false, + " - misusage - unexpected text markup type for change tracking." ); + } + } + + return pChangeTrackingTextMarkupList; +} diff --git a/sw/source/core/access/parachangetrackinginfo.hxx b/sw/source/core/access/parachangetrackinginfo.hxx new file mode 100644 index 0000000000..91131f37b7 --- /dev/null +++ b/sw/source/core/access/parachangetrackinginfo.hxx @@ -0,0 +1,59 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _PARACHANGETRACKINGINFO_HXX_ +#define _PARACHANGETRACKINGINFO_HXX_ + +#include + +class SwTxtFrm; +class SwWrongList; + +class SwParaChangeTrackingInfo +{ + public: + explicit SwParaChangeTrackingInfo( const SwTxtFrm& rTxtFrm ); + ~SwParaChangeTrackingInfo(); + + void reset(); + + const SwWrongList* getChangeTrackingTextMarkupList( const sal_Int32 nTextMarkupType ); + + private: + SwParaChangeTrackingInfo( const SwParaChangeTrackingInfo& ); + SwParaChangeTrackingInfo& operator=( const SwParaChangeTrackingInfo& ); + + const SwTxtFrm& mrTxtFrm; + + SwWrongList* mpChangeTrackInsertionTextMarkupList; + SwWrongList* mpChangeTrackDeletionTextMarkupList; + SwWrongList* mpChangeTrackFormatChangeTextMarkupList; +}; +#endif + diff --git a/sw/source/core/access/textmarkuphelper.cxx b/sw/source/core/access/textmarkuphelper.cxx index be68370f7d..1d56515e6c 100644 --- a/sw/source/core/access/textmarkuphelper.cxx +++ b/sw/source/core/access/textmarkuphelper.cxx @@ -37,7 +37,7 @@ #include #include -#include "errhdl.hxx" +#include #include #include @@ -84,22 +84,39 @@ namespace { } } -// implementation of calss -SwTextMarkupHelper::SwTextMarkupHelper( const SwTxtNode& rTxtNode, - const SwAccessiblePortionData& rPortionData ) - : mrTxtNode( rTxtNode ), - mrPortionData( rPortionData ) +// implementation of class +SwTextMarkupHelper::SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData, + const SwTxtNode& rTxtNode ) + : mrPortionData( rPortionData ) + // --> OD 2010-02-19 #i108125# + , mpTxtNode( &rTxtNode ) + , mpTextMarkupList( 0 ) + // <-- { } -sal_Int32 SwTextMarkupHelper::getTextMarkupCount( sal_Int32 nTextMarkupType ) +// --> OD 2010-02-19 #i108125# +SwTextMarkupHelper::SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData, + const SwWrongList& rTextMarkupList ) + : mrPortionData( rPortionData ) + , mpTxtNode( 0 ) + , mpTextMarkupList( &rTextMarkupList ) +{ +} +// <-- + +sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 nTextMarkupType ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { sal_Int32 nTextMarkupCount( 0 ); + // --> OD 2010-02-19 #i108125# const SwWrongList* pTextMarkupList = - getTextMarkupList( mrTxtNode, nTextMarkupType ); + mpTextMarkupList + ? mpTextMarkupList + : getTextMarkupList( *mpTxtNode, nTextMarkupType ); + // <-- if ( pTextMarkupList ) { nTextMarkupCount = pTextMarkupList->Count(); @@ -108,8 +125,8 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( sal_Int32 nTextMarkupType ) return nTextMarkupCount; } ::com::sun::star::accessibility::TextSegment - SwTextMarkupHelper::getTextMarkup( sal_Int32 nTextMarkupIndex, - sal_Int32 nTextMarkupType ) + SwTextMarkupHelper::getTextMarkup( const sal_Int32 nTextMarkupIndex, + const sal_Int32 nTextMarkupType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) @@ -124,8 +141,12 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( sal_Int32 nTextMarkupType ) aTextMarkupSegment.SegmentStart = -1; aTextMarkupSegment.SegmentEnd = -1; + // --> OD 2010-02-19 #i108125# const SwWrongList* pTextMarkupList = - getTextMarkupList( mrTxtNode, nTextMarkupType ); + mpTextMarkupList + ? mpTextMarkupList + : getTextMarkupList( *mpTxtNode, nTextMarkupType ); + // <-- if ( pTextMarkupList ) { const SwWrongArea* pTextMarkup = @@ -152,8 +173,8 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( sal_Int32 nTextMarkupType ) } ::com::sun::star::uno::Sequence< ::com::sun::star::accessibility::TextSegment > - SwTextMarkupHelper::getTextMarkupAtIndex( sal_Int32 nCharIndex, - sal_Int32 nTextMarkupType ) + SwTextMarkupHelper::getTextMarkupAtIndex( const sal_Int32 nCharIndex, + const sal_Int32 nTextMarkupType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) @@ -169,9 +190,13 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( sal_Int32 nTextMarkupType ) return uno::Sequence< ::com::sun::star::accessibility::TextSegment >(); } - ::std::vector< ::com::sun::star::accessibility::TextSegment > aTmpTextMarkups; + // --> OD 2010-02-19 #i108125# const SwWrongList* pTextMarkupList = - getTextMarkupList( mrTxtNode, nTextMarkupType ); + mpTextMarkupList + ? mpTextMarkupList + : getTextMarkupList( *mpTxtNode, nTextMarkupType ); + // <-- + ::std::vector< ::com::sun::star::accessibility::TextSegment > aTmpTextMarkups; if ( pTextMarkupList ) { const ::rtl::OUString rText = mrPortionData.GetAccessibleString(); diff --git a/sw/source/core/access/textmarkuphelper.hxx b/sw/source/core/access/textmarkuphelper.hxx index 6dda5c74f5..7054852589 100644 --- a/sw/source/core/access/textmarkuphelper.hxx +++ b/sw/source/core/access/textmarkuphelper.hxx @@ -40,30 +40,37 @@ namespace com { namespace sun { namespace star { namespace accessibility { struct TextSegment; } } } } -class SwTxtNode; class SwAccessiblePortionData; +class SwTxtNode; +// --> OD 2010-02-19 #i108125# +class SwWrongList; +// <-- class SwTextMarkupHelper { public: - SwTextMarkupHelper( const SwTxtNode& rTxtNode, - const SwAccessiblePortionData& rPortionData ); + SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData, + const SwTxtNode& rTxtNode ); + // --> OD 2010-02-19 #i108125# + SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData, + const SwWrongList& rTextMarkupList ); + // <-- ~SwTextMarkupHelper() {} - sal_Int32 getTextMarkupCount( sal_Int32 nTextMarkupType ) + sal_Int32 getTextMarkupCount( const sal_Int32 nTextMarkupType ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); ::com::sun::star::accessibility::TextSegment getTextMarkup( - sal_Int32 nTextMarkupIndex, - sal_Int32 nTextMarkupType ) + const sal_Int32 nTextMarkupIndex, + const sal_Int32 nTextMarkupType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Sequence< ::com::sun::star::accessibility::TextSegment > - getTextMarkupAtIndex( sal_Int32 nCharIndex, - sal_Int32 nTextMarkupType ) + getTextMarkupAtIndex( const sal_Int32 nCharIndex, + const sal_Int32 nTextMarkupType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); @@ -72,8 +79,12 @@ class SwTextMarkupHelper SwTextMarkupHelper( const SwTextMarkupHelper& ); SwTextMarkupHelper& operator=( const SwTextMarkupHelper& ); - const SwTxtNode& mrTxtNode; const SwAccessiblePortionData& mrPortionData; + + // --> OD 2010-02-19 #i108125# + const SwTxtNode* mpTxtNode; + const SwWrongList* mpTextMarkupList; + // <-- }; #endif diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx index 50aa25d1a5..e2dbbf5730 100644 --- a/sw/source/core/inc/wrong.hxx +++ b/sw/source/core/inc/wrong.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,7 +60,13 @@ public: : maType(rType), mxPropertyBag(xPropertyBag), mnPos(nPos), mnLen(nLen), mpSubList(pSubList) {} }; -enum WrongListType { WRONGLIST_SPELL, WRONGLIST_GRAMMAR, WRONGLIST_SMARTTAG }; +enum WrongListType +{ + WRONGLIST_SPELL, + WRONGLIST_GRAMMAR, + WRONGLIST_SMARTTAG, + WRONGLIST_CHANGETRACKING +}; class SwWrongList { -- cgit v1.2.3 From eb860cd3f3de271bb979266d791cb5bd1b1ca50f Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 24 Feb 2010 11:35:25 +0100 Subject: sw33a11y01: #i108125# - include new source file into the exception files. --- sw/source/core/access/makefile.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/access/makefile.mk b/sw/source/core/access/makefile.mk index a514d70625..7b4bf0c638 100644 --- a/sw/source/core/access/makefile.mk +++ b/sw/source/core/access/makefile.mk @@ -94,7 +94,8 @@ EXCEPTIONSFILES= \ $(SLO)$/accselectionhelper.obj \ $(SLO)$/acctable.obj \ $(SLO)$/acctextframe.obj \ - $(SLO)$/textmarkuphelper.obj + $(SLO)$/textmarkuphelper.obj \ + $(SLO)$/parachangetrackinginfo.obj # --- Targets ------------------------------------------------------- -- cgit v1.2.3 From 0ba09d557cbeefc14c0cc17c97c3e31cb5a0798e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 26 Feb 2010 12:10:25 +0100 Subject: dba33f: #i108712# setPrinter: always set MAP_TWIP --- sw/source/core/doc/doc.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) mode change 100755 => 100644 sw/source/core/doc/doc.cxx (limited to 'sw/source') diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx old mode 100755 new mode 100644 index 7789021939..71ca2ca27d --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -477,6 +477,16 @@ void SwDoc::setPrinter(/*[in]*/ SfxPrinter *pP,/*[in]*/ bool bDeleteOld,/*[in]*/ delete pPrt; pPrt = pP; + // our printer should always use TWIP. Don't rely on this being set in ViewShell::InitPrt, there + // are situations where this isn't called. + // #i108712# / 2010-02-26 / frank.schoenheit@sun.com + if ( pPrt ) + { + MapMode aMapMode( pPrt->GetMapMode() ); + aMapMode.SetMapUnit( MAP_TWIP ); + pPrt->SetMapMode( aMapMode ); + } + if ( pDrawModel && !get( IDocumentSettingAccess::USE_VIRTUAL_DEVICE ) ) pDrawModel->SetRefDevice( pPrt ); } -- cgit v1.2.3 From 70414ae9b23af048ebfbe6b063c17af298981290 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 26 Feb 2010 13:14:24 +0100 Subject: ppp02: #i109540# fix mail merge (thanks os) --- sw/source/ui/envelp/mailmrge.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index de4f58fb80..2e116b8586 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -68,7 +68,7 @@ #include #include #include -#include +#include #include #include #include @@ -99,7 +99,7 @@ using namespace ::com::sun::star::ui::dialogs; ---------------------------------------------------------------------------*/ struct SwMailMergeDlg_Impl { - uno::Reference xFController; + uno::Reference xFController; uno::Reference xChgLstnr; uno::Reference xSelSupp; }; @@ -332,7 +332,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, pBeamerWin->Show(); } uno::Reference xController = xFrame->getController(); - pImpl->xFController = uno::Reference(xController, UNO_QUERY); + pImpl->xFController = uno::Reference(xController, UNO_QUERY); if(pImpl->xFController.is()) { uno::Reference< awt::XControl > xCtrl = pImpl->xFController->getCurrentControl( ); -- cgit v1.2.3 From e883172e00dfa00f0b81376b2cfc17fbb1d267e3 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 26 Feb 2010 13:18:43 +0100 Subject: fix unused variables --- sw/source/core/view/printdata.cxx | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index 533df69f42..d67b820fc9 100755 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -158,10 +158,6 @@ void SwRenderData::MakeSwPrtOptions( BOOL bWeb = pDocShell->IsA( aSwWebDocShellTypeId ); rOptions.MakeOptions( bWeb ); - const sal_Int32 nContent = pOpt->getIntValue( "PrintContent", 0 ); - const bool bPrintSelection = nContent == 2; - - // get print options to use from provided properties rOptions.bPrintGraphic = pOpt->IsPrintGraphics(); rOptions.bPrintTable = pOpt->IsPrintTables(); -- cgit v1.2.3 From 5bbf18eb690b7094fbf8dc50e27995879d890504 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 26 Feb 2010 14:17:40 +0100 Subject: fix a warning --- sw/source/core/doc/doc.cxx | 1 - 1 file changed, 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 8b97dc3e53..84f2b56cdb 100755 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1335,7 +1335,6 @@ void SwDoc::CalculatePagesForPrinting( // 0 -> print all pages (default if aPageRange is empty) // 1 -> print range according to PageRange // 2 -> print selection - const sal_Int32 nContent = rOptions.getIntValue( "PrintContent", 0 ); if (1 == nContent) aPageRange = rOptions.getStringValue( "PageRange", OUString() ); if (2 == nContent) -- cgit v1.2.3 From f463fa47311ad12555a6fd724ffec82796762107 Mon Sep 17 00:00:00 2001 From: npower Developer Date: Fri, 26 Feb 2010 13:27:15 +0000 Subject: npower14miscfixes: #i107591# apply caolans' fix for removing unused methods --- sw/source/ui/vba/vbafind.cxx | 4 ++-- sw/source/ui/vba/vbafind.hxx | 2 ++ sw/source/ui/vba/vbaheaderfooterhelper.cxx | 3 ++- sw/source/ui/vba/vbaheaderfooterhelper.hxx | 2 ++ sw/source/ui/vba/vbarange.cxx | 4 ++-- sw/source/ui/vba/vbarange.hxx | 2 ++ sw/source/ui/vba/vbasystem.cxx | 5 ----- sw/source/ui/vba/vbasystem.hxx | 1 - sw/source/ui/vba/vbawindow.cxx | 5 ----- sw/source/ui/vba/vbawindow.hxx | 1 - sw/source/ui/vba/vbawrapformat.cxx | 5 ----- sw/source/ui/vba/vbawrapformat.hxx | 1 - 12 files changed, 12 insertions(+), 23 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx index 56c0e6a446..1af48f7c1e 100644 --- a/sw/source/ui/vba/vbafind.cxx +++ b/sw/source/ui/vba/vbafind.cxx @@ -80,13 +80,13 @@ void SwVbaFind::SetReplace( sal_Int32 type ) mnReplaceType = type; mbReplace = sal_True; } - +#ifdef TOMORROW rtl::OUString SwVbaFind::ReplaceWildcards( const rtl::OUString& /*rText*/ ) throw ( uno::RuntimeException ) { // TODO: return rtl::OUString(); } - +#endif uno::Reference< text::XTextRange > SwVbaFind::FindOneElement() throw ( uno::RuntimeException ) { uno::Reference< text::XTextRange > xFoundOne; diff --git a/sw/source/ui/vba/vbafind.hxx b/sw/source/ui/vba/vbafind.hxx index 292d9292a7..c624a5aa7a 100644 --- a/sw/source/ui/vba/vbafind.hxx +++ b/sw/source/ui/vba/vbafind.hxx @@ -58,7 +58,9 @@ private: void SetReplace( sal_Int32 type ); void SetReplaceWith( const rtl::OUString& rText ) throw ( css::uno::RuntimeException ); rtl::OUString GetReplaceWith() throw ( css::uno::RuntimeException ); +#ifdef TOMORROW rtl::OUString ReplaceWildcards( const rtl::OUString& rText ) throw ( css::uno::RuntimeException ); +#endif css::uno::Reference< css::text::XTextRange > FindOneElement() throw ( css::uno::RuntimeException ); sal_Bool SearchReplace() throw ( css::uno::RuntimeException ); diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.cxx b/sw/source/ui/vba/vbaheaderfooterhelper.cxx index 80ecd25123..d91f37a20d 100644 --- a/sw/source/ui/vba/vbaheaderfooterhelper.cxx +++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx @@ -155,7 +155,7 @@ sal_Bool HeaderFooterHelper::isEvenPagesFooter( const uno::Reference< frame::XMo } return sal_False; } - +#ifdef TOMORROW sal_Bool HeaderFooterHelper::isPrimaryHeader( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException) { if( isHeader( xModel, xCurrentText ) ) @@ -173,3 +173,4 @@ sal_Bool HeaderFooterHelper::isPrimaryFooter( const uno::Reference< frame::XMode } return sal_False; } +#endif diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.hxx b/sw/source/ui/vba/vbaheaderfooterhelper.hxx index b1bcfab09e..0e5fd4c450 100644 --- a/sw/source/ui/vba/vbaheaderfooterhelper.hxx +++ b/sw/source/ui/vba/vbaheaderfooterhelper.hxx @@ -42,8 +42,10 @@ public: static sal_Bool isFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException); static sal_Bool isFirstPageFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException); static sal_Bool isEvenPagesFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException); +#ifdef TOMORROW static sal_Bool isPrimaryHeader( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException); static sal_Bool isPrimaryFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException); +#endif }; #endif diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx index 02427c984e..d6f719dd0b 100644 --- a/sw/source/ui/vba/vbarange.cxx +++ b/sw/source/ui/vba/vbarange.cxx @@ -84,13 +84,13 @@ SwVbaRange::getXTextRange() throw (uno::RuntimeException) uno::Reference< text::XTextRange > xTextRange( mxTextCursor, uno::UNO_QUERY_THROW ); return xTextRange; } - +#ifdef TOMORROW void SwVbaRange::setXTextRange( const uno::Reference< text::XTextRange >& xRange ) throw (uno::RuntimeException) { mxTextCursor->gotoRange( xRange->getStart(), sal_False ); mxTextCursor->gotoRange( xRange->getEnd(), sal_True ); } - +#endif /** * The complexity in this method is because we need to workaround * an issue that the last paragraph in a document does not have a trailing CRLF. diff --git a/sw/source/ui/vba/vbarange.hxx b/sw/source/ui/vba/vbarange.hxx index cbb9941100..ca3a4ea21b 100644 --- a/sw/source/ui/vba/vbarange.hxx +++ b/sw/source/ui/vba/vbarange.hxx @@ -56,7 +56,9 @@ public: css::uno::Reference< css::text::XTextDocument > getDocument() { return mxTextDocument; } virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getXTextRange() throw (css::uno::RuntimeException); +#ifdef TOMORROW void setXTextRange( const css::uno::Reference< css::text::XTextRange >& xRange ) throw (css::uno::RuntimeException); +#endif css::uno::Reference< css::text::XText > getXText() { return mxText; } void setXTextCursor( const css::uno::Reference< css::text::XTextCursor >& xTextCursor ) { mxTextCursor = xTextCursor; } diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx index 1a03c99b84..66e5d1fd4c 100644 --- a/sw/source/ui/vba/vbasystem.cxx +++ b/sw/source/ui/vba/vbasystem.cxx @@ -37,11 +37,6 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -PrivateProfileStringListener::PrivateProfileStringListener( const rtl::OUString& rFileName, const ByteString& rGroupName, const ByteString& rKey ) - :maFileName( rFileName ), maGroupName( rGroupName ), maKey( rKey ) -{ -} - PrivateProfileStringListener::~PrivateProfileStringListener() { } diff --git a/sw/source/ui/vba/vbasystem.hxx b/sw/source/ui/vba/vbasystem.hxx index 3745bf96eb..df548a76a5 100644 --- a/sw/source/ui/vba/vbasystem.hxx +++ b/sw/source/ui/vba/vbasystem.hxx @@ -42,7 +42,6 @@ private: ByteString maKey; public: PrivateProfileStringListener(){}; - PrivateProfileStringListener( const rtl::OUString& rFileName, const ByteString& rGroupName, const ByteString& rKey ); virtual ~PrivateProfileStringListener(); void Initialize( const rtl::OUString& rFileName, const ByteString& rGroupName, const ByteString& rKey ); diff --git a/sw/source/ui/vba/vbawindow.cxx b/sw/source/ui/vba/vbawindow.cxx index 255df83b4e..dc5913aaa1 100644 --- a/sw/source/ui/vba/vbawindow.cxx +++ b/sw/source/ui/vba/vbawindow.cxx @@ -39,11 +39,6 @@ SwVbaWindow::SwVbaWindow( const uno::Reference< XHelperInterface >& xParent, con { } -SwVbaWindow::SwVbaWindow( uno::Sequence< uno::Any > const & args, uno::Reference< uno::XComponentContext > const & xContext ) - : WindowImpl_BASE( args, xContext ) -{ -} - void SwVbaWindow::Activate() throw (css::uno::RuntimeException) { diff --git a/sw/source/ui/vba/vbawindow.hxx b/sw/source/ui/vba/vbawindow.hxx index a32dbcab4a..1ef1ff9141 100644 --- a/sw/source/ui/vba/vbawindow.hxx +++ b/sw/source/ui/vba/vbawindow.hxx @@ -39,7 +39,6 @@ class SwVbaWindow : public WindowImpl_BASE { public: SwVbaWindow( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel ); - SwVbaWindow( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext > const& xContext ); // Attributes diff --git a/sw/source/ui/vba/vbawrapformat.cxx b/sw/source/ui/vba/vbawrapformat.cxx index 4b711f1b2b..84cef6c251 100644 --- a/sw/source/ui/vba/vbawrapformat.cxx +++ b/sw/source/ui/vba/vbawrapformat.cxx @@ -34,11 +34,6 @@ using namespace ooo::vba; using namespace com::sun::star; -SwVbaWrapFormat::SwVbaWrapFormat( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape ) : SwVbaWrapFormat_BASE( xParent, xContext ), m_xShape( xShape ), mnWrapFormatType( 0 ), mnSide( word::WdWrapSideType::wdWrapBoth ) -{ - m_xPropertySet.set( xShape, uno::UNO_QUERY_THROW ); -} - SwVbaWrapFormat::SwVbaWrapFormat( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& xContext ) : SwVbaWrapFormat_BASE( getXSomethingFromArgs< XHelperInterface >( aArgs, 0 ), xContext ), m_xShape( getXSomethingFromArgs< drawing::XShape >( aArgs, 1, false ) ), mnWrapFormatType( 0 ), mnSide( word::WdWrapSideType::wdWrapBoth ) { m_xPropertySet.set( m_xShape, uno::UNO_QUERY_THROW ); diff --git a/sw/source/ui/vba/vbawrapformat.hxx b/sw/source/ui/vba/vbawrapformat.hxx index 9980d4999c..1ee8eb7a4c 100644 --- a/sw/source/ui/vba/vbawrapformat.hxx +++ b/sw/source/ui/vba/vbawrapformat.hxx @@ -47,7 +47,6 @@ private: void setDistance( const rtl::OUString& sName, float _distance ) throw (css::uno::RuntimeException); public: - SwVbaWrapFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape ); SwVbaWrapFormat( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ); virtual ::sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException); -- cgit v1.2.3 From e7e8a8cb9571128fbd6544d0b585d579c7339065 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Fri, 26 Feb 2010 15:43:56 +0100 Subject: sw33bf03: #i100611#,#i107834# - method - remove adjustment to determined screen due to an arbitrary text string rendering and apply cmc's patch to preserve "faked" font properties (weight and italic) --- sw/source/core/txtnode/fntcache.cxx | 181 ++---------------------------------- 1 file changed, 6 insertions(+), 175 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 2b30826062..1f79e4d07b 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -447,8 +447,6 @@ USHORT SwFntObj::GetFontLeading( const ViewShell *pSh, const OutputDevice& rOut void SwFntObj::CreateScrFont( const ViewShell& rSh, const OutputDevice& rOut ) { -static sal_Char __READONLY_DATA sStandardString[] = "Dies ist der Teststring"; - if ( pScrFont ) return; @@ -484,6 +482,11 @@ static sal_Char __READONLY_DATA sStandardString[] = "Dies ist der Teststring"; pScrFont = pPrtFont; FontMetric aMet = pPrt->GetFontMetric( ); + //Don't loose "faked" properties of the logical font that don't truly + //exist in the physical font metrics which vcl which fake up for us + aMet.SetWeight(pScrFont->GetWeight()); + aMet.SetItalic(pScrFont->GetItalic()); + bSymbol = RTL_TEXTENCODING_SYMBOL == aMet.GetCharSet(); if ( USHRT_MAX == nGuessedLeading ) @@ -492,178 +495,6 @@ static sal_Char __READONLY_DATA sStandardString[] = "Dies ist der Teststring"; if ( USHRT_MAX == nExtLeading ) nExtLeading = static_cast(aMet.GetExtLeading()); -#if OSL_DEBUG_LEVEL > 1 - const XubString aDbgTxt1( pPrtFont->GetName() ); - const XubString aDbgTxt2( aMet.GetName() ); -#endif - - if ( aMet.IsDeviceFont( ) ) - { - if ( (RTL_TEXTENCODING_DONTKNOW == pPrtFont->GetCharSet() || - FAMILY_DONTKNOW == pPrtFont->GetFamily() || - PITCH_DONTKNOW == pPrtFont->GetPitch() ) && - (RTL_TEXTENCODING_DONTKNOW == aMet.GetCharSet() || - FAMILY_DONTKNOW == aMet.GetFamily() || - PITCH_DONTKNOW == aMet.GetPitch() ) ) - { - // Das folgende ist teuer, aber selten: ein unbekannter Font - // kann vom Drucker nicht vernuenftig zugeordnet werden. Dann - // nehmen wir eben das Mapping des Bildschirms in Anspruch und - // setzen den Familyname, Charset und Pitch wie dort. Dieser - // Font wird nun nochmals auf dem Drucker eingestellt. - Font aFnt1 = pOut->GetFontMetric(); - Font aFnt2( *pPrtFont ); - - if (RTL_TEXTENCODING_DONTKNOW == pPrtFont->GetCharSet()) - aFnt2.SetCharSet( aFnt1.GetCharSet() ); - if (FAMILY_DONTKNOW == pPrtFont->GetFamily()) - aFnt2.SetFamily( aFnt1.GetFamily() ); - if (PITCH_DONTKNOW == pPrtFont->GetPitch()) - aFnt2.SetPitch( aFnt1.GetPitch() ); - - pPrt->SetFont( aFnt2 ); - aMet = pPrt->GetFontMetric( ); - } - - const XubString aStandardStr( sStandardString, - RTL_TEXTENCODING_MS_1252 ); - - // This is the reference width - const long nOWidth = pPrt->GetTextWidth( aStandardStr ); - - // Let's have a look what's the difference to the width - // calculated for the output device using the font set at the - // reference device - long nSWidth = nOWidth - pOut->GetTextWidth( aStandardStr ); - nScrHeight = (USHORT) pOut->GetTextHeight(); - - // Um Aerger mit dem Generic Printer aus dem Wege zu gehen. - if( aMet.GetSize().Height() ) - { - BOOL bScrSymbol = FALSE; - CharSet ePrtChSet = aMet.GetCharSet(); - // NoSymbol bedeutet, dass der Drucker sich fuer einen - // Nicht-Symbol-Font entschieden hat. - BOOL bNoSymbol = ( RTL_TEXTENCODING_DONTKNOW != ePrtChSet && - RTL_TEXTENCODING_SYMBOL != ePrtChSet ); - if ( bNoSymbol ) - bScrSymbol = RTL_TEXTENCODING_SYMBOL == - pOut->GetFontMetric().GetCharSet(); - Size aTmp( aMet.GetSize() ); - - if( aTmp.Width() && !pPrtFont->GetSize().Width() ) - { - aTmp.Width() = 0; - aMet.SetSize( aTmp ); - } - - // Now we set the metrics used at the reference device at the - // output device - pOut->SetFont( aMet ); - - if( bNoSymbol && ( bScrSymbol != ( RTL_TEXTENCODING_SYMBOL == - pOut->GetFontMetric().GetCharSet() ) ) ) - { - // Hier landen wir, wenn der Drucker keinen Symbolfont waehlt, - // aber genau einer der beiden Screenfonts ein Symbolfont ist. - // Wir nehmen dann eben den anderen. - if ( bScrSymbol ) - pScrFont = new Font( aMet ); // mit Abgleich - else - pOut->SetFont( *pPrtFont ); // ohne Abgleich - } - else - { - // Let's have a look what's the difference to the width - // calculated for the output device using the metrics set at - // the reference device - long nPWidth = nOWidth - pOut->GetTextWidth( aStandardStr ); - - // We prefer smaller fonts - BYTE nNeg = 0; - if ( nSWidth<0 ) { nSWidth *= -2; nNeg = 1; } - if ( nPWidth<0 ) { nPWidth *= -2; nNeg |= 2; } - - // nSWidth = Difference between string width on reference device - // and string width on output device with user font set. - // nPWidth = Difference between string width on reference device - // and string width on output device with metric obtained - // from reference device. - // We prefer to take the font with the smaller deviation, - // exception: keep the original font unless the deviation - // is really bad (at least 3%) - // Since the test string is neither localized nor has a high resemblance - // of the "real text for this font" a higher deviation is reasonable - - if ( (nSWidth <= nPWidth) - || (nSWidth * 32 <= nOWidth ) ) - { - // No adjustment, we take the same font for the output - // device like for the reference device - pOut->SetFont( *pPrtFont ); - pScrFont = pPrtFont; - nPWidth = nSWidth; - nNeg &= 1; - } - else - { - // The metrics give a better result. So we build - // a new font for the output device based on the - // metrics used at the reference device - pScrFont = new Font( aMet ); // mit Abgleich - nSWidth = nPWidth; - nNeg &= 2; - } - - // - // now pScrFont is set to the better font and this should - // be set at the output device - // - - // we still have to check if the choosed font is not to wide - if( nNeg && nOWidth ) - { - nPWidth *= 100; - nPWidth /= nOWidth; - - // if the screen font is too wide, we try to reduce - // the font height and get a smaller one - if( nPWidth > 25 ) - { - if( nPWidth > 80 ) - nPWidth = 80; - nPWidth = 100 - nPWidth/4; - Size aTmpSize = pScrFont->GetSize(); - aTmpSize.Height() *= nPWidth; - aTmpSize.Height() /= 100; - if( aTmpSize.Width() ) - { - aTmpSize.Width() *= nPWidth; - aTmpSize.Width() /= 100; - } - Font *pNew = new Font( *pScrFont ); - pNew->SetSize( aTmpSize ); - pOut->SetFont( *pNew ); - nPWidth = nOWidth - - pOut->GetTextWidth( aStandardStr ); - if( nPWidth < 0 ) { nPWidth *= -2; } - if( nPWidth < nSWidth ) - { - if( pScrFont != pPrtFont ) - delete pScrFont; - pScrFont = pNew; - } - else - { - delete pNew; - pOut->SetFont( *pScrFont ); - } - } - } - } - } - } - // reset the original reference device font pPrt->SetFont( aOldPrtFnt ); } @@ -2427,7 +2258,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf ) // skip character cells for complex scripts // --> OD 2009-10-14 #i105571# - skip also character cells for CJK - if ( rInf.GetFont() && + if ( rInf.GetFont() && ( SW_CTL == rInf.GetFont()->GetActual() || SW_CJK == rInf.GetFont()->GetActual() ) && pBreakIt->GetBreakIter().is() ) -- cgit v1.2.3 From 56c9d2536c9b16ea203b163a948da7c57b70c9ed Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Sat, 27 Feb 2010 13:42:34 +0100 Subject: vcl110: #i90907# new IsDeltaPixel function on CommandWheelData --- sw/source/ui/uiview/pview.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 0f09427a72..7c4a327994 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -1060,7 +1060,7 @@ void SwPagePreViewWin::Command( const CommandEvent& rCEvt ) if( pData ) { const CommandWheelData aDataNew(pData->GetDelta(),pData->GetNotchDelta(),COMMAND_WHEEL_PAGESCROLL, - pData->GetMode(),pData->GetModifier(),pData->IsHorz()); + pData->GetMode(),pData->GetModifier(),pData->IsHorz(), pData->IsDeltaPixel()); const CommandEvent aEvent( rCEvt.GetMousePosPixel(),rCEvt.GetCommand(),rCEvt.IsMouseEvent(),&aDataNew); bCallBase = !mrView.HandleWheelCommands( aEvent ); } -- cgit v1.2.3 From 0bc1387399c855dcafda856747f2d0037dee29d6 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 1 Mar 2010 12:00:01 +0100 Subject: cws tl74: include statements fixed --- sw/source/ui/shells/drwtxtex.cxx | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index 581e5f3fe8..3004ebd4d4 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -85,23 +85,23 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include -- cgit v1.2.3 From 0272119db0d5648015ab352547ead72dfb6676dc Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 1 Mar 2010 13:36:19 +0100 Subject: ppp02: #i109540# adapt print monitor to new workflow --- sw/source/ui/dbui/dbmgr.cxx | 3 +++ sw/source/ui/dbui/dbui.src | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 410d728431..8235bb7b84 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1258,6 +1258,9 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, nEndRow = pImpl->pMergeData ? pImpl->pMergeData->xResultSet->getRow() : 0; } while( !bCancel && (bSynchronizedDoc && (nStartRow != nEndRow)? ExistsNextRecord() : ToNextMergeRecord())); + + aPrtMonDlg.Show( FALSE ); + // save the single output document if(rMergeDescriptor.bCreateSingleFile || bAsSingleFile) { diff --git a/sw/source/ui/dbui/dbui.src b/sw/source/ui/dbui/dbui.src index 62f17960cc..5570abeefa 100644 --- a/sw/source/ui/dbui/dbui.src +++ b/sw/source/ui/dbui/dbui.src @@ -86,7 +86,7 @@ ModelessDialog DLG_PRINTMONITOR Pos = MAP_APPFONT ( 6, 17 ) ; Size = MAP_APPFONT ( 100, 8 ) ; CENTER = TRUE ; - Text [ en-US ] = "is being printed on" ; + Text [ en-US ] = "is being prepared for printing on" ; }; FixedText FT_SENDING { -- cgit v1.2.3 From 00038de96930ff9bcdf4fdf01039656d8f072080 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 4 Mar 2010 15:09:14 +0100 Subject: #i10000# build fix (missing includes etc ) --- sw/source/ui/docvw/edtwin.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 7f3a4c4010..d484af64aa 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -2308,17 +2308,17 @@ KEYINPUT_CHECKTABLE_INSDEL: case KS_CheckAutoCorrect: { if( pACorr && pACfg->IsAutoFmtByInput() && -/* pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | + pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | ChgOrdinalNumber | ChgToEnEmDash | SetINetAttr | Autocorrect ) && !rSh.HasReadonlySel() ) - {*/ + /* { pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | ChgFractionSymbol | ChgOrdinalNumber | ChgToEnEmDash | SetINetAttr | Autocorrect ) && - !rSh.HasReadonlySel() ) + !rSh.HasReadonlySel() ) */ { FlushInBuffer(); rSh.AutoCorrect( *pACorr, static_cast< sal_Unicode >('\0') ); -- cgit v1.2.3 From 58f7441b1a687c41eaf5535554eb26adadae08fd Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 4 Mar 2010 15:09:44 +0100 Subject: #i10000# build fix (missing includes etc ) --- sw/source/ui/uiview/viewling.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index b10d562754..697455bd8e 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -70,7 +70,7 @@ #include #include #include - +#include #include #include #include // STR_MULT_INTERACT_SPELL_WARN -- cgit v1.2.3 From ccc3e6f8532e934a23a1a65b93616ff8219ba780 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 4 Mar 2010 15:10:30 +0100 Subject: #i10000# build fix (missing includes etc ) --- sw/source/ui/wrtsh/wrtsh1.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 7efa98559a..3036f903e4 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -108,7 +108,7 @@ #include #include #include -#include +//#include #include // -> #111827# -- cgit v1.2.3 From a4848773caf5438ff741cb0398cd5e68e5b353db Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 9 Mar 2010 13:27:17 +0100 Subject: odfmetadata4: #i109787#: make SwIndex constructor explicit --- sw/inc/index.hxx | 2 +- sw/source/core/bastyp/index.cxx | 2 +- sw/source/core/doc/doccomp.cxx | 2 +- sw/source/core/doc/docnew.cxx | 4 ++-- sw/source/core/doc/doctxm.cxx | 6 +++--- sw/source/core/frmedt/fecopy.cxx | 8 ++++---- sw/source/filter/rtf/rtffly.cxx | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx index bf09e85b76..a4e60b30b1 100644 --- a/sw/inc/index.hxx +++ b/sw/inc/index.hxx @@ -63,7 +63,7 @@ class SW_DLLPUBLIC SwIndex void Remove(); // Ausketten public: - SwIndex( SwIndexReg * pReg, xub_StrLen nIdx = 0 ); + explicit SwIndex(SwIndexReg *const pReg, xub_StrLen const nIdx = 0); SwIndex( const SwIndex & ); SwIndex( const SwIndex &, short nDiff ); ~SwIndex() { Remove(); } diff --git a/sw/source/core/bastyp/index.cxx b/sw/source/core/bastyp/index.cxx index a42023beff..473d60a1ae 100644 --- a/sw/source/core/bastyp/index.cxx +++ b/sw/source/core/bastyp/index.cxx @@ -84,7 +84,7 @@ void SwIndexReg::ChkArr() -SwIndex::SwIndex( SwIndexReg* pArr, xub_StrLen nIdx ) +SwIndex::SwIndex(SwIndexReg *const pArr, xub_StrLen const nIdx) : nIndex( nIdx ), pArray( pArr ), pNext( 0 ), pPrev( 0 ) { if( !pArray ) diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 77624c51ad..bd5a675d09 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -1384,7 +1384,7 @@ void SwCompareData::ShowDelete( const CompareData& rData, ULONG nStt, if( *pCorr->GetPoint() == *pTmp->GetPoint() ) { SwNodeIndex aTmpPos( pTmp->GetMark()->nNode, -1 ); - *pCorr->GetPoint() = SwPosition( aTmpPos, 0 ); + *pCorr->GetPoint() = SwPosition( aTmpPos ); } } } diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 53bf9926ea..a7c0edfc1c 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -1407,8 +1407,8 @@ void SwDoc::Paste( const SwDoc& rSource ) { aIndexBefore++; - SwPaM aPaM(SwPosition(aIndexBefore, 0), - SwPosition(rInsPos.nNode, 0)); + SwPaM aPaM(SwPosition(aIndexBefore), + SwPosition(rInsPos.nNode)); MakeUniqueNumRules(aPaM); } diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index fde92f6f85..e5fd392a96 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -578,7 +578,7 @@ BOOL SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes ) aSearchPam will contain the point where to move the cursors to. */ SwPaM aSearchPam(*pMyNode->EndOfSectionNode()); - SwPosition aEndPos(*pStartNd->EndOfSectionNode(), 0); + SwPosition aEndPos(*pStartNd->EndOfSectionNode()); if (! aSearchPam.Move() /* no content node found */ || *aSearchPam.GetPoint() >= aEndPos /* content node found outside surrounding */ @@ -588,7 +588,7 @@ BOOL SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes ) content node */ SwPaM aTmpPam(*pMyNode); aSearchPam = aTmpPam; - SwPosition aStartPos(*pStartNd, 0); + SwPosition aStartPos(*pStartNd); if ( ! aSearchPam.Move(fnMoveBackward) /* no content node found */ || *aSearchPam.GetPoint() <= aStartPos /* content node @@ -599,7 +599,7 @@ BOOL SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes ) /* There is no content node in the surrounding of TOX'. Append text node behind TOX' section. */ - SwPosition aInsPos(*pMyNode->EndOfSectionNode(), 0); + SwPosition aInsPos(*pMyNode->EndOfSectionNode()); AppendTxtNode(aInsPos); SwPaM aTmpPam1(aInsPos); diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index fae8842643..fe7590d366 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -835,8 +835,8 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) pClpDoc->CopyRange( rCopy, rInsPos, false ); { aIndexBefore++; - SwPaM aPaM(SwPosition(aIndexBefore, 0), - SwPosition(rInsPos.nNode, 0)); + SwPaM aPaM(SwPosition(aIndexBefore), + SwPosition(rInsPos.nNode)); aPaM.GetDoc()->MakeUniqueNumRules(aPaM); } } @@ -1065,8 +1065,8 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) { aIndexBefore++; - SwPaM aPaM(SwPosition(aIndexBefore, 0), - SwPosition(rInsPos.nNode, 0)); + SwPaM aPaM(SwPosition(aIndexBefore), + SwPosition(rInsPos.nNode)); aPaM.GetDoc()->MakeUniqueNumRules(aPaM); } diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx index 09516bd871..260762fbf2 100644 --- a/sw/source/filter/rtf/rtffly.cxx +++ b/sw/source/filter/rtf/rtffly.cxx @@ -1169,8 +1169,8 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet ) SwTxtNode* pTxtNd = pFlySave->nSttNd.GetNode().GetTxtNode(); SwTxtFlyCnt* pFlyCnt = 0; if( 1 == pTxtNd->GetTxt().Len() && - 0 != ( pFlyCnt = (SwTxtFlyCnt*)pTxtNd->GetTxtAttr( - 0, RES_TXTATR_FLYCNT )) && + 0 != (pFlyCnt = static_cast( + pTxtNd->GetTxtAttrForCharAt(0, RES_TXTATR_FLYCNT))) && pFlyCnt->GetFlyCnt().GetFrmFmt() ) { // then move the content into the surrounded fly -- cgit v1.2.3 From 30805fa6da335d081b573aab687705fbb6e545af Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 9 Mar 2010 13:27:18 +0100 Subject: odfmetadata4: #i107672#: SwX{Reference,DocumentIndex}Mark attach to right fmt: replace SwTxtNode::GetTxtAttr() with methods: GetTxtAttrAt() handles only those hints where only 1 can be at same position. GetTxtAttrsAt() handles all hints and returns a vector. refactor SwXDocumentIndexMark to create InsertTOXMark() method. --- sw/inc/ndtxt.hxx | 28 ++-- .../complex/writer/TextPortionEnumerationTest.java | 32 +++++ sw/source/core/crsr/crstrvl.cxx | 37 ++++-- sw/source/core/crsr/trvlfnfl.cxx | 8 +- sw/source/core/doc/docfmt.cxx | 14 +- sw/source/core/edit/edattr.cxx | 8 +- sw/source/core/frmedt/fecopy.cxx | 5 +- sw/source/core/text/EnhancedPDFExportHelper.cxx | 11 +- sw/source/core/text/inftxt.cxx | 4 +- sw/source/core/txtnode/ndtxt.cxx | 102 +++++++++------ sw/source/core/undo/unattr.cxx | 4 +- sw/source/core/unocore/unocrsrhelper.cxx | 34 ++--- sw/source/core/unocore/unoidx.cxx | 141 +++++++++++---------- sw/source/core/unocore/unoobj2.cxx | 4 +- sw/source/core/unocore/unorefmk.cxx | 52 +++++++- sw/source/filter/ww1/fltshell.cxx | 4 +- 16 files changed, 310 insertions(+), 178 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index aef62c8cc9..1cf175b307 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -363,14 +363,26 @@ public: BOOL DontExpandFmt( const SwIndex& rIdx, bool bFlag = true, BOOL bFmtToTxtAttributes = TRUE ); - // gebe das vorgegebene Attribut, welches an der TextPosition (rIdx) - // gesetzt ist zurueck. Gibt es keines, returne 0-Pointer - // gesetzt heisst: Start <= rIdx < End - // FIXME: this function does not seem to be well-defined for those - // hints of which several may cover a single position, like TOXMark, - // or CharFmt - SwTxtAttr *GetTxtAttr( const SwIndex& rIdx, USHORT nWhichHt, - BOOL bExpand = FALSE ) const; + /** get the innermost text attribute covering position nIndex. + @param nWhich only attribute with this id is returned. + @param bExpand the predicate for matching is: + (bExpand) ? (Start < nIndex <= End) : (Start <= nIndex < End) + + ATTENTION: this function is not well-defined for those + hints of which several may cover a single position, like + RES_TXTATR_CHARFMT, RES_TXTATR_REFMARK, RES_TXTATR_TOXMARK + */ + SwTxtAttr *GetTxtAttrAt(xub_StrLen const nIndex, RES_TXTATR const nWhich, + bool const bExpand = false) const; + + /** get the innermost text attributes covering position nIndex. + @param nWhich only attributes with this id are returned. + @param bExpand the predicate for matching is: + (bExpand) ? (Start < nIndex <= End) : (Start <= nIndex < End) + */ + ::std::vector GetTxtAttrsAt(xub_StrLen const nIndex, + RES_TXTATR const nWhich, + bool const bExpand = false) const; /** get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position, if one exists. diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java index d96de76a82..9187dc581a 100755 --- a/sw/qa/complex/writer/TextPortionEnumerationTest.java +++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java @@ -1640,12 +1640,28 @@ public class TextPortionEnumerationTest extends ComplexTestCase public void testRefMark3() throws Exception { + // BUG: #i107672# (non-deterministic; depends on pointer ordering) String name1 = mkName("refmark"); String name2 = mkName("refmark"); + String name3 = mkName("refmark"); + String name4 = mkName("refmark"); + String name5 = mkName("refmark"); + String name6 = mkName("refmark"); + String name7 = mkName("refmark"); TreeNode root = new TreeNode(); root.appendChild( new ReferenceMarkStartNode(name1) ); root.appendChild( new ReferenceMarkStartNode(name2) ); + root.appendChild( new ReferenceMarkStartNode(name3) ); + root.appendChild( new ReferenceMarkStartNode(name4) ); + root.appendChild( new ReferenceMarkStartNode(name5) ); + root.appendChild( new ReferenceMarkStartNode(name6) ); + root.appendChild( new ReferenceMarkStartNode(name7) ); root.appendChild( new TextNode("abc") ); + root.appendChild( new ReferenceMarkEndNode(name7) ); + root.appendChild( new ReferenceMarkEndNode(name6) ); + root.appendChild( new ReferenceMarkEndNode(name5) ); + root.appendChild( new ReferenceMarkEndNode(name4) ); + root.appendChild( new ReferenceMarkEndNode(name3) ); root.appendChild( new ReferenceMarkEndNode(name2) ); root.appendChild( new ReferenceMarkEndNode(name1) ); root.appendChild( new TextNode("de") ); @@ -1665,12 +1681,28 @@ public class TextPortionEnumerationTest extends ComplexTestCase public void testToxMark3() throws Exception { + // BUG: #i107672# (non-deterministic; depends on pointer ordering) String name1 = mkName("toxmark"); String name2 = mkName("toxmark"); + String name3 = mkName("toxmark"); + String name4 = mkName("toxmark"); + String name5 = mkName("toxmark"); + String name6 = mkName("toxmark"); + String name7 = mkName("toxmark"); TreeNode root = new TreeNode(); root.appendChild( new DocumentIndexMarkStartNode(name1) ); root.appendChild( new DocumentIndexMarkStartNode(name2) ); + root.appendChild( new DocumentIndexMarkStartNode(name3) ); + root.appendChild( new DocumentIndexMarkStartNode(name4) ); + root.appendChild( new DocumentIndexMarkStartNode(name5) ); + root.appendChild( new DocumentIndexMarkStartNode(name6) ); + root.appendChild( new DocumentIndexMarkStartNode(name7) ); root.appendChild( new TextNode("abc") ); + root.appendChild( new DocumentIndexMarkEndNode(name7) ); + root.appendChild( new DocumentIndexMarkEndNode(name6) ); + root.appendChild( new DocumentIndexMarkEndNode(name5) ); + root.appendChild( new DocumentIndexMarkEndNode(name4) ); + root.appendChild( new DocumentIndexMarkEndNode(name3) ); root.appendChild( new DocumentIndexMarkEndNode(name2) ); root.appendChild( new DocumentIndexMarkEndNode(name1) ); root.appendChild( new TextNode("de") ); diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index d0d1bda135..d566e19b04 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -710,8 +710,9 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext, SwTxtNode* pTNd = rPos.nNode.GetNode().GetTxtNode(); ASSERT( pTNd, "Wo ist mein CntntNode?" ); - SwTxtFld* pTxtFld = (SwTxtFld*)pTNd->GetTxtAttr( rPos.nContent, - RES_TXTATR_FIELD ); + SwTxtFld * pTxtFld = static_cast( + pTNd->GetTxtAttrForCharAt(rPos.nContent.GetIndex(), + RES_TXTATR_FIELD)); BOOL bDelFld = 0 == pTxtFld; if( bDelFld ) { @@ -1231,13 +1232,27 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, { pTxtAttr = 0; if( SwContentAtPos::SW_TOXMARK & rCntntAtPos.eCntntAtPos ) - pTxtAttr = pTxtNd->GetTxtAttr( aPos.nContent, - RES_TXTATR_TOXMARK ); + { + ::std::vector const marks( + pTxtNd->GetTxtAttrsAt( + aPos.nContent.GetIndex(), RES_TXTATR_TOXMARK)); + if (marks.size()) + { // hmm... can only return 1 here + pTxtAttr = *marks.begin(); + } + } if( !pTxtAttr && SwContentAtPos::SW_REFMARK & rCntntAtPos.eCntntAtPos ) - pTxtAttr = pTxtNd->GetTxtAttr( aPos.nContent, - RES_TXTATR_REFMARK ); + { + ::std::vector const marks( + pTxtNd->GetTxtAttrsAt( + aPos.nContent.GetIndex(), RES_TXTATR_REFMARK)); + if (marks.size()) + { // hmm... can only return 1 here + pTxtAttr = *marks.begin(); + } + } if( pTxtAttr ) { @@ -1282,8 +1297,8 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, if( !bRet && SwContentAtPos::SW_INETATTR & rCntntAtPos.eCntntAtPos && !aTmpState.bFtnNoInfo ) { - pTxtAttr = pTxtNd->GetTxtAttr( aPos.nContent, - RES_TXTATR_INETFMT ); + pTxtAttr = pTxtNd->GetTxtAttrAt( + aPos.nContent.GetIndex(), RES_TXTATR_INETFMT); // nur INetAttrs mit URLs "erkennen" if( pTxtAttr && pTxtAttr->GetINetFmt().GetValue().Len() ) { @@ -1618,8 +1633,10 @@ BOOL SwCrsrShell::SelectTxtAttr( USHORT nWhich, BOOL bExpand, if( !pTxtAttr ) { SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode(); - pTxtAttr = pTxtNd ? pTxtNd->GetTxtAttr( rPos.nContent, - nWhich, bExpand ) : 0; + pTxtAttr = (pTxtNd) + ? pTxtNd->GetTxtAttrAt(rPos.nContent.GetIndex(), + static_cast(nWhich), bExpand) + : 0; } if( pTxtAttr ) diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx index c75ea7b4fc..0d324b0217 100644 --- a/sw/source/core/crsr/trvlfnfl.cxx +++ b/sw/source/core/crsr/trvlfnfl.cxx @@ -62,11 +62,13 @@ BOOL SwCursor::GotoFtnTxt() { // springe aus dem Content zur Fussnote BOOL bRet = FALSE; - SwTxtAttr *pFtn; SwTxtNode* pTxtNd = GetPoint()->nNode.GetNode().GetTxtNode(); - if( pTxtNd && 0 != ( - pFtn = pTxtNd->GetTxtAttr( GetPoint()->nContent, RES_TXTATR_FTN ) )) + SwTxtAttr *const pFtn( (pTxtNd) + ? pTxtNd->GetTxtAttrForCharAt( + GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN) + : 0); + if (pFtn) { SwCrsrSaveState aSaveState( *this ); GetPoint()->nNode = *((SwTxtFtn*)pFtn)->GetStartNode(); diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 28eeb72247..2afa2fa9e9 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -397,10 +397,9 @@ void SwDoc::ResetAttrs( const SwPaM &rRg, // JP 22.08.96: Sonderfall: steht der Crsr in einem URL-Attribut // dann wird dessen Bereich genommen - const SwTxtAttr* pURLAttr; - if( pTxtNd->HasHints() && - 0 != ( pURLAttr = pTxtNd->GetTxtAttr( rSt, RES_TXTATR_INETFMT )) - && pURLAttr->GetINetFmt().GetValue().Len() ) + SwTxtAttr const*const pURLAttr( + pTxtNd->GetTxtAttrAt(rSt.GetIndex(), RES_TXTATR_INETFMT)); + if (pURLAttr && pURLAttr->GetINetFmt().GetValue().Len()) { nMkPos = *pURLAttr->GetStart(); nPtPos = *pURLAttr->GetEnd(); @@ -902,10 +901,9 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet, // JP 22.08.96: Sonderfall: steht der Crsr in einem URL-Attribut // dann wird dessen Bereich genommen - const SwTxtAttr* pURLAttr; - if( pTxtNd->HasHints() && - 0 != ( pURLAttr = pTxtNd->GetTxtAttr( rSt, RES_TXTATR_INETFMT )) - && pURLAttr->GetINetFmt().GetValue().Len() ) + SwTxtAttr const*const pURLAttr( + pTxtNd->GetTxtAttrAt(rSt.GetIndex(), RES_TXTATR_INETFMT)); + if (pURLAttr && pURLAttr->GetINetFmt().GetValue().Len()) { nMkPos = *pURLAttr->GetStart(); nPtPos = *pURLAttr->GetEnd(); diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index ff077f1018..27b4021bdb 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -31,14 +31,10 @@ #include -#ifndef _SVX_TSTPITEM_HXX //autogen #include -#endif #include #include -#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_ #include -#endif #include #include #include @@ -230,8 +226,8 @@ BOOL SwEditShell::GetCurFtn( SwFmtFtn* pFillFtn ) if( !pTxtNd ) return FALSE; - SwTxtAttr *pFtn = pTxtNd->GetTxtAttr( pCrsr->GetPoint()->nContent, - RES_TXTATR_FTN ); + SwTxtAttr *const pFtn = pTxtNd->GetTxtAttrForCharAt( + pCrsr->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); if( pFtn && pFillFtn ) { // Daten vom Attribut uebertragen diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index fe7590d366..19377c4e06 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -182,8 +182,9 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt ) // das kopierte TextAttribut wieder entfernt werden, // sonst wird es als TextSelektion erkannt const SwIndex& rIdx = pFlyFmt->GetAnchor().GetCntntAnchor()->nContent; - SwTxtFlyCnt* pTxtFly = (SwTxtFlyCnt*)pTxtNd->GetTxtAttr( - rIdx, RES_TXTATR_FLYCNT ); + SwTxtFlyCnt *const pTxtFly = static_cast( + pTxtNd->GetTxtAttrForCharAt( + rIdx.GetIndex(), RES_TXTATR_FLYCNT)); if( pTxtFly ) { ((SwFmtFlyCnt&)pTxtFly->GetFlyCnt()).SetFlyFmt( 0 ); diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index f21b74f92b..6d7ba700a6 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -1392,14 +1392,17 @@ void SwTaggedPDFHelper::BeginInlineStructureElements() case POR_PARA : { SwTxtNode* pNd = (SwTxtNode*)pFrm->GetTxtNode(); - SwIndex aIndex( pNd, rInf.GetIdx() ); - const SwTxtAttr* pInetFmtAttr = pNd->GetTxtAttr( aIndex, RES_TXTATR_INETFMT ); + SwTxtAttr const*const pInetFmtAttr = + pNd->GetTxtAttrAt(rInf.GetIdx(), RES_TXTATR_INETFMT); String sStyleName; if ( !pInetFmtAttr ) { - const SwTxtAttr* pCharFmtAttr = pNd->GetTxtAttr( aIndex, RES_TXTATR_CHARFMT ); - const SwCharFmt* pCharFmt = pCharFmtAttr ? pCharFmtAttr->GetCharFmt().GetCharFmt() : 0; + ::std::vector const charAttrs( + pNd->GetTxtAttrsAt(rInf.GetIdx(), RES_TXTATR_CHARFMT)); + // TODO: handle more than 1 char style? + const SwCharFmt* pCharFmt = (charAttrs.size()) + ? (*charAttrs.begin())->GetCharFmt().GetCharFmt() : 0; if ( pCharFmt ) SwStyleNameMapper::FillProgName( pCharFmt->GetName(), sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True ); } diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index f21d5e4e67..f002e123b8 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1312,8 +1312,8 @@ void SwTxtPaintInfo::_NotifyURL( const SwLinePortion &rPor ) const if( aIntersect.HasArea() ) { SwTxtNode *pNd = (SwTxtNode*)GetTxtFrm()->GetTxtNode(); - SwIndex aIndex( pNd, GetIdx() ); - SwTxtAttr *pAttr = pNd->GetTxtAttr( aIndex, RES_TXTATR_INETFMT ); + SwTxtAttr *const pAttr = + pNd->GetTxtAttrAt(GetIdx(), RES_TXTATR_INETFMT); if( pAttr ) { const SwFmtINetFmt& rFmt = pAttr->GetINetFmt(); diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 9a9dbcb6a5..2d35888bef 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1196,60 +1196,86 @@ BOOL SwTxtNode::DontExpandFmt( const SwIndex& rIdx, bool bFlag, return bRet; } - -// gebe das vorgegebene Attribut, welches an der TextPosition (rIdx) -// gesetzt ist, zurueck. Gibt es keines, returne 0-Pointer. -// (gesetzt heisst, je nach bExpand ? -// Start < rIdx <= End -// : Start <= rIdx < End ) - -SwTxtAttr* SwTxtNode::GetTxtAttr( const SwIndex& rIdx, USHORT nWhichHt, - BOOL bExpand ) const +static void +lcl_GetTxtAttrs( + ::std::vector *const pVector, SwTxtAttr **const ppTxtAttr, + SwpHints *const pSwpHints, + xub_StrLen const nIndex, RES_TXTATR const nWhich, bool const bExpand) { - const SwTxtAttr* pRet = 0; - const SwTxtAttr* pHt = 0; - const xub_StrLen *pEndIdx = 0; - const xub_StrLen nIdx = rIdx.GetIndex(); - const USHORT nSize = m_pSwpHints ? m_pSwpHints->Count() : 0; + USHORT const nSize = (pSwpHints) ? pSwpHints->Count() : 0; + xub_StrLen nPreviousIndex(0); // index of last hint with nWhich for( USHORT i = 0; i < nSize; ++i ) { - // ist der Attribut-Anfang schon groesser als der Idx ? - pHt = (*m_pSwpHints)[i]; - if ( nIdx < *(pHt->GetStart()) ) - break; // beenden, kein gueltiges Attribut - - // ist es das gewuenschte Attribut ? - if( pHt->Which() != nWhichHt ) - continue; // nein, weiter - - pEndIdx = pHt->GetEnd(); - // liegt innerhalb des Bereiches ?? - if( !pEndIdx ) + SwTxtAttr *const pHint = pSwpHints->GetTextHint(i); + xub_StrLen const nHintStart( *(pHint->GetStart()) ); + if (nIndex < nHintStart) { - if( *pHt->GetStart() == nIdx ) - { - pRet = pHt; - break; - } + return; // hints are sorted by start, so we are done... } - else if( *pHt->GetStart() <= nIdx && nIdx <= *pEndIdx ) + + if (pHint->Which() != nWhich) { + continue; + } + + xub_StrLen const*const pEndIdx = pHint->GetEnd(); + ASSERT(pEndIdx || pHint->HasDummyChar(), + "hint with no end and no dummy char?"); // Wenn bExpand gesetzt ist, wird das Verhalten bei Eingabe // simuliert, d.h. der Start wuede verschoben, das Ende expandiert, - if( bExpand ) + bool const bContained( (pEndIdx) + ? ((bExpand) + ? ((nHintStart < nIndex) && (nIndex <= *pEndIdx)) + : ((nHintStart <= nIndex) && (nIndex < *pEndIdx))) + : (nHintStart == nIndex) ); + if (bContained) + { + if (pVector) { - if( *pHt->GetStart() < nIdx ) - pRet = pHt; + if (nPreviousIndex < nHintStart) + { + pVector->clear(); // clear hints that are outside pHint + nPreviousIndex = nHintStart; + } + pVector->push_back(pHint); } else { - if( nIdx < *pEndIdx ) - pRet = pHt; // den am dichtesten liegenden + *ppTxtAttr = pHint; // and possibly overwrite outer hint + } + if (!pEndIdx) + { + break; } } } - return (SwTxtAttr*)pRet; // kein gueltiges Attribut gefunden !! +} + +::std::vector +SwTxtNode::GetTxtAttrsAt(xub_StrLen const nIndex, RES_TXTATR const nWhich, + bool const bExpand) const +{ + ::std::vector ret; + lcl_GetTxtAttrs(& ret, 0, m_pSwpHints, nIndex, nWhich, bExpand); + return ret; +} + +SwTxtAttr * +SwTxtNode::GetTxtAttrAt(xub_StrLen const nIndex, RES_TXTATR const nWhich, + bool const bExpand) const +{ + ASSERT( (nWhich == RES_TXTATR_META) + || (nWhich == RES_TXTATR_METAFIELD) + || (nWhich == RES_TXTATR_AUTOFMT) + || (nWhich == RES_TXTATR_INETFMT) + || (nWhich == RES_TXTATR_CJK_RUBY) + || (nWhich == RES_TXTATR_UNKNOWN_CONTAINER), + "GetTxtAttrAt() will give wrong result for this hint!"); + + SwTxtAttr * pRet(0); + lcl_GetTxtAttrs(0, & pRet, m_pSwpHints, nIndex, nWhich, bExpand); + return pRet; } /************************************************************************* diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index d24b364f67..429f9453a3 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -1055,8 +1055,8 @@ void SwUndoAttr::RemoveIdx( SwDoc& rDoc ) SwTxtNode* pTxtNd = rNds[ nNode ]->GetTxtNode(); if( pTxtNd ) { - SwIndex aIdx( pTxtNd, nCntnt ); - SwTxtAttr * pTxtHt = pTxtNd->GetTxtAttr( aIdx, RES_TXTATR_FTN ); + SwTxtAttr *const pTxtHt = + pTxtNd->GetTxtAttrForCharAt(nCntnt, RES_TXTATR_FTN); if( pTxtHt ) { // ok, dann hole mal die Werte diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 5d0a0d8e76..8d2f771a1a 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -302,14 +302,15 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry break; case FN_UNO_DOCUMENT_INDEX_MARK: { - SwTxtAttr* pTxtAttr = rPam.GetNode()->GetTxtNode()->GetTxtAttr( - rPam.GetPoint()->nContent, RES_TXTATR_TOXMARK); - if(pTxtAttr) + ::std::vector const marks( + rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt( + rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK)); + if (marks.size()) { if( pAny ) - { + { // hmm... can only return 1 here SwTOXMark & rMark = - static_cast(pTxtAttr->GetAttr()); + static_cast((*marks.begin())->GetAttr()); const uno::Reference< text::XDocumentIndexMark > xRef = SwXDocumentIndexMark::CreateXDocumentIndexMark( *rPam.GetDoc(), @@ -345,9 +346,10 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry const SwPosition *pPos = rPam.Start(); const SwTxtNode *pTxtNd = rPam.GetDoc()->GetNodes()[pPos->nNode.GetIndex()]->GetTxtNode(); - SwTxtAttr* pTxtAttr = - pTxtNd ? pTxtNd->GetTxtAttr(pPos->nContent, RES_TXTATR_FIELD) - : 0; + SwTxtAttr *const pTxtAttr = (pTxtNd) + ? pTxtNd->GetTxtAttrForCharAt( + pPos->nContent.GetIndex(), RES_TXTATR_FIELD) + : 0; if(pTxtAttr) { if( pAny ) @@ -436,8 +438,9 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry case FN_UNO_ENDNOTE: case FN_UNO_FOOTNOTE: { - SwTxtAttr* pTxtAttr = rPam.GetNode()->GetTxtNode()-> - GetTxtAttr(rPam.GetPoint()->nContent, RES_TXTATR_FTN); + SwTxtAttr *const pTxtAttr = + rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt( + rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); if(pTxtAttr) { const SwFmtFtn& rFtn = pTxtAttr->GetFtn(); @@ -459,13 +462,14 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry break; case FN_UNO_REFERENCE_MARK: { - SwTxtAttr* pTxtAttr = rPam.GetNode()->GetTxtNode()-> - GetTxtAttr(rPam.GetPoint()->nContent, RES_TXTATR_REFMARK); - if(pTxtAttr) + ::std::vector const marks( + rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt( + rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK)); + if (marks.size()) { if( pAny ) - { - const SwFmtRefMark& rRef = pTxtAttr->GetRefMark(); + { // hmm... can only return 1 here + const SwFmtRefMark& rRef = (*marks.begin())->GetRefMark(); uno::Reference< XTextContent > xRef = SwXReferenceMarks::GetObject( rPam.GetDoc(), &rRef ); pAny->setValue(&xRef, ::getCppuType((uno::Reference*)0)); } diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 3cb1049bca..f47ed55ec6 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -1622,6 +1622,8 @@ public: // SwClient virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + void InsertTOXMark(SwTOXMark & rMark, SwPaM & rPam, + SwXTextCursor const*const pTextCursor); }; /* -----------------------------16.10.00 11:24-------------------------------- @@ -1835,28 +1837,7 @@ throw (uno::RuntimeException) m_pImpl->m_pDoc->DeleteTOXMark(m_pImpl->m_pTOXMark); m_pImpl->m_pTOXMark = 0; - SwTxtAttr* pTxtAttr = 0; - sal_Bool bInsAtPos = aMark.IsAlternativeText(); - const SwPosition *pStt = aPam.Start(), - *pEnd = aPam.End(); - if( bInsAtPos ) - { - SwPaM aTmp( *pStt ); - m_pImpl->m_pDoc->InsertPoolItem( aTmp, aMark, 0 ); - pTxtAttr = pStt->nNode.GetNode().GetTxtNode()->GetTxtAttrForCharAt( - pStt->nContent.GetIndex()-1, RES_TXTATR_TOXMARK); - } - else if( *pEnd != *pStt ) - { - m_pImpl->m_pDoc->InsertPoolItem( aPam, aMark, - nsSetAttrMode::SETATTR_DONTEXPAND ); - pTxtAttr = pStt->nNode.GetNode().GetTxtNode()->GetTxtAttr( - pStt->nContent, RES_TXTATR_TOXMARK); - } - if(pTxtAttr) - { - m_pImpl->m_pTOXMark = &pTxtAttr->GetTOXMark(); - } + m_pImpl->InsertTOXMark(aMark, aPam, 0); } else if (m_pImpl->m_bIsDescriptor) { @@ -1984,17 +1965,47 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) default: break; } + + m_pImpl->InsertTOXMark(aMark, aPam, + dynamic_cast(pCursor)); + + m_pImpl->m_pDoc = pDoc; + m_pImpl->m_bIsDescriptor = sal_False; + + const_cast(pTOXType)->Add(&m_pImpl->m_TypeDepend); +} + +template struct NotContainedIn +{ + ::std::vector const& m_rVector; + explicit NotContainedIn(::std::vector const& rVector) + : m_rVector(rVector) { } + bool operator() (T const& rT) { + return ::std::find(m_rVector.begin(), m_rVector.end(), rT) + == m_rVector.end(); + } +}; + +void SwXDocumentIndexMark::Impl::InsertTOXMark(SwTOXMark & rMark, SwPaM & rPam, + SwXTextCursor const*const pTextCursor) +{ + SwDoc *const pDoc( rPam.GetDoc() ); UnoActionContext aAction(pDoc); - const sal_Bool bMark = *aPam.GetPoint() != *aPam.GetMark(); + bool bMark = *rPam.GetPoint() != *rPam.GetMark(); + // n.b.: toxmarks must have either alternative text or an extent + if (bMark && rMark.GetAlternativeText().Len()) + { + rPam.Normalize(TRUE); + rPam.DeleteMark(); + bMark = false; + } // Marks ohne Alternativtext ohne selektierten Text koennen nicht eingefuegt werden, // deshalb hier ein Leerzeichen - ob das die ideale Loesung ist? - if (!bMark && !aMark.GetAlternativeText().Len()) + if (!bMark && !rMark.GetAlternativeText().Len()) { - aMark.SetAlternativeText( String(' ') ); + rMark.SetAlternativeText( String(' ') ); } - SwXTextCursor const*const pTextCursor( - dynamic_cast(pCursor)); const bool bForceExpandHints( (!bMark && pTextCursor) ? pTextCursor->IsAtEndOfMeta() : false ); const SetAttrMode nInsertFlags = (bForceExpandHints) @@ -2002,35 +2013,52 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) | nsSetAttrMode::SETATTR_DONTEXPAND) : nsSetAttrMode::SETATTR_DONTEXPAND; - pDoc->InsertPoolItem(aPam, aMark, nInsertFlags); - if (bMark && *aPam.GetPoint() > *aPam.GetMark()) + ::std::vector oldMarks; + if (bMark) + { + oldMarks = rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt( + rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK); + } + + pDoc->InsertPoolItem(rPam, rMark, nInsertFlags); + if (bMark && *rPam.GetPoint() > *rPam.GetMark()) { - aPam.Exchange(); + rPam.Exchange(); } - SwTxtAttr* pTxtAttr = 0; + // rMark was copied into the document pool; now retrieve real format... + SwTxtAttr * pTxtAttr(0); if (bMark) { - pTxtAttr = aPam.GetNode()->GetTxtNode()->GetTxtAttr( - aPam.GetPoint()->nContent, RES_TXTATR_TOXMARK ); + // #i107672# + // ensure that we do not retrieve a different mark at the same position + ::std::vector const newMarks( + rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt( + rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK)); + ::std::vector::const_iterator const iter( + ::std::find_if(newMarks.begin(), newMarks.end(), + NotContainedIn(oldMarks))); + OSL_ASSERT(newMarks.end() != iter); + if (newMarks.end() != iter) + { + pTxtAttr = *iter; + } } else { - pTxtAttr = aPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt( - aPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_TOXMARK ); + pTxtAttr = rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt( + rPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_TOXMARK ); } if (!pTxtAttr) { - throw uno::RuntimeException(); + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "SwXDocumentIndexMark::InsertTOXMark(): cannot insert attribute")), + 0); } - m_pImpl->m_pTOXMark = &pTxtAttr->GetTOXMark(); - m_pImpl->m_pDoc = pDoc; - m_pImpl->m_bIsDescriptor = sal_False; - - const_cast(m_pImpl->m_pTOXMark)->Add(m_pImpl.get()); - const_cast(pTOXType)->Add(&m_pImpl->m_TypeDepend); + m_pTOXMark = & pTxtAttr->GetTOXMark(); + const_cast(m_pTOXMark)->Add(this); } /*-- 14.12.98 10:25:45--------------------------------------------------- @@ -2229,33 +2257,8 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, pLocalDoc->DeleteTOXMark(m_pImpl->m_pTOXMark); m_pImpl->m_pTOXMark = 0; - sal_Bool bInsAtPos = aMark.IsAlternativeText(); - const SwPosition *pStt = aPam.Start(); - const SwPosition *pEnd = aPam.End(); - - SwTxtAttr* pTxtAttr = 0; - if( bInsAtPos ) - { - SwPaM aTmp( *pStt ); - pLocalDoc->InsertPoolItem( aTmp, aMark, 0 ); - pTxtAttr = pStt->nNode.GetNode().GetTxtNode()->GetTxtAttrForCharAt( - pStt->nContent.GetIndex()-1, RES_TXTATR_TOXMARK ); - } - else if( *pEnd != *pStt ) - { - pLocalDoc->InsertPoolItem( aPam, aMark, - nsSetAttrMode::SETATTR_DONTEXPAND ); - pTxtAttr = pStt->nNode.GetNode().GetTxtNode()->GetTxtAttr( - pStt->nContent, RES_TXTATR_TOXMARK ); - } - m_pImpl->m_pDoc = pLocalDoc; - - if(pTxtAttr) - { - m_pImpl->m_pTOXMark = &pTxtAttr->GetTOXMark(); - const_cast(m_pImpl->m_pTOXMark)->Add(m_pImpl.get()); - pType->Add(&m_pImpl->m_TypeDepend); - } + m_pImpl->InsertTOXMark(aMark, aPam, 0); + pType->Add(& m_pImpl->m_TypeDepend); } else if (m_pImpl->m_bIsDescriptor) { diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index af58401f30..1b3ed92312 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1934,8 +1934,8 @@ lcl_FillFrame(SwClient & rEnum, SwUnoCrsr& rUnoCrsr, { // search for objects at the cursor - anchored at/as char SwTxtAttr const*const pTxtAttr = - rUnoCrsr.GetNode()->GetTxtNode()->GetTxtAttr( - rUnoCrsr.GetPoint()->nContent, RES_TXTATR_FLYCNT); + rUnoCrsr.GetNode()->GetTxtNode()->GetTxtAttrForCharAt( + rUnoCrsr.GetPoint()->nContent.GetIndex(), RES_TXTATR_FLYCNT); if (pTxtAttr) { const SwFmtFlyCnt& rFlyCnt = pTxtAttr->GetFlyCnt(); diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index ea84ff33b5..919954845b 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -235,6 +235,17 @@ throw (uno::RuntimeException) /* -----------------03.11.99 14:14------------------- --------------------------------------------------*/ +template struct NotContainedIn +{ + ::std::vector const& m_rVector; + explicit NotContainedIn(::std::vector const& rVector) + : m_rVector(rVector) { } + bool operator() (T const& rT) { + return ::std::find(m_rVector.begin(), m_rVector.end(), rT) + == m_rVector.end(); + } +}; + void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam, SwXTextCursor const*const pCursor) { @@ -254,6 +265,13 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam, | nsSetAttrMode::SETATTR_DONTEXPAND) : nsSetAttrMode::SETATTR_DONTEXPAND; + ::std::vector oldMarks; + if (bMark) + { + oldMarks = rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt( + rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK); + } + pDoc2->InsertPoolItem( rPam, aRefMark, nInsertFlags ); if( bMark && *rPam.GetPoint() > *rPam.GetMark()) @@ -261,17 +279,38 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam, rPam.Exchange(); } - SwTxtAttr *const pTxtAttr = (bMark) - ? rPam.GetNode()->GetTxtNode()->GetTxtAttr( - rPam.GetPoint()->nContent, RES_TXTATR_REFMARK) - : rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt( + // aRefMark was copied into the document pool; now retrieve real format... + SwTxtAttr * pTxtAttr(0); + if (bMark) + { + // #i107672# + // ensure that we do not retrieve a different mark at the same position + ::std::vector const newMarks( + rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt( + rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK)); + ::std::vector::const_iterator const iter( + ::std::find_if(newMarks.begin(), newMarks.end(), + NotContainedIn(oldMarks))); + OSL_ASSERT(newMarks.end() != iter); + if (newMarks.end() != iter) + { + pTxtAttr = *iter; + } + } + else + { + pTxtAttr = rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt( rPam.GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_REFMARK); + } - if(pTxtAttr) + if (!pTxtAttr) { - m_pMarkFmt = &pTxtAttr->GetRefMark(); + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "SwXReferenceMark::InsertRefMark(): cannot insert attribute")), 0); } + m_pMarkFmt = &pTxtAttr->GetRefMark(); + pDoc2->GetUnoCallBack()->Add(this); } @@ -310,7 +349,6 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) m_pImpl->InsertRefMark(aPam, dynamic_cast(pCursor)); m_pImpl->m_bIsDescriptor = sal_False; m_pImpl->m_pDoc = pDocument; - m_pImpl->m_pDoc->GetUnoCallBack()->Add(m_pImpl.get()); } /*-- 11.12.98 10:28:34--------------------------------------------------- diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx index 09ca0d7f13..b1695e6876 100644 --- a/sw/source/filter/ww1/fltshell.cxx +++ b/sw/source/filter/ww1/fltshell.cxx @@ -1934,8 +1934,8 @@ void SwFltShell::BeginFootnote() pSavedPos = new SwPosition(*pPaM->GetPoint()); pPaM->Move(fnMoveBackward, fnGoCntnt); SwTxtNode* pTxt = pPaM->GetNode()->GetTxtNode(); - SwTxtAttr* pFN = pTxt->GetTxtAttr(pPaM->GetPoint()->nContent, - RES_TXTATR_FTN); + SwTxtAttr *const pFN = pTxt->GetTxtAttrForCharAt( + pPaM->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN); if( !pFN ){ // Passiert z.B. bei Fussnote in Fly ASSERT(pFN, "Probleme beim Anlegen des Fussnoten-Textes"); return; -- cgit v1.2.3 From 7657a375b9a295d52fbbacd072ac54719b236555 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 9 Mar 2010 13:27:18 +0100 Subject: odfmetadata4: #i109601#: add cursor property "NestedTextContent": cmdid.h: add FN_UNO_NESTED_TEXT_CONTENT. SwUnoCursorHelper: add GetNestedTextContent(). enum SwPropNameIds: add UNO_NAME_NESTED_TEXT_CONTENT. SwUnoCursorHelper::getCrsrPropertyValue(): handle "NestedTextContent". --- sw/inc/cmdid.h | 1 + sw/inc/unocrsrhelper.hxx | 6 ++++ sw/inc/unoprnms.hxx | 5 ++-- sw/source/core/unocore/unocrsrhelper.cxx | 48 ++++++++++++++++++++++++++++++++ sw/source/core/unocore/unomap.cxx | 3 +- sw/source/core/unocore/unoprnms.cxx | 1 + 6 files changed, 60 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index cf5bcd55ba..0483a643c6 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -907,6 +907,7 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr #define FN_UNO_PARA_NUM_STRING (FN_EXTRA2 + 110) #define FN_UNO_TABLE_NAME (FN_EXTRA2 + 111) #define FN_UNO_META (FN_EXTRA2 + 112) +#define FN_UNO_NESTED_TEXT_CONTENT (FN_EXTRA2 + 113) /*-------------------------------------------------------------------- Bereich: Hilfe diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx index 5af5df2e51..a59c09ca4e 100644 --- a/sw/inc/unocrsrhelper.hxx +++ b/sw/inc/unocrsrhelper.hxx @@ -55,6 +55,9 @@ namespace com{ namespace sun{ namespace star{ namespace beans{ struct PropertyValue; } + namespace text { + class XTextContent; + } }}} /* -----------------03.12.98 12:16------------------- @@ -84,6 +87,9 @@ namespace SwUnoCursorHelper bool FillValue( USHORT nWhichId, USHORT nMemberId, const com::sun::star::uno::Any*& pAny ); }; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > + GetNestedTextContent(SwTxtNode & rTextNode, xub_StrLen const nIndex); + sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry , SwPaM& rPam , com::sun::star::uno::Any *pAny diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx index 85e1c9728b..374753ba22 100644 --- a/sw/inc/unoprnms.hxx +++ b/sw/inc/unoprnms.hxx @@ -805,9 +805,8 @@ enum SwPropNameIds /* 0737 */ UNO_NAME_DESCRIPTION, // <-- /* 0738 */ UNO_NAME_META, // #i91565# -/* 0739 */ UNO_NAME_IS_TEMPLATE, -/* 0740 */ UNO_NAME_VBA_DOCOBJ, -/* 0741 */ SW_PROPNAME_END +/* 0739 */ UNO_NAME_NESTED_TEXT_CONTENT, // #i109601# +/* 0740 */ SW_PROPNAME_END }; diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 8d2f771a1a..3f9edd5ab5 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -88,6 +88,8 @@ // --> OD 2008-11-26 #158694# #include // <-- +#include + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -102,6 +104,34 @@ using ::rtl::OUString; namespace SwUnoCursorHelper { +uno::Reference +GetNestedTextContent(SwTxtNode & rTextNode, xub_StrLen const nIndex) +{ + // these should be unambiguous because of the dummy character + SwTxtAttr *const pMetaTxtAttr = + rTextNode.GetTxtAttrAt(nIndex, RES_TXTATR_META, true); + SwTxtAttr *const pMetaFieldTxtAttr = + rTextNode.GetTxtAttrAt(nIndex, RES_TXTATR_METAFIELD, true); + // which is innermost? + SwTxtAttr *const pTxtAttr = (pMetaTxtAttr) + ? ((pMetaFieldTxtAttr) + ? ((*pMetaFieldTxtAttr->GetStart() > + *pMetaTxtAttr->GetStart()) + ? pMetaFieldTxtAttr : pMetaTxtAttr) + : pMetaTxtAttr) + : pMetaFieldTxtAttr; + uno::Reference xRet; + if (pTxtAttr) + { + ::sw::Meta *const pMeta( + static_cast(pTxtAttr->GetAttr()).GetMeta()); + OSL_ASSERT(pMeta); + xRet.set(pMeta->MakeUnoObject(), uno::UNO_QUERY); + } + return xRet; +} + + /* -----------------16.09.98 12:27------------------- * Lesen spezieller Properties am Cursor * --------------------------------------------------*/ @@ -478,6 +508,24 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry eNewState = PropertyState_DEFAULT_VALUE; } break; + case FN_UNO_NESTED_TEXT_CONTENT: + { + uno::Reference const xRet( + GetNestedTextContent(*rPam.GetNode()->GetTxtNode(), + rPam.GetPoint()->nContent.GetIndex())); + if (xRet.is()) + { + if (pAny) + { + (*pAny) <<= xRet; + } + } + else + { + eNewState = PropertyState_DEFAULT_VALUE; + } + } + break; case FN_UNO_CHARFMT_SEQUENCE: { diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index 79dbc1e5de..f5aee26ca4 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -279,10 +279,11 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider() COMMON_CRSR_PARA_PROPERTIES\ { SW_PROP_NMID(UNO_NAME_DOCUMENT_INDEX_MARK), FN_UNO_DOCUMENT_INDEX_MARK, CPPU_E2T(CPPUTYPE_REFDOCIDXMRK), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY ,0 },\ { SW_PROP_NMID(UNO_NAME_TEXT_FIELD), FN_UNO_TEXT_FIELD, CPPU_E2T(CPPUTYPE_REFTXTFIELD), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY ,0 },\ - { SW_PROP_NMID(UNO_NAME_REFERENCE_MARK), FN_UNO_REFERENCE_MARK, CPPU_E2T(CPPUTYPE_REFTEXTCNTNT), PropertyAttribute::MAYBEVOID ,0 },\ + { SW_PROP_NMID(UNO_NAME_REFERENCE_MARK), FN_UNO_REFERENCE_MARK, CPPU_E2T(CPPUTYPE_REFTEXTCNTNT), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0 },\ { SW_PROP_NMID(UNO_NAME_FOOTNOTE), FN_UNO_FOOTNOTE, CPPU_E2T(CPPUTYPE_REFFOOTNOTE), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY ,0 },\ { SW_PROP_NMID(UNO_NAME_ENDNOTE), FN_UNO_ENDNOTE, CPPU_E2T(CPPUTYPE_REFFOOTNOTE), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY ,0 },\ { SW_PROP_NMID(UNO_NAME_HYPER_LINK_EVENTS), RES_TXTATR_INETFMT, CPPU_E2T(CPPUTYPE_REFNMREPLACE), PropertyAttribute::MAYBEVOID, MID_URL_HYPERLINKEVENTS},\ + { SW_PROP_NMID(UNO_NAME_NESTED_TEXT_CONTENT), FN_UNO_NESTED_TEXT_CONTENT, CPPU_E2T(CPPUTYPE_REFTEXTCNTNT), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0 },\ TABSTOPS_MAP_ENTRY diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx index 36c066dc5a..228b489557 100644 --- a/sw/source/core/unocore/unoprnms.cxx +++ b/sw/source/core/unocore/unoprnms.cxx @@ -778,6 +778,7 @@ const SwPropNameTab aPropNameTab = { /* 0736 UNO_NAME_OUTLINE_LEVEL */ {MAP_CHAR_LEN("OutlineLevel")},//#outline level,add<-zhaojianwei Outlinelevel /* 0737 UNO_NAME_DESCRIPTION */ {MAP_CHAR_LEN("Description")}, /* 0738 UNO_NAME_META */ {MAP_CHAR_LEN("InContentMetadata")}, +/* 0739 UNO_NAME_NESTED_TEXT_CONTENT */ {MAP_CHAR_LEN("NestedTextContent")}, }; const SwPropNameLen& SwGetPropName( USHORT nId ) -- cgit v1.2.3 From 3237be462f4c2ecf179390ad795affb019b6a120 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 9 Mar 2010 13:27:19 +0100 Subject: odfmetadata4: #i109601#: add parent link to SwXMeta: SwTxtNode::GetTxtAttrAt: add another mode for getting parent of a meta. SwXMeta: implement interface css::container::XChild. SwXMeta::getText(): return this (for consistency with other XTexts). TextPortionEnumerationTest: add test for XChild and NestedTextContent. --- sw/inc/ndtxt.hxx | 16 ++- sw/inc/unocrsrhelper.hxx | 3 +- .../complex/writer/TextPortionEnumerationTest.java | 153 +++++++++++++++++++-- sw/source/core/crsr/crstrvl.cxx | 3 +- sw/source/core/inc/unometa.hxx | 17 ++- sw/source/core/txtnode/ndtxt.cxx | 39 ++++-- sw/source/core/unocore/unocrsrhelper.cxx | 11 +- sw/source/core/unocore/unorefmk.cxx | 34 ++++- 8 files changed, 241 insertions(+), 35 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 1cf175b307..90a85316eb 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -363,26 +363,30 @@ public: BOOL DontExpandFmt( const SwIndex& rIdx, bool bFlag = true, BOOL bFmtToTxtAttributes = TRUE ); + enum GetTxtAttrMode { + DEFAULT, /// DEFAULT: (Start < nIndex <= End) + EXPAND, /// EXPAND : (Start <= nIndex < End) + PARENT, /// PARENT : (Start < nIndex < End) + }; + /** get the innermost text attribute covering position nIndex. @param nWhich only attribute with this id is returned. - @param bExpand the predicate for matching is: - (bExpand) ? (Start < nIndex <= End) : (Start <= nIndex < End) + @param eMode the predicate for matching (@see GetTxtAttrMode). ATTENTION: this function is not well-defined for those hints of which several may cover a single position, like RES_TXTATR_CHARFMT, RES_TXTATR_REFMARK, RES_TXTATR_TOXMARK */ SwTxtAttr *GetTxtAttrAt(xub_StrLen const nIndex, RES_TXTATR const nWhich, - bool const bExpand = false) const; + enum GetTxtAttrMode const eMode = DEFAULT) const; /** get the innermost text attributes covering position nIndex. @param nWhich only attributes with this id are returned. - @param bExpand the predicate for matching is: - (bExpand) ? (Start < nIndex <= End) : (Start <= nIndex < End) + @param eMode the predicate for matching (@see GetTxtAttrMode). */ ::std::vector GetTxtAttrsAt(xub_StrLen const nIndex, RES_TXTATR const nWhich, - bool const bExpand = false) const; + enum GetTxtAttrMode const eMode = DEFAULT) const; /** get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position, if one exists. diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx index a59c09ca4e..d163a11055 100644 --- a/sw/inc/unocrsrhelper.hxx +++ b/sw/inc/unocrsrhelper.hxx @@ -88,7 +88,8 @@ namespace SwUnoCursorHelper }; ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > - GetNestedTextContent(SwTxtNode & rTextNode, xub_StrLen const nIndex); + GetNestedTextContent(SwTxtNode & rTextNode, xub_StrLen const nIndex, + bool const bParent); sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry , SwPaM& rPam diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java index 9187dc581a..661f1e7db8 100755 --- a/sw/qa/complex/writer/TextPortionEnumerationTest.java +++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java @@ -34,12 +34,14 @@ import com.sun.star.uno.XComponentContext; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.lang.XComponent; import com.sun.star.lang.XServiceInfo; +import com.sun.star.lang.NoSupportException; import com.sun.star.beans.XPropertySet; import com.sun.star.beans.XPropertySetInfo; import com.sun.star.beans.PropertyValue; import com.sun.star.beans.Pair; import com.sun.star.beans.StringPair; import com.sun.star.container.XNamed; +import com.sun.star.container.XChild; import com.sun.star.container.XContentEnumerationAccess; import com.sun.star.container.XEnumerationAccess; import com.sun.star.container.XEnumeration; @@ -976,7 +978,7 @@ abstract class Inserter xPropSet.setPropertyValue("RubyText", rubytext); } - void insertMeta(XTextCursor xCursor, StringPair xmlid) + XTextContent insertMeta(XTextCursor xCursor, StringPair xmlid) throws Exception { XTextContent xContent = makeMeta(); @@ -984,6 +986,7 @@ abstract class Inserter XMetadatable xMetadatable = (XMetadatable) UnoRuntime.queryInterface(XMetadatable.class, xContent); xMetadatable.setMetadataReference(xmlid); + return xContent; } XTextContent makeMeta() throws Exception @@ -995,14 +998,15 @@ abstract class Inserter return xContent; } - void insertMetaField(XTextCursor xCursor, StringPair xmlid) + XTextField insertMetaField(XTextCursor xCursor, StringPair xmlid) throws Exception { - XTextContent xContent = makeMetaField(); + XTextField xContent = makeMetaField(); xContent.attach(xCursor); XMetadatable xMetadatable = (XMetadatable) UnoRuntime.queryInterface(XMetadatable.class, xContent); xMetadatable.setMetadataReference(xmlid); + return xContent; } XTextField makeMetaField() throws Exception @@ -1165,15 +1169,16 @@ class RangeInserter extends Inserter } */ - void insertRange(Range range) throws Exception + XTextContent insertRange(Range range) throws Exception { m_xCursor.gotoStartOfParagraph(false); m_xCursor.goRight(range.getStart(), false); m_xCursor.goRight(range.getExtent(), true); - insertNode(m_xCursor, range.getNode()); + return insertNode(m_xCursor, range.getNode()); } - void insertNode(XParagraphCursor xCursor, TreeNode node) throws Exception + XTextContent insertNode(XParagraphCursor xCursor, TreeNode node) + throws Exception { String type = node.getType(); if (type.equals("Bookmark")) { @@ -1196,10 +1201,10 @@ class RangeInserter extends Inserter insertRuby(xCursor, ruby.getRubyText()); } else if (type.equals("InContentMetadata")) { MetaNode meta = (MetaNode) node; - insertMeta(xCursor, meta.getXmlId()); + return insertMeta(xCursor, meta.getXmlId()); } else if (type.equals("MetadataField")) { MetaFieldNode meta = (MetaFieldNode) node; - insertMetaField(xCursor, meta.getXmlId()); + return insertMetaField(xCursor, meta.getXmlId()); } else if (type.equals("Text")) { TextNode text = (TextNode) node; insertText(xCursor, text.getContent()); @@ -1220,6 +1225,7 @@ class RangeInserter extends Inserter } else { throw new RuntimeException("unexpected type: " + type); } + return null; } } @@ -1306,6 +1312,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase "testRange5", "testRange6", "testRange7", + "testMetaXChild", "testMetaXText", "testMetaXTextCursor", "testMetaXTextAttachToxMark", @@ -2930,6 +2937,136 @@ public class TextPortionEnumerationTest extends ComplexTestCase /* TODO: test partial selection, test UNDO/REDO */ + // #i109601# NestedTextContent and XChild + public void testMetaXChild() throws Exception + { + StringPair id1 = new StringPair("content.xml", mkName("id")); + StringPair id2 = new StringPair("content.xml", mkName("id")); + StringPair id3 = new StringPair("content.xml", mkName("id")); + StringPair id4 = new StringPair("content.xml", mkName("id")); + StringPair id5 = new StringPair("content.xml", mkName("id")); + StringPair id6 = new StringPair("content.xml", mkName("id")); + TreeNode meta1 = new MetaNode(id1); + TreeNode meta2 = new MetaNode(id2); + TreeNode meta3 = new MetaFieldNode(id3); + TreeNode meta4 = new MetaNode(id4); + TreeNode meta5 = new MetaNode(id5); + TreeNode meta6 = new MetaFieldNode(id6); + TreeNode root = new TreeNode() + .appendChild( meta1.dup() + .appendChild( new TextNode("1") ) ) + .appendChild( new TextNode("2") ) + .appendChild( meta2.dup() + .appendChild( meta3.dup() + .appendChild( new TextNode("34") ) + .appendChild( meta4.dup() + .appendChild( new TextNode("56") ) ) + .appendChild( meta5.dup() ) + .appendChild( new TextNode("7") ) ) ) + .appendChild( new TextNode("8") ) + .appendChild( meta6.dup() + .appendChild( new TextNode("9") ) ); + + RangeInserter inserter = new RangeInserter(m_xDoc); + TreeNode text = new TextNode("123456789"); + inserter.insertRange( new Range(0, 0, text) ); + XTextContent xMeta1 = inserter.insertRange( new Range(0, 1, meta1) ); + XTextContent xMeta2 = inserter.insertRange( new Range(3, 8, meta2) ); + XTextContent xMeta3 = inserter.insertRange( new Range(4, 9, meta3) ); + XTextContent xMeta4 = inserter.insertRange( new Range(7, 9, meta4) ); + XTextContent xMeta5 = inserter.insertRange( new Range(10, 10, meta5) ); + XTextContent xMeta6 = inserter.insertRange( new Range(13, 14, meta6) ); + + doTest(root, false); + + XText xDocText = m_xDoc.getText(); + XTextCursor xDocTextCursor = xDocText.createTextCursor(); + XParagraphCursor xParagraphCursor = (XParagraphCursor) + UnoRuntime.queryInterface(XParagraphCursor.class, xDocTextCursor); + xParagraphCursor.gotoNextParagraph(false); // second paragraph + // X12XX34X56X78X9 + // 1 23 4 5 6 + // 1 452 6 + // 3 + StringPair [] nestedTextContent = new StringPair[] { + null, + id1, + id1, + null, + id2, + id3, + id3, + id3, + id4, + id4, + id4, + id5, + id3, + null, + id6, + id6, + }; + XPropertySet xPropertySet = (XPropertySet) + UnoRuntime.queryInterface(XPropertySet.class, xDocTextCursor); + for (int i = 0; i < nestedTextContent.length; ++i) { + Object oNTC = xPropertySet.getPropertyValue("NestedTextContent"); + XTextContent xNTC = (XTextContent) + UnoRuntime.queryInterface(XTextContent.class, oNTC); + if (null == nestedTextContent[i]) { + assure("unexpected NestedTextContent at: " + i, null == xNTC); + } else { + XMetadatable xMetadatable = (XMetadatable) + UnoRuntime.queryInterface(XMetadatable.class, xNTC); + StringPair xmlid = xMetadatable.getMetadataReference(); + assure("wrong NestedTextContent at: " + i, + MetaNode.eq(nestedTextContent[i], xmlid)); + } + xDocTextCursor.goRight((short)1, false); + } + + XChild xChild1 = (XChild) + UnoRuntime.queryInterface(XChild.class, xMeta1); + XChild xChild2 = (XChild) + UnoRuntime.queryInterface(XChild.class, xMeta2); + XChild xChild3 = (XChild) + UnoRuntime.queryInterface(XChild.class, xMeta3); + XChild xChild4 = (XChild) + UnoRuntime.queryInterface(XChild.class, xMeta4); + XChild xChild5 = (XChild) + UnoRuntime.queryInterface(XChild.class, xMeta5); + XChild xChild6 = (XChild) + UnoRuntime.queryInterface(XChild.class, xMeta6); + try { + xChild1.setParent(xChild4); + assure("setParent(): allowed?", false); + } catch (NoSupportException e) { /* expected */ } + assure("getParent(): not null", xChild1.getParent() == null); + assure("getParent(): not null", xChild2.getParent() == null); + assure("getParent(): not null", xChild6.getParent() == null); + { + Object xParent3 = xChild3.getParent(); + assure("getParent(): null", null != xParent3); + XMetadatable xMetadatable = (XMetadatable) + UnoRuntime.queryInterface(XMetadatable.class, xParent3); + StringPair xmlid = xMetadatable.getMetadataReference(); + assure("getParent(): wrong", MetaNode.eq(xmlid, id2)); + }{ + Object xParent4 = xChild4.getParent(); + assure("getParent(): null", null != xParent4); + XMetadatable xMetadatable = (XMetadatable) + UnoRuntime.queryInterface(XMetadatable.class, xParent4); + StringPair xmlid = xMetadatable.getMetadataReference(); + assure("getParent(): wrong", MetaNode.eq(xmlid, id3)); + }{ + Object xParent5 = xChild5.getParent(); + assure("getParent(): null", null != xParent5); + XMetadatable xMetadatable = (XMetadatable) + UnoRuntime.queryInterface(XMetadatable.class, xParent5); + StringPair xmlid = xMetadatable.getMetadataReference(); + assure("getParent(): wrong", MetaNode.eq(xmlid, id3)); + } + } + /** test SwXMeta XText interface */ public void testMetaXText() throws Exception { diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index d566e19b04..4ed0d86e05 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1635,7 +1635,8 @@ BOOL SwCrsrShell::SelectTxtAttr( USHORT nWhich, BOOL bExpand, SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode(); pTxtAttr = (pTxtNd) ? pTxtNd->GetTxtAttrAt(rPos.nContent.GetIndex(), - static_cast(nWhich), bExpand) + static_cast(nWhich), + (bExpand) ? SwTxtNode::EXPAND : SwTxtNode::DEFAULT) : 0; } diff --git a/sw/source/core/inc/unometa.hxx b/sw/source/core/inc/unometa.hxx index 3728925270..b57dae04f0 100755 --- a/sw/source/core/inc/unometa.hxx +++ b/sw/source/core/inc/unometa.hxx @@ -33,12 +33,13 @@ #include #include #include +#include #include #include #include #include -#include +#include #include @@ -57,10 +58,11 @@ namespace sw { class MetaField; } -typedef ::cppu::ImplInheritanceHelper5 +typedef ::cppu::ImplInheritanceHelper6 < ::sfx2::MetadatableMixin , ::com::sun::star::lang::XUnoTunnel , ::com::sun::star::lang::XServiceInfo +, ::com::sun::star::container::XChild , ::com::sun::star::container::XEnumerationAccess , ::com::sun::star::text::XTextContent , ::com::sun::star::text::XText @@ -151,6 +153,17 @@ public: ::com::sun::star::lang::XEventListener > & xListener) throw (::com::sun::star::uno::RuntimeException); + // XChild + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XInterface > SAL_CALL + getParent() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setParent( + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XInterface> const& xParent) + throw (::com::sun::star::uno::RuntimeException, + ::com::sun::star::lang::NoSupportException); + // XElementAccess virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw (::com::sun::star::uno::RuntimeException); diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 2d35888bef..fce8cd4f33 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1196,14 +1196,39 @@ BOOL SwTxtNode::DontExpandFmt( const SwIndex& rIdx, bool bFlag, return bRet; } +static bool lcl_GetTxtAttrDefault(xub_StrLen const nIndex, + xub_StrLen const nHintStart, xub_StrLen const nHintEnd) +{ + return ((nHintStart <= nIndex) && (nIndex < nHintEnd)); +} +static bool lcl_GetTxtAttrExpand(xub_StrLen const nIndex, + xub_StrLen const nHintStart, xub_StrLen const nHintEnd) +{ + return ((nHintStart < nIndex) && (nIndex <= nHintEnd)); +} +static bool lcl_GetTxtAttrParent(xub_StrLen const nIndex, + xub_StrLen const nHintStart, xub_StrLen const nHintEnd) +{ + return ((nHintStart < nIndex) && (nIndex < nHintEnd)); +} + static void lcl_GetTxtAttrs( ::std::vector *const pVector, SwTxtAttr **const ppTxtAttr, SwpHints *const pSwpHints, - xub_StrLen const nIndex, RES_TXTATR const nWhich, bool const bExpand) + xub_StrLen const nIndex, RES_TXTATR const nWhich, + enum SwTxtNode::GetTxtAttrMode const eMode) { USHORT const nSize = (pSwpHints) ? pSwpHints->Count() : 0; xub_StrLen nPreviousIndex(0); // index of last hint with nWhich + bool (*pMatchFunc)(xub_StrLen const, xub_StrLen const, xub_StrLen const)=0; + switch (eMode) + { + case SwTxtNode::DEFAULT: pMatchFunc = &lcl_GetTxtAttrDefault; break; + case SwTxtNode::EXPAND: pMatchFunc = &lcl_GetTxtAttrExpand; break; + case SwTxtNode::PARENT: pMatchFunc = &lcl_GetTxtAttrParent; break; + default: OSL_ASSERT(false); + } for( USHORT i = 0; i < nSize; ++i ) { @@ -1225,9 +1250,7 @@ lcl_GetTxtAttrs( // Wenn bExpand gesetzt ist, wird das Verhalten bei Eingabe // simuliert, d.h. der Start wuede verschoben, das Ende expandiert, bool const bContained( (pEndIdx) - ? ((bExpand) - ? ((nHintStart < nIndex) && (nIndex <= *pEndIdx)) - : ((nHintStart <= nIndex) && (nIndex < *pEndIdx))) + ? (*pMatchFunc)(nIndex, nHintStart, *pEndIdx) : (nHintStart == nIndex) ); if (bContained) { @@ -1254,16 +1277,16 @@ lcl_GetTxtAttrs( ::std::vector SwTxtNode::GetTxtAttrsAt(xub_StrLen const nIndex, RES_TXTATR const nWhich, - bool const bExpand) const + enum GetTxtAttrMode const eMode) const { ::std::vector ret; - lcl_GetTxtAttrs(& ret, 0, m_pSwpHints, nIndex, nWhich, bExpand); + lcl_GetTxtAttrs(& ret, 0, m_pSwpHints, nIndex, nWhich, eMode); return ret; } SwTxtAttr * SwTxtNode::GetTxtAttrAt(xub_StrLen const nIndex, RES_TXTATR const nWhich, - bool const bExpand) const + enum GetTxtAttrMode const eMode) const { ASSERT( (nWhich == RES_TXTATR_META) || (nWhich == RES_TXTATR_METAFIELD) @@ -1274,7 +1297,7 @@ SwTxtNode::GetTxtAttrAt(xub_StrLen const nIndex, RES_TXTATR const nWhich, "GetTxtAttrAt() will give wrong result for this hint!"); SwTxtAttr * pRet(0); - lcl_GetTxtAttrs(0, & pRet, m_pSwpHints, nIndex, nWhich, bExpand); + lcl_GetTxtAttrs(0, & pRet, m_pSwpHints, nIndex, nWhich, eMode); return pRet; } diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 3f9edd5ab5..1d5d7b8128 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -105,13 +105,16 @@ namespace SwUnoCursorHelper { uno::Reference -GetNestedTextContent(SwTxtNode & rTextNode, xub_StrLen const nIndex) +GetNestedTextContent(SwTxtNode & rTextNode, xub_StrLen const nIndex, + bool const bParent) { // these should be unambiguous because of the dummy character + SwTxtNode::GetTxtAttrMode const eMode( (bParent) + ? SwTxtNode::PARENT : SwTxtNode::EXPAND ); SwTxtAttr *const pMetaTxtAttr = - rTextNode.GetTxtAttrAt(nIndex, RES_TXTATR_META, true); + rTextNode.GetTxtAttrAt(nIndex, RES_TXTATR_META, eMode); SwTxtAttr *const pMetaFieldTxtAttr = - rTextNode.GetTxtAttrAt(nIndex, RES_TXTATR_METAFIELD, true); + rTextNode.GetTxtAttrAt(nIndex, RES_TXTATR_METAFIELD, eMode); // which is innermost? SwTxtAttr *const pTxtAttr = (pMetaTxtAttr) ? ((pMetaFieldTxtAttr) @@ -512,7 +515,7 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry { uno::Reference const xRet( GetNestedTextContent(*rPam.GetNode()->GetTxtNode(), - rPam.GetPoint()->nContent.GetIndex())); + rPam.GetPoint()->nContent.GetIndex(), false)); if (xRet.is()) { if (pAny) diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 919954845b..244bc8dc5e 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -1197,11 +1198,7 @@ uno::Reference< text::XText > SAL_CALL SwXMeta::getText() throw (uno::RuntimeException) { vos::OGuard g(Application::GetSolarMutex()); - //TODO probably this should return outer meta in case there is nesting, - // but currently that is not done; would need to change at least - // SwXTextPortionEnumeration and SwXMeta::attach and other places where - // SwXMeta is constructed - return GetParentText(); + return this; } uno::Reference< text::XTextRange > SAL_CALL @@ -1287,6 +1284,33 @@ SwXMeta::removeTextContent( return m_pImpl->m_Text.removeTextContent(xContent); } +// XChild +uno::Reference< uno::XInterface > SAL_CALL +SwXMeta::getParent() throw (uno::RuntimeException) +{ + vos::OGuard g(Application::GetSolarMutex()); + SwTxtNode * pTxtNode; + xub_StrLen nMetaStart; + xub_StrLen nMetaEnd; + bool const bSuccess( SetContentRange(pTxtNode, nMetaStart, nMetaEnd) ); + OSL_ENSURE(bSuccess, "no pam?"); + if (!bSuccess) { throw lang::DisposedException(); } + // in order to prevent getting this meta, subtract 1 from nMetaStart; + // so we get the index of the dummy character, and we exclude it + // by calling GetTxtAttrAt(_, _, PARENT) in GetNestedTextContent + uno::Reference const xRet( + SwUnoCursorHelper::GetNestedTextContent(*pTxtNode, nMetaStart - 1, + true) ); + return xRet; +} + +void SAL_CALL +SwXMeta::setParent(uno::Reference< uno::XInterface > const& /*xParent*/) + throw (uno::RuntimeException, lang::NoSupportException) +{ + throw lang::NoSupportException(C2S("setting parent not supported"), *this); +} + // XElementAccess uno::Type SAL_CALL SwXMeta::getElementType() throw (uno::RuntimeException) -- cgit v1.2.3 From 6f78f412b709f99b361c7935094641d49eb60e95 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 9 Mar 2010 15:59:00 +0100 Subject: sw33a11y01 #i92233# - provide mm to pixel ratio as default paragraph attribute at Writer's implementation of for paragraphs --- sw/source/core/access/accpara.cxx | 43 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 059be745db..368e076470 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -82,6 +82,9 @@ #include #include // <-- +// --> OD 2010-03-08 #i92233# +#include +// <-- #include @@ -1467,7 +1470,30 @@ uno::Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes( tAccParaPropValMap aDefAttrSeq; _getDefaultAttributesImpl( aRequestedAttributes, aDefAttrSeq ); - uno::Sequence< PropertyValue > aValues( aDefAttrSeq.size() ); + // --> OD 2010-03-08 #i92233# + static rtl::OUString sMMToPixelRatio( rtl::OUString::createFromAscii( "MMToPixelRatio" ) ); + bool bProvideMMToPixelRatio( false ); + { + if ( aRequestedAttributes.getLength() == 0 ) + { + bProvideMMToPixelRatio = true; + } + else + { + const rtl::OUString* aRequestedAttrIter = + ::std::find( ::comphelper::stl_begin( aRequestedAttributes ), + ::comphelper::stl_end( aRequestedAttributes ), + sMMToPixelRatio ); + if ( aRequestedAttrIter != ::comphelper::stl_end( aRequestedAttributes ) ) + { + bProvideMMToPixelRatio = true; + } + } + } + // <-- + + uno::Sequence< PropertyValue > aValues( aDefAttrSeq.size() + + ( bProvideMMToPixelRatio ? 1 : 0 ) ); PropertyValue* pValues = aValues.getArray(); sal_Int32 i = 0; for ( tAccParaPropValMap::const_iterator aIter = aDefAttrSeq.begin(); @@ -1478,6 +1504,21 @@ uno::Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes( ++i; } + // --> OD 2010-03-08 #i92233# + if ( bProvideMMToPixelRatio ) + { + PropertyValue rPropVal; + rPropVal.Name = sMMToPixelRatio; + const Size a100thMMSize( 1000, 1000 ); + const Size aPixelSize = GetMap()->LogicToPixel( a100thMMSize ); + const float fRatio = ((float)a100thMMSize.Width()/100)/aPixelSize.Width(); + rPropVal.Value = uno::makeAny( fRatio ); + rPropVal.Handle = -1; + rPropVal.State = beans::PropertyState_DEFAULT_VALUE; + pValues[ aValues.getLength() - 1 ] = rPropVal; + } + // <-- + return aValues; } -- cgit v1.2.3 From 4a55f5d2ae31ac50f2b38ab86863e783a9033000 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 10 Mar 2010 15:21:37 +0100 Subject: sw33a11y01: #i87532# - method - provide text content of corresponding table cell of column table header --- sw/source/core/access/acctable.cxx | 77 +++++++++++++++++++++++++++++++++----- 1 file changed, 68 insertions(+), 9 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index 488978fba7..3b4eaab066 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -54,6 +54,8 @@ #include #include +#include + using namespace ::com::sun::star; using namespace ::com::sun::star::accessibility; using ::rtl::OUString; @@ -904,24 +906,72 @@ OUString SAL_CALL SwAccessibleTable::getAccessibleRowDescription( sal_Int32 nRow ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { - // TODO: Is there any reasonable we can do here? - OUString sTmpDesc; + // --> OD 2010-03-10 #i87532# + // determine table cell in th row and in first column of row header table + // and return its text content. + OUString sRowDesc; GetTableData().CheckRowAndCol(nRow, 0, this); - return sTmpDesc; + uno::Reference< XAccessibleTable > xTableRowHeader = getAccessibleRowHeaders(); + if ( xTableRowHeader.is() ) + { + uno::Reference< XAccessible > xRowHeaderCell = + xTableRowHeader->getAccessibleCellAt( nRow, 0 ); + ASSERT( xRowHeaderCell.is(), + " - missing row header cell -> serious issue." ); + uno::Reference< XAccessibleContext > xRowHeaderCellContext = + xRowHeaderCell->getAccessibleContext(); + const sal_Int32 nCellChildCount( xRowHeaderCellContext->getAccessibleChildCount() ); + for ( sal_Int32 nChildIndex = 0; nChildIndex < nCellChildCount; ++nChildIndex ) + { + uno::Reference< XAccessible > xChild = xRowHeaderCellContext->getAccessibleChild( nChildIndex ); + uno::Reference< XAccessibleText > xChildText( xChild, uno::UNO_QUERY ); + if ( xChildText.is() ) + { + sRowDesc = sRowDesc + xChildText->getText(); + } + } + } + + return sRowDesc; + // <-- } OUString SAL_CALL SwAccessibleTable::getAccessibleColumnDescription( sal_Int32 nColumn ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { - // TODO: Is there any reasonable we can do here? - OUString sTmpDesc; + // --> OD 2010-03-10 #i87532# + // determine table cell in first row and in th column of column header table + // and return its text content. + OUString sColumnDesc; GetTableData().CheckRowAndCol(0, nColumn, this); - return sTmpDesc; + uno::Reference< XAccessibleTable > xTableColumnHeader = getAccessibleColumnHeaders(); + if ( xTableColumnHeader.is() ) + { + uno::Reference< XAccessible > xColumnHeaderCell = + xTableColumnHeader->getAccessibleCellAt( 0, nColumn ); + ASSERT( xColumnHeaderCell.is(), + " - missing column header cell -> serious issue." ); + uno::Reference< XAccessibleContext > xColumnHeaderCellContext = + xColumnHeaderCell->getAccessibleContext(); + const sal_Int32 nCellChildCount( xColumnHeaderCellContext->getAccessibleChildCount() ); + for ( sal_Int32 nChildIndex = 0; nChildIndex < nCellChildCount; ++nChildIndex ) + { + uno::Reference< XAccessible > xChild = xColumnHeaderCellContext->getAccessibleChild( nChildIndex ); + uno::Reference< XAccessibleText > xChildText( xChild, uno::UNO_QUERY ); + if ( xChildText.is() ) + { + sColumnDesc = sColumnDesc + xChildText->getText(); + } + } + } + + return sColumnDesc; + // <-- } sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRowExtentAt( @@ -998,9 +1048,18 @@ uno::Reference< XAccessibleTable > SAL_CALL SwAccessibleTable::getAccessibleColumnHeaders( ) throw (uno::RuntimeException) { - // --> OD 2007-06-29 #i77106# - return new SwAccessibleTableColHeaders( - GetMap(), static_cast< const SwTabFrm *>( GetFrm() ) ); + // --> OD 2010-03-10 #i87532# + // assure that return accesible object is empty, if no column header exists. + SwAccessibleTableColHeaders* pTableColHeaders = + new SwAccessibleTableColHeaders( GetMap(), static_cast< const SwTabFrm *>( GetFrm() ) ); + uno::Reference< XAccessibleTable > xTableColumnHeaders( pTableColHeaders ); + if ( pTableColHeaders->getAccessibleChildCount() <= 0 ) + { + return uno::Reference< XAccessibleTable >(); + } + + return xTableColumnHeaders; + // <-- } uno::Sequence< sal_Int32 > SAL_CALL SwAccessibleTable::getSelectedAccessibleRows() -- cgit v1.2.3 From aa826fbfdcea7698a5d0c0322f84c750b81d8590 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 10 Mar 2010 21:33:47 +0100 Subject: sw33bf02: adjustments due to merge with DEV300_m74 --- sw/source/core/frmedt/fefly1.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 091a4df126..d0011f521e 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -75,7 +75,7 @@ #include // --> OD 2009-12-29 #i89920# #include -#include +#include // <-- using ::rtl::OUString; -- cgit v1.2.3 From 209f6d2f855ed7e0a39264cea47d09df3f1d3e1e Mon Sep 17 00:00:00 2001 From: David Tardon Date: Thu, 11 Mar 2010 07:28:29 +0100 Subject: dtardon02: #i108508# remove empty files in sw --- sw/source/ui/inc/tbxmgr.hxx | 52 ------------ sw/source/ui/ribbar/tbxmgr.cxx | 180 ---------------------------------------- sw/source/ui/shells/slotadd.cxx | 150 --------------------------------- 3 files changed, 382 deletions(-) delete mode 100644 sw/source/ui/inc/tbxmgr.hxx delete mode 100644 sw/source/ui/ribbar/tbxmgr.cxx delete mode 100644 sw/source/ui/shells/slotadd.cxx (limited to 'sw/source') diff --git a/sw/source/ui/inc/tbxmgr.hxx b/sw/source/ui/inc/tbxmgr.hxx deleted file mode 100644 index 4a744f8e66..0000000000 --- a/sw/source/ui/inc/tbxmgr.hxx +++ /dev/null @@ -1,52 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _TBXMGR_HXX -#define _TBXMGR_HXX - -#include -/* -class SwPopupWindowTbxMgr : public SvxPopupWindowTbxMgr -{ - BOOL bWeb:1; //gilt der WebMode? - ResId aRIdWinTemp; - ResId aRIdTbxTemp; - WindowAlign eAlignment; - SfxBindings& mrBindings; - -public: - SwPopupWindowTbxMgr( USHORT nId, - WindowAlign eAlign, - ResId aRIdWin, - ResId aRIdTbx, - SfxBindings& rBindings ); - - virtual void StateChanged(USHORT nSID, SfxItemState eState, const SfxPoolItem* pState); - virtual SfxPopupWindow* Clone() const; -}; -*/ - -#endif // _TBX_DRAW_HXX diff --git a/sw/source/ui/ribbar/tbxmgr.cxx b/sw/source/ui/ribbar/tbxmgr.cxx deleted file mode 100644 index c4f05a7b6e..0000000000 --- a/sw/source/ui/ribbar/tbxmgr.cxx +++ /dev/null @@ -1,180 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - - - -#include "cmdid.h" -#include "swtypes.hxx" // nur wegen aEmptyString?? -#include "errhdl.hxx" -#include "wdocsh.hxx" -#include "tbxmgr.hxx" - - -/************************************************************************* -|* -|* -|* -\************************************************************************/ -/* -SwPopupWindowTbxMgr::SwPopupWindowTbxMgr( USHORT nId, WindowAlign eAlign, - ResId aRIdWin, ResId aRIdTbx, - SfxBindings& rBindings ) : - SvxPopupWindowTbxMgr( nId, eAlign, aRIdWin, aRIdTbx ), - bWeb(FALSE), - aRIdWinTemp(aRIdWin), - aRIdTbxTemp(aRIdTbx), - eAlignment( eAlign ), - mrBindings( rBindings ) -{ - SfxObjectShell* pObjShell = SfxObjectShell::Current(); - if(PTR_CAST(SwWebDocShell, pObjShell)) - { - bWeb = TRUE; - ToolBox& rTbx = GetTbxMgr().GetToolBox(); - // jetzt muessen ein paar Items aus der Toolbox versteckt werden: - switch(nId) - { - case FN_INSERT_CTRL: - rTbx.ShowItem(FN_INSERT_FRAME_INTERACT_NOCOL); - rTbx.HideItem(FN_INSERT_FRAME_INTERACT); - rTbx.HideItem(FN_INSERT_FOOTNOTE); - rTbx.HideItem(FN_INSERT_ENDNOTE); - rTbx.HideItem(FN_PAGE_STYLE_SET_COLS); - rTbx.HideItem(FN_INSERT_IDX_ENTRY_DLG); - - break; - case FN_INSERT_FIELD_CTRL: - rTbx.HideItem(FN_INSERT_FLD_PGNUMBER); - rTbx.HideItem(FN_INSERT_FLD_PGCOUNT); - rTbx.HideItem(FN_INSERT_FLD_TOPIC); - rTbx.HideItem(FN_INSERT_FLD_TITLE); - break; - } - } - else if( FN_INSERT_CTRL == nId) - { - ToolBox& rTbx = GetTbxMgr().GetToolBox(); - rTbx.ShowItem(FN_INSERT_FRAME_INTERACT); - rTbx.HideItem(FN_INSERT_FRAME_INTERACT_NOCOL); - } - - Size aSize = GetTbxMgr().CalcWindowSizePixel(); - GetTbxMgr().SetPosSizePixel( Point(), aSize ); - SetOutputSizePixel( aSize ); -} -*/ -/************************************************************************* -|* -|* -|* -\************************************************************************/ -/* -void SwPopupWindowTbxMgr::StateChanged(USHORT nSID, SfxItemState eState, - const SfxPoolItem* pState) -{ - static USHORT __READONLY_DATA aInsertCtrl[] = - { - FN_INSERT_FRAME_INTERACT, - FN_INSERT_FOOTNOTE, - FN_INSERT_ENDNOTE, - FN_PAGE_STYLE_SET_COLS, - FN_INSERT_IDX_ENTRY_DLG, - 0 - }; - static USHORT __READONLY_DATA aInsertFld[] = - { - FN_INSERT_FLD_PGNUMBER, - FN_INSERT_FLD_PGCOUNT, - FN_INSERT_FLD_TOPIC, - FN_INSERT_FLD_TITLE, - 0 - }; - - SfxObjectShell* pObjShell = SfxObjectShell::Current(); - BOOL bNewWeb = 0 != PTR_CAST(SwWebDocShell, pObjShell); - - if(bWeb != bNewWeb) - { - bWeb = bNewWeb; - ToolBox& rTbx = GetTbxMgr().GetToolBox(); - // jetzt muessen ein paar Items aus der Toolbox versteckt werden: - const USHORT* pSid = 0; - - switch(nSID) - { - case FN_INSERT_CTRL: - pSid = &aInsertCtrl[0]; - if(bWeb) - rTbx.ShowItem(FN_INSERT_FRAME_INTERACT_NOCOL); - else - rTbx.HideItem(FN_INSERT_FRAME_INTERACT_NOCOL); - break; - case FN_INSERT_FIELD_CTRL: - pSid = & aInsertFld[0]; - break; - } - if(pSid) - { - if(bWeb) - while(*pSid) - { - rTbx.HideItem(*pSid); - pSid++; - } - else - while(*pSid) - { - rTbx.ShowItem(*pSid); - pSid++; - } - Size aSize = GetTbxMgr().CalcWindowSizePixel(); - GetTbxMgr().SetPosSizePixel( Point(), aSize ); - SetOutputSizePixel( aSize ); - } - } - - SfxPopupWindow::StateChanged(nSID, eState, pState); -} -*/ -/* -SfxPopupWindow* SwPopupWindowTbxMgr::Clone() const -{ - return new SwPopupWindowTbxMgr( - GetId(), - eAlignment, -// ((SwPopupWindowTbxMgr*)this)->GetTbxMgr().GetToolBox().GetAlign(), - aRIdWinTemp, - aRIdTbxTemp, - mrBindings -// (SfxBindings&)GetBindings() - ); -} -*/ - diff --git a/sw/source/ui/shells/slotadd.cxx b/sw/source/ui/shells/slotadd.cxx deleted file mode 100644 index 67d842dde1..0000000000 --- a/sw/source/ui/shells/slotadd.cxx +++ /dev/null @@ -1,150 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - -#include "hintids.hxx" -#include "uiitems.hxx" -#include "cmdid.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef _SVX_TSTPITEM_HXX //autogen -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef _SVX_CNTRITEM_HXX //autogen -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#include -#include -#include -#include -#include -#include "envimg.hxx" -#include "frmatr.hxx" -#include "cfgitems.hxx" -#include "grfatr.hxx" -#include "fmtline.hxx" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define SvxDrawToolItem SfxAllEnumItem -#define SvxDrawAlignItem SfxAllEnumItem -#define SvxDrawBezierItem SfxAllEnumItem -#define avmedia_MediaItem ::avmedia::MediaItem - -#define SFX_TYPEMAP -#include -#include "swslots.hxx" - - - -- cgit v1.2.3 From ec887d9c57aa5fbb1c19218f6d23bc00ef6bebc9 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 12 Mar 2010 10:30:57 +0100 Subject: dtardon02: #i18508# revert errorneously removed file in sw --- sw/source/ui/shells/slotadd.cxx | 150 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 sw/source/ui/shells/slotadd.cxx (limited to 'sw/source') diff --git a/sw/source/ui/shells/slotadd.cxx b/sw/source/ui/shells/slotadd.cxx new file mode 100644 index 0000000000..67d842dde1 --- /dev/null +++ b/sw/source/ui/shells/slotadd.cxx @@ -0,0 +1,150 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sw.hxx" + +#include "hintids.hxx" +#include "uiitems.hxx" +#include "cmdid.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef _SVX_TSTPITEM_HXX //autogen +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef _SVX_CNTRITEM_HXX //autogen +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include +#include +#include +#include +#include +#include "envimg.hxx" +#include "frmatr.hxx" +#include "cfgitems.hxx" +#include "grfatr.hxx" +#include "fmtline.hxx" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define SvxDrawToolItem SfxAllEnumItem +#define SvxDrawAlignItem SfxAllEnumItem +#define SvxDrawBezierItem SfxAllEnumItem +#define avmedia_MediaItem ::avmedia::MediaItem + +#define SFX_TYPEMAP +#include +#include "swslots.hxx" + + + -- cgit v1.2.3 From d1ec176457435859ee24650a2dcbfca385f3f8ac Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 12 Mar 2010 13:16:09 +0100 Subject: dtardon02: #i108503# #i108505# #i108507# #i108508# #i110035# clean up makefiles and #includes --- sw/source/ui/ribbar/tblctrl.cxx | 1 - sw/source/ui/ribbar/workctrl.cxx | 1 - 2 files changed, 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/ribbar/tblctrl.cxx b/sw/source/ui/ribbar/tblctrl.cxx index 96a03fe357..dbbbfcb44a 100644 --- a/sw/source/ui/ribbar/tblctrl.cxx +++ b/sw/source/ui/ribbar/tblctrl.cxx @@ -36,7 +36,6 @@ #include "cmdid.h" #include "swtypes.hxx" -#include "tbxmgr.hxx" #include "tblctrl.hxx" #include "tblctrl.hrc" diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx index fbf42ecc08..bb69819b8d 100644 --- a/sw/source/ui/ribbar/workctrl.cxx +++ b/sw/source/ui/ribbar/workctrl.cxx @@ -50,7 +50,6 @@ #include #include #include -#include #include #ifndef _WORKCTRL_HRC #include -- cgit v1.2.3 From 86635d6506ff2490f093128ca70de4ecd8873e4b Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 15 Mar 2010 11:34:41 +0100 Subject: odfmetadata4: #i107672#: SwXDocumentIndexMark: fix regression --- sw/source/core/unocore/unoidx.cxx | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index f47ed55ec6..9e8dfc758b 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -1617,13 +1617,19 @@ public: const_cast(m_TypeDepend.GetRegisteredIn())); } + void DeleteTOXMark() + { + m_pDoc->DeleteTOXMark(m_pTOXMark); // calls Invalidate() via Modify! + m_pTOXMark = 0; + } + + void InsertTOXMark(SwTOXMark & rMark, SwPaM & rPam, + SwXTextCursor const*const pTextCursor); + void Invalidate(); // SwClient virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); - - void InsertTOXMark(SwTOXMark & rMark, SwPaM & rPam, - SwXTextCursor const*const pTextCursor); }; /* -----------------------------16.10.00 11:24-------------------------------- @@ -1834,8 +1840,7 @@ throw (uno::RuntimeException) aPam.GetPoint()->nContent++; // delete old mark - m_pImpl->m_pDoc->DeleteTOXMark(m_pImpl->m_pTOXMark); - m_pImpl->m_pTOXMark = 0; + m_pImpl->DeleteTOXMark(); m_pImpl->InsertTOXMark(aMark, aPam, 0); } @@ -1969,7 +1974,6 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) m_pImpl->InsertTOXMark(aMark, aPam, dynamic_cast(pCursor)); - m_pImpl->m_pDoc = pDoc; m_pImpl->m_bIsDescriptor = sal_False; const_cast(pTOXType)->Add(&m_pImpl->m_TypeDepend); @@ -2057,6 +2061,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(SwTOXMark & rMark, SwPaM & rPam, 0); } + m_pDoc = pDoc; m_pTOXMark = & pTxtAttr->GetTOXMark(); const_cast(m_pTOXMark)->Add(this); } @@ -2109,7 +2114,7 @@ SwXDocumentIndexMark::dispose() throw (uno::RuntimeException) SwTOXType *const pType = m_pImpl->GetTOXType(); if (pType && m_pImpl->m_pTOXMark) { - m_pImpl->m_pDoc->DeleteTOXMark(m_pImpl->m_pTOXMark); + m_pImpl->DeleteTOXMark(); // call Invalidate() via modify! } } /*-- 14.12.98 10:25:45--------------------------------------------------- @@ -2209,8 +2214,6 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, SwTOXType *const pType = m_pImpl->GetTOXType(); if (pType && m_pImpl->m_pTOXMark) { - SwDoc* pLocalDoc = m_pImpl->m_pDoc; - SwTOXMark aMark(*m_pImpl->m_pTOXMark); switch(pEntry->nWID) { @@ -2254,8 +2257,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, } //delete the old mark - pLocalDoc->DeleteTOXMark(m_pImpl->m_pTOXMark); - m_pImpl->m_pTOXMark = 0; + m_pImpl->DeleteTOXMark(); m_pImpl->InsertTOXMark(aMark, aPam, 0); pType->Add(& m_pImpl->m_TypeDepend); -- cgit v1.2.3 From 822e710170198513cdd688b618b548a4041c0764 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 15 Mar 2010 11:34:41 +0100 Subject: odfmetadata4: #i109983#: SwXDocumentIndexMark: prevent setPropertyValue() and setMarkEntry() from calling disposing() on listeners, and from un-registering at the SwTOXType. --- sw/source/core/unocore/unoidx.cxx | 43 +++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 15 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 9e8dfc758b..016cacbdc9 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -1573,6 +1573,8 @@ lcl_TypeToPropertyMap_Mark(const TOXTypes eType) class SwXDocumentIndexMark::Impl : public SwClient { +private: + bool m_bInReplaceMark; public: @@ -1599,6 +1601,7 @@ public: const enum TOXTypes eType, SwTOXType *const pType, SwTOXMark const*const pMark) : SwClient(const_cast(pMark)) + , m_bInReplaceMark(false) , m_rPropSet( *aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Mark(eType))) , m_eTOXType(eType) @@ -1623,9 +1626,23 @@ public: m_pTOXMark = 0; } - void InsertTOXMark(SwTOXMark & rMark, SwPaM & rPam, + void InsertTOXMark(SwTOXType & rTOXType, SwTOXMark & rMark, SwPaM & rPam, SwXTextCursor const*const pTextCursor); + void ReplaceTOXMark(SwTOXType & rTOXType, SwTOXMark & rMark, SwPaM & rPam) + { + m_bInReplaceMark = true; + DeleteTOXMark(); + m_bInReplaceMark = false; + try { + InsertTOXMark(rTOXType, rMark, rPam, 0); + } catch (...) { + OSL_ENSURE(false, "ReplaceTOXMark() failed!"); + m_ListenerContainer.Disposing(); + throw; + } + } + void Invalidate(); // SwClient @@ -1646,7 +1663,10 @@ void SwXDocumentIndexMark::Impl::Invalidate() &m_TypeDepend); } } - m_ListenerContainer.Disposing(); + if (!m_bInReplaceMark) // #i109983# only dispose on delete, not on replace! + { + m_ListenerContainer.Disposing(); + } m_pDoc = 0; m_pTOXMark = 0; } @@ -1839,10 +1859,7 @@ throw (uno::RuntimeException) else aPam.GetPoint()->nContent++; - // delete old mark - m_pImpl->DeleteTOXMark(); - - m_pImpl->InsertTOXMark(aMark, aPam, 0); + m_pImpl->ReplaceTOXMark(*pType, aMark, aPam); } else if (m_pImpl->m_bIsDescriptor) { @@ -1971,12 +1988,10 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) break; } - m_pImpl->InsertTOXMark(aMark, aPam, + m_pImpl->InsertTOXMark(*const_cast(pTOXType), aMark, aPam, dynamic_cast(pCursor)); m_pImpl->m_bIsDescriptor = sal_False; - - const_cast(pTOXType)->Add(&m_pImpl->m_TypeDepend); } template struct NotContainedIn @@ -1990,7 +2005,8 @@ template struct NotContainedIn } }; -void SwXDocumentIndexMark::Impl::InsertTOXMark(SwTOXMark & rMark, SwPaM & rPam, +void SwXDocumentIndexMark::Impl::InsertTOXMark( + SwTOXType & rTOXType, SwTOXMark & rMark, SwPaM & rPam, SwXTextCursor const*const pTextCursor) { SwDoc *const pDoc( rPam.GetDoc() ); @@ -2064,6 +2080,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(SwTOXMark & rMark, SwPaM & rPam, m_pDoc = pDoc; m_pTOXMark = & pTxtAttr->GetTOXMark(); const_cast(m_pTOXMark)->Add(this); + const_cast(rTOXType).Add(& m_TypeDepend); } /*-- 14.12.98 10:25:45--------------------------------------------------- @@ -2256,11 +2273,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, aPam.GetPoint()->nContent++; } - //delete the old mark - m_pImpl->DeleteTOXMark(); - - m_pImpl->InsertTOXMark(aMark, aPam, 0); - pType->Add(& m_pImpl->m_TypeDepend); + m_pImpl->ReplaceTOXMark(*pType, aMark, aPam); } else if (m_pImpl->m_bIsDescriptor) { -- cgit v1.2.3 From 1aeb570e468cb68424b970990f1140c645911169 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 15 Mar 2010 12:53:14 +0100 Subject: odfmetadata4: #i110070#: XMLTextImportHelper: clean up: move all members to Impl structs. replace const OUString members with function static OUStrings. move XMLTextImportHelper::GetTextFieldAttrTokenMap to txtimp.cxx. --- sw/source/filter/xml/xmltbli.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index fc0db71ba4..c3beb63cc0 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -457,7 +457,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl( bHasTextContent( sal_False ), bHasTableContent( sal_False ) { - sSaveParaDefault = GetImport().GetTextImport()->sCellParaStyleDefault; + sSaveParaDefault = GetImport().GetTextImport()->GetCellParaStyleDefault(); sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -477,7 +477,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl( break; case XML_TOK_TABLE_STYLE_NAME: aStyleName = rValue; - GetImport().GetTextImport()->sCellParaStyleDefault = rValue; + GetImport().GetTextImport()->SetCellParaStyleDefault(rValue); break; case XML_TOK_TABLE_NUM_COLS_SPANNED: nColSpan = (sal_uInt32)rValue.toInt32(); @@ -715,7 +715,7 @@ void SwXMLTableCellContext_Impl::EndElement() } } } - GetImport().GetTextImport()->sCellParaStyleDefault = sSaveParaDefault; + GetImport().GetTextImport()->SetCellParaStyleDefault(sSaveParaDefault); } // --------------------------------------------------------------------- -- cgit v1.2.3 From 10ae134d53c4fdfffce35152daf54c23fef0923e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 15 Mar 2010 12:53:14 +0100 Subject: odfmetadata4: sfx2::Metadatable: split CreateUndo() into 2 methods --- sw/source/core/doc/docbm.cxx | 5 ++--- sw/source/core/undo/rolbck.cxx | 5 ++--- sw/source/core/undo/undel.cxx | 9 +++++++-- 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index fba2435361..3a13c245f8 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -992,9 +992,8 @@ SaveBookmark::SaveBookmark( m_aShortName = pBookmark->GetShortName(); m_aCode = pBookmark->GetKeyCode(); - ::sfx2::Metadatable * const pMetadatable( - const_cast< ::sfx2::Metadatable * >( // CreateUndo should be const? - dynamic_cast< ::sfx2::Metadatable const* >(pBookmark))); + ::sfx2::Metadatable const*const pMetadatable( + dynamic_cast< ::sfx2::Metadatable const* >(pBookmark)); if (pMetadatable) { m_pMetadataUndo = pMetadatable->CreateUndo(); diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index 0f56140366..9526112d0e 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -614,9 +614,8 @@ SwHistoryBookmark::SwHistoryBookmark( m_aKeycode = pBookmark->GetKeyCode(); m_aShortName = pBookmark->GetShortName(); - ::sfx2::Metadatable * const pMetadatable( - const_cast< ::sfx2::Metadatable * >( // CreateUndo should be const? - dynamic_cast< ::sfx2::Metadatable const* >(pBookmark))); + ::sfx2::Metadatable const*const pMetadatable( + dynamic_cast< ::sfx2::Metadatable const* >(pBookmark)); if (pMetadatable) { m_pMetadataUndo = pMetadatable->CreateUndo(); diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 74c2c0854a..be2680b300 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -391,7 +391,9 @@ BOOL SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd, bool emptied( pSttStr->Len() && !pSttTxtNd->Len() ); if (!bOneNode || emptied) // merging may overwrite xmlids... { - m_pMetadataUndoStart = pSttTxtNd->CreateUndo( emptied ); + m_pMetadataUndoStart = (emptied) + ? pSttTxtNd->CreateUndoForDelete() + : pSttTxtNd->CreateUndo(); } if( bOneNode ) @@ -425,7 +427,10 @@ BOOL SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd, // METADATA: store bool emptied( pEndStr->Len() && !pEndTxtNd->Len() ); - m_pMetadataUndoEnd = pEndTxtNd->CreateUndo( emptied ); + + m_pMetadataUndoEnd = (emptied) + ? pEndTxtNd->CreateUndoForDelete() + : pEndTxtNd->CreateUndo(); } // sind es nur zwei Nodes, dann ist schon alles erledigt. -- cgit v1.2.3 From 4b3e4331ddd8afad944c0db21312d9a2fc10a496 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 15 Mar 2010 17:00:24 +0100 Subject: sw33bf03: #i110144#: sw: ascii export: add space after list label --- sw/source/filter/ascii/ascatr.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index 9b509a8eeb..196724afff 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -172,7 +172,14 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode ) SwASC_AttrIter aAttrIter( (SwASCWriter&)rWrt, rNd, nStrPos ); if( !nStrPos && rWrt.bExportPargraphNumbering ) - rWrt.Strm().WriteUnicodeOrByteText( rNd.GetNumString() ); + { + String numString( rNd.GetNumString() ); + if (numString.Len()) + { + numString.Append(' '); + rWrt.Strm().WriteUnicodeOrByteText(numString); + } + } String aStr( rNd.GetTxt() ); if( rWrt.bASCII_ParaAsBlanc ) -- cgit v1.2.3 From 4f6ece30ea771e0fd970809bf0ceec837312d868 Mon Sep 17 00:00:00 2001 From: C?dric Bosdonnat Date: Mon, 15 Mar 2010 18:16:49 +0100 Subject: [cbosdo05] Fixed a usability problem introduced by cbosdo01 Removing the non-breaking space when the character typed immediately after the punctuation mark if the last character typed isn't a blank. --- sw/source/ui/docvw/edtwin.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index d484af64aa..5d3510d9f4 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -2262,7 +2262,8 @@ KEYINPUT_CHECKTABLE_INSDEL: BOOL bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh ); - if( !aKeyEvent.GetRepeat() && pACorr && bIsAutoCorrectChar && + BOOL bRunNext = pACorr->HasRunNext(); + if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) && pACfg->IsAutoFmtByInput() && (( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) && ( '*' == aCh || '_' == aCh ) ) || @@ -2274,14 +2275,13 @@ KEYINPUT_CHECKTABLE_INSDEL: if( '\"' != aCh && '\'' != aCh ) // nur bei "*_" rufen! rSh.UpdateAttr(); } - else if( !aKeyEvent.GetRepeat() && pACorr && bIsAutoCorrectChar && + else if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) && pACfg->IsAutoFmtByInput() && pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | - ChgOrdinalNumber | + ChgOrdinalNumber | AddNonBrkSpace | ChgToEnEmDash | SetINetAttr | Autocorrect ) && - '\"' != aCh && '\'' != aCh && '*' != aCh && '_' != aCh && - !bIsNormalChar + '\"' != aCh && '\'' != aCh && '*' != aCh && '_' != aCh ) { FlushInBuffer(); -- cgit v1.2.3 From c5055f723dc910f9708ecd10a58789d004bdef05 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 19 Mar 2010 15:25:36 +0100 Subject: ppp02: #i108824# string updates --- sw/source/ui/config/optdlg.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src index e74bfacf1a..0246058af7 100755 --- a/sw/source/ui/config/optdlg.src +++ b/sw/source/ui/config/optdlg.src @@ -955,7 +955,7 @@ StringArray STR_PRINTOPTUI < "Contents"; >; < "Page ba~ckground"; >; < "Specifies whether to include colors and objects that are inserted to the background of the page (Format - Page - Background) in the printed document."; >; - < "P~ictures and graphic objects"; >; + < "P~ictures and other graphic objects"; >; < "Specifies whether the graphics and drawing or OLE objects of your text document are printed"; >; < "Hidden te~xt"; >; < "Enable this option to print text that is marked as hidden."; >; -- cgit v1.2.3 From 21c01c4a0f1a2ef7206efea2ab5201e1185fca09 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 16 Mar 2010 09:54:03 +0100 Subject: sw321bf01: #b6921213# - No keep of footnote portion with previous portion, if text line only contains footnote portions --- sw/source/core/text/inftxt.cxx | 4 +++- sw/source/core/text/inftxt.hxx | 4 ++++ sw/source/core/text/itrform2.cxx | 3 +++ sw/source/core/text/portxt.cxx | 8 ++++++-- 4 files changed, 16 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 36bf96aa81..d58f2907bd 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -276,6 +276,7 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew ) bURLNotify( rNew.URLNotify() ), bStopUnderFlow( rNew.StopUnderFlow() ), bFtnInside( rNew.IsFtnInside() ), + bOtherThanFtnInside( rNew.IsOtherThanFtnInside() ), bMulti( rNew.IsMulti() ), bFirstMulti( rNew.IsFirstMulti() ), bRuby( rNew.IsRuby() ), @@ -373,7 +374,7 @@ void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt, nIdx = nNewIdx; nLen = nNewLen; bNotEOL = sal_False; - bStopUnderFlow = bFtnInside = sal_False; + bStopUnderFlow = bFtnInside = bOtherThanFtnInside = sal_False; bMulti = bFirstMulti = bRuby = bHanging = bScriptSpace = bForbiddenChars = sal_False; @@ -400,6 +401,7 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew, const XubString &rTxt, bURLNotify( rNew.URLNotify() ), bStopUnderFlow( rNew.StopUnderFlow() ), bFtnInside( rNew.IsFtnInside() ), + bOtherThanFtnInside( rNew.IsOtherThanFtnInside() ), bMulti( rNew.IsMulti() ), bFirstMulti( rNew.IsFirstMulti() ), bRuby( rNew.IsRuby() ), diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index 28218a737a..7d6fcc8f64 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -208,6 +208,8 @@ protected: sal_Bool bURLNotify : 1; sal_Bool bStopUnderFlow : 1;// Underflow gestoppt z.B. von einer FlyPortion sal_Bool bFtnInside : 1; // the current line contains a footnote + sal_Bool bOtherThanFtnInside : 1; // the current line contains another portion than a footnote portion. + // needed for checking keep together of footnote portion with previous portion sal_Bool bMulti : 1; // inside a multiportion sal_Bool bFirstMulti : 1; // this flag is used for two purposes: // - the multiportion is the first lineportion @@ -251,6 +253,8 @@ public: inline void SetStopUnderFlow( const sal_Bool bNew ) { bStopUnderFlow = bNew; } inline sal_Bool IsFtnInside() const { return bFtnInside; } inline void SetFtnInside( const sal_Bool bNew ) { bFtnInside = bNew; } + inline sal_Bool IsOtherThanFtnInside() const { return bOtherThanFtnInside; } + inline void SetOtherThanFtnInside( const sal_Bool bNew ) { bOtherThanFtnInside = bNew; } inline sal_Bool IsMulti() const { return bMulti; } inline void SetMulti( const sal_Bool bNew ) { bMulti = bNew; } inline sal_Bool IsFirstMulti() const { return bFirstMulti; } diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 833ace0a56..eb39c9edf2 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -349,6 +349,8 @@ void SwTxtFormatter::InsertPortion( SwTxtFormatInfo &rInf, } pLast->Insert( pPor ); + rInf.SetOtherThanFtnInside( rInf.IsOtherThanFtnInside() || !pPor->IsFtnPortion() ); + // Maxima anpassen: if( pCurr->Height() < pPor->Height() ) pCurr->Height( pPor->Height() ); @@ -1533,6 +1535,7 @@ xub_StrLen SwTxtFormatter::FormatLine( const xub_StrLen nStartPos ) while( bBuild ) { GetInfo().SetFtnInside( sal_False ); + GetInfo().SetOtherThanFtnInside( sal_False ); // These values must not be reset by FormatReset(); sal_Bool bOldNumDone = GetInfo().IsNumDone(); diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 7307fbe205..b66a6e30a5 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -394,12 +394,16 @@ sal_Bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf ) } // case C1 // - Footnote portions with fake line start (i.e., not at beginning of line) - // should keep together with the text portion. + // should keep together with the text portion. (Note: no keep together + // with only footnote portions. // - TabPortions not at beginning of line should keep together with the // text portion, if they are not followed by a blank // (work around different definition of tab stop character - breaking or // non breaking character - in compatibility mode) - else if ( ( IsFtnPortion() && rInf.IsFakeLineStart() ) || + else if ( ( IsFtnPortion() && rInf.IsFakeLineStart() && + // --> OD 2010-01-29 #b6921213# + rInf.IsOtherThanFtnInside() ) || + // <-- ( rInf.GetLast() && rInf.GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_COMPAT) && rInf.GetLast()->InTabGrp() && -- cgit v1.2.3 From effab7b189242cf861f579b5307bc366413a7916 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:29 +0100 Subject: odfmetadata4: #i109600#: refactor insertion of TOX: SwDoc::InsertTableOf(): do not create a SwTOXBaseSection. SwNodes::InsertTextSection(): take SwTOXBase parameter. SwSectionNode ctor: if SwTOXBase is given, create SwTOXBaseSection. remove gross hack SwSectionNode::SetNewSection(). SwUnodo{Ins,Del}Section: adapt to store SwSection/SwTOXBase. --- sw/inc/doc.hxx | 5 +- sw/inc/ndarr.hxx | 24 +++++----- sw/inc/node.hxx | 8 ++-- sw/inc/undobj.hxx | 7 ++- sw/source/core/doc/docglbl.cxx | 24 ++++++---- sw/source/core/doc/doctxm.cxx | 61 ++++++++++-------------- sw/source/core/docnode/ndsect.cxx | 97 +++++++++++++++----------------------- sw/source/core/edit/edsect.cxx | 4 +- sw/source/core/inc/doctxm.hxx | 2 +- sw/source/core/undo/unsect.cxx | 50 +++++++++----------- sw/source/core/unocore/unosect.cxx | 2 +- sw/source/filter/html/htmlsect.cxx | 4 +- sw/source/filter/rtf/swparrtf.cxx | 2 +- sw/source/filter/ww1/fltshell.cxx | 3 +- sw/source/filter/ww8/ww8par5.cxx | 3 +- sw/source/filter/ww8/ww8par6.cxx | 4 +- 16 files changed, 139 insertions(+), 161 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 6e1f099cbd..c800e07889 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1803,8 +1803,9 @@ public: inline const Link& GetOle2Link() const {return aOle2Link;} // insert section (the ODF kind of section, not the nodesarray kind) - SwSection* InsertSwSection( const SwPaM& rRange, const SwSection& rNew, - const SfxItemSet* pAttr = 0, bool bUpdate = true); + SwSection * InsertSwSection(SwPaM const& rRange, SwSection const&, + SwTOXBase const*const pTOXBase = 0, + SfxItemSet const*const pAttr = 0, bool const bUpdate = true); sal_uInt16 IsInsRegionAvailable( const SwPaM& rRange, const SwNode** ppSttNd = 0 ) const; SwSection* GetCurrSection( const SwPosition& rPos ) const; diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx index bfe1dfcd7f..9daa75320b 100644 --- a/sw/inc/ndarr.hxx +++ b/sw/inc/ndarr.hxx @@ -25,19 +25,19 @@ * ************************************************************************/ -#ifndef _NDARR_HXX -#define _NDARR_HXX +#ifndef SW_NDARR_HXX +#define SW_NDARR_HXX + +#include #include + #include +#include -#ifndef _BPARR_HXX #include -#endif #include -#include -#include class Graphic; class GraphicObject; @@ -57,6 +57,7 @@ class SwOutlineNodes; class SwPaM; class SwSection; class SwSectionFmt; +class SwTOXBase; class SwSectionNode; class SwStartNode; class SwTableBoxFmt; @@ -310,12 +311,13 @@ public: USHORT nMode = 0, SwHistory* pHistory = 0 ); // fuege eine neue SwSection ein - SwSectionNode* InsertSection( const SwNodeIndex& rNdIdx, + SwSectionNode* InsertTextSection(SwNodeIndex const& rNdIdx, SwSectionFmt& rSectionFmt, - const SwSection&, - const SwNodeIndex* pEnde, - BOOL bInsAtStart = TRUE, - BOOL bCreateFrms = TRUE ); + SwSection const&, + SwTOXBase const*const pTOXBase, + SwNodeIndex const*const pEnde, + bool const bInsAtStart = true, + bool const bCreateFrms = true); // in welchem Doc steht das Nodes-Array ? SwDoc* GetDoc() { return pMyDoc; } diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index 629145fa68..9aad9c8546 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -55,6 +55,7 @@ class SwOLENode; class SwRect; class SwSection; class SwSectionFmt; +class SwTOXBase; class SwSectionNode; class SwStartNode; class SwTabFrm; @@ -555,15 +556,12 @@ protected: virtual ~SwSectionNode(); public: - SwSectionNode( const SwNodeIndex&, SwSectionFmt& rFmt ); + SwSectionNode(SwNodeIndex const&, + SwSectionFmt & rFmt, SwTOXBase const*const pTOXBase); const SwSection& GetSection() const { return *pSection; } SwSection& GetSection() { return *pSection; } - // setze ein neues SectionObject. Erstmal nur gedacht fuer die - // neuen VerzeichnisSections. Der geht ueber in den Besitz des Nodes! - void SetNewSection( SwSection* pNewSection ); - SwFrm *MakeFrm(); //Legt die Frms fuer den SectionNode (also die SectionFrms) an. diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index c3b04e2e1b..e88be5d3c1 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -73,6 +73,7 @@ class SwFrmFmt; class SwHistoryBookmark; class SwSection; class SwSectionFmt; +class SwTOXBase; class SvxTabStopItem; class SwDDEFieldType; class Graphic; @@ -1382,6 +1383,7 @@ class SwUndoInsSection : public SwUndo, private SwUndRng { SwHistory* pHistory; SwSection* pSection; + const ::std::auto_ptr m_pTOXBase; /// set iff section is TOX SwRedlineData* pRedlData; SfxItemSet* pAttr; ULONG nSectNodePos; @@ -1392,8 +1394,8 @@ class SwUndoInsSection : public SwUndo, private SwUndRng void Join( SwDoc& rDoc, ULONG nNode ); public: - SwUndoInsSection( const SwPaM&, const SwSection&, - const SfxItemSet* pSet ); + SwUndoInsSection(SwPaM const&, SwSection const&, + SfxItemSet const*const pSet, SwTOXBase const*const pTOXBase); virtual ~SwUndoInsSection(); virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); @@ -1409,6 +1411,7 @@ class SwUndoDelSection : public SwUndo { ULONG nSttNd, nEndNd; SwSection* pSection; + ::std::auto_ptr m_pTOXBase; /// set iff section is TOX SfxItemSet* pAttr; public: SwUndoDelSection( const SwSectionFmt& ); diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index 140ef24b95..3556f95c03 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -456,11 +456,15 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, SwNodeIndex aStartIdx(*pSttNd); if (aEndIdx >= aStartIdx) - pSectNd = GetNodes().InsertSection - (aStartIdx, *pFmt, aSect, &aEndIdx, FALSE ); + { + pSectNd = GetNodes().InsertTextSection(aStartIdx, + *pFmt, aSect, 0, &aEndIdx, false); + } else - pSectNd = GetNodes().InsertSection - (aEndIdx, *pFmt, aSect, &aStartIdx, FALSE ); + { + pSectNd = GetNodes().InsertTextSection(aEndIdx, + *pFmt, aSect, 0, &aStartIdx, false); + } // <- #i26762# pSectNd->GetSection().CreateLink( CREATE_CONNECT ); @@ -799,11 +803,15 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel ) SwNodeIndex aStartIdx(*pSttNd); if (aEndIdx >= aStartIdx) - pSectNd = GetNodes().InsertSection - (aStartIdx, *pFmt, aSect, &aEndIdx, FALSE ); + { + pSectNd = GetNodes().InsertTextSection(aStartIdx, + *pFmt, aSect, 0, &aEndIdx, false); + } else - pSectNd = GetNodes().InsertSection - (aEndIdx, *pFmt, aSect, &aStartIdx, FALSE ); + { + pSectNd = GetNodes().InsertTextSection(aEndIdx, + *pFmt, aSect, 0, &aStartIdx, false); + } pSectNd->GetSection().CreateLink( CREATE_CONNECT ); } diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index e5fd392a96..5fee1c8f6a 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -366,26 +366,23 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos, { StartUndo( UNDO_INSTOX, NULL ); - SwTOXBaseSection* pNew = new SwTOXBaseSection( rTOX ); String sSectNm( rTOX.GetTOXName() ); sSectNm = GetUniqueTOXBaseName( *rTOX.GetTOXType(), &sSectNm ); - pNew->SetTOXName(sSectNm); - pNew->SwSection::SetName(sSectNm); SwPaM aPam( rPos ); - SwSection* pSect = InsertSwSection( aPam, *pNew, pSet, false ); - if( pSect ) + SwSection aSection( TOX_CONTENT_SECTION, sSectNm ); + SwTOXBaseSection *const pNewSection = dynamic_cast( + InsertSwSection( aPam, aSection, & rTOX, pSet, false )); + if (pNewSection) { - SwSectionNode* pSectNd = pSect->GetFmt()->GetSectionNode(); - SwSection* pCl = pNew; - pSect->GetFmt()->Add( pCl ); - pSectNd->SetNewSection( pNew ); + SwSectionNode *const pSectNd = pNewSection->GetFmt()->GetSectionNode(); + pNewSection->SetTOXName(sSectNm); // rTOX may have had no name... if( bExpand ) { // OD 19.03.2003 #106329# - add value for 2nd parameter = true to // indicate, that a creation of a new table of content has to be performed. // Value of 1st parameter = default value. - pNew->Update( 0, true ); + pNewSection->Update( 0, true ); } else if( 1 == rTOX.GetTitle().Len() && IsInReading() ) // insert title of TOX @@ -396,7 +393,7 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos, SwTxtNode* pHeadNd = GetNodes().MakeTxtNode( aIdx, GetTxtCollFromPool( RES_POOLCOLL_STANDARD ) ); - String sNm( pNew->GetTOXName() ); + String sNm( pNewSection->GetTOXName() ); // ??Resource sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" )); @@ -404,16 +401,14 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" )); SwNodeIndex aStt( *pHeadNd ); aIdx--; SwSectionFmt* pSectFmt = MakeSectionFmt( 0 ); - GetNodes().InsertSection( aStt, *pSectFmt, aSect, &aIdx, - TRUE, FALSE ); + GetNodes().InsertTextSection( + aStt, *pSectFmt, aSect, 0, &aIdx, true, false); } } - else - delete pNew, pNew = 0; EndUndo( UNDO_INSTOX, NULL ); - return pNew; + return pNewSection; } @@ -433,13 +428,10 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( ULONG nSttNd, ULONG nEndNd, pSectNd = pSectNd->StartOfSectionNode()->FindSectionNode(); } - // create SectionNode around the Nodes - SwTOXBaseSection* pNew = new SwTOXBaseSection( rTOX ); - String sSectNm( rTOX.GetTOXName() ); sSectNm = GetUniqueTOXBaseName(*rTOX.GetTOXType(), &sSectNm); - pNew->SetTOXName(sSectNm); - pNew->SwSection::SetName(sSectNm); + + SwSection aSection(TOX_CONTENT_SECTION, sSectNm); SwNodeIndex aStt( GetNodes(), nSttNd ), aEnd( GetNodes(), nEndNd ); SwSectionFmt* pFmt = MakeSectionFmt( 0 ); @@ -448,20 +440,18 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( ULONG nSttNd, ULONG nEndNd, // --aEnd; // im InsertSection ist Ende inclusive - pSectNd = GetNodes().InsertSection( aStt, *pFmt, *pNew, &aEnd ); - if( pSectNd ) + SwSectionNode *const pNewSectionNode = + GetNodes().InsertTextSection(aStt, *pFmt, aSection, &rTOX, &aEnd); + if (!pNewSectionNode) { - SwSection* pCl = pNew; - pFmt->Add( pCl ); - pSectNd->SetNewSection( pNew ); - } - else - { - delete pNew, pNew = 0; DelSectionFmt( pFmt ); + return 0; } - return pNew; + SwTOXBaseSection *const pNewSection( + dynamic_cast(& pNewSectionNode->GetSection())); + pNewSection->SetTOXName(sSectNm); // rTOX may have had no name... + return pNewSection; } /*-------------------------------------------------------------------- @@ -776,8 +766,9 @@ const SwTxtNode* lcl_FindChapterNode( const SwNode& rNd, BYTE nLvl = 0 ) Beschreibung: Verzeichnis-Klasse --------------------------------------------------------------------*/ -SwTOXBaseSection::SwTOXBaseSection( const SwTOXBase& rBase ) - : SwTOXBase( rBase ), SwSection( TOX_CONTENT_SECTION, aEmptyStr ) +SwTOXBaseSection::SwTOXBaseSection(SwTOXBase const& rBase, SwSectionFmt & rFmt) + : SwTOXBase( rBase ) + , SwSection( TOX_CONTENT_SECTION, aEmptyStr, & rFmt ) { SetProtect( rBase.IsProtected() ); SwSection::SetName( GetTOXName() ); @@ -966,8 +957,8 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" )); SwNodeIndex aStt( *pHeadNd ); aIdx--; SwSectionFmt* pSectFmt = pDoc->MakeSectionFmt( 0 ); - pDoc->GetNodes().InsertSection( aStt, *pSectFmt, aSect, &aIdx, - TRUE, FALSE ); + pDoc->GetNodes().InsertTextSection( + aStt, *pSectFmt, aSect, 0, &aIdx, true, false); } // jetzt waere ein prima Zeitpunkt, um die Numerierung zu updaten diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 1538b0a29c..edca80d874 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -155,8 +155,10 @@ void lcl_CheckEmptyLayFrm( SwNodes& rNds, SwSection& rSect, } } -SwSection* SwDoc::InsertSwSection( const SwPaM& rRange, const SwSection& rNew, - const SfxItemSet* pAttr, bool bUpdate ) +SwSection * +SwDoc::InsertSwSection(SwPaM const& rRange, SwSection const& rNew, + SwTOXBase const*const pTOXBase, + SfxItemSet const*const pAttr, bool const bUpdate) { const SwNode* pPrvNd = 0; USHORT nRegionRet = 0; @@ -186,7 +188,7 @@ SwSection* SwDoc::InsertSwSection( const SwPaM& rRange, const SwSection& rNew, if( DoesUndo() ) { ClearRedo(); - pUndoInsSect = new SwUndoInsSection( rRange, rNew, pAttr ); + pUndoInsSect = new SwUndoInsSection(rRange, rNew, pAttr, pTOXBase); AppendUndo( pUndoInsSect ); DoUndo( FALSE ); } @@ -216,7 +218,8 @@ SwSection* SwDoc::InsertSwSection( const SwPaM& rRange, const SwSection& rNew, aEnd++; --aEnd; // im InsertSection ist Ende inclusive - pNewSectNode = GetNodes().InsertSection( aStt, *pFmt, rNew, &aEnd ); + pNewSectNode = GetNodes().InsertTextSection( + aStt, *pFmt, rNew, pTOXBase, & aEnd); } else { @@ -287,8 +290,8 @@ SwSection* SwDoc::InsertSwSection( const SwPaM& rRange, const SwSection& rNew, pEndPos->nContent.Assign( pTNd, nCntnt ); } } - pNewSectNode = GetNodes().InsertSection( pSttPos->nNode, *pFmt, rNew, - &pEndPos->nNode ); + pNewSectNode = GetNodes().InsertTextSection( + pSttPos->nNode, *pFmt, rNew, pTOXBase, &pEndPos->nNode); } } else @@ -297,11 +300,13 @@ SwSection* SwDoc::InsertSwSection( const SwPaM& rRange, const SwSection& rNew, const SwCntntNode* pCNd = pPos->nNode.GetNode().GetCntntNode(); if( !pPos->nContent.GetIndex() ) { - pNewSectNode = GetNodes().InsertSection( pPos->nNode, *pFmt, rNew, 0, TRUE ); + pNewSectNode = GetNodes().InsertTextSection( + pPos->nNode, *pFmt, rNew, pTOXBase, 0, true); } else if( pPos->nContent.GetIndex() == pCNd->Len() ) { - pNewSectNode = GetNodes().InsertSection( pPos->nNode, *pFmt, rNew, 0, FALSE ); + pNewSectNode = GetNodes().InsertTextSection( + pPos->nNode, *pFmt, rNew, pTOXBase, 0, false); } else { @@ -310,7 +315,8 @@ SwSection* SwDoc::InsertSwSection( const SwPaM& rRange, const SwSection& rNew, pUndoInsSect->SaveSplitNode( (SwTxtNode*)pCNd, TRUE ); } SplitNode( *pPos, false ); - pNewSectNode = GetNodes().InsertSection( pPos->nNode, *pFmt, rNew, 0, TRUE ); + pNewSectNode = GetNodes().InsertTextSection( + pPos->nNode, *pFmt, rNew, pTOXBase, 0, true); } } @@ -806,11 +812,12 @@ inline BOOL lcl_IsTOXSection( const SwSection& rSection ) TOX_HEADER_SECTION == rSection.GetType(); } -SwSectionNode* SwNodes::InsertSection( const SwNodeIndex& rNdIdx, +SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx, SwSectionFmt& rSectionFmt, const SwSection& rSection, - const SwNodeIndex* pEnde, - BOOL bInsAtStart, BOOL bCreateFrms ) + SwTOXBase const*const pTOXBase, + SwNodeIndex const*const pEnde, + bool const bInsAtStart, bool const bCreateFrms) { SwNodeIndex aInsPos( rNdIdx ); if( !pEnde ) // kein Bereich also neue Section davor/hinter anlegen @@ -841,7 +848,8 @@ SwSectionNode* SwNodes::InsertSection( const SwNodeIndex& rNdIdx, } } - SwSectionNode* pSectNd = new SwSectionNode( aInsPos, rSectionFmt ); + SwSectionNode *const pSectNd = + new SwSectionNode(aInsPos, rSectionFmt, pTOXBase); if( pEnde ) { // Sonderfall fuer die Reader/Writer @@ -998,7 +1006,8 @@ SwSectionNode* SwNode::FindSectionNode() // SwSectionNode //--------- -SwSectionNode::SwSectionNode( const SwNodeIndex& rIdx, SwSectionFmt& rFmt ) +SwSectionNode::SwSectionNode(SwNodeIndex const& rIdx, + SwSectionFmt & rFmt, SwTOXBase const*const pTOXBase) : SwStartNode( rIdx, ND_SECTIONNODE ) { SwSectionNode* pParent = StartOfSectionNode()->FindSectionNode(); @@ -1007,7 +1016,9 @@ SwSectionNode::SwSectionNode( const SwNodeIndex& rIdx, SwSectionFmt& rFmt ) // das Format beim richtigen Parent anmelden. rFmt.SetDerivedFrom( pParent->GetSection().GetFmt() ); } - pSection = new SwSection( CONTENT_SECTION, rFmt.GetName(), &rFmt ); + pSection = (pTOXBase) + ? new SwTOXBaseSection(*pTOXBase, rFmt) + : new SwSection( CONTENT_SECTION, rFmt.GetName(), & rFmt ); // jetzt noch die Verbindung von Format zum Node setzen // Modify unterdruecken, interresiert keinen @@ -1083,32 +1094,6 @@ SwSectionNode::~SwSectionNode() pDoc->DoUndo( bUndo ); } -// setze ein neues SectionObject. Erstmal nur gedacht fuer die -// neuen VerzeichnisSections. Der geht ueber in den Besitz des Nodes! -void SwSectionNode::SetNewSection( SwSection* pNewSection ) -{ - ASSERT( pNewSection, "ohne Pointer geht hier nichts" ); - if( pNewSection ) - { - SwNode2Layout aN2L( *this ); - - // einige Flags sollten ueber nommen werden! - pNewSection->bProtectFlag = pSection->bProtectFlag; - pNewSection->bHiddenFlag = pSection->bHiddenFlag; - pNewSection->bHidden = pSection->bHidden; - pNewSection->bCondHiddenFlag = pSection->bCondHiddenFlag; - - // The section frame contains a pointer to the section. That for, - // the frame must be destroyed before deleting the section. - DelFrms(); - - delete pSection; - pSection = pNewSection; - - ULONG nIdx = GetIndex(); - aN2L.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 ); - } -} SwFrm *SwSectionNode::MakeFrm() { @@ -1299,37 +1284,31 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c SwSectionFmt* pSectFmt = pDoc->MakeSectionFmt( 0 ); pSectFmt->CopyAttrs( *GetSection().GetFmt() ); - SwSectionNode* pSectNd = new SwSectionNode( rIdx, *pSectFmt ); + ::std::auto_ptr pTOXBase; + if (TOX_CONTENT_SECTION == GetSection().GetType()) + { + ASSERT( GetSection().ISA( SwTOXBaseSection ), "no TOXBaseSection!" ); + SwTOXBaseSection const& rTBS( + dynamic_cast(GetSection())); + pTOXBase.reset( new SwTOXBase(rTBS, pDoc) ); + } + + SwSectionNode *const pSectNd = + new SwSectionNode(rIdx, *pSectFmt, pTOXBase.get()); SwEndNode* pEndNd = new SwEndNode( rIdx, *pSectNd ); SwNodeIndex aInsPos( *pEndNd ); // Werte uebertragen SwSection* pNewSect = pSectNd->pSection; - switch( GetSection().GetType() ) + if (TOX_CONTENT_SECTION != GetSection().GetType()) { - case TOX_CONTENT_SECTION: - { - ASSERT( GetSection().ISA( SwTOXBaseSection ), "keine TOXBaseSection!" ); - SwTOXBaseSection& rTOXSect = (SwTOXBaseSection&)GetSection(); - SwTOXBase aTmp( rTOXSect, pDoc ); - - SwTOXBaseSection* pNew = new SwTOXBaseSection( aTmp ); - - pNewSect = pNew; - pSectFmt->Add( pNewSect ); - pSectNd->SetNewSection( pNew ); - } - break; - - default: // beim Move den Namen beibehalten if( rNds.GetDoc() == pDoc && pDoc->IsCopyIsMove() ) pNewSect->SetName( GetSection().GetName() ); else pNewSect->SetName( pDoc->GetUniqueSectionName( &GetSection().GetName() ) ); - break; } diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index d0886cd145..abdf6b9e96 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -53,8 +53,8 @@ const SwSection* SwEditShell::InsertSection( const SwSection& rNew, GetDoc()->StartUndo( UNDO_INSSECTION, NULL ); FOREACHPAM_START(this) - const SwSection* const pNew = - GetDoc()->InsertSwSection( *PCURCRSR, rNew, pAttr ); + SwSection const*const pNew = + GetDoc()->InsertSwSection( *PCURCRSR, rNew, 0, pAttr ); if( !pRet ) pRet = pNew; FOREACHPAM_END() diff --git a/sw/source/core/inc/doctxm.hxx b/sw/source/core/inc/doctxm.hxx index 1f5dde7381..99b61b9930 100644 --- a/sw/source/core/inc/doctxm.hxx +++ b/sw/source/core/inc/doctxm.hxx @@ -96,7 +96,7 @@ class SwTOXBaseSection : public SwTOXBase, public SwSection SwTxtFmtColl* GetTxtFmtColl( USHORT nLevel ); public: - SwTOXBaseSection( const SwTOXBase& rBase ); + SwTOXBaseSection(SwTOXBase const& rBase, SwSectionFmt & rFmt); virtual ~SwTOXBaseSection(); // OD 19.03.2003 #106329# - add parameter <_bNewTOX> in order to distinguish diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx index f43180178e..c26538e439 100644 --- a/sw/source/core/undo/unsect.cxx +++ b/sw/source/core/undo/unsect.cxx @@ -74,18 +74,15 @@ SfxItemSet* lcl_GetAttrSet( const SwSection& rSect ) return pAttr; } -SwUndoInsSection::SwUndoInsSection( const SwPaM& rPam, const SwSection& rNew, - const SfxItemSet* pSet ) - : SwUndo( UNDO_INSSECTION ), SwUndRng( rPam ), - pHistory( 0 ), pRedlData( 0 ), pAttr( 0 ), nSectNodePos( 0 ) +SwUndoInsSection::SwUndoInsSection( + SwPaM const& rPam, SwSection const& rNew, + SfxItemSet const*const pSet, SwTOXBase const*const pTOXBase) + : SwUndo( UNDO_INSSECTION ), SwUndRng( rPam ) + , pHistory( 0 ) + , pSection(new SwSection(rNew.GetType(), rNew.GetName())) + , m_pTOXBase(pTOXBase ? new SwTOXBase(*pTOXBase) : 0) + , pRedlData( 0 ), pAttr( 0 ), nSectNodePos( 0 ) { - if( rNew.ISA( SwTOXBaseSection )) - { - const SwTOXBase& rBase = (SwTOXBaseSection&)rNew; - pSection = new SwTOXBaseSection( rBase ); - } - else - pSection = new SwSection( rNew.GetType(), rNew.GetName() ); *pSection = rNew; SwDoc& rDoc = *(SwDoc*)rPam.GetDoc(); @@ -182,15 +179,15 @@ void SwUndoInsSection::Redo( SwUndoIter& rUndoIter ) SetPaM( rUndoIter ); const SwTOXBaseSection* pUpdateTOX = 0; - if( pSection->ISA( SwTOXBaseSection )) + if (m_pTOXBase.get()) { - const SwTOXBase& rBase = *(SwTOXBaseSection*)pSection; pUpdateTOX = rDoc.InsertTableOf( *rUndoIter.pAktPam->GetPoint(), - rBase, pAttr, TRUE ); + *m_pTOXBase, pAttr, TRUE ); } else { - rDoc.InsertSwSection( *rUndoIter.pAktPam, *pSection, pAttr, true ); + rDoc.InsertSwSection(*rUndoIter.pAktPam, + *pSection, 0, pAttr, true); } if( pHistory ) @@ -228,16 +225,15 @@ void SwUndoInsSection::Redo( SwUndoIter& rUndoIter ) void SwUndoInsSection::Repeat( SwUndoIter& rUndoIter ) { - if( pSection->ISA( SwTOXBaseSection )) + if (m_pTOXBase.get()) { - const SwTOXBase& rBase = *(SwTOXBaseSection*)pSection; rUndoIter.GetDoc().InsertTableOf( *rUndoIter.pAktPam->GetPoint(), - rBase, pAttr, TRUE ); + *m_pTOXBase, pAttr, TRUE ); } else { rUndoIter.GetDoc().InsertSwSection( *rUndoIter.pAktPam, - *pSection, pAttr ); + *pSection, 0, pAttr); } } @@ -287,11 +283,10 @@ SwUndoDelSection::SwUndoDelSection( const SwSectionFmt& rFmt ) const SwSection& rSect = *rFmt.GetSection(); if( rSect.ISA( SwTOXBaseSection )) { - const SwTOXBase& rBase = (SwTOXBaseSection&)rSect; - pSection = new SwTOXBaseSection( rBase ); + m_pTOXBase.reset( + new SwTOXBase(static_cast(rSect)) ); } - else - pSection = new SwSection( rSect.GetType(), rSect.GetName() ); + pSection = new SwSection( rSect.GetType(), rSect.GetName() ); *pSection = rSect; pAttr = ::lcl_GetAttrSet( rSect ); @@ -313,10 +308,9 @@ void SwUndoDelSection::Undo( SwUndoIter& rUndoIter ) { SwDoc& rDoc = rUndoIter.GetDoc(); - if( pSection->ISA( SwTOXBaseSection )) + if (m_pTOXBase.get()) { - const SwTOXBase& rBase = *(SwTOXBaseSection*)pSection; - rDoc.InsertTableOf( nSttNd, nEndNd-2, rBase, pAttr ); + rDoc.InsertTableOf( nSttNd, nEndNd-2, *m_pTOXBase, pAttr ); } else { @@ -328,8 +322,8 @@ void SwUndoDelSection::Undo( SwUndoIter& rUndoIter ) /// OD 04.10.2002 #102894# /// remember inserted section node for further calculations - SwSectionNode* pInsertedSectNd = - rDoc.GetNodes().InsertSection( aStt, *pFmt, *pSection, &aEnd ); + SwSectionNode* pInsertedSectNd = rDoc.GetNodes().InsertTextSection( + aStt, *pFmt, *pSection, 0, & aEnd); if( SFX_ITEM_SET == pFmt->GetItemState( RES_FTN_AT_TXTEND ) || SFX_ITEM_SET == pFmt->GetItemState( RES_END_AT_TXTEND )) diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 8e10a4ff39..a43f9df1ef 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -431,7 +431,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) } SwSection *const pRet = - pDoc->InsertSwSection( aPam, aSect, aSet.Count() ? &aSet : 0 ); + pDoc->InsertSwSection( aPam, aSect, 0, aSet.Count() ? &aSet : 0 ); pRet->GetFmt()->Add(m_pImpl.get()); pRet->GetFmt()->SetXObject(static_cast< ::cppu::OWeakObject*>(this)); diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index 1ed47d60c9..4283214196 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -348,7 +348,7 @@ void SwHTMLParser::NewDivision( int nToken ) aItemSet.ClearItem( RES_FRAMEDIR ); } - pDoc->InsertSwSection( *pPam, aSection, &aFrmItemSet, false ); + pDoc->InsertSwSection( *pPam, aSection, 0, &aFrmItemSet, false ); // ggfs. einen Bereich anspringen if( JUMPTO_REGION == eJumpTo && aName == sJmpMark ) @@ -743,7 +743,7 @@ void SwHTMLParser::NewMultiCol() aFrmItemSet.Put( *pItem ); aItemSet.ClearItem( RES_FRAMEDIR ); } - pDoc->InsertSwSection( *pPam, aSection, &aFrmItemSet, false ); + pDoc->InsertSwSection( *pPam, aSection, 0, &aFrmItemSet, false ); // Jump to section, if this is requested. if( JUMPTO_REGION == eJumpTo && aName == sJmpMark ) diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index 5e4fb1b34c..666e23e856 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -838,7 +838,7 @@ SwSectionFmt *rtfSections::InsertSection(SwPaM& rMyPaM, rtfSection &rSection) nRTLPgn ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR)); rSection.mpSection = - mrReader.pDoc->InsertSwSection( rMyPaM, aSection, &aSet ); + mrReader.pDoc->InsertSwSection( rMyPaM, aSection, 0, &aSet ); ASSERT(rSection.mpSection, "section not inserted!"); if (!rSection.mpSection) return 0; diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx index b1695e6876..dca485df25 100644 --- a/sw/source/filter/ww1/fltshell.cxx +++ b/sw/source/filter/ww1/fltshell.cxx @@ -972,7 +972,8 @@ SwFltShell::~SwFltShell() SwNodeIndex aSttIdx( *pSttNd, 1L ); // +1 -> hinter StartNode // Section einfuegen // Section einfuegen - rDoc.GetNodes().InsertSection( aSttIdx, *pSFmt, aS, &aEndIdx, FALSE ); + rDoc.GetNodes().InsertTextSection( + aSttIdx, *pSFmt, aS, 0, &aEndIdx, false ); if( !IsFlagSet(SwFltControlStack::DONT_HARD_PROTECT) ){ SwDocShell* pDocSh = rDoc.GetDocShell(); diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index dff1e6ad2f..2d75a7a4e7 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -2275,7 +2275,8 @@ eF_ResT SwWW8ImplReader::Read_F_IncludeText( WW8FieldDesc* /*pF*/, String& rStr aSection.SetLinkFileName( aPara ); aSection.SetProtect(true); - SwSection*const pSection = rDoc.InsertSwSection(*pPaM, aSection, 0, false); + SwSection *const pSection = + rDoc.InsertSwSection(*pPaM, aSection, 0, 0, false); ASSERT(pSection, "no section inserted"); if (!pSection) return FLD_TEXT; diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 6f4e4edd03..f6f776dcae 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -688,7 +688,7 @@ SwSectionFmt *wwSectionManager::InsertSection( aSection.SetProtect(SectionIsProtected(rSection)); rSection.mpSection = - mrReader.rDoc.InsertSwSection( rMyPaM, aSection, &aSet ); + mrReader.rDoc.InsertSwSection( rMyPaM, aSection, 0, & aSet ); ASSERT(rSection.mpSection, "section not inserted!"); if (!rSection.mpSection) return 0; @@ -841,7 +841,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/) aSection.SetProtect(true); // --> CMC, OD 2004-06-18 #i19922# improvement: // return value of method not used. - mrReader.rDoc.InsertSwSection(*mrReader.pPaM, aSection, 0, false); + mrReader.rDoc.InsertSwSection(*mrReader.pPaM, aSection, 0, 0, false); } wwSection aLastSection(*mrReader.pPaM->GetPoint()); -- cgit v1.2.3 From a579fc6472b181d53abde2c756aa7d0e2a259033 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:30 +0100 Subject: odfmetadata4: #i109599#: remove SwSection::operator=(): move most SwSection members to new class SwSectionData. replace evil SwSection::operator=() with SwSection::SetSectionData(). various method signatures changed to take SwSectionData parameter. rename SwDoc::ChgSection() to UpdateSection(). SwUnodo{Ins,Chg,Del}Section: adapt to store SwSectionData/SwTOXBase. regionsw.hxx: SectRepr: change SwSection member to SwSectionData. --- sw/inc/doc.hxx | 6 +- sw/inc/editsh.hxx | 11 +- sw/inc/ndarr.hxx | 4 +- sw/inc/section.hxx | 201 +++++++++++------- sw/inc/swabstdlg.hxx | 4 +- sw/inc/undobj.hxx | 10 +- sw/source/core/doc/doc.cxx | 9 +- sw/source/core/doc/docglbl.cxx | 20 +- sw/source/core/doc/doctxm.cxx | 18 +- sw/source/core/docnode/ndsect.cxx | 97 +++++---- sw/source/core/docnode/node2lay.cxx | 4 +- sw/source/core/docnode/section.cxx | 398 +++++++++++++++++++++++------------- sw/source/core/edit/edglbldc.cxx | 2 +- sw/source/core/edit/edsect.cxx | 14 +- sw/source/core/edit/edtox.cxx | 7 +- sw/source/core/undo/unsect.cxx | 44 ++-- sw/source/core/unocore/unoidx.cxx | 6 +- sw/source/core/unocore/unosect.cxx | 94 ++++----- sw/source/filter/html/htmlsect.cxx | 22 +- sw/source/filter/inc/fltshell.hxx | 7 +- sw/source/filter/rtf/swparrtf.cxx | 5 +- sw/source/filter/ww1/fltshell.cxx | 24 ++- sw/source/filter/ww1/w1filter.cxx | 4 +- sw/source/filter/ww8/ww8par5.cxx | 5 +- sw/source/filter/ww8/ww8par6.cxx | 9 +- sw/source/ui/app/applab.cxx | 9 +- sw/source/ui/dialog/regionsw.cxx | 14 +- sw/source/ui/dialog/swdlgfact.cxx | 5 +- sw/source/ui/dialog/swdlgfact.hxx | 2 +- sw/source/ui/dialog/uiregionsw.cxx | 143 +++++++------ sw/source/ui/dochdl/swdtflvr.cxx | 9 +- sw/source/ui/frmdlg/column.cxx | 3 +- sw/source/ui/inc/regionsw.hxx | 60 +++--- sw/source/ui/inc/wrtsh.hxx | 4 +- sw/source/ui/uiview/viewtab.cxx | 7 +- sw/source/ui/utlui/glbltree.cxx | 26 +-- sw/source/ui/wrtsh/wrtsh2.cxx | 10 +- 37 files changed, 749 insertions(+), 568 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index c800e07889..4725aa0424 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -164,6 +164,7 @@ class SwRubyList; class SwRubyListEntry; class SwSectionFmt; class SwSectionFmts; +class SwSectionData; class SwSelBoxes; class SwSpzFrmFmts; class SwTOXBase; @@ -1803,7 +1804,7 @@ public: inline const Link& GetOle2Link() const {return aOle2Link;} // insert section (the ODF kind of section, not the nodesarray kind) - SwSection * InsertSwSection(SwPaM const& rRange, SwSection const&, + SwSection * InsertSwSection(SwPaM const& rRange, SwSectionData &, SwTOXBase const*const pTOXBase = 0, SfxItemSet const*const pAttr = 0, bool const bUpdate = true); sal_uInt16 IsInsRegionAvailable( const SwPaM& rRange, @@ -1813,7 +1814,8 @@ public: const SwSectionFmts& GetSections() const { return *pSectionFmtTbl; } SwSectionFmt *MakeSectionFmt( SwSectionFmt *pDerivedFrom ); void DelSectionFmt( SwSectionFmt *pFmt, sal_Bool bDelNodes = sal_False ); - void ChgSection( sal_uInt16 nSect, const SwSection&, const SfxItemSet* = 0, sal_Bool bPreventLinkUpdate = FALSE); + void UpdateSection(sal_uInt16 const nSect, SwSectionData &, + SfxItemSet const*const = 0, bool const bPreventLinkUpdate = false); String GetUniqueSectionName( const String* pChkStr = 0 ) const; /* @@@MAINTAINABILITY-HORROR@@@ diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 426ff364fd..c027ffb1ba 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -88,6 +88,7 @@ class SwTable; class SwTextBlocks; // fuer GlossaryRW class SwFmtFtn; class SwSection; +class SwSectionData; class SwSectionFmt; class SwTOXMarks; class SwTOXBase; @@ -805,9 +806,8 @@ public: // gebe Liste aller Fussnoten und deren Anfangstexte USHORT GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes = false ); - // SS fuer Bereiche - const SwSection* InsertSection( const SwSection& rNew, - const SfxItemSet* = 0 ); + SwSection const* InsertSection( + SwSectionData & rNewData, SfxItemSet const*const = 0 ); BOOL IsInsRegionAvailable() const; const SwSection* GetCurrSection() const; // liefert wie GetCurrSection() den aktuellen Bereich, allerdings geht diese Funktion @@ -821,7 +821,8 @@ public: USHORT GetSectionFmtPos( const SwSectionFmt& ) const; const SwSectionFmt& GetSectionFmt(USHORT nFmt) const; void DelSectionFmt( USHORT nFmt ); - void ChgSection( USHORT nSect, const SwSection&, const SfxItemSet* = 0 ); + void UpdateSection(sal_uInt16 const nSect, SwSectionData &, + SfxItemSet const*const = 0); BOOL IsAnySectionInDoc( BOOL bChkReadOnly = FALSE, BOOL bChkHidden = FALSE, BOOL BChkTOX = FALSE ) const; @@ -867,7 +868,7 @@ public: BOOL IsGlblDocSaveLinks() const; USHORT GetGlobalDocContent( SwGlblDocContents& rArr ) const; BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos, - const SwSection& rNew ); + SwSectionData & rNew ); BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos, const SwTOXBase& rTOX ); BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos ); diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx index 9daa75320b..d7d384a244 100644 --- a/sw/inc/ndarr.hxx +++ b/sw/inc/ndarr.hxx @@ -55,7 +55,7 @@ class SwNodeRange; class SwOLENode; class SwOutlineNodes; class SwPaM; -class SwSection; +class SwSectionData; class SwSectionFmt; class SwTOXBase; class SwSectionNode; @@ -313,7 +313,7 @@ public: // fuege eine neue SwSection ein SwSectionNode* InsertTextSection(SwNodeIndex const& rNdIdx, SwSectionFmt& rSectionFmt, - SwSection const&, + SwSectionData const&, SwTOXBase const*const pTOXBase, SwNodeIndex const*const pEnde, bool const bInsAtStart = true, diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index 6d0622228b..849e79bcf8 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -28,14 +28,15 @@ #ifndef _SECTION_HXX #define _SECTION_HXX +#include #include + #include #include -#ifndef _TOOLS_REF_HXX #include -#endif #include + #include @@ -77,61 +78,119 @@ enum LinkCreateType CREATE_UPDATE // Link connecten und updaten }; +class SW_DLLPUBLIC SwSectionData +{ +private: + SectionType m_eType; + + String m_sSectionName; + String m_sCondition; + String m_sLinkFileName; + String m_sLinkFilePassword; // JP 27.02.2001: must be changed to Sequence + ::com::sun::star::uno::Sequence m_Password; + + /// it seems this flag caches the current final "hidden" state + bool m_bHiddenFlag : 1; + /// flags that correspond to attributes in the format: + /// may have different value than format attribute: + /// format attr has value for this section, while flag is + /// effectively ORed with parent sections! + bool m_bProtectFlag : 1; + // --> FME 2004-06-22 #114856# edit in readonly sections + bool m_bEditInReadonlyFlag : 1; + // <-- + bool m_bHidden : 1; // all paragraphs hidden? + bool m_bCondHiddenFlag : 1; // Hiddenflag for condition + bool m_bConnectFlag : 1; // connected to server? + +public: + + SwSectionData(SectionType const eType, String const& rName); + explicit SwSectionData(SwSection const&); + SwSectionData(SwSectionData const&); + SwSectionData & operator=(SwSectionData const&); + bool operator==(SwSectionData const&) const; + + String const& GetSectionName() const { return m_sSectionName; } + void SetSectionName(String const& rName){ m_sSectionName = rName; } + SectionType GetType() const { return m_eType; } + void SetType(SectionType const eNew) { m_eType = eNew; } + + bool IsHidden() const { return m_bHidden; } + void SetHidden(bool const bFlag = true) { m_bHidden = bFlag; } + + bool IsHiddenFlag() const { return m_bHiddenFlag; } + SW_DLLPRIVATE void + SetHiddenFlag(bool const bFlag) { m_bHiddenFlag = bFlag; } + bool IsProtectFlag() const { return m_bProtectFlag; } + SW_DLLPRIVATE void + SetProtectFlag(bool const bFlag) { m_bProtectFlag = bFlag; } + // --> FME 2004-06-22 #114856# edit in readonly sections + bool IsEditInReadonlyFlag() const { return m_bEditInReadonlyFlag; } + void SetEditInReadonlyFlag(bool const bFlag) + { m_bEditInReadonlyFlag = bFlag; } + // <-- + + void SetCondHidden(bool const bFlag = true) { m_bCondHiddenFlag = bFlag; }; + bool IsCondHidden() const { return m_bCondHiddenFlag; } + + String const& GetCondition() const { return m_sCondition; } + void SetCondition(String const& rNew) { m_sCondition = rNew; } + + String const& GetLinkFileName() const { return m_sLinkFileName; }; + void SetLinkFileName(String const& rNew, String const* pPassWd = 0) + { + m_sLinkFileName = rNew; + if (pPassWd) { SetLinkFilePassword(*pPassWd); } + } + + String const& GetLinkFilePassword() const { return m_sLinkFilePassword; } + void SetLinkFilePassword(String const& rS) { m_sLinkFilePassword = rS; } + + ::com::sun::star::uno::Sequence const& GetPassword() const + { return m_Password; } + void SetPassword(::com::sun::star::uno::Sequence const& rNew) + { m_Password = rNew; } + bool IsLinkType() const + { return (DDE_LINK_SECTION == m_eType) || (FILE_LINK_SECTION == m_eType); } -class SW_DLLPUBLIC SwSection : public SwClient + bool IsConnectFlag() const { return m_bConnectFlag; } + void SetConnectFlag(bool const bFlag = true){ m_bConnectFlag = bFlag; } +}; + +class SW_DLLPUBLIC SwSection + : public SwClient + , private ::boost::noncopyable { // damit beim Anlegen/Loeschen von Frames das Flag richtig gepflegt wird! friend class SwSectionNode; // the "read CTOR" of SwSectionFrm have to change the Hiddenflag friend class SwSectionFrm; - String sSectionNm; - String sCondition; // erstmal, vielleicht auch mal ein Feld ?? - String sLinkFileName, - sLinkFilePassWd; // JP 27.02.2001: must later changed to Sequence - ::com::sun::star::uno::Sequence aPasswd; +private: + SwSectionData m_Data; SwServerObjectRef refObj; // falls DataServer -> Pointer gesetzt ::sfx2::SvBaseLinkRef refLink; - SectionType eType; - - BOOL bProtectFlag : 1; // Flags fuer schnelle Abfragen, wird ueber - // Attribut im Format gesetzt - BOOL bHiddenFlag : 1; // Flag: Absaetze versteckt ? - // --> FME 2004-06-22 #114856# edit in readonly sections - BOOL bEditInReadonlyFlag : 1; - // <-- - BOOL bHidden : 1; // alle Absaetze nicht sichtbar ? - BOOL bCondHiddenFlag : 1; // Hiddenflag fuer die Bedingung ? - BOOL bConnectFlag : 1; // Flag: "Verbindung zum Server" vorhanden? - - - SW_DLLPRIVATE void _SetHiddenFlag( BOOL bHidden, BOOL bCondition ); - SW_DLLPRIVATE void _SetProtectFlag( BOOL bFlag ) { bProtectFlag = bFlag; } - /* SW_DLLPUBLIC */ BOOL _IsProtect() const; - - // --> FME 2004-06-22 #114856# edit in readonly sections - void _SetEditInReadonlyFlag( BOOL bFlag ) { bEditInReadonlyFlag = bFlag; } - BOOL _IsEditInReadonly() const; - // <-- + SW_DLLPRIVATE void ImplSetHiddenFlag( + bool const bHidden, bool const bCondition); public: TYPEINFO(); // rtti - SwSection( SectionType eType, const String& rName, - SwSectionFmt* pFmt = 0 ); - ~SwSection(); + SwSection(SectionType const eType, String const& rName, + SwSectionFmt & rFormat); + virtual ~SwSection(); + + bool DataEquals(SwSectionData const& rCmp) const; - // kopiere nur die Daten der Section! - // Ableitung bleibt (beim Left) erhalten. - SwSection& operator=( const SwSection& ); - BOOL operator==( const SwSection& rCmp ) const; + void SetSectionData(SwSectionData const& rData); - const String& GetName() const { return sSectionNm; } - void SetName( const String& rName ) { sSectionNm = rName; } - SectionType GetType() const { return eType; } - void SetType( SectionType eNew ) { eType = eNew; } + String const& GetName() const { return m_Data.GetSectionName(); } + void SetName(String const& rName) { m_Data.SetSectionName(rName); } + SectionType GetType() const { return m_Data.GetType(); } + void SetType(SectionType const eType) { return m_Data.SetType(eType); } SwSectionFmt* GetFmt() { return (SwSectionFmt*)pRegisteredIn; } SwSectionFmt* GetFmt() const { return (SwSectionFmt*)pRegisteredIn; } @@ -140,50 +199,47 @@ public: // setze die Hidden/Protected -> gesamten Baum updaten ! // (Attribute/Flags werden gesetzt/erfragt) - BOOL IsHidden() const { return bHidden; } - BOOL IsProtect() const { return GetFmt() ? _IsProtect() - : IsProtectFlag(); } - + bool IsHidden() const { return m_Data.IsHidden(); } + void SetHidden (bool const bFlag = true); + bool IsProtect() const; + void SetProtect(bool const bFlag = true); // --> FME 2004-06-22 #114856# edit in readonly sections - BOOL IsEditInReadonly()const { return GetFmt() ? _IsEditInReadonly() : IsEditInReadonlyFlag(); } - void SetEditInReadonly( BOOL bFlag = TRUE ); + bool IsEditInReadonly() const; + void SetEditInReadonly(bool const bFlag = true); // <-- - void SetHidden( BOOL bFlag = TRUE ); - void SetProtect( BOOL bFlag = TRUE ); - // erfrage die internen Flags (Zustand inklusive Parents nicht, was // aktuell an der Section gesetzt ist!!) - BOOL IsHiddenFlag() const { return bHiddenFlag; } - BOOL IsProtectFlag() const { return bProtectFlag; } + bool IsHiddenFlag() const { return m_Data.IsHiddenFlag(); } + bool IsProtectFlag() const { return m_Data.IsProtectFlag(); } // --> FME 2004-06-22 #114856# edit in readonly sections - BOOL IsEditInReadonlyFlag() const { return bEditInReadonlyFlag; } + bool IsEditInReadonlyFlag() const { return m_Data.IsEditInReadonlyFlag(); } // <-- - void SetCondHidden( BOOL bFlag = TRUE ); - BOOL IsCondHidden() const { return bCondHiddenFlag; } + void SetCondHidden(bool const bFlag = true); + bool IsCondHidden() const { return m_Data.IsCondHidden(); } // erfrage (auch ueber die Parents), ob diese Section versteckt sein soll. BOOL CalcHiddenFlag() const; inline SwSection* GetParent() const; - // setze/erfrage die Bedingung - const String& GetCondition() const { return sCondition; } - void SetCondition( const String& rNew ) { sCondition = rNew; } + String const& GetCondition() const { return m_Data.GetCondition(); } + void SetCondition(String const& rNew) { m_Data.SetCondition(rNew); } - // setze/erfrage den gelinkten FileNamen const String& GetLinkFileName() const; - void SetLinkFileName( const String& rNew, const String* pPassWd = 0 ); - // Passwort des gelinkten Files (nur waehrend der Laufzeit gueltig!) - const String& GetLinkFilePassWd() const { return sLinkFilePassWd; } - void SetLinkFilePassWd( const String& rS ) { sLinkFilePassWd = rS; } + void SetLinkFileName(String const& rNew, String const*const pPassWd = 0); + // password of linked file (only valid during runtime!) + String const& GetLinkFilePassword() const + { return m_Data.GetLinkFilePassword(); } + void SetLinkFilePassword(String const& rS) + { m_Data.SetLinkFilePassword(rS); } // get / set password of this section - const ::com::sun::star::uno::Sequence & - GetPasswd() const { return aPasswd; } - void SetPasswd( const ::com::sun::star::uno::Sequence & rNew ) - { aPasswd = rNew; } + ::com::sun::star::uno::Sequence const& GetPassword() const + { return m_Data.GetPassword(); } + void SetPassword(::com::sun::star::uno::Sequence const& rNew) + { m_Data.SetPassword(rNew); } // Daten Server-Methoden void SetRefObject( SwServerObject* pObj ); @@ -206,12 +262,12 @@ public: void MakeChildLinksVisible( const SwSectionNode& rSectNd ); - BOOL IsLinkType() const - { return DDE_LINK_SECTION == eType || FILE_LINK_SECTION == eType; } + bool IsLinkType() const { return m_Data.IsLinkType(); } // Flags fuer UI - Verbindung geklappt? - BOOL IsConnectFlag() const { return bConnectFlag; } - void SetConnectFlag( BOOL bFlag = TRUE ) { bConnectFlag = bFlag; } + bool IsConnectFlag() const { return m_Data.IsConnectFlag(); } + void SetConnectFlag(bool const bFlag = true) + { m_Data.SetConnectFlag(bFlag); } // return the TOX base class if the section is a TOX section const SwTOXBase* GetTOXBase() const; @@ -219,10 +275,7 @@ public: // --> OD 2007-02-14 #b6521322# void BreakLink(); // <-- -private: - // privater Constructor, weil nie kopiert werden darf !! - SwSection( const SwSection& ); - // @@@ but copy assignment "SwSection & operator= ( const SwSection& )" is public? @@@ + }; diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 0cd441e5d2..1c2198981a 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -73,7 +73,7 @@ class SwForm; struct CurTOXType; class SwTOXDescription; class SwTOXBase; -class SwSection; +class SwSectionData; struct SwDBData; class SwField; class Printer; @@ -194,7 +194,7 @@ public: class AbstractInsertSectionTabDialog : public VclAbstractDialog //add for SwInsertSectionTabDialog { public: - virtual void SetSection(const SwSection& rSect) = 0; + virtual void SetSectionData(SwSectionData const& rSect) = 0; }; class AbstractSwWordCountDialog : public VclAbstractDialog diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index e88be5d3c1..8216b32396 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -71,7 +71,7 @@ class SwTableBox; struct SwSortOptions; class SwFrmFmt; class SwHistoryBookmark; -class SwSection; +class SwSectionData; class SwSectionFmt; class SwTOXBase; class SvxTabStopItem; @@ -1382,7 +1382,7 @@ public: class SwUndoInsSection : public SwUndo, private SwUndRng { SwHistory* pHistory; - SwSection* pSection; + const ::std::auto_ptr m_pSectionData; const ::std::auto_ptr m_pTOXBase; /// set iff section is TOX SwRedlineData* pRedlData; SfxItemSet* pAttr; @@ -1394,7 +1394,7 @@ class SwUndoInsSection : public SwUndo, private SwUndRng void Join( SwDoc& rDoc, ULONG nNode ); public: - SwUndoInsSection(SwPaM const&, SwSection const&, + SwUndoInsSection(SwPaM const&, SwSectionData const&, SfxItemSet const*const pSet, SwTOXBase const*const pTOXBase); virtual ~SwUndoInsSection(); virtual void Undo( SwUndoIter& ); @@ -1410,7 +1410,7 @@ public: class SwUndoDelSection : public SwUndo { ULONG nSttNd, nEndNd; - SwSection* pSection; + ::std::auto_ptr m_pSectionData; /// set iff section not TOX ::std::auto_ptr m_pTOXBase; /// set iff section is TOX SfxItemSet* pAttr; public: @@ -1424,7 +1424,7 @@ public: class SwUndoChgSection : public SwUndo { ULONG nSttNd; - SwSection* pSection; + ::std::auto_ptr m_pSectionData; SfxItemSet* pAttr; BOOL bOnlyAttrChgd; public: diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 8d55a5766c..dedb46c08e 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -2283,11 +2283,10 @@ BOOL SwDoc::RemoveInvisibleContent() } if( pSect->GetCondition().Len() ) { - SwSection aSect( pSect->GetType(), pSect->GetName() ); - aSect = *pSect; - aSect.SetCondition( aEmptyStr ); - aSect.SetHidden( FALSE ); - ChgSection( n, aSect ); + SwSectionData aSectionData( *pSect ); + aSectionData.SetCondition( aEmptyStr ); + aSectionData.SetHidden( false ); + UpdateSection( n, aSectionData ); } } diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index 3556f95c03..008751a003 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -400,11 +400,11 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, default: { String sNm( INetURLObject( sFileName ).GetName() ); - SwSection aSect( FILE_LINK_SECTION, + SwSectionData aSectData( FILE_LINK_SECTION, GetUniqueSectionName( &sNm )); SwSectionFmt* pFmt = MakeSectionFmt( 0 ); - aSect.SetLinkFileName(sFileName ); - aSect.SetProtect(); + aSectData.SetLinkFileName(sFileName); + aSectData.SetProtectFlag(true); aEndIdx--; // im InsertSection ist Ende inclusive while( aEndIdx.GetNode().IsStartNode() ) @@ -458,12 +458,12 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, if (aEndIdx >= aStartIdx) { pSectNd = GetNodes().InsertTextSection(aStartIdx, - *pFmt, aSect, 0, &aEndIdx, false); + *pFmt, aSectData, 0, &aEndIdx, false); } else { pSectNd = GetNodes().InsertTextSection(aEndIdx, - *pFmt, aSect, 0, &aStartIdx, false); + *pFmt, aSectData, 0, &aStartIdx, false); } // <- #i26762# @@ -751,11 +751,11 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel ) default: { String sNm( INetURLObject( sFileName ).GetName() ); - SwSection aSect( FILE_LINK_SECTION, + SwSectionData aSectData( FILE_LINK_SECTION, GetUniqueSectionName( &sNm )); SwSectionFmt* pFmt = MakeSectionFmt( 0 ); - aSect.SetLinkFileName(sFileName ); - aSect.SetProtect(); + aSectData.SetLinkFileName(sFileName); + aSectData.SetProtectFlag(true); aEndIdx--; // im InsertSection ist Ende inclusive while( aEndIdx.GetNode().IsStartNode() ) @@ -805,12 +805,12 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel ) if (aEndIdx >= aStartIdx) { pSectNd = GetNodes().InsertTextSection(aStartIdx, - *pFmt, aSect, 0, &aEndIdx, false); + *pFmt, aSectData, 0, &aEndIdx, false); } else { pSectNd = GetNodes().InsertTextSection(aEndIdx, - *pFmt, aSect, 0, &aStartIdx, false); + *pFmt, aSectData, 0, &aStartIdx, false); } pSectNd->GetSection().CreateLink( CREATE_CONNECT ); diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 5fee1c8f6a..1842712f69 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -369,9 +369,9 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos, String sSectNm( rTOX.GetTOXName() ); sSectNm = GetUniqueTOXBaseName( *rTOX.GetTOXType(), &sSectNm ); SwPaM aPam( rPos ); - SwSection aSection( TOX_CONTENT_SECTION, sSectNm ); + SwSectionData aSectionData( TOX_CONTENT_SECTION, sSectNm ); SwTOXBaseSection *const pNewSection = dynamic_cast( - InsertSwSection( aPam, aSection, & rTOX, pSet, false )); + InsertSwSection( aPam, aSectionData, & rTOX, pSet, false )); if (pNewSection) { SwSectionNode *const pSectNd = pNewSection->GetFmt()->GetSectionNode(); @@ -397,12 +397,12 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos, // ??Resource sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" )); - SwSection aSect( TOX_HEADER_SECTION, sNm ); + SwSectionData headerData( TOX_HEADER_SECTION, sNm ); SwNodeIndex aStt( *pHeadNd ); aIdx--; SwSectionFmt* pSectFmt = MakeSectionFmt( 0 ); GetNodes().InsertTextSection( - aStt, *pSectFmt, aSect, 0, &aIdx, true, false); + aStt, *pSectFmt, headerData, 0, &aIdx, true, false); } } @@ -431,7 +431,7 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( ULONG nSttNd, ULONG nEndNd, String sSectNm( rTOX.GetTOXName() ); sSectNm = GetUniqueTOXBaseName(*rTOX.GetTOXType(), &sSectNm); - SwSection aSection(TOX_CONTENT_SECTION, sSectNm); + SwSectionData aSectionData( TOX_CONTENT_SECTION, sSectNm ); SwNodeIndex aStt( GetNodes(), nSttNd ), aEnd( GetNodes(), nEndNd ); SwSectionFmt* pFmt = MakeSectionFmt( 0 ); @@ -441,7 +441,7 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( ULONG nSttNd, ULONG nEndNd, // --aEnd; // im InsertSection ist Ende inclusive SwSectionNode *const pNewSectionNode = - GetNodes().InsertTextSection(aStt, *pFmt, aSection, &rTOX, &aEnd); + GetNodes().InsertTextSection(aStt, *pFmt, aSectionData, &rTOX, &aEnd); if (!pNewSectionNode) { DelSectionFmt( pFmt ); @@ -768,7 +768,7 @@ const SwTxtNode* lcl_FindChapterNode( const SwNode& rNd, BYTE nLvl = 0 ) SwTOXBaseSection::SwTOXBaseSection(SwTOXBase const& rBase, SwSectionFmt & rFmt) : SwTOXBase( rBase ) - , SwSection( TOX_CONTENT_SECTION, aEmptyStr, & rFmt ) + , SwSection( TOX_CONTENT_SECTION, aEmptyStr, rFmt ) { SetProtect( rBase.IsProtected() ); SwSection::SetName( GetTOXName() ); @@ -953,12 +953,12 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, // ??Resource sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" )); - SwSection aSect( TOX_HEADER_SECTION, sNm ); + SwSectionData headerData( TOX_HEADER_SECTION, sNm ); SwNodeIndex aStt( *pHeadNd ); aIdx--; SwSectionFmt* pSectFmt = pDoc->MakeSectionFmt( 0 ); pDoc->GetNodes().InsertTextSection( - aStt, *pSectFmt, aSect, 0, &aIdx, true, false); + aStt, *pSectFmt, headerData, 0, &aIdx, true, false); } // jetzt waere ein prima Zeitpunkt, um die Numerierung zu updaten diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index edca80d874..5560aaafe2 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -137,7 +137,7 @@ bool lcl_IsInSameTblBox( SwNodes& _rNds, return true; } -void lcl_CheckEmptyLayFrm( SwNodes& rNds, SwSection& rSect, +void lcl_CheckEmptyLayFrm( SwNodes& rNds, SwSectionData& rSectionData, const SwNode& rStt, const SwNode& rEnd ) { SwNodeIndex aIdx( rStt ); @@ -151,12 +151,14 @@ void lcl_CheckEmptyLayFrm( SwNodes& rNds, SwSection& rSect, !CheckNodesRange( rEnd, aIdx, TRUE ) || // OD 04.11.2003 #i21457# !lcl_IsInSameTblBox( rNds, rEnd, false )) - rSect.SetHidden( FALSE ); + { + rSectionData.SetHidden( false ); + } } } SwSection * -SwDoc::InsertSwSection(SwPaM const& rRange, SwSection const& rNew, +SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, SwTOXBase const*const pTOXBase, SfxItemSet const*const pAttr, bool const bUpdate) { @@ -171,14 +173,15 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSection const& rNew, // Teste ob das gesamte Dokument versteckt werden soll, // koennen wir zur Zeit nicht !!!! - if( rNew.IsHidden() && rRange.HasMark() ) + if (rNewData.IsHidden() && rRange.HasMark()) { const SwPosition *pStt = rRange.Start(), *pEnd = rRange.End(); if( !pStt->nContent.GetIndex() && pEnd->nNode.GetNode().GetCntntNode()->Len() == pEnd->nContent.GetIndex() ) { - ::lcl_CheckEmptyLayFrm( GetNodes(), const_cast(rNew), + ::lcl_CheckEmptyLayFrm( GetNodes(), + rNewData, pStt->nNode.GetNode(), pEnd->nNode.GetNode() ); } @@ -188,7 +191,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSection const& rNew, if( DoesUndo() ) { ClearRedo(); - pUndoInsSect = new SwUndoInsSection(rRange, rNew, pAttr, pTOXBase); + pUndoInsSect = new SwUndoInsSection(rRange, rNewData, pAttr, pTOXBase); AppendUndo( pUndoInsSect ); DoUndo( FALSE ); } @@ -219,7 +222,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSection const& rNew, --aEnd; // im InsertSection ist Ende inclusive pNewSectNode = GetNodes().InsertTextSection( - aStt, *pFmt, rNew, pTOXBase, & aEnd); + aStt, *pFmt, rNewData, pTOXBase, & aEnd); } else { @@ -291,7 +294,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSection const& rNew, } } pNewSectNode = GetNodes().InsertTextSection( - pSttPos->nNode, *pFmt, rNew, pTOXBase, &pEndPos->nNode); + pSttPos->nNode, *pFmt, rNewData, pTOXBase, &pEndPos->nNode); } } else @@ -301,12 +304,12 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSection const& rNew, if( !pPos->nContent.GetIndex() ) { pNewSectNode = GetNodes().InsertTextSection( - pPos->nNode, *pFmt, rNew, pTOXBase, 0, true); + pPos->nNode, *pFmt, rNewData, pTOXBase, 0, true); } else if( pPos->nContent.GetIndex() == pCNd->Len() ) { pNewSectNode = GetNodes().InsertTextSection( - pPos->nNode, *pFmt, rNew, pTOXBase, 0, false); + pPos->nNode, *pFmt, rNewData, pTOXBase, 0, false); } else { @@ -316,7 +319,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSection const& rNew, } SplitNode( *pPos, false ); pNewSectNode = GetNodes().InsertTextSection( - pPos->nNode, *pFmt, rNew, pTOXBase, 0, true); + pPos->nNode, *pFmt, rNewData, pTOXBase, 0, true); } } @@ -340,7 +343,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSection const& rNew, } // ist eine Condition gesetzt - if( rNew.IsHidden() && rNew.GetCondition().Len() ) + if (rNewData.IsHidden() && rNewData.GetCondition().Len()) { // dann berechne bis zu dieser Position SwCalc aCalc( *this ); @@ -374,7 +377,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSection const& rNew, DoUndo( TRUE ); } - if( rNew.IsLinkType() ) + if (rNewData.IsLinkType()) { pNewSectNode->GetSection().CreateLink( bUpdate ? CREATE_UPDATE : CREATE_CONNECT ); } @@ -615,9 +618,8 @@ void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, BOOL bDelNodes ) SetModified(); } -void SwDoc::ChgSection( USHORT nPos, const SwSection& rSect, - const SfxItemSet* pAttr, - sal_Bool bPreventLinkUpdate ) +void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData, + SfxItemSet const*const pAttr, bool const bPreventLinkUpdate) { SwSectionFmt* pFmt = (*pSectionFmtTbl)[ nPos ]; SwSection* pSection = pFmt->GetSection(); @@ -625,7 +627,7 @@ void SwDoc::ChgSection( USHORT nPos, const SwSection& rSect, /// remember hidden condition flag of SwSection before changes bool bOldCondHidden = pSection->IsCondHidden() ? true : false; - if( *pSection == rSect ) + if (pSection->DataEquals(rNewData)) { // die Attribute ueberpruefen BOOL bOnlyAttrChg = FALSE; @@ -674,12 +676,19 @@ void SwDoc::ChgSection( USHORT nPos, const SwSection& rSect, // versteckt werden soll, koennen wir zur Zeit nicht !!!! const SwNodeIndex* pIdx = 0; { - const SwSectionNode* pSectNd; - if( rSect.IsHidden() && 0 != (pIdx = pFmt->GetCntnt().GetCntntIdx() ) - && 0 != (pSectNd = pIdx->GetNode().GetSectionNode() ) ) + if (rNewData.IsHidden()) { - ::lcl_CheckEmptyLayFrm( GetNodes(), (SwSection&)rSect, + pIdx = pFmt->GetCntnt().GetCntntIdx(); + if (pIdx) + { + const SwSectionNode* pSectNd = + pIdx->GetNode().GetSectionNode(); + if (pSectNd) + { + ::lcl_CheckEmptyLayFrm( GetNodes(), rNewData, *pSectNd, *pSectNd->EndOfSectionNode() ); + } + } } } @@ -698,13 +707,13 @@ void SwDoc::ChgSection( USHORT nPos, const SwSection& rSect, // #56167# Der LinkFileName koennte auch nur aus Separatoren bestehen String sCompareString = sfx2::cTokenSeperator; sCompareString += sfx2::cTokenSeperator; - BOOL bUpdate = ( !pSection->IsLinkType() && rSect.IsLinkType() ) || - ( rSect.GetLinkFileName().Len() && - rSect.GetLinkFileName() != sCompareString && - rSect.GetLinkFileName() != - pSection->GetLinkFileName()); + const bool bUpdate = + (!pSection->IsLinkType() && rNewData.IsLinkType()) + || ( rNewData.GetLinkFileName().Len() + && (rNewData.GetLinkFileName() != sCompareString) + && (rNewData.GetLinkFileName() != pSection->GetLinkFileName())); - String sSectName( rSect.GetName() ); + String sSectName( rNewData.GetSectionName() ); if( sSectName != pSection->GetName() ) GetUniqueSectionName( &sSectName ); else @@ -717,7 +726,7 @@ void SwDoc::ChgSection( USHORT nPos, const SwSection& rSect, /// or it is set to the value of SwSection which is assigned to it. /// Discussion with AMA results that the adjustment to the assignment operator /// could be very risky -> see notes in bug #102894#. - *pSection = rSect; + pSection->SetSectionData(rNewData); if( pAttr ) pSection->GetFmt()->SetFmtAttr( *pAttr ); @@ -735,7 +744,7 @@ void SwDoc::ChgSection( USHORT nPos, const SwSection& rSect, FldsToCalc( aCalc, pIdx->GetIndex(), USHRT_MAX ); /// OD 04.10.2002 #102894# /// Because on using SwSection::operator=() to set up - /// with and the above given note, the hidden condition flag + /// with and the above given note, the hidden condition flag /// has to be set to FALSE, if hidden condition flag of GetSection()> /// (SwSection before the changes) is FALSE (already saved in ) /// and new calculated condition is TRUE. @@ -806,15 +815,15 @@ void lcl_DeleteFtn( SwSectionNode *pNd, ULONG nStt, ULONG nEnd ) } } -inline BOOL lcl_IsTOXSection( const SwSection& rSection ) +static inline bool lcl_IsTOXSection(SwSectionData const& rSectionData) { - return TOX_CONTENT_SECTION == rSection.GetType() || - TOX_HEADER_SECTION == rSection.GetType(); + return (TOX_CONTENT_SECTION == rSectionData.GetType()) + || (TOX_HEADER_SECTION == rSectionData.GetType()); } SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx, SwSectionFmt& rSectionFmt, - const SwSection& rSection, + SwSectionData const& rSectionData, SwTOXBase const*const pTOXBase, SwNodeIndex const*const pEnde, bool const bInsAtStart, bool const bCreateFrms) @@ -828,7 +837,7 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx, if( bInsAtStart ) { - if( !lcl_IsTOXSection( rSection )) + if (!lcl_IsTOXSection(rSectionData)) { do { aInsPos--; @@ -840,11 +849,15 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx, { SwNode* pNd; aInsPos++; - if( !lcl_IsTOXSection( rSection )) + if (!lcl_IsTOXSection(rSectionData)) + { while( aInsPos.GetIndex() < Count() - 1 && ( pNd = &aInsPos.GetNode())->IsEndNode() && pNd->StartOfSectionNode()->IsSectionNode()) + { aInsPos++; + } + } } } @@ -916,7 +929,7 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx, } new SwEndNode( aInsPos, *pSectNd ); - pSectNd->GetSection() = rSection; + pSectNd->GetSection().SetSectionData(rSectionData); SwSectionFmt* pSectFmt = pSectNd->GetSection().GetFmt(); // Hier bietet sich als Optimierung an, vorhandene Frames nicht zu @@ -1018,7 +1031,7 @@ SwSectionNode::SwSectionNode(SwNodeIndex const& rIdx, } pSection = (pTOXBase) ? new SwTOXBaseSection(*pTOXBase, rFmt) - : new SwSection( CONTENT_SECTION, rFmt.GetName(), & rFmt ); + : new SwSection( CONTENT_SECTION, rFmt.GetName(), rFmt ); // jetzt noch die Verbindung von Format zum Node setzen // Modify unterdruecken, interresiert keinen @@ -1097,7 +1110,7 @@ SwSectionNode::~SwSectionNode() SwFrm *SwSectionNode::MakeFrm() { - pSection->bHiddenFlag = FALSE; + pSection->m_Data.SetHiddenFlag(false); return new SwSectionFrm( *pSection ); } @@ -1225,7 +1238,7 @@ void SwSectionNode::MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEndIdx ) *pIdxBehind = *this; - pSection->bHiddenFlag = TRUE; + pSection->m_Data.SetHiddenFlag(true); if( rNds.IsDocNodes() ) { @@ -1252,7 +1265,7 @@ void SwSectionNode::DelFrms() pSection->GetFmt()->DelFrms(); // unser Flag muessen wir noch aktualisieren - pSection->bHiddenFlag = TRUE; + pSection->m_Data.SetHiddenFlag(true); // Bug 30582: falls der Bereich in Fly oder TabellenBox ist, dann // kann er nur "gehiddet" werden, wenn weiterer Content @@ -1270,7 +1283,9 @@ void SwSectionNode::DelFrms() !CheckNodesRange( *EndOfSectionNode(), aIdx, TRUE ) || // OD 04.11.2003 #i21457# !lcl_IsInSameTblBox( rNds, *EndOfSectionNode(), false )) - pSection->bHiddenFlag = FALSE; + { + pSection->m_Data.SetHiddenFlag(false); + } } } } diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx index 8f19d3b1e4..3c6d85ba39 100644 --- a/sw/source/core/docnode/node2lay.cxx +++ b/sw/source/core/docnode/node2lay.cxx @@ -233,8 +233,8 @@ SwLayoutFrm* SwNode2LayImpl::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode ) { // #137684#: pFrm could be a "dummy"-section if( ((SwSectionFrm*)pFrm)->GetSection() && - ((SwSectionNode*)pNode)->GetSection() == - *((SwSectionFrm*)pFrm)->GetSection() ) + (&((SwSectionNode*)pNode)->GetSection() == + ((SwSectionFrm*)pFrm)->GetSection()) ) { // OD 2004-06-02 #i22922# - consider columned sections // 'Go down' the section frame as long as the layout frame diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 491cb661dc..587a44d222 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -51,9 +51,7 @@ #include #include #include -#ifndef _DOCSH_HXX #include -#endif #include #include #include @@ -115,39 +113,126 @@ SV_IMPL_PTRARR( SwSections, SwSection*) SV_IMPL_PTRARR(SwSectionFmts,SwSectionFmt*) +SwSectionData::SwSectionData(SectionType const eType, String const& rName) + : m_eType(eType) + , m_sSectionName(rName) + , m_bHiddenFlag(false) + , m_bProtectFlag(false) + // --> FME 2004-06-22 #114856# edit in readonly sections + , m_bEditInReadonlyFlag(false) + // <-- + , m_bHidden(false) + , m_bCondHiddenFlag(true) + , m_bConnectFlag(true) +{ +} -SwSection::SwSection( SectionType eTyp, const String& rName, - SwSectionFmt* pFmt ) - : SwClient( pFmt ), sSectionNm( rName ), - eType( eTyp ) +// this must have the same semantics as operator=() +SwSectionData::SwSectionData(SwSection const& rSection) + : m_eType(rSection.GetType()) + , m_sSectionName(rSection.GetName()) + , m_sCondition(rSection.GetCondition()) + , m_sLinkFileName(rSection.GetLinkFileName()) + , m_sLinkFilePassword(rSection.GetLinkFilePassword()) + , m_Password(rSection.GetPassword()) + , m_bHiddenFlag(rSection.IsHiddenFlag()) + , m_bProtectFlag(rSection.IsProtect()) + // --> FME 2004-06-22 #114856# edit in readonly sections + , m_bEditInReadonlyFlag(rSection.IsEditInReadonly()) + // <-- + , m_bHidden(rSection.IsHidden()) + , m_bCondHiddenFlag(true) + , m_bConnectFlag(rSection.IsConnectFlag()) { - bHidden = FALSE; - bHiddenFlag = FALSE; - bProtectFlag = FALSE; +} + +// this must have the same semantics as operator=() +SwSectionData::SwSectionData(SwSectionData const& rOther) + : m_eType(rOther.m_eType) + , m_sSectionName(rOther.m_sSectionName) + , m_sCondition(rOther.m_sCondition) + , m_sLinkFileName(rOther.m_sLinkFileName) + , m_sLinkFilePassword(rOther.m_sLinkFilePassword) + , m_Password(rOther.m_Password) + , m_bHiddenFlag(rOther.m_bHiddenFlag) + , m_bProtectFlag(rOther.m_bProtectFlag) // --> FME 2004-06-22 #114856# edit in readonly sections - bEditInReadonlyFlag = FALSE; + , m_bEditInReadonlyFlag(rOther.m_bEditInReadonlyFlag) // <-- - bCondHiddenFlag = TRUE; - bConnectFlag = TRUE; + , m_bHidden(rOther.m_bHidden) + , m_bCondHiddenFlag(true) + , m_bConnectFlag(rOther.m_bConnectFlag) +{ +} + +// the semantics here are weird for reasons of backward compatibility +SwSectionData & SwSectionData::operator= (SwSectionData const& rOther) +{ + m_eType = rOther.m_eType; + m_sSectionName = rOther.m_sSectionName; + m_sCondition = rOther.m_sCondition; + m_sLinkFileName = rOther.m_sLinkFileName; + m_sLinkFilePassword = rOther.m_sLinkFilePassword; + m_bConnectFlag = rOther.m_bConnectFlag; + m_Password = rOther.m_Password; + + m_bEditInReadonlyFlag = rOther.m_bEditInReadonlyFlag; + m_bProtectFlag = rOther.m_bProtectFlag; + + m_bHidden = rOther.m_bHidden; + // FIXME: old code did not assign m_bHiddenFlag ? + // FIXME: why should m_bCondHiddenFlag always default to true? + m_bCondHiddenFlag = true; + + return *this; +} + +// the semantics here are weird for reasons of backward compatibility +bool SwSectionData::operator==(SwSectionData const& rOther) const +{ + return (m_eType == rOther.m_eType) + && (m_sSectionName == rOther.m_sSectionName) + && (m_sCondition == rOther.m_sCondition) + && (m_bHidden == rOther.m_bHidden) + && (m_bProtectFlag == rOther.m_bProtectFlag) + && (m_bEditInReadonlyFlag == rOther.m_bEditInReadonlyFlag) + && (m_sLinkFileName == rOther.m_sLinkFileName) + && (m_sLinkFilePassword == rOther.m_sLinkFilePassword) + && (m_Password == rOther.m_Password); + // FIXME: old code ignored m_bCondHiddenFlag m_bHiddenFlag m_bConnectFlag +} - SwSectionPtr pParentSect = GetParent(); +// SwSection =========================================================== + +SwSection::SwSection( + SectionType const eType, String const& rName, SwSectionFmt & rFormat) + : SwClient(& rFormat) + , m_Data(eType, rName) +{ + SwSection *const pParentSect = GetParent(); if( pParentSect ) { if( pParentSect->IsHiddenFlag() ) - SetHidden( TRUE ); + { + SetHidden( true ); + } - _SetProtectFlag( pParentSect->IsProtectFlag() ); + m_Data.SetProtectFlag( pParentSect->IsProtectFlag() ); // --> FME 2004-06-22 #114856# edit in readonly sections - _SetEditInReadonlyFlag( pParentSect->IsEditInReadonlyFlag() ); + m_Data.SetEditInReadonlyFlag( pParentSect->IsEditInReadonlyFlag() ); // <-- } - if( pFmt && !bProtectFlag ) - _SetProtectFlag( pFmt->GetProtect().IsCntntProtected() ); + if (!m_Data.IsProtectFlag()) + { + m_Data.SetProtectFlag( rFormat.GetProtect().IsCntntProtected() ); + } // --> FME 2004-06-22 #114856# edit in readonly sections - if ( pFmt && !bEditInReadonlyFlag ) - _SetEditInReadonlyFlag( pFmt->GetEditInReadonly().GetValue() ); + if (!m_Data.IsEditInReadonlyFlag()) + { + m_Data.SetEditInReadonlyFlag( rFormat.GetEditInReadonly().GetValue() ); + } // <-- } @@ -170,8 +255,10 @@ SwSection::~SwSection() { pFmt->Remove( this ); // austragen, - if( CONTENT_SECTION != eType ) // den Link austragen + if (CONTENT_SECTION != m_Data.GetType()) + { pDoc->GetLinkManager().Remove( refLink ); + } if( refObj.Is() ) // als Server austragen pDoc->GetLinkManager().RemoveServer( &refObj ); @@ -194,74 +281,50 @@ SwSection::~SwSection() refObj->Closed(); } - -SwSection& SwSection::operator=( const SwSection& rCpy ) +void SwSection::SetSectionData(SwSectionData const& rData) { - sSectionNm = rCpy.sSectionNm; - sCondition = rCpy.sCondition; - sLinkFileName = rCpy.GetLinkFileName(); - SetLinkFilePassWd( rCpy.GetLinkFilePassWd() ); - SetConnectFlag( rCpy.IsConnectFlag() ); - SetPasswd( rCpy.GetPasswd() ); - - eType = rCpy.eType; - - if( !GetFmt() ) + bool const bOldHidden( m_Data.IsHidden() ); + m_Data = rData; + // now update format and reflink with new data +// SetLinkFileName(m_Data.GetLinkFileName()); // old code did not do this? + // next 2 may actually overwrite m_Data.m_b{Protect,EditInReadonly}Flag + // in Modify, which should result in same flag value as the old code! + SetProtect(m_Data.IsProtectFlag()); + SetEditInReadonly(m_Data.IsEditInReadonlyFlag()); + if (bOldHidden != m_Data.IsHidden()) // check if changed... { - SetProtect( rCpy.IsProtect() ); - // --> FME 2004-06-22 #114856# edit in readonly sections - SetEditInReadonly( rCpy.IsEditInReadonly() ); - // <-- + ImplSetHiddenFlag(m_Data.IsHidden(), m_Data.IsCondHidden()); } - else if( rCpy.GetFmt() ) - { - _SetProtectFlag( rCpy.bProtectFlag ); - // --> FME 2004-06-22 #114856# edit in readonly sections - _SetEditInReadonlyFlag( rCpy.bEditInReadonlyFlag ); - // <-- - } - else - { - SetProtect( rCpy.bProtectFlag ); - // --> FME 2004-06-22 #114856# edit in readonly sections - SetEditInReadonly( rCpy.bEditInReadonlyFlag ); - // <-- - } - - bCondHiddenFlag = TRUE; // sollte immer defaultet werden - SetHidden( rCpy.bHidden ); - - return *this; } - -BOOL SwSection::operator==( const SwSection& rCmp ) const +bool SwSection::DataEquals(SwSectionData const& rCmp) const { - return sSectionNm == rCmp.sSectionNm && - sCondition == rCmp.sCondition && - eType == rCmp.eType && - bHidden == rCmp.bHidden && - IsProtect() == rCmp.IsProtect() && - // --> FME 2004-06-22 #114856# edit in readonly sections - IsEditInReadonly() == rCmp.IsEditInReadonly() && - // <-- - GetLinkFileName() == rCmp.GetLinkFileName() && - GetLinkFilePassWd() == rCmp.GetLinkFilePassWd() && - GetPasswd() == rCmp.GetPasswd() && - ( !GetFmt() || !rCmp.GetFmt() || GetFmt() == rCmp.GetFmt()); + // note that the old code compared the flags of the parameter with the + // format attributes of this; the following mess should do the same... + (void) GetLinkFileName(); // updates m_sLinkFileName + bool const bProtect(m_Data.IsProtectFlag()); + bool const bEditInReadonly(m_Data.IsEditInReadonlyFlag()); + const_cast(this)->m_Data.SetProtectFlag(IsProtect()); + const_cast(this)->m_Data + .SetEditInReadonlyFlag(IsEditInReadonly()); + bool const bResult( m_Data == rCmp ); + const_cast(this)->m_Data.SetProtectFlag(bProtect); + const_cast(this)->m_Data.SetEditInReadonlyFlag(bEditInReadonly); + return bResult; } -void SwSection::_SetHiddenFlag( BOOL bTmpHidden, BOOL bCondition ) +void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition) { SwSectionFmt* pFmt = GetFmt(); + ASSERT(pFmt, "ImplSetHiddenFlag: no format?"); if( pFmt ) { - BOOL bHide = bTmpHidden && bCondition; + const bool bHide = bTmpHidden && bCondition; - if( bHide ) // die Nodes also "verstecken" + if (bHide) // should be hidden { - if( !bHiddenFlag ) // ist nicht versteckt + if (!m_Data.IsHiddenFlag()) // is not hidden { // wie sieht es mit dem Parent aus, ist der versteckt ? // (eigentlich muesste das vom bHiddenFlag angezeigt werden!) @@ -274,7 +337,7 @@ void SwSection::_SetHiddenFlag( BOOL bTmpHidden, BOOL bCondition ) pFmt->DelFrms(); } } - else if( bHiddenFlag ) // die Nodes wieder anzeigen + else if (m_Data.IsHiddenFlag()) // show Nodes again { // alle Frames sichtbar machen ( Childs Sections werden vom // MakeFrms beruecksichtigt). Aber nur wenn die ParentSection @@ -304,57 +367,76 @@ BOOL SwSection::CalcHiddenFlag() const return FALSE; } -BOOL SwSection::_IsProtect() const +bool SwSection::IsProtect() const { - return GetFmt()->GetProtect().IsCntntProtected(); + SwSectionFmt *const pFmt( GetFmt() ); + ASSERT(pFmt, "SwSection::IsProtect: no format?"); + return (pFmt) + ? pFmt->GetProtect().IsCntntProtected() + : IsProtectFlag(); } // --> FME 2004-06-22 #114856# edit in readonly sections -BOOL SwSection::_IsEditInReadonly() const +bool SwSection::IsEditInReadonly() const { - return GetFmt()->GetEditInReadonly().GetValue(); + SwSectionFmt *const pFmt( GetFmt() ); + ASSERT(pFmt, "SwSection::IsEditInReadonly: no format?"); + return (pFmt) + ? pFmt->GetEditInReadonly().GetValue() + : IsEditInReadonlyFlag(); } // <-- -void SwSection::SetHidden( BOOL bFlag ) +void SwSection::SetHidden(bool const bFlag) { - if( !bHidden == !bFlag ) + if (!m_Data.IsHidden() == !bFlag) return; - bHidden = bFlag; - _SetHiddenFlag( bHidden, bCondHiddenFlag ); + m_Data.SetHidden(bFlag); + ImplSetHiddenFlag(bFlag, m_Data.IsCondHidden()); } -void SwSection::SetProtect( BOOL bFlag ) +void SwSection::SetProtect(bool const bFlag) { - if( GetFmt() ) + SwSectionFmt *const pFormat( GetFmt() ); + ASSERT(pFormat, "SwSection::SetProtect: no format?"); + if (pFormat) { SvxProtectItem aItem( RES_PROTECT ); aItem.SetCntntProtect( (BOOL)bFlag ); - GetFmt()->SetFmtAttr( aItem ); + pFormat->SetFmtAttr( aItem ); + // note: this will call m_Data.SetProtectFlag via Modify! } else - bProtectFlag = bFlag; + { + m_Data.SetProtectFlag(bFlag); + } } // --> FME 2004-06-22 #114856# edit in readonly sections -void SwSection::SetEditInReadonly( BOOL bFlag ) +void SwSection::SetEditInReadonly(bool const bFlag) { - if( GetFmt() ) + SwSectionFmt *const pFormat( GetFmt() ); + ASSERT(pFormat, "SwSection::SetEditInReadonly: no format?"); + if (pFormat) { SwFmtEditInReadonly aItem; aItem.SetValue( (BOOL)bFlag ); - GetFmt()->SetFmtAttr( aItem ); + pFormat->SetFmtAttr( aItem ); + // note: this will call m_Data.SetEditInReadonlyFlag via Modify! } else - bEditInReadonlyFlag = bFlag; + { + m_Data.SetEditInReadonlyFlag(bFlag); + } } // <-- void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) { - BOOL bRemake = FALSE, bUpdateFtn = FALSE; + bool bRemake = false; + bool bUpdateFtn = false; switch( pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ) { case RES_ATTRSET_CHG: @@ -366,7 +448,8 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) if( SFX_ITEM_SET == pNewSet->GetItemState( RES_PROTECT, FALSE, &pItem ) ) { - _SetProtectFlag( ((SvxProtectItem*)pItem)->IsCntntProtected() ); + m_Data.SetProtectFlag( static_cast(pItem) + ->IsCntntProtected() ); pNewSet->ClearItem( RES_PROTECT ); pOldSet->ClearItem( RES_PROTECT ); } @@ -375,7 +458,8 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) if( SFX_ITEM_SET == pNewSet->GetItemState( RES_EDIT_IN_READONLY, FALSE, &pItem ) ) { - _SetEditInReadonlyFlag( ((SwFmtEditInReadonly*)pItem)->GetValue() ); + m_Data.SetEditInReadonlyFlag( + static_cast(pItem)->GetValue()); pNewSet->ClearItem( RES_EDIT_IN_READONLY ); pOldSet->ClearItem( RES_EDIT_IN_READONLY ); } @@ -385,7 +469,9 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) RES_FTN_AT_TXTEND, FALSE, &pItem ) || SFX_ITEM_SET == pNewSet->GetItemState( RES_END_AT_TXTEND, FALSE, &pItem )) - bUpdateFtn = TRUE; + { + bUpdateFtn = true; + } if( !pNewSet->Count() ) return; @@ -395,7 +481,8 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) case RES_PROTECT: if( pNew ) { - BOOL bNewFlag = ((SvxProtectItem*)pNew)->IsCntntProtected(); + bool bNewFlag = + static_cast(pNew)->IsCntntProtected(); if( !bNewFlag ) { // Abschalten: teste ob nicht vielleich ueber die Parents @@ -404,32 +491,34 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) do { if( pSect->IsProtect() ) { - bNewFlag = TRUE; + bNewFlag = true; break; } - } while( 0 != ( pSect = pSect->GetParent()) ); + pSect = pSect->GetParent(); + } while (pSect); } - _SetProtectFlag( bNewFlag ); + m_Data.SetProtectFlag( bNewFlag ); } return; // --> FME 2004-06-22 #114856# edit in readonly sections case RES_EDIT_IN_READONLY: if( pNew ) { - BOOL bNewFlag = ((SwFmtEditInReadonly*)pNew)->GetValue(); - _SetEditInReadonlyFlag( bNewFlag ); + const bool bNewFlag = + static_cast(pNew)->GetValue(); + m_Data.SetEditInReadonlyFlag( bNewFlag ); } return; // <-- case RES_SECTION_HIDDEN: - bHiddenFlag = TRUE; + m_Data.SetHiddenFlag(true); return; case RES_SECTION_NOT_HIDDEN: case RES_SECTION_RESETHIDDENFLAG: - bHiddenFlag = bHidden && bCondHiddenFlag; + m_Data.SetHiddenFlag( m_Data.IsHidden() && m_Data.IsCondHidden() ); return; case RES_COL: @@ -438,12 +527,16 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) case RES_FTN_AT_TXTEND: if( pNew && pOld ) - bUpdateFtn = TRUE; + { + bUpdateFtn = true; + } break; case RES_END_AT_TXTEND: if( pNew && pOld ) - bUpdateFtn = TRUE; + { + bUpdateFtn = true; + } break; } @@ -468,13 +561,13 @@ void SwSection::SetRefObject( SwServerObject* pObj ) } -void SwSection::SetCondHidden( BOOL bFlag ) +void SwSection::SetCondHidden(bool const bFlag) { - if( !bCondHiddenFlag == !bFlag ) + if (!m_Data.IsCondHidden() == !bFlag) return; - bCondHiddenFlag = bFlag; - _SetHiddenFlag( bHidden, bCondHiddenFlag ); + m_Data.SetCondHidden(bFlag); + ImplSetHiddenFlag(m_Data.IsHidden(), bFlag); } @@ -484,7 +577,7 @@ const String& SwSection::GetLinkFileName() const if( refLink.Is() ) { String sTmp; - switch( eType ) + switch (m_Data.GetType()) { case DDE_LINK_SECTION: sTmp = refLink->GetLinkSourceName(); @@ -505,26 +598,29 @@ const String& SwSection::GetLinkFileName() const // ist die Section im UndoNodesArray, dann steht // der Link nicht im LinkManager, kann also auch nicht // erfragt werden. Dann returne den akt. Namen - return sLinkFileName; + return m_Data.GetLinkFileName(); } } break; default: break; } - ((SwSection*)this)->sLinkFileName = sTmp; + const_cast(this)->m_Data.SetLinkFileName(sTmp); } - return sLinkFileName; + return m_Data.GetLinkFileName(); } -void SwSection::SetLinkFileName( const String& rNew, const String* pPassWd ) +void SwSection::SetLinkFileName(const String& rNew, String const*const pPassWd) { if( refLink.Is() ) + { refLink->SetLinkSourceName( rNew ); - else - sLinkFileName = rNew; + } + m_Data.SetLinkFileName(rNew); if( pPassWd ) - SetLinkFilePassWd( *pPassWd ); + { + SetLinkFilePassword( *pPassWd ); + } } // falls es ein gelinkter Bereich war, dann muessen alle @@ -563,6 +659,8 @@ const SwTOXBase* SwSection::GetTOXBase() const return pRet; } +// SwSectionFmt ======================================================== + SwSectionFmt::SwSectionFmt( SwSectionFmt* pDrvdFrm, SwDoc *pDoc ) : SwFrmFmt( pDoc->GetAttrPool(), sSectionFmtNm, pDrvdFrm ) { @@ -594,7 +692,7 @@ SwSectionFmt::~SwSectionFmt() if( !pParentSect || !pParentSect->IsHiddenFlag() ) { // Nodes wieder anzeigen - rSect.SetHidden( FALSE ); + rSect.SetHidden(false); } } SwClientIter aIter( *this ); @@ -923,7 +1021,7 @@ USHORT SwSectionFmt::GetChildSections( SwSections& rArr, if( GetDepends() ) { - SwClientIter aIter( *(SwSectionFmt*)this ); + SwClientIter aIter( *this ); SwClient * pLast; const SwNodeIndex* pIdx; for( pLast = aIter.First(TYPE(SwSectionFmt)); pLast; pLast = aIter.Next() ) @@ -979,7 +1077,7 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert // --> FME 2004-06-22 #114856# edit in readonly sections const SwFmtEditInReadonly* pEditInReadonly = 0; // <-- - int bIsHidden = FALSE; + bool bIsHidden = false; SwClientIter aIter( *this ); SwClient * pLast = aIter.GoStart(); @@ -1008,16 +1106,20 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert bIsHidden = pSection->IsHidden(); } } - if( pProtect->IsCntntProtected() != - pSection->IsProtectFlag() ) + if (!pProtect->IsCntntProtected() != + !pSection->IsProtectFlag()) + { pLast->Modify( (SfxPoolItem*)pProtect, (SfxPoolItem*)pProtect ); + } // --> FME 2004-06-22 #114856# edit in readonly sections - if ( pEditInReadonly->GetValue() != - pSection->IsEditInReadonlyFlag() ) + if (!pEditInReadonly->GetValue() != + !pSection->IsEditInReadonlyFlag()) + { pLast->Modify( (SfxPoolItem*)pEditInReadonly, (SfxPoolItem*)pEditInReadonly ); + } // <-- if( bIsHidden == pSection->IsHiddenFlag() ) @@ -1330,7 +1432,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType, } SwSection& rSection = pSectNd->GetSection(); - rSection.SetConnectFlag( FALSE ); + rSection.SetConnectFlag(false); ::rtl::OUString sNewFileName; Reader* pRead = 0; @@ -1362,7 +1464,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType, else { nRet = lcl_FindDocShell( xDocSh, sFileName, - rSection.GetLinkFilePassWd(), + rSection.GetLinkFilePassword(), sFilter, 0, pDoc->GetDocShell() ); if( nRet ) { @@ -1374,18 +1476,18 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType, if( nRet ) { - rSection.SetConnectFlag( TRUE ); + rSection.SetConnectFlag(true); SwNodeIndex aSave( pPam->GetPoint()->nNode, -1 ); SwNodeRange* pCpyRg = 0; if( xDocSh->GetMedium() && - !rSection.GetLinkFilePassWd().Len() ) + !rSection.GetLinkFilePassword().Len() ) { const SfxPoolItem* pItem; if( SFX_ITEM_SET == xDocSh->GetMedium()->GetItemSet()-> GetItemState( SID_PASSWORD, FALSE, &pItem ) ) - rSection.SetLinkFilePassWd( + rSection.SetLinkFilePassword( ((SfxStringItem*)pItem)->GetValue() ); } @@ -1518,7 +1620,9 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType, SwReader aTmpReader( aStrm, aEmptyStr, pDoc->GetDocShell()->GetMedium()->GetBaseURL(), *pPam ); if( !IsError( aTmpReader.Read( *pRead ) )) - rSection.SetConnectFlag( TRUE ); + { + rSection.SetConnectFlag(true); + } if( pESh ) { @@ -1565,19 +1669,18 @@ void SwIntrnlSectRefLink::Closed() else pSh->StartAction(); - SwSection aSect( CONTENT_SECTION, aEmptyStr ); - aSect = *rSectFmt.GetSection(); - aSect.SetType( CONTENT_SECTION ); - aSect.SetLinkFileName( aEmptyStr ); - aSect.SetHidden( FALSE ); - aSect.SetProtect( FALSE ); + SwSectionData aSectionData(*rSectFmt.GetSection()); + aSectionData.SetType( CONTENT_SECTION ); + aSectionData.SetLinkFileName( aEmptyStr ); + aSectionData.SetHidden( false ); + aSectionData.SetProtectFlag( false ); // --> FME 2004-06-22 #114856# edit in readonly sections - aSect.SetEditInReadonly( FALSE ); + aSectionData.SetEditInReadonlyFlag( false ); // <-- - aSect.SetConnectFlag( FALSE ); + aSectionData.SetConnectFlag( false ); - pDoc->ChgSection( n, aSect ); + pDoc->UpdateSection( n, aSectionData ); // alle in der Section liegenden Links werden sichtbar SwSectionNode* pSectNd = rSectFmt.GetSectionNode( FALSE ); @@ -1598,7 +1701,8 @@ void SwIntrnlSectRefLink::Closed() void SwSection::CreateLink( LinkCreateType eCreateType ) { SwSectionFmt* pFmt = GetFmt(); - if( !pFmt || CONTENT_SECTION == eType ) + ASSERT(pFmt, "SwSection::CreateLink: no format?"); + if (!pFmt || (CONTENT_SECTION == m_Data.GetType())) return ; USHORT nUpdateType = sfx2::LINKUPDATE_ALWAYS; @@ -1612,7 +1716,7 @@ void SwSection::CreateLink( LinkCreateType eCreateType ) SwIntrnlSectRefLink* pLnk = (SwIntrnlSectRefLink*)&refLink; - String sCmd( sLinkFileName ); + String sCmd( m_Data.GetLinkFileName() ); xub_StrLen nPos; while( STRING_NOTFOUND != (nPos = sCmd.SearchAscii( " " )) ) sCmd.Erase( nPos, 1 ); @@ -1620,7 +1724,7 @@ void SwSection::CreateLink( LinkCreateType eCreateType ) pLnk->SetUpdateMode( nUpdateType ); pLnk->SetVisible( pFmt->GetDoc()->IsVisibleLinks() ); - switch( eType ) + switch (m_Data.GetType()) { case DDE_LINK_SECTION: pLnk->SetLinkSourceName( sCmd ); @@ -1632,7 +1736,7 @@ void SwSection::CreateLink( LinkCreateType eCreateType ) String sFltr( sCmd.GetToken( 1, sfx2::cTokenSeperator ) ); String sRange( sCmd.GetToken( 2, sfx2::cTokenSeperator ) ); pFmt->GetDoc()->GetLinkManager().InsertFileLink( *pLnk, - static_cast(eType), + static_cast(m_Data.GetType()), sCmd.GetToken( 0, sfx2::cTokenSeperator ), ( sFltr.Len() ? &sFltr : 0 ), ( sRange.Len() ? &sRange : 0 ) ); @@ -1670,9 +1774,11 @@ void SwSection::BreakLink() // release link, if it exists if ( refLink.Is() ) { - if ( GetFmt() ) + SwSectionFmt *const pFormat( GetFmt() ); + ASSERT(pFormat, "SwSection::BreakLink: no format?"); + if (pFormat) { - GetFmt()->GetDoc()->GetLinkManager().Remove( refLink ); + pFormat->GetDoc()->GetLinkManager().Remove( refLink ); } refLink.Clear(); } @@ -1680,7 +1786,7 @@ void SwSection::BreakLink() SetType( CONTENT_SECTION ); // reset linked file data SetLinkFileName( aEmptyStr ); - SetLinkFilePassWd( aEmptyStr ); + SetLinkFilePassword( aEmptyStr ); } // <-- diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx index 39d7b0eac9..2f932c308d 100644 --- a/sw/source/core/edit/edglbldc.cxx +++ b/sw/source/core/edit/edglbldc.cxx @@ -146,7 +146,7 @@ USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const } BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos, - const SwSection& rNew ) + SwSectionData & rNew) { if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) ) return FALSE; diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index abdf6b9e96..fa1c234c0a 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -42,9 +42,9 @@ #include // SwRootFrm - // SS fuer Bereiche -const SwSection* SwEditShell::InsertSection( const SwSection& rNew, - const SfxItemSet* pAttr ) +SwSection const* +SwEditShell::InsertSection( + SwSectionData & rNewData, SfxItemSet const*const pAttr) { const SwSection* pRet = 0; if( !IsTableMode() ) @@ -54,7 +54,7 @@ const SwSection* SwEditShell::InsertSection( const SwSection& rNew, FOREACHPAM_START(this) SwSection const*const pNew = - GetDoc()->InsertSwSection( *PCURCRSR, rNew, 0, pAttr ); + GetDoc()->InsertSwSection( *PCURCRSR, rNewData, 0, pAttr ); if( !pRet ) pRet = pNew; FOREACHPAM_END() @@ -178,11 +178,11 @@ void SwEditShell::DelSectionFmt( USHORT nFmt ) } -void SwEditShell::ChgSection( USHORT nSect, const SwSection& rSect, - const SfxItemSet* pAttr ) +void SwEditShell::UpdateSection(sal_uInt16 const nSect, + SwSectionData & rNewData, SfxItemSet const*const pAttr) { StartAllAction(); - GetDoc()->ChgSection( nSect, rSect, pAttr ); + GetDoc()->UpdateSection( nSect, rNewData, pAttr ); // rufe das AttrChangeNotify auf der UI-Seite. CallChgLnk(); EndAllAction(); diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index e96504ab37..a9d7d2c390 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -132,10 +132,9 @@ void SwEditShell::SetTOXBaseReadonly(const SwTOXBase& rTOXBase, BOOL bReadonly) ((SwTOXBase&)rTOXBase).SetProtected(bReadonly); ASSERT( rTOXSect.SwSection::GetType() == TOX_CONTENT_SECTION, "not a TOXContentSection" ); - SwSection aSect(TOX_CONTENT_SECTION, rTOXSect.GetName()); - aSect = rTOXSect; - aSect.SetProtect(bReadonly); - ChgSection( GetSectionFmtPos( *rTOXSect.GetFmt() ), aSect, 0 ); + SwSectionData aSectionData(rTOXSect); + aSectionData.SetProtectFlag(bReadonly); + UpdateSection( GetSectionFmtPos( *rTOXSect.GetFmt() ), aSectionData, 0 ); } /* -----------------02.09.99 07:47------------------- diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx index c26538e439..fe81a1d623 100644 --- a/sw/source/core/undo/unsect.cxx +++ b/sw/source/core/undo/unsect.cxx @@ -75,16 +75,14 @@ SfxItemSet* lcl_GetAttrSet( const SwSection& rSect ) } SwUndoInsSection::SwUndoInsSection( - SwPaM const& rPam, SwSection const& rNew, + SwPaM const& rPam, SwSectionData const& rNewData, SfxItemSet const*const pSet, SwTOXBase const*const pTOXBase) : SwUndo( UNDO_INSSECTION ), SwUndRng( rPam ) , pHistory( 0 ) - , pSection(new SwSection(rNew.GetType(), rNew.GetName())) + , m_pSectionData(new SwSectionData(rNewData)) , m_pTOXBase(pTOXBase ? new SwTOXBase(*pTOXBase) : 0) , pRedlData( 0 ), pAttr( 0 ), nSectNodePos( 0 ) { - *pSection = rNew; - SwDoc& rDoc = *(SwDoc*)rPam.GetDoc(); if( rDoc.IsRedlineOn() ) { @@ -121,7 +119,6 @@ SwUndoInsSection::SwUndoInsSection( SwUndoInsSection::~SwUndoInsSection() { - delete pSection; delete pRedlData; delete pAttr; @@ -187,7 +184,7 @@ void SwUndoInsSection::Redo( SwUndoIter& rUndoIter ) else { rDoc.InsertSwSection(*rUndoIter.pAktPam, - *pSection, 0, pAttr, true); + *m_pSectionData, 0, pAttr, true); } if( pHistory ) @@ -233,7 +230,7 @@ void SwUndoInsSection::Repeat( SwUndoIter& rUndoIter ) else { rUndoIter.GetDoc().InsertSwSection( *rUndoIter.pAktPam, - *pSection, 0, pAttr); + *m_pSectionData, 0, pAttr); } } @@ -286,8 +283,7 @@ SwUndoDelSection::SwUndoDelSection( const SwSectionFmt& rFmt ) m_pTOXBase.reset( new SwTOXBase(static_cast(rSect)) ); } - pSection = new SwSection( rSect.GetType(), rSect.GetName() ); - *pSection = rSect; + m_pSectionData.reset( new SwSectionData(rSect) ); pAttr = ::lcl_GetAttrSet( rSect ); @@ -299,7 +295,6 @@ SwUndoDelSection::SwUndoDelSection( const SwSectionFmt& rFmt ) SwUndoDelSection::~SwUndoDelSection() { - delete pSection; delete pAttr; } @@ -323,7 +318,7 @@ void SwUndoDelSection::Undo( SwUndoIter& rUndoIter ) /// OD 04.10.2002 #102894# /// remember inserted section node for further calculations SwSectionNode* pInsertedSectNd = rDoc.GetNodes().InsertTextSection( - aStt, *pFmt, *pSection, 0, & aEnd); + aStt, *pFmt, *m_pSectionData, 0, & aEnd); if( SFX_ITEM_SET == pFmt->GetItemState( RES_FTN_AT_TXTEND ) || SFX_ITEM_SET == pFmt->GetItemState( RES_END_AT_TXTEND )) @@ -370,8 +365,8 @@ SwUndoChgSection::SwUndoChgSection( const SwSectionFmt& rFmt, BOOL bOnlyAttr ) : SwUndo( UNDO_CHGSECTION ), bOnlyAttrChgd( bOnlyAttr ) { const SwSection& rSect = *rFmt.GetSection(); - pSection = new SwSection( rSect.GetType(), rSect.GetName() ); - *pSection = rSect; + + m_pSectionData.reset( new SwSectionData(rSect) ); pAttr = ::lcl_GetAttrSet( rSect ); @@ -381,7 +376,6 @@ SwUndoChgSection::SwUndoChgSection( const SwSectionFmt& rFmt, BOOL bOnlyAttr ) SwUndoChgSection::~SwUndoChgSection() { - delete pSection; delete pAttr; } @@ -419,18 +413,16 @@ void SwUndoChgSection::Undo( SwUndoIter& rUndoIter ) if( !bOnlyAttrChgd ) { - BOOL bUpdate = (!rNdSect.IsLinkType() && pSection->IsLinkType() ) || - ( pSection->GetLinkFileName().Len() && - pSection->GetLinkFileName() != - rNdSect.GetLinkFileName()); - - SwSection* pTmp = new SwSection( CONTENT_SECTION, aEmptyStr ); - *pTmp = rNdSect; // das aktuelle sichern - - rNdSect = *pSection; // das alte setzen - - delete pSection; - pSection = pTmp; // das aktuelle ist jetzt das alte + const bool bUpdate = + (!rNdSect.IsLinkType() && m_pSectionData->IsLinkType()) + || ( m_pSectionData->GetLinkFileName().Len() + && (m_pSectionData->GetLinkFileName() != + rNdSect.GetLinkFileName())); + + // swap stored section data with live section data + SwSectionData *const pOld( new SwSectionData(rNdSect) ); + rNdSect.SetSectionData(*m_pSectionData); + m_pSectionData.reset(pOld); if( bUpdate ) rNdSect.CreateLink( CREATE_UPDATE ); diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 016cacbdc9..637e7eee8a 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -915,9 +915,9 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, const SwSectionFmt* pTmpFmt = rSects[ i ]; if (pTmpFmt == pSectionFmt) { - m_pImpl->m_pDoc->ChgSection( i, - static_cast(rTOXBase), - & aAttrSet); + SwSectionData tmpData( + static_cast(rTOXBase)); + m_pImpl->m_pDoc->UpdateSection(i, tmpData, & aAttrSet); break; } } diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index a43f9df1ef..8ada9c556c 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -369,7 +369,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) } String tmp(m_pImpl->m_sName); - SwSection aSect(eType, pDoc->GetUniqueSectionName(&tmp)); + SwSectionData aSect(eType, pDoc->GetUniqueSectionName(&tmp)); aSect.SetCondition(m_pImpl->m_pProps->m_sCondition); ::rtl::OUStringBuffer sLinkNameBuf(m_pImpl->m_pProps->m_sLinkFileName); sLinkNameBuf.append(sfx2::cTokenSeperator); @@ -379,9 +379,9 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) aSect.SetLinkFileName(sLinkNameBuf.makeStringAndClear()); aSect.SetHidden(m_pImpl->m_pProps->m_bHidden); - aSect.SetProtect(m_pImpl->m_pProps->m_bProtect); + aSect.SetProtectFlag(m_pImpl->m_pProps->m_bProtect); // --> FME 2004-06-22 #114856# edit in readonly sections - aSect.SetEditInReadonly(m_pImpl->m_pProps->m_bEditInReadonly); + aSect.SetEditInReadonlyFlag(m_pImpl->m_pProps->m_bEditInReadonly); // <-- SfxItemSet aSet(pDoc->GetAttrPool(), @@ -427,7 +427,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) // section password if (m_pImpl->m_pProps->m_Password.getLength() > 0) { - aSect.SetPasswd(m_pImpl->m_pProps->m_Password); + aSect.SetPassword(m_pImpl->m_pProps->m_Password); } SwSection *const pRet = @@ -566,12 +566,10 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, throw uno::RuntimeException(); } - SwSection aSection(CONTENT_SECTION, aEmptyStr); SwSection *const pSect = (pFmt) ? pFmt->GetSection() : 0; - if (pFmt) - { - aSection = *pSect; - } + ::std::auto_ptr const pSectionData( + (pFmt) ? new SwSectionData(*pSect) : 0); + OUString const*const pPropertyNames = rPropertyNames.getConstArray(); uno::Any const*const pValues = rValues.getConstArray(); ::std::auto_ptr pItemSet; @@ -609,7 +607,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, } else { - aSection.SetCondition(uTmp); + pSectionData->SetCondition(uTmp); } } break; @@ -637,16 +635,16 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, } else { - String sLinkFileName(aSection.GetLinkFileName()); - if (aSection.GetType() != DDE_LINK_SECTION) + String sLinkFileName(pSectionData->GetLinkFileName()); + if (pSectionData->GetType() != DDE_LINK_SECTION) { sLinkFileName = sfx2::cTokenSeperator; sLinkFileName += sfx2::cTokenSeperator; - aSection.SetType(DDE_LINK_SECTION); + pSectionData->SetType(DDE_LINK_SECTION); } sLinkFileName.SetToken(pEntry->nWID - WID_SECT_DDE_TYPE, sfx2::cTokenSeperator, sTmp); - aSection.SetLinkFileName(sLinkFileName); + pSectionData->SetLinkFileName(sLinkFileName); } } break; @@ -683,10 +681,10 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, } else { - if (aSection.GetType() != FILE_LINK_SECTION && + if (pSectionData->GetType() != FILE_LINK_SECTION && aLink.FileURL.getLength()) { - aSection.SetType(FILE_LINK_SECTION); + pSectionData->SetType(FILE_LINK_SECTION); } ::rtl::OUStringBuffer sFileNameBuf; if (aLink.FileURL.getLength()) @@ -700,14 +698,14 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, sFileNameBuf.append(aLink.FilterName); sFileNameBuf.append(sfx2::cTokenSeperator); sFileNameBuf.append( - aSection.GetLinkFileName().GetToken(2, + pSectionData->GetLinkFileName().GetToken(2, sfx2::cTokenSeperator)); const ::rtl::OUString sFileName( sFileNameBuf.makeStringAndClear()); - aSection.SetLinkFileName(sFileName); + pSectionData->SetLinkFileName(sFileName); if (sFileName.getLength() < 3) { - aSection.SetType(CONTENT_SECTION); + pSectionData->SetType(CONTENT_SECTION); } } } @@ -723,21 +721,21 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, } else { - if (aSection.GetType() != FILE_LINK_SECTION && + if (pSectionData->GetType() != FILE_LINK_SECTION && sLink.getLength()) { - aSection.SetType(FILE_LINK_SECTION); + pSectionData->SetType(FILE_LINK_SECTION); } - String sSectLink(aSection.GetLinkFileName()); + String sSectLink(pSectionData->GetLinkFileName()); while (3 < sSectLink.GetTokenCount(sfx2::cTokenSeperator)) { sSectLink += sfx2::cTokenSeperator; } sSectLink.SetToken(2, sfx2::cTokenSeperator, sLink); - aSection.SetLinkFileName(sSectLink); + pSectionData->SetLinkFileName(sSectLink); if (sSectLink.Len() < 3) { - aSection.SetType(CONTENT_SECTION); + pSectionData->SetType(CONTENT_SECTION); } } } @@ -755,7 +753,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, } else { - aSection.SetHidden(!bVal); + pSectionData->SetHidden(!bVal); } } break; @@ -772,9 +770,9 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, } else { - if (aSection.GetCondition().Len() != 0) + if (pSectionData->GetCondition().Len() != 0) { - aSection.SetCondHidden(!bVal); + pSectionData->SetCondHidden(!bVal); } } } @@ -792,7 +790,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, } else { - aSection.SetProtect(bVal); + pSectionData->SetProtectFlag(bVal); } } break; @@ -810,7 +808,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, } else { - aSection.SetEditInReadonly(bVal); + pSectionData->SetEditInReadonlyFlag(bVal); } } // <-- @@ -825,7 +823,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, } else { - aSection.SetPasswd(aSeq); + pSectionData->SetPassword(aSeq); } } break; @@ -934,7 +932,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, { if (rFmts[i]->GetSection()->GetName() == pSect->GetName()) { - pDoc->ChgSection(i, aSection, pItemSet.get(), + pDoc->UpdateSection(i, *pSectionData, pItemSet.get(), pDoc->IsInReading()); { // temporarily remove actions to allow cursor update @@ -1222,7 +1220,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, case WID_SECT_PASSWORD: { pRet[nProperty] <<= (m_bIsDescriptor) - ? m_pProps->m_Password : pSect->GetPasswd(); + ? m_pProps->m_Password : pSect->GetPassword(); } break; default: @@ -1562,12 +1560,6 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) throw uno::RuntimeException(); } - SwSection aSection(CONTENT_SECTION, aEmptyStr); - SwSection *const pSect = (pFmt) ? pFmt->GetSection() : 0; - if (pFmt) - { - aSection = *pSect; - } SfxItemPropertySimpleEntry const*const pEntry = m_pImpl->m_rPropSet.getPropertyMap()->getByName(rPropertyName); if (!pEntry) @@ -1584,6 +1576,10 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) static_cast(this)); } + SwSection *const pSect = (pFmt) ? pFmt->GetSection() : 0; + ::std::auto_ptr const pSectionData( + (pFmt) ? new SwSectionData(*pSect) : 0); + ::std::auto_ptr pNewAttrSet; switch (pEntry->nWID) { @@ -1595,7 +1591,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) } else { - aSection.SetCondition(aEmptyStr); + pSectionData->SetCondition(aEmptyStr); } } break; @@ -1604,10 +1600,11 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) case WID_SECT_DDE_ELEMENT : case WID_SECT_LINK : case WID_SECT_REGION : - aSection.SetType(CONTENT_SECTION); + pSectionData->SetType(CONTENT_SECTION); break; case WID_SECT_DDE_AUTOUPDATE: - aSection.SetUpdateType(sfx2::LINKUPDATE_ALWAYS); +// FIXME this would crash? +// aSection.SetUpdateType(sfx2::LINKUPDATE_ALWAYS); break; case WID_SECT_VISIBLE : { @@ -1617,7 +1614,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) } else { - aSection.SetHidden(FALSE); + pSectionData->SetHidden(false); } } break; @@ -1629,7 +1626,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) } else { - aSection.SetProtect(FALSE); + pSectionData->SetProtectFlag(false); } } break; @@ -1642,7 +1639,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) } else { - aSection.SetEditInReadonly(FALSE); + pSectionData->SetEditInReadonlyFlag(false); } } break; @@ -1687,7 +1684,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) { if (rFmts[i]->GetSection()->GetName() == pSect->GetName()) { - pDoc->ChgSection(i, aSection, pNewAttrSet.get(), + pDoc->UpdateSection(i, *pSectionData, pNewAttrSet.get(), pDoc->IsInReading()); { // temporarily remove actions to allow cursor update @@ -1801,11 +1798,10 @@ throw (uno::RuntimeException) SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt(); if(pFmt) { - SwSection aSection(CONTENT_SECTION, aEmptyStr); SwSection *const pSect = pFmt->GetSection(); - aSection = *pSect; + SwSectionData aSection(*pSect); String sNewName(rName); - aSection.SetName(sNewName); + aSection.SetSectionName(sNewName); const SwSectionFmts& rFmts = pFmt->GetDoc()->GetSections(); sal_uInt16 nApplyPos = USHRT_MAX; @@ -1824,7 +1820,7 @@ throw (uno::RuntimeException) { { UnoActionContext aContext(pFmt->GetDoc()); - pFmt->GetDoc()->ChgSection( nApplyPos, aSection); + pFmt->GetDoc()->UpdateSection(nApplyPos, aSection); } { // temporarily remove actions to allow cursor update diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index 4283214196..c9fa4bd875 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -28,26 +28,19 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include - - -#include "hintids.hxx" - -#ifndef _APP_HXX //autogen +#include #include -#endif -#ifndef _WRKWIN_HXX //autogen #include -#endif #include #include #include #include -#ifndef _HTMLKYWD_H #include -#endif #include -#include + +#include "hintids.hxx" #include #include #include @@ -69,7 +62,6 @@ #include "viewsh.hxx" #include "swcss1.hxx" #include "swhtml.hxx" -#include #define CONTEXT_FLAGS_MULTICOL (HTML_CNTXT_STRIP_PARA | \ HTML_CNTXT_KEEP_NUMRULE | \ @@ -321,12 +313,12 @@ void SwHTMLParser::NewDivision( int nToken ) aHRef = aURL; } - SwSection aSection( aHRef.Len() ? FILE_LINK_SECTION + SwSectionData aSection( (aHRef.Len()) ? FILE_LINK_SECTION : CONTENT_SECTION, aName ); if( aHRef.Len() ) { aSection.SetLinkFileName( aHRef ); - aSection.SetProtect(); + aSection.SetProtectFlag(true); } SfxItemSet aFrmItemSet( pDoc->GetAttrPool(), @@ -708,7 +700,7 @@ void SwHTMLParser::NewMultiCol() // Make section name unique. String aName( pDoc->GetUniqueSectionName( aId.Len() ? &aId : 0 ) ); - SwSection aSection( CONTENT_SECTION, aName ); + SwSectionData aSection( CONTENT_SECTION, aName ); SfxItemSet aFrmItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx index 75d888bc28..80ac259265 100644 --- a/sw/source/filter/inc/fltshell.hxx +++ b/sw/source/filter/inc/fltshell.hxx @@ -255,14 +255,15 @@ public: class SwFltSection : public SfxPoolItem { - SwSection* pSection; + SwSectionData * m_pSection; + public: - SwFltSection( SwSection* pSect ); + SwFltSection( SwSectionData *const pSect ); SwFltSection( const SwFltSection& ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==(const SfxPoolItem&) const; virtual SfxPoolItem* Clone(SfxItemPool* = 0) const; - SwSection* GetSection() { return pSection; } + SwSectionData * GetSectionData() { return m_pSection; } }; // Der WWEndStack verhaelt sich wie der WWControlStck, nur dass die Attribute // auf ihm bis ans Ende des Dokuments gehortet werden, falls auf sie noch diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index 666e23e856..53a1787000 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -829,7 +829,8 @@ void rtfSections::SetHdFt(rtfSection &rSection) SwSectionFmt *rtfSections::InsertSection(SwPaM& rMyPaM, rtfSection &rSection) { - SwSection aSection(CONTENT_SECTION, mrReader.pDoc->GetUniqueSectionName()); + SwSectionData aSectionData(CONTENT_SECTION, + mrReader.pDoc->GetUniqueSectionName()); SfxItemSet aSet( mrReader.pDoc->GetAttrPool(), aFrmFmtSetRange ); @@ -838,7 +839,7 @@ SwSectionFmt *rtfSections::InsertSection(SwPaM& rMyPaM, rtfSection &rSection) nRTLPgn ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR)); rSection.mpSection = - mrReader.pDoc->InsertSwSection( rMyPaM, aSection, 0, &aSet ); + mrReader.pDoc->InsertSwSection( rMyPaM, aSectionData, 0, &aSet ); ASSERT(rSection.mpSection, "section not inserted!"); if (!rSection.mpSection) return 0; diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx index dca485df25..10356e9be6 100644 --- a/sw/source/filter/ww1/fltshell.cxx +++ b/sw/source/filter/ww1/fltshell.cxx @@ -559,9 +559,9 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry* case RES_FLTR_SECTION: MakePoint(pEntry, pDoc, aRegion); // bislang immer Point==Mark pDoc->InsertSwSection(aRegion, - *(static_cast(pEntry->pAttr))->GetSection(), - 0, false); - delete(((SwFltSection*)pEntry->pAttr)->GetSection()); + *(static_cast(pEntry->pAttr))->GetSectionData(), + 0, 0, false); + delete (((SwFltSection*)pEntry->pAttr)->GetSectionData()); break; case RES_FLTR_REDLINE: { @@ -865,19 +865,21 @@ SfxPoolItem* SwFltTOX::Clone(SfxItemPool*) const //------ hier stehen die Methoden von SwFltSwSection ----------- -SwFltSection::SwFltSection(SwSection *pSect) : - SfxPoolItem(RES_FLTR_SECTION), pSection(pSect) +SwFltSection::SwFltSection(SwSectionData *const pSect) + : SfxPoolItem(RES_FLTR_SECTION) + , m_pSection(pSect) { } -SwFltSection::SwFltSection(const SwFltSection& rCpy) : - SfxPoolItem(RES_FLTR_SECTION), pSection(rCpy.pSection) +SwFltSection::SwFltSection(const SwFltSection& rCpy) + : SfxPoolItem(RES_FLTR_SECTION) + , m_pSection(rCpy.m_pSection) { } int SwFltSection::operator==(const SfxPoolItem& rItem) const { - return pSection == ((SwFltSection&)rItem).pSection; + return m_pSection == ((SwFltSection&)rItem).m_pSection; } SfxPoolItem* __EXPORT SwFltSection::Clone(SfxItemPool*) const @@ -962,9 +964,9 @@ SwFltShell::~SwFltShell() SwDoc& rDoc = GetDoc(); // 1. SectionFmt und Section anlegen SwSectionFmt* pSFmt = rDoc.MakeSectionFmt( 0 ); - SwSection aS( CONTENT_SECTION, String::CreateFromAscii( + SwSectionData aSectionData( CONTENT_SECTION, String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("PMW-Protect") )); - aS.SetProtect( TRUE ); + aSectionData.SetProtectFlag( true ); // 2. Start- und EndIdx suchen const SwNode* pEndNd = &rDoc.GetNodes().GetEndOfContent(); SwNodeIndex aEndIdx( *pEndNd, -1L ); @@ -973,7 +975,7 @@ SwFltShell::~SwFltShell() // Section einfuegen // Section einfuegen rDoc.GetNodes().InsertTextSection( - aSttIdx, *pSFmt, aS, 0, &aEndIdx, false ); + aSttIdx, *pSFmt, aSectionData, 0, &aEndIdx, false ); if( !IsFlagSet(SwFltControlStack::DONT_HARD_PROTECT) ){ SwDocShell* pDocSh = rDoc.GetDocShell(); diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx index 38d79a8b45..77c0f38160 100644 --- a/sw/source/filter/ww1/w1filter.cxx +++ b/sw/source/filter/ww1/w1filter.cxx @@ -870,10 +870,10 @@ oncemore: String aName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "WW" ))); - SwSection* pSection = new SwSection( FILE_LINK_SECTION, + SwSectionData * pSection = new SwSectionData( FILE_LINK_SECTION, rOut.GetDoc().GetUniqueSectionName( &aStr ) ); pSection->SetLinkFileName( aFName ); - pSection->SetProtect( TRUE ); + pSection->SetProtectFlag( true ); rOut << SwFltSection( pSection ); rOut.EndItem( RES_FLTR_SECTION ); rOut.NextParagraph(); diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 2d75a7a4e7..bcfc56b1d7 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -2271,9 +2271,10 @@ eF_ResT SwWW8ImplReader::Read_F_IncludeText( WW8FieldDesc* /*pF*/, String& rStr */ SwPosition aTmpPos(*pPaM->GetPoint()); - SwSection aSection(FILE_LINK_SECTION, maSectionNameGenerator.UniqueName()); + SwSectionData aSection(FILE_LINK_SECTION, + maSectionNameGenerator.UniqueName()); aSection.SetLinkFileName( aPara ); - aSection.SetProtect(true); + aSection.SetProtectFlag(true); SwSection *const pSection = rDoc.InsertSwSection(*pPaM, aSection, 0, 0, false); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index f6f776dcae..e4e8f44d51 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -672,7 +672,8 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt, SwSectionFmt *wwSectionManager::InsertSection( SwPaM& rMyPaM, wwSection &rSection) { - SwSection aSection( CONTENT_SECTION, mrReader.rDoc.GetUniqueSectionName() ); + SwSectionData aSection( CONTENT_SECTION, + mrReader.rDoc.GetUniqueSectionName() ); SfxItemSet aSet( mrReader.rDoc.GetAttrPool(), aFrmFmtSetRange ); @@ -685,7 +686,7 @@ SwSectionFmt *wwSectionManager::InsertSection( if (0 == mrReader.pWDop->epc) aSet.Put( SwFmtEndAtTxtEnd(FTNEND_ATTXTEND)); - aSection.SetProtect(SectionIsProtected(rSection)); + aSection.SetProtectFlag(SectionIsProtected(rSection)); rSection.mpSection = mrReader.rDoc.InsertSwSection( rMyPaM, aSection, 0, & aSet ); @@ -836,9 +837,9 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/) pWkb->Get(nTest, pData); String sSectionName = mrReader.aLinkStringMap[SVBT16ToShort( ((WW8_WKB*)pData)->nLinkId) ]; mrReader.ConvertFFileName(sSectionName, sSectionName); - SwSection aSection(FILE_LINK_SECTION, sSectionName); + SwSectionData aSection(FILE_LINK_SECTION, sSectionName); aSection.SetLinkFileName( sSectionName ); - aSection.SetProtect(true); + aSection.SetProtectFlag(true); // --> CMC, OD 2004-06-18 #i19922# improvement: // return value of method not used. mrReader.rDoc.InsertSwSection(*mrReader.pPaM, aSection, 0, 0, false); diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index 44979c0ff0..c160496ad4 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -394,19 +394,20 @@ static sal_uInt16 nBCTitleNo = 0; else pSh->SetMark(); // set only the mark - SwSection aSect( CONTENT_SECTION, - String::CreateFromAscii(MASTER_LABEL)); + SwSectionData aSect(CONTENT_SECTION, + String::CreateFromAscii(MASTER_LABEL)); pSh->InsertSection(aSect); } } else if (rItem.bSynchron) { - SwSection aSect(FILE_LINK_SECTION, pSh->GetUniqueSectionName()); + SwSectionData aSect(FILE_LINK_SECTION, + pSh->GetUniqueSectionName()); String sLinkName(sfx2::cTokenSeperator); sLinkName += sfx2::cTokenSeperator; sLinkName += String::CreateFromAscii(MASTER_LABEL); aSect.SetLinkFileName(sLinkName); - aSect.SetProtect(); + aSect.SetProtectFlag(true); pSh->Insert(aDotStr); // Dummytext zum Zuweisen der Section pSh->SttDoc(); pSh->EndDoc(sal_True); // Alles im Rahmen selektieren diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx index 9f8affbc0b..b9ebb07f83 100644 --- a/sw/source/ui/dialog/regionsw.cxx +++ b/sw/source/ui/dialog/regionsw.cxx @@ -117,7 +117,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) else aTmpStr = rSh.GetUniqueSectionName(); - SwSection aSection(CONTENT_SECTION,aTmpStr); + SwSectionData aSection(CONTENT_SECTION, aTmpStr); rReq.SetReturnValue(SfxStringItem(FN_INSERT_REGION, aTmpStr)); aSet.Put( *pSet ); @@ -153,10 +153,10 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) (BOOL)((const SfxBoolItem *)pItem)->GetValue():FALSE; // <-- - aSection.SetProtect(bProtect); + aSection.SetProtectFlag(bProtect); aSection.SetHidden(bHidden); // --> FME 2004-06-22 #114856# edit in readonly sections - aSection.SetEditInReadonly(bEditInReadonly); + aSection.SetEditInReadonlyFlag(bEditInReadonly); // <-- if(SFX_ITEM_SET == @@ -193,9 +193,10 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) } } -IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSection*, pSect ) +IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSectionData*, pSect ) { - if( pSect ) + ::std::auto_ptr pSectionData(pSect); + if (pSectionData.get()) { SfxItemSet aSet(pThis->GetView().GetPool(), RES_COL, RES_COL, @@ -214,10 +215,9 @@ IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSection*, pSect ) AbstractInsertSectionTabDialog* aTabDlg = pFact->CreateInsertSectionTabDialog( DLG_INSERT_SECTION, &pThis->GetView().GetViewFrame()->GetWindow(),aSet , *pThis); DBG_ASSERT(aTabDlg, "Dialogdiet fail!"); - aTabDlg->SetSection(*pSect); + aTabDlg->SetSectionData(*pSectionData); aTabDlg->Execute(); - delete pSect; delete aTabDlg; } return 0; diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 4d787d859d..9af9dfbd0b 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -566,9 +566,10 @@ void AbstractEditRegionDlg_Impl::SelectSection(const String& rSectionName) } // AbstractEditRegionDlg_Impl end //AbstractInsertSectionTabDialog_Impl begin -void AbstractInsertSectionTabDialog_Impl::SetSection(const SwSection& rSect) +void +AbstractInsertSectionTabDialog_Impl::SetSectionData(SwSectionData const& rSect) { - pDlg->SetSection( rSect); + pDlg->SetSectionData(rSect); } // AbstractInsertSectionTabDialog_Impl end diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 3c12709bd6..8c3355bb6b 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -377,7 +377,7 @@ class SwInsertSectionTabDialog; class AbstractInsertSectionTabDialog_Impl : public AbstractInsertSectionTabDialog { DECL_ABSTDLG_BASE(AbstractInsertSectionTabDialog_Impl,SwInsertSectionTabDialog) - virtual void SetSection(const SwSection& rSect); + virtual void SetSectionData(SwSectionData const& rSect); }; //for SwInsertSectionTabDialog end diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index ef42b18e5a..b775624cd4 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -164,15 +164,15 @@ public: Beschreibung: User Data Klasse fuer Bereichsinformationen ----------------------------------------------------------------------------*/ -SectRepr::SectRepr( USHORT nPos, SwSection& rSect ) : - aSection( CONTENT_SECTION, aEmptyStr ), +SectRepr::SectRepr( USHORT nPos, SwSection& rSect ) + : m_SectionData( rSect ) + , aBrush( RES_BACKGROUND ), aFrmDirItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR ), aLRSpaceItem( RES_LR_SPACE ), bSelected(FALSE) { - aSection = rSect; - bContent = aSection.GetLinkFileName().Len() == 0; + bContent = m_SectionData.GetLinkFileName().Len() == 0; nArrPos=nPos; SwSectionFmt *pFmt = rSect.GetFmt(); if( pFmt ) @@ -192,7 +192,7 @@ void SectRepr::SetFile( const String& rFile ) String sNewFile( INetURLObject::decode( rFile, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8 )); - String sOldFileName( aSection.GetLinkFileName() ); + String sOldFileName( m_SectionData.GetLinkFileName() ); String sSub( sOldFileName.GetToken( 2, sfx2::cTokenSeperator ) ); if( rFile.Len() || sSub.Len() ) @@ -205,19 +205,23 @@ void SectRepr::SetFile( const String& rFile ) sNewFile += sSub; } - aSection.SetLinkFileName( sNewFile ); + m_SectionData.SetLinkFileName( sNewFile ); if( rFile.Len() || sSub.Len() ) - aSection.SetType( FILE_LINK_SECTION ); + { + m_SectionData.SetType( FILE_LINK_SECTION ); + } else - aSection.SetType( CONTENT_SECTION ); + { + m_SectionData.SetType( CONTENT_SECTION ); + } } void SectRepr::SetFilter( const String& rFilter ) { String sNewFile; - String sOldFileName( aSection.GetLinkFileName() ); + String sOldFileName( m_SectionData.GetLinkFileName() ); String sFile( sOldFileName.GetToken( 0, sfx2::cTokenSeperator ) ); String sSub( sOldFileName.GetToken( 2, sfx2::cTokenSeperator ) ); @@ -227,16 +231,18 @@ void SectRepr::SetFilter( const String& rFilter ) else if( sSub.Len() ) (( sNewFile = sfx2::cTokenSeperator ) += sfx2::cTokenSeperator ) += sSub; - aSection.SetLinkFileName( sNewFile ); + m_SectionData.SetLinkFileName( sNewFile ); if( sNewFile.Len() ) - aSection.SetType( FILE_LINK_SECTION ); + { + m_SectionData.SetType( FILE_LINK_SECTION ); + } } void SectRepr::SetSubRegion(const String& rSubRegion) { String sNewFile; - String sOldFileName( aSection.GetLinkFileName() ); + String sOldFileName( m_SectionData.GetLinkFileName() ); String sFilter( sOldFileName.GetToken( 1, sfx2::cTokenSeperator ) ); sOldFileName = sOldFileName.GetToken( 0, sfx2::cTokenSeperator ); @@ -244,21 +250,25 @@ void SectRepr::SetSubRegion(const String& rSubRegion) (((( sNewFile = sOldFileName ) += sfx2::cTokenSeperator ) += sFilter ) += sfx2::cTokenSeperator ) += rSubRegion; - aSection.SetLinkFileName( sNewFile ); + m_SectionData.SetLinkFileName( sNewFile ); if( rSubRegion.Len() || sOldFileName.Len() ) - aSection.SetType( FILE_LINK_SECTION ); + { + m_SectionData.SetType( FILE_LINK_SECTION ); + } else - aSection.SetType( CONTENT_SECTION ); + { + m_SectionData.SetType( CONTENT_SECTION ); + } } String SectRepr::GetFile() const { - String sLinkFile( aSection.GetLinkFileName() ); + String sLinkFile( m_SectionData.GetLinkFileName() ); if( sLinkFile.Len() ) { - if( DDE_LINK_SECTION == aSection.GetType() ) + if (DDE_LINK_SECTION == m_SectionData.GetType()) { USHORT n = sLinkFile.SearchAndReplace( sfx2::cTokenSeperator, ' ' ); sLinkFile.SearchAndReplace( sfx2::cTokenSeperator, ' ', n ); @@ -276,7 +286,7 @@ String SectRepr::GetFile() const String SectRepr::GetSubRegion() const { - String sLinkFile( aSection.GetLinkFileName() ); + String sLinkFile( m_SectionData.GetLinkFileName() ); if( sLinkFile.Len() ) sLinkFile = sLinkFile.GetToken( 2, sfx2::cTokenSeperator ); return sLinkFile; @@ -552,7 +562,7 @@ void SwEditRegionDlg::SelectSection(const String& rSectionName) while(pEntry) { SectReprPtr pRepr = (SectReprPtr)pEntry->GetUserData(); - if(pRepr->GetSection().GetName() == rSectionName) + if (pRepr->GetSectionData().GetSectionName() == rSectionName) break; pEntry = aTree.Next(pEntry); } @@ -589,15 +599,15 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox ) // <-- aFileCB.EnableTriState( TRUE ); - BOOL bHiddenValid = TRUE; - BOOL bProtectValid = TRUE; - BOOL bConditionValid = TRUE; + bool bHiddenValid = true; + bool bProtectValid = true; + bool bConditionValid = true; // --> FME 2004-06-22 #114856# edit in readonly sections - BOOL bEditInReadonlyValid = TRUE; - BOOL bEditInReadonly = TRUE; + bool bEditInReadonlyValid = true; + bool bEditInReadonly = true; // <-- - BOOL bHidden = TRUE; - BOOL bProtect = TRUE; + bool bHidden = true; + bool bProtect = true; String sCondition; BOOL bFirst = TRUE; BOOL bFileValid = TRUE; @@ -794,8 +804,10 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG ) { SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData(); SwSectionFmt* pFmt = aOrigArray[ pRepr->GetArrPos() ]; - if( !pRepr->GetSection().IsProtectFlag()) - pRepr->GetSection().SetPasswd(UNO_NMSPC::Sequence ()); + if (!pRepr->GetSectionData().IsProtectFlag()) + { + pRepr->GetSectionData().SetPassword(uno::Sequence()); + } USHORT nNewPos = rDocFmts.GetPos( pFmt ); if( USHRT_MAX != nNewPos ) { @@ -821,7 +833,7 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG ) if( pFmt->GetLRSpace() != pRepr->GetLRSpace()) pSet->Put( pRepr->GetLRSpace()); - rSh.ChgSection( nNewPos, pRepr->GetSection(), + rSh.UpdateSection( nNewPos, pRepr->GetSectionData(), pSet->Count() ? pSet : 0 ); delete pSet; } @@ -1221,8 +1233,8 @@ IMPL_LINK( SwEditRegionDlg, FileNameHdl, Edit *, pEdit ) nPos = sLink.SearchAndReplace( ' ', sfx2::cTokenSeperator ); sLink.SearchAndReplace( ' ', sfx2::cTokenSeperator, nPos ); - pSectRepr->GetSection().SetLinkFileName( sLink ); - pSectRepr->GetSection().SetType( DDE_LINK_SECTION ); + pSectRepr->GetSectionData().SetLinkFileName( sLink ); + pSectRepr->GetSectionData().SetType( DDE_LINK_SECTION ); } else { @@ -1343,10 +1355,12 @@ IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox ) break; } } - pRepr->GetSection().SetPasswd(pRepr->GetTempPasswd()); + pRepr->GetSectionData().SetPassword(pRepr->GetTempPasswd()); } else - pRepr->GetSection().SetPasswd(UNO_NMSPC::Sequence ()); + { + pRepr->GetSectionData().SetPassword(uno::Sequence()); + } pEntry = aTree.NextSelected(pEntry); } return 0; @@ -1368,7 +1382,7 @@ IMPL_LINK( SwEditRegionDlg, NameEditHdl, Edit *, EMPTYARG ) String aName = aCurName.GetText(); aTree.SetEntryText(pEntry,aName); SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData(); - pRepr->GetSection().SetName(aName); + pRepr->GetSectionData().SetSectionName(aName); aOK.Enable(aName.Len() != 0); } @@ -1495,8 +1509,8 @@ static void lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox ) SwInsertSectionTabDialog::SwInsertSectionTabDialog( Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh) : SfxTabDialog( pParent, SW_RES(DLG_INSERT_SECTION), &rSet ), - rWrtSh(rSh), - pToInsertSection(0) + rWrtSh(rSh) + , m_pSectionData(0) { String sInsert(SW_RES(ST_INSERT)); GetOKButton().SetText(sInsert); @@ -1527,7 +1541,6 @@ SwInsertSectionTabDialog::SwInsertSectionTabDialog( * --------------------------------------------------*/ SwInsertSectionTabDialog::~SwInsertSectionTabDialog() { - delete pToInsertSection; } /* -----------------21.05.99 10:23------------------- * @@ -1556,10 +1569,9 @@ void SwInsertSectionTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) * * --------------------------------------------------*/ -void SwInsertSectionTabDialog::SetSection(const SwSection& rSect) +void SwInsertSectionTabDialog::SetSectionData(SwSectionData const& rSect) { - pToInsertSection = new SwSection(CONTENT_SECTION, aEmptyStr); - *pToInsertSection = rSect; + m_pSectionData.reset( new SwSectionData(rSect) ); } /* -----------------21.05.99 13:10------------------- * @@ -1567,9 +1579,10 @@ void SwInsertSectionTabDialog::SetSection(const SwSection& rSect) short SwInsertSectionTabDialog::Ok() { short nRet = SfxTabDialog::Ok(); - DBG_ASSERT(pToInsertSection, "keiner Section?"); + DBG_ASSERT(m_pSectionData.get(), + "SwInsertSectionTabDialog: no SectionData?"); const SfxItemSet* pOutputItemSet = GetOutputItemSet(); - rWrtSh.InsertSection(*pToInsertSection, pOutputItemSet); + rWrtSh.InsertSection(*m_pSectionData, pOutputItemSet); SfxViewFrame* pViewFrm = rWrtSh.GetView().GetViewFrame(); uno::Reference< frame::XDispatchRecorder > xRecorder = pViewFrm->GetBindings().GetRecorder(); @@ -1582,15 +1595,20 @@ short SwInsertSectionTabDialog::Ok() aRequest.AppendItem(SfxUInt16Item(SID_ATTR_COLUMNS, ((const SwFmtCol*)pCol)->GetColumns().Count())); } - aRequest.AppendItem(SfxStringItem( FN_PARAM_REGION_NAME, pToInsertSection->GetName())); - aRequest.AppendItem(SfxStringItem( FN_PARAM_REGION_CONDITION, pToInsertSection->GetCondition())); - aRequest.AppendItem(SfxBoolItem( FN_PARAM_REGION_HIDDEN, pToInsertSection->IsHidden())); - aRequest.AppendItem(SfxBoolItem(FN_PARAM_REGION_PROTECT, pToInsertSection->IsProtect())); + aRequest.AppendItem(SfxStringItem( FN_PARAM_REGION_NAME, + m_pSectionData->GetSectionName())); + aRequest.AppendItem(SfxStringItem( FN_PARAM_REGION_CONDITION, + m_pSectionData->GetCondition())); + aRequest.AppendItem(SfxBoolItem( FN_PARAM_REGION_HIDDEN, + m_pSectionData->IsHidden())); + aRequest.AppendItem(SfxBoolItem( FN_PARAM_REGION_PROTECT, + m_pSectionData->IsProtectFlag())); // --> FME 2004-06-22 #114856# edit in readonly sections - aRequest.AppendItem(SfxBoolItem(FN_PARAM_REGION_EDIT_IN_READONLY, pToInsertSection->IsEditInReadonly())); + aRequest.AppendItem(SfxBoolItem( FN_PARAM_REGION_EDIT_IN_READONLY, + m_pSectionData->IsEditInReadonlyFlag())); // <-- - String sLinkFileName( pToInsertSection->GetLinkFileName() ); + String sLinkFileName( m_pSectionData->GetLinkFileName() ); aRequest.AppendItem(SfxStringItem( FN_PARAM_1, sLinkFileName.GetToken( 0, sfx2::cTokenSeperator ))); aRequest.AppendItem(SfxStringItem( FN_PARAM_2, sLinkFileName.GetToken( 1, sfx2::cTokenSeperator ))); aRequest.AppendItem(SfxStringItem( FN_PARAM_3, sLinkFileName.GetToken( 2, sfx2::cTokenSeperator ))); @@ -1675,13 +1693,16 @@ void SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh) lcl_FillSubRegionList( *m_pWrtSh, aSubRegionED, &aCurName ); - SwSection* pSect = ((SwInsertSectionTabDialog*)GetTabDialog())->GetSection(); - if( pSect ) // etwas vorgegeben ? + SwSectionData *const pSectionData = + static_cast(GetTabDialog()) + ->GetSectionData(); + if (pSectionData) // something set? { - aCurName.SetText( rSh.GetUniqueSectionName( &pSect->GetName() )); - aProtectCB.Check( 0 != pSect->IsProtect() ); - m_sFileName = pSect->GetLinkFileName(); - m_sFilePasswd = pSect->GetLinkFilePassWd(); + aCurName.SetText( + rSh.GetUniqueSectionName(& pSectionData->GetSectionName())); + aProtectCB.Check( 0 != pSectionData->IsProtectFlag() ); + m_sFileName = pSectionData->GetLinkFileName(); + m_sFilePasswd = pSectionData->GetLinkFilePassword(); aFileCB.Check( 0 != m_sFileName.Len() ); aFileNameED.SetText( m_sFileName ); UseFileHdl( &aFileCB ); @@ -1696,16 +1717,18 @@ void SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh) * --------------------------------------------------*/ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& ) { - SwSection aSection(CONTENT_SECTION, aCurName.GetText()); + SwSectionData aSection(CONTENT_SECTION, aCurName.GetText()); aSection.SetCondition(aConditionED.GetText()); BOOL bProtected = aProtectCB.IsChecked(); - aSection.SetProtect(bProtected); + aSection.SetProtectFlag(bProtected); aSection.SetHidden(aHideCB.IsChecked()); // --> FME 2004-06-22 #114856# edit in readonly sections - aSection.SetEditInReadonly(aEditInReadonlyCB.IsChecked()); + aSection.SetEditInReadonlyFlag(aEditInReadonlyCB.IsChecked()); // <-- if(bProtected) - aSection.SetPasswd(m_aNewPasswd); + { + aSection.SetPassword(m_aNewPasswd); + } String sFileName = aFileNameED.GetText(); String sSubRegion = aSubRegionED.GetText(); BOOL bDDe = aDDECB.IsChecked(); @@ -1733,7 +1756,7 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& ) aAbs = pMedium->GetURLObject(); aLinkFile = URIHelper::SmartRel2Abs( aAbs, sFileName, URIHelper::GetMaybeFileHdl() ); - aSection.SetLinkFilePassWd( m_sFilePasswd ); + aSection.SetLinkFilePassword( m_sFilePasswd ); } aLinkFile += sfx2::cTokenSeperator; @@ -1750,7 +1773,7 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& ) FILE_LINK_SECTION); } } - ((SwInsertSectionTabDialog*)GetTabDialog())->SetSection(aSection); + ((SwInsertSectionTabDialog*)GetTabDialog())->SetSectionData(aSection); return TRUE; } /* -----------------21.05.99 10:32------------------- diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index 69a7c19460..e96416401e 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -2211,9 +2211,9 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData, if( rWrtShell.HasSelection() ) rWrtShell.DelRight(); - SwSection aSect( DDE_LINK_SECTION, aName ); + SwSectionData aSect( DDE_LINK_SECTION, aName ); aSect.SetLinkFileName( aCmd ); - aSect.SetProtect(); + aSect.SetProtectFlag(true); rWrtShell.InsertSection( aSect ); pDDETyp = 0; // FeldTypen wieder entfernen @@ -2554,10 +2554,11 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData, ) { // und dann per PostUser Event den Bereich-Einfuegen-Dialog hochreissen - SwSection* pSect = new SwSection( FILE_LINK_SECTION, + SwSectionData * pSect = new SwSectionData( + FILE_LINK_SECTION, rSh.GetDoc()->GetUniqueSectionName() ); pSect->SetLinkFileName( sFileURL ); - pSect->SetProtect( TRUE ); + pSect->SetProtectFlag( true ); Application::PostUserEvent( STATIC_LINK( &rSh, SwWrtShell, InsertRegionDialog ), pSect ); diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 939b29acff..79f727aa08 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -354,7 +354,8 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG) const SwSection* pCurrSection = rWrtShell.GetCurrSection(); const SwSectionFmt* pFmt = pCurrSection->GetFmt(); USHORT nNewPos = rWrtShell.GetSectionFmtPos( *pFmt ); - rWrtShell.ChgSection( nNewPos, *pCurrSection, pSectionSet ); + SwSectionData aData(*pCurrSection); + rWrtShell.UpdateSection( nNewPos, aData, pSectionSet ); } if(pSectionSet && pSectionSet->Count() && bSelSectionChanged ) diff --git a/sw/source/ui/inc/regionsw.hxx b/sw/source/ui/inc/regionsw.hxx index 1be9e19c54..3a9672c224 100644 --- a/sw/source/ui/inc/regionsw.hxx +++ b/sw/source/ui/inc/regionsw.hxx @@ -67,7 +67,7 @@ namespace sfx2 class SectRepr { - SwSection aSection; + SwSectionData m_SectionData; SwFmtCol aCol; SvxBrushItem aBrush; SwFmtFtnAtTxtEnd aFtnNtAtEnd; @@ -88,7 +88,8 @@ public: BOOL operator <(SectRepr& rSectRef) const {return nArrPos FME 2004-06-22 #114856# edit in readonly sections - BOOL IsEditInReadonly()const - {return aSection.IsEditInReadonly();} - void SetEditInReadonly(BOOL bFlag = TRUE) - {aSection.SetEditInReadonly(bFlag);} + bool IsEditInReadonly() const + { return m_SectionData.IsEditInReadonlyFlag(); } + void SetEditInReadonly(const bool bFlag = true) + { m_SectionData.SetEditInReadonlyFlag(bFlag); } // <-- - void SetHidden(BOOL bFlag = TRUE) - {aSection.SetHidden(bFlag);} - void SetCondHidden(BOOL bFlag = TRUE) - {aSection.SetCondHidden(bFlag);} - void SetProtect(BOOL bFlag = TRUE) - {aSection.SetProtect(bFlag);} + void SetHidden(const bool bFlag = true) + { m_SectionData.SetHidden(bFlag); } + void SetCondHidden(const bool bFlag = true) + { m_SectionData.SetCondHidden(bFlag); } + void SetProtect(const bool bFlag = true) + { m_SectionData.SetProtectFlag(bFlag); } BOOL IsContent(){return bContent;} void SetContent(BOOL bValue){bContent = bValue;} - void SetSectionType(SectionType eSectionType) {aSection.SetType(eSectionType);} - SectionType GetSectionType(){return aSection.GetType();} + void SetSectionType(SectionType eSectionType) { m_SectionData.SetType(eSectionType); } + SectionType GetSectionType() const { return m_SectionData.GetType() ;} void SetSelected(){bSelected = TRUE;} BOOL IsSelected() const {return bSelected;} - const ::com::sun::star::uno::Sequence & GetPasswd() const {return aSection.GetPasswd();} + const ::com::sun::star::uno::Sequence & GetPasswd() const + { return m_SectionData.GetPassword(); } ::com::sun::star::uno::Sequence & GetTempPasswd() {return aTempPasswd;} void SetTempPasswd(const ::com::sun::star::uno::Sequence & aPasswd) {aTempPasswd = aPasswd;} }; @@ -385,7 +388,8 @@ public: class SwInsertSectionTabDialog : public SfxTabDialog { SwWrtShell& rWrtSh; - SwSection* pToInsertSection; + ::std::auto_ptr m_pSectionData; + protected: virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); virtual short Ok(); @@ -393,8 +397,8 @@ public: SwInsertSectionTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh); virtual ~SwInsertSectionTabDialog(); - void SetSection(const SwSection& rSect); - SwSection* GetSection() { return pToInsertSection;} + void SetSectionData(SwSectionData const& rSect); + SwSectionData * GetSectionData() { return m_pSectionData.get(); } }; /* -----------------21.05.99 13:07------------------- diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx index 7df8200e5f..9a95d3d3c6 100644 --- a/sw/source/ui/inc/wrtsh.hxx +++ b/sw/source/ui/inc/wrtsh.hxx @@ -46,7 +46,7 @@ class SdrView; class SwView; class SvGlobalName; class SwInputFieldList; -class SwSection; +class SwSectionData; class Timer; class SvxMacro; class SwFmtINetFmt; @@ -456,7 +456,7 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)(); void AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet); // Link fuers einfuegen von Bereichen uebers Drag&Drop/Clipboard - DECL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSection* ); + DECL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSectionData* ); //ctoren, der erstere ist eine Art kontrollierter copy ctor fuer weitere diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index e4b7d7406a..d80233ef3e 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -422,7 +422,8 @@ void SwView::ExecTabWin( SfxRequest& rReq ) ::ResizeFrameCols(aCols, aSectRect.Width(), aSectRect.Width() - nDiffWidth, nLeftDiff ); aSet.Put( aCols ); } - rSh.ChgSection( rSh.GetSectionFmtPos(*pSectFmt), *pCurrSect, &aSet ); + SwSectionData aData(*pCurrSect); + rSh.UpdateSection(rSh.GetSectionFmtPos(*pSectFmt), aData, &aSet); } else { // Seitenraender einstellen @@ -511,8 +512,8 @@ void SwView::ExecTabWin( SfxRequest& rReq ) ::ResizeFrameCols(aCols, aSectRect.Height(), aSectRect.Height() - nDiffWidth, nLeftDiff ); aSet.Put( aCols ); } - rSh.ChgSection( rSh.GetSectionFmtPos(*pSectFmt), *pCurrSect, &aSet ); - + SwSectionData aData(*pCurrSect); + rSh.UpdateSection(rSh.GetSectionFmtPos(*pSectFmt), aData, &aSet); } else { SwPageDesc aDesc( rDesc ); diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx index 5dbb52eef3..80117167fa 100644 --- a/sw/source/ui/utlui/glbltree.cxx +++ b/sw/source/ui/utlui/glbltree.cxx @@ -32,18 +32,14 @@ #define _SVSTDARR_STRINGSDTOR #include #endif -#ifndef _MSGBOX_HXX //autogen #include -#endif #include #include #include #include #include #include -#ifndef _HELP_HXX //autogen #include -#endif #include #include #include @@ -54,13 +50,9 @@ #include #include #include -#ifndef _VIEW_HXX #include -#endif #include -#ifndef _DOCSH_HXX #include -#endif #include #include #include @@ -72,12 +64,8 @@ #include #include -#ifndef _CMDID_H #include -#endif -#ifndef _HELPID_H #include -#endif #ifndef _NAVIPI_HRC #include #endif @@ -1471,15 +1459,15 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen if ( nAddNumber ) sSectionName = sTempSectionName; - SwSection aSection(CONTENT_SECTION, sSectionName); - aSection.SetProtect(TRUE); - aSection.SetHidden(FALSE); + SwSectionData aSectionData(CONTENT_SECTION, sSectionName); + aSectionData.SetProtectFlag(true); + aSectionData.SetHidden(false); - aSection.SetLinkFileName(sFileName); - aSection.SetType( FILE_LINK_SECTION); - aSection.SetLinkFilePassWd( sFilePassword ); + aSectionData.SetLinkFileName(sFileName); + aSectionData.SetType(FILE_LINK_SECTION); + aSectionData.SetLinkFilePassword( sFilePassword ); - rSh.InsertGlobalDocContent( *pAnchorContent, aSection ); + rSh.InsertGlobalDocContent( *pAnchorContent, aSectionData ); } if ( bMove ) { diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx index 632edc8c1f..062f15826b 100644 --- a/sw/source/ui/wrtsh/wrtsh2.cxx +++ b/sw/source/ui/wrtsh/wrtsh2.cxx @@ -461,20 +461,20 @@ void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk, } else { - SwSection aSection( FILE_LINK_SECTION, GetUniqueSectionName( 0 ) ); + SwSectionData aSection( FILE_LINK_SECTION, GetUniqueSectionName( 0 ) ); String aLinkFile( rBkmk.GetURL().GetToken(0, '#') ); aLinkFile += sfx2::cTokenSeperator; aLinkFile += sfx2::cTokenSeperator; aLinkFile += rBkmk.GetURL().GetToken(1, '#'); aSection.SetLinkFileName( aLinkFile ); - aSection.SetProtect( TRUE ); + aSection.SetProtectFlag( true ); const SwSection* pIns = InsertSection( aSection ); if( EXCHG_IN_ACTION_MOVE == nAction && pIns ) { - aSection = *pIns; + aSection = SwSectionData(*pIns); aSection.SetLinkFileName( aEmptyStr ); aSection.SetType( CONTENT_SECTION ); - aSection.SetProtect( FALSE ); + aSection.SetProtectFlag( false ); // the update of content from linked section at time delete // the undostack. Then the change of the section dont create @@ -482,7 +482,7 @@ void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk, BOOL bDoesUndo = DoesUndo(); if( UNDO_INSSECTION != GetUndoIds() ) DoUndo( FALSE ); - ChgSection( GetSectionFmtPos( *pIns->GetFmt() ), aSection ); + UpdateSection( GetSectionFmtPos( *pIns->GetFmt() ), aSection ); DoUndo( bDoesUndo ); } } -- cgit v1.2.3 From 0ce922ce8e307b72d84b0b03bc37fc12a4cc23bc Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:31 +0100 Subject: odfmetadata4: #i109599#: rename SwSection::[GS]etName() to [GS]etSectionName() --- sw/inc/section.hxx | 4 ++-- sw/source/core/crsr/trvlreg.cxx | 2 +- sw/source/core/doc/docdde.cxx | 4 +++- sw/source/core/doc/doctxm.cxx | 6 +++--- sw/source/core/docnode/ndsect.cxx | 18 ++++++++++++------ sw/source/core/docnode/section.cxx | 5 +++-- sw/source/core/unocore/unocoll.cxx | 7 ++++--- sw/source/core/unocore/unoidx.cxx | 2 +- sw/source/core/unocore/unosect.cxx | 13 ++++++++----- sw/source/filter/html/wrthtml.cxx | 5 +++-- sw/source/ui/dialog/uiregionsw.cxx | 11 +++++++---- sw/source/ui/uiview/view2.cxx | 4 ++-- sw/source/ui/utlui/content.cxx | 5 +++-- sw/source/ui/utlui/glbltree.cxx | 10 ++++++---- 14 files changed, 58 insertions(+), 38 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index 849e79bcf8..c0e7ad0626 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -187,8 +187,8 @@ public: void SetSectionData(SwSectionData const& rData); - String const& GetName() const { return m_Data.GetSectionName(); } - void SetName(String const& rName) { m_Data.SetSectionName(rName); } + String const& GetSectionName() const { return m_Data.GetSectionName(); } + void SetSectionName(String const& rName){ m_Data.SetSectionName(rName); } SectionType GetType() const { return m_Data.GetType(); } void SetType(SectionType const eType) { return m_Data.SetType(eType); } diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx index f239ab2806..e339623d7a 100644 --- a/sw/source/core/crsr/trvlreg.cxx +++ b/sw/source/core/crsr/trvlreg.cxx @@ -262,7 +262,7 @@ BOOL SwCursor::GotoRegion( const String& rName ) const SwNodeIndex* pIdx; const SwSection* pSect; if( 0 != ( pSect = pFmt->GetSection() ) && - pSect->GetName() == rName && + pSect->GetSectionName() == rName && 0 != ( pIdx = pFmt->GetCntnt().GetCntntIdx() ) && pIdx->GetNode().GetNodes().IsDocNodes() ) { diff --git a/sw/source/core/doc/docdde.cxx b/sw/source/core/doc/docdde.cxx index c23a1d39cb..6d4daf8972 100644 --- a/sw/source/core/doc/docdde.cxx +++ b/sw/source/core/doc/docdde.cxx @@ -99,7 +99,9 @@ BOOL lcl_FindSection( const SwSectionFmtPtr& rpSectFmt, void* pArgs, bool bCaseS SwSection* pSect = rpSectFmt->GetSection(); if( pSect ) { - String sNm( bCaseSensitive ? pSect->GetName() : GetAppCharClass().lower( pSect->GetName() )); + String sNm( (bCaseSensitive) + ? pSect->GetSectionName() + : GetAppCharClass().lower( pSect->GetSectionName() )); String sCompare( (bCaseSensitive) ? pItem->m_Item : GetAppCharClass().lower( pItem->m_Item ) ); diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 1842712f69..4eda348cd3 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -687,7 +687,7 @@ String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType, if( 0 != ( pSectNd = (*pSectionFmtTbl)[ n ]->GetSectionNode( FALSE ) )&& TOX_CONTENT_SECTION == (pSect = &pSectNd->GetSection())->GetType()) { - const String& rNm = pSect->GetName(); + const String& rNm = pSect->GetSectionName(); if( rNm.Match( aName ) == nNmLen ) { // Nummer bestimmen und das Flag setzen @@ -733,7 +733,7 @@ BOOL SwDoc::SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName) if(bRet) { pTOX->SetTOXName(rName); - pTOX->SwTOXBaseSection::SetName(rName); + pTOX->SetSectionName(rName); SetModified(); } return bRet; @@ -771,7 +771,7 @@ SwTOXBaseSection::SwTOXBaseSection(SwTOXBase const& rBase, SwSectionFmt & rFmt) , SwSection( TOX_CONTENT_SECTION, aEmptyStr, rFmt ) { SetProtect( rBase.IsProtected() ); - SwSection::SetName( GetTOXName() ); + SetSectionName( GetTOXName() ); } diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 5560aaafe2..8e266c981f 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -714,7 +714,7 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData, && (rNewData.GetLinkFileName() != pSection->GetLinkFileName())); String sSectName( rNewData.GetSectionName() ); - if( sSectName != pSection->GetName() ) + if (sSectName != pSection->GetSectionName()) GetUniqueSectionName( &sSectName ); else sSectName.Erase(); @@ -732,7 +732,9 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData, pSection->GetFmt()->SetFmtAttr( *pAttr ); if( sSectName.Len() ) - pSection->SetName( sSectName ); + { + pSection->SetSectionName( sSectName ); + } // ist eine Condition gesetzt if( pSection->IsHidden() && pSection->GetCondition().Len() ) @@ -1320,10 +1322,14 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c { // beim Move den Namen beibehalten if( rNds.GetDoc() == pDoc && pDoc->IsCopyIsMove() ) - pNewSect->SetName( GetSection().GetName() ); + { + pNewSect->SetSectionName( GetSection().GetSectionName() ); + } else - pNewSect->SetName( pDoc->GetUniqueSectionName( - &GetSection().GetName() ) ); + { + pNewSect->SetSectionName( + pDoc->GetUniqueSectionName( &GetSection().GetSectionName() )); + } } @@ -1461,7 +1467,7 @@ String SwDoc::GetUniqueSectionName( const String* pChkStr ) const for( n = 0; n < pSectionFmtTbl->Count(); ++n ) if( 0 != ( pSectNd = (*pSectionFmtTbl)[ n ]->GetSectionNode( FALSE ) )) { - const String& rNm = pSectNd->GetSection().GetName(); + const String& rNm = pSectNd->GetSection().GetSectionName(); if( rNm.Match( aName ) == nNmLen ) { // Nummer bestimmen und das Flag setzen diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 587a44d222..9b1bf3cfe8 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -130,7 +130,7 @@ SwSectionData::SwSectionData(SectionType const eType, String const& rName) // this must have the same semantics as operator=() SwSectionData::SwSectionData(SwSection const& rSection) : m_eType(rSection.GetType()) - , m_sSectionName(rSection.GetName()) + , m_sSectionName(rSection.GetSectionName()) , m_sCondition(rSection.GetCondition()) , m_sLinkFileName(rSection.GetLinkFileName()) , m_sLinkFilePassword(rSection.GetLinkFilePassword()) @@ -1006,7 +1006,8 @@ extern "C" { const SwSectionPtr pFSect = *(SwSectionPtr*)pFirst; const SwSectionPtr pSSect = *(SwSectionPtr*)pSecond; ASSERT( pFSect && pSSect, "ungueltige Sections" ); - StringCompare eCmp = pFSect->GetName().CompareTo( pSSect->GetName() ); + StringCompare const eCmp = + pFSect->GetSectionName().CompareTo( pSSect->GetSectionName() ); return eCmp == COMPARE_EQUAL ? 0 : eCmp == COMPARE_LESS ? 1 : -1; } diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 9e6fba9f4a..03df3e1514 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -1363,7 +1363,8 @@ uno::Any SwXTextSections::getByName(const OUString& Name) for(sal_uInt16 i = 0; i < rFmts.Count(); i++) { SwSectionFmt* pFmt = rFmts[i]; - if(pFmt->IsInNodesArr() && aName == pFmt->GetSection()->GetName()) + if (pFmt->IsInNodesArr() + && (aName == pFmt->GetSection()->GetSectionName())) { xSect = GetObject(*pFmt); aRet.setValue(&xSect, ::getCppuType((uno::Reference*)0)); @@ -1407,7 +1408,7 @@ uno::Sequence< OUString > SwXTextSections::getElementNames(void) { pFmt = rFmts[++nIndex]; } - pArray[i] = pFmt->GetSection()->GetName(); + pArray[i] = pFmt->GetSection()->GetSectionName(); } } return aSeq; @@ -1427,7 +1428,7 @@ sal_Bool SwXTextSections::hasByName(const OUString& Name) for(sal_uInt16 i = 0; i < rFmts.Count(); i++) { const SwSectionFmt* pFmt = rFmts[i]; - if(aName == pFmt->GetSection()->GetName()) + if (aName == pFmt->GetSection()->GetSectionName()) { bRet = sal_True; break; diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 637e7eee8a..a017d18164 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -1510,7 +1510,7 @@ OUString SAL_CALL SwXDocumentIndex::getName() throw (uno::RuntimeException) } else if(pSectionFmt) { - uRet = OUString(pSectionFmt->GetSection()->GetName()); + uRet = OUString(pSectionFmt->GetSection()->GetSectionName()); } else { diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 8ada9c556c..f828a08476 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -930,7 +930,8 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, UnoActionContext aContext(pDoc); for (sal_uInt16 i = 0; i < rFmts.Count(); i++) { - if (rFmts[i]->GetSection()->GetName() == pSect->GetName()) + if (rFmts[i]->GetSection()->GetSectionName() + == pSect->GetSectionName()) { pDoc->UpdateSection(i, *pSectionData, pItemSet.get(), pDoc->IsInReading()); @@ -1145,7 +1146,8 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, { if (pFmt) { - pRet[nProperty] <<= OUString(pFmt->GetSection()->GetName()); + pRet[nProperty] <<= + OUString(pFmt->GetSection()->GetSectionName()); } } break; @@ -1682,7 +1684,8 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) UnoActionContext aContext(pDoc); for (sal_uInt16 i = 0; i < rFmts.Count(); i++) { - if (rFmts[i]->GetSection()->GetName() == pSect->GetName()) + if (rFmts[i]->GetSection()->GetSectionName() + == pSect->GetSectionName()) { pDoc->UpdateSection(i, *pSectionData, pNewAttrSet.get(), pDoc->IsInReading()); @@ -1775,7 +1778,7 @@ OUString SAL_CALL SwXTextSection::getName() throw (uno::RuntimeException) SwSectionFmt const*const pFmt = m_pImpl->GetSectionFmt(); if(pFmt) { - sRet = pFmt->GetSection()->GetName(); + sRet = pFmt->GetSection()->GetSectionName(); } else if (m_pImpl->m_bIsDescriptor) { @@ -1811,7 +1814,7 @@ throw (uno::RuntimeException) { nApplyPos = i; } - else if(sNewName == rFmts[i]->GetSection()->GetName()) + else if (sNewName == rFmts[i]->GetSection()->GetSectionName()) { throw uno::RuntimeException(); } diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 0882f46e3c..8c84dd9777 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -313,7 +313,8 @@ ULONG SwHTMLWriter::WriteStream() // nur das Tag fuer die Section merken ByteString aName; - HTMLOutFuncs::ConvertStringToHTML( pSNd->GetSection().GetName(), + HTMLOutFuncs::ConvertStringToHTML( + pSNd->GetSection().GetSectionName(), aName, eDestEnc, &aNonConvertableCharacters ); ByteString sOut( '<' ); @@ -541,7 +542,7 @@ void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt, ByteString sOut( '<' ); sOut += pTag; - const String& rName = rSection.GetName(); + const String& rName = rSection.GetSectionName(); if( rName.Len() && !bContinued ) { ((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_id) += "=\""; diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index b775624cd4..3a0403165d 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -103,7 +103,8 @@ void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION && TOX_HEADER_SECTION != eTmpType ) { - String* pString = new String(pFmt->GetSection()->GetName()); + String* pString = + new String(pFmt->GetSection()->GetSectionName()); if(pAvailNames) pAvailNames->InsertEntry(*pString); rSubRegions.InsertEntry(*pString); @@ -123,7 +124,8 @@ void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION && TOX_HEADER_SECTION != eTmpType ) { - String* pString = new String(pFmt->GetSection()->GetName()); + String* pString = + new String(pFmt->GetSection()->GetSectionName()); if(pAvailNames) pAvailNames->InsertEntry(*pString); rSubRegions.InsertEntry(*pString); @@ -470,7 +472,7 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry SectRepr* pSectRepr = new SectRepr( n, *(pSect=pFmt->GetSection()) ); Image aImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), FALSE); - pEntry = aTree.InsertEntry( pSect->GetName(), aImg, aImg ); + pEntry = aTree.InsertEntry(pSect->GetSectionName(), aImg, aImg); Image aHCImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), TRUE); aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST); aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST); @@ -503,7 +505,8 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry FindArrPos( pSect->GetFmt() ), *pSect ); Image aImage = BuildBitmap( pSect->IsProtect(), pSect->IsHidden(), FALSE); - pNEntry=aTree.InsertEntry( pSect->GetName(), aImage, aImage, pEntry); + pNEntry = aTree.InsertEntry( + pSect->GetSectionName(), aImage, aImage, pEntry); Image aHCImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), TRUE); aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST); aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST); diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 4c393be565..780086ac2c 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -1370,12 +1370,12 @@ void SwView::StateStatusLine(SfxItemSet &rSet) { ASSERT( !this, "was ist das fuer ein Verzeichnis?" ); - sStr = pCurrSect->GetName(); + sStr = pCurrSect->GetSectionName(); } } break; default: - sStr = pCurrSect->GetName(); + sStr = pCurrSect->GetSectionName(); break; } } diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index c417c21c47..ea944dd47d 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -335,7 +335,8 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow) (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION && TOX_HEADER_SECTION != eTmpType ) { - const String& rSectionName = pFmt->GetSection()->GetName(); + const String& rSectionName = + pFmt->GetSection()->GetSectionName(); BYTE nLevel = 0; SwSectionFmt* pParentFmt = pFmt->GetParent(); while(pParentFmt) @@ -697,7 +698,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged) (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION && TOX_HEADER_SECTION != eTmpType ) { - String sSectionName = pFmt->GetSection()->GetName(); + String sSectionName = pFmt->GetSection()->GetSectionName(); BYTE nLevel = 0; SwSectionFmt* pParentFmt = pFmt->GetParent(); diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx index 80117167fa..31789382ec 100644 --- a/sw/source/ui/utlui/glbltree.cxx +++ b/sw/source/ui/utlui/glbltree.cxx @@ -767,7 +767,7 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData) case GLBLDOC_SECTION: { const SwSection* pSect = pCont->GetSection(); - sEntry = pSect->GetName(); + sEntry = pSect->GetSectionName(); aImage = aEntryImages.GetImage(SID_SW_START + CONTENT_TYPE_REGION); } break; @@ -935,7 +935,8 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry ) case CTX_EDIT_LINK: { DBG_ASSERT(pCont, "Edit ohne Entry ? " ); - SfxStringItem aName(FN_EDIT_REGION, pCont->GetSection()->GetName()); + SfxStringItem aName(FN_EDIT_REGION, + pCont->GetSection()->GetSectionName()); rDispatch.Execute(FN_EDIT_REGION, SFX_CALLMODE_ASYNCHRON, &aName, 0L); } break; @@ -1242,7 +1243,7 @@ BOOL SwGlobalTree::Update(BOOL bHard) String sTemp = GetEntryText(pEntry); if(eType != pRight->GetType() || eType == GLBLDOC_SECTION && - pLeft->GetSection()->GetName() != sTemp || + (pLeft->GetSection()->GetSectionName() != sTemp) || eType == GLBLDOC_TOXBASE && pLeft->GetTOX()->GetTitle() != sTemp) bCopy = bRet = TRUE; } @@ -1444,7 +1445,8 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen while ( nCount < nSectCount ) { const SwSectionFmt& rFmt = rSh.GetSectionFmt(nCount); - if ( rFmt.GetSection()->GetName() == sTempSectionName && rFmt.IsInNodesArr() ) + if ((rFmt.GetSection()->GetSectionName() == sTempSectionName) + && rFmt.IsInNodesArr()) { nCount = 0; nAddNumber++; -- cgit v1.2.3 From e5dc3c471930249e74f5957d173791f0720933d2 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:31 +0100 Subject: odfmetadata4: #i109599#: rename SwSection members --- sw/inc/section.hxx | 25 +++++++++--------- sw/source/core/docnode/section.cxx | 52 ++++++++++++++++++++++---------------- 2 files changed, 43 insertions(+), 34 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index c0e7ad0626..8f0b98dde3 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -170,8 +170,8 @@ class SW_DLLPUBLIC SwSection private: SwSectionData m_Data; - SwServerObjectRef refObj; // falls DataServer -> Pointer gesetzt - ::sfx2::SvBaseLinkRef refLink; + SwServerObjectRef m_RefObj; // set if DataServer + ::sfx2::SvBaseLinkRef m_RefLink; SW_DLLPRIVATE void ImplSetHiddenFlag( bool const bHidden, bool const bCondition); @@ -243,20 +243,21 @@ public: // Daten Server-Methoden void SetRefObject( SwServerObject* pObj ); - const SwServerObject* GetObject() const { return &refObj; } - SwServerObject* GetObject() { return &refObj; } - BOOL IsServer() const { return refObj.Is(); } + const SwServerObject* GetObject() const { return & m_RefObj; } + SwServerObject* GetObject() { return & m_RefObj; } + bool IsServer() const { return m_RefObj.Is(); } // Methoden fuer gelinkte Bereiche - USHORT GetUpdateType() const { return refLink->GetUpdateMode(); } - void SetUpdateType( USHORT nType ) { refLink->SetUpdateMode( nType ); } + USHORT GetUpdateType() const { return m_RefLink->GetUpdateMode(); } + void SetUpdateType(USHORT const nType ) + { m_RefLink->SetUpdateMode(nType); } - BOOL IsConnected() const { return refLink.Is(); } - void UpdateNow() { refLink->Update(); } - void Disconnect() { refLink->Disconnect(); } + bool IsConnected() const { return m_RefLink.Is(); } + void UpdateNow() { m_RefLink->Update(); } + void Disconnect() { m_RefLink->Disconnect(); } - const ::sfx2::SvBaseLink& GetBaseLink() const { return *refLink; } - ::sfx2::SvBaseLink& GetBaseLink() { return *refLink; } + const ::sfx2::SvBaseLink& GetBaseLink() const { return *m_RefLink; } + ::sfx2::SvBaseLink& GetBaseLink() { return *m_RefLink; } void CreateLink( LinkCreateType eType ); diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 9b1bf3cfe8..5e5b7c0f68 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -257,11 +257,13 @@ SwSection::~SwSection() if (CONTENT_SECTION != m_Data.GetType()) { - pDoc->GetLinkManager().Remove( refLink ); + pDoc->GetLinkManager().Remove( m_RefLink ); } - if( refObj.Is() ) // als Server austragen - pDoc->GetLinkManager().RemoveServer( &refObj ); + if (m_RefObj.Is()) + { + pDoc->GetLinkManager().RemoveServer( &m_RefObj ); + } // ist die Section der letzte Client im Format, kann dieses // geloescht werden @@ -277,8 +279,10 @@ SwSection::~SwSection() pDoc->DoUndo( bUndo ); } } - if( refObj.Is() ) - refObj->Closed(); + if (m_RefObj.Is()) + { + m_RefObj->Closed(); + } } void SwSection::SetSectionData(SwSectionData const& rData) @@ -557,7 +561,7 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) void SwSection::SetRefObject( SwServerObject* pObj ) { - refObj = pObj; + m_RefObj = pObj; } @@ -574,21 +578,21 @@ void SwSection::SetCondHidden(bool const bFlag) // setze/erfrage den gelinkten FileNamen const String& SwSection::GetLinkFileName() const { - if( refLink.Is() ) + if (m_RefLink.Is()) { String sTmp; switch (m_Data.GetType()) { case DDE_LINK_SECTION: - sTmp = refLink->GetLinkSourceName(); + sTmp = m_RefLink->GetLinkSourceName(); break; case FILE_LINK_SECTION: { String sRange, sFilter; - if( refLink->GetLinkManager() && - refLink->GetLinkManager()->GetDisplayNames( - refLink, 0, &sTmp, &sRange, &sFilter ) ) + if (m_RefLink->GetLinkManager() && + m_RefLink->GetLinkManager()->GetDisplayNames( + m_RefLink, 0, &sTmp, &sRange, &sFilter )) { ( sTmp += sfx2::cTokenSeperator ) += sFilter; ( sTmp += sfx2::cTokenSeperator ) += sRange; @@ -612,9 +616,9 @@ const String& SwSection::GetLinkFileName() const void SwSection::SetLinkFileName(const String& rNew, String const*const pPassWd) { - if( refLink.Is() ) + if (m_RefLink.Is()) { - refLink->SetLinkSourceName( rNew ); + m_RefLink->SetLinkSourceName( rNew ); } m_Data.SetLinkFileName(rNew); if( pPassWd ) @@ -1708,14 +1712,18 @@ void SwSection::CreateLink( LinkCreateType eCreateType ) USHORT nUpdateType = sfx2::LINKUPDATE_ALWAYS; - if( !refLink.Is() ) - // dann mal den BaseLink aufbauen - refLink = new SwIntrnlSectRefLink( *pFmt, nUpdateType, FORMAT_RTF ); + if (!m_RefLink.Is()) + { + // create BaseLink + m_RefLink = new SwIntrnlSectRefLink( *pFmt, nUpdateType, FORMAT_RTF ); + } else - // sonst aus dem Linkmanager entfernen - pFmt->GetDoc()->GetLinkManager().Remove( refLink ); + { + pFmt->GetDoc()->GetLinkManager().Remove( m_RefLink ); + } - SwIntrnlSectRefLink* pLnk = (SwIntrnlSectRefLink*)&refLink; + SwIntrnlSectRefLink *const pLnk = + static_cast(& m_RefLink); String sCmd( m_Data.GetLinkFileName() ); xub_StrLen nPos; @@ -1773,15 +1781,15 @@ void SwSection::BreakLink() } // release link, if it exists - if ( refLink.Is() ) + if (m_RefLink.Is()) { SwSectionFmt *const pFormat( GetFmt() ); ASSERT(pFormat, "SwSection::BreakLink: no format?"); if (pFormat) { - pFormat->GetDoc()->GetLinkManager().Remove( refLink ); + pFormat->GetDoc()->GetLinkManager().Remove( m_RefLink ); } - refLink.Clear(); + m_RefLink.Clear(); } // change type SetType( CONTENT_SECTION ); -- cgit v1.2.3 From af98f8dcd9f6752d7d0fa4efad22428b1fedf042 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:32 +0100 Subject: odfmetadata4: #i109599#: make SwSectionNode::pSection member const --- sw/inc/node.hxx | 30 +++++++++------- sw/source/core/docnode/ndsect.cxx | 74 ++++++++++++++++++++++++--------------- 2 files changed, 63 insertions(+), 41 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index 9aad9c8546..47f58ce3ca 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -25,18 +25,23 @@ * ************************************************************************/ -#ifndef _NODE_HXX -#define _NODE_HXX +#ifndef SW_NODE_HXX +#define SW_NODE_HXX + +#include + +#include +#include #include #include + #include "swdllapi.h" #include #include #include #include -#include -#include + // --------------------- // forward Deklarationen // --------------------- @@ -548,10 +553,15 @@ private: //--------- // SwSectionNode //--------- -class SwSectionNode : public SwStartNode +class SwSectionNode + : public SwStartNode + , private ::boost::noncopyable { friend class SwNodes; - SwSection* pSection; + +private: + ::std::auto_ptr const m_pSection; + protected: virtual ~SwSectionNode(); @@ -559,8 +569,8 @@ public: SwSectionNode(SwNodeIndex const&, SwSectionFmt & rFmt, SwTOXBase const*const pTOXBase); - const SwSection& GetSection() const { return *pSection; } - SwSection& GetSection() { return *pSection; } + const SwSection& GetSection() const { return *m_pSection; } + SwSection& GetSection() { return *m_pSection; } SwFrm *MakeFrm(); @@ -589,10 +599,6 @@ public: // _nicht_ in einem versteckten (Unter-)Bereich liegt BOOL IsCntntHidden() const; -private: - // privater Constructor, weil nie kopiert werden darf !! - SwSectionNode( const SwSection& rNode ); - SwSectionNode & operator= ( const SwSection& rNode ); }; diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 8e266c981f..d24b3caf58 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -1021,20 +1021,28 @@ SwSectionNode* SwNode::FindSectionNode() // SwSectionNode //--------- -SwSectionNode::SwSectionNode(SwNodeIndex const& rIdx, - SwSectionFmt & rFmt, SwTOXBase const*const pTOXBase) - : SwStartNode( rIdx, ND_SECTIONNODE ) +// ugly hack to make m_pSection const +static SwSectionFmt & +lcl_initParent(SwSectionNode & rThis, SwSectionFmt & rFmt) { - SwSectionNode* pParent = StartOfSectionNode()->FindSectionNode(); + SwSectionNode *const pParent = + rThis.StartOfSectionNode()->FindSectionNode(); if( pParent ) { // das Format beim richtigen Parent anmelden. rFmt.SetDerivedFrom( pParent->GetSection().GetFmt() ); } - pSection = (pTOXBase) - ? new SwTOXBaseSection(*pTOXBase, rFmt) - : new SwSection( CONTENT_SECTION, rFmt.GetName(), rFmt ); + return rFmt; +} +SwSectionNode::SwSectionNode(SwNodeIndex const& rIdx, + SwSectionFmt & rFmt, SwTOXBase const*const pTOXBase) + : SwStartNode( rIdx, ND_SECTIONNODE ) + , m_pSection( (pTOXBase) + ? new SwTOXBaseSection(*pTOXBase, lcl_initParent(*this, rFmt)) + : new SwSection( CONTENT_SECTION, rFmt.GetName(), + lcl_initParent(*this, rFmt) ) ) +{ // jetzt noch die Verbindung von Format zum Node setzen // Modify unterdruecken, interresiert keinen rFmt.LockModify(); @@ -1075,7 +1083,7 @@ SwFrm* SwClearDummies( SwFrm* pFrm ) SwSectionNode::~SwSectionNode() { { - SwClientIter aIter( *(pSection->GetFmt()) ); + SwClientIter aIter( *(m_pSection->GetFmt()) ); SwClient *pLast = aIter.GoStart(); while ( pLast ) { @@ -1091,7 +1099,7 @@ SwSectionNode::~SwSectionNode() } SwDoc* pDoc = GetDoc(); - SwSectionFmt* pFmt = pSection->GetFmt(); + SwSectionFmt* pFmt = m_pSection->GetFmt(); if( pFmt ) { // das Attribut entfernen, weil die Section ihr Format loescht @@ -1105,15 +1113,14 @@ SwSectionNode::~SwSectionNode() // verhinder beim Loeschen aus der Undo/Redo-History einen rekursiven Aufruf if( bUndo && &pDoc->GetNodes() != &GetNodes() ) pDoc->DoUndo( FALSE ); - DELETEZ( pSection ); pDoc->DoUndo( bUndo ); } SwFrm *SwSectionNode::MakeFrm() { - pSection->m_Data.SetHiddenFlag(false); - return new SwSectionFrm( *pSection ); + m_pSection->m_Data.SetHiddenFlag(false); + return new SwSectionFrm( *m_pSection ); } //Methode erzeugt fuer den vorhergehenden Node alle Ansichten vom @@ -1240,7 +1247,7 @@ void SwSectionNode::MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEndIdx ) *pIdxBehind = *this; - pSection->m_Data.SetHiddenFlag(true); + m_pSection->m_Data.SetHiddenFlag(true); if( rNds.IsDocNodes() ) { @@ -1264,10 +1271,10 @@ void SwSectionNode::DelFrms() } SwNodes& rNds = GetNodes(); - pSection->GetFmt()->DelFrms(); + m_pSection->GetFmt()->DelFrms(); // unser Flag muessen wir noch aktualisieren - pSection->m_Data.SetHiddenFlag(true); + m_pSection->m_Data.SetHiddenFlag(true); // Bug 30582: falls der Bereich in Fly oder TabellenBox ist, dann // kann er nur "gehiddet" werden, wenn weiterer Content @@ -1286,7 +1293,7 @@ void SwSectionNode::DelFrms() // OD 04.11.2003 #i21457# !lcl_IsInSameTblBox( rNds, *EndOfSectionNode(), false )) { - pSection->m_Data.SetHiddenFlag(false); + m_pSection->m_Data.SetHiddenFlag(false); } } } @@ -1316,7 +1323,7 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c SwNodeIndex aInsPos( *pEndNd ); // Werte uebertragen - SwSection* pNewSect = pSectNd->pSection; + SwSection *const pNewSect = pSectNd->m_pSection.get(); if (TOX_CONTENT_SECTION != GetSection().GetType()) { @@ -1358,9 +1365,9 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c : CREATE_NONE ); // falls als Server aus dem Undo kopiert wird, wieder eintragen - if( pSection->IsServer() && pDoc->GetUndoNds() == &rNds ) + if (m_pSection->IsServer() && (pDoc->GetUndoNds() == &rNds)) { - pNewSect->SetRefObject( pSection->GetObject() ); + pNewSect->SetRefObject( m_pSection->GetObject() ); pDoc->GetLinkManager().InsertServer( pNewSect->GetObject() ); } @@ -1369,7 +1376,8 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c BOOL SwSectionNode::IsCntntHidden() const { - ASSERT( !pSection->IsHidden(), "That's simple: Hidden Section => Hidden Content" ); + ASSERT( !m_pSection->IsHidden(), + "That's simple: Hidden Section => Hidden Content" ); SwNodeIndex aTmp( *this, 1 ); ULONG nEnd = EndOfSectionIndex(); while( aTmp < nEnd ) @@ -1395,7 +1403,7 @@ BOOL SwSectionNode::IsCntntHidden() const void SwSectionNode::NodesArrChgd() { - SwSectionFmt* pFmt = pSection->GetFmt(); + SwSectionFmt *const pFmt = m_pSection->GetFmt(); if( pFmt ) { SwNodes& rNds = GetNodes(); @@ -1431,20 +1439,28 @@ void SwSectionNode::NodesArrChgd() { ASSERT( pDoc == GetDoc(), "verschieben in unterschiedliche Documente?" ); - if( pSection->IsLinkType() ) // den Link austragen - pSection->CreateLink( pDoc->GetRootFrm() ? CREATE_CONNECT + if (m_pSection->IsLinkType()) + { + m_pSection->CreateLink( pDoc->GetRootFrm() ? CREATE_CONNECT : CREATE_NONE ); + } - if( pSection->IsServer() ) // als Server austragen - pDoc->GetLinkManager().InsertServer( pSection->GetObject() ); + if (m_pSection->IsServer()) + { + pDoc->GetLinkManager().InsertServer( m_pSection->GetObject() ); + } } else { - if( CONTENT_SECTION != pSection->GetType() ) // den Link austragen - pDoc->GetLinkManager().Remove( &pSection->GetBaseLink() ); + if (CONTENT_SECTION != m_pSection->GetType()) + { + pDoc->GetLinkManager().Remove( &m_pSection->GetBaseLink() ); + } - if( pSection->IsServer() ) // als Server austragen - pDoc->GetLinkManager().RemoveServer( pSection->GetObject() ); + if (m_pSection->IsServer()) + { + pDoc->GetLinkManager().RemoveServer( m_pSection->GetObject() ); + } } } } -- cgit v1.2.3 From 224269ae0b27eed14a65d5d547af4a5a8bc84417 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:32 +0100 Subject: odfmetadata4: #i109599#: clean up SwUndoInsSection --- sw/inc/undobj.hxx | 48 ++++++++++---------- sw/source/core/undo/unsect.cxx | 99 +++++++++++++++++++++++------------------- 2 files changed, 80 insertions(+), 67 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index 8216b32396..e08fb22e29 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -24,8 +24,18 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _UNDOBJ_HXX -#define _UNDOBJ_HXX +#ifndef SW_UNDOBJ_HXX +#define SW_UNDOBJ_HXX + +// --> OD 2006-11-01 #130889# +#include +// <-- +#include + +#include + +#include + #include #ifndef _SVSTDARR_HXX #define _SVSTDARR_USHORTS @@ -36,23 +46,16 @@ #include #endif #include -#include + +#include // #111827# + #include #include #include #include -#include // #111827# - #include - #include #include -// --> OD 2006-11-01 #130889# -#include -// <-- - -#include -#include class SwUndoIter; @@ -1381,15 +1384,16 @@ public: class SwUndoInsSection : public SwUndo, private SwUndRng { - SwHistory* pHistory; +private: const ::std::auto_ptr m_pSectionData; const ::std::auto_ptr m_pTOXBase; /// set iff section is TOX - SwRedlineData* pRedlData; - SfxItemSet* pAttr; - ULONG nSectNodePos; - BOOL bSplitAtStt : 1; - BOOL bSplitAtEnd : 1; - BOOL bUpdateFtn : 1; + const ::std::auto_ptr m_pAttrSet; + ::std::auto_ptr m_pHistory; + ::std::auto_ptr m_pRedlData; + ULONG m_nSectionNodePos; + bool m_bSplitAtStart : 1; + bool m_bSplitAtEnd : 1; + bool m_bUpdateFtn : 1; void Join( SwDoc& rDoc, ULONG nNode ); @@ -1402,9 +1406,9 @@ public: virtual void Repeat( SwUndoIter& ); OUT_UNDOBJ( SwUndoInsSection ) - void SetSectNdPos( ULONG nPos ) { nSectNodePos = nPos; } - void SaveSplitNode( SwTxtNode* pTxtNd, BOOL bAtStt ); - void SetUpdtFtnFlag( BOOL bFlag ) { bUpdateFtn = bFlag; } + void SetSectNdPos(ULONG const nPos) { m_nSectionNodePos = nPos; } + void SaveSplitNode(SwTxtNode *const pTxtNd, bool const bAtStart); + void SetUpdtFtnFlag(bool const bFlag) { m_bUpdateFtn = bFlag; } }; class SwUndoDelSection : public SwUndo diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx index fe81a1d623..3fe70d0c16 100644 --- a/sw/source/core/undo/unsect.cxx +++ b/sw/source/core/undo/unsect.cxx @@ -78,25 +78,24 @@ SwUndoInsSection::SwUndoInsSection( SwPaM const& rPam, SwSectionData const& rNewData, SfxItemSet const*const pSet, SwTOXBase const*const pTOXBase) : SwUndo( UNDO_INSSECTION ), SwUndRng( rPam ) - , pHistory( 0 ) , m_pSectionData(new SwSectionData(rNewData)) - , m_pTOXBase(pTOXBase ? new SwTOXBase(*pTOXBase) : 0) - , pRedlData( 0 ), pAttr( 0 ), nSectNodePos( 0 ) + , m_pTOXBase( (pTOXBase) ? new SwTOXBase(*pTOXBase) : 0 ) + , m_pAttrSet( (pSet && pSet->Count()) ? new SfxItemSet( *pSet ) : 0 ) + , m_pHistory(0) + , m_pRedlData(0) + , m_nSectionNodePos(0) + , m_bSplitAtStart(false) + , m_bSplitAtEnd(false) + , m_bUpdateFtn(false) { SwDoc& rDoc = *(SwDoc*)rPam.GetDoc(); if( rDoc.IsRedlineOn() ) { - pRedlData = new SwRedlineData( nsRedlineType_t::REDLINE_INSERT, - rDoc.GetRedlineAuthor() ); + m_pRedlData.reset(new SwRedlineData( nsRedlineType_t::REDLINE_INSERT, + rDoc.GetRedlineAuthor() )); SetRedlineMode( rDoc.GetRedlineMode() ); } - bSplitAtStt = FALSE; - bSplitAtEnd = FALSE; - bUpdateFtn = FALSE; - - if( pSet && pSet->Count() ) - pAttr = new SfxItemSet( *pSet ); if( !rPam.HasMark() ) { @@ -109,32 +108,25 @@ SwUndoInsSection::SwUndoInsSection( aBrkSet.Put( *pCNd->GetpSwAttrSet() ); if( aBrkSet.Count() ) { - pHistory = new SwHistory; - pHistory->CopyFmtAttr( aBrkSet, pCNd->GetIndex() ); + m_pHistory.reset( new SwHistory ); + m_pHistory->CopyFmtAttr( aBrkSet, pCNd->GetIndex() ); } } } } - SwUndoInsSection::~SwUndoInsSection() { - delete pRedlData; - delete pAttr; - - if( pHistory ) - delete pHistory; } - - void SwUndoInsSection::Undo( SwUndoIter& rUndoIter ) { SwDoc& rDoc = rUndoIter.GetDoc(); - RemoveIdxFromSection( rDoc, nSectNodePos ); + RemoveIdxFromSection( rDoc, m_nSectionNodePos ); - SwSectionNode* pNd = rDoc.GetNodes()[ nSectNodePos ]->GetSectionNode(); + SwSectionNode *const pNd = + rDoc.GetNodes()[ m_nSectionNodePos ]->GetSectionNode(); ASSERT( pNd, "wo ist mein SectionNode?" ); if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() )) @@ -152,19 +144,25 @@ void SwUndoInsSection::Undo( SwUndoIter& rUndoIter ) rDoc.DelSectionFmt( pNd->GetSection().GetFmt() ); // muessen wir noch zusammenfassen ? - if( bSplitAtStt ) + if (m_bSplitAtStart) + { Join( rDoc, nSttNode ); + } - if( bSplitAtEnd ) + if (m_bSplitAtEnd) + { Join( rDoc, nEndNode ); + } - if ( pHistory ) + if (m_pHistory.get()) { - pHistory->TmpRollback( &rDoc, 0, false ); + m_pHistory->TmpRollback( &rDoc, 0, false ); } - if( bUpdateFtn ) + if (m_bUpdateFtn) + { rDoc.GetFtnIdxs().UpdateFtn( aIdx ); + } SetPaM( rUndoIter ); } @@ -179,25 +177,29 @@ void SwUndoInsSection::Redo( SwUndoIter& rUndoIter ) if (m_pTOXBase.get()) { pUpdateTOX = rDoc.InsertTableOf( *rUndoIter.pAktPam->GetPoint(), - *m_pTOXBase, pAttr, TRUE ); + *m_pTOXBase, m_pAttrSet.get(), true); } else { rDoc.InsertSwSection(*rUndoIter.pAktPam, - *m_pSectionData, 0, pAttr, true); + *m_pSectionData, 0, m_pAttrSet.get(), true); } - if( pHistory ) - pHistory->SetTmpEnd( pHistory->Count() ); + if (m_pHistory.get()) + { + m_pHistory->SetTmpEnd( m_pHistory->Count() ); + } - SwSectionNode* pSectNd = rDoc.GetNodes()[ nSectNodePos ]->GetSectionNode(); - if( pRedlData && IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() )) + SwSectionNode *const pSectNd = + rDoc.GetNodes()[ m_nSectionNodePos ]->GetSectionNode(); + if (m_pRedlData.get() && + IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode())) { RedlineMode_t eOld = rDoc.GetRedlineMode(); rDoc.SetRedlineMode_intern((RedlineMode_t)(eOld & ~nsRedlineMode_t::REDLINE_IGNORE)); SwPaM aPam( *pSectNd->EndOfSectionNode(), *pSectNd, 1 ); - rDoc.AppendRedline( new SwRedline( *pRedlData, aPam ), true); + rDoc.AppendRedline( new SwRedline( *m_pRedlData, aPam ), true); rDoc.SetRedlineMode_intern( eOld ); } else if( !( nsRedlineMode_t::REDLINE_IGNORE & GetRedlineMode() ) && @@ -225,12 +227,12 @@ void SwUndoInsSection::Repeat( SwUndoIter& rUndoIter ) if (m_pTOXBase.get()) { rUndoIter.GetDoc().InsertTableOf( *rUndoIter.pAktPam->GetPoint(), - *m_pTOXBase, pAttr, TRUE ); + *m_pTOXBase, m_pAttrSet.get(), true); } else { rUndoIter.GetDoc().InsertSwSection( *rUndoIter.pAktPam, - *m_pSectionData, 0, pAttr); + *m_pSectionData, 0, m_pAttrSet.get()); } } @@ -247,7 +249,7 @@ void SwUndoInsSection::Join( SwDoc& rDoc, ULONG nNode ) } pTxtNd->JoinNext(); - if( pHistory ) + if (m_pHistory.get()) { SwIndex aCntIdx( pTxtNd, 0 ); pTxtNd->RstAttr( aCntIdx, pTxtNd->Len(), 0, 0, true ); @@ -255,20 +257,27 @@ void SwUndoInsSection::Join( SwDoc& rDoc, ULONG nNode ) } -void SwUndoInsSection::SaveSplitNode( SwTxtNode* pTxtNd, BOOL bAtStt ) +void +SwUndoInsSection::SaveSplitNode(SwTxtNode *const pTxtNd, bool const bAtStart) { if( pTxtNd->GetpSwpHints() ) { - if( !pHistory ) - pHistory = new SwHistory; - pHistory->CopyAttr( pTxtNd->GetpSwpHints(), pTxtNd->GetIndex(), 0, + if (!m_pHistory.get()) + { + m_pHistory.reset( new SwHistory ); + } + m_pHistory->CopyAttr( pTxtNd->GetpSwpHints(), pTxtNd->GetIndex(), 0, pTxtNd->GetTxt().Len(), false ); } - if( bAtStt ) - bSplitAtStt = TRUE; + if (bAtStart) + { + m_bSplitAtStart = true; + } else - bSplitAtEnd = TRUE; + { + m_bSplitAtEnd = true; + } } -- cgit v1.2.3 From a00bad08577cad79b054fed868c23896ea6af717 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:32 +0100 Subject: odfmetadata4: #i109599#: clean up SwUndoDelSection, and move it to unsect.cxx --- sw/inc/undobj.hxx | 14 +------- sw/source/core/docnode/ndsect.cxx | 2 +- sw/source/core/undo/unsect.cxx | 73 +++++++++++++++++++++++++-------------- 3 files changed, 50 insertions(+), 39 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index e08fb22e29..9633de7b37 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -1411,19 +1411,7 @@ public: void SetUpdtFtnFlag(bool const bFlag) { m_bUpdateFtn = bFlag; } }; -class SwUndoDelSection : public SwUndo -{ - ULONG nSttNd, nEndNd; - ::std::auto_ptr m_pSectionData; /// set iff section not TOX - ::std::auto_ptr m_pTOXBase; /// set iff section is TOX - SfxItemSet* pAttr; -public: - SwUndoDelSection( const SwSectionFmt& ); - virtual ~SwUndoDelSection(); - virtual void Undo( SwUndoIter& ); - virtual void Redo( SwUndoIter& ); - OUT_UNDOBJ( SwUndoDelSection ) -}; +SW_DLLPRIVATE SwUndo * MakeUndoDelSection(SwSectionFmt const&); class SwUndoChgSection : public SwUndo { diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index d24b3caf58..e9e367b7d9 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -558,7 +558,7 @@ void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, BOOL bDelNodes ) EndUndo(UNDO_DELSECTION, NULL); return ; } - AppendUndo( new SwUndoDelSection( *pFmt ) ); + AppendUndo( MakeUndoDelSection( *pFmt ) ); } else if( bDelNodes && pIdx && &GetNodes() == &pIdx->GetNodes() && 0 != (pSectNd = pIdx->GetNode().GetSectionNode() )) diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx index 3fe70d0c16..093bae25df 100644 --- a/sw/source/core/undo/unsect.cxx +++ b/sw/source/core/undo/unsect.cxx @@ -74,6 +74,9 @@ SfxItemSet* lcl_GetAttrSet( const SwSection& rSect ) return pAttr; } + +//////////////////////////////////////////////////////////////////////////// + SwUndoInsSection::SwUndoInsSection( SwPaM const& rPam, SwSectionData const& rNewData, SfxItemSet const*const pSet, SwTOXBase const*const pTOXBase) @@ -281,48 +284,67 @@ SwUndoInsSection::SaveSplitNode(SwTxtNode *const pTxtNd, bool const bAtStart) } -// ----------------------------- +//////////////////////////////////////////////////////////////////////////// -SwUndoDelSection::SwUndoDelSection( const SwSectionFmt& rFmt ) - : SwUndo( UNDO_DELSECTION ) +class SwUndoDelSection + : public SwUndo { - const SwSection& rSect = *rFmt.GetSection(); - if( rSect.ISA( SwTOXBaseSection )) - { - m_pTOXBase.reset( - new SwTOXBase(static_cast(rSect)) ); - } - m_pSectionData.reset( new SwSectionData(rSect) ); - - pAttr = ::lcl_GetAttrSet( rSect ); - - const SwNodeIndex* pIdx = rFmt.GetCntnt().GetCntntIdx(); - nSttNd = pIdx->GetIndex(); - nEndNd = pIdx->GetNode().EndOfSectionIndex(); +private: + ::std::auto_ptr const m_pSectionData; /// section not TOX + ::std::auto_ptr const m_pTOXBase; /// set iff section is TOX + ::std::auto_ptr const m_pAttrSet; + ULONG const m_nStartNode; + ULONG const m_nEndNode; + +public: + SwUndoDelSection(SwSection const&, SwNodeIndex const*const); + virtual ~SwUndoDelSection(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + OUT_UNDOBJ( SwUndoDelSection ) +}; + +SW_DLLPRIVATE SwUndo * MakeUndoDelSection(SwSectionFmt const& rFormat) +{ + return new SwUndoDelSection(*rFormat.GetSection(), + rFormat.GetCntnt().GetCntntIdx()); } +SwUndoDelSection::SwUndoDelSection( + SwSection const& rSection, SwNodeIndex const*const pIndex) + : SwUndo( UNDO_DELSECTION ) + , m_pSectionData( new SwSectionData(rSection) ) + , m_pTOXBase( rSection.ISA( SwTOXBaseSection ) + ? new SwTOXBase(static_cast(rSection)) + : 0 ) + , m_pAttrSet( ::lcl_GetAttrSet(rSection) ) + , m_nStartNode( pIndex->GetIndex() ) + , m_nEndNode( pIndex->GetNode().EndOfSectionIndex() ) +{ +} SwUndoDelSection::~SwUndoDelSection() { - delete pAttr; } - void SwUndoDelSection::Undo( SwUndoIter& rUndoIter ) { SwDoc& rDoc = rUndoIter.GetDoc(); if (m_pTOXBase.get()) { - rDoc.InsertTableOf( nSttNd, nEndNd-2, *m_pTOXBase, pAttr ); + rDoc.InsertTableOf(m_nStartNode, m_nEndNode-2, *m_pTOXBase, + m_pAttrSet.get()); } else { - SwNodeIndex aStt( rDoc.GetNodes(), nSttNd ); - SwNodeIndex aEnd( rDoc.GetNodes(), nEndNd-2 ); + SwNodeIndex aStt( rDoc.GetNodes(), m_nStartNode ); + SwNodeIndex aEnd( rDoc.GetNodes(), m_nEndNode-2 ); SwSectionFmt* pFmt = rDoc.MakeSectionFmt( 0 ); - if( pAttr ) - pFmt->SetFmtAttr( *pAttr ); + if (m_pAttrSet.get()) + { + pFmt->SetFmtAttr( *m_pAttrSet ); + } /// OD 04.10.2002 #102894# /// remember inserted section node for further calculations @@ -357,18 +379,19 @@ void SwUndoDelSection::Undo( SwUndoIter& rUndoIter ) } } - void SwUndoDelSection::Redo( SwUndoIter& rUndoIter ) { SwDoc& rDoc = rUndoIter.GetDoc(); - SwSectionNode* pNd = rDoc.GetNodes()[ nSttNd ]->GetSectionNode(); + SwSectionNode *const pNd = + rDoc.GetNodes()[ m_nStartNode ]->GetSectionNode(); ASSERT( pNd, "wo ist mein SectionNode?" ); // einfach das Format loeschen, der Rest erfolgt automatisch rDoc.DelSectionFmt( pNd->GetSection().GetFmt() ); } +//////////////////////////////////////////////////////////////////////////// SwUndoChgSection::SwUndoChgSection( const SwSectionFmt& rFmt, BOOL bOnlyAttr ) : SwUndo( UNDO_CHGSECTION ), bOnlyAttrChgd( bOnlyAttr ) -- cgit v1.2.3 From adb2d0f804a37a0c4b7ef298e49eb3f6adfc1b26 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:33 +0100 Subject: odfmetadata4: #i109599#: clean up SwUndoChgSection, and move it to unsect.cxx --- sw/inc/undobj.hxx | 15 ++------- sw/source/core/docnode/ndsect.cxx | 4 +-- sw/source/core/undo/unsect.cxx | 69 ++++++++++++++++++++++++++------------- 3 files changed, 50 insertions(+), 38 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index 9633de7b37..3bf17dfb5c 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -1413,19 +1413,8 @@ public: SW_DLLPRIVATE SwUndo * MakeUndoDelSection(SwSectionFmt const&); -class SwUndoChgSection : public SwUndo -{ - ULONG nSttNd; - ::std::auto_ptr m_pSectionData; - SfxItemSet* pAttr; - BOOL bOnlyAttrChgd; -public: - SwUndoChgSection( const SwSectionFmt&, BOOL bOnlyAttrChgd ); - virtual ~SwUndoChgSection(); - virtual void Undo( SwUndoIter& ); - virtual void Redo( SwUndoIter& ); - OUT_UNDOBJ( SwUndoChgSection ) -}; +SW_DLLPRIVATE SwUndo * MakeUndoUpdateSection(SwSectionFmt const&, bool const); + //------------ Undo von verschieben/stufen von Gliederung ---------------- diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index e9e367b7d9..94d9bfd62a 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -655,7 +655,7 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData, if( DoesUndo() ) { ClearRedo(); - AppendUndo( new SwUndoChgSection( *pFmt, TRUE ) ); + AppendUndo( MakeUndoUpdateSection( *pFmt, true ) ); // --> FME 2004-10-13 #i32968# // Inserting columns in the section causes MakeFrmFmt to put two // objects of type SwUndoFrmFmt on the undo stack. We don't want them. @@ -696,7 +696,7 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData, if( DoesUndo() ) { ClearRedo(); - AppendUndo( new SwUndoChgSection( *pFmt, FALSE ) ); + AppendUndo( MakeUndoUpdateSection( *pFmt, false ) ); // --> FME 2004-10-13 #i32968# // Inserting columns in the section causes MakeFrmFmt to put two // objects of type SwUndoFrmFmt on the undo stack. We don't want them. diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx index 093bae25df..02c82b8950 100644 --- a/sw/source/core/undo/unsect.cxx +++ b/sw/source/core/undo/unsect.cxx @@ -393,46 +393,69 @@ void SwUndoDelSection::Redo( SwUndoIter& rUndoIter ) //////////////////////////////////////////////////////////////////////////// -SwUndoChgSection::SwUndoChgSection( const SwSectionFmt& rFmt, BOOL bOnlyAttr ) - : SwUndo( UNDO_CHGSECTION ), bOnlyAttrChgd( bOnlyAttr ) +class SwUndoUpdateSection + : public SwUndo { - const SwSection& rSect = *rFmt.GetSection(); - - m_pSectionData.reset( new SwSectionData(rSect) ); +private: + ::std::auto_ptr m_pSectionData; + ::std::auto_ptr m_pAttrSet; + ULONG const m_nStartNode; + bool const m_bOnlyAttrChanged; - pAttr = ::lcl_GetAttrSet( rSect ); +public: + SwUndoUpdateSection( + SwSection const&, SwNodeIndex const*const, bool const bOnlyAttr); + virtual ~SwUndoUpdateSection(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + OUT_UNDOBJ( SwUndoUpdateSection ) +}; - nSttNd = rFmt.GetCntnt().GetCntntIdx()->GetIndex(); +SW_DLLPRIVATE SwUndo * +MakeUndoUpdateSection(SwSectionFmt const& rFormat, bool const bOnlyAttr) +{ + return new SwUndoUpdateSection(*rFormat.GetSection(), + rFormat.GetCntnt().GetCntntIdx(), bOnlyAttr); } - -SwUndoChgSection::~SwUndoChgSection() +SwUndoUpdateSection::SwUndoUpdateSection( + SwSection const& rSection, SwNodeIndex const*const pIndex, + bool const bOnlyAttr) + : SwUndo( UNDO_CHGSECTION ) + , m_pSectionData( new SwSectionData(rSection) ) + , m_pAttrSet( ::lcl_GetAttrSet(rSection) ) + , m_nStartNode( pIndex->GetIndex() ) + , m_bOnlyAttrChanged( bOnlyAttr ) { - delete pAttr; } +SwUndoUpdateSection::~SwUndoUpdateSection() +{ +} -void SwUndoChgSection::Undo( SwUndoIter& rUndoIter ) +void SwUndoUpdateSection::Undo( SwUndoIter& rUndoIter ) { SwDoc& rDoc = rUndoIter.GetDoc(); - SwSectionNode* pSectNd = rDoc.GetNodes()[ nSttNd ]->GetSectionNode(); + SwSectionNode *const pSectNd = + rDoc.GetNodes()[ m_nStartNode ]->GetSectionNode(); ASSERT( pSectNd, "wo ist mein SectionNode?" ); SwSection& rNdSect = pSectNd->GetSection(); SwFmt* pFmt = rNdSect.GetFmt(); SfxItemSet* pCur = ::lcl_GetAttrSet( rNdSect ); - if( pAttr ) + if (m_pAttrSet.get()) { // das Content- und Protect-Item muss bestehen bleiben const SfxPoolItem* pItem; - pAttr->Put( pFmt->GetFmtAttr( RES_CNTNT )); + m_pAttrSet->Put( pFmt->GetFmtAttr( RES_CNTNT )); if( SFX_ITEM_SET == pFmt->GetItemState( RES_PROTECT, TRUE, &pItem )) - pAttr->Put( *pItem ); - pFmt->DelDiffs( *pAttr ); - pAttr->ClearItem( RES_CNTNT ); - pFmt->SetFmtAttr( *pAttr ); - delete pAttr; + { + m_pAttrSet->Put( *pItem ); + } + pFmt->DelDiffs( *m_pAttrSet ); + m_pAttrSet->ClearItem( RES_CNTNT ); + pFmt->SetFmtAttr( *m_pAttrSet ); } else { @@ -441,9 +464,9 @@ void SwUndoChgSection::Undo( SwUndoIter& rUndoIter ) pFmt->ResetFmtAttr( RES_HEADER, RES_OPAQUE ); pFmt->ResetFmtAttr( RES_SURROUND, RES_FRMATR_END-1 ); } - pAttr = pCur; + m_pAttrSet.reset(pCur); - if( !bOnlyAttrChgd ) + if (!m_bOnlyAttrChanged) { const bool bUpdate = (!rNdSect.IsLinkType() && m_pSectionData->IsLinkType()) @@ -466,8 +489,8 @@ void SwUndoChgSection::Undo( SwUndoIter& rUndoIter ) } } - -void SwUndoChgSection::Redo( SwUndoIter& rUndoIter ) +void SwUndoUpdateSection::Redo( SwUndoIter& rUndoIter ) { Undo( rUndoIter ); } + -- cgit v1.2.3 From 0d124fef1f3bca9637642817547cdfe189599557 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:33 +0100 Subject: odfmetadata4: remove obsolete macros OUT_HSTR_HINT and OUT_UNDOBJ --- sw/inc/rolbck.hxx | 23 +---------------- sw/inc/undobj.hxx | 56 +----------------------------------------- sw/source/core/undo/unsect.cxx | 2 -- 3 files changed, 2 insertions(+), 79 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/rolbck.hxx b/sw/inc/rolbck.hxx index 05fa3f20bf..dacc5621d5 100644 --- a/sw/inc/rolbck.hxx +++ b/sw/inc/rolbck.hxx @@ -75,13 +75,6 @@ class SwCharFmt; #include -#ifdef DBG_UTIL -class Writer; -#define OUT_HSTR_HINT( name ) \ - friend Writer& OutUndo_Hstr_ ## name( Writer&, const SwHistoryHint& ); -#else -#define OUT_HSTR_HINT( name ) -#endif enum HISTORY_HINT { HSTRY_SETFMTHNT, @@ -126,7 +119,6 @@ public: virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ); virtual String GetDescription() const; - OUT_HSTR_HINT(SetFmtHnt) }; class SwHistoryResetFmt : public SwHistoryHint @@ -140,7 +132,6 @@ public: // <-- virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ); - OUT_HSTR_HINT(ResetFmtHnt) }; class SwHistorySetTxt : public SwHistoryHint @@ -155,12 +146,11 @@ public: virtual ~SwHistorySetTxt(); virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ); - OUT_HSTR_HINT(SetTxtHnt) }; class SwHistorySetTxtFld : public SwHistoryHint { - //!! beware of the order for the declation of thje auto_ptrs. + //!! beware of the order for the declation of the auto_ptrs. //!! If they get destroyed in the wrong order sw may crash (namely mail-merge as well) ::std::auto_ptr m_pFldType; const ::std::auto_ptr m_pFld; @@ -176,7 +166,6 @@ public: virtual String GetDescription() const; - OUT_HSTR_HINT(SetTxtFldHnt) }; class SwHistorySetRefMark : public SwHistoryHint @@ -190,7 +179,6 @@ public: SwHistorySetRefMark( SwTxtRefMark* pTxtHt, ULONG nNode ); virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ); - OUT_HSTR_HINT(SetRefMarkHnt) }; class SwHistorySetTOXMark : public SwHistoryHint @@ -207,7 +195,6 @@ public: virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ); int IsEqual( const SwTOXMark& rCmp ) const; - OUT_HSTR_HINT(SetToxMarkHnt) }; class SwHistoryResetTxt : public SwHistoryHint @@ -226,7 +213,6 @@ public: ULONG GetNode() const { return m_nNodeIndex; } xub_StrLen GetCntnt() const { return m_nStart; } - OUT_HSTR_HINT(ResetTxtHnt) }; class SwHistorySetFootnote : public SwHistoryHint @@ -245,7 +231,6 @@ public: virtual String GetDescription() const; - OUT_HSTR_HINT(SetFtnHnt) }; class SwHistoryChangeFmtColl : public SwHistoryHint @@ -258,7 +243,6 @@ public: SwHistoryChangeFmtColl( SwFmtColl* pColl, ULONG nNode, BYTE nNodeWhich ); virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ); - OUT_HSTR_HINT(ChangeFmtColl) }; class SwHistoryTxtFlyCnt : public SwHistoryHint @@ -271,7 +255,6 @@ public: virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ); SwUndoDelLayFmt* GetUDelLFmt() { return m_pUndo.get(); } - OUT_HSTR_HINT(FlyCnt) }; class SwHistoryBookmark : public SwHistoryHint @@ -284,7 +267,6 @@ class SwHistoryBookmark : public SwHistoryHint bool IsEqualBookmark(const ::sw::mark::IMark& rBkmk); const ::rtl::OUString& GetName() const; - OUT_HSTR_HINT(Bookmark) private: const ::rtl::OUString m_aName; @@ -312,7 +294,6 @@ public: const SvUShortsSort& rSetArr ); virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ); - OUT_HSTR_HINT(SetAttrSet) }; @@ -333,7 +314,6 @@ public: ULONG GetNode() const { return m_nNodeIndex; } xub_StrLen GetCntnt() const { return m_nStart; } - OUT_HSTR_HINT(ResetAttrSet) }; class SwHistoryChangeFlyAnchor : public SwHistoryHint @@ -368,7 +348,6 @@ public: SwHistoryChangeCharFmt( const SfxItemSet& rSet, const String & sFmt); virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ); - OUT_HSTR_HINT(SetAttrSet) }; diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index 3bf17dfb5c..22baea043f 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -116,15 +116,6 @@ namespace utl { class TransliterationWrapper; } -#ifdef DBG_UTIL -class Writer; -class SwUndo; -#define OUT_UNDOBJ( name ) \ - friend Writer& OutUndo_ ## name( Writer&, const SwUndo& ); -#else -#define OUT_UNDOBJ( name ) -#endif - const String UNDO_ARG1("$1", RTL_TEXTENCODING_ASCII_US); const String UNDO_ARG2("$2", RTL_TEXTENCODING_ASCII_US); @@ -248,7 +239,6 @@ protected: public: SwUndoSaveCntnt(); ~SwUndoSaveCntnt(); - OUT_UNDOBJ( SaveCntnt ) }; @@ -275,7 +265,6 @@ public: const SwHistory* GetHistory() const { return pHistory; } SwHistory* GetHistory() { return pHistory; } - OUT_UNDOBJ( SaveSection ) }; @@ -324,7 +313,6 @@ public: // Setzen vom End-Undo-Offset geschieht im Doc::EndUndo USHORT GetEndOffset() const { return nEndOffset; } void SetEndOffset( USHORT n ) { nEndOffset = n; } - OUT_UNDOBJ( Start ) }; class SwUndoEnd: public SwUndo @@ -356,7 +344,6 @@ public: // Setzen vom Start-Undo-Offset geschieht im Doc::EndUndo void SetSttOffset(USHORT _nSttOffSet) { nSttOffset = _nSttOffSet; } USHORT GetSttOffset() const { return nSttOffset; } - OUT_UNDOBJ( End ) }; class SwUndoInsert: public SwUndo, private SwUndoSaveCntnt @@ -406,7 +393,6 @@ public: virtual SwRewriter GetRewriter() const; BOOL CanGrouping( const SwPosition&, sal_Unicode cIns ); - OUT_UNDOBJ( Insert ) DECL_FIXEDMEMPOOL_NEWDEL(SwUndoInsert) }; @@ -476,8 +462,6 @@ public: xub_StrLen ContentStart() const { return nSttCntnt; } BOOL IsDelFullPara() const { return bDelFullPara; } - OUT_UNDOBJ( Delete ) - DECL_FIXEDMEMPOOL_NEWDEL(SwUndoDelete) }; @@ -513,7 +497,6 @@ public: virtual SwRewriter GetRewriter() const; BOOL CanGrouping( SwDoc*, SwPosition&, sal_Unicode cIns ); - OUT_UNDOBJ( Overwrite ) }; @@ -532,7 +515,6 @@ public: virtual void Redo( SwUndoIter& ); virtual void Repeat( SwUndoIter& ); void SetTblFlag() { bTblFlag = TRUE; } - OUT_UNDOBJ( SplitNode ) }; @@ -571,7 +553,6 @@ public: void SetMoveRedlines( bool b ) { bMoveRedlines = b; } - OUT_UNDOBJ( Move ) }; @@ -597,7 +578,6 @@ public: SwHistory& GetHistory() { return *m_pHistory; } - OUT_UNDOBJ( InsAttr ) }; class SwUndoResetAttr : public SwUndo, private SwUndRng @@ -617,7 +597,6 @@ public: SwHistory& GetHistory() { return *m_pHistory; } - OUT_UNDOBJ( ResetAttr ) }; class SwUndoFmtAttr : public SwUndo @@ -663,8 +642,6 @@ public: virtual void Repeat( SwUndoIter& ); virtual SwRewriter GetRewriter() const; - OUT_UNDOBJ( InsFmtAttr ) - void PutAttr( const SfxPoolItem& rItem ); SwFmt* GetFmt( SwDoc& rDoc ); // checks if it is still in the Doc! }; @@ -761,7 +738,7 @@ public: virtual SwRewriter GetRewriter() const; SwHistory* GetHistory() { return pHistory; } - OUT_UNDOBJ( SetFmtColl ) + }; @@ -779,7 +756,6 @@ public: SwHistory& GetHistory() { return *m_pHistory; } - OUT_UNDOBJ( MoveLeftMargin ) }; // Basis-Klasse fuer Insert von Dokument, Glossaries und Kopieren @@ -805,21 +781,18 @@ public: // setze den Destination-Bereich nach dem Einlesen. void SetInsertRange( const SwPaM&, BOOL bScanFlys = TRUE, BOOL bSttWasTxtNd = TRUE ); - OUT_UNDOBJ( Inserts ) }; class SwUndoInsDoc : public SwUndoInserts { public: SwUndoInsDoc( const SwPaM& ); - OUT_UNDOBJ( InsDoc ) }; class SwUndoCpyDoc : public SwUndoInserts { public: SwUndoCpyDoc( const SwPaM& ); - OUT_UNDOBJ( Copy ) }; class SwUndoInsTbl : public SwUndo @@ -846,7 +819,6 @@ public: virtual SwRewriter GetRewriter() const; - OUT_UNDOBJ( InsTable ) }; class SwUndoTxtToTbl : public SwUndo, public SwUndRng @@ -871,7 +843,6 @@ public: SwHistory& GetHistory(); // wird ggfs. angelegt void AddFillBox( const SwTableBox& rBox ); - OUT_UNDOBJ( TextToTable ) }; class SwUndoTblToTxt : public SwUndo @@ -897,7 +868,6 @@ public: void SetRange( const SwNodeRange& ); void AddBoxPos( SwDoc& rDoc, ULONG nNdIdx, ULONG nEndIdx, xub_StrLen nCntntIdx = STRING_MAXLEN); - OUT_UNDOBJ( TableToText ) }; class SwUndoAttrTbl : public SwUndo @@ -910,7 +880,6 @@ public: virtual ~SwUndoAttrTbl(); virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); - OUT_UNDOBJ( SetTableAttr ) }; class SwUndoTblAutoFmt : public SwUndo @@ -928,7 +897,6 @@ public: virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); void SaveBoxCntnt( const SwTableBox& rBox ); - OUT_UNDOBJ( TableAutoFmt ) }; class SwUndoTblNdsChg : public SwUndo @@ -978,7 +946,6 @@ public: nRelDiff = (USHORT)nRelDif; } - OUT_UNDOBJ( TblNodesChg ) }; class SwUndoTblMerge : public SwUndo, private SwUndRng @@ -1004,7 +971,6 @@ public: void SaveCollection( const SwTableBox& rBox ); - OUT_UNDOBJ( TblMerge ) }; @@ -1032,7 +998,6 @@ public: void SetNumFmt( ULONG nNewNumFmtIdx, const double& rNewNumber ) { nFmtIdx = nNewNumFmtIdx; fNum = rNewNumber; } void SetBox( const SwTableBox& rBox ); - OUT_UNDOBJ( TblNumFmt ) }; class _UndoTblCpyTbl_Entries; @@ -1057,7 +1022,6 @@ public: BOOL IsEmpty() const; BOOL InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, USHORT nCnt ); - OUT_UNDOBJ( TblCpyTbl ) }; class SwUndoCpyTbl : public SwUndo @@ -1071,7 +1035,6 @@ public: virtual void Redo( SwUndoIter& ); void SetTableSttIdx( ULONG nIdx ) { nTblNode = nIdx; } - OUT_UNDOBJ( CpyTbl ) }; class SwUndoSplitTbl : public SwUndo @@ -1150,7 +1113,6 @@ public: SwUndoDelBookmark( const ::sw::mark::IMark& ); virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); - OUT_UNDOBJ( DelBookmark ) }; class SwUndoInsBookmark : public SwUndoBookmark @@ -1159,7 +1121,6 @@ public: SwUndoInsBookmark( const ::sw::mark::IMark& ); virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); - OUT_UNDOBJ( InsBookmark ) }; @@ -1218,7 +1179,6 @@ public: void Insert( const String& rOrgPos, const String& rNewPos ); void Insert( ULONG nOrgPos, ULONG nNewPos ); - OUT_UNDOBJ( Sort ) }; @@ -1248,7 +1208,6 @@ public: virtual void Undo( SwUndoIter& ) = 0; virtual void Redo( SwUndoIter& ) = 0; - OUT_UNDOBJ( FlyBase ) }; class SwUndoInsLayFmt : public SwUndoFlyBase @@ -1265,7 +1224,6 @@ public: String GetComment() const; - OUT_UNDOBJ( InsLayFmt ) }; class SwUndoDelLayFmt : public SwUndoFlyBase @@ -1282,7 +1240,6 @@ public: virtual SwRewriter GetRewriter() const; - OUT_UNDOBJ( DelLayFmt ) }; @@ -1359,7 +1316,6 @@ public: BOOL IsFull() const { return ((USHRT_MAX / sizeof( void* )) - 50 ) < aArr.Count(); } - OUT_UNDOBJ( Replace ) }; @@ -1376,7 +1332,6 @@ public: virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); virtual void Repeat( SwUndoIter& ); - OUT_UNDOBJ( SwUndoTblHeadline ) }; @@ -1404,7 +1359,6 @@ public: virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); virtual void Repeat( SwUndoIter& ); - OUT_UNDOBJ( SwUndoInsSection ) void SetSectNdPos(ULONG const nPos) { m_nSectionNodePos = nPos; } void SaveSplitNode(SwTxtNode *const pTxtNd, bool const bAtStart); @@ -1426,7 +1380,6 @@ public: virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); virtual void Repeat( SwUndoIter& ); - OUT_UNDOBJ( SwUndoOutlineLeftRight ) }; //-------------------------------------------------------------------- @@ -1442,7 +1395,6 @@ public: virtual ~SwUndoDefaultAttr(); virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); - OUT_UNDOBJ( DefaultAttr ) }; //-------------------------------------------------------------------- @@ -1474,7 +1426,6 @@ public: void SetLRSpaceEndPos(); - OUT_UNDOBJ( InsNum ) }; class SwUndoDelNum : public SwUndo, private SwUndRng @@ -1493,7 +1444,6 @@ public: void AddNode( const SwTxtNode& rNd, BOOL bResetLRSpace ); SwHistory* GetHistory() { return pHistory; } - OUT_UNDOBJ( DelNum ) }; class SwUndoMoveNum : public SwUndo, private SwUndRng @@ -1506,7 +1456,6 @@ public: virtual void Redo( SwUndoIter& ); virtual void Repeat( SwUndoIter& ); void SetStartNode( ULONG nValue ) { nNewStt = nValue; } - OUT_UNDOBJ( MoveNum ) }; class SwUndoNumUpDown : public SwUndo, private SwUndRng @@ -1517,7 +1466,6 @@ public: virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); virtual void Repeat( SwUndoIter& ); - OUT_UNDOBJ( NumUpDown ) }; class SwUndoNumOrNoNum : public SwUndo @@ -1531,7 +1479,6 @@ public: virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); virtual void Repeat( SwUndoIter& ); - OUT_UNDOBJ( NumOrNoNum ) }; class SwUndoNumRuleStart : public SwUndo @@ -1546,7 +1493,6 @@ public: virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); virtual void Repeat( SwUndoIter& ); - OUT_UNDOBJ( NumRuleStart ) }; //-------------------------------------------------------------------- diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx index 02c82b8950..91809fd481 100644 --- a/sw/source/core/undo/unsect.cxx +++ b/sw/source/core/undo/unsect.cxx @@ -301,7 +301,6 @@ public: virtual ~SwUndoDelSection(); virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); - OUT_UNDOBJ( SwUndoDelSection ) }; SW_DLLPRIVATE SwUndo * MakeUndoDelSection(SwSectionFmt const& rFormat) @@ -408,7 +407,6 @@ public: virtual ~SwUndoUpdateSection(); virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); - OUT_UNDOBJ( SwUndoUpdateSection ) }; SW_DLLPRIVATE SwUndo * -- cgit v1.2.3 From 811cdd295c3fb5472942d861a62887bb605019c5 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:34 +0100 Subject: odfmetadata4: #i109599#: move class SectRepr to uiregionsw.cxx --- sw/source/ui/dialog/uiregionsw.cxx | 166 +++++++++++++++++++++++++------------ sw/source/ui/inc/regionsw.hxx | 85 +------------------ 2 files changed, 116 insertions(+), 135 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 3a0403165d..440457f0b1 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -80,13 +80,12 @@ using namespace ::com::sun::star; + // sw/inc/docary.hxx SV_IMPL_PTRARR( SwSectionFmts, SwSectionFmtPtr ) #define FILE_NAME_LENGTH 17 -SV_IMPL_OP_PTRARR_SORT( SectReprArr, SectReprPtr ) - static void lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox ); void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames, const SwSectionFmt* pNewFmt ) @@ -166,26 +165,82 @@ public: Beschreibung: User Data Klasse fuer Bereichsinformationen ----------------------------------------------------------------------------*/ +class SectRepr +{ +private: + SwSectionData m_SectionData; + SwFmtCol m_Col; + SvxBrushItem m_Brush; + SwFmtFtnAtTxtEnd m_FtnNtAtEnd; + SwFmtEndAtTxtEnd m_EndNtAtEnd; + SwFmtNoBalancedColumns m_Balance; + SvxFrameDirectionItem m_FrmDirItem; + SvxLRSpaceItem m_LRSpaceItem; + USHORT m_nArrPos; + // zeigt an, ob evtl. Textinhalt im Bereich ist + bool m_bContent : 1; + // fuer Multiselektion erst markieren, dann mit der TreeListBox arbeiten! + bool m_bSelected : 1; + uno::Sequence m_TempPasswd; + +public: + SectRepr(USHORT nPos, SwSection& rSect); + bool operator==(SectRepr& rSectRef) const + { return m_nArrPos == rSectRef.GetArrPos(); } + + bool operator< (SectRepr& rSectRef) const + { return m_nArrPos < rSectRef.GetArrPos(); } + + SwSectionData & GetSectionData() { return m_SectionData; } + SwSectionData const&GetSectionData() const { return m_SectionData; } + SwFmtCol& GetCol() { return m_Col; } + SvxBrushItem& GetBackground() { return m_Brush; } + SwFmtFtnAtTxtEnd& GetFtnNtAtEnd() { return m_FtnNtAtEnd; } + SwFmtEndAtTxtEnd& GetEndNtAtEnd() { return m_EndNtAtEnd; } + SwFmtNoBalancedColumns& GetBalance() { return m_Balance; } + SvxFrameDirectionItem& GetFrmDir() { return m_FrmDirItem; } + SvxLRSpaceItem& GetLRSpace() { return m_LRSpaceItem; } + + USHORT GetArrPos() const { return m_nArrPos; } + String GetFile() const; + String GetSubRegion() const; + void SetFile(String const& rFile); + void SetFilter(String const& rFilter); + void SetSubRegion(String const& rSubRegion); + + bool IsContent() { return m_bContent; } + void SetContent(bool const bValue) { m_bContent = bValue; } + + void SetSelected() { m_bSelected = true; } + bool IsSelected() const { return m_bSelected; } + + uno::Sequence & GetTempPasswd() { return m_TempPasswd; } + void SetTempPasswd(const uno::Sequence & rPasswd) + { m_TempPasswd = rPasswd; } +}; + + +SV_IMPL_OP_PTRARR_SORT( SectReprArr, SectReprPtr ) + SectRepr::SectRepr( USHORT nPos, SwSection& rSect ) : m_SectionData( rSect ) - , - aBrush( RES_BACKGROUND ), - aFrmDirItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR ), - aLRSpaceItem( RES_LR_SPACE ), - bSelected(FALSE) -{ - bContent = m_SectionData.GetLinkFileName().Len() == 0; - nArrPos=nPos; + , m_Brush( RES_BACKGROUND ) + , m_FrmDirItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR ) + , m_LRSpaceItem( RES_LR_SPACE ) + , m_nArrPos(nPos) + , m_bContent(m_SectionData.GetLinkFileName().Len() == 0) + , m_bSelected(false) +{ SwSectionFmt *pFmt = rSect.GetFmt(); if( pFmt ) { - aCol = pFmt->GetCol(); - aBrush = pFmt->GetBackground(); - aFtnNtAtEnd = pFmt->GetFtnAtTxtEnd(); - aEndNtAtEnd = pFmt->GetEndAtTxtEnd(); - aBalance.SetValue(pFmt->GetBalancedColumns().GetValue()); - aFrmDirItem = pFmt->GetFrmDir(); - aLRSpaceItem = pFmt->GetLRSpace(); + m_Col = pFmt->GetCol(); + m_Brush = pFmt->GetBackground(); + m_FtnNtAtEnd = pFmt->GetFtnAtTxtEnd(); + m_EndNtAtEnd = pFmt->GetEndAtTxtEnd(); + m_Balance.SetValue(pFmt->GetBalancedColumns().GetValue()); + m_FrmDirItem = pFmt->GetFrmDir(); + m_LRSpaceItem = pFmt->GetLRSpace(); } } @@ -296,7 +351,6 @@ String SectRepr::GetSubRegion() const - /*---------------------------------------------------------------------------- Beschreibung: Dialog Bearbeiten Bereiche ----------------------------------------------------------------------------*/ @@ -416,7 +470,8 @@ BOOL SwEditRegionDlg::CheckPasswd(CheckBox* pBox) while( pEntry ) { SectReprPtr pRepr = (SectReprPtr)pEntry->GetUserData(); - if(!pRepr->GetTempPasswd().getLength() && pRepr->GetPasswd().getLength()) + if (!pRepr->GetTempPasswd().getLength() + && pRepr->GetSectionData().GetPassword().getLength()) { SwTestPasswdDlg aPasswdDlg(this); bRet = FALSE; @@ -425,7 +480,8 @@ BOOL SwEditRegionDlg::CheckPasswd(CheckBox* pBox) String sNewPasswd( aPasswdDlg.GetPassword() ); UNO_NMSPC::Sequence aNewPasswd; SvPasswordHelper::GetHashPassword( aNewPasswd, sNewPasswd ); - if(SvPasswordHelper::CompareHashPassword(pRepr->GetPasswd(), sNewPasswd)) + if (SvPasswordHelper::CompareHashPassword( + pRepr->GetSectionData().GetPassword(), sNewPasswd)) { pRepr->SetTempPasswd(aNewPasswd); bRet = TRUE; @@ -620,29 +676,32 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox ) while( pEntry ) { SectRepr* pRepr=(SectRepr*) pEntry->GetUserData(); + SwSectionData const& rData( pRepr->GetSectionData() ); if(bFirst) { - sCondition = pRepr->GetCondition(); - bHidden = pRepr->IsHidden(); - bProtect = pRepr->IsProtect(); + sCondition = rData.GetCondition(); + bHidden = rData.IsHidden(); + bProtect = rData.IsProtectFlag(); // --> FME 2004-06-22 #114856# edit in readonly sections - bEditInReadonly = pRepr->IsEditInReadonly(); + bEditInReadonly = rData.IsEditInReadonlyFlag(); // <-- - bFile = pRepr->GetSectionType() != CONTENT_SECTION; - aCurPasswd = pRepr->GetPasswd(); + bFile = (rData.GetType() != CONTENT_SECTION); + aCurPasswd = rData.GetPassword(); } else { - String sTemp(pRepr->GetCondition()); + String sTemp(rData.GetCondition()); if(sCondition != sTemp) bConditionValid = FALSE; - bHiddenValid = bHidden == pRepr->IsHidden(); - bProtectValid = bProtect == pRepr->IsProtect(); + bHiddenValid = (bHidden == rData.IsHidden()); + bProtectValid = (bProtect == rData.IsProtectFlag()); // --> FME 2004-06-22 #114856# edit in readonly sections - bEditInReadonlyValid = bEditInReadonly == pRepr->IsEditInReadonly(); + bEditInReadonlyValid = + (bEditInReadonly == rData.IsEditInReadonlyFlag()); // <-- - bFileValid = (pRepr->GetSectionType() != CONTENT_SECTION) == bFile; - bPasswdValid = aCurPasswd == pRepr->GetPasswd(); + bFileValid = (bFile == + (rData.GetType() != CONTENT_SECTION)); + bPasswdValid = (aCurPasswd == rData.GetPassword()); } pEntry = pBox->NextSelected(pEntry); bFirst = FALSE; @@ -698,13 +757,14 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox ) aCurName .Enable(TRUE); aOptionsPB .Enable(TRUE); SectRepr* pRepr=(SectRepr*) pEntry->GetUserData(); - aConditionED.SetText(pRepr->GetCondition()); + SwSectionData const& rData( pRepr->GetSectionData() ); + aConditionED.SetText(rData.GetCondition()); aHideCB.Enable(); - aHideCB.SetState(pRepr->IsHidden() ? STATE_CHECK : STATE_NOCHECK); + aHideCB.SetState((rData.IsHidden()) ? STATE_CHECK : STATE_NOCHECK); BOOL bHide = STATE_CHECK == aHideCB.GetState(); aConditionED.Enable(bHide); aConditionFT.Enable(bHide); - aPasswdCB.Check(pRepr->GetPasswd().getLength() > 0); + aPasswdCB.Check(rData.GetPassword().getLength() > 0); aOK.Enable(); aPasswdCB.Enable(); @@ -720,7 +780,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox ) aFileCB.Check(TRUE); aFileNameED.SetText(aFile); aSubRegionED.SetText(sSub); - aDDECB.Check(pRepr->GetSectionType() == DDE_LINK_SECTION ); + aDDECB.Check(rData.GetType() == DDE_LINK_SECTION); } else { @@ -731,11 +791,13 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox ) } UseFileHdl(&aFileCB); DDEHdl( &aDDECB ); - aProtectCB.SetState(pRepr->IsProtect() ? STATE_CHECK : STATE_NOCHECK); + aProtectCB.SetState((rData.IsProtectFlag()) + ? STATE_CHECK : STATE_NOCHECK); aProtectCB.Enable(); // --> FME 2004-06-22 #114856# edit in readonly sections - aEditInReadonlyCB.SetState( pRepr->IsEditInReadonly() ? STATE_CHECK : STATE_NOCHECK); + aEditInReadonlyCB.SetState((rData.IsEditInReadonlyFlag()) + ? STATE_CHECK : STATE_NOCHECK); aEditInReadonlyCB.Enable(); // <-- @@ -878,7 +940,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeProtectHdl, TriStateBox *, pBox ) while( pEntry ) { SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData(); - pRepr->SetProtect(bCheck); + pRepr->GetSectionData().SetProtectFlag(bCheck); Image aImage = BuildBitmap( bCheck, STATE_CHECK == aHideCB.GetState(), FALSE); aTree.SetExpandedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL); @@ -906,7 +968,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeHideHdl, TriStateBox *, pBox ) while( pEntry ) { SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData(); - pRepr->SetHidden(STATE_CHECK == pBox->GetState()); + pRepr->GetSectionData().SetHidden(STATE_CHECK == pBox->GetState()); Image aImage = BuildBitmap(STATE_CHECK == aProtectCB.GetState(), STATE_CHECK == pBox->GetState(), FALSE); aTree.SetExpandedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL); @@ -939,7 +1001,8 @@ IMPL_LINK( SwEditRegionDlg, ChangeEditInReadonlyHdl, TriStateBox *, pBox ) while( pEntry ) { SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData(); - pRepr->SetEditInReadonly(STATE_CHECK == pBox->GetState()); + pRepr->GetSectionData().SetEditInReadonlyFlag( + STATE_CHECK == pBox->GetState()); pEntry = aTree.NextSelected(pEntry); } @@ -1043,7 +1106,7 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox ) { pSectRepr->SetFile(aEmptyStr); pSectRepr->SetSubRegion(aEmptyStr); - pSectRepr->SetFilePasswd(aEmptyStr); + pSectRepr->GetSectionData().SetLinkFilePassword(aEmptyStr); } pEntry = aTree.NextSelected(pEntry); @@ -1252,7 +1315,7 @@ IMPL_LINK( SwEditRegionDlg, FileNameHdl, Edit *, pEdit ) aAbs, sTmp, URIHelper::GetMaybeFileHdl() ); } pSectRepr->SetFile( sTmp ); - pSectRepr->SetFilePasswd( aEmptyStr ); + pSectRepr->GetSectionData().SetLinkFilePassword( aEmptyStr ); } } else @@ -1274,6 +1337,7 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox ) { BOOL bFile = aFileCB.IsChecked(); SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData(); + SwSectionData & rData( pSectRepr->GetSectionData() ); BOOL bDDE = pBox->IsChecked(); if(bDDE) { @@ -1282,13 +1346,13 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox ) aDDECommandFT.Show(); aSubRegionFT.Hide(); aSubRegionED.Hide(); - if(FILE_LINK_SECTION == pSectRepr->GetSectionType() ) + if (FILE_LINK_SECTION == rData.GetType()) { pSectRepr->SetFile(aEmptyStr); aFileNameED.SetText(aEmptyStr); - pSectRepr->SetFilePasswd( aEmptyStr ); + rData.SetLinkFilePassword( aEmptyStr ); } - pSectRepr->SetSectionType( DDE_LINK_SECTION ); + rData.SetType(DDE_LINK_SECTION); } else { @@ -1300,11 +1364,11 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox ) aSubRegionED.Enable(bFile); aSubRegionFT.Enable(bFile); aSubRegionED.Enable(bFile); - if(DDE_LINK_SECTION == pSectRepr->GetSectionType() ) + if (DDE_LINK_SECTION == rData.GetType()) { - pSectRepr->SetSectionType( FILE_LINK_SECTION ); + rData.SetType(FILE_LINK_SECTION); pSectRepr->SetFile(aEmptyStr); - pSectRepr->SetFilePasswd( aEmptyStr ); + rData.SetLinkFilePassword( aEmptyStr ); aFileNameED.SetText(aEmptyStr); } } @@ -1406,7 +1470,7 @@ IMPL_LINK( SwEditRegionDlg, ConditionEditHdl, Edit *, pEdit ) while( pEntry ) { SectReprPtr pRepr = (SectReprPtr)pEntry->GetUserData(); - pRepr->SetCondition (pEdit->GetText()); + pRepr->GetSectionData().SetCondition(pEdit->GetText()); pEntry = aTree.NextSelected(pEntry); } return 0; @@ -1437,7 +1501,7 @@ IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg ) SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData(); pSectRepr->SetFile( sFileName ); pSectRepr->SetFilter( sFilterName ); - pSectRepr->SetFilePasswd( sPassword ); + pSectRepr->GetSectionData().SetLinkFilePassword(sPassword); aFileNameED.SetText( pSectRepr->GetFile() ); } diff --git a/sw/source/ui/inc/regionsw.hxx b/sw/source/ui/inc/regionsw.hxx index 3a9672c224..2521232be0 100644 --- a/sw/source/ui/inc/regionsw.hxx +++ b/sw/source/ui/inc/regionsw.hxx @@ -61,94 +61,11 @@ namespace sfx2 class FileDialogHelper; } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -class SectRepr -{ - SwSectionData m_SectionData; - SwFmtCol aCol; - SvxBrushItem aBrush; - SwFmtFtnAtTxtEnd aFtnNtAtEnd; - SwFmtEndAtTxtEnd aEndNtAtEnd; - SwFmtNoBalancedColumns aBalance; - SvxFrameDirectionItem aFrmDirItem; - SvxLRSpaceItem aLRSpaceItem; - USHORT nArrPos; - USHORT nColumn; - BOOL bContent : 1; //zeigt an, ob evtl. Textinhalt im Bereich ist - BOOL bSelected : 1; //fuer Multiselektion erst markieren, dann mit der TreeListBox arbeiten! - ::com::sun::star::uno::Sequence aTempPasswd; -public: - SectRepr(USHORT nPos, SwSection& rSect); - BOOL operator ==(SectRepr& rSectRef) const - {return nArrPos==rSectRef.GetArrPos();} - - BOOL operator <(SectRepr& rSectRef) const - {return nArrPos FME 2004-06-22 #114856# edit in readonly sections - bool IsEditInReadonly() const - { return m_SectionData.IsEditInReadonlyFlag(); } - void SetEditInReadonly(const bool bFlag = true) - { m_SectionData.SetEditInReadonlyFlag(bFlag); } - // <-- - void SetHidden(const bool bFlag = true) - { m_SectionData.SetHidden(bFlag); } - void SetCondHidden(const bool bFlag = true) - { m_SectionData.SetCondHidden(bFlag); } - void SetProtect(const bool bFlag = true) - { m_SectionData.SetProtectFlag(bFlag); } - BOOL IsContent(){return bContent;} - void SetContent(BOOL bValue){bContent = bValue;} - void SetSectionType(SectionType eSectionType) { m_SectionData.SetType(eSectionType); } - SectionType GetSectionType() const { return m_SectionData.GetType() ;} - - void SetSelected(){bSelected = TRUE;} - BOOL IsSelected() const {return bSelected;} - - - const ::com::sun::star::uno::Sequence & GetPasswd() const - { return m_SectionData.GetPassword(); } - ::com::sun::star::uno::Sequence & GetTempPasswd() {return aTempPasswd;} - void SetTempPasswd(const ::com::sun::star::uno::Sequence & aPasswd) {aTempPasswd = aPasswd;} -}; - /************************************************************************* Dialog "Bereiche bearbeiten" *************************************************************************/ +class SectRepr; typedef SectRepr* SectReprPtr; SV_DECL_PTRARR_SORT( SectReprArr, SectReprPtr, 0, 4 ) -- cgit v1.2.3 From 5c90b43bf09f02e05c4d14d4e9ba5ceba25e955d Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:34 +0100 Subject: odfmetadata4: #i109117#: fix crash in SwXTextSection::setPropertyToDefault() --- sw/source/core/unocore/unosect.cxx | 140 +++++++++++++++++++++---------------- 1 file changed, 78 insertions(+), 62 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index f828a08476..8b1a397038 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -549,6 +549,56 @@ SwXTextSection::getPropertySetInfo() throw (uno::RuntimeException) /* -----------------------------12.02.01 10:45-------------------------------- ---------------------------------------------------------------------------*/ +static void +lcl_UpdateLinkType(SwSection & rSection, bool const bLinkUpdateAlways = true) +{ + if (rSection.GetType() == DDE_LINK_SECTION) + { + // set update type; needs an established link + if (!rSection.IsConnected()) + { + rSection.CreateLink(CREATE_CONNECT); + } + rSection.SetUpdateType( static_cast< USHORT >((bLinkUpdateAlways) + ? sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL) ); + } +} + +static void +lcl_UpdateSection(SwSectionFmt *const pFmt, + ::std::auto_ptr const& pSectionData, + ::std::auto_ptr const& pItemSet, + bool const bLinkModeChanged, bool const bLinkUpdateAlways = true) +{ + if (pFmt) + { + SwSection & rSection = *pFmt->GetSection(); + SwDoc *const pDoc = pFmt->GetDoc(); + SwSectionFmts const& rFmts = pDoc->GetSections(); + UnoActionContext aContext(pDoc); + for (sal_uInt16 i = 0; i < rFmts.Count(); i++) + { + if (rFmts[i]->GetSection()->GetSectionName() + == rSection.GetSectionName()) + { + pDoc->UpdateSection(i, *pSectionData, pItemSet.get(), + pDoc->IsInReading()); + { + // temporarily remove actions to allow cursor update + UnoActionRemoveContext aRemoveContext( pDoc ); + } + + if (bLinkModeChanged) + { + lcl_UpdateLinkType(rSection, bLinkUpdateAlways); + } + // section found and processed: break from loop + break; + } + } + } +} + void SwXTextSection::Impl::SetPropertyValues_Impl( const uno::Sequence< OUString >& rPropertyNames, const uno::Sequence< uno::Any >& rValues) @@ -566,9 +616,8 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, throw uno::RuntimeException(); } - SwSection *const pSect = (pFmt) ? pFmt->GetSection() : 0; ::std::auto_ptr const pSectionData( - (pFmt) ? new SwSectionData(*pSect) : 0); + (pFmt) ? new SwSectionData(*pFmt->GetSection()) : 0); OUString const*const pPropertyNames = rPropertyNames.getConstArray(); uno::Any const*const pValues = rValues.getConstArray(); @@ -923,39 +972,8 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, } } - if (pFmt) - { - SwDoc* pDoc = pFmt->GetDoc(); - const SwSectionFmts& rFmts = pDoc->GetSections(); - UnoActionContext aContext(pDoc); - for (sal_uInt16 i = 0; i < rFmts.Count(); i++) - { - if (rFmts[i]->GetSection()->GetSectionName() - == pSect->GetSectionName()) - { - pDoc->UpdateSection(i, *pSectionData, pItemSet.get(), - pDoc->IsInReading()); - { - // temporarily remove actions to allow cursor update - UnoActionRemoveContext aRemoveContext( pDoc ); - } - - //SwSection* pSect = pFmt->GetSection(); - if (bLinkModeChanged && pSect->GetType() == DDE_LINK_SECTION) - { - // set update type; needs an established link - if (!pSect->IsConnected()) - { - pSect->CreateLink(CREATE_CONNECT); - } - pSect->SetUpdateType( static_cast< USHORT >((bLinkMode) ? - sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL) ); - } - // section found and processed: break from loop - break; - } - } - } + lcl_UpdateSection(pFmt, pSectionData, pItemSet, bLinkModeChanged, + bLinkMode); } void SAL_CALL @@ -1578,11 +1596,12 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) static_cast(this)); } - SwSection *const pSect = (pFmt) ? pFmt->GetSection() : 0; ::std::auto_ptr const pSectionData( - (pFmt) ? new SwSectionData(*pSect) : 0); + (pFmt) ? new SwSectionData(*pFmt->GetSection()) : 0); ::std::auto_ptr pNewAttrSet; + bool bLinkModeChanged = false; + switch (pEntry->nWID) { case WID_SECT_CONDITION: @@ -1602,11 +1621,27 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) case WID_SECT_DDE_ELEMENT : case WID_SECT_LINK : case WID_SECT_REGION : - pSectionData->SetType(CONTENT_SECTION); + if (m_pImpl->m_bIsDescriptor) + { + m_pImpl->m_pProps->m_bDDE = false; + m_pImpl->m_pProps->m_sLinkFileName = ::rtl::OUString(); + m_pImpl->m_pProps->m_sSectionRegion = ::rtl::OUString(); + m_pImpl->m_pProps->m_sSectionFilter = ::rtl::OUString(); + } + else + { + pSectionData->SetType(CONTENT_SECTION); + } break; case WID_SECT_DDE_AUTOUPDATE: -// FIXME this would crash? -// aSection.SetUpdateType(sfx2::LINKUPDATE_ALWAYS); + if (m_pImpl->m_bIsDescriptor) + { + m_pImpl->m_pProps->m_bUpdateType = true; + } + else + { + bLinkModeChanged = true; + } break; case WID_SECT_VISIBLE : { @@ -1677,26 +1712,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) } } - if (pFmt) - { - SwDoc *const pDoc = pFmt->GetDoc(); - const SwSectionFmts& rFmts = pDoc->GetSections(); - UnoActionContext aContext(pDoc); - for (sal_uInt16 i = 0; i < rFmts.Count(); i++) - { - if (rFmts[i]->GetSection()->GetSectionName() - == pSect->GetSectionName()) - { - pDoc->UpdateSection(i, *pSectionData, pNewAttrSet.get(), - pDoc->IsInReading()); - { - // temporarily remove actions to allow cursor update - UnoActionRemoveContext aRemoveContext( pDoc ); - } - break; - } - } - } + lcl_UpdateSection(pFmt, pSectionData, pNewAttrSet, bLinkModeChanged); } /*-- 08.11.00 10:47:56--------------------------------------------------- @@ -1737,7 +1753,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, case WID_SECT_DDE_AUTOUPDATE: case WID_SECT_VISIBLE : { - sal_Bool bTemp = TRUE; + sal_Bool bTemp = sal_True; aRet.setValue( &bTemp, ::getCppuBooleanType()); } break; @@ -1746,7 +1762,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, case WID_SECT_EDIT_IN_READONLY: // <-- { - sal_Bool bTemp = FALSE; + sal_Bool bTemp = sal_False; aRet.setValue( &bTemp, ::getCppuBooleanType()); } break; -- cgit v1.2.3 From cae2eea56eecd09f8f57194eb6ec1f0020809267 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:35 +0100 Subject: odfmetadata4: #i109599#: remove SwSection::_GetSection() --- sw/inc/section.hxx | 14 ++++++++------ sw/source/core/docnode/section.cxx | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index 8f0b98dde3..e265da72ae 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -293,7 +293,6 @@ class SW_DLLPUBLIC SwSectionFmt : public SwFrmFmt ::com::sun::star::uno::WeakReference< ::com::sun::star::text::XTextSection> m_wXTextSection; - /* SW_DLLPUBLIC */ SwSection* _GetSection() const; SW_DLLPRIVATE void UpdateParent(); // Parent wurde veraendert protected: @@ -313,7 +312,7 @@ public: // erfrage vom Format Informationen virtual BOOL GetInfo( SfxPoolItem& ) const; - SwSection* GetSection() const { return (SwSection*)_GetSection(); } + SwSection* GetSection() const; inline SwSectionFmt* GetParent() const; inline SwSection* GetParentSection() const; @@ -328,9 +327,10 @@ public: // befindet. BOOL IsInNodesArr() const; - SwSectionNode* GetSectionNode( BOOL bAlways = FALSE ); - const SwSectionNode* GetSectionNode( BOOL bAlways = FALSE ) const - { return ((SwSectionFmt*)this)->GetSectionNode( bAlways ); } + SwSectionNode* GetSectionNode(bool const bEvenIfInUndo = false); + const SwSectionNode* GetSectionNode(bool const bEvenIfInUndo = false) const + { return const_cast(this) + ->GetSectionNode(bEvenIfInUndo); } // ist die Section eine gueltige fuers GlobalDocument? const SwSection* GetGlobalDocSection() const; @@ -368,7 +368,9 @@ inline SwSection* SwSectionFmt::GetParentSection() const SwSectionFmt* pParent = GetParent(); SwSection* pRet = 0; if( pParent ) - pRet = pParent->_GetSection(); + { + pRet = pParent->GetSection(); + } return pRet; } diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 5e5b7c0f68..3d9924554d 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -723,7 +723,7 @@ SwSectionFmt::~SwSectionFmt() } -SwSectionPtr SwSectionFmt::_GetSection() const +SwSection * SwSectionFmt::GetSection() const { if( GetDepends() ) { @@ -1161,7 +1161,7 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert } -SwSectionNode* SwSectionFmt::GetSectionNode( BOOL bAlways ) +SwSectionNode* SwSectionFmt::GetSectionNode(bool const bAlways) { const SwNodeIndex* pIdx = GetCntnt(FALSE).GetCntntIdx(); if( pIdx && ( bAlways || &pIdx->GetNodes() == &GetDoc()->GetNodes() )) -- cgit v1.2.3 From fd2ca9161dffc944ed06984c1a73b7b6800813b5 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:35 +0100 Subject: odfmetadata4: #i109599#,#i109600#: SwSectionFmt: support for xml:id at section. --- sw/inc/section.hxx | 15 +++++++++++-- sw/source/core/docnode/section.cxx | 44 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index e265da72ae..f44f904f05 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -32,10 +32,11 @@ #include -#include #include #include #include +#include +#include #include @@ -282,7 +283,9 @@ public: enum SectionSort { SORTSECT_NOT, SORTSECT_NAME, SORTSECT_POS }; -class SW_DLLPUBLIC SwSectionFmt : public SwFrmFmt +class SW_DLLPUBLIC SwSectionFmt + : public SwFrmFmt + , public ::sfx2::Metadatable { friend class SwDoc; @@ -342,6 +345,14 @@ public: ::com::sun::star::text::XTextSection> const& xTextSection) { m_wXTextSection = xTextSection; } + // sfx2::Metadatable + virtual ::sfx2::IXmlIdRegistry& GetRegistry(); + virtual bool IsInClipboard() const; + virtual bool IsInUndo() const; + virtual bool IsInContent() const; + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::rdf::XMetadatable > MakeUnoObject(); + }; // -------------- inlines --------------------------------- diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 3d9924554d..34e4f88874 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -68,6 +68,7 @@ #include // <-- #include +#include using namespace ::com::sun::star; @@ -1183,6 +1184,49 @@ const SwSection* SwSectionFmt::GetGlobalDocSection() const return 0; } +// sw::Metadatable +::sfx2::IXmlIdRegistry& SwSectionFmt::GetRegistry() +{ + return GetDoc()->GetXmlIdRegistry(); +} + +bool SwSectionFmt::IsInClipboard() const +{ + return GetDoc()->IsClipBoard(); +} + +bool SwSectionFmt::IsInUndo() const +{ + return !IsInNodesArr(); +} + +bool SwSectionFmt::IsInContent() const +{ + SwNodeIndex const*const pIdx = GetCntnt(FALSE).GetCntntIdx(); + OSL_ENSURE(pIdx, "SwSectionFmt::IsInContent: no index?"); + return (pIdx) ? !GetDoc()->IsInHeaderFooter(*pIdx) : true; +} + +// n.b.: if the section format represents an index, then there is both a +// SwXDocumentIndex and a SwXTextSection instance for this single core object. +// these two can both implement XMetadatable and forward to the same core +// section format. but here only one UNO object can be returned, +// so always return the text section. +uno::Reference< rdf::XMetadatable > +SwSectionFmt::MakeUnoObject() +{ + uno::Reference xMeta; + SwSection *const pSection( GetSection() ); + if (pSection) + { + xMeta.set( SwXTextSection::CreateXTextSection(this, + TOX_HEADER_SECTION == pSection->GetType()), + uno::UNO_QUERY ); + } + return xMeta; +} + + // --> OD 2007-02-14 #b6521322# // Method to break section links inside a linked section void lcl_BreakSectionLinksInSect( const SwSectionNode& rSectNd ) -- cgit v1.2.3 From 62bd6ada41307d993232b2cd58ef41c2a426b67b Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:35 +0100 Subject: odfmetadata4: #i109599#,#i109600#: copy and undo for section xml:id. SwSectionNode::MakeCopy(): copy xml:id. SwUndoDelSection: store xml:id. --- sw/source/core/docnode/ndsect.cxx | 3 +++ sw/source/core/undo/unsect.cxx | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 94d9bfd62a..fc8c431f52 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -1371,6 +1371,9 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c pDoc->GetLinkManager().InsertServer( pNewSect->GetObject() ); } + // METADATA: copy xml:id; must be done after insertion of node + pSectFmt->RegisterAsCopyOf(*GetSection().GetFmt()); + return pSectNd; } diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx index 91809fd481..5311f8ca8c 100644 --- a/sw/source/core/undo/unsect.cxx +++ b/sw/source/core/undo/unsect.cxx @@ -293,11 +293,13 @@ private: ::std::auto_ptr const m_pSectionData; /// section not TOX ::std::auto_ptr const m_pTOXBase; /// set iff section is TOX ::std::auto_ptr const m_pAttrSet; + ::boost::shared_ptr< ::sfx2::MetadatableUndo > const m_pMetadataUndo; ULONG const m_nStartNode; ULONG const m_nEndNode; public: - SwUndoDelSection(SwSection const&, SwNodeIndex const*const); + SwUndoDelSection( + SwSectionFmt const&, SwSection const&, SwNodeIndex const*const); virtual ~SwUndoDelSection(); virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); @@ -305,18 +307,20 @@ public: SW_DLLPRIVATE SwUndo * MakeUndoDelSection(SwSectionFmt const& rFormat) { - return new SwUndoDelSection(*rFormat.GetSection(), + return new SwUndoDelSection(rFormat, *rFormat.GetSection(), rFormat.GetCntnt().GetCntntIdx()); } SwUndoDelSection::SwUndoDelSection( - SwSection const& rSection, SwNodeIndex const*const pIndex) + SwSectionFmt const& rSectionFmt, SwSection const& rSection, + SwNodeIndex const*const pIndex) : SwUndo( UNDO_DELSECTION ) , m_pSectionData( new SwSectionData(rSection) ) , m_pTOXBase( rSection.ISA( SwTOXBaseSection ) ? new SwTOXBase(static_cast(rSection)) : 0 ) , m_pAttrSet( ::lcl_GetAttrSet(rSection) ) + , m_pMetadataUndo( rSectionFmt.CreateUndo() ) , m_nStartNode( pIndex->GetIndex() ) , m_nEndNode( pIndex->GetNode().EndOfSectionIndex() ) { @@ -375,6 +379,7 @@ void SwUndoDelSection::Undo( SwUndoIter& rUndoIter ) aInsertedSect.SetCondHidden( bRecalcCondHidden ); } + pFmt->RestoreMetadata(m_pMetadataUndo); } } -- cgit v1.2.3 From cda687f48e6a9455676109015b7227e29fe8c88a Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:36 +0100 Subject: odfmetadata4: #i109599#: SwXTextSection: add support for xml:id. --- sw/inc/unosection.hxx | 12 ++++++++++-- sw/source/core/unocore/unosect.cxx | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unosection.hxx b/sw/inc/unosection.hxx index 849aafdf6b..cba4831a4f 100644 --- a/sw/inc/unosection.hxx +++ b/sw/inc/unosection.hxx @@ -39,6 +39,8 @@ #include +#include + #include @@ -52,8 +54,9 @@ class SwSectionFmt; struct SwTextSectionProperties_Impl; -typedef ::cppu::WeakImplHelper7 -< ::com::sun::star::lang::XUnoTunnel +typedef ::cppu::ImplInheritanceHelper7 +< ::sfx2::MetadatableMixin +, ::com::sun::star::lang::XUnoTunnel , ::com::sun::star::lang::XServiceInfo , ::com::sun::star::beans::XPropertySet , ::com::sun::star::beans::XPropertyState @@ -84,6 +87,11 @@ public: CreateXTextSection(SwSectionFmt *const pFmt = 0, const bool bIndexHeader = false); + // MetadatableMixin + virtual ::sfx2::Metadatable* GetCoreObject(); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > + GetModel(); + static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); // XUnoTunnel diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 8b1a397038..92fad90e82 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -1894,3 +1894,22 @@ SwXTextSection::getSupportedServiceNames() throw (uno::RuntimeException) g_nServicesTextSection, g_ServicesTextSection); } + +// MetadatableMixin +::sfx2::Metadatable* SwXTextSection::GetCoreObject() +{ + SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() ); + return pSectionFmt; +} + +uno::Reference SwXTextSection::GetModel() +{ + SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() ); + if (pSectionFmt) + { + SwDocShell const*const pShell( pSectionFmt->GetDoc()->GetDocShell() ); + return (pShell) ? pShell->GetModel() : 0; + } + return 0; +} + -- cgit v1.2.3 From 9ba67318c9a81b9ac7bd1b76ee06e295901e3d02 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 11:28:36 +0100 Subject: odfmetadata4: #i109600#: SwXDocumentIndex: add support for xml:id. --- sw/inc/unoidx.hxx | 12 ++++++++++-- sw/source/core/unocore/unoidx.cxx | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unoidx.hxx b/sw/inc/unoidx.hxx index a4feb762f5..cf22cce14e 100644 --- a/sw/inc/unoidx.hxx +++ b/sw/inc/unoidx.hxx @@ -36,6 +36,8 @@ #include #include +#include + #include #include @@ -48,8 +50,9 @@ class SwTOXType; * * --------------------------------------------------*/ -typedef ::cppu::WeakImplHelper5 -< ::com::sun::star::lang::XUnoTunnel +typedef ::cppu::ImplInheritanceHelper5 +< ::sfx2::MetadatableMixin +, ::com::sun::star::lang::XUnoTunnel , ::com::sun::star::lang::XServiceInfo , ::com::sun::star::beans::XPropertySet , ::com::sun::star::container::XNamed @@ -81,6 +84,11 @@ public: ::com::sun::star::text::XDocumentIndex> CreateXDocumentIndex(SwDoc & rDoc, SwTOXBaseSection const& rSection); + // MetadatableMixin + virtual ::sfx2::Metadatable* GetCoreObject(); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > + GetModel(); + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); // XUnoTunnel diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index a017d18164..1c24d55c89 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -1551,6 +1551,25 @@ SwXDocumentIndex::setName(const OUString& rName) throw (uno::RuntimeException) } } +// MetadatableMixin +::sfx2::Metadatable* SwXDocumentIndex::GetCoreObject() +{ + SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() ); + return pSectionFmt; +} + +uno::Reference SwXDocumentIndex::GetModel() +{ + SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() ); + if (pSectionFmt) + { + SwDocShell const*const pShell( pSectionFmt->GetDoc()->GetDocShell() ); + return (pShell) ? pShell->GetModel() : 0; + } + return 0; +} + + /****************************************************************** * SwXDocumentIndexMark ******************************************************************/ -- cgit v1.2.3 From c114c0e0d2c3bab59d142932df293ac80479e732 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 17:07:56 +0100 Subject: sw33bf03: #i110140#: sw: ~SwTxtFld: unregister at field format --- sw/source/core/txtnode/atrfld.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index 4ddfae6a0b..49fe4c574b 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -268,6 +268,11 @@ SwTxtFld::SwTxtFld( SwFmtFld& rAttr, xub_StrLen nStartPos ) SwTxtFld::~SwTxtFld( ) { + SwFmtFld & rFmtFld( static_cast(GetAttr()) ); + if (this == rFmtFld.pTxtAttr) + { + rFmtFld.pTxtAttr = 0; // #i110140# invalidate! + } } /************************************************************************* -- cgit v1.2.3 From f908e7b930e846174e7993b53379d68c011eb83e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Mar 2010 17:15:38 +0100 Subject: sw33bf03: #i110140#: SwFldFmt::Modify: apply patch by cmc --- sw/source/core/txtnode/atrfld.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index 49fe4c574b..afca7eea4a 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -160,14 +160,16 @@ void SwFmtFld::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) if( !pTxtAttr ) return; + // don't do anything, especially not expand! + if( pNew && pNew->Which() == RES_OBJECTDYING ) + return; + SwTxtNode* pTxtNd = (SwTxtNode*)&pTxtAttr->GetTxtNode(); ASSERT( pTxtNd, "wo ist denn mein Node?" ); if( pNew ) { switch( pNew->Which() ) { - case RES_OBJECTDYING: - return; // don't do anything, especially not expand! case RES_TXTATR_FLDCHG: // "Farbe hat sich geaendert !" // this, this fuer "nur Painten" @@ -192,6 +194,8 @@ void SwFmtFld::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) case RES_FMT_CHG: pTxtNd->Modify( pOld, pNew ); return; + default: + break; } } -- cgit v1.2.3 From 3540af27652fdb0a0aac1e4e9248d7ed0f57d9a1 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 17 Mar 2010 13:44:55 +0100 Subject: sw33bf03: #i109921#: sw: unnecessary null checks: apply patch by cmc --- sw/source/core/frmedt/feshview.cxx | 5 +---- sw/source/ui/uno/unotxvw.cxx | 27 ++++++++++++--------------- 2 files changed, 13 insertions(+), 19 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index d7e0e4e02e..65f4f7b1b0 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -238,10 +238,7 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj ) if( bForget ) { pDView->UnmarkAll(); - if ( pTmpObj ) - pDView->MarkObj( pTmpObj, Imp()->GetPageView(), bAddSelect, bEnterGroup ); - else - pDView->MarkObj( rPt, MINMOVE ); + pDView->MarkObj( pTmpObj, Imp()->GetPageView(), bAddSelect, bEnterGroup ); break; } } diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index e2b40a8a9e..4ab5f3a2b7 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -908,12 +908,12 @@ void SAL_CALL SwXTextView::setRubyList( -----------------------------------------------------------------------*/ SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ ) { - SwWrtShell* pOldSh = &m_pView->GetWrtShell(); - SfxPrinter *pPrt = pOldSh->getIDocumentDeviceAccess()->getPrinter( false ); + SwWrtShell& rOldSh = m_pView->GetWrtShell(); + SfxPrinter *pPrt = rOldSh.getIDocumentDeviceAccess()->getPrinter( false ); SwDocShell* pDocSh; SfxObjectShellRef xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) ); xDocSh->DoInitNew( 0 ); - pOldSh->FillPrtDoc(pDocSh->GetDoc(), pPrt); + rOldSh.FillPrtDoc(pDocSh->GetDoc(), pPrt); SfxViewFrame* pDocFrame = SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE ); SwView* pDocView = (SwView*) pDocFrame->GetViewShell(); pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//Damit SelectShell gerufen wird. @@ -922,22 +922,19 @@ SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ IDocumentDeviceAccess* pIDDA = pSh->getIDocumentDeviceAccess(); SfxPrinter* pTempPrinter = pIDDA->getPrinter( true ); - if( pOldSh ) - { - const SwPageDesc& rCurPageDesc = pOldSh->GetPageDesc(pOldSh->GetCurPageDesc()); - - IDocumentDeviceAccess* pIDDA_old = pOldSh->getIDocumentDeviceAccess(); + const SwPageDesc& rCurPageDesc = rOldSh.GetPageDesc(rOldSh.GetCurPageDesc()); - if( pIDDA_old->getPrinter( false ) ) - { - pIDDA->setJobsetup( *pIDDA_old->getJobsetup() ); - //#69563# if it isn't the same printer then the pointer has been invalidated! - pTempPrinter = pIDDA->getPrinter( true ); - } + IDocumentDeviceAccess* pIDDA_old = rOldSh.getIDocumentDeviceAccess(); - pTempPrinter->SetPaperBin(rCurPageDesc.GetMaster().GetPaperBin().GetValue()); + if( pIDDA_old->getPrinter( false ) ) + { + pIDDA->setJobsetup( *pIDDA_old->getJobsetup() ); + //#69563# if it isn't the same printer then the pointer has been invalidated! + pTempPrinter = pIDDA->getPrinter( true ); } + pTempPrinter->SetPaperBin(rCurPageDesc.GetMaster().GetPaperBin().GetValue()); + return xDocSh; } -- cgit v1.2.3 From 5335c1ef8a8471d5830a7efa0a91ba476f702f4f Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 19 Mar 2010 11:13:29 +0100 Subject: cws tl79: #i110254# new 'Security' tab page --- sw/source/ui/uiview/view2.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) mode change 100644 => 100755 sw/source/ui/uiview/view2.cxx (limited to 'sw/source') diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx old mode 100644 new mode 100755 index 4c393be565..d905762fd2 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -540,8 +541,8 @@ void __EXPORT SwView::Execute(SfxRequest &rReq) // xmlsec05: new password dialog Window* pParent; const SfxPoolItem* pParentItem; - if( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_PARENTWINDOW, FALSE, &pParentItem ) ) - pParent = ( Window* ) ( ( const OfaPtrItem* ) pParentItem )->GetValue(); + if( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) ) + pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr(); else pParent = &GetViewFrame()->GetWindow(); SfxPasswordDialog aPasswdDlg( pParent ); @@ -576,8 +577,8 @@ void __EXPORT SwView::Execute(SfxRequest &rReq) // message box for wrong password Window* pParent; const SfxPoolItem* pParentItem; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_PARENTWINDOW, FALSE, &pParentItem ) ) - pParent = ( Window* ) ( ( const OfaPtrItem* ) pParentItem )->GetValue(); + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) ) + pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr(); else pParent = &GetViewFrame()->GetWindow(); SfxPasswordDialog aPasswdDlg( pParent ); -- cgit v1.2.3 From 2e803a5a9bebc6124820d60333f7821b3bee097a Mon Sep 17 00:00:00 2001 From: hb Date: Fri, 19 Mar 2010 11:41:08 +0100 Subject: sw321bf01: #i109284# moved changes form hb33issues01 --- sw/source/filter/rtf/wrtrtf.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx index c5f40bd0a5..bf2b81e5b7 100644 --- a/sw/source/filter/rtf/wrtrtf.cxx +++ b/sw/source/filter/rtf/wrtrtf.cxx @@ -85,6 +85,7 @@ const sal_Char SwRTFWriter::sNewLine = '\012'; const sal_Char __FAR_DATA SwRTFWriter::sNewLine[] = "\015\012"; #endif +static ::rtl::OUString aEmpty; SV_DECL_VARARR( RTFColorTbl, Color, 5, 8 ) @@ -1299,8 +1300,16 @@ void SwRTFWriter::OutBookmarks( xub_StrLen nCntntPos) Strm() << '}'; } OutComment( *this, OOO_STRING_SVTOOLS_RTF_BKMKEND ) << ' '; - RTFOutFuncs::Out_String( Strm(), pAsBookmark->GetName(), + + { + ::rtl::OUString & rBookmarkName = aEmpty; + + if (pAsBookmark) + rBookmarkName = pAsBookmark->GetName(); + + RTFOutFuncs::Out_String( Strm(), rBookmarkName, eDefaultEncoding, bWriteHelpFmt ) << '}'; + } if(++nBkmkTabPos >= pMarkAccess->getMarksCount()) nBkmkTabPos = -1; -- cgit v1.2.3 From 3ed9ce7935c292638e0c0cf25432a3a75d649155 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Fri, 19 Mar 2010 14:59:18 +0100 Subject: c07v027: #i10000# change include svl/svstdarr.hxx to svtools/svstdarr.hxx --- sw/source/core/SwNumberTree/SwNodeNum.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx index abcc7936b2..bbe2023cf7 100644 --- a/sw/source/core/SwNumberTree/SwNodeNum.cxx +++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx @@ -38,7 +38,7 @@ #include // <-- // --> OD 2010-01-13 #b6912256# -#include +#include #include // <-- -- cgit v1.2.3 From 48ad3acb4741a0f72b51faabb284289cdfb87506 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Sun, 21 Mar 2010 20:01:33 +0100 Subject: Adding PopupMenuController to allow PopupMenuControllerBase dervivates to be used in toolbars --- sw/source/ui/app/swmodule.cxx | 17 ++--------------- sw/uiconfig/sglobal/toolbar/extrusionobjectbar.xml | 10 +++++----- sw/uiconfig/sglobal/toolbar/fontworkobjectbar.xml | 6 +++--- sw/uiconfig/sweb/toolbar/extrusionobjectbar.xml | 10 +++++----- sw/uiconfig/sweb/toolbar/fontworkobjectbar.xml | 6 +++--- sw/uiconfig/swform/toolbar/extrusionobjectbar.xml | 10 +++++----- sw/uiconfig/swform/toolbar/fontworkobjectbar.xml | 6 +++--- sw/uiconfig/swreport/toolbar/extrusionobjectbar.xml | 10 +++++----- sw/uiconfig/swreport/toolbar/fontworkobjectbar.xml | 6 +++--- sw/uiconfig/swriter/toolbar/extrusionobjectbar.xml | 10 +++++----- sw/uiconfig/swriter/toolbar/fontworkobjectbar.xml | 6 +++--- sw/uiconfig/swxform/toolbar/extrusionobjectbar.xml | 10 +++++----- sw/uiconfig/swxform/toolbar/fontworkobjectbar.xml | 6 +++--- 13 files changed, 50 insertions(+), 63 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx index 0790eb4c4d..d1dd68065b 100644 --- a/sw/source/ui/app/swmodule.cxx +++ b/sw/source/ui/app/swmodule.cxx @@ -59,13 +59,13 @@ #include #include #include -#include #include #include -#include #include #include #include +#include +#include #include #include #include @@ -378,15 +378,8 @@ void SwDLL::RegisterControls() SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_CALLOUT, pMod ); SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_STAR, pMod ); - svx::ExtrusionDepthControl::RegisterControl( SID_EXTRUSION_DEPTH_FLOATER, pMod ); - svx::ExtrusionDirectionControl::RegisterControl( SID_EXTRUSION_DIRECTION_FLOATER, pMod ); - svx::ExtrusionLightingControl::RegisterControl( SID_EXTRUSION_LIGHTING_FLOATER, pMod ); - svx::ExtrusionSurfaceControl::RegisterControl( SID_EXTRUSION_SURFACE_FLOATER, pMod ); svx::ExtrusionColorControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod ); - svx::FontWorkShapeTypeControl::RegisterControl( SID_FONTWORK_SHAPE_TYPE, pMod ); - svx::FontWorkAlignmentControl::RegisterControl( SID_FONTWORK_ALIGNMENT_FLOATER, pMod ); - svx::FontWorkCharacterSpacingControl::RegisterControl( SID_FONTWORK_CHARACTER_SPACING_FLOATER, pMod ); SvxClipBoardControl::RegisterControl(SID_PASTE, pMod ); SvxUndoRedoControl::RegisterControl(SID_UNDO, pMod ); @@ -469,12 +462,6 @@ void SwDLL::RegisterControls() SvxCTLTextTbxCtrl::RegisterControl(SID_ATTR_PARA_LEFT_TO_RIGHT, pMod); SvxCTLTextTbxCtrl::RegisterControl(SID_ATTR_PARA_RIGHT_TO_LEFT, pMod); - svx::ExtrusionDepthControl::RegisterControl( SID_EXTRUSION_DEPTH_FLOATER, pMod ); - svx::ExtrusionDirectionControl::RegisterControl( SID_EXTRUSION_DIRECTION_FLOATER, pMod ); - svx::ExtrusionLightingControl::RegisterControl( SID_EXTRUSION_LIGHTING_FLOATER, pMod ); - svx::ExtrusionSurfaceControl::RegisterControl( SID_EXTRUSION_SURFACE_FLOATER, pMod ); - svx::ExtrusionColorControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod ); - GalleryChildWindow::RegisterChildWindow(0, pMod); ::avmedia::MediaToolBoxControl::RegisterControl(SID_AVMEDIA_TOOLBOX, pMod); diff --git a/sw/uiconfig/sglobal/toolbar/extrusionobjectbar.xml b/sw/uiconfig/sglobal/toolbar/extrusionobjectbar.xml index 1f212226cf..148849db6e 100644 --- a/sw/uiconfig/sglobal/toolbar/extrusionobjectbar.xml +++ b/sw/uiconfig/sglobal/toolbar/extrusionobjectbar.xml @@ -8,9 +8,9 @@ - - - - - + + + + + \ No newline at end of file diff --git a/sw/uiconfig/sglobal/toolbar/fontworkobjectbar.xml b/sw/uiconfig/sglobal/toolbar/fontworkobjectbar.xml index 3ac334e0e9..32de621477 100644 --- a/sw/uiconfig/sglobal/toolbar/fontworkobjectbar.xml +++ b/sw/uiconfig/sglobal/toolbar/fontworkobjectbar.xml @@ -3,9 +3,9 @@ - + - - + + \ No newline at end of file diff --git a/sw/uiconfig/sweb/toolbar/extrusionobjectbar.xml b/sw/uiconfig/sweb/toolbar/extrusionobjectbar.xml index 1f212226cf..148849db6e 100644 --- a/sw/uiconfig/sweb/toolbar/extrusionobjectbar.xml +++ b/sw/uiconfig/sweb/toolbar/extrusionobjectbar.xml @@ -8,9 +8,9 @@ - - - - - + + + + + \ No newline at end of file diff --git a/sw/uiconfig/sweb/toolbar/fontworkobjectbar.xml b/sw/uiconfig/sweb/toolbar/fontworkobjectbar.xml index 850943e548..a6d5c8d4f6 100644 --- a/sw/uiconfig/sweb/toolbar/fontworkobjectbar.xml +++ b/sw/uiconfig/sweb/toolbar/fontworkobjectbar.xml @@ -3,9 +3,9 @@ - + - - + + diff --git a/sw/uiconfig/swform/toolbar/extrusionobjectbar.xml b/sw/uiconfig/swform/toolbar/extrusionobjectbar.xml index 1f212226cf..148849db6e 100644 --- a/sw/uiconfig/swform/toolbar/extrusionobjectbar.xml +++ b/sw/uiconfig/swform/toolbar/extrusionobjectbar.xml @@ -8,9 +8,9 @@ - - - - - + + + + + \ No newline at end of file diff --git a/sw/uiconfig/swform/toolbar/fontworkobjectbar.xml b/sw/uiconfig/swform/toolbar/fontworkobjectbar.xml index 3ac334e0e9..5219a1e235 100644 --- a/sw/uiconfig/swform/toolbar/fontworkobjectbar.xml +++ b/sw/uiconfig/swform/toolbar/fontworkobjectbar.xml @@ -3,9 +3,9 @@ - + - - + + \ No newline at end of file diff --git a/sw/uiconfig/swreport/toolbar/extrusionobjectbar.xml b/sw/uiconfig/swreport/toolbar/extrusionobjectbar.xml index 1f212226cf..148849db6e 100644 --- a/sw/uiconfig/swreport/toolbar/extrusionobjectbar.xml +++ b/sw/uiconfig/swreport/toolbar/extrusionobjectbar.xml @@ -8,9 +8,9 @@ - - - - - + + + + + \ No newline at end of file diff --git a/sw/uiconfig/swreport/toolbar/fontworkobjectbar.xml b/sw/uiconfig/swreport/toolbar/fontworkobjectbar.xml index 3ac334e0e9..5219a1e235 100644 --- a/sw/uiconfig/swreport/toolbar/fontworkobjectbar.xml +++ b/sw/uiconfig/swreport/toolbar/fontworkobjectbar.xml @@ -3,9 +3,9 @@ - + - - + + \ No newline at end of file diff --git a/sw/uiconfig/swriter/toolbar/extrusionobjectbar.xml b/sw/uiconfig/swriter/toolbar/extrusionobjectbar.xml index 1f212226cf..148849db6e 100644 --- a/sw/uiconfig/swriter/toolbar/extrusionobjectbar.xml +++ b/sw/uiconfig/swriter/toolbar/extrusionobjectbar.xml @@ -8,9 +8,9 @@ - - - - - + + + + + \ No newline at end of file diff --git a/sw/uiconfig/swriter/toolbar/fontworkobjectbar.xml b/sw/uiconfig/swriter/toolbar/fontworkobjectbar.xml index 3ac334e0e9..5219a1e235 100644 --- a/sw/uiconfig/swriter/toolbar/fontworkobjectbar.xml +++ b/sw/uiconfig/swriter/toolbar/fontworkobjectbar.xml @@ -3,9 +3,9 @@ - + - - + + \ No newline at end of file diff --git a/sw/uiconfig/swxform/toolbar/extrusionobjectbar.xml b/sw/uiconfig/swxform/toolbar/extrusionobjectbar.xml index 1f212226cf..148849db6e 100644 --- a/sw/uiconfig/swxform/toolbar/extrusionobjectbar.xml +++ b/sw/uiconfig/swxform/toolbar/extrusionobjectbar.xml @@ -8,9 +8,9 @@ - - - - - + + + + + \ No newline at end of file diff --git a/sw/uiconfig/swxform/toolbar/fontworkobjectbar.xml b/sw/uiconfig/swxform/toolbar/fontworkobjectbar.xml index 3ac334e0e9..5219a1e235 100644 --- a/sw/uiconfig/swxform/toolbar/fontworkobjectbar.xml +++ b/sw/uiconfig/swxform/toolbar/fontworkobjectbar.xml @@ -3,9 +3,9 @@ - + - - + + \ No newline at end of file -- cgit v1.2.3 From da3ddc17ac56da5963119dc21b9edd3535368c8e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 26 Mar 2010 19:38:34 +0100 Subject: sw33bf03: #i110408#: SwXFlatParagraph: apply patch by dtardon --- sw/inc/unoflatpara.hxx | 12 +++++++-- sw/source/core/unocore/unoflatpara.cxx | 48 ++++++++++++++++++++++++---------- 2 files changed, 44 insertions(+), 16 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unoflatpara.hxx b/sw/inc/unoflatpara.hxx index 48234363f0..272beb4fa9 100644 --- a/sw/inc/unoflatpara.hxx +++ b/sw/inc/unoflatpara.hxx @@ -32,6 +32,7 @@ #define _UNOFLATPARA_HXX #include +#include #include #include #include @@ -54,9 +55,10 @@ class SwDoc; ******************************************************************************/ class SwXFlatParagraph: - public ::cppu::WeakImplHelper1 + public ::cppu::WeakImplHelper2 < - css::text::XFlatParagraph + css::text::XFlatParagraph, + css::lang::XUnoTunnel >, public SwXTextMarkup { @@ -88,6 +90,12 @@ public: const SwTxtNode* getTxtNode() const; + static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId(); + + // XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 >& rId) + throw (css::uno::RuntimeException); + private: SwXFlatParagraph( const SwXFlatParagraph & ); // not defined SwXFlatParagraph & operator = ( const SwXFlatParagraph & ); // not defined diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index d45125c2d2..aed0a47699 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -33,6 +33,7 @@ #include +#include #include #include @@ -122,7 +123,7 @@ css::uno::Reference< css::container::XStringKeyMap > SAL_CALL SwXFlatParagraph:: { return SwXTextMarkup::getMarkupInfoContainer(); } - + void SAL_CALL SwXFlatParagraph::commitTextMarkup(::sal_Int32 nType, const ::rtl::OUString & rIdentifier, ::sal_Int32 nStart, ::sal_Int32 nLength, const css::uno::Reference< css::container::XStringKeyMap > & rxMarkupInfoContainer) throw (css::uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -139,7 +140,7 @@ void SAL_CALL SwXFlatParagraph::commitTextMarkup(::sal_Int32 nType, const ::rtl: void SAL_CALL SwXFlatParagraph::setChecked( ::sal_Int32 nType, ::sal_Bool bVal ) throw (uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); - + if ( mpTxtNode ) { if ( text::TextMarkupType::SPELLCHECK == nType ) @@ -196,7 +197,7 @@ lang::Locale SAL_CALL SwXFlatParagraph::getPrimaryLanguageOfText(::sal_Int32 nPo throw (uno::RuntimeException, lang::IllegalArgumentException) { vos::OGuard aGuard(Application::GetSolarMutex()); - + if (!mpTxtNode) return SvxCreateLocale( LANGUAGE_NONE ); @@ -268,6 +269,24 @@ css::uno::Sequence< ::sal_Int32 > SAL_CALL SwXFlatParagraph::getLanguagePortions return css::uno::Sequence< ::sal_Int32>(); } + +const uno::Sequence< sal_Int8 >& +SwXFlatParagraph::getUnoTunnelId() +{ + static uno::Sequence aSeq(CreateUnoTunnelId()); + return aSeq; +} + + +sal_Int64 SAL_CALL +SwXFlatParagraph::getSomething( + const uno::Sequence< sal_Int8 >& rId) + throw (uno::RuntimeException) +{ + return sw::UnoTunnelImpl(rId, this); +} + + /****************************************************************************** * SwXFlatParagraphIterator ******************************************************************************/ @@ -282,7 +301,7 @@ SwXFlatParagraphIterator::SwXFlatParagraphIterator( SwDoc& rDoc, sal_Int32 nType mbWrapped( sal_False ) { //mnStartNode = mnCurrentNode = get node from current cursor TODO! - + // register as listener and get notified when document is closed mpDoc->GetPageDescFromPool( RES_POOLPAGE_STANDARD )->Add(this); } @@ -290,7 +309,7 @@ SwXFlatParagraphIterator::SwXFlatParagraphIterator( SwDoc& rDoc, sal_Int32 nType SwXFlatParagraphIterator::~SwXFlatParagraphIterator() { } - + void SwXFlatParagraphIterator::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ) { @@ -302,7 +321,7 @@ void SwXFlatParagraphIterator::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ) mpDoc = 0; } } - + uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getFirstPara() throw( uno::RuntimeException ) @@ -424,13 +443,14 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaAfter(co throw ( uno::RuntimeException, lang::IllegalArgumentException ) { vos::OGuard aGuard(Application::GetSolarMutex()); - + uno::Reference< text::XFlatParagraph > xRet; if (!mpDoc) return xRet; - text::XFlatParagraph* pFP = xPara.get(); - SwXFlatParagraph* pFlatParagraph = static_cast(pFP); + const uno::Reference xFPTunnel(xPara, uno::UNO_QUERY); + OSL_ASSERT(xFPTunnel.is()); + SwXFlatParagraph* const pFlatParagraph(sw::UnoTunnelGetImplementation(xFPTunnel)); if ( !pFlatParagraph ) return xRet; @@ -470,13 +490,14 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(c throw ( uno::RuntimeException, lang::IllegalArgumentException ) { vos::OGuard aGuard(Application::GetSolarMutex()); - + uno::Reference< text::XFlatParagraph > xRet; if (!mpDoc) return xRet; - - text::XFlatParagraph* pFP = xPara.get(); - SwXFlatParagraph* pFlatParagraph = static_cast(pFP); + + const uno::Reference xFPTunnel(xPara, uno::UNO_QUERY); + OSL_ASSERT(xFPTunnel.is()); + SwXFlatParagraph* const pFlatParagraph(sw::UnoTunnelGetImplementation(xFPTunnel)); if ( !pFlatParagraph ) return xRet; @@ -511,4 +532,3 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(c return xRet; } - -- cgit v1.2.3 From 05b8941cd1a88792773b5c62dbf72e6dbedfa9df Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Tue, 30 Mar 2010 10:53:20 +0200 Subject: hb33patches1: #i110463# applied patch and verified --- sw/source/filter/ww8/wrtww8.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 916ad970df..961dbfa47b 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1023,7 +1023,8 @@ bool WW8_WrFkp::Combine() return false; if( nIMax ) memcpy( pFkp + ( nIMax + 1 ) * 4, pOfs, nIMax * nItemSize ); - DELETEZ( pOfs ); + delete[] pOfs; + pOfs = 0; ((BYTE*)pFkp)[511] = nIMax; bCombined = true; -- cgit v1.2.3 From 1570b8587fb7b8d6cdbc1cd04fbd15f0d1add6d8 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 30 Mar 2010 12:51:35 +0200 Subject: sw33bf03: #i110454#: fix ASSERT from WW8Export::ExportDocument_Impl() --- sw/inc/shellio.hxx | 7 ++++--- sw/source/filter/rtf/rtfatr.cxx | 4 ++-- sw/source/filter/writer/writer.cxx | 16 +++++++++------- sw/source/filter/ww8/wrtww8.cxx | 8 ++++---- 4 files changed, 19 insertions(+), 16 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index 375036631a..b2c81eafa8 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -439,13 +439,14 @@ class SW_DLLPUBLIC Writer : public SvRefBase SwAsciiOptions aAscOpts; String sBaseURL; + SvStream * m_pStream; + void _AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont ); void _AddFontItems( SfxItemPool& rPool, USHORT nWhichId ); protected: Writer_Impl* pImpl; - SvStream* pStrm; SwPaM* pOrigPam; // der letze zu bearbeitende Pam const String* pOrigFileName; @@ -537,9 +538,9 @@ public: inline SvStream& OutLong( long nVal ) { return OutLong( Strm(), nVal ); } inline SvStream& OutULong( ULONG nVal ) { return OutULong( Strm(), nVal ); } - void SetStrm( SvStream& rStrm ) { pStrm = &rStrm; } + void SetStream(SvStream *const pStream) { m_pStream = pStream; } #ifndef DBG_UTIL - SvStream& Strm() { return *pStrm; } + SvStream& Strm() { return *m_pStream; } #else SvStream& Strm(); #endif diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx index 46426620b3..9ed66275ad 100644 --- a/sw/source/filter/rtf/rtfatr.cxx +++ b/sw/source/filter/rtf/rtfatr.cxx @@ -513,12 +513,12 @@ void OutRTF_SwFlyFrmFmt( SwRTFWriter& rRTFWrt ) // ueberhaupt eigene Attribute gibt ! SvMemoryStream aTmpStrm; SvStream* pSaveStrm = &rRTFWrt.Strm(); - rRTFWrt.SetStrm( aTmpStrm ); + rRTFWrt.SetStream( &aTmpStrm ); rRTFWrt.bRTFFlySyntax = false; OutRTF_SwFmt( rRTFWrt, *rRTFWrt.pFlyFmt ); - rRTFWrt.SetStrm( *pSaveStrm ); // Stream-Pointer wieder zurueck + rRTFWrt.SetStream( pSaveStrm ); // Stream-Pointer wieder zurueck if ( aTmpStrm.GetEndOfData() ) // gibt es SWG spezifische Attribute? { diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 289b67670a..6c5b1635c4 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -145,7 +145,9 @@ void Writer_Impl::InsertBkmk(const ::sw::mark::IMark& rBkmk) */ Writer::Writer() - : pImpl(0), pStrm(0), pOrigPam(0), pOrigFileName(0), pDoc(0), pCurPam(0) + : pImpl(0) + , m_pStream(0) + , pOrigPam(0), pOrigFileName(0), pDoc(0), pCurPam(0) { bWriteAll = bShowProgress = bUCS2_WithStartChar = true; bASCII_NoLastLineEnd = bASCII_ParaAsBlanc = bASCII_ParaAsCR = @@ -181,7 +183,7 @@ void Writer::ResetWriter() pCurPam = 0; pOrigFileName = 0; pDoc = 0; - pStrm = 0; + m_pStream = 0; bShowProgress = bUCS2_WithStartChar = TRUE; bASCII_NoLastLineEnd = bASCII_ParaAsBlanc = bASCII_ParaAsCR = @@ -253,8 +255,8 @@ SwPaM* Writer::NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx, #ifdef DBG_UTIL SvStream& Writer::Strm() { - ASSERT( pStrm, "Oh-oh. Dies ist ein Storage-Writer. Gleich knallts!" ); - return *pStrm; + ASSERT( m_pStream, "Oh-oh. Writer with no Stream!" ); + return *m_pStream; } #endif @@ -318,7 +320,7 @@ ULONG Writer::Write( SwPaM& rPaM, SvStream& rStrm, const String* pFName ) return nResult; } - pStrm = &rStrm; + m_pStream = &rStrm; pDoc = rPaM.GetDoc(); pOrigFileName = pFName; pImpl = new Writer_Impl( *pDoc ); @@ -590,7 +592,7 @@ ULONG StgWriter::WriteStream() ULONG StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName ) { - pStrm = 0; + SetStream(0); pStg = &rStg; pDoc = rPaM.GetDoc(); pOrigFileName = pFName; @@ -611,7 +613,7 @@ ULONG StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName ) ULONG StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& rStg, const String* pFName, SfxMedium* pMedium ) { - pStrm = 0; + SetStream(0); pStg = 0; xStg = rStg; pDoc = rPaM.GetDoc(); diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index ccf8c0e741..636c26f9a8 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2982,7 +2982,6 @@ void WW8Export::ExportDocument_Impl() pFib = new WW8Fib( bWrtWW8 ? 8 : 6 ); - SvStream* pOldStrm = &(Strm()); // JP 19.05.99: wozu das ??? SvStorageStreamRef xWwStrm( GetWriter().GetStorage().OpenSotStream( aMainStg ) ); SvStorageStreamRef xTableStrm( xWwStrm ), xDataStrm( xWwStrm ); xWwStrm->SetBufferSize( 32768 ); @@ -3002,7 +3001,7 @@ void WW8Export::ExportDocument_Impl() xDataStrm->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); } - GetWriter().SetStrm( *xWwStrm ); + GetWriter().SetStream( & *xWwStrm ); pTableStrm = &xTableStrm; pDataStrm = &xDataStrm; @@ -3024,7 +3023,8 @@ void WW8Export::ExportDocument_Impl() { bEncrypt =true; - GetWriter().SetStrm( *aTempMain.GetStream( STREAM_READWRITE | STREAM_SHARE_DENYWRITE ) ); + GetWriter().SetStream( + aTempMain.GetStream( STREAM_READWRITE | STREAM_SHARE_DENYWRITE ) ); pTableStrm = aTempTable.GetStream( STREAM_READWRITE | STREAM_SHARE_DENYWRITE ); @@ -3176,7 +3176,7 @@ void WW8Export::ExportDocument_Impl() delete pPiece; delete pDop; delete pFib; - GetWriter().SetStrm( *pOldStrm ); + GetWriter().SetStream( 0 ); xWwStrm->SetBufferSize( 0 ); -- cgit v1.2.3 From c6f429725d8a82d4e9c5eb57f08326fc0a5d9d5b Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 30 Mar 2010 12:52:28 +0200 Subject: sw33bf03: #i110455#: fix inverted ASSERT in MSWordStyles::WriteProperties() --- sw/source/filter/ww8/wrtw8sty.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 935bf36f00..6b2114e798 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -435,10 +435,11 @@ void MSWordStyles::WriteProperties( const SwFmt* pFmt, bool bParProp, USHORT nPo ASSERT( m_rExport.pCurrentStyle == NULL, "Current style not NULL" ); // set current style before calling out m_rExport.pCurrentStyle = pFmt; - + m_rExport.OutputFormat( *pFmt, bParProp, !bParProp ); - - ASSERT( m_rExport.pCurrentStyle != pFmt, "current style was changed" ); // reset current style... + + ASSERT( m_rExport.pCurrentStyle == pFmt, "current style was changed" ); + // reset current style... m_rExport.pCurrentStyle = NULL; if ( bInsDefCharSiz ) // nicht abgeleitet v. anderem Style -- cgit v1.2.3 From dc768f615ad85f832e1a9662942a5428d5160215 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Tue, 30 Mar 2010 16:34:51 +0200 Subject: tl78: #i110383# support password to modify --- sw/source/ui/uno/SwXDocumentSettings.cxx | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index df8e740438..96213e8de6 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -122,8 +122,9 @@ enum SwDocumentSettingsPropertyHandles HANDLE_PROTECT_FORM, HANDLE_TABS_RELATIVE_TO_INDENT, // --> OD 2008-06-05 #i89181# - HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST + HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, // <-- + HANDLE_MODIFYPASSWORDHASH }; MasterPropertySetInfo * lcl_createSettingsInfo() @@ -177,6 +178,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo() { RTL_CONSTASCII_STRINGPARAM("ProtectForm"), HANDLE_PROTECT_FORM, CPPUTYPE_BOOLEAN, 0, 0}, // --> OD 2008-06-05 #i89181# { RTL_CONSTASCII_STRINGPARAM("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, CPPUTYPE_BOOLEAN, 0, 0}, + { RTL_CONSTASCII_STRINGPARAM("ModifyPasswordHash"), HANDLE_MODIFYPASSWORDHASH, CPPUTYPE_INT32, 0, 0}, /* * As OS said, we don't have a view when we need to set this, so I have to @@ -671,6 +673,21 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf } break; // <-- + case HANDLE_MODIFYPASSWORDHASH: + { + sal_Int32 nHash = 0; + if ( !( rValue >>= nHash ) || nHash < 0 || nHash > SAL_MAX_UINT16 ) + throw lang::IllegalArgumentException( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Value of type INT32, representing UINT16 expected!" ) ), + uno::Reference< uno::XInterface >(), + 2 ); + + if ( !mpDocSh->SetModifyPasswordHash( static_cast< sal_uInt16 >( nHash ) ) ) + throw beans::PropertyVetoException( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The hash is not allowed to be changed now!" ) ), + uno::Reference< uno::XInterface >() ); + } + break; default: throw UnknownPropertyException(); } @@ -998,6 +1015,11 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf } break; // <-- + case HANDLE_MODIFYPASSWORDHASH: + { + rValue <<= static_cast< sal_Int32 >( mpDocSh->GetModifyPasswordHash() ); + } + break; default: throw UnknownPropertyException(); -- cgit v1.2.3 From 1c9b3f6439fe3bdde77ad5c084fcdaf4ef926de2 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Tue, 6 Apr 2010 10:22:30 +0200 Subject: hb33patches1: #i110560# applied patch --- sw/source/filter/ww8/docxattributeoutput.cxx | 92 ++++++++++------------------ sw/source/filter/ww8/docxexport.cxx | 24 ++------ sw/source/filter/ww8/docxexportfilter.cxx | 2 +- sw/source/filter/ww8/wrtw8nds.cxx | 2 +- sw/source/filter/ww8/wrtww8gr.cxx | 8 +-- sw/source/filter/ww8/ww8atr.cxx | 4 +- 6 files changed, 45 insertions(+), 87 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 76eea38544..5f64112bc5 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -731,9 +731,7 @@ void DocxAttributeOutput::RunText( const String& rText, rtl_TextEncoding /*eChar if ( *pIt < 0x0020 ) // filter out the control codes { impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt ); -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "Ignored control code %x in a text run.", *pIt ); -#endif + OSL_TRACE( "Ignored control code %x in a text run.", *pIt ); } break; } @@ -744,23 +742,17 @@ void DocxAttributeOutput::RunText( const String& rText, rtl_TextEncoding /*eChar void DocxAttributeOutput::RawText( const String& /*rText*/, bool /*bForceUnicode*/, rtl_TextEncoding /*eCharSet*/ ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet )\n" ); -#endif + OSL_TRACE("TODO DocxAttributeOutput::RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet )\n" ); } void DocxAttributeOutput::StartRuby( const SwTxtNode& /*rNode*/, const SwFmtRuby& /*rRuby*/ ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby )\n" ); -#endif + OSL_TRACE("TODO DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby )\n" ); } void DocxAttributeOutput::EndRuby() { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::EndRuby()\n" ); -#endif + OSL_TRACE( "TODO DocxAttributeOutput::EndRuby()\n" ); } bool DocxAttributeOutput::AnalyzeURL( const String& rUrl, const String& rTarget, String* pLinkURL, String* pMark ) @@ -849,9 +841,7 @@ void DocxAttributeOutput::FieldVanish( const String& rTxt, ww::eField eType ) void DocxAttributeOutput::Redline( const SwRedlineData* /*pRedline*/ ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::Redline( const SwRedlineData* pRedline )\n" ); -#endif + OSL_TRACE( "TODO DocxAttributeOutput::Redline( const SwRedlineData* pRedline )\n" ); } /// Append the number as 2-digit when less than 10. @@ -936,9 +926,7 @@ void DocxAttributeOutput::StartRedline( const SwRedlineData* pRedlineData ) break; case nsRedlineType_t::REDLINE_FORMAT: -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::StartRedline()\n" ); -#endif + OSL_TRACE( "TODO DocxAttributeOutput::StartRedline()\n" ); default: break; } @@ -960,9 +948,7 @@ void DocxAttributeOutput::EndRedline() break; case nsRedlineType_t::REDLINE_FORMAT: -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::EndRedline()\n" ); -#endif + OSL_TRACE( "TODO DocxAttributeOutput::EndRedline()\n" ); break; default: break; @@ -973,9 +959,7 @@ void DocxAttributeOutput::EndRedline() void DocxAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, USHORT /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle )\n" ); -#endif + OSL_TRACE( "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle )\n" ); } void DocxAttributeOutput::ParagraphStyle( USHORT nStyle ) @@ -990,7 +974,7 @@ void DocxAttributeOutput::ParagraphStyle( USHORT nStyle ) void DocxAttributeOutput::InTable() { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::InTable()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::InTable()\n" ); #endif } @@ -998,7 +982,7 @@ void DocxAttributeOutput::InTable() void DocxAttributeOutput::TableRowProperties( bool /*bHeader*/, long /*nCellHeight*/, bool /*bCannotSplit*/, bool /*bRightToLeft*/ ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::TableRowProperties()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::TableRowProperties()\n" ); #endif } #endif @@ -1439,9 +1423,7 @@ void DocxAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer void DocxAttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t /*pNodeInfo*/ ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO: DocxAttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo )\n" ); -#endif + OSL_TRACE( "TODO: DocxAttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo )\n" ); } void DocxAttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner ) @@ -1455,16 +1437,12 @@ void DocxAttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointe void DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO: DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )\n" ); -#endif + OSL_TRACE( "TODO: DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )\n" ); } void DocxAttributeOutput::TableRowEnd( sal_uInt32 /*nDepth*/ ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO: DocxAttributeOutput::TableRowEnd( sal_uInt32 nDepth = 1 )\n" ); -#endif + OSL_TRACE( "TODO: DocxAttributeOutput::TableRowEnd( sal_uInt32 nDepth = 1 )\n" ); } void DocxAttributeOutput::StartStyles() @@ -1483,7 +1461,7 @@ void DocxAttributeOutput::DefaultStyle( USHORT nStyle ) { // are these the values of enum ww::sti (see ../inc/wwstyles.hxx)? #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::DefaultStyle( USHORT nStyle )- %d\n", nStyle ); + OSL_TRACE( "TODO DocxAttributeOutput::DefaultStyle( USHORT nStyle )- %d\n", nStyle ); #else (void) nStyle; // to quiet the warning #endif @@ -1492,7 +1470,7 @@ void DocxAttributeOutput::DefaultStyle( USHORT nStyle ) void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize ) - some stuff still missing\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize ) - some stuff still missing\n" ); #endif // create the relation ID OString aRelId; @@ -1710,7 +1688,7 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po break; default: #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Point& rNdTopLeft ) - frame type '%s'\n", + OSL_TRACE( "TODO DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Point& rNdTopLeft ) - frame type '%s'\n", rFrame.GetWriterType() == sw::Frame::eTxtBox? "eTxtBox": ( rFrame.GetWriterType() == sw::Frame::eOle? "eOle": ( rFrame.GetWriterType() == sw::Frame::eFormControl? "eFormControl": "???" ) ) ); @@ -1839,7 +1817,7 @@ void DocxAttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo break; default: #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "Unknown section break to write: %d\n", nC ); + OSL_TRACE( "Unknown section break to write: %d\n", nC ); #endif break; } @@ -1879,7 +1857,7 @@ void DocxAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLi { // see 2.6.8 lnNumType (Line Numbering Settings) #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::SectionLineNumbering()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::SectionLineNumbering()\n" ); #endif } @@ -1965,7 +1943,7 @@ void DocxAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRes // see 2.6.12 pgNumType (Page Numbering Settings) #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::SectionPageNumbering()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::SectionPageNumbering()\n" ); #endif } @@ -2073,7 +2051,7 @@ void DocxAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRul #if OSL_DEBUG_LEVEL > 0 // TODO ww8 version writes this, anything to do about it here? if ( rRule.IsContinusNum() ) - fprintf( stderr, "TODO DocxAttributeOutput::NumberingDefinition()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::NumberingDefinition()\n" ); #else (void) rRule; // to quiet the warning... #endif @@ -2265,7 +2243,7 @@ void DocxAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut ) void DocxAttributeOutput::CharEscapement( const SvxEscapementItem& /*rEscapement*/ ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::CharEscapement()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::CharEscapement()\n" ); #endif } @@ -2382,7 +2360,7 @@ void DocxAttributeOutput::CharWeight( const SvxWeightItem& rWeight ) void DocxAttributeOutput::CharAutoKern( const SvxAutoKernItem& ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::CharAutoKern()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::CharAutoKern()\n" ); #endif } @@ -2554,7 +2532,7 @@ void DocxAttributeOutput::TextINetFormat( const SwFmtINetFmt& rLink ) void DocxAttributeOutput::TextCharFormat( const SwFmtCharFmt& ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::TextCharFormat()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::TextCharFormat()\n" ); #endif } @@ -2577,14 +2555,14 @@ void DocxAttributeOutput::RefField( const SwField& rFld, const String& rRef ) void DocxAttributeOutput::HiddenField( const SwField& /*rFld*/ ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::HiddenField()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::HiddenField()\n" ); #endif } void DocxAttributeOutput::PostitField( const SwField* /* pFld*/ ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::PostitField()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::PostitField()\n" ); #endif } @@ -2970,7 +2948,7 @@ void DocxAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize ) if ( m_rExport.bOutFlyFrmAttrs ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatFrameSize() - Fly frames\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::FormatFrameSize() - Fly frames\n" ); #endif } else if ( m_rExport.bOutPageDescs ) @@ -2993,7 +2971,7 @@ void DocxAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize ) void DocxAttributeOutput::FormatPaperBin( const SvxPaperBinItem& ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatPaperBin()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::FormatPaperBin()\n" ); #endif } @@ -3002,7 +2980,7 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace ) if ( m_rExport.bOutFlyFrmAttrs ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "DocxAttributeOutput::FormatLRSpace() - Fly frames\n" ); + OSL_TRACE( "DocxAttributeOutput::FormatLRSpace() - Fly frames\n" ); #endif } else if ( m_rExport.bOutPageDescs ) @@ -3093,28 +3071,28 @@ void DocxAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace ) void DocxAttributeOutput::FormatSurround( const SwFmtSurround& ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatSurround()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::FormatSurround()\n" ); #endif } void DocxAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatVertOrientation()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::FormatVertOrientation()\n" ); #endif } void DocxAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatHorizOrientation()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::FormatHorizOrientation()\n" ); #endif } void DocxAttributeOutput::FormatAnchor( const SwFmtAnchor& ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatAnchor()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::FormatAnchor()\n" ); #endif } @@ -3129,7 +3107,7 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush ) } #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatBackground()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::FormatBackground()\n" ); #endif } @@ -3215,9 +3193,7 @@ void DocxAttributeOutput::FormatKeep( const SvxFmtKeepItem& ) void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatTextGrid()\n" ); -#endif + OSL_TRACE( "TODO DocxAttributeOutput::FormatTextGrid()\n" ); } void DocxAttributeOutput::FormatLineNumbering( const SwFmtLineNumber& rNumbering ) diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 195dd04ecf..df708ebbb3 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -342,9 +342,7 @@ void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const St void DocxExport::WriteFormData( const ::sw::mark::IFieldmark& /*rFieldmark*/ ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxExport::WriteFormData()\n" ); -#endif + OSL_TRACE( "TODO DocxExport::WriteFormData()\n" ); } void DocxExport::DoComboBox(const rtl::OUString& rName, @@ -404,9 +402,7 @@ void DocxExport::DoComboBox(const rtl::OUString& rName, void DocxExport::DoFormText(const SwInputField* /*pFld*/) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxExport::ForFormText()\n" ); -#endif + OSL_TRACE( "TODO DocxExport::ForFormText()\n" ); } void DocxExport::ExportDocument_Impl() @@ -430,9 +426,7 @@ void DocxExport::ExportDocument_Impl() void DocxExport::OutputPageSectionBreaks( const SwTxtNode& ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxExport::OutputPageSectionBreaks( const SwTxtNode& )\n" ); -#endif + OSL_TRACE( "TODO DocxExport::OutputPageSectionBreaks( const SwTxtNode& )\n" ); } @@ -480,23 +474,17 @@ void DocxExport::OutputEndNode( const SwEndNode& rEndNode ) void DocxExport::OutputTableNode( const SwTableNode& ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxExport::OutputTableNode( const SwTableNode& )\n" ); -#endif + OSL_TRACE( "TODO DocxExport::OutputTableNode( const SwTableNode& )\n" ); } void DocxExport::OutputGrfNode( const SwGrfNode& ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxExport::OutputGrfNode( const SwGrfNode& )\n" ); -#endif + OSL_TRACE( "TODO DocxExport::OutputGrfNode( const SwGrfNode& )\n" ); } void DocxExport::OutputOLENode( const SwOLENode& ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxExport::OutputOLENode( const SwOLENode& )\n" ); -#endif + OSL_TRACE( "TODO DocxExport::OutputOLENode( const SwOLENode& )\n" ); } ULONG DocxExport::ReplaceCr( BYTE ) diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index ac01fab4f1..3d7d44f50c 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -47,7 +47,7 @@ DocxExportFilter::DocxExportFilter( const uno::Reference< lang::XMultiServiceFac bool DocxExportFilter::exportDocument() { - fprintf( stderr, "DocxExportFilter::exportDocument()\n" ); // DEBUG remove me + OSL_TRACE(, "DocxExportFilter::exportDocument()\n" ); // DEBUG remove me // get SwDoc* uno::Reference< uno::XInterface > xIfc( getModel(), uno::UNO_QUERY ); diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 96ae026c1d..1c6d5d2ff5 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -2709,7 +2709,7 @@ void MSWordExportBase::OutputContentNode( const SwCntntNode& rNode ) break; default: #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "Unhandled node, type == %d\n", rNode.GetNodeType() ); + OSL_TRACE("Unhandled node, type == %d\n", rNode.GetNodeType() ); #endif break; } diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index f0e3c64fe4..fd9b7d5142 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -94,9 +94,7 @@ using namespace nsFieldFlags; void WW8Export::OutputGrfNode( const SwGrfNode& /*rNode*/ ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "WW8Export::OutputGrfNode( const SwGrfNode& )\n" ); -#endif + OSL_TRACE("WW8Export::OutputGrfNode( const SwGrfNode& )\n" ); ASSERT( mpParentFrame, "frame not set!" ); if ( mpParentFrame ) { @@ -216,9 +214,7 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet, void WW8Export::OutputOLENode( const SwOLENode& rOLENode ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "WW8Export::OutputOLENode( const SwOLENode& rOLENode )\n" ); -#endif + OSL_TRACE("WW8Export::OutputOLENode( const SwOLENode& rOLENode )\n" ); BYTE *pSpecOLE; BYTE *pDataAdr; short nSize; diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 61e8d6016c..1ee83b7beb 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -5254,9 +5254,7 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt ) break; default: -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "Unhandled SfxPoolItem with id %d.\n", rHt.Which() ); -#endif + OSL_TRACE("Unhandled SfxPoolItem with id %d.\n", rHt.Which() ); break; } } -- cgit v1.2.3 From 544938263a1365c73ce723cddf2e427ee882658d Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 7 Apr 2010 22:36:23 +0200 Subject: slidecopy: initial, empty ToolPanelDeck in a TaskPane (docking) window --- sw/source/ui/uiview/view0.cxx | 1 + sw/uiconfig/swriter/menubar/menubar.xml | 879 ++++++++++++++++---------------- 2 files changed, 441 insertions(+), 439 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx index bf8bf5a2b6..d1cea3bb60 100644 --- a/sw/source/ui/uiview/view0.cxx +++ b/sw/source/ui/uiview/view0.cxx @@ -118,6 +118,7 @@ SFX_IMPL_VIEWFACTORY(SwView, SW_RES(STR_NONAME)) SFX_IMPL_INTERFACE( SwView, SfxViewShell, SW_RES(RID_TOOLS_TOOLBOX) ) { SFX_CHILDWINDOW_CONTEXT_REGISTRATION(SID_NAVIGATOR); + SFX_CHILDWINDOW_REGISTRATION(SID_TASKPANE); SFX_CHILDWINDOW_REGISTRATION(SfxTemplateDialogWrapper::GetChildWindowId()); SFX_CHILDWINDOW_REGISTRATION(SvxSearchDialogWrapper::GetChildWindowId()); SFX_CHILDWINDOW_REGISTRATION(SwSpellDialogChildWindow::GetChildWindowId()); diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml index 7c44f84982..e15492638b 100644 --- a/sw/uiconfig/swriter/menubar/menubar.xml +++ b/sw/uiconfig/swriter/menubar/menubar.xml @@ -1,460 +1,461 @@ - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + + + + + + + + - - - + + + + + + + - - + + + - - - - - - - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From cf1321d7b862b1423f01a5efef1185842a3446a7 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Thu, 8 Apr 2010 15:05:02 +0100 Subject: cmcfixes74: #i110565 use checkboxes in popupmenus for mutually exclusive options instead of checkboxes --- sw/source/ui/app/mn.src | 5 +++++ sw/source/ui/inc/swmn_tmpl.hrc | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src index a0351700ff..501876f4e9 100644 --- a/sw/source/ui/app/mn.src +++ b/sw/source/ui/app/mn.src @@ -686,6 +686,7 @@ String MN_DRAW_POPUPMENU #define MN_AT_FRAME \ MenuItem\ {\ + RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_FRAME ; \ HelpID = FN_TOOL_ANKER_FRAME ; \ Text [ en-US ] = "To ~Frame" ; \ @@ -704,24 +705,28 @@ String MN_DRAW_POPUPMENU {\ MenuItem\ {\ + RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_PAGE ; \ HelpID = FN_TOOL_ANKER_PAGE ; \ Text [ en-US ] = "To P~age" ; \ };\ MenuItem\ {\ + RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_PARAGRAPH ; \ HelpID = FN_TOOL_ANKER_PARAGRAPH ; \ Text [ en-US ] = "To ~Paragraph" ; \ };\ MenuItem\ {\ + RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_AT_CHAR ; \ HelpID = FN_TOOL_ANKER_AT_CHAR ; \ Text [ en-US ] = "To ~Character" ; \ };\ MenuItem\ {\ + RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_CHAR ; \ HelpID = FN_TOOL_ANKER_CHAR ; \ Text [ en-US ] = "As C~haracter" ; \ diff --git a/sw/source/ui/inc/swmn_tmpl.hrc b/sw/source/ui/inc/swmn_tmpl.hrc index ff71288bcc..af1c013c1a 100644 --- a/sw/source/ui/inc/swmn_tmpl.hrc +++ b/sw/source/ui/inc/swmn_tmpl.hrc @@ -131,7 +131,6 @@ HelpID = MN_FORMAT_ALGN ; \ Command = ".uno:AlignTextMenu" ; \ Text [ en-US ] = "A~lignment" ; \ - RadioCheck = TRUE ; \ SubMenu = Menu\ {\ ItemList = \ -- cgit v1.2.3 From 0f055fd1c5b4daf896f32c2a2a561c3962336c36 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Thu, 8 Apr 2010 15:13:12 +0100 Subject: cmcfixes74: #i110565 set first paragraph to explicitly be a checkbox --- sw/source/ui/app/mn.src | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sw/source') diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src index 501876f4e9..aeb8fca52d 100644 --- a/sw/source/ui/app/mn.src +++ b/sw/source/ui/app/mn.src @@ -597,6 +597,7 @@ Menu MN_TAB_POPUPMENU MN_EDIT_CONTOUR\ MenuItem\ {\ + Checkable = TRUE ; \ Identifier = FN_WRAP_ANCHOR_ONLY ; \ HelpID = FN_WRAP_ANCHOR_ONLY ; \ Text [ en-US ] = "~First Paragraph" ; \ @@ -661,6 +662,7 @@ String MN_DRAW_POPUPMENU MN_WRAP_CONTOUR_1\ MenuItem\ {\ + Checkable = TRUE ; \ Identifier = FN_WRAP_ANCHOR_ONLY ; \ HelpID = FN_WRAP_ANCHOR_ONLY ; \ Text [ en-US ] = "~First Paragraph" ; \ -- cgit v1.2.3 From 7b3bca56bbc5ee75a5a16f173a99af0b3a69125b Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Thu, 8 Apr 2010 17:30:13 +0100 Subject: cmcfixes74: #i110565 consistently set the menus to be checkboxes if the entries are mutually exclusive and one entry is set --- sw/source/ui/lingu/olmenu.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 7b96817fe8..c0f9516723 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -307,6 +307,9 @@ USHORT SwSpellPopup::fillLangPopupMenu( } } + bool bMultipleLanguages = (nLangTable != 0) || (curLang.compareToAscii( "*" ) == 0); + bool bNothingSelected = true; + MenuItemBits nMenuItemStyle = !bMultipleLanguages ? MIB_RADIOCHECK : 0; for (std::map< rtl::OUString, rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it) { rtl::OUString aEntryTxt( it->first ); @@ -322,22 +325,25 @@ USHORT SwSpellPopup::fillLangPopupMenu( else if (nLangTable == 2) // language for document aLangTable_Document[nItemId] = aEntryTxt; - pPopupMenu->InsertItem( nItemId, aEntryTxt, MIB_RADIOCHECK ); - if (aEntryTxt == curLang) + pPopupMenu->InsertItem( nItemId, aEntryTxt, nMenuItemStyle ); + if ((nLangTable == 0) && (aEntryTxt == curLang)) { //make a check mark for the current language pPopupMenu->CheckItem( nItemId, TRUE ); + bNothingSelected = false; } } } //7--none nItemId++; - pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_NONE )), MIB_RADIOCHECK ); + pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_NONE )), nMenuItemStyle ); + if (bNothingSelected && !bMultipleLanguages) + pPopupMenu->CheckItem( nItemId, TRUE ); //More... nItemId++; - pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_MORE )), MIB_RADIOCHECK ); + pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_MORE )) ); return nItemId - Lang_Start; // return number of inserted entries } -- cgit v1.2.3 From 21243ff779cb2fa8784f153aa2d149666cf12764 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Mon, 12 Apr 2010 15:33:12 +0100 Subject: cmcfixes74: #i110565 move the radiobuttons work to sdfindall --- sw/source/ui/app/mn.src | 7 ------- sw/source/ui/inc/swmn_tmpl.hrc | 1 + sw/source/ui/lingu/olmenu.cxx | 14 ++++---------- sw/uiconfig/sglobal/menubar/menubar.xml | 22 +++++++++++----------- sw/uiconfig/sweb/menubar/menubar.xml | 22 +++++++++++----------- sw/uiconfig/swform/menubar/menubar.xml | 22 +++++++++++----------- sw/uiconfig/swreport/menubar/menubar.xml | 22 +++++++++++----------- sw/uiconfig/swriter/menubar/menubar.xml | 26 +++++++++++++------------- sw/uiconfig/swxform/menubar/menubar.xml | 22 +++++++++++----------- 9 files changed, 73 insertions(+), 85 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src index aeb8fca52d..a0351700ff 100644 --- a/sw/source/ui/app/mn.src +++ b/sw/source/ui/app/mn.src @@ -597,7 +597,6 @@ Menu MN_TAB_POPUPMENU MN_EDIT_CONTOUR\ MenuItem\ {\ - Checkable = TRUE ; \ Identifier = FN_WRAP_ANCHOR_ONLY ; \ HelpID = FN_WRAP_ANCHOR_ONLY ; \ Text [ en-US ] = "~First Paragraph" ; \ @@ -662,7 +661,6 @@ String MN_DRAW_POPUPMENU MN_WRAP_CONTOUR_1\ MenuItem\ {\ - Checkable = TRUE ; \ Identifier = FN_WRAP_ANCHOR_ONLY ; \ HelpID = FN_WRAP_ANCHOR_ONLY ; \ Text [ en-US ] = "~First Paragraph" ; \ @@ -688,7 +686,6 @@ String MN_DRAW_POPUPMENU #define MN_AT_FRAME \ MenuItem\ {\ - RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_FRAME ; \ HelpID = FN_TOOL_ANKER_FRAME ; \ Text [ en-US ] = "To ~Frame" ; \ @@ -707,28 +704,24 @@ String MN_DRAW_POPUPMENU {\ MenuItem\ {\ - RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_PAGE ; \ HelpID = FN_TOOL_ANKER_PAGE ; \ Text [ en-US ] = "To P~age" ; \ };\ MenuItem\ {\ - RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_PARAGRAPH ; \ HelpID = FN_TOOL_ANKER_PARAGRAPH ; \ Text [ en-US ] = "To ~Paragraph" ; \ };\ MenuItem\ {\ - RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_AT_CHAR ; \ HelpID = FN_TOOL_ANKER_AT_CHAR ; \ Text [ en-US ] = "To ~Character" ; \ };\ MenuItem\ {\ - RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_CHAR ; \ HelpID = FN_TOOL_ANKER_CHAR ; \ Text [ en-US ] = "As C~haracter" ; \ diff --git a/sw/source/ui/inc/swmn_tmpl.hrc b/sw/source/ui/inc/swmn_tmpl.hrc index af1c013c1a..ff71288bcc 100644 --- a/sw/source/ui/inc/swmn_tmpl.hrc +++ b/sw/source/ui/inc/swmn_tmpl.hrc @@ -131,6 +131,7 @@ HelpID = MN_FORMAT_ALGN ; \ Command = ".uno:AlignTextMenu" ; \ Text [ en-US ] = "A~lignment" ; \ + RadioCheck = TRUE ; \ SubMenu = Menu\ {\ ItemList = \ diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 895ba0683d..02a342e02f 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -307,9 +307,6 @@ USHORT SwSpellPopup::fillLangPopupMenu( } } - bool bMultipleLanguages = (nLangTable != 0) || (curLang.compareToAscii( "*" ) == 0); - bool bNothingSelected = true; - MenuItemBits nMenuItemStyle = !bMultipleLanguages ? MIB_RADIOCHECK : 0; for (std::map< rtl::OUString, rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it) { rtl::OUString aEntryTxt( it->first ); @@ -325,25 +322,22 @@ USHORT SwSpellPopup::fillLangPopupMenu( else if (nLangTable == 2) // language for document aLangTable_Document[nItemId] = aEntryTxt; - pPopupMenu->InsertItem( nItemId, aEntryTxt, nMenuItemStyle ); - if ((nLangTable == 0) && (aEntryTxt == curLang)) + pPopupMenu->InsertItem( nItemId, aEntryTxt, MIB_RADIOCHECK ); + if (aEntryTxt == curLang) { //make a check mark for the current language pPopupMenu->CheckItem( nItemId, TRUE ); - bNothingSelected = false; } } } //7--none nItemId++; - pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_NONE )), nMenuItemStyle ); - if (bNothingSelected && !bMultipleLanguages) - pPopupMenu->CheckItem( nItemId, TRUE ); + pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_NONE )), MIB_RADIOCHECK ); //More... nItemId++; - pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_MORE )) ); + pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_MORE )), MIB_RADIOCHECK ); return nItemId - Lang_Start; // return number of inserted entries } diff --git a/sw/uiconfig/sglobal/menubar/menubar.xml b/sw/uiconfig/sglobal/menubar/menubar.xml index 01fbb454bf..4b46f4d46a 100644 --- a/sw/uiconfig/sglobal/menubar/menubar.xml +++ b/sw/uiconfig/sglobal/menubar/menubar.xml @@ -65,8 +65,8 @@ - - + + @@ -240,11 +240,11 @@ - - - - - + + + + + @@ -264,10 +264,10 @@ - - - - + + + + diff --git a/sw/uiconfig/sweb/menubar/menubar.xml b/sw/uiconfig/sweb/menubar/menubar.xml index b9368a94c2..4be8c6f8e7 100644 --- a/sw/uiconfig/sweb/menubar/menubar.xml +++ b/sw/uiconfig/sweb/menubar/menubar.xml @@ -54,8 +54,8 @@ - - + + @@ -187,11 +187,11 @@ - - - - - + + + + + @@ -211,10 +211,10 @@ - - - - + + + + diff --git a/sw/uiconfig/swform/menubar/menubar.xml b/sw/uiconfig/swform/menubar/menubar.xml index 2174db8a0c..13448e4247 100644 --- a/sw/uiconfig/swform/menubar/menubar.xml +++ b/sw/uiconfig/swform/menubar/menubar.xml @@ -66,8 +66,8 @@ - - + + @@ -240,11 +240,11 @@ - - - - - + + + + + @@ -264,10 +264,10 @@ - - - - + + + + diff --git a/sw/uiconfig/swreport/menubar/menubar.xml b/sw/uiconfig/swreport/menubar/menubar.xml index 6cd3f3c8c7..1f94b7ced1 100644 --- a/sw/uiconfig/swreport/menubar/menubar.xml +++ b/sw/uiconfig/swreport/menubar/menubar.xml @@ -66,8 +66,8 @@ - - + + @@ -240,11 +240,11 @@ - - - - - + + + + + @@ -264,10 +264,10 @@ - - - - + + + + diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml index 06af710d2f..7c44f84982 100644 --- a/sw/uiconfig/swriter/menubar/menubar.xml +++ b/sw/uiconfig/swriter/menubar/menubar.xml @@ -69,8 +69,8 @@ - - + + @@ -106,8 +106,8 @@ - - + + @@ -243,11 +243,11 @@ - - - - - + + + + + @@ -267,10 +267,10 @@ - - - - + + + + diff --git a/sw/uiconfig/swxform/menubar/menubar.xml b/sw/uiconfig/swxform/menubar/menubar.xml index 85008cae24..b37a8e14d2 100644 --- a/sw/uiconfig/swxform/menubar/menubar.xml +++ b/sw/uiconfig/swxform/menubar/menubar.xml @@ -67,8 +67,8 @@ - - + + @@ -241,11 +241,11 @@ - - - - - + + + + + @@ -265,10 +265,10 @@ - - - - + + + + -- cgit v1.2.3 From ca648d5122e4d3b3577ec06dc8dedad7f5fae1c9 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Mon, 12 Apr 2010 15:34:14 +0100 Subject: cmcfixes74: #i110565 use radio buttons for mutually exclusive options in menus --- sw/source/ui/app/mn.src | 7 +++++++ sw/source/ui/inc/swmn_tmpl.hrc | 1 - sw/source/ui/lingu/olmenu.cxx | 14 ++++++++++---- sw/uiconfig/sglobal/menubar/menubar.xml | 22 +++++++++++----------- sw/uiconfig/sweb/menubar/menubar.xml | 22 +++++++++++----------- sw/uiconfig/swform/menubar/menubar.xml | 22 +++++++++++----------- sw/uiconfig/swreport/menubar/menubar.xml | 22 +++++++++++----------- sw/uiconfig/swriter/menubar/menubar.xml | 26 +++++++++++++------------- sw/uiconfig/swxform/menubar/menubar.xml | 22 +++++++++++----------- 9 files changed, 85 insertions(+), 73 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src index a0351700ff..aeb8fca52d 100644 --- a/sw/source/ui/app/mn.src +++ b/sw/source/ui/app/mn.src @@ -597,6 +597,7 @@ Menu MN_TAB_POPUPMENU MN_EDIT_CONTOUR\ MenuItem\ {\ + Checkable = TRUE ; \ Identifier = FN_WRAP_ANCHOR_ONLY ; \ HelpID = FN_WRAP_ANCHOR_ONLY ; \ Text [ en-US ] = "~First Paragraph" ; \ @@ -661,6 +662,7 @@ String MN_DRAW_POPUPMENU MN_WRAP_CONTOUR_1\ MenuItem\ {\ + Checkable = TRUE ; \ Identifier = FN_WRAP_ANCHOR_ONLY ; \ HelpID = FN_WRAP_ANCHOR_ONLY ; \ Text [ en-US ] = "~First Paragraph" ; \ @@ -686,6 +688,7 @@ String MN_DRAW_POPUPMENU #define MN_AT_FRAME \ MenuItem\ {\ + RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_FRAME ; \ HelpID = FN_TOOL_ANKER_FRAME ; \ Text [ en-US ] = "To ~Frame" ; \ @@ -704,24 +707,28 @@ String MN_DRAW_POPUPMENU {\ MenuItem\ {\ + RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_PAGE ; \ HelpID = FN_TOOL_ANKER_PAGE ; \ Text [ en-US ] = "To P~age" ; \ };\ MenuItem\ {\ + RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_PARAGRAPH ; \ HelpID = FN_TOOL_ANKER_PARAGRAPH ; \ Text [ en-US ] = "To ~Paragraph" ; \ };\ MenuItem\ {\ + RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_AT_CHAR ; \ HelpID = FN_TOOL_ANKER_AT_CHAR ; \ Text [ en-US ] = "To ~Character" ; \ };\ MenuItem\ {\ + RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_CHAR ; \ HelpID = FN_TOOL_ANKER_CHAR ; \ Text [ en-US ] = "As C~haracter" ; \ diff --git a/sw/source/ui/inc/swmn_tmpl.hrc b/sw/source/ui/inc/swmn_tmpl.hrc index ff71288bcc..af1c013c1a 100644 --- a/sw/source/ui/inc/swmn_tmpl.hrc +++ b/sw/source/ui/inc/swmn_tmpl.hrc @@ -131,7 +131,6 @@ HelpID = MN_FORMAT_ALGN ; \ Command = ".uno:AlignTextMenu" ; \ Text [ en-US ] = "A~lignment" ; \ - RadioCheck = TRUE ; \ SubMenu = Menu\ {\ ItemList = \ diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 7b96817fe8..c0f9516723 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -307,6 +307,9 @@ USHORT SwSpellPopup::fillLangPopupMenu( } } + bool bMultipleLanguages = (nLangTable != 0) || (curLang.compareToAscii( "*" ) == 0); + bool bNothingSelected = true; + MenuItemBits nMenuItemStyle = !bMultipleLanguages ? MIB_RADIOCHECK : 0; for (std::map< rtl::OUString, rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it) { rtl::OUString aEntryTxt( it->first ); @@ -322,22 +325,25 @@ USHORT SwSpellPopup::fillLangPopupMenu( else if (nLangTable == 2) // language for document aLangTable_Document[nItemId] = aEntryTxt; - pPopupMenu->InsertItem( nItemId, aEntryTxt, MIB_RADIOCHECK ); - if (aEntryTxt == curLang) + pPopupMenu->InsertItem( nItemId, aEntryTxt, nMenuItemStyle ); + if ((nLangTable == 0) && (aEntryTxt == curLang)) { //make a check mark for the current language pPopupMenu->CheckItem( nItemId, TRUE ); + bNothingSelected = false; } } } //7--none nItemId++; - pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_NONE )), MIB_RADIOCHECK ); + pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_NONE )), nMenuItemStyle ); + if (bNothingSelected && !bMultipleLanguages) + pPopupMenu->CheckItem( nItemId, TRUE ); //More... nItemId++; - pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_MORE )), MIB_RADIOCHECK ); + pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_MORE )) ); return nItemId - Lang_Start; // return number of inserted entries } diff --git a/sw/uiconfig/sglobal/menubar/menubar.xml b/sw/uiconfig/sglobal/menubar/menubar.xml index 4b46f4d46a..01fbb454bf 100644 --- a/sw/uiconfig/sglobal/menubar/menubar.xml +++ b/sw/uiconfig/sglobal/menubar/menubar.xml @@ -65,8 +65,8 @@ - - + + @@ -240,11 +240,11 @@ - - - - - + + + + + @@ -264,10 +264,10 @@ - - - - + + + + diff --git a/sw/uiconfig/sweb/menubar/menubar.xml b/sw/uiconfig/sweb/menubar/menubar.xml index 4be8c6f8e7..b9368a94c2 100644 --- a/sw/uiconfig/sweb/menubar/menubar.xml +++ b/sw/uiconfig/sweb/menubar/menubar.xml @@ -54,8 +54,8 @@ - - + + @@ -187,11 +187,11 @@ - - - - - + + + + + @@ -211,10 +211,10 @@ - - - - + + + + diff --git a/sw/uiconfig/swform/menubar/menubar.xml b/sw/uiconfig/swform/menubar/menubar.xml index 13448e4247..2174db8a0c 100644 --- a/sw/uiconfig/swform/menubar/menubar.xml +++ b/sw/uiconfig/swform/menubar/menubar.xml @@ -66,8 +66,8 @@ - - + + @@ -240,11 +240,11 @@ - - - - - + + + + + @@ -264,10 +264,10 @@ - - - - + + + + diff --git a/sw/uiconfig/swreport/menubar/menubar.xml b/sw/uiconfig/swreport/menubar/menubar.xml index 1f94b7ced1..6cd3f3c8c7 100644 --- a/sw/uiconfig/swreport/menubar/menubar.xml +++ b/sw/uiconfig/swreport/menubar/menubar.xml @@ -66,8 +66,8 @@ - - + + @@ -240,11 +240,11 @@ - - - - - + + + + + @@ -264,10 +264,10 @@ - - - - + + + + diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml index 7c44f84982..06af710d2f 100644 --- a/sw/uiconfig/swriter/menubar/menubar.xml +++ b/sw/uiconfig/swriter/menubar/menubar.xml @@ -69,8 +69,8 @@ - - + + @@ -106,8 +106,8 @@ - - + + @@ -243,11 +243,11 @@ - - - - - + + + + + @@ -267,10 +267,10 @@ - - - - + + + + diff --git a/sw/uiconfig/swxform/menubar/menubar.xml b/sw/uiconfig/swxform/menubar/menubar.xml index b37a8e14d2..85008cae24 100644 --- a/sw/uiconfig/swxform/menubar/menubar.xml +++ b/sw/uiconfig/swxform/menubar/menubar.xml @@ -67,8 +67,8 @@ - - + + @@ -241,11 +241,11 @@ - - - - - + + + + + @@ -265,10 +265,10 @@ - - - - + + + + -- cgit v1.2.3 From 2ea42e29a89b935581f1c7946b0a3f7b0de6604b Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Mon, 12 Apr 2010 15:43:22 +0100 Subject: cmcfixes74: #i110814 make ww8 .doc font importer a little more robust --- sw/source/filter/ww8/ww8scan.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 5fd6d59733..58af49ca6e 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -32,6 +32,7 @@ #include +#include #include // memset() #include @@ -6400,8 +6401,10 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib ) #ifdef __WW8_NEEDS_COPY { BYTE nLen = 0x28; + BYTE nLength = sizeof( pVer8->szFfn ) / sizeof( SVBT16 ); + nLength = std::min( nLength, BYTE( pVer8->cbFfnM1+1 ) ); for( UINT16* pTmp = pVer8->szFfn; - nLen < pVer8->cbFfnM1 + 1 ; ++pTmp, nLen+=2 ) + nLen < nLength; ++pTmp, nLen+=2 ) { *pTmp = SVBT16ToShort( *(SVBT16*)pTmp ); } -- cgit v1.2.3 From f034a3c6060134c4dccbbc6dd898adbccbc3d677 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 14 Apr 2010 08:48:08 +0100 Subject: cmcfixes74: #i110859 fix lowhanging ww8 cppcheck warnings --- sw/source/filter/ww8/dump/ww8scan.cxx | 4 ---- sw/source/filter/ww8/dump/ww8scan.hxx | 3 +-- sw/source/filter/ww8/wrtww8.hxx | 2 +- sw/source/filter/ww8/ww8graf.hxx | 4 ---- sw/source/filter/ww8/ww8par.cxx | 1 + sw/source/filter/ww8/ww8par.hxx | 10 ---------- sw/source/filter/ww8/ww8scan.hxx | 1 + 7 files changed, 4 insertions(+), 21 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/dump/ww8scan.cxx b/sw/source/filter/ww8/dump/ww8scan.cxx index dc33079091..e2f5f3e8cf 100644 --- a/sw/source/filter/ww8/dump/ww8scan.cxx +++ b/sw/source/filter/ww8/dump/ww8scan.cxx @@ -31,12 +31,8 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */ -#ifndef __SGI_STL_ALGORITHM #include -#endif -#ifndef __SGI_STL_FUNCTIONAL #include -#endif #include // memset() #include diff --git a/sw/source/filter/ww8/dump/ww8scan.hxx b/sw/source/filter/ww8/dump/ww8scan.hxx index 8a0ede2343..2f7922133d 100644 --- a/sw/source/filter/ww8/dump/ww8scan.hxx +++ b/sw/source/filter/ww8/dump/ww8scan.hxx @@ -297,8 +297,7 @@ class WW8PLCFx // virtueller Iterator fuer Piece Table Exceptions public: WW8PLCFx( BYTE nFibVersion, BOOL bSprm ) { bIsSprm = bSprm; nVersion = nFibVersion; } - -// virtual ~WW8PLCFx() {} + virtual ~WW8PLCFx() {} BOOL IsSprm() { return bIsSprm; } virtual ULONG GetIdx() const = 0; virtual void SetIdx( ULONG nIdx ) = 0; diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index e513db155d..dd79b0f91c 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -190,7 +190,7 @@ protected: MSWordSections& operator=( const MSWordSections& ); public: MSWordSections( MSWordExportBase& rExport ); - ~MSWordSections(); + virtual ~MSWordSections(); void AppendSep( const SwPageDesc* pPd, const SwSectionFmt* pSectionFmt = 0, diff --git a/sw/source/filter/ww8/ww8graf.hxx b/sw/source/filter/ww8/ww8graf.hxx index fc3b508b3c..7e648d9dd8 100644 --- a/sw/source/filter/ww8/ww8graf.hxx +++ b/sw/source/filter/ww8/ww8graf.hxx @@ -30,12 +30,8 @@ #ifndef _WW8GRAF_HXX #define _WW8GRAF_HXX -#ifndef __SGI_STL_VECTOR #include -#endif -#ifndef __SGI_STL_STACK #include -#endif #include "writerhelper.hxx" struct EscherShape diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 58257baebb..b10e23920b 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2443,6 +2443,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs) { rPos = WW8_CP_MAX-10; // -> eof or other error sPlainCharsBuf.ReleaseBufferAccess( 0 ); + delete [] p8Bits; return true; } diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 56555bdb2f..4f6bb2d99a 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -35,21 +35,11 @@ #include #include // fuer den Attribut Stack -#ifndef __SGI_STL_VECTOR #include -#endif -#ifndef __SGI_STL_STACK #include -#endif -#ifndef __SGI_STL_DEQUE #include -#endif -#ifndef __SGI_STL_MAP #include -#endif -#ifndef __SGI_STL_UTILITY #include -#endif #include "tracer.hxx" #include "ww8struc.hxx" // WW8_BRC diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index 9e8c9ce320..8a0288020b 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -382,6 +382,7 @@ private: public: WW8PLCFx(ww::WordVersion eVersion, bool bSprm) : meVer(eVersion), bIsSprm(bSprm), bDirty(false) {} + virtual ~WW8PLCFx() {} bool IsSprm() const { return bIsSprm; } virtual ULONG GetIdx() const = 0; virtual void SetIdx( ULONG nIdx ) = 0; -- cgit v1.2.3 From 887c63cb203325aec5fd6d481d213e1abba885c4 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 16 Apr 2010 15:14:15 +0200 Subject: slidecopy: now using SID_TASK_PANE in all applications, also in Impress. Implies registering the respective child window in the apps, not in SFX. Also implies getting rid of SID_RIGHT_PANE in Impress. Also, renamed SID_TASK_PANE in Impress to SID_SHOW_TOOL_PANEL, which better fits its purpose, and avoids confusion with SID_TASKPANE. --- starmath/source/smdll.cxx | 3 +++ sw/source/ui/app/swmodule.cxx | 2 ++ 2 files changed, 5 insertions(+) (limited to 'sw/source') diff --git a/starmath/source/smdll.cxx b/starmath/source/smdll.cxx index 2b4b90499a..b4e898fc3d 100644 --- a/starmath/source/smdll.cxx +++ b/starmath/source/smdll.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #ifndef _SMDLL_HXX #include @@ -94,6 +95,8 @@ void SmDLL::Init() SmToolBoxWrapper::RegisterChildWindow(TRUE); SmCmdBoxWrapper::RegisterChildWindow(TRUE); + + ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pp ); } /************************************************************************* diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx index 0790eb4c4d..554f080f8e 100644 --- a/sw/source/ui/app/swmodule.cxx +++ b/sw/source/ui/app/swmodule.cxx @@ -138,6 +138,7 @@ #include #include #include +#include #include #include #include @@ -481,6 +482,7 @@ void SwDLL::RegisterControls() ::avmedia::MediaPlayer::RegisterChildWindow(0, pMod); SvxSmartTagsControl::RegisterControl(SID_OPEN_SMARTTAGMENU, pMod); + ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pMod ); } -- cgit v1.2.3 From f05be6bbd9f5a3b940b03f030139868602c472a6 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 16 Apr 2010 23:02:51 +0200 Subject: CWS gnumake2: move delivered header files from sfx2/inc to sfx2/inc/sfx2; removed unused code; avoid delivering sfx.srs to solver --- starmath/source/view.cxx | 2 +- starmath/util/makefile.mk | 3 +-- sw/prj/d.lst | 1 + sw/source/ui/uiview/pview.cxx | 2 +- sw/source/ui/uiview/srcview.cxx | 8 +++++--- sw/source/ui/uiview/view0.cxx | 2 +- sw/source/ui/vba/service.cxx | 6 +++--- sw/source/ui/web/wview.cxx | 2 +- sw/source/ui/wrtsh/wrtundo.cxx | 11 ++++++----- sw/util/makefile.mk | 7 +++---- 10 files changed, 23 insertions(+), 21 deletions(-) (limited to 'sw/source') diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 4c409a7f8f..c6a1bc9be2 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -752,7 +752,7 @@ SFX_IMPL_INTERFACE(SmViewShell, SfxViewShell, SmResId(0)) } -SFX_IMPL_VIEWFACTORY(SmViewShell, SmResId(RID_VIEWNAME)) +SFX_IMPL_VIEWFACTORY(SmViewShell) { SFX_VIEW_REGISTRATION(SmDocShell); } diff --git a/starmath/util/makefile.mk b/starmath/util/makefile.mk index 978cb6cff4..50ef998b98 100644 --- a/starmath/util/makefile.mk +++ b/starmath/util/makefile.mk @@ -46,8 +46,7 @@ GEN_HID_OTHER=TRUE RESLIB1NAME=sm RESLIB1IMAGES=$(PRJ)$/res RESLIB1SRSFILES=\ - $(SRS)$/smres.srs \ - $(SOLARCOMMONRESDIR)$/sfx.srs + $(SRS)$/smres.srs SHL1TARGET= sm$(DLLPOSTFIX) SHL1IMPLIB= smimp diff --git a/sw/prj/d.lst b/sw/prj/d.lst index 958771dad2..ed58b31407 100644 --- a/sw/prj/d.lst +++ b/sw/prj/d.lst @@ -66,6 +66,7 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\statusbar ..\%__SRC%\bin\vbaswobj*.dll %_DEST%\bin%_EXT%\vbaswobj*.dll ..\%__SRC%\bin\sw*.res %_DEST%\bin%_EXT%\sw*.res ..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.* +..\%__SRC%\lib\vbaswobj* %_DEST%\lib%_EXT%\vbaswobj* ..\uiconfig\swriter\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\menubar\*.xml ..\uiconfig\swxform\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\menubar\*.xml diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index f55f2cf637..f0d7d224b6 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -111,7 +111,7 @@ using namespace ::com::sun::star; -SFX_IMPL_VIEWFACTORY(SwPagePreView, SW_RES(STR_NONAME)) +SFX_IMPL_VIEWFACTORY(SwPagePreView) { SFX_VIEW_REGISTRATION(SwDocShell); SFX_VIEW_REGISTRATION(SwWebDocShell); diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index b2c046a7c6..daa934d8a5 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -52,6 +52,8 @@ #include #include #include +#include +#include #include #include @@ -130,7 +132,7 @@ using ::com::sun::star::util::SearchOptions; -SFX_IMPL_VIEWFACTORY(SwSrcView, SW_RES(STR_NONAME)) +SFX_IMPL_VIEWFACTORY(SwSrcView) { SFX_VIEW_REGISTRATION(SwWebDocShell); } @@ -566,7 +568,7 @@ void SwSrcView::GetState(SfxItemSet& rSet) nCount = rMgr.GetUndoActionCount(); if(nCount) { - String aStr(ResId( STR_UNDO, *SFX_APP()->GetSfxResManager() ));; + String aStr(SvtResId( STR_UNDO));; aStr += rMgr.GetUndoActionComment(--nCount); rSet.Put(SfxStringItem(nWhich, aStr)); } @@ -578,7 +580,7 @@ void SwSrcView::GetState(SfxItemSet& rSet) nCount = rMgr.GetRedoActionCount(); if(nCount) { - String aStr(ResId( STR_REDO, *SFX_APP()->GetSfxResManager() ));; + String aStr(SvtResId( STR_REDO));; aStr += rMgr.GetRedoActionComment(--nCount); rSet.Put(SfxStringItem(nWhich,aStr)); } diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx index bf8bf5a2b6..24b4aef9f0 100644 --- a/sw/source/ui/uiview/view0.cxx +++ b/sw/source/ui/uiview/view0.cxx @@ -106,7 +106,7 @@ using ::rtl::OUString; #include -SFX_IMPL_VIEWFACTORY(SwView, SW_RES(STR_NONAME)) +SFX_IMPL_VIEWFACTORY(SwView) { if ( SvtModuleOptions().IsWriter() ) { diff --git a/sw/source/ui/vba/service.cxx b/sw/source/ui/vba/service.cxx index 84f82ca825..4cd497370d 100644 --- a/sw/source/ui/vba/service.cxx +++ b/sw/source/ui/vba/service.cxx @@ -57,14 +57,14 @@ extern sdecl::ServiceDecl const serviceDecl; extern "C" { - void SAL_CALL component_getImplementationEnvironment( + SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { OSL_TRACE("In component_getImplementationEnv"); *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - sal_Bool SAL_CALL component_writeInfo( + SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) { OSL_TRACE("In component_writeInfo"); @@ -74,7 +74,7 @@ extern "C" globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl ); } - void * SAL_CALL component_getFactory( + SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) { diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx index e86558c2ad..b7bcc8eff9 100644 --- a/sw/source/ui/web/wview.cxx +++ b/sw/source/ui/web/wview.cxx @@ -96,7 +96,7 @@ #include -SFX_IMPL_VIEWFACTORY(SwWebView, SW_RES(STR_NONAME)) +SFX_IMPL_VIEWFACTORY(SwWebView) { SFX_VIEW_REGISTRATION(SwWebDocShell); } diff --git a/sw/source/ui/wrtsh/wrtundo.cxx b/sw/source/ui/wrtsh/wrtundo.cxx index f90dd3606a..340d505a87 100644 --- a/sw/source/ui/wrtsh/wrtundo.cxx +++ b/sw/source/ui/wrtsh/wrtundo.cxx @@ -40,10 +40,11 @@ #include #include // fuer Undo-Ids #include - -#ifndef _WRTSH_HRC +#include +#include +#include +#include #include -#endif #include @@ -131,7 +132,7 @@ String SwWrtShell::GetDoString( DoType eDoType ) const default:;//prevent warning } - aStr.Insert( String(ResId( nResStr, *SFX_APP()->GetSfxResManager())), 0 ); + aStr.Insert( String( SvtResId( nResStr)), 0 ); aStr += aUndoStr; return aStr; @@ -175,7 +176,7 @@ String SwWrtShell::GetRepeatString() const if (aUndoStr.Len() > 0) { - aStr.Insert( ResId( STR_REPEAT, *SFX_APP()->GetSfxResManager()), 0 ); + aStr.Insert( SvtResId( STR_REPEAT ), 0 ); aStr += aUndoStr; } diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk index 08afadc106..cf8b8f176e 100644 --- a/sw/util/makefile.mk +++ b/sw/util/makefile.mk @@ -68,8 +68,7 @@ sw_res_files= \ $(SRS)$/unocore.srs \ $(SRS)$/utlui.srs \ $(SRS)$/web.srs \ - $(SRS)$/wrtsh.srs \ - $(SOLARCOMMONRESDIR)$/sfx.srs + $(SRS)$/wrtsh.srs RESLIB1NAME=sw RESLIB1IMAGES=$(PRJ)$/imglst $(PRJ)$/res @@ -342,9 +341,9 @@ SHL4STDLIBS= \ #target vba TARGET_VBA=vbaswobj -SHL5TARGET=$(TARGET_VBA)$(DLLPOSTFIX).uno +SHL5TARGET=$(TARGET_VBA).uno SHL5IMPLIB= i$(TARGET_VBA) - +SHL5DLLPRE= SHL5VERSIONMAP=$(TARGET_VBA).map SHL5DEF=$(MISC)$/$(SHL5TARGET).def DEF5NAME=$(SHL5TARGET) -- cgit v1.2.3 From ea2f4b2ed81c2a36cab92e70ff0dc305749ed367 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 16 Apr 2010 23:05:45 +0200 Subject: CWS gnumake2: move header generation for oovbaapi to offuh --- sw/prj/build.lst | 2 +- sw/source/ui/vba/makefile.mk | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) (limited to 'sw/source') diff --git a/sw/prj/build.lst b/sw/prj/build.lst index 6fd49c1d77..cf9d0baaa9 100755 --- a/sw/prj/build.lst +++ b/sw/prj/build.lst @@ -1,4 +1,4 @@ -sw sw : filter l10n connectivity OOo:writerperfect vbahelper svx stoc writerfilter NULL +sw sw : filter offuh l10n connectivity OOo:writerperfect vbahelper svx stoc writerfilter NULL sw sw usr1 - all sw_mkout NULL sw sw\inc nmake - all sw_inc NULL sw sw\uiconfig\layout nmake - all sw_layout NULL diff --git a/sw/source/ui/vba/makefile.mk b/sw/source/ui/vba/makefile.mk index f4c604f5d4..47513f95a4 100644 --- a/sw/source/ui/vba/makefile.mk +++ b/sw/source/ui/vba/makefile.mk @@ -100,12 +100,3 @@ SLOFILES= \ .INCLUDE : target.mk -ALLTAR : \ - $(MISC)$/$(TARGET).don \ - -$(SLOFILES) : $(MISC)$/$(TARGET).don - -$(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb - +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@ - echo $@ - -- cgit v1.2.3 From 926fbc289b9a6277ef4c8ba53c985538e7997dbb Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 17 Apr 2010 12:41:17 +0200 Subject: CWS gnumake2: new gbuild system --- sw/Makefile | 30 ++ sw/prj/build.lst | 9 +- sw/prj/gbuild.lst | 3 + sw/prj/makefile.mk | 2 + sw/prj/target_lib_msword.mk | 121 +++++++ sw/prj/target_lib_sw.mk | 744 ++++++++++++++++++++++++++++++++++++++ sw/prj/target_lib_swd.mk | 76 ++++ sw/prj/target_lib_swui.mk | 195 ++++++++++ sw/prj/target_lib_vbaswobj.mk | 133 +++++++ sw/prj/target_module_sw.mk | 50 +++ sw/prj/target_package_misc.mk | 30 ++ sw/prj/target_package_uiconfig.mk | 281 ++++++++++++++ sw/prj/target_package_xml.mk | 29 ++ sw/prj/target_res_sw.mk | 184 ++++++++++ sw/source/core/undo/undo.src | 2 +- sw/source/ui/fmtui/fmtui.src | 91 ----- sw/source/ui/inc/swmn.hrc | 386 ++++++++++++++++++++ sw/source/ui/inc/swmn_tmpl.hrc | 386 -------------------- sw/source/ui/inc/toolbox.hrc | 566 +++++++++++++++++++++++++++++ sw/source/ui/inc/toolbox_tmpl.hrc | 566 ----------------------------- 20 files changed, 2835 insertions(+), 1049 deletions(-) create mode 100644 sw/Makefile create mode 100644 sw/prj/gbuild.lst create mode 100644 sw/prj/makefile.mk create mode 100644 sw/prj/target_lib_msword.mk create mode 100644 sw/prj/target_lib_sw.mk create mode 100644 sw/prj/target_lib_swd.mk create mode 100644 sw/prj/target_lib_swui.mk create mode 100644 sw/prj/target_lib_vbaswobj.mk create mode 100644 sw/prj/target_module_sw.mk create mode 100644 sw/prj/target_package_misc.mk create mode 100644 sw/prj/target_package_uiconfig.mk create mode 100644 sw/prj/target_package_xml.mk create mode 100644 sw/prj/target_res_sw.mk delete mode 100644 sw/source/ui/fmtui/fmtui.src create mode 100644 sw/source/ui/inc/swmn.hrc delete mode 100644 sw/source/ui/inc/swmn_tmpl.hrc create mode 100644 sw/source/ui/inc/toolbox.hrc delete mode 100644 sw/source/ui/inc/toolbox_tmpl.hrc (limited to 'sw/source') diff --git a/sw/Makefile b/sw/Makefile new file mode 100644 index 0000000000..d020b04dba --- /dev/null +++ b/sw/Makefile @@ -0,0 +1,30 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +include ../solenv/inc/gbuild.mk + +$(eval $(call gb_Module_make_global_targets,$(notdir $(shell pwd)))) diff --git a/sw/prj/build.lst b/sw/prj/build.lst index cf9d0baaa9..03b2bc4a78 100755 --- a/sw/prj/build.lst +++ b/sw/prj/build.lst @@ -3,7 +3,6 @@ sw sw usr1 - all sw_mkout NULL sw sw\inc nmake - all sw_inc NULL sw sw\uiconfig\layout nmake - all sw_layout NULL sw sw\prj get - all sw_prj NULL -sw sw\source\ui\inc nmake - all sw_uinc NULL sw sw\source\core\inc get - all sw_cinc NULL sw sw\source\filter\inc get - all sw_finc NULL sw sw\res get - all sw_res NULL @@ -11,7 +10,7 @@ sw sw\win\res get - all sw_wres NULL sw sw\win\imglst get - all sw_wimg NULL sw sw\sdi nmake - all sw_sdi NULL sw sw\source\core\bastyp nmake - all sw_bast sw_inc NULL -sw sw\source\ui\app nmake - all sw_app sw_sdi sw_uinc sw_inc NULL +sw sw\source\ui\app nmake - all sw_app sw_sdi sw_inc NULL sw sw\source\ui\cctrl nmake - all sw_cctrl sw_inc NULL sw sw\source\ui\chrdlg nmake - all sw_chrdl sw_inc NULL sw sw\source\ui\config nmake - all sw_conf sw_inc NULL @@ -23,19 +22,19 @@ sw sw\source\ui\envelp nmake - all sw_envlp sw_inc NULL sw sw\source\ui\fldui nmake - all sw_fldui sw_inc NULL sw sw\source\ui\fmtui nmake - all sw_fmtui sw_inc NULL sw sw\source\ui\frmdlg nmake - all sw_frmdl sw_inc NULL -sw sw\source\ui\globdoc nmake - all sw_globd sw_uinc sw_inc NULL +sw sw\source\ui\globdoc nmake - all sw_globd sw_inc NULL sw sw\source\ui\index nmake - all sw_index sw_inc NULL sw sw\source\ui\lingu nmake - all sw_ling sw_inc NULL sw sw\source\ui\misc nmake - all sw_misc sw_sdi sw_inc NULL sw sw\source\ui\ribbar nmake - all sw_rbbar sw_inc NULL -sw sw\source\ui\shells nmake - all sw_shell sw_uinc sw_sdi sw_inc NULL +sw sw\source\ui\shells nmake - all sw_shell sw_sdi sw_inc NULL sw sw\source\ui\smartmenu nmake - all sw_smartmenu sw_inc NULL sw sw\source\ui\table nmake - all sw_table sw_inc NULL sw sw\source\ui\uiview nmake - all sw_uivw sw_sdi sw_inc NULL sw sw\source\ui\uno nmake - all sw_uiuno sw_sdi sw_inc NULL sw sw\source\ui\vba nmake - all sw_vba sw_inc NULL sw sw\source\ui\utlui nmake - all sw_utlui sw_inc NULL -sw sw\source\ui\web nmake - all sw_web sw_uinc sw_sdi sw_inc NULL +sw sw\source\ui\web nmake - all sw_web sw_sdi sw_inc NULL sw sw\source\ui\wrtsh nmake - all sw_wrtsh sw_inc NULL sw sw\source\core\attr nmake - all sw_attr sw_inc NULL sw sw\source\core\crsr nmake - all sw_crsr sw_inc NULL diff --git a/sw/prj/gbuild.lst b/sw/prj/gbuild.lst new file mode 100644 index 0000000000..d4770eec86 --- /dev/null +++ b/sw/prj/gbuild.lst @@ -0,0 +1,3 @@ +sw sw : l10n connectivity OOo:writerperfect svx stoc uui writerfilter filter oovbaapi cui vbahelper NULL +sw sw usr1 - all sw_mkout NULL +sw sw\prj nmake - all sw_prj NULL diff --git a/sw/prj/makefile.mk b/sw/prj/makefile.mk new file mode 100644 index 0000000000..a5f9aa9d82 --- /dev/null +++ b/sw/prj/makefile.mk @@ -0,0 +1,2 @@ +all: + cd .. && make -sj9 diff --git a/sw/prj/target_lib_msword.mk b/sw/prj/target_lib_msword.mk new file mode 100644 index 0000000000..7bad6041ae --- /dev/null +++ b/sw/prj/target_lib_msword.mk @@ -0,0 +1,121 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,msword)) + +$(eval $(call gb_Library_set_include,msword,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/sw/sdi \ + -I$(WORKDIR)/inc/sw/ \ + -I$(SRCDIR)/sw/inc \ + -I$(SRCDIR)/sw/inc/pch \ + -I$(SRCDIR)/sw/source/core/inc \ + -I$(SRCDIR)/sw/source/ui/inc \ + -I$(SRCDIR)/sw/source/filter/inc \ + -I$(OUTDIR)/inc/sw \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_set_defs,msword,\ + $$(DEFS) \ + -DACCESSIBLE_LAYOUT \ +)) + +$(eval $(call gb_Library_add_linked_libs,msword,\ + basegfx \ + comphelper \ + go \ + i18nisolang1 \ + i18nutil \ + icuuc \ + msfilter \ + sfx \ + sot \ + stl \ + svl \ + svt \ + svx \ + svx \ + svxcore \ + sw \ + tk \ + tl \ + ucbhelper \ + cppu \ + cppuhelper \ + sal \ + utl \ + vcl \ +)) + +$(eval $(call gb_Library_add_exception_objects,msword,\ + sw/source/filter/rtf/rtfatr \ + sw/source/filter/rtf/rtffld \ + sw/source/filter/rtf/rtffly \ + sw/source/filter/rtf/rtfnum \ + sw/source/filter/rtf/rtftbl \ + sw/source/filter/rtf/swparrtf \ + sw/source/filter/rtf/wrtrtf \ + sw/source/filter/ww8/WW8FFData \ + sw/source/filter/ww8/WW8FibData \ + sw/source/filter/ww8/WW8Sttbf \ + sw/source/filter/ww8/WW8TableInfo \ + sw/source/filter/ww8/fields \ + sw/source/filter/ww8/styles \ + sw/source/filter/ww8/tracer \ + sw/source/filter/ww8/writerhelper \ + sw/source/filter/ww8/writerwordglue \ + sw/source/filter/ww8/wrtw8esh \ + sw/source/filter/ww8/wrtw8nds \ + sw/source/filter/ww8/wrtw8num \ + sw/source/filter/ww8/wrtw8sty \ + sw/source/filter/ww8/wrtww8 \ + sw/source/filter/ww8/wrtww8gr \ + sw/source/filter/ww8/ww8atr \ + sw/source/filter/ww8/ww8glsy \ + sw/source/filter/ww8/ww8graf \ + sw/source/filter/ww8/ww8graf2 \ + sw/source/filter/ww8/ww8par \ + sw/source/filter/ww8/ww8par2 \ + sw/source/filter/ww8/ww8par3 \ + sw/source/filter/ww8/ww8par4 \ + sw/source/filter/ww8/ww8par5 \ + sw/source/filter/ww8/ww8par6 \ + sw/source/filter/ww8/ww8scan \ +)) + +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_linked_libs,msword,\ + advapi32 \ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/sw/prj/target_lib_sw.mk b/sw/prj/target_lib_sw.mk new file mode 100644 index 0000000000..10c9444fbb --- /dev/null +++ b/sw/prj/target_lib_sw.mk @@ -0,0 +1,744 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,sw)) + +$(call gb_Library_get_headers_target,sw) : $(call gb_SdiTarget_get_target,sw/sdi/swslots) +$(call gb_Library_get_clean_target,sw) : $(call gb_SdiTarget_get_clean_target,sw/sdi/swslots) + +$(eval $(call gb_Library_set_include,sw,\ + $$(SOLARINC) \ + -I$(WORKDIR)/inc/sw/sdi \ + -I$(WORKDIR)/inc/sw/ \ + -I$(SRCDIR)/sw/inc \ + -I$(SRCDIR)/sw/source/core/inc \ + -I$(SRCDIR)/sw/source/filter/inc \ + -I$(SRCDIR)/sw/source/ui/inc \ + -I$(SRCDIR)/sw/inc/pch \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_set_defs,sw,\ + $$(DEFS) \ + -DACCESSIBLE_LAYOUT \ + -DSW_DLLIMPLEMENTATION \ +)) + +$(eval $(call gb_Library_add_linked_libs,sw,\ + avmedia \ + basegfx \ + comphelper \ + cppu \ + cppuhelper \ + drawinglayer \ + go \ + i18nisolang1 \ + i18nutil \ + icuuc \ + lng \ + sal \ + salhelper \ + sb \ + sfx \ + sot \ + stl \ + svl \ + svt \ + svx \ + svxcore \ + tk \ + tl \ + ucbhelper \ + utl \ + vbahelper \ + vcl \ + vos3 \ + xo \ +)) + +$(eval $(call gb_Library_add_exception_objects,sw,\ + sw/source/core/SwNumberTree/SwNodeNum \ + sw/source/core/SwNumberTree/SwNumberTree \ + sw/source/core/access/acccell \ + sw/source/core/access/acccontext \ + sw/source/core/access/accdoc \ + sw/source/core/access/accembedded \ + sw/source/core/access/accfootnote \ + sw/source/core/access/accframe \ + sw/source/core/access/accframebase\ + sw/source/core/access/accfrmobj \ + sw/source/core/access/accfrmobjmap \ + sw/source/core/access/accfrmobjslist \ + sw/source/core/access/accgraphic \ + sw/source/core/access/accheaderfooter \ + sw/source/core/access/acchyperlink \ + sw/source/core/access/acchypertextdata \ + sw/source/core/access/accmap \ + sw/source/core/access/accnotextframe \ + sw/source/core/access/accpage \ + sw/source/core/access/accpara \ + sw/source/core/access/accportions \ + sw/source/core/access/accpreview \ + sw/source/core/access/accselectionhelper \ + sw/source/core/access/acctable \ + sw/source/core/access/acctextframe \ + sw/source/core/access/textmarkuphelper \ + sw/source/core/attr/calbck \ + sw/source/core/attr/cellatr \ + sw/source/core/attr/fmtfollowtextflow \ + sw/source/core/attr/fmtwrapinfluenceonobjpos \ + sw/source/core/attr/format \ + sw/source/core/attr/hints \ + sw/source/core/attr/swatrset \ + sw/source/core/bastyp/SwSmartTagMgr \ + sw/source/core/bastyp/bparr \ + sw/source/core/bastyp/breakit \ + sw/source/core/bastyp/calc \ + sw/source/core/bastyp/checkit \ + sw/source/core/bastyp/index \ + sw/source/core/bastyp/init \ + sw/source/core/bastyp/ring \ + sw/source/core/bastyp/swcache \ + sw/source/core/bastyp/swrect \ + sw/source/core/bastyp/swregion \ + sw/source/core/bastyp/swtypes \ + sw/source/core/bastyp/tabcol \ + sw/source/core/crsr/BlockCursor \ + sw/source/core/crsr/bookmrk \ + sw/source/core/crsr/callnk \ + sw/source/core/crsr/crbm \ + sw/source/core/crsr/crossrefbookmark \ + sw/source/core/crsr/crsrsh \ + sw/source/core/crsr/crstrvl \ + sw/source/core/crsr/crstrvl1 \ + sw/source/core/crsr/findattr \ + sw/source/core/crsr/findcoll \ + sw/source/core/crsr/findfmt \ + sw/source/core/crsr/findtxt \ + sw/source/core/crsr/pam \ + sw/source/core/crsr/paminit \ + sw/source/core/crsr/swcrsr \ + sw/source/core/crsr/trvlcol \ + sw/source/core/crsr/trvlfnfl \ + sw/source/core/crsr/trvlreg \ + sw/source/core/crsr/trvltbl \ + sw/source/core/crsr/unocrsr \ + sw/source/core/crsr/viscrs \ + sw/source/core/doc/SwStyleNameMapper \ + sw/source/core/doc/acmplwrd \ + sw/source/core/doc/dbgoutsw \ + sw/source/core/doc/doc \ + sw/source/core/doc/docbasic \ + sw/source/core/doc/docbm \ + sw/source/core/doc/docchart \ + sw/source/core/doc/doccomp \ + sw/source/core/doc/doccorr \ + sw/source/core/doc/docdde \ + sw/source/core/doc/docdesc \ + sw/source/core/doc/docdraw \ + sw/source/core/doc/docedt \ + sw/source/core/doc/docfld \ + sw/source/core/doc/docfly \ + sw/source/core/doc/docfmt \ + sw/source/core/doc/docftn \ + sw/source/core/doc/docglbl \ + sw/source/core/doc/docglos \ + sw/source/core/doc/doclay \ + sw/source/core/doc/docnew \ + sw/source/core/doc/docnum \ + sw/source/core/doc/docredln \ + sw/source/core/doc/docruby \ + sw/source/core/doc/docsort \ + sw/source/core/doc/docstat \ + sw/source/core/doc/doctxm \ + sw/source/core/doc/docxforms \ + sw/source/core/doc/extinput \ + sw/source/core/doc/fmtcol \ + sw/source/core/doc/ftnidx \ + sw/source/core/doc/gctable \ + sw/source/core/doc/htmltbl \ + sw/source/core/doc/lineinfo \ + sw/source/core/doc/list \ + sw/source/core/doc/notxtfrm \ + sw/source/core/doc/number \ + sw/source/core/doc/poolfmt \ + sw/source/core/doc/sortopt \ + sw/source/core/doc/swserv \ + sw/source/core/doc/swstylemanager \ + sw/source/core/doc/tblafmt \ + sw/source/core/doc/tblcpy \ + sw/source/core/doc/tblrwcl \ + sw/source/core/doc/visiturl \ + sw/source/core/docnode/cancellablejob \ + sw/source/core/docnode/finalthreadmanager \ + sw/source/core/docnode/ndcopy \ + sw/source/core/docnode/ndindex \ + sw/source/core/docnode/ndnotxt \ + sw/source/core/docnode/ndnum \ + sw/source/core/docnode/ndsect \ + sw/source/core/docnode/ndtbl \ + sw/source/core/docnode/ndtbl1 \ + sw/source/core/docnode/node \ + sw/source/core/docnode/node2lay \ + sw/source/core/docnode/nodes \ + sw/source/core/docnode/observablethread \ + sw/source/core/docnode/pausethreadstarting \ + sw/source/core/docnode/retrievedinputstreamdata \ + sw/source/core/docnode/retrieveinputstream \ + sw/source/core/docnode/retrieveinputstreamconsumer \ + sw/source/core/docnode/section \ + sw/source/core/docnode/swbaslnk \ + sw/source/core/docnode/swthreadjoiner \ + sw/source/core/docnode/swthreadmanager \ + sw/source/core/docnode/threadlistener \ + sw/source/core/docnode/threadmanager \ + sw/source/core/draw/dcontact \ + sw/source/core/draw/dflyobj \ + sw/source/core/draw/dobjfac \ + sw/source/core/draw/dpage \ + sw/source/core/draw/drawdoc \ + sw/source/core/draw/dview \ + sw/source/core/edit/acorrect \ + sw/source/core/edit/autofmt \ + sw/source/core/edit/edatmisc \ + sw/source/core/edit/edattr \ + sw/source/core/edit/eddel \ + sw/source/core/edit/edfcol \ + sw/source/core/edit/edfld \ + sw/source/core/edit/edfldexp \ + sw/source/core/edit/edfmt \ + sw/source/core/edit/edglbldc \ + sw/source/core/edit/edglss \ + sw/source/core/edit/editsh \ + sw/source/core/edit/edlingu \ + sw/source/core/edit/ednumber \ + sw/source/core/edit/edredln \ + sw/source/core/edit/edsect \ + sw/source/core/edit/edtab \ + sw/source/core/edit/edtox \ + sw/source/core/edit/edundo \ + sw/source/core/edit/edws \ + sw/source/core/fields/authfld \ + sw/source/core/fields/cellfml \ + sw/source/core/fields/chpfld \ + sw/source/core/fields/dbfld \ + sw/source/core/fields/ddefld \ + sw/source/core/fields/ddetbl \ + sw/source/core/fields/docufld \ + sw/source/core/fields/expfld \ + sw/source/core/fields/fldbas \ + sw/source/core/fields/flddat \ + sw/source/core/fields/flddropdown \ + sw/source/core/fields/fldlst \ + sw/source/core/fields/macrofld \ + sw/source/core/fields/postithelper \ + sw/source/core/fields/reffld \ + sw/source/core/fields/scrptfld \ + sw/source/core/fields/tblcalc \ + sw/source/core/fields/textapi \ + sw/source/core/fields/usrfld \ + sw/source/core/frmedt/fecopy \ + sw/source/core/frmedt/fedesc \ + sw/source/core/frmedt/fefly1 \ + sw/source/core/frmedt/feflyole \ + sw/source/core/frmedt/feshview \ + sw/source/core/frmedt/fetab \ + sw/source/core/frmedt/fews \ + sw/source/core/frmedt/tblsel \ + sw/source/core/graphic/grfatr \ + sw/source/core/graphic/ndgrf \ + sw/source/core/layout/anchoreddrawobject \ + sw/source/core/layout/anchoredobject \ + sw/source/core/layout/atrfrm \ + sw/source/core/layout/calcmove \ + sw/source/core/layout/colfrm \ + sw/source/core/layout/findfrm \ + sw/source/core/layout/flowfrm \ + sw/source/core/layout/fly \ + sw/source/core/layout/flycnt \ + sw/source/core/layout/flyincnt \ + sw/source/core/layout/flylay \ + sw/source/core/layout/flypos \ + sw/source/core/layout/frmtool \ + sw/source/core/layout/ftnfrm \ + sw/source/core/layout/hffrm \ + sw/source/core/layout/layact \ + sw/source/core/layout/laycache \ + sw/source/core/layout/layouter \ + sw/source/core/layout/movedfwdfrmsbyobjpos \ + sw/source/core/layout/newfrm \ + sw/source/core/layout/objectformatter \ + sw/source/core/layout/objectformatterlayfrm \ + sw/source/core/layout/objectformattertxtfrm \ + sw/source/core/layout/objstmpconsiderwrapinfl \ + sw/source/core/layout/pagechg \ + sw/source/core/layout/pagedesc \ + sw/source/core/layout/paintfrm \ + sw/source/core/layout/sectfrm \ + sw/source/core/layout/softpagebreak \ + sw/source/core/layout/sortedobjs \ + sw/source/core/layout/sortedobjsimpl \ + sw/source/core/layout/ssfrm \ + sw/source/core/layout/swselectionlist \ + sw/source/core/layout/tabfrm \ + sw/source/core/layout/trvlfrm \ + sw/source/core/layout/unusedf \ + sw/source/core/layout/virtoutp \ + sw/source/core/layout/wsfrm \ + sw/source/core/objectpositioning/anchoredobjectposition \ + sw/source/core/objectpositioning/ascharanchoredobjectposition \ + sw/source/core/objectpositioning/environmentofanchoredobject \ + sw/source/core/objectpositioning/tocntntanchoredobjectposition \ + sw/source/core/objectpositioning/tolayoutanchoredobjectposition \ + sw/source/core/ole/ndole \ + sw/source/core/para/paratr \ + sw/source/core/sw3io/sw3convert \ + sw/source/core/sw3io/swacorr \ + sw/source/core/swg/SwXMLBlockExport \ + sw/source/core/swg/SwXMLBlockImport \ + sw/source/core/swg/SwXMLBlockListContext \ + sw/source/core/swg/SwXMLSectionList \ + sw/source/core/swg/SwXMLTextBlocks \ + sw/source/core/swg/SwXMLTextBlocks1 \ + sw/source/core/swg/swblocks \ + sw/source/core/table/swnewtable \ + sw/source/core/table/swtable \ + sw/source/core/text/EnhancedPDFExportHelper \ + sw/source/core/text/SwGrammarMarkUp \ + sw/source/core/text/atrstck \ + sw/source/core/text/blink \ + sw/source/core/text/frmcrsr \ + sw/source/core/text/frmform \ + sw/source/core/text/frminf \ + sw/source/core/text/frmpaint \ + sw/source/core/text/guess \ + sw/source/core/text/inftxt \ + sw/source/core/text/itradj \ + sw/source/core/text/itratr \ + sw/source/core/text/itrcrsr \ + sw/source/core/text/itrform2 \ + sw/source/core/text/itrpaint \ + sw/source/core/text/itrtxt \ + sw/source/core/text/noteurl \ + sw/source/core/text/porexp \ + sw/source/core/text/porfld \ + sw/source/core/text/porfly \ + sw/source/core/text/porglue \ + sw/source/core/text/porlay \ + sw/source/core/text/porlin \ + sw/source/core/text/pormulti \ + sw/source/core/text/porref \ + sw/source/core/text/porrst \ + sw/source/core/text/portox \ + sw/source/core/text/portxt \ + sw/source/core/text/redlnitr \ + sw/source/core/text/txtcache \ + sw/source/core/text/txtdrop \ + sw/source/core/text/txtfld \ + sw/source/core/text/txtfly \ + sw/source/core/text/txtfrm \ + sw/source/core/text/txtftn \ + sw/source/core/text/txthyph \ + sw/source/core/text/txtinit \ + sw/source/core/text/txtpaint \ + sw/source/core/text/txttab \ + sw/source/core/text/widorp \ + sw/source/core/text/wrong \ + sw/source/core/tox/tox \ + sw/source/core/tox/toxhlp \ + sw/source/core/tox/txmsrt \ + sw/source/core/txtnode/SwGrammarContact \ + sw/source/core/txtnode/atrfld \ + sw/source/core/txtnode/atrflyin \ + sw/source/core/txtnode/atrftn \ + sw/source/core/txtnode/atrref \ + sw/source/core/txtnode/atrtox \ + sw/source/core/txtnode/chrfmt \ + sw/source/core/txtnode/fmtatr2 \ + sw/source/core/txtnode/fntcache \ + sw/source/core/txtnode/fntcap \ + sw/source/core/txtnode/modeltoviewhelper \ + sw/source/core/txtnode/ndhints \ + sw/source/core/txtnode/ndtxt \ + sw/source/core/txtnode/swfntcch \ + sw/source/core/txtnode/swfont \ + sw/source/core/txtnode/thints \ + sw/source/core/txtnode/txatbase \ + sw/source/core/txtnode/txatritr \ + sw/source/core/txtnode/txtatr2 \ + sw/source/core/txtnode/txtedt \ + sw/source/core/undo/SwRewriter \ + sw/source/core/undo/SwUndoField \ + sw/source/core/undo/SwUndoFmt \ + sw/source/core/undo/SwUndoPageDesc \ + sw/source/core/undo/SwUndoTOXChange \ + sw/source/core/undo/docundo \ + sw/source/core/undo/rolbck \ + sw/source/core/undo/unattr \ + sw/source/core/undo/unbkmk \ + sw/source/core/undo/undel \ + sw/source/core/undo/undobj \ + sw/source/core/undo/undobj1 \ + sw/source/core/undo/undoflystrattr \ + sw/source/core/undo/undraw \ + sw/source/core/undo/unfmco \ + sw/source/core/undo/unins \ + sw/source/core/undo/unmove \ + sw/source/core/undo/unnum \ + sw/source/core/undo/unoutl \ + sw/source/core/undo/unovwr \ + sw/source/core/undo/unredln \ + sw/source/core/undo/unsect \ + sw/source/core/undo/unsort \ + sw/source/core/undo/unspnd \ + sw/source/core/undo/untbl \ + sw/source/core/undo/untblk \ + sw/source/core/unocore/SwXTextDefaults \ + sw/source/core/unocore/TextCursorHelper \ + sw/source/core/unocore/XMLRangeHelper \ + sw/source/core/unocore/swunohelper \ + sw/source/core/unocore/unobkm \ + sw/source/core/unocore/unochart \ + sw/source/core/unocore/unoclbck \ + sw/source/core/unocore/unocoll \ + sw/source/core/unocore/unocrsrhelper \ + sw/source/core/unocore/unodraw \ + sw/source/core/unocore/unoevent \ + sw/source/core/unocore/unoevtlstnr \ + sw/source/core/unocore/unofield \ + sw/source/core/unocore/unoflatpara \ + sw/source/core/unocore/unoframe \ + sw/source/core/unocore/unoftn \ + sw/source/core/unocore/unoidx \ + sw/source/core/unocore/unomap \ + sw/source/core/unocore/unoobj \ + sw/source/core/unocore/unoobj2 \ + sw/source/core/unocore/unoparagraph \ + sw/source/core/unocore/unoport \ + sw/source/core/unocore/unoportenum \ + sw/source/core/unocore/unoprnms \ + sw/source/core/unocore/unoredline \ + sw/source/core/unocore/unoredlines \ + sw/source/core/unocore/unorefmk \ + sw/source/core/unocore/unosect \ + sw/source/core/unocore/unosett \ + sw/source/core/unocore/unosrch \ + sw/source/core/unocore/unostyle \ + sw/source/core/unocore/unotbl \ + sw/source/core/unocore/unotext \ + sw/source/core/unocore/unotextmarkup \ + sw/source/core/view/pagepreviewlayout \ + sw/source/core/view/scrrect \ + sw/source/core/view/vdraw \ + sw/source/core/view/viewimp \ + sw/source/core/view/viewpg \ + sw/source/core/view/viewsh \ + sw/source/core/view/vnew \ + sw/source/core/view/vprint \ + sw/source/filter/ascii/ascatr \ + sw/source/filter/ascii/parasc \ + sw/source/filter/ascii/wrtasc \ + sw/source/filter/basflt/docfact \ + sw/source/filter/basflt/fltini \ + sw/source/filter/basflt/iodetect \ + sw/source/filter/basflt/shellio \ + sw/source/filter/html/SwAppletImpl \ + sw/source/filter/html/css1atr \ + sw/source/filter/html/css1kywd \ + sw/source/filter/html/htmlatr \ + sw/source/filter/html/htmlbas \ + sw/source/filter/html/htmlcss1 \ + sw/source/filter/html/htmlctxt \ + sw/source/filter/html/htmldraw \ + sw/source/filter/html/htmlfld \ + sw/source/filter/html/htmlfldw \ + sw/source/filter/html/htmlfly \ + sw/source/filter/html/htmlflyt \ + sw/source/filter/html/htmlform \ + sw/source/filter/html/htmlforw \ + sw/source/filter/html/htmlftn \ + sw/source/filter/html/htmlgrin \ + sw/source/filter/html/htmlnum \ + sw/source/filter/html/htmlplug \ + sw/source/filter/html/htmlsect \ + sw/source/filter/html/htmltab \ + sw/source/filter/html/htmltabw \ + sw/source/filter/html/parcss1 \ + sw/source/filter/html/svxcss1 \ + sw/source/filter/html/swhtml \ + sw/source/filter/html/wrthtml \ + sw/source/filter/writer/writer \ + sw/source/filter/writer/wrt_fn \ + sw/source/filter/writer/wrtswtbl \ + sw/source/filter/ww1/fltshell \ + sw/source/filter/ww1/w1class \ + sw/source/filter/ww1/w1filter \ + sw/source/filter/ww1/w1par \ + sw/source/filter/ww1/w1sprm \ + sw/source/filter/xml/XMLRedlineImportHelper \ + sw/source/filter/xml/swxml \ + sw/source/filter/xml/wrtxml \ + sw/source/filter/xml/xmlbrsh \ + sw/source/filter/xml/xmlexp \ + sw/source/filter/xml/xmlexpit \ + sw/source/filter/xml/xmlfmt \ + sw/source/filter/xml/xmlfmte \ + sw/source/filter/xml/xmlfonte \ + sw/source/filter/xml/xmlimp \ + sw/source/filter/xml/xmlimpit \ + sw/source/filter/xml/xmlitem \ + sw/source/filter/xml/xmliteme \ + sw/source/filter/xml/xmlitemi \ + sw/source/filter/xml/xmlitemm \ + sw/source/filter/xml/xmlithlp \ + sw/source/filter/xml/xmlitmpr \ + sw/source/filter/xml/xmlmeta \ + sw/source/filter/xml/xmlscript \ + sw/source/filter/xml/xmltble \ + sw/source/filter/xml/xmltbli \ + sw/source/filter/xml/xmltext \ + sw/source/filter/xml/xmltexte \ + sw/source/filter/xml/xmltexti \ + sw/source/ui/app/appenv \ + sw/source/ui/app/apphdl \ + sw/source/ui/app/applab \ + sw/source/ui/app/appopt \ + sw/source/ui/app/docsh \ + sw/source/ui/app/docsh2 \ + sw/source/ui/app/docshdrw \ + sw/source/ui/app/docshini \ + sw/source/ui/app/docst \ + sw/source/ui/app/docstyle \ + sw/source/ui/app/mainwn \ + sw/source/ui/app/swdll \ + sw/source/ui/app/swmodul1 \ + sw/source/ui/app/swmodule \ + sw/source/ui/app/swwait \ + sw/source/ui/cctrl/actctrl \ + sw/source/ui/cctrl/popbox \ + sw/source/ui/cctrl/swlbox \ + sw/source/ui/chrdlg/ccoll \ + sw/source/ui/config/barcfg \ + sw/source/ui/config/caption \ + sw/source/ui/config/cfgitems \ + sw/source/ui/config/dbconfig \ + sw/source/ui/config/fontcfg \ + sw/source/ui/config/modcfg \ + sw/source/ui/config/prtopt \ + sw/source/ui/config/uinums \ + sw/source/ui/config/usrpref \ + sw/source/ui/config/viewopt \ + sw/source/ui/dbui/dbmgr \ + sw/source/ui/dbui/dbtree \ + sw/source/ui/dbui/dbui \ + sw/source/ui/dbui/maildispatcher \ + sw/source/ui/dbui/mailmergechildwindow \ + sw/source/ui/dbui/mailmergehelper \ + sw/source/ui/dbui/mmconfigitem \ + sw/source/ui/dbui/swdbtoolsclient \ + sw/source/ui/dialog/SwSpellDialogChildWindow \ + sw/source/ui/dialog/regionsw \ + sw/source/ui/dialog/swabstdlg \ + sw/source/ui/dialog/swwrtshitem \ + sw/source/ui/dochdl/gloshdl \ + sw/source/ui/dochdl/swdtflvr \ + sw/source/ui/docvw/PostItMgr \ + sw/source/ui/docvw/edtdd \ + sw/source/ui/docvw/edtwin \ + sw/source/ui/docvw/edtwin2 \ + sw/source/ui/docvw/edtwin3 \ + sw/source/ui/docvw/postit \ + sw/source/ui/docvw/romenu \ + sw/source/ui/docvw/srcedtw \ + sw/source/ui/envelp/envimg \ + sw/source/ui/envelp/labelcfg \ + sw/source/ui/envelp/labimg \ + sw/source/ui/envelp/syncbtn \ + sw/source/ui/fldui/fldmgr \ + sw/source/ui/fldui/fldwrap \ + sw/source/ui/fldui/xfldui \ + sw/source/ui/frmdlg/colex \ + sw/source/ui/frmdlg/colmgr \ + sw/source/ui/frmdlg/frmmgr \ + sw/source/ui/globdoc/globdoc \ + sw/source/ui/index/idxmrk \ + sw/source/ui/index/toxmgr \ + sw/source/ui/lingu/hhcwrp \ + sw/source/ui/lingu/hyp \ + sw/source/ui/lingu/olmenu \ + sw/source/ui/lingu/sdrhhcwrap \ + sw/source/ui/misc/glosdoc \ + sw/source/ui/misc/glshell \ + sw/source/ui/misc/numberingtypelistbox \ + sw/source/ui/misc/redlndlg \ + sw/source/ui/ribbar/conarc \ + sw/source/ui/ribbar/concustomshape \ + sw/source/ui/ribbar/conform \ + sw/source/ui/ribbar/conpoly \ + sw/source/ui/ribbar/conrect \ + sw/source/ui/ribbar/drawbase \ + sw/source/ui/ribbar/dselect \ + sw/source/ui/ribbar/inputwin \ + sw/source/ui/ribbar/tblctrl \ + sw/source/ui/ribbar/tbxanchr \ + sw/source/ui/ribbar/workctrl \ + sw/source/ui/shells/annotsh \ + sw/source/ui/shells/basesh \ + sw/source/ui/shells/beziersh \ + sw/source/ui/shells/drawdlg \ + sw/source/ui/shells/drawsh \ + sw/source/ui/shells/drformsh \ + sw/source/ui/shells/drwbassh \ + sw/source/ui/shells/drwtxtex \ + sw/source/ui/shells/drwtxtsh \ + sw/source/ui/shells/frmsh \ + sw/source/ui/shells/grfsh \ + sw/source/ui/shells/grfshex \ + sw/source/ui/shells/langhelper \ + sw/source/ui/shells/listsh \ + sw/source/ui/shells/mediash \ + sw/source/ui/shells/olesh \ + sw/source/ui/shells/slotadd \ + sw/source/ui/shells/tabsh \ + sw/source/ui/shells/textdrw \ + sw/source/ui/shells/textfld \ + sw/source/ui/shells/textglos \ + sw/source/ui/shells/textidx \ + sw/source/ui/shells/textsh \ + sw/source/ui/shells/textsh1 \ + sw/source/ui/shells/textsh2 \ + sw/source/ui/shells/txtattr \ + sw/source/ui/shells/txtcrsr \ + sw/source/ui/shells/txtnum \ + sw/source/ui/smartmenu/stmenu \ + sw/source/ui/table/chartins \ + sw/source/ui/table/swtablerep \ + sw/source/ui/table/tablemgr \ + sw/source/ui/uiview/formatclipboard \ + sw/source/ui/uiview/pview \ + sw/source/ui/uiview/scroll \ + sw/source/ui/uiview/srcview \ + sw/source/ui/uiview/swcli \ + sw/source/ui/uiview/uivwimp \ + sw/source/ui/uiview/view \ + sw/source/ui/uiview/view0 \ + sw/source/ui/uiview/view1 \ + sw/source/ui/uiview/view2 \ + sw/source/ui/uiview/viewcoll \ + sw/source/ui/uiview/viewdlg \ + sw/source/ui/uiview/viewdlg2 \ + sw/source/ui/uiview/viewdraw \ + sw/source/ui/uiview/viewling \ + sw/source/ui/uiview/viewmdi \ + sw/source/ui/uiview/viewport \ + sw/source/ui/uiview/viewprt \ + sw/source/ui/uiview/viewsrch \ + sw/source/ui/uiview/viewstat \ + sw/source/ui/uiview/viewtab \ + sw/source/ui/uno/RefreshListenerContainer \ + sw/source/ui/uno/SwXDocumentSettings \ + sw/source/ui/uno/SwXFilterOptions \ + sw/source/ui/uno/SwXPrintPreviewSettings \ + sw/source/ui/uno/dlelstnr \ + sw/source/ui/uno/unoatxt \ + sw/source/ui/uno/unodefaults \ + sw/source/ui/uno/unodispatch \ + sw/source/ui/uno/unodoc \ + sw/source/ui/uno/unofreg \ + sw/source/ui/uno/unomailmerge \ + sw/source/ui/uno/unomod \ + sw/source/ui/uno/unomodule \ + sw/source/ui/uno/unotxdoc \ + sw/source/ui/uno/unotxvw \ + sw/source/ui/uno/warnpassword \ + sw/source/ui/utlui/attrdesc \ + sw/source/ui/utlui/bookctrl \ + sw/source/ui/utlui/condedit \ + sw/source/ui/utlui/content \ + sw/source/ui/utlui/glbltree \ + sw/source/ui/utlui/gloslst \ + sw/source/ui/utlui/initui \ + sw/source/ui/utlui/navicfg \ + sw/source/ui/utlui/navipi \ + sw/source/ui/utlui/numfmtlb \ + sw/source/ui/utlui/prcntfld \ + sw/source/ui/utlui/shdwcrsr \ + sw/source/ui/utlui/textcontrolcombo \ + sw/source/ui/utlui/tmplctrl \ + sw/source/ui/utlui/uiitems \ + sw/source/ui/utlui/uitool \ + sw/source/ui/utlui/unotools \ + sw/source/ui/utlui/viewlayoutctrl \ + sw/source/ui/utlui/zoomctrl \ + sw/source/ui/web/wdocsh \ + sw/source/ui/web/wformsh \ + sw/source/ui/web/wfrmsh \ + sw/source/ui/web/wgrfsh \ + sw/source/ui/web/wlistsh \ + sw/source/ui/web/wolesh \ + sw/source/ui/web/wtabsh \ + sw/source/ui/web/wtextsh \ + sw/source/ui/web/wview \ + sw/source/ui/wrtsh/delete \ + sw/source/ui/wrtsh/move \ + sw/source/ui/wrtsh/select \ + sw/source/ui/wrtsh/wrtsh1 \ + sw/source/ui/wrtsh/wrtsh2 \ + sw/source/ui/wrtsh/wrtsh3 \ + sw/source/ui/wrtsh/wrtsh4 \ + sw/source/ui/wrtsh/wrtundo \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,sw,\ + dl \ + m \ + pthread \ + sb \ +)) +endif + +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_linked_libs,sw,\ + advapi32 \ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif + +$(eval $(call gb_SdiTarget_SdiTarget,sw/sdi/swslots,sw/sdi/swriter)) + +$(eval $(call gb_SdiTarget_set_include,sw/sdi/swslots,\ + $$(INCLUDE) \ + -I$(SRCDIR)/sw/inc \ + -I$(SRCDIR)/sw/sdi \ +)) +# vim: set noet sw=4 ts=4: diff --git a/sw/prj/target_lib_swd.mk b/sw/prj/target_lib_swd.mk new file mode 100644 index 0000000000..9d493c0bce --- /dev/null +++ b/sw/prj/target_lib_swd.mk @@ -0,0 +1,76 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,swd)) + +$(eval $(call gb_Library_set_include,swd,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/sw/sdi \ + -I$(WORKDIR)/inc/sw \ + -I$(SRCDIR)/sw/inc \ + -I$(SRCDIR)/sw/inc/pch \ + -I$(SRCDIR)/sw/source/core/inc \ + -I$(SRCDIR)/sw/source/filter/inc \ + -I$(SRCDIR)/sw/source/ui/inc \ + -I$(OUTDIR)/inc/sw \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_set_defs,swd,\ + $$(DEFS) \ + -DACCESSIBLE_LAYOUT \ +)) + +$(eval $(call gb_Library_add_linked_libs,swd,\ + comphelper \ + sfx \ + sot \ + svl \ + svt \ + tl \ + ucbhelper \ + cppu \ + cppuhelper \ + sal \ + utl \ + vcl \ +)) + +$(eval $(call gb_Library_add_exception_objects,swd,\ + sw/source/filter/basflt/iodetect \ + sw/source/ui/uno/detreg \ + sw/source/ui/uno/swdet2 \ + sw/source/ui/uno/swdetect \ +)) +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_linked_libs,swd,\ + kernel32 \ + msvcrt \ + uwinapi \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/sw/prj/target_lib_swui.mk b/sw/prj/target_lib_swui.mk new file mode 100644 index 0000000000..815caf5832 --- /dev/null +++ b/sw/prj/target_lib_swui.mk @@ -0,0 +1,195 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,swui)) + +$(eval $(call gb_Library_set_include,swui,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/sw/sdi \ + -I$(WORKDIR)/inc/sw/ \ + -I$(SRCDIR)/sw/inc \ + -I$(SRCDIR)/sw/inc/pch \ + -I$(SRCDIR)/sw/source/core/inc \ + -I$(SRCDIR)/sw/source/filter/inc \ + -I$(SRCDIR)/sw/source/ui/inc \ + -I$(OUTDIR)/inc/sw \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_set_defs,swui,\ + $$(DEFS) \ + -DACCESSIBLE_LAYOUT \ +)) + +$(eval $(call gb_Library_add_linked_libs,swui,\ + comphelper \ + cppu \ + cppuhelper \ + cui \ + i18nisolang1 \ + msfilter \ + sal \ + sfx \ + sot \ + stl \ + svl \ + svt \ + svx \ + svx \ + svxcore \ + sw \ + tk \ + tl \ + ucbhelper \ + utl \ + vcl \ +)) + +$(eval $(call gb_Library_add_exception_objects,swui,\ + sw/source/core/undo/SwRewriter \ + sw/source/ui/chrdlg/break \ + sw/source/ui/chrdlg/chardlg \ + sw/source/ui/chrdlg/drpcps \ + sw/source/ui/chrdlg/numpara \ + sw/source/ui/chrdlg/pardlg \ + sw/source/ui/chrdlg/swuiccoll \ + sw/source/ui/chrdlg/tblnumfm \ + sw/source/ui/config/mailconfigpage \ + sw/source/ui/config/optcomp \ + sw/source/ui/config/optload \ + sw/source/ui/config/optpage \ + sw/source/ui/dbui/addresslistdialog \ + sw/source/ui/dbui/createaddresslistdialog \ + sw/source/ui/dbui/customizeaddresslistdialog \ + sw/source/ui/dbui/dbinsdlg \ + sw/source/ui/dbui/dbtablepreviewdialog \ + sw/source/ui/dbui/mailmergewizard \ + sw/source/ui/dbui/mmaddressblockpage \ + sw/source/ui/dbui/mmdocselectpage \ + sw/source/ui/dbui/mmgreetingspage \ + sw/source/ui/dbui/mmlayoutpage \ + sw/source/ui/dbui/mmmergepage \ + sw/source/ui/dbui/mmoutputpage \ + sw/source/ui/dbui/mmoutputtypepage \ + sw/source/ui/dbui/mmpreparemergepage \ + sw/source/ui/dbui/selectdbtabledialog \ + sw/source/ui/dialog/abstract \ + sw/source/ui/dialog/addrdlg \ + sw/source/ui/dialog/ascfldlg \ + sw/source/ui/dialog/docstdlg \ + sw/source/ui/dialog/macassgn \ + sw/source/ui/dialog/swdialmgr \ + sw/source/ui/dialog/swdlgfact \ + sw/source/ui/dialog/swuiexp \ + sw/source/ui/dialog/uiregionsw \ + sw/source/ui/dialog/wordcountdialog \ + sw/source/ui/dochdl/selglos \ + sw/source/ui/envelp/envfmt \ + sw/source/ui/envelp/envlop1 \ + sw/source/ui/envelp/envprt \ + sw/source/ui/envelp/label1 \ + sw/source/ui/envelp/labelexp \ + sw/source/ui/envelp/labfmt \ + sw/source/ui/envelp/labprt \ + sw/source/ui/envelp/mailmrge \ + sw/source/ui/fldui/DropDownFieldDialog \ + sw/source/ui/fldui/FldRefTreeListBox \ + sw/source/ui/fldui/changedb \ + sw/source/ui/fldui/flddb \ + sw/source/ui/fldui/flddinf \ + sw/source/ui/fldui/flddok \ + sw/source/ui/fldui/fldedt \ + sw/source/ui/fldui/fldfunc \ + sw/source/ui/fldui/fldpage \ + sw/source/ui/fldui/fldref \ + sw/source/ui/fldui/fldtdlg \ + sw/source/ui/fldui/fldvar \ + sw/source/ui/fldui/inpdlg \ + sw/source/ui/fldui/javaedit \ + sw/source/ui/fmtui/tmpdlg \ + sw/source/ui/frmdlg/column \ + sw/source/ui/frmdlg/cption \ + sw/source/ui/frmdlg/frmdlg \ + sw/source/ui/frmdlg/frmpage \ + sw/source/ui/frmdlg/pattern \ + sw/source/ui/frmdlg/uiborder \ + sw/source/ui/frmdlg/wrap \ + sw/source/ui/index/cntex \ + sw/source/ui/index/cnttab \ + sw/source/ui/index/multmrk \ + sw/source/ui/index/swuiidxmrk \ + sw/source/ui/misc/bookmark \ + sw/source/ui/misc/docfnote \ + sw/source/ui/misc/glosbib \ + sw/source/ui/misc/glossary \ + sw/source/ui/misc/insfnote \ + sw/source/ui/misc/insrule \ + sw/source/ui/misc/linenum \ + sw/source/ui/misc/num \ + sw/source/ui/misc/outline \ + sw/source/ui/misc/pgfnote \ + sw/source/ui/misc/pggrid \ + sw/source/ui/misc/srtdlg \ + sw/source/ui/misc/swmodalredlineacceptdlg \ + sw/source/ui/table/colwd \ + sw/source/ui/table/convert \ + sw/source/ui/table/instable \ + sw/source/ui/table/mergetbl \ + sw/source/ui/table/rowht \ + sw/source/ui/table/splittbl \ + sw/source/ui/table/tabledlg \ + sw/source/ui/table/tautofmt \ + sw/source/ui/utlui/swrenamexnameddlg \ +)) + +$(WORKDIR)/inc/sw/swuilib.hxx : + $(call gb_Helper_announce,Creating swuilib.hxx ...) + mkdir -p $$(dirname $@) && echo "#define DLL_NAME \"$(notdir $(call gb_Library_get_target,swui))\"" > $@ + +.PHONY : $(WORKDIR)/Clean/inc/sw/swuilib.hxx +$(WORKDIR)/Clean/inc/sw/swuilib.hxx : + $(call gb_Helper_announce,Cleaning up swuilib.hxx ...) + -$(call gb_Helper_abbreviate_dirs,\ + rm -f $(WORKDIR)/inc/sw/swuilib.hxx) + + +$(call gb_CxxObject_get_dep_target,sw/source/ui/dialog/swabstdlg) : $(WORKDIR)/inc/sw/swuilib.hxx +$(call gb_CxxObject_get_target,sw/source/ui/dialog/swabstdlg) : $(WORKDIR)/inc/sw/swuilib.hxx + +$(call gb_Library_get_clean_target,swui) : $(WORKDIR)/Clean/inc/sw/swuilib.hxx + +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_linked_libs,swui,\ + advapi32 \ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/sw/prj/target_lib_vbaswobj.mk b/sw/prj/target_lib_vbaswobj.mk new file mode 100644 index 0000000000..8145a5d393 --- /dev/null +++ b/sw/prj/target_lib_vbaswobj.mk @@ -0,0 +1,133 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,vbaswobj)) + +$(eval $(call gb_Library_set_include,vbaswobj,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/sw/vbaswobj \ + -I$(WORKDIR)/inc/sw/ \ + -I$(SRCDIR)/sw/inc \ + -I$(SRCDIR)/sw/inc/pch \ + -I$(SRCDIR)/sw/source/core/inc \ + -I$(SRCDIR)/sw/source/filter/inc \ + -I$(SRCDIR)/sw/source/ui/inc \ + -I$(OUTDIR)/inc/sw \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_set_defs,vbaswobj,\ + $$(DEFS) \ + -DVBA_OOBUILD_HACK \ +)) + +$(eval $(call gb_Library_set_ldflags,vbaswobj,\ + $$(LDFLAGS) \ + -Wl$(COMMA)-O1 \ + -Wl$(COMMA)-z$(COMMA)noexecstack \ +)) + +$(eval $(call gb_Library_add_linked_libs,vbaswobj,\ + comphelper \ + cppu \ + cppuhelper \ + i18nisolang1 \ + sal \ + sfx \ + svl \ + svt \ + svx \ + svxcore \ + sw \ + tk \ + tl \ + utl \ + vbahelper \ + vcl \ + stl \ +)) + +$(eval $(call gb_Library_add_exception_objects,vbaswobj,\ + sw/source/ui/vba/service \ + sw/source/ui/vba/vbadocument \ + sw/source/ui/vba/vbasections \ + sw/source/ui/vba/vbadialog \ + sw/source/ui/vba/vbawrapformat \ + sw/source/ui/vba/vbafont \ + sw/source/ui/vba/vbaheaderfooterhelper \ + sw/source/ui/vba/vbarangehelper \ + sw/source/ui/vba/vbaaddin \ + sw/source/ui/vba/vbaautotextentry \ + sw/source/ui/vba/vbarange \ + sw/source/ui/vba/vbadocumentproperties \ + sw/source/ui/vba/vbastyle \ + sw/source/ui/vba/vbapane \ + sw/source/ui/vba/vbaglobals \ + sw/source/ui/vba/vbatemplate \ + sw/source/ui/vba/vbaaddins \ + sw/source/ui/vba/vbaview \ + sw/source/ui/vba/vbaheaderfooter \ + sw/source/ui/vba/vbabookmarks \ + sw/source/ui/vba/vbaoptions \ + sw/source/ui/vba/vbadialogs \ + sw/source/ui/vba/vbapalette \ + sw/source/ui/vba/vbaparagraph \ + sw/source/ui/vba/vbafind \ + sw/source/ui/vba/vbasection \ + sw/source/ui/vba/vbabookmark \ + sw/source/ui/vba/vbaapplication \ + sw/source/ui/vba/vbawindow \ + sw/source/ui/vba/vbareplacement \ + sw/source/ui/vba/vbatable \ + sw/source/ui/vba/vbaselection \ + sw/source/ui/vba/vbasystem \ + sw/source/ui/vba/vbainformationhelper \ + sw/source/ui/vba/vbapagesetup \ + sw/source/ui/vba/vbafield \ + sw/source/ui/vba/vbatables \ + sw/source/ui/vba/vbavariable \ + sw/source/ui/vba/vbadocuments \ + sw/source/ui/vba/vbaparagraphformat \ + sw/source/ui/vba/vbaborders \ + sw/source/ui/vba/vbavariables \ + sw/source/ui/vba/vbastyles \ + sw/source/ui/vba/vbapanes \ + sw/source/ui/vba/wordvbahelper \ +)) + +$(call gb_Library_get_headers_target,vbaswobj) : $(WORKDIR)/CppuUnpack/vbaswobj +$(call gb_Library_get_clean_target,vbaswobj) : $(WORKDIR)/Clean/CppuUnpack/vbaswobj + +.PHONY : $(WORKDIR)/Clean/CppuUnpack/vbaswobj +$(WORKDIR)/Clean/CppuUnpack/vbaswobj : + -$(call gb_Helper_abbreviate_dirs,\ + rm -rf $(WORKDIR)/inc/sw/vbaswobj $(WORKDIR)/CppuUnpack/vbaswobj) + +$(WORKDIR)/CppuUnpack/vbaswobj : | $(gb_CppuTarget_CPPUMAKERTARGET) + $(call gb_Helper_abbreviate_dirs,\ + $(gb_CppuTarget_CPPUMAKERCOMMAND) -O$(WORKDIR)/inc/sw/vbaswobj -BUCR $(OUTDIR)/bin/oovbaapi.rdb -X$(OUTDIR)/bin/types.rdb && mkdir -p $(dir $@) && touch $@) + diff --git a/sw/prj/target_module_sw.mk b/sw/prj/target_module_sw.mk new file mode 100644 index 0000000000..20e4944877 --- /dev/null +++ b/sw/prj/target_module_sw.mk @@ -0,0 +1,50 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Module_Module,sw,\ + $(call gb_AllLangResTarget_get_target,sw) \ + $(call gb_Library_get_target,msword) \ + $(call gb_Library_get_target,sw) \ + $(call gb_Library_get_target,swd) \ + $(call gb_Library_get_target,swui) \ + $(call gb_Library_get_target,vbaswobj) \ + $(call gb_Package_get_target,sw_uiconfig) \ + $(call gb_Package_get_target,sw_xml) \ + $(call gb_Package_get_target,sw_misc) \ +)) + +$(eval $(call gb_Module_read_includes,sw,\ + lib_sw \ + lib_swd \ + lib_swui \ + lib_msword \ + lib_vbaswobj \ + package_misc \ + package_uiconfig \ + package_xml \ + res_sw \ +)) diff --git a/sw/prj/target_package_misc.mk b/sw/prj/target_package_misc.mk new file mode 100644 index 0000000000..bb2e3cd8dc --- /dev/null +++ b/sw/prj/target_package_misc.mk @@ -0,0 +1,30 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,sw_misc,$(SRCDIR)/sw/misc)) +# TODO: +#COPY sw/unxlngx6.pro/misc/swslots_sid.hid unxlngx6.pro/bin/hid/swslots_sid.hid diff --git a/sw/prj/target_package_uiconfig.mk b/sw/prj/target_package_uiconfig.mk new file mode 100644 index 0000000000..6ec1b30c05 --- /dev/null +++ b/sw/prj/target_package_uiconfig.mk @@ -0,0 +1,281 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,sw_uiconfig,$(SRCDIR)/sw/uiconfig)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/accelerator/de/default.xml,sglobal/accelerator/de/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/accelerator/en-US/default.xml,sglobal/accelerator/en-US/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/accelerator/es/default.xml,sglobal/accelerator/es/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/accelerator/fr/default.xml,sglobal/accelerator/fr/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/menubar/menubar.xml,sglobal/menubar/menubar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/statusbar/statusbar.xml,sglobal/statusbar/statusbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/alignmentbar.xml,sglobal/toolbar/alignmentbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/arrowshapes.xml,sglobal/toolbar/arrowshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/basicshapes.xml,sglobal/toolbar/basicshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/bezierobjectbar.xml,sglobal/toolbar/bezierobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/calloutshapes.xml,sglobal/toolbar/calloutshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/colorbar.xml,sglobal/toolbar/colorbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/drawbar.xml,sglobal/toolbar/drawbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/drawingobjectbar.xml,sglobal/toolbar/drawingobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/drawtextobjectbar.xml,sglobal/toolbar/drawtextobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/extrusionobjectbar.xml,sglobal/toolbar/extrusionobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/flowchartshapes.xml,sglobal/toolbar/flowchartshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/fontworkobjectbar.xml,sglobal/toolbar/fontworkobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/fontworkshapetype.xml,sglobal/toolbar/fontworkshapetype.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/formcontrols.xml,sglobal/toolbar/formcontrols.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/formdesign.xml,sglobal/toolbar/formdesign.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/formsfilterbar.xml,sglobal/toolbar/formsfilterbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/formsnavigationbar.xml,sglobal/toolbar/formsnavigationbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/formtextobjectbar.xml,sglobal/toolbar/formtextobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/frameobjectbar.xml,sglobal/toolbar/frameobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/fullscreenbar.xml,sglobal/toolbar/fullscreenbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/graffilterbar.xml,sglobal/toolbar/graffilterbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/graphicobjectbar.xml,sglobal/toolbar/graphicobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/insertbar.xml,sglobal/toolbar/insertbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/insertobjectbar.xml,sglobal/toolbar/insertobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/mediaobjectbar.xml,sglobal/toolbar/mediaobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/moreformcontrols.xml,sglobal/toolbar/moreformcontrols.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/numobjectbar.xml,sglobal/toolbar/numobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/oleobjectbar.xml,sglobal/toolbar/oleobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/optimizetablebar.xml,sglobal/toolbar/optimizetablebar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/previewobjectbar.xml,sglobal/toolbar/previewobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/standardbar.xml,sglobal/toolbar/standardbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/starshapes.xml,sglobal/toolbar/starshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/symbolshapes.xml,sglobal/toolbar/symbolshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/tableobjectbar.xml,sglobal/toolbar/tableobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/textobjectbar.xml,sglobal/toolbar/textobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/toolbar.xml,sglobal/toolbar/toolbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/viewerbar.xml,sglobal/toolbar/viewerbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/accelerator/de/default.xml,sweb/accelerator/de/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/accelerator/en-US/default.xml,sweb/accelerator/en-US/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/accelerator/es/default.xml,sweb/accelerator/es/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/accelerator/fr/default.xml,sweb/accelerator/fr/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/menubar/menubar.xml,sweb/menubar/menubar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/statusbar/statusbar.xml,sweb/statusbar/statusbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/arrowshapes.xml,sweb/toolbar/arrowshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/basicshapes.xml,sweb/toolbar/basicshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/bezierobjectbar.xml,sweb/toolbar/bezierobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/calloutshapes.xml,sweb/toolbar/calloutshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/colorbar.xml,sweb/toolbar/colorbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/drawingobjectbar.xml,sweb/toolbar/drawingobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/drawtextobjectbar.xml,sweb/toolbar/drawtextobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/extrusionobjectbar.xml,sweb/toolbar/extrusionobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/flowchartshapes.xml,sweb/toolbar/flowchartshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/fontworkobjectbar.xml,sweb/toolbar/fontworkobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/fontworkshapetype.xml,sweb/toolbar/fontworkshapetype.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/formcontrols.xml,sweb/toolbar/formcontrols.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/formdesign.xml,sweb/toolbar/formdesign.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/formsfilterbar.xml,sweb/toolbar/formsfilterbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/formsnavigationbar.xml,sweb/toolbar/formsnavigationbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/formtextobjectbar.xml,sweb/toolbar/formtextobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/frameobjectbar.xml,sweb/toolbar/frameobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/fullscreenbar.xml,sweb/toolbar/fullscreenbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/graffilterbar.xml,sweb/toolbar/graffilterbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/graphicobjectbar.xml,sweb/toolbar/graphicobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/insertbar.xml,sweb/toolbar/insertbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/mediaobjectbar.xml,sweb/toolbar/mediaobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/numobjectbar.xml,sweb/toolbar/numobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/oleobjectbar.xml,sweb/toolbar/oleobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/optimizetablebar.xml,sweb/toolbar/optimizetablebar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/previewobjectbar.xml,sweb/toolbar/previewobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/standardbar.xml,sweb/toolbar/standardbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/starshapes.xml,sweb/toolbar/starshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/symbolshapes.xml,sweb/toolbar/symbolshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/tableobjectbar.xml,sweb/toolbar/tableobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/textobjectbar.xml,sweb/toolbar/textobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/toolbar.xml,sweb/toolbar/toolbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/viewerbar.xml,sweb/toolbar/viewerbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/accelerator/de/default.xml,swform/accelerator/de/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/accelerator/en-US/default.xml,swform/accelerator/en-US/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/accelerator/es/default.xml,swform/accelerator/es/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/accelerator/fr/default.xml,swform/accelerator/fr/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/menubar/menubar.xml,swform/menubar/menubar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/statusbar/statusbar.xml,swform/statusbar/statusbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/alignmentbar.xml,swform/toolbar/alignmentbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/arrowshapes.xml,swform/toolbar/arrowshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/basicshapes.xml,swform/toolbar/basicshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/bezierobjectbar.xml,swform/toolbar/bezierobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/calloutshapes.xml,swform/toolbar/calloutshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/colorbar.xml,swform/toolbar/colorbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/drawbar.xml,swform/toolbar/drawbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/drawingobjectbar.xml,swform/toolbar/drawingobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/drawtextobjectbar.xml,swform/toolbar/drawtextobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/extrusionobjectbar.xml,swform/toolbar/extrusionobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/flowchartshapes.xml,swform/toolbar/flowchartshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/fontworkobjectbar.xml,swform/toolbar/fontworkobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/fontworkshapetype.xml,swform/toolbar/fontworkshapetype.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/formcontrols.xml,swform/toolbar/formcontrols.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/formdesign.xml,swform/toolbar/formdesign.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/formsfilterbar.xml,swform/toolbar/formsfilterbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/formsnavigationbar.xml,swform/toolbar/formsnavigationbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/formtextobjectbar.xml,swform/toolbar/formtextobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/frameobjectbar.xml,swform/toolbar/frameobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/fullscreenbar.xml,swform/toolbar/fullscreenbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/graffilterbar.xml,swform/toolbar/graffilterbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/graphicobjectbar.xml,swform/toolbar/graphicobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/insertbar.xml,swform/toolbar/insertbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/insertobjectbar.xml,swform/toolbar/insertobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/mediaobjectbar.xml,swform/toolbar/mediaobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/moreformcontrols.xml,swform/toolbar/moreformcontrols.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/numobjectbar.xml,swform/toolbar/numobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/oleobjectbar.xml,swform/toolbar/oleobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/optimizetablebar.xml,swform/toolbar/optimizetablebar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/previewobjectbar.xml,swform/toolbar/previewobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/standardbar.xml,swform/toolbar/standardbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/starshapes.xml,swform/toolbar/starshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/symbolshapes.xml,swform/toolbar/symbolshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/tableobjectbar.xml,swform/toolbar/tableobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/textobjectbar.xml,swform/toolbar/textobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/toolbar.xml,swform/toolbar/toolbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/viewerbar.xml,swform/toolbar/viewerbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/accelerator/de/default.xml,swreport/accelerator/de/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/accelerator/en-US/default.xml,swreport/accelerator/en-US/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/accelerator/es/default.xml,swreport/accelerator/es/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/accelerator/fr/default.xml,swreport/accelerator/fr/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/menubar/menubar.xml,swreport/menubar/menubar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/statusbar/statusbar.xml,swreport/statusbar/statusbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/alignmentbar.xml,swreport/toolbar/alignmentbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/arrowshapes.xml,swreport/toolbar/arrowshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/basicshapes.xml,swreport/toolbar/basicshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/bezierobjectbar.xml,swreport/toolbar/bezierobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/calloutshapes.xml,swreport/toolbar/calloutshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/colorbar.xml,swreport/toolbar/colorbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/drawbar.xml,swreport/toolbar/drawbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/drawingobjectbar.xml,swreport/toolbar/drawingobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/drawtextobjectbar.xml,swreport/toolbar/drawtextobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/extrusionobjectbar.xml,swreport/toolbar/extrusionobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/flowchartshapes.xml,swreport/toolbar/flowchartshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/fontworkobjectbar.xml,swreport/toolbar/fontworkobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/fontworkshapetype.xml,swreport/toolbar/fontworkshapetype.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/formcontrols.xml,swreport/toolbar/formcontrols.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/formdesign.xml,swreport/toolbar/formdesign.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/formsfilterbar.xml,swreport/toolbar/formsfilterbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/formsnavigationbar.xml,swreport/toolbar/formsnavigationbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/formtextobjectbar.xml,swreport/toolbar/formtextobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/frameobjectbar.xml,swreport/toolbar/frameobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/fullscreenbar.xml,swreport/toolbar/fullscreenbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/graffilterbar.xml,swreport/toolbar/graffilterbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/graphicobjectbar.xml,swreport/toolbar/graphicobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/insertbar.xml,swreport/toolbar/insertbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/insertobjectbar.xml,swreport/toolbar/insertobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/mediaobjectbar.xml,swreport/toolbar/mediaobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/moreformcontrols.xml,swreport/toolbar/moreformcontrols.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/numobjectbar.xml,swreport/toolbar/numobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/oleobjectbar.xml,swreport/toolbar/oleobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/optimizetablebar.xml,swreport/toolbar/optimizetablebar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/previewobjectbar.xml,swreport/toolbar/previewobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/standardbar.xml,swreport/toolbar/standardbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/starshapes.xml,swreport/toolbar/starshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/symbolshapes.xml,swreport/toolbar/symbolshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/tableobjectbar.xml,swreport/toolbar/tableobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/textobjectbar.xml,swreport/toolbar/textobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/toolbar.xml,swreport/toolbar/toolbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/viewerbar.xml,swreport/toolbar/viewerbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/accelerator/de/default.xml,swriter/accelerator/de/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/accelerator/en-US/default.xml,swriter/accelerator/en-US/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/accelerator/es/default.xml,swriter/accelerator/es/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/accelerator/fr/default.xml,swriter/accelerator/fr/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/menubar/menubar.xml,swriter/menubar/menubar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/statusbar/statusbar.xml,swriter/statusbar/statusbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/alignmentbar.xml,swriter/toolbar/alignmentbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/arrowshapes.xml,swriter/toolbar/arrowshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/basicshapes.xml,swriter/toolbar/basicshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/bezierobjectbar.xml,swriter/toolbar/bezierobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/calloutshapes.xml,swriter/toolbar/calloutshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/colorbar.xml,swriter/toolbar/colorbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/drawbar.xml,swriter/toolbar/drawbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/drawingobjectbar.xml,swriter/toolbar/drawingobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/drawtextobjectbar.xml,swriter/toolbar/drawtextobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/extrusionobjectbar.xml,swriter/toolbar/extrusionobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/flowchartshapes.xml,swriter/toolbar/flowchartshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/fontworkobjectbar.xml,swriter/toolbar/fontworkobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/fontworkshapetype.xml,swriter/toolbar/fontworkshapetype.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/formcontrols.xml,swriter/toolbar/formcontrols.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/formdesign.xml,swriter/toolbar/formdesign.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/formsfilterbar.xml,swriter/toolbar/formsfilterbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/formsnavigationbar.xml,swriter/toolbar/formsnavigationbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/formtextobjectbar.xml,swriter/toolbar/formtextobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/frameobjectbar.xml,swriter/toolbar/frameobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/fullscreenbar.xml,swriter/toolbar/fullscreenbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/graffilterbar.xml,swriter/toolbar/graffilterbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/graphicobjectbar.xml,swriter/toolbar/graphicobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/insertbar.xml,swriter/toolbar/insertbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/mediaobjectbar.xml,swriter/toolbar/mediaobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/moreformcontrols.xml,swriter/toolbar/moreformcontrols.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/numobjectbar.xml,swriter/toolbar/numobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/oleobjectbar.xml,swriter/toolbar/oleobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/optimizetablebar.xml,swriter/toolbar/optimizetablebar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/previewobjectbar.xml,swriter/toolbar/previewobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/standardbar.xml,swriter/toolbar/standardbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/starshapes.xml,swriter/toolbar/starshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/symbolshapes.xml,swriter/toolbar/symbolshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/tableobjectbar.xml,swriter/toolbar/tableobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/textobjectbar.xml,swriter/toolbar/textobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/toolbar.xml,swriter/toolbar/toolbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/viewerbar.xml,swriter/toolbar/viewerbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/accelerator/de/default.xml,swxform/accelerator/de/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/accelerator/en-US/default.xml,swxform/accelerator/en-US/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/accelerator/es/default.xml,swxform/accelerator/es/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/accelerator/fr/default.xml,swxform/accelerator/fr/default.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/menubar/menubar.xml,swxform/menubar/menubar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/statusbar/statusbar.xml,swxform/statusbar/statusbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/alignmentbar.xml,swxform/toolbar/alignmentbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/arrowshapes.xml,swxform/toolbar/arrowshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/basicshapes.xml,swxform/toolbar/basicshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/bezierobjectbar.xml,swxform/toolbar/bezierobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/calloutshapes.xml,swxform/toolbar/calloutshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/colorbar.xml,swxform/toolbar/colorbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/drawbar.xml,swxform/toolbar/drawbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/drawingobjectbar.xml,swxform/toolbar/drawingobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/drawtextobjectbar.xml,swxform/toolbar/drawtextobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/extrusionobjectbar.xml,swxform/toolbar/extrusionobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/flowchartshapes.xml,swxform/toolbar/flowchartshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/fontworkobjectbar.xml,swxform/toolbar/fontworkobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/fontworkshapetype.xml,swxform/toolbar/fontworkshapetype.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/formcontrols.xml,swxform/toolbar/formcontrols.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/formdesign.xml,swxform/toolbar/formdesign.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/formsfilterbar.xml,swxform/toolbar/formsfilterbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/formsnavigationbar.xml,swxform/toolbar/formsnavigationbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/formtextobjectbar.xml,swxform/toolbar/formtextobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/frameobjectbar.xml,swxform/toolbar/frameobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/fullscreenbar.xml,swxform/toolbar/fullscreenbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/graffilterbar.xml,swxform/toolbar/graffilterbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/graphicobjectbar.xml,swxform/toolbar/graphicobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/insertbar.xml,swxform/toolbar/insertbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/insertobjectbar.xml,swxform/toolbar/insertobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/mediaobjectbar.xml,swxform/toolbar/mediaobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/moreformcontrols.xml,swxform/toolbar/moreformcontrols.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/numobjectbar.xml,swxform/toolbar/numobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/oleobjectbar.xml,swxform/toolbar/oleobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/optimizetablebar.xml,swxform/toolbar/optimizetablebar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/previewobjectbar.xml,swxform/toolbar/previewobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/standardbar.xml,swxform/toolbar/standardbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/starshapes.xml,swxform/toolbar/starshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/symbolshapes.xml,swxform/toolbar/symbolshapes.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/tableobjectbar.xml,swxform/toolbar/tableobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/textobjectbar.xml,swxform/toolbar/textobjectbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/toolbar.xml,swxform/toolbar/toolbar.xml)) +$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/viewerbar.xml,swxform/toolbar/viewerbar.xml)) diff --git a/sw/prj/target_package_xml.mk b/sw/prj/target_package_xml.mk new file mode 100644 index 0000000000..7eb3f1cb1f --- /dev/null +++ b/sw/prj/target_package_xml.mk @@ -0,0 +1,29 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,sw_xml,$(SRCDIR)/sw/xml)) +$(eval $(call gb_Package_add_file,sw_xml,xml/writer.xml,writer.xml)) diff --git a/sw/prj/target_res_sw.mk b/sw/prj/target_res_sw.mk new file mode 100644 index 0000000000..ba552333d2 --- /dev/null +++ b/sw/prj/target_res_sw.mk @@ -0,0 +1,184 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_AllLangResTarget_AllLangResTarget,sw)) + +$(eval $(call gb_AllLangResTarget_add_srs,sw,\ + sw/res \ +)) + +$(eval $(call gb_SrsTarget_SrsTarget,sw/res)) + +$(eval $(call gb_SrsTarget_set_include,sw/res,\ + $$(INCLUDE) \ + -I$(OUTDIR)/inc \ + -I$(WORKDIR)/inc/sw \ + -I$(SRCDIR)/sw/inc \ + -I$(SRCDIR)/sw/source/core/undo \ + -I$(SRCDIR)/sw/source/core/unocore \ + -I$(SRCDIR)/sw/source/ui/chrdlg \ + -I$(SRCDIR)/sw/source/ui/config \ + -I$(SRCDIR)/sw/source/ui/dbui \ + -I$(SRCDIR)/sw/source/ui/dialog \ + -I$(SRCDIR)/sw/source/ui/docvw \ + -I$(SRCDIR)/sw/source/ui/envelp \ + -I$(SRCDIR)/sw/source/ui/fldui \ + -I$(SRCDIR)/sw/source/ui/fmtui \ + -I$(SRCDIR)/sw/source/ui/frmdlg \ + -I$(SRCDIR)/sw/source/ui/globdoc \ + -I$(SRCDIR)/sw/source/ui/inc \ + -I$(SRCDIR)/sw/source/ui/index \ + -I$(SRCDIR)/sw/source/ui/lingu \ + -I$(SRCDIR)/sw/source/ui/misc \ + -I$(SRCDIR)/sw/source/ui/ribbar \ + -I$(SRCDIR)/sw/source/ui/shells \ + -I$(SRCDIR)/sw/source/ui/smartmenu \ + -I$(SRCDIR)/sw/source/ui/table \ + -I$(SRCDIR)/sw/source/ui/uiview \ + -I$(SRCDIR)/sw/source/ui/utlui \ + -I$(SRCDIR)/sw/source/ui/web \ + -I$(SRCDIR)/sw/source/ui/wrtsh \ +)) + +$(eval $(call gb_SrsTarget_add_files,sw/res,\ + sw/source/ui/app/app.src \ + sw/source/ui/app/mn.src \ + sw/source/ui/app/error.src \ + sw/source/ui/dialog/abstract.src \ + sw/source/ui/dialog/ascfldlg.src \ + sw/source/ui/dialog/dialog.src \ + sw/source/ui/dialog/docstdlg.src \ + sw/source/ui/dialog/regionsw.src \ + sw/source/ui/dialog/wordcountdialog.src \ + sw/source/ui/chrdlg/chrdlg.src \ + sw/source/ui/chrdlg/ccoll.src \ + sw/source/ui/chrdlg/drpcps.src \ + sw/source/ui/chrdlg/swbreak.src \ + sw/source/ui/chrdlg/paradlg.src \ + sw/source/ui/chrdlg/numpara.src \ + sw/source/ui/chrdlg/chardlg.src \ + sw/source/ui/config/optcomp.src \ + sw/source/ui/config/optload.src \ + sw/source/ui/config/mailconfigpage.src \ + sw/source/ui/config/redlopt.src \ + sw/source/ui/config/optdlg.src \ + sw/source/ui/dbui/mmpreparemergepage.src \ + sw/source/ui/dbui/mmgreetingspage.src \ + sw/source/ui/dbui/mmmergepage.src \ + sw/source/ui/dbui/mmoutputtypepage.src \ + sw/source/ui/dbui/mmlayoutpage.src \ + sw/source/ui/dbui/mmaddressblockpage.src \ + sw/source/ui/dbui/createaddresslistdialog.src \ + sw/source/ui/dbui/dbtablepreviewdialog.src \ + sw/source/ui/dbui/mmdocselectpage.src \ + sw/source/ui/dbui/customizeaddresslistdialog.src \ + sw/source/ui/dbui/mailmergechildwindow.src \ + sw/source/ui/dbui/mailmergewizard.src \ + sw/source/ui/dbui/dbinsdlg.src \ + sw/source/ui/dbui/selectdbtabledialog.src \ + sw/source/ui/dbui/mmoutputpage.src \ + sw/source/ui/dbui/dbui.src \ + sw/source/ui/dbui/addresslistdialog.src \ + sw/source/ui/dochdl/selglos.src \ + sw/source/ui/dochdl/dochdl.src \ + sw/source/ui/docvw/access.src \ + sw/source/ui/docvw/docvw.src \ + sw/source/ui/envelp/mailmrge.src \ + sw/source/ui/envelp/labprt.src \ + sw/source/ui/envelp/label.src \ + sw/source/ui/envelp/envfmt.src \ + sw/source/ui/envelp/labfmt.src \ + sw/source/ui/envelp/envelp.src \ + sw/source/ui/envelp/envprt.src \ + sw/source/ui/envelp/envlop.src \ + sw/source/ui/fldui/flddok.src \ + sw/source/ui/fldui/changedb.src \ + sw/source/ui/fldui/DropDownFieldDialog.src \ + sw/source/ui/fldui/flddinf.src \ + sw/source/ui/fldui/fldref.src \ + sw/source/ui/fldui/fldtdlg.src \ + sw/source/ui/fldui/fldui.src \ + sw/source/ui/fldui/javaedit.src \ + sw/source/ui/fldui/fldfunc.src \ + sw/source/ui/fldui/inpdlg.src \ + sw/source/ui/fldui/fldvar.src \ + sw/source/ui/fldui/flddb.src \ + sw/source/ui/fmtui/tmpdlg.src \ + sw/source/ui/frmdlg/frmui.src \ + sw/source/ui/frmdlg/cption.src \ + sw/source/ui/frmdlg/column.src \ + sw/source/ui/frmdlg/frmpage.src \ + sw/source/ui/globdoc/globdoc.src \ + sw/source/ui/index/idxmrk.src \ + sw/source/ui/index/cnttab.src \ + sw/source/ui/index/multmrk.src \ + sw/source/ui/lingu/olmenu.src \ + sw/source/ui/misc/docfnote.src \ + sw/source/ui/misc/pgfnote.src \ + sw/source/ui/misc/insfnote.src \ + sw/source/ui/misc/srtdlg.src \ + sw/source/ui/misc/bookmark.src \ + sw/source/ui/misc/glosbib.src \ + sw/source/ui/misc/num.src \ + sw/source/ui/misc/glossary.src \ + sw/source/ui/misc/pggrid.src \ + sw/source/ui/misc/outline.src \ + sw/source/ui/misc/linenum.src \ + sw/source/ui/misc/numberingtypelistbox.src \ + sw/source/ui/misc/redlndlg.src \ + sw/source/ui/misc/insrule.src \ + sw/source/ui/misc/autocorr.src \ + sw/source/ui/ribbar/tbxanchr.src \ + sw/source/ui/ribbar/tblctrl.src \ + sw/source/ui/ribbar/workctrl.src \ + sw/source/ui/ribbar/inputwin.src \ + sw/source/ui/shells/shells.src \ + sw/source/ui/smartmenu/stmenu.src \ + sw/source/ui/table/colwd.src \ + sw/source/ui/table/tautofmt.src \ + sw/source/ui/table/table.src \ + sw/source/ui/table/chartins.src \ + sw/source/ui/table/splittbl.src \ + sw/source/ui/table/rowht.src \ + sw/source/ui/table/instable.src \ + sw/source/ui/table/convert.src \ + sw/source/ui/table/tabledlg.src \ + sw/source/ui/table/mergetbl.src \ + sw/source/ui/uiview/pview.src \ + sw/source/ui/uiview/view.src \ + sw/source/core/undo/undo.src \ + sw/source/core/unocore/unocore.src \ + sw/source/ui/utlui/navipi.src \ + sw/source/ui/utlui/attrdesc.src \ + sw/source/ui/utlui/poolfmt.src \ + sw/source/ui/utlui/initui.src \ + sw/source/ui/utlui/unotools.src \ + sw/source/ui/utlui/utlui.src \ + sw/source/ui/utlui/gloslst.src \ + sw/source/ui/web/web.src \ + sw/source/ui/wrtsh/wrtsh.src \ +)) diff --git a/sw/source/core/undo/undo.src b/sw/source/core/undo/undo.src index 2cf91da28b..43b3906001 100644 --- a/sw/source/core/undo/undo.src +++ b/sw/source/core/undo/undo.src @@ -397,7 +397,7 @@ String STR_UNDO_SETRUBYATTR { Text [ en-US ] = "Ruby Setting"; }; -#102505# +// #102505# String STR_UNDO_TMPAUTOCORR { Text [ en-US ] = "AutoCorrect" ; diff --git a/sw/source/ui/fmtui/fmtui.src b/sw/source/ui/fmtui/fmtui.src deleted file mode 100644 index f3c73ad19d..0000000000 --- a/sw/source/ui/fmtui/fmtui.src +++ /dev/null @@ -1,91 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: fmtui.src,v $ - * $Revision: 1.12 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include "fmtui.hrc" -#include "globals.hrc" - -String STR_FMT_STD -{ - Text [ en-US ] = "(none)" ; -}; -String STR_TEMPLATE_WILDCARD -{ - TEXT = "*.vor" ; -}; - //String STR_NONAME //!! VB - //{ - // TEXT = "Unbenannt "; - // TEXT [English] = "Noname "; - // TEXT [norwegian] = "Noname "; - // TEXT [italian] = "Senza nome"; - // TEXT [portuguese_brazilian] = "Semnome "; - // TEXT [portuguese] = "Semnome "; - // TEXT [finnish] = "Nimetön "; - // TEXT [danish] = "Intet navn"; - // TEXT [french] = "Sansnom "; - // TEXT [swedish] = "Namnlös"; - // TEXT [dutch] = "Naamloos"; - // TEXT [spanish] = "Sin nombre "; - // TEXT [english_us] = "Noname "; - //}; -String STR_OVERWRITE -{ - /* ### ACHTUNG: Neuer Text in Resource? Wollen Sie die Vorlage wirklich überschreiben? : Wollen Sie die Vorlage wirklich ³berschreiben? */ - Text [ en-US ] = "\nAre you sure you want to delete this template?" ; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sw/source/ui/inc/swmn.hrc b/sw/source/ui/inc/swmn.hrc new file mode 100644 index 0000000000..f7753db76e --- /dev/null +++ b/sw/source/ui/inc/swmn.hrc @@ -0,0 +1,386 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: swmn_tmpl.hrc,v $ + * $Revision: 1.15.210.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SWMN_HRC +#define _SWMN_HRC + +#include +#include +#include "cmdid.h" +#include "app.hrc" +#include "globals.hrc" +#include "helpid.h" +#include "popup.hrc" +//#include "cfgid.h" + +/* --------------------- F O R M A T --------------------------------- */ + +#define SEPARATOR MenuItem { Separator = TRUE; } + +//define for ITEM_FORMAT_NUMBERING +#define DEFINE_SLOTID_FOR_NUMBER_BULLETS FN_NUMBER_BULLETS +#define MN_NUMBERING ITEM_FORMAT_NUMBERING + +#define MN_TXT\ + MenuItem\ + {\ + ITEM_FORMAT_CHAR_DLG\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_PARA_DLG\ + };\ + MenuItem\ + {\ + Identifier = FN_FORMAT_PAGE_DLG ; \ + HelpID = FN_FORMAT_PAGE_DLG ; \ + Text [ en-US ] = "Pa~ge..." ; \ + }; + + +#define MN_TEXT_ATTR\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_FONT\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_FONTHEIGHT\ + };\ + MenuItem\ + {\ + Identifier = MN_FORMAT_STYLE ; \ + HelpID = MN_FORMAT_STYLE ; \ + Command = ".uno:StyleMenu" ; \ + Text [ en-US ] = "St~yle" ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_WEIGHT\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_POSTURE\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_OVERLINE\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_UNDERLINE\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_STRIKEOUT\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_SHADOWED\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_CONTOUR\ + };\ + SEPARATOR ; \ + MenuItem\ + {\ + Identifier = FN_SET_SUPER_SCRIPT ; \ + HelpID = FN_SET_SUPER_SCRIPT ; \ + Text [ en-US ] = "Superscript" ; \ + };\ + MenuItem\ + {\ + Identifier = FN_SET_SUB_SCRIPT ; \ + HelpID = FN_SET_SUB_SCRIPT ; \ + Text [ en-US ] = "Subscript" ; \ + };\ + };\ + };\ + };\ + MenuItem\ + {\ + Identifier = MN_FORMAT_ALGN ; \ + HelpID = MN_FORMAT_ALGN ; \ + Command = ".uno:AlignTextMenu" ; \ + Text [ en-US ] = "A~lignment" ; \ + RadioCheck = TRUE ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_ATTR_PARA_ADJUST_LEFT\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_ATTR_PARA_ADJUST_RIGHT\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_ATTR_PARA_ADJUST_CENTER\ + };\ + MenuItem\ + {\ + Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \ + HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; \ + RadioCheck = TRUE ; \ + Text [ en-US ] = "Justified" ; \ + };\ + };\ + };\ + };\ + MenuItem\ + {\ + Identifier = MN_FORMAT_LINESPACE ; \ + HelpID = MN_FORMAT_LINESPACE ; \ + Command = ".uno:LineSpacingMenu" ; \ + Text [ en-US ] = "Line Spacing" ; \ + _MenuItemFlags = MIB_RADIOCHECK ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_PARA_LINESPACE_10\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_PARA_LINESPACE_15\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_PARA_LINESPACE_20\ + };\ + };\ + };\ + }; + +/* --------------------- M E N U --------------------------------- */ + +/* + + +The application menu bar resource has become obsolete. You can now find the menu bar at the following +location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml + + +*/ + +/* --------------------- D O C U M E N T -------------------------- */ + + +#define _MN_EDIT_FIELD \ + MenuItem \ + { \ + Identifier = FN_EDIT_FIELD ; \ + HelpID = FN_EDIT_FIELD ; \ + Text [ en-US ] = "Fields..." ; \ + }; +#define _MN_EDIT_FOOTNOTE \ + MenuItem \ + { \ + Identifier = FN_EDIT_FOOTNOTE ; \ + HelpID = FN_EDIT_FOOTNOTE ; \ + Text [ en-US ] = "Footnote/Endnote~..." ; \ + }; + #define _MN_EDIT_IDX_ENTRY_DLG \ + MenuItem \ + { \ + Identifier = FN_EDIT_IDX_ENTRY_DLG ; \ + HelpID = FN_EDIT_IDX_ENTRY_DLG ; \ + Text [ en-US ] = "Inde~x Entry..." ; \ + }; + +#define _MN_EDIT_REDLINE \ + MenuItem \ + { \ + Identifier = FN_REDLINE_ACCEPT_DIRECT; \ + HelpID = FN_REDLINE_ACCEPT_DIRECT ; \ + Text [ en-US ] = "Accept Change" ; \ + };\ + MenuItem \ + { \ + Identifier = FN_REDLINE_REJECT_DIRECT ; \ + HelpID = FN_REDLINE_REJECT_DIRECT ; \ + Text [ en-US ] = "Reject Change" ; \ + }; \ + SEPARATOR ; +#define _MN_EDIT_BIB_ENTRY_DLG \ + MenuItem \ + { \ + Identifier = FN_EDIT_AUTH_ENTRY_DLG ; \ + HelpID = FN_EDIT_AUTH_ENTRY_DLG ; \ + Text [ en-US ] = "~Bibliography Entry..."; \ + }; \ + SEPARATOR ; + +#define _MN_EDIT_OPEN_HYPERLINK \ + MenuItem \ + { \ + ITEM_OPEN_HYPERLINK \ + };\ + MenuItem \ + { \ + Identifier = FN_EDIT_HYPERLINK ; \ + HelpID = FN_EDIT_HYPERLINK ; \ + Text [ en-US ] = "Edit Hyperlink..."; \ + }; \ + MenuItem \ + { \ + Identifier = FN_COPY_HYPERLINK_LOCATION; \ + HelpID = FN_COPY_HYPERLINK_LOCATION; \ + Text [ en-US ] = "Copy Hyperlink ~Location"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_REMOVE_HYPERLINK ; \ + HelpID = FN_REMOVE_HYPERLINK ; \ + Text [ en-US ] = "Remo~ve Hyperlink"; \ + }; + +#define _MN_EDIT_OPEN_SMARTTAGMENU \ + MenuItem \ + { \ + ITEM_OPEN_SMARTTAGMENU \ + }; + +#define _MN_EDIT__HYPERLINK \ + MenuItem\ + {\ + Identifier = FN_EDIT_HYPERLINK ; \ + HelpID = FN_EDIT_HYPERLINK ; \ + Text [ en-US ] = "~Edit Hyperlink" ; \ + }; + +#define _DEFAULT_TEXT_EDIT_ELEMENTS \ + _MN_EDIT_FIELD \ + _MN_EDIT_FOOTNOTE \ + _MN_EDIT_IDX_ENTRY_DLG \ + _MN_EDIT_BIB_ENTRY_DLG \ + _MN_EDIT_REDLINE \ + MenuItem \ + { \ + ITEM_POPUP_TEMPLATE_EDIT \ + }; \ + SEPARATOR ; \ + _MN_EDIT_OPEN_HYPERLINK \ + _MN_EDIT_OPEN_SMARTTAGMENU + + +#define MN_RESET\ + MenuItem\ + {\ + Identifier = FN_FORMAT_RESET ; \ + HelpID = FN_FORMAT_RESET ; \ + Text [ en-US ] = "~Default Formatting" ; \ + }; + +#define _NUMBERING_RELATED_MENU \ + SEPARATOR ; \ + MenuItem \ + { \ + Identifier = FN_NUMBER_NEWSTART; \ + HelpId = FN_NUMBER_NEWSTART; \ + Text[ en-US ] = "Restart Numbering"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_NUM_CONTINUE; \ + HelpId = FN_NUM_CONTINUE; \ + Text[ en-US ] = "Continue previous numbering"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_NUM_BULLET_UP; \ + HelpId = FN_NUM_BULLET_UP; \ + Text[ en-US ] = "Up One Level"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_NUM_BULLET_DOWN; \ + HelpId = FN_NUM_BULLET_DOWN; \ + Text[ en-US ] = "Down One Level"; \ + }; + +#define BASE_TEXT_POPUPMENU_BEGIN \ +{ \ + ItemList = \ + { \ + MN_RESET \ + _NUMBERING_RELATED_MENU \ + SEPARATOR ; \ + MN_TEXT_ATTR \ + SEPARATOR ; \ + MN_TXT \ + MN_NUMBERING \ + ITEM_TRANSLITERATE_MENU \ + SEPARATOR ; + +// not in Writer/Web +#define BASE_TEXT_POPUPMENU_NOWEB \ + MenuItem \ + { \ + Identifier = FN_UPDATE_CUR_TOX ; \ + HelpID = FN_UPDATE_CUR_TOX ; \ + Text [ en-US ] = "~Update Index/Table"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_EDIT_CURRENT_TOX; \ + HelpID = FN_EDIT_CURRENT_TOX; \ + Text [ en-US ] = "~Edit Index/Table"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_REMOVE_CUR_TOX; \ + HelpID = FN_REMOVE_CUR_TOX; \ + Text [ en-US ] = "Delete Index/Table"; \ + }; \ + SEPARATOR ; + +#define BASE_TEXT_POPUPMENU_END \ + _DEFAULT_TEXT_EDIT_ELEMENTS \ + }; \ +}; + +#endif + diff --git a/sw/source/ui/inc/swmn_tmpl.hrc b/sw/source/ui/inc/swmn_tmpl.hrc deleted file mode 100644 index f7753db76e..0000000000 --- a/sw/source/ui/inc/swmn_tmpl.hrc +++ /dev/null @@ -1,386 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: swmn_tmpl.hrc,v $ - * $Revision: 1.15.210.1 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SWMN_HRC -#define _SWMN_HRC - -#include -#include -#include "cmdid.h" -#include "app.hrc" -#include "globals.hrc" -#include "helpid.h" -#include "popup.hrc" -//#include "cfgid.h" - -/* --------------------- F O R M A T --------------------------------- */ - -#define SEPARATOR MenuItem { Separator = TRUE; } - -//define for ITEM_FORMAT_NUMBERING -#define DEFINE_SLOTID_FOR_NUMBER_BULLETS FN_NUMBER_BULLETS -#define MN_NUMBERING ITEM_FORMAT_NUMBERING - -#define MN_TXT\ - MenuItem\ - {\ - ITEM_FORMAT_CHAR_DLG\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_PARA_DLG\ - };\ - MenuItem\ - {\ - Identifier = FN_FORMAT_PAGE_DLG ; \ - HelpID = FN_FORMAT_PAGE_DLG ; \ - Text [ en-US ] = "Pa~ge..." ; \ - }; - - -#define MN_TEXT_ATTR\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_FONT\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_FONTHEIGHT\ - };\ - MenuItem\ - {\ - Identifier = MN_FORMAT_STYLE ; \ - HelpID = MN_FORMAT_STYLE ; \ - Command = ".uno:StyleMenu" ; \ - Text [ en-US ] = "St~yle" ; \ - SubMenu = Menu\ - {\ - ItemList = \ - {\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_WEIGHT\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_POSTURE\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_OVERLINE\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_UNDERLINE\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_STRIKEOUT\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_SHADOWED\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_CONTOUR\ - };\ - SEPARATOR ; \ - MenuItem\ - {\ - Identifier = FN_SET_SUPER_SCRIPT ; \ - HelpID = FN_SET_SUPER_SCRIPT ; \ - Text [ en-US ] = "Superscript" ; \ - };\ - MenuItem\ - {\ - Identifier = FN_SET_SUB_SCRIPT ; \ - HelpID = FN_SET_SUB_SCRIPT ; \ - Text [ en-US ] = "Subscript" ; \ - };\ - };\ - };\ - };\ - MenuItem\ - {\ - Identifier = MN_FORMAT_ALGN ; \ - HelpID = MN_FORMAT_ALGN ; \ - Command = ".uno:AlignTextMenu" ; \ - Text [ en-US ] = "A~lignment" ; \ - RadioCheck = TRUE ; \ - SubMenu = Menu\ - {\ - ItemList = \ - {\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_ATTR_PARA_ADJUST_LEFT\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_ATTR_PARA_ADJUST_RIGHT\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_ATTR_PARA_ADJUST_CENTER\ - };\ - MenuItem\ - {\ - Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \ - HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; \ - RadioCheck = TRUE ; \ - Text [ en-US ] = "Justified" ; \ - };\ - };\ - };\ - };\ - MenuItem\ - {\ - Identifier = MN_FORMAT_LINESPACE ; \ - HelpID = MN_FORMAT_LINESPACE ; \ - Command = ".uno:LineSpacingMenu" ; \ - Text [ en-US ] = "Line Spacing" ; \ - _MenuItemFlags = MIB_RADIOCHECK ; \ - SubMenu = Menu\ - {\ - ItemList = \ - {\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_PARA_LINESPACE_10\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_PARA_LINESPACE_15\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_PARA_LINESPACE_20\ - };\ - };\ - };\ - }; - -/* --------------------- M E N U --------------------------------- */ - -/* - - -The application menu bar resource has become obsolete. You can now find the menu bar at the following -location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml - - -*/ - -/* --------------------- D O C U M E N T -------------------------- */ - - -#define _MN_EDIT_FIELD \ - MenuItem \ - { \ - Identifier = FN_EDIT_FIELD ; \ - HelpID = FN_EDIT_FIELD ; \ - Text [ en-US ] = "Fields..." ; \ - }; -#define _MN_EDIT_FOOTNOTE \ - MenuItem \ - { \ - Identifier = FN_EDIT_FOOTNOTE ; \ - HelpID = FN_EDIT_FOOTNOTE ; \ - Text [ en-US ] = "Footnote/Endnote~..." ; \ - }; - #define _MN_EDIT_IDX_ENTRY_DLG \ - MenuItem \ - { \ - Identifier = FN_EDIT_IDX_ENTRY_DLG ; \ - HelpID = FN_EDIT_IDX_ENTRY_DLG ; \ - Text [ en-US ] = "Inde~x Entry..." ; \ - }; - -#define _MN_EDIT_REDLINE \ - MenuItem \ - { \ - Identifier = FN_REDLINE_ACCEPT_DIRECT; \ - HelpID = FN_REDLINE_ACCEPT_DIRECT ; \ - Text [ en-US ] = "Accept Change" ; \ - };\ - MenuItem \ - { \ - Identifier = FN_REDLINE_REJECT_DIRECT ; \ - HelpID = FN_REDLINE_REJECT_DIRECT ; \ - Text [ en-US ] = "Reject Change" ; \ - }; \ - SEPARATOR ; -#define _MN_EDIT_BIB_ENTRY_DLG \ - MenuItem \ - { \ - Identifier = FN_EDIT_AUTH_ENTRY_DLG ; \ - HelpID = FN_EDIT_AUTH_ENTRY_DLG ; \ - Text [ en-US ] = "~Bibliography Entry..."; \ - }; \ - SEPARATOR ; - -#define _MN_EDIT_OPEN_HYPERLINK \ - MenuItem \ - { \ - ITEM_OPEN_HYPERLINK \ - };\ - MenuItem \ - { \ - Identifier = FN_EDIT_HYPERLINK ; \ - HelpID = FN_EDIT_HYPERLINK ; \ - Text [ en-US ] = "Edit Hyperlink..."; \ - }; \ - MenuItem \ - { \ - Identifier = FN_COPY_HYPERLINK_LOCATION; \ - HelpID = FN_COPY_HYPERLINK_LOCATION; \ - Text [ en-US ] = "Copy Hyperlink ~Location"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_REMOVE_HYPERLINK ; \ - HelpID = FN_REMOVE_HYPERLINK ; \ - Text [ en-US ] = "Remo~ve Hyperlink"; \ - }; - -#define _MN_EDIT_OPEN_SMARTTAGMENU \ - MenuItem \ - { \ - ITEM_OPEN_SMARTTAGMENU \ - }; - -#define _MN_EDIT__HYPERLINK \ - MenuItem\ - {\ - Identifier = FN_EDIT_HYPERLINK ; \ - HelpID = FN_EDIT_HYPERLINK ; \ - Text [ en-US ] = "~Edit Hyperlink" ; \ - }; - -#define _DEFAULT_TEXT_EDIT_ELEMENTS \ - _MN_EDIT_FIELD \ - _MN_EDIT_FOOTNOTE \ - _MN_EDIT_IDX_ENTRY_DLG \ - _MN_EDIT_BIB_ENTRY_DLG \ - _MN_EDIT_REDLINE \ - MenuItem \ - { \ - ITEM_POPUP_TEMPLATE_EDIT \ - }; \ - SEPARATOR ; \ - _MN_EDIT_OPEN_HYPERLINK \ - _MN_EDIT_OPEN_SMARTTAGMENU - - -#define MN_RESET\ - MenuItem\ - {\ - Identifier = FN_FORMAT_RESET ; \ - HelpID = FN_FORMAT_RESET ; \ - Text [ en-US ] = "~Default Formatting" ; \ - }; - -#define _NUMBERING_RELATED_MENU \ - SEPARATOR ; \ - MenuItem \ - { \ - Identifier = FN_NUMBER_NEWSTART; \ - HelpId = FN_NUMBER_NEWSTART; \ - Text[ en-US ] = "Restart Numbering"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_NUM_CONTINUE; \ - HelpId = FN_NUM_CONTINUE; \ - Text[ en-US ] = "Continue previous numbering"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_NUM_BULLET_UP; \ - HelpId = FN_NUM_BULLET_UP; \ - Text[ en-US ] = "Up One Level"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_NUM_BULLET_DOWN; \ - HelpId = FN_NUM_BULLET_DOWN; \ - Text[ en-US ] = "Down One Level"; \ - }; - -#define BASE_TEXT_POPUPMENU_BEGIN \ -{ \ - ItemList = \ - { \ - MN_RESET \ - _NUMBERING_RELATED_MENU \ - SEPARATOR ; \ - MN_TEXT_ATTR \ - SEPARATOR ; \ - MN_TXT \ - MN_NUMBERING \ - ITEM_TRANSLITERATE_MENU \ - SEPARATOR ; - -// not in Writer/Web -#define BASE_TEXT_POPUPMENU_NOWEB \ - MenuItem \ - { \ - Identifier = FN_UPDATE_CUR_TOX ; \ - HelpID = FN_UPDATE_CUR_TOX ; \ - Text [ en-US ] = "~Update Index/Table"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_EDIT_CURRENT_TOX; \ - HelpID = FN_EDIT_CURRENT_TOX; \ - Text [ en-US ] = "~Edit Index/Table"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_REMOVE_CUR_TOX; \ - HelpID = FN_REMOVE_CUR_TOX; \ - Text [ en-US ] = "Delete Index/Table"; \ - }; \ - SEPARATOR ; - -#define BASE_TEXT_POPUPMENU_END \ - _DEFAULT_TEXT_EDIT_ELEMENTS \ - }; \ -}; - -#endif - diff --git a/sw/source/ui/inc/toolbox.hrc b/sw/source/ui/inc/toolbox.hrc new file mode 100644 index 0000000000..af8e64abaf --- /dev/null +++ b/sw/source/ui/inc/toolbox.hrc @@ -0,0 +1,566 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: toolbox_tmpl.hrc,v $ + * $Revision: 1.5.210.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _TOOLBOX_HRC +#define _TOOLBOX_HRC +#include "shells.hrc" +#include "globals.hrc" +#include "cmdid.h" +#define MN_FONT\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_CHAR_FONT;\ + HelpID = SID_ATTR_CHAR_FONT;\ + };\ + ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; \ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_CHAR_FONTHEIGHT ; \ + HelpID = SID_ATTR_CHAR_FONTHEIGHT ; \ + };\ + ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; + +#define MN_TEXT1( HIDE )\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_CHAR_WEIGHT ; \ + HelpID = SID_ATTR_CHAR_WEIGHT ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_CHAR_POSTURE ; \ + HelpID = SID_ATTR_CHAR_POSTURE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_CHAR_UNDERLINE ; \ + HelpID = SID_ATTR_CHAR_UNDERLINE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_CHAR_OVERLINE ; \ + HelpID = SID_ATTR_CHAR_OVERLINE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = FN_SET_SUPER_SCRIPT;\ + HelpID = FN_SET_SUPER_SCRIPT;\ + Hide = HIDE;\ + };\ + ToolBoxItem\ + {\ + Identifier = FN_SET_SUB_SCRIPT;\ + HelpID = FN_SET_SUB_SCRIPT;\ + Hide = HIDE;\ + };\ + ToolBoxItem\ + {\ + Type = TOOLBOXITEM_SEPARATOR ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_PARA_ADJUST_LEFT ; \ + HelpID = SID_ATTR_PARA_ADJUST_LEFT ; \ + RadioCheck = TRUE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_PARA_ADJUST_CENTER ; \ + HelpID = SID_ATTR_PARA_ADJUST_CENTER ; \ + RadioCheck = TRUE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_PARA_ADJUST_RIGHT ; \ + HelpID = SID_ATTR_PARA_ADJUST_RIGHT ; \ + RadioCheck = TRUE ; \ + };\ + +#define MN_TEXT1_RTL( HIDE )\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_CHAR_WEIGHT ; \ + HelpID = SID_ATTR_CHAR_WEIGHT ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_CHAR_POSTURE ; \ + HelpID = SID_ATTR_CHAR_POSTURE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_CHAR_UNDERLINE ; \ + HelpID = SID_ATTR_CHAR_UNDERLINE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_CHAR_OVERLINE ; \ + HelpID = SID_ATTR_CHAR_OVERLINE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = FN_SET_SUPER_SCRIPT;\ + HelpID = FN_SET_SUPER_SCRIPT;\ + Hide = HIDE;\ + };\ + ToolBoxItem\ + {\ + Identifier = FN_SET_SUB_SCRIPT;\ + HelpID = FN_SET_SUB_SCRIPT;\ + Hide = HIDE;\ + };\ + ToolBoxItem\ + {\ + Type = TOOLBOXITEM_SEPARATOR ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_PARA_ADJUST_RIGHT ; \ + HelpID = SID_ATTR_PARA_ADJUST_RIGHT ; \ + RadioCheck = TRUE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_PARA_ADJUST_CENTER ; \ + HelpID = SID_ATTR_PARA_ADJUST_CENTER ; \ + RadioCheck = TRUE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_PARA_ADJUST_LEFT ; \ + HelpID = SID_ATTR_PARA_ADJUST_LEFT ; \ + RadioCheck = TRUE ; \ + };\ + +#define MN_TEXT1_BLOCK \ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \ + HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; \ + RadioCheck = TRUE ; \ + };\ + +#define MN_TEXT_LINESPACE \ + ToolBoxItem\ + {\ + Type = TOOLBOXITEM_SEPARATOR ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_PARA_LINESPACE_10;\ + HelpID = SID_ATTR_PARA_LINESPACE_10;\ + RadioCheck = TRUE;\ + Hide = TRUE;\ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_PARA_LINESPACE_15;\ + HelpID = SID_ATTR_PARA_LINESPACE_15;\ + RadioCheck = TRUE;\ + Hide = TRUE;\ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_PARA_LINESPACE_20;\ + HelpID = SID_ATTR_PARA_LINESPACE_20;\ + RadioCheck = TRUE;\ + Hide = TRUE;\ + };\ + +#define MN_TEXT_LTR_RTL \ + ToolBoxItem\ + {\ + Type = TOOLBOXITEM_SEPARATOR ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_PARA_LEFT_TO_RIGHT;\ + HelpID = SID_ATTR_PARA_LEFT_TO_RIGHT;\ + RadioCheck = TRUE;\ + Hide = TRUE;\ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_PARA_RIGHT_TO_LEFT;\ + HelpID = SID_ATTR_PARA_RIGHT_TO_LEFT;\ + RadioCheck = TRUE;\ + Hide = TRUE;\ + };\ + +#define MN_TEXT_RTL_LTR \ + ToolBoxItem\ + {\ + Type = TOOLBOXITEM_SEPARATOR ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_PARA_RIGHT_TO_LEFT;\ + HelpID = SID_ATTR_PARA_RIGHT_TO_LEFT;\ + RadioCheck = TRUE;\ + Hide = TRUE;\ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_PARA_LEFT_TO_RIGHT;\ + HelpID = SID_ATTR_PARA_LEFT_TO_RIGHT;\ + RadioCheck = TRUE;\ + Hide = TRUE;\ + };\ + +#define MN_TEXT2\ + ToolBoxItem\ + {\ + Type = TOOLBOXITEM_SEPARATOR ; \ + };\ + ToolBoxItem\ + {\ + Identifier = FN_NUM_NUMBERING_ON ; \ + HelpID = FN_NUM_NUMBERING_ON ; \ + };\ + ToolBoxItem\ + {\ + Identifier = FN_NUM_BULLET_ON ; \ + HelpID = FN_NUM_BULLET_ON ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_DEC_INDENT ; \ + HelpId = SID_DEC_INDENT ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_INC_INDENT ; \ + HelpId = SID_INC_INDENT ; \ + };\ + ToolBoxItem\ + {\ + Identifier = FN_GROW_FONT_SIZE;\ + HelpID = FN_GROW_FONT_SIZE;\ + Hide = TRUE;\ + };\ + ToolBoxItem\ + {\ + Identifier = FN_SHRINK_FONT_SIZE;\ + HelpID = FN_SHRINK_FONT_SIZE;\ + Hide = TRUE;\ + };\ + +#define MN_BACKGROUND_COLOR\ + ToolBoxItem\ + {\ + ITEM_TOOLBAR_BACKGROUND_COLOR\ + }; + +#define MN_TEXT_BACKGROUND \ + ToolBoxItem\ + {\ + Type = TOOLBOXITEM_SEPARATOR ; \ + };\ + ToolBoxItem\ + {\ + ITEM_TOOLBAR_ATTR_CHAR_COLOR\ + Identifier = SID_ATTR_CHAR_COLOR2 ; \ + Command = ".uno:FontColor"; \ + DropDown = TRUE ;\ + };\ + ToolBoxItem\ + {\ + Identifier = SID_ATTR_CHAR_COLOR_BACKGROUND ; \ + HelpID = SID_ATTR_CHAR_COLOR_BACKGROUND ; \ + DropDown = TRUE ;\ + };\ + ToolBoxItem\ + {\ + ITEM_TOOLBAR_BACKGROUND_COLOR\ + Text [ en-US ] = "Paragraph Background" ; \ + Text [ x-comment ] = " ";\ + }; + +#define MN_TEXT_DIALOGS(HIDE)\ + ToolBoxItem\ + {\ + Type = TOOLBOXITEM_SEPARATOR ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_SELECTALL;\ + HelpId = SID_SELECTALL;\ + Hide = HIDE;\ + };\ + ToolBoxItem\ + {\ + Identifier = SID_CHAR_DLG;\ + HelpId = SID_CHAR_DLG;\ + Hide = HIDE;\ + };\ + ToolBoxItem\ + {\ + Identifier = SID_PARA_DLG;\ + HelpId = SID_PARA_DLG;\ + Hide = HIDE;\ + }; + + +#define MN_TEMPLATE\ + ToolBoxItem\ + {\ + ITEM_TOOLBAR_TEMPLATE_APPLY\ + };\ + ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; + +#define MN_FRAME_WRAP\ + ToolBoxItem\ + {\ + Identifier = FN_FRAME_NOWRAP ; \ + HelpID = FN_FRAME_NOWRAP ; \ + RadioCheck = TRUE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = FN_FRAME_WRAP ; \ + HelpID = FN_FRAME_WRAP ; \ + RadioCheck = TRUE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = FN_FRAME_WRAP_IDEAL ; \ + HelpID = FN_FRAME_WRAP_IDEAL ; \ + RadioCheck = TRUE ; \ + Hide = TRUE;\ + };\ + ToolBoxItem\ + {\ + Identifier = FN_FRAME_WRAP_LEFT ; \ + HelpID = FN_FRAME_WRAP_LEFT ; \ + RadioCheck = TRUE ; \ + Hide = TRUE;\ + };\ + ToolBoxItem\ + {\ + Identifier = FN_FRAME_WRAP_RIGHT ; \ + HelpID = FN_FRAME_WRAP_RIGHT ; \ + RadioCheck = TRUE ; \ + Hide = TRUE;\ + };\ + ToolBoxItem\ + {\ + Identifier = FN_FRAME_WRAPTHRU ; \ + HelpID = FN_FRAME_WRAPTHRU ; \ + RadioCheck = TRUE ; \ + }; + +#define MN_FRAME_WRAP_WEB\ + ToolBoxItem\ + {\ + Identifier = FN_FRAME_NOWRAP ; \ + HelpID = FN_FRAME_NOWRAP ; \ + RadioCheck = TRUE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = FN_FRAME_WRAP_LEFT ; \ + HelpID = FN_FRAME_WRAP_LEFT ; \ + RadioCheck = TRUE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = FN_FRAME_WRAP_RIGHT ; \ + HelpID = FN_FRAME_WRAP_RIGHT ; \ + RadioCheck = TRUE ; \ + };\ + ToolBoxItem\ + {\ + Type = TOOLBOXITEM_SEPARATOR ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_IMAP ; \ + HelpID = SID_IMAP ; \ + RadioCheck = TRUE ; \ + }; + +#define MN_CONTOUR\ + ToolBoxItem\ + {\ + Type = TOOLBOXITEM_SEPARATOR ; \ + };\ + ToolBoxItem\ + {\ + Identifier = FN_FRAME_WRAP_CONTOUR ; \ + HelpID = FN_FRAME_WRAP_CONTOUR ; \ + Hide = TRUE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_CONTOUR_DLG ; \ + HelpID = SID_CONTOUR_DLG ; \ + Hide = TRUE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_IMAP ; \ + HelpID = SID_IMAP ; \ + Hide = TRUE ; \ + }; + + +#define MN_FRAME1\ + ToolBoxItem\ + {\ + Type = TOOLBOXITEM_SEPARATOR ; \ + };\ + ToolBoxItem\ + {\ + Identifier = FN_FRAME_ALIGN_HORZ_LEFT ; \ + HelpID = FN_FRAME_ALIGN_HORZ_LEFT ; \ + RadioCheck = TRUE ; \ + }; + +#define MN_FRAME2\ + ToolBoxItem\ + {\ + Identifier = FN_FRAME_ALIGN_HORZ_CENTER ; \ + HelpID = FN_FRAME_ALIGN_HORZ_CENTER ; \ + RadioCheck = TRUE ; \ + }; + +#define MN_FRAME3\ + ToolBoxItem\ + {\ + Identifier = FN_FRAME_ALIGN_HORZ_RIGHT ; \ + HelpID = FN_FRAME_ALIGN_HORZ_RIGHT ; \ + RadioCheck = TRUE ; \ + };\ + ToolBoxItem\ + {\ + Type = TOOLBOXITEM_SEPARATOR ; \ + };\ + ToolBoxItem\ + {\ + Identifier = FN_FRAME_ALIGN_VERT_TOP ; \ + HelpID = FN_FRAME_ALIGN_VERT_TOP ; \ + RadioCheck = TRUE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = FN_FRAME_ALIGN_VERT_CENTER ; \ + HelpID = FN_FRAME_ALIGN_VERT_CENTER ; \ + RadioCheck = TRUE ; \ + };\ + ToolBoxItem\ + {\ + Identifier = FN_FRAME_ALIGN_VERT_BOTTOM ; \ + HelpID = FN_FRAME_ALIGN_VERT_BOTTOM ; \ + RadioCheck = TRUE ; \ + };\ + ToolBoxItem\ + {\ + Type = TOOLBOXITEM_SEPARATOR ; \ + }; + +#define MN_LAYER\ + ToolBoxItem\ + {\ + Identifier = SID_FRAME_TO_TOP ; \ + HelpID = SID_FRAME_TO_TOP ; \ + };\ + ToolBoxItem\ + {\ + Identifier = SID_FRAME_TO_BOTTOM ; \ + HelpID = SID_FRAME_TO_BOTTOM ; \ + }; + +#define MN_LINESTYLE\ + ToolBoxItem\ + {\ + ITEM_TOOLBAR_ATTR_BORDER\ + };\ + ToolBoxItem\ + {\ + ITEM_TOOLBAR_FRAME_LINESTYLE\ + };\ + ToolBoxItem\ + {\ + ITEM_TOOLBAR_FRAME_LINECOLOR\ + }; + +#define MN_ATTRIBUTES_FRAME\ + ToolBoxItem\ + {\ + Identifier = FN_FORMAT_FRAME_DLG ; \ + HelpID = FN_FORMAT_FRAME_DLG ; \ + }; + +#define MN_ATTRIBUTES_GRAFIK\ + ToolBoxItem\ + {\ + Identifier = FN_FORMAT_FRAME_DLG;\ + HelpID = FN_FORMAT_GRAFIC_DLG;\ + Text [ en-US ] = "Graphics Properties";\ + Text [ x-comment ] = " ";\ + }; + + +#define MN_ATTRIBUTES_OLE\ + ToolBoxItem\ + {\ + Identifier = FN_FORMAT_FRAME_DLG;\ + HelpID = FN_FORMAT_FRAME_DLG;\ + Text [ en-US ] = "Object Properties";\ + Text [ x-comment ] = " ";\ + }; + +#define MN_GRID(hide)\ + ToolBoxItem\ + {\ + Type = TOOLBOXITEM_SEPARATOR;\ + };\ + ToolBoxItem\ + {\ + Identifier = SID_GRID_VISIBLE;\ + HelpID = SID_GRID_VISIBLE;\ + hide;\ + };\ + ToolBoxItem\ + {\ + Identifier = SID_GRID_USE;\ + HelpID = SID_GRID_USE;\ + hide;\ + };\ + ToolBoxItem\ + {\ + Identifier = SID_HELPLINES_MOVE;\ + HelpID = SID_HELPLINES_MOVE;\ + hide;\ + }; + + + +#endif // _TOOLBOX_HRC + diff --git a/sw/source/ui/inc/toolbox_tmpl.hrc b/sw/source/ui/inc/toolbox_tmpl.hrc deleted file mode 100644 index af8e64abaf..0000000000 --- a/sw/source/ui/inc/toolbox_tmpl.hrc +++ /dev/null @@ -1,566 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: toolbox_tmpl.hrc,v $ - * $Revision: 1.5.210.1 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _TOOLBOX_HRC -#define _TOOLBOX_HRC -#include "shells.hrc" -#include "globals.hrc" -#include "cmdid.h" -#define MN_FONT\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_CHAR_FONT;\ - HelpID = SID_ATTR_CHAR_FONT;\ - };\ - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; \ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_CHAR_FONTHEIGHT ; \ - HelpID = SID_ATTR_CHAR_FONTHEIGHT ; \ - };\ - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - -#define MN_TEXT1( HIDE )\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_CHAR_WEIGHT ; \ - HelpID = SID_ATTR_CHAR_WEIGHT ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_CHAR_POSTURE ; \ - HelpID = SID_ATTR_CHAR_POSTURE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_CHAR_UNDERLINE ; \ - HelpID = SID_ATTR_CHAR_UNDERLINE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_CHAR_OVERLINE ; \ - HelpID = SID_ATTR_CHAR_OVERLINE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = FN_SET_SUPER_SCRIPT;\ - HelpID = FN_SET_SUPER_SCRIPT;\ - Hide = HIDE;\ - };\ - ToolBoxItem\ - {\ - Identifier = FN_SET_SUB_SCRIPT;\ - HelpID = FN_SET_SUB_SCRIPT;\ - Hide = HIDE;\ - };\ - ToolBoxItem\ - {\ - Type = TOOLBOXITEM_SEPARATOR ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_PARA_ADJUST_LEFT ; \ - HelpID = SID_ATTR_PARA_ADJUST_LEFT ; \ - RadioCheck = TRUE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_PARA_ADJUST_CENTER ; \ - HelpID = SID_ATTR_PARA_ADJUST_CENTER ; \ - RadioCheck = TRUE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_PARA_ADJUST_RIGHT ; \ - HelpID = SID_ATTR_PARA_ADJUST_RIGHT ; \ - RadioCheck = TRUE ; \ - };\ - -#define MN_TEXT1_RTL( HIDE )\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_CHAR_WEIGHT ; \ - HelpID = SID_ATTR_CHAR_WEIGHT ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_CHAR_POSTURE ; \ - HelpID = SID_ATTR_CHAR_POSTURE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_CHAR_UNDERLINE ; \ - HelpID = SID_ATTR_CHAR_UNDERLINE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_CHAR_OVERLINE ; \ - HelpID = SID_ATTR_CHAR_OVERLINE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = FN_SET_SUPER_SCRIPT;\ - HelpID = FN_SET_SUPER_SCRIPT;\ - Hide = HIDE;\ - };\ - ToolBoxItem\ - {\ - Identifier = FN_SET_SUB_SCRIPT;\ - HelpID = FN_SET_SUB_SCRIPT;\ - Hide = HIDE;\ - };\ - ToolBoxItem\ - {\ - Type = TOOLBOXITEM_SEPARATOR ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_PARA_ADJUST_RIGHT ; \ - HelpID = SID_ATTR_PARA_ADJUST_RIGHT ; \ - RadioCheck = TRUE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_PARA_ADJUST_CENTER ; \ - HelpID = SID_ATTR_PARA_ADJUST_CENTER ; \ - RadioCheck = TRUE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_PARA_ADJUST_LEFT ; \ - HelpID = SID_ATTR_PARA_ADJUST_LEFT ; \ - RadioCheck = TRUE ; \ - };\ - -#define MN_TEXT1_BLOCK \ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \ - HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; \ - RadioCheck = TRUE ; \ - };\ - -#define MN_TEXT_LINESPACE \ - ToolBoxItem\ - {\ - Type = TOOLBOXITEM_SEPARATOR ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_PARA_LINESPACE_10;\ - HelpID = SID_ATTR_PARA_LINESPACE_10;\ - RadioCheck = TRUE;\ - Hide = TRUE;\ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_PARA_LINESPACE_15;\ - HelpID = SID_ATTR_PARA_LINESPACE_15;\ - RadioCheck = TRUE;\ - Hide = TRUE;\ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_PARA_LINESPACE_20;\ - HelpID = SID_ATTR_PARA_LINESPACE_20;\ - RadioCheck = TRUE;\ - Hide = TRUE;\ - };\ - -#define MN_TEXT_LTR_RTL \ - ToolBoxItem\ - {\ - Type = TOOLBOXITEM_SEPARATOR ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_PARA_LEFT_TO_RIGHT;\ - HelpID = SID_ATTR_PARA_LEFT_TO_RIGHT;\ - RadioCheck = TRUE;\ - Hide = TRUE;\ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_PARA_RIGHT_TO_LEFT;\ - HelpID = SID_ATTR_PARA_RIGHT_TO_LEFT;\ - RadioCheck = TRUE;\ - Hide = TRUE;\ - };\ - -#define MN_TEXT_RTL_LTR \ - ToolBoxItem\ - {\ - Type = TOOLBOXITEM_SEPARATOR ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_PARA_RIGHT_TO_LEFT;\ - HelpID = SID_ATTR_PARA_RIGHT_TO_LEFT;\ - RadioCheck = TRUE;\ - Hide = TRUE;\ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_PARA_LEFT_TO_RIGHT;\ - HelpID = SID_ATTR_PARA_LEFT_TO_RIGHT;\ - RadioCheck = TRUE;\ - Hide = TRUE;\ - };\ - -#define MN_TEXT2\ - ToolBoxItem\ - {\ - Type = TOOLBOXITEM_SEPARATOR ; \ - };\ - ToolBoxItem\ - {\ - Identifier = FN_NUM_NUMBERING_ON ; \ - HelpID = FN_NUM_NUMBERING_ON ; \ - };\ - ToolBoxItem\ - {\ - Identifier = FN_NUM_BULLET_ON ; \ - HelpID = FN_NUM_BULLET_ON ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_DEC_INDENT ; \ - HelpId = SID_DEC_INDENT ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_INC_INDENT ; \ - HelpId = SID_INC_INDENT ; \ - };\ - ToolBoxItem\ - {\ - Identifier = FN_GROW_FONT_SIZE;\ - HelpID = FN_GROW_FONT_SIZE;\ - Hide = TRUE;\ - };\ - ToolBoxItem\ - {\ - Identifier = FN_SHRINK_FONT_SIZE;\ - HelpID = FN_SHRINK_FONT_SIZE;\ - Hide = TRUE;\ - };\ - -#define MN_BACKGROUND_COLOR\ - ToolBoxItem\ - {\ - ITEM_TOOLBAR_BACKGROUND_COLOR\ - }; - -#define MN_TEXT_BACKGROUND \ - ToolBoxItem\ - {\ - Type = TOOLBOXITEM_SEPARATOR ; \ - };\ - ToolBoxItem\ - {\ - ITEM_TOOLBAR_ATTR_CHAR_COLOR\ - Identifier = SID_ATTR_CHAR_COLOR2 ; \ - Command = ".uno:FontColor"; \ - DropDown = TRUE ;\ - };\ - ToolBoxItem\ - {\ - Identifier = SID_ATTR_CHAR_COLOR_BACKGROUND ; \ - HelpID = SID_ATTR_CHAR_COLOR_BACKGROUND ; \ - DropDown = TRUE ;\ - };\ - ToolBoxItem\ - {\ - ITEM_TOOLBAR_BACKGROUND_COLOR\ - Text [ en-US ] = "Paragraph Background" ; \ - Text [ x-comment ] = " ";\ - }; - -#define MN_TEXT_DIALOGS(HIDE)\ - ToolBoxItem\ - {\ - Type = TOOLBOXITEM_SEPARATOR ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_SELECTALL;\ - HelpId = SID_SELECTALL;\ - Hide = HIDE;\ - };\ - ToolBoxItem\ - {\ - Identifier = SID_CHAR_DLG;\ - HelpId = SID_CHAR_DLG;\ - Hide = HIDE;\ - };\ - ToolBoxItem\ - {\ - Identifier = SID_PARA_DLG;\ - HelpId = SID_PARA_DLG;\ - Hide = HIDE;\ - }; - - -#define MN_TEMPLATE\ - ToolBoxItem\ - {\ - ITEM_TOOLBAR_TEMPLATE_APPLY\ - };\ - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - -#define MN_FRAME_WRAP\ - ToolBoxItem\ - {\ - Identifier = FN_FRAME_NOWRAP ; \ - HelpID = FN_FRAME_NOWRAP ; \ - RadioCheck = TRUE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = FN_FRAME_WRAP ; \ - HelpID = FN_FRAME_WRAP ; \ - RadioCheck = TRUE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = FN_FRAME_WRAP_IDEAL ; \ - HelpID = FN_FRAME_WRAP_IDEAL ; \ - RadioCheck = TRUE ; \ - Hide = TRUE;\ - };\ - ToolBoxItem\ - {\ - Identifier = FN_FRAME_WRAP_LEFT ; \ - HelpID = FN_FRAME_WRAP_LEFT ; \ - RadioCheck = TRUE ; \ - Hide = TRUE;\ - };\ - ToolBoxItem\ - {\ - Identifier = FN_FRAME_WRAP_RIGHT ; \ - HelpID = FN_FRAME_WRAP_RIGHT ; \ - RadioCheck = TRUE ; \ - Hide = TRUE;\ - };\ - ToolBoxItem\ - {\ - Identifier = FN_FRAME_WRAPTHRU ; \ - HelpID = FN_FRAME_WRAPTHRU ; \ - RadioCheck = TRUE ; \ - }; - -#define MN_FRAME_WRAP_WEB\ - ToolBoxItem\ - {\ - Identifier = FN_FRAME_NOWRAP ; \ - HelpID = FN_FRAME_NOWRAP ; \ - RadioCheck = TRUE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = FN_FRAME_WRAP_LEFT ; \ - HelpID = FN_FRAME_WRAP_LEFT ; \ - RadioCheck = TRUE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = FN_FRAME_WRAP_RIGHT ; \ - HelpID = FN_FRAME_WRAP_RIGHT ; \ - RadioCheck = TRUE ; \ - };\ - ToolBoxItem\ - {\ - Type = TOOLBOXITEM_SEPARATOR ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_IMAP ; \ - HelpID = SID_IMAP ; \ - RadioCheck = TRUE ; \ - }; - -#define MN_CONTOUR\ - ToolBoxItem\ - {\ - Type = TOOLBOXITEM_SEPARATOR ; \ - };\ - ToolBoxItem\ - {\ - Identifier = FN_FRAME_WRAP_CONTOUR ; \ - HelpID = FN_FRAME_WRAP_CONTOUR ; \ - Hide = TRUE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_CONTOUR_DLG ; \ - HelpID = SID_CONTOUR_DLG ; \ - Hide = TRUE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_IMAP ; \ - HelpID = SID_IMAP ; \ - Hide = TRUE ; \ - }; - - -#define MN_FRAME1\ - ToolBoxItem\ - {\ - Type = TOOLBOXITEM_SEPARATOR ; \ - };\ - ToolBoxItem\ - {\ - Identifier = FN_FRAME_ALIGN_HORZ_LEFT ; \ - HelpID = FN_FRAME_ALIGN_HORZ_LEFT ; \ - RadioCheck = TRUE ; \ - }; - -#define MN_FRAME2\ - ToolBoxItem\ - {\ - Identifier = FN_FRAME_ALIGN_HORZ_CENTER ; \ - HelpID = FN_FRAME_ALIGN_HORZ_CENTER ; \ - RadioCheck = TRUE ; \ - }; - -#define MN_FRAME3\ - ToolBoxItem\ - {\ - Identifier = FN_FRAME_ALIGN_HORZ_RIGHT ; \ - HelpID = FN_FRAME_ALIGN_HORZ_RIGHT ; \ - RadioCheck = TRUE ; \ - };\ - ToolBoxItem\ - {\ - Type = TOOLBOXITEM_SEPARATOR ; \ - };\ - ToolBoxItem\ - {\ - Identifier = FN_FRAME_ALIGN_VERT_TOP ; \ - HelpID = FN_FRAME_ALIGN_VERT_TOP ; \ - RadioCheck = TRUE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = FN_FRAME_ALIGN_VERT_CENTER ; \ - HelpID = FN_FRAME_ALIGN_VERT_CENTER ; \ - RadioCheck = TRUE ; \ - };\ - ToolBoxItem\ - {\ - Identifier = FN_FRAME_ALIGN_VERT_BOTTOM ; \ - HelpID = FN_FRAME_ALIGN_VERT_BOTTOM ; \ - RadioCheck = TRUE ; \ - };\ - ToolBoxItem\ - {\ - Type = TOOLBOXITEM_SEPARATOR ; \ - }; - -#define MN_LAYER\ - ToolBoxItem\ - {\ - Identifier = SID_FRAME_TO_TOP ; \ - HelpID = SID_FRAME_TO_TOP ; \ - };\ - ToolBoxItem\ - {\ - Identifier = SID_FRAME_TO_BOTTOM ; \ - HelpID = SID_FRAME_TO_BOTTOM ; \ - }; - -#define MN_LINESTYLE\ - ToolBoxItem\ - {\ - ITEM_TOOLBAR_ATTR_BORDER\ - };\ - ToolBoxItem\ - {\ - ITEM_TOOLBAR_FRAME_LINESTYLE\ - };\ - ToolBoxItem\ - {\ - ITEM_TOOLBAR_FRAME_LINECOLOR\ - }; - -#define MN_ATTRIBUTES_FRAME\ - ToolBoxItem\ - {\ - Identifier = FN_FORMAT_FRAME_DLG ; \ - HelpID = FN_FORMAT_FRAME_DLG ; \ - }; - -#define MN_ATTRIBUTES_GRAFIK\ - ToolBoxItem\ - {\ - Identifier = FN_FORMAT_FRAME_DLG;\ - HelpID = FN_FORMAT_GRAFIC_DLG;\ - Text [ en-US ] = "Graphics Properties";\ - Text [ x-comment ] = " ";\ - }; - - -#define MN_ATTRIBUTES_OLE\ - ToolBoxItem\ - {\ - Identifier = FN_FORMAT_FRAME_DLG;\ - HelpID = FN_FORMAT_FRAME_DLG;\ - Text [ en-US ] = "Object Properties";\ - Text [ x-comment ] = " ";\ - }; - -#define MN_GRID(hide)\ - ToolBoxItem\ - {\ - Type = TOOLBOXITEM_SEPARATOR;\ - };\ - ToolBoxItem\ - {\ - Identifier = SID_GRID_VISIBLE;\ - HelpID = SID_GRID_VISIBLE;\ - hide;\ - };\ - ToolBoxItem\ - {\ - Identifier = SID_GRID_USE;\ - HelpID = SID_GRID_USE;\ - hide;\ - };\ - ToolBoxItem\ - {\ - Identifier = SID_HELPLINES_MOVE;\ - HelpID = SID_HELPLINES_MOVE;\ - hide;\ - }; - - - -#endif // _TOOLBOX_HRC - -- cgit v1.2.3 From b7937533a98c4441f9cb09e762baf1553b8b241d Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 19 Apr 2010 17:23:07 +0200 Subject: sw33bf03: #i110241#: revert change from writerfilter32bugfixes01 this will break import of certain "format" redlines. --- sw/source/core/doc/docredln.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index b1cbd29eb7..595caebb63 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -1112,8 +1112,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) case POS_EQUAL: case POS_INSIDE: - // TODO Check if there is any side effect - //delete pNewRedl, pNewRedl = 0; + delete pNewRedl, pNewRedl = 0; break; case POS_OUTSIDE: -- cgit v1.2.3 From 851a63f715e025e691f45aa3c81d1accd436bee3 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 19 Apr 2010 17:25:53 +0200 Subject: sw33bf03: #i104585#: copy outline numbering rule to clipboard --- sw/source/core/docnode/ndcopy.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index 68f1559055..c6682399fa 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -922,6 +922,12 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos, bool bCopyBookmarks = true; BOOL bStartIsTxtNode = 0 != pSttTxtNd; + // #i104585# copy outline num rule to clipboard (for ASCII filter) + if (pDoc->IsClipBoard() && GetOutlineNumRule()) + { + pDoc->SetOutlineNumRule(*GetOutlineNumRule()); + } + // --> OD 2009-08-25 #i86492# // Correct the search for a previous list: // First search for non-outline numbering list. Then search for non-outline -- cgit v1.2.3 From 5d2af4be0d1682b6b6ce6edb50fe02848c4d2316 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 19 Apr 2010 17:27:33 +0200 Subject: sw33bf03: #i110586#: use proper which range for autoformat item set --- sw/source/core/txtnode/thints.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 5384f4f73b..230787f675 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -776,7 +776,8 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, // For each attribute in the automatic style check if it // is also set the the new character style: - SfxItemSet aNewSet( *pOldStyle->GetPool(), RES_CHRATR_BEGIN, RES_CHRATR_END ); + SfxItemSet aNewSet( *pOldStyle->GetPool(), + aCharAutoFmtSetRange); SfxItemIter aItemIter( *pOldStyle ); const SfxPoolItem* pItem = aItemIter.GetCurItem(); while( TRUE ) -- cgit v1.2.3 From f2afda98a3019389b6bfe4aa640a10d0f66e9639 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 19 Apr 2010 17:28:53 +0200 Subject: sw33bf03: #i110655#: SwRect::Justify(): fix regression from #i106401# --- sw/source/core/bastyp/swrect.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx index 25580a96e4..c4fb6953c2 100644 --- a/sw/source/core/bastyp/swrect.cxx +++ b/sw/source/core/bastyp/swrect.cxx @@ -245,7 +245,7 @@ void SwRect::Justify() } if ( m_Size.getWidth() < 0 ) { - m_Point.Y() += m_Size.getWidth() + 1; + m_Point.X() += m_Size.getWidth() + 1; m_Size.setWidth(-m_Size.getWidth()); } } -- cgit v1.2.3 From 5a8cd6a4b8d08514ca41a58971263cf3dba81b53 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 19 Apr 2010 18:27:03 +0200 Subject: CWS gnumake2: remove duplicate header in solver: vcl/imagebtn.hxx is just a copy of vcl/button.hxx --- sw/inc/pch/precompiled_sw.hxx | 2 +- sw/source/ui/inc/column.hxx | 2 +- sw/source/ui/inc/envlop.hxx | 2 +- sw/source/ui/inc/fldedt.hxx | 2 +- sw/source/ui/inc/javaedit.hxx | 2 +- sw/source/ui/inc/split.hxx | 2 +- sw/source/ui/inc/swuiidxmrk.hxx | 2 +- sw/source/ui/inc/workctrl.hxx | 2 +- sw/source/ui/inc/wrap.hxx | 2 +- sw/source/ui/table/tablepg.hxx | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 8495ddd9f3..359a53070b 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -920,7 +920,7 @@ #include "vcl/group.hxx" #include "vcl/help.hxx" #include "vcl/image.hxx" -#include "vcl/imagebtn.hxx" +#include "vcl/button.hxx" #include "vcl/imgcons.hxx" #include "vcl/inputctx.hxx" #include "vcl/jobset.hxx" diff --git a/sw/source/ui/inc/column.hxx b/sw/source/ui/inc/column.hxx index 7da371213a..3bf10d86a7 100644 --- a/sw/source/ui/inc/column.hxx +++ b/sw/source/ui/inc/column.hxx @@ -49,7 +49,7 @@ #endif #include #ifndef _IMAGEBTN_HXX //autogen -#include +#include #endif #include #include diff --git a/sw/source/ui/inc/envlop.hxx b/sw/source/ui/inc/envlop.hxx index 0e9f584734..6fddc3819d 100644 --- a/sw/source/ui/inc/envlop.hxx +++ b/sw/source/ui/inc/envlop.hxx @@ -45,7 +45,7 @@ #endif #ifndef _IMAGEBTN_HXX //autogen -#include +#include #endif #include "envimg.hxx" diff --git a/sw/source/ui/inc/fldedt.hxx b/sw/source/ui/inc/fldedt.hxx index 118cabd3e1..25290b2cc2 100644 --- a/sw/source/ui/inc/fldedt.hxx +++ b/sw/source/ui/inc/fldedt.hxx @@ -27,7 +27,7 @@ #ifndef _FLDEDT_HXX #define _FLDEDT_HXX #include -#include +#include class SwView; class SwWrtShell; diff --git a/sw/source/ui/inc/javaedit.hxx b/sw/source/ui/inc/javaedit.hxx index 7eadaa7c34..606e3f26bc 100644 --- a/sw/source/ui/inc/javaedit.hxx +++ b/sw/source/ui/inc/javaedit.hxx @@ -44,7 +44,7 @@ #endif #ifndef _IMAGEBTN_HXX //autogen -#include +#include #endif class SwWrtShell; diff --git a/sw/source/ui/inc/split.hxx b/sw/source/ui/inc/split.hxx index d058276c54..834da1e995 100644 --- a/sw/source/ui/inc/split.hxx +++ b/sw/source/ui/inc/split.hxx @@ -38,7 +38,7 @@ #endif #ifndef _IMAGEBTN_HXX //autogen -#include +#include #endif #ifndef _BUTTON_HXX //autogen diff --git a/sw/source/ui/inc/swuiidxmrk.hxx b/sw/source/ui/inc/swuiidxmrk.hxx index de05db1b82..cef3fa83cf 100644 --- a/sw/source/ui/inc/swuiidxmrk.hxx +++ b/sw/source/ui/inc/swuiidxmrk.hxx @@ -52,7 +52,7 @@ #endif #ifndef _IMAGEBTN_HXX //autogen -#include +#include #endif #include #include "toxe.hxx" diff --git a/sw/source/ui/inc/workctrl.hxx b/sw/source/ui/inc/workctrl.hxx index 6996ea1109..f6f878aa15 100644 --- a/sw/source/ui/inc/workctrl.hxx +++ b/sw/source/ui/inc/workctrl.hxx @@ -31,7 +31,7 @@ #include #include #ifndef _IMAGEBTN_HXX //autogen -#include +#include #endif class PopupMenu; diff --git a/sw/source/ui/inc/wrap.hxx b/sw/source/ui/inc/wrap.hxx index 47486064e6..16bda288f8 100644 --- a/sw/source/ui/inc/wrap.hxx +++ b/sw/source/ui/inc/wrap.hxx @@ -31,7 +31,7 @@ #include #ifndef _IMAGEBTN_HXX //autogen -#include +#include #endif #ifndef _BUTTON_HXX //autogen diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx index f4b00f5062..ea40fec677 100644 --- a/sw/source/ui/table/tablepg.hxx +++ b/sw/source/ui/table/tablepg.hxx @@ -31,7 +31,7 @@ #include #endif #ifndef _IMAGEBTN_HXX //autogen -#include +#include #endif #ifndef _LSTBOX_HXX //autogen #include -- cgit v1.2.3 From ead79bbd2349604c717697c56f3f9bf45671680b Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Tue, 20 Apr 2010 15:45:53 +0200 Subject: DEV300 masterfix: #i10000#: fix include because SvxPaperBinItem has been moved to editeng --- sw/source/core/doc/doc.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 0d4670df7f..3fbf10e186 100755 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -56,7 +56,7 @@ #include #include #include -#include +#include #include #include -- cgit v1.2.3 From ea78b3e4388036441a01bb7d5dc4980fb82010a0 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 20 Apr 2010 15:55:51 +0200 Subject: CWS gnumake2: move all delivered headers in svx to inc/svx; remove unused or useless headers --- starmath/source/makefile.mk | 3 - starmath/source/menu_tmpl.src | 160 ------------------------------------------ starmath/source/smres.src | 2 - sw/inc/pch/precompiled_sw.hxx | 2 +- sw/source/ui/fmtui/tmpdlg.cxx | 2 +- 5 files changed, 2 insertions(+), 167 deletions(-) delete mode 100644 starmath/source/menu_tmpl.src (limited to 'sw/source') diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk index a69a900107..d786e0423d 100644 --- a/starmath/source/makefile.mk +++ b/starmath/source/makefile.mk @@ -108,9 +108,6 @@ LIB1OBJFILES = \ # --- Targets ------------------------------------------------------- -LOCALIZE_ME = menu_tmpl.src - - .INCLUDE : target.mk $(INCCOM)$/dllname.hxx: makefile.mk diff --git a/starmath/source/menu_tmpl.src b/starmath/source/menu_tmpl.src deleted file mode 100644 index 70348c73d0..0000000000 --- a/starmath/source/menu_tmpl.src +++ /dev/null @@ -1,160 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -#ifndef _SFX_HRC //autogen -#include -#endif -#ifndef _GLOBLMN_HRC //autogen -#include -#endif -#ifndef _GLOBALACC_SRC //autogen -#include -#endif -#ifndef _SVX_SVXIDS_HRC //autogen -#include -#endif - -#ifndef _STARMATH_HRC -#include "starmath.hrc" -#endif - -#ifndef MN_HELP -#define MN_HELP -#endif - -///////////////////////////////////////////////////////////////// - -/* - -The application menu bar resource has become obsolete. You can now find the menu bar definition at: -/smath/menubar/menubar.xml. - -*/ - -///////////////////////////////////////////////////////////////// - -Accelerator RID_SMACCEL -{ - ItemList = - { - AI_UNDO - AI_REDO - AcceleratorItem - { - Identifier = SID_SELECT ; - Key = KeyCode - { - Code = KEY_A ; - Modifier1 = TRUE ; - }; - }; - AcceleratorItem - { - Identifier = SID_NEXTMARK ; - Key = KeyCode - { - Code = KEY_F4 ; - }; - }; - AcceleratorItem - { - Identifier = SID_PREVMARK ; - Key = KeyCode - { - Code = KEY_F4 ; - Shift = TRUE ; - }; - }; - AcceleratorItem - { - Identifier = SID_NEXTERR ; - Key = KeyCode - { - Code = KEY_F3 ; - }; - }; - AcceleratorItem - { - Identifier = SID_PREVERR ; - Key = KeyCode - { - Code = KEY_F3 ; - Shift = TRUE ; - }; - }; - AcceleratorItem - { - Identifier = SID_DRAW ; - Key = KeyCode - { - Code = KEY_F9 ; - }; - }; - }; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/starmath/source/smres.src b/starmath/source/smres.src index b14bcef63d..c740f75878 100644 --- a/starmath/source/smres.src +++ b/starmath/source/smres.src @@ -3478,8 +3478,6 @@ String RID_ERR_RIGHTEXPECTED Text [ en-US ] = "'RIGHT' expected" ; }; -#include "menu.src" - ToolBox RID_MATH_TOOLBOX { HelpId = RID_MATH_TOOLBOX ; diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 359a53070b..2a0615410f 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -748,7 +748,7 @@ #include "svx/globlmn.hrc" #include "svx/grafctrl.hxx" #include "editeng/hangulhanja.hxx" -#include "svx/hdft2.hxx" +#include "svx/hdft.hxx" #include "svtools/htmlcfg.hxx" #include "svx/htmlmode.hxx" #include "svx/hyperdlg.hxx" diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index 644565b9bb..5193dd736f 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -41,7 +41,7 @@ #endif #include #include -#include +#include #include #include #include -- cgit v1.2.3 From 42ba9437c8c2f52349dee33c35cd7b36f709de2b Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 20 Apr 2010 22:38:57 +0200 Subject: CWS gnumake2: remove some unnecessary resource magic --- sw/source/ui/app/mn.src | 348 ++++++++++++++++++++++++++++++++++++++++++- sw/source/ui/web/web.src | 263 -------------------------------- sw/source/ui/web/wtextsh.cxx | 2 +- 3 files changed, 348 insertions(+), 265 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src index a0351700ff..1ad62fa6aa 100644 --- a/sw/source/ui/app/mn.src +++ b/sw/source/ui/app/mn.src @@ -25,9 +25,355 @@ * ************************************************************************/ +#include +#include +#include "cmdid.h" +#include "app.hrc" +#include "globals.hrc" +#include "helpid.h" +#include "popup.hrc" +/* --------------------- F O R M A T --------------------------------- */ -#include "swmn.hrc" +#define SEPARATOR MenuItem { Separator = TRUE; } + +//define for ITEM_FORMAT_NUMBERING +#define DEFINE_SLOTID_FOR_NUMBER_BULLETS FN_NUMBER_BULLETS +#define MN_NUMBERING ITEM_FORMAT_NUMBERING + +#define MN_TXT\ + MenuItem\ + {\ + ITEM_FORMAT_CHAR_DLG\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_PARA_DLG\ + };\ + MenuItem\ + {\ + Identifier = FN_FORMAT_PAGE_DLG ; \ + HelpID = FN_FORMAT_PAGE_DLG ; \ + Text [ en-US ] = "Pa~ge..." ; \ + }; + + +#define MN_TEXT_ATTR\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_FONT\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_FONTHEIGHT\ + };\ + MenuItem\ + {\ + Identifier = MN_FORMAT_STYLE ; \ + HelpID = MN_FORMAT_STYLE ; \ + Command = ".uno:StyleMenu" ; \ + Text [ en-US ] = "St~yle" ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_WEIGHT\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_POSTURE\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_OVERLINE\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_UNDERLINE\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_STRIKEOUT\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_SHADOWED\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_CONTOUR\ + };\ + SEPARATOR ; \ + MenuItem\ + {\ + Identifier = FN_SET_SUPER_SCRIPT ; \ + HelpID = FN_SET_SUPER_SCRIPT ; \ + Text [ en-US ] = "Superscript" ; \ + };\ + MenuItem\ + {\ + Identifier = FN_SET_SUB_SCRIPT ; \ + HelpID = FN_SET_SUB_SCRIPT ; \ + Text [ en-US ] = "Subscript" ; \ + };\ + };\ + };\ + };\ + MenuItem\ + {\ + Identifier = MN_FORMAT_ALGN ; \ + HelpID = MN_FORMAT_ALGN ; \ + Command = ".uno:AlignTextMenu" ; \ + Text [ en-US ] = "A~lignment" ; \ + RadioCheck = TRUE ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_ATTR_PARA_ADJUST_LEFT\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_ATTR_PARA_ADJUST_RIGHT\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_ATTR_PARA_ADJUST_CENTER\ + };\ + MenuItem\ + {\ + Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \ + HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; \ + RadioCheck = TRUE ; \ + Text [ en-US ] = "Justified" ; \ + };\ + };\ + };\ + };\ + MenuItem\ + {\ + Identifier = MN_FORMAT_LINESPACE ; \ + HelpID = MN_FORMAT_LINESPACE ; \ + Command = ".uno:LineSpacingMenu" ; \ + Text [ en-US ] = "Line Spacing" ; \ + _MenuItemFlags = MIB_RADIOCHECK ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_PARA_LINESPACE_10\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_PARA_LINESPACE_15\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_PARA_LINESPACE_20\ + };\ + };\ + };\ + }; + +/* --------------------- M E N U --------------------------------- */ + +/* + + +The application menu bar resource has become obsolete. You can now find the menu bar at the following +location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml + + +*/ + +/* --------------------- D O C U M E N T -------------------------- */ + + +#define _MN_EDIT_FIELD \ + MenuItem \ + { \ + Identifier = FN_EDIT_FIELD ; \ + HelpID = FN_EDIT_FIELD ; \ + Text [ en-US ] = "Fields..." ; \ + }; +#define _MN_EDIT_FOOTNOTE \ + MenuItem \ + { \ + Identifier = FN_EDIT_FOOTNOTE ; \ + HelpID = FN_EDIT_FOOTNOTE ; \ + Text [ en-US ] = "Footnote/Endnote~..." ; \ + }; + #define _MN_EDIT_IDX_ENTRY_DLG \ + MenuItem \ + { \ + Identifier = FN_EDIT_IDX_ENTRY_DLG ; \ + HelpID = FN_EDIT_IDX_ENTRY_DLG ; \ + Text [ en-US ] = "Inde~x Entry..." ; \ + }; + +#define _MN_EDIT_REDLINE \ + MenuItem \ + { \ + Identifier = FN_REDLINE_ACCEPT_DIRECT; \ + HelpID = FN_REDLINE_ACCEPT_DIRECT ; \ + Text [ en-US ] = "Accept Change" ; \ + };\ + MenuItem \ + { \ + Identifier = FN_REDLINE_REJECT_DIRECT ; \ + HelpID = FN_REDLINE_REJECT_DIRECT ; \ + Text [ en-US ] = "Reject Change" ; \ + }; \ + SEPARATOR ; +#define _MN_EDIT_BIB_ENTRY_DLG \ + MenuItem \ + { \ + Identifier = FN_EDIT_AUTH_ENTRY_DLG ; \ + HelpID = FN_EDIT_AUTH_ENTRY_DLG ; \ + Text [ en-US ] = "~Bibliography Entry..."; \ + }; \ + SEPARATOR ; + +#define _MN_EDIT_OPEN_HYPERLINK \ + MenuItem \ + { \ + ITEM_OPEN_HYPERLINK \ + };\ + MenuItem \ + { \ + Identifier = FN_EDIT_HYPERLINK ; \ + HelpID = FN_EDIT_HYPERLINK ; \ + Text [ en-US ] = "Edit Hyperlink..."; \ + }; \ + MenuItem \ + { \ + Identifier = FN_COPY_HYPERLINK_LOCATION; \ + HelpID = FN_COPY_HYPERLINK_LOCATION; \ + Text [ en-US ] = "Copy Hyperlink ~Location"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_REMOVE_HYPERLINK ; \ + HelpID = FN_REMOVE_HYPERLINK ; \ + Text [ en-US ] = "Remo~ve Hyperlink"; \ + }; + +#define _MN_EDIT_OPEN_SMARTTAGMENU \ + MenuItem \ + { \ + ITEM_OPEN_SMARTTAGMENU \ + }; + +#define _MN_EDIT__HYPERLINK \ + MenuItem\ + {\ + Identifier = FN_EDIT_HYPERLINK ; \ + HelpID = FN_EDIT_HYPERLINK ; \ + Text [ en-US ] = "~Edit Hyperlink" ; \ + }; + +#define _DEFAULT_TEXT_EDIT_ELEMENTS \ + _MN_EDIT_FIELD \ + _MN_EDIT_FOOTNOTE \ + _MN_EDIT_IDX_ENTRY_DLG \ + _MN_EDIT_BIB_ENTRY_DLG \ + _MN_EDIT_REDLINE \ + MenuItem \ + { \ + ITEM_POPUP_TEMPLATE_EDIT \ + }; \ + SEPARATOR ; \ + _MN_EDIT_OPEN_HYPERLINK \ + _MN_EDIT_OPEN_SMARTTAGMENU + + +#define MN_RESET\ + MenuItem\ + {\ + Identifier = FN_FORMAT_RESET ; \ + HelpID = FN_FORMAT_RESET ; \ + Text [ en-US ] = "~Default Formatting" ; \ + }; + +#define _NUMBERING_RELATED_MENU \ + SEPARATOR ; \ + MenuItem \ + { \ + Identifier = FN_NUMBER_NEWSTART; \ + HelpId = FN_NUMBER_NEWSTART; \ + Text[ en-US ] = "Restart Numbering"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_NUM_CONTINUE; \ + HelpId = FN_NUM_CONTINUE; \ + Text[ en-US ] = "Continue previous numbering"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_NUM_BULLET_UP; \ + HelpId = FN_NUM_BULLET_UP; \ + Text[ en-US ] = "Up One Level"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_NUM_BULLET_DOWN; \ + HelpId = FN_NUM_BULLET_DOWN; \ + Text[ en-US ] = "Down One Level"; \ + }; + +#define BASE_TEXT_POPUPMENU_BEGIN \ +{ \ + ItemList = \ + { \ + MN_RESET \ + _NUMBERING_RELATED_MENU \ + SEPARATOR ; \ + MN_TEXT_ATTR \ + SEPARATOR ; \ + MN_TXT \ + MN_NUMBERING \ + ITEM_TRANSLITERATE_MENU \ + SEPARATOR ; + +// not in Writer/Web +#define BASE_TEXT_POPUPMENU_NOWEB \ + MenuItem \ + { \ + Identifier = FN_UPDATE_CUR_TOX ; \ + HelpID = FN_UPDATE_CUR_TOX ; \ + Text [ en-US ] = "~Update Index/Table"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_EDIT_CURRENT_TOX; \ + HelpID = FN_EDIT_CURRENT_TOX; \ + Text [ en-US ] = "~Edit Index/Table"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_REMOVE_CUR_TOX; \ + HelpID = FN_REMOVE_CUR_TOX; \ + Text [ en-US ] = "Delete Index/Table"; \ + }; \ + SEPARATOR ; + +#define BASE_TEXT_POPUPMENU_END \ + _DEFAULT_TEXT_EDIT_ELEMENTS \ + }; \ +}; /*------------------------------------------------------------------------ Beschreibung: Menu Window diff --git a/sw/source/ui/web/web.src b/sw/source/ui/web/web.src index 8485ae0e80..89a4013f26 100644 --- a/sw/source/ui/web/web.src +++ b/sw/source/ui/web/web.src @@ -25,15 +25,10 @@ * ************************************************************************/ -#ifndef _SVX_SVXIDS_HRC #include -#endif #include "globals.hrc" #include "cmdid.h" #include "web.hrc" -#include "swmn.hrc" -#define ACC_SW_WEB -#include "toolbox.hrc" #include "helpid.h" #include "cfgid.h" @@ -65,124 +60,6 @@ String RID_WEBTOOLS_TOOLBOX { Text [ en-US ] = "Main Toolbar/Web" ; }; -ToolBox RID_WEBTOOLS_TOOLBOX -{ - HelpID = HID_WEBTOOLS_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Scroll = TRUE ; - Hide = TRUE ; - Align = BOXALIGN_LEFT ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_INSERT_CTRL ; - HelpID = HID_INSERT_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_FIELD_CTRL ; - HelpID = HID_INSERT_FIELD_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_DRAW_TEXT_MARQUEE ; - HelpID = SID_DRAW_TEXT_MARQUEE ; - }; - ToolBoxItem - { - Identifier = SID_FM_CONFIG ; - HelpID = SID_FM_CONFIG; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_GLOSSARY_DLG ; - HelpID = FN_GLOSSARY_DLG ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_SPELL_GRAMMAR_DIALOG; - HelpID = FN_SPELL_GRAMMAR_DIALOG; - }; - ToolBoxItem - { - ITEM_TOOLBAR_AUTOSPELL_CHECK - }; - ToolBoxItem - { - Identifier = FN_HYPHENATE_OPT_DLG; - HelpID = FN_HYPHENATE_OPT_DLG; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_THESAURUS_DLG; - HelpID = FN_THESAURUS_DLG; - Hide = TRUE; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_SEARCH_DLG ; - HelpID = SID_SEARCH_DLG ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_ATTR_ZOOM; - HelpID = SID_ATTR_ZOOM ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_VIEW_META_CHARS ; - HelpID = FN_VIEW_META_CHARS ; - }; - ToolBoxItem - { - Identifier = FN_VIEW_GRAPHIC ; - HelpID = FN_VIEW_GRAPHIC ; - }; - ToolBoxItem - { - Identifier = FN_PRINT_LAYOUT ; - HelpID = FN_PRINT_LAYOUT ; - }; - ToolBoxItem - { - Identifier = SID_SOURCEVIEW ; - HelpID = HID_SOURCEVIEW ; - }; - }; -}; /************************************************************************* Textleiste *************************************************************************/ @@ -190,156 +67,16 @@ String RID_WEBTEXT_TOOLBOX { Text [ en-US ] = "Text Object Bar/Web" ; }; -ToolBox RID_WEBTEXT_TOOLBOX -{ - HelpID = HID_WEBTEXT_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - Hide = TRUE ; - HideWhenDeactivate = TRUE ; - LineSpacing = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FONT - MN_TEXT1(TRUE) - MN_TEXT_LTR_RTL - MN_TEXT_LINESPACE - MN_TEXT2 - MN_TEXT_BACKGROUND - MN_TEXT_DIALOGS(TRUE) - }; - Scroll = TRUE ; -}; String RID_WEBFRAME_TOOLBOX { Text [ en-US ] = "Frame Object Bar/Web" ; }; -ToolBox RID_WEBFRAME_TOOLBOX -{ - HelpID = HID_WEBFRAME_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - Hide = TRUE ; - LineSpacing = TRUE ; - MenuStrings = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - ItemList = - { - MN_FRAME_WRAP_WEB - MN_FRAME1 - MN_FRAME3 - MN_LINESTYLE - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - MN_BACKGROUND_COLOR - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_FRAME - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - }; - }; - Scroll = TRUE ; -}; String RID_WEBGRAPHIC_TOOLBOX { Text [ en-US ] = "Graphics Object Bar/Web" ; }; -ToolBox RID_WEBGRAPHIC_TOOLBOX -{ - HelpID = HID_WEBGRAPHIC_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - MenuStrings = TRUE ; - Customize = TRUE ; - Hide = TRUE ; - ItemList = - { - MN_FRAME_WRAP_WEB - MN_FRAME1 - MN_FRAME3 - MN_LINESTYLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_GRAFIK - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - }; - Scroll = TRUE ; -}; String RID_WEBOLE_TOOLBOX { Text [ en-US ] = "Object/Web" ; }; -ToolBox RID_WEBOLE_TOOLBOX -{ - HelpID = HID_OLE_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - Scroll = TRUE ; - ItemList = - { - MN_FRAME_WRAP_WEB - MN_FRAME1 - MN_FRAME3 - MN_LINESTYLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_OLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - }; -}; -/************************************************************************* - -*************************************************************************/ -Menu MN_WEB_TEXT_POPUPMENU - BASE_TEXT_POPUPMENU_BEGIN - BASE_TEXT_POPUPMENU_END diff --git a/sw/source/ui/web/wtextsh.cxx b/sw/source/ui/web/wtextsh.cxx index 6f9aadb2f5..9da051913d 100644 --- a/sw/source/ui/web/wtextsh.cxx +++ b/sw/source/ui/web/wtextsh.cxx @@ -68,7 +68,7 @@ SFX_IMPL_INTERFACE(SwWebTextShell, SwBaseShell, SW_RES(STR_SHELLNAME_WEBTEXT)) { - SFX_POPUPMENU_REGISTRATION(SW_RES(MN_WEB_TEXT_POPUPMENU)); + SFX_POPUPMENU_REGISTRATION(SW_RES(MN_TEXT_POPUPMENU)); SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TEXT_TOOLBOX)); SFX_CHILDWINDOW_REGISTRATION(FN_EDIT_FORMULA); SFX_CHILDWINDOW_REGISTRATION(FN_INSERT_FIELD); -- cgit v1.2.3 From 10a50eef011d26561cf96d162cd8a00bf01966a6 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Wed, 21 Apr 2010 15:19:04 +0200 Subject: hb33patches1: #i111038# applied patch and verified --- sw/source/filter/ww8/ww8par.cxx | 11 +++++++++-- sw/source/filter/ww8/ww8par.hxx | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 3e47677f51..97fb762348 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1681,6 +1681,13 @@ void SwWW8ImplReader::Read_HdFtText(long nStart, long nLen, SwFrmFmt* pHdFtFmt) *pPaM->GetPoint() = aTmpPos; } + +bool SwWW8ImplReader::isValid_HdFt_CP(WW8_CP nHeaderCP) const +{ + //each CP of Plcfhdd MUST be less than FibRgLw97.ccpHdd + return (nHeaderCP < pWwFib->ccpHdr) ? true : false; +} + bool SwWW8ImplReader::HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt, int nSect) { @@ -1700,7 +1707,7 @@ bool SwWW8ImplReader::HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt, else { pHdFt->GetTextPosExact( static_cast< short >(nNumber + (nSect+1)*6), start, nLen); - bOk = ( 2 <= nLen ); + bOk = ( 2 <= nLen ) && isValid_HdFt_CP(start); } if (bOk) @@ -1752,7 +1759,7 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect, else { pHdFt->GetTextPosExact( static_cast< short >(nNumber + (nSect+1)*6), start, nLen); - bOk = ( 2 <= nLen ); + bOk = ( 2 <= nLen ) && isValid_HdFt_CP(start); } bool bUseLeft diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index c4d4a76d78..ed9be525ba 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1112,6 +1112,8 @@ private: void Read_HdFtTextAsHackedFrame(long nStart, long nLen, SwFrmFmt &rHdFtFmt, sal_uInt16 nPageWidth); + bool isValid_HdFt_CP(WW8_CP nHeaderCP) const; + bool HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt, int nSect); void HandleLineNumbering(const wwSection &rSection); -- cgit v1.2.3 From 0d6a34298790a053b3b860952adc5da02efa27b4 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 22 Apr 2010 13:08:19 +0200 Subject: cws tl80: #i110341# problems with spell check dialog fixed --- sw/inc/crsrsh.hxx | 1 + sw/inc/editsh.hxx | 7 +- sw/inc/swcrsr.hxx | 1 + sw/source/core/crsr/crstrvl1.cxx | 4 + sw/source/core/crsr/swcrsr.cxx | 80 +++++++++++-- sw/source/core/edit/edlingu.cxx | 58 ++++++++- sw/source/filter/ww8/wrtww8.cxx | 24 ++-- sw/source/ui/dialog/SwSpellDialogChildWindow.cxx | 146 ++++++++++++++--------- sw/source/ui/inc/SwSpellDialogChildWindow.hxx | 4 +- sw/source/ui/inc/view.hxx | 2 +- sw/source/ui/uiview/viewdraw.cxx | 7 +- 11 files changed, 249 insertions(+), 85 deletions(-) mode change 100644 => 100755 sw/source/filter/ww8/wrtww8.cxx (limited to 'sw/source') diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index d8683707b7..41a6e73c50 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -746,6 +746,7 @@ public: BOOL GoStartSentence(); BOOL GoEndSentence(); BOOL SelectWord( const Point* pPt = 0 ); + BOOL ExpandToSentenceBorders(); // Position vom akt. Cursor erfragen BOOL IsStartWord()const; diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index d64358d333..1ed1d5a3b7 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -743,9 +743,14 @@ public: bool SpellSentence(::svx::SpellPortions& rToFill, bool bIsGrammarCheck ); // make SpellIter start with the current sentence when called next time void PutSpellingToSentenceStart(); + // moves the continuation position to the end of the currently checked sentence + void MoveContinuationPosToEndOfCheckedSentence(); //applies a changed sentence - void ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bIsGrammarCheck); + void ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck); + + // check SwSpellIter data to see if the last sentence got grammar checked + bool HasLastSentenceGotGrammarChecked() const; // Is text conversion active somewhere else? BOOL HasConvIter() const; // Is hyphenation active somewhere else? diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index a21d6cbf59..6085b1e1bb 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -162,6 +162,7 @@ public: BOOL GoEndSentence(){return GoSentence(END_SENT);} BOOL GoPrevSentence(){return GoSentence(PREV_SENT);} BOOL GoStartSentence(){return GoSentence(START_SENT);} + BOOL ExpandToSentenceBorders(); virtual BOOL LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode, BOOL bAllowVisual, BOOL bSkipHidden, BOOL bInsertCrsr ); diff --git a/sw/source/core/crsr/crstrvl1.cxx b/sw/source/core/crsr/crstrvl1.cxx index b240921998..1901cc373b 100644 --- a/sw/source/core/crsr/crstrvl1.cxx +++ b/sw/source/core/crsr/crstrvl1.cxx @@ -94,4 +94,8 @@ BOOL SwCrsrShell::SelectWord( const Point* pPt ) return pCurCrsr->SelectWord( pPt ); } +BOOL SwCrsrShell::ExpandToSentenceBorders() +{ + return pCurCrsr->ExpandToSentenceBorders(); +} diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 0c782643f1..794c949c35 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -1401,11 +1401,11 @@ BOOL SwCursor::SelectWordWT( sal_Int16 nWordType, const Point* pPt ) } //----------------------------------------------------------------------------- -BOOL SwCursor::GoSentence( SentenceMoveType eMoveType ) + +static String lcl_MaskDeletedRedlines( const SwTxtNode* pTxtNd ) { - BOOL bRet = FALSE; - const SwTxtNode* pTxtNd = GetNode()->GetTxtNode(); - if( pTxtNd && pBreakIt->GetBreakIter().is() ) + String aRes; + if (pTxtNd) { //mask deleted redlines String sNodeText(pTxtNd->GetTxt()); @@ -1430,11 +1430,30 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType ) } } } + aRes = sNodeText; + } + return aRes; +} + +BOOL SwCursor::GoSentence( SentenceMoveType eMoveType ) +{ + BOOL bRet = FALSE; + const SwTxtNode* pTxtNd = GetNode()->GetTxtNode(); + if( pTxtNd && pBreakIt->GetBreakIter().is() ) + { + String sNodeText( lcl_MaskDeletedRedlines( pTxtNd ) ); + SwCrsrSaveState aSave( *this ); xub_StrLen nPtPos = GetPoint()->nContent.GetIndex(); switch ( eMoveType ) { - case END_SENT: + case START_SENT: /* when modifying: see also ExpandToSentenceBorders below! */ + nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence( + sNodeText, + nPtPos, pBreakIt->GetLocale( + pTxtNd->GetLang( nPtPos ) )); + break; + case END_SENT: /* when modifying: see also ExpandToSentenceBorders below! */ nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfSentence( sNodeText, nPtPos, pBreakIt->GetLocale( @@ -1451,12 +1470,6 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType ) ; break; } - case START_SENT: - nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence( - sNodeText, - nPtPos, pBreakIt->GetLocale( - pTxtNd->GetLang( nPtPos ) )); - break; case PREV_SENT: nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence( sNodeText, @@ -1484,6 +1497,51 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType ) return bRet; } + +BOOL SwCursor::ExpandToSentenceBorders() +{ + BOOL bRes = FALSE; + const SwTxtNode* pStartNd = Start()->nNode.GetNode().GetTxtNode(); + const SwTxtNode* pEndNd = End()->nNode.GetNode().GetTxtNode(); + if (pStartNd && pEndNd && pBreakIt->GetBreakIter().is()) + { + if (!HasMark()) + SetMark(); + + String sStartText( lcl_MaskDeletedRedlines( pStartNd ) ); + String sEndText( pStartNd == pEndNd? sStartText : lcl_MaskDeletedRedlines( pEndNd ) ); + + SwCrsrSaveState aSave( *this ); + xub_StrLen nStartPos = Start()->nContent.GetIndex(); + xub_StrLen nEndPos = End()->nContent.GetIndex(); + + nStartPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence( + sStartText, nStartPos, + pBreakIt->GetLocale( pStartNd->GetLang( nStartPos ) ) ); + nEndPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfSentence( + sEndText, nEndPos, + pBreakIt->GetLocale( pEndNd->GetLang( nEndPos ) ) ); + + // it is allowed to place the PaM just behind the last + // character in the text thus <= ...Len + bool bChanged = false; + if (nStartPos <= pStartNd->GetTxt().Len()) + { + GetMark()->nContent = nStartPos; + bChanged = true; + } + if (nEndPos <= pEndNd->GetTxt().Len()) + { + GetPoint()->nContent = nEndPos; + bChanged = true; + } + if (bChanged && !IsSelOvr()) + bRes = TRUE; + } + return bRes; +} + + BOOL SwTableCursor::LeftRight( BOOL bLeft, USHORT nCnt, USHORT /*nMode*/, BOOL /*bVisualAllowed*/, BOOL /*bSkipHidden*/, BOOL /*bInsertCrsr*/ ) { diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 6c9f6c2f3b..d136102a2f 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -136,6 +136,7 @@ class SwSpellIter : public SwLinguIter SpellContentPositions aLastPositions; bool bBackToStartOfSentence; + bool bMoveToEndOfSentence; void CreatePortion(uno::Reference< XSpellAlternatives > xAlt, @@ -147,7 +148,7 @@ class SwSpellIter : public SwLinguIter const SpellContentPositions& rDeletedRedlines); public: SwSpellIter() : - bBackToStartOfSentence(false) {} + bBackToStartOfSentence(false), bMoveToEndOfSentence(false) {} void Start( SwEditShell *pSh, SwDocPositions eStart, SwDocPositions eEnd ); @@ -157,6 +158,7 @@ public: void ToSentenceStart(); const ::svx::SpellPortions GetLastPortions(){ return aLastPortions;} SpellContentPositions GetLastPositions() {return aLastPositions;} + void ContinueAfterThisSentence() { bMoveToEndOfSentence = true; } }; /************************************************************************* @@ -693,6 +695,24 @@ void SwHyphIter::InsertSoftHyph( const xub_StrLen nHyphPos ) // --------------------- Methoden der SwEditShell ------------------------ +bool SwEditShell::HasLastSentenceGotGrammarChecked() const +{ + bool bTextWasGrammarChecked = false; + if (pSpellIter) + { + ::svx::SpellPortions aLastPortions( pSpellIter->GetLastPortions() ); + for (size_t i = 0; i < aLastPortions.size() && !bTextWasGrammarChecked; ++i) + { + // bIsGrammarError is also true if the text was only checked but no + // grammar error was found. (That is if a ProofreadingResult was obtained in + // SwDoc::Spell and in turn bIsGrammarError was set in SwSpellIter::CreatePortion) + if (aLastPortions[i].bIsGrammarError) + bTextWasGrammarChecked = true; + } + } + return bTextWasGrammarChecked; +} + /************************************************************************* * SwEditShell::HasConvIter *************************************************************************/ @@ -1283,7 +1303,20 @@ sal_uInt32 lcl_CountRedlines( /*-- 18.09.2003 15:08:20--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bIsGrammarCheck) + +void SwEditShell::MoveContinuationPosToEndOfCheckedSentence() +{ + // give hint that continuation position for spell/grammar checking is + // at the end of this sentence + if (pSpellIter) + { + pSpellIter->SetCurr( new SwPosition( *pSpellIter->GetCurrX() ) ); + pSpellIter->ContinueAfterThisSentence(); + } +} + + +void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck) { ASSERT( pSpellIter, "SpellIter missing" ); if(pSpellIter) @@ -1300,9 +1333,14 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, if(!rLastPortions.size()) return; - SwPaM *pCrsr = GetCrsr(); pDoc->StartUndo( UNDO_OVERWRITE, NULL ); StartAction(); + + SwPaM *pCrsr = GetCrsr(); + // save cursor position (which should be at the end of the current sentence) + // for later restoration + Push(); + sal_uInt32 nRedlinePortions = lcl_CountRedlines(rLastPortions); if((rLastPortions.size() - nRedlinePortions) == rNewPortions.size()) { @@ -1391,16 +1429,24 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, //set the cursor to the end of the inserted string *pCrsr->Start() = *pCrsr->End(); ++aCurrentNewPortion; - } } - //set the cursor to the end of the new sentence + + // restore cursor to the end of the sentence + // (will work also if the sentence length has changed, + // since cursors get updated automatically!) + Pop( FALSE ); + + // collapse cursor to the end of the modified sentence *pCrsr->Start() = *pCrsr->End(); - if( bIsGrammarCheck) + if (bRecheck) { //in grammar check the current sentence has to be checked again GoStartSentence(); } + // set continuation position for spell/grammar checking to the end of this sentence + pSpellIter->SetCurr( new SwPosition( *pCrsr->Start() ) ); + pDoc->EndUndo( UNDO_OVERWRITE, NULL ); EndAction(); } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx old mode 100644 new mode 100755 index 916ad970df..8b8204752d --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2433,13 +2433,15 @@ typedef ::std::deque SwNodeDeque; void MSWordExportBase::WriteText() { -#ifdef DEBUG - ::std::clog << "" << ::std::endl; - ::std::clog << dbg_out(pCurPam->GetDoc()->GetNodes()) << ::std::endl; - - SwNodeHashSet aNodeSet; - SwNodeDeque aNodeDeque; -#endif +// whoever has need of the missing function should go and implement it! +// This damned piece of code always breaks builds... +//#ifdef DEBUG +// ::std::clog << "" << ::std::endl; +// ::std::clog << dbg_out(pCurPam->GetDoc()->GetNodes()) << ::std::endl; +// +// SwNodeHashSet aNodeSet; +// SwNodeDeque aNodeDeque; +//#endif while( pCurPam->GetPoint()->nNode < pCurPam->GetMark()->nNode || ( pCurPam->GetPoint()->nNode == pCurPam->GetMark()->nNode && @@ -2447,6 +2449,9 @@ void MSWordExportBase::WriteText() { SwNode * pNd = pCurPam->GetNode(); +// whoever has need of the missing function should go and implement it! +// This damned piece of code always breaks builds... +#if 0 #ifdef DEBUG if (aNodeSet.find(pNd) == aNodeSet.end()) { @@ -2468,6 +2473,7 @@ void MSWordExportBase::WriteText() ::std::clog << "" << ::std::endl; } +#endif #endif if ( pNd->IsTxtNode() ) @@ -3722,7 +3728,9 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer void MSWordExportBase::OutputEndNode( const SwEndNode &rNode ) { #ifdef DEBUG - ::std::clog << "" << dbg_out(&rNode) << ::std::endl; +// whoever has need of the missing function should go and implement it! +// This damned piece of code always breaks builds... +// ::std::clog << "" << dbg_out(&rNode) << ::std::endl; #endif ww8::WW8TableNodeInfo::Pointer_t pNodeInfo = mpTableInfo->getTableNodeInfo( &rNode ); diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx index 4ae70d26db..b7fd189741 100644 --- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx @@ -32,13 +32,13 @@ #include #include #include -#ifndef _SVX_SVXIDS_HRC #include -#endif #include #include #include #include +#include +#include #include #include #include @@ -56,9 +56,7 @@ #include #include #include -#ifndef _DIALOG_HXX #include -#endif #include @@ -202,12 +200,19 @@ SfxChildWinInfo SwSpellDialogChildWindow::GetInfo (void) const -----------------------------------------------------------------------*/ -svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void) +svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck) { svx::SpellPortions aRet; SwWrtShell* pWrtShell = GetWrtShell_Impl(); if(pWrtShell) { + if (!bRecheck) + { + // first set continuation point for spell/grammar check to the + // end of the current sentence + pWrtShell->MoveContinuationPosToEndOfCheckedSentence(); + } + ShellModes eSelMode = pWrtShell->GetView().GetShellMode(); bool bDrawText = SHELL_MODE_DRAWTEXT == eSelMode; bool bNormalText = @@ -239,7 +244,10 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void) if(!pWrtShell->HasSelection()) pWrtShell->GoStartSentence(); else + { + pWrtShell->ExpandToSentenceBorders(); m_pSpellState->m_bStartedInSelection = true; + } //determine if the selection is outside of the body text bOtherText = !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY); m_pSpellState->m_SpellStartPosition = bOtherText ? SPELL_START_OTHER : SPELL_START_BODY; @@ -269,7 +277,24 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void) m_pSpellState->m_SpellStartPosition = SPELL_START_DRAWTEXT; m_pSpellState->m_pStartDrawing = pSdrView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj(); OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView(); - m_pSpellState->m_aStartDrawingSelection = pOLV->GetSelection(); + // start checking at the top of the drawing object + pOLV->SetSelection( ESelection() ); + m_pSpellState->m_aStartDrawingSelection = ESelection(); +/* +Note: spelling in a selection only, or starting in a mid of a drawing object requires +further changes elsewhere. (Especially if it should work in sc and sd as well.) +The code below would only be part of the solution. +(Keeping it a as a comment for the time being) + ESelection aCurSel( pOLV->GetSelection() ); + ESelection aSentenceSel( pOLV->GetEditView().GetEditEngine()->SelectSentence( aCurSel ) ); + if (!aCurSel.HasRange()) + { + aSentenceSel.nEndPara = aSentenceSel.nStartPara; + aSentenceSel.nEndPos = aSentenceSel.nStartPos; + } + pOLV->SetSelection( aSentenceSel ); + m_pSpellState->m_aStartDrawingSelection = aSentenceSel; +*/ } m_pSpellState->m_bInitialCall = false; @@ -316,61 +341,66 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void) //spell inside of the Writer text if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn)) { - //find out which text has been spelled body or other - bOtherText = !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY); - if(bOtherText && m_pSpellState->m_bStartedInOther && m_pSpellState->pOtherCursor) + // if there is a selection (within body or header/footer text) + // then spell/grammar checking should not move outside of it. + if (!m_pSpellState->m_bStartedInSelection) { - m_pSpellState->m_bStartedInOther = false; - pWrtShell->SetSelection(*m_pSpellState->pOtherCursor); - pWrtShell->SpellEnd(); - delete m_pSpellState->pOtherCursor; - m_pSpellState->pOtherCursor = 0; - pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, FALSE ); - pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn); - } - if(!aRet.size()) - { - //end spelling - pWrtShell->SpellEnd(); - if(bOtherText) + //find out which text has been spelled body or other + bOtherText = !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY); + if(bOtherText && m_pSpellState->m_bStartedInOther && m_pSpellState->pOtherCursor) { - m_pSpellState->m_bOtherSpelled = true; - //has the body been spelled? - if(!m_pSpellState->m_bBodySpelled) + m_pSpellState->m_bStartedInOther = false; + pWrtShell->SetSelection(*m_pSpellState->pOtherCursor); + pWrtShell->SpellEnd(); + delete m_pSpellState->pOtherCursor; + m_pSpellState->pOtherCursor = 0; + pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, FALSE ); + pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn); + } + if(!aRet.size()) + { + //end spelling + pWrtShell->SpellEnd(); + if(bOtherText) { - pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE ); - if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn)) + m_pSpellState->m_bOtherSpelled = true; + //has the body been spelled? + if(!m_pSpellState->m_bBodySpelled) { - m_pSpellState->m_bBodySpelled = true; - pWrtShell->SpellEnd(); + pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE ); + if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn)) + { + m_pSpellState->m_bBodySpelled = true; + pWrtShell->SpellEnd(); + } } } + else + { + m_pSpellState->m_bBodySpelled = true; + if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt()) + { + pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE ); + if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn)) + { + pWrtShell->SpellEnd(); + m_pSpellState->m_bOtherSpelled = true; + } + } + else + m_pSpellState->m_bOtherSpelled = true; + } } - else + + //search for a draw text object that contains error and spell it + if(!aRet.size() && + (m_pSpellState->m_bDrawingsSpelled || + !FindNextDrawTextError_Impl(*pWrtShell) || !SpellDrawText_Impl(*pWrtShell, aRet))) { - m_pSpellState->m_bBodySpelled = true; - if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt()) - { - pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE ); - if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn)) - { - pWrtShell->SpellEnd(); - m_pSpellState->m_bOtherSpelled = true; - } - } - else - m_pSpellState->m_bOtherSpelled = true; + lcl_LeaveDrawText(*pWrtShell); + m_pSpellState->m_bDrawingsSpelled = true; } } - - //search for a draw text object that contains error and spell it - if(!aRet.size() && - (m_pSpellState->m_bDrawingsSpelled || - !FindNextDrawTextError_Impl(*pWrtShell) || !SpellDrawText_Impl(*pWrtShell, aRet))) - { - lcl_LeaveDrawText(*pWrtShell); - m_pSpellState->m_bDrawingsSpelled = true; - } } } // now only the rest of the body text can be spelled - @@ -430,7 +460,7 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void) /*-- 09.09.2003 10:39:40--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rChanged) +void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rChanged, bool bRecheck) { SwWrtShell* pWrtShell = GetWrtShell_Impl(); DBG_ASSERT(!m_pSpellState->m_bInitialCall, "ApplyChangedSentence in initial call or after resume"); @@ -443,13 +473,19 @@ void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rC SHELL_MODE_LIST_TEXT == eSelMode || SHELL_MODE_TABLE_LIST_TEXT == eSelMode || SHELL_MODE_TEXT == eSelMode; + + // evaluate if the same sentence should be rechecked or not. + // Sentences that got grammar checked should always be rechecked in order + // to detect possible errors that get introduced with the changes + bRecheck |= pWrtShell->HasLastSentenceGotGrammarChecked(); + if(bNormalText) - pWrtShell->ApplyChangedSentence(rChanged, m_bIsGrammarCheckingOn); + pWrtShell->ApplyChangedSentence(rChanged, bRecheck); else if(bDrawText ) { SdrView* pDrView = pWrtShell->GetDrawView(); SdrOutliner *pOutliner = pDrView->GetTextEditOutliner(); - pOutliner->ApplyChangedSentence(pDrView->GetTextEditOutlinerView()->GetEditView(), rChanged, m_bIsGrammarCheckingOn); + pOutliner->ApplyChangedSentence(pDrView->GetTextEditOutlinerView()->GetEditView(), rChanged, bRecheck); } } } @@ -847,7 +883,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh) Point aTmp( 0,0 ); rSh.SelectObj( aTmp, 0, pTextObj ); SdrPageView* pPV = pDrView->GetSdrPageView(); - rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), FALSE ); + rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), FALSE, TRUE ); rView.AttrChangedNotify(&rSh); bNextDoc = true; } diff --git a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx index 5628aed15b..cc7462f6d8 100644 --- a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx +++ b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx @@ -48,8 +48,8 @@ class SwSpellDialogChildWindow void LockFocusNotification(bool bLock); protected: - virtual svx::SpellPortions GetNextWrongSentence (void); - virtual void ApplyChangedSentence(const svx::SpellPortions& rChanged); + virtual svx::SpellPortions GetNextWrongSentence(bool bRecheck); + virtual void ApplyChangedSentence(const svx::SpellPortions& rChanged, bool bRecheck); virtual void AddAutoCorrection(const String& rOld, const String& rNew, LanguageType eLanguage); virtual bool HasAutoCorrection(); virtual bool HasGrammarChecking(); diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 4712c76e24..436375c094 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -574,7 +574,7 @@ public: BOOL HasDrwObj(SdrObject *pSdrObj) const; BOOL HasOnlyObj(SdrObject *pSdrObj, UINT32 eObjInventor) const; BOOL BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=NULL, - Window* pWin=NULL, BOOL bIsNewObj=FALSE); + Window* pWin=NULL, bool bIsNewObj=false, bool bSetSelectionToStart=false ); void StateTabWin(SfxItemSet&); diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx index 8d67a14603..11022252e9 100644 --- a/sw/source/ui/uiview/viewdraw.cxx +++ b/sw/source/ui/uiview/viewdraw.cxx @@ -520,7 +520,8 @@ sal_Bool SwView::EnterDrawTextMode(const Point& aDocPos) /****************************************************************************** * Beschreibung: DrawTextEditMode einschalten ******************************************************************************/ -sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin, sal_Bool bIsNewObj) +sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin, + bool bIsNewObj, bool bSetSelectionToStart) { SwWrtShell *pSh = &GetWrtShell(); SdrView *pSdrView = pSh->GetDrawView(); @@ -606,7 +607,11 @@ sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin, Color aBackground(pSh->GetShapeBackgrd()); pView->SetBackgroundColor(aBackground); } + + // editing should start at the end of text, spell checking at the beginning ... ESelection aNewSelection(EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND, EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND); + if (bSetSelectionToStart) + aNewSelection = ESelection(); pView->SetSelection(aNewSelection); } -- cgit v1.2.3 From 347eeb7e4cbc9b2885eec775dddbb420e0fc0fcf Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 23 Apr 2010 11:43:57 +0200 Subject: cws tl80: #i110180# printing options UI fixed --- sw/source/ui/config/optpage.cxx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) mode change 100644 => 100755 sw/source/ui/config/optpage.cxx (limited to 'sw/source') diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx old mode 100644 new mode 100755 index 40c17f9866..8d3943834c --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -542,10 +542,15 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& ) aFaxLB.SelectEntry( pAddPrinterAttr->sFaxName ); } if (aProspectCB.IsChecked()) + { aProspectCB_RTL.Enable(TRUE); + aNoRB.Enable( FALSE ); + aOnlyRB.Enable( FALSE ); + aEndRB.Enable( FALSE ); + aEndPageRB.Enable( FALSE ); + } else - aProspectCB_RTL.Disable(); - + aProspectCB_RTL.Enable( FALSE ); } //----------------------------------------------------------------------- @@ -560,13 +565,14 @@ void SwAddPrinterTabPage::Init() IMPL_LINK_INLINE_START( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) { bAttrModified = TRUE; - if (aProspectCB.IsChecked()) - aProspectCB_RTL.Enable(TRUE); - else - { + bool bIsProspect = aProspectCB.IsChecked(); + if (!bIsProspect) aProspectCB_RTL.Check( FALSE ); - aProspectCB_RTL.Disable(); - } + aProspectCB_RTL.Enable( bIsProspect ); + aNoRB.Enable( !bIsProspect ); + aOnlyRB.Enable( !bIsProspect ); + aEndRB.Enable( !bIsProspect ); + aEndPageRB.Enable( !bIsProspect ); return 0; } IMPL_LINK_INLINE_END( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) -- cgit v1.2.3 From ad2d63e730551c76a14f12f577a1d8a85542c89d Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 24 Apr 2010 00:09:05 +0200 Subject: CWS gnumake2: avoid export of template symbols --- starmath/source/smdetect.cxx | 16 ++++++---------- sw/source/ui/uno/swdetect.cxx | 13 ++++++------- 2 files changed, 12 insertions(+), 17 deletions(-) (limited to 'sw/source') diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx index bc01b2d7c9..1729f65bfb 100644 --- a/starmath/source/smdetect.cxx +++ b/starmath/source/smdetect.cxx @@ -30,7 +30,7 @@ #include "smdetect.hxx" -#include +//#include #include #include #include @@ -274,20 +274,16 @@ SmFilterDetect::~SmFilterDetect() if ( !bRepairPackage ) { // ask the user whether he wants to try to repair - RequestPackageReparation* pRequest = new RequestPackageReparation( aDocumentTitle ); - uno::Reference< task::XInteractionRequest > xRequest ( pRequest ); - - xInteraction->handle( xRequest ); - - bRepairAllowed = pRequest->isApproved(); + RequestPackageReparation aRequest( aDocumentTitle ); + xInteraction->handle( aRequest.GetRequest() ); + bRepairAllowed = aRequest.isApproved(); } if ( !bRepairAllowed ) { // repair either not allowed or not successful - NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle ); - uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest ); - xInteraction->handle( xRequest ); + NotifyBrokenPackage aNotifyRequest( aDocumentTitle ); + xInteraction->handle( aNotifyRequest.GetRequest() ); } } diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx index 95153b0019..e9706935bf 100644 --- a/sw/source/ui/uno/swdetect.cxx +++ b/sw/source/ui/uno/swdetect.cxx @@ -278,18 +278,17 @@ SwFilterDetect::~SwFilterDetect() if ( !bRepairPackage ) { // ask the user whether he wants to try to repair - RequestPackageReparation* pRequest = new RequestPackageReparation( aDocumentTitle ); - uno::Reference< task::XInteractionRequest > xRequest ( pRequest ); - xInteraction->handle( xRequest ); - bRepairAllowed = pRequest->isApproved(); + RequestPackageReparation aRequest( aDocumentTitle ); + xInteraction->handle( aRequest.GetRequest() ); + bRepairAllowed = aRequest.isApproved(); } if ( !bRepairAllowed ) { // repair either not allowed or not successful - NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle ); - uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest ); - xInteraction->handle( xRequest ); + // repair either not allowed or not successful + NotifyBrokenPackage aNotifyRequest( aDocumentTitle ); + xInteraction->handle( aNotifyRequest.GetRequest() ); rtl::Reference< ::comphelper::OIHWrapNoFilterDialog > xHandler = new ::comphelper::OIHWrapNoFilterDialog( xInteraction ); if ( nIndexOfInteractionHandler != -1 ) -- cgit v1.2.3 From b45c9f9acec5dd6b3015cf142fbd02d22d90e565 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 26 Apr 2010 18:22:31 +0200 Subject: sw33bf03: #i108345#: SwpHintsArray::Check(): check for overlapping AUTOFMT --- sw/source/core/txtnode/ndhints.cxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx index 79c66ba8b7..d51801e6c3 100644 --- a/sw/source/core/txtnode/ndhints.cxx +++ b/sw/source/core/txtnode/ndhints.cxx @@ -372,7 +372,7 @@ bool SwpHintsArray::Check() const CHECK_ERR( !isCHRATR(nWhich), "HintsCheck: Character attribute in end array" ); - // 8) portion check + // 8) style portion check #if OSL_DEBUG_LEVEL > 1 const SwTxtAttr* pHtThis = m_HintStarts[i]; const SwTxtAttr* pHtLast = i > 0 ? m_HintStarts[i-1] : 0; @@ -380,11 +380,19 @@ bool SwpHintsArray::Check() const ( RES_TXTATR_CHARFMT != pHtLast->Which() && RES_TXTATR_AUTOFMT != pHtLast->Which() ) || ( RES_TXTATR_CHARFMT != pHtThis->Which() && RES_TXTATR_AUTOFMT != pHtThis->Which() ) || ( *pHtThis->GetStart() >= *pHtLast->GetEnd() ) || - ( *pHtThis->GetStart() == *pHtLast->GetStart() && *pHtThis->GetEnd() == *pHtLast->GetEnd() ) || - ( *pHtThis->GetStart() == *pHtThis->GetEnd() ), + ( ( ( (*pHtThis->GetStart() == *pHtLast->GetStart()) + && (*pHtThis->GetEnd() == *pHtLast->GetEnd()) + ) // same range + || (*pHtThis->GetStart() == *pHtThis->GetEnd()) + ) + && ( (pHtThis->Which() != RES_TXTATR_AUTOFMT) + || (pHtLast->Which() != RES_TXTATR_AUTOFMT) + ) // never two AUTOFMT on same range + ), "HintsCheck: Portion inconsistency. " "This can be temporarily ok during undo operations" ); + // 9) nesting portion check if (pHtThis->IsNesting()) { for ( USHORT j = 0; j < Count(); ++j ) @@ -402,7 +410,7 @@ bool SwpHintsArray::Check() const } } - // 9) dummy char check (unfortunately cannot check SwTxtNode::m_Text) + // 10) dummy char check (unfortunately cannot check SwTxtNode::m_Text) if (pHtThis->HasDummyChar()) { for ( USHORT j = 0; j < i; ++j ) -- cgit v1.2.3 From b09150e7ae5ce631f74dfb910e687a2e2773d97c Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 26 Apr 2010 18:25:01 +0200 Subject: sw33bf03: #i108345# SwTxtNode::FmtToTxtAttr(): apply patch by dtardon: create automatic char. styles correctly --- sw/inc/ndtxt.hxx | 2 + sw/source/core/txtnode/thints.cxx | 301 +++++++++++++++++++++++++++++--------- 2 files changed, 235 insertions(+), 68 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 635052103e..915551c172 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -202,6 +202,8 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable inline void TryDeleteSwpHints(); + SW_DLLPRIVATE void impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet); + public: bool IsWordCountDirty() const; bool IsWrongDirty() const; diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 230787f675..be2a08c8cb 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -2063,25 +2063,202 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd, return rSet.Count() ? TRUE : FALSE; } -int lcl_IsNewAttrInSet( const SwpHints& rHints, const SfxPoolItem& rItem, - const xub_StrLen nEnd ) + +namespace +{ + +typedef std::pair AttrSpan_t; +typedef std::multimap AttrSpanMap_t; + + +struct IsAutoStyle { - int bIns = TRUE; - for( USHORT i = 0; i < rHints.Count(); ++i ) + bool + operator()(const AttrSpanMap_t::value_type& i_rAttrSpan) + const { - const SwTxtAttr *pOther = rHints[ i ]; - if( *pOther->GetStart() ) - break; + return i_rAttrSpan.second && i_rAttrSpan.second->Which() == RES_TXTATR_AUTOFMT; + } +}; + + +/** Removes from io_rAttrSet all items that are set by style on the + given span. + */ +struct RemovePresentAttrs +{ + RemovePresentAttrs(SfxItemSet& io_rAttrSet) + : m_rAttrSet(io_rAttrSet) + { + } + + void + operator()(const AttrSpanMap_t::value_type& i_rAttrSpan) + const + { + if (!i_rAttrSpan.second) + { + return; + } - if( pOther->GetEnd() && - *pOther->GetEnd() == nEnd && - ( pOther->IsCharFmtAttr() || pOther->Which() == rItem.Which() ) ) + const SwTxtAttr* const pAutoStyle(i_rAttrSpan.second); + SfxItemIter aIter(m_rAttrSet); + const SfxPoolItem* pItem(aIter.GetCurItem()); + while (true) + { + const USHORT nWhich(pItem->Which()); + if (CharFmt::IsItemIncluded(nWhich, pAutoStyle)) + { + m_rAttrSet.ClearItem(nWhich); + } + + if (aIter.IsAtEnd()) + { + break; + } + pItem = aIter.NextItem(); + } + } + +private: + SfxItemSet& m_rAttrSet; +}; + + +/** Collects all style-covered spans from i_rHints to o_rSpanMap. In + addition inserts dummy spans with pointer to format equal to 0 for + all gaps (i.e. spans not covered by any style). This simplifies + creation of autostyles for all needed spans, but it means all code + that tries to access the pointer has to check if it's non-null! + */ +void +lcl_CollectHintSpans(const SwpHints& i_rHints, const USHORT nLength, + AttrSpanMap_t& o_rSpanMap) +{ + USHORT nLastEnd(0); + + for (USHORT i(0); i != i_rHints.Count(); ++i) + { + const SwTxtAttr* const pHint(i_rHints[i]); + const USHORT nWhich(pHint->Which()); + if (nWhich == RES_TXTATR_CHARFMT || nWhich == RES_TXTATR_AUTOFMT) + { + const AttrSpan_t aSpan(*pHint->GetStart(), *pHint->GetEnd()); + o_rSpanMap.insert(AttrSpanMap_t::value_type(aSpan, pHint)); + + if (aSpan.first != nLastEnd) + { + // insert dummy span covering the gap + o_rSpanMap.insert(AttrSpanMap_t::value_type( + AttrSpan_t(nLastEnd, aSpan.first), 0)); + } + + nLastEnd = aSpan.second; + } + } + + // no hints at the end (special case: no hints at all in i_rHints) + if (nLastEnd != nLength && nLength != 0) + { + o_rSpanMap.insert( + AttrSpanMap_t::value_type(AttrSpan_t(nLastEnd, nLength), 0)); + } +} + + +void +lcl_FillWhichIds(const SfxItemSet& i_rAttrSet, std::vector& o_rClearIds) +{ + o_rClearIds.reserve(i_rAttrSet.Count()); + SfxItemIter aIter(i_rAttrSet); + const SfxPoolItem* pItem(aIter.GetCurItem()); + while (true) + { + o_rClearIds.push_back(pItem->Which()); + + if (aIter.IsAtEnd()) { - bIns = FALSE; break; } + pItem = aIter.NextItem(); + } +} + +struct SfxItemSetClearer +{ + SfxItemSet & m_rItemSet; + SfxItemSetClearer(SfxItemSet & rItemSet) : m_rItemSet(rItemSet) { } + void operator()(USHORT const nWhich) { m_rItemSet.ClearItem(nWhich); } +}; + +} + + +/** Does the hard work of SwTxtNode::FmtToTxtAttr: the real conversion + of items to automatic styles. + */ +void +SwTxtNode::impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet) +{ + typedef AttrSpanMap_t::iterator AttrSpanMap_iterator_t; + AttrSpanMap_t aAttrSpanMap; + + if (i_rAttrSet.Count() == 0) + { + return; + } + + // 1. Identify all spans in hints' array + + lcl_CollectHintSpans(*m_pSwpHints, m_Text.Len(), aAttrSpanMap); + + // 2. Go through all spans and insert new attrs + + AttrSpanMap_iterator_t aCurRange(aAttrSpanMap.begin()); + const AttrSpanMap_iterator_t aEnd(aAttrSpanMap.end()); + while (aCurRange != aEnd) + { + typedef std::pair + AttrSpanMapRange_t; + AttrSpanMapRange_t aRange(aAttrSpanMap.equal_range(aCurRange->first)); + + // 2a. Collect attributes to insert + + SfxItemSet aCurSet(i_rAttrSet); + std::for_each(aRange.first, aRange.second, RemovePresentAttrs(aCurSet)); + + // 2b. Insert automatic style containing the collected attributes + + if (aCurSet.Count() != 0) + { + AttrSpanMap_iterator_t aAutoStyleIt( + std::find_if(aRange.first, aRange.second, IsAutoStyle())); + if (aAutoStyleIt != aRange.second) + { + // there already is an automatic style on that span: + // create new one and remove the original one + SwTxtAttr* const pAutoStyle(const_cast(aAutoStyleIt->second)); + const boost::shared_ptr pOldStyle( + static_cast( + pAutoStyle->GetAttr()).GetStyleHandle()); + aCurSet.Put(*pOldStyle); + + // remove the old hint + m_pSwpHints->Delete(pAutoStyle); + DestroyAttr(pAutoStyle); + } + m_pSwpHints->Insert( + MakeTxtAttr(*GetDoc(), aCurSet, + aCurRange->first.first, aCurRange->first.second)); + } + + aCurRange = aRange.second; } - return bIns; + + // 3. Clear items from the node + std::vector aClearedIds; + lcl_FillWhichIds(i_rAttrSet, aClearedIds); + ClearItemsFromAttrSet(aClearedIds); } void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd ) @@ -2094,91 +2271,79 @@ void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd ) if( pNd == this ) { - if( aThisSet.Count() ) - { - SfxItemIter aIter( aThisSet ); - const SfxPoolItem* pItem = aIter.GetCurItem(); - std::vector aClearWhichIds; - - while ( true ) - { - if (lcl_IsNewAttrInSet( *m_pSwpHints, *pItem, GetTxt().Len() )) - { - m_pSwpHints->SwpHintsArray::Insert( - MakeTxtAttr( *GetDoc(), - const_cast(*pItem), - 0, GetTxt().Len() ) ); - aClearWhichIds.push_back( pItem->Which() ); - } - - if( aIter.IsAtEnd() ) - break; - pItem = aIter.NextItem(); - } - - ClearItemsFromAttrSet( aClearWhichIds ); - } + impl_FmtToTxtAttr(aThisSet); } else { + // There are five possible combinations of items from this and + // pNd (pNd is the 'main' node): + // + // case pNd this action + // ---------------------------------------------------- + // 1 - - do nothing + // 2 - a convert item to attr of this + // 3 a - convert item to attr of pNd + // 4 a a clear item in this + // 5 a b convert item to attr of this + SfxItemSet aNdSet( pNd->GetDoc()->GetAttrPool(), aCharFmtSetRange ); if( pNd->HasSwAttrSet() && pNd->GetpSwAttrSet()->Count() ) aNdSet.Put( *pNd->GetpSwAttrSet() ); pNd->GetOrCreateSwpHints(); + std::vector aProcessedIds; + if( aThisSet.Count() ) { SfxItemIter aIter( aThisSet ); - const SfxPoolItem* pItem = aIter.GetCurItem(), *pNdItem; + const SfxPoolItem* pItem = aIter.GetCurItem(), *pNdItem = 0; + SfxItemSet aConvertSet( GetDoc()->GetAttrPool(), aCharFmtSetRange ); std::vector aClearWhichIds; - while( TRUE ) + while( true ) { - if( ( SFX_ITEM_SET != aNdSet.GetItemState( pItem->Which(), FALSE, - &pNdItem ) || *pItem != *pNdItem ) && - lcl_IsNewAttrInSet( *m_pSwpHints, *pItem, GetTxt().Len() ) ) + if( SFX_ITEM_SET == aNdSet.GetItemState( pItem->Which(), FALSE, &pNdItem ) ) { - m_pSwpHints->SwpHintsArray::Insert( MakeTxtAttr( *GetDoc(), - const_cast(*pItem), - 0, GetTxt().Len() ) ); - aClearWhichIds.push_back( pItem->Which() ); + if (*pItem == *pNdItem) // 4 + { + aClearWhichIds.push_back( pItem->Which() ); + } + else // 5 + { + aConvertSet.Put(*pItem); + } + aProcessedIds.push_back(pItem->Which()); + } + else // 2 + { + aConvertSet.Put(*pItem); } - aNdSet.ClearItem( pItem->Which() ); if( aIter.IsAtEnd() ) break; pItem = aIter.NextItem(); } + + // 4/ clear items of this that are set with the same value on pNd ClearItemsFromAttrSet( aClearWhichIds ); + + // 2, 5/ convert all other items to attrs + impl_FmtToTxtAttr(aConvertSet); } - if( aNdSet.Count() ) { - SfxItemIter aIter( aNdSet ); - const SfxPoolItem* pItem = aIter.GetCurItem(); - std::vector aClearWhichIds; + std::for_each(aProcessedIds.begin(), aProcessedIds.end(), + SfxItemSetClearer(aNdSet)); - while ( true ) - { - if ( lcl_IsNewAttrInSet( *pNd->m_pSwpHints, *pItem, - pNd->GetTxt().Len() ) ) - { - pNd->m_pSwpHints->SwpHintsArray::Insert( - MakeTxtAttr( *pNd->GetDoc(), - const_cast(*pItem), - 0, pNd->GetTxt().Len() ) ); - } - aClearWhichIds.push_back( pItem->Which() ); + // 3/ convert items to attrs + pNd->impl_FmtToTxtAttr(aNdSet); - if( aIter.IsAtEnd() ) - break; - pItem = aIter.NextItem(); + if( aNdSet.Count() ) + { + SwFmtChg aTmp1( pNd->GetFmtColl() ); + pNd->SwModify::Modify( &aTmp1, &aTmp1 ); } - - pNd->ClearItemsFromAttrSet( aClearWhichIds ); - SwFmtChg aTmp1( pNd->GetFmtColl() ); - pNd->SwModify::Modify( &aTmp1, &aTmp1 ); } } -- cgit v1.2.3 From 73cb2d04213e95bfa3e5a1d6ca2e20b48d1e1e97 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 28 Apr 2010 09:43:21 +0200 Subject: cws tl80: #162104# remove Writer easter egg --- sw/inc/dochdl.hrc | 4 +--- sw/source/ui/dochdl/dochdl.src | 9 --------- sw/source/ui/dochdl/gloshdl.cxx | 45 +++-------------------------------------- 3 files changed, 4 insertions(+), 54 deletions(-) mode change 100644 => 100755 sw/inc/dochdl.hrc mode change 100644 => 100755 sw/source/ui/dochdl/dochdl.src mode change 100644 => 100755 sw/source/ui/dochdl/gloshdl.cxx (limited to 'sw/source') diff --git a/sw/inc/dochdl.hrc b/sw/inc/dochdl.hrc old mode 100644 new mode 100755 index b423351723..8e5980e244 --- a/sw/inc/dochdl.hrc +++ b/sw/inc/dochdl.hrc @@ -43,10 +43,8 @@ #define STR_PRIVATEOLE (RC_DOCHDL_BEGIN + 10) #define STR_DDEFORMAT (RC_DOCHDL_BEGIN + 11) -#define BMP_SW_TEAM_MUGSHOT (RC_DOCHDL_BEGIN + 12) -#define STR_SW_TEAM_NAMES (RC_DOCHDL_BEGIN + 13) -#define DOCHDL_ACT_END STR_SW_TEAM_NAMES +#define DOCHDL_ACT_END STR_DDEFORMAT #if DOCHDL_ACT_END > RC_DOCHDL_END #error Resource-Id Ueberlauf in #file, #line diff --git a/sw/source/ui/dochdl/dochdl.src b/sw/source/ui/dochdl/dochdl.src old mode 100644 new mode 100755 index fb4db99410..2afd19c92b --- a/sw/source/ui/dochdl/dochdl.src +++ b/sw/source/ui/dochdl/dochdl.src @@ -73,13 +73,4 @@ String STR_DDEFORMAT { Text [ en-US ] = "DDE link" ; }; -Bitmap BMP_SW_TEAM_MUGSHOT -{ - File ="writerteam.bmp"; -}; - -String STR_SW_TEAM_NAMES -{ - Text = "Back row: Aidan Butler, Hans-Peter Burow, Caolan McNamara, Michael Brauer, Martin Maher, Gunnar Timm\nFront row: Thomas Lange, Oliver-Rainer Duesterhoeft, Henning Brinkmann, Andreas Martens, Oliver Specht, Frank Meies, Daniel Vogelheim"; -}; diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx old mode 100644 new mode 100755 index f51cfde701..c19fb0bd9d --- a/sw/source/ui/dochdl/gloshdl.cxx +++ b/sw/source/ui/dochdl/gloshdl.cxx @@ -607,48 +607,9 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName, aShortName.Erase(nMaxLen); aShortName.AppendAscii(" ..."); } - if ( aShortName.EqualsAscii ( "StarWriterTeam", 0, 14 ) ) - { - String sGraphicName ( RTL_CONSTASCII_USTRINGPARAM ( "StarWriter team photo" ) ); - String sTeamCredits ( RTL_CONSTASCII_USTRINGPARAM ( "StarWriter team credits" ) ); - pWrtShell->StartUndo ( UNDO_INSGLOSSARY ); - pWrtShell->StartAllAction(); - if(pWrtShell->HasSelection()) - pWrtShell->DelLeft(); - Bitmap aBitmap ( SW_RES ( BMP_SW_TEAM_MUGSHOT ) ); - pWrtShell->Insert ( aEmptyStr, aEmptyStr, aBitmap); - pWrtShell->SetFlyName ( sGraphicName ); - SwTxtFmtColl* pColl = pWrtShell->GetTxtCollFromPool ( RES_POOLCOLL_LABEL_ABB ); - const IDocumentFieldsAccess* pIDFA = pWrtShell->getIDocumentFieldsAccess(); - SwFieldType* pType = pIDFA->GetFldType( RES_SETEXPFLD, pColl->GetName(), false ); - sal_uInt16 nId = pIDFA->GetFldTypes()->GetPos( pType ); - pWrtShell->InsertLabel( LTYPE_OBJECT, aEmptyStr, aEmptyStr, aEmptyStr, FALSE, nId, aEmptyStr ); - pWrtShell->SwFEShell::SetFlyName( sTeamCredits ); - pWrtShell->SwFEShell::SelectObj ( Point ( ULONG_MAX, ULONG_MAX ) ); - pWrtShell->EnterStdMode(); - pWrtShell->EndPara ( TRUE ); - String aTmp ( SW_RES ( STR_SW_TEAM_NAMES ) ); - pWrtShell->Insert ( aTmp ); - SvxAdjustItem aAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST ); - pWrtShell->SetAttr( aAdjustItem ); - pWrtShell->SttPara (); - pWrtShell->SplitNode(); - pWrtShell->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); - SvxWeightItem aWeightItem ( WEIGHT_BOLD, RES_CHRATR_WEIGHT ); - pWrtShell->Insert ( String ( RTL_CONSTASCII_USTRINGPARAM ( "The StarWriter team!" ) ) ); - pWrtShell->SttPara ( TRUE ); - pWrtShell->SetAttr( aWeightItem); - pWrtShell->GotoFly ( sTeamCredits); - pWrtShell->EndAllAction(); - pWrtShell->EndUndo( UNDO_INSGLOSSARY ); - } - else - { - String aTmp( SW_RES(STR_NOGLOS)); - aTmp.SearchAndReplaceAscii("%1", aShortName); - InfoBox( pWrtShell->GetView().GetWindow(), aTmp ).Execute(); - - } + String aTmp( SW_RES(STR_NOGLOS)); + aTmp.SearchAndReplaceAscii("%1", aShortName); + InfoBox( pWrtShell->GetView().GetWindow(), aTmp ).Execute(); } return FALSE; -- cgit v1.2.3 From 9166f45cf988db249f97e00b4fad109ca1111f62 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 28 Apr 2010 10:55:22 +0200 Subject: sw33bf03: #i110454#: fix warning by moving member to Impl struct --- sw/inc/shellio.hxx | 8 +------- sw/source/filter/writer/writer.cxx | 17 +++++++++-------- 2 files changed, 10 insertions(+), 15 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index 0e0200fb1c..48a6e83c9f 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -436,8 +436,6 @@ class SW_DLLPUBLIC Writer : public SvRefBase SwAsciiOptions aAscOpts; String sBaseURL; - SvStream * m_pStream; - void _AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont ); void _AddFontItems( SfxItemPool& rPool, USHORT nWhichId ); @@ -535,12 +533,8 @@ public: inline SvStream& OutLong( long nVal ) { return OutLong( Strm(), nVal ); } inline SvStream& OutULong( ULONG nVal ) { return OutULong( Strm(), nVal ); } - void SetStream(SvStream *const pStream) { m_pStream = pStream; } -#ifndef DBG_UTIL - SvStream& Strm() { return *m_pStream; } -#else + void SetStream(SvStream *const pStream); SvStream& Strm(); -#endif void SetOrganizerMode( BOOL bSet ) { bOrganizerMode = bSet; } }; diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index fbf728d4f4..db68f057e9 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -58,6 +58,8 @@ DECLARE_TABLE( SwBookmarkNodeTable, SvPtrarr* ) struct Writer_Impl { + SvStream * m_pStream; + SvStringsSortDtor *pSrcArr, *pDestArr; SvPtrarr* pFontRemoveLst, *pBkmkArr; SwBookmarkNodeTable* pBkmkNodePos; @@ -70,7 +72,8 @@ struct Writer_Impl }; Writer_Impl::Writer_Impl( const SwDoc& /*rDoc*/ ) - : pSrcArr( 0 ), pDestArr( 0 ), pFontRemoveLst( 0 ), pBkmkNodePos( 0 ) + : m_pStream(0) + , pSrcArr( 0 ), pDestArr( 0 ), pFontRemoveLst( 0 ), pBkmkNodePos( 0 ) { } @@ -142,7 +145,6 @@ void Writer_Impl::InsertBkmk(const ::sw::mark::IMark& rBkmk) Writer::Writer() : pImpl(0) - , m_pStream(0) , pOrigPam(0), pOrigFileName(0), pDoc(0), pCurPam(0) { bWriteAll = bShowProgress = bUCS2_WithStartChar = true; @@ -179,7 +181,6 @@ void Writer::ResetWriter() pCurPam = 0; pOrigFileName = 0; pDoc = 0; - m_pStream = 0; bShowProgress = bUCS2_WithStartChar = TRUE; bASCII_NoLastLineEnd = bASCII_ParaAsBlanc = bASCII_ParaAsCR = @@ -248,13 +249,13 @@ SwPaM* Writer::NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx, ///////////////////////////////////////////////////////////////////////////// // Stream-spezifisches -#ifdef DBG_UTIL SvStream& Writer::Strm() { - ASSERT( m_pStream, "Oh-oh. Writer with no Stream!" ); - return *m_pStream; + ASSERT( pImpl->m_pStream, "Oh-oh. Writer with no Stream!" ); + return *pImpl->m_pStream; } -#endif + +void Writer::SetStream(SvStream *const pStream) { pImpl->m_pStream = pStream; } SvStream& Writer::OutHex( SvStream& rStrm, ULONG nHex, BYTE nLen ) @@ -316,10 +317,10 @@ ULONG Writer::Write( SwPaM& rPaM, SvStream& rStrm, const String* pFName ) return nResult; } - m_pStream = &rStrm; pDoc = rPaM.GetDoc(); pOrigFileName = pFName; pImpl = new Writer_Impl( *pDoc ); + pImpl->m_pStream = &rStrm; // PaM kopieren, damit er veraendert werden kann pCurPam = new SwPaM( *rPaM.End(), *rPaM.Start() ); -- cgit v1.2.3 From 7ea7da1156e15ecb5fb1a4616777f7ac25ccbecd Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 28 Apr 2010 17:13:01 +0200 Subject: sw33bf03: #i110454#: try to fix harebrained lifecycle of Writer_Impl --- sw/inc/shellio.hxx | 13 +++++--- sw/source/filter/writer/writer.cxx | 64 ++++++++++++++++++-------------------- 2 files changed, 38 insertions(+), 39 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index 48a6e83c9f..68461ef922 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -24,8 +24,10 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _SHELLIO_HXX -#define _SHELLIO_HXX +#ifndef SW_SHELLIO_HXX +#define SW_SHELLIO_HXX + +#include #include #include @@ -439,8 +441,9 @@ class SW_DLLPUBLIC Writer : public SvRefBase void _AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont ); void _AddFontItems( SfxItemPool& rPool, USHORT nWhichId ); + ::std::auto_ptr m_pImpl; + protected: - Writer_Impl* pImpl; SwPaM* pOrigPam; // der letze zu bearbeitende Pam const String* pOrigFileName; @@ -654,7 +657,7 @@ namespace SwReaderWriter { /// Return reader based on ReaderWriterEnum Reader* GetReader( ReaderWriterEnum eReader ); - + /// Return reader based on the name Reader* GetReader( const String& rFltName ); diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index db68f057e9..8e7f67997c 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -64,14 +64,14 @@ struct Writer_Impl SvPtrarr* pFontRemoveLst, *pBkmkArr; SwBookmarkNodeTable* pBkmkNodePos; - Writer_Impl( const SwDoc& rDoc ); + Writer_Impl(); ~Writer_Impl(); void RemoveFontList( SwDoc& rDoc ); void InsertBkmk( const ::sw::mark::IMark& rBkmk ); }; -Writer_Impl::Writer_Impl( const SwDoc& /*rDoc*/ ) +Writer_Impl::Writer_Impl() : m_pStream(0) , pSrcArr( 0 ), pDestArr( 0 ), pFontRemoveLst( 0 ), pBkmkNodePos( 0 ) { @@ -144,7 +144,7 @@ void Writer_Impl::InsertBkmk(const ::sw::mark::IMark& rBkmk) */ Writer::Writer() - : pImpl(0) + : m_pImpl(new Writer_Impl) , pOrigPam(0), pOrigFileName(0), pDoc(0), pCurPam(0) { bWriteAll = bShowProgress = bUCS2_WithStartChar = true; @@ -168,9 +168,11 @@ const IDocumentStylePoolAccess* Writer::getIDocumentStylePoolAccess() const { re void Writer::ResetWriter() { - if( pImpl && pImpl->pFontRemoveLst ) - pImpl->RemoveFontList( *pDoc ); - delete pImpl, pImpl = 0; + if (m_pImpl->pFontRemoveLst) + { + m_pImpl->RemoveFontList( *pDoc ); + } + m_pImpl.reset(new Writer_Impl); if( pCurPam ) { @@ -251,11 +253,12 @@ SwPaM* Writer::NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx, // Stream-spezifisches SvStream& Writer::Strm() { - ASSERT( pImpl->m_pStream, "Oh-oh. Writer with no Stream!" ); - return *pImpl->m_pStream; + ASSERT( m_pImpl->m_pStream, "Oh-oh. Writer with no Stream!" ); + return *m_pImpl->m_pStream; } -void Writer::SetStream(SvStream *const pStream) { pImpl->m_pStream = pStream; } +void Writer::SetStream(SvStream *const pStream) +{ m_pImpl->m_pStream = pStream; } SvStream& Writer::OutHex( SvStream& rStrm, ULONG nHex, BYTE nLen ) @@ -319,8 +322,7 @@ ULONG Writer::Write( SwPaM& rPaM, SvStream& rStrm, const String* pFName ) pDoc = rPaM.GetDoc(); pOrigFileName = pFName; - pImpl = new Writer_Impl( *pDoc ); - pImpl->m_pStream = &rStrm; + m_pImpl->m_pStream = &rStrm; // PaM kopieren, damit er veraendert werden kann pCurPam = new SwPaM( *rPaM.End(), *rPaM.Start() ); @@ -371,20 +373,20 @@ BOOL Writer::CopyLocalFileToINet( String& rFileNm ) INET_PROT_NEWS >= aTargetUrl.GetProtocol() ) ) return bRet; - if( pImpl->pSrcArr ) + if (m_pImpl->pSrcArr) { // wurde die Datei schon verschoben USHORT nPos; - if( pImpl->pSrcArr->Seek_Entry( &rFileNm, &nPos )) + if (m_pImpl->pSrcArr->Seek_Entry( &rFileNm, &nPos )) { - rFileNm = *(*pImpl->pDestArr)[ nPos ]; + rFileNm = *(*m_pImpl->pDestArr)[ nPos ]; return TRUE; } } else { - pImpl->pSrcArr = new SvStringsSortDtor( 4, 4 ); - pImpl->pDestArr = new SvStringsSortDtor( 4, 4 ); + m_pImpl->pSrcArr = new SvStringsSortDtor( 4, 4 ); + m_pImpl->pDestArr = new SvStringsSortDtor( 4, 4 ); } String *pSrc = new String( rFileNm ); @@ -403,8 +405,8 @@ BOOL Writer::CopyLocalFileToINet( String& rFileNm ) if( bRet ) { - pImpl->pSrcArr->Insert( pSrc ); - pImpl->pDestArr->Insert( pDest ); + m_pImpl->pSrcArr->Insert( pSrc ); + m_pImpl->pDestArr->Insert( pDest ); rFileNm = *pDest; } else @@ -418,9 +420,6 @@ BOOL Writer::CopyLocalFileToINet( String& rFileNm ) void Writer::PutNumFmtFontsInAttrPool() { - if( !pImpl ) - pImpl = new Writer_Impl( *pDoc ); - // dann gibt es noch in den NumRules ein paar Fonts // Diese in den Pool putten. Haben sie danach einen RefCount > 1 // kann es wieder entfernt werden - ist schon im Pool @@ -460,9 +459,6 @@ void Writer::PutNumFmtFontsInAttrPool() void Writer::PutEditEngFontsInAttrPool( BOOL bIncl_CJK_CTL ) { - if( !pImpl ) - pImpl = new Writer_Impl( *pDoc ); - SfxItemPool& rPool = pDoc->GetAttrPool(); if( rPool.GetSecondaryPool() ) { @@ -477,9 +473,6 @@ void Writer::PutEditEngFontsInAttrPool( BOOL bIncl_CJK_CTL ) void Writer::PutCJKandCTLFontsInAttrPool() { - if( !pImpl ) - pImpl = new Writer_Impl( *pDoc ); - SfxItemPool& rPool = pDoc->GetAttrPool(); _AddFontItems( rPool, RES_CHRATR_CJK_FONT ); _AddFontItems( rPool, RES_CHRATR_CTL_FONT ); @@ -516,11 +509,13 @@ void Writer::_AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont ) rPool.Remove( *pItem ); else { - if( !pImpl->pFontRemoveLst ) - pImpl->pFontRemoveLst = new SvPtrarr( 0, 10 ); + if (!m_pImpl->pFontRemoveLst) + { + m_pImpl->pFontRemoveLst = new SvPtrarr( 0, 10 ); + } void* p = (void*)pItem; - pImpl->pFontRemoveLst->Insert( p, pImpl->pFontRemoveLst->Count() ); + m_pImpl->pFontRemoveLst->Insert( p, m_pImpl->pFontRemoveLst->Count() ); } } @@ -532,7 +527,9 @@ void Writer::CreateBookmarkTbl() for(IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->getBookmarksBegin(); ppBkmk != pMarkAccess->getBookmarksEnd(); ++ppBkmk) - pImpl->InsertBkmk(**ppBkmk); + { + m_pImpl->InsertBkmk(**ppBkmk); + } } @@ -543,7 +540,8 @@ USHORT Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt, ASSERT( !rArr.Count(), "es sind noch Eintraege vorhanden" ); ULONG nNd = rNd.GetIndex(); - SvPtrarr* pArr = pImpl->pBkmkNodePos ? pImpl->pBkmkNodePos->Get( nNd ) : 0; + SvPtrarr* pArr = (m_pImpl->pBkmkNodePos) ? + m_pImpl->pBkmkNodePos->Get( nNd ) : 0; if( pArr ) { // there exist some bookmarks, search now all which is in the range @@ -593,7 +591,6 @@ ULONG StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName ) pStg = &rStg; pDoc = rPaM.GetDoc(); pOrigFileName = pFName; - pImpl = new Writer_Impl( *pDoc ); // PaM kopieren, damit er veraendert werden kann pCurPam = new SwPaM( *rPaM.End(), *rPaM.Start() ); @@ -615,7 +612,6 @@ ULONG StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& r xStg = rStg; pDoc = rPaM.GetDoc(); pOrigFileName = pFName; - pImpl = new Writer_Impl( *pDoc ); // PaM kopieren, damit er veraendert werden kann pCurPam = new SwPaM( *rPaM.End(), *rPaM.Start() ); -- cgit v1.2.3 From 26ddb15e5e99d0cf7d377a417eaa4c06ec83ad16 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 29 Apr 2010 11:10:06 +0200 Subject: cws tl80: #i98575# memory leak fixed --- sw/source/ui/docvw/postit.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) mode change 100644 => 100755 sw/source/ui/docvw/postit.cxx (limited to 'sw/source') diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx old mode 100644 new mode 100755 index 44bf3263a9..637484c702 --- a/sw/source/ui/docvw/postit.cxx +++ b/sw/source/ui/docvw/postit.cxx @@ -1259,7 +1259,12 @@ void SwMarginWin::ExecuteCommand(USHORT nSlot) SwView* pView = DocView(); if (Engine()->GetEditEngine().GetText() != String(EMPTYSTRING)) { - OutlinerParaObject* pPara = new OutlinerParaObject(*View()->GetEditView().CreateTextObject()); + // since we will be owner of the object returned by CreateTextObject, + // and OutlinerParaObject will clone that one, we need to delete the + // original object. + EditTextObject* pTemporaryText = View()->GetEditView().CreateTextObject(); + OutlinerParaObject* pPara = new OutlinerParaObject( *pTemporaryText ); + delete pTemporaryText; Mgr()->RegisterAnswer(pPara); } if (Mgr()->GetActivePostIt()) -- cgit v1.2.3 From 273664bee834bcc4fc31e4d71f760b0cdd4559f0 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 29 Apr 2010 11:43:05 +0200 Subject: sb120: #i111249# avoid dereferencing null pointers --- sw/source/ui/app/apphdl.cxx | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 708d6ceed3..d57e22b985 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -765,16 +765,26 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) DELETEZ(pWebToolbarConfig) ; DELETEZ(pAuthorNames) ; DELETEZ(pDBConfig); - pColorConfig->RemoveListener(this); - DELETEZ(pColorConfig); - pAccessibilityOptions->RemoveListener(this); - DELETEZ(pAccessibilityOptions); - pCTLOptions->RemoveListener(this); - DELETEZ(pCTLOptions); - pUserOptions->RemoveListener(this); - DELETEZ(pUserOptions); - pUndoOptions->RemoveListener(this); - DELETEZ(pUndoOptions); + if (pColorConfig != 0) { + pColorConfig->RemoveListener(this); + DELETEZ(pColorConfig); + } + if (pAccessibilityOptions != 0) { + pAccessibilityOptions->RemoveListener(this); + DELETEZ(pAccessibilityOptions); + } + if (pCTLOptions != 0) { + pCTLOptions->RemoveListener(this); + DELETEZ(pCTLOptions); + } + if (pUserOptions != 0) { + pUserOptions->RemoveListener(this); + DELETEZ(pUserOptions); + } + if (pUndoOptions != 0) { + pUndoOptions->RemoveListener(this); + DELETEZ(pUndoOptions); + } } } } -- cgit v1.2.3 From 118db36c35a4c6eab703a7416fe73d89a3a317d4 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Fri, 30 Apr 2010 11:12:34 +0200 Subject: hb33tablebylayou: #i110135# transplanted changes from OOO320 --- sw/inc/swtable.hxx | 17 + sw/source/core/table/swtable.cxx | 157 +++++ sw/source/filter/ww8/WW8TableInfo.cxx | 904 ++++++++++++++++++++++++++- sw/source/filter/ww8/WW8TableInfo.hxx | 175 +++++- sw/source/filter/ww8/attributeoutputbase.hxx | 9 +- sw/source/filter/ww8/wrtww8.cxx | 268 ++++---- sw/source/filter/ww8/wrtww8.hxx | 5 +- sw/source/filter/ww8/ww8atr.cxx | 11 +- 8 files changed, 1395 insertions(+), 151 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index 86f8e31d99..132693826d 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -468,4 +468,21 @@ public: { return const_cast(this)->FindEndOfRowSpan( rTable, nMaxStep ); } }; +class SwCellFrm; +class SW_DLLPUBLIC SwTableCellInfo : public ::boost::noncopyable +{ + struct Impl; + ::std::auto_ptr m_pImpl; + + const SwCellFrm * getCellFrm() const ; + +public: + SwTableCellInfo(const SwTable * pTable); + ~SwTableCellInfo(); + + bool getNext(); + SwRect getRect() const; + const SwTableBox * getTableBox() const; +}; + #endif //_SWTABLE_HXX diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index a755dd59e3..9144738a68 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -2726,3 +2726,160 @@ void SwTableBox_Impl::SetNewCol( Color** ppCol, const Color* pNewCol ) } } +struct SwTableCellInfo::Impl +{ + const SwTable * m_pTable; + const SwCellFrm * m_pCellFrm; + const SwTabFrm * m_pTabFrm; + typedef ::std::set TableBoxes_t; + TableBoxes_t m_HandledTableBoxes; + +public: + Impl() + : m_pTable(NULL), m_pCellFrm(NULL), m_pTabFrm(NULL) + { + } + + ~Impl() {} + + void setTable(const SwTable * pTable) { + m_pTable = pTable; + SwFrmFmt * pFrmFmt = m_pTable->GetFrmFmt(); + SwClientIter aIter(*pFrmFmt); + + m_pTabFrm = + static_cast(aIter.First(TYPE(SwTabFrm))); + + if (m_pTabFrm->IsFollow()) + m_pTabFrm = m_pTabFrm->FindMaster(true); + } + const SwTable * getTable() const { return m_pTable; } + + const SwCellFrm * getCellFrm() const { return m_pCellFrm; } + + const SwFrm * getNextFrmInTable(const SwFrm * pFrm); + const SwCellFrm * getNextCellFrm(const SwFrm * pFrm); + const SwCellFrm * getNextTableBoxsCellFrm(const SwFrm * pFrm); + bool getNext(); +}; + +const SwFrm * SwTableCellInfo::Impl::getNextFrmInTable(const SwFrm * pFrm) +{ + const SwFrm * pResult = NULL; + + if (((! pFrm->IsTabFrm()) || pFrm == m_pTabFrm) && pFrm->GetLower()) + pResult = pFrm->GetLower(); + else if (pFrm->GetNext()) + pResult = pFrm->GetNext(); + else + { + while (pFrm->GetUpper() != NULL) + { + pFrm = pFrm->GetUpper(); + + if (pFrm->IsTabFrm()) + { + m_pTabFrm = static_cast(pFrm)->GetFollow(); + pResult = m_pTabFrm; + break; + } + else if (pFrm->GetNext()) + { + pResult = pFrm->GetNext(); + break; + } + } + } + + return pResult; +} + +const SwCellFrm * SwTableCellInfo::Impl::getNextCellFrm(const SwFrm * pFrm) +{ + const SwCellFrm * pResult = NULL; + + while ((pFrm = getNextFrmInTable(pFrm)) != NULL) + { + if (pFrm->IsCellFrm()) + { + pResult = static_cast(pFrm); + break; + } + } + + return pResult; +} + +const SwCellFrm * SwTableCellInfo::Impl::getNextTableBoxsCellFrm(const SwFrm * pFrm) +{ + const SwCellFrm * pResult = NULL; + + while ((pFrm = getNextCellFrm(pFrm)) != NULL) + { + const SwCellFrm * pCellFrm = static_cast(pFrm); + const SwTableBox * pTabBox = pCellFrm->GetTabBox(); + TableBoxes_t::const_iterator aIt = m_HandledTableBoxes.find(pTabBox); + + if (aIt == m_HandledTableBoxes.end()) + { + pResult = pCellFrm; + m_HandledTableBoxes.insert(pTabBox); + break; + } + } + + return pResult; +} + +const SwCellFrm * SwTableCellInfo::getCellFrm() const +{ + return m_pImpl->getCellFrm(); +} + +bool SwTableCellInfo::Impl::getNext() +{ + if (m_pCellFrm == NULL) + { + if (m_pTabFrm != NULL) + m_pCellFrm = Impl::getNextTableBoxsCellFrm(m_pTabFrm); + } + else + m_pCellFrm = Impl::getNextTableBoxsCellFrm(m_pCellFrm); + + return m_pCellFrm != NULL; +} + +SwTableCellInfo::SwTableCellInfo(const SwTable * pTable) +{ + m_pImpl.reset(new Impl()); + m_pImpl->setTable(pTable); +} + +SwTableCellInfo::~SwTableCellInfo() +{ +} + +bool SwTableCellInfo::getNext() +{ + return m_pImpl->getNext(); +} + +SwRect SwTableCellInfo::getRect() const +{ + SwRect aRet; + + if (getCellFrm() != NULL) + aRet = getCellFrm()->Frm(); + + return aRet; +} + +const SwTableBox * SwTableCellInfo::getTableBox() const +{ + const SwTableBox * pRet = NULL; + + if (getCellFrm() != NULL) + pRet = getCellFrm()->GetTabBox(); + + return pRet; +} diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index f0d65a7544..77a8e736f7 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -29,9 +29,13 @@ #include "precompiled_sw.hxx" #include +#include #include #include "WW8TableInfo.hxx" +#include "fmtfsize.hxx" +#include "attributeoutputbase.hxx" #include "swtable.hxx" +#include "frmfmt.hxx" #include "pam.hxx" #include "ndtxt.hxx" #include "dbgoutsw.hxx" @@ -45,8 +49,11 @@ WW8TableNodeInfoInner::WW8TableNodeInfoInner(WW8TableNodeInfo * pParent) : mpParent(pParent) , mnCell(0) , mnRow(0) +, mnShadowsBefore(0) +, mnShadowsAfter(0) , mbEndOfLine(false) , mbEndOfCell(false) +, mbVertMerge(false) , mpTableBox(NULL) , mpTable(NULL) { @@ -71,6 +78,16 @@ void WW8TableNodeInfoInner::setRow(sal_uInt32 nRow) mnRow = nRow; } +void WW8TableNodeInfoInner::setShadowsBefore(sal_uInt32 nShadowsBefore) +{ + mnShadowsBefore = nShadowsBefore; +} + +void WW8TableNodeInfoInner::setShadowsAfter(sal_uInt32 nShadowsAfter) +{ + mnShadowsAfter = nShadowsAfter; +} + void WW8TableNodeInfoInner::setEndOfLine(bool bEndOfLine) { mbEndOfLine = bEndOfLine; @@ -81,6 +98,11 @@ void WW8TableNodeInfoInner::setEndOfCell(bool bEndOfCell) mbEndOfCell = bEndOfCell; } +void WW8TableNodeInfoInner::setVertMerge(bool bVertMerge) +{ + mbVertMerge = bVertMerge; +} + void WW8TableNodeInfoInner::setTableBox(const SwTableBox * pTableBox) { mpTableBox = pTableBox; @@ -91,6 +113,11 @@ void WW8TableNodeInfoInner::setTable(const SwTable * pTable) mpTable = pTable; } +void WW8TableNodeInfoInner::setRect(const SwRect & rRect) +{ + maRect = rRect; +} + sal_uInt32 WW8TableNodeInfoInner::getDepth() const { return mnDepth; @@ -106,6 +133,16 @@ sal_uInt32 WW8TableNodeInfoInner::getRow() const return mnRow; } +sal_uInt32 WW8TableNodeInfoInner::getShadowsBefore() const +{ + return mnShadowsBefore; +} + +sal_uInt32 WW8TableNodeInfoInner::getShadowsAfter() const +{ + return mnShadowsAfter; +} + bool WW8TableNodeInfoInner::isEndOfCell() const { return mbEndOfCell; @@ -126,6 +163,127 @@ const SwNode * WW8TableNodeInfoInner::getNode() const return pResult; } +TableBoxVectorPtr WW8TableNodeInfoInner::getTableBoxesOfRow() +{ + TableBoxVectorPtr pResult(new TableBoxVector); + + WW8TableCellGrid::Pointer_t pCellGrid = + mpParent->getParent()->getCellGridForTable(getTable(), false); + + if (pCellGrid.get() == NULL) + { + const SwTableLine * pTabLine = getTableBox()->GetUpper(); + const SwTableBoxes & rTblBoxes = pTabLine->GetTabBoxes(); + + sal_uInt8 nBoxes = rTblBoxes.Count(); + for ( sal_uInt8 n = 0; n < nBoxes; n++ ) + { + pResult->push_back(rTblBoxes[n]); + } + } + else + pResult = pCellGrid->getTableBoxesOfRow(this); + + return pResult; +} + +GridColsPtr WW8TableNodeInfoInner::getGridColsOfRow(AttributeOutputBase & rBase) +{ + GridColsPtr pResult(new GridCols); + WidthsPtr pWidths(getWidthsOfRow()); + + const SwFrmFmt *pFmt = getTable()->GetFrmFmt(); + ASSERT(pFmt,"Impossible"); + if (!pFmt) + return pResult; + + const SwFmtFrmSize &rSize = pFmt->GetFrmSize(); + unsigned long nTblSz = static_cast(rSize.GetWidth()); + + sal_uInt32 nPageSize = 0; + bool bRelBoxSize = false; + + rBase.GetTablePageSize + ( this, nPageSize, bRelBoxSize ); + + SwTwips nSz = 0; + Widths::const_iterator aWidthsEnd = pWidths->end(); + for ( Widths::const_iterator aIt = pWidths->begin(); + aIt != aWidthsEnd; + aIt++) + { + nSz += *aIt; + SwTwips nCalc = nSz; + if ( bRelBoxSize ) + nCalc = ( nCalc * nPageSize ) / nTblSz; + + pResult->push_back( nCalc ); + } + + return pResult; +} + +WidthsPtr WW8TableNodeInfoInner::getWidthsOfRow() +{ + WidthsPtr pWidths; + + WW8TableCellGrid::Pointer_t pCellGrid = + mpParent->getParent()->getCellGridForTable(getTable(), false); + + if (pCellGrid.get() == NULL) + { + const SwTableBox * pTabBox = getTableBox(); + const SwTableLine * pTabLine = pTabBox->GetUpper(); + const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes(); + + pWidths = WidthsPtr(new Widths); + // number of cell written + sal_uInt32 nBoxes = rTabBoxes.Count(); + if ( nBoxes > 32 ) + nBoxes = 32; + + for (sal_uInt32 n = 0; n < nBoxes; n++) + { + const SwFrmFmt* pBoxFmt = rTabBoxes[ n ]->GetFrmFmt(); + const SwFmtFrmSize& rLSz = pBoxFmt->GetFrmSize(); + + pWidths->push_back(rLSz.GetWidth()); + } + } + else + pWidths = pCellGrid->getWidthsOfRow(this); + + return pWidths; +} + +RowSpansPtr WW8TableNodeInfoInner::getRowSpansOfRow() +{ + RowSpansPtr pResult(new RowSpans); + + WW8TableCellGrid::Pointer_t pCellGrid = + mpParent->getParent()->getCellGridForTable(getTable(), false); + + if (pCellGrid.get() == NULL) + { + const SwTableBox * pTabBox = getTableBox(); + const SwTableLine * pTabLine = pTabBox->GetUpper(); + const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes(); + + sal_uInt32 nBoxes = rTabBoxes.Count(); + if (nBoxes > 32) + nBoxes = 32; + + for (sal_uInt32 n = 0; n < nBoxes; ++n) + { + pResult->push_back(rTabBoxes[n]->getRowSpan()); + } + } + else + pResult = pCellGrid->getRowSpansOfRow(this); + + return pResult; + } + const SwTableBox * WW8TableNodeInfoInner::getTableBox() const { return mpTableBox; @@ -136,6 +294,11 @@ const SwTable * WW8TableNodeInfoInner::getTable() const return mpTable; } +const SwRect & WW8TableNodeInfoInner::getRect() const +{ + return maRect; +} + string WW8TableNodeInfoInner::toString() const { static char buffer[256]; @@ -144,22 +307,29 @@ string WW8TableNodeInfoInner::toString() const " cell=\"%" SAL_PRIxUINT32 "\"" " row=\"%" SAL_PRIxUINT32 "\"" " endOfCell=\"%s\"" - " endOfLine=\"%s\"/>", + " endOfLine=\"%s\"" + " shadowsBefore=\"%" SAL_PRIxUINT32 "\"" + " shadowsAfter=\"%" SAL_PRIxUINT32 "\"" + " vertMerge=\"%s\"/>", mnDepth, mnCell, mnRow, mbEndOfCell ? "yes" : "no", - mbEndOfLine ? "yes" : "no"); + mbEndOfLine ? "yes" : "no", + mnShadowsBefore, + mnShadowsAfter, + mbVertMerge ? "yes" : "no"); return string(buffer); } // WW8TableTextNodeInfo -WW8TableNodeInfo::WW8TableNodeInfo(const SwNode * pNode) -: - mnDepth(0), - mpNode(pNode), - mpNext(NULL), - mpNextNode(NULL) +WW8TableNodeInfo::WW8TableNodeInfo(WW8TableInfo * pParent, + const SwNode * pNode) +: mpParent(pParent), + mnDepth(0), + mpNode(pNode), + mpNext(NULL), + mpNextNode(NULL) { } @@ -171,8 +341,8 @@ WW8TableNodeInfo::~WW8TableNodeInfo() { static char buffer[1024]; snprintf(buffer, sizeof(buffer), - "" - , getDepth()); + "" + ,this, getDepth()); ::std::string sResult(buffer); @@ -191,7 +361,7 @@ WW8TableNodeInfo::~WW8TableNodeInfo() sResult += dbg_out(*mpNode); #endif - sResult +=""; + sResult += ""; return sResult; } @@ -230,6 +400,17 @@ void WW8TableNodeInfo::setEndOfCell(bool bEndOfCell) #endif } +void WW8TableNodeInfo::setVertMerge(bool bVertMerge) +{ + WW8TableNodeInfoInner::Pointer_t pInner = getInnerForDepth(mnDepth); + pInner->setVertMerge(bVertMerge); + +#ifdef DEBUG + ::std::clog << "" + << toString() << "" << ::std::endl; +#endif +} + void WW8TableNodeInfo::setTableBox(const SwTableBox * pTableBox) { getInnerForDepth(mnDepth)->setTableBox(pTableBox); @@ -251,9 +432,14 @@ void WW8TableNodeInfo::setNext(WW8TableNodeInfo * pNext) #endif } -void WW8TableNodeInfo::setNextNode(SwNode * pNode) +void WW8TableNodeInfo::setNextNode(const SwNode * pNode) +{ + mpNextNode = pNode; +} + +void WW8TableNodeInfo::setRect(const SwRect & rRect) { - mpNode = pNode; + getInnerForDepth(mnDepth)->setRect(rRect); } void WW8TableNodeInfo::setCell(sal_uInt32 nCell) @@ -266,6 +452,21 @@ void WW8TableNodeInfo::setRow(sal_uInt32 nRow) getInnerForDepth(mnDepth)->setRow(nRow); } +void WW8TableNodeInfo::setShadowsBefore(sal_uInt32 nShadowsBefore) +{ + getInnerForDepth(mnDepth)->setShadowsBefore(nShadowsBefore); +} + +void WW8TableNodeInfo::setShadowsAfter(sal_uInt32 nShadowsAfter) +{ + getInnerForDepth(mnDepth)->setShadowsAfter(nShadowsAfter); +} + +WW8TableInfo * WW8TableNodeInfo::getParent() const +{ + return mpParent; +} + sal_uInt32 WW8TableNodeInfo::getDepth() const { if (mInners.size() > 0) @@ -294,11 +495,16 @@ WW8TableNodeInfo * WW8TableNodeInfo::getNext() const return mpNext; } -SwNode * WW8TableNodeInfo::getNextNode() const +const SwNode * WW8TableNodeInfo::getNextNode() const { return mpNextNode; } +const SwRect & WW8TableNodeInfo::getRect() const +{ + return getInnerForDepth(mnDepth)->getRect(); +} + bool WW8TableNodeInfo::isEndOfLine() const { return getInnerForDepth(mnDepth)->isEndOfLine(); @@ -357,31 +563,101 @@ WW8TableInfo::~WW8TableInfo() { } +WW8TableNodeInfo * +WW8TableInfo::processSwTableByLayout(const SwTable * pTable) +{ + SwTableCellInfo aTableCellInfo(pTable); + WW8TableNodeInfo * pPrev = NULL; + + while (aTableCellInfo.getNext()) + { + SwRect aRect = aTableCellInfo.getRect(); + +#ifdef DEBUG + static char sBuffer[1024]; + ::std::clog << "" << ::std::endl; + + snprintf(sBuffer, sizeof(sBuffer), + "", + aRect.Top(), aRect.Bottom(), aRect.Left(), aRect.Right()); + ::std::clog << sBuffer << ::std::endl; +#endif + const SwTableBox * pTableBox = aTableCellInfo.getTableBox(); + const SwStartNode * pSttNd = pTableBox->GetSttNd(); + + if (pSttNd != NULL) + { + SwPaM aPam(*pSttNd, 0); + + bool bDone = false; + do + { + SwNode & rNode = aPam.GetPoint()->nNode.GetNode(); + + insertTableNodeInfo(&rNode, pTable, pTableBox, 0, 0, 1, & aRect); + + if (rNode.IsEndNode()) + { + SwEndNode * pEndNode = rNode.GetEndNode(); + SwStartNode * pTmpSttNd = pEndNode->StartOfSectionNode(); + + if (pTmpSttNd == pSttNd) + bDone = true; + } + + aPam.GetPoint()->nNode++; + } + while (!bDone); + } + +#ifdef DEBUG + ::std::clog << "" << ::std::endl; +#endif + } + + pPrev = reorderByLayout(pTable); + + return pPrev; +} + void WW8TableInfo::processSwTable(const SwTable * pTable) { #ifdef DEBUG ::std::clog << "" << ::std::endl; #endif - const SwTableLines & rLines = pTable->GetTabLines(); - WW8TableNodeInfo * pPrev = NULL; - - for (USHORT n = 0; n < rLines.Count(); n++) + + SwFrmFmt * pFrmFmt = pTable->GetFrmFmt(); + if (pFrmFmt != NULL && pTable->IsTblComplex()) + { + pPrev = processSwTableByLayout(pTable); + +#ifdef DEBUG + WW8TableCellGrid::Pointer_t pCellGrid(getCellGridForTable(pTable)); + ::std::clog << pCellGrid->toString() << ::std::endl; +#endif + } + else { - const SwTableLine * pLine = rLines[n]; + const SwTableLines & rLines = pTable->GetTabLines(); + + for (USHORT n = 0; n < rLines.Count(); n++) + { + const SwTableLine * pLine = rLines[n]; + + pPrev = processTableLine(pTable, pLine, n, 1, pPrev); + } - pPrev = processTableLine(pTable, pLine, n, 1, pPrev); } if (pPrev != NULL) { SwTableNode * pTableNode = pTable->GetTableNode(); SwEndNode * pEndNode = pTableNode->EndOfSectionNode(); - + pPrev->setNextNode(pEndNode); } - #ifdef DEBUG ::std::clog << "" << ::std::endl; #endif @@ -414,7 +690,7 @@ WW8TableInfo::processTableLine(const SwTable * pTable, #endif return pPrev; -} +} WW8TableNodeInfo::Pointer_t WW8TableInfo::processTableBoxLines(const SwTableBox * pBox, @@ -471,7 +747,6 @@ WW8TableInfo::processTableBoxLines(const SwTableBox * pBox, return pNodeInfo; } - WW8TableNodeInfo * WW8TableInfo::processTableBox(const SwTable * pTable, const SwTableBox * pBox, @@ -573,13 +848,15 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo const SwTableBox * pTableBox, sal_uInt32 nRow, sal_uInt32 nCell, - sal_uInt32 nDepth) + sal_uInt32 nDepth, + SwRect * pRect) { WW8TableNodeInfo::Pointer_t pNodeInfo = getTableNodeInfo(pNode); if (pNodeInfo.get() == NULL) { - pNodeInfo = WW8TableNodeInfo::Pointer_t(new WW8TableNodeInfo(pNode)); + pNodeInfo = + WW8TableNodeInfo::Pointer_t(new WW8TableNodeInfo(this, pNode)); mMap.insert(Map_t::value_type(pNode, pNodeInfo)); } @@ -590,7 +867,15 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo pNodeInfo->setCell(nCell); pNodeInfo->setRow(nRow); - + + if (pRect) + { + WW8TableCellGrid::Pointer_t pCellGrid = getCellGridForTable(pTable); + + pCellGrid->insert(*pRect, pNodeInfo.get()); + pNodeInfo->setRect(*pRect); + } + #ifdef DEBUG ::std::clog << pNodeInfo->toString() << ::std::endl; #endif @@ -598,6 +883,26 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo return pNodeInfo; } +WW8TableCellGrid::Pointer_t WW8TableInfo::getCellGridForTable +(const SwTable * pTable, bool bCreate) +{ + WW8TableCellGrid::Pointer_t pResult; + CellGridMap_t::iterator aIt = mCellGridMap.find(pTable); + + if (aIt == mCellGridMap.end()) + { + if (bCreate) + { + pResult = WW8TableCellGrid::Pointer_t(new WW8TableCellGrid); + mCellGridMap[pTable] = pResult; + } + } + else + pResult = mCellGridMap[pTable]; + + return pResult; +} + WW8TableNodeInfo::Pointer_t WW8TableInfo::getTableNodeInfo (const SwNode * pNode) { @@ -624,7 +929,7 @@ const SwNode * WW8TableInfo::getNextNode(const SwNode * pNode) pResult = pNextInfo->getNode(); else { - SwNode * pNextNode = pNodeInfo->getNextNode(); + const SwNode * pNextNode = pNodeInfo->getNextNode(); if (pNextNode != NULL) pResult = pNextNode; @@ -634,4 +939,547 @@ const SwNode * WW8TableInfo::getNextNode(const SwNode * pNode) return pResult; } +bool WW8TableNodeInfo::operator < (const WW8TableNodeInfo & rInfo) const +{ + bool bRet = false; + + if (rInfo.mpNode != NULL) + { + if (mpNode == NULL) + { + bRet = true; + } + else + { + if (mpNode->GetIndex() < rInfo.mpNode->GetIndex()) + bRet = true; + } + } + + return bRet; +} + +bool CellInfo::operator < (const CellInfo & aCellInfo) const +{ + bool aRet = false; + + if (top() < aCellInfo.top()) + aRet = true; + else if (top() == aCellInfo.top()) + { + if (left() < aCellInfo.left()) + aRet = true; + else if (left() == aCellInfo.left()) + { + if (width() < aCellInfo.width()) + aRet = true; + else if (width() == aCellInfo.width()) + { + if (height() < aCellInfo.height()) + aRet = true; + else if (height() == aCellInfo.height()) + { + if (aCellInfo.getTableNodeInfo() != NULL) + { + if (m_pNodeInfo == NULL) + aRet = true; + else + { + aRet = *m_pNodeInfo < *aCellInfo.getTableNodeInfo(); + } + } + } + } + } + } + + return aRet; +} + +::std::string CellInfo::toString() const +{ + static char sBuffer[256]; + + snprintf(sBuffer, sizeof(sBuffer), + "", + left(), + right(), + top(), + bottom(), + m_pNodeInfo); + + return sBuffer; +} + +WW8TableNodeInfo * WW8TableInfo::reorderByLayout(const SwTable * pTable) +{ + WW8TableNodeInfo * pPrev = NULL; + WW8TableCellGrid::Pointer_t pCellGrid = getCellGridForTable(pTable); + +#ifdef DEBUG + ::std::clog << pCellGrid->toString() << ::std::endl; +#endif + + pCellGrid->addShadowCells(); + pPrev = pCellGrid->connectCells(); + + return pPrev; +} + +WW8TableCellGrid::WW8TableCellGrid() +{ +} + +WW8TableCellGrid::~WW8TableCellGrid() +{ +} + +WW8TableCellGridRow::Pointer_t WW8TableCellGrid::getRow(long nTop, bool bCreate) +{ + WW8TableCellGridRow::Pointer_t pResult; + + RowTops_t::iterator aIt = m_aRowTops.find(nTop); + + if (aIt == m_aRowTops.end()) + { + if (bCreate) + { + pResult = WW8TableCellGridRow::Pointer_t(new WW8TableCellGridRow); + m_aRows[nTop] = pResult; + m_aRowTops.insert(nTop); + } + } + else + pResult = m_aRows[nTop]; + + return pResult; +} + +WW8TableCellGrid::RowTops_t::const_iterator WW8TableCellGrid::getRowTopsBegin() const +{ + return m_aRowTops.begin(); +} + +WW8TableCellGrid::RowTops_t::const_iterator WW8TableCellGrid::getRowTopsEnd() const +{ + return m_aRowTops.end(); +} + +CellInfoMultiSet::const_iterator WW8TableCellGrid::getCellsBegin(long nTop) +{ + return getRow(nTop)->begin(); +} + +CellInfoMultiSet::const_iterator WW8TableCellGrid::getCellsEnd(long nTop) +{ + return getRow(nTop)->end(); +} + +void WW8TableCellGrid::insert(const SwRect & rRect, + WW8TableNodeInfo * pNodeInfo, + unsigned long * pFmtFrmWidth) +{ + CellInfo aCellInfo(rRect, pNodeInfo); + + if (pFmtFrmWidth != NULL) + aCellInfo.setFmtFrmWidth(*pFmtFrmWidth); + + WW8TableCellGridRow::Pointer_t pRow = getRow(rRect.Top()); + pRow->insert(aCellInfo); +} + +void WW8TableCellGrid::addShadowCells() +{ +#ifdef DEBUG + ::std::clog << "" << ::std::endl; +#endif + + RowTops_t::const_iterator aTopsIt = getRowTopsBegin(); + + while (aTopsIt != getRowTopsEnd()) + { +#ifdef DEBUG + long nTop = *aTopsIt; + (void) nTop; +#endif + CellInfoMultiSet::const_iterator aCellIt = getCellsBegin(*aTopsIt); + CellInfoMultiSet::const_iterator aCellEndIt = getCellsEnd(*aTopsIt); + + RowSpansPtr pRowSpans(new RowSpans); + + bool bBeginningOfCell = true; + bool bVertMerge = false; + SwRect aRect = aCellIt->getRect(); + long nRowSpan = 1; + while (aCellIt != aCellEndIt) + { + WW8TableNodeInfo * pNodeInfo = aCellIt->getTableNodeInfo(); + + if (bBeginningOfCell) + { + RowTops_t::const_iterator aRowSpanIt(aTopsIt); + aRowSpanIt++; + + if (aRowSpanIt != getRowTopsEnd() && + *aRowSpanIt < aCellIt->bottom()) + { + aRect.Top(*aRowSpanIt); + unsigned long nFmtFrmWidth = aCellIt->getFmtFrmWidth(); + insert(aRect, NULL, &nFmtFrmWidth); + + bVertMerge = true; + } + else + bVertMerge = false; + + nRowSpan = 1; + while (aRowSpanIt != getRowTopsEnd() && + *aRowSpanIt < aCellIt->bottom()) + { + aRowSpanIt++; + nRowSpan++; + } + + if (pNodeInfo != NULL) + pRowSpans->push_back(nRowSpan); + else + pRowSpans->push_back(-nRowSpan); + } + + if (pNodeInfo != NULL) + { + pNodeInfo->setVertMerge(bVertMerge); + } + + aCellIt++; + + bBeginningOfCell = (aRect.Left() != aCellIt->left()); + aRect = aCellIt->getRect(); + } + + WW8TableCellGridRow::Pointer_t pRow = getRow(*aTopsIt); + if (pRow.get() != NULL) + pRow->setRowSpans(pRowSpans); + + aTopsIt++; + } +#ifdef DEBUG + ::std::clog << "" << ::std::endl; +#endif +} + +WW8TableNodeInfo * WW8TableCellGrid::connectCells() +{ + RowTops_t::const_iterator aTopsIt = getRowTopsBegin(); + sal_uInt32 nRow = 0; + WW8TableNodeInfo * pLastNodeInfo = NULL; + + while (aTopsIt != getRowTopsEnd()) + { + CellInfoMultiSet::const_iterator aCellIt = getCellsBegin(*aTopsIt); + CellInfoMultiSet::const_iterator aCellEndIt = getCellsEnd(*aTopsIt); + GridColsPtr pWidths(new Widths); + TableBoxVectorPtr pTableBoxes(new TableBoxVector); + + sal_uInt32 nShadows = 0; + sal_uInt32 nCell = 0; + bool bBeginningOfCell = true; + WW8TableNodeInfo * pEndOfCellInfo = NULL; + sal_uInt32 nDepthInCell = 0; + while (aCellIt != aCellEndIt) + { + long nCellX = aCellIt->left(); + WW8TableNodeInfo * pNodeInfo = aCellIt->getTableNodeInfo(); + if (pNodeInfo != NULL) + { + const SwNode * pNode = pNodeInfo->getNode(); + + if (pNode->IsStartNode()) + { + nDepthInCell++; + pEndOfCellInfo = NULL; + } + + if (nDepthInCell == 1 && pNode->IsTxtNode()) + pEndOfCellInfo = pNodeInfo; + + pNodeInfo->setShadowsBefore(nShadows); + pNodeInfo->setCell(nCell); + pNodeInfo->setRow(nRow); + if (pLastNodeInfo != NULL) + { + pLastNodeInfo->setNext(pNodeInfo); + pLastNodeInfo->setNextNode(pNode); + } + pLastNodeInfo = pNodeInfo; + nShadows = 0; + + if (pNode->IsEndNode()) + { + nDepthInCell--; + + if (nDepthInCell == 0 && pEndOfCellInfo == NULL) + pEndOfCellInfo = pNodeInfo; + } + } + else + { + nShadows++; + } + + if (bBeginningOfCell) + { + pWidths->push_back(aCellIt->getFmtFrmWidth()); + + if (pNodeInfo != NULL) + pTableBoxes->push_back(pNodeInfo->getTableBox()); + else + pTableBoxes->push_back(NULL); + } + + aCellIt++; + bBeginningOfCell = false; + + if (aCellIt != aCellEndIt && aCellIt->left() != nCellX) + { + nCell++; + bBeginningOfCell = true; + + if (pEndOfCellInfo != NULL) + { + pEndOfCellInfo->setEndOfCell(true); + } + + pEndOfCellInfo = NULL; + } + } + + pLastNodeInfo->setShadowsAfter(nShadows); + + if (pEndOfCellInfo == NULL) + { + pEndOfCellInfo = pLastNodeInfo; + } + + pEndOfCellInfo->setEndOfCell(true); + pLastNodeInfo->setEndOfLine(true); + + WW8TableCellGridRow::Pointer_t pRow(getRow(*aTopsIt)); + pRow->setTableBoxVector(pTableBoxes); + pRow->setWidths(pWidths); + + nShadows = 0; + + aTopsIt++; + nRow++; + } + + return pLastNodeInfo; +} + +string WW8TableCellGrid::toString() +{ + string sResult = ""; + + RowTops_t::const_iterator aTopsIt = getRowTopsBegin(); + static char sBuffer[1024]; + while (aTopsIt != getRowTopsEnd()) + { + sprintf(sBuffer, "", *aTopsIt); + sResult += sBuffer; + + CellInfoMultiSet::const_iterator aCellIt = getCellsBegin(*aTopsIt); + CellInfoMultiSet::const_iterator aCellsEnd = getCellsEnd(*aTopsIt); + + while (aCellIt != aCellsEnd) + { + snprintf(sBuffer, sizeof(sBuffer), "", + aCellIt->top(), aCellIt->bottom(), aCellIt->left(), aCellIt->right()); + sResult += sBuffer; + + WW8TableNodeInfo * pInfo = aCellIt->getTableNodeInfo(); + if (pInfo != NULL) + sResult += pInfo->toString(); + else + sResult += "\n"; + + sResult += "\n"; + aCellIt++; + } + + WW8TableCellGridRow::Pointer_t pRow = getRow(*aTopsIt); + WidthsPtr pWidths = pRow->getWidths(); + if (pWidths != NULL) + { + sResult += ""; + + Widths::const_iterator aItEnd = pWidths->end(); + for (Widths::const_iterator aIt = pWidths->begin(); + aIt != aItEnd; + aIt++) + { + if (aIt != pWidths->begin()) + sResult += ", "; + + snprintf(sBuffer, sizeof(sBuffer), "%" SAL_PRIxUINT32 "", *aIt); + sResult += sBuffer; + } + + sResult += ""; + } + + RowSpansPtr pRowSpans = pRow->getRowSpans(); + if (pRowSpans.get() != NULL) + { + sResult += ""; + + RowSpans::const_iterator aItEnd = pRowSpans->end(); + for (RowSpans::const_iterator aIt = pRowSpans->begin(); + aIt != aItEnd; + aIt++) + { + if (aIt != pRowSpans->begin()) + sResult += ", "; + + snprintf(sBuffer, sizeof(sBuffer), "%" SAL_PRIxUINT32 "", *aIt); + sResult += sBuffer; + } + + sResult += ""; + } + + sResult += "\n"; + aTopsIt++; + } + + sResult += "\n"; + + return sResult; +} + +TableBoxVectorPtr WW8TableCellGrid::getTableBoxesOfRow +(WW8TableNodeInfoInner * pNodeInfoInner) +{ + TableBoxVectorPtr pResult; + WW8TableCellGridRow::Pointer_t pRow = + getRow(pNodeInfoInner->getRect().Top(), false); + + if (pRow.get() != NULL) + { + pResult = pRow->getTableBoxVector(); + } + + return pResult; +} + +WidthsPtr WW8TableCellGrid::getWidthsOfRow +(WW8TableNodeInfoInner * pNodeInfoInner) +{ + GridColsPtr pResult; + + WW8TableCellGridRow::Pointer_t pRow = + getRow(pNodeInfoInner->getRect().Top(), false); + + if (pRow.get() != NULL) + { + pResult = pRow->getWidths(); + } + + return pResult; +} + +RowSpansPtr WW8TableCellGrid::getRowSpansOfRow +(WW8TableNodeInfoInner * pNodeInfoInner) +{ + RowSpansPtr pResult; + + WW8TableCellGridRow::Pointer_t pRow = + getRow(pNodeInfoInner->getRect().Top(), false); + + if (pRow.get() != NULL) + { + pResult = pRow->getRowSpans(); + } + + return pResult; +} + +WW8TableCellGridRow::WW8TableCellGridRow() +: m_pCellInfos(new CellInfoMultiSet) +{ +} + +WW8TableCellGridRow::~WW8TableCellGridRow() +{ +} + +void WW8TableCellGridRow::insert(const CellInfo & rCellInfo) +{ + m_pCellInfos->insert(rCellInfo); + +#ifdef DEBUG + ::std::clog << "" + << rCellInfo.toString() + << "" + << ::std::endl; +#endif +} + +CellInfoMultiSet::const_iterator WW8TableCellGridRow::begin() const +{ + return m_pCellInfos->begin(); +} + +CellInfoMultiSet::const_iterator WW8TableCellGridRow::end() const +{ + return m_pCellInfos->end(); +} + +void WW8TableCellGridRow::setTableBoxVector(TableBoxVectorPtr pTableBoxVector) +{ + m_pTableBoxVector = pTableBoxVector; +} + +void WW8TableCellGridRow::setWidths(WidthsPtr pWidths) +{ + m_pWidths = pWidths; +} + +void WW8TableCellGridRow::setRowSpans(RowSpansPtr pRowSpans) +{ + m_pRowSpans = pRowSpans; +} + +TableBoxVectorPtr WW8TableCellGridRow::getTableBoxVector() const +{ + return m_pTableBoxVector; +} + +WidthsPtr WW8TableCellGridRow::getWidths() const +{ + return m_pWidths; +} + +RowSpansPtr WW8TableCellGridRow::getRowSpans() const +{ + return m_pRowSpans; +} + +CellInfo::CellInfo(const SwRect & aRect, WW8TableNodeInfo * pNodeInfo) +: m_aRect(aRect), m_pNodeInfo(pNodeInfo), m_nFmtFrmWidth(0) +{ + if (pNodeInfo != NULL) + { + const SwTableBox * pBox = pNodeInfo->getTableBox(); + const SwFrmFmt * pFrmFmt = pBox->GetFrmFmt(); + const SwFmtFrmSize & rSize = pFrmFmt->GetFrmSize(); + + m_nFmtFrmWidth = rSize.GetWidth(); + } +} + } diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index 620fa620e4..ee838dcb54 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -33,18 +33,29 @@ #include #include #include +#include class SwTable; class SwTableLine; class SwTableBox; class SwNode; class SwWW8Writer; +class AttributeOutputBase; namespace ww8 { using namespace ::std; class WW8TableNodeInfo; +typedef boost::shared_ptr SwRectPtr; +typedef ::std::vector TableBoxVector; +typedef boost::shared_ptr TableBoxVectorPtr; +typedef ::std::vector GridCols; +typedef boost::shared_ptr GridColsPtr; +typedef ::std::vector RowSpans; +typedef boost::shared_ptr RowSpansPtr; +typedef ::std::vector Widths; +typedef boost::shared_ptr WidthsPtr; class WW8TableNodeInfoInner { @@ -52,10 +63,14 @@ class WW8TableNodeInfoInner sal_uInt32 mnDepth; sal_uInt32 mnCell; sal_uInt32 mnRow; + sal_uInt32 mnShadowsBefore; + sal_uInt32 mnShadowsAfter; bool mbEndOfLine; bool mbEndOfCell; + bool mbVertMerge; const SwTableBox * mpTableBox; const SwTable * mpTable; + SwRect maRect; public: typedef boost::shared_ptr Pointer_t; @@ -66,52 +81,77 @@ public: void setDepth(sal_uInt32 nDepth); void setCell(sal_uInt32 nCell); void setRow(sal_uInt32 nRow); + void setShadowsBefore(sal_uInt32 nShadowsBefore); + void setShadowsAfter(sal_uInt32 nShadowsAfter); void setEndOfLine(bool bEndOfLine); void setEndOfCell(bool bEndOfCell); + void setVertMerge(bool bVertMErge); void setTableBox(const SwTableBox * pTableBox); void setTable(const SwTable * pTable); + void setRect(const SwRect & rRect); sal_uInt32 getDepth() const; sal_uInt32 getCell() const; sal_uInt32 getRow() const; + sal_uInt32 getShadowsBefore() const; + sal_uInt32 getShadowsAfter() const; bool isEndOfCell() const; bool isEndOfLine() const; + bool isVertMerge() const; const SwTableBox * getTableBox() const; const SwTable * getTable() const; + const SwRect & getRect() const; const SwNode * getNode() const; + TableBoxVectorPtr getTableBoxesOfRow(); + WidthsPtr getWidthsOfRow(); + GridColsPtr getGridColsOfRow(AttributeOutputBase & rBase); + RowSpansPtr getRowSpansOfRow(); + string toString() const; }; - + +class CellInfo; +typedef ::std::multiset > CellInfoMultiSet; +typedef boost::shared_ptr CellInfoMultiSetPtr; + +class WW8TableInfo; class WW8TableNodeInfo { public: - typedef map > Inners_t; + typedef map > Inners_t; private: + WW8TableInfo * mpParent; sal_uInt32 mnDepth; const SwNode * mpNode; Inners_t mInners; WW8TableNodeInfo * mpNext; - SwNode * mpNextNode; - + const SwNode * mpNextNode; + public: typedef boost::shared_ptr Pointer_t; - WW8TableNodeInfo(const SwNode * pTxtNode); + WW8TableNodeInfo(WW8TableInfo * pParent, const SwNode * pTxtNode); virtual ~WW8TableNodeInfo(); void setDepth(sal_uInt32 nDepth); void setEndOfLine(bool bEndOfLine); void setEndOfCell(bool bEndOfCell); + void setVertMerge(bool bVertMerge); void setTableBox(const SwTableBox *pTableBox); void setTable(const SwTable * pTable); void setCell(sal_uInt32 nCell); void setRow(sal_uInt32 nRow); + void setShadowsBefore(sal_uInt32 nShadowsBefore); + void setShadowsAfter(sal_uInt32 nShadowsAfter); void setNext(WW8TableNodeInfo * pNext); - void setNextNode(SwNode * pNode); + void setNextNode(const SwNode * pNode); + void setRect(const SwRect & rRect); + WW8TableInfo * getParent() const; sal_uInt32 getDepth() const; bool isEndOfLine() const; bool isEndOfCell() const; @@ -119,7 +159,8 @@ public: const SwTableBox * getTableBox() const; const SwTable * getTable() const; WW8TableNodeInfo * getNext() const; - SwNode * getNextNode() const; + const SwNode * getNextNode() const; + const SwRect & getRect() const; const Inners_t & getInners() const; const WW8TableNodeInfoInner::Pointer_t getFirstInner() const; @@ -129,6 +170,8 @@ public: sal_uInt32 getRow() const; ::std::string toString() const; + + bool operator < (const WW8TableNodeInfo & rInfo) const; }; struct hashNode @@ -137,10 +180,77 @@ struct hashNode { return reinterpret_cast(pNode); } }; +struct hashTable +{ + size_t operator()(const SwTable * pTable) const + { return reinterpret_cast(pTable); } +}; + +class WW8TableCellGridRow +{ + CellInfoMultiSetPtr m_pCellInfos; + TableBoxVectorPtr m_pTableBoxVector; + WidthsPtr m_pWidths; + RowSpansPtr m_pRowSpans; + +public: + typedef boost::shared_ptr Pointer_t; + WW8TableCellGridRow(); + ~WW8TableCellGridRow(); + + void insert(const CellInfo & rCellInfo); + CellInfoMultiSet::const_iterator begin() const; + CellInfoMultiSet::const_iterator end() const; + + void setTableBoxVector(TableBoxVectorPtr pTableBoxVector); + void setWidths(WidthsPtr pGridCols); + void setRowSpans(RowSpansPtr pRowSpans); + + TableBoxVectorPtr getTableBoxVector() const; + WidthsPtr getWidths() const; + RowSpansPtr getRowSpans() const; +}; + +class WW8TableCellGrid +{ + typedef ::std::set RowTops_t; + typedef ::std::map Rows_t; + + RowTops_t m_aRowTops; + Rows_t m_aRows; + + WW8TableCellGridRow::Pointer_t getRow(long nTop, bool bCreate = true); + RowTops_t::const_iterator getRowTopsBegin() const; + RowTops_t::const_iterator getRowTopsEnd() const; + CellInfoMultiSet::const_iterator getCellsBegin(long nTop); + CellInfoMultiSet::const_iterator getCellsEnd(long nTop); + +public: + typedef ::boost::shared_ptr Pointer_t; + + WW8TableCellGrid(); + ~WW8TableCellGrid(); + + void insert(const SwRect & rRect, WW8TableNodeInfo * pNodeInfo, + unsigned long * pFmtFrmWidth = NULL); + void addShadowCells(); + WW8TableNodeInfo * connectCells(); + + string toString(); + + TableBoxVectorPtr getTableBoxesOfRow(WW8TableNodeInfoInner * pNodeInfo); + WidthsPtr getWidthsOfRow(WW8TableNodeInfoInner * pNodeInfo); + RowSpansPtr getRowSpansOfRow(WW8TableNodeInfoInner * pNodeInfo); +}; + class WW8TableInfo { + friend class WW8TableNodeInfoInner; typedef hash_map Map_t; + typedef hash_map CellGridMap_t; + Map_t mMap; + CellGridMap_t mCellGridMap; WW8TableNodeInfo * processTableLine(const SwTable * pTable, @@ -169,7 +279,11 @@ class WW8TableInfo const SwTableBox * pTableBox, sal_uInt32 nRow, sal_uInt32 nCell, - sal_uInt32 nDepth); + sal_uInt32 nDepth, + SwRect * pRect = NULL); + + WW8TableCellGrid::Pointer_t getCellGridForTable(const SwTable * pTable, + bool bCreate = true); public: typedef boost::shared_ptr Pointer_t; @@ -178,9 +292,54 @@ public: virtual ~WW8TableInfo(); void processSwTable(const SwTable * pTable); + WW8TableNodeInfo * processSwTableByLayout(const SwTable * pTable); WW8TableNodeInfo::Pointer_t getTableNodeInfo(const SwNode * pNode); const SwNode * getNextNode(const SwNode * pNode); + + WW8TableNodeInfo * reorderByLayout(const SwTable * pTable); }; +class CellInfo +{ + SwRect m_aRect; + WW8TableNodeInfo * m_pNodeInfo; + unsigned long m_nFmtFrmWidth; + +public: + CellInfo(const SwRect & aRect, WW8TableNodeInfo * pNodeInfo); + + CellInfo(const CellInfo & aRectAndTableInfo) + : m_aRect(aRectAndTableInfo.m_aRect), + m_pNodeInfo(aRectAndTableInfo.m_pNodeInfo), + m_nFmtFrmWidth(aRectAndTableInfo.m_nFmtFrmWidth) + { + } + + ~CellInfo() {} + + bool operator < (const CellInfo & aCellInfo) const; + + long top() const { return m_aRect.Top(); } + long bottom() const { return m_aRect.Bottom(); } + long left() const { return m_aRect.Left(); } + long right() const { return m_aRect.Right(); } + long width() const { return m_aRect.Width(); } + long height() const { return m_aRect.Height(); } + SwRect getRect() const { return m_aRect; } + WW8TableNodeInfo * getTableNodeInfo() const + { return m_pNodeInfo; } + unsigned long getFmtFrmWidth() const + { + return m_nFmtFrmWidth; + } + + void setFmtFrmWidth(unsigned long nFmtFrmWidth) + { + m_nFmtFrmWidth = nFmtFrmWidth; + } + + ::std::string toString() const; +}; + } #endif // WW8_TABLE_INFO_HXX diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index 47a42b2079..fd5ac96d8d 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -552,9 +552,7 @@ protected: virtual bool AnalyzeURL( const String& rUrl, const String& rTarget, String* pLinkURL, String* pMark ); - std::vector GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); - - void GetTablePageSize( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner, sal_uInt32& rPageSize, bool& rRelBoxSize ); + ww8::GridColsPtr GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); public: AttributeOutputBase() {} @@ -571,6 +569,11 @@ public: /// Output frames. void OutputFlyFrame( const sw::Frame& rFmt ); + + void GetTablePageSize + ( ww8::WW8TableNodeInfoInner * pTableTextNodeInfoInner, + sal_uInt32& rPageSize, bool& rRelBoxSize ); + }; #endif // _ATTRIBUTEOUTPUTBASE_HXX_ diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 916ad970df..916216150c 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1914,28 +1914,29 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa } } -static sal_uInt16 lcl_TCFlags(const SwTableBox * pBox) +static sal_uInt16 lcl_TCFlags(const SwTableBox * pBox, long nRowSpan) { sal_uInt16 nFlags = 0; - long nRowSpan = pBox->getRowSpan(); - if (nRowSpan > 1) nFlags |= (3 << 5); else if (nRowSpan < 0) nFlags |= (1 << 5); - const SwFrmFmt * pFmt = pBox->GetFrmFmt(); - switch (pFmt->GetVertOrient().GetVertOrient()) + if (pBox != NULL) { - case text::VertOrientation::CENTER: - nFlags |= (1 << 7); - break; - case text::VertOrientation::BOTTOM: - nFlags |= (2 << 7); - break; - default: - break; + const SwFrmFmt * pFmt = pBox->GetFrmFmt(); + switch (pFmt->GetVertOrient().GetVertOrient()) + { + case text::VertOrientation::CENTER: + nFlags |= (1 << 7); + break; + case text::VertOrientation::BOTTOM: + nFlags |= (2 << 7); + break; + default: + break; + } } return nFlags; @@ -2093,9 +2094,6 @@ void WW8AttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { - const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); - const SwTableLine * pTabLine = pTabBox->GetUpper(); - const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes(); const SwTable * pTable = pTableTextNodeInfoInner->getTable(); if ( pTable->GetRowsToRepeat() > pTableTextNodeInfoInner->getRow() ) @@ -2107,11 +2105,11 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t m_rWW8Export.pO->Insert( 1, m_rWW8Export.pO->Count() ); } + ww8::TableBoxVectorPtr pTableBoxes = + pTableTextNodeInfoInner->getTableBoxesOfRow(); // number of cell written - sal_uInt32 nBoxes = rTabBoxes.Count(); - if ( nBoxes > 32 ) - nBoxes = 32; - + sal_uInt32 nBoxes = pTableBoxes->size(); + // sprm header m_rWW8Export.InsUInt16( NS_sprm::LN_TDefTable ); sal_uInt16 nSprmSize = 2 + (nBoxes + 1) * 2 + nBoxes * 20; @@ -2161,86 +2159,71 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t } } - sal_uInt32 n = 0; - m_rWW8Export.InsUInt16( nTblOffset ); - - std::vector gridCols = GetGridCols( pTableTextNodeInfoInner ); - for ( std::vector::const_iterator it = gridCols.begin(), end = gridCols.end(); it != end; ++it ) - { - m_rWW8Export.InsUInt16( static_cast( *it ) + nTblOffset ); - } + m_rWW8Export.InsUInt16( nTblOffset ); + + ww8::GridColsPtr pGridCols = GetGridCols( pTableTextNodeInfoInner ); + for ( ww8::GridCols::const_iterator it = pGridCols->begin(), + end = pGridCols->end(); it != end; ++it ) + { + m_rWW8Export.InsUInt16( static_cast( *it ) + nTblOffset ); + } + + /* TCs */ + ww8::RowSpansPtr pRowSpans = pTableTextNodeInfoInner->getRowSpansOfRow(); + ww8::RowSpans::const_iterator aItRowSpans = pRowSpans->begin(); + ww8::TableBoxVector::const_iterator aIt; + ww8::TableBoxVector::const_iterator aItEnd = pTableBoxes->end(); - /* TCs */ - for ( n = 0; n < nBoxes; n++ ) +#ifdef DEBUG + size_t nRowSpans = pRowSpans->size(); + size_t nTableBoxes = pTableBoxes->size(); + (void) nRowSpans; + (void) nTableBoxes; +#endif + + for( aIt = pTableBoxes->begin(); aIt != aItEnd; ++aIt, ++aItRowSpans) { #ifdef DEBUG sal_uInt16 npOCount = m_rWW8Export.pO->Count(); #endif - SwTableBox * pTabBox1 = rTabBoxes[n]; - const SwFrmFmt & rBoxFmt = *(pTabBox1->GetFrmFmt()); + const SwTableBox * pTabBox1 = *aIt; + const SwFrmFmt * pBoxFmt = NULL; + if (pTabBox1 != NULL) + pBoxFmt = pTabBox1->GetFrmFmt(); + if ( m_rWW8Export.bWrtWW8 ) { - sal_uInt16 nFlags = lcl_TCFlags(pTabBox1); - m_rWW8Export.InsUInt16( nFlags ); + sal_uInt16 nFlags = + lcl_TCFlags(pTabBox1, *aItRowSpans); + m_rWW8Export.InsUInt16( nFlags ); } static BYTE aNullBytes[] = { 0x0, 0x0 }; m_rWW8Export.pO->Insert( aNullBytes, 2, m_rWW8Export.pO->Count() ); // dummy - m_rWW8Export.Out_SwFmtTableBox( *m_rWW8Export.pO, rBoxFmt.GetBox() ); // 8/16 Byte + if (pBoxFmt != NULL) + { + const SvxBoxItem & rBoxItem = pBoxFmt->GetBox(); + + m_rWW8Export.Out_SwFmtTableBox( *m_rWW8Export.pO, &rBoxItem ); // 8/16 Byte + } + else + m_rWW8Export.Out_SwFmtTableBox( *m_rWW8Export.pO, NULL); // 8/16 Byte #ifdef DEBUG - ::std::clog << "" << m_rWW8Export.pO->Count() - npOCount << "" - << ::std::endl; + ::std::clog << "" << m_rWW8Export.pO->Count() - npOCount << "" + << ::std::endl; #endif } } -std::vector AttributeOutputBase::GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +ww8::GridColsPtr AttributeOutputBase::GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { - std::vector gridCols; - - const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); - const SwTableLine * pTabLine = pTabBox->GetUpper(); - const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes(); - const SwTable *pTable = pTableTextNodeInfoInner->getTable( ); - - // number of cell written - sal_uInt32 nBoxes = rTabBoxes.Count(); - if ( nBoxes > 32 ) - nBoxes = 32; - - const SwFrmFmt *pFmt = pTable->GetFrmFmt(); - ASSERT(pFmt,"Impossible"); - if (!pFmt) - return gridCols; - - const SwFmtFrmSize &rSize = pFmt->GetFrmSize(); - unsigned long nTblSz = static_cast(rSize.GetWidth()); - - sal_uInt32 nPageSize = 0; - bool bRelBoxSize = false; - - GetTablePageSize( pTableTextNodeInfoInner, nPageSize, bRelBoxSize ); - - SwTwips nSz = 0; - for ( sal_uInt32 n = 0; n < nBoxes; n++ ) - { - const SwFrmFmt* pBoxFmt = rTabBoxes[ n ]->GetFrmFmt(); - const SwFmtFrmSize& rLSz = pBoxFmt->GetFrmSize(); - nSz += rLSz.GetWidth(); - SwTwips nCalc = nSz; - if ( bRelBoxSize ) - nCalc = ( nCalc * nPageSize ) / nTblSz; - - gridCols.push_back( nCalc ); - } - - return gridCols; + return pTableTextNodeInfoInner->getGridColsOfRow(*this); } - -void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner, sal_uInt32& rPageSize, bool& rRelBoxSize ) + +void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner * pTableTextNodeInfoInner, sal_uInt32& rPageSize, bool& rRelBoxSize ) { sal_uInt32 nPageSize = 0; @@ -2455,18 +2438,7 @@ void MSWordExportBase::WriteText() } else { - ::std::clog << "" << dbg_out(*pNd) - << "" << ::std::endl; - - SwNodeDeque::const_iterator aEnd = aNodeDeque.end(); - - for (SwNodeDeque::const_iterator aIt = aNodeDeque.begin(); - aIt != aEnd; aIt++) - { - ::std::clog << dbg_out(**aIt) << ::std::endl; - } - - ::std::clog << "" << ::std::endl; + ::std::clog << "" << dbg_out(*pNd) << "" << ::std::endl; } #endif @@ -2522,6 +2494,10 @@ void MSWordExportBase::WriteText() AppendSection( pAktPageDesc, pParentFmt, nRstLnNum ); } } + else if ( pNd->IsStartNode() ) + { + OutputStartNode( *pNd->GetStartNode() ); + } else if ( pNd->IsEndNode() ) { OutputEndNode( *pNd->GetEndNode() ); @@ -3684,6 +3660,30 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren + sal_uInt32 nShadowsBefore = pNodeInfoInner->getShadowsBefore(); + if (nShadowsBefore > 0) + { + ww8::WW8TableNodeInfoInner::Pointer_t + pTmpNodeInfoInner(new ww8::WW8TableNodeInfoInner(NULL)); + + pTmpNodeInfoInner->setDepth(pNodeInfoInner->getDepth()); + pTmpNodeInfoInner->setEndOfCell(true); + + for (sal_uInt32 n = 0; n < nShadowsBefore; ++n) + { + m_rWW8Export.WriteCR(pTmpNodeInfoInner); + + m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, + m_rWW8Export.pO->Count() ); // Style # + TableInfoCell(pTmpNodeInfoInner); + m_rWW8Export.pPapPlc->AppendFkpEntry + ( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(), + m_rWW8Export.pO->GetData() ); + + m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren + } + } + if (pNodeInfoInner->isEndOfCell()) { #ifdef DEBUG @@ -3699,6 +3699,28 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren } + sal_uInt32 nShadowsAfter = pNodeInfoInner->getShadowsAfter(); + if (nShadowsAfter > 0) + { + ww8::WW8TableNodeInfoInner::Pointer_t + pTmpNodeInfoInner(new ww8::WW8TableNodeInfoInner(NULL)); + + pTmpNodeInfoInner->setDepth(pNodeInfoInner->getDepth()); + pTmpNodeInfoInner->setEndOfCell(true); + + for (sal_uInt32 n = 0; n < nShadowsAfter; ++n) + { + m_rWW8Export.WriteCR(pTmpNodeInfoInner); + + m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style # + TableInfoCell(pTmpNodeInfoInner); + m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(), + m_rWW8Export.pO->GetData() ); + + m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren + } + } + if (pNodeInfoInner->isEndOfLine()) { #ifdef DEBUG @@ -3719,6 +3741,37 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer #endif } +void MSWordExportBase::OutputStartNode( const SwStartNode & rNode) +{ +#ifdef DEBUG + ::std::clog << "" << dbg_out(&rNode) << ::std::endl; +#endif + + ww8::WW8TableNodeInfo::Pointer_t pNodeInfo = + mpTableInfo->getTableNodeInfo( &rNode ); + + if (pNodeInfo.get() != NULL) + { +#ifdef DEBUG + ::std::clog << pNodeInfo->toString() << ::std::endl; +#endif + + const ww8::WW8TableNodeInfo::Inners_t aInners = pNodeInfo->getInners(); + ww8::WW8TableNodeInfo::Inners_t::const_reverse_iterator aIt(aInners.rbegin()); + ww8::WW8TableNodeInfo::Inners_t::const_reverse_iterator aEnd(aInners.rend()); + while (aIt != aEnd) + { + ww8::WW8TableNodeInfoInner::Pointer_t pInner = aIt->second; + + AttrOutput().TableNodeInfoInner(pInner); + aIt++; + } + } +#ifdef DEBUG + ::std::clog << "" << ::std::endl; +#endif +} + void MSWordExportBase::OutputEndNode( const SwEndNode &rNode ) { #ifdef DEBUG @@ -3727,25 +3780,22 @@ void MSWordExportBase::OutputEndNode( const SwEndNode &rNode ) ww8::WW8TableNodeInfo::Pointer_t pNodeInfo = mpTableInfo->getTableNodeInfo( &rNode ); - if (pNodeInfo) - { - if (pNodeInfo.get() != NULL) - { -#ifdef DEBUG - ::std::clog << pNodeInfo->toString() << ::std::endl; + if (pNodeInfo.get() != NULL) + { +#ifdef DEBUG + ::std::clog << pNodeInfo->toString() << ::std::endl; #endif - - const ww8::WW8TableNodeInfo::Inners_t aInners = pNodeInfo->getInners(); - ww8::WW8TableNodeInfo::Inners_t::const_iterator aIt(aInners.begin()); - ww8::WW8TableNodeInfo::Inners_t::const_iterator aEnd(aInners.end()); - while (aIt != aEnd) - { - ww8::WW8TableNodeInfoInner::Pointer_t pInner = aIt->second; - AttrOutput().TableNodeInfoInner(pInner); - aIt++; - } - } - } + + const ww8::WW8TableNodeInfo::Inners_t aInners = pNodeInfo->getInners(); + ww8::WW8TableNodeInfo::Inners_t::const_iterator aIt(aInners.begin()); + ww8::WW8TableNodeInfo::Inners_t::const_iterator aEnd(aInners.end()); + while (aIt != aEnd) + { + ww8::WW8TableNodeInfoInner::Pointer_t pInner = aIt->second; + AttrOutput().TableNodeInfoInner(pInner); + aIt++; + } + } #ifdef DEBUG ::std::clog << "" << ::std::endl; #endif diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index e513db155d..9e326d7800 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -763,6 +763,9 @@ protected: virtual bool DisallowInheritingOutlineNumbering(const SwFmt &rFmt) = 0; protected: + /// Output SwStartNode + virtual void OutputStartNode( const SwStartNode& ); + /// Output SwEndNode virtual void OutputEndNode( const SwEndNode& ); @@ -1017,7 +1020,7 @@ public: const SwPageDesc* pNewPgDesc = 0 ); void Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow); - void Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem& rBox ); + void Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem * rBox ); BYTE TransCol( const Color& rCol ); bool TransBrush(const Color& rCol, WW8_SHD& rShd); WW8_BRC TranslateBorderLine(const SvxBorderLine& pLine, diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 61e8d6016c..89a4673b42 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -4297,17 +4297,24 @@ void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow) // ( Tabellenumrandungen fransen sonst aus ) // Ein WW8Bytes-Ptr wird als Ausgabe-Parameter uebergeben -void WW8Export::Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem& rBox ) +void WW8Export::Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem * pBox ) { // moeglich und vielleicht besser waere 0xffff static const USHORT aBorders[] = { BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT }; + static const SvxBorderLine aBorderLine; + const USHORT* pBrd = aBorders; for( int i = 0; i < 4; ++i, ++pBrd ) { - const SvxBorderLine* pLn = rBox.GetLine( *pBrd ); + const SvxBorderLine* pLn; + if (pBox != NULL) + pLn = pBox->GetLine( *pBrd ); + else + pLn = & aBorderLine; + Out_BorderLine(rO, pLn, 0, 0, false); } } -- cgit v1.2.3 From f050598a6cce2b40ad1b4bd46684ffb1c2dc2ebf Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 30 Apr 2010 17:40:00 +0200 Subject: gnumake2: always compile debug files, wrap them in DBG_UTIL --- sw/prj/target_lib_sw.mk | 4 ++++ sw/prj/target_lib_swd.mk | 1 + sw/source/core/except/dbgloop.cxx | 6 +++--- sw/source/core/except/errhdl.cxx | 4 ++++ sw/source/core/layout/dbg_lay.cxx | 3 +++ sw/source/core/text/txtio.cxx | 6 ++---- 6 files changed, 17 insertions(+), 7 deletions(-) (limited to 'sw/source') diff --git a/sw/prj/target_lib_sw.mk b/sw/prj/target_lib_sw.mk index 7f9cfd2971..95509f0014 100644 --- a/sw/prj/target_lib_sw.mk +++ b/sw/prj/target_lib_sw.mk @@ -709,6 +709,10 @@ $(eval $(call gb_Library_add_exception_objects,sw,\ sw/source/ui/wrtsh/wrtsh3 \ sw/source/ui/wrtsh/wrtsh4 \ sw/source/ui/wrtsh/wrtundo \ + sw/source/core/except/errhdl \ + sw/source/core/except/dbgloop \ + sw/source/core/layout/dbg_lay \ + sw/source/core/text/txtio \ )) ifeq ($(OS),LINUX) diff --git a/sw/prj/target_lib_swd.mk b/sw/prj/target_lib_swd.mk index 9d493c0bce..1d185e8f42 100644 --- a/sw/prj/target_lib_swd.mk +++ b/sw/prj/target_lib_swd.mk @@ -61,6 +61,7 @@ $(eval $(call gb_Library_add_linked_libs,swd,\ )) $(eval $(call gb_Library_add_exception_objects,swd,\ + sw/source/core/except/errhdl \ sw/source/filter/basflt/iodetect \ sw/source/ui/uno/detreg \ sw/source/ui/uno/swdet2 \ diff --git a/sw/source/core/except/dbgloop.cxx b/sw/source/core/except/dbgloop.cxx index 266a0817a2..e95c30bc34 100644 --- a/sw/source/core/except/dbgloop.cxx +++ b/sw/source/core/except/dbgloop.cxx @@ -28,9 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#ifndef DBG_UTIL -#error Wer fummelt denn an den makefiles rum? -#endif +#ifdef DBG_UTIL + #include #include "dbgloop.hxx" #include "errhdl.hxx" @@ -165,4 +164,5 @@ int main() } #endif +#endif // DBG_UTIL diff --git a/sw/source/core/except/errhdl.cxx b/sw/source/core/except/errhdl.cxx index 2c48c28c1c..b90c990ec9 100644 --- a/sw/source/core/except/errhdl.cxx +++ b/sw/source/core/except/errhdl.cxx @@ -27,6 +27,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + +#ifdef DBG_UTIL + #define _ERRHDL_CXX @@ -138,4 +141,5 @@ void AssertFail( USHORT nErrorId, const sal_Char* pFileName, USHORT nLine ) AssertFail( pMsg, pFileName, nLine ); } +#endif // DBG_UTIL diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index 4f53e680bc..d1599af163 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -28,6 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#ifdef DBG_UTIL + /* -----------------08.01.99 14:55------------------- * Und hier die Beschreibung: * @@ -863,4 +865,5 @@ void SwFrmChangesLeave::Leave() SwProtocol::Record( pFrm, PROT_FRMCHANGES, 0, &aFrm ); } +#endif // DBG_UTIL diff --git a/sw/source/core/text/txtio.cxx b/sw/source/core/text/txtio.cxx index c226e0d538..c7f80c35b0 100644 --- a/sw/source/core/text/txtio.cxx +++ b/sw/source/core/text/txtio.cxx @@ -28,10 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - -#ifndef DBG_UTIL -#error Wer fummelt denn an den makefiles? -#endif +#ifdef DBG_UTIL #include "viewsh.hxx" // IsDbg() #include "viewopt.hxx" // IsDbg() @@ -946,4 +943,5 @@ SvStream &SwDropPortion::operator<<( SvStream &rOs ) const //$ ostream #endif /* OSL_DEBUG_LEVEL */ +#endif // DBG_UTIL -- cgit v1.2.3 From c12b0eb24e0aa822a1e931afac25f03c7b08a8f4 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Mon, 3 May 2010 12:05:24 +0200 Subject: hb33tablebylayout: #i110135# handle compiler warnings --- sw/source/filter/ww8/WW8TableInfo.cxx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index 77a8e736f7..1ca73f467d 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -303,13 +303,13 @@ string WW8TableNodeInfoInner::toString() const { static char buffer[256]; snprintf(buffer, sizeof(buffer), - "", mnDepth, mnCell, mnRow, mbEndOfCell ? "yes" : "no", @@ -341,7 +341,7 @@ WW8TableNodeInfo::~WW8TableNodeInfo() { static char buffer[1024]; snprintf(buffer, sizeof(buffer), - "" + "" ,this, getDepth()); ::std::string sResult(buffer); @@ -578,7 +578,7 @@ WW8TableInfo::processSwTableByLayout(const SwTable * pTable) ::std::clog << "" << ::std::endl; snprintf(sBuffer, sizeof(sBuffer), - "", + "", aRect.Top(), aRect.Bottom(), aRect.Left(), aRect.Right()); ::std::clog << sBuffer << ::std::endl; #endif @@ -1001,10 +1001,10 @@ bool CellInfo::operator < (const CellInfo & aCellInfo) const static char sBuffer[256]; snprintf(sBuffer, sizeof(sBuffer), - "", left(), right(), -- cgit v1.2.3 From e1abfc690b170b0f0e2d561df41202dc6ef55d80 Mon Sep 17 00:00:00 2001 From: hb Date: Mon, 3 May 2010 13:55:30 +0200 Subject: hb33tablebylayout: more fiddling with archticture dependant length of variables --- sw/source/filter/ww8/WW8TableInfo.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index 1ca73f467d..6b5b385428 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -578,7 +578,7 @@ WW8TableInfo::processSwTableByLayout(const SwTable * pTable) ::std::clog << "" << ::std::endl; snprintf(sBuffer, sizeof(sBuffer), - "", + "", aRect.Top(), aRect.Bottom(), aRect.Left(), aRect.Right()); ::std::clog << sBuffer << ::std::endl; #endif @@ -1001,10 +1001,10 @@ bool CellInfo::operator < (const CellInfo & aCellInfo) const static char sBuffer[256]; snprintf(sBuffer, sizeof(sBuffer), - "", left(), right(), @@ -1289,7 +1289,7 @@ string WW8TableCellGrid::toString() static char sBuffer[1024]; while (aTopsIt != getRowTopsEnd()) { - sprintf(sBuffer, "", *aTopsIt); + sprintf(sBuffer, "", *aTopsIt); sResult += sBuffer; CellInfoMultiSet::const_iterator aCellIt = getCellsBegin(*aTopsIt); @@ -1297,7 +1297,7 @@ string WW8TableCellGrid::toString() while (aCellIt != aCellsEnd) { - snprintf(sBuffer, sizeof(sBuffer), "", + snprintf(sBuffer, sizeof(sBuffer), "", aCellIt->top(), aCellIt->bottom(), aCellIt->left(), aCellIt->right()); sResult += sBuffer; -- cgit v1.2.3 From 66f199e3c5fda08cbcc843a83f6da840bb09b04d Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 4 May 2010 12:15:53 +0200 Subject: #i110750# - remove unused method - thx cmc --- sw/source/core/inc/frame.hxx | 4 ---- sw/source/core/layout/layact.cxx | 18 ------------------ 2 files changed, 22 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 552793dc1c..6d61b3ab08 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -250,10 +250,6 @@ class SwFrm: public SwClient friend SwFrm *SaveCntnt( SwLayoutFrm *, SwFrm* pStart = NULL ); friend void RestoreCntnt( SwFrm *, SwLayoutFrm *, SwFrm *pSibling, bool bGrow ); - //Checkt ob sich beim MakePos die Pos des Frm aendert oder nicht - //layact.cxx - friend BOOL CheckPos( SwFrm *pFrm ); - #if OSL_DEBUG_LEVEL > 1 //entfernt leere SwSectionFrms aus einer Kette friend SwFrm* SwClearDummies( SwFrm* pFrm ); diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 32be148927..922cfd1b13 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1661,24 +1661,6 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) return bChanged || bTabChanged; } -// OD 31.10.2002 #104100# -// NOTE: no adjustments for vertical layout support necessary -BOOL CheckPos( SwFrm *pFrm ) -{ - if ( !pFrm->GetValidPosFlag() ) - { - Point aOld( pFrm->Frm().Pos() ); - pFrm->MakePos(); - if ( aOld != pFrm->Frm().Pos() ) - { - pFrm->Frm().Pos( aOld ); - pFrm->_InvalidatePos(); - return FALSE; - } - } - return TRUE; -} - // OD 31.10.2002 #104100# // Implement vertical layout support BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect ) -- cgit v1.2.3 From 1f5d04f83f398c5f2c1895f807965d5b92bb8a70 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 4 May 2010 15:01:14 +0200 Subject: #i101131# method - adjust conversion due to type mismatch --- sw/source/core/unocore/unosett.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 29519b292d..a63aa674b7 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -1659,9 +1659,14 @@ uno::Sequence SwXNumberingRules::GetNumberingRuleByIndex( aPropertyValues.Insert(pData, aPropertyValues.Count()); } Size aSize = rFmt.GetGraphicSize(); - aSize.Width() = TWIP_TO_MM100( aSize.Width() ); - aSize.Height() = TWIP_TO_MM100( aSize.Height() ); - pData = new PropValData((void*)&aSize, SW_PROP_NAME_STR(UNO_NAME_GRAPHIC_SIZE), ::getCppuType((const awt::Size*)0)); + // --> OD 2010-05-04 #i101131# - applying patch from CMC + // adjust conversion due to type mismatch between and +// aSize.Width() = TWIP_TO_MM100( aSize.Width() ); +// aSize.Height() = TWIP_TO_MM100( aSize.Height() ); +// pData = new PropValData((void*)&aSize, SW_PROP_NAME_STR(UNO_NAME_GRAPHIC_SIZE), ::getCppuType((const awt::Size*)0)); + awt::Size aAwtSize(TWIP_TO_MM100(aSize.Width()), TWIP_TO_MM100(aSize.Height())); + pData = new PropValData((void*)&aAwtSize, SW_PROP_NAME_STR(UNO_NAME_GRAPHIC_SIZE), ::getCppuType((const awt::Size*)0)); + // <-- aPropertyValues.Insert(pData, aPropertyValues.Count()); const SwFmtVertOrient* pOrient = rFmt.GetGraphicOrientation(); -- cgit v1.2.3 From e6a943a343add9e0d01f1d6cab21b62aca03e8a3 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 5 May 2010 15:19:33 +0200 Subject: #i111284# method - correct treatment of list level indents --- sw/source/core/text/itrcrsr.cxx | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx index 7eacdff12d..3e7d2fff57 100644 --- a/sw/source/core/text/itrcrsr.cxx +++ b/sw/source/core/text/itrcrsr.cxx @@ -57,6 +57,9 @@ #include "pordrop.hxx" #include "crstate.hxx" // SwCrsrMoveState #include // SwMultiPortion +// --> OD 2010-05-05 #i111284# +#include +// <-- // Nicht reentrant !!! // wird in GetCharRect gesetzt und im UnitUp/Down ausgewertet. @@ -143,6 +146,27 @@ void lcl_GetCharRectInsideField( SwTxtSizeInfo& rInf, SwRect& rOrig, } } +// --> OD 2010-05-05 #i111284# +namespace { + bool AreListLevelIndentsApplicableAndLabelAlignmentActive( const SwTxtNode& rTxtNode ) + { + bool bRet( false ); + + if ( rTxtNode.AreListLevelIndentsApplicable() ) + { + const SwNumFmt& rNumFmt = + rTxtNode.GetNumRule()->Get( static_cast(rTxtNode.GetActualListLevel()) ); + if ( rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + { + bRet = true; + } + } + + return bRet; + } +} // end of anonymous namespace +// <-- + /************************************************************************* * SwTxtMargin::CtorInitTxtMargin() *************************************************************************/ @@ -156,7 +180,9 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) const SvxLRSpaceItem &rSpace = pFrm->GetTxtNode()->GetSwAttrSet().GetLRSpace(); // --> OD 2009-09-08 #i95907#, #b6879723# - const bool bListLevelIndentsApplicable = pFrm->GetTxtNode()->AreListLevelIndentsApplicable(); + // --> OD 2010-05-05 #i111284# + const bool bListLevelIndentsApplicableAndLabelAlignmentActive( + AreListLevelIndentsApplicableAndLabelAlignmentActive( *(pFrm->GetTxtNode()) ) ); // <-- // @@ -181,9 +207,10 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) nLMWithNum - pNode->GetLeftMarginWithNum( sal_False ) - // --> OD 2009-09-08 #i95907#, #b6879723# + // --> OD 2010-05-05 #i111284# // rSpace.GetLeft() + // rSpace.GetTxtLeft(); - ( bListLevelIndentsApplicable + ( bListLevelIndentsApplicableAndLabelAlignmentActive ? 0 : ( rSpace.GetLeft() - rSpace.GetTxtLeft() ) ); // <-- @@ -191,8 +218,9 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) else { // --> OD 2009-09-08 #i95907#, #b6879723# + // --> OD 2010-05-05 #i111284# // if ( !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) - if ( bListLevelIndentsApplicable || + if ( bListLevelIndentsApplicableAndLabelAlignmentActive || !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) // <-- { @@ -202,9 +230,10 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) nLMWithNum - pNode->GetLeftMarginWithNum( sal_False ) - // --> OD 2009-09-08 #i95907#, #b6879723# + // --> OD 2010-05-05 #i111284# // rSpace.GetLeft() + // rSpace.GetTxtLeft(); - ( bListLevelIndentsApplicable + ( bListLevelIndentsApplicableAndLabelAlignmentActive ? 0 : ( rSpace.GetLeft() - rSpace.GetTxtLeft() ) ); // <-- @@ -292,10 +321,11 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) nFirstLineOfs = nFLOfst; // --> OD 2009-09-08 #i95907#, #b6879723# + // --> OD 2010-05-05 #i111284# // if ( pFrm->IsRightToLeft() || // !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) if ( pFrm->IsRightToLeft() || - bListLevelIndentsApplicable || + bListLevelIndentsApplicableAndLabelAlignmentActive || !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) // <-- { -- cgit v1.2.3 From 64f108a381e6151d8b1487a4ff1ad520bf51eb9b Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 6 May 2010 09:02:51 +0200 Subject: #i111172# method - adjust handling of existing indent in case that the text node is already inside a list. --- sw/source/ui/wrtsh/wrtsh1.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index e86845f348..bdfb03ddc3 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -1387,7 +1387,17 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) // <-- if ( ( nTxtNodeIndent + nWidthOfTabs ) != 0 ) { - const SwTwips nIndentChange = nTxtNodeIndent + nWidthOfTabs; + // --> OD 2010-05-05 #i111172# + // If text node is already inside a list, assure that the indents + // are the same. Thus, adjust the indent change value by subtracting + // indents of to be applied list style. + SwTwips nIndentChange = nTxtNodeIndent + nWidthOfTabs; + if ( pTxtNode->GetNumRule() ) + { + const SwNumFmt aFmt( aNumRule.Get( 0 ) ); + nIndentChange -= aFmt.GetIndentAt() + aFmt.GetFirstLineIndent(); + } + // <-- aNumRule.ChangeIndent( nIndentChange ); } } -- cgit v1.2.3 From 93ed6868eef5feda0a8f664b0d0231c84a363a51 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 6 May 2010 17:02:44 +0200 Subject: #i103711# - workaround in case that a paragraph only overrules the left indent, but not the first line indent of the applied list style --- sw/source/filter/ww8/ww8par.cxx | 45 +++++++++++++++++++++++++++++----------- sw/source/filter/ww8/ww8par.hxx | 13 ++++++++++-- sw/source/filter/ww8/ww8par3.cxx | 4 +++- sw/source/filter/ww8/ww8par6.cxx | 27 ++++++++++++++++++++++-- 4 files changed, 72 insertions(+), 17 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 58257baebb..34a46cdf2f 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -844,13 +844,28 @@ long lcl_GetTrueMargin(const SvxLRSpaceItem &rLR, const SwNumFmt &rFmt, return nExtraListIndent > 0 ? nExtraListIndent : 0; } -void SyncIndentWithList(SvxLRSpaceItem &rLR, const SwNumFmt &rFmt) +// --> OD 2010-05-06 #i103711# +void SyncIndentWithList( SvxLRSpaceItem &rLR, + const SwNumFmt &rFmt, + const bool bFirstLineOfstSet ) { - long nWantedFirstLinePos; - long nExtraListIndent = lcl_GetTrueMargin(rLR, rFmt, nWantedFirstLinePos); - rLR.SetTxtLeft(nWantedFirstLinePos - nExtraListIndent); - rLR.SetTxtFirstLineOfst(0); + if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) + { + long nWantedFirstLinePos; + long nExtraListIndent = lcl_GetTrueMargin(rLR, rFmt, nWantedFirstLinePos); + rLR.SetTxtLeft(nWantedFirstLinePos - nExtraListIndent); + rLR.SetTxtFirstLineOfst(0); + } + else if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + { + if ( !bFirstLineOfstSet && + rFmt.GetFirstLineIndent() != 0 ) + { + rLR.SetTxtFirstLineOfst( rFmt.GetFirstLineIndent() ); + } + } } +// <-- const SwNumFmt* SwWW8FltControlStack::GetNumFmtFromStack(const SwPosition &rPos, const SwTxtNode &rTxtNode) @@ -907,16 +922,19 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, pNum = GetNumFmtFromStack(*aRegion.GetPoint(), *pTxtNode); if (!pNum) + { pNum = GetNumFmtFromTxtNode(*pTxtNode); + } - // --> OD 2008-06-03 #i86652# -// if (pNum) - if ( pNum && - pNum->GetPositionAndSpaceMode() == - SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) - // <-- + if ( pNum ) { - SyncIndentWithList(aNewLR, *pNum); + // --> OD 2010-05-06 #i103711# + const bool bFirstLineIndentSet = + ( rReader.maTxtNodesHavingFirstLineOfstSet.end() != + rReader.maTxtNodesHavingFirstLineOfstSet.find( pNode ) ); + SyncIndentWithList( aNewLR, *pNum, + bFirstLineIndentSet ); + // <-- } if (aNewLR == aOldLR) @@ -3185,6 +3203,9 @@ SwWW8ImplReader::SwWW8ImplReader(BYTE nVersionPara, SvStorage* pStorage, maGrfNameGenerator(bNewDoc,String('G')), maParaStyleMapper(rD), maCharStyleMapper(rD), + // --> OD 2010-05-06 #i103711# + maTxtNodesHavingFirstLineOfstSet(), + // <-- pMSDffManager(0), mpAtnNames(0), pAuthorInfos(0), diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 56555bdb2f..e9bec63f83 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -956,6 +956,10 @@ private: WW8PLCFMan* pPlcxMan; std::map aLinkStringMap; + // --> OD 2010-05-06 #i103711# + std::set maTxtNodesHavingFirstLineOfstSet; + // <-- + WW8RStyle* pStyles; // Pointer auf die Style-Einleseklasse SwFmt* pAktColl; // gerade zu erzeugende Collection // ( ist ausserhalb einer Style-Def immer 0 ) @@ -1155,7 +1159,10 @@ private: void ImportTox( int nFldId, String aStr ); void EndSprm( USHORT nId ); - void NewAttr( const SfxPoolItem& rAttr ); + // --> OD 2010-05-06 #i103711# + void NewAttr( const SfxPoolItem& rAttr, + const bool bFirstLineOfStSet = false ); + // <-- bool GetFontParams(USHORT, FontFamily&, String&, FontPitch&, rtl_TextEncoding&); @@ -1612,7 +1619,9 @@ public: // eigentlich private, geht aber leider nur public bool CanUseRemoteLink(const String &rGrfName); void UseListIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt); void SetStyleIndent(SwWW8StyInf &rStyleInfo, const SwNumFmt &rFmt); -void SyncIndentWithList(SvxLRSpaceItem &rLR, const SwNumFmt &rFmt); +void SyncIndentWithList( SvxLRSpaceItem &rLR, + const SwNumFmt &rFmt, + const bool bFirstLineOfStSet ); long GetListFirstLineIndent(const SwNumFmt &rFmt); String BookmarkToWriter(const String &rBookmark); bool RTLGraphicsHack(SwTwips &rLeft, SwTwips nWidth, diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index fafaa10fe9..5ebabe8e46 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1697,7 +1697,9 @@ void SetStyleIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt) { SvxLRSpaceItem aLR(ItemGet(*rStyle.pFmt, RES_LR_SPACE)); if (rStyle.bListReleventIndentSet) - SyncIndentWithList(aLR, rFmt); + { + SyncIndentWithList( aLR, rFmt, false ); + } else { aLR.SetTxtLeft(0); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 6f4e4edd03..6dc9ec30df 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2715,7 +2715,8 @@ bool SwWW8ImplReader::TestSameApo(const ApoTestResults &rApo, # Attribut - Verwaltung #**************************************************************************/ -void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr ) +void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr, + const bool bFirstLineOfStSet ) { if( !bNoAttrImport ) // zum Ignorieren von Styles beim Doc-Einfuegen { @@ -2725,11 +2726,24 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr ) pAktColl->SetFmtAttr(rAttr); } else if (pAktItemSet) + { pAktItemSet->Put(rAttr); + } else if (rAttr.Which() == RES_FLTR_REDLINE) + { mpRedlineStack->open(*pPaM->GetPoint(), rAttr); + } else + { pCtrlStck->NewAttr(*pPaM->GetPoint(), rAttr); + // --> OD 2010-05-06 #i103711# + if ( bFirstLineOfStSet ) + { + const SwNode* pNd = &(pPaM->GetPoint()->nNode.GetNode()); + maTxtNodesHavingFirstLineOfstSet.insert( pNd ); + } + // <-- + } if (mpPostProcessAttrsInfo && mpPostProcessAttrsInfo->mbCopy) mpPostProcessAttrsInfo->mItemSet.Put(rAttr); @@ -3958,6 +3972,10 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen ) } } + // --> OD 2010-05-06 #i103711# + bool bFirstLinOfstSet( false ); + // <-- + switch (nId) { //sprmPDxaLeft @@ -3998,7 +4016,10 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen ) aLR.SetTxtFirstLineOfst(nPara); if (pAktColl) + { pCollA[nAktColl].bListReleventIndentSet = true; + } + bFirstLinOfstSet = true; break; //sprmPDxaRight case 16: @@ -4010,7 +4031,9 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen ) return; } - NewAttr(aLR); + // --> OD 2010-05-06 #i103711# + NewAttr( aLR, bFirstLinOfstSet ); + // <-- } // Sprm 20 -- cgit v1.2.3 From 15282e8f316b229beb59e2ad6963eabbc9082046 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 10 May 2010 13:59:35 +0200 Subject: CWS mba33issues01: #i93818#: prevent crash by not forwarding reference device --- sw/source/ui/docvw/postit.cxx | 6 ------ 1 file changed, 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx index 363a653670..37ddfef978 100644 --- a/sw/source/ui/docvw/postit.cxx +++ b/sw/source/ui/docvw/postit.cxx @@ -730,12 +730,6 @@ void SwMarginWin::InitControls() mpOutliner->SetUpdateMode( TRUE ); Rescale(); - OutputDevice* pDev = aShell->GetDoc()->getReferenceDevice(TRUE); - if ( pDev ) - { - mpOutliner->SetRefDevice( pDev ); - } - mpOutlinerView = new OutlinerView ( mpOutliner, mpPostItTxt ); mpOutlinerView->SetBackgroundColor(COL_TRANSPARENT); mpOutliner->InsertView(mpOutlinerView ); -- cgit v1.2.3 From 5695e06958bfbf21e9db7c94342b76a612323f20 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 10 May 2010 19:01:40 +0200 Subject: sw33bf04: #i111286#: crash when pasting footnote into frame (patch by dtardon) --- sw/source/core/txtnode/ndtxt.cxx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 7481a3ec79..2e9f2ca54b 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1588,6 +1588,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, // Del-Array fuer alle RefMarks ohne Ausdehnung SwpHts aRefMrkArr; + USHORT nDeletedDummyChars(0); //Achtung: kann ungueltig sein!! for (USHORT n = 0; ( n < nSize ); ++n) { @@ -1681,9 +1682,19 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, } else { - pNewHt = pDest->InsertItem( pHt->GetAttr(), nAttrStt, - nAttrEnd, nsSetAttrMode::SETATTR_NOTXTATRCHR ); - lcl_CopyHint( nWhich, pHt, pNewHt, pOtherDoc, pDest ); + pNewHt = pDest->InsertItem( pHt->GetAttr(), nAttrStt - nDeletedDummyChars, + nAttrEnd - nDeletedDummyChars, nsSetAttrMode::SETATTR_NOTXTATRCHR ); + if (pNewHt) + { + lcl_CopyHint( nWhich, pHt, pNewHt, pOtherDoc, pDest ); + } + else if (pHt->HasDummyChar()) + { + // The attribute that has failed to be copied would insert + // dummy char, so positions of the following attributes have + // to be shifted by one to compensate for that missing char. + ++nDeletedDummyChars; + } } if( RES_TXTATR_REFMARK == nWhich && !pEndIdx && !bCopyRefMark ) -- cgit v1.2.3 From c0165ab58fe1674fafd165022cbd76057f282bfd Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 10 May 2010 19:07:52 +0200 Subject: sw33bf04: #i111286#: clean up footnote cruft in SwTxtNode::CopyText() --- sw/inc/txtftn.hxx | 2 +- sw/source/core/txtnode/atrftn.cxx | 38 ++++++++++++++++++++++---------------- sw/source/core/txtnode/ndtxt.cxx | 25 ++++--------------------- 3 files changed, 27 insertions(+), 38 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx index e7fee60630..31051450e9 100644 --- a/sw/inc/txtftn.hxx +++ b/sw/inc/txtftn.hxx @@ -49,7 +49,7 @@ public: inline SwNodeIndex *GetStartNode() const { return m_pStartNode; } void SetStartNode( const SwNodeIndex *pNode, BOOL bDelNodes = TRUE ); void SetNumber( const USHORT nNumber, const String* = 0 ); - void CopyFtn( SwTxtFtn *pDest ) const; + void CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) const; // get and set TxtNode pointer inline const SwTxtNode& GetTxtNode() const; diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx index 5334358a07..b78633895f 100644 --- a/sw/source/core/txtnode/atrftn.cxx +++ b/sw/source/core/txtnode/atrftn.cxx @@ -289,39 +289,45 @@ void SwTxtFtn::SetNumber( const USHORT nNewNum, const XubString* pStr ) } // Die Fussnoten duplizieren -void SwTxtFtn::CopyFtn( SwTxtFtn *pDest ) const +void SwTxtFtn::CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) const { - if ( m_pStartNode && pDest->GetStartNode() ) + if (m_pStartNode && !rDest.GetStartNode()) { - // die Fussnoten koennen in unterschiedlichen Dokumenten stehen !! - SwDoc* pDstDoc = pDest->m_pTxtNode->GetDoc(); + // dest missing node section? create it here! + // (happens in SwTxtNode::CopyText if pDest == this) + rDest.MakeNewTextSection( rDestNode.GetNodes() ); + } + if (m_pStartNode && rDest.GetStartNode()) + { + // footnotes not necessarily in same document! + SwDoc *const pDstDoc = rDestNode.GetDoc(); SwNodes &rDstNodes = pDstDoc->GetNodes(); - // Wir kopieren nur den Inhalt der Sektion + // copy only the content of the section SwNodeRange aRg( *m_pStartNode, 1, *m_pStartNode->GetNode().EndOfSectionNode() ); - // Wir fuegen auf dem Ende von pDest ein, d.h. die Nodes - // werden angehaengt. nDestLen haelt die Anzahl der CntNodes - // in pDest _vor_ dem Kopieren. - SwNodeIndex aStart( *(pDest->GetStartNode()) ); + // insert at the end of rDest, i.e., the nodes are appended. + // nDestLen contains number of CntntNodes in rDest _before_ copy. + SwNodeIndex aStart( *(rDest.GetStartNode()) ); SwNodeIndex aEnd( *aStart.GetNode().EndOfSectionNode() ); ULONG nDestLen = aEnd.GetIndex() - aStart.GetIndex() - 1; m_pTxtNode->GetDoc()->CopyWithFlyInFly( aRg, 0, aEnd, TRUE ); - // Wenn die Dest-Sektion nicht leer war, so muessen die alten - // Nodes geloescht werden: - // Vorher: Src: SxxxE, Dst: SnE - // Nachher: Src: SxxxE, Dst: SnxxxE - // und Src: SxxxE, Dst: SxxxE + // in case the destination section was not empty, delete the old nodes + // before: Src: SxxxE, Dst: SnE + // now: Src: SxxxE, Dst: SnxxxE + // after: Src: SxxxE, Dst: SxxxE aStart++; rDstNodes.Delete( aStart, nDestLen ); } - // Der benutzerdefinierte String muss auch uebertragen werden. + // also copy user defined number string if( GetFtn().aNumber.Len() ) - ((SwFmtFtn&)pDest->GetFtn()).aNumber = GetFtn().aNumber; + { + const_cast(rDest.GetFtn()).aNumber = GetFtn().aNumber; + } } diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 2e9f2ca54b..18111292f4 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1278,11 +1278,11 @@ void lcl_CopyHint( const USHORT nWhich, const SwTxtAttr * const pHt, ASSERT( nWhich == pHt->Which(), "Falsche Hint-Id" ); switch( nWhich ) { - // Wenn wir es mit einem Fussnoten-Attribut zu tun haben, - // muessen wir natuerlich auch den Fussnotenbereich kopieren. + // copy nodesarray section with footnote content case RES_TXTATR_FTN : + ASSERT(pDest, "lcl_CopyHint: no destination text node?"); static_cast(pHt)->CopyFtn( - static_cast(pNewHt)); + *static_cast(pNewHt), *pDest); break; // Beim Kopieren von Feldern in andere Dokumente @@ -1660,24 +1660,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, pNewHt = MakeTxtAttr( *GetDoc(), pHt->GetAttr(), nAttrStt, nAttrEnd ); -//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -//JP 23.04.95: erstmal so gesondert hier behandeln. Am Besten ist es -// aber im CopyFtn wenn die pDestFtn keinen StartNode hat, -// sich diesen dann anlegt. -// Aber so kurz vor der BETA besser nicht anfassen. - if( RES_TXTATR_FTN == nWhich ) - { - SwTxtFtn* pFtn = (SwTxtFtn*)pNewHt; - pFtn->ChgTxtNode( this ); - pFtn->MakeNewTextSection( GetNodes() ); - lcl_CopyHint( nWhich, pHt, pFtn, 0, 0 ); - pFtn->ChgTxtNode( 0 ); - } - else -//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - { - lcl_CopyHint( nWhich, pHt, pNewHt, 0, pDest ); - } + lcl_CopyHint(nWhich, pHt, pNewHt, 0, pDest); aArr.C40_INSERT( SwTxtAttr, pNewHt, aArr.Count() ); } else -- cgit v1.2.3 From a833214d8950ba0fc23e7e1b5eba633743d0f8de Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 11 May 2010 15:33:35 +0200 Subject: #i105414# workaround in case that a paragraph only overrules the first line indent, but not the left indent of the applied list style --- sw/source/filter/ww8/ww8par.cxx | 21 ++++++++++++++++++--- sw/source/filter/ww8/ww8par.hxx | 13 +++++++++++-- sw/source/filter/ww8/ww8par3.cxx | 5 ++++- sw/source/filter/ww8/ww8par6.cxx | 23 +++++++++++++++++++++-- 4 files changed, 54 insertions(+), 8 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 34a46cdf2f..fb94565cf7 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -845,9 +845,11 @@ long lcl_GetTrueMargin(const SvxLRSpaceItem &rLR, const SwNumFmt &rFmt, } // --> OD 2010-05-06 #i103711# +// --> OD 2010-05-11 #i105414# void SyncIndentWithList( SvxLRSpaceItem &rLR, const SwNumFmt &rFmt, - const bool bFirstLineOfstSet ) + const bool bFirstLineOfstSet, + const bool bLeftIndentSet ) { if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { @@ -858,11 +860,16 @@ void SyncIndentWithList( SvxLRSpaceItem &rLR, } else if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { - if ( !bFirstLineOfstSet && + if ( !bFirstLineOfstSet && bLeftIndentSet && rFmt.GetFirstLineIndent() != 0 ) { rLR.SetTxtFirstLineOfst( rFmt.GetFirstLineIndent() ); } + else if ( bFirstLineOfstSet && !bLeftIndentSet && + rFmt.GetIndentAt() != 0 ) + { + rLR.SetTxtLeft( rFmt.GetIndentAt() ); + } } } // <-- @@ -932,8 +939,13 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, const bool bFirstLineIndentSet = ( rReader.maTxtNodesHavingFirstLineOfstSet.end() != rReader.maTxtNodesHavingFirstLineOfstSet.find( pNode ) ); + // --> OD 2010-05-11 #i105414# + const bool bLeftIndentSet = + ( rReader.maTxtNodesHavingLeftIndentSet.end() != + rReader.maTxtNodesHavingLeftIndentSet.find( pNode ) ); SyncIndentWithList( aNewLR, *pNum, - bFirstLineIndentSet ); + bFirstLineIndentSet, + bLeftIndentSet ); // <-- } @@ -3206,6 +3218,9 @@ SwWW8ImplReader::SwWW8ImplReader(BYTE nVersionPara, SvStorage* pStorage, // --> OD 2010-05-06 #i103711# maTxtNodesHavingFirstLineOfstSet(), // <-- + // --> OD 2010-05-11 #i105414# + maTxtNodesHavingLeftIndentSet(), + // <-- pMSDffManager(0), mpAtnNames(0), pAuthorInfos(0), diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index e9bec63f83..ace148ed8b 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -959,6 +959,9 @@ private: // --> OD 2010-05-06 #i103711# std::set maTxtNodesHavingFirstLineOfstSet; // <-- + // --> OD 2010-05-11 #i105414# + std::set maTxtNodesHavingLeftIndentSet; + // <-- WW8RStyle* pStyles; // Pointer auf die Style-Einleseklasse SwFmt* pAktColl; // gerade zu erzeugende Collection @@ -1160,8 +1163,10 @@ private: void EndSprm( USHORT nId ); // --> OD 2010-05-06 #i103711# + // --> OD 2010-05-11 #i105414# void NewAttr( const SfxPoolItem& rAttr, - const bool bFirstLineOfStSet = false ); + const bool bFirstLineOfStSet = false, + const bool bLeftIndentSet = false ); // <-- bool GetFontParams(USHORT, FontFamily&, String&, FontPitch&, @@ -1619,9 +1624,13 @@ public: // eigentlich private, geht aber leider nur public bool CanUseRemoteLink(const String &rGrfName); void UseListIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt); void SetStyleIndent(SwWW8StyInf &rStyleInfo, const SwNumFmt &rFmt); +// --> OD 2010-05-06 #i103711# +// --> OD 2010-05-11 #i105414# void SyncIndentWithList( SvxLRSpaceItem &rLR, const SwNumFmt &rFmt, - const bool bFirstLineOfStSet ); + const bool bFirstLineOfStSet, + const bool bLeftIndentSet ); +// <-- long GetListFirstLineIndent(const SwNumFmt &rFmt); String BookmarkToWriter(const String &rBookmark); bool RTLGraphicsHack(SwTwips &rLeft, SwTwips nWidth, diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 5ebabe8e46..d39fdb19d7 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1698,7 +1698,10 @@ void SetStyleIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt) SvxLRSpaceItem aLR(ItemGet(*rStyle.pFmt, RES_LR_SPACE)); if (rStyle.bListReleventIndentSet) { - SyncIndentWithList( aLR, rFmt, false ); + // --> OD 2010-05-06 #i103711# + // --> OD 2010-05-11 #i105414# + SyncIndentWithList( aLR, rFmt, false, false ); + // <-- } else { diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 6dc9ec30df..8af111473d 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2716,7 +2716,8 @@ bool SwWW8ImplReader::TestSameApo(const ApoTestResults &rApo, #**************************************************************************/ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr, - const bool bFirstLineOfStSet ) + const bool bFirstLineOfStSet, + const bool bLeftIndentSet ) { if( !bNoAttrImport ) // zum Ignorieren von Styles beim Doc-Einfuegen { @@ -2743,6 +2744,13 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr, maTxtNodesHavingFirstLineOfstSet.insert( pNd ); } // <-- + // --> OD 2010-05-11 #i105414# + if ( bLeftIndentSet ) + { + const SwNode* pNd = &(pPaM->GetPoint()->nNode.GetNode()); + maTxtNodesHavingLeftIndentSet.insert( pNd ); + } + // <-- } if (mpPostProcessAttrsInfo && mpPostProcessAttrsInfo->mbCopy) @@ -3975,6 +3983,9 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen ) // --> OD 2010-05-06 #i103711# bool bFirstLinOfstSet( false ); // <-- + // --> OD 2010-05-11 #i105414# + bool bLeftIndentSet( false ); + // <-- switch (nId) { @@ -3984,7 +3995,12 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen ) case 0x845E: aLR.SetTxtLeft( nPara ); if (pAktColl) + { pCollA[nAktColl].bListReleventIndentSet = true; + } + // --> OD 2010-05-11 #i105414# + bLeftIndentSet = true; + // <-- break; //sprmPDxaLeft1 case 19: @@ -4019,7 +4035,9 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen ) { pCollA[nAktColl].bListReleventIndentSet = true; } + // --> OD 2010-05-06 #i103711# bFirstLinOfstSet = true; + // <-- break; //sprmPDxaRight case 16: @@ -4032,7 +4050,8 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen ) } // --> OD 2010-05-06 #i103711# - NewAttr( aLR, bFirstLinOfstSet ); + // --> OD 2010-05-11 #i105414# + NewAttr( aLR, bFirstLinOfstSet, bLeftIndentSet ); // <-- } -- cgit v1.2.3 From f210a7e60fd8981d651640eedaea4f12e6ba124c Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 11 May 2010 16:49:04 +0200 Subject: #i10000# #i111317# linux non-pro build break --- sw/source/core/doc/dbgoutsw.cxx | 1 + sw/source/core/text/inftxt.cxx | 2 +- sw/source/filter/ww8/WW8Sttbf.cxx | 1 + sw/source/filter/ww8/wrtw8nds.cxx | 2 +- sw/source/filter/ww8/wrtww8gr.cxx | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx index 2bfb6b8d98..e7dd04c80d 100644 --- a/sw/source/core/doc/dbgoutsw.cxx +++ b/sw/source/core/doc/dbgoutsw.cxx @@ -52,6 +52,7 @@ #include #include #include +#include using namespace std; diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 235746a735..3637441106 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -77,7 +77,7 @@ #include #include #include - +#include // --> FME 2004-06-08 #i12836# enhanced pdf export #include // <-- diff --git a/sw/source/filter/ww8/WW8Sttbf.cxx b/sw/source/filter/ww8/WW8Sttbf.cxx index ad4d9b95af..66bf6eedf2 100644 --- a/sw/source/filter/ww8/WW8Sttbf.cxx +++ b/sw/source/filter/ww8/WW8Sttbf.cxx @@ -29,6 +29,7 @@ #include #include #include "WW8Sttbf.hxx" +#include namespace ww8 { diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index ad18fa7a36..d0a9f5ee3e 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -106,7 +106,7 @@ #include #include - +#include using namespace ::com::sun::star; using namespace ::com::sun::star::i18n; diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index 2011bdc942..3e54a9ea88 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -77,6 +77,7 @@ #include "escher.hxx" #include "docsh.hxx" +#include using namespace ::com::sun::star; using namespace nsFieldFlags; -- cgit v1.2.3 From 011f0bf18259c882bea4fbea8c09e17057bcff84 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Wed, 12 May 2010 12:42:08 +0200 Subject: tl78: get/set password to modify from SwDocShell --- sw/source/filter/ww8/wrtww8.cxx | 22 +++++++++++++++++++--- sw/source/filter/ww8/ww8par.cxx | 13 +++++++++---- 2 files changed, 28 insertions(+), 7 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 916ad970df..6168f2c4a4 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -255,13 +255,30 @@ static void WriteDop( WW8Export& rWrt ) SwDocShell *pDocShell(rWrt.pDoc->GetDocShell()); DBG_ASSERT(pDocShell, "no SwDocShell"); uno::Reference xDocProps; + uno::Reference xProps; if (pDocShell) { + uno::Reference xModelComp(pDocShell->GetModel(), + uno::UNO_QUERY); + xProps = uno::Reference(xModelComp, + uno::UNO_QUERY); uno::Reference xDPS( - pDocShell->GetModel(), uno::UNO_QUERY_THROW); + xModelComp, uno::UNO_QUERY_THROW); xDocProps = xDPS->getDocumentProperties(); DBG_ASSERT(xDocProps.is(), "DocumentProperties is null"); + + rDop.lKeyProtDoc = pDocShell->GetModifyPasswordHash(); } + if ((rWrt.pSepx && rWrt.pSepx->DocumentIsProtected()) || + rDop.lKeyProtDoc != 0) + { + rDop.fProtEnabled = 1; + } + else + { + rDop.fProtEnabled = 0; + } + if (!xDocProps.is()) { rDop.dttmCreated = rDop.dttmRevised = rDop.dttmLastPrint = 0x45FBAC69; } else { @@ -277,9 +294,8 @@ static void WriteDop( WW8Export& rWrt ) Date aD3(uDT.Day, uDT.Month, uDT.Year); Time aT3(uDT.Hours, uDT.Minutes, uDT.Seconds, uDT.HundredthSeconds); rDop.dttmLastPrint = sw::ms::DateTime2DTTM(DateTime(aD3,aT3)); - } - rDop.fProtEnabled = rWrt.pSepx ? rWrt.pSepx->DocumentIsProtected() : 0; + } // auch damit werden die DocStat-Felder in Kopf-/Fusszeilen nicht korrekt // berechnet. diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 58257baebb..dd48e2ec25 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1387,14 +1387,19 @@ void SwWW8ImplReader::ImportDop() uno::Reference xInfo = xDocProps->getPropertySetInfo(); sal_Bool bValue = false; - if (xInfo.is() && - xInfo->hasPropertyByName(C2U("ApplyFormDesignMode"))) + if (xInfo.is()) { - xDocProps->setPropertyValue(C2U("ApplyFormDesignMode"), - cppu::bool2any(bValue)); + if (xInfo->hasPropertyByName(C2U("ApplyFormDesignMode"))) + { + xDocProps->setPropertyValue(C2U("ApplyFormDesignMode"), + cppu::bool2any(bValue)); + } } } } + + mpDocShell->SetModifyPasswordHash(pWDop->lKeyProtDoc); + const SvtFilterOptions* pOpt = SvtFilterOptions::Get(); sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields()); if (bUseEnhFields) { -- cgit v1.2.3 From 7b4e39f628fbd75d33e778e47eb70cb482a8f4e5 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 12 May 2010 12:44:10 +0200 Subject: sw33bf04: #i105562# - correct handling of empty set list style due to outline level attribute --- sw/source/core/txtnode/ndtxt.cxx | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 7481a3ec79..543def8353 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -4386,6 +4386,10 @@ namespace { if ( pNumRuleItem.GetValue().Len() > 0 ) { mbAddTxtNodeToList = true; + // --> OD 2010-05-12 #i105562# + // + mrTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); + // <-- } } break; @@ -4397,10 +4401,6 @@ namespace { dynamic_cast(pItem); ASSERT( pListIdItem.GetValue().Len() > 0, " - empty list id attribute not excepted. Serious defect -> please inform OD." ); -// const SfxStringItem& rListIdItemOfTxtNode = -// dynamic_cast( -// rTxtNode.GetAttr( RES_PARATR_LIST_ID )); -// if ( pListIdItem.GetValue() != rListIdItemOfTxtNode.GetValue() ) const String sListIdOfTxtNode = rTxtNode.GetListId(); if ( pListIdItem.GetValue() != sListIdOfTxtNode ) { @@ -4514,11 +4514,6 @@ namespace { { const SfxStringItem* pListIdItem = dynamic_cast(pItem); -// const SfxStringItem& rListIdItemOfTxtNode = -// dynamic_cast( -// mrTxtNode.GetAttr( RES_PARATR_LIST_ID )); -// if ( pListIdItem && -// pListIdItem->GetValue() != rListIdItemOfTxtNode.GetValue() ) const String sListIdOfTxtNode = mrTxtNode.GetListId(); if ( pListIdItem && pListIdItem->GetValue() != sListIdOfTxtNode ) @@ -4923,7 +4918,9 @@ namespace { mrTxtNode.AddToList(); } // --> OD 2008-11-19 #i70748# - else if ( dynamic_cast(mrTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, FALSE )).GetValue() > 0 ) + // --> OD 2010-05-12 #i105562# + else if ( mrTxtNode.GetpSwAttrSet() && + dynamic_cast(mrTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, FALSE )).GetValue() > 0 ) { mrTxtNode.SetEmptyListStyleDueToSetOutlineLevelAttr(); } -- cgit v1.2.3 From 0c11606a02245909cd2eb52e80f859639433e2a6 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 12 May 2010 16:03:59 +0200 Subject: sw33bf04: #i91658# method - remove unnecessary assertion --- sw/inc/htmltbl.hxx | 2 +- sw/source/core/doc/htmltbl.cxx | 34 +++++++--------------------------- sw/source/core/docnode/swbaslnk.cxx | 10 ++++++---- sw/source/filter/html/htmlform.cxx | 8 +++++--- sw/source/filter/html/swhtml.cxx | 2 +- 5 files changed, 20 insertions(+), 36 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx index 6b5544a9ae..4c3918a7e1 100644 --- a/sw/inc/htmltbl.hxx +++ b/sw/inc/htmltbl.hxx @@ -267,6 +267,7 @@ class SwHTMLTableLayout DECL_STATIC_LINK( SwHTMLTableLayout, DelayedResize_Impl, void* ); + static USHORT GetBrowseWidthByVisArea( const SwDoc& rDoc ); public: SwHTMLTableLayout( const SwTable *pSwTbl, @@ -348,7 +349,6 @@ public: // oder eine ViewShell vorhanden ist. Sonst wird 0 zurueckgegeben. // (Wird vom HTML-Filter benoetigt, da der nicht an das Layout kommt.) static USHORT GetBrowseWidth( const SwDoc& rDoc ); - static USHORT GetBrowseWidthByVisArea( const SwDoc& rDoc ); // Ermitteln der verfuegbaren Breite uber den Tabellen-Frame USHORT GetBrowseWidthByTabFrm( const SwTabFrm& rTabFrm ) const; diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx index ad29e27474..d3c8d7f30c 100644 --- a/sw/source/core/doc/htmltbl.cxx +++ b/sw/source/core/doc/htmltbl.cxx @@ -377,32 +377,12 @@ USHORT SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc ) return (USHORT)pPageFrm->Prt().Width(); } - // Sonst versuchen wir es ueber die ViewShell - USHORT nWidth = GetBrowseWidthByVisArea( rDoc ); - if( !nWidth ) - { - // Und wenn das auch nicht geht, gibt es noch die ActualSize an der - // DocShell. - if( rDoc.GetDocShell() && GetpApp() && GetpApp()->GetDefaultDevice() ) - { - // this case shouldn't happen because the filter always waits until - // a view has been created -/* - nWidth = (USHORT)Application::GetDefaultDevice() - ->PixelToLogic( rDoc.GetDocShell()->GetActualSize(), - MapMode( MAP_TWIP ) ).Width(); -*/ - ASSERT( nWidth, "No browse width available" ); - } -#ifdef DBG_UTIL - else - { - // und wenn das auch nicht klappt, gibt es zur Zeit keine Breite - ASSERT( nWidth, "No browse width available" ); - } -#endif - } - return nWidth; + // --> OD 2010-05-12 #i91658# + // Assertion removed which state that no browse width is available. + // Investigation reveals that all calls can handle the case that no browse + // width is provided. + return GetBrowseWidthByVisArea( rDoc ); + // <-- } USHORT SwHTMLTableLayout::GetBrowseWidthByTabFrm( @@ -1859,7 +1839,7 @@ BOOL SwHTMLTableLayout::Resize( USHORT nAbsAvail, BOOL bRecalc, // weil sond die Umschaltung von relativ nach absolut nicht funktioniert. if( pDoc->GetRootFrm() && pDoc->get(IDocumentSettingAccess::BROWSE_MODE) ) { - USHORT nVisAreaWidth = GetBrowseWidthByVisArea( *pDoc ); + const USHORT nVisAreaWidth = GetBrowseWidthByVisArea( *pDoc ); if( nVisAreaWidth < nAbsAvail && !FindFlyFrmFmt() ) nAbsAvail = nVisAreaWidth; } diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index 6034e7de89..73ddb89553 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -357,17 +357,19 @@ BOOL SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd ) 0 != (pANd = pDoc->GetNodes()[pAPos->nNode]) && 0 != (pTblNd = pANd->FindTableNode()) ) { - BOOL bLastGrf = !pTblNd->GetTable().DecGrfsThatResize(); + const BOOL bLastGrf = !pTblNd->GetTable().DecGrfsThatResize(); SwHTMLTableLayout *pLayout = pTblNd->GetTable().GetHTMLTableLayout(); if( pLayout ) { - USHORT nBrowseWidth = - pLayout->GetBrowseWidthByTable( *pDoc ); - if( nBrowseWidth ) + const USHORT nBrowseWidth = + pLayout->GetBrowseWidthByTable( *pDoc ); + if ( nBrowseWidth ) + { pLayout->Resize( nBrowseWidth, TRUE, TRUE, bLastGrf ? HTMLTABLE_RESIZE_NOW : 500 ); + } } } } diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index b1e770edec..b24a2bc3bf 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -547,18 +547,20 @@ void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height ) 0 != (pANd = pDoc->GetNodes()[pAPos->nNode]) && 0 != (pTblNd = pANd->FindTableNode()) ) { - sal_Bool bLastGrf = !pTblNd->GetTable().DecGrfsThatResize(); + const sal_Bool bLastGrf = !pTblNd->GetTable().DecGrfsThatResize(); SwHTMLTableLayout *pLayout = pTblNd->GetTable().GetHTMLTableLayout(); if( pLayout ) { - sal_uInt16 nBrowseWidth = + const sal_uInt16 nBrowseWidth = pLayout->GetBrowseWidthByTable( *pDoc ); - if( nBrowseWidth ) + if ( nBrowseWidth ) + { pLayout->Resize( nBrowseWidth, sal_True, sal_True, bLastGrf ? HTMLTABLE_RESIZE_NOW : 500 ); + } } } } diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index df4d1df236..a15300b76c 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -4957,7 +4957,7 @@ USHORT SwHTMLParser::ToTwips( USHORT nPixel ) const SwTwips SwHTMLParser::GetCurrentBrowseWidth() { - SwTwips nWidth = SwHTMLTableLayout::GetBrowseWidth( *pDoc ); + const SwTwips nWidth = SwHTMLTableLayout::GetBrowseWidth( *pDoc ); if( nWidth ) return nWidth; -- cgit v1.2.3 From d4d208a1fddedd964b24fe146326b24dde1d7ec9 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 14 May 2010 13:52:41 +0200 Subject: sw33bf04: #i111177#: work around unxsols4 compiler bug --- sw/source/core/unocore/unoftn.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index ce57ccc750..1a23ce49df 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -78,7 +78,9 @@ public: , m_rThis(rThis) , m_bIsEndnote(bIsEndnote) , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) - , m_bIsDescriptor(0 == pFootnote) +// #i111177#: unxsols4 (Sun C++ 5.9 SunOS_sparc) generates wrong code for this +// , m_bIsDescriptor(0 == pFootnote) + , m_bIsDescriptor((0 == pFootnote) ? true : false) , m_pFmtFtn(pFootnote) { } -- cgit v1.2.3 From a16ef5c8fb090f93d9c31631f3a1307924d26dc3 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Fri, 14 May 2010 16:36:40 +0200 Subject: sw33bf04: #160026# method - property "Help" does not exist and asking for it causes exception --> asking for property "HelpText" --- sw/source/filter/ww8/wrtw8esh.cxx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 6686ae5b13..bad8992d21 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -170,10 +170,20 @@ void WW8Export::DoComboBox(uno::Reference xPropSet) rtl::OUString sHelp; { - uno::Any aTmp = xPropSet->getPropertyValue(C2U("Help")); - const rtl::OUString *pStr = (const rtl::OUString *)aTmp.getValue(); - if (pStr) - sHelp = *pStr; + // --> OD 2010-05-14 #160026# + // property "Help" does not exist and due to the no-existence an exception is thrown. +// uno::Any aTmp = xPropSet->getPropertyValue(C2U("Help")); + try + { + uno::Any aTmp = xPropSet->getPropertyValue(C2U("HelpText")); + // <-- + const rtl::OUString *pStr = (const rtl::OUString *)aTmp.getValue(); + if (pStr) + sHelp = *pStr; + } + catch( uno::Exception& ) + {} + // <-- } rtl::OUString sToolTip; -- cgit v1.2.3 From cbca30f076c09e0ad08d828384f42b5012cb3d71 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 17 May 2010 14:42:28 +0200 Subject: #i10000# removed useless include --- sw/source/core/SwNumberTree/SwNodeNum.cxx | 2 +- sw/source/ui/docvw/ShadowOverlayObject.cxx | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx index bbe2023cf7..400c29b2fb 100644 --- a/sw/source/core/SwNumberTree/SwNodeNum.cxx +++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx @@ -38,7 +38,7 @@ #include // <-- // --> OD 2010-01-13 #b6912256# -#include +//#include #include // <-- diff --git a/sw/source/ui/docvw/ShadowOverlayObject.cxx b/sw/source/ui/docvw/ShadowOverlayObject.cxx index 21225e39f9..b11fc914b5 100644 --- a/sw/source/ui/docvw/ShadowOverlayObject.cxx +++ b/sw/source/ui/docvw/ShadowOverlayObject.cxx @@ -40,7 +40,6 @@ #include #include -#include #include namespace sw { namespace sidebarwindows { -- cgit v1.2.3 From 133f6cb4424a4d22b383a0ca55f112ca0fe6db43 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 17 May 2010 15:50:18 +0200 Subject: sw33bf04: #i101009#: doccomp.cxx: avoid creating redlines including EndOfContent --- sw/source/core/doc/doccomp.cxx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 5b301c61ba..e9b0e79a8f 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -1480,6 +1480,17 @@ void SwCompareData::SetRedlinesToDoc( BOOL bUseDocInfo ) pTmp->GetPoint()->nNode++; pTmp->GetPoint()->nContent.Assign( pTmp->GetCntntNode(), 0 ); } + // --> mst 2010-05-17 #i101009# + // prevent redlines that end on structural end node + if (& rDoc.GetNodes().GetEndOfContent() == + & pTmp->GetPoint()->nNode.GetNode()) + { + pTmp->GetPoint()->nNode--; + SwCntntNode *const pContentNode( pTmp->GetCntntNode() ); + pTmp->GetPoint()->nContent.Assign( pContentNode, + (pContentNode) ? pContentNode->Len() : 0 ); + } + // <-- rDoc.DeleteRedline( *pTmp, false, USHRT_MAX ); @@ -1499,6 +1510,17 @@ void SwCompareData::SetRedlinesToDoc( BOOL bUseDocInfo ) pTmp->GetPoint()->nNode++; pTmp->GetPoint()->nContent.Assign( pTmp->GetCntntNode(), 0 ); } + // --> mst 2010-05-17 #i101009# + // prevent redlines that end on structural end node + if (& rDoc.GetNodes().GetEndOfContent() == + & pTmp->GetPoint()->nNode.GetNode()) + { + pTmp->GetPoint()->nNode--; + SwCntntNode *const pContentNode( pTmp->GetCntntNode() ); + pTmp->GetPoint()->nContent.Assign( pContentNode, + (pContentNode) ? pContentNode->Len() : 0 ); + } + // <-- } while( pInsRing != ( pTmp = (SwPaM*)pTmp->GetNext() )); SwRedlineData aRedlnData( nsRedlineType_t::REDLINE_INSERT, nAuthor, aTimeStamp, aEmptyStr, 0, 0 ); -- cgit v1.2.3 From 4983093fd8d20471dabb461e5db3f1cdec9b0768 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 18 May 2010 14:22:07 +0200 Subject: sw33bf04: #i97421#: fix loop in AppendRedline: SwUndoDelete::Redo(): recreate redline save data (based on patch by majun51). SwDoc::AppendRedline(): fix loop on DELETE/INSERT without extent. --- sw/source/core/doc/docredln.cxx | 19 +++++++++++++------ sw/source/core/undo/undel.cxx | 10 +++++++++- sw/source/core/undo/undobj.cxx | 7 ++++++- 3 files changed, 28 insertions(+), 8 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index db13779ad4..8737f7d868 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -914,17 +914,24 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) case POS_INSIDE: { - pNewRedl->PushData( *pRedl, FALSE ); if( *pRStt == *pStt ) { - pRedl->SetStart( *pEnd, pRStt ); - // neu einsortieren - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl, n ); - bDec = true; + // --> mst 2010-05-17 #i97421# + // redline w/out extent loops + if (*pStt != *pEnd) + // <-- + { + pNewRedl->PushData( *pRedl, FALSE ); + pRedl->SetStart( *pEnd, pRStt ); + // re-insert + pRedlineTbl->Remove( n ); + pRedlineTbl->Insert( pRedl, n ); + bDec = true; + } } else { + pNewRedl->PushData( *pRedl, FALSE ); if( *pREnd != *pEnd ) { pNew = new SwRedline( *pRedl ); diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 74c2c0854a..ce5181dfb6 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -863,7 +863,15 @@ void SwUndoDelete::Redo( SwUndoIter& rUndoIter ) SetPaM( rPam ); if( pRedlSaveData ) - rDoc.DeleteRedline( rPam, false, USHRT_MAX ); + { + bool bSuccess = FillSaveData(rPam, *pRedlSaveData, TRUE); + OSL_ENSURE(bSuccess, + "SwUndoDelete::Redo: used to have redline data, but now none?"); + if (!bSuccess) + { + delete pRedlSaveData, pRedlSaveData = 0; + } + } if( !bDelFullPara ) { diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 0a16b89699..02156626ab 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -1120,7 +1120,12 @@ void SwRedlineSaveData::RedlineToDoc( SwPaM& rPam ) if (rDoc.GetDocShell() && (pRedl->GetComment() != String(::rtl::OUString::createFromAscii(""))) ) rDoc.GetDocShell()->Broadcast(SwRedlineHint(pRedl,SWREDLINE_INSERTED)); // - rDoc.AppendRedline( pRedl, true ); +#if OSL_DEBUG_LEVEL > 0 + bool const bSuccess = +#endif + rDoc.AppendRedline( pRedl, true ); + OSL_ENSURE(bSuccess, + "SwRedlineSaveData::RedlineToDoc: insert redline failed"); rDoc.SetRedlineMode_intern( eOld ); } -- cgit v1.2.3 From ef3634f6ef16fc2c558ee3a3abf560cb169d9613 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 18 May 2010 17:08:55 +0200 Subject: CWS mba33issues01: #i99402#: typo RapairPackage --- starmath/source/smdetect.cxx | 2 +- sw/source/ui/uno/swdetect.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx index bc01b2d7c9..e6f4e12373 100644 --- a/starmath/source/smdetect.cxx +++ b/starmath/source/smdetect.cxx @@ -168,7 +168,7 @@ SmFilterDetect::~SmFilterDetect() } else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("InteractionHandler")) ) lDescriptor[nProperty].Value >>= xInteraction; - else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("RapairPackage")) ) + else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("RepairPackage")) ) lDescriptor[nProperty].Value >>= bRepairPackage; else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle")) ) nIndexOfDocumentTitle = nProperty; diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx index 95153b0019..5bbf2bdf07 100644 --- a/sw/source/ui/uno/swdetect.cxx +++ b/sw/source/ui/uno/swdetect.cxx @@ -167,7 +167,7 @@ SwFilterDetect::~SwFilterDetect() lDescriptor[nProperty].Value >>= xInteraction; nIndexOfInteractionHandler = nProperty; } - else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("RapairPackage")) ) + else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("RepairPackage")) ) lDescriptor[nProperty].Value >>= bRepairPackage; else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle")) ) nIndexOfDocumentTitle = nProperty; -- cgit v1.2.3 From dcbaf777b567bf32935962b3ba72f1237386a8ff Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 19 May 2010 14:28:33 +0200 Subject: cws tl79: #i110254# new security tap page in 'File/Properties' --- sw/inc/docsh.hxx | 7 +++++ sw/sdi/swriter.sdi | 2 +- sw/source/filter/ww8/wrtww8.cxx | 6 +++- sw/source/ui/app/docsh.cxx | 66 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+), 2 deletions(-) mode change 100644 => 100755 sw/sdi/swriter.sdi mode change 100644 => 100755 sw/source/filter/ww8/wrtww8.cxx mode change 100644 => 100755 sw/source/ui/app/docsh.cxx (limited to 'sw/source') diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index 0f1a15be56..5ac0a010b4 100755 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -302,6 +303,12 @@ public: SfxInPlaceClient* GetIPClient( const ::svt::EmbeddedObjectRef& xObjRef ); virtual const ::sfx2::IXmlIdRegistry* GetXmlIdRegistry() const; + + // passwword protection for Writer (derived from SfxObjectShell) + // see also: FN_REDLINE_ON, FN_REDLINE_ON + virtual void SetChangeRecording( bool bActivate ); + virtual bool SetProtectionPassword( const String &rPassword ); + virtual bool GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash ); }; class Graphic; diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi old mode 100644 new mode 100755 index aede24688e..7d7bb04db3 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -6623,7 +6623,7 @@ SfxBoolItem ProtectTraceChangeMode FN_REDLINE_PROTECT FastCall = FALSE, HasCoreId = FALSE, HasDialog = FALSE, - ReadOnlyDoc = TRUE, + ReadOnlyDoc = FALSE, Toggle = FALSE, Container = FALSE, RecordAbsolute = FALSE, diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx old mode 100644 new mode 100755 index 916ad970df..1bfa70b5b3 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2434,11 +2434,13 @@ typedef ::std::deque SwNodeDeque; void MSWordExportBase::WriteText() { #ifdef DEBUG +#if 0 ::std::clog << "" << ::std::endl; ::std::clog << dbg_out(pCurPam->GetDoc()->GetNodes()) << ::std::endl; SwNodeHashSet aNodeSet; SwNodeDeque aNodeDeque; +#endif #endif while( pCurPam->GetPoint()->nNode < pCurPam->GetMark()->nNode || @@ -2448,6 +2450,7 @@ void MSWordExportBase::WriteText() SwNode * pNd = pCurPam->GetNode(); #ifdef DEBUG +#if 0 if (aNodeSet.find(pNd) == aNodeSet.end()) { aNodeSet.insert(pNd); @@ -2468,6 +2471,7 @@ void MSWordExportBase::WriteText() ::std::clog << "" << ::std::endl; } +#endif #endif if ( pNd->IsTxtNode() ) @@ -3722,7 +3726,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer void MSWordExportBase::OutputEndNode( const SwEndNode &rNode ) { #ifdef DEBUG - ::std::clog << "" << dbg_out(&rNode) << ::std::endl; +// ::std::clog << "" << dbg_out(&rNode) << ::std::endl; #endif ww8::WW8TableNodeInfo::Pointer_t pNodeInfo = mpTableInfo->getTableNodeInfo( &rNode ); diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx old mode 100644 new mode 100755 index b80b567ebf..4e3931bbe7 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -1361,3 +1362,68 @@ const ::sfx2::IXmlIdRegistry* SwDocShell::GetXmlIdRegistry() const { return pDoc ? &pDoc->GetXmlIdRegistry() : 0; } + + +void SwDocShell::SetChangeRecording( bool bActivate ) +{ + USHORT nOn = bActivate ? nsRedlineMode_t::REDLINE_ON : 0; + USHORT nMode = pWrtShell->GetRedlineMode(); + pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn); +} + + +bool SwDocShell::SetProtectionPassword( const String &rNewPassword ) +{ + const SfxAllItemSet aSet( GetPool() ); + const SfxItemSet* pArgs = &aSet; + const SfxPoolItem* pItem = NULL; + + IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess(); + + Sequence< sal_Int8 > aPasswd = pIDRA->GetRedlinePassword(); + if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, FALSE, &pItem ) + && ((SfxBoolItem*)pItem)->GetValue() == (aPasswd.getLength() != 0)) + return false; + + bool bRes = false; + + if (rNewPassword.Len()) + { + // when password protection is applied change tracking must always be active + SetChangeRecording( true ); + + Sequence< sal_Int8 > aNewPasswd; + SvPasswordHelper::GetHashPassword( aNewPasswd, rNewPassword ); + pIDRA->SetRedlinePassword( aNewPasswd ); + bRes = true; + } + else + { + pIDRA->SetRedlinePassword( Sequence< sal_Int8 >() ); + bRes = true; + } + + return bRes; +} + + +bool SwDocShell::GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash ) +{ + bool bRes = false; + + const SfxAllItemSet aSet( GetPool() ); + const SfxItemSet* pArgs = &aSet; + const SfxPoolItem* pItem = NULL; + + IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess(); + Sequence< sal_Int8 > aPasswdHash( pIDRA->GetRedlinePassword() ); + if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, FALSE, &pItem ) + && ((SfxBoolItem*)pItem)->GetValue() == (aPasswdHash.getLength() != 0)) + return false; + rPasswordHash = aPasswdHash; + bRes = true; + + return bRes; +} + + -- cgit v1.2.3 From badd6bb824984f9ca6a2201330a47b506a3bab06 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Thu, 20 May 2010 11:17:02 +0200 Subject: hb33patches1: #i100709#: applied patch --- sw/source/filter/ww8/wrtw8esh.cxx | 19 ++----------------- sw/source/filter/ww8/ww8par3.cxx | 17 +++++++---------- 2 files changed, 9 insertions(+), 27 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 6686ae5b13..f2cbc71ece 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -270,25 +270,10 @@ void WW8Export::DoCheckBox(uno::Reference xPropSet) sal_Int16 nTemp = 0; xPropSet->getPropertyValue(C2U("DefaultState")) >>= nTemp; - sal_uInt32 nIsDefaultChecked(nTemp); + aFFData.setDefaultResult(nTemp); xPropSet->getPropertyValue(C2U("State")) >>= nTemp; - sal_uInt32 nIsChecked(nTemp); - - if (nIsDefaultChecked != nIsChecked) - { - switch (nIsChecked) - { - case false: - aFFData.setResult(0); - break; - case true: - aFFData.setResult(1); - break; - default: - ASSERT(!this, "how did that happen"); - } - } + aFFData.setResult(nTemp); ::rtl::OUString aStr; static ::rtl::OUString sName(C2U("Name")); diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index fafaa10fe9..964d2d106f 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2207,20 +2207,17 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich, { *pDataStream >> nDefaultChecked; nChecked = nDefaultChecked; - //Don't know the details yet - switch (nHeaderByte) + + sal_uInt8 iRes = (nHeaderByte >> 2) & 0x1F; + switch (iRes) { - case 0x65: //01100101 - //use defaults ? + case 1: //checked + nChecked = true; break; - case 0x1: //00000001 - //swap to unchecked from checked (#114841)? + case 25: //undefined, Undefined checkboxes are treated as unchecked + case 0: //unchecked nChecked = false; break; - case 0x5: //00000101 - //change to checked - nChecked = true; - break; default: ASSERT(!this, "unknown option, please report to cmc"); break; -- cgit v1.2.3 From ce98d51ffb81af12e959cb09774d05faca8dfec7 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Thu, 20 May 2010 16:10:52 +0100 Subject: cmcfixes75: #i111728# overly const warnings --- sw/inc/SidebarWin.hxx | 2 +- sw/source/ui/docvw/AnchorOverlayObject.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx index 41decf8024..d0be8f4716 100644 --- a/sw/inc/SidebarWin.hxx +++ b/sw/inc/SidebarWin.hxx @@ -168,7 +168,7 @@ class SwSidebarWin : public Window virtual bool IsProtected() {return mbReadonly;}; DECL_LINK( WindowEventListener, VclSimpleEvent* ); - inline const bool IsMouseOverSidebarWin() const { return mbMouseOver; } + inline bool IsMouseOverSidebarWin() const { return mbMouseOver; } void SetLanguage(const SvxLanguageItem aNewItem); diff --git a/sw/source/ui/docvw/AnchorOverlayObject.cxx b/sw/source/ui/docvw/AnchorOverlayObject.cxx index 53afaf6257..5ed5b076a9 100644 --- a/sw/source/ui/docvw/AnchorOverlayObject.cxx +++ b/sw/source/ui/docvw/AnchorOverlayObject.cxx @@ -95,7 +95,7 @@ public: const basegfx::B2DPolygon& getTriangle() const { return maTriangle; } const basegfx::B2DPolygon& getLine() const { return maLine; } const basegfx::B2DPolygon& getLineTop() const { return maLineTop; } - const AnchorState getAnchorState() const { return maAnchorState; } + AnchorState getAnchorState() const { return maAnchorState; } const basegfx::BColor& getColor() const { return maColor; } double getLogicLineWidth() const { return mfLogicLineWidth; } bool getShadow() const { return mbShadow; } -- cgit v1.2.3 From 1741a062fa8f04af05e4cb4f8ed59a7f0a5a17b1 Mon Sep 17 00:00:00 2001 From: Malte Timmermann Date: Fri, 21 May 2010 13:21:37 +0200 Subject: mtclip01: #i111749# Removed SwMod::pClipboard, introduced SwTransferable::GetSWTransferable(...) --- sw/inc/swmodule.hxx | 2 +- sw/source/ui/app/swmodule.cxx | 1 - sw/source/ui/dochdl/swdtflvr.cxx | 113 +++++++++++++++++++-------------------- sw/source/ui/inc/swdtflvr.hxx | 1 + sw/source/ui/uiview/srcview.cxx | 14 ++--- 5 files changed, 61 insertions(+), 70 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx index 24e7fa0fc8..e0ee17fc05 100644 --- a/sw/inc/swmodule.hxx +++ b/sw/inc/swmodule.hxx @@ -133,7 +133,7 @@ protected: public: // public Data - used for internal Clipboard / Drag & Drop / XSelection - SwTransferable *pClipboard, *pDragDrop, *pXSelection; + SwTransferable *pDragDrop, *pXSelection; TYPEINFO(); SFX_DECL_INTERFACE(SW_INTERFACE_MODULE) diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx index 0790eb4c4d..fca869011a 100644 --- a/sw/source/ui/app/swmodule.cxx +++ b/sw/source/ui/app/swmodule.cxx @@ -206,7 +206,6 @@ SwModule::SwModule( SfxObjectFactory* pWebFact, pView(0), bAuthorInitialised(sal_False), bEmbeddedLoadSave( sal_False ), - pClipboard( 0 ), pDragDrop( 0 ), pXSelection( 0 ) { diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index 04819c586e..789cfe1b3c 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -300,9 +300,7 @@ SwTransferable::~SwTransferable() SwModule* pMod = SW_MOD(); if(pMod) { - if ( pMod->pClipboard == this ) - pMod->pClipboard = 0; - else if ( pMod->pDragDrop == this ) + if ( pMod->pDragDrop == this ) pMod->pDragDrop = 0; else if ( pMod->pXSelection == this ) pMod->pXSelection = 0; @@ -325,9 +323,7 @@ SwTransferable::~SwTransferable() void SwTransferable::ObjectReleased() { SwModule *pMod = SW_MOD(); - if( this == pMod->pClipboard ) - pMod->pClipboard = 0; - else if( this == pMod->pDragDrop ) + if( this == pMod->pDragDrop ) pMod->pDragDrop = 0; else if( this == pMod->pXSelection ) pMod->pXSelection = 0; @@ -1000,7 +996,6 @@ int SwTransferable::Copy( BOOL bIsCut ) int nRet = PrepareForCopy( bIsCut ); if ( nRet ) { - SW_MOD()->pClipboard = this; CopyToClipboard( &pWrtShell->GetView().GetEditWin() ); } return nRet; @@ -1021,7 +1016,6 @@ int SwTransferable::CalculateAndCopy() eBufferType = TRNSFR_DOCUMENT; AddFormat( FORMAT_STRING ); - SW_MOD()->pClipboard = this; CopyToClipboard( &pWrtShell->GetView().GetEditWin() ); return 1; @@ -1072,7 +1066,6 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, PrepareOLE( aObjDesc ); AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); - SW_MOD()->pClipboard = this; CopyToClipboard( &pWrtShell->GetView().GetEditWin() ); return 1; @@ -1090,20 +1083,14 @@ BOOL SwTransferable::IsPaste( const SwWrtShell& rSh, // Check the common case first: We can always paste our own data! // #106503#: If _only_ the internal format can be pasted, this check will // yield 'true', while the one below would give a (wrong) result 'false'. - bool bIsPaste = ( SW_MOD()->pClipboard != NULL ); + + bool bIsPaste = ( GetSwTransferable( rData ) != NULL ); // if it's not our own data, we need to have a closer look: - if( ! bIsPaste ) + if( ! bIsPaste ) { // determine the proper paste action, and return true if we find one uno::Reference xTransferable( rData.GetXTransferable() ); - uno::Reference xTunnel( xTransferable, UNO_QUERY ); - if ( xTunnel.is() ) - { - sal_Int64 nHandle = xTunnel->getSomething( getUnoTunnelId() ); - if ( nHandle ) - return TRUE; - } USHORT nDestination = SwTransferable::GetSotDestination( rSh ); USHORT nSourceOptions = @@ -1139,36 +1126,27 @@ int SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData ) nDestination = SwTransferable::GetSotDestination( rSh ); ULONG nFormat = 0; - if( SW_MOD()->pClipboard ) + if( GetSwTransferable( rData ) ) + { nAction = EXCHG_OUT_ACTION_INSERT_PRIVATE; + } else { - uno::Reference xTunnel( rData.GetTransferable(), UNO_QUERY ); - if ( xTunnel.is() ) - { - sal_Int64 nHandle = xTunnel->getSomething( getUnoTunnelId() ); - if ( nHandle ) - nAction = EXCHG_OUT_ACTION_INSERT_PRIVATE; - } - - if ( !nAction ) - { - USHORT nSourceOptions = - (( EXCHG_DEST_DOC_TEXTFRAME == nDestination || - EXCHG_DEST_SWDOC_FREE_AREA == nDestination || - EXCHG_DEST_DOC_TEXTFRAME_WEB == nDestination || - EXCHG_DEST_SWDOC_FREE_AREA_WEB == nDestination ) - ? EXCHG_IN_ACTION_COPY - : EXCHG_IN_ACTION_MOVE); - uno::Reference xTransferable( rData.GetXTransferable() ); - nAction = SotExchange::GetExchangeAction( - rData.GetDataFlavorExVector(), - nDestination, - nSourceOptions, /* ?? */ - EXCHG_IN_ACTION_DEFAULT, /* ?? */ - nFormat, nEventAction, 0, - lcl_getTransferPointer ( xTransferable ) ); - } + USHORT nSourceOptions = + (( EXCHG_DEST_DOC_TEXTFRAME == nDestination || + EXCHG_DEST_SWDOC_FREE_AREA == nDestination || + EXCHG_DEST_DOC_TEXTFRAME_WEB == nDestination || + EXCHG_DEST_SWDOC_FREE_AREA_WEB == nDestination ) + ? EXCHG_IN_ACTION_COPY + : EXCHG_IN_ACTION_MOVE); + uno::Reference xTransferable( rData.GetXTransferable() ); + nAction = SotExchange::GetExchangeAction( + rData.GetDataFlavorExVector(), + nDestination, + nSourceOptions, /* ?? */ + EXCHG_IN_ACTION_DEFAULT, /* ?? */ + nFormat, nEventAction, 0, + lcl_getTransferPointer ( xTransferable ) ); } // special case for tables from draw application @@ -1202,7 +1180,7 @@ int SwTransferable::PasteData( TransferableDataHelper& rData, int nRet = 0; bool bCallAutoCaption = false; - + if( pPt ) { // external Drop @@ -1231,7 +1209,7 @@ int SwTransferable::PasteData( TransferableDataHelper& rData, } } } - else if( ( !pMod->pClipboard || bIsPasteFmt ) && + else if( ( !GetSwTransferable( rData ) || bIsPasteFmt ) && !rSh.IsTableMode() && rSh.HasSelection() ) { // dann die Selektionen loeschen @@ -1259,14 +1237,14 @@ int SwTransferable::PasteData( TransferableDataHelper& rData, // <-- } - SwTransferable *pTrans=0, *pTunneledTrans=0; - uno::Reference xTunnel( rData.GetTransferable(), UNO_QUERY ); - if ( xTunnel.is() ) - { - sal_Int64 nHandle = xTunnel->getSomething( getUnoTunnelId() ); - if ( nHandle ) - pTunneledTrans = (SwTransferable*) (sal_IntPtr) nHandle; - } + SwTransferable *pTrans=0, *pTunneledTrans=GetSwTransferable( rData ); +// uno::Reference xTunnel( rData.GetTransferable(), UNO_QUERY ); +// if ( xTunnel.is() ) +// { +// sal_Int64 nHandle = xTunnel->getSomething( getUnoTunnelId() ); +// if ( nHandle ) +// pTunneledTrans = (SwTransferable*) (sal_IntPtr) nHandle; +// } if( pPt && ( bPasteSelection ? 0 != ( pTrans = pMod->pXSelection ) : 0 != ( pTrans = pMod->pDragDrop) )) @@ -1275,7 +1253,7 @@ int SwTransferable::PasteData( TransferableDataHelper& rData, nRet = pTrans->PrivateDrop( rSh, *pPt, DND_ACTION_MOVE == nDropAction, bPasteSelection ); } - else if( !pPt && ( pTunneledTrans || 0 != ( pTunneledTrans = pMod->pClipboard ) ) && + else if( !pPt && pTunneledTrans && EXCHG_OUT_ACTION_INSERT_PRIVATE == nAction ) { // then internal paste @@ -2801,7 +2779,7 @@ int SwTransferable::PasteFormat( SwWrtShell& rSh, int nRet = 0; ULONG nPrivateFmt = FORMAT_PRIVATE; - SwTransferable *pClipboard = SW_MOD()->pClipboard; + SwTransferable *pClipboard = GetSwTransferable( rData ); if( pClipboard && ((TRNSFR_DOCUMENT|TRNSFR_GRAPHIC|TRNSFR_OLE) & pClipboard->eBufferType )) nPrivateFmt = SOT_FORMATSTR_ID_EMBED_SOURCE; @@ -2897,7 +2875,7 @@ int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData USHORT nDest = SwTransferable::GetSotDestination( rSh ); - SwTransferable *pClipboard = SW_MOD()->pClipboard; + SwTransferable *pClipboard = GetSwTransferable( rData ); if( pClipboard ) { aDesc = pClipboard->aObjDesc; @@ -2963,7 +2941,8 @@ void SwTransferable::FillClipFmtItem( const SwWrtShell& rSh, SvxClipboardFmtItem & rToFill ) { USHORT nDest = SwTransferable::GetSotDestination( rSh ); - SwTransferable *pClipboard = SW_MOD()->pClipboard; + + SwTransferable *pClipboard = GetSwTransferable( rData ); if( pClipboard ) { USHORT nResId; @@ -3619,6 +3598,22 @@ sal_Int64 SwTransferable::getSomething( const Sequence< sal_Int8 >& rId ) throw( return nRet; } +SwTransferable* SwTransferable::GetSwTransferable( const TransferableDataHelper& rData ) +{ + SwTransferable* pSwTransferable = NULL; + + uno::Reference xTunnel( rData.GetTransferable(), UNO_QUERY ); + if ( xTunnel.is() ) + { + sal_Int64 nHandle = xTunnel->getSomething( getUnoTunnelId() ); + if ( nHandle ) + pSwTransferable = (SwTransferable*) (sal_IntPtr) nHandle; + } + + return pSwTransferable; + +} + /* */ // ----------------------------------------------------------------------- diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx index 3e93acb021..94620d73dd 100644 --- a/sw/source/ui/inc/swdtflvr.hxx +++ b/sw/source/ui/inc/swdtflvr.hxx @@ -93,6 +93,7 @@ class SwTransferable : public TransferableHelper void DeleteSelection(); // helper methods for the paste + static SwTransferable* GetSwTransferable( const TransferableDataHelper& rData ); static void SetSelInShell( SwWrtShell& , BOOL , const Point* ); static BOOL _CheckForURLOrLNKFile( TransferableDataHelper& rData, String& rFileName, String* pTitle = 0 ); diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index aaa1e80808..d418216a39 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -599,15 +599,11 @@ void SwSrcView::GetState(SfxItemSet& rSet) break; case SID_PASTE: { - BOOL bDisable = 0 == SW_MOD()->pClipboard; - if( bDisable ) - { - TransferableDataHelper aDataHelper( - TransferableDataHelper::CreateFromSystemClipboard( - &aEditWin) ); - bDisable = !aDataHelper.GetXTransferable().is() || - 0 == aDataHelper.GetFormatCount(); - } + TransferableDataHelper aDataHelper( + TransferableDataHelper::CreateFromSystemClipboard( + &aEditWin) ); + BOOL bDisable = !aDataHelper.GetXTransferable().is() || + 0 == aDataHelper.GetFormatCount(); if( bDisable ) rSet.DisableItem(nWhich); } -- cgit v1.2.3 From cdaddec8a22ab6bfd34699e2563ba985394d6de1 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 21 May 2010 15:19:08 +0200 Subject: sw33bf04: #i58606#: ~SwExtTextInput(): do not do anything if in SwDoc dtor --- sw/source/core/doc/extinput.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx index 0ab4fdd659..6d036fb5e8 100644 --- a/sw/source/core/doc/extinput.cxx +++ b/sw/source/core/doc/extinput.cxx @@ -54,6 +54,9 @@ SwExtTextInput::SwExtTextInput( const SwPaM& rPam, Ring* pRing ) SwExtTextInput::~SwExtTextInput() { + SwDoc *const pDoc = GetDoc(); + if (pDoc->IsInDtor()) { return; /* #i58606# */ } + SwTxtNode* pTNd = GetPoint()->nNode.GetNode().GetTxtNode(); if( pTNd ) { @@ -69,7 +72,6 @@ SwExtTextInput::~SwExtTextInput() // damit Undo / Redlining usw. richtig funktioniert, // muss ueber die Doc-Schnittstellen gegangen werden !!! - SwDoc* pDoc = GetDoc(); if(eInputLanguage != LANGUAGE_DONTKNOW) { // --> FME 2005-02-11 #i41974# Only set language attribute -- cgit v1.2.3 From 30f16f1dd77f5fc3528e341d69099b02846ebfd9 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 21 May 2010 15:21:49 +0200 Subject: sw33bf04: #i85766#: prevent field expansion in clipboard: SwField: add a String member to cache the value. SwField: wrap Expand() and Copy() methods to use/update cache. update all callers to pass the clipboard flag to new SwField::ExpandField(). --- sw/inc/fldbas.hxx | 15 ++++++++++++--- sw/inc/txtfld.hxx | 3 ++- sw/source/core/crsr/crstrvl.cxx | 5 ++--- sw/source/core/crsr/findtxt.cxx | 4 +++- sw/source/core/doc/docfld.cxx | 20 +++++++++++++++----- sw/source/core/edit/edattr.cxx | 6 +----- sw/source/core/edit/edfld.cxx | 5 ++--- sw/source/core/fields/cellfml.cxx | 3 ++- sw/source/core/fields/fldbas.cxx | 17 +++++++++++++++++ sw/source/core/tox/txmsrt.cxx | 5 +++-- sw/source/core/txtnode/atrfld.cxx | 13 ++++++++----- sw/source/core/txtnode/ndtxt.cxx | 14 ++++++++++---- sw/source/core/txtnode/thints.cxx | 3 ++- sw/source/core/undo/SwUndoField.cxx | 12 +++++++----- sw/source/filter/ascii/ascatr.cxx | 3 ++- sw/source/filter/html/htmlfldw.cxx | 2 +- sw/source/filter/rtf/rtfatr.cxx | 9 ++++++--- sw/source/filter/ww8/ww8atr.cxx | 10 +++++----- sw/source/ui/dbui/dbinsdlg.cxx | 29 +++-------------------------- sw/source/ui/docvw/edtwin2.cxx | 18 ++---------------- sw/source/ui/fldui/fldmgr.cxx | 2 +- sw/source/ui/fldui/fldpage.cxx | 14 +------------- 22 files changed, 107 insertions(+), 105 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index e7bea38aae..500a4f1b80 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -305,12 +305,17 @@ inline void SwFieldType::UpdateFlds() const class SW_DLLPUBLIC SwField { +private: + mutable String m_Cache; /// #i85766# cached expansion (for clipboard) USHORT nLang; // Immer ueber SetLanguage aendern! BOOL bIsAutomaticLanguage; sal_uInt32 nFormat; SwFieldType* pType; + virtual String Expand() const = 0; + virtual SwField* Copy() const = 0; + protected: void SetFormat(sal_uInt32 nSet) {nFormat = nSet;} @@ -325,12 +330,16 @@ public: // neuen Typ setzen (wird fuer das Kopieren zwischen Dokumenten benutzt) virtual SwFieldType* ChgTyp( SwFieldType* ); - // Expandierung fuer die Anzeige - virtual String Expand() const = 0; + /** expand the field. + @param bInClipboard field is in clipboard document? + @return the generated text (suitable for display) + */ + String ExpandField(bool const bInClipboard) const; // liefert den Namen oder den Inhalt virtual String GetCntnt(BOOL bName = FALSE) const; - virtual SwField* Copy() const = 0; + + SwField * CopyField() const; // ResId USHORT Which() const diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx index f9918e2c90..6ba1e25966 100644 --- a/sw/inc/txtfld.hxx +++ b/sw/inc/txtfld.hxx @@ -41,7 +41,8 @@ class SwTxtFld : public SwTxtAttr SwTxtNode * m_pTxtNode; public: - SwTxtFld( SwFmtFld& rAttr, xub_StrLen nStart ); + SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStart, + bool const bInClipboard); virtual ~SwTxtFld(); void CopyFld( SwTxtFld *pDest ) const; diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 681dd7a04c..801c15e12b 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -34,9 +34,7 @@ #include #include #include -#ifndef _SVX_SVDOBJ_HXX #include -#endif #include #include #include @@ -718,7 +716,8 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext, SwFmtFld* pFmtFld = new SwFmtFld( SwDateTimeField( (SwDateTimeFieldType*)pDoc->GetSysFldType( RES_DATETIMEFLD ) ) ); - pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex() ); + pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex(), + pDoc->IsClipBoard() ); pTxtFld->ChgTxtNode( pTNd ); } diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index 7001dd5ca4..bf9f2e5cf0 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -145,7 +145,9 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart, // Fuer das Ende merken wir uns die Ersetzungen und entferenen // hinterher alle am Stringende (koenten ja 'normale' 0x7f drinstehen BOOL bEmpty = RES_TXTATR_FIELD != pHt->Which() || - !((SwTxtFld*)pHt)->GetFld().GetFld()->Expand().Len(); + !(static_cast(pHt) + ->GetFld().GetFld()->ExpandField( + rNd.GetDoc()->IsClipBoard()).Len()); if ( bEmpty && nStart == nAkt ) { rArr.Insert( nAkt, rArr.Count() ); diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 54cb12e9db..9d907b9896 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -1241,13 +1241,18 @@ void SwDoc::FldsToExpand( SwHash**& ppHashTbl, USHORT& rTblSize, // Eintrag in den HashTable eintragen // Eintrag vorhanden ? pFnd = Find( rName, ppHashTbl, rTblSize, &nPos ); + String const value(pFld->ExpandField(IsClipBoard())); if( pFnd ) + { // Eintrag in der HashTabelle aendern - ((_HashStr*)pFnd)->aSetStr = pFld->Expand(); + static_cast<_HashStr*>(pFnd)->aSetStr = value; + } else + { // neuen Eintrag einfuegen *(ppHashTbl + nPos ) = new _HashStr( rName, - pFld->Expand(), (_HashStr*)*(ppHashTbl + nPos)); + value, static_cast<_HashStr *>(*(ppHashTbl + nPos))); + } } break; } @@ -1413,13 +1418,18 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds ) // Eintrag vorhanden ? USHORT nPos; SwHash* pFnd = Find( rName, pHashStrTbl, nStrFmtCnt, &nPos ); + String const value(pFld->ExpandField(IsClipBoard())); if( pFnd ) + { // Eintrag in der HashTabelle aendern - ((_HashStr*)pFnd)->aSetStr = pFld->Expand(); + static_cast<_HashStr*>(pFnd)->aSetStr = value; + } else + { // neuen Eintrag einfuegen *(pHashStrTbl + nPos ) = new _HashStr( rName, - pFld->Expand(), (_HashStr*)*(pHashStrTbl + nPos)); + value, static_cast<_HashStr *>(*(pHashStrTbl + nPos))); + } } break; case RES_GETEXPFLD: @@ -2724,7 +2734,7 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld, //pDstFld->ChangeFormat( rSrcFld.GetFormat() ); //pDstFld->SetLanguage( rSrcFld.GetLanguage() ); - SwField * pNewFld = rSrcFld.Copy(); + SwField * pNewFld = rSrcFld.CopyField(); pDstFmtFld->SetFld(pNewFld); switch( nFldWhich ) diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index ff077f1018..87393cfcea 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -31,14 +31,10 @@ #include -#ifndef _SVX_TSTPITEM_HXX //autogen #include -#endif #include #include -#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_ #include -#endif #include #include #include @@ -461,7 +457,7 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos, const SwField* const pFld = pAttr->GetFld().GetFld(); if (pFld) { - sExp += pFld->Expand(); + sExp += pFld->ExpandField(rTNd.GetDoc()->IsClipBoard()); } } } diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx index 86df811542..8c5b02794e 100644 --- a/sw/source/core/edit/edfld.cxx +++ b/sw/source/core/edit/edfld.cxx @@ -42,9 +42,7 @@ #include #include #include -#ifndef _DBMGR_HXX #include -#endif #include #include @@ -226,7 +224,8 @@ void SwEditShell::FieldToText( SwFieldType* pType ) *pFmtFld->GetTxtFld()->GetStart() ); // Feldinhalt durch Text ersetzen - String aEntry( pFmtFld->GetFld()->Expand() ); + String const aEntry( + pFmtFld->GetFld()->ExpandField(GetDoc()->IsClipBoard()) ); pPaM->SetMark(); pPaM->Move( fnMoveForward ); GetDoc()->DeleteRange( *pPaM ); diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index d92d8ce0e5..fb98a31c93 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -203,7 +203,8 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const break; default: - nRet = rCalcPara.rCalc.Calculate( pFld->Expand() ).GetDouble(); + String const value(pFld->ExpandField(pDoc->IsClipBoard())); + nRet = rCalcPara.rCalc.Calculate(value).GetDouble(); } } else diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index db704276ba..7abd94ebf5 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -437,6 +437,23 @@ BOOL SwField::IsFixed() const return bRet; } +String SwField::ExpandField(bool const bInClipboard) const +{ + if (!bInClipboard) // #i85766# do not expand fields in clipboard documents + { + m_Cache = Expand(); + } + return m_Cache; +} + +SwField * SwField::CopyField() const +{ + SwField *const pNew = Copy(); + // #i85766# cache expansion of source (for clipboard) + pNew->m_Cache = Expand(); + return pNew; +} + /*-------------------------------------------------------------------- Beschreibung: Numerierung expandieren --------------------------------------------------------------------*/ diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index 55399e4ea8..e3d80b4af6 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -870,8 +870,9 @@ USHORT SwTOXAuthority::GetLevel() const -----------------------------------------------------------------------*/ void SwTOXAuthority::_GetText( String& rTxt, String& ) { - // - rTxt = m_rField.GetFld()->Expand(); + bool const isClipBoard( + m_rField.GetTxtFld()->GetTxtNode().GetDoc()->IsClipBoard()); + rTxt = m_rField.GetFld()->ExpandField(isClipBoard); } /* -----------------21.09.99 12:50------------------- diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index ce1dd11493..f2e98fd0f4 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include "reffld.hxx" #include "ddefld.hxx" @@ -68,7 +69,7 @@ SwFmtFld::SwFmtFld( const SwField &rFld ) SwClient( rFld.GetTyp() ), pTxtAttr( 0 ) { - pField = rFld.Copy(); + pField = rFld.CopyField(); } // #i24434# @@ -83,7 +84,7 @@ SwFmtFld::SwFmtFld( const SwFmtFld& rAttr ) if(rAttr.GetFld()) { rAttr.GetFld()->GetTyp()->Add(this); - pField = rAttr.GetFld()->Copy(); + pField = rAttr.GetFld()->CopyField(); } } @@ -254,9 +255,10 @@ BOOL SwFmtFld::IsProtect() const |* *************************************************************************/ -SwTxtFld::SwTxtFld( SwFmtFld& rAttr, xub_StrLen nStartPos ) +SwTxtFld::SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStartPos, + bool const bInClipboard) : SwTxtAttr( rAttr, nStartPos ) - , m_aExpand( rAttr.GetFld()->Expand() ) + , m_aExpand( rAttr.GetFld()->ExpandField(bInClipboard) ) , m_pTxtNode( 0 ) { rAttr.pTxtAttr = this; @@ -283,7 +285,8 @@ void SwTxtFld::Expand() const ASSERT( m_pTxtNode, "SwTxtFld: where is my TxtNode?" ); const SwField* pFld = GetFld().GetFld(); - XubString aNewExpand( pFld->Expand() ); + XubString aNewExpand( + pFld->ExpandField(m_pTxtNode->GetDoc()->IsClipBoard()) ); if( aNewExpand == m_aExpand ) { diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 8796e57b6d..85d92ee613 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -2994,8 +2994,10 @@ void SwTxtNode::Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt, rTxt.Erase( nPos, 1 ); if( bExpandFlds ) { - const XubString aExpand( ((SwTxtFld*)pAttr)->GetFld(). - GetFld()->Expand() ); + const XubString aExpand( + static_cast(pAttr)->GetFld() + .GetFld()->ExpandField( + GetDoc()->IsClipBoard())); rTxt.Insert( aExpand, nPos ); nPos = nPos + aExpand.Len(); nEndPos = nEndPos + aExpand.Len(); @@ -3142,7 +3144,9 @@ BOOL SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, { case RES_TXTATR_FIELD: { - const XubString aExpand( ((SwTxtFld*)pHt)->GetFld().GetFld()->Expand() ); + XubString const aExpand( + static_cast(pHt)->GetFld().GetFld() + ->ExpandField(GetDoc()->IsClipBoard())); if( aExpand.Len() ) { aDestIdx++; // dahinter einfuegen; @@ -3238,7 +3242,9 @@ const ModelToViewHelper::ConversionMap* const SwTxtAttr* pAttr = (*pSwpHints2)[i]; if ( RES_TXTATR_FIELD == pAttr->Which() ) { - const XubString aExpand( ((SwTxtFld*)pAttr)->GetFld().GetFld()->Expand() ); + const XubString aExpand( + static_cast(pAttr)->GetFld().GetFld() + ->ExpandField(GetDoc()->IsClipBoard())); if ( aExpand.Len() > 0 ) { const xub_StrLen nFieldPos = *pAttr->GetStart(); diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index d5fbf01160..b48de41078 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1042,7 +1042,8 @@ SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr, pNew = new SwTxtINetFmt( (SwFmtINetFmt&)rNew, nStt, nEnd ); break; case RES_TXTATR_FIELD: - pNew = new SwTxtFld( (SwFmtFld&)rNew, nStt ); + pNew = new SwTxtFld( static_cast(rNew), nStt, + rDoc.IsClipBoard() ); break; case RES_TXTATR_FLYCNT: { diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx index ccc1f4d211..9d9c74b1e5 100644 --- a/sw/source/core/undo/SwUndoField.cxx +++ b/sw/source/core/undo/SwUndoField.cxx @@ -63,12 +63,14 @@ SwPosition SwUndoField::GetPosition() } SwUndoFieldFromDoc::SwUndoFieldFromDoc(const SwPosition & rPos, - const SwField & _aOldField, - const SwField & _aNewField, + const SwField & rOldField, + const SwField & rNewField, SwMsgPoolItem * _pHnt, BOOL _bUpdate, SwUndoId _nId) - : SwUndoField(rPos,_nId), pOldField(_aOldField.Copy()), - pNewField(_aNewField.Copy()), pHnt(_pHnt), - bUpdate(_bUpdate) + : SwUndoField(rPos,_nId) + , pOldField(rOldField.CopyField()) + , pNewField(rNewField.CopyField()) + , pHnt(_pHnt) + , bUpdate(_bUpdate) { ASSERT(pOldField, "No old field!"); ASSERT(pNewField, "No new field!"); diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index 675c59c727..8399b5b94c 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -124,7 +124,8 @@ BOOL SwASC_AttrIter::OutAttr( xub_StrLen nSwPos ) switch( pHt->Which() ) { case RES_TXTATR_FIELD: - sOut = ((SwTxtFld*)pHt)->GetFld().GetFld()->Expand(); + sOut = static_cast(pHt)->GetFld().GetFld() + ->ExpandField(rWrt.pDoc->IsClipBoard()); break; case RES_TXTATR_FTN: diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx index cc0ee03a24..32234b7929 100644 --- a/sw/source/filter/html/htmlfldw.cxx +++ b/sw/source/filter/html/htmlfldw.cxx @@ -305,7 +305,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, } // Inhalt des Feldes ausgeben - String sExpand( pFld->Expand() ); + String const sExpand( pFld->ExpandField(rWrt.pDoc->IsClipBoard()) ); sal_Bool bNeedsCJKProcessing = sal_False; if( sExpand.Len() ) { diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx index 528b0d82d1..e73ee51a46 100644 --- a/sw/source/filter/rtf/rtfatr.cxx +++ b/sw/source/filter/rtf/rtfatr.cxx @@ -2902,7 +2902,8 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt ) case RES_HIDDENTXTFLD: if( TYP_CONDTXTFLD == ((SwHiddenTxtField*)pFld)->GetSubType() ) - RTFOutFuncs::Out_String( rWrt.Strm(), pFld->Expand(), + RTFOutFuncs::Out_String( rWrt.Strm(), + pFld->ExpandField(rWrt.pDoc->IsClipBoard()), rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); else { @@ -2958,7 +2959,8 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt ) rWrt.Strm() >> cCh; if( ' ' != cCh ) // vorweg immer einen Trenner rWrt.Strm() << ' '; - RTFOutFuncs::Out_String( rWrt.Strm(), pFld->Expand(), + RTFOutFuncs::Out_String( rWrt.Strm(), + pFld->ExpandField(rWrt.pDoc->IsClipBoard()), rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); } break; @@ -2967,7 +2969,8 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt ) if( aFldStt.Len() ) { rWrt.Strm() << "}{" << OOO_STRING_SVTOOLS_RTF_FLDRSLT << ' '; - RTFOutFuncs::Out_String( rWrt.Strm(), pFld->Expand(), + RTFOutFuncs::Out_String( rWrt.Strm(), + pFld->ExpandField(rWrt.pDoc->IsClipBoard()), rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); rWrt.Strm() << "}}"; rRTFWrt.bOutFmtAttr = FALSE; diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 61e8d6016c..aa8b345fe6 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -1743,9 +1743,9 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c, aItems.GetData()); } -String lcl_GetExpandedField(const SwField &rFld) +String lcl_GetExpandedField(const SwField &rFld, SwDoc const& rDoc) { - String sRet(rFld.Expand()); + String sRet(rFld.ExpandField(rDoc.IsClipBoard())); //replace LF 0x0A with VT 0x0B sRet.SearchAndReplaceAll(0x0A, 0x0B); @@ -1871,7 +1871,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType, { String sOut; if( pFld ) - sOut = lcl_GetExpandedField(*pFld); + sOut = lcl_GetExpandedField(*pFld, *pDoc); else sOut = rFldCmd; if( sOut.Len() ) @@ -2598,7 +2598,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef) sStr.APPEND_CONST_ASC( "\" " ); m_rWW8Export.OutputField( &rFld, ww::eREF, sStr, WRITEFIELD_START | WRITEFIELD_CMD_START | WRITEFIELD_CMD_END ); - String sVar = lcl_GetExpandedField( rFld ); + String sVar = lcl_GetExpandedField( rFld, *GetExport().pDoc ); if ( sVar.Len() ) { if ( m_rWW8Export.IsUnicode() ) @@ -2614,7 +2614,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef) void WW8AttributeOutput::WriteExpand( const SwField* pFld ) { - String sExpand( lcl_GetExpandedField( *pFld ) ); + String sExpand( lcl_GetExpandedField( *pFld, *GetExport().pDoc ) ); if ( m_rWW8Export.IsUnicode() ) SwWW8Writer::WriteString16( m_rWW8Export.Strm(), sExpand, false ); else diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index e423ca70ba..ee129df190 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -33,15 +33,10 @@ #include "dbinsdlg.hxx" -#ifndef INCLUDED_MEMORY #include -#define INCLUDED_MEMORY -#endif -#ifndef INCLUDED_FLOAT_H #include -#define INCLUDED_FLOAT_H -#endif + #include #include #include @@ -65,9 +60,7 @@ #include #include #include -#ifndef __SV_MNEMONIC_HXX #include -#endif #include #include #include @@ -78,24 +71,16 @@ #include #include #include -#ifndef _SWTABLEREP_HXX //autogen #include -#endif #include #include #include #include #include #include -#ifndef _WVIEW_HXX #include -#endif -#ifndef _DOCSH_HXX #include -#endif -#ifndef _DBMGR_HXX #include -#endif #include #include #include @@ -108,19 +93,11 @@ #include #include -#ifndef _DBINSDLG_HRC #include -#endif -#ifndef _DBUI_HRC #include -#endif -#ifndef _CMDID_H #include -#endif -#ifndef _HELPID_H #include -#endif #include #include #include @@ -1380,8 +1357,8 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence& rSelection, case _DB_Column::DB_COL_FIELD: { - SwDBField* pFld = (SwDBField*)pDBCol->DB_ColumnData. - pField->Copy(); + SwDBField *const pFld = static_cast( + pDBCol->DB_ColumnData.pField->CopyField()); double nValue = DBL_MAX; Reference< XPropertySet > xColumnProps; diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx index 4ee301e9f2..1bfa052359 100644 --- a/sw/source/ui/docvw/edtwin2.cxx +++ b/sw/source/ui/docvw/edtwin2.cxx @@ -35,9 +35,7 @@ #include #endif -#ifndef _HELP_HXX //autogen #include -#endif #include #include #include @@ -46,24 +44,15 @@ #include #include #include -#ifndef _OUTLINER_HXX //autogen -#define _EEITEMID_HXX #include -#endif #include #include #include #include -#ifndef _MODCFG_HXX #include -#endif -#ifndef _VIEW_HXX #include -#endif #include -#ifndef _DOCSH_HXX #include -#endif #include #include #include @@ -80,12 +69,8 @@ #include #include #include -#ifndef _DOCVW_HRC #include -#endif -#ifndef _UTLUI_HRC #include -#endif #include #include @@ -320,7 +305,8 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) { USHORT nOldSubType = pFld->GetSubType(); ((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD); - sTxt = pFld->Expand(); + sTxt = + pFld->ExpandField(rSh.GetDoc()->IsClipBoard()); ((SwField*)pFld)->SetSubType(nOldSubType); } break; diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx index 42b9bc43e6..4e707ce6ce 100644 --- a/sw/source/ui/fldui/fldmgr.cxx +++ b/sw/source/ui/fldui/fldmgr.cxx @@ -1435,7 +1435,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat, } else { - pTmpFld = pCurFld->Copy(); + pTmpFld = pCurFld->CopyField(); bDelete = true; } diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx index 385ed8d60f..6c9ded39aa 100644 --- a/sw/source/ui/fldui/fldpage.cxx +++ b/sw/source/ui/fldui/fldpage.cxx @@ -42,28 +42,16 @@ #include #include #include -#ifndef _DOCSH_HXX #include -#endif #include -#ifndef _VIEW_HXX #include -#endif #include #include -#ifndef _FLDTDLG_HXX #include -#endif -#ifndef _FLDPAGE_HXX #include -#endif #include -#ifndef _CMDID_H #include -#endif -#ifndef _GLOBALS_HRC #include -#endif #include using namespace ::com::sun::star; @@ -218,7 +206,7 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1, } else // Feld aendern { - SwField * pTmpFld = m_pCurFld->Copy(); + SwField *const pTmpFld = m_pCurFld->CopyField(); String sPar1(rPar1); String sPar2(rPar2); -- cgit v1.2.3 From 34e209319026a3b75f8f8cccb039f8754654f630 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 10:17:24 +0200 Subject: unoawt: completely separated the controller functionality of a wizard page from the wizard page itself, by moving the canAdvance method from OWizardPage to the IWizardPage interface, which in this course has been renamed to IWizardPageController. This will later on allow to have implementations where the TabPage is provided by an external component (e.g. as UNO Service), but the controlling of those pages is still intercepted and handled internally. --- sw/source/ui/dbui/mailmergewizard.cxx | 2 +- sw/source/ui/dbui/mmaddressblockpage.cxx | 4 ++-- sw/source/ui/dbui/mmaddressblockpage.hxx | 2 +- sw/source/ui/dbui/mmdocselectpage.cxx | 8 ++++---- sw/source/ui/dbui/mmdocselectpage.hxx | 2 +- sw/source/ui/dbui/mmgreetingspage.cxx | 2 +- sw/source/ui/dbui/mmgreetingspage.hxx | 2 +- sw/source/ui/dbui/mmlayoutpage.cxx | 4 ++-- sw/source/ui/dbui/mmlayoutpage.hxx | 2 +- sw/source/ui/dbui/mmpreparemergepage.cxx | 4 ++-- sw/source/ui/dbui/mmpreparemergepage.hxx | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index fd601bdfb1..4a412991e0 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -260,7 +260,7 @@ void SwMailMergeWizard::UpdateRoadmap() //#i97436# if a document has to be loaded then enable output type page only m_bDocumentLoad = false; bool bEnableOutputTypePage = (nCurPage != MM_DOCUMENTSELECTPAGE) || - static_cast(pCurPage)->commitPage( eValidate ); + static_cast(pCurPage)->commitPage( ::svt::WizardTypes::eValidate ); for(sal_uInt16 nPage = MM_DOCUMENTSELECTPAGE; nPage <= MM_OUTPUTPAGE; ++nPage) { diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index d179e02e51..ae6b6b0cb0 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -175,9 +175,9 @@ void SwMailMergeAddressBlockPage::ActivatePage() /*-- 27.05.2004 13:59:15--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwMailMergeAddressBlockPage::commitPage( CommitPageReason _eReason ) +sal_Bool SwMailMergeAddressBlockPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { - if ( eTravelForward == _eReason && !m_pWizard->GetConfigItem().GetResultSet().is() ) + if ( ::svt::WizardTypes::eTravelForward == _eReason && !m_pWizard->GetConfigItem().GetResultSet().is() ) return sal_False; return sal_True; } diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx index 8bbd2fdc8d..2436a170d4 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.hxx +++ b/sw/source/ui/dbui/mmaddressblockpage.hxx @@ -98,7 +98,7 @@ class SwMailMergeAddressBlockPage : public svt::OWizardPage void EnableAddressBlock(sal_Bool bAll, sal_Bool bSelective); virtual void ActivatePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); virtual bool canAdvance() const; public: diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx index 57b3b15cfc..7427bfc687 100644 --- a/sw/source/ui/dbui/mmdocselectpage.cxx +++ b/sw/source/ui/dbui/mmdocselectpage.cxx @@ -197,11 +197,11 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton) /*-- 06.04.2004 12:52:24--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwMailMergeDocSelectPage::commitPage( CommitPageReason _eReason ) +sal_Bool SwMailMergeDocSelectPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { sal_Bool bReturn = sal_False; - bool bNext = _eReason == eTravelForward; - if(bNext || _eReason == eValidate ) + bool bNext = _eReason == ::svt::WizardTypes::eTravelForward; + if(bNext || _eReason == ::svt::WizardTypes::eValidate ) { ::rtl::OUString sReloadDocument; bReturn = m_aCurrentDocRB.IsChecked() || @@ -209,7 +209,7 @@ sal_Bool SwMailMergeDocSelectPage::commitPage( CommitPageReason _eReason ) ((sReloadDocument = m_sLoadFileName).getLength() && m_aLoadDocRB.IsChecked() )|| ((sReloadDocument = m_sLoadTemplateName).getLength() && m_aLoadTemplateRB.IsChecked())|| (m_aRecentDocRB.IsChecked() && (sReloadDocument = m_aRecentDocLB.GetSelectEntry()).getLength()); - if( _eReason == eValidate ) + if( _eReason == ::svt::WizardTypes::eValidate ) m_pWizard->SetDocumentLoad(!m_aCurrentDocRB.IsChecked()); if(bNext && !m_aCurrentDocRB.IsChecked()) diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx index f9f4cc897c..363aecdddc 100644 --- a/sw/source/ui/dbui/mmdocselectpage.hxx +++ b/sw/source/ui/dbui/mmdocselectpage.hxx @@ -61,7 +61,7 @@ class SwMailMergeDocSelectPage : public svt::OWizardPage DECL_LINK(DocSelectHdl, RadioButton*); DECL_LINK(FileSelectHdl, PushButton*); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); public: SwMailMergeDocSelectPage( SwMailMergeWizard* _pParent); diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index 4e287a5a28..db0038274a 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -390,7 +390,7 @@ void SwMailMergeGreetingsPage::ActivatePage() /*-- 11.05.2004 14:47:10--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwMailMergeGreetingsPage::commitPage( CommitPageReason ) +sal_Bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPageReason ) { SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem(); diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx index c41e804da8..230beab4c3 100644 --- a/sw/source/ui/dbui/mmgreetingspage.hxx +++ b/sw/source/ui/dbui/mmgreetingspage.hxx @@ -122,7 +122,7 @@ class SwMailMergeGreetingsPage : public svt::OWizardPage, virtual void UpdatePreview(); virtual void ActivatePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); public: SwMailMergeGreetingsPage( SwMailMergeWizard* _pParent); ~SwMailMergeGreetingsPage(); diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index 8efda3455a..91312c9914 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -254,11 +254,11 @@ void SwMailMergeLayoutPage::ActivatePage() /*-- 11.05.2004 10:41:26--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwMailMergeLayoutPage::commitPage( CommitPageReason _eReason ) +sal_Bool SwMailMergeLayoutPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { //now insert the frame and the greeting SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); - if(eTravelForward == _eReason) + if(::svt::WizardTypes::eTravelForward == _eReason) { long nLeft = static_cast< long >(m_aLeftMF.Denormalize(m_aLeftMF.GetValue(FUNIT_TWIP))); long nTop = static_cast< long >(m_aTopMF.Denormalize(m_aTopMF.GetValue(FUNIT_TWIP))); diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx index 79bc1e1d15..137eb7bf04 100644 --- a/sw/source/ui/dbui/mmlayoutpage.hxx +++ b/sw/source/ui/dbui/mmlayoutpage.hxx @@ -98,7 +98,7 @@ class SwMailMergeLayoutPage : public svt::OWizardPage static void InsertGreeting(SwWrtShell& rShell, SwMailMergeConfigItem& rConfigItem, bool bExample); virtual void ActivatePage(); - virtual sal_Bool commitPage(CommitPageReason _eReason); + virtual sal_Bool commitPage(::svt::WizardTypes::CommitPageReason _eReason); public: SwMailMergeLayoutPage( SwMailMergeWizard* _pParent); ~SwMailMergeLayoutPage(); diff --git a/sw/source/ui/dbui/mmpreparemergepage.cxx b/sw/source/ui/dbui/mmpreparemergepage.cxx index a6dc5d09c1..5fe51c094e 100644 --- a/sw/source/ui/dbui/mmpreparemergepage.cxx +++ b/sw/source/ui/dbui/mmpreparemergepage.cxx @@ -191,10 +191,10 @@ void SwMailMergePrepareMergePage::ActivatePage() /*-- 13.05.2004 15:38:32--------------------------------------------------- merge the data into a new file -----------------------------------------------------------------------*/ -sal_Bool SwMailMergePrepareMergePage::commitPage( CommitPageReason _eReason ) +sal_Bool SwMailMergePrepareMergePage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); - if(eTravelForward == _eReason && !rConfigItem.IsMergeDone()) + if(::svt::WizardTypes::eTravelForward == _eReason && !rConfigItem.IsMergeDone()) { m_pWizard->CreateTargetDocument(); m_pWizard->SetRestartPage(MM_MERGEPAGE); diff --git a/sw/source/ui/dbui/mmpreparemergepage.hxx b/sw/source/ui/dbui/mmpreparemergepage.hxx index 25aded367e..53494b36d5 100644 --- a/sw/source/ui/dbui/mmpreparemergepage.hxx +++ b/sw/source/ui/dbui/mmpreparemergepage.hxx @@ -64,7 +64,7 @@ class SwMailMergePrepareMergePage : public svt::OWizardPage DECL_LINK(MoveHdl_Impl, void*); virtual void ActivatePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); public: SwMailMergePrepareMergePage( SwMailMergeWizard* _pParent); -- cgit v1.2.3 From 063e5f91a558d544b224c49ea558c0f54c02e637 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 25 May 2010 11:45:06 +0200 Subject: cws tl79: #i110254# security tab page in 'File/Properties' --- sw/inc/docsh.hxx | 2 ++ sw/source/ui/app/docsh.cxx | 15 +++++++++++++-- sw/source/ui/uiview/view2.cxx | 2 ++ sw/source/ui/uiview/viewstat.cxx | 8 +++----- 4 files changed, 20 insertions(+), 7 deletions(-) mode change 100644 => 100755 sw/source/ui/uiview/viewstat.cxx (limited to 'sw/source') diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index 5ac0a010b4..3840d59a16 100755 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -306,6 +306,8 @@ public: // passwword protection for Writer (derived from SfxObjectShell) // see also: FN_REDLINE_ON, FN_REDLINE_ON + virtual bool IsChangeRecording() const; + virtual bool HasChangeRecordProtection() const; virtual void SetChangeRecording( bool bActivate ); virtual bool SetProtectionPassword( const String &rPassword ); virtual bool GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash ); diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index 4e3931bbe7..2dbe7def8b 100755 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -1364,6 +1364,18 @@ const ::sfx2::IXmlIdRegistry* SwDocShell::GetXmlIdRegistry() const } +bool SwDocShell::IsChangeRecording() const +{ + return (pWrtShell->GetRedlineMode() & nsRedlineMode_t::REDLINE_ON) != 0; +} + + +bool SwDocShell::HasChangeRecordProtection() const +{ + return pWrtShell->getIDocumentRedlineAccess()->GetRedlinePassword().getLength() > 0; +} + + void SwDocShell::SetChangeRecording( bool bActivate ) { USHORT nOn = bActivate ? nsRedlineMode_t::REDLINE_ON : 0; @@ -1379,10 +1391,9 @@ bool SwDocShell::SetProtectionPassword( const String &rNewPassword ) const SfxPoolItem* pItem = NULL; IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess(); - Sequence< sal_Int8 > aPasswd = pIDRA->GetRedlinePassword(); if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, FALSE, &pItem ) - && ((SfxBoolItem*)pItem)->GetValue() == (aPasswd.getLength() != 0)) + && ((SfxBoolItem*)pItem)->GetValue() == aPasswd.getLength() > 0) return false; bool bRes = false; diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index d6e150dcb4..4258a47683 100755 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -545,6 +545,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq) else pParent = &GetViewFrame()->GetWindow(); SfxPasswordDialog aPasswdDlg( pParent ); + aPasswdDlg.SetMinLen( 1 ); //#i69751# the result of Execute() can be ignored aPasswdDlg.Execute(); String sNewPasswd( aPasswdDlg.GetPassword() ); @@ -581,6 +582,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq) else pParent = &GetViewFrame()->GetWindow(); SfxPasswordDialog aPasswdDlg( pParent ); + aPasswdDlg.SetMinLen( 1 ); if(!aPasswd.getLength()) aPasswdDlg.ShowExtras(SHOWEXTRAS_CONFIRM); if (aPasswdDlg.Execute()) diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx old mode 100644 new mode 100755 index 4022042cf9..1dd3d30cd9 --- a/sw/source/ui/uiview/viewstat.cxx +++ b/sw/source/ui/uiview/viewstat.cxx @@ -269,12 +269,10 @@ void SwView::GetState(SfxItemSet &rSet) } break; case FN_REDLINE_ON: - rSet.Put( SfxBoolItem( nWhich, (pWrtShell->GetRedlineMode() & nsRedlineMode_t::REDLINE_ON) != 0 ) ); - break; + rSet.Put( SfxBoolItem( nWhich, GetDocShell()->IsChangeRecording() ) ); + break; case FN_REDLINE_PROTECT : - { - rSet.Put( SfxBoolItem( nWhich, pWrtShell->getIDocumentRedlineAccess()->GetRedlinePassword().getLength() > 0 ) ); - } + rSet.Put( SfxBoolItem( nWhich, GetDocShell()->HasChangeRecordProtection() ) ); break; case FN_REDLINE_SHOW: { -- cgit v1.2.3 From 4d800f3ce1bad5d340c6b7921eed67d189cdec05 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 25 May 2010 17:01:06 +0200 Subject: sw33bf04: #i111677#: swdtflvr.cxx: call SetClipBoard() for clipboard docs --- sw/source/ui/dochdl/swdtflvr.cxx | 52 +++++++++++++++++++++++++--------------- sw/source/ui/inc/swdtflvr.hxx | 2 -- 2 files changed, 33 insertions(+), 21 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index 04819c586e..6b960bdb76 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -322,6 +322,19 @@ SwTransferable::~SwTransferable() // ----------------------------------------------------------------------- +static SwDoc * lcl_GetDoc(SwDocFac & rDocFac) +{ + SwDoc *const pDoc = rDocFac.GetDoc(); + ASSERT( pDoc, "Document not found" ); + if (pDoc) + { + pDoc->SetClipBoard( true ); + } + return pDoc; +} + +// ----------------------------------------------------------------------- + void SwTransferable::ObjectReleased() { SwModule *pMod = SW_MOD(); @@ -443,7 +456,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor ) } pClpDocFac = new SwDocFac; - SwDoc* pTmpDoc = pClpDocFac->GetDoc(); + SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac); pTmpDoc->SetRefForDocShell( boost::addressof(aDocShellRef) ); pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen @@ -530,8 +543,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor ) case SOT_FORMATSTR_ID_DRAWING: { - SwDoc *pDoc = pClpDocFac->GetDoc(); - ASSERT( pDoc, "Document not found" ); + SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); bOK = SetObject( pDoc->GetDrawModel(), SWTRANSFER_OBJECTTYPE_DRAWMODEL, rFlavor ); } @@ -539,21 +551,22 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor ) case SOT_FORMAT_STRING: { - SwDoc* pDoc = pClpDocFac->GetDoc(); - ASSERT( pDoc, "Document not found" ); - pDoc->SetClipBoard( true ); - bOK = SetObject( pDoc, - SWTRANSFER_OBJECTTYPE_STRING, rFlavor ); + SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); + bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_STRING, rFlavor ); } break; case SOT_FORMAT_RTF: - bOK = SetObject( pClpDocFac->GetDoc(), - SWTRANSFER_OBJECTTYPE_RTF, rFlavor ); + { + SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); + bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_RTF, rFlavor ); + } break; case SOT_FORMATSTR_ID_HTML: - bOK = SetObject( pClpDocFac->GetDoc(), - SWTRANSFER_OBJECTTYPE_HTML, rFlavor ); + { + SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); + bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_HTML, rFlavor ); + } break; case SOT_FORMATSTR_ID_SVXB: @@ -597,7 +610,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor ) // default: if( !aDocShellRef.Is() ) { - SwDoc *pDoc = pClpDocFac->GetDoc(); + SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); SwDocShell* pNewDocSh = new SwDocShell( pDoc, SFX_CREATE_MODE_EMBEDDED ); aDocShellRef = pNewDocSh; @@ -805,7 +818,8 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut ) pOrigGrf = pClpBitmap; pClpDocFac = new SwDocFac; - pWrtShell->Copy( pClpDocFac->GetDoc() ); + SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); + pWrtShell->Copy( pDoc ); if (pOrigGrf && !pOrigGrf->GetBitmap().IsEmpty()) AddFormat( SOT_FORMATSTR_ID_SVXB ); @@ -827,7 +841,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut ) else if ( nSelection == nsSelectionType::SEL_OLE ) { pClpDocFac = new SwDocFac; - SwDoc *pDoc = pClpDocFac->GetDoc(); + SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); aDocShellRef = new SwDocShell( pDoc, SFX_CREATE_MODE_EMBEDDED); aDocShellRef->DoInitNew( NULL ); pWrtShell->Copy( pDoc ); @@ -857,8 +871,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut ) if( pWrtShell->IsAddMode() && pWrtShell->SwCrsrShell::HasSelection() ) pWrtShell->CreateCrsr(); - SwDoc* pTmpDoc = pClpDocFac->GetDoc(); - pTmpDoc->SetClipBoard( true ); + SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac); pTmpDoc->SetRefForDocShell( boost::addressof(aDocShellRef) ); pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen @@ -1017,7 +1030,8 @@ int SwTransferable::CalculateAndCopy() String aStr( pWrtShell->Calculate() ); pClpDocFac = new SwDocFac; - pWrtShell->Copy( pClpDocFac->GetDoc(), &aStr); + SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); + pWrtShell->Copy(pDoc, & aStr); eBufferType = TRNSFR_DOCUMENT; AddFormat( FORMAT_STRING ); @@ -1037,7 +1051,7 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, SwWait aWait( *pWrtShell->GetView().GetDocShell(), TRUE ); pClpDocFac = new SwDocFac; - SwDoc* pCDoc = pClpDocFac->GetDoc(); + SwDoc *const pCDoc = lcl_GetDoc(*pClpDocFac); SwNodes& rNds = pCDoc->GetNodes(); SwNodeIndex aNodeIdx( *rNds.GetEndOfContent().StartOfSectionNode() ); diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx index 3e93acb021..382188f9e3 100644 --- a/sw/source/ui/inc/swdtflvr.hxx +++ b/sw/source/ui/inc/swdtflvr.hxx @@ -26,12 +26,10 @@ ************************************************************************/ #ifndef _SWDTFLVR_HXX #define _SWDTFLVR_HXX -#ifndef _TRANSFER_HXX #include #include -#endif #include #include #include -- cgit v1.2.3 From 5a771e6e9dcc4e04e8d901628da5503e99a19f74 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 25 May 2010 17:02:28 +0200 Subject: sw33bf04: #i111677#: prevent number string expansion in clipboard: SwTxtNode: add member: number string cache. [how to add this to SwNodeNum is not obvious, so add it to SwTxtNode.] SwTxtNode::GetNumString(): use cached number string in clipboard. SwTxtNode::CopyText(): cache source number string in clipboard. --- sw/inc/ndtxt.hxx | 6 ++++-- sw/source/core/txtnode/ndtxt.cxx | 12 ++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index ad783f1235..6ab26551ac 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _NDTXT_HXX -#define _NDTXT_HXX +#ifndef SW_NDTXT_HXX +#define SW_NDTXT_HXX #include @@ -133,6 +133,8 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable // pointer to the list, to whose the text node is added to SwList* mpList; // <-- + /// #i111677# cached expansion (for clipboard) + ::std::auto_ptr< ::rtl::OUString > m_pNumStringCache; ::com::sun::star::uno::WeakReference< ::com::sun::star::text::XTextContent> m_wXParagraph; diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 85d92ee613..f6dec7221f 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1486,6 +1486,13 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, xub_StrLen nTxtStartIdx = rStart.GetIndex(); xub_StrLen nDestStart = rDestStart.GetIndex(); // alte Pos merken + if (pDest->GetDoc()->IsClipBoard() && this->GetNum()) + { + // #i111677# cache expansion of source (for clipboard) + pDest->m_pNumStringCache.reset( + new ::rtl::OUString(this->GetNumString())); + } + if( !nLen ) { // wurde keine Laenge angegeben, dann Kopiere die Attribute @@ -2771,6 +2778,11 @@ BOOL SwTxtNode::HasBullet() const //i53420 added max outline parameter XubString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings, const unsigned int _nRestrictToThisLevel ) const { + if (GetDoc()->IsClipBoard() && m_pNumStringCache.get()) + { + // #i111677# do not expand number strings in clipboard documents + return *m_pNumStringCache; + } const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L; if ( pRule && IsCountedInList() && -- cgit v1.2.3 From 6becf517608b592e54a856e2c9e257668b4ad076 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 25 May 2010 17:04:49 +0200 Subject: sw33bf04: #i111727#: SwDoc::DeleteRange should adjust cursors (via PaMCorrAbs) --- sw/inc/doc.hxx | 1 + sw/source/core/doc/docedt.cxx | 29 +++++++++++++++++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 6e1f099cbd..e824789630 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -715,6 +715,7 @@ private: bool DeleteAndJoinImpl(SwPaM&, const bool); bool DeleteAndJoinWithRedlineImpl(SwPaM&, const bool unused = false); bool DeleteRangeImpl(SwPaM&, const bool unused = false); + bool DeleteRangeImplImpl(SwPaM &); bool ReplaceRangeImpl(SwPaM&, String const&, const bool); public: diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 8f6fe89a59..08fc9681bf 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -1604,17 +1604,9 @@ bool SwDoc::DeleteAndJoinImpl( SwPaM & rPam, } // <-- { - // dann eine Kopie vom Cursor erzeugen um alle Pams aus den - // anderen Sichten aus dem Loeschbereich zu verschieben - // ABER NICHT SICH SELBST !! - SwPaM aDelPam( *rPam.GetMark(), *rPam.GetPoint() ); - ::PaMCorrAbs( aDelPam, *aDelPam.GetPoint() ); - - const bool bSuccess( DeleteRangeImpl( aDelPam ) ); + bool const bSuccess( DeleteRangeImpl( rPam ) ); if (!bSuccess) return false; - - *rPam.GetPoint() = *aDelPam.GetPoint(); } if( bJoinTxt ) @@ -1625,7 +1617,24 @@ bool SwDoc::DeleteAndJoinImpl( SwPaM & rPam, return true; } -bool SwDoc::DeleteRangeImpl( SwPaM & rPam, const bool ) +bool SwDoc::DeleteRangeImpl(SwPaM & rPam, const bool) +{ + // move all cursors out of the deleted range. + // but first copy the given PaM, because it could be a cursor that + // would be moved! + SwPaM aDelPam( *rPam.GetMark(), *rPam.GetPoint() ); + ::PaMCorrAbs( aDelPam, *aDelPam.GetPoint() ); + + bool const bSuccess( DeleteRangeImplImpl( aDelPam ) ); + if (bSuccess) + { // now copy position from temp copy to given PaM + *rPam.GetPoint() = *aDelPam.GetPoint(); + } + + return bSuccess; +} + +bool SwDoc::DeleteRangeImplImpl(SwPaM & rPam) { SwPosition *pStt = (SwPosition*)rPam.Start(), *pEnd = (SwPosition*)rPam.End(); -- cgit v1.2.3 From 4195c5160cf76c88b2d45566e0a361229facdf86 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 26 May 2010 13:43:21 +0100 Subject: cmcfixes74: #i110859 fix solaris compiler warning and disambiguate the AppendSeps --- sw/source/filter/ww8/docxexport.cxx | 8 ++++---- sw/source/filter/ww8/wrtw8sty.cxx | 14 +++++++------- sw/source/filter/ww8/wrtww8.hxx | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 195dd04ecf..41f1821d83 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -439,7 +439,7 @@ void DocxExport::OutputPageSectionBreaks( const SwTxtNode& ) void DocxExport::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum ) { AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() ); - m_pSections->AppendSep( pPageDesc, pFmt, nLnNum ); + m_pSections->AppendSection( pPageDesc, pFmt, nLnNum ); } void DocxExport::OutputEndNode( const SwEndNode& rEndNode ) @@ -473,7 +473,7 @@ void DocxExport::OutputEndNode( const SwEndNode& rEndNode ) nRstLnNum = 0; AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo( ) ); - m_pSections->AppendSep( pAktPageDesc, pParentFmt, nRstLnNum ); + m_pSections->AppendSection( pAktPageDesc, pParentFmt, nRstLnNum ); } } } @@ -521,11 +521,11 @@ void DocxExport::PrepareNewPageDesc( const SfxItemSet* pSet, if ( pNewPgDescFmt ) { - m_pSections->AppendSep( *pNewPgDescFmt, rNd, pFmt, nLnNm ); + m_pSections->AppendSection( *pNewPgDescFmt, rNd, pFmt, nLnNm ); } else if ( pNewPgDesc ) { - m_pSections->AppendSep( pNewPgDesc, rNd, pFmt, nLnNm ); + m_pSections->AppendSection( pNewPgDesc, rNd, pFmt, nLnNm ); } } diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 8f39cb61c9..5984ccf8e0 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -912,10 +912,10 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport ) SFX_ITEM_ON == pSet->GetItemState( RES_PAGEDESC, true, &pI ) && ( (SwFmtPageDesc*)pI )->GetPageDesc() ) { - AppendSep( *(SwFmtPageDesc*)pI, *pNd, pFmt, nRstLnNum ); + AppendSection( *(SwFmtPageDesc*)pI, *pNd, pFmt, nRstLnNum ); } else - AppendSep( rExport.pAktPageDesc, pFmt, nRstLnNum ); + AppendSection( rExport.pAktPageDesc, pFmt, nRstLnNum ); } WW8_WrPlcSepx::WW8_WrPlcSepx( MSWordExportBase& rExport ) @@ -924,7 +924,7 @@ WW8_WrPlcSepx::WW8_WrPlcSepx( MSWordExportBase& rExport ) pAttrs( 0 ), pTxtPos( 0 ) { - // to be in sync with the AppendSep() call in the MSWordSections + // to be in sync with the AppendSection() call in the MSWordSections // constructor aCps.Insert( ULONG( 0 ), aCps.Count() ); } @@ -987,7 +987,7 @@ const WW8_SepInfo* MSWordSections::CurrentSectionInfo() return NULL; } -void MSWordSections::AppendSep( const SwPageDesc* pPd, +void MSWordSections::AppendSection( const SwPageDesc* pPd, const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo ) { aSects.Insert( WW8_SepInfo( pPd, pSectionFmt, nLnNumRestartNo ), @@ -1000,10 +1000,10 @@ void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwPageDesc* pPd, { aCps.Insert( nStartCp, aCps.Count() ); - MSWordSections::AppendSep( pPd, pSectionFmt, nLnNumRestartNo ); + AppendSection( pPd, pSectionFmt, nLnNumRestartNo ); } -void MSWordSections::AppendSep( const SwFmtPageDesc& rPD, +void MSWordSections::AppendSection( const SwFmtPageDesc& rPD, const SwNode& rNd, const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo ) { WW8_SepInfo aI( rPD.GetPageDesc(), pSectionFmt, nLnNumRestartNo, @@ -1017,7 +1017,7 @@ void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwFmtPageDesc& rPD, { aCps.Insert(nStartCp, aCps.Count()); - MSWordSections::AppendSep( rPD, rNd, pSectionFmt, nLnNumRestartNo ); + AppendSection( rPD, rNd, pSectionFmt, nLnNumRestartNo ); } // MSWordSections::SetNum() setzt in jeder Section beim 1. Aufruf den diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index dd79b0f91c..52fb08213e 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -192,10 +192,10 @@ public: MSWordSections( MSWordExportBase& rExport ); virtual ~MSWordSections(); - void AppendSep( const SwPageDesc* pPd, + void AppendSection( const SwPageDesc* pPd, const SwSectionFmt* pSectionFmt = 0, ULONG nLnNumRestartNo = 0 ); - void AppendSep( const SwFmtPageDesc& rPd, + void AppendSection( const SwFmtPageDesc& rPd, const SwNode& rNd, const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo ); -- cgit v1.2.3 From e2603b076368cde2ab82346be4eb21489bb829d1 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 26 May 2010 15:54:55 +0200 Subject: fwk139: #i111034# integrate patch --- sw/source/ui/app/apphdl.cxx | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 708d6ceed3..f61b6434f1 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -765,16 +765,31 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) DELETEZ(pWebToolbarConfig) ; DELETEZ(pAuthorNames) ; DELETEZ(pDBConfig); - pColorConfig->RemoveListener(this); - DELETEZ(pColorConfig); - pAccessibilityOptions->RemoveListener(this); - DELETEZ(pAccessibilityOptions); - pCTLOptions->RemoveListener(this); - DELETEZ(pCTLOptions); - pUserOptions->RemoveListener(this); - DELETEZ(pUserOptions); - pUndoOptions->RemoveListener(this); - DELETEZ(pUndoOptions); + if( pColorConfig ) + { + pColorConfig->RemoveListener(this); + DELETEZ(pColorConfig); + } + if( pAccessibilityOptions ) + { + pAccessibilityOptions->RemoveListener(this); + DELETEZ(pAccessibilityOptions); + } + if( pCTLOptions ) + { + pCTLOptions->RemoveListener(this); + DELETEZ(pCTLOptions); + } + if( pUserOptions ) + { + pUserOptions->RemoveListener(this); + DELETEZ(pUserOptions); + } + if( pUndoOptions ) + { + pUndoOptions->RemoveListener(this); + DELETEZ(pUndoOptions); + } } } } -- cgit v1.2.3 From b776aaee773a904c68196bb04b9975f102590aca Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Thu, 27 May 2010 11:57:15 +0200 Subject: hb33issues01: #b6951450# export table spacing --- sw/source/filter/ww8/attributeoutputbase.hxx | 2 ++ sw/source/filter/ww8/docxattributeoutput.cxx | 7 +++++ sw/source/filter/ww8/wrtww8.cxx | 38 ++++++++++++++++++++++++++++ sw/source/filter/ww8/ww8attributeoutput.hxx | 2 ++ 4 files changed, 49 insertions(+) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index 47a42b2079..b0cd811e35 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -232,6 +232,8 @@ public: virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) = 0; + virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) = 0; + virtual void TableRowEnd( sal_uInt32 nDepth ) = 0; /// Start of the styles table. diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 76eea38544..2dbd7a8d7e 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1460,6 +1460,13 @@ void DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_ #endif } +void DocxAttributeOutput::TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ ) +{ +#if OSL_DEBUG_LEVEL > 0 + fprintf( stderr, "TODO: DocxAttributeOutput::TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )\n" ); +#endif +} + void DocxAttributeOutput::TableRowEnd( sal_uInt32 /*nDepth*/ ) { #if OSL_DEBUG_LEVEL > 0 diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 916ad970df..1ecc6caa02 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -58,10 +58,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -1910,6 +1912,7 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa TableBidi( pTableTextNodeInfoInner ); TableVerticalCell( pTableTextNodeInfoInner ); TableOrientation( pTableTextNodeInfoInner ); + TableSpacing( pTableTextNodeInfoInner ); } } } @@ -2091,6 +2094,41 @@ void WW8AttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t } } +void WW8AttributeOutput::TableSpacing(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) +{ + const SwTable * pTable = pTableTextNodeInfoInner->getTable(); + const SwTableFmt * pTableFmt = dynamic_cast(pTable->GetRegisteredIn()); + + if (pTableFmt != NULL) + { + const SvxULSpaceItem & rUL = pTableFmt->GetULSpace(); + + if (rUL.GetUpper() > 0) + { + sal_uInt8 nPadding = 2; + sal_uInt8 nPcVert = 0; + sal_uInt8 nPcHorz = 0; + + sal_uInt8 nTPc = (nPadding << 4) | (nPcVert << 2) | nPcHorz; + + m_rWW8Export.InsUInt16(NS_sprm::LN_TPc); + m_rWW8Export.pO->Insert( nTPc, m_rWW8Export.pO->Count() ); + + m_rWW8Export.InsUInt16(NS_sprm::LN_TDyaAbs); + m_rWW8Export.InsUInt16(rUL.GetUpper()); + + m_rWW8Export.InsUInt16(NS_sprm::LN_TDyaFromText); + m_rWW8Export.InsUInt16(rUL.GetUpper()); + } + + if (rUL.GetLower() > 0) + { + m_rWW8Export.InsUInt16(NS_sprm::LN_TDyaFromTextBottom); + m_rWW8Export.InsUInt16(rUL.GetLower()); + } + } +} + void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx index c8b39265d0..c064da270b 100644 --- a/sw/source/filter/ww8/ww8attributeoutput.hxx +++ b/sw/source/filter/ww8/ww8attributeoutput.hxx @@ -124,6 +124,8 @@ public: virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + virtual void TableRowEnd( sal_uInt32 nDepth = 1 ); /// Start of the styles table. -- cgit v1.2.3 From 48a9237f269c7ac0831634d7b5eb173c90c81cdd Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 27 May 2010 15:31:26 +0200 Subject: sw33bf04: #i111172# method - further adjustment of handling existing indent when current text node is already in a list. --- sw/source/ui/wrtsh/wrtsh1.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index b98a16c2da..b3087f78fb 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -1395,7 +1395,10 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) if ( pTxtNode->GetNumRule() ) { const SwNumFmt aFmt( aNumRule.Get( 0 ) ); - nIndentChange -= aFmt.GetIndentAt() + aFmt.GetFirstLineIndent(); + if ( aFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + { + nIndentChange -= aFmt.GetIndentAt() + aFmt.GetFirstLineIndent(); + } } // <-- aNumRule.ChangeIndent( nIndentChange ); -- cgit v1.2.3 From b41bf2e3d305679781f61763a9fa1506e1608454 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Fri, 28 May 2010 14:31:14 +0200 Subject: #b6951450# WW8TableInfo: Store information that text node is first in a table. OutputTextNode: Output page break before on first paragraph in table, if table has page break before. --- sw/source/filter/ww8/WW8TableInfo.cxx | 32 ++++++++++++++++++++++++++++++++ sw/source/filter/ww8/WW8TableInfo.hxx | 14 ++++++++++++++ sw/source/filter/ww8/wrtw8nds.cxx | 12 ++++++++++++ 3 files changed, 58 insertions(+) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index f0d65a7544..12f1f0c1ba 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -47,6 +47,7 @@ WW8TableNodeInfoInner::WW8TableNodeInfoInner(WW8TableNodeInfo * pParent) , mnRow(0) , mbEndOfLine(false) , mbEndOfCell(false) +, mbFirstInTable(false) , mpTableBox(NULL) , mpTable(NULL) { @@ -81,6 +82,11 @@ void WW8TableNodeInfoInner::setEndOfCell(bool bEndOfCell) mbEndOfCell = bEndOfCell; } +void WW8TableNodeInfoInner::setFirstInTable(bool bFirstInTable) +{ + mbFirstInTable = bFirstInTable; +} + void WW8TableNodeInfoInner::setTableBox(const SwTableBox * pTableBox) { mpTableBox = pTableBox; @@ -116,6 +122,11 @@ bool WW8TableNodeInfoInner::isEndOfLine() const return mbEndOfLine; } +bool WW8TableNodeInfoInner::isFirstInTable() const +{ + return mbFirstInTable; +} + const SwNode * WW8TableNodeInfoInner::getNode() const { const SwNode * pResult = NULL; @@ -230,6 +241,17 @@ void WW8TableNodeInfo::setEndOfCell(bool bEndOfCell) #endif } +void WW8TableNodeInfo::setFirstInTable(bool bFirstInTable) +{ + WW8TableNodeInfoInner::Pointer_t pInner = getInnerForDepth(mnDepth); + pInner->setFirstInTable(bFirstInTable); + +#ifdef DEBUG + ::std::clog << "" + << toString() << "" << ::std::endl; +#endif +} + void WW8TableNodeInfo::setTableBox(const SwTableBox * pTableBox) { getInnerForDepth(mnDepth)->setTableBox(pTableBox); @@ -590,6 +612,16 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo pNodeInfo->setCell(nCell); pNodeInfo->setRow(nRow); + + if (pNode->IsTxtNode()) + { + FirstInTableMap_t::const_iterator aIt = mFirstInTableMap.find(pTable); + if (aIt == mFirstInTableMap.end()) + { + mFirstInTableMap[pTable] = pNode; + pNodeInfo->setFirstInTable(true); + } + } #ifdef DEBUG ::std::clog << pNodeInfo->toString() << ::std::endl; diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index 620fa620e4..fe8b6a1765 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -54,6 +54,7 @@ class WW8TableNodeInfoInner sal_uInt32 mnRow; bool mbEndOfLine; bool mbEndOfCell; + bool mbFirstInTable; const SwTableBox * mpTableBox; const SwTable * mpTable; @@ -68,6 +69,7 @@ public: void setRow(sal_uInt32 nRow); void setEndOfLine(bool bEndOfLine); void setEndOfCell(bool bEndOfCell); + void setFirstInTable(bool bFirstInTable); void setTableBox(const SwTableBox * pTableBox); void setTable(const SwTable * pTable); @@ -76,6 +78,7 @@ public: sal_uInt32 getRow() const; bool isEndOfCell() const; bool isEndOfLine() const; + bool isFirstInTable() const; const SwTableBox * getTableBox() const; const SwTable * getTable() const; @@ -105,6 +108,7 @@ public: void setDepth(sal_uInt32 nDepth); void setEndOfLine(bool bEndOfLine); void setEndOfCell(bool bEndOfCell); + void setFirstInTable(bool bFirstInTable); void setTableBox(const SwTableBox *pTableBox); void setTable(const SwTable * pTable); void setCell(sal_uInt32 nCell); @@ -115,6 +119,7 @@ public: sal_uInt32 getDepth() const; bool isEndOfLine() const; bool isEndOfCell() const; + bool isFirstInTable() const; const SwNode * getNode() const; const SwTableBox * getTableBox() const; const SwTable * getTable() const; @@ -137,10 +142,18 @@ struct hashNode { return reinterpret_cast(pNode); } }; +struct hashTable +{ + size_t operator()(const SwTable * pTable) const + { return reinterpret_cast(pTable); } +}; + class WW8TableInfo { typedef hash_map Map_t; Map_t mMap; + typedef hash_map FirstInTableMap_t; + FirstInTableMap_t mFirstInTableMap; WW8TableNodeInfo * processTableLine(const SwTable * pTable, @@ -180,6 +193,7 @@ public: void processSwTable(const SwTable * pTable); WW8TableNodeInfo::Pointer_t getTableNodeInfo(const SwNode * pNode); const SwNode * getNextNode(const SwNode * pNode); + const WW8TableNodeInfo * getFirstTableNodeInfo() const; }; } diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index d0a9f5ee3e..e3ed586c71 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -77,6 +77,7 @@ #include #include #include +#include #include #include #include @@ -1899,6 +1900,17 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) #endif AttrOutput().TableInfoCell( pTextNodeInfoInner ); + if (pTextNodeInfoInner->isFirstInTable()) + { + const SwTable * pTable = pTextNodeInfoInner->getTable(); + const SwTableFmt * pTabFmt = + dynamic_cast(pTable->GetRegisteredIn()); + if (pTabFmt != NULL) + { + if (pTabFmt->GetBreak().GetBreak() == SVX_BREAK_PAGE_BEFORE) + AttrOutput().PageBreakBefore(true); + } + } } if ( !bFlyInTable ) -- cgit v1.2.3 From 55301dad03344ceb7d5f0ff38bfb08c2fa5be551 Mon Sep 17 00:00:00 2001 From: hb Date: Mon, 31 May 2010 11:21:00 +0200 Subject: hb33issues01: building errors in sw --- sw/inc/swtblfmt.hxx | 2 +- sw/source/filter/rtf/wrtrtf.cxx | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx index e94ba5c5e8..ee78d93e53 100644 --- a/sw/inc/swtblfmt.hxx +++ b/sw/inc/swtblfmt.hxx @@ -31,7 +31,7 @@ class SwDoc; -class SwTableFmt : public SwFrmFmt +class SW_DLLPUBLIC SwTableFmt : public SwFrmFmt { friend class SwDoc; diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx index d960dc662e..31c77c5f86 100644 --- a/sw/source/filter/rtf/wrtrtf.cxx +++ b/sw/source/filter/rtf/wrtrtf.cxx @@ -85,9 +85,6 @@ const sal_Char SwRTFWriter::sNewLine = '\012'; const sal_Char __FAR_DATA SwRTFWriter::sNewLine[] = "\015\012"; #endif -static ::rtl::OUString aEmpty; - - SV_DECL_VARARR( RTFColorTbl, Color, 5, 8 ) SV_IMPL_VARARR( RTFColorTbl, Color ) -- cgit v1.2.3 From 2047a1411244e1d6d6600d1834d1865831961b3f Mon Sep 17 00:00:00 2001 From: tono Date: Mon, 31 May 2010 21:53:32 +0900 Subject: i#111958: MinGW port enhancement: runtime-pseude-reloc-v2 --- sw/source/filter/rtf/rtfatr.cxx | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx index fde66c4d2b..6241d94f37 100644 --- a/sw/source/filter/rtf/rtfatr.cxx +++ b/sw/source/filter/rtf/rtfatr.cxx @@ -3773,11 +3773,7 @@ static Writer& OutRTF_SwFmtBox( Writer& rWrt, const SfxPoolItem& rHt ) static USHORT __READONLY_DATA aBorders[] = { BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT }; -#ifdef __MINGW32__ // for runtime pseudo reloc - static const sal_Char* aBorderNames[] = { -#else static const sal_Char* __READONLY_DATA aBorderNames[] = { -#endif OOO_STRING_SVTOOLS_RTF_BRDRT, OOO_STRING_SVTOOLS_RTF_BRDRL, OOO_STRING_SVTOOLS_RTF_BRDRB, OOO_STRING_SVTOOLS_RTF_BRDRR }; USHORT nDist = rBox.GetDistance(); -- cgit v1.2.3 From 79a040fbd7dd0fd218cfb7ca94a6f0228ef89192 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Tue, 1 Jun 2010 12:53:45 +0200 Subject: hb33issues: #i111595# check for NULL pointer --- sw/source/filter/ww8/ww8par.cxx | 95 +++++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 46 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 9586a78f58..45470f0c1e 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -573,60 +573,63 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, aSet.Put( SdrTextVertAdjustItem( eTVA ) ); aSet.Put( SdrTextHorzAdjustItem( eTHA ) ); - pObj->SetMergedItemSet(aSet); - pObj->SetModel(pSdrModel); - - if (bVerticalText && dynamic_cast< SdrTextObj* >( pObj ) ) - dynamic_cast< SdrTextObj* >( pObj )->SetVerticalWriting(sal_True); - - if ( bIsSimpleDrawingTextBox ) + if (pObj != NULL) { - if ( nTextRotationAngle ) + pObj->SetMergedItemSet(aSet); + pObj->SetModel(pSdrModel); + + if (bVerticalText && dynamic_cast< SdrTextObj* >( pObj ) ) + dynamic_cast< SdrTextObj* >( pObj )->SetVerticalWriting(sal_True); + + if ( bIsSimpleDrawingTextBox ) { - long nMinWH = rTextRect.GetWidth() < rTextRect.GetHeight() ? - rTextRect.GetWidth() : rTextRect.GetHeight(); - nMinWH /= 2; - Point aPivot(rTextRect.TopLeft()); - aPivot.X() += nMinWH; - aPivot.Y() += nMinWH; - double a = nTextRotationAngle * nPi180; - pObj->NbcRotate(aPivot, nTextRotationAngle, sin(a), cos(a)); + if ( nTextRotationAngle ) + { + long nMinWH = rTextRect.GetWidth() < rTextRect.GetHeight() ? + rTextRect.GetWidth() : rTextRect.GetHeight(); + nMinWH /= 2; + Point aPivot(rTextRect.TopLeft()); + aPivot.X() += nMinWH; + aPivot.Y() += nMinWH; + double a = nTextRotationAngle * nPi180; + pObj->NbcRotate(aPivot, nTextRotationAngle, sin(a), cos(a)); + } } - } - - if ( ( ( rObjData.nSpFlags & SP_FFLIPV ) || mnFix16Angle || nTextRotationAngle ) && dynamic_cast< SdrObjCustomShape* >( pObj ) ) - { - SdrObjCustomShape* pCustomShape = dynamic_cast< SdrObjCustomShape* >( pObj ); - double fExtraTextRotation = 0.0; - if ( mnFix16Angle && !( GetPropertyValue( DFF_Prop_FitTextToShape ) & 4 ) ) - { // text is already rotated, we have to take back the object rotation if DFF_Prop_RotateText is false - fExtraTextRotation = -mnFix16Angle; - } - if ( rObjData.nSpFlags & SP_FFLIPV ) // sj: in ppt the text is flipped, whereas in word the text - { // remains unchanged, so we have to take back the flipping here - fExtraTextRotation += 18000.0; // because our core will flip text if the shape is flipped. + if ( ( ( rObjData.nSpFlags & SP_FFLIPV ) || mnFix16Angle || nTextRotationAngle ) && dynamic_cast< SdrObjCustomShape* >( pObj ) ) + { + SdrObjCustomShape* pCustomShape = dynamic_cast< SdrObjCustomShape* >( pObj ); + + double fExtraTextRotation = 0.0; + if ( mnFix16Angle && !( GetPropertyValue( DFF_Prop_FitTextToShape ) & 4 ) ) + { // text is already rotated, we have to take back the object rotation if DFF_Prop_RotateText is false + fExtraTextRotation = -mnFix16Angle; + } + if ( rObjData.nSpFlags & SP_FFLIPV ) // sj: in ppt the text is flipped, whereas in word the text + { // remains unchanged, so we have to take back the flipping here + fExtraTextRotation += 18000.0; // because our core will flip text if the shape is flipped. + } + fExtraTextRotation += nTextRotationAngle; + if ( !::basegfx::fTools::equalZero( fExtraTextRotation ) ) + { + fExtraTextRotation /= 100.0; + SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); + const rtl::OUString sTextRotateAngle( RTL_CONSTASCII_USTRINGPARAM ( "TextRotateAngle" ) ); + com::sun::star::beans::PropertyValue aPropVal; + aPropVal.Name = sTextRotateAngle; + aPropVal.Value <<= fExtraTextRotation; + aGeometryItem.SetPropertyValue( aPropVal ); + pCustomShape->SetMergedItem( aGeometryItem ); + } } - fExtraTextRotation += nTextRotationAngle; - if ( !::basegfx::fTools::equalZero( fExtraTextRotation ) ) + else if ( mnFix16Angle ) { - fExtraTextRotation /= 100.0; - SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); - const rtl::OUString sTextRotateAngle( RTL_CONSTASCII_USTRINGPARAM ( "TextRotateAngle" ) ); - com::sun::star::beans::PropertyValue aPropVal; - aPropVal.Name = sTextRotateAngle; - aPropVal.Value <<= fExtraTextRotation; - aGeometryItem.SetPropertyValue( aPropVal ); - pCustomShape->SetMergedItem( aGeometryItem ); + // rotate text with shape ? + double a = mnFix16Angle * nPi180; + pObj->NbcRotate( rObjData.aBoundRect.Center(), mnFix16Angle, + sin( a ), cos( a ) ); } } - else if ( mnFix16Angle ) - { - // rotate text with shape ? - double a = mnFix16Angle * nPi180; - pObj->NbcRotate( rObjData.aBoundRect.Center(), mnFix16Angle, - sin( a ), cos( a ) ); - } } else if( !pObj ) { -- cgit v1.2.3 From c94fd269276b37be4a4697bb138c87b095cbc167 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Thu, 3 Jun 2010 00:10:45 +0200 Subject: tl78: #i110383# password to modify support for binary types only --- sw/source/ui/uno/SwXDocumentSettings.cxx | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index 96213e8de6..59fbcef91f 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -124,7 +124,6 @@ enum SwDocumentSettingsPropertyHandles // --> OD 2008-06-05 #i89181# HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, // <-- - HANDLE_MODIFYPASSWORDHASH }; MasterPropertySetInfo * lcl_createSettingsInfo() @@ -178,7 +177,6 @@ MasterPropertySetInfo * lcl_createSettingsInfo() { RTL_CONSTASCII_STRINGPARAM("ProtectForm"), HANDLE_PROTECT_FORM, CPPUTYPE_BOOLEAN, 0, 0}, // --> OD 2008-06-05 #i89181# { RTL_CONSTASCII_STRINGPARAM("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ModifyPasswordHash"), HANDLE_MODIFYPASSWORDHASH, CPPUTYPE_INT32, 0, 0}, /* * As OS said, we don't have a view when we need to set this, so I have to @@ -673,21 +671,6 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf } break; // <-- - case HANDLE_MODIFYPASSWORDHASH: - { - sal_Int32 nHash = 0; - if ( !( rValue >>= nHash ) || nHash < 0 || nHash > SAL_MAX_UINT16 ) - throw lang::IllegalArgumentException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Value of type INT32, representing UINT16 expected!" ) ), - uno::Reference< uno::XInterface >(), - 2 ); - - if ( !mpDocSh->SetModifyPasswordHash( static_cast< sal_uInt16 >( nHash ) ) ) - throw beans::PropertyVetoException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The hash is not allowed to be changed now!" ) ), - uno::Reference< uno::XInterface >() ); - } - break; default: throw UnknownPropertyException(); } @@ -1015,11 +998,6 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf } break; // <-- - case HANDLE_MODIFYPASSWORDHASH: - { - rValue <<= static_cast< sal_Int32 >( mpDocSh->GetModifyPasswordHash() ); - } - break; default: throw UnknownPropertyException(); -- cgit v1.2.3 From 757ee656b8b86b6087851a7dfe124db68978bf91 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 3 Jun 2010 10:54:44 +0200 Subject: sw33bf05: #i111964# - provide default sidebar position at instance and include access guards for the anchor overlay object of annotations. --- sw/source/core/layout/pagechg.cxx | 10 +++++++--- sw/source/ui/docvw/PostItMgr.cxx | 40 +++++++++++++++++++++++---------------- sw/source/ui/docvw/SidebarWin.cxx | 39 +++++++++++++++++++++++++++++++------- 3 files changed, 63 insertions(+), 26 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 0e50ee3e3a..8ca7c2db14 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -1385,11 +1385,15 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, BOOL bFtn ) return pPage; } -// false = right, true = left sw::sidebarwindows::SidebarPosition SwPageFrm::SidebarPosition() const { - if (!GetShell() || GetShell()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE)) - return sw::sidebarwindows::SIDEBAR_NONE; + if ( !GetShell() || + GetShell()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ) + { + // --> OD 2010-06-03 #i111964# - provide default sidebar position + return sw::sidebarwindows::SIDEBAR_RIGHT; + // <-- + } else { const bool bLTR = GetUpper() ? static_cast(GetUpper())->IsLeftToRightViewLayout() : true; diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index e8de9b4be8..9afc8455f6 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -1669,28 +1669,36 @@ void SwPostItMgr::CorrectPositions() if (!pFirstPostIt) return; - // yeah, I know, if this is a left page it could be wrong, but finding the page and the note is probably not even faster than just doing it - const long aAnchorX = mpEditWin->LogicToPixel( Point((long)(pFirstPostIt->Anchor()->GetSixthPosition().getX()),0)).X(); - const long aAnchorY = mpEditWin->LogicToPixel( Point(0,(long)(pFirstPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1; - if (Point(aAnchorX,aAnchorY) != pFirstPostIt->GetPosPixel()) - { - long aAnchorPosX = 0; - long aAnchorPosY = 0; - for (unsigned long n=0;nmList->begin(); i!= mPages[n]->mList->end(); i++) - { - if ((*i)->bShow && (*i)->pPostIt) - { + // yeah, I know, if this is a left page it could be wrong, but finding the page and the note is probably not even faster than just doing it + // --> OD 2010-06-03 #i111964# - check, if anchor overlay object exists. + const long aAnchorX = pFirstPostIt->Anchor() + ? mpEditWin->LogicToPixel( Point((long)(pFirstPostIt->Anchor()->GetSixthPosition().getX()),0)).X() + : 0; + const long aAnchorY = pFirstPostIt->Anchor() + ? mpEditWin->LogicToPixel( Point(0,(long)(pFirstPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1 + : 0; + // <-- + if (Point(aAnchorX,aAnchorY) != pFirstPostIt->GetPosPixel()) + { + long aAnchorPosX = 0; + long aAnchorPosY = 0; + for (unsigned long n=0;nmList->begin(); i!= mPages[n]->mList->end(); i++) + { + // --> OD 2010-06-03 #i111964# - check, if anchor overlay object exists. + if ( (*i)->bShow && (*i)->pPostIt && (*i)->pPostIt->Anchor() ) + // <-- + { aAnchorPosX = mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT ? mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Anchor()->GetSeventhPosition().getX()),0)).X() : mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Anchor()->GetSixthPosition().getX()),0)).X(); aAnchorPosY = mpEditWin->LogicToPixel( Point(0,(long)((*i)->pPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1; (*i)->pPostIt->SetPosPixel(Point(aAnchorPosX,aAnchorPosY)); } - } - } - } + } + } + } } diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx index cce6db3a89..a166c25913 100644 --- a/sw/source/ui/docvw/SidebarWin.cxx +++ b/sw/source/ui/docvw/SidebarWin.cxx @@ -560,14 +560,28 @@ void SwSidebarWin::SetPosAndSize() { if (IsFollow() && !HasChildPathFocus()) { - mpAnchor->SetAnchorState(AS_END); + // --> OD 2010-06-03 #i111964# + if ( mpAnchor ) + { + mpAnchor->SetAnchorState(AS_END); + } + // <-- } else { - mpAnchor->SetAnchorState(AS_ALL); + // --> OD 2010-06-03 #i111964# + if ( mpAnchor ) + { + mpAnchor->SetAnchorState(AS_ALL); + } + // <-- SwSidebarWin* pWin = GetTopReplyNote(); - if (pWin) + // --> OD 2010-06-03 #i111964# + if ( pWin && pWin->Anchor() ) + // <-- + { pWin->Anchor()->SetAnchorState(AS_END); + } } } } @@ -1127,8 +1141,12 @@ void SwSidebarWin::SetViewState(ViewState bViewState) { mpAnchor->SetAnchorState(AS_ALL); SwSidebarWin* pWin = GetTopReplyNote(); - if (pWin) + // --> OD 2010-06-03 #i111964# + if ( pWin && pWin->Anchor() ) + // <-- + { pWin->Anchor()->SetAnchorState(AS_END); + } mpAnchor->setLineSolid(true); } if (mpShadow) @@ -1156,17 +1174,24 @@ void SwSidebarWin::SetViewState(ViewState bViewState) SwSidebarWin* pTopWinActive = mrMgr.HasActiveSidebarWin() ? mrMgr.GetActiveSidebarWin()->GetTopReplyNote() : 0; - if (pTopWinSelf && (pTopWinSelf!=pTopWinActive)) + // --> OD 2010-06-03 #i111964# + if ( pTopWinSelf && ( pTopWinSelf != pTopWinActive ) && + pTopWinSelf->Anchor() ) + // <-- { - if (pTopWinSelf!=mrMgr.GetActiveSidebarWin()) + if ( pTopWinSelf != mrMgr.GetActiveSidebarWin() ) + { pTopWinSelf->Anchor()->setLineSolid(false); + } pTopWinSelf->Anchor()->SetAnchorState(AS_ALL); } } mpAnchor->setLineSolid(false); } - if (mpShadow) + if ( mpShadow ) + { mpShadow->SetShadowState(SS_NORMAL); + } break; } } -- cgit v1.2.3 From fd4bfc3f2f795d50b6bdfebbf060f99f20b65253 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Thu, 3 Jun 2010 16:40:59 +0200 Subject: fwk139: #i10000# avoid warnings on solaris --- starmath/source/makefile.mk | 1 + sw/source/ui/cctrl/makefile.mk | 3 +++ sw/source/ui/ribbar/makefile.mk | 5 +++++ sw/source/ui/shells/makefile.mk | 1 + sw/source/ui/uiview/makefile.mk | 5 +++++ sw/source/ui/utlui/makefile.mk | 2 ++ 6 files changed, 17 insertions(+) (limited to 'sw/source') diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk index a69a900107..eda4d91083 100644 --- a/starmath/source/makefile.mk +++ b/starmath/source/makefile.mk @@ -94,6 +94,7 @@ EXCEPTIONSFILES = \ $(SLO)$/mathmlimport.obj \ $(SLO)$/mathmlexport.obj \ $(SLO)$/mathtype.obj \ + $(SLO)$/smdll.obj \ $(SLO)$/view.obj \ $(SLO)$/unomodel.obj \ $(SLO)$/smdetect.obj \ diff --git a/sw/source/ui/cctrl/makefile.mk b/sw/source/ui/cctrl/makefile.mk index c724f287fc..33ba83f34d 100644 --- a/sw/source/ui/cctrl/makefile.mk +++ b/sw/source/ui/cctrl/makefile.mk @@ -50,6 +50,9 @@ SLOFILES = \ $(SLO)$/popbox.obj \ $(SLO)$/swlbox.obj +EXCEPTIONSFILES = \ + $(SLO)$/popbox.obj + # --- Tagets ------------------------------------------------------- .INCLUDE : target.mk diff --git a/sw/source/ui/ribbar/makefile.mk b/sw/source/ui/ribbar/makefile.mk index 72acc79307..2405d4b16d 100644 --- a/sw/source/ui/ribbar/makefile.mk +++ b/sw/source/ui/ribbar/makefile.mk @@ -45,6 +45,11 @@ SRC1FILES = \ tblctrl.src \ workctrl.src +EXCEPTIONSFILES = \ + $(SLO)$/tblctrl.obj \ + $(SLO)$/tbxanchr.obj \ + $(SLO)$/workctrl.obj + SLOFILES = \ $(SLO)$/inputwin.obj \ $(SLO)$/tbxanchr.obj \ diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk index e9a03a5a41..dce62a2c93 100644 --- a/sw/source/ui/shells/makefile.mk +++ b/sw/source/ui/shells/makefile.mk @@ -83,6 +83,7 @@ EXCEPTIONSFILES = \ $(SLO)$/drwtxtsh.obj \ $(SLO)$/frmsh.obj \ $(SLO)$/drwtxtex.obj \ + $(SLO)$/slotadd.obj \ $(SLO)$/textsh1.obj # --- Tagets ------------------------------------------------------- diff --git a/sw/source/ui/uiview/makefile.mk b/sw/source/ui/uiview/makefile.mk index d06bb58a7d..337ee85da5 100644 --- a/sw/source/ui/uiview/makefile.mk +++ b/sw/source/ui/uiview/makefile.mk @@ -49,8 +49,13 @@ EXCEPTIONSFILES= \ $(SLO)$/swcli.obj \ $(SLO)$/uivwimp.obj \ $(SLO)$/view.obj \ + $(SLO)$/view0.obj \ + $(SLO)$/view1.obj \ $(SLO)$/view2.obj \ + $(SLO)$/viewdraw.obj \ + $(SLO)$/viewport.obj \ $(SLO)$/viewprt.obj \ + $(SLO)$/viewsrch.obj \ $(SLO)$/viewling.obj \ $(SLO)$/viewmdi.obj \ diff --git a/sw/source/ui/utlui/makefile.mk b/sw/source/ui/utlui/makefile.mk index 7f2aa91c0e..da000994fe 100644 --- a/sw/source/ui/utlui/makefile.mk +++ b/sw/source/ui/utlui/makefile.mk @@ -51,8 +51,10 @@ SRC1FILES = \ EXCEPTIONSFILES= \ $(SLO)$/bookctrl.obj \ + $(SLO)$/glbltree.obj \ $(SLO)$/navipi.obj \ $(SLO)$/unotools.obj \ + $(SLO)$/content.obj \ $(SLO)$/swrenamexnameddlg.obj SLOFILES = $(EXCEPTIONSFILES) \ -- cgit v1.2.3 From b60552611b28845f6887c485cf2dc031b0cc6ee6 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 3 Jun 2010 17:18:12 +0200 Subject: sw33bf05: #i111750# method - erase further control characters from field string to avoid layout loop --- sw/source/core/text/porfld.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 933a01c019..dc11a8e456 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -416,6 +416,12 @@ sal_Bool SwFldPortion::Format( SwTxtFormatInfo &rInf ) // case CHAR_RLM : // case CHAR_LRM : // <-- + // --> OD 2010-06-03 #i111750# + // - Erasing further control characters from field string in + // to avoid loop. + case CH_TXTATR_BREAKWORD: + case CH_TXTATR_INWORD: + // <-- { aNew.Erase( 0, 1 ); ++nNextOfst; -- cgit v1.2.3 From ff15a07c6c0f089115c496926de1fc4943b62a47 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Thu, 3 Jun 2010 17:58:18 +0200 Subject: CWS gnumake2: getting rid of swuilib.hxx hack --- sw/prj/target_lib_swui.mk | 16 ---------------- sw/source/ui/dialog/makefile.mk | 20 -------------------- sw/source/ui/dialog/swabstdlg.cxx | 5 +++-- 3 files changed, 3 insertions(+), 38 deletions(-) (limited to 'sw/source') diff --git a/sw/prj/target_lib_swui.mk b/sw/prj/target_lib_swui.mk index e33956b9f4..12227c9a0a 100644 --- a/sw/prj/target_lib_swui.mk +++ b/sw/prj/target_lib_swui.mk @@ -166,22 +166,6 @@ $(eval $(call gb_Library_add_exception_objects,swui,\ sw/source/ui/utlui/swrenamexnameddlg \ )) -$(WORKDIR)/Misc/sw/swuilib.hxx : - $(call gb_Helper_announce,Creating swuilib.hxx ...) - mkdir -p `dirname $@` && echo "#define DLL_NAME \"$(notdir $(call gb_Library_get_target,swui))\"" > $@ - -.PHONY : $(WORKDIR)/Clean/Misc/sw/swuilib.hxx -$(WORKDIR)/Clean/Misc/sw/swuilib.hxx : - $(call gb_Helper_announce,Cleaning up swuilib.hxx ...) - -$(call gb_Helper_abbreviate_dirs,\ - rm -f $(WORKDIR)/Misc/sw/swuilib.hxx) - - -$(call gb_CxxObject_get_dep_target,sw/source/ui/dialog/swabstdlg) \ -$(call gb_CxxObject_get_target,sw/source/ui/dialog/swabstdlg) : $(WORKDIR)/Misc/sw/swuilib.hxx - -$(call gb_Library_get_clean_target,swui) : $(WORKDIR)/Clean/Misc/sw/swuilib.hxx - ifeq ($(OS),WNT) $(eval $(call gb_Library_add_linked_libs,swui,\ advapi32 \ diff --git a/sw/source/ui/dialog/makefile.mk b/sw/source/ui/dialog/makefile.mk index 54b7784946..35bc302290 100644 --- a/sw/source/ui/dialog/makefile.mk +++ b/sw/source/ui/dialog/makefile.mk @@ -81,23 +81,3 @@ LIB1OBJFILES = \ # --- Tagets ------------------------------------------------------- .INCLUDE : target.mk -$(INCCOM)$/swuilib.hxx: makefile.mk -.IF "$(GUI)"=="UNX" - $(RM) $@ - echo \#define DLL_NAME \"libswui$(DLLPOSTFIX)$(DLLPOST)\" >$@ -.ELSE -.IF "$(USE_SHELL)"!="4nt" - echo \#define DLL_NAME \"swui$(DLLPOSTFIX)$(DLLPOST)\" >$@ -.ELSE # "$(USE_SHELL)"!="4nt" - echo #define DLL_NAME "swui$(DLLPOSTFIX)$(DLLPOST)" >$@ -.ENDIF # "$(USE_SHELL)"!="4nt" -.ENDIF - -$(SLO)$/swabstdlg.obj : $(INCCOM)$/swuilib.hxx - - - - - - - diff --git a/sw/source/ui/dialog/swabstdlg.cxx b/sw/source/ui/dialog/swabstdlg.cxx index 2214dc5608..2e092a07f7 100644 --- a/sw/source/ui/dialog/swabstdlg.cxx +++ b/sw/source/ui/dialog/swabstdlg.cxx @@ -29,10 +29,10 @@ #include "precompiled_sw.hxx" #include "swabstdlg.hxx" -#include "swuilib.hxx" #include #include +#include typedef SwAbstractDialogFactory* (__LOADONCALLAPI *SwFuncPtrCreateDialogFactory)(); @@ -42,7 +42,8 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create() { SwFuncPtrCreateDialogFactory fp = 0; static ::osl::Module aDialogLibrary; - if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( RTL_CONSTASCII_USTRINGPARAM( DLL_NAME ) ) ) ) + static const ::rtl::OUString sLibName(::vcl::unohelper::CreateLibraryName("swui", TRUE)); + if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( sLibName ) ) ) fp = ( SwAbstractDialogFactory* (__LOADONCALLAPI*)() ) aDialogLibrary.getFunctionSymbol( ::rtl::OUString::createFromAscii("CreateDialogFactory") ); if ( fp ) -- cgit v1.2.3 From b8273a1f4f3c541f0f9c07b38e0e82afb5905e73 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Fri, 4 Jun 2010 10:10:57 +0200 Subject: sw33bf05: #i111681# method - making code robust --- sw/source/core/doc/number.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index b0f95952d9..ed1d795f78 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -998,7 +998,15 @@ void SwNumRule::SetInvalidRule(BOOL bFlag) for ( aIter = maTxtNodeList.begin(); aIter != maTxtNodeList.end(); ++aIter ) { const SwTxtNode* pTxtNode = *aIter; - aLists.insert( pTxtNode->GetDoc()->getListByName( pTxtNode->GetListId() ) ); + // --> OD 2010-06-04 #i111681# - applying patch from cmc +// aLists.insert( pTxtNode->GetDoc()->getListByName( pTxtNode->GetListId() ) ); + SwList* pList = pTxtNode->GetDoc()->getListByName( pTxtNode->GetListId() ); + ASSERT( pList, " - list at which the text node is registered at does not exist. This is a serious issue --> please inform OD."); + if ( pList ) + { + aLists.insert( pList ); + } + // <-- } std::for_each( aLists.begin(), aLists.end(), std::mem_fun( &SwList::InvalidateListTree ) ); -- cgit v1.2.3 From 872faf8003922ee5fabcf7f11c19c2fb6993b113 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Fri, 4 Jun 2010 11:32:20 +0200 Subject: sw33bf05: #i111768# method - include control characters --- sw/source/core/access/accportions.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx index 0586210675..ee96baf19d 100644 --- a/sw/source/core/access/accportions.cxx +++ b/sw/source/core/access/accportions.cxx @@ -173,6 +173,17 @@ void SwAccessiblePortionData::Special( sDisplay = aTmpBuffer.makeStringAndClear(); break; } + // --> OD 2010-06-04 #i111768# - apply patch from kstribley: + // Include the control characters. + case POR_CONTROLCHAR: + { + OUStringBuffer aTmpBuffer( rText.Len() + 1 ); + aTmpBuffer.append( rText ); + aTmpBuffer.append( pTxtNode->GetTxt().GetChar(nModelPosition) ); + sDisplay = aTmpBuffer.makeStringAndClear(); + break; + } + // <-- default: sDisplay = rText; break; -- cgit v1.2.3 From 87ab9828e3c9734add46e64cc677b16091babddf Mon Sep 17 00:00:00 2001 From: os Date: Fri, 4 Jun 2010 18:01:33 +0200 Subject: #i103024# default tabs in non-relative mode in negative indents fixed --- sw/source/core/text/txttab.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index ed565f233d..9a1c66aac6 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -172,6 +172,11 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto ) cDec = pTabStop->GetDecimal(); eAdj = pTabStop->GetAdjustment(); nNextPos = pTabStop->GetTabPos(); + if(!bTabsRelativeToIndent && eAdj == SVX_TAB_ADJUST_DEFAULT && nSearchPos < 0) + { + //calculate default tab position of default tabs in negative indent + nNextPos = ( nSearchPos / nNextPos ) * nNextPos; + } } else { -- cgit v1.2.3 From 0e86ce1365052e0ebeb83f87317d7402661bebc5 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 9 Jun 2010 16:36:05 +0200 Subject: fwk139: #i10000# adopt for linux --- sw/source/ui/utlui/makefile.mk | 2 -- 1 file changed, 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/utlui/makefile.mk b/sw/source/ui/utlui/makefile.mk index da000994fe..cded61eee3 100644 --- a/sw/source/ui/utlui/makefile.mk +++ b/sw/source/ui/utlui/makefile.mk @@ -59,9 +59,7 @@ EXCEPTIONSFILES= \ SLOFILES = $(EXCEPTIONSFILES) \ $(SLO)$/condedit.obj \ - $(SLO)$/content.obj \ $(SLO)$/gloslst.obj \ - $(SLO)$/glbltree.obj \ $(SLO)$/initui.obj \ $(SLO)$/navicfg.obj \ $(SLO)$/numfmtlb.obj \ -- cgit v1.2.3 From 8fe8a47b0eb0a641f35bb823960e42e17e60954e Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Wed, 9 Jun 2010 17:05:22 +0200 Subject: tl78: Do not protect every section if document is protected. --- sw/source/filter/ww8/ww8par.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 71250360d7..cef7060bc2 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1817,7 +1817,7 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect, bool wwSectionManager::SectionIsProtected(const wwSection &rSection) const { - return (mrReader.pWDop->fProtEnabled && !rSection.IsNotProtected()); + return (!rSection.IsNotProtected()); } void wwSectionManager::SetHdFt(wwSection &rSection, int nSect, -- cgit v1.2.3 From 9d24760bf51d9206ba0cc56757bb0b7f853f16dd Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 11 Jun 2010 09:30:32 +0200 Subject: masterfix: #i10000# bNothingSelected obsolete --- sw/source/ui/lingu/olmenu.cxx | 1 - 1 file changed, 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index b4914f980c..9a1d361012 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -315,7 +315,6 @@ void SwSpellPopup::fillLangPopupMenu( { //make a check mark for the current language pPopupMenu->CheckItem( nItemId, TRUE ); - bNothingSelected = false; } rLangTable[ nItemId ] = aEntryTxt; ++nItemId; -- cgit v1.2.3 From 068c59f38c88f3df958e008ac57724b31869b8b5 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 12 Jun 2010 20:29:06 +0200 Subject: CWS mba33issues01: put code to load libraries on demand into class SvLibrary --- sw/source/filter/basflt/fltini.cxx | 2068 ++++++++++++++++++------------------ 1 file changed, 1037 insertions(+), 1031 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index e1b341aa05..6d33a658fc 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -1,1031 +1,1037 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" -#define _SVSTDARR_STRINGS - -#include -#include // sscanf -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace utl; -using rtl::OUString; -using namespace com::sun::star::uno; - -SwRead ReadAscii = 0, /*ReadSwg = 0, ReadSw3 = 0,*/ - ReadHTML = 0, ReadXML = 0; - -Reader* GetRTFReader(); -Reader* GetWW8Reader(); - -// Note: if editing, please don't forget to modify also the enum -// ReaderWriterEnum and aFilterDetect in shellio.hxx -SwReaderWriterEntry aReaderWriter[] = -{ - SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, TRUE ), - SwReaderWriterEntry( 0, &::GetASCWriter, FALSE ), - SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, TRUE ), - SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, TRUE ), - SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, TRUE ), - SwReaderWriterEntry( 0, &::GetHTMLWriter, TRUE ), - SwReaderWriterEntry( 0, 0, TRUE ), - SwReaderWriterEntry( &::GetWW8Reader, 0, TRUE ), - SwReaderWriterEntry( 0, &::GetXMLWriter, TRUE ), - SwReaderWriterEntry( 0, &::GetASCWriter, TRUE ), - SwReaderWriterEntry( 0, &::GetASCWriter, TRUE ) -}; - -Reader* SwReaderWriterEntry::GetReader() -{ - if ( pReader ) - return pReader; - else if ( fnGetReader ) - { - pReader = (*fnGetReader)(); - return pReader; - } - return NULL; -} - -void SwReaderWriterEntry::GetWriter( const String& rNm, const String& rBaseURL, WriterRef& xWrt ) const -{ - if ( fnGetWriter ) - (*fnGetWriter)( rNm, rBaseURL, xWrt ); - else - xWrt = WriterRef(0); -} - -/*SwRead SwGetReaderSw3() // SW_DLLPUBLIC -{ - return ReadSw3; -} -*/ -SwRead SwGetReaderXML() // SW_DLLPUBLIC -{ - return ReadXML; -} - -bool IsDocShellRegistered() -{ - return 0 != SwDocShell::_GetInterface(); -} - -inline void _SetFltPtr( USHORT rPos, SwRead pReader ) -{ - aReaderWriter[ rPos ].pReader = pReader; -} - -void _InitFilter() -{ - _SetFltPtr( READER_WRITER_BAS, (ReadAscii = new AsciiReader) ); - _SetFltPtr( READER_WRITER_HTML, (ReadHTML = new HTMLReader) ); - _SetFltPtr( READER_WRITER_WW1, new WW1Reader ); - _SetFltPtr( READER_WRITER_XML, (ReadXML = new XMLReader) ); - -#ifdef NEW_WW97_EXPORT - aReaderWriter[ READER_WRITER_WW1 ].fnGetWriter = &::GetWW8Writer; - aReaderWriter[ READER_WRITER_WW5 ].fnGetWriter = &::GetWW8Writer; -#endif - - _SetFltPtr( READER_WRITER_TEXT_DLG, ReadAscii ); - _SetFltPtr( READER_WRITER_TEXT, ReadAscii ); -} - -void _FinitFilter() -{ - // die Reader vernichten - for( USHORT n = 0; n < MAXFILTER; ++n ) - { - SwReaderWriterEntry& rEntry = aReaderWriter[n]; - if( rEntry.bDelReader && rEntry.pReader ) - delete rEntry.pReader, rEntry.pReader = NULL; - } -} - - -/* */ - -namespace SwReaderWriter { - -Reader* GetReader( ReaderWriterEnum eReader ) -{ - return aReaderWriter[eReader].GetReader(); -} - -void GetWriter( const String& rFltName, const String& rBaseURL, WriterRef& xRet ) -{ - for( USHORT n = 0; n < MAXFILTER; ++n ) - if( aFilterDetect[n].IsFilter( rFltName ) ) - { - aReaderWriter[n].GetWriter( rFltName, rBaseURL, xRet ); - break; - } -} - -SwRead GetReader( const String& rFltName ) -{ - SwRead pRead = 0; - for( USHORT n = 0; n < MAXFILTER; ++n ) - if( aFilterDetect[n].IsFilter( rFltName ) ) - { - pRead = aReaderWriter[n].GetReader(); - // fuer einige Reader noch eine Sonderbehandlung: - if ( pRead ) - pRead->SetFltName( rFltName ); - break; - } - return pRead; -} - -} // namespace SwReaderWriter - -/* */ - -/////////////// die Storage Reader/Writer //////////////////////////////// - -/*void GetSw3Writer( const String&, const String& rBaseURL, WriterRef& xRet ) -{ - DBG_ERROR( "Shouldn't happen!"); - xRet = new Sw3Writer; -} -*/ - -ULONG StgReader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize ) -{ - ULONG nRet = ERR_SWG_READ_ERROR; - ASSERT( pStg, "wo ist mein Storage?" ); - const SfxFilter* pFltr = SwIoSystem::GetFilterOfFormat( aFltName ); - if( pFltr ) - { - rRef = pStg->OpenSotStream( SwIoSystem::GetSubStorageName( *pFltr ), - STREAM_READ | STREAM_SHARE_DENYALL ); - - if( rRef.Is() ) - { - if( SVSTREAM_OK == rRef->GetError() ) - { - USHORT nOld = rRef->GetBufferSize(); - rRef->SetBufferSize( rBuffSize ); - rBuffSize = nOld; - nRet = 0; - } - else - nRet = rRef->GetError(); - } - } - return nRet; -} - -/* */ -/* -ULONG Sw3Reader::Read( SwDoc &rDoc, SwPaM &rPam, const String & ) -{ - ULONG nRet; - if( pStg && pIO ) - { - // TRUE: Vorlagen ueberschreiben - pIO->SetReadOptions( aOpt,TRUE ); - if( !bInsertMode ) - { - // Im Laden-Modus darf der PaM-Content-Teil nicht - // in den Textbereich zeigen (Nodes koennen geloescht werden) - rPam.GetBound( TRUE ).nContent.Assign( 0, 0 ); - rPam.GetBound( FALSE ).nContent.Assign( 0, 0 ); - } - nRet = pIO->Load( pStg, bInsertMode ? &rPam : 0 ); - aOpt.ResetAllFmtsOnly(); - pIO->SetReadOptions( aOpt, TRUE ); - } - else - { - ASSERT( !this, "Sw3-Read ohne Storage und/oder IO-System" ); - nRet = ERR_SWG_READ_ERROR; - } - return nRet; -} - - // read the sections of the document, which is equal to the medium. - // returns the count of it -USHORT Sw3Reader::GetSectionList( SfxMedium& rMedium, - SvStrings& rStrings ) const -{ - SvStorageRef aStg( rMedium.GetStorage() ); - const SfxFilter* pFlt = rMedium.GetFilter(); - ASSERT( pFlt && pFlt->GetVersion(), - "Kein Filter oder Filter ohne FF-Version" ); - if( pFlt && pFlt->GetVersion() ) - aStg->SetVersion( (long)pFlt->GetVersion() ); - - if( pIO ) - pIO->GetSectionList( &aStg, rStrings ); - return rStrings.Count(); - return 0; -} -*/ - -/*ULONG Sw3Writer::WriteStorage() -{ - ULONG nRet; - if( pIO ) - { - // der gleiche Storage -> Save, sonst SaveAs aufrufen - if( !bSaveAs ) - nRet = pIO->Save( pOrigPam, bWriteAll ); - else - nRet = pIO->SaveAs( pStg, pOrigPam, bWriteAll ); - - pIO = 0; // nach dem Schreiben ist der Pointer ungueltig !! - } - else - { - ASSERT( !this, "Sw3-Writer ohne IO-System" ) - nRet = ERR_SWG_WRITE_ERROR; - } - return nRet; -} - -ULONG Sw3Writer::WriteMedium( SfxMedium& ) -{ - DBG_ERROR( "Shouldn't be used currently!"); - return WriteStorage(); -} - -BOOL Sw3Writer::IsSw3Writer() const { return TRUE; } -*/ - -void Writer::SetPasswd( const String& ) {} - - -void Writer::SetVersion( const String&, long ) {} - - -BOOL Writer::IsStgWriter() const { return FALSE; } -//BOOL Writer::IsSw3Writer() const { return FALSE; } - -BOOL StgWriter::IsStgWriter() const { return TRUE; } - -/* */ - - - -BOOL SwReader::NeedsPasswd( const Reader& /*rOptions*/ ) -{ - BOOL bRes = FALSE; - return bRes; -} - - -BOOL SwReader::CheckPasswd( const String& /*rPasswd*/, const Reader& /*rOptions*/ ) -{ - return TRUE; -} - - -/* */ - -//----------------------------------------------------------------------- -// Filter Flags lesen, wird von WW8 / W4W / EXCEL / LOTUS benutzt. -//----------------------------------------------------------------------- - -/* - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - - -*/ - -#define FILTER_OPTION_ROOT String::CreateFromAscii( \ - RTL_CONSTASCII_STRINGPARAM( "Office.Writer/FilterFlags" ) ) - -SwFilterOptions::SwFilterOptions( sal_uInt16 nCnt, const sal_Char** ppNames, - sal_uInt32* pValues ) - : ConfigItem( FILTER_OPTION_ROOT ) -{ - GetValues( nCnt, ppNames, pValues ); -} - -void SwFilterOptions::GetValues( sal_uInt16 nCnt, const sal_Char** ppNames, - sal_uInt32* pValues ) -{ - Sequence aNames( nCnt ); - OUString* pNames = aNames.getArray(); - USHORT n; - - for( n = 0; n < nCnt; ++n ) - pNames[ n ] = OUString::createFromAscii( ppNames[ n ] ); - Sequence aValues = GetProperties( aNames ); - - if( nCnt == aValues.getLength() ) - { - const Any* pAnyValues = aValues.getConstArray(); - for( n = 0; n < nCnt; ++n ) - pValues[ n ] = pAnyValues[ n ].hasValue() - ? *(sal_uInt32*)pAnyValues[ n ].getValue() - : 0; - } - else - for( n = 0; n < nCnt; ++n ) - pValues[ n ] = 0; -} - -void SwFilterOptions::Commit() {} -void SwFilterOptions::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {} - -/* */ - - -void StgReader::SetFltName( const String& rFltNm ) -{ - if( SW_STORAGE_READER & GetReaderType() ) - aFltName = rFltNm; -} - - -/* */ - -SwRelNumRuleSpaces::SwRelNumRuleSpaces( SwDoc& rDoc, BOOL bNDoc ) - : bNewDoc( bNDoc ) -{ - pNumRuleTbl = new SwNumRuleTbl( 8, 8 ); - if( !bNDoc ) - pNumRuleTbl->Insert( &rDoc.GetNumRuleTbl(), 0 ); -} - -SwRelNumRuleSpaces::~SwRelNumRuleSpaces() -{ - if( pNumRuleTbl ) - { - pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() ); - delete pNumRuleTbl; - } -} - -void SwRelNumRuleSpaces::SetNumRelSpaces( SwDoc& rDoc ) -{ - const SwNumRuleTbl* pRuleTbl = NULL; - - if( !bNewDoc ) - { - // jetzt alle schon vorhanden NumRules aus dem Array entfernen, - // damit nur die neuen angepasst werden - SwNumRuleTbl aNumRuleTbl; - aNumRuleTbl.Insert( pNumRuleTbl, 0 ); - pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() ); - const SwNumRuleTbl& rRuleTbl = rDoc.GetNumRuleTbl(); - SwNumRule* pRule; - - for( USHORT n = 0; n < rRuleTbl.Count(); ++n ) - if( USHRT_MAX == aNumRuleTbl.GetPos( ( pRule = rRuleTbl[ n ] ))) - // war noch nicht vorhanden, also neu - pNumRuleTbl->Insert( pRule, pNumRuleTbl->Count() ); - - aNumRuleTbl.Remove( 0, aNumRuleTbl.Count() ); - - pRuleTbl = pNumRuleTbl; - } - else - { - pRuleTbl = &rDoc.GetNumRuleTbl(); - } - - if( pRuleTbl ) - { - for( USHORT n = pRuleTbl->Count(); n; ) - { - SwNumRule* pRule = (*pRuleTbl)[ --n ]; - // Rule noch gueltig und am Doc vorhanden? - if( USHRT_MAX != rDoc.GetNumRuleTbl().GetPos( pRule )) - { - // --> OD 2008-02-19 #refactorlists# -// SwNumRuleInfo aUpd( pRule->GetName() ); -// aUpd.MakeList( rDoc ); - -// // bei allen nmumerierten Absaetzen vom linken Rand -// // den absoluten Wert des NumFormates abziehen -// for( ULONG nUpdPos = 0; nUpdPos < aUpd.GetList().Count(); -// ++nUpdPos ) -// { -// SwTxtNode* pNd = aUpd.GetList().GetObject( nUpdPos ); -// SetNumLSpace( *pNd, *pRule ); -// } - SwNumRule::tTxtNodeList aTxtNodeList; - pRule->GetTxtNodeList( aTxtNodeList ); - for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin(); - aIter != aTxtNodeList.end(); ++aIter ) - { - SwTxtNode* pNd = *aIter; - SetNumLSpace( *pNd, *pRule ); - } - // <-- - } - } - } - - if( pNumRuleTbl ) - { - pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() ); - delete pNumRuleTbl, pNumRuleTbl = 0; - } - - if( bNewDoc ) - { - SetOultineRelSpaces( SwNodeIndex( rDoc.GetNodes() ), - SwNodeIndex( rDoc.GetNodes().GetEndOfContent())); - } -} - -void SwRelNumRuleSpaces::SetOultineRelSpaces( const SwNodeIndex& rStt, - const SwNodeIndex& rEnd ) -{ - SwDoc* pDoc = rStt.GetNode().GetDoc(); - const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds(); - if( rOutlNds.Count() ) - { - USHORT nPos; - rOutlNds.Seek_Entry( &rStt.GetNode(), &nPos ); - for( ; nPos < rOutlNds.Count() && - rOutlNds[ nPos ]->GetIndex() < rEnd.GetIndex(); ++nPos ) - { - SwTxtNode* pNd = rOutlNds[ nPos ]->GetTxtNode(); - if( pNd->IsOutline() && !pNd->GetNumRule() ) - SetNumLSpace( *pNd, *pDoc->GetOutlineNumRule() ); - } - } -} - -void SwRelNumRuleSpaces::SetNumLSpace( SwTxtNode& rNd, const SwNumRule& rRule ) -{ - BOOL bOutlineRule = OUTLINE_RULE == rRule.GetRuleType(); - // --> OD 2005-11-18 #128056# - // correction of refactoring done by cws swnumtree: - // - assure a correct level for retrieving numbering format. -// BYTE nLvl = rNd.GetLevel(); - BYTE nLvl = 0; - if ( rNd.GetActualListLevel() >= 0 && rNd.GetActualListLevel() < MAXLEVEL ) - { - nLvl = static_cast< BYTE >(rNd.GetActualListLevel()); - } - // <-- - const SwNumFmt& rFmt = rRule.Get( nLvl ); - const SvxLRSpaceItem& rLR = rNd.GetSwAttrSet().GetLRSpace(); - - SvxLRSpaceItem aLR( rLR ); - aLR.SetTxtFirstLineOfst( 0 ); - - // sagt der Node, das die Numerierung den Wert vorgibt? - if( !bOutlineRule && rNd.IsSetNumLSpace() ) - aLR.SetTxtLeft( 0 ); - else - { - long nLeft = rFmt.GetAbsLSpace(), nParaLeft = rLR.GetTxtLeft(); - if( 0 < rLR.GetTxtFirstLineOfst() ) - nParaLeft += rLR.GetTxtFirstLineOfst(); - else if( nParaLeft >= nLeft ) - // #82963#/#82962#: set correct paragraph indent - nParaLeft -= nLeft; - else - //#83154#, Don't think any of the older #80856# bugfix code is - //relevent anymore. - nParaLeft = rLR.GetTxtLeft()+rLR.GetTxtFirstLineOfst(); - aLR.SetTxtLeft( nParaLeft ); - } - - if( aLR.GetTxtLeft() != rLR.GetTxtLeft() ) - { - //bevor rLR geloescht wird! - long nOffset = rLR.GetTxtLeft() - aLR.GetTxtLeft(); - rNd.SetAttr( aLR ); - - // Tabs anpassen !! - const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState( - RES_PARATR_TABSTOP, TRUE, &pItem )) - { - SvxTabStopItem aTStop( *(SvxTabStopItem*)pItem ); - for( USHORT n = 0; n < aTStop.Count(); ++n ) - { - SvxTabStop& rTab = (SvxTabStop&)aTStop[ n ]; - if( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() ) - { - if( !rTab.GetTabPos() ) - { - aTStop.Remove( n ); - --n; - } - else - rTab.GetTabPos() += nOffset; - } - } - rNd.SetAttr( aTStop ); - } - } -} - -/* */ - - -void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor, - SwTwips nPageWidth) -{ - const SfxPoolItem* pItem = 0; - if( SFX_ITEM_SET != rFlySet.GetItemState( RES_FRM_SIZE, TRUE, &pItem ) || - MINFLY > ((SwFmtFrmSize*)pItem)->GetWidth() ) - { - SwFmtFrmSize aSz((SwFmtFrmSize&)rFlySet.Get(RES_FRM_SIZE, TRUE)); - if (pItem) - aSz = (SwFmtFrmSize&)(*pItem); - - SwTwips nWidth; - // dann die Breite des Flys selbst bestimmen. Ist eine Tabelle - // defininiert, dann benutze deren Breite, sonst die Breite der - // Seite - const SwTableNode* pTblNd = rAnchor.GetNode().FindTableNode(); - if( pTblNd ) - nWidth = pTblNd->GetTable().GetFrmFmt()->GetFrmSize().GetWidth(); - else - nWidth = nPageWidth; - - const SwNodeIndex* pSttNd = ((SwFmtCntnt&)rFlySet.Get( RES_CNTNT )). - GetCntntIdx(); - if( pSttNd ) - { - BOOL bOnlyOneNode = TRUE; - ULONG nMinFrm = 0; - ULONG nMaxFrm = 0; - SwTxtNode* pFirstTxtNd = 0; - SwNodeIndex aIdx( *pSttNd, 1 ); - SwNodeIndex aEnd( *pSttNd->GetNode().EndOfSectionNode() ); - while( aIdx < aEnd ) - { - SwTxtNode *pTxtNd = aIdx.GetNode().GetTxtNode(); - if( pTxtNd ) - { - if( !pFirstTxtNd ) - pFirstTxtNd = pTxtNd; - else if( pFirstTxtNd != pTxtNd ) - { - // forget it - bOnlyOneNode = FALSE; - break; - } - - ULONG nAbsMinCnts; - pTxtNd->GetMinMaxSize( aIdx.GetIndex(), nMinFrm, - nMaxFrm, nAbsMinCnts ); - } - aIdx++; - } - - if( bOnlyOneNode ) - { - if( nMinFrm < MINLAY && pFirstTxtNd ) - { - // if the first node dont contained any content, then - // insert one char in it calc again and delete once again - SwIndex aNdIdx( pFirstTxtNd ); - pFirstTxtNd->InsertText( String::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( "MM" )), aNdIdx ); - ULONG nAbsMinCnts; - pFirstTxtNd->GetMinMaxSize( pFirstTxtNd->GetIndex(), - nMinFrm, nMaxFrm, nAbsMinCnts ); - aNdIdx -= 2; - pFirstTxtNd->EraseText( aNdIdx, 2 ); - } - - // Umrandung und Abstand zum Inhalt beachten - const SvxBoxItem& rBoxItem = (SvxBoxItem&)rFlySet.Get( RES_BOX ); - USHORT nLine = BOX_LINE_LEFT; - for( int i = 0; i < 2; ++i ) - { - const SvxBorderLine* pLn = rBoxItem.GetLine( nLine ); - if( pLn ) - { - USHORT nWidthTmp = pLn->GetOutWidth() + pLn->GetInWidth(); - nWidthTmp = nWidthTmp + rBoxItem.GetDistance( nLine ); - nMinFrm += nWidthTmp; - nMaxFrm += nWidthTmp; - } - nLine = BOX_LINE_RIGHT; - } - - // Mindestbreite fuer Inhalt einhalten - if( nMinFrm < MINLAY ) - nMinFrm = MINLAY; - if( nMaxFrm < MINLAY ) - nMaxFrm = MINLAY; - - if( nWidth > (USHORT)nMaxFrm ) - nWidth = nMaxFrm; - else if( nWidth > (USHORT)nMinFrm ) - nWidth = nMinFrm; - } - } - - if( MINFLY > nWidth ) - nWidth = MINFLY; - - aSz.SetWidth( nWidth ); - if( MINFLY > aSz.GetHeight() ) - aSz.SetHeight( MINFLY ); - rFlySet.Put( aSz ); - } - else if( MINFLY > ((SwFmtFrmSize*)pItem)->GetHeight() ) - { - SwFmtFrmSize aSz( *(SwFmtFrmSize*)pItem ); - aSz.SetHeight( MINFLY ); - rFlySet.Put( aSz ); - } -} - -/* */ -struct CharSetNameMap -{ - rtl_TextEncoding eCode; - const sal_Char* pName; -}; - -const CharSetNameMap *GetCharSetNameMap() -{ - static const CharSetNameMap aMapArr[] = - { -# define IMPLENTRY(X) { RTL_TEXTENCODING_##X, "" #X "" } - IMPLENTRY(DONTKNOW), - IMPLENTRY(MS_1252), - IMPLENTRY(APPLE_ROMAN), - IMPLENTRY(IBM_437), - IMPLENTRY(IBM_850), - IMPLENTRY(IBM_860), - IMPLENTRY(IBM_861), - IMPLENTRY(IBM_863), - IMPLENTRY(IBM_865), - IMPLENTRY(SYMBOL), - IMPLENTRY(ASCII_US), - IMPLENTRY(ISO_8859_1), - IMPLENTRY(ISO_8859_2), - IMPLENTRY(ISO_8859_3), - IMPLENTRY(ISO_8859_4), - IMPLENTRY(ISO_8859_5), - IMPLENTRY(ISO_8859_6), - IMPLENTRY(ISO_8859_7), - IMPLENTRY(ISO_8859_8), - IMPLENTRY(ISO_8859_9), - IMPLENTRY(ISO_8859_14), - IMPLENTRY(ISO_8859_15), - IMPLENTRY(IBM_737), - IMPLENTRY(IBM_775), - IMPLENTRY(IBM_852), - IMPLENTRY(IBM_855), - IMPLENTRY(IBM_857), - IMPLENTRY(IBM_862), - IMPLENTRY(IBM_864), - IMPLENTRY(IBM_866), - IMPLENTRY(IBM_869), - IMPLENTRY(MS_874), - IMPLENTRY(MS_1250), - IMPLENTRY(MS_1251), - IMPLENTRY(MS_1253), - IMPLENTRY(MS_1254), - IMPLENTRY(MS_1255), - IMPLENTRY(MS_1256), - IMPLENTRY(MS_1257), - IMPLENTRY(MS_1258), - IMPLENTRY(APPLE_ARABIC), - IMPLENTRY(APPLE_CENTEURO), - IMPLENTRY(APPLE_CROATIAN), - IMPLENTRY(APPLE_CYRILLIC), - IMPLENTRY(APPLE_DEVANAGARI), - IMPLENTRY(APPLE_FARSI), - IMPLENTRY(APPLE_GREEK), - IMPLENTRY(APPLE_GUJARATI), - IMPLENTRY(APPLE_GURMUKHI), - IMPLENTRY(APPLE_HEBREW), - IMPLENTRY(APPLE_ICELAND), - IMPLENTRY(APPLE_ROMANIAN), - IMPLENTRY(APPLE_THAI), - IMPLENTRY(APPLE_TURKISH), - IMPLENTRY(APPLE_UKRAINIAN), - IMPLENTRY(APPLE_CHINSIMP), - IMPLENTRY(APPLE_CHINTRAD), - IMPLENTRY(APPLE_JAPANESE), - IMPLENTRY(APPLE_KOREAN), - IMPLENTRY(MS_932), - IMPLENTRY(MS_936), - IMPLENTRY(MS_949), - IMPLENTRY(MS_950), - IMPLENTRY(SHIFT_JIS), - IMPLENTRY(GB_2312), - IMPLENTRY(GBT_12345), - IMPLENTRY(GBK), - IMPLENTRY(BIG5), - IMPLENTRY(EUC_JP), - IMPLENTRY(EUC_CN), - IMPLENTRY(EUC_TW), - IMPLENTRY(ISO_2022_JP), - IMPLENTRY(ISO_2022_CN), - IMPLENTRY(KOI8_R), - IMPLENTRY(KOI8_U), - IMPLENTRY(UTF7), - IMPLENTRY(UTF8), - IMPLENTRY(ISO_8859_10), - IMPLENTRY(ISO_8859_13), - IMPLENTRY(EUC_KR), - IMPLENTRY(ISO_2022_KR), - IMPLENTRY(JIS_X_0201), - IMPLENTRY(JIS_X_0208), - IMPLENTRY(JIS_X_0212), - IMPLENTRY(MS_1361), - IMPLENTRY(GB_18030), - IMPLENTRY(BIG5_HKSCS), - IMPLENTRY(TIS_620), - IMPLENTRY(PT154), - IMPLENTRY(UCS4), - IMPLENTRY(UCS2), - IMPLENTRY(UNICODE), - {0,0} //Last - }; - return &aMapArr[0]; -} -/* - Get a rtl_TextEncoding from its name - */ -rtl_TextEncoding CharSetFromName(const String& rChrSetStr) -{ - const CharSetNameMap *pStart = GetCharSetNameMap(); - rtl_TextEncoding nRet = pStart->eCode; - - for(const CharSetNameMap *pMap = pStart; pMap->pName; ++pMap) - { - if(rChrSetStr.EqualsIgnoreCaseAscii(pMap->pName)) - { - nRet = pMap->eCode; - break; - } - } - - ASSERT(nRet != pStart->eCode, "TXT: That was an unknown language!"); - - return nRet; -} - - -/* - Get the String name of an rtl_TextEncoding - */ -String NameFromCharSet(rtl_TextEncoding nChrSet) -{ - const CharSetNameMap *pStart = GetCharSetNameMap(); - const char *pRet = pStart->pName; - - for(const CharSetNameMap *pMap = pStart; pMap->pName; ++pMap) - { - if (nChrSet == pMap->eCode) - { - pRet = pMap->pName; - break; - } - } - - ASSERT(pRet != pStart->pName, "TXT: That was an unknown language!"); - - return String::CreateFromAscii(pRet); -} - -// for the automatic conversion (mail/news/...) -// The user data contains the options for the ascii import/export filter. -// The format is: -// 1. CharSet - as ascii chars -// 2. LineEnd - as CR/LR/CRLF -// 3. Fontname -// 4. Language -// the delimetercharacter is "," -// - -void SwAsciiOptions::ReadUserData( const String& rStr ) -{ - xub_StrLen nToken = 0; - USHORT nCnt = 0; - String sToken; - do { - if( 0 != (sToken = rStr.GetToken( 0, ',', nToken )).Len() ) - { - switch( nCnt ) - { - case 0: // CharSet - eCharSet = CharSetFromName(sToken); - break; - case 1: // LineEnd - if( sToken.EqualsIgnoreCaseAscii( "CRLF" )) - eCRLF_Flag = LINEEND_CRLF; - else if( sToken.EqualsIgnoreCaseAscii( "LF" )) - eCRLF_Flag = LINEEND_LF; - else - eCRLF_Flag = LINEEND_CR; - break; - case 2: // fontname - sFont = sToken; - break; - case 3: // Language - nLanguage = MsLangId::convertIsoStringToLanguage( sToken ); - break; - } - } - ++nCnt; - } while( STRING_NOTFOUND != nToken ); -} - -void SwAsciiOptions::WriteUserData( String& rStr ) -{ - // 1. charset - rStr = NameFromCharSet(eCharSet); - rStr += ','; - - // 2. LineEnd - switch(eCRLF_Flag) - { - case LINEEND_CRLF: - rStr.AppendAscii( "CRLF" ); - break; - case LINEEND_CR: - rStr.AppendAscii( "CR" ); - break; - case LINEEND_LF: - rStr.AppendAscii( "LF" ); - break; - } - rStr += ','; - - // 3. Fontname - rStr += sFont; - rStr += ','; - - // 4. Language - if (nLanguage) - { - rtl::OUString sTmp = MsLangId::convertLanguageToIsoString( nLanguage ); - rStr += (String)sTmp; - } - rStr += ','; -} - -extern "C" { static void SAL_CALL thisModule() {} } - -static oslGenericFunction GetMswordLibSymbol( const char *pSymbol ) -{ - static ::osl::Module aModule; - if ( aModule.is() || - aModule.loadRelative( &thisModule, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "msword" ) ) ) ) ) - { - return aModule.getFunctionSymbol( ::rtl::OUString::createFromAscii( pSymbol ) ); - } - - return NULL; -} - -Reader* GetRTFReader() -{ - FnGetReader pFunction = reinterpret_cast( GetMswordLibSymbol( "ImportRTF" ) ); - - if ( pFunction ) - return (*pFunction)(); - - return NULL; -} - -void GetRTFWriter( const String& rFltName, const String& rBaseURL, WriterRef& xRet ) -{ - FnGetWriter pFunction = reinterpret_cast( GetMswordLibSymbol( "ExportRTF" ) ); - - if ( pFunction ) - (*pFunction)( rFltName, rBaseURL, xRet ); - else - xRet = WriterRef(0); -} - -Reader* GetWW8Reader() -{ - FnGetReader pFunction = reinterpret_cast( GetMswordLibSymbol( "ImportDOC" ) ); - - if ( pFunction ) - return (*pFunction)(); - - return NULL; -} - -void GetWW8Writer( const String& rFltName, const String& rBaseURL, WriterRef& xRet ) -{ - FnGetWriter pFunction = reinterpret_cast( GetMswordLibSymbol( "ExportDOC" ) ); - - if ( pFunction ) - (*pFunction)( rFltName, rBaseURL, xRet ); - else - xRet = WriterRef(0); -} - -typedef ULONG ( __LOADONCALLAPI *SaveOrDel )( SfxObjectShell&, SotStorage&, BOOL, const String& ); -typedef ULONG ( __LOADONCALLAPI *GetSaveWarning )( SfxObjectShell& ); - -ULONG SaveOrDelMSVBAStorage( SfxObjectShell& rDoc, SotStorage& rStor, BOOL bSaveInto, const String& rStorageName ) -{ - SaveOrDel pFunction = reinterpret_cast( GetMswordLibSymbol( "SaveOrDelMSVBAStorage_ww8" ) ); - if( pFunction ) - return pFunction( rDoc, rStor, bSaveInto, rStorageName ); - return ERRCODE_NONE; -} - -ULONG GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS ) -{ - GetSaveWarning pFunction = reinterpret_cast( GetMswordLibSymbol( "GetSaveWarningOfMSVBAStorage_ww8" ) ); - if( pFunction ) - return pFunction( rDocS ); - return ERRCODE_NONE; -} - - +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sw.hxx" +#define _SVSTDARR_STRINGS + +#include +#include // sscanf +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace utl; +using rtl::OUString; +using namespace com::sun::star::uno; +using namespace com::sun::star; + +SwRead ReadAscii = 0, /*ReadSwg = 0, ReadSw3 = 0,*/ + ReadHTML = 0, ReadXML = 0; + +Reader* GetRTFReader(); +Reader* GetWW8Reader(); + +// Note: if editing, please don't forget to modify also the enum +// ReaderWriterEnum and aFilterDetect in shellio.hxx +SwReaderWriterEntry aReaderWriter[] = +{ + SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, TRUE ), + SwReaderWriterEntry( 0, &::GetASCWriter, FALSE ), + SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, TRUE ), + SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, TRUE ), + SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, TRUE ), + SwReaderWriterEntry( 0, &::GetHTMLWriter, TRUE ), + SwReaderWriterEntry( 0, 0, TRUE ), + SwReaderWriterEntry( &::GetWW8Reader, 0, TRUE ), + SwReaderWriterEntry( 0, &::GetXMLWriter, TRUE ), + SwReaderWriterEntry( 0, &::GetASCWriter, TRUE ), + SwReaderWriterEntry( 0, &::GetASCWriter, TRUE ) +}; + +Reader* SwReaderWriterEntry::GetReader() +{ + if ( pReader ) + return pReader; + else if ( fnGetReader ) + { + pReader = (*fnGetReader)(); + return pReader; + } + return NULL; +} + +void SwReaderWriterEntry::GetWriter( const String& rNm, const String& rBaseURL, WriterRef& xWrt ) const +{ + if ( fnGetWriter ) + (*fnGetWriter)( rNm, rBaseURL, xWrt ); + else + xWrt = WriterRef(0); +} + +/*SwRead SwGetReaderSw3() // SW_DLLPUBLIC +{ + return ReadSw3; +} +*/ +SwRead SwGetReaderXML() // SW_DLLPUBLIC +{ + return ReadXML; +} + +bool IsDocShellRegistered() +{ + return 0 != SwDocShell::_GetInterface(); +} + +inline void _SetFltPtr( USHORT rPos, SwRead pReader ) +{ + aReaderWriter[ rPos ].pReader = pReader; +} + +void _InitFilter() +{ + _SetFltPtr( READER_WRITER_BAS, (ReadAscii = new AsciiReader) ); + _SetFltPtr( READER_WRITER_HTML, (ReadHTML = new HTMLReader) ); + _SetFltPtr( READER_WRITER_WW1, new WW1Reader ); + _SetFltPtr( READER_WRITER_XML, (ReadXML = new XMLReader) ); + +#ifdef NEW_WW97_EXPORT + aReaderWriter[ READER_WRITER_WW1 ].fnGetWriter = &::GetWW8Writer; + aReaderWriter[ READER_WRITER_WW5 ].fnGetWriter = &::GetWW8Writer; +#endif + + _SetFltPtr( READER_WRITER_TEXT_DLG, ReadAscii ); + _SetFltPtr( READER_WRITER_TEXT, ReadAscii ); +} + +void _FinitFilter() +{ + // die Reader vernichten + for( USHORT n = 0; n < MAXFILTER; ++n ) + { + SwReaderWriterEntry& rEntry = aReaderWriter[n]; + if( rEntry.bDelReader && rEntry.pReader ) + delete rEntry.pReader, rEntry.pReader = NULL; + } +} + + +/* */ + +namespace SwReaderWriter { + +Reader* GetReader( ReaderWriterEnum eReader ) +{ + return aReaderWriter[eReader].GetReader(); +} + +void GetWriter( const String& rFltName, const String& rBaseURL, WriterRef& xRet ) +{ + for( USHORT n = 0; n < MAXFILTER; ++n ) + if( aFilterDetect[n].IsFilter( rFltName ) ) + { + aReaderWriter[n].GetWriter( rFltName, rBaseURL, xRet ); + break; + } +} + +SwRead GetReader( const String& rFltName ) +{ + SwRead pRead = 0; + for( USHORT n = 0; n < MAXFILTER; ++n ) + if( aFilterDetect[n].IsFilter( rFltName ) ) + { + pRead = aReaderWriter[n].GetReader(); + // fuer einige Reader noch eine Sonderbehandlung: + if ( pRead ) + pRead->SetFltName( rFltName ); + break; + } + return pRead; +} + +} // namespace SwReaderWriter + +/* */ + +/////////////// die Storage Reader/Writer //////////////////////////////// + +/*void GetSw3Writer( const String&, const String& rBaseURL, WriterRef& xRet ) +{ + DBG_ERROR( "Shouldn't happen!"); + xRet = new Sw3Writer; +} +*/ + +ULONG StgReader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize ) +{ + ULONG nRet = ERR_SWG_READ_ERROR; + ASSERT( pStg, "wo ist mein Storage?" ); + const SfxFilter* pFltr = SwIoSystem::GetFilterOfFormat( aFltName ); + if( pFltr ) + { + rRef = pStg->OpenSotStream( SwIoSystem::GetSubStorageName( *pFltr ), + STREAM_READ | STREAM_SHARE_DENYALL ); + + if( rRef.Is() ) + { + if( SVSTREAM_OK == rRef->GetError() ) + { + USHORT nOld = rRef->GetBufferSize(); + rRef->SetBufferSize( rBuffSize ); + rBuffSize = nOld; + nRet = 0; + } + else + nRet = rRef->GetError(); + } + } + return nRet; +} + +/* */ +/* +ULONG Sw3Reader::Read( SwDoc &rDoc, SwPaM &rPam, const String & ) +{ + ULONG nRet; + if( pStg && pIO ) + { + // TRUE: Vorlagen ueberschreiben + pIO->SetReadOptions( aOpt,TRUE ); + if( !bInsertMode ) + { + // Im Laden-Modus darf der PaM-Content-Teil nicht + // in den Textbereich zeigen (Nodes koennen geloescht werden) + rPam.GetBound( TRUE ).nContent.Assign( 0, 0 ); + rPam.GetBound( FALSE ).nContent.Assign( 0, 0 ); + } + nRet = pIO->Load( pStg, bInsertMode ? &rPam : 0 ); + aOpt.ResetAllFmtsOnly(); + pIO->SetReadOptions( aOpt, TRUE ); + } + else + { + ASSERT( !this, "Sw3-Read ohne Storage und/oder IO-System" ); + nRet = ERR_SWG_READ_ERROR; + } + return nRet; +} + + // read the sections of the document, which is equal to the medium. + // returns the count of it +USHORT Sw3Reader::GetSectionList( SfxMedium& rMedium, + SvStrings& rStrings ) const +{ + SvStorageRef aStg( rMedium.GetStorage() ); + const SfxFilter* pFlt = rMedium.GetFilter(); + ASSERT( pFlt && pFlt->GetVersion(), + "Kein Filter oder Filter ohne FF-Version" ); + if( pFlt && pFlt->GetVersion() ) + aStg->SetVersion( (long)pFlt->GetVersion() ); + + if( pIO ) + pIO->GetSectionList( &aStg, rStrings ); + return rStrings.Count(); + return 0; +} +*/ + +/*ULONG Sw3Writer::WriteStorage() +{ + ULONG nRet; + if( pIO ) + { + // der gleiche Storage -> Save, sonst SaveAs aufrufen + if( !bSaveAs ) + nRet = pIO->Save( pOrigPam, bWriteAll ); + else + nRet = pIO->SaveAs( pStg, pOrigPam, bWriteAll ); + + pIO = 0; // nach dem Schreiben ist der Pointer ungueltig !! + } + else + { + ASSERT( !this, "Sw3-Writer ohne IO-System" ) + nRet = ERR_SWG_WRITE_ERROR; + } + return nRet; +} + +ULONG Sw3Writer::WriteMedium( SfxMedium& ) +{ + DBG_ERROR( "Shouldn't be used currently!"); + return WriteStorage(); +} + +BOOL Sw3Writer::IsSw3Writer() const { return TRUE; } +*/ + +void Writer::SetPasswd( const String& ) {} + + +void Writer::SetVersion( const String&, long ) {} + + +BOOL Writer::IsStgWriter() const { return FALSE; } +//BOOL Writer::IsSw3Writer() const { return FALSE; } + +BOOL StgWriter::IsStgWriter() const { return TRUE; } + +/* */ + + + +BOOL SwReader::NeedsPasswd( const Reader& /*rOptions*/ ) +{ + BOOL bRes = FALSE; + return bRes; +} + + +BOOL SwReader::CheckPasswd( const String& /*rPasswd*/, const Reader& /*rOptions*/ ) +{ + return TRUE; +} + + +/* */ + +//----------------------------------------------------------------------- +// Filter Flags lesen, wird von WW8 / W4W / EXCEL / LOTUS benutzt. +//----------------------------------------------------------------------- + +/* + + + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + 0 + + +*/ + +#define FILTER_OPTION_ROOT String::CreateFromAscii( \ + RTL_CONSTASCII_STRINGPARAM( "Office.Writer/FilterFlags" ) ) + +SwFilterOptions::SwFilterOptions( sal_uInt16 nCnt, const sal_Char** ppNames, + sal_uInt32* pValues ) + : ConfigItem( FILTER_OPTION_ROOT ) +{ + GetValues( nCnt, ppNames, pValues ); +} + +void SwFilterOptions::GetValues( sal_uInt16 nCnt, const sal_Char** ppNames, + sal_uInt32* pValues ) +{ + Sequence aNames( nCnt ); + OUString* pNames = aNames.getArray(); + USHORT n; + + for( n = 0; n < nCnt; ++n ) + pNames[ n ] = OUString::createFromAscii( ppNames[ n ] ); + Sequence aValues = GetProperties( aNames ); + + if( nCnt == aValues.getLength() ) + { + const Any* pAnyValues = aValues.getConstArray(); + for( n = 0; n < nCnt; ++n ) + pValues[ n ] = pAnyValues[ n ].hasValue() + ? *(sal_uInt32*)pAnyValues[ n ].getValue() + : 0; + } + else + for( n = 0; n < nCnt; ++n ) + pValues[ n ] = 0; +} + +void SwFilterOptions::Commit() {} +void SwFilterOptions::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {} + +/* */ + + +void StgReader::SetFltName( const String& rFltNm ) +{ + if( SW_STORAGE_READER & GetReaderType() ) + aFltName = rFltNm; +} + + +/* */ + +SwRelNumRuleSpaces::SwRelNumRuleSpaces( SwDoc& rDoc, BOOL bNDoc ) + : bNewDoc( bNDoc ) +{ + pNumRuleTbl = new SwNumRuleTbl( 8, 8 ); + if( !bNDoc ) + pNumRuleTbl->Insert( &rDoc.GetNumRuleTbl(), 0 ); +} + +SwRelNumRuleSpaces::~SwRelNumRuleSpaces() +{ + if( pNumRuleTbl ) + { + pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() ); + delete pNumRuleTbl; + } +} + +void SwRelNumRuleSpaces::SetNumRelSpaces( SwDoc& rDoc ) +{ + const SwNumRuleTbl* pRuleTbl = NULL; + + if( !bNewDoc ) + { + // jetzt alle schon vorhanden NumRules aus dem Array entfernen, + // damit nur die neuen angepasst werden + SwNumRuleTbl aNumRuleTbl; + aNumRuleTbl.Insert( pNumRuleTbl, 0 ); + pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() ); + const SwNumRuleTbl& rRuleTbl = rDoc.GetNumRuleTbl(); + SwNumRule* pRule; + + for( USHORT n = 0; n < rRuleTbl.Count(); ++n ) + if( USHRT_MAX == aNumRuleTbl.GetPos( ( pRule = rRuleTbl[ n ] ))) + // war noch nicht vorhanden, also neu + pNumRuleTbl->Insert( pRule, pNumRuleTbl->Count() ); + + aNumRuleTbl.Remove( 0, aNumRuleTbl.Count() ); + + pRuleTbl = pNumRuleTbl; + } + else + { + pRuleTbl = &rDoc.GetNumRuleTbl(); + } + + if( pRuleTbl ) + { + for( USHORT n = pRuleTbl->Count(); n; ) + { + SwNumRule* pRule = (*pRuleTbl)[ --n ]; + // Rule noch gueltig und am Doc vorhanden? + if( USHRT_MAX != rDoc.GetNumRuleTbl().GetPos( pRule )) + { + // --> OD 2008-02-19 #refactorlists# +// SwNumRuleInfo aUpd( pRule->GetName() ); +// aUpd.MakeList( rDoc ); + +// // bei allen nmumerierten Absaetzen vom linken Rand +// // den absoluten Wert des NumFormates abziehen +// for( ULONG nUpdPos = 0; nUpdPos < aUpd.GetList().Count(); +// ++nUpdPos ) +// { +// SwTxtNode* pNd = aUpd.GetList().GetObject( nUpdPos ); +// SetNumLSpace( *pNd, *pRule ); +// } + SwNumRule::tTxtNodeList aTxtNodeList; + pRule->GetTxtNodeList( aTxtNodeList ); + for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin(); + aIter != aTxtNodeList.end(); ++aIter ) + { + SwTxtNode* pNd = *aIter; + SetNumLSpace( *pNd, *pRule ); + } + // <-- + } + } + } + + if( pNumRuleTbl ) + { + pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() ); + delete pNumRuleTbl, pNumRuleTbl = 0; + } + + if( bNewDoc ) + { + SetOultineRelSpaces( SwNodeIndex( rDoc.GetNodes() ), + SwNodeIndex( rDoc.GetNodes().GetEndOfContent())); + } +} + +void SwRelNumRuleSpaces::SetOultineRelSpaces( const SwNodeIndex& rStt, + const SwNodeIndex& rEnd ) +{ + SwDoc* pDoc = rStt.GetNode().GetDoc(); + const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds(); + if( rOutlNds.Count() ) + { + USHORT nPos; + rOutlNds.Seek_Entry( &rStt.GetNode(), &nPos ); + for( ; nPos < rOutlNds.Count() && + rOutlNds[ nPos ]->GetIndex() < rEnd.GetIndex(); ++nPos ) + { + SwTxtNode* pNd = rOutlNds[ nPos ]->GetTxtNode(); + if( pNd->IsOutline() && !pNd->GetNumRule() ) + SetNumLSpace( *pNd, *pDoc->GetOutlineNumRule() ); + } + } +} + +void SwRelNumRuleSpaces::SetNumLSpace( SwTxtNode& rNd, const SwNumRule& rRule ) +{ + BOOL bOutlineRule = OUTLINE_RULE == rRule.GetRuleType(); + // --> OD 2005-11-18 #128056# + // correction of refactoring done by cws swnumtree: + // - assure a correct level for retrieving numbering format. +// BYTE nLvl = rNd.GetLevel(); + BYTE nLvl = 0; + if ( rNd.GetActualListLevel() >= 0 && rNd.GetActualListLevel() < MAXLEVEL ) + { + nLvl = static_cast< BYTE >(rNd.GetActualListLevel()); + } + // <-- + const SwNumFmt& rFmt = rRule.Get( nLvl ); + const SvxLRSpaceItem& rLR = rNd.GetSwAttrSet().GetLRSpace(); + + SvxLRSpaceItem aLR( rLR ); + aLR.SetTxtFirstLineOfst( 0 ); + + // sagt der Node, das die Numerierung den Wert vorgibt? + if( !bOutlineRule && rNd.IsSetNumLSpace() ) + aLR.SetTxtLeft( 0 ); + else + { + long nLeft = rFmt.GetAbsLSpace(), nParaLeft = rLR.GetTxtLeft(); + if( 0 < rLR.GetTxtFirstLineOfst() ) + nParaLeft += rLR.GetTxtFirstLineOfst(); + else if( nParaLeft >= nLeft ) + // #82963#/#82962#: set correct paragraph indent + nParaLeft -= nLeft; + else + //#83154#, Don't think any of the older #80856# bugfix code is + //relevent anymore. + nParaLeft = rLR.GetTxtLeft()+rLR.GetTxtFirstLineOfst(); + aLR.SetTxtLeft( nParaLeft ); + } + + if( aLR.GetTxtLeft() != rLR.GetTxtLeft() ) + { + //bevor rLR geloescht wird! + long nOffset = rLR.GetTxtLeft() - aLR.GetTxtLeft(); + rNd.SetAttr( aLR ); + + // Tabs anpassen !! + const SfxPoolItem* pItem; + if( SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState( + RES_PARATR_TABSTOP, TRUE, &pItem )) + { + SvxTabStopItem aTStop( *(SvxTabStopItem*)pItem ); + for( USHORT n = 0; n < aTStop.Count(); ++n ) + { + SvxTabStop& rTab = (SvxTabStop&)aTStop[ n ]; + if( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() ) + { + if( !rTab.GetTabPos() ) + { + aTStop.Remove( n ); + --n; + } + else + rTab.GetTabPos() += nOffset; + } + } + rNd.SetAttr( aTStop ); + } + } +} + +/* */ + + +void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor, + SwTwips nPageWidth) +{ + const SfxPoolItem* pItem = 0; + if( SFX_ITEM_SET != rFlySet.GetItemState( RES_FRM_SIZE, TRUE, &pItem ) || + MINFLY > ((SwFmtFrmSize*)pItem)->GetWidth() ) + { + SwFmtFrmSize aSz((SwFmtFrmSize&)rFlySet.Get(RES_FRM_SIZE, TRUE)); + if (pItem) + aSz = (SwFmtFrmSize&)(*pItem); + + SwTwips nWidth; + // dann die Breite des Flys selbst bestimmen. Ist eine Tabelle + // defininiert, dann benutze deren Breite, sonst die Breite der + // Seite + const SwTableNode* pTblNd = rAnchor.GetNode().FindTableNode(); + if( pTblNd ) + nWidth = pTblNd->GetTable().GetFrmFmt()->GetFrmSize().GetWidth(); + else + nWidth = nPageWidth; + + const SwNodeIndex* pSttNd = ((SwFmtCntnt&)rFlySet.Get( RES_CNTNT )). + GetCntntIdx(); + if( pSttNd ) + { + BOOL bOnlyOneNode = TRUE; + ULONG nMinFrm = 0; + ULONG nMaxFrm = 0; + SwTxtNode* pFirstTxtNd = 0; + SwNodeIndex aIdx( *pSttNd, 1 ); + SwNodeIndex aEnd( *pSttNd->GetNode().EndOfSectionNode() ); + while( aIdx < aEnd ) + { + SwTxtNode *pTxtNd = aIdx.GetNode().GetTxtNode(); + if( pTxtNd ) + { + if( !pFirstTxtNd ) + pFirstTxtNd = pTxtNd; + else if( pFirstTxtNd != pTxtNd ) + { + // forget it + bOnlyOneNode = FALSE; + break; + } + + ULONG nAbsMinCnts; + pTxtNd->GetMinMaxSize( aIdx.GetIndex(), nMinFrm, + nMaxFrm, nAbsMinCnts ); + } + aIdx++; + } + + if( bOnlyOneNode ) + { + if( nMinFrm < MINLAY && pFirstTxtNd ) + { + // if the first node dont contained any content, then + // insert one char in it calc again and delete once again + SwIndex aNdIdx( pFirstTxtNd ); + pFirstTxtNd->InsertText( String::CreateFromAscii( + RTL_CONSTASCII_STRINGPARAM( "MM" )), aNdIdx ); + ULONG nAbsMinCnts; + pFirstTxtNd->GetMinMaxSize( pFirstTxtNd->GetIndex(), + nMinFrm, nMaxFrm, nAbsMinCnts ); + aNdIdx -= 2; + pFirstTxtNd->EraseText( aNdIdx, 2 ); + } + + // Umrandung und Abstand zum Inhalt beachten + const SvxBoxItem& rBoxItem = (SvxBoxItem&)rFlySet.Get( RES_BOX ); + USHORT nLine = BOX_LINE_LEFT; + for( int i = 0; i < 2; ++i ) + { + const SvxBorderLine* pLn = rBoxItem.GetLine( nLine ); + if( pLn ) + { + USHORT nWidthTmp = pLn->GetOutWidth() + pLn->GetInWidth(); + nWidthTmp = nWidthTmp + rBoxItem.GetDistance( nLine ); + nMinFrm += nWidthTmp; + nMaxFrm += nWidthTmp; + } + nLine = BOX_LINE_RIGHT; + } + + // Mindestbreite fuer Inhalt einhalten + if( nMinFrm < MINLAY ) + nMinFrm = MINLAY; + if( nMaxFrm < MINLAY ) + nMaxFrm = MINLAY; + + if( nWidth > (USHORT)nMaxFrm ) + nWidth = nMaxFrm; + else if( nWidth > (USHORT)nMinFrm ) + nWidth = nMinFrm; + } + } + + if( MINFLY > nWidth ) + nWidth = MINFLY; + + aSz.SetWidth( nWidth ); + if( MINFLY > aSz.GetHeight() ) + aSz.SetHeight( MINFLY ); + rFlySet.Put( aSz ); + } + else if( MINFLY > ((SwFmtFrmSize*)pItem)->GetHeight() ) + { + SwFmtFrmSize aSz( *(SwFmtFrmSize*)pItem ); + aSz.SetHeight( MINFLY ); + rFlySet.Put( aSz ); + } +} + +/* */ +struct CharSetNameMap +{ + rtl_TextEncoding eCode; + const sal_Char* pName; +}; + +const CharSetNameMap *GetCharSetNameMap() +{ + static const CharSetNameMap aMapArr[] = + { +# define IMPLENTRY(X) { RTL_TEXTENCODING_##X, "" #X "" } + IMPLENTRY(DONTKNOW), + IMPLENTRY(MS_1252), + IMPLENTRY(APPLE_ROMAN), + IMPLENTRY(IBM_437), + IMPLENTRY(IBM_850), + IMPLENTRY(IBM_860), + IMPLENTRY(IBM_861), + IMPLENTRY(IBM_863), + IMPLENTRY(IBM_865), + IMPLENTRY(SYMBOL), + IMPLENTRY(ASCII_US), + IMPLENTRY(ISO_8859_1), + IMPLENTRY(ISO_8859_2), + IMPLENTRY(ISO_8859_3), + IMPLENTRY(ISO_8859_4), + IMPLENTRY(ISO_8859_5), + IMPLENTRY(ISO_8859_6), + IMPLENTRY(ISO_8859_7), + IMPLENTRY(ISO_8859_8), + IMPLENTRY(ISO_8859_9), + IMPLENTRY(ISO_8859_14), + IMPLENTRY(ISO_8859_15), + IMPLENTRY(IBM_737), + IMPLENTRY(IBM_775), + IMPLENTRY(IBM_852), + IMPLENTRY(IBM_855), + IMPLENTRY(IBM_857), + IMPLENTRY(IBM_862), + IMPLENTRY(IBM_864), + IMPLENTRY(IBM_866), + IMPLENTRY(IBM_869), + IMPLENTRY(MS_874), + IMPLENTRY(MS_1250), + IMPLENTRY(MS_1251), + IMPLENTRY(MS_1253), + IMPLENTRY(MS_1254), + IMPLENTRY(MS_1255), + IMPLENTRY(MS_1256), + IMPLENTRY(MS_1257), + IMPLENTRY(MS_1258), + IMPLENTRY(APPLE_ARABIC), + IMPLENTRY(APPLE_CENTEURO), + IMPLENTRY(APPLE_CROATIAN), + IMPLENTRY(APPLE_CYRILLIC), + IMPLENTRY(APPLE_DEVANAGARI), + IMPLENTRY(APPLE_FARSI), + IMPLENTRY(APPLE_GREEK), + IMPLENTRY(APPLE_GUJARATI), + IMPLENTRY(APPLE_GURMUKHI), + IMPLENTRY(APPLE_HEBREW), + IMPLENTRY(APPLE_ICELAND), + IMPLENTRY(APPLE_ROMANIAN), + IMPLENTRY(APPLE_THAI), + IMPLENTRY(APPLE_TURKISH), + IMPLENTRY(APPLE_UKRAINIAN), + IMPLENTRY(APPLE_CHINSIMP), + IMPLENTRY(APPLE_CHINTRAD), + IMPLENTRY(APPLE_JAPANESE), + IMPLENTRY(APPLE_KOREAN), + IMPLENTRY(MS_932), + IMPLENTRY(MS_936), + IMPLENTRY(MS_949), + IMPLENTRY(MS_950), + IMPLENTRY(SHIFT_JIS), + IMPLENTRY(GB_2312), + IMPLENTRY(GBT_12345), + IMPLENTRY(GBK), + IMPLENTRY(BIG5), + IMPLENTRY(EUC_JP), + IMPLENTRY(EUC_CN), + IMPLENTRY(EUC_TW), + IMPLENTRY(ISO_2022_JP), + IMPLENTRY(ISO_2022_CN), + IMPLENTRY(KOI8_R), + IMPLENTRY(KOI8_U), + IMPLENTRY(UTF7), + IMPLENTRY(UTF8), + IMPLENTRY(ISO_8859_10), + IMPLENTRY(ISO_8859_13), + IMPLENTRY(EUC_KR), + IMPLENTRY(ISO_2022_KR), + IMPLENTRY(JIS_X_0201), + IMPLENTRY(JIS_X_0208), + IMPLENTRY(JIS_X_0212), + IMPLENTRY(MS_1361), + IMPLENTRY(GB_18030), + IMPLENTRY(BIG5_HKSCS), + IMPLENTRY(TIS_620), + IMPLENTRY(PT154), + IMPLENTRY(UCS4), + IMPLENTRY(UCS2), + IMPLENTRY(UNICODE), + {0,0} //Last + }; + return &aMapArr[0]; +} +/* + Get a rtl_TextEncoding from its name + */ +rtl_TextEncoding CharSetFromName(const String& rChrSetStr) +{ + const CharSetNameMap *pStart = GetCharSetNameMap(); + rtl_TextEncoding nRet = pStart->eCode; + + for(const CharSetNameMap *pMap = pStart; pMap->pName; ++pMap) + { + if(rChrSetStr.EqualsIgnoreCaseAscii(pMap->pName)) + { + nRet = pMap->eCode; + break; + } + } + + ASSERT(nRet != pStart->eCode, "TXT: That was an unknown language!"); + + return nRet; +} + + +/* + Get the String name of an rtl_TextEncoding + */ +String NameFromCharSet(rtl_TextEncoding nChrSet) +{ + const CharSetNameMap *pStart = GetCharSetNameMap(); + const char *pRet = pStart->pName; + + for(const CharSetNameMap *pMap = pStart; pMap->pName; ++pMap) + { + if (nChrSet == pMap->eCode) + { + pRet = pMap->pName; + break; + } + } + + ASSERT(pRet != pStart->pName, "TXT: That was an unknown language!"); + + return String::CreateFromAscii(pRet); +} + +// for the automatic conversion (mail/news/...) +// The user data contains the options for the ascii import/export filter. +// The format is: +// 1. CharSet - as ascii chars +// 2. LineEnd - as CR/LR/CRLF +// 3. Fontname +// 4. Language +// the delimetercharacter is "," +// + +void SwAsciiOptions::ReadUserData( const String& rStr ) +{ + xub_StrLen nToken = 0; + USHORT nCnt = 0; + String sToken; + do { + if( 0 != (sToken = rStr.GetToken( 0, ',', nToken )).Len() ) + { + switch( nCnt ) + { + case 0: // CharSet + eCharSet = CharSetFromName(sToken); + break; + case 1: // LineEnd + if( sToken.EqualsIgnoreCaseAscii( "CRLF" )) + eCRLF_Flag = LINEEND_CRLF; + else if( sToken.EqualsIgnoreCaseAscii( "LF" )) + eCRLF_Flag = LINEEND_LF; + else + eCRLF_Flag = LINEEND_CR; + break; + case 2: // fontname + sFont = sToken; + break; + case 3: // Language + nLanguage = MsLangId::convertIsoStringToLanguage( sToken ); + break; + } + } + ++nCnt; + } while( STRING_NOTFOUND != nToken ); +} + +void SwAsciiOptions::WriteUserData( String& rStr ) +{ + // 1. charset + rStr = NameFromCharSet(eCharSet); + rStr += ','; + + // 2. LineEnd + switch(eCRLF_Flag) + { + case LINEEND_CRLF: + rStr.AppendAscii( "CRLF" ); + break; + case LINEEND_CR: + rStr.AppendAscii( "CR" ); + break; + case LINEEND_LF: + rStr.AppendAscii( "LF" ); + break; + } + rStr += ','; + + // 3. Fontname + rStr += sFont; + rStr += ','; + + // 4. Language + if (nLanguage) + { + rtl::OUString sTmp = MsLangId::convertLanguageToIsoString( nLanguage ); + rStr += (String)sTmp; + } + rStr += ','; +} + +extern "C" { static void SAL_CALL thisModule() {} } + +static oslGenericFunction GetMswordLibSymbol( const char *pSymbol ) +{ + static ::osl::Module aModule; + static sal_Bool bLoaded = sal_False; + static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "msword" ) ) ); + if (!bLoaded) + bLoaded = SvLibrary::LoadModule( aModule, aLibName, &thisModule ); + if (bLoaded) + return aModule.getFunctionSymbol( ::rtl::OUString::createFromAscii( pSymbol ) ); + return NULL; +} + +Reader* GetRTFReader() +{ + FnGetReader pFunction = reinterpret_cast( GetMswordLibSymbol( "ImportRTF" ) ); + + if ( pFunction ) + return (*pFunction)(); + + return NULL; +} + +void GetRTFWriter( const String& rFltName, const String& rBaseURL, WriterRef& xRet ) +{ + FnGetWriter pFunction = reinterpret_cast( GetMswordLibSymbol( "ExportRTF" ) ); + + if ( pFunction ) + (*pFunction)( rFltName, rBaseURL, xRet ); + else + xRet = WriterRef(0); +} + +Reader* GetWW8Reader() +{ + FnGetReader pFunction = reinterpret_cast( GetMswordLibSymbol( "ImportDOC" ) ); + + if ( pFunction ) + return (*pFunction)(); + + return NULL; +} + +void GetWW8Writer( const String& rFltName, const String& rBaseURL, WriterRef& xRet ) +{ + FnGetWriter pFunction = reinterpret_cast( GetMswordLibSymbol( "ExportDOC" ) ); + + if ( pFunction ) + (*pFunction)( rFltName, rBaseURL, xRet ); + else + xRet = WriterRef(0); +} + +typedef ULONG ( __LOADONCALLAPI *SaveOrDel )( SfxObjectShell&, SotStorage&, BOOL, const String& ); +typedef ULONG ( __LOADONCALLAPI *GetSaveWarning )( SfxObjectShell& ); + +ULONG SaveOrDelMSVBAStorage( SfxObjectShell& rDoc, SotStorage& rStor, BOOL bSaveInto, const String& rStorageName ) +{ + SaveOrDel pFunction = reinterpret_cast( GetMswordLibSymbol( "SaveOrDelMSVBAStorage_ww8" ) ); + if( pFunction ) + return pFunction( rDoc, rStor, bSaveInto, rStorageName ); + return ERRCODE_NONE; +} + +ULONG GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS ) +{ + GetSaveWarning pFunction = reinterpret_cast( GetMswordLibSymbol( "GetSaveWarningOfMSVBAStorage_ww8" ) ); + if( pFunction ) + return pFunction( rDocS ); + return ERRCODE_NONE; +} + + -- cgit v1.2.3 From f56a94c7ef27aa6a64a1ddc1ab53c5f4d17b27e6 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Tue, 15 Jun 2010 21:01:57 +0200 Subject: tl78v2: #i112427# Support password to modify in calc and writer ODF documents --- sw/source/ui/uno/SwXDocumentSettings.cxx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'sw/source') diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index 59fbcef91f..3a1a17d98a 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -124,6 +124,7 @@ enum SwDocumentSettingsPropertyHandles // --> OD 2008-06-05 #i89181# HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, // <-- + HANDLE_MODIFYPASSWORDINFO }; MasterPropertySetInfo * lcl_createSettingsInfo() @@ -177,6 +178,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo() { RTL_CONSTASCII_STRINGPARAM("ProtectForm"), HANDLE_PROTECT_FORM, CPPUTYPE_BOOLEAN, 0, 0}, // --> OD 2008-06-05 #i89181# { RTL_CONSTASCII_STRINGPARAM("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, CPPUTYPE_BOOLEAN, 0, 0}, + { RTL_CONSTASCII_STRINGPARAM("ModifyPasswordInfo"), HANDLE_MODIFYPASSWORDINFO, CPPUTYPE_PROPERTYVALUE, 0, 0}, /* * As OS said, we don't have a view when we need to set this, so I have to @@ -671,6 +673,21 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf } break; // <-- + case HANDLE_MODIFYPASSWORDINFO: + { + uno::Sequence< beans::PropertyValue > aInfo; + if ( !( rValue >>= aInfo ) ) + throw lang::IllegalArgumentException( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Value of type Sequence expected!" ) ), + uno::Reference< uno::XInterface >(), + 2 ); + + if ( !mpDocSh->SetModifyPasswordInfo( aInfo ) ) + throw beans::PropertyVetoException( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The hash is not allowed to be changed now!" ) ), + uno::Reference< uno::XInterface >() ); + } + break; default: throw UnknownPropertyException(); } @@ -998,6 +1015,10 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf } break; // <-- + case HANDLE_MODIFYPASSWORDINFO: + { + rValue <<= mpDocSh->GetModifyPasswordInfo(); + } default: throw UnknownPropertyException(); -- cgit v1.2.3 From 367d2fa2b85c73055f49acc90916bc9dc56cbb74 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 16 Jun 2010 10:36:38 +0200 Subject: tl78v2: #i112427# Support password to modify in calc and writer ODF documents --- sw/source/ui/uno/SwXDocumentSettings.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'sw/source') diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index 3a1a17d98a..cbfe8617ad 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -1019,6 +1019,7 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf { rValue <<= mpDocSh->GetModifyPasswordInfo(); } + break; default: throw UnknownPropertyException(); -- cgit v1.2.3 From 250b871e19933096119915effdca64c5a64b7c20 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 18 Jun 2010 15:44:36 +0200 Subject: unoawt2: get rid of the ImageConsumer class - it has no clients anymore --- sw/inc/pch/precompiled_sw.hxx | 1 - sw/source/filter/html/htmlform.cxx | 1 - 2 files changed, 2 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 5f27eabcc4..c208fc8404 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -921,7 +921,6 @@ #include "vcl/help.hxx" #include "vcl/image.hxx" #include "vcl/imagebtn.hxx" -#include "vcl/imgcons.hxx" #include "vcl/inputctx.hxx" #include "vcl/jobset.hxx" #include "vcl/keycod.hxx" diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index b24a2bc3bf..2c22a170a0 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include -- cgit v1.2.3 From d3c0b419554236ac1a16a97b37981c493ea15f4f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Sat, 19 Jun 2010 01:26:41 +0200 Subject: unoawt2: #i10000# --- sw/source/filter/html/htmlform.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 2c22a170a0..06d9e29ca8 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -67,6 +67,7 @@ #include #include #include +#include #include #include #include @@ -598,7 +599,7 @@ void SwHTMLImageWatcher::complete( sal_Int32 Status, const uno::Reference< awt::XImageProducer >& ) throw( uno::RuntimeException ) { - if( IMAGEERROR == Status || IMAGEABORTED == Status ) + if( awt::ImageStatus::IMAGESTATUS_ERROR == Status || awt::ImageStatus::IMAGESTATUS_ABORTED == Status ) { // uns selbst abmelden und loeschen clear(); -- cgit v1.2.3 From d774937bcda3e953479853069e0cbcce888dd369 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 24 Jun 2010 09:08:52 +0200 Subject: cws tl81: #i112179# dictionary issue with context menus fixed --- sw/source/ui/lingu/olmenu.cxx | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 9a1d361012..e407967cab 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -398,7 +398,9 @@ bGrammarResults(false) { DBG_ASSERT(xSpellAlt.is(), "no spelling alternatives available"); - CreateAutoMnemonics(); +// CreateAutoMnemonics(); + SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); + nCheckedLanguage = LANGUAGE_NONE; if (xSpellAlt.is()) { @@ -471,7 +473,8 @@ bGrammarResults(false) } pMenu = GetPopupMenu(MN_ADD_TO_DIC); - pMenu->CreateAutoMnemonics(); +// pMenu->CreateAutoMnemonics(); + pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); //! necessary to retrieve the correct dictionary name in 'Execute' below bEnable = FALSE; // enable MN_ADD_TO_DIC? uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() ); if (xDicList.is()) @@ -572,7 +575,6 @@ bGrammarResults(false) ////////////////////////////////////////////////////////////////////////////////// RemoveDisabledEntries( TRUE, TRUE ); - SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); } /*-------------------------------------------------------------------------- @@ -599,7 +601,8 @@ aInfo16( SW_RES(IMG_INFO_16) ) InsertItem( MN_SHORT_COMMENT, aMessageText, MIB_NOSELECT, nPos++ ); SetItemImage( MN_SHORT_COMMENT, aInfo16 ); - CreateAutoMnemonics(); +// CreateAutoMnemonics(); + SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); InsertSeparator( nPos++ ); sal_Int32 nStringCount = aSuggestions.getLength(); @@ -705,7 +708,6 @@ aInfo16( SW_RES(IMG_INFO_16) ) ////////////////////////////////////////////////////////////////////////////////// RemoveDisabledEntries( TRUE, TRUE ); - SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); } /*-------------------------------------------------------------------------- @@ -824,9 +826,16 @@ void SwSpellPopup::Execute( USHORT nId ) USHORT nDicIdx = nId - MN_DICTIONARIES_START; DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" ); - if (nDicIdx < aDics.getLength()) + PopupMenu *pMenu = GetPopupMenu(MN_ADD_TO_DIC); + String aDicName ( pMenu->GetItemText(nId) ); + + uno::Reference< linguistic2::XDictionary > xDic; + uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() ); + if (xDicList.is()) + xDic = xDicList->getDictionaryByName( aDicName ); + + if (xDic.is()) { - uno::Reference< linguistic2::XDictionary > xDic = aDics.getConstArray()[nDicIdx]; INT16 nAddRes = linguistic::AddEntryToDic( xDic, aWord, FALSE, aEmptyStr, LANGUAGE_NONE ); // save modified user-dictionary if it is persistent uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY ); -- cgit v1.2.3 From e1e41d0c56ea01ceb7e952c9b8eb76e96c922fba Mon Sep 17 00:00:00 2001 From: Ruediger Timm Date: Thu, 24 Jun 2010 10:49:45 +0200 Subject: masterfix: #i10000# Merge error corrected. --- sw/source/filter/ww8/wrtww8.cxx | 1 - 1 file changed, 1 deletion(-) mode change 100755 => 100644 sw/source/filter/ww8/wrtww8.cxx (limited to 'sw/source') diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx old mode 100755 new mode 100644 index 1e2f960cc3..f541d57b93 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2491,7 +2491,6 @@ void MSWordExportBase::WriteText() // This piece of code always breaks builds... #if 0 #ifdef DEBUG -#if 0 if (aNodeSet.find(pNd) == aNodeSet.end()) { aNodeSet.insert(pNd); -- cgit v1.2.3 From b8001240a7b1365860164d3116390bc9ed36b06b Mon Sep 17 00:00:00 2001 From: Malte Timmermann Date: Fri, 25 Jun 2010 13:15:03 +0200 Subject: codecleanup02: #i112685# Removed ifdefs and code for WIN,W30,W31 --- starmath/inc/applicat.hxx | 4 ---- sw/source/core/doc/doc.cxx | 2 +- sw/source/core/except/errhdl.cxx | 9 --------- sw/source/core/frmedt/feshview.cxx | 4 ---- sw/source/core/txtnode/fntcache.cxx | 4 ++-- sw/source/core/txtnode/swfont.cxx | 4 ++-- sw/source/filter/ascii/wrtasc.cxx | 2 +- sw/source/filter/ww8/dump/ww8struc.hxx | 2 +- sw/source/ui/envelp/envimg.cxx | 2 +- sw/source/ui/inc/swlbox.hxx | 4 ---- sw/source/ui/inc/view.hxx | 2 +- sw/source/ui/uiview/uivwimp.cxx | 2 +- sw/source/ui/uiview/view.cxx | 2 +- sw/source/ui/uiview/view2.cxx | 2 +- sw/source/ui/uiview/viewstat.cxx | 2 +- 15 files changed, 13 insertions(+), 34 deletions(-) mode change 100755 => 100644 sw/source/core/doc/doc.cxx (limited to 'sw/source') diff --git a/starmath/inc/applicat.hxx b/starmath/inc/applicat.hxx index 1c29e26d1d..fd3936adac 100644 --- a/starmath/inc/applicat.hxx +++ b/starmath/inc/applicat.hxx @@ -51,10 +51,6 @@ class SvxErrorHandler; ** **/ -#ifdef WIN -#define RELEASE "WIN304" -#endif - #ifdef PM2 #define RELEASE "PM304" #endif diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx old mode 100755 new mode 100644 index d25e4bd169..7007179ff4 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1182,7 +1182,7 @@ static void lcl_FormatPostIt( pIDCO->SplitNode( *aPam.GetPoint(), false ); aStr = pField->GetPar2(); -#if defined( WIN ) || defined( WNT ) || defined( PM2 ) +#if defined( WNT ) || defined( PM2 ) // Bei Windows und Co alle CR rausschmeissen aStr.EraseAllChars( '\r' ); #endif diff --git a/sw/source/core/except/errhdl.cxx b/sw/source/core/except/errhdl.cxx index 2c48c28c1c..a09d1c1f59 100644 --- a/sw/source/core/except/errhdl.cxx +++ b/sw/source/core/except/errhdl.cxx @@ -31,21 +31,12 @@ #include "stdlib.h" -#ifdef WIN -#endif #include #include #include #include #include // fuer die defines von ERR_SW6MSG_ ... -// break into CodeView -#if defined(ZTC) && defined(WIN) -#define CVBREAK asm( 0xCC ); -#endif -#if defined(MSC) && defined(WIN) -#define CVBREAK __asm int 3; -#endif #ifndef CVBREAK #define CVBREAK #endif diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 2eb597f887..045ffe54ac 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -30,10 +30,6 @@ #include #include "hintids.hxx" -#ifdef WIN -#define _FESHVIEW_ONLY_INLINE_NEEDED -#endif - #include #include #include diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index f88df01a6d..e1a540a3d5 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -538,7 +538,7 @@ void SwFntObj::CreateScrFont( const ViewShell& rSh, const OutputDevice& rOut ) void SwFntObj::GuessLeading( const ViewShell& -#if defined(WNT) || defined(WIN) || defined(PM2) +#if defined(WNT) || defined(PM2) rSh #endif , const FontMetric& rMet ) @@ -551,7 +551,7 @@ void SwFntObj::GuessLeading( const ViewShell& return; } -#if defined(WNT) || defined(WIN) || defined(PM2) +#if defined(WNT) || defined(PM2) OutputDevice *pWin = rSh.GetWin() ? rSh.GetWin() : GetpApp()->GetDefaultDevice(); diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index 66508628c1..199cb8b166 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -77,11 +77,11 @@ #include // SwTxtFrm #include -#if defined(WIN) || defined(WNT) || defined(PM2) +#if defined(WNT) || defined(PM2) #define FNT_LEADING_HACK #endif -#if defined(WIN) || defined(WNT) +#if defined(WNT) #define FNT_ATM_HACK #endif diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx index bc4882cfd1..1c362b16ed 100644 --- a/sw/source/filter/ascii/wrtasc.cxx +++ b/sw/source/filter/ascii/wrtasc.cxx @@ -69,7 +69,7 @@ SwASCWriter::SwASCWriter( const String& rFltNm ) break; case 'A': -#if !defined(WIN) && !defined(WNT) +#if !defined(WNT) aNewOpts.SetCharSet( RTL_TEXTENCODING_MS_1252 ); aNewOpts.SetParaFlags( LINEEND_CRLF ); #endif diff --git a/sw/source/filter/ww8/dump/ww8struc.hxx b/sw/source/filter/ww8/dump/ww8struc.hxx index 9591523ac0..344fc9d1b1 100644 --- a/sw/source/filter/ww8/dump/ww8struc.hxx +++ b/sw/source/filter/ww8/dump/ww8struc.hxx @@ -62,7 +62,7 @@ inline void Set_UInt32( BYTE *& p, UINT32 n ) #if defined OSL_BIGENDIAN || SAL_TYPES_ALIGNMENT4 > 2 || defined UNX #define __WW8_NEEDS_COPY #else -#if defined WNT || defined WIN || defined OS2 +#if defined WNT || defined OS2 #define __WW8_NEEDS_PACK #pragma pack(2) #endif diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx index 2bf989f833..85acf6e37c 100644 --- a/sw/source/ui/envelp/envimg.cxx +++ b/sw/source/ui/envelp/envimg.cxx @@ -51,7 +51,7 @@ #include -#ifdef WIN +#ifdef WNT #define NEXTLINE UniString::CreateFromAscii("\r\n") #else #define NEXTLINE '\n' diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx index 5488f0ef2b..ab4435772f 100644 --- a/sw/source/ui/inc/swlbox.hxx +++ b/sw/source/ui/inc/swlbox.hxx @@ -76,11 +76,7 @@ namespace nsSwComboBoxStyle const SwComboBoxStyle CBS_LOWER = 0x02; const SwComboBoxStyle CBS_ALL = 0x04; const SwComboBoxStyle CBS_FILENAME = 0x08; -#ifdef WIN - const SwComboBoxStyle CBS_SW_FILENAME = CBS_FILENAME | CBS_LOWER; -#else const SwComboBoxStyle CBS_SW_FILENAME = CBS_FILENAME; -#endif } class SW_DLLPUBLIC SwComboBox : public ComboBox diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 039f9ff32c..85b33fda78 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -452,7 +452,7 @@ public: inline SwEditWin &GetEditWin() { return *pEditWin; } inline const SwEditWin &GetEditWin () const { return *pEditWin; } -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX void ScannerEventHdl( const ::com::sun::star::lang::EventObject& rEventObject ); #endif diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx index d58e80a542..8060006c3f 100644 --- a/sw/source/ui/uiview/uivwimp.cxx +++ b/sw/source/ui/uiview/uivwimp.cxx @@ -294,7 +294,7 @@ SwScannerEventListener::~SwScannerEventListener() void SAL_CALL SwScannerEventListener::disposing( const EventObject& rEventObject) throw(uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX if( pView ) pView->ScannerEventHdl( rEventObject ); #endif diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 10b3c58bd8..8d750d9234 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -1759,7 +1759,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) /*-----------------02.12.96 12:36------------------- --------------------------------------------------*/ -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX void SwView::ScannerEventHdl( const EventObject& /*rEventObject*/ ) { diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 6bba1778e8..8fd614acf0 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -910,7 +910,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq) GetViewFrame()->GetBindings().Invalidate( nSlot ); } break; -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX case SID_TWAIN_SELECT: case SID_TWAIN_TRANSFER: GetViewImpl()->ExecuteScan( rReq ); diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx index ff452ef209..ccd7a13381 100644 --- a/sw/source/ui/uiview/viewstat.cxx +++ b/sw/source/ui/uiview/viewstat.cxx @@ -228,7 +228,7 @@ void SwView::GetState(SfxItemSet &rSet) break; case SID_TWAIN_SELECT: case SID_TWAIN_TRANSFER: -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX { if(!SW_MOD()->GetScannerManager().is()) rSet.DisableItem(nWhich); -- cgit v1.2.3 From e4bfbff02ba8fc7077fcc4453721a3d592f04f9d Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 25 Jun 2010 17:56:53 +0200 Subject: sw33bf06: #i112513#: work around unxsols4 compiler bug --- sw/source/core/unocore/unoidx.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 1c24d55c89..211506c823 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -1625,7 +1625,9 @@ public: *aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Mark(eType))) , m_eTOXType(eType) , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) - , m_bIsDescriptor(0 == pMark) +// #i112513#: unxsols4 (Sun C++ 5.9 SunOS_sparc) generates wrong code for this +// , m_bIsDescriptor(0 == pMark) + , m_bIsDescriptor((0 == pMark) ? true : false) , m_TypeDepend(this, pType) , m_pTOXMark(pMark) , m_pDoc(pDoc) -- cgit v1.2.3 From 779453c27caaf0b19ed5b20945e46d3f92111a43 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 25 Jun 2010 18:00:25 +0200 Subject: sw33bf06: #i111177#: preventively work around unxsols4 compiler bug everywhere --- sw/source/core/unocore/unoidx.cxx | 3 ++- sw/source/core/unocore/unoparagraph.cxx | 3 ++- sw/source/core/unocore/unorefmk.cxx | 6 ++++-- sw/source/core/unocore/unosect.cxx | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 211506c823..2a9ea3c792 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -367,7 +367,8 @@ public: *aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Index(eType))) , m_eTOXType(eType) , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) - , m_bIsDescriptor(0 == pBaseSection) + // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code + , m_bIsDescriptor((0 == pBaseSection) ? true : false) , m_pDoc(&rDoc) , m_pProps((m_bIsDescriptor) ? new SwDocIndexDescriptorProperties_Impl(rDoc.GetTOXType(eType, 0)) diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index cda9c822ad..194f66a795 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -139,7 +139,8 @@ public: , m_rThis(rThis) , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) , m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH)) - , m_bIsDescriptor(0 == pTxtNode) + // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code + , m_bIsDescriptor((0 == pTxtNode) ? true : false) , m_nSelectionStartPos(nSelStart) , m_nSelectionEndPos(nSelEnd) , m_xParentText(xParent) diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 244bc8dc5e..d088b6ca26 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -68,7 +68,8 @@ public: SwDoc *const pDoc, SwFmtRefMark const*const pRefMark) : SwClient((pDoc) ? pDoc->GetUnoCallBack() : 0) , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) - , m_bIsDescriptor(0 == pRefMark) + // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code + , m_bIsDescriptor((0 == pRefMark) ? true : false) , m_pDoc(pDoc) , m_pMarkFmt(pRefMark) { @@ -762,7 +763,8 @@ public: , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) , m_pTextPortions( pPortions ) , m_bIsDisposed( false ) - , m_bIsDescriptor(0 == pMeta) + // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code + , m_bIsDescriptor((0 == pMeta) ? true : false) , m_xParentText(xParentText) , m_Text(rDoc, rThis) { diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 92fad90e82..6514ca6579 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -136,7 +136,8 @@ public: , m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_SECTION)) , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) , m_bIndexHeader(bIndexHeader) - , m_bIsDescriptor(0 == pFmt) + // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code + , m_bIsDescriptor((0 == pFmt) ? true : false) , m_pProps((pFmt) ? 0 : new SwTextSectionProperties_Impl()) { } -- cgit v1.2.3 From b335fc46c74eb0ecec1afcd8ad105ac482ac0b68 Mon Sep 17 00:00:00 2001 From: Malte Timmermann Date: Wed, 30 Jun 2010 09:48:27 +0200 Subject: codecleanup02: #i112685# Removed ifdefs and code for MAC --- sw/source/core/fields/fldbas.cxx | 3 --- 1 file changed, 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index 7abd94ebf5..95dd94b9b7 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -58,9 +58,6 @@ #endif #include -#ifdef MAC -#include -#endif #include using namespace ::com::sun::star; -- cgit v1.2.3 From b1d2d5c14d02ae5f1ccb2e46451673f5cc0cc12f Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 30 Jun 2010 20:59:38 +0100 Subject: cmcfixes76: #i112824# && || warning --- sw/source/ui/app/docsh.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index 5a1b8601f7..a5a8bad22c 100755 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -1399,7 +1399,7 @@ bool SwDocShell::SetProtectionPassword( const String &rNewPassword ) IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess(); Sequence< sal_Int8 > aPasswd = pIDRA->GetRedlinePassword(); if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, FALSE, &pItem ) - && ((SfxBoolItem*)pItem)->GetValue() == aPasswd.getLength() > 0) + && ((SfxBoolItem*)pItem)->GetValue() == (aPasswd.getLength() > 0)) return false; bool bRes = false; -- cgit v1.2.3 From dadceb5f992a7e5a067e6327b519c7814a194cd3 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 1 Jul 2010 13:42:34 +0200 Subject: sw33bf06: #i111742#: SidebarTxtControlAcc.cxx: apply patch by pjanik --- sw/source/ui/docvw/SidebarTxtControlAcc.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx index 8b0f029336..bd613fc7c0 100644 --- a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx +++ b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx @@ -80,7 +80,7 @@ class SidebarTextEditSource : public SvxEditSource, SidebarTextEditSource::SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl ) : SvxEditSource() , mrSidebarTxtControl( rSidebarTxtControl ) - , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), NULL ) + , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), FALSE ) , mViewForwarder( *(rSidebarTxtControl.GetTextView()) ) { if ( mrSidebarTxtControl.GetTextView() ) -- cgit v1.2.3 From 0c3cf89bdce0fb08bdeb8c270d8858bf5c81812e Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Thu, 1 Jul 2010 16:23:26 +0200 Subject: mib17: #111144# Enable calls to module function via Sheet object --- sw/source/ui/vba/vbabookmarks.cxx | 5 ++--- sw/source/ui/vba/vbadocuments.cxx | 4 ++-- sw/source/ui/vba/vbasections.cxx | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/vba/vbabookmarks.cxx b/sw/source/ui/vba/vbabookmarks.cxx index 17d1741ce8..bccfeeff0e 100644 --- a/sw/source/ui/vba/vbabookmarks.cxx +++ b/sw/source/ui/vba/vbabookmarks.cxx @@ -41,15 +41,14 @@ using namespace ::com::sun::star; class BookmarksEnumeration : public EnumerationHelperImpl { uno::Reference< frame::XModel > mxModel; - uno::WeakReference< XHelperInterface > mxParent; public: - BookmarksEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), mxModel( xModel ), mxParent( xParent ) {} + BookmarksEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mxModel( xModel ) {} virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { uno::Reference< container::XNamed > xNamed( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); rtl::OUString aName = xNamed->getName(); - return uno::makeAny( uno::Reference< word::XBookmark > ( new SwVbaBookmark( mxParent, m_xContext, mxModel, aName ) ) ); + return uno::makeAny( uno::Reference< word::XBookmark > ( new SwVbaBookmark( m_xParent, m_xContext, mxModel, aName ) ) ); } }; diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx index dc8a592f9e..094dde4c0d 100644 --- a/sw/source/ui/vba/vbadocuments.cxx +++ b/sw/source/ui/vba/vbadocuments.cxx @@ -76,7 +76,7 @@ class DocumentEnumImpl : public EnumerationHelperImpl { uno::Any m_aApplication; public: - DocumentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Any& aApplication ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), m_aApplication( aApplication ) {} + DocumentEnumImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Any& aApplication ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_aApplication( aApplication ) {} virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { @@ -102,7 +102,7 @@ SwVbaDocuments::createEnumeration() throw (uno::RuntimeException) // safer to create an enumeration based on this objects state // rather than one effectively based of the desktop component uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW ); - return new DocumentEnumImpl( mxContext, xEnumerationAccess->createEnumeration(), Application() ); + return new DocumentEnumImpl( mxParent, mxContext, xEnumerationAccess->createEnumeration(), Application() ); } uno::Any diff --git a/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx index 8e6cbee60e..6a4ae0e45e 100644 --- a/sw/source/ui/vba/vbasections.cxx +++ b/sw/source/ui/vba/vbasections.cxx @@ -120,14 +120,13 @@ public: class SectionsEnumWrapper : public EnumerationHelperImpl { uno::Reference< frame::XModel > mxModel; - uno::WeakReference< XHelperInterface > mxParent; public: - SectionsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), mxModel( xModel ), mxParent( xParent ) {} + SectionsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mxModel( xModel ){} virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { uno::Reference< beans::XPropertySet > xPageProps( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< word::XSection > ( new SwVbaSection( mxParent, m_xContext, mxModel, xPageProps ) ) ); + return uno::makeAny( uno::Reference< word::XSection > ( new SwVbaSection( m_xParent, m_xContext, mxModel, xPageProps ) ) ); } }; -- cgit v1.2.3 From 622358015ad323475ff14f3d7c6284addfd84500 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 1 Jul 2010 17:28:42 +0200 Subject: sw33bf06: #i112657#: apply patch by dtardon: do not crash when there are merged cells not started by \clmgf at the beginning of a row --- sw/source/filter/rtf/rtftbl.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx index c3a89f70be..67dcd3f797 100644 --- a/sw/source/filter/rtf/rtftbl.cxx +++ b/sw/source/filter/rtf/rtftbl.cxx @@ -288,7 +288,12 @@ void SwRTFParser::ReadTable( int nToken ) break; case RTF_CLMRG: - aMergeBoxes[ nBoxCnt ] = TRUE; + // would crash later on reading \cellx (#i112657#): + // the first cell cannot be merged with earlier ones. + if (nBoxCnt != 0) + { + aMergeBoxes[ nBoxCnt ] = TRUE; + } break; case RTF_CELLX: -- cgit v1.2.3 From 82ab3375fed640f7bfd8cf49ad8bcc131916e85c Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 1 Jul 2010 17:38:08 +0200 Subject: sw33bf06: #i112516#: NewTabPortion(): apply patch by cmc: fix SIGFPE --- sw/source/core/text/txttab.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index 9a1c66aac6..7f9bf2fcf4 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -194,6 +194,10 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto ) } SwTwips nCount = nSearchPos; + //Minimum tab stop width is 1 + if (nDefTabDist <= 0) + nDefTabDist = 1; + nCount /= nDefTabDist; nNextPos = nCount < 0 || (!nCount && nSearchPos <= 0)? nCount * nDefTabDist :( nCount + 1 ) * nDefTabDist ; // --> FME 2004-09-21 #117919 Minimum tab stop width is 1 or 51 twips: -- cgit v1.2.3 From f1ac22adada11d70d9e9a4859fdedd5857838fba Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 1 Jul 2010 18:09:48 +0200 Subject: sw33bf06: #i112577#: SwPaM::Find: apply patch by cmc: fix null ViewShell crash --- sw/source/core/crsr/findtxt.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index 0097c225ae..814fd21bbf 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -53,8 +53,6 @@ #include #include -#define POSTITMGR ((ViewShell*)pNode->GetDoc()->GetDocShell()->GetWrtShell())->GetPostItMgr() - using namespace ::com::sun::star; using namespace util; @@ -333,9 +331,13 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te } + SwDocShell *const pDocShell = pNode->GetDoc()->GetDocShell(); + ViewShell *const pWrtShell = (pDocShell) ? (ViewShell*)(pDocShell->GetWrtShell()) : 0; + SwPostItMgr *const pPostItMgr = (pWrtShell) ? pWrtShell->GetPostItMgr() : 0; + xub_StrLen aStart = 0; // do we need to finish a note? - if (POSTITMGR->HasActiveSidebarWin()) + if (pPostItMgr && pPostItMgr->HasActiveSidebarWin()) { if (bSearchInNotes) { @@ -347,7 +349,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te --aNumberPostits; } //search inside and finsih and put focus back into the doc - if (POSTITMGR->FinishSearchReplace(rSearchOpt,bSrchForward)) + if (pPostItMgr->FinishSearchReplace(rSearchOpt,bSrchForward)) { bFound = true ; break; @@ -355,7 +357,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te } else { - POSTITMGR->SetActiveSidebarWin(0); + pPostItMgr->SetActiveSidebarWin(0); } } @@ -391,7 +393,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te if ( (bSrchForward && (GetPostIt(aLoop + aIgnore,pHts) < pHts->Count()) ) || ( !bSrchForward && (aLoop!=0) )) { const SwTxtAttr* pTxtAttr = bSrchForward ? (*pHts)[GetPostIt(aLoop+aIgnore,pHts)] : (*pHts)[GetPostIt(aLoop+aIgnore-1,pHts)]; - if ( POSTITMGR->SearchReplace(((SwTxtFld*)pTxtAttr)->GetFld(),rSearchOpt,bSrchForward) ) + if ( pPostItMgr && pPostItMgr->SearchReplace(((SwTxtFld*)pTxtAttr)->GetFld(),rSearchOpt,bSrchForward) ) { bFound = true ; break; -- cgit v1.2.3 From 82cfdd8451b6aea7a27bdf90c543fc27a9939c7c Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 2 Jul 2010 10:54:46 +0200 Subject: sw33bf06: #i111886#: apply patch by od: SwToCntntAnchoredObjectPosition::CalcPosition(): use the cached paragraph portions; recalculating deletes layout frames that are on call stack (crash) --- .../core/objectpositioning/tocntntanchoredobjectposition.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index 01bf45871b..c2c1c2ad1d 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -213,9 +213,11 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() !GetAnchoredObj().GetLastCharRect().Width() ) || !GetAnchoredObj().GetLastTopOfLine() ) { - // --> OD 2004-07-15 #117380# - suppress check for paragraph - // portion information by passing as first parameter - GetAnchoredObj().CheckCharRectAndTopOfLine( false ); + // --> OD 2010-07-02 #i111886# + // Check existence of paragraph portion information in order + // to avoid formatting which could cause deletion of follow frames. + GetAnchoredObj().CheckCharRectAndTopOfLine(); + // <-- // OD 2005-01-12 - Due to table break algorithm the character // rectangle can have no height. Thus, check also the width if ( ( !GetAnchoredObj().GetLastCharRect().Height() && -- cgit v1.2.3 From 9bf9ed15a027d065f196a5b91399f141701d659c Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 5 Jul 2010 10:55:16 +0200 Subject: cws tl81: warning-free code --- sw/source/ui/lingu/olmenu.cxx | 1 - 1 file changed, 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index e407967cab..87d5c000d3 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -823,7 +823,6 @@ void SwSpellPopup::Execute( USHORT nId ) else if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END) { OUString aWord( xSpellAlt->getWord() ); - USHORT nDicIdx = nId - MN_DICTIONARIES_START; DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" ); PopupMenu *pMenu = GetPopupMenu(MN_ADD_TO_DIC); -- cgit v1.2.3 From 7232ce6ed050a0175f11405ec8c7630c13fd4af7 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Tue, 6 Jul 2010 19:34:53 +0200 Subject: mib17: #i112634# add VBA sheet event handling, based on a patch from Noel Power --- sw/inc/doc.hxx | 11 +++- sw/source/core/doc/doc.cxx | 24 ++++++++ sw/source/filter/ww8/wrtww8.cxx | 2 + sw/source/ui/app/docsh2.cxx | 44 +++++++++++++- sw/source/ui/vba/makefile.mk | 1 + sw/source/ui/vba/service.cxx | 9 ++- sw/source/ui/vba/vbaeventshelper.cxx | 108 +++++++++++++++++++++++++++++++++++ sw/source/ui/vba/vbaeventshelper.hxx | 54 ++++++++++++++++++ sw/util/makefile.mk | 2 +- 9 files changed, 248 insertions(+), 7 deletions(-) mode change 100755 => 100644 sw/source/core/doc/doc.cxx create mode 100755 sw/source/ui/vba/vbaeventshelper.cxx create mode 100755 sw/source/ui/vba/vbaeventshelper.hxx (limited to 'sw/source') diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index ab413e18fd..8b6a6dc323 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -79,6 +79,9 @@ class SwList; #include "comphelper/implementationreference.hxx" #include #include +#ifdef FUTURE_VBA +#include +#endif #include #include @@ -405,7 +408,9 @@ class SW_DLLPUBLIC SwDoc : // table of forbidden characters of this document vos::ORef xForbiddenCharsTable; - +#ifdef FUTURE_VBA + com::sun::star::uno::Reference< com::sun::star::script::vba::XEventProcessor > mxVbaEvents; +#endif // --> OD 2007-10-26 #i83479# public: struct lessThanNodeNum @@ -2128,7 +2133,9 @@ public: { return n32DummyCompatabilityOptions2; } - +#ifdef FUTURE_VBA + com::sun::star::uno::Reference< com::sun::star::script::vba::XEventProcessor > GetVbaEventProcessor(); +#endif ::sfx2::IXmlIdRegistry& GetXmlIdRegistry(); ::sw::MetaFieldManager & GetMetaFieldManager(); SfxObjectShell* CreateCopy(bool bCallInitNew) const; diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx old mode 100755 new mode 100644 index d25e4bd169..0bf92027ff --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -119,6 +119,9 @@ #include #include +#ifdef FUTURE_VBA +#include +#endif /* @@@MAINTAINABILITY-HORROR@@@ Probably unwanted dependency on SwDocShell @@ -2721,6 +2724,27 @@ void SwDoc::ChkCondColls() } } +#ifdef FUTURE_VBA +uno::Reference< script::vba::XEventProcessor > +SwDoc::GetVbaEventProcessor() +{ + if( !mxVbaEvents.is() && pDocShell && ooo::vba::isAlienWordDoc( *pDocShell ) ) + { + try + { + uno::Reference< frame::XModel > xModel( pDocShell->GetModel(), uno::UNO_SET_THROW ); + uno::Sequence< uno::Any > aArgs(1); + aArgs[0] <<= xModel; + mxVbaEvents.set( ooo::vba::createVBAUnoAPIServiceWithArgs( pDocShell, "com.sun.star.script.vba.TextEventProcessor" , aArgs ), uno::UNO_QUERY_THROW ); + } + catch( uno::Exception& ) + { + } + } + return mxVbaEvents; +} +#endif + void SwDoc::setExternalData(::sw::tExternalDataType eType, ::sw::tExternalDataPointer pPayload) { diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index dc63f31800..2a487ac1ae 100755 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3788,8 +3788,10 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer void MSWordExportBase::OutputStartNode( const SwStartNode & rNode) { +#if 0 #ifdef DEBUG ::std::clog << "" << dbg_out(&rNode) << ::std::endl; +#endif #endif ww8::WW8TableNodeInfo::Pointer_t pNodeInfo = diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index cea9d745d7..f969f588fc 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -119,7 +119,10 @@ #include #include #include "com/sun/star/ui/dialogs/TemplateDescription.hpp" - +#ifdef FUTURE_VBA +#include +#include +#endif #include #include @@ -137,7 +140,6 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star; using ::rtl::OUString; using namespace ::sfx2; - extern BOOL FindPhyStyle( SwDoc& , const String& , SfxStyleFamily ); /*-------------------------------------------------------------------- @@ -188,6 +190,26 @@ void SwDocShell::DoFlushDocInfo() } } +#ifdef FUTURE_VBA +void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XEventProcessor >& xVbaEvents, const SfxHint& rHint ) +{ + using namespace com::sun::star::script::vba::EventIdentifier; + if ( rHint.ISA( SfxEventHint ) ) + { + uno::Sequence< uno::Any > aArgs; + ULONG nEventId = ((SfxEventHint&)rHint).GetEventId(); + switch( nEventId ) + { + case SFX_EVENT_CREATEDOC: + xVbaEvents->processVbaEvent( DOCUMENT_NEW, aArgs ); + break; + case SFX_EVENT_OPENDOC: + xVbaEvents->processVbaEvent( DOCUMENT_OPEN, aArgs ); + break; + } + } +} +#endif /*-------------------------------------------------------------------- Beschreibung: Benachrichtigung bei geaenderter DocInfo @@ -202,6 +224,12 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) return ; } +#ifdef FUTURE_VBA + uno::Reference< script::vba::XEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor(); + if( xVbaEvents.is() ) + lcl_processCompatibleSfxHint( xVbaEvents, rHint ); +#endif + USHORT nAction = 0; if( rHint.ISA(SfxSimpleHint) ) { @@ -283,6 +311,18 @@ USHORT SwDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) if( TRUE == nRet ) //Unbedingt auf TRUE abfragen! (RET_NEWTASK) EndListening( *this ); +#ifdef FUTURE_VBA + if( pDoc && IsInPrepareClose() ) + { + uno::Reference< script::vba::XEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor(); + if( xVbaEvents.is() ) + { + using namespace com::sun::star::script::vba::EventIdentifier; + uno::Sequence< uno::Any > aArgs; + xVbaEvents->processVbaEvent( DOCUMENT_CLOSE, aArgs ); + } + } +#endif return nRet; } diff --git a/sw/source/ui/vba/makefile.mk b/sw/source/ui/vba/makefile.mk index c09f813200..b6d0d79942 100644 --- a/sw/source/ui/vba/makefile.mk +++ b/sw/source/ui/vba/makefile.mk @@ -91,6 +91,7 @@ SLOFILES= \ $(SLO)$/vbapagesetup.obj \ $(SLO)$/vbasection.obj \ $(SLO)$/vbasections.obj \ + $(SLO)$/vbaeventshelper.obj \ # --- Targets ------------------------------------------------------ diff --git a/sw/source/ui/vba/service.cxx b/sw/source/ui/vba/service.cxx index fee2847650..8200e323b8 100644 --- a/sw/source/ui/vba/service.cxx +++ b/sw/source/ui/vba/service.cxx @@ -52,6 +52,11 @@ namespace wrapformat extern sdecl::ServiceDecl const serviceDecl; } +namespace vbaeventshelper +{ +extern sdecl::ServiceDecl const serviceDecl; +} + extern "C" { void SAL_CALL component_getImplementationEnvironment( @@ -68,7 +73,7 @@ extern "C" // Component registration return component_writeInfoHelper( pServiceManager, pRegistryKey, - globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl ); + globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl, vbaeventshelper::serviceDecl ); } void * SAL_CALL component_getFactory( @@ -77,7 +82,7 @@ extern "C" { OSL_TRACE("In component_getFactory for %s", pImplName ); void* pRet = component_getFactoryHelper( - pImplName, pServiceManager, pRegistryKey, globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl ); + pImplName, pServiceManager, pRegistryKey, globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl, vbaeventshelper::serviceDecl ); OSL_TRACE("Ret is 0x%x", pRet); return pRet; } diff --git a/sw/source/ui/vba/vbaeventshelper.cxx b/sw/source/ui/vba/vbaeventshelper.cxx new file mode 100755 index 0000000000..66d7231598 --- /dev/null +++ b/sw/source/ui/vba/vbaeventshelper.cxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "vbaeventshelper.hxx" +#include +#include + +using namespace ::com::sun::star; +using namespace ::com::sun::star::script::vba::EventIdentifier; +using namespace ::ooo::vba; + +// ============================================================================ + +SwVbaEventsHelper::SwVbaEventsHelper( uno::Sequence< css::uno::Any > const& aArgs, uno::Reference< uno::XComponentContext > const& xContext ) : + VbaEventsHelperBase( aArgs, xContext ) +{ + registerEventHandler( DOCUMENT_NEW, "Document_New", EVENTHANDLER_DOCUMENT ); + registerEventHandler( AUTO_NEW, "AutoNew", EVENTHANDLER_GLOBAL ); + registerEventHandler( DOCUMENT_OPEN, "Document_Open", EVENTHANDLER_DOCUMENT ); + registerEventHandler( AUTO_OPEN, "AutoOpen", EVENTHANDLER_GLOBAL ); + registerEventHandler( DOCUMENT_CLOSE, "Document_Close", EVENTHANDLER_DOCUMENT ); + registerEventHandler( AUTO_CLOSE, "AutoClose", EVENTHANDLER_GLOBAL ); +} + +SwVbaEventsHelper::~SwVbaEventsHelper() +{ +} + +bool SwVbaEventsHelper::implEventsEnabled() throw (uno::RuntimeException) +{ + return true; +} + +bool SwVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue, + const EventHandlerInfo& rInfo, const uno::Sequence< uno::Any >& /*rArgs*/ ) throw (uno::RuntimeException) +{ + switch( rInfo.mnEventId ) + { + case DOCUMENT_NEW: + rEventQueue.push_back( AUTO_NEW ); + break; + case DOCUMENT_OPEN: + rEventQueue.push_back( AUTO_OPEN ); + break; + case DOCUMENT_CLOSE: + rEventQueue.push_back( AUTO_CLOSE ); + break; + } + return true; +} + +uno::Sequence< uno::Any > SwVbaEventsHelper::implBuildArgumentList( const EventHandlerInfo& /*rInfo*/, + const uno::Sequence< uno::Any >& /*rArgs*/ ) throw (lang::IllegalArgumentException) +{ + // no event handler expects any arguments + return uno::Sequence< uno::Any >(); +} + +void SwVbaEventsHelper::implPostProcessEvent( EventQueue& /*rEventQueue*/, + const EventHandlerInfo& /*rInfo*/, bool /*bSuccess*/, bool /*bCancel*/ ) throw (uno::RuntimeException) +{ + // nothing to do after any event +} + +::rtl::OUString SwVbaEventsHelper::implGetDocumentModuleName( const EventHandlerInfo& /*rInfo*/, + const uno::Sequence< uno::Any >& /*rArgs*/ ) const throw (lang::IllegalArgumentException) +{ + // TODO: get actual codename from document + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ThisDocument" ) ); +} + +// ============================================================================ + +namespace vbaeventshelper +{ +namespace sdecl = comphelper::service_decl; +sdecl::class_ > serviceImpl; +extern sdecl::ServiceDecl const serviceDecl( + serviceImpl, + "SwVbaEventsHelper", + "com.sun.star.document.vba.TextEventProcessor" ); +} + +// ============================================================================ diff --git a/sw/source/ui/vba/vbaeventshelper.hxx b/sw/source/ui/vba/vbaeventshelper.hxx new file mode 100755 index 0000000000..af1c06c034 --- /dev/null +++ b/sw/source/ui/vba/vbaeventshelper.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SW_VBAEVENTS_HXX +#define SW_VBAEVENTS_HXX + +#include + +// ============================================================================ + +class SwVbaEventsHelper : public VbaEventsHelperBase +{ +public: + SwVbaEventsHelper( + const css::uno::Sequence< css::uno::Any >& rArgs, + const css::uno::Reference< css::uno::XComponentContext >& rxContext ); + virtual ~SwVbaEventsHelper(); + +protected: + virtual bool implEventsEnabled() throw (css::uno::RuntimeException); + virtual bool implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::uno::RuntimeException); + virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException); + virtual void implPostProcessEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, bool bSuccess, bool bCancel ) throw (css::uno::RuntimeException); + virtual ::rtl::OUString implGetDocumentModuleName( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) const throw (css::lang::IllegalArgumentException); +}; + +// ============================================================================ + +#endif + diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk index 2907264d89..ce1419b340 100644 --- a/sw/util/makefile.mk +++ b/sw/util/makefile.mk @@ -367,7 +367,7 @@ SHL5STDLIBS= \ $(I18NISOLANGLIB) \ $(EDITENGLIB) \ $(SVXCORELIB) \ - $(SVXMSFILTERLIB) + $(MSFILTERLIB) SHL5DEPN=$(SHL1TARGETN) SHL5LIBS=$(SLB)$/$(TARGET_VBA).lib -- cgit v1.2.3 From 57aee36a52f3c8af8fc8c0838cc5c3a4afa926d7 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 7 Jul 2010 13:05:22 +0200 Subject: sw33bf07: #i112181# method - assure that internal flag indicating existence of non-footnote-anchor portion is updated in all cases. --- sw/source/core/text/itrform2.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index eb39c9edf2..310036452e 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -335,8 +335,14 @@ void SwTxtFormatter::InsertPortion( SwTxtFormatInfo &rInf, // bei dem LineLayout ist allerdings alles anders... if( pPor == pCurr ) { - if( pCurr->GetPortion() ) + if ( pCurr->GetPortion() ) + { pPor = pCurr->GetPortion(); + } + + // --> OD 2010-07-07 #i112181# + rInf.SetOtherThanFtnInside( rInf.IsOtherThanFtnInside() || !pPor->IsFtnPortion() ); + // <-- } else { -- cgit v1.2.3 From c4fab62f2991117dd2bc561b11d279db4f647380 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 7 Jul 2010 19:43:24 +0200 Subject: vcl113: #i110453# support disabled options in a choice --- sw/source/core/view/printdata.cxx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index d67b820fc9..5d8cb3f043 100755 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -325,22 +325,26 @@ SwPrintUIOptions::SwPrintUIOptions( // create a choice for the content to create rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ); - uno::Sequence< rtl::OUString > aChoices( bHasSelection ? 3 : 2 ); - uno::Sequence< rtl::OUString > aHelpText( bHasSelection ? 3 : 2 ); + uno::Sequence< rtl::OUString > aChoices( 3 ); + uno::Sequence< sal_Bool > aChoicesDisabled( 3 ); + uno::Sequence< rtl::OUString > aHelpText( 3 ); aChoices[0] = aLocalizedStrings.GetString( 38 ); + aChoicesDisabled[0] = sal_False; aHelpText[0] = aLocalizedStrings.GetString( 39 ); aChoices[1] = aLocalizedStrings.GetString( 40 ); + aChoicesDisabled[1] = sal_False; aHelpText[1] = aLocalizedStrings.GetString( 41 ); - if (bHasSelection) - { - aChoices[2] = aLocalizedStrings.GetString( 42 ); - aHelpText[2] = aLocalizedStrings.GetString( 43 ); - } + aChoices[2] = aLocalizedStrings.GetString( 42 ); + aChoicesDisabled[2] = sal_Bool(! bHasSelection); + aHelpText[2] = aLocalizedStrings.GetString( 43 ); m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(), aHelpText, aPrintRangeName, aChoices, - bHasSelection ? 2 /*enable 'Selection' radio button*/ : 0 /* enable 'All pages' */); + bHasSelection ? 2 /*enable 'Selection' radio button*/ : 0 /* enable 'All pages' */, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Radio" ) ), + aChoicesDisabled + ); // create a an Edit dependent on "Pages" selected vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True ); m_aUIProperties[nIdx++].Value = getEditControlOpt( rtl::OUString(), @@ -374,6 +378,7 @@ SwPrintUIOptions::SwPrintUIOptions( aChoices, nPrintPostIts, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), + uno::Sequence< sal_Bool >(), aAnnotOpt ); @@ -441,6 +446,7 @@ SwPrintUIOptions::SwPrintUIOptions( aBRTLChoices, nBRTLChoice, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), + uno::Sequence< sal_Bool >(), aBrochureRTLOpt ); } -- cgit v1.2.3 From 73498b6eff95e6c2de5a70efc064045fc5cf2923 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 8 Jul 2010 19:03:59 +0200 Subject: vcl113: #i63604# make inputwin for sw and sc adjust to font from system settings --- sw/source/ui/ribbar/inputwin.cxx | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 sw/source/ui/ribbar/inputwin.cxx (limited to 'sw/source') diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx old mode 100644 new mode 100755 index 174634af48..3fe5e3edb5 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -79,6 +79,8 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) bActive = bIsTable = bDelSel = bResetUndo = bCallUndo = FALSE; FreeResource(); + + aEdit.SetSizePixel( aEdit.CalcMinimumSize() ); SfxImageManager* pManager = SfxImageManager::GetImageManager( SW_MOD() ); pManager->RegisterToolBox(this); -- cgit v1.2.3 From a17eb8f71743aea8af2d44cdaddddc9cdebcb005 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 9 Jul 2010 10:55:23 +0200 Subject: cws tl83: #i113004# crash when spell checking in sd fixed --- sw/source/core/edit/edlingu.cxx | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index d136102a2f..536a6a0b8c 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -1318,8 +1318,12 @@ void SwEditShell::MoveContinuationPosToEndOfCheckedSentence() void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck) { + // Note: rNewPortions.size() == 0 is valid and happens when the whole + // sentence got removed in the dialog + ASSERT( pSpellIter, "SpellIter missing" ); - if(pSpellIter) + if(pSpellIter && + pSpellIter->GetLastPortions().size() > 0) // no portions -> no text to be changed { const SpellPortions& rLastPortions = pSpellIter->GetLastPortions(); const SpellContentPositions rLastPositions = pSpellIter->GetLastPositions(); @@ -1330,9 +1334,6 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, // iterate over the new portions, beginning at the end to take advantage of the previously // saved content positions - if(!rLastPortions.size()) - return; - pDoc->StartUndo( UNDO_OVERWRITE, NULL ); StartAction(); @@ -1344,6 +1345,10 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, sal_uInt32 nRedlinePortions = lcl_CountRedlines(rLastPortions); if((rLastPortions.size() - nRedlinePortions) == rNewPortions.size()) { + DBG_ASSERT( rNewPortions.size() > 0, "rNewPortions should not be empty here" ); + DBG_ASSERT( rLastPortions.size() > 0, "rLastPortions should not be empty here" ); + DBG_ASSERT( rLastPositions.size() > 0, "rLastPositions should not be empty here" ); + //the simple case: the same number of elements on both sides //each changed element has to be applied to the corresponding source element svx::SpellPortions::const_iterator aCurrentNewPortion = rNewPortions.end(); @@ -1357,8 +1362,17 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, //jump over redline portions while(aCurrentOldPortion->bIsHidden) { - --aCurrentOldPortion; - --aCurrentOldPosition; + if (aCurrentOldPortion != rLastPortions.begin() && + aCurrentOldPosition != rLastPositions.begin()) + { + --aCurrentOldPortion; + --aCurrentOldPosition; + } + else + { + DBG_ASSERT( 0, "ApplyChangedSentence: iterator positions broken" ); + break; + } } if ( !pCrsr->HasMark() ) pCrsr->SetMark(); @@ -1398,6 +1412,8 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, } else { + DBG_ASSERT( rLastPositions.size() > 0, "rLastPositions should not be empty here" ); + //select the complete sentence SpellContentPositions::const_iterator aCurrentEndPosition = rLastPositions.end(); --aCurrentEndPosition; -- cgit v1.2.3 From 381dfe719557989e6d6d94c9a4fc40fa0cb2354a Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Sat, 10 Jul 2010 20:30:21 +0100 Subject: cmcfixes76: #i113073# redundant dereferences --- sw/source/filter/ww8/ww8par2.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 176abfa740..8f0789d5b0 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -1509,15 +1509,15 @@ void WW8TabBandDesc::ProcessSpacing(const BYTE* pParams) return; mbHasSpacing=true; #ifdef DBG_UTIL - BYTE nWhichCell = -#endif - *pParams++; + BYTE nWhichCell = *pParams; ASSERT(nWhichCell == 0, "Expected cell to be 0!"); - *pParams++; //unknown byte +#endif + ++pParams; //Skip which cell + ++pParams; //unknown byte BYTE nSideBits = *pParams++; ASSERT(nSideBits < 0x10, "Unexpected value for nSideBits"); - *pParams++; //unknown byte + ++pParams; //unknown byte USHORT nValue = SVBT16ToShort( pParams ); for (int i = wwTOP; i <= wwRIGHT; i++) { @@ -1555,7 +1555,7 @@ void WW8TabBandDesc::ProcessSpecificSpacing(const BYTE* pParams) if (nWhichCell >= MAX_COL + 1) return; - *pParams++; //unknown byte + ++pParams; //unknown byte BYTE nSideBits = *pParams++; ASSERT(nSideBits < 0x10, "Unexpected value for nSideBits"); nOverrideSpacing[nWhichCell] |= nSideBits; @@ -1563,10 +1563,10 @@ void WW8TabBandDesc::ProcessSpecificSpacing(const BYTE* pParams) ASSERT(nOverrideSpacing[nWhichCell] < 0x10, "Unexpected value for nSideBits"); #ifdef DBG_UTIL - BYTE nUnknown2 = -#endif - *pParams++; + BYTE nUnknown2 = *pParams; ASSERT(nUnknown2 == 0x3, "Unexpected value for spacing2"); +#endif + ++pParams; USHORT nValue = SVBT16ToShort( pParams ); for (int i=0; i < 4; i++) -- cgit v1.2.3 From 86b023c0a05da418d3da100d4a79860759c47864 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Mon, 12 Jul 2010 11:17:00 +0200 Subject: mib17: #i112634# API changes --- sw/inc/doc.hxx | 6 +++--- sw/source/core/doc/doc.cxx | 4 ++-- sw/source/ui/app/docsh2.cxx | 14 +++++++------- sw/source/ui/vba/vbaeventshelper.cxx | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 8b6a6dc323..14e25abd0a 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -80,7 +80,7 @@ class SwList; #include #include #ifdef FUTURE_VBA -#include +#include #endif #include @@ -409,7 +409,7 @@ class SW_DLLPUBLIC SwDoc : // table of forbidden characters of this document vos::ORef xForbiddenCharsTable; #ifdef FUTURE_VBA - com::sun::star::uno::Reference< com::sun::star::script::vba::XEventProcessor > mxVbaEvents; + com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > mxVbaEvents; #endif // --> OD 2007-10-26 #i83479# public: @@ -2134,7 +2134,7 @@ public: return n32DummyCompatabilityOptions2; } #ifdef FUTURE_VBA - com::sun::star::uno::Reference< com::sun::star::script::vba::XEventProcessor > GetVbaEventProcessor(); + com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > GetVbaEventProcessor(); #endif ::sfx2::IXmlIdRegistry& GetXmlIdRegistry(); ::sw::MetaFieldManager & GetMetaFieldManager(); diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 0bf92027ff..a414c8fb9b 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -2725,7 +2725,7 @@ void SwDoc::ChkCondColls() } #ifdef FUTURE_VBA -uno::Reference< script::vba::XEventProcessor > +uno::Reference< script::vba::XVBAEventProcessor > SwDoc::GetVbaEventProcessor() { if( !mxVbaEvents.is() && pDocShell && ooo::vba::isAlienWordDoc( *pDocShell ) ) @@ -2735,7 +2735,7 @@ SwDoc::GetVbaEventProcessor() uno::Reference< frame::XModel > xModel( pDocShell->GetModel(), uno::UNO_SET_THROW ); uno::Sequence< uno::Any > aArgs(1); aArgs[0] <<= xModel; - mxVbaEvents.set( ooo::vba::createVBAUnoAPIServiceWithArgs( pDocShell, "com.sun.star.script.vba.TextEventProcessor" , aArgs ), uno::UNO_QUERY_THROW ); + mxVbaEvents.set( ooo::vba::createVBAUnoAPIServiceWithArgs( pDocShell, "com.sun.star.script.vba.VBATextEventProcessor" , aArgs ), uno::UNO_QUERY_THROW ); } catch( uno::Exception& ) { diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index f969f588fc..b0ae69370f 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -120,8 +120,8 @@ #include #include "com/sun/star/ui/dialogs/TemplateDescription.hpp" #ifdef FUTURE_VBA -#include -#include +#include +#include #endif #include #include @@ -191,9 +191,9 @@ void SwDocShell::DoFlushDocInfo() } #ifdef FUTURE_VBA -void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XEventProcessor >& xVbaEvents, const SfxHint& rHint ) +void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVBAEventProcessor >& xVbaEvents, const SfxHint& rHint ) { - using namespace com::sun::star::script::vba::EventIdentifier; + using namespace com::sun::star::script::vba::VBAEventId; if ( rHint.ISA( SfxEventHint ) ) { uno::Sequence< uno::Any > aArgs; @@ -225,7 +225,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) } #ifdef FUTURE_VBA - uno::Reference< script::vba::XEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor(); + uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor(); if( xVbaEvents.is() ) lcl_processCompatibleSfxHint( xVbaEvents, rHint ); #endif @@ -314,10 +314,10 @@ USHORT SwDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) #ifdef FUTURE_VBA if( pDoc && IsInPrepareClose() ) { - uno::Reference< script::vba::XEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor(); + uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor(); if( xVbaEvents.is() ) { - using namespace com::sun::star::script::vba::EventIdentifier; + using namespace com::sun::star::script::vba::VBAEventId; uno::Sequence< uno::Any > aArgs; xVbaEvents->processVbaEvent( DOCUMENT_CLOSE, aArgs ); } diff --git a/sw/source/ui/vba/vbaeventshelper.cxx b/sw/source/ui/vba/vbaeventshelper.cxx index 66d7231598..abe4abb6e7 100755 --- a/sw/source/ui/vba/vbaeventshelper.cxx +++ b/sw/source/ui/vba/vbaeventshelper.cxx @@ -26,11 +26,11 @@ ************************************************************************/ #include "vbaeventshelper.hxx" -#include +#include #include using namespace ::com::sun::star; -using namespace ::com::sun::star::script::vba::EventIdentifier; +using namespace ::com::sun::star::script::vba::VBAEventId; using namespace ::ooo::vba; // ============================================================================ @@ -102,7 +102,7 @@ sdecl::class_ > serviceImpl; extern sdecl::ServiceDecl const serviceDecl( serviceImpl, "SwVbaEventsHelper", - "com.sun.star.document.vba.TextEventProcessor" ); + "com.sun.star.document.vba.VBATextEventProcessor" ); } // ============================================================================ -- cgit v1.2.3 From 2af417e7d85229ec93a2cbbe1a498ba0ea99a2de Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Tue, 13 Jul 2010 18:26:57 +0200 Subject: dr77: #i113097# make Sequence(sal_Int32) explicit --- sw/source/ui/uiview/view.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 10b3c58bd8..28ec272576 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -184,7 +184,7 @@ void SwView::ImpSetVerb( int nSelType ) } if ( bResetVerbs ) { - SetVerbs( 0 ); + SetVerbs( Sequence< embed::VerbDescriptor >() ); bVerbsActive = sal_False; } } -- cgit v1.2.3 From 519496de46bb3332eb78dc0d14a4d058afbde52b Mon Sep 17 00:00:00 2001 From: sj Date: Wed, 14 Jul 2010 16:42:33 +0200 Subject: fixed build problem (missing header file) --- sw/source/core/doc/acmplwrd.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'sw/source') diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx index 4941bb2ca8..5309a8152a 100644 --- a/sw/source/core/doc/acmplwrd.cxx +++ b/sw/source/core/doc/acmplwrd.cxx @@ -29,6 +29,7 @@ #include "precompiled_sw.hxx" +#include #include #include #include -- cgit v1.2.3 From 796731988f39d766d10fb318a27aa75d94d9db05 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Fri, 16 Jul 2010 12:50:37 +0100 Subject: cmcfixes77: #i113190# bracket expression up to silence gcc warnings --- sw/source/ui/utlui/numfmtlb.cxx | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx index 4bf6997cab..e34cc67586 100644 --- a/sw/source/ui/utlui/numfmtlb.cxx +++ b/sw/source/ui/utlui/numfmtlb.cxx @@ -368,13 +368,22 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt) ULONG nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM ); ULONG nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM ); - if(nDefFmt == nSysNumFmt|| - nDefFmt == nSysShortDateFmt|| - nDefFmt == nSysLongDateFmt|| - bSysLang && (nDefFmt == nNumFormatForLanguage || - nDefFmt == nShortDateFormatForLanguage || - nDefFmt == nLongDateFormatForLanguage )) + if ( + nDefFmt == nSysNumFmt || + nDefFmt == nSysShortDateFmt || + nDefFmt == nSysLongDateFmt || + ( + bSysLang && + ( + nDefFmt == nNumFormatForLanguage || + nDefFmt == nShortDateFormatForLanguage || + nDefFmt == nLongDateFormatForLanguage + ) + ) + ) + { sValue += String(SW_RES(RID_STR_SYSTEM)); + } nPos = InsertEntry(sValue, nPos); // Als ersten numerischen Eintrag einfuegen SetEntryData(nPos, (void*)nDefFmt); -- cgit v1.2.3 From d78c1e494eafe07c35e3dbbd800eef1d56f75592 Mon Sep 17 00:00:00 2001 From: os Date: Mon, 19 Jul 2010 17:40:41 +0200 Subject: #i113084# check auto correction pointer before access --- sw/source/ui/docvw/edtwin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 9945b90086..9ab1e772a2 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -2261,7 +2261,7 @@ KEYINPUT_CHECKTABLE_INSDEL: BOOL bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh ); - BOOL bRunNext = pACorr->HasRunNext(); + BOOL bRunNext = pACorr && pACorr->HasRunNext(); if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) && pACfg->IsAutoFmtByInput() && (( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) && -- cgit v1.2.3 From ae77dbfbc243fec1b0a136eff36867dcac64c578 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 20 Jul 2010 17:05:20 +0200 Subject: sw34bf01: #i113181#: docfld.cxx: apply patch by cmc --- sw/source/core/doc/docfld.cxx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 9d907b9896..bb40bcc70c 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -2464,24 +2464,26 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode ) { SwDBData aDBData(((SwDBNumSetField*)pFld)->GetDBData(&rDoc)); - if( bIsDBMgr && - rDoc.GetNewDBMgr()->OpenDataSource( aDBData.sDataSource, aDBData.sCommand )&& - GETFLD_ALL == eGetMode || - ( GETFLD_CALC & eGetMode && - ((SwDBNumSetField*)pFld)->IsCondValid())) + if ( + (bIsDBMgr && rDoc.GetNewDBMgr()->OpenDataSource(aDBData.sDataSource, aDBData.sCommand)) && + (GETFLD_ALL == eGetMode || (GETFLD_CALC & eGetMode && ((SwDBNumSetField*)pFld)->IsCondValid())) + ) + { pFormel = &pFld->GetPar1(); + } } break; case RES_DBNEXTSETFLD: { SwDBData aDBData(((SwDBNextSetField*)pFld)->GetDBData(&rDoc)); - if( bIsDBMgr && - rDoc.GetNewDBMgr()->OpenDataSource( aDBData.sDataSource, aDBData.sCommand )&& - GETFLD_ALL == eGetMode || - ( GETFLD_CALC & eGetMode && - ((SwDBNextSetField*)pFld)->IsCondValid() )) + if ( + (bIsDBMgr && rDoc.GetNewDBMgr()->OpenDataSource(aDBData.sDataSource, aDBData.sCommand)) && + (GETFLD_ALL == eGetMode || (GETFLD_CALC & eGetMode && ((SwDBNextSetField*)pFld)->IsCondValid())) + ) + { pFormel = &pFld->GetPar1(); + } } break; } -- cgit v1.2.3 From eefcd1616d45f3579280971ed44e78890ba757e3 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 20 Jul 2010 17:06:51 +0200 Subject: sw34bf01: #i113185#: SwDoc::SetEndNoteInfo(): fix conditional (patch by cmc) --- sw/source/core/doc/docftn.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx index 9af54315b2..65b55f1ab0 100644 --- a/sw/source/core/doc/docftn.cxx +++ b/sw/source/core/doc/docftn.cxx @@ -333,10 +333,15 @@ void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo) } BOOL bNumChg = rInfo.nFtnOffset != GetEndNoteInfo().nFtnOffset; - BOOL bExtra = !bNumChg && - rInfo.aFmt.GetNumberingType() != GetEndNoteInfo().aFmt.GetNumberingType()|| - rInfo.GetPrefix() != GetEndNoteInfo().GetPrefix() || - rInfo.GetSuffix() != GetEndNoteInfo().GetSuffix(); + // this seems to be an optimization: UpdateAllFtn() is only called + // if the offset changes; if the offset is the same, + // but type/prefix/suffix changes, just set new numbers. + bool const bExtra = !bNumChg && + ( (rInfo.aFmt.GetNumberingType() != + GetEndNoteInfo().aFmt.GetNumberingType()) + || (rInfo.GetPrefix() != GetEndNoteInfo().GetPrefix()) + || (rInfo.GetSuffix() != GetEndNoteInfo().GetSuffix()) + ); BOOL bFtnDesc = rInfo.GetPageDesc( *this ) != GetEndNoteInfo().GetPageDesc( *this ); SwCharFmt *pOldChrFmt = GetEndNoteInfo().GetCharFmt( *this ), -- cgit v1.2.3 From 37d816a15207490538e0f067f1c01b088ff29344 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 20 Jul 2010 18:25:00 +0200 Subject: sw34bf01: #i86880#: rtfatr.cxx: apply patch by pmladek --- sw/source/filter/rtf/rtfatr.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx index 4a3f53ad81..9504336434 100644 --- a/sw/source/filter/rtf/rtfatr.cxx +++ b/sw/source/filter/rtf/rtfatr.cxx @@ -1425,7 +1425,7 @@ void ExportPICT(const Size &rOrig, const Size &rRendered, const Size &rMapped, const SwCropGrf &rCr, const char *pBLIPType, const sal_uInt8 *pGraphicAry, unsigned long nSize, SwRTFWriter &rWrt) { - bool bIsWMF = (const char *)pBLIPType == (const char *)OOO_STRING_SVTOOLS_RTF_WMETAFILE ? true : false; + bool bIsWMF = (pBLIPType && !strcmp(pBLIPType, OOO_STRING_SVTOOLS_RTF_WMETAFILE)) ? true : false; if (pBLIPType && nSize && pGraphicAry) { rWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_PICT; @@ -1570,7 +1570,7 @@ static Writer& OutRTF_SwGrfNode(Writer& rWrt, SwCntntNode & rNode) the wmf format wrapped in nonshppict, so as to keep wordpad happy. If its a wmf already then we don't need any such wrapping */ - bool bIsWMF = (const sal_Char*)pBLIPType == (const sal_Char*)OOO_STRING_SVTOOLS_RTF_WMETAFILE ? true : false; + bool bIsWMF = (pBLIPType && !strcmp(pBLIPType, OOO_STRING_SVTOOLS_RTF_WMETAFILE)) ? true : false; if (!bIsWMF) OutComment(rRTFWrt, OOO_STRING_SVTOOLS_RTF_SHPPICT); -- cgit v1.2.3 From 593c9fdee14aaeba88e3652f494643be0f4f538c Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 21 Jul 2010 10:03:45 +0100 Subject: cmcfixes77: #i113310# silence gcc warning --- sw/source/ui/fldui/fldmgr.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx index 4e707ce6ce..1ff5f90ee7 100644 --- a/sw/source/ui/fldui/fldmgr.cxx +++ b/sw/source/ui/fldui/fldmgr.cxx @@ -559,10 +559,10 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill) (nTypeId == TYP_SEQFLD && nWhich == RES_SETEXPFLD && (((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) || - ((nTypeId == TYP_INPUTFLD || nTypeId == TYP_FORMELFLD) && + ((nTypeId == TYP_INPUTFLD || nTypeId == TYP_FORMELFLD) && (nWhich == RES_USERFLD || - nWhich == RES_SETEXPFLD && - !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) ) ) + (nWhich == RES_SETEXPFLD && + !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ))) ) ) { String* pNew = new String(pFldType->GetName()); rToFill.Insert(pNew, rToFill.Count()); -- cgit v1.2.3 From 94d9a8605bc467201f66d0741235783325939548 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 21 Jul 2010 10:21:18 +0100 Subject: cmcfixes77: #i113311# silence gcc warning --- sw/source/ui/table/tabledlg.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index e1fe1b19a2..53eb804c59 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1539,7 +1539,7 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) if ( bState != aPageCollCB.GetSavedValue() || ( bState && aPageCollLB.GetSelectEntryPos() != aPageCollLB.GetSavedValue() ) - || aPageNoNF.IsEnabled() && aPageNoNF.IsValueModified()) + || (aPageNoNF.IsEnabled() && aPageNoNF.IsValueModified()) ) { String sPage; -- cgit v1.2.3 From edf7f7a6afeb023d1cae93a0130908fd5ab4c9e5 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 21 Jul 2010 10:40:47 +0100 Subject: cmcfixes77: #i113316# silence gcc warning --- sw/source/core/text/frmform.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index c67420303f..01b4d52aec 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -81,8 +81,8 @@ void ValidateTxt( SwFrm *pFrm ) // Freund vom Frame { if ( ( ! pFrm->IsVertical() && pFrm->Frm().Width() == pFrm->GetUpper()->Prt().Width() ) || - pFrm->IsVertical() && - pFrm->Frm().Height() == pFrm->GetUpper()->Prt().Height() ) + ( pFrm->IsVertical() && + pFrm->Frm().Height() == pFrm->GetUpper()->Prt().Height() ) ) pFrm->bValidSize = sal_True; /* pFrm->bValidPrtArea = sal_True; -- cgit v1.2.3 From ba671be108ed05cacfbf900488423eef0ee2d8ce Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 21 Jul 2010 10:50:42 +0100 Subject: cmcfixes77: #i113317# silence gcc warning --- sw/source/core/text/itratr.cxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index f95a173669..5afacc5130 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -916,12 +916,20 @@ USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd ) while( nStop < nEnd && nStop < nNextChg ) { cChar = m_Text.GetChar( nStop ); - if( CH_TAB == cChar || CH_BREAK == cChar || - CHAR_HARDBLANK == cChar || CHAR_HARDHYPHEN == cChar || + if ( + CH_TAB == cChar || + CH_BREAK == cChar || + CHAR_HARDBLANK == cChar || + CHAR_HARDHYPHEN == cChar || CHAR_SOFTHYPHEN == cChar || - ( CH_TXTATR_BREAKWORD == cChar || CH_TXTATR_INWORD == cChar ) && - ( 0 == ( pHint = aIter.GetAttr( nStop ) ) ) ) + ( + (CH_TXTATR_BREAKWORD == cChar || CH_TXTATR_INWORD == cChar) && + (0 == (pHint = aIter.GetAttr(nStop))) + ) + ) + { break; + } else ++nStop; } -- cgit v1.2.3 From 57bf1eab26dfd4bf825f8daf260f5f9ff68071d6 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 21 Jul 2010 10:56:36 +0100 Subject: cmcfixes77: #i113318# silence gcc warning --- sw/source/core/text/itrform2.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index eb39c9edf2..d95289ba26 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -1587,8 +1587,8 @@ xub_StrLen SwTxtFormatter::FormatLine( const xub_StrLen nStartPos ) } else { - bBuild = ( GetInfo().GetTxtFly()->IsOn() && ChkFlyUnderflow( GetInfo() ) - || GetInfo().CheckFtnPortion( pCurr ) ); + bBuild = ( GetInfo().GetTxtFly()->IsOn() && ChkFlyUnderflow(GetInfo()) ) + || GetInfo().CheckFtnPortion(pCurr); if( bBuild ) { GetInfo().SetNumDone( bOldNumDone ); -- cgit v1.2.3 From 798f533c918d4c9c098f4fb6766dd0c45368dc97 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 21 Jul 2010 11:14:21 +0100 Subject: cmcfixes77: #i113319# silence gcc warning --- sw/source/core/text/itrpaint.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx index bdc4411c84..e170979e6a 100644 --- a/sw/source/core/text/itrpaint.cxx +++ b/sw/source/core/text/itrpaint.cxx @@ -495,7 +495,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, if( ( nDiff > 0 && ( GetEnd() < GetInfo().GetTxt().Len() || ( nDiff > nTmpHeight/2 && GetPrevLine() ) ) ) || - nDiff >= 0 && bNextUndersized ) + (nDiff >= 0 && bNextUndersized) ) { SwArrowPortion aArrow( GetInfo() ); -- cgit v1.2.3 From fd6e26cdd008d22c11ba88a2442e680c19587472 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 21 Jul 2010 11:25:47 +0100 Subject: cmcfixes77: #i113321# silence gcc warning --- sw/source/core/text/txtfly.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index f36ee06552..a35a19a1f6 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -2027,10 +2027,10 @@ sal_Bool SwTxtFly::ForEach( const SwRect &rRect, SwRect* pRect, sal_Bool bAvoid // <-- if( aFly.IsEmpty() || !aFly.IsOver( rRect ) ) continue; - if( !bRet || + if( !bRet || ( ( !pCurrFrm->IsRightToLeft() && ( (aFly.*fnRect->fnGetLeft)() < - (pRect->*fnRect->fnGetLeft)() ) || + (pRect->*fnRect->fnGetLeft)() ) ) || ( pCurrFrm->IsRightToLeft() && ( (aFly.*fnRect->fnGetRight)() > (pRect->*fnRect->fnGetRight)() ) ) ) ) -- cgit v1.2.3 From 4193a631261b48c52864d2fdaaa973889fbed705 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 21 Jul 2010 11:33:35 +0100 Subject: cmcfixes77: #i113322# silence gcc warning --- sw/source/ui/docvw/romenu.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx index b412c7a88a..7ebe4f14ec 100644 --- a/sw/source/ui/docvw/romenu.cxx +++ b/sw/source/ui/docvw/romenu.cxx @@ -238,9 +238,13 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : EnableItem( MN_READONLY_COPY, FALSE ); eState = pVFrame->GetBindings().QueryState( SID_EDITDOC, pState ); - if(eState < SFX_ITEM_DEFAULT || - rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI()) + if ( + eState < SFX_ITEM_DEFAULT || + (rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI()) + ) + { EnableItem( MN_READONLY_EDITDOC, FALSE ); + } if ( !sURL.Len() ) { -- cgit v1.2.3 From f1941214add0abed84ad3a9d493825eb8ffa0f9f Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 21 Jul 2010 11:45:15 +0100 Subject: cmcfixes77: #i113324# silence gcc warning --- sw/source/ui/utlui/glbltree.cxx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx index 31789382ec..d4e5463790 100644 --- a/sw/source/ui/utlui/glbltree.cxx +++ b/sw/source/ui/utlui/glbltree.cxx @@ -1241,11 +1241,20 @@ BOOL SwGlobalTree::Update(BOOL bHard) GlobalDocContentType eType = pLeft->GetType(); SvLBoxEntry* pEntry = GetEntry(i); String sTemp = GetEntryText(pEntry); - if(eType != pRight->GetType() || - eType == GLBLDOC_SECTION && - (pLeft->GetSection()->GetSectionName() != sTemp) || - eType == GLBLDOC_TOXBASE && pLeft->GetTOX()->GetTitle() != sTemp) - bCopy = bRet = TRUE; + if ( + eType != pRight->GetType() || + ( + eType == GLBLDOC_SECTION && + pLeft->GetSection()->GetSectionName() != sTemp + ) || + ( + eType == GLBLDOC_TOXBASE && + pLeft->GetTOX()->GetTitle() != sTemp + ) + ) + { + bCopy = bRet = TRUE; + } } } if(bCopy || bHard) -- cgit v1.2.3 From 99dbcb71675f9fd175ef2567484b35e3ec0eab20 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 21 Jul 2010 12:04:35 +0100 Subject: cmcfixes77: #i113327# silence gcc warning --- sw/source/core/layout/findfrm.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index 1f7856c192..1acf6da0c2 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -650,9 +650,11 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b { const SwRect& rBoundRect = bExtend ? maPageRects[ nPageIdx++ ] : pPage->Frm(); - if ( !pSize && rBoundRect.IsInside( rPt ) || - pSize && rBoundRect.IsOver( aRect ) ) + if ( (!pSize && rBoundRect.IsInside(rPt)) || + (pSize && rBoundRect.IsOver(aRect)) ) + { pRet = static_cast(pPage); + } pPage = pPage->GetNext(); } @@ -1719,8 +1721,8 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren else { if ( pMasterTable == pTableFrm || - ( bStart && pMasterTable->IsAnFollow( pTableFrm ) || - !bStart && pTableFrm->IsAnFollow( pMasterTable ) ) ) + ( (bStart && pMasterTable->IsAnFollow(pTableFrm)) || + (!bStart && pTableFrm->IsAnFollow(pMasterTable)) ) ) { pRet = pMasterCell; break; -- cgit v1.2.3 From 032de36ecb355c23bcf299ea07054394db21e43d Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 21 Jul 2010 12:37:00 +0100 Subject: cmcfixes77: #i113331# silence gcc warning, refactor slightly to allow better optization --- sw/source/core/layout/layact.cxx | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index ffc647a0bf..2d1291a7b2 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1073,23 +1073,33 @@ BOOL SwLayAction::TurboAction() |* Letzte Aenderung MA 18. Jul. 96 |* |*************************************************************************/ -const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom ) +static bool lcl_IsInvaLay( const SwFrm *pFrm, long nBottom ) +{ + if ( + !pFrm->IsValid() || + (pFrm->IsCompletePaint() && pFrm->Frm().Top() < nBottom) + ) + { + return true; + } + return false; +} + +static const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom ) { ASSERT( pFrm->IsLayoutFrm(), "FindFirstInvaLay, no LayFrm" ); - if ( !pFrm->IsValid() || pFrm->IsCompletePaint() && - pFrm->Frm().Top() < nBottom ) + if (lcl_IsInvaLay(pFrm, nBottom)) return pFrm; pFrm = ((SwLayoutFrm*)pFrm)->Lower(); while ( pFrm ) { if ( pFrm->IsLayoutFrm() ) { - if ( !pFrm->IsValid() || pFrm->IsCompletePaint() && - pFrm->Frm().Top() < nBottom ) + if (lcl_IsInvaLay(pFrm, nBottom)) return pFrm; const SwFrm *pTmp; - if ( 0 != (pTmp = ::lcl_FindFirstInvaLay( pFrm, nBottom )) ) + if ( 0 != (pTmp = lcl_FindFirstInvaLay( pFrm, nBottom )) ) return pTmp; } pFrm = pFrm->GetNext(); @@ -1097,7 +1107,7 @@ const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom ) return 0; } -const SwFrm *lcl_FindFirstInvaCntnt( const SwLayoutFrm *pLay, long nBottom, +static const SwFrm *lcl_FindFirstInvaCntnt( const SwLayoutFrm *pLay, long nBottom, const SwCntntFrm *pFirst ) { const SwCntntFrm *pCnt = pFirst ? pFirst->GetNextCntntFrm() : @@ -1144,7 +1154,7 @@ const SwFrm *lcl_FindFirstInvaCntnt( const SwLayoutFrm *pLay, long nBottom, } // --> OD 2005-02-21 #i37877# - consider drawing objects -const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage, +static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage, long _nBottom ) { ASSERT( _pPage->GetSortedObjs(), "FindFirstInvaObj, no Objs" ) -- cgit v1.2.3 From c42fc48377d455b5f362303106ff59a371a6c479 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 21 Jul 2010 13:12:42 +0100 Subject: cmcfixes77: #i113332# silence gcc warning --- sw/source/core/layout/pagechg.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 8ca7c2db14..8ced3ab17a 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -2358,9 +2358,9 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi static const long nOuterClickDiff = 1000000; // adjust borders for these special cases: - if ( bFirstColumn && !bRTL || bLastColumn && bRTL ) + if ( (bFirstColumn && !bRTL) || (bLastColumn && bRTL) ) aPageRectWithBorders.SubLeft( nOuterClickDiff ); - if ( bLastColumn && !bRTL || bFirstColumn && bRTL ) + if ( (bLastColumn && !bRTL) || (bFirstColumn && bRTL) ) aPageRectWithBorders.AddRight( nOuterClickDiff ); if ( bFirstRow ) aPageRectWithBorders.SubTop( nOuterClickDiff ); -- cgit v1.2.3 From de4af9b8736047492206c49443556e3c0a29863e Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Wed, 28 Jul 2010 14:17:26 +0200 Subject: writerfilter08ooo330: applied patch for writerfilter08 --- sw/source/filter/ww8/ww8par.cxx | 2 +- sw/source/filter/ww8/ww8par.hxx | 1 + sw/source/filter/ww8/ww8par6.cxx | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index cc6b44d656..04341abb38 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1857,7 +1857,7 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect, bool wwSectionManager::SectionIsProtected(const wwSection &rSection) const { - return (!rSection.IsNotProtected()); + return (mrReader.pWwFib->fReadOnlyRecommended && !rSection.IsNotProtected()); } void wwSectionManager::SetHdFt(wwSection &rSection, int nSect, diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 8af5c6225d..a2b92ee4f2 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1164,6 +1164,7 @@ private: bool GetFontParams(USHORT, FontFamily&, String&, FontPitch&, rtl_TextEncoding&); bool SetNewFontAttr(USHORT nFCode, bool bSetEnums, USHORT nWhich); + USHORT CorrectResIdForCharset(CharSet nCharSet, USHORT nWhich); void ResetCharSetVars(); void ResetCJKCharSetVars(); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 037dbe19bc..2b67edcf92 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -3551,6 +3551,23 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily, return true; } +USHORT SwWW8ImplReader::CorrectResIdForCharset(CharSet nCharSet, USHORT nWhich) +{ + USHORT nResult = 0; + + switch (nCharSet) { + case RTL_TEXTENCODING_MS_932: + nResult = RES_CHRATR_CJK_FONT; + break; + + default: + nResult = nWhich; + break; + } + + return nResult; +} + bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums, USHORT nWhich) { @@ -3599,6 +3616,8 @@ bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums, CharSet eDstCharSet = eSrcCharSet; SvxFontItem aFont( eFamily, aName, aEmptyStr, ePitch, eDstCharSet, nWhich); + + nWhich = CorrectResIdForCharset(eSrcCharSet, nWhich); if( bSetEnums ) { -- cgit v1.2.3 From f0d7a6f73de6cda88292981321ba74cc2c11fd21 Mon Sep 17 00:00:00 2001 From: os Date: Thu, 29 Jul 2010 08:48:43 +0200 Subject: #i100037# command names added, duplicate DeleteNote/DeleteComment removed --- sw/inc/cmdid.h | 2 +- sw/sdi/_annotsh.sdi | 6 ------ sw/sdi/_textsh.sdi | 2 +- sw/sdi/swriter.sdi | 25 ------------------------- sw/source/ui/app/mn.src | 6 +++--- sw/source/ui/docvw/AnnotationMenuButton.cxx | 11 ++--------- sw/source/ui/docvw/SidebarWin.cxx | 1 - sw/source/ui/shells/annotsh.cxx | 14 ++------------ sw/source/ui/shells/textfld.cxx | 6 +++--- 9 files changed, 12 insertions(+), 61 deletions(-) mode change 100755 => 100644 sw/source/ui/docvw/SidebarWin.cxx (limited to 'sw/source') diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 894d622cad..74bdbd2b4b 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -1058,7 +1058,7 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr #define FN_ENVELOP (FN_ENVELP ) -#define FN_DELETE_NOTE (FN_NOTES+0) + #define FN_DELETE_NOTE_AUTHOR (FN_NOTES+1) #define FN_DELETE_ALL_NOTES (FN_NOTES+2) #define FN_HIDE_NOTE (FN_NOTES+3) diff --git a/sw/sdi/_annotsh.sdi b/sw/sdi/_annotsh.sdi index 8b4fc8a502..94fed56d99 100755 --- a/sw/sdi/_annotsh.sdi +++ b/sw/sdi/_annotsh.sdi @@ -34,12 +34,6 @@ interface _Annotation StateMethod = GetNoteState ; ] - FN_DELETE_NOTE - [ - ExecMethod = NoteExec ; - StateMethod = GetNoteState ; - ] - FN_DELETE_NOTE_AUTHOR [ ExecMethod = NoteExec ; diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi index a895cc5307..6fce980695 100644 --- a/sw/sdi/_textsh.sdi +++ b/sw/sdi/_textsh.sdi @@ -920,7 +920,7 @@ interface BaseText ExecMethod = ExecField ; StateMethod = StateField; ] - FN_DELETE_NOTE + FN_DELETE_COMMENT [ ExecMethod = ExecField ; StateMethod = StateField; diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index aae7ec7a01..d601ab0036 100755 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -9916,31 +9916,6 @@ SfxBoolItem SelectionModeDefault FN_SELECTION_MODE_DEFAULT GroupId = GID_EDIT; ] -//-------------------------------------------------------------------------- -SfxVoidItem DeleteNote FN_DELETE_NOTE -() -[ - /* flags: */ - AutoUpdate = FALSE, - Cachable = Cachable, - FastCall = FALSE, - HasCoreId = FALSE, - HasDialog = FALSE, - ReadOnlyDoc = FALSE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - Synchron; - - /* config: */ - AccelConfig = TRUE, - MenuConfig = TRUE, - StatusBarConfig = FALSE, - ToolBoxConfig = TRUE, - GroupId = GID_EDIT; -] - SfxVoidItem ReplyNote FN_REPLY () [ diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src index aeb8fca52d..ed9ae4d290 100644 --- a/sw/source/ui/app/mn.src +++ b/sw/source/ui/app/mn.src @@ -430,14 +430,14 @@ MenuItem\ {\ Identifier = FN_REPLY ;\ - HelpID = FN_DELETE_NOTE ;\ + HelpID = FN_REPLY ;\ Text [ en-US ] = "Reply" ;\ };\ SEPARATOR ; \ MenuItem\ {\ - Identifier = FN_DELETE_NOTE ;\ - HelpID = FN_DELETE_NOTE ;\ + Identifier = FN_DELETE_COMMENT ;\ + HelpID = FN_DELETE_COMMENT ;\ Text [ en-US ] = "Delete ~Comment" ;\ };\ MenuItem\ diff --git a/sw/source/ui/docvw/AnnotationMenuButton.cxx b/sw/source/ui/docvw/AnnotationMenuButton.cxx index 6022a4646a..c49c689851 100644 --- a/sw/source/ui/docvw/AnnotationMenuButton.cxx +++ b/sw/source/ui/docvw/AnnotationMenuButton.cxx @@ -85,20 +85,13 @@ void AnnotationMenuButton::MouseButtonDown( const MouseEvent& rMEvt ) if ( mrSidebarWin.IsReadOnly() ) { pButtonPopup->EnableItem( FN_REPLY, false ); - pButtonPopup->EnableItem( FN_DELETE_NOTE, false ); + pButtonPopup->EnableItem( FN_DELETE_COMMENT, false ); pButtonPopup->EnableItem( FN_DELETE_NOTE_AUTHOR, false ); pButtonPopup->EnableItem( FN_DELETE_ALL_NOTES, false ); } else { - if ( mrSidebarWin.IsProtected() ) - { - pButtonPopup->EnableItem( FN_DELETE_NOTE, false ); - } - else - { - pButtonPopup->EnableItem( FN_DELETE_NOTE, true ); - } + pButtonPopup->EnableItem( FN_DELETE_COMMENT, !mrSidebarWin.IsProtected() ); pButtonPopup->EnableItem( FN_DELETE_NOTE_AUTHOR, true ); pButtonPopup->EnableItem( FN_DELETE_ALL_NOTES, true ); } diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx old mode 100755 new mode 100644 index 8caf11c84d..b28cf1a7df --- a/sw/source/ui/docvw/SidebarWin.cxx +++ b/sw/source/ui/docvw/SidebarWin.cxx @@ -934,7 +934,6 @@ void SwSidebarWin::ExecuteCommand(USHORT nSlot) break; } case FN_DELETE_COMMENT: - case FN_DELETE_NOTE: //Delete(); // do not kill the parent of our open popup menu mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), 0 ); diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 3486fd06a8..bd465c6dd1 100755 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -1010,7 +1010,6 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq) case FN_REPLY: case FN_POSTIT: case FN_DELETE_COMMENT: - case FN_DELETE_NOTE: if ( pPostItMgr->HasActiveSidebarWin() ) pPostItMgr->GetActiveSidebarWin()->ExecuteCommand(nSlot); break; @@ -1058,24 +1057,15 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet) switch( nSlotId ) { case FN_POSTIT: - case FN_DELETE_NOTE: case FN_DELETE_NOTE_AUTHOR: case FN_DELETE_ALL_NOTES: case FN_HIDE_NOTE: case FN_HIDE_NOTE_AUTHOR: case FN_HIDE_ALL_NOTES: - { - if ( !pPostItMgr || - !pPostItMgr->HasActiveAnnotationWin() ) - { - rSet.DisableItem(nWhich); - } - break; - } case FN_DELETE_COMMENT: { if ( !pPostItMgr || - !pPostItMgr->HasActiveSidebarWin() /*HasActiveRedCommentWin()*/ ) + !pPostItMgr->HasActiveAnnotationWin() ) { rSet.DisableItem(nWhich); } @@ -1108,7 +1098,7 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet) if (pPostItMgr->HasActiveSidebarWin()) { if ( (pPostItMgr->GetActiveSidebarWin()->IsProtected()) && - ( (nSlotId==FN_DELETE_NOTE) || (nSlotId==FN_REPLY) ) ) + ( (nSlotId==FN_DELETE_COMMENT) || (nSlotId==FN_REPLY) ) ) rSet.DisableItem( nWhich ); } nWhich = aIter.NextWhich(); diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx index 7bef6d5265..1c1efba2cd 100644 --- a/sw/source/ui/shells/textfld.cxx +++ b/sw/source/ui/shells/textfld.cxx @@ -313,7 +313,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) rReq.Ignore(); } break; - case FN_DELETE_NOTE: + case FN_DELETE_COMMENT: if ( GetView().GetPostItMgr() && GetView().GetPostItMgr()->HasActiveSidebarWin() ) { @@ -622,7 +622,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) { switch (nWhich) { - case FN_DELETE_NOTE: + case FN_DELETE_COMMENT: case FN_DELETE_NOTE_AUTHOR: case FN_DELETE_ALL_NOTES: case FN_HIDE_NOTE: @@ -634,7 +634,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) rSet.InvalidateItem( nWhich ); else if ( !pPostItMgr->HasActiveSidebarWin() ) { - rSet.InvalidateItem( FN_DELETE_NOTE ); + rSet.InvalidateItem( FN_DELETE_COMMENT ); rSet.InvalidateItem( FN_HIDE_NOTE ); } } -- cgit v1.2.3 From c15442f67228cf78b00f8070c575a38afd88a4d2 Mon Sep 17 00:00:00 2001 From: os Date: Thu, 29 Jul 2010 09:57:21 +0200 Subject: #i112518# prevent modification of document in getRenderCount() while printing --- sw/source/ui/uno/unotxdoc.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) mode change 100644 => 100755 sw/source/ui/uno/unotxdoc.cxx (limited to 'sw/source') diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx old mode 100644 new mode 100755 index e3f1322bed..f2671d2acb --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -82,7 +82,7 @@ #include #include #include - +#include #include #include #include @@ -2733,9 +2733,20 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( // should be set for printing as well ... pWrtShell->SetPDFExportOption( sal_True ); + bool bOrigStatus = pRenderDocShell->IsEnableSetModified(); + // check configuration: shall update of printing information in DocInfo set the document to "modified"? + bool bStateChanged = false; + if ( bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() ) + { + pRenderDocShell->EnableSetModified( sal_False ); + bStateChanged = true; + } + // --> FME 2005-05-23 #122919# Force field update before PDF export: pWrtShell->ViewShell::UpdateFlds(TRUE); // <-- + if( bStateChanged ) + pRenderDocShell->EnableSetModified( sal_True ); // there is some redundancy between those two function calls, but right now // there is no time to sort this out. -- cgit v1.2.3 From 11f91bff9cc6ad533e70a9738dabec17552bc055 Mon Sep 17 00:00:00 2001 From: os Date: Thu, 29 Jul 2010 10:36:49 +0200 Subject: #i111993# Add Styles button position issue fixed --- sw/source/ui/inc/swuicnttab.hxx | 2 ++ sw/source/ui/index/cnttab.cxx | 24 ++++++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx index 5bb247187d..6038f4a2de 100644 --- a/sw/source/ui/inc/swuicnttab.hxx +++ b/sw/source/ui/inc/swuicnttab.hxx @@ -163,6 +163,8 @@ class SwTOXSelectTabPage : public SfxTabPage // PushButton aChapterDlgPB; //#outline level,removed by zhaojianwei CheckBox aAddStylesCB; PushButton aAddStylesPB; + Point aAddStylesPosDef; + Point aAddStylesPosUser; //user CheckBox aFromTablesCB; CheckBox aFromFramesCB; diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 5d9a390600..e348083ffa 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1523,7 +1523,19 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox) //aAddStylesPB.SetPosPixel(aPos); //} //else if( nType & TO_ILLUSTRATION )//<-removed end. - if( nType & TO_ILLUSTRATION ) //add by zhaojianwei + // initialize button positions + + //#i111993# add styles button has two different positions + if( !aAddStylesPosDef.X() ) + { + aAddStylesPosDef = ( aAddStylesPB.GetPosPixel() ); + // move left! + Point aPos(aAddStylesPosDef); + aPos.X() -= 2 * aAddStylesPB.GetSizePixel().Width(); + aAddStylesPosUser = aPos; + } + + if( nType & TO_ILLUSTRATION ) //add by zhaojianwei aCaptionSequenceLB.SelectEntry( SwStyleNameMapper::GetUIName( RES_POOLCOLL_LABEL_ABB, aEmptyStr )); else if( nType & TO_TABLE ) @@ -1532,11 +1544,11 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox) else if( nType & TO_USER ) { aAddStylesCB.SetText(sAddStyleUser); - // move left! - Point aPos(aAddStylesPB.GetPosPixel()); - // aPos.X() = aChapterDlgPB.GetPosPixel().X(); - aPos.X() -= 2 * aAddStylesPB.GetSizePixel().Width(); - aAddStylesPB.SetPosPixel(aPos); + aAddStylesPB.SetPosPixel(aAddStylesPosUser); + } + else if( nType & TO_CONTENT ) + { + aAddStylesPB.SetPosPixel(aAddStylesPosDef); } aCollectSameCB.Show( 0 != (nType & TO_INDEX) ); -- cgit v1.2.3 From 4923abd3e46ce84ed620c75c0b716ec4f63c6c9c Mon Sep 17 00:00:00 2001 From: os Date: Thu, 29 Jul 2010 11:35:18 +0200 Subject: #i110813# prevent pasting RTF footnotes into footnotes --- sw/source/filter/rtf/swparrtf.cxx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index e437f2450e..2eff0e771a 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -1606,14 +1606,29 @@ void SwRTFParser::NextToken( int nToken ) switch( nToken ) { case RTF_FOOTNOTE: + { //We can only insert a footnote if we're not inside a footnote. e.g. //#i7713# - if (!mbIsFootnote) + + // in insert mode it's also possible to be inside of a footnote! + bool bInsertIntoFootnote = false; + if( !IsNewDoc() ) + { + SwStartNode* pSttNode = pPam->GetNode()->StartOfSectionNode(); + while(pSttNode && pSttNode->IsSectionNode()) + { + pSttNode = pSttNode->StartOfSectionNode(); + } + if( SwFootnoteStartNode == pSttNode->GetStartNodeType() ) + bInsertIntoFootnote = true; + } + if (!mbIsFootnote && !bInsertIntoFootnote) { ReadHeaderFooter( nToken ); SkipToken( -1 ); // Klammer wieder zurueck } - break; + } + break; case RTF_SWG_PRTDATA: ReadPrtData(); break; -- cgit v1.2.3 From 93956b714b85753d67053b32df142842c33ae4e6 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Thu, 29 Jul 2010 13:19:07 +0200 Subject: gnumake2: windows build fixes for resync --- sw/Library_vbaswobj.mk | 1 + sw/source/ui/wrtsh/wrtundo.cxx | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/Library_vbaswobj.mk b/sw/Library_vbaswobj.mk index 743f7a540f..4c3e0b37c7 100644 --- a/sw/Library_vbaswobj.mk +++ b/sw/Library_vbaswobj.mk @@ -51,6 +51,7 @@ $(eval $(call gb_Library_add_linked_libs,vbaswobj,\ editeng \ i18nisolang1 \ sal \ + sb \ sfx \ svl \ svt \ diff --git a/sw/source/ui/wrtsh/wrtundo.cxx b/sw/source/ui/wrtsh/wrtundo.cxx index 68d02be01d..c5c085b8ec 100644 --- a/sw/source/ui/wrtsh/wrtundo.cxx +++ b/sw/source/ui/wrtsh/wrtundo.cxx @@ -37,7 +37,6 @@ #include #include // fuer Undo-Ids #include -#include #include #include #include -- cgit v1.2.3 From 18465ae89521df1f2c44914f359e34d3f387759b Mon Sep 17 00:00:00 2001 From: os Date: Thu, 29 Jul 2010 14:58:17 +0200 Subject: #i105722# remove section links of label documents in mail merge --- sw/source/ui/dbui/dbmgr.cxx | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index d550c3b3af..568c3b3dbf 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -137,6 +137,7 @@ #include #include #include +#include using namespace ::osl; using namespace ::svx; @@ -845,6 +846,23 @@ void lcl_CopyFollowPageDesc( } } +void lcl_RemoveSectionLinks( SwWrtShell& rWorkShell ) +{ + //reset all links of the sections of synchronized labels + USHORT nSections = rWorkShell.GetSectionFmtCount(); + for( USHORT nSection = 0; nSection < nSections; ++nSection ) + { + SwSectionData aSectionData( *rWorkShell.GetSectionFmt( nSection ).GetSection() ); + if( aSectionData.GetType() == FILE_LINK_SECTION ) + { + aSectionData.SetType( CONTENT_SECTION ); + aSectionData.SetLinkFileName( String() ); + rWorkShell.UpdateSection( nSection, aSectionData ); + } + } + rWorkShell.SetLabelDoc( sal_False ); +} + BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, const SwMergeDescriptor& rMergeDescriptor) { @@ -1085,6 +1103,10 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, // copy created file into the target document rWorkShell.ConvertFieldsToText(); rWorkShell.SetNumberingRestart(); + if( bSynchronizedDoc ) + { + lcl_RemoveSectionLinks( rWorkShell ); + } // insert the document into the target document rWorkShell.SttEndDoc(FALSE); @@ -2934,7 +2956,10 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, rWorkShell.RemoveInvisibleContent(); rWorkShell.ConvertFieldsToText(); rWorkShell.SetNumberingRestart(); - + if( bSynchronizedDoc ) + { + lcl_RemoveSectionLinks( rWorkShell ); + } // insert the document into the target document rWorkShell.SttEndDoc(FALSE); -- cgit v1.2.3 From cb44039cd59dfdf5601b52124f893b726c745d5f Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 29 Jul 2010 22:01:25 +0200 Subject: vmiklos01: #i113532# add RtfExport based on MSWordExportBase --- sw/source/filter/rtf/swparrtf.cxx | 6 + sw/source/filter/rtf/swparrtf.hxx | 2 + sw/source/filter/rtf/wrtrtf.cxx | 5 - sw/source/filter/ww8/docxexport.cxx | 125 - sw/source/filter/ww8/docxexport.hxx | 22 - sw/source/filter/ww8/docxexportfilter.cxx | 49 +- sw/source/filter/ww8/makefile.mk | 14 +- sw/source/filter/ww8/rtfattributeoutput.cxx | 3323 +++++++++++++++++++++++++++ sw/source/filter/ww8/rtfattributeoutput.hxx | 572 +++++ sw/source/filter/ww8/rtfexport.cxx | 1235 ++++++++++ sw/source/filter/ww8/rtfexport.hxx | 210 ++ sw/source/filter/ww8/rtfexportfilter.cxx | 136 ++ sw/source/filter/ww8/rtfexportfilter.hxx | 85 + sw/source/filter/ww8/rtfimportfilter.cxx | 135 ++ sw/source/filter/ww8/rtfimportfilter.hxx | 75 + sw/source/filter/ww8/rtfsdrexport.cxx | 578 +++++ sw/source/filter/ww8/rtfsdrexport.hxx | 112 + sw/source/filter/ww8/wrtw8esh.cxx | 66 +- sw/source/filter/ww8/wrtw8nds.cxx | 121 +- sw/source/filter/ww8/wrtw8num.cxx | 3 + sw/source/filter/ww8/wrtw8sty.cxx | 36 + sw/source/filter/ww8/wrtww8.cxx | 2 +- sw/source/filter/ww8/wrtww8.hxx | 67 +- sw/source/filter/ww8/ww8atr.cxx | 2 +- 24 files changed, 6765 insertions(+), 216 deletions(-) create mode 100644 sw/source/filter/ww8/rtfattributeoutput.cxx create mode 100644 sw/source/filter/ww8/rtfattributeoutput.hxx create mode 100644 sw/source/filter/ww8/rtfexport.cxx create mode 100644 sw/source/filter/ww8/rtfexport.hxx create mode 100644 sw/source/filter/ww8/rtfexportfilter.cxx create mode 100644 sw/source/filter/ww8/rtfexportfilter.hxx create mode 100644 sw/source/filter/ww8/rtfimportfilter.cxx create mode 100644 sw/source/filter/ww8/rtfimportfilter.hxx create mode 100644 sw/source/filter/ww8/rtfsdrexport.cxx create mode 100644 sw/source/filter/ww8/rtfsdrexport.hxx (limited to 'sw/source') diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index e437f2450e..85a2aaaa8b 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -179,6 +179,12 @@ ULONG RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const S return nRet; } +ULONG RtfReader::Read(SvStream* pStream, SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam) +{ + pStrm = pStream; + return Read(rDoc, rBaseURL, rPam, rBaseURL); +} + SwRTFParser::SwRTFParser(SwDoc* pD, uno::Reference i_xDocProps, const SwPaM& rCrsr, SvStream& rIn, const String& rBaseURL, diff --git a/sw/source/filter/rtf/swparrtf.hxx b/sw/source/filter/rtf/swparrtf.hxx index a5a943fa46..8ff6878d3f 100644 --- a/sw/source/filter/rtf/swparrtf.hxx +++ b/sw/source/filter/rtf/swparrtf.hxx @@ -81,6 +81,8 @@ struct SvxRTFPictureType; class RtfReader: public Reader { virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &); +public: + virtual ULONG Read( SvStream* pStrm, SwDoc &, const String& rBaseURL, SwPaM &); }; class SwNodeIdx : public SvxNodeIdx diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx index 31c77c5f86..f3b2383364 100644 --- a/sw/source/filter/rtf/wrtrtf.cxx +++ b/sw/source/filter/rtf/wrtrtf.cxx @@ -1748,11 +1748,6 @@ RTFSaveData::~RTFSaveData() rWrt.bOutSection = bOldOutSection; } -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL ExportRTF( const String& rFltName, const String& rBaseURL, WriterRef& xRet ) -{ - xRet = new SwRTFWriter( rFltName, rBaseURL ); -} - short SwRTFWriter::GetCurrentPageDirection() const { const SwFrmFmt &rFmt = pAktPageDesc diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 8752ff2f3c..16fc06ec4f 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -116,131 +116,6 @@ bool DocxExport::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich ) return true; } -bool DocxExport::GetBookmarks( const SwTxtNode& rNd, xub_StrLen nStt, - xub_StrLen nEnd, IMarkVector& rArr ) -{ - IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); - ULONG nNd = rNd.GetIndex( ); - - const sal_Int32 nMarks = pMarkAccess->getMarksCount(); - for ( sal_Int32 i = 0; i < nMarks; i++ ) - { - IMark* pMark = ( pMarkAccess->getMarksBegin() + i )->get(); - - // Only keep the bookmarks starting or ending in this node - if ( pMark->GetMarkStart().nNode == nNd || - pMark->GetMarkEnd().nNode == nNd ) - { - xub_StrLen nBStart = pMark->GetMarkStart().nContent.GetIndex(); - xub_StrLen nBEnd = pMark->GetMarkEnd().nContent.GetIndex(); - - // Keep only the bookmars starting or ending in the snippet - bool bIsStartOk = ( nBStart >= nStt ) && ( nBStart <= nEnd ); - bool bIsEndOk = ( nBEnd >= nStt ) && ( nBEnd <= nEnd ); - - if ( bIsStartOk || bIsEndOk ) - rArr.push_back( pMark ); - } - } - return ( rArr.size() > 0 ); -} - -class CompareMarksEnd : public std::binary_function < const IMark *, const IMark *, bool > -{ -public: - inline bool operator() ( const IMark * pOneB, const IMark * pTwoB ) const - { - xub_StrLen nOEnd = pOneB->GetMarkEnd().nContent.GetIndex(); - xub_StrLen nTEnd = pTwoB->GetMarkEnd().nContent.GetIndex(); - - return nOEnd < nTEnd; - } -}; - -bool DocxExport::NearestBookmark( xub_StrLen& rNearest ) -{ - bool bHasBookmark = false; - - if ( m_rSortedMarksStart.size( ) > 0 ) - { - IMark* pMarkStart = m_rSortedMarksStart.front(); - rNearest = pMarkStart->GetMarkStart().nContent.GetIndex(); - bHasBookmark = true; - } - - if ( m_rSortedMarksEnd.size( ) > 0 ) - { - IMark* pMarkEnd = m_rSortedMarksEnd[0]; - if ( !bHasBookmark ) - rNearest = pMarkEnd->GetMarkEnd().nContent.GetIndex(); - else - rNearest = std::min( rNearest, pMarkEnd->GetMarkEnd().nContent.GetIndex() ); - bHasBookmark = true; - } - - return bHasBookmark; -} - -xub_StrLen DocxExport::GetNextPos( SwAttrIter* pAttrIter, const SwTxtNode& rNode, xub_StrLen nAktPos ) -{ - // Get the bookmarks for the normal run - xub_StrLen nNextPos = MSWordExportBase::GetNextPos( pAttrIter, rNode, nAktPos ); - - GetSortedBookmarks( rNode, nAktPos, nNextPos - nAktPos ); - - xub_StrLen nNextBookmark = nNextPos; - NearestBookmark( nNextPos ); - - return std::min( nNextPos, nNextBookmark ); -} - -void DocxExport::UpdatePosition( SwAttrIter* pAttrIter, xub_StrLen nAktPos, xub_StrLen nEnd ) -{ - xub_StrLen nNextPos; - - // either no bookmark, or it is not at the current position - if ( !NearestBookmark( nNextPos ) || nNextPos > nAktPos ) - { - MSWordExportBase::UpdatePosition( pAttrIter, nAktPos, nEnd ); - } -} - -void DocxExport::GetSortedBookmarks( const SwTxtNode& rNode, xub_StrLen nAktPos, xub_StrLen nLen ) -{ - IMarkVector aMarksStart; - if ( GetBookmarks( rNode, nAktPos, nAktPos + nLen, aMarksStart ) ) - { - IMarkVector aSortedEnd; - IMarkVector aSortedStart; - for ( IMarkVector::const_iterator it = aMarksStart.begin(), end = aMarksStart.end(); - it < end; ++it ) - { - IMark* pMark = (*it); - - // Remove the positions egals to the current pos - xub_StrLen nStart = pMark->GetMarkStart().nContent.GetIndex(); - xub_StrLen nEnd = pMark->GetMarkEnd().nContent.GetIndex(); - - if ( nStart > nAktPos ) - aSortedStart.push_back( pMark ); - - if ( nEnd > nAktPos ) - aSortedEnd.push_back( pMark ); - } - - // Sort the bookmarks by end position - std::sort( aSortedEnd.begin(), aSortedEnd.end(), CompareMarksEnd() ); - - m_rSortedMarksStart.swap( aSortedStart ); - m_rSortedMarksEnd.swap( aSortedEnd ); - } - else - { - m_rSortedMarksStart.clear( ); - m_rSortedMarksEnd.clear( ); - } -} - void DocxExport::AppendBookmarks( const SwTxtNode& rNode, xub_StrLen nAktPos, xub_StrLen nLen ) { std::vector< OUString > aStarts; diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index 06d39a68d7..df385be268 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -76,11 +76,6 @@ class DocxExport : public MSWordExportBase /// Footer counter. sal_Int32 m_nFooters; - /// Used to split the runs according to the bookmarks start and ends - typedef std::vector< ::sw::mark::IMark* > IMarkVector; - IMarkVector m_rSortedMarksStart; - IMarkVector m_rSortedMarksEnd; - /// Exporter of the VML shapes. oox::vml::VMLExport *m_pVMLExport; @@ -162,24 +157,7 @@ protected: const SwFmtPageDesc* pNewPgDescFmt = 0, const SwPageDesc* pNewPgDesc = 0 ); - /// Get the next position in the text node to output - virtual xub_StrLen GetNextPos( SwAttrIter* pAttrIter, const SwTxtNode& rNode, xub_StrLen nAktPos ); - - /// Update the information for GetNextPos(). - virtual void UpdatePosition( SwAttrIter* pAttrIter, xub_StrLen nAktPos, xub_StrLen nEnd ); - private: - /// Find the nearest bookmark from the current position. - /// - /// Returns false when there is no bookmark. - bool NearestBookmark( xub_StrLen& rNearest ); - - void GetSortedBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, - xub_StrLen nLen ); - - bool GetBookmarks( const SwTxtNode& rNd, xub_StrLen nStt, xub_StrLen nEnd, - IMarkVector& rArr ); - /// Setup pStyles and write styles.xml void InitStyles(); diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index 3d7d44f50c..829bd76757 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -26,6 +26,8 @@ ************************************************************************/ #include "docxexportfilter.hxx" +#include "rtfexportfilter.hxx" +#include "rtfimportfilter.hxx" #include "docxexport.hxx" #include @@ -144,7 +146,35 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceMan } catch( registry::InvalidRegistryException& ) { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); + OSL_ENSURE( sal_False, "### InvalidRegistryException (docx)!" ); + } + + try + { + uno::Reference< registry::XRegistryKey > xNewKey1( + static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( + OUString::createFromAscii( IMPL_NAME_RTFEXPORT "/UNO/SERVICES/" ) ) ); + xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] ); + + bRet = sal_True; + } + catch( registry::InvalidRegistryException& ) + { + OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfexport)!" ); + } + + try + { + uno::Reference< registry::XRegistryKey > xNewKey1( + static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( + OUString::createFromAscii( IMPL_NAME_RTFIMPORT "/UNO/SERVICES/" ) ) ); + xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] ); + + bRet = sal_True; + } + catch( registry::InvalidRegistryException& ) + { + OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfimport)!" ); } } @@ -157,6 +187,7 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceMan SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ ) { + OSL_TRACE("%s, pImplName is '%s'", __PRETTY_FUNCTION__, pImplName); uno::Reference< lang::XSingleServiceFactory > xFactory; void* pRet = 0; @@ -169,6 +200,22 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplN DocxExport_getImplementationName(), DocxExport_createInstance, DocxExport_getSupportedServiceNames() ) ); + } else if ( rtl_str_compare( pImplName, IMPL_NAME_RTFEXPORT ) == 0 ) { + const OUString aServiceName( OUString::createFromAscii( IMPL_NAME_RTFEXPORT ) ); + + xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory( + reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), + RtfExport_getImplementationName(), + RtfExport_createInstance, + RtfExport_getSupportedServiceNames() ) ); + } else if ( rtl_str_compare( pImplName, IMPL_NAME_RTFIMPORT ) == 0 ) { + const OUString aServiceName( OUString::createFromAscii( IMPL_NAME_RTFIMPORT ) ); + + xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory( + reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), + RtfImport_getImplementationName(), + RtfImport_createInstance, + RtfImport_getSupportedServiceNames() ) ); } if ( xFactory.is() ) diff --git a/sw/source/filter/ww8/makefile.mk b/sw/source/filter/ww8/makefile.mk index b25887e3e2..a1d12422f9 100644 --- a/sw/source/filter/ww8/makefile.mk +++ b/sw/source/filter/ww8/makefile.mk @@ -67,7 +67,12 @@ EXCEPTIONSFILES = \ $(SLO)$/WW8TableInfo.obj \ $(SLO)$/WW8FFData.obj \ $(SLO)$/WW8Sttbf.obj \ - $(SLO)$/WW8FibData.obj + $(SLO)$/WW8FibData.obj \ + $(SLO)$/rtfexportfilter.obj \ + $(SLO)$/rtfimportfilter.obj \ + $(SLO)$/rtfattributeoutput.obj \ + $(SLO)$/rtfsdrexport.obj \ + $(SLO)$/rtfexport.obj SLOFILES = \ @@ -96,7 +101,12 @@ SLOFILES = \ $(SLO)$/WW8TableInfo.obj \ $(SLO)$/WW8FFData.obj \ $(SLO)$/WW8Sttbf.obj \ - $(SLO)$/WW8FibData.obj + $(SLO)$/WW8FibData.obj \ + $(SLO)$/rtfexportfilter.obj \ + $(SLO)$/rtfimportfilter.obj \ + $(SLO)$/rtfattributeoutput.obj \ + $(SLO)$/rtfsdrexport.obj \ + $(SLO)$/rtfexport.obj # --- Tagets ------------------------------------------------------- diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx new file mode 100644 index 0000000000..d24f291b67 --- /dev/null +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -0,0 +1,3323 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2010 Miklos Vajna. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "rtfattributeoutput.hxx" +#include "rtfexport.hxx" +#include "rtfsdrexport.hxx" +#include "writerwordglue.hxx" +#include "wrtww8.hxx" +#include "ww8par.hxx" +#include "fmtcntnt.hxx" +#include "fmtsrnd.hxx" +#include "fchrfmt.hxx" +#include "tgrditem.hxx" +#include "fmtruby.hxx" +#include "charfmt.hxx" +#include "breakit.hxx" + +#include + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include + +using rtl::OString; +using rtl::OStringBuffer; +using rtl::OUString; +using rtl::OUStringBuffer; +using rtl::OUStringToOString; + +using namespace nsSwDocInfoSubType; +using namespace nsFieldFlags; +using namespace sw::util; +using namespace ::com::sun::star; + +static OString OutTBLBorderLine(RtfExport &rExport, const SvxBorderLine* pLine, const sal_Char* pStr) +{ + OStringBuffer aRet; + aRet.append(pStr); + if( pLine->GetInWidth() ) + { + // double line + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDB); + switch( pLine->GetInWidth() ) + { + case DEF_LINE_WIDTH_0: + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRW "15"); + break; + case DEF_LINE_WIDTH_1: + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRW "30"); + break; + case DEF_LINE_WIDTH_2: + case DEF_LINE_WIDTH_3: + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRW "45"); + break; + } + } + else + { + if ( DEF_LINE_WIDTH_0 == pLine->GetOutWidth( ) ) + // Hairline + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRHAIR); + else if( 255 >= pLine->GetOutWidth() ) + { + // Simple width simple + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRS); + switch ( pLine->GetStyle( ) ) + { + case DOTTED: + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDOT); + break; + case DASHED: + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDASH); + break; + case SOLID: + default: + break; + } + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRW); + aRet.append((sal_Int32)pLine->GetOutWidth()); + } + else + { + // Shouldn't happen with the OOo default width values + OString aTmp = aRet.makeStringAndClear(); + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTH); + aRet.append(aTmp); + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRW); + aRet.append((sal_Int32)pLine->GetOutWidth()/2); + } + } + + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRCF); + aRet.append((sal_Int32)rExport.GetColor(pLine->GetColor())); + return aRet.makeStringAndClear(); +} + +static OString OutBorderLine(RtfExport &rExport, const SvxBorderLine* pLine, + const sal_Char* pStr, USHORT nDist) +{ + OStringBuffer aRet; + aRet.append(OutTBLBorderLine(rExport, pLine, pStr)); + aRet.append(OOO_STRING_SVTOOLS_RTF_BRSP); + aRet.append((sal_Int32)nDist); + return aRet.makeStringAndClear(); +} + +static OString OutBorderLine( RtfExport &rExport, const SvxBorderLine* pLine, + const char* pStr ) +{ + OStringBuffer aRet; + aRet.append(pStr); + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDLNCOL); + aRet.append((sal_Int32)rExport.GetColor( pLine->GetColor() ) ); + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDLNIN); + aRet.append((sal_Int32)pLine->GetInWidth()); + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDLNOUT); + aRet.append((sal_Int32)pLine->GetOutWidth()); + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDLNDIST); + aRet.append((sal_Int32)pLine->GetDistance()); + return aRet.makeStringAndClear(); +} + +void RtfAttributeOutput::RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + /* + You would have thought that + m_rExport.Strm() << (bIsRTL ? OOO_STRING_SVTOOLS_RTF_RTLCH : OOO_STRING_SVTOOLS_RTF_LTRCH); would be sufficent here , + but looks like word needs to see the other directional token to be + satisified that all is kosher, otherwise it seems in ver 2003 to go and + semi-randomlyly stick strike through about the place. Perhaps + strikethrough is some ms developers "something is wrong signal" debugging + code that we're triggering ? + */ + if (bIsRTL) { + m_aRun.append(OOO_STRING_SVTOOLS_RTF_LTRCH); + m_aRun.append(' '); + m_aRun.append(OOO_STRING_SVTOOLS_RTF_RTLCH); + } else { + m_aRun.append(OOO_STRING_SVTOOLS_RTF_RTLCH); + m_aRun.append(' '); + m_aRun.append(OOO_STRING_SVTOOLS_RTF_LTRCH); + } + + switch (nScript) { + case i18n::ScriptType::LATIN: + m_aRun.append(OOO_STRING_SVTOOLS_RTF_LOCH); + break; + case i18n::ScriptType::ASIAN: + m_aRun.append(OOO_STRING_SVTOOLS_RTF_DBCH); + break; + case i18n::ScriptType::COMPLEX: + /* noop */ + break; + default: + /* should not happen? */ + break; + } +} + +void RtfAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + // Output table/table row/table cell starts if needed + if ( pTextNodeInfo.get() ) + { + sal_uInt32 nRow = pTextNodeInfo->getRow(); + sal_uInt32 nCell = pTextNodeInfo->getCell(); + + // New cell/row? + if ( m_nTableDepth > 0 && !m_bTableCellOpen ) + { + ww8::WW8TableNodeInfoInner::Pointer_t pDeepInner( pTextNodeInfo->getInnerForDepth( m_nTableDepth ) ); + if ( pDeepInner->getCell() == 0 ) + StartTableRow( pDeepInner ); + + StartTableCell( pDeepInner ); + } + + if ( nRow == 0 && nCell == 0 ) + { + // Do we have to start the table? + // [If we are at the rigth depth already, it means that we + // continue the table cell] + sal_uInt32 nCurrentDepth = pTextNodeInfo->getDepth(); + + if ( nCurrentDepth > m_nTableDepth ) + { + // Start all the tables that begin here + for ( sal_uInt32 nDepth = m_nTableDepth + 1; nDepth <= pTextNodeInfo->getDepth(); ++nDepth ) + { + ww8::WW8TableNodeInfoInner::Pointer_t pInner( pTextNodeInfo->getInnerForDepth( nDepth ) ); + + StartTable( pInner ); + StartTableRow( pInner ); + StartTableCell( pInner ); + } + + m_nTableDepth = nCurrentDepth; + } + } + } + + OSL_ENSURE(m_aRun.getLength() == 0, "m_aRun is not empty"); +} + +void RtfAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + FinishTableRowCell( pTextNodeInfoInner ); + + OStringBuffer aParagraph; + + aParagraph.append(m_aRun.makeStringAndClear()); + aParagraph.append(m_aAfterRuns.makeStringAndClear()); + if (m_bTblAfterCell) + m_bTblAfterCell = false; + else + { + aParagraph.append(m_rExport.sNewLine); + aParagraph.append(OOO_STRING_SVTOOLS_RTF_PAR); + aParagraph.append(' '); + } + if (m_nColBreakNeeded) + { + aParagraph.append(OOO_STRING_SVTOOLS_RTF_COLUMN); + m_nColBreakNeeded = false; + } + + if (!m_bBufferSectionHeaders) + m_rExport.Strm() << aParagraph.makeStringAndClear(); + else + m_aSectionHeaders.append(aParagraph.makeStringAndClear()); +} + +void RtfAttributeOutput::EmptyParagraph() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_rExport.Strm() << m_rExport.sNewLine << OOO_STRING_SVTOOLS_RTF_PAR << ' '; +} + +void RtfAttributeOutput::StartParagraphProperties( const SwTxtNode& rNode ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_ENSURE(m_aStyles.getLength() == 0, "m_aStyles is not empty"); + + // output page/section breaks + SwNodeIndex aNextIndex( rNode, 1 ); + m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear(); + m_bBufferSectionBreaks = true; + + // output section headers / footers + if (!m_bBufferSectionHeaders) + m_rExport.Strm() << m_aSectionHeaders.makeStringAndClear(); + + if ( aNextIndex.GetNode().IsTxtNode() ) + { + const SwTxtNode* pTxtNode = static_cast< SwTxtNode* >( &aNextIndex.GetNode() ); + m_rExport.OutputSectionBreaks( pTxtNode->GetpSwAttrSet(), *pTxtNode ); + } + else if ( aNextIndex.GetNode().IsTableNode() ) + { + const SwTableNode* pTableNode = static_cast< SwTableNode* >( &aNextIndex.GetNode() ); + const SwFrmFmt *pFmt = pTableNode->GetTable().GetFrmFmt(); + m_rExport.OutputSectionBreaks( &(pFmt->GetAttrSet()), *pTableNode ); + } + m_bBufferSectionBreaks = false; + + OStringBuffer aPar; + aPar.append(OOO_STRING_SVTOOLS_RTF_PARD); + aPar.append(OOO_STRING_SVTOOLS_RTF_PLAIN); + aPar.append(' '); + if (!m_bBufferSectionHeaders) + m_rExport.Strm() << aPar.makeStringAndClear(); + else + m_aSectionHeaders.append(aPar.makeStringAndClear()); +} + +void RtfAttributeOutput::EndParagraphProperties() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + m_aStyles.append(m_aStylesEnd.makeStringAndClear()); + m_rExport.Strm() << m_aStyles.makeStringAndClear(); +} + +void RtfAttributeOutput::StartRun( const SwRedlineData* pRedlineData ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aRun.append('{'); + + // if there is some redlining in the document, output it + Redline( pRedlineData ); + + OSL_ENSURE(m_aRunText.getLength() == 0, "m_aRunText is not empty"); +} + +void RtfAttributeOutput::EndRun() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + m_aRun.append(m_rExport.sNewLine); + m_aRun.append(m_aRunText.makeStringAndClear()); + m_aRun.append('}'); +} + +void RtfAttributeOutput::StartRunProperties() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_ENSURE(m_aStyles.getLength() == 0, "m_aStyles is not empty"); +} + +void RtfAttributeOutput::EndRunProperties( const SwRedlineData* /*pRedlineData*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + m_aStyles.append(m_aStylesEnd.makeStringAndClear()); + m_aRun.append(m_aStyles.makeStringAndClear()); +} + +void RtfAttributeOutput::RunText( const String& rText, rtl_TextEncoding eCharSet ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + RawText( rText, 0, eCharSet ); +} + +OStringBuffer& RtfAttributeOutput::RunText() +{ + return m_aRunText; +} + +OStringBuffer& RtfAttributeOutput::Styles() +{ + return m_aStyles; +} + +void RtfAttributeOutput::RawText( const String& rText, bool /*bForceUnicode*/, rtl_TextEncoding eCharSet ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + m_aRunText.append(m_rExport.OutString(rText, eCharSet)); +} + +void RtfAttributeOutput::StartRuby( const SwTxtNode& /*rNode*/, xub_StrLen /*nPos*/, const SwFmtRuby& /*rRuby*/ ) +{ + OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); +} + +void RtfAttributeOutput::EndRuby() +{ + OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); +} + +bool RtfAttributeOutput::StartURL( const String& rUrl, const String& rTarget ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append('{'); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_FIELD); + m_aStyles.append('{'); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_IGNORE); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_FLDINST); + m_aStyles.append(" HYPERLINK "); + + String sURL( rUrl ); + if( sURL.Len() ) + { + m_aStyles.append("\""); + m_aStyles.append(m_rExport.OutString( sURL, m_rExport.eCurrentEncoding)); + m_aStyles.append("\" "); + } + + if( rTarget.Len() ) + { + m_aStyles.append("\\\\t \""); + m_aStyles.append(m_rExport.OutString( rTarget, m_rExport.eCurrentEncoding)); + m_aStyles.append("\" "); + } + + m_aStyles.append("}"); + return true; +} + +bool RtfAttributeOutput::EndURL() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + // close the fldrslt group + m_aRunText.append('}'); + // close the field group + m_aRunText.append('}'); + return true; +} + +void RtfAttributeOutput::FieldVanish( const String& /*rTxt*/, ww::eField /*eType*/ ) +{ + OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); +} + +void RtfAttributeOutput::Redline( const SwRedlineData* pRedline ) +{ + if (!pRedline) + return; + + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if (pRedline->GetType() == nsRedlineType_t::REDLINE_INSERT) + { + m_aRun.append(OOO_STRING_SVTOOLS_RTF_REVISED); + m_aRun.append(OOO_STRING_SVTOOLS_RTF_REVAUTH); + m_aRun.append((sal_Int32)m_rExport.GetRedline(SW_MOD()->GetRedlineAuthor(pRedline->GetAuthor()))); + m_aRun.append(OOO_STRING_SVTOOLS_RTF_REVDTTM); + } + else if(pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE) + { + m_aRun.append(OOO_STRING_SVTOOLS_RTF_DELETED); + m_aRun.append(OOO_STRING_SVTOOLS_RTF_REVAUTHDEL); + m_aRun.append((sal_Int32)m_rExport.GetRedline(SW_MOD()->GetRedlineAuthor(pRedline->GetAuthor()))); + m_aRun.append(OOO_STRING_SVTOOLS_RTF_REVDTTMDEL); + } + m_aRun.append((sal_Int32)sw::ms::DateTime2DTTM(pRedline->GetTimeStamp())); + m_aRun.append(' '); +} + +void RtfAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, USHORT /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t /*pTextNodeInfoInner*/ ) +{ + OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); +} + +void RtfAttributeOutput::ParagraphStyle( USHORT nStyle ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + OString *pStyle = m_rExport.GetStyle(nStyle); + OStringBuffer aStyle; + aStyle.append(OOO_STRING_SVTOOLS_RTF_S); + aStyle.append((sal_Int32)nStyle); + if (pStyle) + aStyle.append(pStyle->getStr()); + if (!m_bBufferSectionHeaders) + m_rExport.Strm() << aStyle.makeStringAndClear(); + else + m_aSectionHeaders.append(aStyle.makeStringAndClear()); +} + +void RtfAttributeOutput::TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_INTBL); + if ( m_nTableDepth > 1 ) + { + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_ITAP); + m_aStyles.append((sal_Int32)m_nTableDepth); + } +} + +void RtfAttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfo*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + /* noop */ +} + +void RtfAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( !m_pTableWrt ) + InitTableHelper( pTableTextNodeInfoInner ); + + const SwTableBox *pTblBox = pTableTextNodeInfoInner->getTableBox( ); + SwFrmFmt *pFmt = pTblBox->GetFrmFmt( ); + + m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_TROWD); + TableOrientation( pTableTextNodeInfoInner ); + TableBidi( pTableTextNodeInfoInner ); + TableHeight( pTableTextNodeInfoInner ); + TableCanSplit( pTableTextNodeInfoInner ); + + // Cell margins + const SvxBoxItem& rBox = pFmt->GetBox( ); + static const USHORT aBorders[] = + { + BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT + }; + + static const char* aRowPadNames[] = + { + OOO_STRING_SVTOOLS_RTF_TRPADDT, OOO_STRING_SVTOOLS_RTF_TRPADDL, OOO_STRING_SVTOOLS_RTF_TRPADDB, OOO_STRING_SVTOOLS_RTF_TRPADDR + }; + + static const char* aRowPadUnits[] = + { + OOO_STRING_SVTOOLS_RTF_TRPADDFT, OOO_STRING_SVTOOLS_RTF_TRPADDFL, OOO_STRING_SVTOOLS_RTF_TRPADDFB, OOO_STRING_SVTOOLS_RTF_TRPADDFR + }; + + for (int i = 0; i < 4; ++i) + { + m_aRowDefs.append(aRowPadUnits[i]); + m_aRowDefs.append((sal_Int32)3); + m_aRowDefs.append(aRowPadNames[i]); + m_aRowDefs.append((sal_Int32)rBox.GetDistance(aBorders[i])); + } + + // The cell-dependent properties + const SwWriteTableRows& aRows = m_pTableWrt->GetRows( ); + SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ]; + SwTwips nSz = 0; + Point aPt; + SwRect aRect( pFmt->FindLayoutRect( false, &aPt )); + SwTwips nPageSize = aRect.Width(); + SwTwips nTblSz = pFmt->GetFrmSize().GetWidth(); + for( USHORT i = 0; i < pRow->GetCells().Count(); i++ ) + { + SwWriteTableCell *pCell = pRow->GetCells( )[ i ]; + const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt(); + + pTableTextNodeInfoInner->setCell( i ); + TableCellProperties(pTableTextNodeInfoInner); + + // Right boundary: this can't be in TableCellProperties as the old + // value of nSz is needed. + nSz += pCellFmt->GetFrmSize().GetWidth(); + m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CELLX); + SwTwips nCalc = nSz; + nCalc *= nPageSize; + nCalc /= nTblSz; + m_aRowDefs.append( (sal_Int32)(pFmt->GetLRSpace().GetLeft() + nCalc) ); + } +} + +void RtfAttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + /* + * The function name is a bit misleading: given that we write borders + * before each row, we just have borders, not default ones. Additionally, + * this function actually writes borders for a specific cell only and is + * called for each cell. + */ + + const SwTableBox *pTblBox = pTableTextNodeInfoInner->getTableBox( ); + SwFrmFmt *pFmt = pTblBox->GetFrmFmt( ); + const SvxBoxItem& rDefault = pFmt->GetBox( ); + const SwWriteTableRows& aRows = m_pTableWrt->GetRows( ); + SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ]; + SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ]; + const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt(); + const SfxPoolItem* pItem; + if (SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(RES_BOX, TRUE, &pItem)) + { + const SvxBoxItem& rBox = (SvxBoxItem&)*pItem; + static const USHORT aBorders[] = + { + BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT + }; + static const char* aBorderNames[] = + { + OOO_STRING_SVTOOLS_RTF_CLBRDRT, OOO_STRING_SVTOOLS_RTF_CLBRDRL, OOO_STRING_SVTOOLS_RTF_CLBRDRB, OOO_STRING_SVTOOLS_RTF_CLBRDRR + }; + //Yes left and top are swapped with eachother for cell padding! Because + //that's what the thunderingly annoying rtf export/import word xp does. + static const char* aCellPadNames[] = + { + OOO_STRING_SVTOOLS_RTF_CLPADL, OOO_STRING_SVTOOLS_RTF_CLPADT, OOO_STRING_SVTOOLS_RTF_CLPADB, OOO_STRING_SVTOOLS_RTF_CLPADR + }; + static const char* aCellPadUnits[] = + { + OOO_STRING_SVTOOLS_RTF_CLPADFL, OOO_STRING_SVTOOLS_RTF_CLPADFT, OOO_STRING_SVTOOLS_RTF_CLPADFB, OOO_STRING_SVTOOLS_RTF_CLPADFR + }; + for (int i = 0; i < 4; ++i) + { + if (const SvxBorderLine* pLn = rBox.GetLine(aBorders[i])) + m_aRowDefs.append(OutTBLBorderLine(m_rExport, pLn, aBorderNames[i])); + if (rDefault.GetDistance(aBorders[i]) != + rBox.GetDistance(aBorders[i])) + { + m_aRowDefs.append(aCellPadUnits[i]); + m_aRowDefs.append((sal_Int32)3); + m_aRowDefs.append(aCellPadNames[i]); + m_aRowDefs.append((sal_Int32)rBox.GetDistance(aBorders[i])); + } + } + } +} + +void RtfAttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + const SwWriteTableRows& aRows = m_pTableWrt->GetRows( ); + SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ]; + SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ]; + const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt(); + const SfxPoolItem* pItem; + if( SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState( + RES_BACKGROUND, TRUE, &pItem )) + { + const SvxBrushItem& rBack = (SvxBrushItem&)*pItem; + if( !rBack.GetColor().GetTransparency() ) + { + m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CLCBPAT); + m_aRowDefs.append((sal_Int32)m_rExport.GetColor(rBack.GetColor())); + } + } +} + +void RtfAttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); + const SwTableLine * pTabLine = pTabBox->GetUpper(); + const SwFrmFmt * pLineFmt = pTabLine->GetFrmFmt(); + const SwFmtFrmSize& rLSz = pLineFmt->GetFrmSize(); + + if ( ATT_VAR_SIZE != rLSz.GetHeightSizeType() && rLSz.GetHeight() ) + { + sal_Int32 nHeight = 0; + + switch ( rLSz.GetHeightSizeType() ) + { + case ATT_FIX_SIZE: nHeight = -rLSz.GetHeight(); break; + case ATT_MIN_SIZE: nHeight = rLSz.GetHeight(); break; + default: break; + } + + if ( nHeight ) + { + m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_TRRH); + m_aRowDefs.append(nHeight); + } + } +} + +void RtfAttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); + const SwTableLine * pTabLine = pTabBox->GetUpper(); + const SwFrmFmt * pLineFmt = pTabLine->GetFrmFmt(); + const SwFmtRowSplit& rSplittable = pLineFmt->GetRowSplit( ); + + // The rtf default is to allow a row to break + if (rSplittable.GetValue() == 0) + m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_TRKEEP); +} + +void RtfAttributeOutput::TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + const SwTable * pTable = pTableTextNodeInfoInner->getTable(); + const SwFrmFmt * pFrmFmt = pTable->GetFrmFmt(); + + if ( m_rExport.TrueFrameDirection( *pFrmFmt ) != FRMDIR_HORI_RIGHT_TOP ) + m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_LTRROW); + else + m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_RTLROW); +} + +void RtfAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + const SwWriteTableRows& aRows = m_pTableWrt->GetRows( ); + SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ]; + SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ]; + const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt(); + const SfxPoolItem* pItem; + + // vertical merges + if (pCell->GetRowSpan() > 1) + m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CLVMGF); + else if (pCell->GetRowSpan() == 0) + m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CLVMRG); + + // vertical alignment + if( SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState( + RES_VERT_ORIENT, TRUE, &pItem ) ) + switch( ((SwFmtVertOrient*)pItem)->GetVertOrient() ) + { + case text::VertOrientation::CENTER: m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CLVERTALC); break; + case text::VertOrientation::BOTTOM: m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CLVERTALB); break; + default: m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CLVERTALT); break; + } +} + +void RtfAttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t /*pNodeInfo*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + /* noop */ +} + +void RtfAttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + // This is called when the nested table ends in a cell, and there's no + // paragraph benhind that; so we must check for the ends of cell, rows, + // and tables + // ['true' to write an empty paragraph, MS Word insists on that] + FinishTableRowCell( pNodeInfoInner, true ); +} + +void RtfAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + const SwTable *pTable = pTableTextNodeInfoInner->getTable(); + SwFrmFmt *pFmt = pTable->GetFrmFmt( ); + + OStringBuffer aTblAdjust( OOO_STRING_SVTOOLS_RTF_TRQL ); + switch (pFmt->GetHoriOrient().GetHoriOrient()) + { + case text::HoriOrientation::CENTER: + aTblAdjust.setLength(0); + aTblAdjust.append(OOO_STRING_SVTOOLS_RTF_TRQC); + break; + case text::HoriOrientation::RIGHT: + aTblAdjust.setLength(0); + aTblAdjust.append(OOO_STRING_SVTOOLS_RTF_TRQR); + break; + case text::HoriOrientation::NONE: + case text::HoriOrientation::LEFT_AND_WIDTH: + aTblAdjust.append(OOO_STRING_SVTOOLS_RTF_TRLEFT); + aTblAdjust.append((sal_Int32)pFmt->GetLRSpace().GetLeft()); + break; + default: + break; + } + + m_aRowDefs.append(aTblAdjust.makeStringAndClear()); +} + +void RtfAttributeOutput::TableRowEnd( sal_uInt32 /*nDepth*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + /* noop, see EndTableRow() */ +} + +/* + * Our private table methods. + */ + +void RtfAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + sal_uInt32 nPageSize = 0; + bool bRelBoxSize = false; + + // Create the SwWriteTable instance to use col spans + GetTablePageSize( pTableTextNodeInfoInner, nPageSize, bRelBoxSize ); + + const SwTable* pTable = pTableTextNodeInfoInner->getTable( ); + const SwFrmFmt *pFmt = pTable->GetFrmFmt( ); + SwTwips nTblSz = pFmt->GetFrmSize( ).GetWidth( ); + + const SwHTMLTableLayout *pLayout = pTable->GetHTMLTableLayout(); + if( pLayout && pLayout->IsExportable() ) + m_pTableWrt = new SwWriteTable( pLayout ); + else + m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), (USHORT)nPageSize, + (USHORT)nTblSz, false); +} + +void RtfAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + /* noop */ +} + +void RtfAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +{ + sal_uInt32 nCurrentDepth = pTableTextNodeInfoInner->getDepth(); + OSL_TRACE("%s, (depth is %d)", __PRETTY_FUNCTION__, (int)nCurrentDepth); + + TableDefinition(pTableTextNodeInfoInner); + + // We'll write the table definition for nested tables later + if ( nCurrentDepth > 1 ) + return; + m_rExport.Strm() << m_aRowDefs.makeStringAndClear(); +} + +void RtfAttributeOutput::StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_bTableCellOpen = true; +} + +void RtfAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + TableDefaultBorders(pTableTextNodeInfoInner); + TableBackgrounds(pTableTextNodeInfoInner); + TableVerticalCell(pTableTextNodeInfoInner); +} + +void RtfAttributeOutput::EndTableCell( ) +{ + OSL_TRACE("%s, (depth is %d)", __PRETTY_FUNCTION__, (int)m_nTableDepth); + + if ( m_nTableDepth > 1 ) + m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_NESTCELL); + else + m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_CELL); + + m_bTableCellOpen = false; + m_bTblAfterCell = true; +} + +void RtfAttributeOutput::EndTableRow( ) +{ + OSL_TRACE("%s, (depth is %d)", __PRETTY_FUNCTION__, (int)m_nTableDepth); + + if ( m_nTableDepth > 1 ) + { + m_aAfterRuns.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_NESTTABLEPROPRS); + m_aAfterRuns.append(m_aRowDefs.makeStringAndClear()); + m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_NESTROW "}" "{" OOO_STRING_SVTOOLS_RTF_NONESTTABLES OOO_STRING_SVTOOLS_RTF_PAR "}"); + } + else + m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_ROW); +} + +void RtfAttributeOutput::EndTable() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( m_nTableDepth > 0 ) + m_nTableDepth--; + + // We closed the table; if it is a nested table, the cell that contains it + // still continues + m_bTableCellOpen = true; + + // Cleans the table helper + delete m_pTableWrt, m_pTableWrt = NULL; +} + +void RtfAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool /*bForceEmptyParagraph*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( pInner.get() ) + { + // Where are we in the table + sal_uInt32 nRow = pInner->getRow( ); + + const SwTable *pTable = pInner->getTable( ); + const SwTableLines& rLines = pTable->GetTabLines( ); + USHORT nLinesCount = rLines.Count( ); + + if ( pInner->isEndOfCell() ) + EndTableCell(); + + // This is a line end + if ( pInner->isEndOfLine() ) + EndTableRow(); + + // This is the end of the table + if ( pInner->isEndOfLine( ) && ( nRow + 1 ) == nLinesCount ) + EndTable(); + } +} + +void RtfAttributeOutput::StartStyles() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + m_rExport.Strm() << m_rExport.sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_COLORTBL; + m_rExport.OutColorTable(); + OSL_ENSURE(m_aStylesheet.getLength() == 0, "m_aStylesheet is not empty"); + m_aStylesheet.append(m_rExport.sNewLine); + m_aStylesheet.append('{'); + m_aStylesheet.append(OOO_STRING_SVTOOLS_RTF_STYLESHEET); +} + +void RtfAttributeOutput::EndStyles( USHORT /*nNumberOfStyles*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + m_rExport.Strm() << '}'; + m_rExport.Strm() << m_aStylesheet.makeStringAndClear(); + m_rExport.Strm() << '}'; +} + +void RtfAttributeOutput::DefaultStyle( USHORT /*nStyle*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + /* noop, the default style is always 0 in RTF */ +} + +void RtfAttributeOutput::StartStyle( const String& rName, bool /*bPapFmt*/, + USHORT nBase, USHORT nNext, USHORT /*nWwId*/, USHORT nId, bool /*bAutoUpdate*/ ) +{ + OSL_TRACE("%s, rName = '%s'", __PRETTY_FUNCTION__, + OUStringToOString( OUString( rName ), m_rExport.eCurrentEncoding ).getStr()); + + m_aStylesheet.append('{'); + m_aStylesheet.append(OOO_STRING_SVTOOLS_RTF_S); + m_aStylesheet.append( (sal_Int32)nId ); + + if ( nBase != 0x0FFF ) + { + m_aStylesheet.append(OOO_STRING_SVTOOLS_RTF_SBASEDON); + m_aStylesheet.append((sal_Int32)nBase); + } + + m_aStylesheet.append(OOO_STRING_SVTOOLS_RTF_SNEXT); + m_aStylesheet.append((sal_Int32)nNext); + + m_rStyleName = rName; + m_nStyleId = nId; +} + +void RtfAttributeOutput::EndStyle() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + m_aStyles.append(m_aStylesEnd.makeStringAndClear()); + OString aStyles = m_aStyles.makeStringAndClear(); + m_rExport.InsStyle(m_nStyleId, aStyles); + m_aStylesheet.append(aStyles); + m_aStylesheet.append(' '); + m_aStylesheet.append(OUStringToOString( OUString( m_rStyleName ), m_rExport.eCurrentEncoding )); + m_aStylesheet.append(";}"); + m_aStylesheet.append(m_rExport.sNewLine); +} + +void RtfAttributeOutput::StartStyleProperties( bool /*bParProp*/, USHORT /*nStyle*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + /* noop */ +} + +void RtfAttributeOutput::EndStyleProperties( bool /*bParProp*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + /* noop */ +} + +void RtfAttributeOutput::OutlineNumbering( BYTE nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( nLvl >= WW8ListManager::nMaxLevel ) + nLvl = WW8ListManager::nMaxLevel - 1; + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_LEVEL); + m_aStyles.append((sal_Int32)nLvl); +} + +void RtfAttributeOutput::PageBreakBefore( bool bBreak ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if (bBreak) + { + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_PAGEBB; + } +} + +void RtfAttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + switch (nC) + { + case msword::ColumnBreak: + m_nColBreakNeeded = true; + break; + case msword::PageBreak: + if ( pSectionInfo ) + m_rExport.SectionProperties( *pSectionInfo ); + break; + } +} + +void RtfAttributeOutput::StartSection() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_SECT OOO_STRING_SVTOOLS_RTF_SECTD); + if (!m_bBufferSectionBreaks) + m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear(); +} + +void RtfAttributeOutput::EndSection() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + /* + * noop, \sect must go to StartSection or Word won't notice multiple + * columns... + */ +} + +void RtfAttributeOutput::SectionFormProtection( bool bProtected ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_SECTUNLOCKED); + m_aSectionBreaks.append((sal_Int32)!bProtected); +} + +void RtfAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLineNumberInfo& rLnNumInfo ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LINEMOD; + m_rExport.OutLong(rLnNumInfo.GetCountBy()); + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LINEX; + m_rExport.OutLong(rLnNumInfo.GetPosFromLeft()); + if (!rLnNumInfo.IsRestartEachPage()) + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LINECONT; +} + +void RtfAttributeOutput::SectionTitlePage() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + /* + * noop, handled in RtfExport::WriteHeaderFooter() + */ +} + +void RtfAttributeOutput::SectionPageBorders( const SwFrmFmt* pFmt, const SwFrmFmt* /*pFirstPageFmt*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + const SvxBoxItem& rBox = pFmt->GetBox(); + const SvxBorderLine *pLine = rBox.GetTop(); + if(pLine) + m_aSectionBreaks.append(OutBorderLine( m_rExport, pLine, + OOO_STRING_SVTOOLS_RTF_PGBRDRT, + rBox.GetDistance(BOX_LINE_TOP) )); + pLine = rBox.GetBottom(); + if(pLine) + m_aSectionBreaks.append(OutBorderLine( m_rExport, pLine, + OOO_STRING_SVTOOLS_RTF_PGBRDRB, + rBox.GetDistance(BOX_LINE_BOTTOM) )); + pLine = rBox.GetLeft(); + if(pLine) + m_aSectionBreaks.append(OutBorderLine( m_rExport, pLine, + OOO_STRING_SVTOOLS_RTF_PGBRDRL, + rBox.GetDistance(BOX_LINE_LEFT) )); + pLine = rBox.GetRight(); + if(pLine) + m_aSectionBreaks.append(OutBorderLine( m_rExport, pLine, + OOO_STRING_SVTOOLS_RTF_PGBRDRR, + rBox.GetDistance(BOX_LINE_RIGHT) )); +} + +void RtfAttributeOutput::SectionBiDi( bool bBiDi ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_rExport.Strm() << (bBiDi ? OOO_STRING_SVTOOLS_RTF_RTLSECT : OOO_STRING_SVTOOLS_RTF_LTRSECT); +} + +void RtfAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if (nPageRestartNumber > 0) + { + m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_PGNSTARTS); + m_aSectionBreaks.append((sal_Int32)nPageRestartNumber); + m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_PGNRESTART); + } + + const char* pStr = 0; + switch ( nNumType ) + { + case SVX_NUM_CHARS_UPPER_LETTER: + case SVX_NUM_CHARS_UPPER_LETTER_N: pStr = OOO_STRING_SVTOOLS_RTF_PGNUCLTR; break; + case SVX_NUM_CHARS_LOWER_LETTER: + case SVX_NUM_CHARS_LOWER_LETTER_N: pStr = OOO_STRING_SVTOOLS_RTF_PGNLCLTR; break; + case SVX_NUM_ROMAN_UPPER: pStr = OOO_STRING_SVTOOLS_RTF_PGNUCRM; break; + case SVX_NUM_ROMAN_LOWER: pStr = OOO_STRING_SVTOOLS_RTF_PGNLCRM; break; + + case SVX_NUM_ARABIC: pStr = OOO_STRING_SVTOOLS_RTF_PGNDEC; break; + } + if (pStr) + m_aSectionBreaks.append(pStr); +} + +void RtfAttributeOutput::SectionType( BYTE nBreakCode ) +{ + OSL_TRACE("%s, nBreakCode = %d", __PRETTY_FUNCTION__, nBreakCode); + + /* + * break code: 0 No break, 1 New column + * 2 New page, 3 Even page, 4 Odd page + */ + const char* sType = NULL; + switch ( nBreakCode ) + { + case 1: sType = OOO_STRING_SVTOOLS_RTF_SBKCOL; break; + case 2: sType = OOO_STRING_SVTOOLS_RTF_SBKPAGE; break; + case 3: sType = OOO_STRING_SVTOOLS_RTF_SBKEVEN; break; + case 4: sType = OOO_STRING_SVTOOLS_RTF_SBKODD; break; + default: sType = OOO_STRING_SVTOOLS_RTF_SBKNONE; break; + } + m_aSectionBreaks.append(sType); + if (!m_bBufferSectionBreaks) + m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear(); +} + +void RtfAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &/*rRule*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LISTOVERRIDE; + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LISTID; + m_rExport.OutULong(nId); + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LISTOVERRIDECOUNT << '0'; + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LS; + m_rExport.OutULong(nId-1) << '}'; +} + +void RtfAttributeOutput::StartAbstractNumbering( USHORT nId ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LIST << OOO_STRING_SVTOOLS_RTF_LISTTEMPLATEID; + m_rExport.OutULong( nId ); + m_nListId = nId; +} + +void RtfAttributeOutput::EndAbstractNumbering() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LISTID; + m_rExport.OutULong( m_nListId ) << '}' << m_rExport.sNewLine; +} + +void RtfAttributeOutput::NumberingLevel( BYTE nLevel, + USHORT nStart, + USHORT nNumberingType, + SvxAdjust eAdjust, + const BYTE * pNumLvlPos, + BYTE /*nFollow*/, + const wwFont * pFont, + const SfxItemSet * pOutSet, + sal_Int16 nIndentAt, + sal_Int16 nFirstLineIndex, + sal_Int16 /*nListTabPos*/, + const String &rNumberingString ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_rExport.Strm() << m_rExport.sNewLine; + if( nLevel > 8 ) // RTF knows only 9 levels + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_SOUTLVL; + + m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LISTLEVEL; + + USHORT nVal = 0; + switch( nNumberingType ) + { + case SVX_NUM_ROMAN_UPPER: nVal = 1; break; + case SVX_NUM_ROMAN_LOWER: nVal = 2; break; + case SVX_NUM_CHARS_UPPER_LETTER: + case SVX_NUM_CHARS_UPPER_LETTER_N: nVal = 3; break; + case SVX_NUM_CHARS_LOWER_LETTER: + case SVX_NUM_CHARS_LOWER_LETTER_N: nVal = 4; break; + + case SVX_NUM_BITMAP: + case SVX_NUM_CHAR_SPECIAL: nVal = 23; break; + } + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LEVELNFC; + m_rExport.OutULong( nVal ); + + switch( eAdjust ) + { + case SVX_ADJUST_CENTER: nVal = 1; break; + case SVX_ADJUST_RIGHT: nVal = 2; break; + default: nVal = 0; break; + } + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LEVELJC; + m_rExport.OutULong( nVal ); + + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LEVELSTARTAT; + m_rExport.OutULong( nStart ); + + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LEVELFOLLOW << "0"; + + // leveltext group + m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LEVELTEXT << ' '; + + if( SVX_NUM_CHAR_SPECIAL == nNumberingType || + SVX_NUM_BITMAP == nNumberingType ) + { + m_rExport.Strm() << "\\'01"; + sal_Unicode cChar = rNumberingString.GetChar(0); + m_rExport.Strm() << "\\u"; + m_rExport.OutULong(cChar); + m_rExport.Strm() << " ?"; + } + else + { + m_rExport.Strm() << "\\'" << m_rExport.OutHex( rNumberingString.Len(), 2 ); + m_rExport.Strm() << m_rExport.OutString( rNumberingString, m_rExport.eDefaultEncoding ); + } + + m_rExport.Strm() << ";}"; + + // write the levelnumbers + m_rExport.Strm() << "{" << OOO_STRING_SVTOOLS_RTF_LEVELNUMBERS; + for( BYTE i = 0; i <= nLevel && pNumLvlPos[ i ]; ++i ) + { + m_rExport.Strm() << "\\'" << m_rExport.OutHex(pNumLvlPos[ i ], 2).getStr(); + } + m_rExport.Strm() << ";}"; + + if( pOutSet ) + { + if (pFont) + { + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_F; + m_rExport.OutULong(m_rExport.maFontHelper.GetId(*pFont)); + } + m_rExport.OutputItemSet( *pOutSet, false, true, i18n::ScriptType::LATIN ); + m_rExport.Strm() << m_aStyles.makeStringAndClear(); + } + + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_FI; + m_rExport.OutLong( nFirstLineIndex ) << OOO_STRING_SVTOOLS_RTF_LI; + m_rExport.OutLong( nIndentAt ); + + m_rExport.Strm() << '}'; + if( nLevel > 8 ) + m_rExport.Strm() << '}'; +} + +void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eType*/, const String& rFldCmd, BYTE /*nMode*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + // NEEDSWORK this has beeen tested only with page numbers + m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_FIELD); + m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FLDINST " "); + m_aRunText.append(m_rExport.OutString(rFldCmd, m_rExport.eCurrentEncoding)); + m_aRunText.append("}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " "); + if (pFld) + m_aRunText.append(m_rExport.OutString(pFld->Expand(), m_rExport.eDefaultEncoding)); + m_aRunText.append("}}"); +} + +void RtfAttributeOutput::WriteBookmarks_Impl( std::vector< rtl::OUString >& rStarts, std::vector< rtl::OUString >& rEnds ) +{ + for ( std::vector< OUString >::const_iterator it = rStarts.begin(), end = rStarts.end(); it < end; ++it ) + { + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_BKMKSTART " "); + m_aRun.append(m_rExport.OutString(*it, m_rExport.eCurrentEncoding)); + m_aRun.append('}'); + } + rStarts.clear(); + + for ( std::vector< OUString >::const_iterator it = rEnds.begin(), end = rEnds.end(); it < end; ++it ) + { + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_BKMKEND " "); + m_aRun.append(m_rExport.OutString(*it, m_rExport.eCurrentEncoding)); + m_aRun.append('}'); + } + rEnds.clear(); +} + +void RtfAttributeOutput::WriteHeaderFooter_Impl( const SwFrmFmt& rFmt, bool bHeader, const sal_Char* pStr ) +{ + OStringBuffer aSectionBreaks = m_aSectionBreaks; + m_aSectionBreaks.setLength(0); + OStringBuffer aRun = m_aRun; + m_aRun.setLength(0); + + m_aSectionHeaders.append(bHeader ? OOO_STRING_SVTOOLS_RTF_HEADERY : OOO_STRING_SVTOOLS_RTF_FOOTERY); + m_aSectionHeaders.append((sal_Int32)m_rExport.pAktPageDesc->GetMaster().GetULSpace().GetUpper()); + m_aSectionHeaders.append('{'); + m_aSectionHeaders.append(pStr); + m_bBufferSectionHeaders = true; + m_rExport.WriteHeaderFooterText(rFmt, bHeader); + m_bBufferSectionHeaders = false; + m_aSectionHeaders.append('}'); + + m_aSectionBreaks = aSectionBreaks; + m_aRun = aRun; +} + +void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Point& /*rNdTopLeft*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + const SwNode *pNode = rFrame.GetContent(); + const SwGrfNode *pGrfNode = pNode ? pNode->GetGrfNode() : 0; + + switch ( rFrame.GetWriterType() ) + { + case sw::Frame::eGraphic: + if (!rFrame.IsInline()) + { + m_rExport.mpParentFrame = &rFrame; + m_rExport.bRTFFlySyntax = true; + m_rExport.OutputFormat( rFrame.GetFrmFmt(), false, false, true ); + m_rExport.bRTFFlySyntax = false; + m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE); + m_rExport.OutputFormat( rFrame.GetFrmFmt(), false, false, true ); + m_aRunText.append('}'); + m_rExport.mpParentFrame = NULL; + } + + if ( pGrfNode ) + FlyFrameGraphic( *pGrfNode, rFrame.GetLayoutSize() ); + break; + case sw::Frame::eDrawing: + { + const SdrObject* pSdrObj = rFrame.GetFrmFmt().FindRealSdrObject(); + if ( pSdrObj ) + { + bool bSwapInPage = false; + if ( !pSdrObj->GetPage() ) + { + if ( SdrModel* pModel = m_rExport.pDoc->GetDrawModel() ) + { + if ( SdrPage *pPage = pModel->GetPage( 0 ) ) + { + bSwapInPage = true; + const_cast< SdrObject* >( pSdrObj )->SetPage( pPage ); + } + } + } + + m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_FIELD "{"); + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_IGNORE); + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLDINST); + m_aRunText.append(" SHAPE "); + m_aRunText.append("}" "{" OOO_STRING_SVTOOLS_RTF_FLDRSLT); + + m_rExport.SdrExporter().AddSdrObject( *pSdrObj ); + + m_aRunText.append('}'); + m_aRunText.append('}'); + + if ( bSwapInPage ) + const_cast< SdrObject* >( pSdrObj )->SetPage( 0 ); + } + } + break; + case sw::Frame::eFormControl: + { + const SwFrmFmt &rFrmFmt = rFrame.GetFrmFmt(); + const SdrObject *pObject = rFrmFmt.FindRealSdrObject(); + + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_FIELD); + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FLDINST); + + if (pObject && pObject->GetObjInventor() == FmFormInventor) + { + if (SdrUnoObj *pFormObj = PTR_CAST(SdrUnoObj,pObject)) + { + uno::Reference< awt::XControlModel > xControlModel = + pFormObj->GetUnoControlModel(); + uno::Reference< lang::XServiceInfo > xInfo(xControlModel, uno::UNO_QUERY); + uno::Reference xPropSet(xControlModel, uno::UNO_QUERY); + uno::Reference xPropSetInfo = xPropSet->getPropertySetInfo(); + OUString sName; + if (xInfo->supportsService(C2U("com.sun.star.form.component.CheckBox"))) + { + + m_aRun.append(OUStringToOString(OUString(FieldString(ww::eFORMCHECKBOX)), m_rExport.eCurrentEncoding)); + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FORMFIELD "{"); + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFTYPE "1"); // 1 = checkbox + // checkbox size in half points, this seems to be always 20, see WW8Export::DoCheckBox() + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFHPS "20"); + + OUString aStr; + sName = C2U("Name"); + if (xPropSetInfo->hasPropertyByName(sName)) + { + xPropSet->getPropertyValue(sName) >>= aStr; + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFNAME " "); + m_aRun.append(OUStringToOString(aStr, m_rExport.eCurrentEncoding)); + m_aRun.append('}'); + } + + sName = C2U("HelpText"); + if (xPropSetInfo->hasPropertyByName(sName)) + { + xPropSet->getPropertyValue(sName) >>= aStr; + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFOWNHELP); + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFHELPTEXT " "); + m_aRun.append(OUStringToOString(aStr, m_rExport.eCurrentEncoding)); + m_aRun.append('}'); + } + + sName = C2U("HelpF1Text"); + if (xPropSetInfo->hasPropertyByName(sName)) + { + xPropSet->getPropertyValue(sName) >>= aStr; + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFOWNSTAT); + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFSTATTEXT " "); + m_aRun.append(OUStringToOString(aStr, m_rExport.eCurrentEncoding)); + m_aRun.append('}'); + } + + sal_Int16 nTemp = 0; + xPropSet->getPropertyValue(C2U("DefaultState")) >>= nTemp; + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFDEFRES); + m_aRun.append((sal_Int32)nTemp); + xPropSet->getPropertyValue(C2U("State")) >>= nTemp; + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFRES); + m_aRun.append((sal_Int32)nTemp); + + m_aRun.append("}}"); + + // field result is empty, ffres already contains the form result + m_aRun.append("}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " "); + } + else if (xInfo->supportsService(C2U("com.sun.star.form.component.TextField"))) + { + OStringBuffer aBuf; + OString aStr; + OUString aTmp; + const sal_Char* pStr; + + m_aRun.append(OUStringToOString(OUString(FieldString(ww::eFORMTEXT)), m_rExport.eCurrentEncoding)); + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_DATAFIELD " "); + for (int i = 0; i < 8; i++) aBuf.append((sal_Char)0x00); + xPropSet->getPropertyValue(C2U("Name")) >>= aTmp; + aStr = OUStringToOString(aTmp, m_rExport.eCurrentEncoding); + aBuf.append((sal_Char)aStr.getLength()); + aBuf.append(aStr); + aBuf.append((sal_Char)0x00); + xPropSet->getPropertyValue(C2U("DefaultText")) >>= aTmp; + aStr = OUStringToOString(aTmp, m_rExport.eCurrentEncoding); + aBuf.append((sal_Char)aStr.getLength()); + aBuf.append(aStr); + for (int i = 0; i < 11; i++) aBuf.append((sal_Char)0x00); + aStr = aBuf.makeStringAndClear(); + pStr = aStr.getStr(); + for (int i = 0; i < aStr.getLength(); i++, pStr++) + m_aRun.append(m_rExport.OutHex(*pStr, 2)); + m_aRun.append('}'); + m_aRun.append("}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " "); + xPropSet->getPropertyValue(C2U("Text")) >>= aTmp; + m_aRun.append(OUStringToOString(aTmp, m_rExport.eCurrentEncoding)); + m_aRun.append('}'); + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FORMFIELD "{"); + sName = C2U("HelpText"); + if (xPropSetInfo->hasPropertyByName(sName)) + { + xPropSet->getPropertyValue(sName) >>= aTmp; + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFOWNHELP); + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFHELPTEXT " "); + m_aRun.append(OUStringToOString(aTmp, m_rExport.eCurrentEncoding)); + m_aRun.append('}'); + } + + sName = C2U("HelpF1Text"); + if (xPropSetInfo->hasPropertyByName(sName)) + { + xPropSet->getPropertyValue(sName) >>= aTmp; + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFOWNSTAT); + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFSTATTEXT " "); + m_aRun.append(OUStringToOString(aTmp, m_rExport.eCurrentEncoding)); + m_aRun.append('}'); + } + m_aRun.append("}"); + } + else if (xInfo->supportsService(C2U("com.sun.star.form.component.ListBox"))) + { + OUString aStr; + uno::Sequence aIntSeq; + uno::Sequence aStrSeq; + + m_aRun.append(OUStringToOString(OUString(FieldString(ww::eFORMDROPDOWN)), m_rExport.eCurrentEncoding)); + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FORMFIELD "{"); + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFTYPE "2"); // 2 = list + + xPropSet->getPropertyValue(C2U("DefaultSelection")) >>= aIntSeq; + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFDEFRES); + // a dropdown list can have only one 'selected item by default' + m_aRun.append((sal_Int32)aIntSeq[0]); + + xPropSet->getPropertyValue(C2U("SelectedItems")) >>= aIntSeq; + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFRES); + // a dropdown list can have only one 'currently selected item' + m_aRun.append((sal_Int32)aIntSeq[0]); + + sName = C2U("Name"); + if (xPropSetInfo->hasPropertyByName(sName)) + { + xPropSet->getPropertyValue(sName) >>= aStr; + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFNAME " "); + m_aRun.append(OUStringToOString(aStr, m_rExport.eCurrentEncoding)); + m_aRun.append('}'); + } + + sName = C2U("HelpText"); + if (xPropSetInfo->hasPropertyByName(sName)) + { + xPropSet->getPropertyValue(sName) >>= aStr; + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFOWNHELP); + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFHELPTEXT " "); + m_aRun.append(OUStringToOString(aStr, m_rExport.eCurrentEncoding)); + m_aRun.append('}'); + } + + sName = C2U("HelpF1Text"); + if (xPropSetInfo->hasPropertyByName(sName)) + { + xPropSet->getPropertyValue(sName) >>= aStr; + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFOWNSTAT); + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFSTATTEXT " "); + m_aRun.append(OUStringToOString(aStr, m_rExport.eCurrentEncoding)); + m_aRun.append('}'); + } + + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFHASLISTBOX); + + xPropSet->getPropertyValue(C2U("StringItemList")) >>= aStrSeq; + sal_uInt32 nListItems = aStrSeq.getLength(); + for (sal_uInt32 i = 0; i < nListItems; i++) + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFL " ") + .append(OUStringToOString(aStrSeq[i], m_rExport.eCurrentEncoding)).append('}'); + + m_aRun.append("}}"); + + // field result is empty, ffres already contains the form result + m_aRun.append("}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " "); + } + else + OSL_TRACE("%s unhandled form control: '%s'", __PRETTY_FUNCTION__, + OUStringToOString(xInfo->getImplementationName(), m_rExport.eCurrentEncoding).getStr()); + m_aRun.append('}'); + } + } + + m_aRun.append('}'); + } + break; + case sw::Frame::eOle: + { + const SwFrmFmt &rFrmFmt = rFrame.GetFrmFmt(); + const SdrObject *pSdrObj = rFrmFmt.FindRealSdrObject(); + if ( pSdrObj ) + { + SwNodeIndex aIdx(*rFrmFmt.GetCntnt().GetCntntIdx(), 1); + SwOLENode& rOLENd = *aIdx.GetNode().GetOLENode(); + FlyFrameOLE(rOLENd, rFrame.GetLayoutSize()); + } + } + break; + default: + OSL_TRACE("%s: unknown type (%d)", __PRETTY_FUNCTION__, rFrame.GetWriterType()); + break; + } +} + +void RtfAttributeOutput::CharCaseMap( const SvxCaseMapItem& rCaseMap ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + switch ( rCaseMap.GetValue() ) + { + case SVX_CASEMAP_KAPITAELCHEN: + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_SCAPS); + break; + case SVX_CASEMAP_VERSALIEN: + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_CAPS); + break; + default: // Something that rtf does not support + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_SCAPS); + m_aStyles.append((sal_Int32)0); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_CAPS); + m_aStyles.append((sal_Int32)0); + break; + } +} + +void RtfAttributeOutput::CharColor( const SvxColorItem& rColor ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + const Color aColor( rColor.GetValue() ); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_CF); + m_aStyles.append( (sal_Int32)m_rExport.GetColor( aColor )); +} + +void RtfAttributeOutput::CharContour( const SvxContourItem& rContour ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_OUTL); + if ( !rContour.GetValue() ) + m_aStyles.append((sal_Int32)0); +} + +void RtfAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + switch ( rCrossedOut.GetStrikeout() ) + { + case STRIKEOUT_NONE: + if (!m_bStrikeDouble) + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_STRIKE); + else + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_STRIKED); + m_aStyles.append((sal_Int32)0); + break; + case STRIKEOUT_DOUBLE: + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_STRIKED); + m_aStyles.append((sal_Int32)1); + break; + default: + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_STRIKE); + break; + } +} + +void RtfAttributeOutput::CharEscapement( const SvxEscapementItem& rEsc ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + const char * pUpDn; + + SwTwips nH = ((SvxFontHeightItem&)m_rExport.GetItem( RES_CHRATR_FONTSIZE )).GetHeight(); + + if( 0 < rEsc.GetEsc() ) + pUpDn = OOO_STRING_SVTOOLS_RTF_UP; + else if( 0 > rEsc.GetEsc() ) + { + pUpDn = OOO_STRING_SVTOOLS_RTF_DN; + nH = -nH; + } + else + return; + + short nEsc = rEsc.GetEsc(); + short nProp = rEsc.GetProp() * 100; + if( DFLT_ESC_AUTO_SUPER == nEsc ) + { + nEsc = 100 - rEsc.GetProp(); + ++nProp; + } + else if( DFLT_ESC_AUTO_SUB == nEsc ) + { + nEsc = - 100 + rEsc.GetProp(); + ++nProp; + } + + m_aStyles.append('{'); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_IGNORE); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_UPDNPROP); + m_aStyles.append( (sal_Int32)nProp ); + m_aStyles.append('}'); + m_aStyles.append(pUpDn); + + /* + * Calculate the act. FontSize and the percentage of the displacement; + * RTF file expects half points, while internally it's in twips. + * Formally : (FontSize * 1/20 ) pts x * 2 + * ----------------------- = ------------ + * 100% Escapement + */ + + m_aStyles.append( (sal_Int32) ( (long( nEsc ) * nH) + 500L ) / 1000L ); + // 500L to round !! +} + +void RtfAttributeOutput::CharFont( const SvxFontItem& rFont) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_LOCH); + m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_F); + m_aStylesEnd.append((sal_Int32)m_rExport.maFontHelper.GetId(rFont)); + m_rExport.eCurrentEncoding = rtl_getTextEncodingFromWindowsCharset(sw::ms::rtl_TextEncodingToWinCharset(rFont.GetCharSet())); +} + +void RtfAttributeOutput::CharFontSize( const SvxFontHeightItem& rFontSize) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + switch ( rFontSize.Which() ) + { + case RES_CHRATR_FONTSIZE: + m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_FS); + m_aStylesEnd.append((sal_Int32)(rFontSize.GetHeight() / 10 )); + break; + case RES_CHRATR_CJK_FONTSIZE: + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_FS); + m_aStyles.append((sal_Int32)(rFontSize.GetHeight() / 10 )); + break; + case RES_CHRATR_CTL_FONTSIZE: + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_AFS); + m_aStyles.append((sal_Int32)(rFontSize.GetHeight() / 10 )); + break; + } +} + +void RtfAttributeOutput::CharKerning( const SvxKerningItem& rKerning ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + // in quater points then in twips + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_EXPND); + m_aStyles.append((sal_Int32)(rKerning.GetValue() / 5)); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_EXPNDTW); + m_aStyles.append((sal_Int32)(rKerning.GetValue())); +} + +void RtfAttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + switch (rLanguage.Which()) + { + case RES_CHRATR_LANGUAGE: + m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_LANG); + m_aStylesEnd.append((sal_Int32)rLanguage.GetLanguage()); + break; + case RES_CHRATR_CJK_LANGUAGE: + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_LANGFE); + m_aStyles.append((sal_Int32)rLanguage.GetLanguage()); + break; + case RES_CHRATR_CTL_LANGUAGE: + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_LANG); + m_aStyles.append((sal_Int32)rLanguage.GetLanguage()); + break; + } +} + +void RtfAttributeOutput::CharPosture( const SvxPostureItem& rPosture ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_I); + if ( rPosture.GetPosture() == ITALIC_NONE ) + m_aStyles.append((sal_Int32)0); +} + +void RtfAttributeOutput::CharShadow( const SvxShadowedItem& rShadow ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_SHAD); + if ( !rShadow.GetValue() ) + m_aStyles.append((sal_Int32)0); +} + +void RtfAttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + const char* pStr = 0; + const SfxPoolItem* pItem = m_rExport.HasItem( RES_CHRATR_WORDLINEMODE ); + bool bWord = false; + if (pItem) + bWord = ((const SvxWordLineModeItem*)pItem)->GetValue() ? true : false; + switch(rUnderline.GetLineStyle() ) + { + case UNDERLINE_SINGLE: + pStr = bWord ? OOO_STRING_SVTOOLS_RTF_ULW : OOO_STRING_SVTOOLS_RTF_UL; + break; + case UNDERLINE_DOUBLE: + pStr = OOO_STRING_SVTOOLS_RTF_ULDB; + break; + case UNDERLINE_NONE: + pStr = OOO_STRING_SVTOOLS_RTF_ULNONE; + break; + case UNDERLINE_DOTTED: + pStr = OOO_STRING_SVTOOLS_RTF_ULD; + break; + case UNDERLINE_DASH: + pStr = OOO_STRING_SVTOOLS_RTF_ULDASH; + break; + case UNDERLINE_DASHDOT: + pStr = OOO_STRING_SVTOOLS_RTF_ULDASHD; + break; + case UNDERLINE_DASHDOTDOT: + pStr = OOO_STRING_SVTOOLS_RTF_ULDASHDD; + break; + case UNDERLINE_BOLD: + pStr = OOO_STRING_SVTOOLS_RTF_ULTH; + break; + case UNDERLINE_WAVE: + pStr = OOO_STRING_SVTOOLS_RTF_ULWAVE; + break; + case UNDERLINE_BOLDDOTTED: + pStr = OOO_STRING_SVTOOLS_RTF_ULTHD; + break; + case UNDERLINE_BOLDDASH: + pStr = OOO_STRING_SVTOOLS_RTF_ULTHDASH; + break; + case UNDERLINE_LONGDASH: + pStr = OOO_STRING_SVTOOLS_RTF_ULLDASH; + break; + case UNDERLINE_BOLDLONGDASH: + pStr = OOO_STRING_SVTOOLS_RTF_ULTHLDASH; + break; + case UNDERLINE_BOLDDASHDOT: + pStr = OOO_STRING_SVTOOLS_RTF_ULTHDASHD; + break; + case UNDERLINE_BOLDDASHDOTDOT: + pStr = OOO_STRING_SVTOOLS_RTF_ULTHDASHDD; + break; + case UNDERLINE_BOLDWAVE: + pStr = OOO_STRING_SVTOOLS_RTF_ULHWAVE; + break; + case UNDERLINE_DOUBLEWAVE: + pStr = OOO_STRING_SVTOOLS_RTF_ULULDBWAVE; + break; + default: + break; + } + + if( pStr ) + { + m_aStyles.append(pStr); + // NEEDSWORK looks like here rUnderline.GetColor() is always black, + // even if the color in the odt is for example green... + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_ULC); + m_aStyles.append( (sal_Int32)m_rExport.GetColor(rUnderline.GetColor()) ); + } +} + +void RtfAttributeOutput::CharWeight( const SvxWeightItem& rWeight ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_B); + if ( rWeight.GetWeight() != WEIGHT_BOLD ) + m_aStyles.append((sal_Int32)0); +} + +void RtfAttributeOutput::CharAutoKern( const SvxAutoKernItem& rAutoKern) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_KERNING); + m_aStyles.append((sal_Int32) (rAutoKern.GetValue() ? 1 : 0)); +} + +void RtfAttributeOutput::CharAnimatedText( const SvxBlinkItem& rBlink ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_ANIMTEXT); + m_aStyles.append((sal_Int32) (rBlink.GetValue() ? 2 : 0)); +} + +void RtfAttributeOutput::CharBackground( const SvxBrushItem& rBrush ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if( !rBrush.GetColor().GetTransparency() ) + { + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_CHCBPAT); + m_aStyles.append((sal_Int32)m_rExport.GetColor(rBrush.GetColor())); + } +} + +void RtfAttributeOutput::CharFontCJK( const SvxFontItem& rFont ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_HICH); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_AF); + m_aStyles.append((sal_Int32)m_rExport.maFontHelper.GetId(rFont)); +} + +void RtfAttributeOutput::CharFontSizeCJK( const SvxFontHeightItem& rFontSize ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + CharFontSize( rFontSize ); +} + +void RtfAttributeOutput::CharLanguageCJK( const SvxLanguageItem& rLanguageItem ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + CharLanguage( rLanguageItem ); +} + +void RtfAttributeOutput::CharPostureCJK( const SvxPostureItem& rPosture ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_I); + if ( rPosture.GetPosture() == ITALIC_NONE ) + m_aStyles.append((sal_Int32)0); +} + +void RtfAttributeOutput::CharWeightCJK( const SvxWeightItem& rWeight ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_B); + if ( rWeight.GetWeight() != WEIGHT_BOLD ) + m_aStyles.append((sal_Int32)0); +} + +void RtfAttributeOutput::CharFontCTL( const SvxFontItem& rFont ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_DBCH); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_AF); + m_aStyles.append((sal_Int32)m_rExport.maFontHelper.GetId(rFont)); +} + +void RtfAttributeOutput::CharFontSizeCTL( const SvxFontHeightItem& rFontSize ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + CharFontSize( rFontSize ); +} + +void RtfAttributeOutput::CharLanguageCTL( const SvxLanguageItem& rLanguageItem ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + CharLanguage( rLanguageItem ); +} + +void RtfAttributeOutput::CharPostureCTL( const SvxPostureItem& rPosture) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_AI); + if ( rPosture.GetPosture() == ITALIC_NONE ) + m_aStyles.append((sal_Int32)0); +} + +void RtfAttributeOutput::CharWeightCTL( const SvxWeightItem& rWeight ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_AB); + if ( rWeight.GetWeight() != WEIGHT_BOLD ) + m_aStyles.append((sal_Int32)0); +} + +void RtfAttributeOutput::CharRotate( const SvxCharRotateItem& rRotate) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_HORZVERT); + m_aStyles.append((sal_Int32)(rRotate.IsFitToLine() ? 1 : 0)); +} + +void RtfAttributeOutput::CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisMark ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + const sal_Char* pStr; + switch( rEmphasisMark.GetEmphasisMark()) + { + case EMPHASISMARK_NONE: pStr = OOO_STRING_SVTOOLS_RTF_ACCNONE; break; + case EMPHASISMARK_SIDE_DOTS: pStr = OOO_STRING_SVTOOLS_RTF_ACCCOMMA; break; + default: pStr = OOO_STRING_SVTOOLS_RTF_ACCDOT; break; + } + m_aStyles.append(pStr); +} + +void RtfAttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if( rTwoLines.GetValue() ) + { + sal_Unicode cStart = rTwoLines.GetStartBracket(); + sal_Unicode cEnd = rTwoLines.GetEndBracket(); + + USHORT nType; + if( !cStart && !cEnd ) + nType = 0; + else if( '{' == cStart || '}' == cEnd ) + nType = 4; + else if( '<' == cStart || '>' == cEnd ) + nType = 3; + else if( '[' == cStart || ']' == cEnd ) + nType = 2; + else // all other kind of brackets + nType = 1; + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_TWOINONE); + m_aStyles.append((sal_Int32)nType); + } +} + +void RtfAttributeOutput::CharScaleWidth( const SvxCharScaleWidthItem& rScaleWidth ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_CHARSCALEX); + m_aStyles.append((sal_Int32)rScaleWidth.GetValue()); +} + +void RtfAttributeOutput::CharRelief( const SvxCharReliefItem& rRelief ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + const sal_Char* pStr; + switch (rRelief.GetValue()) + { + case RELIEF_EMBOSSED: + pStr = OOO_STRING_SVTOOLS_RTF_EMBO; + break; + case RELIEF_ENGRAVED: + pStr = OOO_STRING_SVTOOLS_RTF_IMPR; + break; + default: + pStr = 0; + break; + } + + if (pStr) + m_aStyles.append(pStr); +} + +void RtfAttributeOutput::CharHidden( const SvxCharHiddenItem& rHidden ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_V); + if ( !rHidden.GetValue() ) + m_aStyles.append((sal_Int32)0); +} + +void RtfAttributeOutput::TextINetFormat( const SwFmtINetFmt& rURL ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if( rURL.GetValue().Len() ) + { + const SwCharFmt* pFmt; + const SwTxtINetFmt* pTxtAtr = rURL.GetTxtINetFmt(); + + m_aStyles.append("{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " "); + if( pTxtAtr && 0 != ( pFmt = pTxtAtr->GetCharFmt() )) + { + USHORT nStyle = m_rExport.GetId( *pFmt ); + OString* pString = m_rExport.GetStyle(nStyle); + if (pString) + m_aStyles.append(*pString); + } + } +} + +void RtfAttributeOutput::TextCharFormat( const SwFmtCharFmt& rCharFmt ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + USHORT nStyle = m_rExport.GetId( *rCharFmt.GetCharFmt() ); + OString* pString = m_rExport.GetStyle(nStyle); + if (pString) + m_aStyles.append(*pString); +} + +void RtfAttributeOutput::WriteTextFootnoteNumStr(const SwFmtFtn& rFootnote) +{ + if (!rFootnote.GetNumStr().Len()) + m_aRun.append(OOO_STRING_SVTOOLS_RTF_CHFTN); + else + m_aRun.append(m_rExport.OutString(rFootnote.GetNumStr(), m_rExport.eCurrentEncoding)); +} + +void RtfAttributeOutput::TextFootnote_Impl( const SwFmtFtn& rFootnote ) +{ + OSL_TRACE("%s start", __PRETTY_FUNCTION__); + + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_SUPER " "); + WriteTextFootnoteNumStr(rFootnote); + m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FOOTNOTE); + if( rFootnote.IsEndNote() ) + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FTNALT); + m_aRun.append(' '); + WriteTextFootnoteNumStr(rFootnote); + + /* + * The footnote contains a whole paragraph, so we have to: + * 1) Reset, then later restore the contents of our run buffer. + * 2) Buffer the output of the whole paragraph, as we do so for section headers already. + */ + const SwNodeIndex* pIndex = rFootnote.GetTxtFtn()->GetStartNode(); + OStringBuffer aRun = m_aRun; + m_aRun.setLength(0); + m_bBufferSectionHeaders = true; + m_rExport.WriteSpecialText( pIndex->GetIndex() + 1, + pIndex->GetNode().EndOfSectionIndex(), + !rFootnote.IsEndNote() ? TXT_FTN : TXT_EDN); + m_bBufferSectionHeaders = false; + m_aRun = aRun; + m_aRun.append(m_aSectionHeaders.makeStringAndClear()); + + m_aRun.append("}"); + m_aRun.append("}"); + + OSL_TRACE("%s end", __PRETTY_FUNCTION__); +} + +void RtfAttributeOutput::ParaLineSpacing_Impl( short nSpace, short nMulti ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_SL); + m_aStyles.append((sal_Int32)nSpace); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_SLMULT); + m_aStyles.append((sal_Int32)nMulti); + +} + +void RtfAttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + switch ( rAdjust.GetAdjust() ) + { + case SVX_ADJUST_LEFT: + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_QL); + break; + case SVX_ADJUST_RIGHT: + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_QR); + break; + case SVX_ADJUST_BLOCKLINE: + case SVX_ADJUST_BLOCK: + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_QJ); + break; + case SVX_ADJUST_CENTER: + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_QC); + break; + default: + break; + } +} + +void RtfAttributeOutput::ParaSplit( const SvxFmtSplitItem& rSplit ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if( !rSplit.GetValue() ) + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_KEEP); +} + +void RtfAttributeOutput::ParaWidows( const SvxWidowsItem& rWidows ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if (rWidows.GetValue()) + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_WIDCTLPAR); + else + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_NOWIDCTLPAR); +} + +void RtfAttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStop ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + long nOffset = ((SvxLRSpaceItem&)m_rExport.GetItem( RES_LR_SPACE )).GetTxtLeft(); + for( USHORT n = 0; n < rTabStop.Count(); n++ ) + { + const SvxTabStop & rTS = rTabStop[ n ]; + if( SVX_TAB_ADJUST_DEFAULT != rTS.GetAdjustment() ) + { + const char* pFill = 0; + switch( rTS.GetFill() ) + { + case cDfltFillChar: + break; + + case '.': pFill = OOO_STRING_SVTOOLS_RTF_TLDOT; break; + case '_': pFill = OOO_STRING_SVTOOLS_RTF_TLUL; break; + case '-': pFill = OOO_STRING_SVTOOLS_RTF_TLTH; break; + case '=': pFill = OOO_STRING_SVTOOLS_RTF_TLEQ; break; + default: + break; + } + if( pFill ) + m_aStyles.append(pFill); + + const sal_Char* pAdjStr = 0; + switch (rTS.GetAdjustment()) + { + case SVX_TAB_ADJUST_RIGHT: + pAdjStr = OOO_STRING_SVTOOLS_RTF_TQR; + break; + case SVX_TAB_ADJUST_DECIMAL: + pAdjStr = OOO_STRING_SVTOOLS_RTF_TQDEC; + break; + case SVX_TAB_ADJUST_CENTER: + pAdjStr = OOO_STRING_SVTOOLS_RTF_TQC; + break; + default: + break; + } + if (pAdjStr) + m_aStyles.append(pAdjStr); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_TX); + m_aStyles.append((sal_Int32)(rTS.GetTabPos() + nOffset)); + } + else + { + m_aTabStop.append( OOO_STRING_SVTOOLS_RTF_DEFTAB ); + m_aTabStop.append( (sal_Int32)rTabStop[0].GetTabPos() ); + } + } +} + +void RtfAttributeOutput::ParaHyphenZone( const SvxHyphenZoneItem& rHyphenZone ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + sal_Int32 nFlags = rHyphenZone.IsHyphen() ? 1 : 0; + if( rHyphenZone.IsPageEnd() ) + nFlags += 2; + m_aStyles.append('{'); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_IGNORE); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_HYPHEN); + m_aStyles.append((sal_Int32)nFlags); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_HYPHLEAD); + m_aStyles.append((sal_Int32)rHyphenZone.GetMinLead()); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_HYPHTRAIL); + m_aStyles.append((sal_Int32)rHyphenZone.GetMinTrail()); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_HYPHMAX); + m_aStyles.append((sal_Int32)rHyphenZone.GetMaxHyphens()); + m_aStyles.append('}'); +} + +void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nLvl, sal_Int32 nNumId ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( USHRT_MAX == nNumId || 0 == nNumId || 0 == pTxtNd) + return; + + const SwNumRule* pRule = pTxtNd->GetNumRule(); + + // --> OD 2008-03-18 #refactorlists# + // if( pRule && MAXLEVEL > pTxtNd->GetActualListLevel() ) + if( pRule && pTxtNd->IsInList() ) + // <-- + { + // --> OD 2008-03-18 #refactorlists# + ASSERT( pTxtNd->GetActualListLevel() >= 0 && pTxtNd->GetActualListLevel() < MAXLEVEL, + " - text node does not have valid list level. Serious defect -> please inform OD" ); + // <-- + + const bool bExportNumRule = USHRT_MAX != nNumId; + const SwNumFmt* pFmt = pRule->GetNumFmt( nLvl ); + if( !pFmt ) + pFmt = &pRule->Get( nLvl ); + + const SfxItemSet& rNdSet = pTxtNd->GetSwAttrSet(); + + if ( bExportNumRule ) { + m_aStyles.append('{'); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_LISTTEXT); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_PARD); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_PLAIN); + m_aStyles.append(' '); + } + + SvxLRSpaceItem aLR( (SvxLRSpaceItem&)rNdSet.Get( RES_LR_SPACE ) ); + aLR.SetTxtLeft( aLR.GetTxtLeft() + pFmt->GetAbsLSpace() ); + aLR.SetTxtFirstLineOfst( pFmt->GetFirstLineOffset() ); + FormatLRSpace(aLR); + + USHORT nStyle = m_rExport.GetId( *pFmt->GetCharFmt() ); + OString* pString = m_rExport.GetStyle(nStyle); + if (pString) + m_aStyles.append(*pString); + + { + String sTxt; + if( SVX_NUM_CHAR_SPECIAL == pFmt->GetNumberingType() || SVX_NUM_BITMAP == pFmt->GetNumberingType() ) + sTxt = pFmt->GetBulletChar(); + else + sTxt = pTxtNd->GetNumString(); + + m_aStyles.append(' '); + + if (sTxt.Len()) + { + m_aStyles.append(m_rExport.OutString(sTxt, m_rExport.eDefaultEncoding)); + } + + if( bExportNumRule ) + { + if( OUTLINE_RULE != pRule->GetRuleType() ) + { + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_TAB); + m_aStyles.append('}'); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_ILVL); + if( nLvl > 8 ) // RTF knows only 9 levels + { + m_aStyles.append((sal_Int32)8); + m_aStyles.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_SOUTLVL); + m_aStyles.append((sal_Int32)nLvl); + m_aStyles.append('}'); + } + else + m_aStyles.append((sal_Int32)nLvl); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_LS); + m_aStyles.append((sal_Int32)m_rExport.GetId(*pRule)); + m_aStyles.append(' '); + } + else + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_TAB "}"); + } + else if( sTxt.Len() ) + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_TAB); + } + } +} + +void RtfAttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if (!rScriptSpace.GetValue( )) + return; + switch ( rScriptSpace.Which( ) ) + { + case RES_PARATR_SCRIPTSPACE: + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_ASPALPHA); + break; + /* Is this needed? + case RES_PARATR_HANGINGPUNCTUATION: + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_NOOVERFLOW); + break; + case RES_PARATR_FORBIDDEN_RULES: + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_NOCWRAP); + break;*/ + default: + break; + } +} + +void RtfAttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + const char* pStr; + switch ( rAlign.GetValue() ) + { + case SvxParaVertAlignItem::TOP: pStr = OOO_STRING_SVTOOLS_RTF_FAHANG; break; + case SvxParaVertAlignItem::BOTTOM: pStr = OOO_STRING_SVTOOLS_RTF_FAVAR; break; + case SvxParaVertAlignItem::CENTER: pStr = OOO_STRING_SVTOOLS_RTF_FACENTER; break; + case SvxParaVertAlignItem::BASELINE: pStr = OOO_STRING_SVTOOLS_RTF_FAROMAN; break; + // default == SvxParaVertAlignItem::AUTOMATIC + default: pStr = OOO_STRING_SVTOOLS_RTF_FAAUTO; break; + } + m_aStyles.append(pStr); +} + +void RtfAttributeOutput::ParaSnapToGrid( const SvxParaGridItem& /*rGrid*/ ) +{ + OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); +} + +void RtfAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( m_rExport.bOutFlyFrmAttrs && m_rExport.bRTFFlySyntax ) + { + if( rSize.GetWidth() ) + { + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_ABSW); + m_aRunText.append((sal_Int32)rSize.GetWidth()); + } + + if( rSize.GetHeight() ) + { + long nH = rSize.GetHeight(); + if( ATT_FIX_SIZE == rSize.GetHeightSizeType() ) + nH = -nH; + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_ABSH); + m_aRunText.append((sal_Int32)nH); + } + } + else if (m_rExport.bOutPageDescs) + { + m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_PGWSXN); + m_aSectionBreaks.append((sal_Int32)rSize.GetWidth()); + m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_PGHSXN); + m_aSectionBreaks.append((sal_Int32)rSize.GetHeight()); + if (!m_bBufferSectionBreaks) + m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear(); + } +} + +void RtfAttributeOutput::FormatPaperBin( const SvxPaperBinItem& ) +{ + OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); +} + +void RtfAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( !m_rExport.bOutFlyFrmAttrs ) + { + if( m_rExport.bOutPageDescs ) + { + if( rLRSpace.GetLeft() ) + { + m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_MARGLSXN); + m_aSectionBreaks.append((sal_Int32)rLRSpace.GetLeft()); + } + if( rLRSpace.GetRight() ) + { + m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_MARGRSXN); + m_aSectionBreaks.append((sal_Int32)rLRSpace.GetRight()); + } + if (!m_bBufferSectionBreaks) + m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear(); + } + else + { + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_LI); + m_aStyles.append( (sal_Int32) rLRSpace.GetTxtLeft() ); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_RI); + m_aStyles.append( (sal_Int32) rLRSpace.GetRight() ); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_LIN); + m_aStyles.append( (sal_Int32) rLRSpace.GetTxtLeft() ); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_RIN); + m_aStyles.append( (sal_Int32) rLRSpace.GetRight() ); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_FI); + m_aStyles.append( (sal_Int32) rLRSpace.GetTxtFirstLineOfst() ); + } + } +} + +void RtfAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( !m_rExport.bOutFlyFrmAttrs ) + { + if( m_rExport.bOutPageDescs ) + { + if( rULSpace.GetUpper() ) + { + m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_MARGTSXN); + m_aSectionBreaks.append((sal_Int32)rULSpace.GetUpper()); + } + if( rULSpace.GetLower() ) + { + m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_MARGBSXN); + m_aSectionBreaks.append((sal_Int32)rULSpace.GetLower()); + } + if (!m_bBufferSectionBreaks) + m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear(); + } + else + { + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_SB); + m_aStyles.append( (sal_Int32) rULSpace.GetUpper() ); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_SA); + m_aStyles.append( (sal_Int32) rULSpace.GetLower() ); + } + } +} + +void RtfAttributeOutput::FormatSurround( const SwFmtSurround& rSurround ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( m_rExport.bOutFlyFrmAttrs && !m_rExport.bRTFFlySyntax ) + { + SwSurround eSurround = rSurround.GetSurround(); + BOOL bGold = SURROUND_IDEAL == eSurround; + if( bGold ) + eSurround = SURROUND_PARALLEL; + RTFSurround aMC( bGold, static_cast< BYTE >(eSurround) ); + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYMAINCNT); + m_aRunText.append( (sal_Int32) aMC.GetValue() ); + } +} + +void RtfAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& rFlyVert ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( m_rExport.bOutFlyFrmAttrs && m_rExport.bRTFFlySyntax ) + { + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_PVPARA); + + switch (rFlyVert.GetVertOrient()) + { + case text::VertOrientation::TOP: + case text::VertOrientation::LINE_TOP: + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_POSYT); + break; + case text::VertOrientation::BOTTOM: + case text::VertOrientation::LINE_BOTTOM: + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_POSYB); + break; + case text::VertOrientation::CENTER: + case text::VertOrientation::LINE_CENTER: + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_POSYC); + break; + case text::VertOrientation::NONE: + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_POSY); + m_aRunText.append((sal_Int32)rFlyVert.GetPos()); + break; + default: + break; + } + } + else if ( !m_rExport.bRTFFlySyntax ) + { + RTFVertOrient aVO( static_cast< USHORT >(rFlyVert.GetVertOrient()), static_cast< USHORT >(rFlyVert.GetRelationOrient()) ); + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYVERT); + m_aRunText.append((sal_Int32)aVO.GetValue()); + } +} + +void RtfAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHori ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( m_rExport.bOutFlyFrmAttrs && m_rExport.bRTFFlySyntax ) + { + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_PHCOL); + + const char* pS = 0; + switch(rFlyHori.GetHoriOrient()) + { + case text::HoriOrientation::RIGHT: + pS = rFlyHori.IsPosToggle() ? OOO_STRING_SVTOOLS_RTF_POSXO : OOO_STRING_SVTOOLS_RTF_POSXR; + break; + case text::HoriOrientation::LEFT: + pS = rFlyHori.IsPosToggle() ? OOO_STRING_SVTOOLS_RTF_POSXI : OOO_STRING_SVTOOLS_RTF_POSXL; + break; + case text::HoriOrientation::CENTER: + pS = OOO_STRING_SVTOOLS_RTF_POSXC; + break; + case text::HoriOrientation::NONE: + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_POSX); + m_aRunText.append((sal_Int32)rFlyHori.GetPos()); + break; + default: + break; + } + if (pS) + m_aRunText.append(pS); + } else if ( !m_rExport.bRTFFlySyntax ) + { + RTFHoriOrient aHO( static_cast< USHORT >(rFlyHori.GetHoriOrient()), + static_cast< USHORT >(rFlyHori.GetRelationOrient()) ); + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYHORZ); + m_aRunText.append((sal_Int32)aHO.GetValue()); + } +} + +void RtfAttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( !m_rExport.bRTFFlySyntax ) + { + USHORT nId = static_cast< USHORT >(rAnchor.GetAnchorId()); + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYANCHOR); + m_aRunText.append((sal_Int32)nId); + switch( nId ) + { + case FLY_PAGE: + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYPAGE); + m_aRunText.append((sal_Int32)rAnchor.GetPageNum()); + break; + case FLY_AT_CNTNT: + case FLY_IN_CNTNT: + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYCNTNT); + break; + } + } +} + +void RtfAttributeOutput::FormatBackground( const SvxBrushItem& rBrush ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if( !rBrush.GetColor().GetTransparency() ) + { + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_CHCBPAT); + m_aStyles.append((sal_Int32)m_rExport.GetColor(rBrush.GetColor())); + } +} + +void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + static USHORT __READONLY_DATA aBorders[] = { + BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT }; + static const sal_Char* aBorderNames[] = { + OOO_STRING_SVTOOLS_RTF_BRDRT, OOO_STRING_SVTOOLS_RTF_BRDRL, OOO_STRING_SVTOOLS_RTF_BRDRB, OOO_STRING_SVTOOLS_RTF_BRDRR }; + + USHORT nDist = rBox.GetDistance(); + + if( rBox.GetTop() && rBox.GetBottom() && + rBox.GetLeft() && rBox.GetRight() && + *rBox.GetTop() == *rBox.GetBottom() && + *rBox.GetTop() == *rBox.GetLeft() && + *rBox.GetTop() == *rBox.GetRight() && + nDist == rBox.GetDistance( BOX_LINE_TOP ) && + nDist == rBox.GetDistance( BOX_LINE_LEFT ) && + nDist == rBox.GetDistance( BOX_LINE_BOTTOM ) && + nDist == rBox.GetDistance( BOX_LINE_RIGHT )) + m_aSectionBreaks.append(OutBorderLine( m_rExport, rBox.GetTop(), OOO_STRING_SVTOOLS_RTF_BOX, nDist )); + else + { + const USHORT* pBrd = aBorders; + const sal_Char** pBrdNms = (const sal_Char**)aBorderNames; + for(int i = 0; i < 4; ++i, ++pBrd, ++pBrdNms) + { + if (const SvxBorderLine* pLn = rBox.GetLine(*pBrd)) + { + m_aSectionBreaks.append(OutBorderLine(m_rExport, pLn, *pBrdNms, + rBox.GetDistance(*pBrd))); + } + } + } + + const USHORT* pBrd = aBorders; + const sal_Char** pBrdNms = (const sal_Char**)aBorderNames; + for( int i = 0; i < 4; ++i, ++pBrd, ++pBrdNms ) + { + const SvxBorderLine* pLn = rBox.GetLine( *pBrd ); + if( pLn ) + { + m_aSectionBreaks.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE); + m_aSectionBreaks.append(OutBorderLine( m_rExport, pLn, *pBrdNms )); + m_aSectionBreaks.append("}" OOO_STRING_SVTOOLS_RTF_BRSP); + m_aSectionBreaks.append((sal_Int32)rBox.GetDistance( *pBrd )); + } + } + + if (!m_bBufferSectionBreaks) + m_aStyles.append(m_aSectionBreaks.makeStringAndClear()); +} + +void RtfAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_COLS; + m_rExport.OutLong( nCols ); + + if( bEven ) + { + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_COLSX; + m_rExport.OutLong( rCol.GetGutterWidth( TRUE ) ); + } + else + { + const SwColumns & rColumns = rCol.GetColumns( ); + for( USHORT n = 0; n < nCols; ) + { + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_COLNO; + m_rExport.OutLong( n+1 ); + + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_COLW; + m_rExport.OutLong( rCol.CalcPrtColWidth( n, nPageSize ) ); + + if( ++n != nCols ) + { + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_COLSR; + m_rExport.OutLong( rColumns[ n-1 ]->GetRight() + + rColumns[ n ]->GetLeft() ); + } + } + } +} + +void RtfAttributeOutput::FormatKeep( const SvxFmtKeepItem& rItem ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if( rItem.GetValue() ) + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_KEEPN); +} + +void RtfAttributeOutput::FormatTextGrid( const SwTextGridItem& /*rGrid*/ ) +{ + OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); +} + +void RtfAttributeOutput::FormatLineNumbering( const SwFmtLineNumber& rNumbering ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( !rNumbering.IsCount( ) ) + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_NOLINE); +} + +void RtfAttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDirection ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if (!m_rExport.bOutPageDescs) + { + if (rDirection.GetValue() == FRMDIR_HORI_RIGHT_TOP) + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_RTLPAR); + else + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_LTRPAR); + } +} + +void RtfAttributeOutput::WriteExpand( const SwField* /*pFld*/ ) +{ + OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); +} + +void RtfAttributeOutput::RefField( const SwField& /*rFld*/, const String& /*rRef*/ ) +{ + OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); +} + +void RtfAttributeOutput::HiddenField( const SwField& /*rFld*/ ) +{ + OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); +} + +void RtfAttributeOutput::SetField( const SwField& /*rFld*/, ww::eField /*eType*/, const String& /*rCmd*/ ) +{ + OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); +} + +void RtfAttributeOutput::PostitField( const SwField* pFld ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + const SwPostItField& rPFld = *(SwPostItField*)pFld; + + m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_ATNID " "); + m_aRunText.append(OUStringToOString(OUString(rPFld.GetPar1()), m_rExport.eCurrentEncoding)); + m_aRunText.append("}"); + m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_ATNAUTHOR " "); + m_aRunText.append(OUStringToOString(OUString(rPFld.GetPar1()), m_rExport.eCurrentEncoding)); + m_aRunText.append("}"); + m_aRunText.append(OOO_STRING_SVTOOLS_RTF_CHATN); + + m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_ANNOTATION); + m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_ATNDATE " "); + m_aRunText.append((sal_Int32)sw::ms::DateTime2DTTM(rPFld.GetDate())); + m_aRunText.append('}'); + m_aRunText.append(OUStringToOString(OUString(rPFld.GetTxt()), m_rExport.eCurrentEncoding)); + m_aRunText.append('}'); +} + +bool RtfAttributeOutput::DropdownField( const SwField* /*pFld*/ ) +{ + // this is handled in OutputFlyFrame_Impl() + return true; +} + +RtfAttributeOutput::RtfAttributeOutput( RtfExport &rExport ) + : m_rExport( rExport ), + m_pTableWrt( NULL ), + m_bTableCellOpen( false ), + m_nTableDepth( 0 ), + m_bTblAfterCell( false ), + m_nColBreakNeeded( false ), + m_bBufferSectionBreaks( false ), + m_bBufferSectionHeaders( false ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); +} + +RtfAttributeOutput::~RtfAttributeOutput() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); +} + +MSWordExportBase& RtfAttributeOutput::GetExport() +{ + return m_rExport; +} + +// These are used by wwFont::WriteRtf() + +/// Start the font. +void RtfAttributeOutput::StartFont( const String& rFamilyName ) const +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_rExport.Strm() << OUStringToOString( OUString( rFamilyName ), m_rExport.eCurrentEncoding ).getStr(); +} + +/// End the font. +void RtfAttributeOutput::EndFont() const +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_rExport.Strm() << ";}"; +} + +/// Alternate name for the font. +void RtfAttributeOutput::FontAlternateName( const String& rName ) const +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_FALT << ' '; + m_rExport.Strm() << OUStringToOString( OUString( rName ), m_rExport.eCurrentEncoding ) << '}'; +} + +/// Font charset. +void RtfAttributeOutput::FontCharset( sal_uInt8 nCharSet ) const +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_FCHARSET; + m_rExport.OutULong( nCharSet ); + m_rExport.Strm() << ' '; +} + +/// Font family. +void RtfAttributeOutput::FontFamilyType( FontFamily eFamily, const wwFont &rFont ) const +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_F; + + const char* pStr = OOO_STRING_SVTOOLS_RTF_FNIL; + switch (eFamily) + { + case FAMILY_ROMAN: + pStr = OOO_STRING_SVTOOLS_RTF_FROMAN; + break; + case FAMILY_SWISS: + pStr = OOO_STRING_SVTOOLS_RTF_FSWISS; + break; + case FAMILY_MODERN: + pStr = OOO_STRING_SVTOOLS_RTF_FMODERN; + break; + case FAMILY_SCRIPT: + pStr = OOO_STRING_SVTOOLS_RTF_FSCRIPT; + break; + case FAMILY_DECORATIVE: + pStr = OOO_STRING_SVTOOLS_RTF_FDECOR; + break; + default: + break; + } + m_rExport.OutULong(m_rExport.maFontHelper.GetId(rFont)) << pStr; +} + +/// Font pitch. +void RtfAttributeOutput::FontPitchType( FontPitch ePitch ) const +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_FPRQ; + + USHORT nVal = 0; + switch (ePitch) + { + case PITCH_FIXED: + nVal = 1; + break; + case PITCH_VARIABLE: + nVal = 2; + break; + default: + break; + } + m_rExport.OutULong(nVal); +} + +static bool IsEMF(const sal_uInt8 *pGraphicAry, unsigned long nSize) +{ + if (pGraphicAry && (nSize > 0x2c )) + { + // check the magic number + if ( + (pGraphicAry[0x28] == 0x20 ) && (pGraphicAry[0x29] == 0x45) && + (pGraphicAry[0x2a] == 0x4d ) && (pGraphicAry[0x2b] == 0x46) + ) + { + //emf detected + return true; + } + } + return false; +} + +static bool StripMetafileHeader(const sal_uInt8 *&rpGraphicAry, unsigned long &rSize) +{ + if (rpGraphicAry && (rSize > 0x22)) + { + if ( + (rpGraphicAry[0] == 0xd7) && (rpGraphicAry[1] == 0xcd) && + (rpGraphicAry[2] == 0xc6) && (rpGraphicAry[3] == 0x9a) + ) + { // we have to get rid of the metafileheader + rpGraphicAry += 22; + rSize -= 22; + return true; + } + } + return false; +} + +static OString WriteHex(const sal_uInt8* pData, sal_uInt32 nSize, sal_uInt32 nLimit = 64) +{ + OStringBuffer aRet; + + sal_uInt32 nBreak = 0; + for (sal_uInt32 i = 0; i < nSize; i++) + { + OString sNo = OString::valueOf(sal_Int32(pData[i]), 16); + if (sNo.getLength() < 2) + aRet.append('0'); + aRet.append(sNo); + if (++nBreak == nLimit) + { + aRet.append(RtfExport::sNewLine); + nBreak = 0; + } + } + + return aRet.makeStringAndClear(); +} + +static OString WriteHex(sal_Int32 nNum) +{ + return WriteHex((sal_uInt8*)&nNum, sizeof(sal_Int32)); +} + +static OString WriteHex(OString sString) +{ + OStringBuffer aRet; + + aRet.append(WriteHex(sString.getLength()+1)); + aRet.append(WriteHex((sal_uInt8*)sString.getStr(), sString.getLength()+1)); + + return aRet.makeStringAndClear(); +} + +static OString ExportPICT(const Size &rOrig, const Size &rRendered, const Size &rMapped, + const SwCropGrf &rCr, const char *pBLIPType, const sal_uInt8 *pGraphicAry, + unsigned long nSize) +{ + OStringBuffer aRet; + bool bIsWMF = (const char *)pBLIPType == (const char *)OOO_STRING_SVTOOLS_RTF_WMETAFILE ? true : false; + if (pBLIPType && nSize && pGraphicAry) + { + aRet.append("{" OOO_STRING_SVTOOLS_RTF_PICT); + + long nXCroppedSize = rOrig.Width()-(rCr.GetLeft() + rCr.GetRight()); + long nYCroppedSize = rOrig.Height()-(rCr.GetTop() + rCr.GetBottom()); + /* #127543#: Graphic with a zero height or width, typically copied from webpages, caused + crashes. */ + if( !nXCroppedSize ) + nXCroppedSize = 100; + if( !nYCroppedSize ) + nYCroppedSize = 100; + + //Given the original size and taking cropping into account + //first, how much has the original been scaled to get the + //final rendered size + aRet.append(OOO_STRING_SVTOOLS_RTF_PICSCALEX); + aRet.append((sal_Int32)((100 * rRendered.Width()) / nXCroppedSize)); + aRet.append(OOO_STRING_SVTOOLS_RTF_PICSCALEY); + aRet.append((sal_Int32)((100 * rRendered.Height()) / nYCroppedSize)); + + aRet.append(OOO_STRING_SVTOOLS_RTF_PICCROPL); + aRet.append((sal_Int32)rCr.GetLeft()); + aRet.append(OOO_STRING_SVTOOLS_RTF_PICCROPR); + aRet.append((sal_Int32)rCr.GetRight()); + aRet.append(OOO_STRING_SVTOOLS_RTF_PICCROPT); + aRet.append((sal_Int32)rCr.GetTop()); + aRet.append(OOO_STRING_SVTOOLS_RTF_PICCROPB); + aRet.append((sal_Int32)rCr.GetBottom()); + + aRet.append(OOO_STRING_SVTOOLS_RTF_PICW); + aRet.append((sal_Int32)rMapped.Width()); + aRet.append(OOO_STRING_SVTOOLS_RTF_PICH); + aRet.append((sal_Int32)rMapped.Height()); + + aRet.append(OOO_STRING_SVTOOLS_RTF_PICWGOAL); + aRet.append((sal_Int32)rOrig.Width()); + aRet.append(OOO_STRING_SVTOOLS_RTF_PICHGOAL); + aRet.append((sal_Int32)rOrig.Height()); + + aRet.append(pBLIPType); + if (bIsWMF) + { + aRet.append((sal_Int32)8); + StripMetafileHeader(pGraphicAry, nSize); + } + aRet.append(RtfExport::sNewLine); + aRet.append(WriteHex(pGraphicAry, nSize)); + aRet.append('}'); + } + return aRet.makeStringAndClear(); +} + +void RtfAttributeOutput::FlyFrameOLEData( SwOLENode& rOLENode ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + uno::Reference < embed::XEmbeddedObject > xObj(const_cast(rOLENode).GetOLEObj().GetOleRef()); + sal_Int64 nAspect = rOLENode.GetAspect(); + svt::EmbeddedObjectRef aObjRef( xObj, nAspect ); + SvGlobalName aObjName(aObjRef->getClassID()); + + if (SotExchange::IsMath(aObjName)) + { + // ObjectHeader + m_aRunText.append(WriteHex(0x00000501)); // OLEVersion + m_aRunText.append(WriteHex(0x00000002)); // FormatID + m_aRunText.append(WriteHex(OString("Equation.3"))); // ClassName + m_aRunText.append(WriteHex(0x00000000)); // TopicName + m_aRunText.append(WriteHex(0x00000000)); // ItemName + + // NativeData + SvMemoryStream *pStream = new SvMemoryStream; + SvStorage* pStorage = new SvStorage(*pStream); + m_rExport.pOLEExp->ExportOLEObject( aObjRef, *pStorage ); + pStream->Seek(STREAM_SEEK_TO_END); + sal_uInt32 nNativeDataSize = pStream->Tell(); + const sal_uInt8* pNativeData = (sal_uInt8*)pStream->GetData(); + m_aRunText.append(WriteHex(nNativeDataSize)); + m_aRunText.append(RtfExport::sNewLine); + m_aRunText.append(WriteHex(pNativeData, nNativeDataSize, 126)); + m_aRunText.append(RtfExport::sNewLine); + delete pStream; + + // MetaFilePresentationObject + pStream = new SvMemoryStream; + Graphic* pGraphic = rOLENode.GetGraphic(); + if (GraphicConverter::Export(*pStream, *pGraphic, CVT_WMF) != ERRCODE_NONE) + OSL_ENSURE(false, "failed to export the presentation data"); + pStream->Seek(STREAM_SEEK_TO_END); + sal_uInt32 nPresentationDataSize = pStream->Tell(); + const sal_uInt8* pPresentationData = (sal_uInt8*)pStream->GetData(); + m_aRunText.append(WriteHex(pPresentationData, nPresentationDataSize, 126)); + } +} + +void RtfAttributeOutput::FlyFrameOLE( SwOLENode& rOLENode, const Size& rSize ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + SvMemoryStream aStream; + const sal_uInt8* pGraphicAry = 0; + sal_uInt32 nSize = 0; + Graphic* pGraphic = rOLENode.GetGraphic(); + + Size aSize(sw::util::GetSwappedInSize(rOLENode)); + Size aRendered(aSize); + aRendered.Width() = rSize.Width(); + aRendered.Height() = rSize.Height(); + Size aMapped(pGraphic->GetPrefSize()); + const SwCropGrf &rCr = (const SwCropGrf &)rOLENode.GetAttr(RES_GRFATR_CROPGRF); + const sal_Char* pBLIPType = OOO_STRING_SVTOOLS_RTF_WMETAFILE; + + if (GraphicConverter::Export(aStream, *pGraphic, CVT_WMF) != ERRCODE_NONE) + OSL_ENSURE(false, "failed to export the graphic"); + aStream.Seek(STREAM_SEEK_TO_END); + nSize = aStream.Tell(); + pGraphicAry = (sal_uInt8*)aStream.GetData(); + + m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_OBJECT OOO_STRING_SVTOOLS_RTF_OBJEMB); + + // export the object data in the appropriate format; RTF requires the usage of the OLE 1.0 format + m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_OBJDATA " "); + FlyFrameOLEData(rOLENode); + m_aRunText.append("}{" OOO_STRING_SVTOOLS_RTF_RESULT); + + SwTwips nHeight = aSize.Height(); + nHeight/=20; //nHeight was in twips, want it in half points, but then half of total height. + long nFontHeight = ((const SvxFontHeightItem&)m_rExport.GetItem(RES_CHRATR_FONTSIZE)).GetHeight(); + nHeight-=nFontHeight/20; + m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_DN).append(nHeight); + m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_SHPPICT); + m_aRunText.append(ExportPICT(aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize)); + m_aRunText.append("}}}}"); +} + +void RtfAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + SvMemoryStream aStream; + const sal_uInt8* pGraphicAry = 0; + sal_uInt32 nSize = 0; + + Graphic aGraphic(rGrfNode.GetGrf()); + + // If there is no graphic there is not much point in parsing it + if(aGraphic.GetType()==GRAPHIC_NONE) + return; + + GfxLink aGraphicLink; + const sal_Char* pBLIPType = 0; + if (aGraphic.IsLink()) + { + aGraphicLink = aGraphic.GetLink(); + nSize = aGraphicLink.GetDataSize(); + pGraphicAry = aGraphicLink.GetData(); + switch (aGraphicLink.GetType()) + { + case GFX_LINK_TYPE_NATIVE_JPG: + pBLIPType = OOO_STRING_SVTOOLS_RTF_JPEGBLIP; + break; + case GFX_LINK_TYPE_NATIVE_PNG: + pBLIPType = OOO_STRING_SVTOOLS_RTF_PNGBLIP; + break; + case GFX_LINK_TYPE_NATIVE_WMF: + pBLIPType = + IsEMF(pGraphicAry, nSize) ? OOO_STRING_SVTOOLS_RTF_EMFBLIP : OOO_STRING_SVTOOLS_RTF_WMETAFILE; + break; + default: + break; + } + } + + GraphicType eGraphicType = aGraphic.GetType(); + if (!pGraphicAry) + { + if (ERRCODE_NONE == GraphicConverter::Export(aStream, aGraphic, + (eGraphicType == GRAPHIC_BITMAP) ? CVT_PNG : CVT_WMF)) + { + pBLIPType = (eGraphicType == GRAPHIC_BITMAP) ? + OOO_STRING_SVTOOLS_RTF_PNGBLIP : OOO_STRING_SVTOOLS_RTF_WMETAFILE; + aStream.Seek(STREAM_SEEK_TO_END); + nSize = aStream.Tell(); + pGraphicAry = (sal_uInt8*)aStream.GetData(); + } + } + + Size aMapped(eGraphicType == GRAPHIC_BITMAP ? aGraphic.GetSizePixel() : aGraphic.GetPrefSize()); + + const SwCropGrf &rCr = (const SwCropGrf &)rGrfNode.GetAttr(RES_GRFATR_CROPGRF); + + //Get original size in twips + Size aSize(sw::util::GetSwappedInSize(rGrfNode)); + Size aRendered(aSize); + aRendered.Width() = rSize.Width(); + aRendered.Height() = rSize.Height(); + + /* + If the graphic is not of type WMF then we will have to store two + graphics, one in the native format wrapped in shppict, and the other in + the wmf format wrapped in nonshppict, so as to keep wordpad happy. If its + a wmf already then we don't need any such wrapping + */ + bool bIsWMF = (const sal_Char*)pBLIPType == (const sal_Char*)OOO_STRING_SVTOOLS_RTF_WMETAFILE ? true : false; + if (!bIsWMF) + m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_SHPPICT); + + if (pBLIPType) + m_aRunText.append(ExportPICT(aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize)); + else + { + aStream.Seek(0); + GraphicConverter::Export(aStream, aGraphic, CVT_WMF); + pBLIPType = OOO_STRING_SVTOOLS_RTF_WMETAFILE; + aStream.Seek(STREAM_SEEK_TO_END); + nSize = aStream.Tell(); + pGraphicAry = (sal_uInt8*)aStream.GetData(); + + m_aRunText.append(ExportPICT(aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize)); + } + + if (!bIsWMF) + { + m_aRunText.append("}" "{" OOO_STRING_SVTOOLS_RTF_NONSHPPICT); + + aStream.Seek(0); + GraphicConverter::Export(aStream, aGraphic, CVT_WMF); + pBLIPType = OOO_STRING_SVTOOLS_RTF_WMETAFILE; + aStream.Seek(STREAM_SEEK_TO_END); + nSize = aStream.Tell(); + pGraphicAry = (sal_uInt8*)aStream.GetData(); + + m_aRunText.append(ExportPICT(aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize)); + + m_aRunText.append('}'); + } + + m_aRunText.append(m_rExport.sNewLine); +} + +/* vi:set shiftwidth=4 expandtab: */ diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx new file mode 100644 index 0000000000..6c4de2bb81 --- /dev/null +++ b/sw/source/filter/ww8/rtfattributeoutput.hxx @@ -0,0 +1,572 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2010 Miklos Vajna. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _RTFATTRIBUTEOUTPUT_HXX_ +#define _RTFATTRIBUTEOUTPUT_HXX_ + +#include "attributeoutputbase.hxx" +#include "fields.hxx" + +#include + +#include +#include + +#include + +class RtfExport; + +class SwGrfNode; +class SwOLENode; +class SdrObject; + +class RtfAttributeOutput : public AttributeOutputBase +{ +public: + /// Export the state of RTL/CJK. + virtual void RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript ); + + /// Start of the paragraph. + virtual void StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo ); + + /// End of the paragraph. + virtual void EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ); + + /// Empty paragraph. + virtual void EmptyParagraph(); + + /// Called before we start outputting the attributes. + virtual void StartParagraphProperties( const SwTxtNode& rNode ); + + /// Called after we end outputting the attributes. + virtual void EndParagraphProperties(); + + /// Start of the text run. + virtual void StartRun( const SwRedlineData* pRedlineData ); + + /// End of the text run. + virtual void EndRun(); + + /// Called before we start outputting the attributes. + virtual void StartRunProperties(); + + /// Called after we end outputting the attributes. + virtual void EndRunProperties( const SwRedlineData* pRedlineData ); + + /// Output text (inside a run). + virtual void RunText( const String& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8 ); + + // Access to (anyway) private buffers, used by the sdr exporter + rtl::OStringBuffer& RunText(); + rtl::OStringBuffer& Styles(); + + /// Output text (without markup). + virtual void RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet ); + + /// Output ruby start. + virtual void StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, const SwFmtRuby& rRuby ); + + /// Output ruby end. + virtual void EndRuby(); + + /// Output URL start. + virtual bool StartURL( const String& rUrl, const String& rTarget ); + + /// Output URL end. + virtual bool EndURL(); + + virtual void FieldVanish( const String& rTxt, ww::eField eType ); + + /// Output redlining. + /// + /// The common attribute that can be among the run properties. + virtual void Redline( const SwRedlineData* pRedline ); + + virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ); + + /// Output style. + virtual void ParagraphStyle( USHORT nStyle ); + + virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + + virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + + virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + + virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + + virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + + virtual void TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + + virtual void TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + + virtual void TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + + virtual void TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + + virtual void TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo ); + + virtual void TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner ); + + virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + + virtual void TableRowEnd( sal_uInt32 nDepth ); + + /// Start of the styles table. + virtual void StartStyles(); + + /// End of the styles table. + virtual void EndStyles( USHORT nNumberOfStyles ); + + /// Write default style. + virtual void DefaultStyle( USHORT nStyle ); + + /// Start of a style in the styles table. + virtual void StartStyle( const String& rName, bool bPapFmt, + USHORT nBase, USHORT nNext, USHORT nWwId, USHORT nId, + bool bAutoUpdate ); + + /// End of a style in the styles table. + virtual void EndStyle(); + + /// Start of (paragraph or run) properties of a style. + virtual void StartStyleProperties( bool bParProp, USHORT nStyle ); + + /// End of (paragraph or run) properties of a style. + virtual void EndStyleProperties( bool bParProp ); + + /// Numbering rule and Id. + virtual void OutlineNumbering( BYTE nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt ); + + /// Page break + /// As a paragraph property - the paragraph should be on the next page. + virtual void PageBreakBefore( bool bBreak ); + + /// Write a section break + /// msword::ColumnBreak or msword::PageBreak + virtual void SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo = NULL ); + + /// Start of the section properties. + virtual void StartSection(); + + /// End of the section properties. + virtual void EndSection(); + + /// Protection of forms. + virtual void SectionFormProtection( bool bProtected ); + + /// Numbering of the lines in the document. + virtual void SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo ); + + /// Has different headers/footers for the title page. + virtual void SectionTitlePage(); + + /// Description of the page borders. + virtual void SectionPageBorders( const SwFrmFmt* pFmt, const SwFrmFmt* pFirstPageFmt ); + + /// Columns populated from right/numbers on the right side? + virtual void SectionBiDi( bool bBiDi ); + + /// The style of the page numbers. + /// + /// nPageRestartNumberr being 0 means no restart. + virtual void SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber ); + + /// The type of breaking. + virtual void SectionType( BYTE nBreakCode ); + + /// Definition of a numbering instance. + virtual void NumberingDefinition( USHORT nId, const SwNumRule &rRule ); + + /// Start of the abstract numbering definition instance. + virtual void StartAbstractNumbering( USHORT nId ); + + /// End of the abstract numbering definition instance. + virtual void EndAbstractNumbering(); + + /// All the numbering level information. + virtual void NumberingLevel( BYTE nLevel, + USHORT nStart, + USHORT nNumberingType, + SvxAdjust eAdjust, + const BYTE *pNumLvlPos, + BYTE nFollow, + const wwFont *pFont, + const SfxItemSet *pOutSet, + sal_Int16 nIndentAt, + sal_Int16 nFirstLineIndex, + sal_Int16 nListTabPos, + const String &rNumberingString ); + + void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, BYTE nMode ); + void WriteBookmarks_Impl( std::vector< rtl::OUString >& rStarts, std::vector< rtl::OUString >& rEnds ); + void WriteHeaderFooter_Impl( const SwFrmFmt& rFmt, bool bHeader, const sal_Char* pStr ); + +protected: + /// Output frames - the implementation. + virtual void OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point& rNdTopLeft ); + + /// Sfx item Sfx item RES_CHRATR_CASEMAP + virtual void CharCaseMap( const SvxCaseMapItem& rCaseMap ); + + /// Sfx item Sfx item RES_CHRATR_COLOR + virtual void CharColor( const SvxColorItem& rColor); + + /// Sfx item Sfx item RES_CHRATR_CONTOUR + virtual void CharContour( const SvxContourItem& rContour ); + + /// Sfx item RES_CHRATR_CROSSEDOUT + virtual void CharCrossedOut( const SvxCrossedOutItem& rCrossedOut ); + + /// Sfx item RES_CHRATR_ESCAPEMENT + virtual void CharEscapement( const SvxEscapementItem& rEscapement ); + + /// Sfx item RES_CHRATR_FONT + virtual void CharFont( const SvxFontItem& rFont ); + + /// Sfx item RES_CHRATR_FONTSIZE + virtual void CharFontSize( const SvxFontHeightItem& rFontSize ); + + /// Sfx item RES_CHRATR_KERNING + virtual void CharKerning( const SvxKerningItem& rKerning ); + + /// Sfx item RES_CHRATR_LANGUAGE + virtual void CharLanguage( const SvxLanguageItem& rLanguage ); + + /// Sfx item RES_CHRATR_POSTURE + virtual void CharPosture( const SvxPostureItem& rPosture ); + + /// Sfx item RES_CHRATR_SHADOWED + virtual void CharShadow( const SvxShadowedItem& rShadow ); + + /// Sfx item RES_CHRATR_UNDERLINE + virtual void CharUnderline( const SvxUnderlineItem& rUnderline ); + + /// Sfx item RES_CHRATR_WEIGHT + virtual void CharWeight( const SvxWeightItem& rWeight ); + + /// Sfx item RES_CHRATR_AUTOKERN + virtual void CharAutoKern( const SvxAutoKernItem& ); + + /// Sfx item RES_CHRATR_BLINK + virtual void CharAnimatedText( const SvxBlinkItem& rBlink ); + + /// Sfx item RES_CHRATR_BACKGROUND + virtual void CharBackground( const SvxBrushItem& rBrush ); + + /// Sfx item RES_CHRATR_CJK_FONT + virtual void CharFontCJK( const SvxFontItem& rFont ); + + /// Sfx item RES_CHRATR_CJK_FONTSIZE + virtual void CharFontSizeCJK( const SvxFontHeightItem& rFontSize ); + + /// Sfx item RES_CHRATR_CJK_LANGUAGE + virtual void CharLanguageCJK( const SvxLanguageItem& rLanguageItem ); + + /// Sfx item RES_CHRATR_CJK_POSTURE + virtual void CharPostureCJK( const SvxPostureItem& rPosture ); + + /// Sfx item RES_CHRATR_CJK_WEIGHT + virtual void CharWeightCJK( const SvxWeightItem& rWeight ); + + /// Sfx item RES_CHRATR_CTL_FONT + virtual void CharFontCTL( const SvxFontItem& rFont ); + + /// Sfx item RES_CHRATR_CTL_FONTSIZE + virtual void CharFontSizeCTL( const SvxFontHeightItem& rFontSize ); + + /// Sfx item RES_CHRATR_CTL_LANGUAGE + virtual void CharLanguageCTL( const SvxLanguageItem& rLanguageItem ); + + /// Sfx item RES_CHRATR_CTL_POSTURE + virtual void CharPostureCTL( const SvxPostureItem& rWeight ); + + /// Sfx item RES_CHRATR_CTL_WEIGHT + virtual void CharWeightCTL( const SvxWeightItem& rWeight ); + + /// Sfx item RES_CHRATR_ROTATE + virtual void CharRotate( const SvxCharRotateItem& rRotate ); + + /// Sfx item RES_CHRATR_EMPHASIS_MARK + virtual void CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisMark ); + + /// Sfx item RES_CHRATR_TWO_LINES + virtual void CharTwoLines( const SvxTwoLinesItem& rTwoLines ); + + /// Sfx item RES_CHRATR_SCALEW + virtual void CharScaleWidth( const SvxCharScaleWidthItem& rScaleWidth ); + + /// Sfx item RES_CHRATR_RELIEF + virtual void CharRelief( const SvxCharReliefItem& rRelief); + + /// Sfx item RES_CHRATR_HIDDEN + virtual void CharHidden( const SvxCharHiddenItem& rHidden ); + + /// Sfx item RES_TXTATR_INETFMT + virtual void TextINetFormat( const SwFmtINetFmt& ); + + /// Sfx item RES_TXTATR_CHARFMT + virtual void TextCharFormat( const SwFmtCharFmt& ); + + /// Sfx item RES_TXTATR_FTN + virtual void TextFootnote_Impl( const SwFmtFtn& ); + + /// Sfx item RES_PARATR_LINESPACING + virtual void ParaLineSpacing_Impl( short nSpace, short nMulti ); + + /// Sfx item RES_PARATR_ADJUST + virtual void ParaAdjust( const SvxAdjustItem& rAdjust ); + + /// Sfx item RES_PARATR_SPLIT + virtual void ParaSplit( const SvxFmtSplitItem& rSplit ); + + /// Sfx item RES_PARATR_WIDOWS + virtual void ParaWidows( const SvxWidowsItem& rWidows ); + + /// Sfx item RES_PARATR_TABSTOP + virtual void ParaTabStop( const SvxTabStopItem& rTabStop ); + + /// Sfx item RES_PARATR_HYPHENZONE + virtual void ParaHyphenZone( const SvxHyphenZoneItem& ); + + /// Sfx item RES_PARATR_NUMRULE + virtual void ParaNumRule_Impl( const SwTxtNode *pTxtNd, sal_Int32 nLvl, sal_Int32 nNumId ); + + /// Sfx item RES_PARATR_SCRIPTSPACE + virtual void ParaScriptSpace( const SfxBoolItem& ); + + /// Sfx item RES_PARATR_VERTALIGN + virtual void ParaVerticalAlign( const SvxParaVertAlignItem& rAlign ); + + /// Sfx item RES_PARATR_SNAPTOGRID + virtual void ParaSnapToGrid( const SvxParaGridItem& ); + + /// Sfx item RES_FRM_SIZE + virtual void FormatFrameSize( const SwFmtFrmSize& ); + + /// Sfx item RES_PAPER_BIN + virtual void FormatPaperBin( const SvxPaperBinItem& ); + + /// Sfx item RES_LR_SPACE + virtual void FormatLRSpace( const SvxLRSpaceItem& rLRSpace ); + + /// Sfx item RES_UL_SPACE + virtual void FormatULSpace( const SvxULSpaceItem& rULSpace ); + + /// Sfx item RES_SURROUND + virtual void FormatSurround( const SwFmtSurround& ); + + /// Sfx item RES_VERT_ORIENT + virtual void FormatVertOrientation( const SwFmtVertOrient& ); + + /// Sfx item RES_HORI_ORIENT + virtual void FormatHorizOrientation( const SwFmtHoriOrient& ); + + /// Sfx item RES_ANCHOR + virtual void FormatAnchor( const SwFmtAnchor& ); + + /// Sfx item RES_BACKGROUND + virtual void FormatBackground( const SvxBrushItem& ); + + /// Sfx item RES_BOX + virtual void FormatBox( const SvxBoxItem& ); + + /// Sfx item RES_COL + virtual void FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize ); + + /// Sfx item RES_KEEP + virtual void FormatKeep( const SvxFmtKeepItem& ); + + /// Sfx item RES_TEXTGRID + virtual void FormatTextGrid( const SwTextGridItem& ); + + /// Sfx item RES_LINENUMBER + virtual void FormatLineNumbering( const SwFmtLineNumber& ); + + /// Sfx item RES_FRAMEDIR + virtual void FormatFrameDirection( const SvxFrameDirectionItem& ); + + /// Write the expanded field + virtual void WriteExpand( const SwField* pFld ); + + virtual void RefField( const SwField& rFld, const String& rRef ); + virtual void HiddenField( const SwField& rFld ); + virtual void SetField( const SwField& rFld, ww::eField eType, const String& rCmd ); + virtual void PostitField( const SwField* pFld ); + virtual bool DropdownField( const SwField* pFld ); + + /// Reference to the export, where to get the data from + RtfExport &m_rExport; + +private: + + /// Output graphic fly frames. + void FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize ); + void FlyFrameOLE( SwOLENode& rOLENode, const Size& rSize ); + void FlyFrameOLEData( SwOLENode& rOLENode ); + + /* + * Table methods. + */ + + void InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + + void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + + void StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + + void StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + + void TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + + void EndTableCell( ); + + void EndTableRow( ); + + void EndTable(); + + /// End cell, row, and even the entire table if necessary. + void FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool bForceEmptyParagraph = false ); + + void WriteTextFootnoteNumStr(const SwFmtFtn& rFootnote); + + /* + * Current style name and its ID. + */ + String m_rStyleName; + USHORT m_nStyleId; + /* + * Current list ID. + */ + USHORT m_nListId; + /* + * This is needed because the call order is: run text, run properties, paragraph properties. + * What we need is the opposite. + */ + rtl::OStringBuffer m_aRun; + rtl::OStringBuffer m_aRunText; + /* + * This is written after runs. + */ + rtl::OStringBuffer m_aAfterRuns; + /* + * Same for colors and stylesheets: first we just want to output colors, + * need to buffer the stylesheet table to output it after the color one. + */ + rtl::OStringBuffer m_aStylesheet; + /* + * This one just holds the style commands in the current style. + */ + rtl::OStringBuffer m_aStyles; + /* + * This is the same as m_aStyles but the conents of it is written last. + */ + rtl::OStringBuffer m_aStylesEnd; + + /* + * We just get a "end of strike" mark at the end of strike, store here what to finish: single or double strike. + */ + bool m_bStrikeDouble; + + /* + * The current table helper. + */ + SwWriteTable *m_pTableWrt; + + /* + * Remember if we are in an open cell, or not. + */ + bool m_bTableCellOpen; + + /* + * Remember the current table depth. + */ + sal_uInt32 m_nTableDepth; + + /* + * Remember if we wrote a \cell or not. + */ + bool m_bTblAfterCell; + + /* + * For late output of row definitions. + */ + rtl::OStringBuffer m_aRowDefs; + + /* + * Is a column break needed after the next \par? + */ + bool m_nColBreakNeeded; + + /* + * If section breaks should be buffered to m_aSectionBreaks + */ + bool m_bBufferSectionBreaks; + rtl::OStringBuffer m_aSectionBreaks; + + /* + * If section headers (and footers) should be buffered to + * m_aSectionHeaders. + */ + bool m_bBufferSectionHeaders; + rtl::OStringBuffer m_aSectionHeaders; + +public: + RtfAttributeOutput( RtfExport &rExport ); + + virtual ~RtfAttributeOutput(); + + /// Return the right export class. + virtual MSWordExportBase& GetExport(); + + rtl::OStringBuffer m_aTabStop; + + // These are used by wwFont::WriteRtf() + /// Start the font. + void StartFont( const String& rFamilyName ) const; + + /// End the font. + void EndFont() const; + + /// Alternate name for the font. + void FontAlternateName( const String& rName ) const; + + /// Font charset. + void FontCharset( sal_uInt8 nCharSet ) const; + + /// Font family. + void FontFamilyType( FontFamily eFamily, const wwFont &rFont ) const; + + /// Font pitch. + void FontPitchType( FontPitch ePitch ) const; +}; + +#endif // _RTFATTRIBUTEOUTPUT_HXX_ + +/* vi:set shiftwidth=4 expandtab: */ diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx new file mode 100644 index 0000000000..9e5bba1896 --- /dev/null +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -0,0 +1,1235 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2010 Miklos Vajna. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "rtfexport.hxx" +#include "rtfexportfilter.hxx" +#include "rtfsdrexport.hxx" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "ww8par.hxx" +#include "ww8scan.hxx" + +#include +#include +#include +#include +#include + +using namespace ::comphelper; +using namespace ::com::sun::star; + +using rtl::OString; +using rtl::OUString; +using rtl::OStringBuffer; +using rtl::OUStringBuffer; + +using sw::mark::IMark; + +#if defined(UNX) +const sal_Char RtfExport::sNewLine = '\012'; +#else +const sal_Char __FAR_DATA RtfExport::sNewLine[] = "\015\012"; +#endif + +// the default text encoding for the export, if it doesn't fit unicode will +// be used +#define DEF_ENCODING RTL_TEXTENCODING_ASCII_US + +AttributeOutputBase& RtfExport::AttrOutput() const +{ + return *m_pAttrOutput; +} + +MSWordSections& RtfExport::Sections() const +{ + return *m_pSections; +} + +RtfSdrExport& RtfExport::SdrExporter() const +{ + return *m_pSdrExport; +} + +bool RtfExport::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich ) +{ + // FIXME is this actually true for rtf? - this is copied from DOCX + if ( nScript == i18n::ScriptType::ASIAN ) + { + // for asian in ww8, there is only one fontsize + // and one fontstyle (posture/weight) + switch ( nWhich ) + { + case RES_CHRATR_FONTSIZE: + case RES_CHRATR_POSTURE: + case RES_CHRATR_WEIGHT: + return false; + default: + break; + } + } + else if ( nScript != i18n::ScriptType::COMPLEX ) + { + // for western in ww8, there is only one fontsize + // and one fontstyle (posture/weight) + switch ( nWhich ) + { + case RES_CHRATR_CJK_FONTSIZE: + case RES_CHRATR_CJK_POSTURE: + case RES_CHRATR_CJK_WEIGHT: + return false; + default: + break; + } + } + return true; +} + +void RtfExport::AppendBookmarks( const SwTxtNode& rNode, xub_StrLen nAktPos, xub_StrLen nLen ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + std::vector< OUString > aStarts; + std::vector< OUString > aEnds; + + IMarkVector aMarks; + if ( GetBookmarks( rNode, nAktPos, nAktPos + nLen, aMarks ) ) + { + for ( IMarkVector::const_iterator it = aMarks.begin(), end = aMarks.end(); + it < end; ++it ) + { + IMark* pMark = (*it); + xub_StrLen nStart = pMark->GetMarkStart().nContent.GetIndex(); + xub_StrLen nEnd = pMark->GetMarkEnd().nContent.GetIndex(); + + if ( nStart == nAktPos ) + aStarts.push_back( pMark->GetName() ); + + if ( nEnd == nAktPos ) + aEnds.push_back( pMark->GetName() ); + } + } + + m_pAttrOutput->WriteBookmarks_Impl( aStarts, aEnds ); +} + +void RtfExport::AppendBookmark( const OUString& rName, bool /*bSkip*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + std::vector aStarts; + std::vector aEnds; + + aStarts.push_back(rName); + aEnds.push_back(rName); + + m_pAttrOutput->WriteBookmarks_Impl(aStarts, aEnds); +} + +void RtfExport::WriteChar( sal_Unicode ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + /* WriteChar() has nothing to do for rtf. */ +} + +static bool IsExportNumRule( const SwNumRule& rRule, BYTE* pEnd = 0 ) +{ + BYTE nEnd = MAXLEVEL; + while( nEnd-- && !rRule.GetNumFmt( nEnd )) + ; + ++nEnd; + + const SwNumFmt* pNFmt; + BYTE nLvl; + + for( nLvl = 0; nLvl < nEnd; ++nLvl ) + if( SVX_NUM_NUMBER_NONE != ( pNFmt = &rRule.Get( nLvl )) + ->GetNumberingType() || pNFmt->GetPrefix().Len() || + (pNFmt->GetSuffix().Len() && pNFmt->GetSuffix() != aDotStr )) + break; + + if( pEnd ) + *pEnd = nEnd; + return nLvl != nEnd; +} + +void RtfExport::BuildNumbering() +{ + const SwNumRuleTbl& rListTbl = pDoc->GetNumRuleTbl(); + + for( USHORT n = rListTbl.Count()+1; n; ) + { + SwNumRule* pRule; + --n; + if( n == rListTbl.Count() ) + pRule = (SwNumRule*)pDoc->GetOutlineNumRule(); + else + { + pRule = rListTbl[ n ]; + if( !pDoc->IsUsed( *pRule )) + continue; + } + + if( IsExportNumRule( *pRule )) + GetId( *pRule ); + } +} + +void RtfExport::WriteNumbering() +{ + OSL_TRACE("%s start", __PRETTY_FUNCTION__); + + if ( !pUsedNumTbl ) + return; // no numbering is used + + Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_LISTTABLE; + AbstractNumberingDefinitions(); + Strm() << '}'; + + Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LISTOVERRIDETABLE; + NumberingDefinitions(); + Strm() << '}'; + + OSL_TRACE("%s end", __PRETTY_FUNCTION__); +} + +void RtfExport::WriteRevTab() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + int nRevAuthors = pDoc->GetRedlineTbl().Count(); + + if (nRevAuthors < 1) + return; + + // RTF always seems to use Unknown as the default first entry + String sUnknown(RTL_CONSTASCII_USTRINGPARAM("Unknown")); + GetRedline(sUnknown); + + for( USHORT i = 0; i < pDoc->GetRedlineTbl().Count(); ++i ) + { + const SwRedline* pRedl = pDoc->GetRedlineTbl()[ i ]; + + GetRedline(SW_MOD()->GetRedlineAuthor(pRedl->GetAuthor())); + } + + // Now write the table + Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_REVTBL << ' '; + for(std::map::iterator aIter = m_aRedlineTbl.begin(); aIter != m_aRedlineTbl.end(); ++aIter) + Strm() << '{' << OutString((*aIter).first, eDefaultEncoding) << ";}"; + Strm() << '}' << sNewLine; +} + +void RtfExport::WriteHeadersFooters( BYTE nHeadFootFlags, + const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE /*nBreakCode*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + // headers + if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_EVEN ) + WriteHeaderFooter( rLeftFmt, true, OOO_STRING_SVTOOLS_RTF_HEADERL ); + + if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_ODD ) + WriteHeaderFooter( rFmt, true, OOO_STRING_SVTOOLS_RTF_HEADER ); + + if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_FIRST ) + WriteHeaderFooter( rFirstPageFmt, true, OOO_STRING_SVTOOLS_RTF_HEADERF ); + + // footers + if ( nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_EVEN ) + WriteHeaderFooter( rLeftFmt, false, OOO_STRING_SVTOOLS_RTF_FOOTERL ); + + if ( nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_ODD ) + WriteHeaderFooter( rFmt, false, OOO_STRING_SVTOOLS_RTF_FOOTER ); + + if ( nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_FIRST ) + WriteHeaderFooter( rFirstPageFmt, false, OOO_STRING_SVTOOLS_RTF_FOOTERF ); +} + +void RtfExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, BYTE nMode ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_pAttrOutput->WriteField_Impl( pFld, eFldType, rFldCmd, nMode ); +} + +void RtfExport::WriteFormData( const ::sw::mark::IFieldmark& /*rFieldmark*/ ) +{ + OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); +} + +void RtfExport::WriteHyperlinkData( const ::sw::mark::IFieldmark& /*rFieldmark*/ ) +{ + OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); +} + +void RtfExport::DoComboBox(const rtl::OUString& /*rName*/, + const rtl::OUString& /*rHelp*/, + const rtl::OUString& /*rToolTip*/, + const rtl::OUString& /*rSelected*/, + uno::Sequence& /*rListItems*/) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + // this is handled in RtfAttributeOutput::OutputFlyFrame_Impl +} + +void RtfExport::DoFormText(const SwInputField* /*pFld*/) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + // this is hanled in RtfAttributeOutput::OutputFlyFrame_Impl +} + +ULONG RtfExport::ReplaceCr( BYTE ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + // Completely unused for Rtf export... only here for code sharing + // purpose with binary export + + return 0; +} + +void RtfExport::WriteFonts() +{ + Strm() << sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_FONTTBL; + maFontHelper.WriteFontTable( *m_pAttrOutput ); + Strm() << '}'; +} + +void RtfExport::WriteStyles() +{ + OSL_TRACE("%s start", __PRETTY_FUNCTION__); + pStyles->OutputStylesTable(); + OSL_TRACE("%s end", __PRETTY_FUNCTION__); +} + +void RtfExport::WriteMainText() +{ + OSL_TRACE("%s start", __PRETTY_FUNCTION__); + WriteText(); + OSL_TRACE("%s end", __PRETTY_FUNCTION__); +} + +void RtfExport::WriteInfo() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + Strm() << '{' << OOO_STRING_SVTOOLS_RTF_INFO; + + SwDocShell *pDocShell(pDoc->GetDocShell()); + uno::Reference xDocProps; + if (pDocShell) { + uno::Reference xDPS( + pDocShell->GetModel(), uno::UNO_QUERY); + xDocProps.set(xDPS->getDocumentProperties()); + } + + if (xDocProps.is()) { + OutUnicode(OOO_STRING_SVTOOLS_RTF_TITLE, xDocProps->getTitle()); + OutUnicode(OOO_STRING_SVTOOLS_RTF_SUBJECT, xDocProps->getSubject()); + + OutUnicode(OOO_STRING_SVTOOLS_RTF_KEYWORDS, + ::comphelper::string::convertCommaSeparated(xDocProps->getKeywords())); + OutUnicode(OOO_STRING_SVTOOLS_RTF_DOCCOMM, xDocProps->getDescription()); + + OutUnicode(OOO_STRING_SVTOOLS_RTF_AUTHOR, xDocProps->getAuthor()); + OutDateTime(OOO_STRING_SVTOOLS_RTF_CREATIM, xDocProps->getCreationDate()); + + OutUnicode(OOO_STRING_SVTOOLS_RTF_AUTHOR,xDocProps->getModifiedBy()); + OutDateTime(OOO_STRING_SVTOOLS_RTF_REVTIM, xDocProps->getModificationDate()); + + OutDateTime(OOO_STRING_SVTOOLS_RTF_PRINTIM, xDocProps->getPrintDate()); + } + + Strm() << '{' << OOO_STRING_SVTOOLS_RTF_COMMENT << " "; + OUString sProduct; + utl::ConfigManager::GetDirectConfigProperty(utl::ConfigManager::PRODUCTNAME) >>= sProduct; + Strm() << OUStringToOString( sProduct, eCurrentEncoding) << "}{" << OOO_STRING_SVTOOLS_RTF_VERN; + OutULong( SUPD*10 ) << '}'; + Strm() << '}'; +} + +void RtfExport::WritePageDescTable() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + // Write page descriptions (page styles) + USHORT nSize = pDoc->GetPageDescCnt(); + if( !nSize ) + return; + + Strm() << sNewLine; // a separator + bOutPageDescs = TRUE; + Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_PGDSCTBL; + for( USHORT n = 0; n < nSize; ++n ) + { + const SwPageDesc& rPageDesc = + const_cast(pDoc)->GetPageDesc( n ); + + Strm() << sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_PGDSC; + OutULong( n ) << OOO_STRING_SVTOOLS_RTF_PGDSCUSE; + OutULong( rPageDesc.ReadUseOn() ); + + OutPageDescription( rPageDesc, FALSE, FALSE ); + + // search for the next page description + USHORT i = nSize; + while( i ) + if( rPageDesc.GetFollow() == + &const_cast(pDoc)->GetPageDesc( --i ) ) + break; + Strm() << OOO_STRING_SVTOOLS_RTF_PGDSCNXT; + OutULong( i ) << ' '; + Strm() << OutString( rPageDesc.GetName(), eDefaultEncoding) << ";}"; + } + Strm() << '}' << sNewLine; + bOutPageDescs = FALSE; +} + +void RtfExport::ExportDocument_Impl() +{ +#ifdef DEBUG + // MSWordExportBase::WriteText and others write debug messages to std::clog + // which is not interesting while debugging RtfExport + std::ostringstream aOss; + std::streambuf *pOldBuf = std::clog.rdbuf(aOss.rdbuf()); +#endif + + // Make the header + Strm() << '{' << OOO_STRING_SVTOOLS_RTF_RTF << '1' + << OOO_STRING_SVTOOLS_RTF_ANSI; + Strm() << OOO_STRING_SVTOOLS_RTF_DEFF; + OutULong( maFontHelper.GetId( (SvxFontItem&)pDoc->GetAttrPool().GetDefaultItem( + RES_CHRATR_FONT ) )); + // If this not exist, MS don't understand our ansi characters (0x80-0xff). + Strm() << "\\adeflang1025"; + + // Font table + WriteFonts(); + + pStyles = new MSWordStyles( *this ); + // Color and stylesheet table + WriteStyles(); + + // List table + BuildNumbering(); + WriteNumbering(); + + WriteRevTab(); + + WriteInfo(); + // Default TabSize + Strm() << m_pAttrOutput->m_aTabStop.makeStringAndClear() << sNewLine; + // Page description + WritePageDescTable(); + + // Enable form protection by default if needed, as there is no switch to + // enable it on a per-section basis. OTOH don't always enable it as it + // breaks moving of drawings - so write it only in case there is really a + // protected section in the document. + { + const SfxItemPool& rPool = pDoc->GetAttrPool(); + USHORT nMaxItem = rPool.GetItemCount(RES_PROTECT); + for( USHORT n = 0; n < nMaxItem; ++n ) + { + const SvxProtectItem* pProtect = (const SvxProtectItem*)rPool.GetItem(RES_PROTECT, n); + if (pProtect && pProtect->IsCntntProtected()) + { + Strm() << OOO_STRING_SVTOOLS_RTF_FORMPROT; + break; + } + } + } + + // enable form field shading + Strm() << OOO_STRING_SVTOOLS_RTF_FORMSHADE; + + // size and empty margins of the page + if( pDoc->GetPageDescCnt() ) + { + //JP 06.04.99: Bug 64361 - Seeking the first SwFmtPageDesc. If + // no set, the default is valid + const SwFmtPageDesc* pSttPgDsc = 0; + { + const SwNode& rSttNd = *pDoc->GetNodes()[ + pDoc->GetNodes().GetEndOfExtras().GetIndex() + 2 ]; + const SfxItemSet* pSet = 0; + + if( rSttNd.IsCntntNode() ) + pSet = &rSttNd.GetCntntNode()->GetSwAttrSet(); + else if( rSttNd.IsTableNode() ) + pSet = &rSttNd.GetTableNode()->GetTable(). + GetFrmFmt()->GetAttrSet(); + else if( rSttNd.IsSectionNode() ) + pSet = &rSttNd.GetSectionNode()->GetSection(). + GetFmt()->GetAttrSet(); + + if( pSet ) + { + USHORT nPosInDoc; + pSttPgDsc = (SwFmtPageDesc*)&pSet->Get( RES_PAGEDESC ); + if( !pSttPgDsc->GetPageDesc() ) + pSttPgDsc = 0; + else if( pDoc->FindPageDescByName( pSttPgDsc-> + GetPageDesc()->GetName(), &nPosInDoc )) + { + Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_PGDSCNO; + OutULong( nPosInDoc ) << '}'; + } + } + } + const SwPageDesc& rPageDesc = pSttPgDsc ? *pSttPgDsc->GetPageDesc() + : const_cast(pDoc)->GetPageDesc( 0 ); + const SwFrmFmt &rFmtPage = rPageDesc.GetMaster(); + + { + if( rPageDesc.GetLandscape() ) + Strm() << OOO_STRING_SVTOOLS_RTF_LANDSCAPE; + + const SwFmtFrmSize& rSz = rFmtPage.GetFrmSize(); + // Clipboard document is always created without a printer, then + // the size will be always LONG_MAX! Solution then is to use A4 + if( LONG_MAX == rSz.GetHeight() || LONG_MAX == rSz.GetWidth() ) + { + Strm() << OOO_STRING_SVTOOLS_RTF_PAPERH; + Size a4 = SvxPaperInfo::GetPaperSize(PAPER_A4); + OutULong( a4.Height() ) << OOO_STRING_SVTOOLS_RTF_PAPERW; + OutULong( a4.Width() ); + } + else + { + Strm() << OOO_STRING_SVTOOLS_RTF_PAPERH; + OutULong( rSz.GetHeight() ) << OOO_STRING_SVTOOLS_RTF_PAPERW; + OutULong( rSz.GetWidth() ); + } + } + + { + const SvxLRSpaceItem& rLR = rFmtPage.GetLRSpace(); + Strm() << OOO_STRING_SVTOOLS_RTF_MARGL; + OutLong( rLR.GetLeft() ) << OOO_STRING_SVTOOLS_RTF_MARGR; + OutLong( rLR.GetRight() ); + } + + { + const SvxULSpaceItem& rUL = rFmtPage.GetULSpace(); + Strm() << OOO_STRING_SVTOOLS_RTF_MARGT; + OutLong( rUL.GetUpper() ) << OOO_STRING_SVTOOLS_RTF_MARGB; + OutLong( rUL.GetLower() ); + } + + Strm() << OOO_STRING_SVTOOLS_RTF_SECTD << OOO_STRING_SVTOOLS_RTF_SBKNONE; + // All sections are unlocked by default + Strm() << OOO_STRING_SVTOOLS_RTF_SECTUNLOCKED; + OutLong(1); + OutPageDescription( rPageDesc, FALSE, TRUE ); // Changed bCheckForFirstPage to TRUE so headers + // following title page are correctly added - i13107 + if( pSttPgDsc ) + { + pAktPageDesc = &rPageDesc; + } + } + + // line numbering + const SwLineNumberInfo& rLnNumInfo = pDoc->GetLineNumberInfo(); + if ( rLnNumInfo.IsPaintLineNumbers() ) + AttrOutput().SectionLineNumbering( 0, rLnNumInfo ); + + { + // write the footnotes and endnotes-out Info + const SwFtnInfo& rFtnInfo = pDoc->GetFtnInfo(); + + const char* pOut = FTNPOS_CHAPTER == rFtnInfo.ePos + ? OOO_STRING_SVTOOLS_RTF_ENDDOC + : OOO_STRING_SVTOOLS_RTF_FTNBJ; + Strm() << pOut << OOO_STRING_SVTOOLS_RTF_FTNSTART; + OutLong( rFtnInfo.nFtnOffset + 1 ); + + switch( rFtnInfo.eNum ) + { + case FTNNUM_PAGE: pOut = OOO_STRING_SVTOOLS_RTF_FTNRSTPG; break; + case FTNNUM_DOC: pOut = OOO_STRING_SVTOOLS_RTF_FTNRSTCONT; break; + // case FTNNUM_CHAPTER: + default: pOut = OOO_STRING_SVTOOLS_RTF_FTNRESTART; break; + } + Strm() << pOut; + + switch( rFtnInfo.aFmt.GetNumberingType() ) + { + case SVX_NUM_CHARS_LOWER_LETTER: + case SVX_NUM_CHARS_LOWER_LETTER_N: pOut = OOO_STRING_SVTOOLS_RTF_FTNNALC; break; + case SVX_NUM_CHARS_UPPER_LETTER: + case SVX_NUM_CHARS_UPPER_LETTER_N: pOut = OOO_STRING_SVTOOLS_RTF_FTNNAUC; break; + case SVX_NUM_ROMAN_LOWER: pOut = OOO_STRING_SVTOOLS_RTF_FTNNRLC; break; + case SVX_NUM_ROMAN_UPPER: pOut = OOO_STRING_SVTOOLS_RTF_FTNNRUC; break; + case SVX_NUM_CHAR_SPECIAL: pOut = OOO_STRING_SVTOOLS_RTF_FTNNCHI; break; + // case SVX_NUM_ARABIC: + default: pOut = OOO_STRING_SVTOOLS_RTF_FTNNAR; break; + } + Strm() << pOut; + + + const SwEndNoteInfo& rEndNoteInfo = pDoc->GetEndNoteInfo(); + + Strm() << OOO_STRING_SVTOOLS_RTF_AENDDOC << OOO_STRING_SVTOOLS_RTF_AFTNRSTCONT + << OOO_STRING_SVTOOLS_RTF_AFTNSTART; + OutLong( rEndNoteInfo.nFtnOffset + 1 ); + + switch( rEndNoteInfo.aFmt.GetNumberingType() ) + { + case SVX_NUM_CHARS_LOWER_LETTER: + case SVX_NUM_CHARS_LOWER_LETTER_N: pOut = OOO_STRING_SVTOOLS_RTF_AFTNNALC; break; + case SVX_NUM_CHARS_UPPER_LETTER: + case SVX_NUM_CHARS_UPPER_LETTER_N: pOut = OOO_STRING_SVTOOLS_RTF_AFTNNAUC; break; + case SVX_NUM_ROMAN_LOWER: pOut = OOO_STRING_SVTOOLS_RTF_AFTNNRLC; break; + case SVX_NUM_ROMAN_UPPER: pOut = OOO_STRING_SVTOOLS_RTF_AFTNNRUC; break; + case SVX_NUM_CHAR_SPECIAL: pOut = OOO_STRING_SVTOOLS_RTF_AFTNNCHI; break; + // case SVX_NUM_ARABIC: + default: pOut = OOO_STRING_SVTOOLS_RTF_AFTNNAR; break; + } + Strm() << pOut; + } + + Strm() << sNewLine; + + // Init sections + m_pSections = new MSWordSections( *this ); + + WriteMainText(); + + Strm() << '}'; + +#ifdef DEBUG + std::clog.rdbuf(pOldBuf); +#endif +} + +void RtfExport::PrepareNewPageDesc( const SfxItemSet* pSet, + const SwNode& rNd, const SwFmtPageDesc* pNewPgDescFmt, + const SwPageDesc* pNewPgDesc ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + const SwSectionFmt* pFmt = GetSectionFormat( rNd ); + const ULONG nLnNm = GetSectionLineNo( pSet, rNd ); + + OSL_ENSURE( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." ); + + if ( pNewPgDescFmt ) + m_pSections->AppendSep( *pNewPgDescFmt, rNd, pFmt, nLnNm ); + else if ( pNewPgDesc ) + m_pSections->AppendSep( pNewPgDesc, rNd, pFmt, nLnNm ); + + AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() ); +} + +bool RtfExport::DisallowInheritingOutlineNumbering( const SwFmt& rFmt ) +{ + bool bRet( false ); + + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if (SFX_ITEM_SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false)) + { + if (const SwFmt *pParent = rFmt.DerivedFrom()) + { + if (((const SwTxtFmtColl*)pParent)->IsAssignedToListLevelOfOutlineStyle()) + { + // Level 9 disables the outline + Strm() << OOO_STRING_SVTOOLS_RTF_LEVEL << 9; + + bRet = true; + } + } + } + + return bRet; +} + +void RtfExport::OutputGrfNode( const SwGrfNode& ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + /* noop, see RtfAttributeOutput::FlyFrameGraphic */ +} + +void RtfExport::OutputOLENode( const SwOLENode& ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + /* noop, see RtfAttributeOutput::FlyFrameOLE */ +} + +void RtfExport::AppendSection( const SwPageDesc* pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_pSections->AppendSep( pPageDesc, pFmt, nLnNum ); + AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() ); +} + +RtfExport::RtfExport( RtfExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM *pOriginalPam, Writer* pWriter ) + : MSWordExportBase( pDocument, pCurrentPam, pOriginalPam ), + m_pFilter( pFilter ), + m_pWriter( pWriter ), + m_pAttrOutput( NULL ), + m_pSections( NULL ), + m_pSdrExport( NULL ), + eDefaultEncoding( + rtl_getTextEncodingFromWindowsCharset( + sw::ms::rtl_TextEncodingToWinCharset(DEF_ENCODING))), + eCurrentEncoding(eDefaultEncoding), + bRTFFlySyntax(false) +{ + // the attribute output for the document + m_pAttrOutput = new RtfAttributeOutput( *this ); + // that just causes problems for RTF + bSubstituteBullets = false; + // needed to have a complete font table + maFontHelper.bLoadAllFonts = true; + // the related SdrExport + m_pSdrExport = new RtfSdrExport( *this ); + + if (!m_pWriter) + m_pWriter = &m_pFilter->m_aWriter; +} + +RtfExport::~RtfExport() +{ + delete m_pAttrOutput, m_pAttrOutput = NULL; + delete m_pSdrExport, m_pSdrExport = NULL; +} + +SvStream& RtfExport::Strm() +{ + return m_pWriter->Strm(); +} + +SvStream& RtfExport::OutULong( ULONG nVal ) +{ + return m_pWriter->OutULong( Strm(), nVal ); +} + +SvStream& RtfExport::OutLong( long nVal ) +{ + return m_pWriter->OutLong( Strm(), nVal ); +} + +void RtfExport::OutUnicode(const sal_Char *pToken, const String &rContent) +{ + if (rContent.Len()) + { + Strm() << '{' << pToken << ' '; + Strm() << OUStringToOString( OUString( rContent ), eCurrentEncoding ).getStr(); + Strm() << '}'; + } +} + +OString RtfExport::OutHex(ULONG nHex, BYTE nLen) +{ + sal_Char aNToABuf[] = "0000000000000000"; + + OSL_ENSURE( nLen < sizeof(aNToABuf), "nLen is too big" ); + if( nLen >= sizeof(aNToABuf) ) + nLen = (sizeof(aNToABuf)-1); + + // Set pointer to the buffer end + sal_Char* pStr = aNToABuf + (sizeof(aNToABuf)-1); + for( BYTE n = 0; n < nLen; ++n ) + { + *(--pStr) = (sal_Char)(nHex & 0xf ) + 48; + if( *pStr > '9' ) + *pStr += 39; + nHex >>= 4; + } + return OString(pStr); +} + +OString RtfExport::OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEnc) +{ + OStringBuffer aBuf; + const sal_Char* pStr = 0; + // 0x0b instead of \n, etc because of the replacements in SwAttrIter::GetSnippet() + switch (c) + { + case 0x0b: + // hard line break + pStr = OOO_STRING_SVTOOLS_RTF_LINE; + break; + case '\t': + pStr = OOO_STRING_SVTOOLS_RTF_TAB; + break; + case '\\': + case '}': + case '{': + aBuf.append('\\'); + aBuf.append((sal_Char)c); + break; + case 0xa0: + // non-breaking space + pStr = "\\~"; + break; + case 0x1e: + // non-breaking hyphen + pStr = "\\_"; + break; + case 0x1f: + // optional hyphen + pStr = "\\-"; + break; + default: + if (c >= ' ' && c <= '~') + aBuf.append((sal_Char)c); + else { + //If we can't convert to the dest encoding, or if + //its an uncommon multibyte sequence which most + //readers won't be able to handle correctly, then + //If we can't convert to the dest encoding, then + //export as unicode + OUString sBuf(&c, 1); + OString sConverted; + sal_uInt32 nFlags = + RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR | + RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR; + bool bWriteAsUnicode = !(sBuf.convertToString(&sConverted, + eDestEnc, nFlags)) + || (RTL_TEXTENCODING_UTF8==eDestEnc); // #i43933# do not export UTF-8 chars in RTF; + if (bWriteAsUnicode) + sBuf.convertToString(&sConverted, + eDestEnc, OUSTRING_TO_OSTRING_CVTFLAGS); + const sal_Int32 nLen = sConverted.getLength(); + + if (bWriteAsUnicode && pUCMode) + { + // then write as unicode - character + if (*pUCMode != nLen) + { + aBuf.append("\\uc"); + aBuf.append((sal_Int32)nLen); + // #i47831# add an additional whitespace, so that "document whitespaces" are not ignored. + aBuf.append(' '); + *pUCMode = nLen; + } + aBuf.append("\\u"); + aBuf.append((sal_Int32)c); + } + + for (sal_Int32 nI = 0; nI < nLen; ++nI) + { + aBuf.append("\\'"); + aBuf.append(OutHex(sConverted.getStr()[nI], 2)); + } + } + } + if (pStr) { + aBuf.append(pStr); + aBuf.append(' '); + } + return aBuf.makeStringAndClear(); +} + +OString RtfExport::OutString(const String &rStr, rtl_TextEncoding eDestEnc) +{ + OSL_TRACE("%s, rStr = '%s'", __PRETTY_FUNCTION__, + OUStringToOString( OUString( rStr ), eCurrentEncoding ).getStr()); + OStringBuffer aBuf; + int nUCMode = 1; + for (xub_StrLen n = 0; n < rStr.Len(); ++n) + aBuf.append(OutChar(rStr.GetChar(n), &nUCMode, eDestEnc)); + if (nUCMode != 1) { + aBuf.append(OOO_STRING_SVTOOLS_RTF_UC); + aBuf.append((sal_Int32)1); + aBuf.append(" "); // #i47831# add an additional whitespace, so that "document whitespaces" are not ignored.; + } + return aBuf.makeStringAndClear(); +} + +void RtfExport::OutDateTime(const sal_Char* pStr, const util::DateTime& rDT ) +{ + Strm() << '{' << pStr << OOO_STRING_SVTOOLS_RTF_YR; + OutULong( rDT.Year ) << OOO_STRING_SVTOOLS_RTF_MO; + OutULong( rDT.Month ) << OOO_STRING_SVTOOLS_RTF_DY; + OutULong( rDT.Day ) << OOO_STRING_SVTOOLS_RTF_HR; + OutULong( rDT.Hours ) << OOO_STRING_SVTOOLS_RTF_MIN; + OutULong( rDT.Minutes ) << '}'; +} + +USHORT RtfExport::GetColor( const Color& rColor ) const +{ + for (RtfColorTbl::const_iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); it++ ) + if ((*it).second == rColor) { + OSL_TRACE("%s returning %d (%d,%d,%d)", __PRETTY_FUNCTION__, (*it).first, rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue()); + return (*it).first; + } + OSL_ENSURE( FALSE, "No such Color in m_aColTbl!" ); + return 0; +} + +void RtfExport::InsColor( const Color& rCol ) +{ + USHORT n; + for (RtfColorTbl::iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); it++ ) + if ((*it).second == rCol) + return; // Already in the table + if (rCol.GetColor() == COL_AUTO) + n = 0; + else + { + n = m_aColTbl.size(); + // Fix for the case when first a !COL_AUTO gets inserted as #0, then + // gets overwritten by COL_AUTO + if (!n) + n++; + } + m_aColTbl.insert(std::pair( n, rCol )); +} + +void RtfExport::InsColorLine( const SvxBoxItem& rBox ) +{ + const SvxBorderLine* pLine = 0; + + if( rBox.GetTop() ) + InsColor( (pLine = rBox.GetTop())->GetColor() ); + if( rBox.GetBottom() && pLine != rBox.GetBottom() ) + InsColor( (pLine = rBox.GetBottom())->GetColor() ); + if( rBox.GetLeft() && pLine != rBox.GetLeft() ) + InsColor( (pLine = rBox.GetLeft())->GetColor() ); + if( rBox.GetRight() && pLine != rBox.GetRight() ) + InsColor( rBox.GetRight()->GetColor() ); +} +void RtfExport::OutColorTable() +{ + // Build the table from rPool since the colors provided to + // RtfAttributeOutput callbacks are too late. + USHORT n, nMaxItem; + const SfxItemPool& rPool = pDoc->GetAttrPool(); + + // char color + { + const SvxColorItem* pCol = (const SvxColorItem*)GetDfltAttr( + RES_CHRATR_COLOR ); + InsColor( pCol->GetValue() ); + if( 0 != ( pCol = (const SvxColorItem*)rPool.GetPoolDefaultItem( + RES_CHRATR_COLOR ) )) + InsColor( pCol->GetValue() ); + nMaxItem = rPool.GetItemCount(RES_CHRATR_COLOR); + for( n = 0; n < nMaxItem; ++n ) + { + if( 0 != (pCol = (const SvxColorItem*)rPool.GetItem( + RES_CHRATR_COLOR, n ) ) ) + InsColor( pCol->GetValue() ); + } + + const SvxUnderlineItem* pUnder = (const SvxUnderlineItem*)GetDfltAttr( RES_CHRATR_UNDERLINE ); + InsColor( pUnder->GetColor() ); + nMaxItem = rPool.GetItemCount(RES_CHRATR_UNDERLINE); + for( n = 0; n < nMaxItem;n++) + { + if( 0 != (pUnder = (const SvxUnderlineItem*)rPool.GetItem( RES_CHRATR_UNDERLINE, n ) ) ) + InsColor( pUnder->GetColor() ); + + } + + const SvxOverlineItem* pOver = (const SvxOverlineItem*)GetDfltAttr( RES_CHRATR_OVERLINE ); + InsColor( pOver->GetColor() ); + nMaxItem = rPool.GetItemCount(RES_CHRATR_OVERLINE); + for( n = 0; n < nMaxItem;n++) + { + if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem( RES_CHRATR_OVERLINE, n ) ) ) + InsColor( pOver->GetColor() ); + + } + + } + + // background color + static const USHORT aBrushIds[] = { + RES_BACKGROUND, RES_CHRATR_BACKGROUND, 0 }; + + for( const USHORT* pIds = aBrushIds; *pIds; ++pIds ) + { + const SvxBrushItem* pBkgrd = (const SvxBrushItem*)GetDfltAttr( *pIds ); + InsColor( pBkgrd->GetColor() ); + if( 0 != ( pBkgrd = (const SvxBrushItem*)rPool.GetPoolDefaultItem( + *pIds ) )) + { + InsColor( pBkgrd->GetColor() ); + } + nMaxItem = rPool.GetItemCount( *pIds ); + for( n = 0; n < nMaxItem; ++n ) + if( 0 != (pBkgrd = (const SvxBrushItem*)rPool.GetItem( + *pIds , n ) )) + { + InsColor( pBkgrd->GetColor() ); + } + } + + // shadow color + { + const SvxShadowItem* pShadow = (const SvxShadowItem*)GetDfltAttr( + RES_SHADOW ); + InsColor( pShadow->GetColor() ); + if( 0 != ( pShadow = (const SvxShadowItem*)rPool.GetPoolDefaultItem( + RES_SHADOW ) )) + { + InsColor( pShadow->GetColor() ); + } + nMaxItem = rPool.GetItemCount(RES_SHADOW); + for( n = 0; n < nMaxItem; ++n ) + if( 0 != (pShadow = (const SvxShadowItem*)rPool.GetItem( + RES_SHADOW, n ) ) ) + { + InsColor( pShadow->GetColor() ); + } + } + + // frame border color + { + const SvxBoxItem* pBox; + if( 0 != ( pBox = (const SvxBoxItem*)rPool.GetPoolDefaultItem( + RES_BOX ) )) + InsColorLine( *pBox ); + nMaxItem = rPool.GetItemCount(RES_BOX); + for( n = 0; n < nMaxItem; ++n ) + if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem( RES_BOX, n ) )) + InsColorLine( *pBox ); + } + + for( n = 0; n < m_aColTbl.size(); n++ ) + { + const Color& rCol = m_aColTbl[ n ]; + if( n || COL_AUTO != rCol.GetColor() ) + { + Strm() << OOO_STRING_SVTOOLS_RTF_RED; + OutULong( rCol.GetRed() ) << OOO_STRING_SVTOOLS_RTF_GREEN; + OutULong( rCol.GetGreen() ) << OOO_STRING_SVTOOLS_RTF_BLUE; + OutULong( rCol.GetBlue() ); + } + Strm() << ';'; + } +} + +void RtfExport::InsStyle( USHORT nId, const OString& rStyle ) +{ + m_aStyTbl.insert(std::pair(nId, rStyle) ); +} + +OString* RtfExport::GetStyle( USHORT nId ) +{ + std::map::iterator i = m_aStyTbl.find(nId); + if (i != m_aStyTbl.end()) + return &i->second; + return NULL; +} + +USHORT RtfExport::GetRedline( const String& rAuthor ) +{ + std::map::iterator i = m_aRedlineTbl.find(rAuthor); + if (i != m_aRedlineTbl.end()) + return i->second; + else + { + int nId = m_aRedlineTbl.size(); + m_aRedlineTbl.insert(std::pair(rAuthor,nId)); + return nId; + } +} + +void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage ) +{ + OSL_TRACE("%s start", __PRETTY_FUNCTION__); + const SwPageDesc *pSave = pAktPageDesc; + + pAktPageDesc = &rPgDsc; + if( bCheckForFirstPage && pAktPageDesc->GetFollow() && + pAktPageDesc->GetFollow() != pAktPageDesc ) + pAktPageDesc = pAktPageDesc->GetFollow(); + + if( bWriteReset ) + { + if( pCurPam->GetPoint()->nNode == pOrigPam->Start()->nNode ) + Strm() << OOO_STRING_SVTOOLS_RTF_SECTD << OOO_STRING_SVTOOLS_RTF_SBKNONE; + else + Strm() << OOO_STRING_SVTOOLS_RTF_SECT << OOO_STRING_SVTOOLS_RTF_SECTD; + } + + if( pAktPageDesc->GetLandscape() ) + Strm() << OOO_STRING_SVTOOLS_RTF_LNDSCPSXN; + + const SwFmt *pFmt = &pAktPageDesc->GetMaster(); //GetLeft(); + bOutPageDescs = true; + OutputFormat(*pFmt, true, false); + bOutPageDescs = false; + + // normal header / footer (without a style) + const SfxPoolItem* pItem; + if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_HEADER, FALSE, + &pItem ) == SFX_ITEM_SET) + WriteHeaderFooter(*pItem, true); + if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_FOOTER, FALSE, + &pItem ) == SFX_ITEM_SET) + WriteHeaderFooter(*pItem, false); + + // title page + if( pAktPageDesc != &rPgDsc ) + { + pAktPageDesc = &rPgDsc; + if( pAktPageDesc->GetMaster().GetAttrSet().GetItemState( RES_HEADER, + FALSE, &pItem ) == SFX_ITEM_SET ) + WriteHeaderFooter(*pItem, true); + if( pAktPageDesc->GetMaster().GetAttrSet().GetItemState( RES_FOOTER, + FALSE, &pItem ) == SFX_ITEM_SET ) + WriteHeaderFooter(*pItem, false); + } + + // numbering type + AttrOutput().SectionPageNumbering(pAktPageDesc->GetNumType().GetNumberingType(), 0); + + pAktPageDesc = pSave; + //bOutPageDesc = bOldOut; + OSL_TRACE("%s end", __PRETTY_FUNCTION__); +} + +void RtfExport::WriteHeaderFooter(const SfxPoolItem& rItem, bool bHeader) +{ + if (bHeader) + { + const SwFmtHeader& rHeader = (const SwFmtHeader&)rItem; + if (!rHeader.IsActive()) + return; + } + else + { + const SwFmtFooter& rFooter = (const SwFmtFooter&)rItem; + if (!rFooter.IsActive()) + return; + } + + OSL_TRACE("%s start", __PRETTY_FUNCTION__); + + Strm() << (bHeader ? OOO_STRING_SVTOOLS_RTF_HEADERY : OOO_STRING_SVTOOLS_RTF_FOOTERY); + OutLong( pAktPageDesc->GetMaster(). + GetULSpace().GetUpper() ); + const sal_Char* pStr = (bHeader ? OOO_STRING_SVTOOLS_RTF_HEADER : OOO_STRING_SVTOOLS_RTF_FOOTER); + /* is this a title page? */ + if( pAktPageDesc->GetFollow() && pAktPageDesc->GetFollow() != pAktPageDesc ) + { + Strm() << OOO_STRING_SVTOOLS_RTF_TITLEPG; + pStr = (bHeader ? OOO_STRING_SVTOOLS_RTF_HEADERF : OOO_STRING_SVTOOLS_RTF_FOOTERF); + } + Strm() << '{' << pStr; + WriteHeaderFooterText(pAktPageDesc->GetMaster(), bHeader); + Strm() << '}'; + + OSL_TRACE("%s end", __PRETTY_FUNCTION__); +} + +void RtfExport::WriteHeaderFooter(const SwFrmFmt& rFmt, bool bHeader, const sal_Char* pStr) +{ + OSL_TRACE("%s start", __PRETTY_FUNCTION__); + + m_pAttrOutput->WriteHeaderFooter_Impl( rFmt, bHeader, pStr ); + + OSL_TRACE("%s end", __PRETTY_FUNCTION__); +} + +class SwRTFUNOWriter : public Writer +{ + public: + SwRTFUNOWriter( const String& rFilterName, const String& rBaseURL ); + virtual ~SwRTFUNOWriter(); + virtual ULONG WriteStream(); +}; + +SwRTFUNOWriter::SwRTFUNOWriter( const String& /*rFltName*/, const String & rBaseURL ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + SetBaseURL( rBaseURL ); +} + +SwRTFUNOWriter::~SwRTFUNOWriter() +{} + +ULONG SwRTFUNOWriter::WriteStream() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + RtfExport aExport( NULL, pDoc, new SwPaM( *pCurPam->End(), *pCurPam->Start() ), pCurPam, this ); + aExport.ExportDocument( true ); + return 0; +} + +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL ExportRTF( const String& rFltName, const String& rBaseURL, WriterRef& xRet ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + xRet = new SwRTFUNOWriter( rFltName, rBaseURL ); +} + +/* vi:set shiftwidth=4 expandtab: */ diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx new file mode 100644 index 0000000000..9828a0b881 --- /dev/null +++ b/sw/source/filter/ww8/rtfexport.hxx @@ -0,0 +1,210 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2010 Miklos Vajna. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _RTFEXPORT_HXX_ +#define _RTFEXPORT_HXX_ + +#include "rtfattributeoutput.hxx" +#include "wrtww8.hxx" + +#include + +#include +#include + +class RtfExportFilter; +class RtfSdrExport; +typedef std::map RtfColorTbl; +typedef std::map RtfStyleTbl; +typedef std::map RtfRedlineTbl; +class SwNode; +class SwEndNode; +class SwTableNode; +class SwTxtNode; +class SwGrfNode; +class SwOLENode; +class SwSectionNode; +class SwNumRuleTbl; + +namespace com { namespace sun { namespace star { + namespace frame { class XModel; } +} } } + +/// The class that does all the actual RTF export-related work. +class RtfExport : public MSWordExportBase +{ + /// Pointer to the filter that owns us. + RtfExportFilter *m_pFilter; + Writer* m_pWriter; + + /// Attribute output for document. + RtfAttributeOutput *m_pAttrOutput; + + /// Sections/headers/footers + MSWordSections *m_pSections; + + RtfSdrExport *m_pSdrExport; + +public: + /// Access to the attribute output class. + virtual AttributeOutputBase& AttrOutput() const; + + /// Access to the sections/headers/footres. + virtual MSWordSections& Sections() const; + + /// Access to the Rtf Sdr exporter. + virtual RtfSdrExport& SdrExporter() const; + + /// Hack, unfortunately necessary at some places for now. + virtual bool HackIsWW8OrHigher() const { return true; } + + /// Guess the script (asian/western). + virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich ); + + virtual void AppendBookmarks( const SwTxtNode& rNode, xub_StrLen nAktPos, xub_StrLen nLen ); + + virtual void AppendBookmark( const rtl::OUString& rName, bool bSkip = false ); + + virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t()*/ ) { /* no-op for rtf, most probably should not even be in MSWordExportBase */ } + virtual void WriteChar( sal_Unicode ); + + /// Write the numbering table. + virtual void WriteNumbering(); + + /// Write the revision table. + virtual void WriteRevTab(); + + /// Output the actual headers and footers. + virtual void WriteHeadersFooters( BYTE nHeadFootFlags, + const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE nBreakCode ); + + /// Write the field + virtual void OutputField( const SwField* pFld, ww::eField eFldType, + const String& rFldCmd, BYTE nMode = nsFieldFlags::WRITEFIELD_ALL ); + + /// Write the data of the form field + virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ); + virtual void WriteHyperlinkData( const ::sw::mark::IFieldmark& rFieldmark ); + + virtual void DoComboBox(const rtl::OUString &rName, + const rtl::OUString &rHelp, + const rtl::OUString &ToolTip, + const rtl::OUString &rSelected, + com::sun::star::uno::Sequence &rListItems); + + virtual void DoFormText(const SwInputField * pFld); + + virtual ULONG ReplaceCr( BYTE nChar ); + +protected: + /// Format-dependant part of the actual export. + virtual void ExportDocument_Impl(); + + virtual void SectionBreaksAndFrames( const SwTxtNode& /*rNode*/ ) {} + + /// Get ready for a new section. + virtual void PrepareNewPageDesc( const SfxItemSet* pSet, + const SwNode& rNd, + const SwFmtPageDesc* pNewPgDescFmt = 0, + const SwPageDesc* pNewPgDesc = 0 ); + + /// Return value indicates if an inherited outline numbering is suppressed. + virtual bool DisallowInheritingOutlineNumbering(const SwFmt &rFmt); + + /// Output SwGrfNode + virtual void OutputGrfNode( const SwGrfNode& ); + + /// Output SwOLENode + virtual void OutputOLENode( const SwOLENode& ); + + virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum ); + +public: + /// Pass the pDocument, pCurrentPam and pOriginalPam to the base class. + RtfExport( RtfExportFilter *pFilter, SwDoc *pDocument, + SwPaM *pCurrentPam, SwPaM *pOriginalPam, Writer* pWriter ); + + /// Destructor. + virtual ~RtfExport(); + +#if defined(UNX) + static const sal_Char sNewLine; // \012 or \015 +#else + static const sal_Char __FAR_DATA sNewLine[]; // \015\012 +#endif + + rtl_TextEncoding eDefaultEncoding; + rtl_TextEncoding eCurrentEncoding; + /// This is used by OutputFlyFrame_Impl() to control the written syntax + bool bRTFFlySyntax; + + BOOL m_bOutStyleTab : 1; + SvStream& Strm(); + SvStream& OutULong( ULONG nVal ); + SvStream& OutLong( long nVal ); + void OutUnicode(const sal_Char *pToken, const String &rContent); + void OutDateTime(const sal_Char* pStr, const util::DateTime& rDT ); + rtl::OString OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEnc); + rtl::OString OutString(const String &rStr, rtl_TextEncoding eDestEnc); + rtl::OString OutHex(ULONG nHex, BYTE nLen); + void OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage ); + + USHORT GetColor( const Color& rColor ) const; + void InsColor( const Color& rCol ); + void InsColorLine( const SvxBoxItem& rBox ); + void OutColorTable(); + USHORT GetRedline( const String& rAuthor ); + + void InsStyle( USHORT nId, const rtl::OString& rStyle ); + rtl::OString* GetStyle( USHORT nId ); + +private: + /// No copying. + RtfExport( const RtfExport& ); + + /// No copying. + RtfExport& operator=( const RtfExport& ); + + void WriteFonts(); + void WriteStyles(); + void WriteMainText(); + void WriteInfo(); + /// Writes the writer-specific \pgdsctbl group. + void WritePageDescTable(); + /// This is necessary to have the numbering table ready before the main text is being processed. + void BuildNumbering(); + void WriteHeaderFooter(const SfxPoolItem& rItem, bool bHeader); + void WriteHeaderFooter(const SwFrmFmt& rFmt, bool bHeader, const sal_Char* pStr); + + RtfColorTbl m_aColTbl; + RtfStyleTbl m_aStyTbl; + RtfRedlineTbl m_aRedlineTbl; +}; + +#endif // _RTFEXPORT_HXX_ +/* vi:set shiftwidth=4 expandtab: */ diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx new file mode 100644 index 0000000000..4b9e3aac55 --- /dev/null +++ b/sw/source/filter/ww8/rtfexportfilter.cxx @@ -0,0 +1,136 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2010 Miklos Vajna. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "rtfexportfilter.hxx" +#include "rtfexport.hxx" + +#include +#include +#include +#include + +#include +#include +#include + +using namespace ::comphelper; +using namespace ::com::sun::star; +using ::rtl::OUString; + +RtfExportFilter::RtfExportFilter( const uno::Reference< lang::XMultiServiceFactory >& xMSF) : + m_xMSF( xMSF ) +{ +} + +RtfExportFilter::~RtfExportFilter() +{ +} + +sal_Bool RtfExportFilter::filter( const uno::Sequence< beans::PropertyValue >& aDescriptor ) + throw (uno::RuntimeException) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + MediaDescriptor aMediaDesc = aDescriptor; + ::uno::Reference< io::XStream > xStream = + aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_STREAMFOROUTPUT(), uno::Reference< io::XStream >() ); + m_pStream = utl::UcbStreamHelper::CreateStream( xStream, sal_True ); + m_aWriter.SetStrm(*m_pStream); + + // get SwDoc* + uno::Reference< uno::XInterface > xIfc( m_xSrcDoc, uno::UNO_QUERY ); + SwXTextDocument *pTxtDoc = dynamic_cast< SwXTextDocument * >( xIfc.get() ); + if ( !pTxtDoc ) { + return sal_False; + } + + SwDoc *pDoc = pTxtDoc->GetDocShell()->GetDoc(); + if ( !pDoc ) { + return sal_False; + } + + // get SwPaM* + // we get SwPaM for the entire document; copy&paste is handled internally, not via UNO + SwPaM aPam( pDoc->GetNodes().GetEndOfContent() ); + aPam.SetMark(); + aPam.Move( fnMoveBackward, fnGoDoc ); + + SwPaM *pCurPam = new SwPaM( *aPam.End(), *aPam.Start() ); + + // export the document + // (in a separate block so that it's destructed before the commit) + { + RtfExport aExport( this, pDoc, pCurPam, &aPam, NULL ); + aExport.ExportDocument( true ); + } + + // delete the pCurPam + if ( pCurPam ) + { + while ( pCurPam->GetNext() != pCurPam ) + delete pCurPam->GetNext(); + delete pCurPam; + } + delete m_pStream; + + return sal_True; +} + + +void RtfExportFilter::cancel( ) throw (uno::RuntimeException) +{ +} + +void RtfExportFilter::setSourceDocument( const uno::Reference< lang::XComponent >& xDoc ) + throw (lang::IllegalArgumentException, uno::RuntimeException) +{ + m_xSrcDoc = xDoc; +} + +////////////////////////////////////////////////////////////////////////// +// UNO helpers +////////////////////////////////////////////////////////////////////////// + +OUString RtfExport_getImplementationName() +{ + return OUString( RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFEXPORT ) ); +} + +uno::Sequence< OUString > SAL_CALL RtfExport_getSupportedServiceNames() throw() +{ + const OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.ExportFilter" ) ); + const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); + return aSeq; +} + +uno::Reference< uno::XInterface > SAL_CALL RtfExport_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception ) +{ + return (cppu::OWeakObject*) new RtfExportFilter( rSMgr ); +} + +/* vi:set shiftwidth=4 expandtab: */ diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx b/sw/source/filter/ww8/rtfexportfilter.hxx new file mode 100644 index 0000000000..e3ccc3a9d3 --- /dev/null +++ b/sw/source/filter/ww8/rtfexportfilter.hxx @@ -0,0 +1,85 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2010 Miklos Vajna. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _RTFEXPORTFILTER_HXX_ +#define _RTFEXPORTFILTER_HXX_ + +#include +#include +#include +#include +#include +#include + +// This is just here so that we don't have to copy&paste its string format methods +class RtfWriter : public Writer +{ +protected: + ULONG WriteStream() { return 0; } +}; + +/// The physical access to the RTF document (for writing). +class RtfExportFilter : public cppu::WeakImplHelper2 +< + com::sun::star::document::XFilter, + com::sun::star::document::XExporter +> +{ +protected: + ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF; + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xSrcDoc; + SvStream* m_pStream; +public: + RtfExportFilter( const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF ); + virtual ~RtfExportFilter(); + + // XFilter + virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor ) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL cancel( ) + throw (::com::sun::star::uno::RuntimeException); + + // XExporter + virtual void SAL_CALL setSourceDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc ) + throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + + RtfWriter m_aWriter; +}; + +::rtl::OUString RtfExport_getImplementationName(); +::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL RtfExport_getSupportedServiceNames() + throw(); +::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL RtfExport_createInstance( + const ::com::sun::star::uno::Reference< + com::sun::star::lang::XMultiServiceFactory > &xMSF) + throw( ::com::sun::star::uno::Exception ); + +#define IMPL_NAME_RTFEXPORT "com.sun.star.comp.Writer.RtfExport" + +#endif // _RTFEXPORTFILTER_HXX_ +/* vi:set shiftwidth=4 expandtab: */ diff --git a/sw/source/filter/ww8/rtfimportfilter.cxx b/sw/source/filter/ww8/rtfimportfilter.cxx new file mode 100644 index 0000000000..58c09ac626 --- /dev/null +++ b/sw/source/filter/ww8/rtfimportfilter.cxx @@ -0,0 +1,135 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2010 Miklos Vajna. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "rtfimportfilter.hxx" +#include "../rtf/swparrtf.hxx" + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +using namespace ::comphelper; +using namespace ::com::sun::star; +using ::rtl::OUString; +using rtl::OUStringToOString; + +RtfImportFilter::RtfImportFilter( const uno::Reference< lang::XMultiServiceFactory >& xMSF) : + m_xMSF( xMSF ) +{ +} + +RtfImportFilter::~RtfImportFilter() +{ +} + +sal_Bool RtfImportFilter::filter( const uno::Sequence< beans::PropertyValue >& aDescriptor ) + throw (uno::RuntimeException) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + MediaDescriptor aMediaDesc = aDescriptor; + ::uno::Reference< io::XInputStream > xInputStream = + aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_INPUTSTREAM(), uno::Reference< io::XInputStream >() ); + SvStream* pStream = utl::UcbStreamHelper::CreateStream( xInputStream, sal_True ); + if (!pStream) + return sal_False; + + // get SwDoc* + uno::Reference< uno::XInterface > xIfc( m_xDstDoc, uno::UNO_QUERY ); + SwXTextDocument *pTxtDoc = dynamic_cast< SwXTextDocument * >( xIfc.get() ); + if (!pTxtDoc) + return sal_False; + SwDoc *pDoc = pTxtDoc->GetDocShell()->GetDoc(); + if (!pDoc) + return sal_False; + + // get SwPaM* + // NEEDSWORK should we care about partial imports? For now we just import + // the whole document + SwPaM aPam( pDoc->GetNodes().GetEndOfContent() ); + aPam.SetMark(); + aPam.Move( fnMoveBackward, fnGoDoc ); + SwPaM *pCurPam = new SwPaM( *aPam.End(), *aPam.Start() ); + + String aURL; + OUString sTemp; + for ( sal_Int32 i = 0; i < aDescriptor.getLength(); i++ ) + { + if( aDescriptor[i].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) ) + { + aDescriptor[i].Value >>= sTemp; + aURL = sTemp; + } + } + + RtfReader aReader; + return aReader.Read(pStream, *pDoc, aURL, *pCurPam) == 0; +} + + +void RtfImportFilter::cancel( ) throw (uno::RuntimeException) +{ +} + +void RtfImportFilter::setTargetDocument( const uno::Reference< lang::XComponent >& xDoc ) + throw (lang::IllegalArgumentException, uno::RuntimeException) +{ + m_xDstDoc = xDoc; +} + +////////////////////////////////////////////////////////////////////////// +// UNO helpers +////////////////////////////////////////////////////////////////////////// + +OUString RtfImport_getImplementationName() +{ + return OUString( RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFIMPORT ) ); +} + +uno::Sequence< OUString > SAL_CALL RtfImport_getSupportedServiceNames() throw() +{ + const OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.ImportFilter" ) ); + const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); + return aSeq; +} + +uno::Reference< uno::XInterface > SAL_CALL RtfImport_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception ) +{ + return (cppu::OWeakObject*) new RtfImportFilter( rSMgr ); +} + +/* vi:set shiftwidth=4 expandtab: */ diff --git a/sw/source/filter/ww8/rtfimportfilter.hxx b/sw/source/filter/ww8/rtfimportfilter.hxx new file mode 100644 index 0000000000..9026d63573 --- /dev/null +++ b/sw/source/filter/ww8/rtfimportfilter.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2010 Miklos Vajna. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _RTFIMPORTFILTER_HXX_ +#define _RTFIMPORTFILTER_HXX_ + +#include +#include +#include +#include +#include +#include + +/// The physical access to the RTF document (for reading). +class RtfImportFilter : public cppu::WeakImplHelper2 +< + com::sun::star::document::XFilter, + com::sun::star::document::XImporter +> +{ +protected: + ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF; + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xDstDoc; +public: + RtfImportFilter( const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF ); + virtual ~RtfImportFilter(); + + // XFilter + virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor ) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL cancel( ) + throw (::com::sun::star::uno::RuntimeException); + + // XImporter + virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc ) + throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); +}; + +::rtl::OUString RtfImport_getImplementationName(); +::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL RtfImport_getSupportedServiceNames() + throw(); +::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL RtfImport_createInstance( + const ::com::sun::star::uno::Reference< + com::sun::star::lang::XMultiServiceFactory > &xMSF) + throw( ::com::sun::star::uno::Exception ); + +#define IMPL_NAME_RTFIMPORT "com.sun.star.comp.Writer.RtfImport" + +#endif // _RTFIMPORTFILTER_HXX_ +/* vi:set shiftwidth=4 expandtab: */ diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx new file mode 100644 index 0000000000..acfbca487f --- /dev/null +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -0,0 +1,578 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2010 Miklos Vajna. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "rtfsdrexport.hxx" +#include "rtfexport.hxx" +#include "writerhelper.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using rtl::OString; +using rtl::OStringBuffer; +using rtl::OUString; +using rtl::OUStringBuffer; +using namespace sw::util; + +/// Implementation of an empty stream that silently succeeds, but does nothing. +/// +/// In fact, this is a hack. The right solution is to abstract EscherEx to be +/// able to work without SvStream; but at the moment it is better to live with +/// this I guess. +class SvNullStream : public SvStream +{ +protected: + virtual sal_Size GetData( void* pData, sal_Size nSize ) { memset( pData, 0, nSize ); return nSize; } + virtual sal_Size PutData( const void*, sal_Size nSize ) { return nSize; } + virtual sal_Size SeekPos( sal_Size nPos ) { return nPos; } + virtual void SetSize( sal_Size ) {} + virtual void FlushData() {} + +public: + SvNullStream() : SvStream() {} + virtual ~SvNullStream() {} +}; + +RtfSdrExport::RtfSdrExport( RtfExport &rExport ) + : EscherEx( *( new SvNullStream ), 0 ), + m_rExport( rExport ), + m_rAttrOutput( (RtfAttributeOutput&)m_rExport.AttrOutput() ), + m_nShapeType( ESCHER_ShpInst_Nil ), + m_pShapeStyle( new OStringBuffer( 200 ) ), + m_pShapeTypeWritten( new bool[ ESCHER_ShpInst_COUNT ] ) +{ + mnGroupLevel = 1; + memset( m_pShapeTypeWritten, 0, ESCHER_ShpInst_COUNT * sizeof( bool ) ); +} + +RtfSdrExport::~RtfSdrExport() +{ + delete mpOutStrm, mpOutStrm = NULL; + delete m_pShapeStyle, m_pShapeStyle = NULL; + delete[] m_pShapeTypeWritten, m_pShapeTypeWritten = NULL; +} + +void RtfSdrExport::OpenContainer( UINT16 nEscherContainer, int nRecInstance ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + EscherEx::OpenContainer( nEscherContainer, nRecInstance ); + + if ( nEscherContainer == ESCHER_SpContainer ) + { + m_nShapeType = ESCHER_ShpInst_Nil; + if ( m_pShapeStyle->getLength() ) + m_pShapeStyle->makeStringAndClear(); + m_pShapeStyle->ensureCapacity( 200 ); + m_aShapeProps.clear(); + } +} + +void RtfSdrExport::CloseContainer() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( mRecTypes.back() == ESCHER_SpContainer ) + { + // write the shape now when we have all the info + sal_Int32 nShapeElement = StartShape(); + EndShape( nShapeElement ); + + // cleanup + m_nShapeType = ESCHER_ShpInst_Nil; + } + + EscherEx::CloseContainer(); +} + +UINT32 RtfSdrExport::EnterGroup( const String& /*rShapeName*/, const Rectangle* /*pRect*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + return GetShapeID(); +} + +void RtfSdrExport::LeaveGroup() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + /* noop */ +} + +void RtfSdrExport::AddShape( UINT32 nShapeType, UINT32 nShapeFlags, UINT32 /*nShapeId*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + m_nShapeType = nShapeType; + m_nShapeFlags = nShapeFlags; +} + +inline sal_uInt16 impl_GetUInt16( const sal_uInt8* &pVal ) +{ + sal_uInt16 nRet = *pVal++; + nRet += ( *pVal++ ) << 8; + return nRet; +} + +inline sal_Int32 impl_GetPointComponent( const sal_uInt8* &pVal, sal_uInt16 nPointSize ) +{ + sal_Int32 nRet = 0; + if ( ( nPointSize == 0xfff0 ) || ( nPointSize == 4 ) ) + { + sal_uInt16 nUnsigned = *pVal++; + nUnsigned += ( *pVal++ ) << 8; + + nRet = sal_Int16( nUnsigned ); + } + else if ( nPointSize == 8 ) + { + sal_uInt32 nUnsigned = *pVal++; + nUnsigned += ( *pVal++ ) << 8; + nUnsigned += ( *pVal++ ) << 16; + nUnsigned += ( *pVal++ ) << 24; + + nRet = nUnsigned; + } + + return nRet; +} + +void RtfSdrExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( m_nShapeType == ESCHER_ShpInst_Nil ) + return; + + if ( m_nShapeType == ESCHER_ShpInst_Line ) + AddLineDimensions( rRect ); + else + AddRectangleDimensions( *m_pShapeStyle, rRect ); + + // properties + const EscherProperties &rOpts = rProps.GetOpts(); + for ( EscherProperties::const_iterator it = rOpts.begin(); it != rOpts.end(); ++it ) + { + sal_uInt16 nId = ( it->nPropId & 0x0FFF ); + + switch ( nId ) + { + case ESCHER_Prop_WrapText: + { + int nWrapType = 0; + switch ( it->nPropValue ) + { + case ESCHER_WrapSquare: nWrapType = 2; break; + case ESCHER_WrapByPoints: nWrapType = 4; break; + case ESCHER_WrapNone: nWrapType = 3; break; + case ESCHER_WrapTopBottom: nWrapType = 1; break; + case ESCHER_WrapThrough: nWrapType = 5; break; + } + if ( nWrapType ) + m_pShapeStyle->append(OOO_STRING_SVTOOLS_RTF_SHPWR).append((sal_Int32)nWrapType); + } + break; + case ESCHER_Prop_fillColor: + m_aShapeProps.insert(std::pair(OString("fillColor"), OString::valueOf(sal_Int32(it->nPropValue)))); + break; + case ESCHER_Prop_fillBackColor: + m_aShapeProps.insert(std::pair(OString("fillBackColor"), OString::valueOf(sal_Int32(it->nPropValue)))); + break; + case ESCHER_Prop_AnchorText: + m_aShapeProps.insert(std::pair(OString("anchorText"), OString::valueOf(sal_Int32(it->nPropValue)))); + break; + case ESCHER_Prop_fNoFillHitTest: + if (it->nPropValue) + m_aShapeProps.insert(std::pair(OString("fNoFillHitTest"), OString::valueOf(sal_Int32(1)))); + break; + case ESCHER_Prop_fNoLineDrawDash: + if (it->nPropValue) + m_aShapeProps.insert(std::pair(OString("fNoLineDrawDash"), OString::valueOf(sal_Int32(1)))); + break; + case ESCHER_Prop_lineColor: + m_aShapeProps.insert(std::pair(OString("lineColor"), OString::valueOf(sal_Int32(it->nPropValue)))); + break; + case ESCHER_Prop_lineBackColor: + m_aShapeProps.insert(std::pair(OString("lineBackColor"), OString::valueOf(sal_Int32(it->nPropValue)))); + break; + case ESCHER_Prop_lineJoinStyle: + m_aShapeProps.insert(std::pair(OString("lineJoinStyle"), OString::valueOf(sal_Int32(it->nPropValue)))); + break; + case ESCHER_Prop_fshadowObscured: + if (it->nPropValue) + m_aShapeProps.insert(std::pair(OString("fshadowObscured"), OString::valueOf(sal_Int32(1)))); + break; + case ESCHER_Prop_geoLeft: + case ESCHER_Prop_geoTop: + { + sal_uInt32 nLeft = 0, nTop = 0; + + if ( nId == ESCHER_Prop_geoLeft ) + { + nLeft = it->nPropValue; + rProps.GetOpt( ESCHER_Prop_geoTop, nTop ); + } + else + { + nTop = it->nPropValue; + rProps.GetOpt( ESCHER_Prop_geoLeft, nLeft ); + } + + m_aShapeProps.insert(std::pair(OString("geoLeft"), + OString::valueOf(sal_Int32(sal_Int32( nLeft ))))); + m_aShapeProps.insert(std::pair(OString("geoTop"), + OString::valueOf(sal_Int32(sal_Int32( nTop ))))); + } + break; + + case ESCHER_Prop_geoRight: + case ESCHER_Prop_geoBottom: + { + sal_uInt32 nLeft = 0, nRight = 0, nTop = 0, nBottom = 0; + rProps.GetOpt( ESCHER_Prop_geoLeft, nLeft ); + rProps.GetOpt( ESCHER_Prop_geoTop, nTop ); + + if ( nId == ESCHER_Prop_geoRight ) + { + nRight = it->nPropValue; + rProps.GetOpt( ESCHER_Prop_geoBottom, nBottom ); + } + else + { + nBottom = it->nPropValue; + rProps.GetOpt( ESCHER_Prop_geoRight, nRight ); + } + + m_aShapeProps.insert(std::pair(OString("geoRight"), + OString::valueOf(sal_Int32(sal_Int32( nRight ) - sal_Int32( nLeft ))))); + m_aShapeProps.insert(std::pair(OString("geoBottom"), + OString::valueOf(sal_Int32(sal_Int32( nBottom ) - sal_Int32( nTop ))))); + } + break; + case ESCHER_Prop_pVertices: + case ESCHER_Prop_pSegmentInfo: + { + EscherPropSortStruct aVertices; + EscherPropSortStruct aSegments; + + if ( rProps.GetOpt( ESCHER_Prop_pVertices, aVertices ) && + rProps.GetOpt( ESCHER_Prop_pSegmentInfo, aSegments ) ) + { + const sal_uInt8 *pVerticesIt = aVertices.pBuf + 6; + const sal_uInt8 *pSegmentIt = aSegments.pBuf; + + OStringBuffer aSegmentInfo( 512 ); + OStringBuffer aVerticies( 512 ); + + sal_uInt16 nPointSize = aVertices.pBuf[4] + ( aVertices.pBuf[5] << 8 ); + + // number of segments + sal_uInt16 nSegments = impl_GetUInt16( pSegmentIt ); + sal_Int32 nVertices = 0; + aSegmentInfo.append("2;").append((sal_Int32)nSegments); + pSegmentIt += 4; + + for ( ; nSegments; --nSegments ) + { + sal_uInt16 nSeg = impl_GetUInt16( pSegmentIt ); + aSegmentInfo.append(';').append((sal_Int32)nSeg); + switch ( nSeg ) + { + case 0x0001: // lineto + case 0x4000: // moveto + { + sal_Int32 nX = impl_GetPointComponent( pVerticesIt, nPointSize ); + sal_Int32 nY = impl_GetPointComponent( pVerticesIt, nPointSize ); + aVerticies.append( ";(" ).append( nX ).append( "," ).append( nY ).append( ")" ); + nVertices ++; + } + break; + case 0x2001: // curveto + { + for (int i = 0; i < 3; i++) + { + sal_Int32 nX = impl_GetPointComponent( pVerticesIt, nPointSize ); + sal_Int32 nY = impl_GetPointComponent( pVerticesIt, nPointSize ); + aVerticies.append( ";(" ).append( nX ).append( "," ).append( nY ).append( ")" ); + nVertices ++; + } + } + break; + case 0xb300: + case 0xac00: + case 0xaa00: // nofill + case 0xab00: // nostroke + case 0x6001: // close + case 0x8000: // end + break; + default: + OSL_TRACE("%s: unhandled segment '%x' in the path", __PRETTY_FUNCTION__, nSeg); + break; + } + } + + if (aVerticies.getLength() ) + { + // We know the number of vertices at the end only, so we have to prepend them here. + OStringBuffer aBuf; + aBuf.append("8;").append((sal_Int32)nVertices); + aBuf.append(aVerticies.makeStringAndClear()); + m_aShapeProps.insert(std::pair(OString("pVerticies"), aBuf.makeStringAndClear())); + } + if ( aSegmentInfo.getLength() ) + m_aShapeProps.insert(std::pair(OString("pSegmentInfo"), aSegmentInfo.makeStringAndClear())); + } + else + OSL_TRACE("%s: unhandled shape path, missing either pVertices or pSegmentInfo", __PRETTY_FUNCTION__); + } + break; + case ESCHER_Prop_shapePath: + // noop, we use pSegmentInfo instead + break; + case ESCHER_Prop_fFillOK: + if (!it->nPropValue) + m_aShapeProps.insert(std::pair(OString("fFillOK"), OString::valueOf(sal_Int32(0)))); + break; + case ESCHER_Prop_dxTextLeft: + m_aShapeProps.insert(std::pair(OString("dxTextLeft"), OString::valueOf(sal_Int32(it->nPropValue)))); + break; + case ESCHER_Prop_dyTextTop: + m_aShapeProps.insert(std::pair(OString("dyTextTop"), OString::valueOf(sal_Int32(it->nPropValue)))); + break; + case ESCHER_Prop_dxTextRight: + m_aShapeProps.insert(std::pair(OString("dxTextRight"), OString::valueOf(sal_Int32(it->nPropValue)))); + break; + case ESCHER_Prop_dyTextBottom: + m_aShapeProps.insert(std::pair(OString("dyTextBottom"), OString::valueOf(sal_Int32(it->nPropValue)))); + break; + case ESCHER_Prop_FitTextToShape: + // Size text to fit shape size: not supported by RTF + break; + case ESCHER_Prop_adjustValue: + m_aShapeProps.insert(std::pair(OString("adjustValue"), OString::valueOf(sal_Int32(it->nPropValue)))); + break; + case ESCHER_Prop_txflTextFlow: + m_aShapeProps.insert(std::pair(OString("txflTextFlow"), OString::valueOf(sal_Int32(it->nPropValue)))); + break; + default: + OSL_TRACE("%s: unhandled property: %d (value: %d)", __PRETTY_FUNCTION__, nId, it->nPropValue); + break; + } + } +} + +void RtfSdrExport::AddLineDimensions( const Rectangle& rRectangle ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + // We get the position relative to (the current?) character + m_aShapeProps.insert(std::pair(OString("posrelh"), OString::valueOf(sal_Int32(3)))); + + switch ( m_nShapeFlags & 0xC0 ) + { + case 0x40: + m_aShapeProps.insert(std::pair(OString("fFlipV"), OString::valueOf(sal_Int32(1)))); + break; + case 0x80: + m_aShapeProps.insert(std::pair(OString("fFlipH"), OString::valueOf(sal_Int32(1)))); + break; + case 0xC0: + m_aShapeProps.insert(std::pair(OString("fFlipV"), OString::valueOf(sal_Int32(1)))); + m_aShapeProps.insert(std::pair(OString("fFlipH"), OString::valueOf(sal_Int32(1)))); + break; + } + + // the actual dimensions + m_pShapeStyle->append(OOO_STRING_SVTOOLS_RTF_SHPLEFT).append(rRectangle.Left()); + m_pShapeStyle->append(OOO_STRING_SVTOOLS_RTF_SHPTOP).append(rRectangle.Top()); + m_pShapeStyle->append(OOO_STRING_SVTOOLS_RTF_SHPRIGHT).append(rRectangle.Right()); + m_pShapeStyle->append(OOO_STRING_SVTOOLS_RTF_SHPBOTTOM).append(rRectangle.Bottom()); +} + +void RtfSdrExport::AddRectangleDimensions( rtl::OStringBuffer& rBuffer, const Rectangle& rRectangle ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + // We get the position relative to (the current?) character + m_aShapeProps.insert(std::pair(OString("posrelh"), OString::valueOf(sal_Int32(3)))); + + rBuffer.append(OOO_STRING_SVTOOLS_RTF_SHPLEFT).append(rRectangle.Left()); + rBuffer.append(OOO_STRING_SVTOOLS_RTF_SHPTOP).append(rRectangle.Top()); + rBuffer.append(OOO_STRING_SVTOOLS_RTF_SHPRIGHT).append(rRectangle.Right()); + rBuffer.append(OOO_STRING_SVTOOLS_RTF_SHPBOTTOM).append(rRectangle.Bottom()); +} + +void RtfSdrExport::AddShapeAttribute( sal_Int32 /*nAttribute*/, const rtl::OString& /*rValue*/ ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + /* noop */ +} + +extern const char* pShapeTypes[]; + +sal_Int32 RtfSdrExport::StartShape() +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( m_nShapeType == ESCHER_ShpInst_Nil ) + return -1; + + m_aShapeProps.insert(std::pair(OString("shapeType"), OString::valueOf(sal_Int32(m_nShapeType)))); + + m_rAttrOutput.RunText().append('{').append(OOO_STRING_SVTOOLS_RTF_SHP); + m_rAttrOutput.RunText().append('{').append(OOO_STRING_SVTOOLS_RTF_IGNORE).append(OOO_STRING_SVTOOLS_RTF_SHPINST); + + m_rAttrOutput.RunText().append(m_pShapeStyle->makeStringAndClear()); + // Ignore \shpbxpage, \shpbxmargin, and \shpbxcolumn, in favor of the posrelh property. + m_rAttrOutput.RunText().append(OOO_STRING_SVTOOLS_RTF_SHPBXIGNORE); + // Ignore \shpbypage, \shpbymargin, and \shpbycolumn, in favor of the posrelh property. + m_rAttrOutput.RunText().append(OOO_STRING_SVTOOLS_RTF_SHPBYIGNORE); + + for(std::map::reverse_iterator i = m_aShapeProps.rbegin(); i != m_aShapeProps.rend(); i++) + m_rAttrOutput.RunText().append('{').append(OOO_STRING_SVTOOLS_RTF_SP) + .append('{').append(OOO_STRING_SVTOOLS_RTF_SN " ").append((*i).first).append('}') + .append('{').append(OOO_STRING_SVTOOLS_RTF_SV " ").append((*i).second).append('}') + .append('}'); + + // now check if we have some text + const SdrTextObj* pTxtObj = PTR_CAST(SdrTextObj, m_pSdrObject); + if (pTxtObj) + { + const OutlinerParaObject* pParaObj = 0; + bool bOwnParaObj = false; + + /* + #i13885# + When the object is actively being edited, that text is not set into + the objects normal text object, but lives in a seperate object. + */ + if (pTxtObj->IsTextEditActive()) + { + pParaObj = pTxtObj->GetEditOutlinerParaObject(); + bOwnParaObj = true; + } + else + { + pParaObj = pTxtObj->GetOutlinerParaObject(); + } + + if( pParaObj ) + { + // this is reached only in case some text is attached to the shape + WriteOutliner(*pParaObj); + if( bOwnParaObj ) + delete pParaObj; + } + } + + return m_nShapeType; +} + +void RtfSdrExport::WriteOutliner(const OutlinerParaObject& rParaObj) +{ + OSL_TRACE("%s start", __PRETTY_FUNCTION__); + + const EditTextObject& rEditObj = rParaObj.GetTextObject(); + MSWord_SdrAttrIter aAttrIter( m_rExport, rEditObj, TXT_HFTXTBOX ); + + USHORT nPara = rEditObj.GetParagraphCount(); + + m_rAttrOutput.RunText().append('{').append(OOO_STRING_SVTOOLS_RTF_SHPTXT).append(' '); + for (USHORT n = 0; n < nPara; ++n) + { + if( n ) + aAttrIter.NextPara( n ); + + rtl_TextEncoding eChrSet = aAttrIter.GetNodeCharSet(); + + String aStr( rEditObj.GetText( n )); + xub_StrLen nAktPos = 0; + xub_StrLen nEnd = aStr.Len(); + + aAttrIter.OutParaAttr(false); + m_rAttrOutput.RunText().append(m_rAttrOutput.Styles().makeStringAndClear()); + + do { + xub_StrLen nNextAttr = aAttrIter.WhereNext(); + rtl_TextEncoding eNextChrSet = aAttrIter.GetNextCharSet(); + + if( nNextAttr > nEnd ) + nNextAttr = nEnd; + + aAttrIter.OutAttr( nAktPos ); + m_rAttrOutput.RunText().append('{').append(m_rAttrOutput.Styles().makeStringAndClear()).append(m_rExport.sNewLine); + bool bTxtAtr = aAttrIter.IsTxtAttr( nAktPos ); + if( !bTxtAtr ) + { + String aOut( aStr.Copy( nAktPos, nNextAttr - nAktPos ) ); + m_rAttrOutput.RunText().append( m_rExport.OutString( aOut, eChrSet ) ); + } + + m_rAttrOutput.RunText().append('}'); + + nAktPos = nNextAttr; + eChrSet = eNextChrSet; + aAttrIter.NextPos(); + } + while( nAktPos < nEnd ); + } + m_rAttrOutput.RunText().append(OOO_STRING_SVTOOLS_RTF_PAR).append('}'); + + OSL_TRACE("%s end", __PRETTY_FUNCTION__); +} + +void RtfSdrExport::EndShape( sal_Int32 nShapeElement ) +{ + OSL_TRACE("%s", __PRETTY_FUNCTION__); + + if ( nShapeElement >= 0 ) + { + // end of the shape + m_rAttrOutput.RunText().append('}').append('}'); + } +} + +UINT32 RtfSdrExport::AddSdrObject( const SdrObject& rObj ) +{ + m_pSdrObject = &rObj; + return EscherEx::AddSdrObject(rObj); +} + +/* vi:set shiftwidth=4 expandtab: */ diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx b/sw/source/filter/ww8/rtfsdrexport.hxx new file mode 100644 index 0000000000..a3ac1c0d31 --- /dev/null +++ b/sw/source/filter/ww8/rtfsdrexport.hxx @@ -0,0 +1,112 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2010 Miklos Vajna. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _RTFSdrEXPORT_HXX_ +#define _RTFSdrEXPORT_HXX_ + +#include +#include +#include + +#include + +class RtfExport; +class RtfAttributeOutput; + +class RtfSdrExport : public EscherEx +{ + RtfExport &m_rExport; + + RtfAttributeOutput &m_rAttrOutput; + + const SdrObject* m_pSdrObject; + + /// Remember the shape type. + sal_uInt32 m_nShapeType; + + /// Remember the shape flags. + sal_uInt32 m_nShapeFlags; + + /// Remember style, the most important shape attribute ;-) + rtl::OStringBuffer *m_pShapeStyle; + + std::map m_aShapeProps; + + /// Remember which shape types we had already written. + bool *m_pShapeTypeWritten; + +public: + RtfSdrExport( RtfExport &rExport ); + virtual ~RtfSdrExport(); + + /// Export the sdr object as Sdr. + /// + /// Call this when you need to export the object as Sdr in RTF. + UINT32 AddSdrObject( const SdrObject& rObj ); + +protected: + /// Add an attribute to the generated shape element. + /// + /// This should be called from within StartShape() to ensure that the + /// added attribute is preserved. + void AddShapeAttribute( sal_Int32 nAttribute, const rtl::OString& sValue ); + + /// Start the shape for which we just collected the information. + /// + /// Returns the element's tag number, -1 means we wrote nothing. + virtual sal_Int32 StartShape(); + + /// End the shape. + /// + /// The parameter is just what we got from StartShape(). + virtual void EndShape( sal_Int32 nShapeElement ); + + virtual void Commit( EscherPropertyContainer& rProps, const Rectangle& rRect ); + +private: + + virtual void OpenContainer( UINT16 nEscherContainer, int nRecInstance = 0 ); + virtual void CloseContainer(); + + virtual UINT32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 ); + virtual void LeaveGroup(); + + virtual void AddShape( UINT32 nShapeType, UINT32 nShapeFlags, UINT32 nShapeId = 0 ); + +private: + /// Add starting and ending point of a line to the m_pShapeAttrList. + void AddLineDimensions( const Rectangle& rRectangle ); + + /// Add position and size to the OStringBuffer. + void AddRectangleDimensions( rtl::OStringBuffer& rBuffer, const Rectangle& rRectangle ); + + void WriteOutliner(const OutlinerParaObject& rParaObj); +}; + +#endif // _RTFSdrEXPORT_HXX_ +/* vi:set shiftwidth=4 expandtab: */ diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 72dbabefd9..71889e25bf 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -811,49 +811,7 @@ void WW8Export::AppendFlyInFlys(const sw::Frame& rFrmFmt, OutputField(0, ww::eSHAPE, aEmptyStr, WRITEFIELD_CLOSE); } -class WW8_SdrAttrIter : public MSWordAttrIter -{ -private: - const EditTextObject* pEditObj; - const SfxItemPool* pEditPool; - EECharAttribArray aTxtAtrArr; - SvPtrarr aChrTxtAtrArr; - SvUShorts aChrSetArr; - USHORT nPara; - xub_StrLen nAktSwPos; - xub_StrLen nTmpSwPos; // fuer HasItem() - rtl_TextEncoding eNdChrSet; - USHORT nScript; - BYTE mnTyp; - - xub_StrLen SearchNext( xub_StrLen nStartPos ); - void SetCharSet(const EECharAttrib& rTxtAttr, bool bStart); - - //No copying - WW8_SdrAttrIter(const WW8_SdrAttrIter&); - WW8_SdrAttrIter& operator=(const WW8_SdrAttrIter&); -public: - WW8_SdrAttrIter( WW8Export& rWr, const EditTextObject& rEditObj, - BYTE nType ); - void NextPara( USHORT nPar ); - void OutParaAttr(bool bCharAttr); - void OutEEField(const SfxPoolItem& rHt); - - bool IsTxtAttr(xub_StrLen nSwPos); - - void NextPos() { nAktSwPos = SearchNext( nAktSwPos + 1 ); } - - void OutAttr( xub_StrLen nSwPos ); - virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const; - virtual const SfxPoolItem& GetItem( USHORT nWhich ) const; - bool OutAttrWithRange(xub_StrLen nPos); - xub_StrLen WhereNext() const { return nAktSwPos; } - rtl_TextEncoding GetNextCharSet() const; - rtl_TextEncoding GetNodeCharSet() const { return eNdChrSet; } -}; - - -WW8_SdrAttrIter::WW8_SdrAttrIter( WW8Export& rWr, +MSWord_SdrAttrIter::MSWord_SdrAttrIter( MSWordExportBase& rWr, const EditTextObject& rEditObj, BYTE nTyp ) : MSWordAttrIter( rWr ), pEditObj(&rEditObj), pEditPool(0), aTxtAtrArr( 0, 4 ), aChrTxtAtrArr( 0, 4 ), aChrSetArr( 0, 4 ), @@ -862,7 +820,7 @@ WW8_SdrAttrIter::WW8_SdrAttrIter( WW8Export& rWr, NextPara( 0 ); } -void WW8_SdrAttrIter::NextPara( USHORT nPar ) +void MSWord_SdrAttrIter::NextPara( USHORT nPar ) { nPara = nPar; // Attributwechsel an Pos 0 wird ignoriert, da davon ausgegangen @@ -885,7 +843,7 @@ void WW8_SdrAttrIter::NextPara( USHORT nPar ) nAktSwPos = SearchNext( 1 ); } -rtl_TextEncoding WW8_SdrAttrIter::GetNextCharSet() const +rtl_TextEncoding MSWord_SdrAttrIter::GetNextCharSet() const { if( aChrSetArr.Count() ) return (rtl_TextEncoding)aChrSetArr[ aChrSetArr.Count() - 1 ]; @@ -893,7 +851,7 @@ rtl_TextEncoding WW8_SdrAttrIter::GetNextCharSet() const } // der erste Parameter in SearchNext() liefert zurueck, ob es ein TxtAtr ist. -xub_StrLen WW8_SdrAttrIter::SearchNext( xub_StrLen nStartPos ) +xub_StrLen MSWord_SdrAttrIter::SearchNext( xub_StrLen nStartPos ) { xub_StrLen nPos; xub_StrLen nMinPos = STRING_MAXLEN; @@ -932,7 +890,7 @@ xub_StrLen WW8_SdrAttrIter::SearchNext( xub_StrLen nStartPos ) return nMinPos; } -void WW8_SdrAttrIter::SetCharSet(const EECharAttrib& rAttr, bool bStart) +void MSWord_SdrAttrIter::SetCharSet(const EECharAttrib& rAttr, bool bStart) { void* p = 0; rtl_TextEncoding eChrSet; @@ -962,7 +920,7 @@ void WW8_SdrAttrIter::SetCharSet(const EECharAttrib& rAttr, bool bStart) } } -void WW8_SdrAttrIter::OutEEField(const SfxPoolItem& rHt) +void MSWord_SdrAttrIter::OutEEField(const SfxPoolItem& rHt) { const SvxFieldItem &rField = (const SvxFieldItem &)rHt; const SvxFieldData *pFld = rField.GetField(); @@ -981,7 +939,7 @@ void WW8_SdrAttrIter::OutEEField(const SfxPoolItem& rHt) } } -void WW8_SdrAttrIter::OutAttr( xub_StrLen nSwPos ) +void MSWord_SdrAttrIter::OutAttr( xub_StrLen nSwPos ) { OutParaAttr(true); @@ -1038,7 +996,7 @@ void WW8_SdrAttrIter::OutAttr( xub_StrLen nSwPos ) } } -bool WW8_SdrAttrIter::IsTxtAttr(xub_StrLen nSwPos) +bool MSWord_SdrAttrIter::IsTxtAttr(xub_StrLen nSwPos) { for (USHORT i = 0; i < aTxtAtrArr.Count(); ++i) { @@ -1063,7 +1021,7 @@ bool WW8_SdrAttrIter::IsTxtAttr(xub_StrLen nSwPos) // Attribut-Anfangposition fragen kann. // Es koennen nur Attribute mit Ende abgefragt werden. // Es wird mit bDeep gesucht -const SfxPoolItem* WW8_SdrAttrIter::HasTextItem(USHORT nWhich) const +const SfxPoolItem* MSWord_SdrAttrIter::HasTextItem(USHORT nWhich) const { const SfxPoolItem* pRet = 0; nWhich = sw::hack::TransformWhichBetweenPools(*pEditPool, @@ -1088,7 +1046,7 @@ const SfxPoolItem* WW8_SdrAttrIter::HasTextItem(USHORT nWhich) const return pRet; } -const SfxPoolItem& WW8_SdrAttrIter::GetItem( USHORT nWhich ) const +const SfxPoolItem& MSWord_SdrAttrIter::GetItem( USHORT nWhich ) const { using sw::hack::GetSetWhichFromSwDocWhich; const SfxPoolItem* pRet = HasTextItem(nWhich); @@ -1102,7 +1060,7 @@ const SfxPoolItem& WW8_SdrAttrIter::GetItem( USHORT nWhich ) const return *pRet; } -void WW8_SdrAttrIter::OutParaAttr(bool bCharAttr) +void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr) { SfxItemSet aSet( pEditObj->GetParaAttribs( nPara )); if( aSet.Count() ) @@ -1175,7 +1133,7 @@ void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, BYTE nTyp) { bool bAnyWrite = false; const EditTextObject& rEditObj = rParaObj.GetTextObject(); - WW8_SdrAttrIter aAttrIter( *this, rEditObj, nTyp ); + MSWord_SdrAttrIter aAttrIter( *this, rEditObj, nTyp ); USHORT nPara = rEditObj.GetParagraphCount(); BYTE bNul = 0; diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index d22decdf9a..6f1c4adc28 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1646,14 +1646,127 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); } -xub_StrLen MSWordExportBase::GetNextPos( SwAttrIter* aAttrIter, const SwTxtNode& /*rNode*/, xub_StrLen /*nAktPos*/ ) +xub_StrLen MSWordExportBase::GetNextPos( SwAttrIter* aAttrIter, const SwTxtNode& rNode, xub_StrLen nAktPos ) { - return aAttrIter->WhereNext(); + // Get the bookmarks for the normal run + xub_StrLen nNextPos = aAttrIter->WhereNext(); + + GetSortedBookmarks( rNode, nAktPos, nNextPos - nAktPos ); + + xub_StrLen nNextBookmark = nNextPos; + NearestBookmark( nNextPos ); + + return std::min( nNextPos, nNextBookmark ); +} + +void MSWordExportBase::UpdatePosition( SwAttrIter* aAttrIter, xub_StrLen nAktPos, xub_StrLen /*nEnd*/ ) +{ + xub_StrLen nNextPos; + + // either no bookmark, or it is not at the current position + if ( !NearestBookmark( nNextPos ) || nNextPos > nAktPos ) + aAttrIter->NextPos(); +} + +bool MSWordExportBase::GetBookmarks( const SwTxtNode& rNd, xub_StrLen nStt, + xub_StrLen nEnd, IMarkVector& rArr ) +{ + IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); + ULONG nNd = rNd.GetIndex( ); + + const sal_Int32 nMarks = pMarkAccess->getMarksCount(); + for ( sal_Int32 i = 0; i < nMarks; i++ ) + { + IMark* pMark = ( pMarkAccess->getMarksBegin() + i )->get(); + + // Only keep the bookmarks starting or ending in this node + if ( pMark->GetMarkStart().nNode == nNd || + pMark->GetMarkEnd().nNode == nNd ) + { + xub_StrLen nBStart = pMark->GetMarkStart().nContent.GetIndex(); + xub_StrLen nBEnd = pMark->GetMarkEnd().nContent.GetIndex(); + + // Keep only the bookmars starting or ending in the snippet + bool bIsStartOk = ( nBStart >= nStt ) && ( nBStart <= nEnd ); + bool bIsEndOk = ( nBEnd >= nStt ) && ( nBEnd <= nEnd ); + + if ( bIsStartOk || bIsEndOk ) + rArr.push_back( pMark ); + } + } + return ( rArr.size() > 0 ); } -void MSWordExportBase::UpdatePosition( SwAttrIter* aAttrIter, xub_StrLen /*nAktPos*/, xub_StrLen /*nEnd*/ ) +class CompareMarksEnd : public std::binary_function < const IMark *, const IMark *, bool > { - aAttrIter->NextPos(); +public: + inline bool operator() ( const IMark * pOneB, const IMark * pTwoB ) const + { + xub_StrLen nOEnd = pOneB->GetMarkEnd().nContent.GetIndex(); + xub_StrLen nTEnd = pTwoB->GetMarkEnd().nContent.GetIndex(); + + return nOEnd < nTEnd; + } +}; + +bool MSWordExportBase::NearestBookmark( xub_StrLen& rNearest ) +{ + bool bHasBookmark = false; + + if ( m_rSortedMarksStart.size( ) > 0 ) + { + IMark* pMarkStart = m_rSortedMarksStart.front(); + rNearest = pMarkStart->GetMarkStart().nContent.GetIndex(); + bHasBookmark = true; + } + + if ( m_rSortedMarksEnd.size( ) > 0 ) + { + IMark* pMarkEnd = m_rSortedMarksEnd[0]; + if ( !bHasBookmark ) + rNearest = pMarkEnd->GetMarkEnd().nContent.GetIndex(); + else + rNearest = std::min( rNearest, pMarkEnd->GetMarkEnd().nContent.GetIndex() ); + bHasBookmark = true; + } + + return bHasBookmark; +} + +void MSWordExportBase::GetSortedBookmarks( const SwTxtNode& rNode, xub_StrLen nAktPos, xub_StrLen nLen ) +{ + IMarkVector aMarksStart; + if ( GetBookmarks( rNode, nAktPos, nAktPos + nLen, aMarksStart ) ) + { + IMarkVector aSortedEnd; + IMarkVector aSortedStart; + for ( IMarkVector::const_iterator it = aMarksStart.begin(), end = aMarksStart.end(); + it < end; ++it ) + { + IMark* pMark = (*it); + + // Remove the positions egals to the current pos + xub_StrLen nStart = pMark->GetMarkStart().nContent.GetIndex(); + xub_StrLen nEnd = pMark->GetMarkEnd().nContent.GetIndex(); + + if ( nStart > nAktPos ) + aSortedStart.push_back( pMark ); + + if ( nEnd > nAktPos ) + aSortedEnd.push_back( pMark ); + } + + // Sort the bookmarks by end position + std::sort( aSortedEnd.begin(), aSortedEnd.end(), CompareMarksEnd() ); + + m_rSortedMarksStart.swap( aSortedStart ); + m_rSortedMarksEnd.swap( aSortedEnd ); + } + else + { + m_rSortedMarksStart.clear( ); + m_rSortedMarksEnd.clear( ); + } } void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index 2ed01f48a8..da139872e5 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -721,6 +721,9 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr, StarSymbolToMSMultiFont *pConvert = 0; FontFamily eFamily = FAMILY_DECORATIVE; + if (!bSubstituteBullets) + return; + if (!pConvert) { pConvert = CreateStarSymbolToMSMultiFont(); diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 651c09e0ae..5d0cc8db0a 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -79,6 +79,7 @@ #include "ww8par.hxx" #include "ww8attributeoutput.hxx" #include "docxattributeoutput.hxx" +#include "rtfattributeoutput.hxx" using namespace sw::util; using namespace nsHdFtFlags; @@ -713,6 +714,17 @@ void wwFont::WriteDocx( const DocxAttributeOutput* rAttrOutput ) const } #endif +void wwFont::WriteRtf( const RtfAttributeOutput* rAttrOutput ) const +{ + rAttrOutput->FontFamilyType( meFamily, *this ); + rAttrOutput->FontPitchType( mePitch ); + rAttrOutput->FontCharset( sw::ms::rtl_TextEncodingToWinCharset( meChrSet ) ); + rAttrOutput->StartFont( msFamilyNm ); + if ( mbAlt ) + rAttrOutput->FontAlternateName( msAltNm ); + rAttrOutput->EndFont(); +} + bool operator<(const wwFont &r1, const wwFont &r2) { int nRet = memcmp(r1.maWW8_FFN, r2.maWW8_FFN, sizeof(r1.maWW8_FFN)); @@ -765,6 +777,22 @@ void wwFontHelper::InitFontTable(bool bWrtWW8,const SwDoc& rDoc) GetId(wwFont(pFont->GetFamilyName(), pFont->GetPitch(), pFont->GetFamily(), pFont->GetCharSet(),bWrtWW8)); } + + if (!bLoadAllFonts) + return; + + const USHORT aTypes[] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT, 0 }; + for (const USHORT* pId = aTypes; *pId; ++pId) + { + USHORT nMaxItem = rPool.GetItemCount( *pId ); + for( USHORT nGet = 0; nGet < nMaxItem; ++nGet ) + if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem( + *pId, nGet )) ) + { + GetId(wwFont(pFont->GetFamilyName(), pFont->GetPitch(), + pFont->GetFamily(), pFont->GetCharSet(),bWrtWW8)); + } + } } USHORT wwFontHelper::GetId(const Font& rFont) @@ -839,6 +867,14 @@ void wwFontHelper::WriteFontTable( const DocxAttributeOutput& rAttrOutput ) } #endif +void wwFontHelper::WriteFontTable( const RtfAttributeOutput& rAttrOutput ) +{ + ::std::vector aFontList( AsVector() ); + + ::std::for_each( aFontList.begin(), aFontList.end(), + ::std::bind2nd( ::std::mem_fun( &wwFont::WriteRtf ), &rAttrOutput ) ); +} + /* */ WW8_WrPlc0::WW8_WrPlc0( ULONG nOffset ) diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index f541d57b93..53f4e6f8c8 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3371,7 +3371,7 @@ MSWordExportBase::MSWordExportBase( SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM mpTableInfo(new ww8::WW8TableInfo()), nUniqueList(0), mnHdFtIndex(0), pAktPageDesc(0), pPapPlc(0), pChpPlc(0), pChpIter(0), pStyles( NULL ), - bHasHdr(false), bHasFtr(false), + bHasHdr(false), bHasFtr(false), bSubstituteBullets(true), pDoc( pDocument ), pCurPam( pCurrentPam ), pOrigPam( pOriginalPam ) diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 43211a962e..4ad0cdcde9 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -35,6 +35,7 @@ #define _SVSTDARR_ULONGS #include #endif +#include #include #include @@ -55,6 +56,7 @@ class SwAttrIter; class AttributeOutputBase; class DocxAttributeOutput; +class RtfAttributeOutput; class BitmapPalette; class SwEscherEx; class DateTime; @@ -296,6 +298,7 @@ public: #ifdef DOCX void WriteDocx( const DocxAttributeOutput* rAttrOutput ) const; #endif + void WriteRtf( const RtfAttributeOutput* rAttrOutput ) const; rtl::OUString GetFamilyName() const { return rtl::OUString( msFamilyNm ); } friend bool operator < (const wwFont &r1, const wwFont &r2); }; @@ -311,7 +314,7 @@ private: ::std::vector< const wwFont* > AsVector() const; public: - wwFontHelper() : mbWrtWW8(false) {} + wwFontHelper() : mbWrtWW8(false), bLoadAllFonts(false) {} /// rDoc used only to get the initial standard font(s) in use. void InitFontTable(bool bWrtWW8, const SwDoc& rDoc); USHORT GetId(const Font& rFont); @@ -321,6 +324,10 @@ public: #ifdef DOCX void WriteFontTable( const DocxAttributeOutput& rAttrOutput ); #endif + void WriteFontTable( const RtfAttributeOutput& rAttrOutput ); + + /// If true, all fonts are loaded before processing the document. + BYTE bLoadAllFonts: 1; }; class DrawObj @@ -539,6 +546,7 @@ public: BYTE bEndAtTxtEnd : 1; // true: all END at Textend BYTE bHasHdr : 1; BYTE bHasFtr : 1; + BYTE bSubstituteBullets : 1; // true: SubstituteBullet() gets called SwDoc *pDoc; SwPaM *pCurPam, *pOrigPam; @@ -546,6 +554,11 @@ public: /// Stack to remember the nesting (see MSWordSaveData for more) ::std::stack< MSWordSaveData > maSaveData; + /// Used to split the runs according to the bookmarks start and ends + typedef std::vector< ::sw::mark::IMark* > IMarkVector; + IMarkVector m_rSortedMarksStart; + IMarkVector m_rSortedMarksEnd; + public: /// The main function to export the document. void ExportDocument( bool bWriteAll ); @@ -785,6 +798,17 @@ protected: /// One of OutputTextNode(), OutputGrfNode(), or OutputOLENode() void OutputContentNode( const SwCntntNode& ); + /// Find the nearest bookmark from the current position. + /// + /// Returns false when there is no bookmark. + bool NearestBookmark( xub_StrLen& rNearest ); + + void GetSortedBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, + xub_StrLen nLen ); + + bool GetBookmarks( const SwTxtNode& rNd, xub_StrLen nStt, xub_StrLen nEnd, + IMarkVector& rArr ); + public: MSWordExportBase( SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM *pOriginalPam ); virtual ~MSWordExportBase(); @@ -1350,6 +1374,47 @@ public: virtual const SfxPoolItem& GetItem( USHORT nWhich ) const = 0; }; +class MSWord_SdrAttrIter : public MSWordAttrIter +{ +private: + const EditTextObject* pEditObj; + const SfxItemPool* pEditPool; + EECharAttribArray aTxtAtrArr; + SvPtrarr aChrTxtAtrArr; + SvUShorts aChrSetArr; + USHORT nPara; + xub_StrLen nAktSwPos; + xub_StrLen nTmpSwPos; // for HasItem() + rtl_TextEncoding eNdChrSet; + USHORT nScript; + BYTE mnTyp; + + xub_StrLen SearchNext( xub_StrLen nStartPos ); + void SetCharSet(const EECharAttrib& rTxtAttr, bool bStart); + + //No copying + MSWord_SdrAttrIter(const MSWord_SdrAttrIter&); + MSWord_SdrAttrIter& operator=(const MSWord_SdrAttrIter&); +public: + MSWord_SdrAttrIter( MSWordExportBase& rWr, const EditTextObject& rEditObj, + BYTE nType ); + void NextPara( USHORT nPar ); + void OutParaAttr(bool bCharAttr); + void OutEEField(const SfxPoolItem& rHt); + + bool IsTxtAttr(xub_StrLen nSwPos); + + void NextPos() { nAktSwPos = SearchNext( nAktSwPos + 1 ); } + + void OutAttr( xub_StrLen nSwPos ); + virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const; + virtual const SfxPoolItem& GetItem( USHORT nWhich ) const; + bool OutAttrWithRange(xub_StrLen nPos); + xub_StrLen WhereNext() const { return nAktSwPos; } + rtl_TextEncoding GetNextCharSet() const; + rtl_TextEncoding GetNodeCharSet() const { return eNdChrSet; } +}; + /// Class to collect and output the styles table. class MSWordStyles { diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 1e5d01101f..cde7c02ce4 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -3340,7 +3340,7 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines ) m_rWW8Export.pO->Insert( (BYTE)0x02, m_rWW8Export.pO->Count() ); sal_Unicode cStart = rTwoLines.GetStartBracket(); - sal_Unicode cEnd = rTwoLines.GetStartBracket(); + sal_Unicode cEnd = rTwoLines.GetEndBracket(); /* As per usual we have problems. We can have seperate left and right brackets -- cgit v1.2.3 From 20d975d15724e1db29f5a5f03ee8bbc0920e87be Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 30 Jul 2010 00:54:41 +0200 Subject: vmiklos01: #i113532# adapt RtfExport to build on dev300-m85 --- sw/source/filter/ww8/rtfattributeoutput.cxx | 135 ++++++++++++---------------- sw/source/filter/ww8/rtfattributeoutput.hxx | 8 +- sw/source/filter/ww8/rtfexport.cxx | 26 +++--- sw/source/filter/ww8/rtfexport.hxx | 1 + sw/source/filter/ww8/rtfexportfilter.cxx | 2 +- sw/source/filter/ww8/rtfsdrexport.cxx | 14 +-- sw/source/filter/ww8/rtfsdrexport.hxx | 4 +- sw/source/filter/ww8/wrtww8.hxx | 2 +- 8 files changed, 87 insertions(+), 105 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index d24f291b67..5101a7b11b 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -44,53 +44,53 @@ #include -#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include -#include +#include #include #include @@ -174,37 +174,11 @@ static OString OutTBLBorderLine(RtfExport &rExport, const SvxBorderLine* pLine, } else { - if ( DEF_LINE_WIDTH_0 == pLine->GetOutWidth( ) ) - // Hairline - aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRHAIR); - else if( 255 >= pLine->GetOutWidth() ) - { - // Simple width simple - aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRS); - switch ( pLine->GetStyle( ) ) - { - case DOTTED: - aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDOT); - break; - case DASHED: - aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDASH); - break; - case SOLID: - default: - break; - } - aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRW); - aRet.append((sal_Int32)pLine->GetOutWidth()); - } + // single line + if( DEF_LINE_WIDTH_1 >= pLine->GetOutWidth() ) + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRS OOO_STRING_SVTOOLS_RTF_BRDRW).append((sal_Int32)pLine->GetOutWidth()); else - { - // Shouldn't happen with the OOo default width values - OString aTmp = aRet.makeStringAndClear(); - aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTH); - aRet.append(aTmp); - aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRW); - aRet.append((sal_Int32)pLine->GetOutWidth()/2); - } + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTH OOO_STRING_SVTOOLS_RTF_BRDRW).append((sal_Int32)pLine->GetOutWidth() / 2); } aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRCF); @@ -459,7 +433,7 @@ void RtfAttributeOutput::RawText( const String& rText, bool /*bForceUnicode*/, r m_aRunText.append(m_rExport.OutString(rText, eCharSet)); } -void RtfAttributeOutput::StartRuby( const SwTxtNode& /*rNode*/, xub_StrLen /*nPos*/, const SwFmtRuby& /*rRuby*/ ) +void RtfAttributeOutput::StartRuby( const SwTxtNode& /*rNode*/, const SwFmtRuby& /*rRuby*/ ) { OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); } @@ -855,6 +829,11 @@ void RtfAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t m_aRowDefs.append(aTblAdjust.makeStringAndClear()); } +void RtfAttributeOutput::TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ ) +{ + OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); +} + void RtfAttributeOutput::TableRowEnd( sal_uInt32 /*nDepth*/ ) { OSL_TRACE("%s", __PRETTY_FUNCTION__); @@ -874,7 +853,7 @@ void RtfAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t bool bRelBoxSize = false; // Create the SwWriteTable instance to use col spans - GetTablePageSize( pTableTextNodeInfoInner, nPageSize, bRelBoxSize ); + GetTablePageSize( pTableTextNodeInfoInner.get(), nPageSize, bRelBoxSize ); const SwTable* pTable = pTableTextNodeInfoInner->getTable( ); const SwFrmFmt *pFmt = pTable->GetFrmFmt( ); @@ -1019,7 +998,7 @@ void RtfAttributeOutput::DefaultStyle( USHORT /*nStyle*/ ) } void RtfAttributeOutput::StartStyle( const String& rName, bool /*bPapFmt*/, - USHORT nBase, USHORT nNext, USHORT /*nWwId*/, USHORT nId, bool /*bAutoUpdate*/ ) + USHORT nBase, USHORT nNext, USHORT /*nWwId*/, USHORT nId ) { OSL_TRACE("%s, rName = '%s'", __PRETTY_FUNCTION__, OUStringToOString( OUString( rName ), m_rExport.eCurrentEncoding ).getStr()); @@ -1372,7 +1351,7 @@ void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eTyp m_aRunText.append(m_rExport.OutString(rFldCmd, m_rExport.eCurrentEncoding)); m_aRunText.append("}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " "); if (pFld) - m_aRunText.append(m_rExport.OutString(pFld->Expand(), m_rExport.eDefaultEncoding)); + m_aRunText.append(m_rExport.OutString(pFld->GetCntnt(), m_rExport.eDefaultEncoding)); m_aRunText.append("}}"); } @@ -2699,12 +2678,12 @@ void RtfAttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor ) m_aRunText.append((sal_Int32)nId); switch( nId ) { - case FLY_PAGE: + case FLY_AT_PAGE: m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYPAGE); m_aRunText.append((sal_Int32)rAnchor.GetPageNum()); break; - case FLY_AT_CNTNT: - case FLY_IN_CNTNT: + case FLY_AT_PARA: + case FLY_AS_CHAR: m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYCNTNT); break; } diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx index 6c4de2bb81..4cb1b9c27e 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.hxx +++ b/sw/source/filter/ww8/rtfattributeoutput.hxx @@ -29,6 +29,7 @@ #ifndef _RTFATTRIBUTEOUTPUT_HXX_ #define _RTFATTRIBUTEOUTPUT_HXX_ +#include #include "attributeoutputbase.hxx" #include "fields.hxx" @@ -89,7 +90,7 @@ public: virtual void RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet ); /// Output ruby start. - virtual void StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, const SwFmtRuby& rRuby ); + virtual void StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby ); /// Output ruby end. virtual void EndRuby(); @@ -136,6 +137,8 @@ public: virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + virtual void TableRowEnd( sal_uInt32 nDepth ); /// Start of the styles table. @@ -149,8 +152,7 @@ public: /// Start of a style in the styles table. virtual void StartStyle( const String& rName, bool bPapFmt, - USHORT nBase, USHORT nNext, USHORT nWwId, USHORT nId, - bool bAutoUpdate ); + USHORT nBase, USHORT nNext, USHORT nWwId, USHORT nId ); /// End of a style in the styles table. virtual void EndStyle(); diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 9e5bba1896..e343ada2de 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -57,16 +57,16 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -684,9 +684,9 @@ void RtfExport::PrepareNewPageDesc( const SfxItemSet* pSet, OSL_ENSURE( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." ); if ( pNewPgDescFmt ) - m_pSections->AppendSep( *pNewPgDescFmt, rNd, pFmt, nLnNm ); + m_pSections->AppendSection( *pNewPgDescFmt, rNd, pFmt, nLnNm ); else if ( pNewPgDesc ) - m_pSections->AppendSep( pNewPgDesc, rNd, pFmt, nLnNm ); + m_pSections->AppendSection( pNewPgDesc, rNd, pFmt, nLnNm ); AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() ); } @@ -732,7 +732,7 @@ void RtfExport::AppendSection( const SwPageDesc* pPageDesc, const SwSectionFmt* { OSL_TRACE("%s", __PRETTY_FUNCTION__); - m_pSections->AppendSep( pPageDesc, pFmt, nLnNum ); + m_pSections->AppendSection( pPageDesc, pFmt, nLnNum ); AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() ); } diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx index 9828a0b881..9e468d2804 100644 --- a/sw/source/filter/ww8/rtfexport.hxx +++ b/sw/source/filter/ww8/rtfexport.hxx @@ -29,6 +29,7 @@ #ifndef _RTFEXPORT_HXX_ #define _RTFEXPORT_HXX_ +#include #include "rtfattributeoutput.hxx" #include "wrtww8.hxx" diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx index 4b9e3aac55..ba040b96ed 100644 --- a/sw/source/filter/ww8/rtfexportfilter.cxx +++ b/sw/source/filter/ww8/rtfexportfilter.cxx @@ -60,7 +60,7 @@ sal_Bool RtfExportFilter::filter( const uno::Sequence< beans::PropertyValue >& a ::uno::Reference< io::XStream > xStream = aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_STREAMFOROUTPUT(), uno::Reference< io::XStream >() ); m_pStream = utl::UcbStreamHelper::CreateStream( xStream, sal_True ); - m_aWriter.SetStrm(*m_pStream); + m_aWriter.SetStream(m_pStream); // get SwDoc* uno::Reference< uno::XInterface > xIfc( m_xSrcDoc, uno::UNO_QUERY ); diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index acfbca487f..ac3baf2e48 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -34,12 +34,12 @@ #include #include #include -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -70,7 +70,7 @@ public: }; RtfSdrExport::RtfSdrExport( RtfExport &rExport ) - : EscherEx( *( new SvNullStream ), 0 ), + : EscherEx( EscherExGlobalRef( new EscherExGlobal ), *( new SvNullStream )), m_rExport( rExport ), m_rAttrOutput( (RtfAttributeOutput&)m_rExport.AttrOutput() ), m_nShapeType( ESCHER_ShpInst_Nil ), @@ -125,7 +125,7 @@ UINT32 RtfSdrExport::EnterGroup( const String& /*rShapeName*/, const Rectangle* { OSL_TRACE("%s", __PRETTY_FUNCTION__); - return GetShapeID(); + return GenerateShapeId(); } void RtfSdrExport::LeaveGroup() diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx b/sw/source/filter/ww8/rtfsdrexport.hxx index a3ac1c0d31..7ff0fe3dcd 100644 --- a/sw/source/filter/ww8/rtfsdrexport.hxx +++ b/sw/source/filter/ww8/rtfsdrexport.hxx @@ -29,8 +29,8 @@ #ifndef _RTFSdrEXPORT_HXX_ #define _RTFSdrEXPORT_HXX_ -#include -#include +#include +#include #include #include diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 4ad0cdcde9..c4d594f80e 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -35,7 +35,7 @@ #define _SVSTDARR_ULONGS #include #endif -#include +#include #include #include -- cgit v1.2.3 From fd70879d22116d3032b8d286a3e1040166912489 Mon Sep 17 00:00:00 2001 From: os Date: Fri, 30 Jul 2010 09:29:09 +0200 Subject: #i109951# from-to-selection error fixed --- sw/source/ui/envelp/mailmrge.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index a80438afe8..76595d5543 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -779,7 +779,7 @@ bool SwMailMergeDlg::ExecQryShell() m_aSelection.realloc(nEnd - nStart + 1); Any* pSelection = m_aSelection.getArray(); - for (sal_Int32 i = nStart; i != nEnd; ++i, ++pSelection) + for (sal_Int32 i = nStart; i <= nEnd; ++i, ++pSelection) *pSelection <<= i; } else if (aAllRB.IsChecked() ) -- cgit v1.2.3 From 6e40e0ba884ea923ea75cad2e1e114d76695e106 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 30 Jul 2010 11:21:44 +0200 Subject: sw34bf01: #i112111#: apply patch by dtardon: API test sw.SwXViewSettings::com::sun::star::beans::XPropertySet fails caused by property ShowHiddenCharacters --- sw/source/ui/uno/unomod.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index 50c19caaac..3c319b322e 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -918,7 +918,7 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u case HANDLE_VIEWSET_TABSTOPS : bBoolVal = mpConstViewOption->IsTab(sal_True); break; case HANDLE_VIEWSET_BREAKS : bBoolVal = mpConstViewOption->IsLineBreak(sal_True); break; case HANDLE_VIEWSET_HIDDEN_TEXT : bBoolVal = mpConstViewOption->IsShowHiddenField(); break; - case HANDLE_VIEWSET_HIDDEN_CHARACTERS : bBoolVal = mpConstViewOption->IsShowHiddenChar(); break; + case HANDLE_VIEWSET_HIDDEN_CHARACTERS : bBoolVal = mpConstViewOption->IsShowHiddenChar(sal_True); break; case HANDLE_VIEWSET_HIDDEN_PARAGRAPHS : bBoolVal = mpConstViewOption->IsShowHiddenPara(); break; case HANDLE_VIEWSET_TABLE_BOUNDARIES : bBoolVal = SwViewOption::IsTableBoundaries(); break; case HANDLE_VIEWSET_TEXT_BOUNDARIES : bBoolVal = SwViewOption::IsDocBoundaries(); break; -- cgit v1.2.3 From 4649553568709ddf445fa8f304e90e907c358dc3 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 30 Jul 2010 15:00:13 +0200 Subject: sw34bf01: #i113314#: frmpage.cxx: apply patch by cmc --- sw/source/ui/frmdlg/frmpage.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 7939957c71..8d371558d4 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -1080,7 +1080,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet) aWidthED .GetValue() == aWidthED .GetMin() && aHeightED.GetValue() == aHeightED.GetMin()); - if ((bNew && !bFormat) || (bValueModified || bCheckChanged) && bLegalValue) + if ((bNew && !bFormat) || ((bValueModified || bCheckChanged) && bLegalValue)) { sal_Int64 nNewWidth = aWidthED.DenormalizePercent(aWidthED.GetRealValue(FUNIT_TWIP)); sal_Int64 nNewHeight = aHeightED.DenormalizePercent(aHeightED.GetRealValue(FUNIT_TWIP)); -- cgit v1.2.3 From 1584db0d48fc2c3f7de3473fdd7ffc81c9da34e2 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 30 Jul 2010 15:21:58 +0200 Subject: vmiklos01: #i81569# quote strings in info group --- sw/source/filter/ww8/rtfexport.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index e343ada2de..784024d4c2 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -788,7 +788,7 @@ void RtfExport::OutUnicode(const sal_Char *pToken, const String &rContent) if (rContent.Len()) { Strm() << '{' << pToken << ' '; - Strm() << OUStringToOString( OUString( rContent ), eCurrentEncoding ).getStr(); + Strm() << OutString( rContent, eCurrentEncoding ).getStr(); Strm() << '}'; } } -- cgit v1.2.3 From 6a3d07baaba9e230f45827ce7ca0aba03fc7ef51 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 30 Jul 2010 15:50:26 +0200 Subject: DEV300 masterfix: #i10000# nDicIdx undeclared --- sw/source/ui/lingu/olmenu.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 87d5c000d3..b5639ca6c6 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -823,7 +823,7 @@ void SwSpellPopup::Execute( USHORT nId ) else if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END) { OUString aWord( xSpellAlt->getWord() ); - DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" ); +// DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" ); PopupMenu *pMenu = GetPopupMenu(MN_ADD_TO_DIC); String aDicName ( pMenu->GetItemText(nId) ); -- cgit v1.2.3 From 2f471937ce9820baaae0e6b8837398fa61e1301f Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 30 Jul 2010 19:59:04 +0200 Subject: vmiklos01: #i106677# listoverride index starts at one, not zero --- sw/source/filter/ww8/rtfattributeoutput.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 5101a7b11b..81cba2f0b9 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -1222,7 +1222,7 @@ void RtfAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &/*rRu m_rExport.OutULong(nId); m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LISTOVERRIDECOUNT << '0'; m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LS; - m_rExport.OutULong(nId-1) << '}'; + m_rExport.OutULong(nId) << '}'; } void RtfAttributeOutput::StartAbstractNumbering( USHORT nId ) @@ -2413,7 +2413,7 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL else m_aStyles.append((sal_Int32)nLvl); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_LS); - m_aStyles.append((sal_Int32)m_rExport.GetId(*pRule)); + m_aStyles.append((sal_Int32)m_rExport.GetId(*pRule)+1); m_aStyles.append(' '); } else -- cgit v1.2.3 From ff262d811ee0366b4315d15bf329901b6d75ab68 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 30 Jul 2010 21:59:04 +0200 Subject: vmiklos01: #i113532# remove most of SwRTFWriter --- sw/source/filter/rtf/makefile.mk | 7 +- sw/source/filter/rtf/rtfatr.cxx | 4356 ------------------------------------ sw/source/filter/rtf/rtfnum.cxx | 330 --- sw/source/filter/rtf/wrtrtf.cxx | 1801 --------------- sw/source/filter/rtf/wrtrtf.hxx | 253 --- sw/source/filter/ww8/rtfexport.cxx | 14 +- 6 files changed, 9 insertions(+), 6752 deletions(-) delete mode 100644 sw/source/filter/rtf/rtfatr.cxx delete mode 100644 sw/source/filter/rtf/wrtrtf.cxx delete mode 100644 sw/source/filter/rtf/wrtrtf.hxx (limited to 'sw/source') diff --git a/sw/source/filter/rtf/makefile.mk b/sw/source/filter/rtf/makefile.mk index 2ff764d730..e8e6a598ed 100644 --- a/sw/source/filter/rtf/makefile.mk +++ b/sw/source/filter/rtf/makefile.mk @@ -46,18 +46,15 @@ CDEFS=$(CDEFS) -Dmydebug EXCEPTIONSFILES= \ $(SLO)$/rtffly.obj \ $(SLO)$/rtfnum.obj \ - $(SLO)$/swparrtf.obj \ - $(SLO)$/wrtrtf.obj + $(SLO)$/swparrtf.obj SLOFILES = \ - $(SLO)$/rtfatr.obj \ $(SLO)$/rtffld.obj \ $(SLO)$/rtffly.obj \ $(SLO)$/rtfnum.obj \ $(SLO)$/rtftbl.obj \ - $(SLO)$/swparrtf.obj \ - $(SLO)$/wrtrtf.obj + $(SLO)$/swparrtf.obj # --- Tagets ------------------------------------------------------- diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx deleted file mode 100644 index 4a3f53ad81..0000000000 --- a/sw/source/filter/rtf/rtfatr.cxx +++ /dev/null @@ -1,4356 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */ - -/* - * Dieses File enthaelt alle Ausgabe-Funktionen des RTF-Writers; - * fuer alle Nodes, Attribute, Formate und Chars. - */ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // fuer SwField ... -#include -#include // fuer SwPictureType -#include -#include -#include -#include -#include // fuer SwPageDesc ... -#include // fuer SwPageDesc ... -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * um nicht immer wieder nach einem Update festzustellen, das irgendwelche - * Hint-Ids dazugekommen sind, wird hier definiert, die Groesse der Tabelle - * definiert und mit der akt. verglichen. Bei unterschieden wird der - * Compiler schon meckern. - * - * diese Section und die dazugeherigen Tabellen muessen in folgenden Files - * gepflegt werden: rtf\rtfatr.cxx, sw6\sw6atr.cxx, w4w\w4watr.cxx - */ -#if !defined(UNX) && !defined(MSC) && !defined(PPC) && !defined(CSET) && !defined(__MWERKS__) && !defined(WTC) && !defined(__MINGW32__) && !defined(OS2) - -#define ATTRFNTAB_SIZE 130 -#if ATTRFNTAB_SIZE != POOLATTR_END - POOLATTR_BEGIN -#error Attribut-Tabelle ist ungueltigt. Wurden neue Hint-IDs zugefuegt ?? -#endif - -#ifdef FORMAT_TABELLE -// da sie nicht benutzt wird! -#define FORMATTAB_SIZE 7 -#if FORMATTAB_SIZE != RES_FMT_END - RES_FMT_BEGIN -#error Format-Tabelle ist ungueltigt. Wurden neue Hint-IDs zugefuegt ?? -#endif -#endif - -#define NODETAB_SIZE 3 -#if NODETAB_SIZE != RES_NODE_END - RES_NODE_BEGIN -#error Node-Tabelle ist ungueltigt. Wurden neue Hint-IDs zugefuegt ?? -#endif - -#endif - -#ifdef WNT -// ueber xoutbmp.hxx wird das winuser.h angezogen. Dort gibt es ein -// define GetProp das mit unserem SvxEscapement kollidiert! -#undef GetProp -#endif - - -using namespace com::sun::star; - -//----------------------------------------------------------------------- - -static Writer& OutRTF_SwFmtCol( Writer& rWrt, const SfxPoolItem& rHt ); - -//----------------------------------------------------------------------- - -SvStream& OutComment( Writer& rWrt, const sal_Char* pStr ) -{ - return (rWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << pStr); -} - -SvStream& OutComment( Writer& rWrt, const char* pStr, BOOL bSetFlag ) -{ - // setze Flag, damit bei der Ausgabe von Attributen zu erkennen, - // ob ueberhaupt etwas ausgegeben wurde. - ((SwRTFWriter&)rWrt).bOutFmtAttr = bSetFlag; - return (rWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << pStr); -} - -Writer& OutRTF_AsByteString( Writer& rWrt, const String& rStr, rtl_TextEncoding eEncoding) -{ - ByteString sOutStr( rStr, eEncoding ); - rWrt.Strm() << sOutStr.GetBuffer(); - return rWrt; -} - -void OutRTF_SfxItemSet( SwRTFWriter& rWrt, const SfxItemSet& rSet, - BOOL bDeep ) -{ - bool bFrameDirOut=false; - bool bAdjustOut=false; - // erst die eigenen Attribute ausgeben - SvPtrarr aAsian( 0, 5 ), aCmplx( 0, 5 ), aLatin( 0, 5 ); - - const SfxItemPool& rPool = *rSet.GetPool(); - SfxWhichIter aIter( rSet ); - const SfxPoolItem* pItem; - FnAttrOut pOut; - USHORT nWhich = aIter.FirstWhich(); - while( nWhich ) - { - if( SFX_ITEM_SET == rSet.GetItemState( nWhich, bDeep, &pItem )) - { - pOut = aRTFAttrFnTab[ nWhich - RES_CHRATR_BEGIN]; - if( pOut && - ( *pItem != rPool.GetDefaultItem( nWhich ) - || ( rSet.GetParent() && - *pItem != rSet.GetParent()->Get( nWhich ) ) - || ( rWrt.GetAttrSet() && - *pItem != rWrt.GetAttrSet()->Get( nWhich ) ) - ) ) - ; - else - pOut = 0; - } - else if( !bDeep ) - pOut = 0; - else if( 0 != ( pItem = rPool.GetPoolDefaultItem( nWhich )) ) - pOut = aRTFAttrFnTab[ nWhich - RES_CHRATR_BEGIN]; - else - pOut = 0; - - if (!pOut && bDeep) - { - switch( nWhich ) - { - case RES_CHRATR_FONTSIZE: - case RES_CHRATR_CJK_FONTSIZE: - case RES_CHRATR_CTL_FONTSIZE: - case RES_CHRATR_LANGUAGE: - case RES_CHRATR_CJK_LANGUAGE: - case RES_CHRATR_CTL_LANGUAGE: - pItem = &rPool.GetDefaultItem( nWhich ); - pOut = aRTFAttrFnTab[ nWhich - RES_CHRATR_BEGIN]; - break; - default: - break; - } - } - - if( pOut ) - { - void* pVoidItem = (void*)pItem; - switch( nWhich ) - { - case RES_CHRATR_FONT: - case RES_CHRATR_FONTSIZE: - case RES_CHRATR_LANGUAGE: - case RES_CHRATR_POSTURE: - case RES_CHRATR_WEIGHT: - aLatin.Insert( pVoidItem, aLatin.Count() ); - pOut = 0; - break; - - case RES_CHRATR_CJK_FONT: - case RES_CHRATR_CJK_FONTSIZE: - case RES_CHRATR_CJK_LANGUAGE: - case RES_CHRATR_CJK_POSTURE: - case RES_CHRATR_CJK_WEIGHT: - aAsian.Insert( pVoidItem, aAsian.Count() ); - pOut = 0; - break; - - case RES_CHRATR_CTL_FONT: - case RES_CHRATR_CTL_FONTSIZE: - case RES_CHRATR_CTL_LANGUAGE: - case RES_CHRATR_CTL_POSTURE: - case RES_CHRATR_CTL_WEIGHT: - aCmplx.Insert( pVoidItem, aCmplx.Count() ); - pOut = 0; - break; - - case RES_FRAMEDIR: - bFrameDirOut=true; - break; - case RES_PARATR_ADJUST: - bAdjustOut=true; - break; - } - } - - if (pOut) - (*pOut)( rWrt, *pItem ); - nWhich = aIter.NextWhich(); - } - - //If rtlpar set and no following alignment. And alignment is not rtl then - //output alignment - if (bFrameDirOut && !bAdjustOut && !rWrt.pFlyFmt && !rWrt.bOutPageDesc) - { - pOut = aRTFAttrFnTab[ static_cast< USHORT >(RES_PARATR_ADJUST) - RES_CHRATR_BEGIN]; - if (pOut) - (*pOut)(rWrt, rSet.Get(RES_PARATR_ADJUST)); - } - if (rWrt.pFlyFmt && !rWrt.bOutPageDesc && !bFrameDirOut) - { - pOut = aRTFAttrFnTab[ static_cast< USHORT >(RES_FRAMEDIR) - RES_CHRATR_BEGIN]; - if (pOut) - (*pOut)(rWrt, rSet.Get(RES_FRAMEDIR)); - } - - if (aAsian.Count() || aCmplx.Count() || aLatin.Count()) - { - SvPtrarr* aArr[4]; - switch (rWrt.GetCurrScriptType()) - { - case i18n::ScriptType::LATIN: - aArr[ 0 ] = &aCmplx; - aArr[ 1 ] = &aAsian; - aArr[ 2 ] = &aLatin; - aArr[ 3 ] = &aLatin; - break; - - case i18n::ScriptType::ASIAN: - aArr[ 0 ] = &aCmplx; - aArr[ 1 ] = &aLatin; - aArr[ 2 ] = &aLatin; - aArr[ 3 ] = &aAsian; - break; - - case i18n::ScriptType::COMPLEX: - aArr[ 0 ] = &aLatin; - aArr[ 1 ] = &aLatin; - aArr[ 2 ] = &aAsian; - aArr[ 3 ] = &aCmplx; - break; - - default: - return ; - } - - //The final entry is the one that is actually in use - //so it uses e.g. \b \i \fs, the others are not in - //use and so are "associated". Both asian and western - //are ltr runs, with asian being the dbch varient - //and western being the loch/hich varient - bool bOutLTOR = true; - bool bLowLTOR = false; - for( int nArrCnt = 0; nArrCnt < 4; ++nArrCnt ) - { - SvPtrarr* pCurArr = aArr[ nArrCnt ]; - if (pCurArr->Count()) - { - bool bInUse = (aArr[nArrCnt] == aArr[3]); - rWrt.SetAssociatedFlag(!bInUse); - if (pCurArr == &aLatin) - { - if (bOutLTOR) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_LTRCH; - bOutLTOR = false; - } - - if (bLowLTOR) - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_LOCH; - else - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_HICH; - bLowLTOR = true; - } - } - else if( pCurArr == &aAsian ) - { - if( bOutLTOR ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_LTRCH; - bOutLTOR = false; - } - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_DBCH; - } - else - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_RTLCH; - - for (USHORT n = 0; n < pCurArr->Count(); ++n) - { - pItem = (const SfxPoolItem*)(*pCurArr)[ n ]; - pOut = aRTFAttrFnTab[ pItem->Which() - RES_CHRATR_BEGIN]; - (*pOut)( rWrt, *pItem ); - } - } - } - } -} - -// fuer die Formate muesste eine einzige Ausgabe-Funktion genuegen ! -/* - * Formate wie folgt ausgeben: - * - gebe alle Attribute vom Format aus - */ - -bool SwFmtToSet(SwRTFWriter& rWrt, const SwFmt& rFmt, SfxItemSet &rSet) -{ - bool bOutItemSet = true; - rSet.SetParent(rFmt.GetAttrSet().GetParent()); - - switch( rFmt.Which() ) - { - case RES_CONDTXTFMTCOLL: - case RES_TXTFMTCOLL: - { - USHORT nId = rWrt.GetId( (const SwTxtFmtColl&)rFmt ); - if (0 == nId ) - return false; // Default-TextStyle nicht ausgeben !! - - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_S; - rWrt.OutULong( nId ); - rWrt.bOutFmtAttr = TRUE; -// BYTE nLvl = ((const SwTxtFmtColl&)rFmt).GetOutlineLevel(); //#outline level,zhaojianwei -// if( MAXLEVEL > nLvl ) -// { - if(((const SwTxtFmtColl&)rFmt).IsAssignedToListLevelOfOutlineStyle()) - { - int nLvl = ((const SwTxtFmtColl&)rFmt).GetAssignedOutlineStyleLevel(); //<-end,zhaojianwei - USHORT nNumId = rWrt.GetNumRuleId( - *rWrt.pDoc->GetOutlineNumRule() ); - if( USHRT_MAX != nNumId ) - { - BYTE nWWLvl = 8 >= nLvl ? static_cast(nLvl) : 8; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_LS; - rWrt.OutULong( nNumId ); - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_ILVL; rWrt.OutULong( nWWLvl ); - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_OUTLINELEVEL; rWrt.OutULong( nWWLvl ); - if( nWWLvl != nLvl ) // RTF-kennt nur 9 Ebenen - { - OutComment( rWrt, OOO_STRING_SVTOOLS_RTF_SOUTLVL ); - rWrt.OutULong( nLvl ) << '}'; - } - } - - const SwNumFmt* pNFmt = &rWrt.pDoc->GetOutlineNumRule()->Get( static_cast(nLvl) ); - if( pNFmt->GetAbsLSpace() ) - { - SfxItemSet aSet( *rFmt.GetAttrSet().GetPool(), - rFmt.GetAttrSet().GetRanges() ); - aSet.SetParent( &rFmt.GetAttrSet() ); - SvxLRSpaceItem aLR( (SvxLRSpaceItem&)aSet.Get( RES_LR_SPACE ) ); - - aLR.SetTxtLeft( aLR.GetTxtLeft() + pNFmt->GetAbsLSpace() ); - aLR.SetTxtFirstLineOfst( pNFmt->GetFirstLineOffset() ); - - aSet.Put(aLR); - rSet.Put(aSet); - bOutItemSet = false; - } - } - } - break; - case RES_CHRFMT: - { - USHORT nId = rWrt.GetId( (const SwCharFmt&)rFmt ); - if (0 == nId) - return false; // Default-CharStyle nicht ausgeben !! - - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_CS; - rWrt.OutULong( nId ); - rWrt.bOutFmtAttr = TRUE; - } - break; - -// case RES_GRFFMTCOLL: -// ????? - } - - if (bOutItemSet) - rSet.Put(rFmt.GetAttrSet()); - - return true; -} - -Writer& OutRTF_SwFmt(Writer& rWrt, const SwFmt& rFmt) -{ - SwRTFWriter & rRTFWrt = (SwRTFWriter&)rWrt; - - SfxItemSet aSet(*rFmt.GetAttrSet().GetPool(), - rFmt.GetAttrSet().GetRanges() ); - if (SwFmtToSet(rRTFWrt, rFmt, aSet)) - OutRTF_SfxItemSet(rRTFWrt, aSet, TRUE); - - return rWrt; -} - -void OutRTF_SwFlyFrmFmt( SwRTFWriter& rRTFWrt ) -{ - // ist der aktuelle Absatz in einem freifliegenden Rahmen ? Dann - // muessen noch die Attribute dafuer ausgegeben werden. - ASSERT( rRTFWrt.pFlyFmt, "wo ist das Fly-Format?" ); - - if( rRTFWrt.bOutFmtAttr ) - { - rRTFWrt.Strm() << ' '; - rRTFWrt.bOutFmtAttr = false; - } - // gebe erstmal alle RTF-Spezifischen Attribute aus - rRTFWrt.bRTFFlySyntax = TRUE; - OutRTF_SwFmt( rRTFWrt, *rRTFWrt.pFlyFmt ); - - // dann gebe alle eigenen Attribute aus - { - // dazu erzeuge einen temp strstream, um festzustellen ob es - // ueberhaupt eigene Attribute gibt ! - SvMemoryStream aTmpStrm; - SvStream* pSaveStrm = &rRTFWrt.Strm(); - rRTFWrt.SetStream( &aTmpStrm ); - - rRTFWrt.bRTFFlySyntax = false; - OutRTF_SwFmt( rRTFWrt, *rRTFWrt.pFlyFmt ); - - rRTFWrt.SetStream( pSaveStrm ); // Stream-Pointer wieder zurueck - - if ( aTmpStrm.GetEndOfData() ) // gibt es SWG spezifische Attribute? - { - aTmpStrm.Seek( 0L ); - rRTFWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << aTmpStrm << '}'; - } - } -// rRTFWrt.pFlyFmt = 0; // wieder zuruecksetzen !! -} - -/* Ausgabe der Nodes */ - -/* - * Ausgabe der Texte-Attribute: - * Die Text-Attribute sind in einem VarArray nach ihren Start-Positionen - * sortiert. Fuer den RTF-Writer ist aber auch das Ende von Bedeutung. - * Darum die Idee, sobald im SwpHints-Array ein Attribut mit der Start- - * Position gefunden wurde, in einem Sortierten-Array die Endposition - * zu speichern. Sobald der Writer die Position erreicht hat, wird die - * schliessende Klammer ausgegeben und die Position aus dem Sort.Array - * geloescht. - * 15.3.93: Es reicht leider nicht aus nur Start und End zuspeichern, denn - * im SwpHints Array stehen sie nicht nach Ende sortiert, so dass - * Attribute die falsche schliessende Klammer bekommen. (z.B - * Bold von 0..3, dann folgt Underline von 0..4. Dann bekommt Underline - * die schliessende Klammer von Bold !!) - * Also muessen erst alle Attribute einer Position gesammelt, nach - * Ende sortiert und dann erst ausgegeben werden. - */ - -SV_DECL_PTRARR( SfxPoolItems, SfxPoolItem*, 4, 4 ) -class RTFEndPosLst; - -class SttEndPos -{ - // falls mehrere Attribute den gleichen Bereich umspannen, sammeln - SfxPoolItems aArr; - xub_StrLen nStart, nEnd; - - SttEndPos( const SttEndPos & rSEPos ); - -public: - SttEndPos( const SfxPoolItem& rAttr, xub_StrLen nStt, xub_StrLen nEnd ); - ~SttEndPos(); - - xub_StrLen GetStart() const { return nStart; } - xub_StrLen GetEnd() const { return nEnd; } - - const SfxPoolItems& GetAttrs() const { return aArr; } - void AddAttr( const SfxPoolItem& rAttr ); - BOOL HasScriptChange() const; -}; - - -SV_DECL_PTRARR_DEL( _EndPosLst, SttEndPos*, 5, 5 ) -SV_IMPL_PTRARR( _EndPosLst, SttEndPos* ) - -class RTFEndPosLst : private _EndPosLst -{ - const SwTxtNode& rNode; - SwRTFWriter& rWrt; - RTFEndPosLst* pOldPosLst; - xub_StrLen nCurPos; - USHORT nCurScript; - -public: - using _EndPosLst::Count; - using _EndPosLst::operator[]; - using _EndPosLst::DeleteAndDestroy; - - RTFEndPosLst( SwRTFWriter& rWrt, const SwTxtNode& rNd, xub_StrLen nStart ); - ~RTFEndPosLst(); - - USHORT GetCurScript() const { return nCurScript; } - BOOL MatchScriptToId( USHORT nId ) const; - int Insert( const SfxPoolItem& rAttr, xub_StrLen nStt, xub_StrLen nEnd ); - - void OutAttrs( xub_StrLen nStrPos ); - void EndAttrs( xub_StrLen nStrPos ); - void OutScriptChange( xub_StrLen nStrPos ); - - const SfxPoolItem* HasItem( USHORT nWhich ) const; - const SfxPoolItem& GetItem( USHORT nWhich ) const; - void OutFontAttrs(const SfxPoolItem &rItem); - void OutFontAttrs(USHORT nScript, bool bRTL); - - SfxItemPool& GetPool() {return *rNode.GetSwAttrSet().GetPool(); } -}; - - -SttEndPos::SttEndPos( const SfxPoolItem& rAttr, - xub_StrLen nStt, xub_StrLen nEd ) - : nStart( nStt ), nEnd( nEd ) -{ - AddAttr( rAttr ); -} - -SttEndPos::~SttEndPos() -{ - for( USHORT n = 0, nCount = aArr.Count(); n < nCount; ++n ) - if( RES_FLTRATTR_BEGIN <= aArr[ n ]->Which() ) - delete aArr[ n ]; -} - -BOOL SttEndPos::HasScriptChange() const -{ - for( USHORT n = 0, nCount = aArr.Count(); n < nCount; ++n ) - if( RES_FLTR_SCRIPTTYPE == aArr[ n ]->Which() ) - return TRUE; - return FALSE; -} - -void SttEndPos::AddAttr( const SfxPoolItem& rAttr ) -{ - const SfxPoolItem* pI = &rAttr; - aArr.Insert(pI, aArr.Count()); -} - -RTFEndPosLst::RTFEndPosLst(SwRTFWriter& rWriter, const SwTxtNode& rNd, - xub_StrLen nStart) - : rNode(rNd), rWrt(rWriter), nCurPos(STRING_NOTFOUND) -{ - pOldPosLst = rWrt.pCurEndPosLst; - rWrt.pCurEndPosLst = this; - - using namespace sw::util; - CharRuns aCharRuns(GetPseudoCharRuns(rNd, nStart)); - cCharRunIter aEnd = aCharRuns.end(); - xub_StrLen nSttPos = nStart; - for (cCharRunIter aI = aCharRuns.begin(); aI != aEnd; ++aI) - { - if (nSttPos != aI->mnEndPos) - { - SfxPoolItem* pChg = new SfxUInt32Item(RES_FLTR_SCRIPTTYPE, - (sal_uInt32(aI->mnScript) << 16) | static_cast(aI->mbRTL)); - Insert(*pChg, nSttPos, aI->mnEndPos); - nSttPos = aI->mnEndPos; - } - } -} - -RTFEndPosLst::~RTFEndPosLst() -{ - rWrt.pCurEndPosLst = pOldPosLst; -} - -int RTFEndPosLst::Insert( const SfxPoolItem& rAttr, xub_StrLen nStt, - xub_StrLen nEnd ) -{ - if (rAttr.Which() == RES_TXTATR_INETFMT) - return false; - - if( nStt == nEnd ) - return false; - - USHORT nPos; - for( nPos = 0; nPos < Count(); ++nPos ) - { - SttEndPos* pTmp = GetObject( nPos ); - if( pTmp->GetStart() == nStt && pTmp->GetEnd() == nEnd ) - { - pTmp->AddAttr( rAttr ); - return false; // schon vorhanden - } - if( nEnd < pTmp->GetEnd() ) - { - SttEndPos* pNew = new SttEndPos( rAttr, nStt, nEnd ); - _EndPosLst::C40_INSERT( SttEndPos, pNew, nPos ); - return TRUE; - } - } - - SttEndPos* pNew = new SttEndPos( rAttr, nStt, nEnd ); - _EndPosLst::C40_INSERT( SttEndPos, pNew, nPos ); - return TRUE; -} - -void RTFEndPosLst::OutScriptChange( xub_StrLen nStrPos ) -{ - SttEndPos* pStt; - for( USHORT n = 0, nEnd = Count(); n < nEnd; ++n ) - if( nStrPos == (pStt = GetObject( n ))->GetStart()) - { - if( pStt->HasScriptChange() ) - OutAttrs( nStrPos ); - break; - } -} - -void RTFEndPosLst::OutAttrs( xub_StrLen nStrPos ) -{ - SttEndPos* pStt; - nCurPos = nStrPos; - for( USHORT n = Count(); n ; ) - if( nStrPos == (pStt = (*this)[ --n ])->GetStart() ) - { - rWrt.Strm() << '{'; - for( USHORT i = 0; i < pStt->GetAttrs().Count(); ++i ) - { - const SfxPoolItem* pItem = pStt->GetAttrs()[i]; - if( RES_FLTR_SCRIPTTYPE == pItem->Which() ) - OutFontAttrs(*pItem); - else - Out( aRTFAttrFnTab, *pItem, rWrt ); - } - } - - nCurPos = STRING_NOTFOUND; -} - -//Just a little decoding hack for the RES_FLTR_SCRIPTTYPE thing -void RTFEndPosLst::OutFontAttrs(const SfxPoolItem &rItem) -{ - sal_uInt32 nValue = ((const SfxUInt32Item&)rItem).GetValue(); - sal_uInt16 nScript = static_cast(nValue >> 16); - bool bBiDi = nValue & 0x1; - OutFontAttrs(nScript, bBiDi); -} - -void RTFEndPosLst::OutFontAttrs(USHORT nScript, bool bRTL) -{ - // script change, write the correct attributes: - // start first with the Fontname - - rWrt.bOutFmtAttr = TRUE; - nCurScript = nScript; - rWrt.SetCurrScriptType( nScript ); - rWrt.SetAssociatedFlag(false); - - // the font MUST be at the first position !!! - static const USHORT aLatinIds[] = - { - RES_CHRATR_FONT, - RES_CHRATR_FONTSIZE, RES_CHRATR_LANGUAGE, - RES_CHRATR_POSTURE, RES_CHRATR_WEIGHT, - 0 - }; - static const USHORT aAsianIds[] = - { - RES_CHRATR_CJK_FONT, - RES_CHRATR_CJK_FONTSIZE, RES_CHRATR_CJK_LANGUAGE, - RES_CHRATR_CJK_POSTURE, RES_CHRATR_CJK_WEIGHT, - 0 - }; - static const USHORT aCmplxIds[] = - { - RES_CHRATR_CTL_FONT, - RES_CHRATR_CTL_FONTSIZE, RES_CHRATR_CTL_LANGUAGE, - RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT, - 0 - }; - - /* - You would have thought that - rWrt.Strm() << (bRTL ? OOO_STRING_SVTOOLS_RTF_RTLCH : OOO_STRING_SVTOOLS_RTF_LTRCH); would be sufficent here , - but looks like word needs to see the other directional token to be - satisified that all is kosher, otherwise it seems in ver 2003 to go and - semi-randomlyly stick strike through about the place. Perhaps - strikethrough is some ms developers "something is wrong signal" debugging - code that we're triggering ? - */ - if (bRTL) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_LTRCH; - rWrt.Strm() << ' '; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_RTLCH; - } - else - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_RTLCH; - rWrt.Strm() << ' '; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_LTRCH; - } - - // size/weight/posture optional - const USHORT* pIdArr = 0; - ByteString sOut; - switch (nScript) - { - default: //fall through - ASSERT(pIdArr, "unknown script, strange"); - case i18n::ScriptType::LATIN: - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_LOCH; - pIdArr = aLatinIds; - break; - case i18n::ScriptType::ASIAN: - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_DBCH; - pIdArr = aAsianIds; - break; - case i18n::ScriptType::COMPLEX: - pIdArr = aCmplxIds; - break; - } - - for (const USHORT* pId = pIdArr; *pId; ++pId) - { - if (FnAttrOut pOut = aRTFAttrFnTab[ *pId - RES_CHRATR_BEGIN]) - { - const SfxPoolItem* pItem = HasItem(*pId); - if (!pItem) - pItem = &GetPool().GetDefaultItem(*pId); - (*pOut)(rWrt, *pItem); - } - } -} - -void RTFEndPosLst::EndAttrs( xub_StrLen nStrPos ) -{ - xub_StrLen nClipStart=STRING_MAXLEN; - bool bClosed=false; - SttEndPos* pSEPos; - while( 0 != Count() && 0 != (pSEPos = GetObject( 0 )) && - ( STRING_MAXLEN == nStrPos || nStrPos == pSEPos->GetEnd() )) - { - const SfxPoolItems& rAttrs = pSEPos->GetAttrs(); - for( USHORT nAttr = rAttrs.Count(); nAttr; ) - { - switch( rAttrs[ --nAttr ]->Which() ) - { - case RES_TXTATR_CJK_RUBY: - rWrt.Strm() << ")}{" << OOO_STRING_SVTOOLS_RTF_FLDRSLT << " }}"; - break; - } - } - - rWrt.Strm() << '}'; // end of all attributes from this position - if (pSEPos->GetStart() < nClipStart) - nClipStart = pSEPos->GetStart(); - bClosed=true; - DeleteAndDestroy( 0, 1 ); - } - - if (bClosed) - { - //If there are open ranges whose start is before this point, and whose - //start is after the cliping start then they have been closed whether - //we wanted this or not. So accept that fact and then restart then - //again - USHORT nSize = Count(); - while (nSize > 0) - { - pSEPos = GetObject(--nSize); - if ( pSEPos->GetStart() < nStrPos && - pSEPos->GetStart() >= nClipStart) - { - rWrt.Strm() << '}'; - } - } - - nSize = Count(); - USHORT n = 0; - while (n < nSize) - { - SttEndPos* pStt = (*this)[n++]; - if (pStt->GetStart() < nStrPos && pStt->GetStart() >= nClipStart) - { - rWrt.Strm() << '{'; - for( USHORT i = 0; i < pStt->GetAttrs().Count(); ++i ) - { - const SfxPoolItem* pItem = pStt->GetAttrs()[i]; - if( RES_FLTR_SCRIPTTYPE == pItem->Which() ) - OutFontAttrs(*pItem); - else - Out( aRTFAttrFnTab, *pItem, rWrt ); - } - } - } - } -} - -BOOL RTFEndPosLst::MatchScriptToId( USHORT nWhich ) const -{ - BOOL bRet = false; - switch( nWhich ) - { - case RES_CHRATR_FONT: - case RES_CHRATR_FONTSIZE: - case RES_CHRATR_LANGUAGE: - case RES_CHRATR_POSTURE: - case RES_CHRATR_WEIGHT: - bRet = nCurScript == i18n::ScriptType::LATIN; - break; - case RES_CHRATR_CJK_FONT: - case RES_CHRATR_CJK_FONTSIZE: - case RES_CHRATR_CJK_LANGUAGE: - case RES_CHRATR_CJK_POSTURE: - case RES_CHRATR_CJK_WEIGHT: - bRet = nCurScript == i18n::ScriptType::ASIAN; - break; - case RES_CHRATR_CTL_FONT: - case RES_CHRATR_CTL_FONTSIZE: - case RES_CHRATR_CTL_LANGUAGE: - case RES_CHRATR_CTL_POSTURE: - case RES_CHRATR_CTL_WEIGHT: - bRet = nCurScript == i18n::ScriptType::COMPLEX; - break; - } - return bRet; -} - -const SfxPoolItem& RTFEndPosLst::GetItem( USHORT nWhich ) const -{ - const SfxPoolItem* pItem = HasItem( nWhich ); - if( !pItem ) - pItem = &rNode.GetSwAttrSet().GetPool()->GetDefaultItem( nWhich ); - return *pItem; -} - -const SfxPoolItem* RTFEndPosLst::HasItem( USHORT nWhich ) const -{ - const SfxPoolItem* pItem; - if( RES_TXTATR_END > nWhich ) - { - // it's a character/text attribute so look into the item array - for( USHORT n = Count(); n; ) - { - SttEndPos* pTmp = GetObject( --n ); - for( USHORT i = pTmp->GetAttrs().Count(); i; ) - { - pItem = pTmp->GetAttrs()[ --i ]; - if( pItem->Which() == nWhich ) - return pItem; - - // look into the charfmt? - if( RES_TXTATR_CHARFMT == pItem->Which() && - ((SwFmtCharFmt*) pItem)->GetCharFmt() && - SFX_ITEM_SET == ((SwFmtCharFmt*) pItem)->GetCharFmt()-> - GetItemState( nWhich, TRUE, &pItem )) - return pItem; - } - } - } - - if( SFX_ITEM_SET != rNode.GetSwAttrSet().GetItemState( - nWhich, TRUE, &pItem )) - pItem = 0; - return pItem; -} - -const SfxPoolItem& SwRTFWriter::GetItem( USHORT nWhich ) const -{ - if( pCurEndPosLst ) - return pCurEndPosLst->GetItem( nWhich ); - if( pAttrSet ) - return pAttrSet->Get( nWhich ); - - return pDoc->GetAttrPool().GetDefaultItem( nWhich ); -} - -static void OutSvxFrmDir(SwRTFWriter& rRTFWrt, const SfxPoolItem& rHt ) -{ - // write it only for pasgedesc's - not for frames - SvxFrameDirectionItem aItem((const SvxFrameDirectionItem&)rHt); - USHORT nVal = 0; - const sal_Char* pStr = 0; - bool bRTL = false; - - if (rRTFWrt.pFlyFmt) - aItem.SetValue(rRTFWrt.TrueFrameDirection(*rRTFWrt.pFlyFmt)); - - switch (aItem.GetValue()) - { - case FRMDIR_ENVIRONMENT: - ASSERT(0, "Not expected to see FRMDIR_ENVIRONMENT here"); - break; - case FRMDIR_VERT_TOP_RIGHT: - nVal = 1; - pStr = OOO_STRING_SVTOOLS_RTF_FRMTXTBRLV; - break; - case FRMDIR_HORI_RIGHT_TOP: - bRTL = true; -// nVal = 3; -// A val of three isn't working as expected in word :-( so leave it -// as normal ltr 0 textflow with rtl sect property, neither does -// the frame textflow -// pStr = OOO_STRING_SVTOOLS_RTF_FRMTXTBRL; - break; - case FRMDIR_VERT_TOP_LEFT: - nVal = 4; - pStr = OOO_STRING_SVTOOLS_RTF_FRMTXLRTBV; - break; - } - - if( rRTFWrt.pFlyFmt && rRTFWrt.bRTFFlySyntax && pStr ) - { - rRTFWrt.Strm() << pStr; - rRTFWrt.bOutFmtAttr = TRUE; - } - else if( rRTFWrt.bOutPageDesc) - { - if (nVal) - { - rRTFWrt.Strm() << OOO_STRING_SVTOOLS_RTF_STEXTFLOW; - rRTFWrt.OutULong( nVal ); - } - if (bRTL) - rRTFWrt.Strm() << OOO_STRING_SVTOOLS_RTF_RTLSECT; - rRTFWrt.bOutFmtAttr = TRUE; - } - else if (!rRTFWrt.pFlyFmt && !rRTFWrt.bOutPageDesc) - { - rRTFWrt.Strm() << (bRTL ? OOO_STRING_SVTOOLS_RTF_RTLPAR : OOO_STRING_SVTOOLS_RTF_LTRPAR); - rRTFWrt.bOutFmtAttr = TRUE; - } -} - -void OutRTF_SwRTL(SwRTFWriter& rWrt, const SwTxtNode *pNd) -{ - if (!pNd) - return; - SvxFrameDirection eDir = FRMDIR_ENVIRONMENT; - if (const SvxFrameDirectionItem* pItem = (const SvxFrameDirectionItem*) - pNd->GetSwAttrSet().GetItem(RES_FRAMEDIR)) - { - eDir = static_cast(pItem->GetValue()); - } - if (eDir == FRMDIR_ENVIRONMENT) - { - SwPosition aPos(*pNd); - eDir = - static_cast(rWrt.pDoc->GetTextDirection(aPos)); - } - OutSvxFrmDir(rWrt, SvxFrameDirectionItem(eDir, RES_FRAMEDIR)); -} - -static Writer& OutRTF_SwTxtINetFmt( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const SwFmtINetFmt& rURL = (const SwFmtINetFmt&)rHt; - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - if( rURL.GetValue().Len() ) - { - rWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_FIELD << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE - << OOO_STRING_SVTOOLS_RTF_FLDINST << " HYPERLINK "; - - String sURL( rURL.GetValue() ); - if( INET_MARK_TOKEN != sURL.GetChar(0) ) - { - INetURLObject aTmp( URIHelper::simpleNormalizedMakeRelative(rWrt.GetBaseURL(), - sURL)); - - - sURL = aTmp.GetURLNoMark( INetURLObject::DECODE_UNAMBIGUOUS); -/* if( INET_PROT_FILE == aTmp.GetProtocol() ) - { - // WW97 wollen keine FILE-URL haben, sondern einen normalen - // Dateinamen. Aber ab WW2000 kennen sie FileURLs. - sURL = aTmp.GetFull(); - } -*/ rWrt.Strm() << '\"'; - RTFOutFuncs::Out_String( rWrt.Strm(), sURL, rRTFWrt.eCurrentEncoding, - rRTFWrt.bWriteHelpFmt ) << "\" "; - sURL = aTmp.GetMark(); - } - - if( sURL.Len() ) - { - rWrt.Strm() << "\\\\l \""; - sURL.Erase( 0, 1 ); - RTFOutFuncs::Out_String( rWrt.Strm(), sURL, rRTFWrt.eCurrentEncoding, - rRTFWrt.bWriteHelpFmt ) << "\" "; - } - - if( rURL.GetTargetFrame().Len() ) - { - rWrt.Strm() << "\\\\t \""; - RTFOutFuncs::Out_String( rWrt.Strm(), rURL.GetTargetFrame(), - rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ) << "\" "; - } - - rWrt.Strm() << "}{" << OOO_STRING_SVTOOLS_RTF_FLDRSLT << ' '; - rRTFWrt.bOutFmtAttr = false; - - // und dann noch die Attributierung ausgeben - const SwCharFmt* pFmt; - const SwTxtINetFmt* pTxtAtr = rURL.GetTxtINetFmt(); - if( pTxtAtr && 0 != ( pFmt = pTxtAtr->GetCharFmt() )) - OutRTF_SwFmt( rWrt, *pFmt ); - } - return rWrt; -} - -void HandleHyperlinks(Writer& rWrt, const SwpHints* pTxtAttrs, xub_StrLen nPos ) -{ - USHORT nCount = pTxtAttrs ? pTxtAttrs->Count() : 0; - for(USHORT i = 0; i < nCount; ++i ) - { - const SwTxtAttr* pHt = (*pTxtAttrs)[i]; - const SfxPoolItem &rItem = pHt->GetAttr(); - if (rItem.Which() == RES_TXTATR_INETFMT) - { - const xub_StrLen* pEnd; - if (nPos == *pHt->GetStart()) - OutRTF_SwTxtINetFmt(rWrt, rItem); - if (0 != ( pEnd = pHt->GetEnd() ) && nPos == *pEnd) - { - // Hyperlinks werden als Felder geschrieben, aber der - // "FieldResult" // steht als Text im TextNode. Also muss bei - // diesen Attributen am // Ende 2 Klammern stehen! - rWrt.Strm() << "}}"; - } - } - } -} - -static Writer& OutRTF_SwTxtNode( Writer& rWrt, SwCntntNode& rNode ) -{ - SwTxtNode * pNd = &((SwTxtNode&)rNode); - SwRTFWriter & rRTFWrt = (SwRTFWriter&)rWrt; - xub_StrLen nStrPos = rRTFWrt.pCurPam->GetPoint()->nContent.GetIndex(); - RTFEndPosLst aEndPosLst( rRTFWrt, *pNd, nStrPos ); - USHORT nAttrPos = 0; - - const String& rStr = pNd->GetTxt(); - xub_StrLen nEnde = rStr.Len(); - if( rRTFWrt.pCurPam->GetPoint()->nNode == rRTFWrt.pCurPam->GetMark()->nNode ) - nEnde = Min( nEnde, rRTFWrt.pCurPam->GetMark()->nContent.GetIndex() ); - - int bNewFmts = rRTFWrt.GetAttrSet() != &pNd->GetSwAttrSet(); - if( bNewFmts ) - { - // harte Attributierung am Node und am Vorgaenger ? - const SfxItemSet* pNdSet = pNd->GetpSwAttrSet(); - if( pNdSet && rRTFWrt.GetAttrSet() && rRTFWrt.bAutoAttrSet && - pNdSet->GetParent() == rRTFWrt.GetAttrSet()->GetParent() && - pNdSet->Count() == rRTFWrt.GetAttrSet()->Count() ) - { - // die beiden Parents sind gleich, dann teste doch mal die - // Attribute im Set - - int bEqual = TRUE; - if( pNdSet->Count() ) - { - SfxItemIter aIter( *rRTFWrt.GetAttrSet() ); - const SfxPoolItem *pItem, *pCurr = aIter.GetCurItem(); - while( TRUE ) - { - if( SFX_ITEM_SET != pNdSet->GetItemState( pCurr->Which(), - false, &pItem ) || *pItem != *pCurr ) - { - bEqual = false; - break; - } - - if( aIter.IsAtEnd() ) - break; - pCurr = aIter.NextItem(); - } - } - if (bEqual) - bNewFmts = false; - } - rRTFWrt.SetAttrSet( &pNd->GetSwAttrSet() ); - rRTFWrt.bAutoAttrSet = 0 != pNdSet; - } - - // Flag zuruecksetzen, damit nach der Ausgabe der Collection - // getestet werden kann, ob noch ein Blank auszugeben ist - rRTFWrt.bOutFmtAttr = false; - - // in der Ausgabe eines Flys? Dann vorm ausgeben der AbsatzAttribute - // den Format-Pointer auf 0 setzen! - const SwFlyFrmFmt* pSaveFmt = rRTFWrt.pFlyFmt; - - SfxItemSet aMergedSet(rRTFWrt.pDoc->GetAttrPool(), POOLATTR_BEGIN, - POOLATTR_END-1); - bool bDeep = false; - - if( rRTFWrt.bWriteAll ) - { - rRTFWrt.Strm() << OOO_STRING_SVTOOLS_RTF_PARD << OOO_STRING_SVTOOLS_RTF_PLAIN << ' '; // alle Attribute zuruecksetzen - if( rRTFWrt.bOutTable ) - rRTFWrt.Strm() << OOO_STRING_SVTOOLS_RTF_INTBL; - - // ist der aktuelle Absatz in einem freifliegenden Rahmen ? Dann - // muessen noch die Attribute dafuer ausgegeben werden. - if( pSaveFmt ) - { - OutRTF_SwFlyFrmFmt( rRTFWrt ); - rRTFWrt.pFlyFmt = 0; - } - - rRTFWrt.OutListNum( *pNd ); - OutRTF_SwRTL(rRTFWrt, pNd); - SwFmtToSet(rRTFWrt, pNd->GetAnyFmtColl(), aMergedSet); - bDeep = true; - } - else if( !rRTFWrt.bWriteAll && rRTFWrt.bFirstLine ) - { - OutRTF_SwRTL(rRTFWrt, pNd); - SwFmtToSet(rRTFWrt, pNd->GetAnyFmtColl(), aMergedSet); - bDeep = true; - } - - // gibt es harte Attributierung ? - if( bNewFmts && pNd->HasSwAttrSet()) - { - rRTFWrt.pFlyFmt = 0; - - const SfxItemSet& rNdSet = pNd->GetSwAttrSet(); - - const SwNumRule* pRule = pNd->GetNumRule(); - // --> OD 2008-03-19 #refactorlists# - if ( pRule && pNd->IsInList() ) - // <-- - { - // --> OD 2008-03-18 #refactorlists# - ASSERT( pNd->GetActualListLevel() >= 0 && pNd->GetActualListLevel() < MAXLEVEL, - " - text node does not have valid list level. Serious defect -> please inform OD" ); - // <-- - BYTE nLvl = static_cast< BYTE >(pNd->GetActualListLevel()); - const SwNumFmt* pFmt = pRule->GetNumFmt( nLvl ); - if( !pFmt ) - pFmt = &pRule->Get( nLvl ); - - SfxItemSet aSet( rNdSet ); - SvxLRSpaceItem aLR( (SvxLRSpaceItem&)rNdSet.Get( RES_LR_SPACE ) ); - - aLR.SetTxtLeft( aLR.GetTxtLeft() + pFmt->GetAbsLSpace() ); - if( MAXLEVEL > pNd->GetActualListLevel() ) - aLR.SetTxtFirstLineOfst( pFmt->GetFirstLineOffset() ); - else - aSet.ClearItem( RES_PARATR_NUMRULE ); - aSet.Put( aLR ); - aMergedSet.Put(aSet); - } - else - aMergedSet.Put(rNdSet); - } - - SwTxtNode *txtNode=rNode.GetTxtNode(); - if (txtNode!=NULL && !txtNode->IsNumbered()) - { - aMergedSet.ClearItem(RES_PARATR_NUMRULE); - } - OutRTF_SfxItemSet(rRTFWrt, aMergedSet, bDeep); - - rRTFWrt.pFlyFmt = pSaveFmt; - - rRTFWrt.bTxtAttr = true; - // erstmal den Start berichtigen. D.h. wird nur ein Teil vom Satz - // ausgegeben, so muessen auch da die Attribute stimmen!! - const SwTxtAttr * pHt = 0; - USHORT nCntAttr = pNd->HasHints() ? pNd->GetSwpHints().Count() : 0; - if( nCntAttr && nStrPos > *( pHt = pNd->GetSwpHints()[ 0 ] )->GetStart() ) - { - // Ok, es gibt vorher Attribute, die ausgegeben werden muessen - do { - nAttrPos++; - if( RES_TXTATR_FIELD == pHt->Which() ) // Felder nicht - continue; // ausgeben - - if( pHt->GetEnd() ) - { - xub_StrLen nHtEnd = *pHt->GetEnd(), nHtStt = *pHt->GetStart(); - if( !rRTFWrt.bWriteAll && nHtEnd <= nStrPos ) - continue; - - // leere Hints am Anfang nicht beachten, oder ?? - if( nHtEnd == nHtStt ) - continue; - - // Attribut in die Liste aufnehemen - if( !rRTFWrt.bWriteAll ) - { - if( nHtStt < nStrPos ) nHtStt = nStrPos; - if( nHtEnd >= nEnde ) nHtEnd = nEnde; - } - aEndPosLst.Insert( pHt->GetAttr(), nHtStt, nHtEnd ); - continue; - // aber nicht ausgeben, das erfolgt spaeter !! - } - Out( aRTFAttrFnTab, pHt->GetAttr(), rRTFWrt ); - - } while( nAttrPos < nCntAttr && nStrPos > - *( pHt = pNd->GetSwpHints()[ nAttrPos ] )->GetStart() ); - - // dann gebe mal alle gesammelten Attribute von der String-Pos aus - aEndPosLst.OutAttrs( nStrPos ); - } - - if( rRTFWrt.bOutFmtAttr && - ( nAttrPos < nCntAttr ? *pHt->GetStart() != nStrPos : TRUE )) - rRTFWrt.Strm() << ' '; - - // das Flag gibt an, ob das SwTxtFld am Ende vom Absatz steht. Denn - // dann ist vor dem Absatzumbruch die schliessende Klammer auszugeben - xub_StrLen nChrCnt = 0; - for( ; nStrPos <= nEnde; nStrPos++ ) - { - rRTFWrt.bOutFmtAttr = false; - if( nStrPos != nEnde && aEndPosLst.Count() ) - aEndPosLst.EndAttrs( nStrPos ); - - // versuche nach ungefaehr 255 Zeichen eine neue Zeile zu beginnen - if( nChrCnt != ( nStrPos & 0xff00 )) - { - rWrt.Strm() << SwRTFWriter::sNewLine; - nChrCnt = nStrPos & 0xff00; - } - - if( nAttrPos < nCntAttr && *pHt->GetStart() == nStrPos - && nStrPos != nEnde ) - { - do { - BOOL bEmpty = false; - if( pHt->GetEnd() ) - { - if (false == (bEmpty = *pHt->GetEnd() == nStrPos)) - { - aEndPosLst.Insert( pHt->GetAttr(), nStrPos, - *pHt->GetEnd() ); - continue; - } - rRTFWrt.Strm() << '{'; - } - Out( aRTFAttrFnTab, pHt->GetAttr(), rRTFWrt ); - if( bEmpty ) - { - rRTFWrt.Strm() << '}'; - rRTFWrt.bOutFmtAttr = false; - } - } while( ++nAttrPos < nCntAttr && nStrPos == - *( pHt = pNd->GetSwpHints()[ nAttrPos ] )->GetStart() ); - - // dann gebe mal alle gesammelten Attribute von der String-Pos aus - aEndPosLst.OutAttrs( nStrPos ); - - } - else - aEndPosLst.OutScriptChange( nStrPos ); - - HandleHyperlinks(rWrt, pNd->GetpSwpHints(), nStrPos); - - if( rRTFWrt.bOutFmtAttr ) - rRTFWrt.Strm() << ' '; - - rRTFWrt.OutBookmarks( nStrPos ); - - rRTFWrt.OutRedline( nStrPos); - - if (nStrPos != nEnde) - { - RTFOutFuncs::Out_String(rWrt.Strm(), String(rStr.GetChar(nStrPos)), - rRTFWrt.eCurrentEncoding, rRTFWrt.bWriteHelpFmt); - } - } - - rRTFWrt.bTxtAttr = false; - - // noch eine schliesende Klammer da ?? - if( aEndPosLst.Count() ) - aEndPosLst.EndAttrs( USHRT_MAX ); - - // wenn bis zum Ende vom Node, dann auch das AbsatzEnde ausgeben - if( rRTFWrt.pCurPam->GetMark()->nNode.GetIndex() == - rRTFWrt.pCurPam->GetPoint()->nNode.GetIndex() ) - { - if( pNd->Len() != rRTFWrt.pCurPam->GetMark()->nContent.GetIndex() ) - return rWrt; - - if( rRTFWrt.bOutTable ) - { - rRTFWrt.Strm() << SwRTFWriter::sNewLine; - return rWrt; - } - } - - rRTFWrt.Strm() << SwRTFWriter::sNewLine << OOO_STRING_SVTOOLS_RTF_PAR << ' '; - return rRTFWrt; -} - -bool IsEMF(const sal_uInt8 *pGraphicAry, unsigned long nSize) -{ - if (pGraphicAry && (nSize > 0x2c )) - { - // check the magic number - if ( - (pGraphicAry[0x28] == 0x20 ) && (pGraphicAry[0x29] == 0x45) && - (pGraphicAry[0x2a] == 0x4d ) && (pGraphicAry[0x2b] == 0x46) - ) - { - //emf detected - return true; - } - } - return false; -} - -bool StripMetafileHeader(const sal_uInt8 *&rpGraphicAry, unsigned long &rSize) -{ - if (rpGraphicAry && (rSize > 0x22)) - { - if ( - (rpGraphicAry[0] == 0xd7) && (rpGraphicAry[1] == 0xcd) && - (rpGraphicAry[2] == 0xc6) && (rpGraphicAry[3] == 0x9a) - ) - { // we have to get rid of the metafileheader - rpGraphicAry += 22; - rSize -= 22; - return true; - } - } - return false; -} - -void ExportPICT(const Size &rOrig, const Size &rRendered, const Size &rMapped, - const SwCropGrf &rCr, const char *pBLIPType, const sal_uInt8 *pGraphicAry, - unsigned long nSize, SwRTFWriter &rWrt) -{ - bool bIsWMF = (const char *)pBLIPType == (const char *)OOO_STRING_SVTOOLS_RTF_WMETAFILE ? true : false; - if (pBLIPType && nSize && pGraphicAry) - { - rWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_PICT; - - long nXCroppedSize = rOrig.Width()-(rCr.GetLeft() + rCr.GetRight()); - long nYCroppedSize = rOrig.Height()-(rCr.GetTop() + rCr.GetBottom()); - /* #127543#: Graphic with a zero height or width, typically copied from webpages, caused - crashes. */ - if( !nXCroppedSize ) - nXCroppedSize = 100; - if( !nYCroppedSize ) - nYCroppedSize = 100; - - //Given the original size and taking cropping into account - //first, how much has the original been scaled to get the - //final rendered size - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_PICSCALEX; - rWrt.OutLong((100 * rRendered.Width()) / nXCroppedSize); - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_PICSCALEY; - rWrt.OutLong((100 * rRendered.Height()) / nYCroppedSize); - - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_PICCROPL; - rWrt.OutLong(rCr.GetLeft()); - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_PICCROPR; - rWrt.OutLong(rCr.GetRight()); - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_PICCROPT; - rWrt.OutLong(rCr.GetTop()); - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_PICCROPB; - rWrt.OutLong(rCr.GetBottom()); - - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_PICW; - rWrt.OutLong(rMapped.Width()); - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_PICH; - rWrt.OutLong(rMapped.Height()); - - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_PICWGOAL; - rWrt.OutLong(rOrig.Width()); - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_PICHGOAL; - rWrt.OutLong(rOrig.Height()); - - rWrt.Strm() << pBLIPType; - if (bIsWMF) - { - rWrt.OutLong(8); - StripMetafileHeader(pGraphicAry, nSize); - } - rWrt.Strm() << SwRTFWriter::sNewLine; - - sal_uInt32 nBreak = 0; - for (sal_uInt32 nI = 0; nI < nSize; ++nI) - { - ByteString sNo = ByteString::CreateFromInt32(pGraphicAry[nI], 16); - if (sNo.Len() < 2) - rWrt.Strm() << '0'; - rWrt.Strm() << sNo.GetBuffer(); - if (++nBreak == 64) - { - rWrt.Strm() << SwRTFWriter::sNewLine; - nBreak = 0; - } - } - - rWrt.Strm() << '}'; - } -} - -static Writer& OutRTF_SwGrfNode(Writer& rWrt, SwCntntNode & rNode) -{ - SwRTFWriter & rRTFWrt = (SwRTFWriter&)rWrt; - SwGrfNode &rNd = (SwGrfNode&)rNode; - - // ist der aktuelle Absatz in einem freifliegenden Rahmen ? Dann - // muessen noch die Attribute dafuer ausgegeben werden. - if (rRTFWrt.pFlyFmt && !ExportAsInline(*rRTFWrt.pFlyFmt)) - OutRTF_SwFlyFrmFmt(rRTFWrt); //"classic" positioning and size export - -#if 1 - SvMemoryStream aStream; - const sal_uInt8* pGraphicAry = 0; - sal_uInt32 nSize = 0; - - Graphic aGraphic(rNd.GetGrf()); - - // If there is no graphic there is not much point in parsing it - if(aGraphic.GetType()==GRAPHIC_NONE) - return rRTFWrt; - - GfxLink aGraphicLink; - const sal_Char* pBLIPType = 0; - if (aGraphic.IsLink()) - { - aGraphicLink = aGraphic.GetLink(); - nSize = aGraphicLink.GetDataSize(); - pGraphicAry = aGraphicLink.GetData(); - switch (aGraphicLink.GetType()) - { - case GFX_LINK_TYPE_NATIVE_JPG: - pBLIPType = OOO_STRING_SVTOOLS_RTF_JPEGBLIP; - break; - case GFX_LINK_TYPE_NATIVE_PNG: - pBLIPType = OOO_STRING_SVTOOLS_RTF_PNGBLIP; - case GFX_LINK_TYPE_NATIVE_WMF: - pBLIPType = - IsEMF(pGraphicAry, nSize) ? OOO_STRING_SVTOOLS_RTF_EMFBLIP : OOO_STRING_SVTOOLS_RTF_WMETAFILE; - break; - default: - break; - } - } - - GraphicType eGraphicType = aGraphic.GetType(); - if (!pGraphicAry) - { - if (ERRCODE_NONE == GraphicConverter::Export(aStream, aGraphic, - (eGraphicType == GRAPHIC_BITMAP) ? CVT_PNG : CVT_WMF)) - { - pBLIPType = (eGraphicType == GRAPHIC_BITMAP) ? - OOO_STRING_SVTOOLS_RTF_PNGBLIP : OOO_STRING_SVTOOLS_RTF_WMETAFILE; - aStream.Seek(STREAM_SEEK_TO_END); - nSize = aStream.Tell(); - pGraphicAry = (sal_uInt8*)aStream.GetData(); - } - } - - Size aMapped(eGraphicType == GRAPHIC_BITMAP ? aGraphic.GetSizePixel() : aGraphic.GetPrefSize()); - - const SwCropGrf &rCr = (const SwCropGrf &)rNd.GetAttr(RES_GRFATR_CROPGRF); - - //Get original size in twips - Size aSize(sw::util::GetSwappedInSize(rNd)); - Size aRendered(aSize); - if (rRTFWrt.pFlyFmt) - { - const SwFmtFrmSize& rS = rRTFWrt.pFlyFmt->GetFrmSize(); - aRendered.Width() = rS.GetWidth(); - aRendered.Height() = rS.GetHeight(); - } - - /* - If the graphic is not of type WMF then we will have to store two - graphics, one in the native format wrapped in shppict, and the other in - the wmf format wrapped in nonshppict, so as to keep wordpad happy. If its - a wmf already then we don't need any such wrapping - */ - bool bIsWMF = (const sal_Char*)pBLIPType == (const sal_Char*)OOO_STRING_SVTOOLS_RTF_WMETAFILE ? true : false; - if (!bIsWMF) - OutComment(rRTFWrt, OOO_STRING_SVTOOLS_RTF_SHPPICT); - - if (pBLIPType) - ExportPICT(aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, rRTFWrt); - else - { - aStream.Seek(0); - GraphicConverter::Export(aStream, aGraphic, CVT_WMF); - pBLIPType = OOO_STRING_SVTOOLS_RTF_WMETAFILE; - aStream.Seek(STREAM_SEEK_TO_END); - nSize = aStream.Tell(); - pGraphicAry = (sal_uInt8*)aStream.GetData(); - - ExportPICT(aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, - rRTFWrt); - } - - if (!bIsWMF) - { - rRTFWrt.Strm() << '}' << '{' << OOO_STRING_SVTOOLS_RTF_NONSHPPICT; - - aStream.Seek(0); - GraphicConverter::Export(aStream, aGraphic, CVT_WMF); - pBLIPType = OOO_STRING_SVTOOLS_RTF_WMETAFILE; - aStream.Seek(STREAM_SEEK_TO_END); - nSize = aStream.Tell(); - pGraphicAry = (sal_uInt8*)aStream.GetData(); - - ExportPICT(aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, - rRTFWrt); - - rRTFWrt.Strm() << '}'; - } - - - rRTFWrt.Strm() << SwRTFWriter::sNewLine; -#else - rRTFWrt.Strm() << "{{"; - - // damit die eigenen Grafik-Attribute nach der PICT / import Anweisung - // stehen, muessen die am Anfang ausgegeben werden. - rRTFWrt.bOutFmtAttr = false; - OutRTF_SwFmt( rRTFWrt, *pNd->GetFmtColl() ); - - if( rRTFWrt.bOutFmtAttr ) // wurde ueberhaupt ein Attrribut - rRTFWrt.Strm() << "}{"; // ausgegeben ?? - - String aGrfNm; - const SwMirrorGrf& rMirror = pNd->GetSwAttrSet().GetMirrorGrf(); - if( !pNd->IsLinkedFile() || RES_MIRROR_GRAPH_DONT != rMirror.GetValue() ) - { - USHORT nErr = 1; - // Grafik als File-Referenz speichern (als JPEG-Grafik speichern) - // but only if we save into a file and have a URL - if( rWrt.GetOrigFileName() ) - { - aGrfNm = *rWrt.GetOrigFileName(); - pNd->SwapIn( TRUE ); - ULONG nFlags = XOUTBMP_USE_NATIVE_IF_POSSIBLE; - switch( rMirror.GetValue() ) - { - case RES_MIRROR_GRAPH_VERT: nFlags = XOUTBMP_MIRROR_HORZ; break; - case RES_MIRROR_GRAPH_HOR: nFlags = XOUTBMP_MIRROR_VERT; break; - case RES_MIRROR_GRAPH_BOTH: - nFlags = XOUTBMP_MIRROR_VERT | XOUTBMP_MIRROR_HORZ; - break; - } - - Size aMM100Size; - Size* pMM100Size = 0; - if( rRTFWrt.pFlyFmt ) - { - const SwFmtFrmSize& rSize = rRTFWrt.pFlyFmt->GetFrmSize(); - aMM100Size = OutputDevice::LogicToLogic( rSize.GetSize(), - MapMode( MAP_TWIP ), MapMode( MAP_100TH_MM )); - pMM100Size = &aMM100Size; - } - - nErr = XOutBitmap::WriteGraphic( pNd->GetGrf(), aGrfNm, - String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "JPG" )), - nFlags, pMM100Size ); - } - if( nErr ) // fehlerhaft, da ist nichts auszugeben - { - rRTFWrt.Strm() << "}}"; - return rWrt; - } - } - else - pNd->GetFileFilterNms( &aGrfNm, 0 ); - - // MIB->JP: Warum erst AbsToRel und dann das URL-Objekt? So - // kommt bei relativierbaren URLs als Protokoll "unknown" raus. - // Ist das Absicht? - aGrfNm = INetURLObject::AbsToRel( aGrfNm, INetURLObject::WAS_ENCODED, - INetURLObject::DECODE_UNAMBIGUOUS); - INetURLObject aUrl( aGrfNm ); - if( aUrl.GetProtocol() == INET_PROT_FILE ) - aGrfNm = aUrl.PathToFileName(); - - // Bitmap als File-Referenz speichern - rRTFWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FIELD << OOO_STRING_SVTOOLS_RTF_FLDPRIV; - OutComment( rRTFWrt, OOO_STRING_SVTOOLS_RTF_FLDINST ) << "{\\\\import "; - RTFOutFuncs::Out_String( rWrt.Strm(), aGrfNm, rRTFWrt.eDefaultEncoding, - rRTFWrt.bWriteHelpFmt ); - rRTFWrt.Strm() << "}}{" << OOO_STRING_SVTOOLS_RTF_FLDRSLT << " }}"; - rRTFWrt.Strm() << '}' << SwRTFWriter::sNewLine; -#endif - return rRTFWrt; -} - -static Writer& OutRTF_SwOLENode( Writer& rWrt, SwCntntNode & /*rNode*/ ) -{ - SwRTFWriter & rRTFWrt = (SwRTFWriter&)rWrt; - - // ist der aktuelle Absatz in einem freifliegenden Rahmen ? Dann - // muessen noch die Attribute dafuer ausgegeben werden. - if( rRTFWrt.pFlyFmt ) - OutRTF_SwFlyFrmFmt( rRTFWrt ); - - rWrt.Strm() << SwRTFWriter::sNewLine << OOO_STRING_SVTOOLS_RTF_PAR; - return rWrt; -} - -static void OutTBLBorderLine(SwRTFWriter& rWrt, const SvxBorderLine* pLine, - const sal_Char* pStr) -{ - ByteString sLineStr; - if( pLine->GetInWidth() ) - { - // doppelte Linie - sLineStr = OOO_STRING_SVTOOLS_RTF_BRDRDB; - switch( pLine->GetInWidth() ) - { - case DEF_LINE_WIDTH_0: - ( sLineStr += OOO_STRING_SVTOOLS_RTF_BRDRW ) += "15"; - break; - case DEF_LINE_WIDTH_1: - ( sLineStr += OOO_STRING_SVTOOLS_RTF_BRDRW ) += "30"; - break; - case DEF_LINE_WIDTH_2: - case DEF_LINE_WIDTH_3: - ( sLineStr += OOO_STRING_SVTOOLS_RTF_BRDRW ) += "45"; - break; - } - } - else - { - // einfache Linie - if( DEF_LINE_WIDTH_1 >= pLine->GetOutWidth() ) - (( sLineStr = OOO_STRING_SVTOOLS_RTF_BRDRS ) += OOO_STRING_SVTOOLS_RTF_BRDRW ) += - ByteString::CreateFromInt32( pLine->GetOutWidth() ); - else - (( sLineStr = OOO_STRING_SVTOOLS_RTF_BRDRTH ) += OOO_STRING_SVTOOLS_RTF_BRDRW ) += - ByteString::CreateFromInt32( pLine->GetOutWidth() / 2 ); - } - - rWrt.Strm() << pStr << sLineStr.GetBuffer() << OOO_STRING_SVTOOLS_RTF_BRDRCF; - rWrt.OutULong( rWrt.GetId( pLine->GetColor() ) ); -} - -static void OutBorderLine(SwRTFWriter& rWrt, const SvxBorderLine* pLine, - const sal_Char* pStr, USHORT nDist) -{ - OutTBLBorderLine(rWrt, pLine, pStr); - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_BRSP; - rWrt.OutULong( nDist ); -} - -static void OutSwTblBorder(SwRTFWriter& rWrt, const SvxBoxItem& rBox, - const SvxBoxItem *pDefault) -{ - static const USHORT aBorders[] = - { - BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT - }; -#ifdef __MINGW32__ - static const char* aBorderNames[] __attribute__((section(".data"))) = -#else - static const char* aBorderNames[] = -#endif - { - OOO_STRING_SVTOOLS_RTF_CLBRDRT, OOO_STRING_SVTOOLS_RTF_CLBRDRL, OOO_STRING_SVTOOLS_RTF_CLBRDRB, OOO_STRING_SVTOOLS_RTF_CLBRDRR - }; - //Yes left and top are swapped with eachother for cell padding! Because - //that's what the thunderingly annoying rtf export/import word xp does. -#ifdef __MINGW32__ - static const char* aCellPadNames[] __attribute__((section(".data"))) = -#else - static const char* aCellPadNames[] = -#endif - { - OOO_STRING_SVTOOLS_RTF_CLPADL, OOO_STRING_SVTOOLS_RTF_CLPADT, OOO_STRING_SVTOOLS_RTF_CLPADB, OOO_STRING_SVTOOLS_RTF_CLPADR - }; -#ifdef __MINGW32__ - static const char* aCellPadUnits[] __attribute__((section(".data"))) = -#else - static const char* aCellPadUnits[] = -#endif - { - OOO_STRING_SVTOOLS_RTF_CLPADFL, OOO_STRING_SVTOOLS_RTF_CLPADFT, OOO_STRING_SVTOOLS_RTF_CLPADFB, OOO_STRING_SVTOOLS_RTF_CLPADFR - }; - for (int i = 0; i < 4; ++i) - { - if (const SvxBorderLine* pLn = rBox.GetLine(aBorders[i])) - OutTBLBorderLine(rWrt, pLn, aBorderNames[i]); - if (!pDefault || pDefault->GetDistance(aBorders[i]) != - rBox.GetDistance(aBorders[i])) - { - rWrt.Strm() << aCellPadUnits[i]; - rWrt.OutULong(3); - rWrt.Strm() << aCellPadNames[i]; - rWrt.OutULong(rBox.GetDistance(aBorders[i])); - } - } -} - -static void OutSwTblBackground( SwRTFWriter& rWrt, const SvxBrushItem& rBack ) -{ - if( !rBack.GetColor().GetTransparency() ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_CLCBPAT; - rWrt.OutULong( rWrt.GetId( rBack.GetColor() ) ); - } -} - - -Writer& OutRTF_SwTblNode(Writer& rWrt, const SwTableNode & rNode) -{ - SwRTFWriter & rRTFWrt = (SwRTFWriter&)rWrt; - const SwTable& rTbl = rNode.GetTable(); - SwTwips nPageSize = 0, nTblOffset = 0; - const bool bNewTableModel = rTbl.IsNewModel(); - -/* -//!!!!!!!!!!!!! for clipboard create any view if the table is complex !!! - if( rTbl.IsTblComplex() ) - { - // then we have to create any layout - SFX_APP()->CreateViewFrame( *xDocSh, 0, TRUE ); - } -*/ - - const SwFrmFmt *pFmt = rTbl.GetFrmFmt(); - ASSERT(pFmt, "Impossible"); - { - Point aPt; - SwRect aRect( pFmt->FindLayoutRect( false, &aPt )); - if( aRect.IsEmpty() ) - { - // dann besorge mal die Seitenbreite ohne Raender !! - const SwFrmFmt* pFrmFmt = rRTFWrt.pFlyFmt ? rRTFWrt.pFlyFmt : - const_cast(rWrt.pDoc) - ->GetPageDesc(0).GetPageFmtOfNode(rNode, false); - - aRect = pFrmFmt->FindLayoutRect( TRUE ); - if( 0 == ( nPageSize = aRect.Width() )) - { - const SvxLRSpaceItem& rLR = pFrmFmt->GetLRSpace(); - nPageSize = pFrmFmt->GetFrmSize().GetWidth() - - rLR.GetLeft() - rLR.GetRight(); - } - } - else - nPageSize = aRect.Width(); - } - - SwTwips nTblSz = pFmt->GetFrmSize().GetWidth(); - - ByteString aTblAdjust( OOO_STRING_SVTOOLS_RTF_TRQL ); - switch (pFmt->GetHoriOrient().GetHoriOrient()) - { - case text::HoriOrientation::CENTER: - aTblAdjust = OOO_STRING_SVTOOLS_RTF_TRQC; - break; - case text::HoriOrientation::RIGHT: - aTblAdjust = OOO_STRING_SVTOOLS_RTF_TRQR; - break; - case text::HoriOrientation::NONE: - case text::HoriOrientation::LEFT_AND_WIDTH: - { - const SvxLRSpaceItem& rLRSp = pFmt->GetLRSpace(); - nTblOffset = rLRSp.GetLeft(); - nPageSize -= (nTblOffset + rLRSp.GetRight()); - aTblAdjust += OOO_STRING_SVTOOLS_RTF_TRLEFT; - aTblAdjust += ByteString::CreateFromInt32( nTblOffset ); - } - break; - default: - break; - } - - if (rRTFWrt.TrueFrameDirection(*pFmt) == FRMDIR_HORI_RIGHT_TOP) - aTblAdjust += OOO_STRING_SVTOOLS_RTF_RTLROW; - - // ist die Tabelle wesentlich (PageSize + 10%) groesser als die Seite, - // dann sind die Box-Breiten relative Angaben. - BOOL bRelBoxSize = TRUE /*ALWAYS relativ (nPageSize + ( nPageSize / 10 )) < nTblSz*/; - - SwWriteTable* pTableWrt; - const SwHTMLTableLayout *pLayout = rTbl.GetHTMLTableLayout(); - if( pLayout && pLayout->IsExportable() ) - pTableWrt = new SwWriteTable( pLayout ); - else - pTableWrt = new SwWriteTable(rTbl.GetTabLines(), (USHORT)nPageSize, - (USHORT)nTblSz, false); - - // rCols are the array of all cols of the table - const SwWriteTableCols& rCols = pTableWrt->GetCols(); - USHORT nColCnt = rCols.Count(); - SwWriteTableCellPtr* pBoxArr = new SwWriteTableCellPtr[ nColCnt ]; - USHORT* pRowSpans = new USHORT[ nColCnt ]; - memset( pBoxArr, 0, sizeof( pBoxArr[0] ) * nColCnt ); - memset( pRowSpans, 0, sizeof( pRowSpans[0] ) * nColCnt ); - const SwWriteTableRows& rRows = pTableWrt->GetRows(); - for( USHORT nLine = 0; nLine < rRows.Count(); ++nLine ) - { - USHORT nBox; - - const SwWriteTableRow *pRow = rRows[ nLine ]; - const SwWriteTableCells& rCells = pRow->GetCells(); - - BOOL bFixRowHeight = false; - - USHORT nBoxes = rCells.Count(); - if (nColCnt < nBoxes) - nBoxes = nColCnt; - - for( nColCnt = 0, nBox = 0; nBox < rCells.Count() && nColCnt < nBoxes; ++nColCnt ) - { - SwWriteTableCell* pCell = rCells[ nBox ]; - const bool bProcessCoveredCell = bNewTableModel && 0 == pCell->GetRowSpan(); - - if( !pRowSpans[ nColCnt ] || bProcessCoveredCell ) - { - // set new BoxPtr - nBox++; - pBoxArr[ nColCnt ] = pCell; - if ( !bProcessCoveredCell ) - pRowSpans[ nColCnt ] = pCell->GetRowSpan(); - for( USHORT nCellSpan = pCell->GetColSpan(), nCS = 1; - nCS < nCellSpan; ++nCS, ++nColCnt ) - { - ASSERT( nColCnt+1 < rCols.Count(), "More colspan than columns" ); - if( nColCnt+1 < rCols.Count() ) // robust against wrong colspans - { - pBoxArr[ nColCnt+1 ] = pBoxArr[ nColCnt ]; - pRowSpans[ nColCnt+1 ] = pRowSpans[ nColCnt ]; - } - } - } - if( 1 != pRowSpans[ nColCnt ] && !bNewTableModel ) - bFixRowHeight = TRUE; - } - - for( ; nColCnt < rCols.Count() && pRowSpans[ nColCnt ]; ++nColCnt ) - bFixRowHeight = TRUE; - - nColCnt = rCols.Count(); // A wrong cellspan-value could cause a nColCnt > rCols.Count() - - // Start Tabellendefinition - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_TROWD << aTblAdjust.GetBuffer(); - - if( rTbl.GetRowsToRepeat() > nLine ) - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_TRHDR; - - const SwTableLine* pLine = pBoxArr[ 0 ]->GetBox()->GetUpper(); - // Zeilenhoehe ausgeben - long nHeight = 0; - if( bFixRowHeight && rWrt.pDoc->GetRootFrm() ) - { - nHeight = -pRow->GetPos(); //neg. => abs. height! - if( nLine ) - nHeight += rRows[ nLine - 1 ]->GetPos(); - } - else - { - const SwFmtFrmSize& rLSz = pLine->GetFrmFmt()->GetFrmSize(); - if( ATT_VAR_SIZE != rLSz.GetHeightSizeType() && rLSz.GetHeight() ) - nHeight = ATT_MIN_SIZE == rLSz.GetHeightSizeType() - ? rLSz.GetHeight() - : -rLSz.GetHeight(); - } - - //The rtf default is to allow a row to break, so if we are not - //splittable export TRKEEP - const SwFrmFmt *pLineFmt = pLine ? pLine->GetFrmFmt() : 0; - if (!pLineFmt || pLineFmt->GetRowSplit().GetValue() == 0) - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_TRKEEP; - - if( nHeight ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_TRRH; - rWrt.OutLong( nHeight ); - } - - const SvxBoxItem *pDefaultBox = 0; - if (nColCnt) - { - pDefaultBox = &(pBoxArr[0]->GetBox()->GetFrmFmt()->GetBox()); - - static const USHORT aBorders[] = - { - BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT - }; -#ifdef __MINGW32__ - static const char* aRowPadNames[] __attribute__((section(".data"))) = -#else - static const char* aRowPadNames[] = -#endif - { - OOO_STRING_SVTOOLS_RTF_TRPADDT, OOO_STRING_SVTOOLS_RTF_TRPADDL, OOO_STRING_SVTOOLS_RTF_TRPADDB, OOO_STRING_SVTOOLS_RTF_TRPADDR - }; - static const char* aRowPadUnits[] = - { - OOO_STRING_SVTOOLS_RTF_TRPADDFT, OOO_STRING_SVTOOLS_RTF_TRPADDFL, OOO_STRING_SVTOOLS_RTF_TRPADDFB, OOO_STRING_SVTOOLS_RTF_TRPADDFR - }; - for (int i = 0; i < 4; ++i) - { - rWrt.Strm() << aRowPadUnits[i]; - rWrt.OutULong(3); - rWrt.Strm() << aRowPadNames[i]; - rWrt.OutULong(pDefaultBox->GetDistance(aBorders[i])); - } - } - - // Breite der Boxen ausgeben - SwTwips nSz = 0, nCalc; - for( nBox = 0; nBox < nColCnt; ++nBox ) - { - SwWriteTableCell* pCell = pBoxArr[ nBox ]; - if( (nBox && pBoxArr[ nBox-1 ] == pBoxArr[ nBox ]) || (pCell == NULL) ) - continue; - - const SwFrmFmt& rFmt = *pCell->GetBox()->GetFrmFmt(); - if( 1 < pCell->GetRowSpan() || 0 == pCell->GetRowSpan() ) - rWrt.Strm() << ( pCell->GetRowSpan() == pRowSpans[ nBox ] - ? OOO_STRING_SVTOOLS_RTF_CLVMGF - : OOO_STRING_SVTOOLS_RTF_CLVMRG ); - - const SfxPoolItem* pItem; - if (SFX_ITEM_SET == rFmt.GetAttrSet().GetItemState(RES_BOX, TRUE, - &pItem)) - { - OutSwTblBorder(rRTFWrt, (SvxBoxItem&)*pItem, pDefaultBox); - } - -// RTF kennt Schattierung in unserem Sinne nicht! -// if( SFX_ITEM_SET == pBoxFmt->GetAttrSet().GetItemState( -// RES_SHADOW, TRUE, &pItem ) ) -// OutSwTblShadow( rRTFWrt, *pItem ); - - if( SFX_ITEM_SET == rFmt.GetAttrSet().GetItemState( - RES_BACKGROUND, TRUE, &pItem ) - || 0 != ( pItem = pCell->GetBackground() ) - || 0 != ( pItem = pRow->GetBackground() ) ) - OutSwTblBackground( rRTFWrt, (SvxBrushItem&)*pItem ); - - if( SFX_ITEM_SET == rFmt.GetAttrSet().GetItemState( - RES_VERT_ORIENT, TRUE, &pItem ) ) - switch( ((SwFmtVertOrient*)pItem)->GetVertOrient() ) - { - case text::VertOrientation::CENTER: rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_CLVERTALC; break; - case text::VertOrientation::BOTTOM: rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_CLVERTALB; break; - default: rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_CLVERTALT; break; - } - - const SwFmtFrmSize& rLSz = rFmt.GetFrmSize(); - nSz += rLSz.GetWidth(); - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_CELLX; - - nCalc = nSz; - if( bRelBoxSize ) - { - nCalc *= nPageSize; - nCalc /= nTblSz; - } - rWrt.OutLong( nTblOffset + nCalc ); - } - - // Inhalt der Boxen ausgeben - rWrt.Strm() << SwRTFWriter::sNewLine << OOO_STRING_SVTOOLS_RTF_PARD << OOO_STRING_SVTOOLS_RTF_INTBL; - for( nBox = 0; nBox < nBoxes; ++nBox ) - { - SwWriteTableCell * pCell = pBoxArr[nBox]; - - if( (nBox && pBoxArr[ nBox-1 ] == pBoxArr[ nBox ]) || pCell == NULL) - continue; - - if( pCell->GetRowSpan() == pRowSpans[ nBox ] ) - { - // new Box - const SwStartNode* pSttNd = pCell->GetBox()->GetSttNd(); - RTFSaveData aSaveData( rRTFWrt, - pSttNd->GetIndex()+1, pSttNd->EndOfSectionIndex() ); - rRTFWrt.bOutTable = TRUE; - rRTFWrt.Out_SwDoc( rRTFWrt.pCurPam ); - } - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_CELL; - } - - // das wars mit der Line - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_ROW << OOO_STRING_SVTOOLS_RTF_PARD << ' '; - - for( nBox = 0; nBox < nColCnt; ++nBox ) - --pRowSpans[ nBox ]; - } - - delete pTableWrt; - delete[] pBoxArr; - delete[] pRowSpans; - - // Pam hinter die Tabelle verschieben - rRTFWrt.pCurPam->GetPoint()->nNode = *rNode.EndOfSectionNode(); - rRTFWrt.SetAttrSet( 0 ); - - return rWrt; -} - -Writer& OutRTF_SwSectionNode( Writer& rWrt, SwSectionNode& rNode ) -{ - SwRTFWriter & rRTFWrt = (SwRTFWriter&)rWrt; - const SwSection& rSect = rNode.GetSection(); - - // folgt dahinter noch ein SectionNode? Dann wird erst die innere - // Section aktiv. Hier wird die Verschachtelung aufgebrochen, weil - // RTF das nicht kennt - BOOL bPgDscWrite = false; - { - SwNodeIndex aIdx( rNode, 1 ); - const SwNode& rNd = aIdx.GetNode(); - if( rNd.IsSectionNode() /*&& CONTENT_SECTION == - aIdx.GetNode().GetSectionNode()->GetSection().GetType()*/ ) - return rWrt; - - // falls als erstes Position ein Content- oder Tabellen-Node steht, - // dann kann dieser einen PageDesc gesetzt haben und der muss vor - // der Bereichsbeschreibung geschrieben werden! - // Umgekehrt muss im OutBreaks dann - if( rNd.IsCntntNode() ) - { - bPgDscWrite = rRTFWrt.OutBreaks( ((SwCntntNode&)rNd).GetSwAttrSet() ); - rRTFWrt.bIgnoreNextPgBreak = TRUE; - } - else if( rNd.IsTableNode() ) - { - bPgDscWrite = rRTFWrt.OutBreaks( ((SwTableNode&)rNd).GetTable(). - GetFrmFmt()->GetAttrSet() ); - rRTFWrt.bIgnoreNextPgBreak = TRUE; - } - } - - -// if( CONTENT_SECTION == rSect.GetType() ) - { - // als fortlaufenden Abschnittwechsel heraus schreiben - if( !bPgDscWrite ) - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_SECT << OOO_STRING_SVTOOLS_RTF_SBKNONE; - //JP 19.03.99 - es muss fuer den Import auf jedenfall das Cols - // Token geschrieben werden. Sonst kann nicht erkannt - // werden, wann ein PageDesc & eine Section gueltig ist - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_COLS << '1'; - rRTFWrt.bOutFmtAttr = TRUE; - const SfxPoolItem* pItem; - const SwFrmFmt *pFmt = rSect.GetFmt(); - ASSERT(pFmt, "Impossible"); - const SfxItemSet& rSet = pFmt->GetAttrSet(); - if( SFX_ITEM_SET == rSet.GetItemState( RES_COL, false, &pItem )) - OutRTF_SwFmtCol( rWrt, *pItem ); - else - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_COLS << '1' << OOO_STRING_SVTOOLS_RTF_COLSX; - rWrt.OutULong(709); - } - - if( SFX_ITEM_SET == rSet.GetItemState( RES_COLUMNBALANCE, - false, &pItem ) && ((SwFmtNoBalancedColumns*)pItem)->GetValue() ) - OutComment( rWrt, OOO_STRING_SVTOOLS_RTF_BALANCEDCOLUMN ) << '}'; - - if (FRMDIR_HORI_RIGHT_TOP == rRTFWrt.TrueFrameDirection(*pFmt)) - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_RTLSECT; - else - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_LTRSECT; - - rWrt.Strm() << SwRTFWriter::sNewLine; - } - - return rWrt; -} - - -/* File CHRATR.HXX: */ - -static Writer& OutRTF_SwFont( Writer& rWrt, const SfxPoolItem& rHt ) -{ - /* trage den Font in die Font-Liste vom Writer ein und gebe hier nur - * die entsprechende Nummer aus. Der Font wird spaeter ueber diese - * Tabelle im RTF-Dokument referenziert. - */ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - - if( !rRTFWrt.bTxtAttr || - ( rRTFWrt.GetEndPosLst() && - rRTFWrt.GetEndPosLst()->MatchScriptToId( rHt.Which() ) )) - { - rRTFWrt.bOutFmtAttr = true; - const SvxFontItem&rFont = (const SvxFontItem&)rHt; - bool bAssoc = rRTFWrt.IsAssociatedFlag(); - /* - #109522# - Word is a bit of a silly bugger of a program when its comes to symbol - font useage. If a symbol font is actually being used, i.e. exported - here with bTxtAttr true then both AF and F must be set to the same - value - */ - if (rRTFWrt.bTxtAttr && (rFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL)) - { - const sal_Char* pCmd = !bAssoc ? OOO_STRING_SVTOOLS_RTF_AF : OOO_STRING_SVTOOLS_RTF_F; - rWrt.Strm() << pCmd; - } - const sal_Char* pCmd = bAssoc ? OOO_STRING_SVTOOLS_RTF_AF : OOO_STRING_SVTOOLS_RTF_F; - rWrt.Strm() << pCmd; - rWrt.OutULong(rRTFWrt.GetId(rFont)); - rRTFWrt.eCurrentEncoding = rtl_getTextEncodingFromWindowsCharset(sw::ms::rtl_TextEncodingToWinCharset(rFont.GetCharSet())); - } - return rWrt; -} - -static Writer& OutRTF_SwPosture( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - - if( !rRTFWrt.bTxtAttr || - ( rRTFWrt.GetEndPosLst() && - rRTFWrt.GetEndPosLst()->MatchScriptToId( rHt.Which() ) )) - { - if (rRTFWrt.IsAssociatedFlag() && rHt.Which() == RES_CHRATR_CJK_POSTURE) - { - /* - #i21422# - Sadly in word rtf we can't retain CJK italic when we are not - exporting asian text as it doesn't have a seperate italic for - western and asian. - */ - return rWrt; - } - - const FontItalic nPosture = ((const SvxPostureItem&)rHt).GetPosture(); - int bTxtOut = rRTFWrt.bTxtAttr && ITALIC_NONE == nPosture; - if( ITALIC_NORMAL == nPosture || bTxtOut ) - { - rRTFWrt.bOutFmtAttr = TRUE; - const sal_Char* pCmd = rRTFWrt.IsAssociatedFlag() ? OOO_STRING_SVTOOLS_RTF_AI : OOO_STRING_SVTOOLS_RTF_I; - rWrt.Strm() << pCmd; - } - if( bTxtOut ) - rWrt.Strm() << '0'; // wieder abschalten - } - return rWrt; -} - - -static Writer& OutRTF_SwWeight( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - if( !rRTFWrt.bTxtAttr || - ( rRTFWrt.GetEndPosLst() && - rRTFWrt.GetEndPosLst()->MatchScriptToId( rHt.Which() ) )) - { - if (rRTFWrt.IsAssociatedFlag() && rHt.Which() == RES_CHRATR_CJK_WEIGHT) - { - /* - #i21422# - Sadly in word rtf we can't retain CJK bold when we are not - exporting asian text as it doesn't have a seperate bold for western - and asian. - */ - return rWrt; - } - - const FontWeight nBold = ((const SvxWeightItem&)rHt).GetWeight(); - int bTxtOut = rRTFWrt.bTxtAttr && WEIGHT_NORMAL == nBold; - if( WEIGHT_BOLD == nBold || bTxtOut ) - { - rRTFWrt.bOutFmtAttr = TRUE; - const sal_Char* pCmd = rRTFWrt.IsAssociatedFlag() ? OOO_STRING_SVTOOLS_RTF_AB : OOO_STRING_SVTOOLS_RTF_B; - rWrt.Strm() << pCmd; - } - if( bTxtOut ) - rWrt.Strm() << '0'; - } - return rWrt; -} - -static Writer& OutRTF_SwEmphasisMark( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - const sal_Char* pStr; - switch( ((const SvxEmphasisMarkItem&)rHt).GetEmphasisMark()) - { - case EMPHASISMARK_NONE: pStr = OOO_STRING_SVTOOLS_RTF_ACCNONE; break; - case EMPHASISMARK_SIDE_DOTS: pStr = OOO_STRING_SVTOOLS_RTF_ACCCOMMA; break; - default: pStr = OOO_STRING_SVTOOLS_RTF_ACCDOT; break; - } - - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << pStr; - return rWrt; -} - -static Writer& OutRTF_SwTwoInOne( Writer& rWrt, const SfxPoolItem& rHt ) -{ - if( ((SvxTwoLinesItem&)rHt).GetValue() ) - { - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - - sal_Unicode cStart = ((SvxTwoLinesItem&)rHt).GetStartBracket(); - sal_Unicode cEnd = ((SvxTwoLinesItem&)rHt).GetStartBracket(); - - USHORT nType; - if( !cStart && !cEnd ) - nType = 0; - else if( '{' == cStart || '}' == cEnd ) - nType = 4; - else if( '<' == cStart || '>' == cEnd ) - nType = 3; - else if( '[' == cStart || ']' == cEnd ) - nType = 2; - else // all other kind of brackets - nType = 1; - - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_TWOINONE; - rWrt.OutULong( nType ); - rRTFWrt.bOutFmtAttr = TRUE; - } - return rWrt; -} - -static Writer& OutRTF_SwCharRotate( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_HORZVERT; - rWrt.OutLong( ((SvxCharRotateItem&)rHt).IsFitToLine() ? 1 : 0 ); - return rWrt; -} -static Writer& OutRTF_SwCharScaleW( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_CHARSCALEX; - rWrt.OutLong( ((SvxCharScaleWidthItem&)rHt).GetValue() ); - return rWrt; -} - -static Writer& OutRTF_SwCharRelief(Writer& rWrt, const SfxPoolItem& rHt) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - const SvxCharReliefItem& rAttr = (const SvxCharReliefItem&)rHt; - const sal_Char* pStr; - switch (rAttr.GetValue()) - { - case RELIEF_EMBOSSED: - pStr = OOO_STRING_SVTOOLS_RTF_EMBO; - break; - case RELIEF_ENGRAVED: - pStr = OOO_STRING_SVTOOLS_RTF_IMPR; - break; - default: - pStr = 0; - break; - } - - if (pStr) - { - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << pStr; - } - return rWrt; -} - - -static Writer& OutRTF_SwChrBckgrnd( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - const SvxBrushItem& rBack = (const SvxBrushItem&)rHt; - if( !rBack.GetColor().GetTransparency() ) - { - ByteString sOut( OOO_STRING_SVTOOLS_RTF_CHCBPAT ); - sOut += ByteString::CreateFromInt32( - rRTFWrt.GetId( rBack.GetColor() )); - - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << sOut.GetBuffer(); - } - return rWrt; -} - -static Writer& OutRTF_SwShadowed( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - const BOOL bShadow = ((const SvxShadowedItem&)rHt).GetValue(); - int bTxtOut = rRTFWrt.bTxtAttr && !bShadow; - if( bShadow || bTxtOut ) - { - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_SHAD; - } - if( bTxtOut ) - rWrt.Strm() << '0'; - return rWrt; -} - - - -static Writer& OutRTF_SwContour( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - const BOOL bContour = ((const SvxContourItem&)rHt).GetValue(); - int bTxtOut = rRTFWrt.bTxtAttr && !bContour; - if( bContour || bTxtOut ) - { - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_OUTL; - } - if( bTxtOut ) - rWrt.Strm() << '0'; - return rWrt; -} - -static Writer& OutRTF_SwCrossedOut( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - const FontStrikeout nStrike = ((const SvxCrossedOutItem&)rHt).GetStrikeout(); - int bTxtOut = rRTFWrt.bTxtAttr && STRIKEOUT_NONE == nStrike; - - if( (STRIKEOUT_NONE != nStrike && STRIKEOUT_DONTKNOW != nStrike) || bTxtOut ) - { - rRTFWrt.bOutFmtAttr = TRUE; - if( STRIKEOUT_DOUBLE == nStrike ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_STRIKED; - if( !bTxtOut ) - rWrt.Strm() << '1'; - } - else - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_STRIKE; - } - if( bTxtOut ) - rWrt.Strm() << '0'; - return rWrt; -} - - - -static Writer& OutRTF_SwCaseMap( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - switch( ((const SvxCaseMapItem&)rHt).GetValue() ) - { - case SVX_CASEMAP_KAPITAELCHEN: - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_SCAPS; - break; - - case SVX_CASEMAP_VERSALIEN: - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_CAPS; - break; - - case SVX_CASEMAP_NOT_MAPPED: - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_CAPS << '0' << OOO_STRING_SVTOOLS_RTF_SCAPS << '0'; // beide aus !! - break; - - default: - return rWrt; - } - - rRTFWrt.bOutFmtAttr = TRUE; - return rWrt; -} - - -static Writer& OutRTF_SwUnderline( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const char* pStr = 0; - switch( ((const SvxUnderlineItem&)rHt).GetLineStyle() ) - { - case UNDERLINE_SINGLE: - pStr = OOO_STRING_SVTOOLS_RTF_UL; - break; - case UNDERLINE_DOUBLE: - pStr = OOO_STRING_SVTOOLS_RTF_ULDB; - break; - case UNDERLINE_NONE: - pStr = OOO_STRING_SVTOOLS_RTF_ULNONE; - break; - case UNDERLINE_DOTTED: - pStr = OOO_STRING_SVTOOLS_RTF_ULD; - break; - case UNDERLINE_DASH: - pStr = OOO_STRING_SVTOOLS_RTF_ULDASH; - break; - case UNDERLINE_DASHDOT: - pStr = OOO_STRING_SVTOOLS_RTF_ULDASHD; - break; - case UNDERLINE_DASHDOTDOT: - pStr = OOO_STRING_SVTOOLS_RTF_ULDASHDD; - break; - case UNDERLINE_BOLD: - pStr = OOO_STRING_SVTOOLS_RTF_ULTH; - break; - case UNDERLINE_WAVE: - pStr = OOO_STRING_SVTOOLS_RTF_ULWAVE; - break; - case UNDERLINE_BOLDDOTTED: - pStr = OOO_STRING_SVTOOLS_RTF_ULTHD; - break; - case UNDERLINE_BOLDDASH: - pStr = OOO_STRING_SVTOOLS_RTF_ULTHDASH; - break; - case UNDERLINE_LONGDASH: - pStr = OOO_STRING_SVTOOLS_RTF_ULLDASH; - break; - case UNDERLINE_BOLDLONGDASH: - pStr = OOO_STRING_SVTOOLS_RTF_ULTHLDASH; - break; - case UNDERLINE_BOLDDASHDOT: - pStr = OOO_STRING_SVTOOLS_RTF_ULTHDASHD; - break; - case UNDERLINE_BOLDDASHDOTDOT: - pStr = OOO_STRING_SVTOOLS_RTF_ULTHDASHDD; - break; - case UNDERLINE_BOLDWAVE: - pStr = OOO_STRING_SVTOOLS_RTF_ULHWAVE; - break; - case UNDERLINE_DOUBLEWAVE: - pStr = OOO_STRING_SVTOOLS_RTF_ULULDBWAVE; - break; - default: - break; - } - - if( pStr ) - { - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - - if( UNDERLINE_SINGLE == ((const SvxUnderlineItem&)rHt).GetLineStyle() - && ((SvxWordLineModeItem&)rRTFWrt.GetItem( - RES_CHRATR_WORDLINEMODE )).GetValue() ) - pStr = OOO_STRING_SVTOOLS_RTF_ULW; - - rRTFWrt.Strm() << pStr; - rRTFWrt.bOutFmtAttr = TRUE; - - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_ULC; - rWrt.OutULong( rRTFWrt.GetId(((const SvxUnderlineItem&)rHt).GetColor()) ); - - } - - return rWrt; -} - - - -static Writer& OutRTF_SwOverline( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const char* pStr = 0; - switch( ((const SvxOverlineItem&)rHt).GetLineStyle() ) - { - case UNDERLINE_SINGLE: - pStr = OOO_STRING_SVTOOLS_RTF_OL; - break; - case UNDERLINE_DOUBLE: - pStr = OOO_STRING_SVTOOLS_RTF_OLDB; - break; - case UNDERLINE_NONE: - pStr = OOO_STRING_SVTOOLS_RTF_OLNONE; - break; - case UNDERLINE_DOTTED: - pStr = OOO_STRING_SVTOOLS_RTF_OLD; - break; - case UNDERLINE_DASH: - pStr = OOO_STRING_SVTOOLS_RTF_OLDASH; - break; - case UNDERLINE_DASHDOT: - pStr = OOO_STRING_SVTOOLS_RTF_OLDASHD; - break; - case UNDERLINE_DASHDOTDOT: - pStr = OOO_STRING_SVTOOLS_RTF_OLDASHDD; - break; - case UNDERLINE_BOLD: - pStr = OOO_STRING_SVTOOLS_RTF_OLTH; - break; - case UNDERLINE_WAVE: - pStr = OOO_STRING_SVTOOLS_RTF_OLWAVE; - break; - case UNDERLINE_BOLDDOTTED: - pStr = OOO_STRING_SVTOOLS_RTF_OLTHD; - break; - case UNDERLINE_BOLDDASH: - pStr = OOO_STRING_SVTOOLS_RTF_OLTHDASH; - break; - case UNDERLINE_LONGDASH: - pStr = OOO_STRING_SVTOOLS_RTF_OLLDASH; - break; - case UNDERLINE_BOLDLONGDASH: - pStr = OOO_STRING_SVTOOLS_RTF_OLTHLDASH; - break; - case UNDERLINE_BOLDDASHDOT: - pStr = OOO_STRING_SVTOOLS_RTF_OLTHDASHD; - break; - case UNDERLINE_BOLDDASHDOTDOT: - pStr = OOO_STRING_SVTOOLS_RTF_OLTHDASHDD; - break; - case UNDERLINE_BOLDWAVE: - pStr = OOO_STRING_SVTOOLS_RTF_OLHWAVE; - break; - case UNDERLINE_DOUBLEWAVE: - pStr = OOO_STRING_SVTOOLS_RTF_OLOLDBWAVE; - break; - default: - break; - } - - if( pStr ) - { - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - if ( rRTFWrt.bNonStandard ) - { - if( UNDERLINE_SINGLE == ((const SvxOverlineItem&)rHt).GetLineStyle() - && ((SvxWordLineModeItem&)rRTFWrt.GetItem( - RES_CHRATR_WORDLINEMODE )).GetValue() ) - pStr = OOO_STRING_SVTOOLS_RTF_OLW; - - rRTFWrt.Strm() << pStr; - rRTFWrt.bOutFmtAttr = TRUE; - - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_OLC; - rWrt.OutULong( rRTFWrt.GetId(((const SvxOverlineItem&)rHt).GetColor()) ); - } - - } - - return rWrt; -} - - - -static Writer& OutRTF_SwLanguage( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - if( !rRTFWrt.bTxtAttr || - ( rRTFWrt.GetEndPosLst() && - rRTFWrt.GetEndPosLst()->MatchScriptToId( rHt.Which() ) )) - { - - rRTFWrt.bOutFmtAttr = TRUE; - const sal_Char* p = RES_CHRATR_CJK_LANGUAGE == rHt.Which() - ? OOO_STRING_SVTOOLS_RTF_LANGFE : OOO_STRING_SVTOOLS_RTF_LANG; - rWrt.Strm() << p; - rWrt.OutULong( ((const SvxLanguageItem&)rHt).GetLanguage() ); - } - return rWrt; -} - - - -static Writer& OutRTF_SwEscapement( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - const SvxEscapementItem& rEsc = (const SvxEscapementItem&)rHt; - const char * pUpDn; - - SwTwips nH = ((SvxFontHeightItem&)rRTFWrt.GetItem( - RES_CHRATR_FONTSIZE )).GetHeight(); - - if( 0 < rEsc.GetEsc() ) - pUpDn = OOO_STRING_SVTOOLS_RTF_UP; - else if( 0 > rEsc.GetEsc() ) - { - pUpDn = OOO_STRING_SVTOOLS_RTF_DN; - nH = -nH; // den negativen Wert herrausrechnen - } - else - return rWrt; - - // prozentuale Veraenderung speichern ! - short nEsc = rEsc.GetEsc(); - short nProp = rEsc.GetProp() * 100; - if( DFLT_ESC_AUTO_SUPER == nEsc ) - { - nEsc = 100 - rEsc.GetProp(); - ++nProp; - } - else if( DFLT_ESC_AUTO_SUB == nEsc ) - { - nEsc = - 100 + rEsc.GetProp(); - ++nProp; - } - - OutComment( rWrt, OOO_STRING_SVTOOLS_RTF_UPDNPROP, TRUE ); - rWrt.OutULong( nProp ) << '}' << pUpDn; - - /* - * berechne aus der akt. FontSize und dem ProzentWert die Verschiebung, - * wobei im RTF File 1/2 Points stehen muessen, waehrend intern - * mit Twips gerechnet wird. - * Formel : (FontSize * 1/20 ) pts x * 2 - * ----------------------- = ------------ - * 100% Escapement - */ - - rWrt.OutULong( ( (long( nEsc ) * nH) + 500L ) / 1000L ); - // 500L zum Aufrunden !! - return rWrt; -} - - - -static Writer& OutRTF_SwSize( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - if( !rRTFWrt.bTxtAttr || - ( rRTFWrt.GetEndPosLst() && - rRTFWrt.GetEndPosLst()->MatchScriptToId( rHt.Which() ) )) - { - if ( - rRTFWrt.IsAssociatedFlag() && - rHt.Which() == RES_CHRATR_CJK_FONTSIZE - ) - { - /* - #i21422# - Sadly in word rtf we can't retain CJK fontsize when we are not - exporting asian text as it doesn't have a seperate fontsize for - western and asian. - */ - return rWrt; - } - - rRTFWrt.bOutFmtAttr = TRUE; - - const sal_Char* pCmd = rRTFWrt.IsAssociatedFlag() ? OOO_STRING_SVTOOLS_RTF_AFS : OOO_STRING_SVTOOLS_RTF_FS; - rWrt.Strm() << pCmd; - rWrt.OutULong( ((const SvxFontHeightItem&)rHt).GetHeight() / 10 ); - } - return rWrt; -} - - - -static Writer& OutRTF_SwColor( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - /* trage die Color in die Color-Liste vom Writer ein und gebe hier nur - * die entsprechende Nummer aus. Die Color wird spaeter ueber diese - * Tabelle im RTF-Dokument referenziert. - */ - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_CF; - rWrt.OutULong( rRTFWrt.GetId( ((const SvxColorItem&)rHt).GetValue() )); - return rWrt; -} - -static Writer& OutRTF_SvxCharHiddenItem(Writer& rWrt, const SfxPoolItem& rHt) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - rRTFWrt.bOutFmtAttr = true; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_V; - if (!((const SvxCharHiddenItem&)rHt).GetValue()) - rWrt.OutULong(0); - return rWrt; -} - -extern void sw3io_ConvertToOldField( const SwField* pFld, USHORT& rWhich, - ULONG& rFmt, ULONG nFFVersion ); - -static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwFmtFld & rFld = (SwFmtFld&)rHt; - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - - const SwField* pFld = rFld.GetFld(); - - ByteString aFldStt( '{' ); - ((((aFldStt += OOO_STRING_SVTOOLS_RTF_FIELD) += '{' ) += OOO_STRING_SVTOOLS_RTF_IGNORE) += OOO_STRING_SVTOOLS_RTF_FLDINST) += ' '; - switch( pFld->GetTyp()->Which() ) - { - case RES_COMBINED_CHARS: - { - /* - We need a font size to fill in the defaults, if these are overridden - (as they generally are) by character properties then those properties - win. - - The fontsize that is used in MS for determing the defaults is always - the CJK fontsize even if the text is not in that language, in OOo the - largest fontsize used in the field is the one we should take, but - whatever we do, word will actually render using the fontsize set for - CJK text. Nevertheless we attempt to guess whether the script is in - asian or western text based up on the first character and use the - font size of that script as our default. - */ - const String& rFldPar1 = pFld->GetPar1(); - USHORT nScript; - if( pBreakIt->GetBreakIter().is() ) - nScript = pBreakIt->GetBreakIter()->getScriptType( rFldPar1, 0); - else - nScript = i18n::ScriptType::ASIAN; - - long nHeight = ((SvxFontHeightItem&)rRTFWrt.GetItem( - GetWhichOfScript(RES_CHRATR_FONTSIZE, nScript ))).GetHeight(); - nHeight = (nHeight + 10) / 20; //Font Size in points; - - /* - Divide the combined char string into its up and down part. Get the - font size and fill in the defaults as up == half the font size and - down == a fifth the font size - */ - xub_StrLen nAbove = (rFldPar1.Len()+1)/2; - rWrt.Strm() << aFldStt.GetBuffer() << "EQ \\\\o (\\\\s\\\\up "; - rWrt.OutLong( nHeight/2 ) << '('; - RTFOutFuncs::Out_String( rWrt.Strm(), rFldPar1.Copy(0,nAbove), - rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); - rWrt.Strm() << "), \\\\s\\\\do "; - rWrt.OutLong( nHeight/5 ) << '('; - RTFOutFuncs::Out_String( rWrt.Strm(), rFldPar1.Copy( nAbove ), - rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ) - << "))"; - } - break; - - case RES_DBFLD: - aFldStt += "MERGEFIELD "; - // kein break !! - case RES_USERFLD: - rWrt.Strm() << aFldStt.GetBuffer(); - RTFOutFuncs::Out_String( rWrt.Strm(), pFld->GetTyp()->GetName(), - rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); - break; - case RES_GETREFFLD: - { - BYTE nFldTyp = 0; - rWrt.Strm() << aFldStt.GetBuffer() << " REF "; - const SwGetRefField& rRFld = *(SwGetRefField*)pFld; - switch( pFld->GetSubType() ) - { - case REF_SETREFATTR: - case REF_BOOKMARK: - RTFOutFuncs::Out_String( rWrt.Strm(), rRFld.GetSetRefName(), - rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); - nFldTyp = 3; - break; - } - - if( nFldTyp ) - { - switch( pFld->GetFormat() ) - { - case REF_PAGE_PGDESC: - case REF_PAGE: - rWrt.Strm() << "SEITEN"; - nFldTyp = 37; - break; - case REF_UPDOWN: - rWrt.Strm() << " \\p"; - nFldTyp = 3; - break; - case REF_CHAPTER: - rWrt.Strm() << " \\n"; - break; - case REF_ONLYNUMBER: - case REF_ONLYCAPTION: - case REF_ONLYSEQNO: - break; - // default: - // case REF_CONTENT: - } - rWrt.Strm() << " \\\\h "; // insert hyperlink - } - } - break; -// case RES_CHAPTERFLD: -// rWrt.Strm() << ' '; -// break; - case RES_PAGENUMBERFLD: - rWrt.Strm() << aFldStt.GetBuffer() << "\\\\page"; - { - char __READONLY_DATA - sNType0[] = "ALPHABETIC", /* CHARS_UPPER_LETTER*/ - sNType1[] = "alphabetic", /* CHARS_LOWER_LETTER*/ - sNType2[] = "ROMAN", /* ROMAN_UPPER */ - sNType3[] = "roman", /* ROMAN_LOWER */ - sNType4[] = "ARABIC"; /* ARABIC */ - - const char* pFmtStr = 0; - switch( pFld->GetFormat() ) - { - case SVX_NUM_CHARS_UPPER_LETTER: - case SVX_NUM_CHARS_UPPER_LETTER_N: pFmtStr = sNType0; break; - case SVX_NUM_CHARS_LOWER_LETTER: - case SVX_NUM_CHARS_LOWER_LETTER_N: pFmtStr = sNType1; break; - case SVX_NUM_ROMAN_UPPER: pFmtStr = sNType2; break; - case SVX_NUM_ROMAN_LOWER: pFmtStr = sNType3; break; - case SVX_NUM_ARABIC: pFmtStr = sNType4; break; - } - - if( pFmtStr ) - rWrt.Strm() << "\\\\* " << pFmtStr; - } - break; - case RES_FILENAMEFLD: - rWrt.Strm() << aFldStt.GetBuffer() << "\\\\filename "; - break; - case RES_DBNAMEFLD: - { - rWrt.Strm() << aFldStt.GetBuffer() << "\\\\data "; - SwDBData aData = rWrt.pDoc->GetDBData(); - String sOut(aData.sDataSource); - sOut += DB_DELIM; - sOut += (String)aData.sCommand; - RTFOutFuncs::Out_String( rWrt.Strm(), sOut, - rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); - } - break; - case RES_AUTHORFLD: - rWrt.Strm() << aFldStt.GetBuffer() << "\\\\author "; - break; - - case RES_HIDDENTXTFLD: - if( TYP_CONDTXTFLD == ((SwHiddenTxtField*)pFld)->GetSubType() ) - RTFOutFuncs::Out_String( rWrt.Strm(), - pFld->ExpandField(rWrt.pDoc->IsClipBoard()), - rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); - else - { - rWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_V << ' '; - OutRTF_AsByteString( rWrt, pFld->GetPar2(), rRTFWrt.eDefaultEncoding ).Strm() - << '}' << SwRTFWriter::sNewLine; - } - return rWrt; // nicht bis zum Ende, kein RTF-Feld !! - - case RES_DATETIMEFLD: - if (!(pFld->GetSubType() & FIXEDFLD)) - { - USHORT nWhich = RES_DATETIMEFLD; - ULONG nFmt = pFld->GetFormat(); - sw3io_ConvertToOldField(pFld, nWhich, nFmt, SOFFICE_FILEFORMAT_40 ); - if (pFld->GetSubType() & DATEFLD) - { - rWrt.Strm() << aFldStt.GetBuffer() << "\\\\date \\\\@\""; - switch( nFmt ) - { - case DF_SSYS: rWrt.Strm() << "tt.MM.yy"; break; - case DF_LSYS: rWrt.Strm() << "tttt, t. MMMM yyyy"; break; - case DF_SHORT: rWrt.Strm() << "tt.MM.yy"; break; - case DF_SCENT: rWrt.Strm() << "tt.MM.yyyy"; break; - case DF_LMON: rWrt.Strm() << "t. MMM yyyy"; break; - case DF_LMONTH: rWrt.Strm() << "t. MMMM yyyy"; break; - case DF_LDAYMON: rWrt.Strm() << "ttt, t. MMMM yyyy"; break; - case DF_LDAYMONTH: rWrt.Strm() << "tttt, t. MMMM yyyy"; break; - } - } - else - { - rWrt.Strm() << aFldStt.GetBuffer() << "\\\\date \\\\@\""; - switch( nFmt ) - { - case TF_SSMM_24: rWrt.Strm() << "HH:mm"; break; - case TF_SSMM_12: rWrt.Strm() << "hh:mm"; break; // ??? - case TF_SYSTEM: rWrt.Strm() << "HH:mm"; break; - } - } - rWrt.Strm() << '\"'; - break; - } - // Kein break: in default-Zweig laufen! - - default: - { - aFldStt.Erase(); - - // JP 20.07.95: warum nicht das Expandierte rausschreiben ? - sal_Char cCh; - rWrt.Strm().SeekRel(-1); - rWrt.Strm() >> cCh; - if( ' ' != cCh ) // vorweg immer einen Trenner - rWrt.Strm() << ' '; - RTFOutFuncs::Out_String( rWrt.Strm(), - pFld->ExpandField(rWrt.pDoc->IsClipBoard()), - rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); - } - break; - } - - if( aFldStt.Len() ) - { - rWrt.Strm() << "}{" << OOO_STRING_SVTOOLS_RTF_FLDRSLT << ' '; - RTFOutFuncs::Out_String( rWrt.Strm(), - pFld->ExpandField(rWrt.pDoc->IsClipBoard()), - rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); - rWrt.Strm() << "}}"; - rRTFWrt.bOutFmtAttr = FALSE; - } - - return rWrt; -} - -static Writer& OutRTF_SwFlyCntnt( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwFrmFmt* pFmt = ((SwFmtFlyCnt&)rHt).GetFrmFmt(); - if (RES_DRAWFRMFMT != pFmt->Which()) - { - ((SwRTFWriter&)rWrt).OutRTFFlyFrms( *((SwFlyFrmFmt*)pFmt) ); - ((SwRTFWriter&)rWrt).bOutFmtAttr = false; - } - return rWrt; -} - -static Writer& OutRTF_SwFtn( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const SwFmtFtn& rFtn = (const SwFmtFtn&)rHt; - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - - do { // middle-check-loop - if( !rFtn.GetTxtFtn() || !rFtn.GetTxtFtn()->GetStartNode() ) - break; // es gibt keine Kopf-/Fusszeile/Fussnote - - // Hole vom Node und vom letzten Node die Position in der Section - ULONG nStart = rFtn.GetTxtFtn()->GetStartNode()->GetIndex()+1, - nEnd = rWrt.pDoc->GetNodes()[ nStart-1 ]->EndOfSectionIndex(); - - // kein Bereich also kein gueltiger Node - if( nStart >= nEnd ) - break; - - rWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_SUPER << ' '; - if( !rFtn.GetNumStr().Len() ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_CHFTN; - OutComment( rWrt, OOO_STRING_SVTOOLS_RTF_FOOTNOTE ); - if( rFtn.IsEndNote() ) - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FTNALT; - rWrt.Strm() << ' ' << OOO_STRING_SVTOOLS_RTF_CHFTN; - } - else - { - OutRTF_AsByteString( rWrt, rFtn.GetNumStr(), rRTFWrt.eDefaultEncoding ); - OutComment( rWrt, OOO_STRING_SVTOOLS_RTF_FOOTNOTE ); - if( rFtn.IsEndNote() ) - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FTNALT; - rWrt.Strm() << ' '; - OutRTF_AsByteString( rWrt, rFtn.GetNumStr(), rRTFWrt.eDefaultEncoding ); - } - RTFSaveData aSaveData( rRTFWrt, nStart, nEnd ); - // damit kein \par ausgegeben wird !! - rRTFWrt.pCurPam->GetMark()->nContent++; - rRTFWrt.Out_SwDoc( rRTFWrt.pCurPam ); - - rWrt.Strm() << "}}" << SwRTFWriter::sNewLine; - rRTFWrt.bOutFmtAttr = FALSE; - - } while( FALSE ); - return rWrt; -} - -static Writer& OutRTF_SwTxtCharFmt( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const SwFmtCharFmt& rChrFmt = (const SwFmtCharFmt&)rHt; - const SwCharFmt* pFmt = rChrFmt.GetCharFmt(); - - if( pFmt ) - OutRTF_SwFmt( rWrt, *pFmt ); - return rWrt; -} - -static Writer& OutRTF_SwTxtAutoFmt( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const SwFmtAutoFmt& rAutoFmt = (const SwFmtAutoFmt&)rHt; - const boost::shared_ptr pSet = rAutoFmt.GetStyleHandle(); - - if( pSet.get() ) - { - SwRTFWriter & rRTFWrt = (SwRTFWriter&)rWrt; - OutRTF_SfxItemSet( rRTFWrt, *pSet.get(), FALSE ); - } - return rWrt; -} - -static Writer& OutRTF_SwTxtRuby( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - const SwFmtRuby& rRuby = (const SwFmtRuby&)rHt; - const SwTxtRuby* pRubyTxt = rRuby.GetTxtRuby(); - const SwTxtNode* pNd; - - if( !pRubyTxt || 0 == (pNd = pRubyTxt->GetpTxtNode() )) - return rWrt; - - sal_Char cDirective = 0, cJC = '0'; - switch( rRuby.GetAdjustment() ) - { - case 0: cJC = '3'; cDirective = 'l'; break; - case 2: cJC = '4'; cDirective = 'r'; break; - case 3: cJC = '1'; cDirective = 'd'; break; - case 4: cJC = '2'; cDirective = 'd'; break; - case 1: break; //defaults to 0 - default: - ASSERT( FALSE, "Unhandled Ruby justication code" ); - break; - } - - /* - MS needs to know the name and size of the font used in the ruby item, - but we coud have written it in a mixture of asian and western - scripts, and each of these can be a different font and size than the - other, so we make a guess based upon the first character of the text, - defaulting to asian. - */ - USHORT nScript; - if( pBreakIt->GetBreakIter().is() ) - nScript = pBreakIt->GetBreakIter()->getScriptType( rRuby.GetText(), 0); - else - nScript = i18n::ScriptType::ASIAN; - - const SwCharFmt* pFmt = pRubyTxt->GetCharFmt(); - const SvxFontItem *pFont; - long nHeight; - - if( pFmt ) - { - const SwAttrSet& rSet = pFmt->GetAttrSet(); - pFont = &(const SvxFontItem&)rSet.Get( GetWhichOfScript( - RES_CHRATR_FONT, nScript )); - - nHeight = ((SvxFontHeightItem&)rSet.Get( - GetWhichOfScript( RES_CHRATR_FONTSIZE, nScript ))).GetHeight(); - } - else - { - /*Get document defaults if no formatting on ruby text*/ - const SfxItemPool *pPool = pNd->GetSwAttrSet().GetPool(); - pFont = &(const SvxFontItem&)pPool->GetDefaultItem( - GetWhichOfScript( RES_CHRATR_FONT, nScript )); - - nHeight = ((SvxFontHeightItem&)pPool->GetDefaultItem( - GetWhichOfScript( RES_CHRATR_FONTSIZE, nScript ))).GetHeight(); - } - ( nHeight += 5 ) /= 10; - - // don't change " EQ " to any other without changing the code in RTFFLD.CXX - rWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_FIELD << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_FLDINST - << " EQ \\\\* jc" << cJC - << " \\\\* \"Font:"; - RTFOutFuncs::Out_String( rWrt.Strm(), pFont->GetFamilyName(), - rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); - rWrt.Strm() << "\" \\\\* hps"; - rWrt.OutLong( nHeight ); - rWrt.Strm() << " \\\\o"; - if( cDirective ) - rWrt.Strm() << "\\\\a" << cDirective; - rWrt.Strm() << "(\\\\s\\\\up "; - - if( pBreakIt->GetBreakIter().is() ) - nScript = pBreakIt->GetBreakIter()->getScriptType( pNd->GetTxt(), - *pRubyTxt->GetStart() ); - else - nScript = i18n::ScriptType::ASIAN; - - const SwAttrSet& rSet = pNd->GetSwAttrSet(); - nHeight = ((SvxFontHeightItem&)rSet.Get( - GetWhichOfScript( RES_CHRATR_FONTSIZE, nScript ))).GetHeight(); - (nHeight += 10) /= 20-1; - rWrt.OutLong( nHeight ) << '('; - - if( pFmt ) - { - rWrt.Strm() << '{'; - OutRTF_SwFmt( rWrt, *pFmt ); - if( rRTFWrt.bOutFmtAttr ) - rWrt.Strm() << ' '; - } - RTFOutFuncs::Out_String( rWrt.Strm(), rRuby.GetText(), - rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); - if( pFmt ) - rWrt.Strm() << '}'; - - rWrt.Strm() << "),"; - rRTFWrt.bOutFmtAttr = FALSE; - - return rWrt; -} - - -/* File FRMATR.HXX */ - -static Writer& OutRTF_SwFrmSize( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - const SwFmtFrmSize& rSz = (const SwFmtFrmSize&)rHt; - if( rRTFWrt.pFlyFmt ) // wird das FlyFrmFmt ausgegeben ? - { - if( !rRTFWrt.bRTFFlySyntax ) - return rWrt; - - if( rSz.GetWidth() ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_ABSW; - rWrt.OutLong( rSz.GetWidth() ); - rRTFWrt.bOutFmtAttr = TRUE; - } - - if( rSz.GetHeight() ) - { - long nH = rSz.GetHeight(); - if( ATT_FIX_SIZE == rSz.GetHeightSizeType() ) - nH = -nH; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_ABSH; - rWrt.OutLong( nH ); - rRTFWrt.bOutFmtAttr = TRUE; - } - } - else if( rRTFWrt.bOutPageDesc ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_PGWSXN; - rWrt.OutLong( rSz.GetWidth() ); - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_PGHSXN; - rWrt.OutLong( rSz.GetHeight() ); - rRTFWrt.bOutFmtAttr = TRUE; - } - return rWrt; -} - -static Writer& OutRTF_SwFmtLRSpace( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - const SvxLRSpaceItem & rLR = (const SvxLRSpaceItem&) rHt; - if( !rRTFWrt.pFlyFmt ) - { - if( rRTFWrt.bOutPageDesc ) - { - if( rLR.GetLeft() ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_MARGLSXN; - rWrt.OutLong( rLR.GetLeft() ); - rRTFWrt.bOutFmtAttr = TRUE; - } - if( rLR.GetRight() ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_MARGRSXN; - rWrt.OutLong( rLR.GetRight() ); - rRTFWrt.bOutFmtAttr = TRUE; - } - } - else - { - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_LI; - rWrt.OutLong( rLR.GetTxtLeft() ) << OOO_STRING_SVTOOLS_RTF_RI; - rWrt.OutLong( rLR.GetRight() ); - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_LIN; - rWrt.OutLong( rLR.GetTxtLeft() ) << OOO_STRING_SVTOOLS_RTF_RIN; - rWrt.OutLong( rLR.GetRight() ); - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FI; - rWrt.OutLong( rLR.GetTxtFirstLineOfst() ); - } - } - else if( rLR.GetLeft() == rLR.GetRight() && rRTFWrt.bRTFFlySyntax ) - { - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_DFRMTXTX; - rWrt.OutLong( rLR.GetLeft() ); - } - return rWrt; -} - -static Writer& OutRTF_SwFmtULSpace( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - const SvxULSpaceItem & rUL = (const SvxULSpaceItem&) rHt; - if( rRTFWrt.pFlyFmt ) - { - if( rUL.GetUpper() == rUL.GetLower() && rRTFWrt.bRTFFlySyntax ) - { - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_DFRMTXTY; - rWrt.OutLong( rUL.GetLower() ); - } - } - else - { - const char* p; - USHORT nValue = rUL.GetUpper(); - if( rRTFWrt.bOutPageDesc ) - { - p = OOO_STRING_SVTOOLS_RTF_MARGTSXN; - if( !rRTFWrt.bOutPageDescTbl ) - { - SwRect aRect; - const SwFmtHeader* pHdr; - if( SFX_ITEM_SET == rRTFWrt.pAktPageDesc->GetMaster(). - GetItemState( RES_HEADER, FALSE, - (const SfxPoolItem**)&pHdr ) && pHdr->IsActive() ) - { - aRect = pHdr->GetHeaderFmt()->FindLayoutRect( FALSE ); - if( aRect.Height() ) - nValue = nValue + static_cast< USHORT >(aRect.Height()); - else - { - const SwFmtFrmSize& rSz = pHdr->GetHeaderFmt()->GetFrmSize(); - if( ATT_VAR_SIZE != rSz.GetHeightSizeType() ) - nValue = nValue + static_cast< USHORT >(rSz.GetHeight()); - else - nValue = nValue + 274; // defaulten fuer 12pt Schrift - nValue = nValue + pHdr->GetHeaderFmt()->GetULSpace().GetLower(); - } - } - } - } - else - p = OOO_STRING_SVTOOLS_RTF_SB; - - if( rRTFWrt.bOutPageDesc || nValue ) - { - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << p; - rWrt.OutLong( nValue ); - } - - - nValue = rUL.GetLower(); - if( rRTFWrt.bOutPageDesc ) - { - p = OOO_STRING_SVTOOLS_RTF_MARGBSXN; - if( !rRTFWrt.bOutPageDescTbl ) - { - SwRect aRect; - const SwFmtFooter* pFtr; - if( SFX_ITEM_SET == rRTFWrt.pAktPageDesc->GetMaster(). - GetItemState( RES_FOOTER, FALSE, - (const SfxPoolItem**)&pFtr ) && pFtr->IsActive() ) - { - aRect = pFtr->GetFooterFmt()->FindLayoutRect( FALSE ); - if( aRect.Height() ) - nValue = nValue + static_cast< USHORT >(aRect.Height()); - else - { - const SwFmtFrmSize& rSz = pFtr->GetFooterFmt()->GetFrmSize(); - if( ATT_VAR_SIZE != rSz.GetHeightSizeType() ) - nValue = nValue + static_cast< USHORT >(rSz.GetHeight()); - else - nValue += 274; // defaulten fuer 12pt Schrift - nValue = nValue + pFtr->GetFooterFmt()->GetULSpace().GetUpper(); - } - } - } - } - else - p = OOO_STRING_SVTOOLS_RTF_SA; - - if( rRTFWrt.bOutPageDesc || nValue ) - { - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << p; - rWrt.OutLong( nValue ); - } - } - return rWrt; -} - -// Header-Footer werden auch vom RTF-Writer direkt gerufen, also kein static! - - -Writer& OutRTF_SwFmtHeader( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const SwFmtHeader& rHd = (const SwFmtHeader&)rHt; - if( !rHd.IsActive() ) // nicht aktiv, dann nichts weiter ausgeben - return rWrt; - - // hole einen Node zu dem Request - SwStartNode *pSttNode = 0; - const SwFmtCntnt& rCntnt = rHd.GetHeaderFmt()->GetCntnt(); - if( rCntnt.GetCntntIdx() ) - pSttNode = rCntnt.GetCntntIdx()->GetNode().GetStartNode(); - - do { // middle-check-loop - if( !pSttNode ) - break; // es gibt keine Kopf-/Fusszeile/Fussnote - - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - - // Hole vom Node und vom letzten Node die Position in der Section - ULONG nStart = pSttNode->GetIndex() + 1, - nEnd = pSttNode->EndOfSectionIndex(); - - // kein Bereich also kein gueltiger Node - if( nStart >= nEnd ) - break; - ASSERT( rRTFWrt.pAktPageDesc, "Header-Attribut ohne PageDesc" ); - - const sal_Char * pHdNm = OOO_STRING_SVTOOLS_RTF_HEADER; - rWrt.Strm() << pHdNm << 'y'; - if( rRTFWrt.bOutPageDescTbl ) - { - // hole die Ober-/Unterkanten vom Header - const SvxULSpaceItem& rUL = rHd.GetHeaderFmt()->GetULSpace(); - const SvxLRSpaceItem& rLR = rHd.GetHeaderFmt()->GetLRSpace(); - const SwFmtFrmSize& rSz = rHd.GetHeaderFmt()->GetFrmSize(); - - rWrt.OutLong( rUL.GetUpper() ); - OutComment( rWrt, pHdNm ) << "yb"; - rWrt.OutLong( rUL.GetLower() ) << pHdNm << "xl"; - rWrt.OutLong( rLR.GetLeft() ) << pHdNm << "xr"; - rWrt.OutLong( rLR.GetRight() ) << pHdNm << "yh"; - rWrt.OutLong( ATT_FIX_SIZE == rSz.GetHeightSizeType() - ? -rSz.GetHeight() - : rSz.GetHeight() ) << '}'; - } - else - rWrt.OutLong( rRTFWrt.pAktPageDesc->GetMaster(). - GetULSpace().GetUpper() ); - - // wird nicht die PageDesc-Tabelle ausgegeben und gibt es einen - // Nachfolger, dann handelt es sich um die "1.Seite" nach RTF. - sal_Char cTyp = 0; - if( rRTFWrt.pAktPageDesc->GetFollow() && - rRTFWrt.pAktPageDesc->GetFollow() != rRTFWrt.pAktPageDesc ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_TITLEPG; //i13107 - cTyp = 'f'; // dann FirstPage-Header - } - else if( !rRTFWrt.pAktPageDesc->IsHeaderShared() ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FACINGP; //i13107 - cTyp = rRTFWrt.bOutLeftHeadFoot ? 'l' : 'r'; - } - - rWrt.Strm() << '{'<< pHdNm; - if( cTyp ) rWrt.Strm() << cTyp; - rWrt.Strm() << ' '; - - { - RTFSaveData aSaveData( rRTFWrt, nStart, nEnd ); - rRTFWrt.Out_SwDoc( rRTFWrt.pCurPam ); - } - - rWrt.Strm() << '}' << SwRTFWriter::sNewLine; - - } while( FALSE ); - return rWrt; -} -// Header-Footer werden auch vom RTF-Writer direkt gerufen, also kein static! - - -Writer& OutRTF_SwFmtFooter( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const SwFmtFooter& rFt = (const SwFmtFooter&)rHt; - if( !rFt.IsActive() ) // nicht aktiv, dann nichts weiter ausgeben - return rWrt; - - SwStartNode *pSttNode = 0; - const SwFmtCntnt& rCntnt = rFt.GetFooterFmt()->GetCntnt(); - if( rCntnt.GetCntntIdx() ) - pSttNode = rCntnt.GetCntntIdx()->GetNode().GetStartNode(); - - do { // middle-check-loop - if( !pSttNode ) - break; // es gibt keine Kopf-/Fusszeile/Fussnote - - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - - // Hole vom Node und vom letzten Node die Position in der Section - ULONG nStart = pSttNode->GetIndex()+1, - nEnd = pSttNode->EndOfSectionIndex(); - - // kein Bereich also kein gueltiger Node - if( nStart >= nEnd ) - break; - ASSERT( rRTFWrt.pAktPageDesc, "Footer-Attribut ohne PageDesc" ); - - const sal_Char * pFtNm = OOO_STRING_SVTOOLS_RTF_FOOTER; - rWrt.Strm() << pFtNm << 'y'; - if( rRTFWrt.bOutPageDescTbl ) - { - // hole die Ober-/Unterkanten vom Footer - const SvxULSpaceItem& rUL = rFt.GetFooterFmt()->GetULSpace(); - const SvxLRSpaceItem& rLR = rFt.GetFooterFmt()->GetLRSpace(); - const SwFmtFrmSize& rSz = rFt.GetFooterFmt()->GetFrmSize(); - - rWrt.OutLong( rUL.GetLower() ); - OutComment( rWrt, pFtNm ) << "yt"; - rWrt.OutLong( rUL.GetUpper() ) << pFtNm << "xl"; - rWrt.OutLong( rLR.GetLeft() ) << pFtNm << "xr"; - rWrt.OutLong( rLR.GetRight() ) << pFtNm << "yh"; - rWrt.OutLong( ATT_FIX_SIZE == rSz.GetHeightSizeType() - ? -rSz.GetHeight() - : rSz.GetHeight() ) << '}'; - } - else - rWrt.OutLong( rRTFWrt.pAktPageDesc->GetMaster(). - GetULSpace().GetLower() ); - - // wird nicht die PageDesc-Tabelle ausgegeben und gibt es einen - // Nachfolger, dann handelt es sich um die "1.Seite" nach RTF. - sal_Char cTyp = 0; - if( !rRTFWrt.bOutPageDesc && rRTFWrt.pAktPageDesc->GetFollow() && - rRTFWrt.pAktPageDesc->GetFollow() != rRTFWrt.pAktPageDesc ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_TITLEPG; //i13107 - cTyp = 'f'; // dann FirstPage-Header - } - else if( !rRTFWrt.pAktPageDesc->IsFooterShared() ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FACINGP; //i13107 - cTyp = rRTFWrt.bOutLeftHeadFoot ? 'l' : 'r'; - } - - rWrt.Strm() << '{'<< pFtNm; - if( cTyp ) rWrt.Strm() << cTyp; - rWrt.Strm() << ' '; - - { - RTFSaveData aSaveData( rRTFWrt, nStart, nEnd ); - rRTFWrt.Out_SwDoc( rRTFWrt.pCurPam ); - } - - rWrt.Strm() << '}' << SwRTFWriter::sNewLine; - - } while( FALSE ); - return rWrt; -} - -static Writer& OutRTF_SwFmtPrint( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - if( !rRTFWrt.bRTFFlySyntax && !((const SvxPrintItem&)rHt).GetValue() ) - { - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FLYPRINT; - } - return rWrt; -} - - -static Writer& OutRTF_SwFmtOpaque( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - if( !rRTFWrt.bRTFFlySyntax && !((const SvxOpaqueItem&)rHt).GetValue() ) - { - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FLYOPAQUE; - } - return rWrt; -} - - -static Writer& OutRTF_SwFmtProtect( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - if( !rRTFWrt.bRTFFlySyntax ) - { - const SvxProtectItem & rFlyProtect = (const SvxProtectItem&) rHt; - RTFProtect aP( rFlyProtect.IsCntntProtected(), - rFlyProtect.IsSizeProtected(), - rFlyProtect.IsPosProtected() ); - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FLYPRTCTD; - rWrt.OutULong( aP.GetValue() ); - } - return rWrt; -} - - -static Writer& OutRTF_SwFmtSurround( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const SwFmtSurround& rFlySurround = (const SwFmtSurround&) rHt; - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - if( rRTFWrt.bRTFFlySyntax ) - { - if( SURROUND_NONE == rFlySurround.GetSurround() ) - { - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_NOWRAP; - } - } - else - { - SwSurround eSurround = rFlySurround.GetSurround(); - BOOL bGold = SURROUND_IDEAL == eSurround; - if( bGold ) - eSurround = SURROUND_PARALLEL; - RTFSurround aMC( bGold, static_cast< BYTE >(eSurround) ); - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FLYMAINCNT; - rWrt.OutULong( aMC.GetValue() ); - rRTFWrt.bOutFmtAttr = TRUE; - } - return rWrt; -} - -static Writer& OutRTF_SwFmtVertOrient ( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const SwFmtVertOrient& rFlyVert = (const SwFmtVertOrient&) rHt; - RTFVertOrient aVO( static_cast< USHORT >(rFlyVert.GetVertOrient()), static_cast< USHORT >(rFlyVert.GetRelationOrient()) ); - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - - if( rRTFWrt.bRTFFlySyntax && rRTFWrt.pFlyFmt ) - { - rRTFWrt.bOutFmtAttr = TRUE; - const char* pOrient; - RndStdIds eAnchor = rRTFWrt.pFlyFmt->GetAnchor().GetAnchorId(); - sal_Int16 eOrient = rFlyVert.GetRelationOrient(); - if (FLY_AT_PAGE == eAnchor) - { - if( text::RelOrientation::PAGE_FRAME == eOrient || text::RelOrientation::FRAME == eOrient ) - pOrient = OOO_STRING_SVTOOLS_RTF_PVPG; - else - pOrient = OOO_STRING_SVTOOLS_RTF_PVMRG; - } - else - pOrient = OOO_STRING_SVTOOLS_RTF_PVPARA; - rWrt.Strm() << pOrient; - - switch (rFlyVert.GetVertOrient()) - { - case text::VertOrientation::TOP: - case text::VertOrientation::LINE_TOP: - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_POSYT; - break; - case text::VertOrientation::BOTTOM: - case text::VertOrientation::LINE_BOTTOM: - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_POSYB; - break; - case text::VertOrientation::CENTER: - case text::VertOrientation::LINE_CENTER: - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_POSYC; - break; - case text::VertOrientation::NONE: - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_POSY; - rWrt.OutULong(rFlyVert.GetPos()); - break; - default: - break; - } - } - else if( !rRTFWrt.bRTFFlySyntax ) - { - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FLYVERT; - rWrt.OutULong( aVO.GetValue() ); - } - - return rWrt; -} - -static Writer& OutRTF_SwFmtHoriOrient( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const SwFmtHoriOrient& rFlyHori = (const SwFmtHoriOrient&) rHt; - RTFHoriOrient aHO( static_cast< USHORT >(rFlyHori.GetHoriOrient()), - static_cast< USHORT >(rFlyHori.GetRelationOrient()) ); - - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - if( rRTFWrt.bRTFFlySyntax && rRTFWrt.pFlyFmt ) - { - rRTFWrt.bOutFmtAttr = TRUE; - const char* pS; - RndStdIds eAnchor = rRTFWrt.pFlyFmt->GetAnchor().GetAnchorId(); - sal_Int16 eOrient = rFlyHori.GetRelationOrient(); - if (FLY_AT_PAGE == eAnchor) - { - if( text::RelOrientation::PAGE_FRAME == eOrient || text::RelOrientation::FRAME == eOrient ) - pS = OOO_STRING_SVTOOLS_RTF_PHPG; - else - pS = OOO_STRING_SVTOOLS_RTF_PHMRG; - } - else - pS = OOO_STRING_SVTOOLS_RTF_PHCOL; - rWrt.Strm() << pS; - - pS = 0; - switch(rFlyHori.GetHoriOrient()) - { - case text::HoriOrientation::RIGHT: - pS = rFlyHori.IsPosToggle() ? OOO_STRING_SVTOOLS_RTF_POSXO : OOO_STRING_SVTOOLS_RTF_POSXR; - break; - case text::HoriOrientation::LEFT: - pS = rFlyHori.IsPosToggle() ? OOO_STRING_SVTOOLS_RTF_POSXI : OOO_STRING_SVTOOLS_RTF_POSXL; - break; - case text::HoriOrientation::CENTER: - pS = OOO_STRING_SVTOOLS_RTF_POSXC; - break; - case text::HoriOrientation::NONE: - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_POSX; - rWrt.OutULong( rFlyHori.GetPos() ); - break; - default: - break; - } - if (pS) - rWrt.Strm() << pS; - } - else - { - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FLYHORZ; - rWrt.OutULong( aHO.GetValue() ); - } - return rWrt; -} - -static Writer& OutRTF_SwFmtAnchor( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - if( !rRTFWrt.bRTFFlySyntax ) - { - const SwFmtAnchor& rAnchor = (const SwFmtAnchor&) rHt; - USHORT nId = static_cast< USHORT >(rAnchor.GetAnchorId()); - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FLYANCHOR; - rWrt.OutULong( nId ); - rRTFWrt.bOutFmtAttr = TRUE; - switch( nId ) - { - case FLY_AT_PAGE: - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FLYPAGE; - rWrt.OutULong( rAnchor.GetPageNum() ); - break; - case FLY_AT_PARA: - case FLY_AS_CHAR: - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FLYCNTNT; - break; - } - } - return rWrt; -} - - - -static Writer& OutRTF_SwFmtBackground( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - // wird das FlyFrmFmt ausgegeben, dann Background nur ausgeben, wenn - // RTF-Syntax gesetzt ist ! - if( !rRTFWrt.pFlyFmt || !rRTFWrt.bRTFFlySyntax ) - { - const SvxBrushItem& rBack = (const SvxBrushItem&)rHt; - if( !rBack.GetColor().GetTransparency() ) - { - ByteString sOut( OOO_STRING_SVTOOLS_RTF_CBPAT ); - sOut += ByteString::CreateFromInt32( - rRTFWrt.GetId( rBack.GetColor() )); - - if( rRTFWrt.pFlyFmt || rRTFWrt.bOutPageDesc ) - { - rWrt.Strm() << '{' << sOut.GetBuffer() << '}'; - } - else - { - rRTFWrt.bOutFmtAttr = TRUE; - rWrt.Strm() << sOut.GetBuffer(); - } - } - } - return rWrt; -} - - -static Writer& OutRTF_SwFmtShadow( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - // wird das FlyFrmFmt ausgegeben, dann Schatten nur ausgeben, wenn - // nicht RTF-Syntax gesetzt ist ! - if( rRTFWrt.pFlyFmt && rRTFWrt.bRTFFlySyntax ) - return rWrt; - - const SvxShadowItem& rShadow = (const SvxShadowItem&)rHt; - // FALSE wegen schliessender Klammer !! - OutComment( rWrt, OOO_STRING_SVTOOLS_RTF_SHADOW, FALSE ); - rWrt.OutULong( rShadow.GetLocation() ) << OOO_STRING_SVTOOLS_RTF_SHDWDIST; - rWrt.OutULong( rShadow.GetWidth() ) << OOO_STRING_SVTOOLS_RTF_SHDWSTYLE; - const Color& rColor = rShadow.GetColor(); - rWrt.OutULong( rColor.GetTransparency() ? SW_SV_BRUSH_NULL : SW_SV_BRUSH_SOLID ); - rWrt.OutULong( rRTFWrt.GetId( rColor ) ) << OOO_STRING_SVTOOLS_RTF_SHDWFCOL; - rWrt.OutULong( 0 ) << '}'; - return rWrt; -} - - -static void OutBorderLine( SwRTFWriter& rWrt, const SvxBorderLine* pLine, - const char* pStr ) -{ - rWrt.Strm() << pStr << OOO_STRING_SVTOOLS_RTF_BRDLNCOL; - rWrt.OutULong( rWrt.GetId( pLine->GetColor() ) ) << OOO_STRING_SVTOOLS_RTF_BRDLNIN; - rWrt.OutULong( pLine->GetInWidth() ) << OOO_STRING_SVTOOLS_RTF_BRDLNOUT; - rWrt.OutULong( pLine->GetOutWidth() ) << OOO_STRING_SVTOOLS_RTF_BRDLNDIST; - rWrt.OutULong( pLine->GetDistance() ); -} - - -static Writer& OutRTF_SwFmtBox( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - - const SvxBoxItem& rBox = (const SvxBoxItem&)rHt; - - static USHORT __READONLY_DATA aBorders[] = { - BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT }; - static const sal_Char* __READONLY_DATA aBorderNames[] = { - OOO_STRING_SVTOOLS_RTF_BRDRT, OOO_STRING_SVTOOLS_RTF_BRDRL, OOO_STRING_SVTOOLS_RTF_BRDRB, OOO_STRING_SVTOOLS_RTF_BRDRR }; - - USHORT nDist = rBox.GetDistance(); - - // wird das FlyFrmFmt ausgegeben, dann Border nur ausgeben, wenn - // nicht RTF-Syntax gesetzt ist! - if( rRTFWrt.pFlyFmt && rRTFWrt.bRTFFlySyntax ) - { -/* -RTF kennt keine Rahmen Umrandung! - // die normale RTF-Definition - if( rBox.GetTop() && rBox.GetBottom() && - rBox.GetLeft() && rBox.GetRight() && - *rBox.GetTop() == *rBox.GetBottom() && - *rBox.GetTop() == *rBox.GetLeft() && - *rBox.GetTop() == *rBox.GetRight() ) - OutBorderLine( rRTFWrt, rBox.GetTop(), OOO_STRING_SVTOOLS_RTF_BOX, nDist ); - else - { - OUT_BRDLINE( rBox.GetTop(), OOO_STRING_SVTOOLS_RTF_BRDRT, nDist ); - OUT_BRDLINE( rBox.GetBottom(), OOO_STRING_SVTOOLS_RTF_BRDRB, nDist ); - OUT_BRDLINE( rBox.GetLeft(), OOO_STRING_SVTOOLS_RTF_BRDRL, nDist ); - OUT_BRDLINE( rBox.GetRight(), OOO_STRING_SVTOOLS_RTF_BRDRR, nDist ); - } -*/ - return rWrt; - } - else if( !rRTFWrt.pFlyFmt ) - { - // erst die normale RTF-Definition, dann unsere eigene - if( rBox.GetTop() && rBox.GetBottom() && - rBox.GetLeft() && rBox.GetRight() && - *rBox.GetTop() == *rBox.GetBottom() && - *rBox.GetTop() == *rBox.GetLeft() && - *rBox.GetTop() == *rBox.GetRight() && - nDist == rBox.GetDistance( BOX_LINE_TOP ) && - nDist == rBox.GetDistance( BOX_LINE_LEFT ) && - nDist == rBox.GetDistance( BOX_LINE_BOTTOM ) && - nDist == rBox.GetDistance( BOX_LINE_RIGHT )) - OutBorderLine( rRTFWrt, rBox.GetTop(), OOO_STRING_SVTOOLS_RTF_BOX, nDist ); - else - { - const USHORT* pBrd = aBorders; - const sal_Char** pBrdNms = (const sal_Char**)aBorderNames; - for(int i = 0; i < 4; ++i, ++pBrd, ++pBrdNms) - { - if (const SvxBorderLine* pLn = rBox.GetLine(*pBrd)) - { - OutBorderLine(rRTFWrt, pLn, *pBrdNms, - rBox.GetDistance(*pBrd)); - } - } - } - } - - const USHORT* pBrd = aBorders; - const sal_Char** pBrdNms = (const sal_Char**)aBorderNames; - for( int i = 0; i < 4; ++i, ++pBrd, ++pBrdNms ) - { - const SvxBorderLine* pLn = rBox.GetLine( *pBrd ); - if( pLn ) - { - rWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE; - OutBorderLine( rRTFWrt, pLn, *pBrdNms ); - rWrt.Strm() << '}' << OOO_STRING_SVTOOLS_RTF_BRSP; - rWrt.OutULong( rBox.GetDistance( *pBrd )); - } - } - - rRTFWrt.bOutFmtAttr = FALSE; - return rWrt; -} - -static Writer& OutRTF_SwFmtCol( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = ((SwRTFWriter&)rWrt); - if( rRTFWrt.pFlyFmt && rRTFWrt.bRTFFlySyntax ) - return rWrt; - - const SwFmtCol& rCol = (const SwFmtCol&)rHt; - const SwColumns& rColumns = rCol.GetColumns(); - - USHORT nCols = rColumns.Count(); - if( 1 < nCols ) - { - // dann besorge mal die Seitenbreite ohne Raender !! - const SwFrmFmt* pFmt; - - if( rRTFWrt.pFlyFmt ) - pFmt = rRTFWrt.pFlyFmt; - else if( rRTFWrt.pAktPageDesc ) - pFmt = &rRTFWrt.pAktPageDesc->GetMaster(); - else - pFmt = &const_cast(rWrt.pDoc) - ->GetPageDesc(0).GetMaster(); - - const SvxLRSpaceItem& rLR = pFmt->GetLRSpace(); - - USHORT nPageSize = static_cast< USHORT >( pFmt->GetFrmSize().GetWidth() - - rLR.GetLeft() - rLR.GetRight() ); - - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_COLS; - rWrt.OutLong( nCols ); - - if( rCol.IsOrtho() ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_COLSX; - rWrt.OutLong( rCol.GetGutterWidth( TRUE ) ); - } - else - for( USHORT n = 0; n < nCols; ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_COLNO; - rWrt.OutLong( n+1 ); - - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_COLW; - rWrt.OutLong( rCol.CalcPrtColWidth( n, nPageSize ) ); - if( ++n != nCols ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_COLSR; - rWrt.OutLong( rColumns[ n-1 ]->GetRight() + - rColumns[ n ]->GetLeft() ); - } - } - ((SwRTFWriter&)rWrt).bOutFmtAttr = TRUE; - } - return rWrt; -} - -static Writer& OutRTF_SvxFmtKeep( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const SvxFmtKeepItem& rItem = (const SvxFmtKeepItem&)rHt; - if( rItem.GetValue() ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_KEEPN; - ((SwRTFWriter&)rWrt).bOutFmtAttr = TRUE; - } - return rWrt; -} - -static Writer& OutRTF_SvxFrmDir( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = ((SwRTFWriter&)rWrt); - if (rRTFWrt.pFlyFmt || rRTFWrt.bOutPageDesc) - OutSvxFrmDir(rRTFWrt, rHt); - return rWrt; -} - -/* File GRFATR.HXX */ - -static Writer& OutRTF_SwMirrorGrf( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const SwMirrorGrf & rMirror = (const SwMirrorGrf&)rHt; - if( RES_MIRROR_GRAPH_DONT == rMirror.GetValue() ) - return rWrt; - - ((SwRTFWriter&)rWrt).bOutFmtAttr = TRUE; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_GRFMIRROR; - rWrt.OutULong( rMirror.GetValue() ); - return rWrt; -} - -static Writer& OutRTF_SwCropGrf( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const SwCropGrf & rCrop = (const SwCropGrf&)rHt; - ByteString aStr; - if( rCrop.GetLeft() ) - ( aStr += OOO_STRING_SVTOOLS_RTF_PICCROPL ) += - ByteString::CreateFromInt32( (short)rCrop.GetLeft() ); - if( rCrop.GetRight() ) - ( aStr += OOO_STRING_SVTOOLS_RTF_PICCROPR ) += - ByteString::CreateFromInt32( (short)rCrop.GetRight() ); - if( rCrop.GetTop() ) - ( aStr += OOO_STRING_SVTOOLS_RTF_PICCROPT ) += - ByteString::CreateFromInt32( (short)rCrop.GetTop() ); - if( rCrop.GetBottom() ) - ( aStr += OOO_STRING_SVTOOLS_RTF_PICCROPB ) += - ByteString::CreateFromInt32( (short)rCrop.GetBottom() ); - if( aStr.Len() ) - { - ((SwRTFWriter&)rWrt).bOutFmtAttr = TRUE; - rWrt.Strm() << aStr.GetBuffer(); - } - return rWrt; -} - - - -/* File PARATR.HXX */ - -static Writer& OutRTF_SwLineSpacing( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const SvxLineSpacingItem &rLs = (const SvxLineSpacingItem&)rHt; - - switch (rLs.GetLineSpaceRule()) - { - default: - break; - case SVX_LINE_SPACE_AUTO: - case SVX_LINE_SPACE_FIX: - case SVX_LINE_SPACE_MIN: - { - ((SwRTFWriter&)rWrt).bOutFmtAttr = TRUE; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_SL; - sal_Char cMult = '0'; - switch (rLs.GetInterLineSpaceRule()) - { - case SVX_INTER_LINE_SPACE_FIX: - // unser Durchschuss gibt es aber nicht in WW - also wie - // kommt man an die MaxLineHeight heran? - rWrt.OutLong((short)rLs.GetInterLineSpace()); - break; - case SVX_INTER_LINE_SPACE_PROP: - rWrt.OutLong((240L * rLs.GetPropLineSpace()) / 100L); - cMult = '1'; - break; - default: - if (SVX_LINE_SPACE_FIX == rLs.GetLineSpaceRule()) - rWrt.Strm() << '-'; - rWrt.OutLong( rLs.GetLineHeight() ); - break; - } - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_SLMULT << cMult; - } - break; - } - return rWrt; -} - -static Writer& OutRTF_SwAdjust( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const SvxAdjustItem & rAdjust = ((const SvxAdjustItem&)rHt); - ByteString aAttr( "\\q" ); - switch( rAdjust.GetAdjust() ) - { - case SVX_ADJUST_LEFT: aAttr += 'l'; break; - case SVX_ADJUST_RIGHT: aAttr += 'r'; break; - case SVX_ADJUST_BLOCKLINE: - case SVX_ADJUST_BLOCK: aAttr += 'j'; break; - case SVX_ADJUST_CENTER: aAttr += 'c'; break; - - default: - return rWrt; // kein gueltiges Attriut, also returnen - } - ((SwRTFWriter&)rWrt).bOutFmtAttr = TRUE; - rWrt.Strm() << aAttr.GetBuffer(); - return rWrt; -} - -static Writer& OutRTF_SvxFmtSplit( Writer& rWrt, const SfxPoolItem& rHt ) -{ - const SvxFmtSplitItem& rItem = (const SvxFmtSplitItem&)rHt; - if( !rItem.GetValue() ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_KEEP; - ((SwRTFWriter&)rWrt).bOutFmtAttr = TRUE; - } - return rWrt; -} - -static Writer& OutRTF_SwTabStop( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - const SvxTabStopItem & rTStops = (const SvxTabStopItem&)rHt; - long nOffset = ((SvxLRSpaceItem&)rRTFWrt.GetItem( RES_LR_SPACE )).GetTxtLeft(); - for( USHORT n = 0; n < rTStops.Count(); n++ ) - { - const SvxTabStop & rTS = rTStops[ n ]; - if( SVX_TAB_ADJUST_DEFAULT != rTS.GetAdjustment() ) - { - BOOL bOutDecimal = TRUE; - const char* pFill = 0; - switch( rTS.GetFill() ) - { - case cDfltFillChar: - break; - - case '.': pFill = OOO_STRING_SVTOOLS_RTF_TLDOT; break; - case '_': pFill = OOO_STRING_SVTOOLS_RTF_TLUL; break; - case '-': pFill = OOO_STRING_SVTOOLS_RTF_TLTH; break; - case '=': pFill = OOO_STRING_SVTOOLS_RTF_TLEQ; break; - default: - if( !rRTFWrt.bWriteHelpFmt ) - { - OutComment( rWrt, OOO_STRING_SVTOOLS_RTF_TLSWG, FALSE ); - rWrt.OutULong( (((USHORT)rTS.GetFill()) << 8 ) + - rTS.GetDecimal() ) - << '}'; - bOutDecimal = FALSE; - } - } - if( pFill ) - rWrt.Strm() << pFill; - - if( !rRTFWrt.bWriteHelpFmt && bOutDecimal && - rTS.GetDecimal() != ((SvxTabStopItem&)*GetDfltAttr( - RES_PARATR_TABSTOP ))[ 0 ].GetDecimal() ) - { - OutComment( rWrt, OOO_STRING_SVTOOLS_RTF_TLSWG, FALSE ); - rWrt.OutULong( (((USHORT)rTS.GetFill()) << 8 ) + - rTS.GetDecimal() ) << '}'; - } - - const sal_Char* pAdjStr = 0; - switch (rTS.GetAdjustment()) - { - case SVX_TAB_ADJUST_RIGHT: - pAdjStr = OOO_STRING_SVTOOLS_RTF_TQR; - break; - case SVX_TAB_ADJUST_DECIMAL: - pAdjStr = OOO_STRING_SVTOOLS_RTF_TQDEC; - break; - case SVX_TAB_ADJUST_CENTER: - pAdjStr = OOO_STRING_SVTOOLS_RTF_TQC; - break; - default: - break; - } - if (pAdjStr) - rWrt.Strm() << pAdjStr; - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_TX; - rWrt.OutLong(rTS.GetTabPos() + nOffset); - } - } - rRTFWrt.bOutFmtAttr = TRUE; - return rWrt; -} - -static Writer& OutRTF_SwHypenZone( Writer& rWrt, const SfxPoolItem& rHt ) -{ - if( !((SwRTFWriter&)rWrt).bWriteHelpFmt ) - { - const SvxHyphenZoneItem& rAttr = (const SvxHyphenZoneItem&)rHt; - USHORT nFlags = rAttr.IsHyphen() ? 1 : 0; - if( rAttr.IsPageEnd() ) nFlags += 2; - - OutComment( rWrt, OOO_STRING_SVTOOLS_RTF_HYPHEN, FALSE ); - rWrt.OutULong( nFlags ) << OOO_STRING_SVTOOLS_RTF_HYPHLEAD; - rWrt.OutULong( rAttr.GetMinLead() ) << OOO_STRING_SVTOOLS_RTF_HYPHTRAIL; - rWrt.OutULong( rAttr.GetMinTrail() ) << OOO_STRING_SVTOOLS_RTF_HYPHMAX; - rWrt.OutULong( rAttr.GetMaxHyphens() ) << '}'; - } - return rWrt; -} - -static Writer& OutRTF_SwNumRule( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - if( !rRTFWrt.bOutListNumTxt ) - { - const SwNumRuleItem& rAttr = (const SwNumRuleItem&)rHt; - USHORT nId; - if( rAttr.GetValue().Len() && - USHRT_MAX != (nId = rRTFWrt.GetId( rAttr ) )) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_LS; - rWrt.OutULong( nId ); - rRTFWrt.bOutFmtAttr = TRUE; - } - } - return rWrt; -} - -static Writer& OutRTF_SwScriptSpace( Writer& rWrt, const SfxPoolItem& rHt ) -{ - if( ((const SvxScriptSpaceItem&)rHt).GetValue() ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_ASPALPHA; - ((SwRTFWriter&)rWrt).bOutFmtAttr = TRUE; - } - return rWrt; -} -static Writer& OutRTF_SwHangPunctuation( Writer& rWrt, const SfxPoolItem& rHt ) -{ - if( !((const SvxHangingPunctuationItem&)rHt).GetValue() ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_NOOVERFLOW; - ((SwRTFWriter&)rWrt).bOutFmtAttr = TRUE; - } - return rWrt; -} -static Writer& OutRTF_SwForbiddenRule( Writer& rWrt, const SfxPoolItem& rHt ) -{ - if( !((const SvxForbiddenRuleItem&)rHt).GetValue() ) - { - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_NOCWRAP; - ((SwRTFWriter&)rWrt).bOutFmtAttr = TRUE; - } - return rWrt; -} - -static Writer& OutRTF_SwFontAlign( Writer& rWrt, const SfxPoolItem& rHt ) -{ - SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - const SvxParaVertAlignItem & rAttr = (const SvxParaVertAlignItem &)rHt; - const char* pStr; - switch ( rAttr.GetValue() ) - { - case SvxParaVertAlignItem::TOP: pStr = OOO_STRING_SVTOOLS_RTF_FAHANG; break; - case SvxParaVertAlignItem::BOTTOM: pStr = OOO_STRING_SVTOOLS_RTF_FAVAR; break; - case SvxParaVertAlignItem::CENTER: pStr = OOO_STRING_SVTOOLS_RTF_FACENTER; break; - case SvxParaVertAlignItem::BASELINE: pStr = OOO_STRING_SVTOOLS_RTF_FAROMAN; break; - -// case SvxParaVertAlignItem::AUTOMATIC: - default: pStr = OOO_STRING_SVTOOLS_RTF_FAAUTO; break; - } - rWrt.Strm() << pStr; - rRTFWrt.bOutFmtAttr = TRUE; - return rWrt; -} - -/* - * lege hier die Tabellen fuer die RTF-Funktions-Pointer auf - * die Ausgabe-Funktionen an. - * Es sind lokale Strukturen, die nur innerhalb der RTF-DLL - * bekannt sein muessen. - */ - -SwAttrFnTab aRTFAttrFnTab = { -/* RES_CHRATR_CASEMAP */ OutRTF_SwCaseMap, -/* RES_CHRATR_CHARSETCOLOR */ 0, -/* RES_CHRATR_COLOR */ OutRTF_SwColor, -/* RES_CHRATR_CONTOUR */ OutRTF_SwContour, -/* RES_CHRATR_CROSSEDOUT */ OutRTF_SwCrossedOut, -/* RES_CHRATR_ESCAPEMENT */ OutRTF_SwEscapement, -/* RES_CHRATR_FONT */ OutRTF_SwFont, -/* RES_CHRATR_FONTSIZE */ OutRTF_SwSize, -/* RES_CHRATR_KERNING */ 0, // NOT USED!! OutRTF_SwKerning, -/* RES_CHRATR_LANGUAGE */ OutRTF_SwLanguage, -/* RES_CHRATR_POSTURE */ OutRTF_SwPosture, -/* RES_CHRATR_PROPORTIONALFONTSIZE*/0, -/* RES_CHRATR_SHADOWED */ OutRTF_SwShadowed, -/* RES_CHRATR_UNDERLINE */ OutRTF_SwUnderline, -/* RES_CHRATR_WEIGHT */ OutRTF_SwWeight, -/* RES_CHRATR_WORDLINEMODE */ 0, // Neu: Wortweises Unter-/Durchstreichen -/* RES_CHRATR_AUTOKERN */ 0, // Neu: Automatisches Pairkerning -/* RES_CHRATR_BLINK */ 0, // Neu: Blinkender Text -/* RES_CHRATR_NOHYPHEN */ 0, // Neu: nicht trennen -/* RES_CHRATR_NOLINEBREAK */ 0, // Neu: nicht umbrechen -/* RES_CHRATR_BACKGROUND */ OutRTF_SwChrBckgrnd, // Neu: Zeichenhintergrund -/* RES_CHRATR_CJK_FONT */ OutRTF_SwFont, -/* RES_CHRATR_CJK_FONTSIZE */ OutRTF_SwSize, -/* RES_CHRATR_CJK_LANGUAGE */ OutRTF_SwLanguage, -/* RES_CHRATR_CJK_POSTURE */ OutRTF_SwPosture, -/* RES_CHRATR_CJK_WEIGHT */ OutRTF_SwWeight, -/* RES_CHRATR_CTL_FONT */ OutRTF_SwFont, -/* RES_CHRATR_CTL_FONTSIZE */ OutRTF_SwSize, -/* RES_CHRATR_CTL_LANGUAGE */ OutRTF_SwLanguage, -/* RES_CHRATR_CTL_POSTURE */ OutRTF_SwPosture, -/* RES_CHRATR_CTL_WEIGHT */ OutRTF_SwWeight, -/* RES_CHRATR_ROTATE */ OutRTF_SwCharRotate, -/* RES_CHRATR_EMPHASIS_MARK */ OutRTF_SwEmphasisMark, -/* RES_CHRATR_TWO_LINES */ OutRTF_SwTwoInOne, -/* RES_CHRATR_SCALEW */ OutRTF_SwCharScaleW, -/* RES_CHRATR_RELIEF */ OutRTF_SwCharRelief, -/* RES_CHRATR_HIDDEN */ OutRTF_SvxCharHiddenItem, -/* RES_CHRATR_OVERLINE */ OutRTF_SwOverline, -/* RES_CHRATR_DUMMY1 */ 0, -/* RES_CHRATR_DUMMY2 */ 0, - -/* RES_TXTATR_REFMARK */ 0, // NOT USED!! OutRTF_SwRefMark, -/* RES_TXTATR_TOXMARK */ 0, // NOT USED!! OutRTF_SwTOXMark, -/* RES_TXTATR_META */ 0, -/* RES_TXTATR_METAFIELD */ 0, -/* RES_TXTATR_AUTOFMT */ OutRTF_SwTxtAutoFmt, -/* RES_TXTATR_INETFMT */ OutRTF_SwTxtINetFmt, -/* RES_TXTATR_CHARFMT */ OutRTF_SwTxtCharFmt, -/* RES_TXTATR_CJK_RUBY */ OutRTF_SwTxtRuby, -/* RES_TXTATR_UNKNOWN_CONTAINER */ 0, -/* RES_TXTATR_DUMMY5 */ 0, - -/* RES_TXTATR_FIELD */ OutRTF_SwField, -/* RES_TXTATR_FLYCNT */ OutRTF_SwFlyCntnt, -/* RES_TXTATR_FTN */ OutRTF_SwFtn, -/* RES_TXTATR_DUMMY4 */ 0, -/* RES_TXTATR_DUMMY3 */ 0, -/* RES_TXTATR_DUMMY1 */ 0, // Dummy: -/* RES_TXTATR_DUMMY2 */ 0, // Dummy: - -/* RES_PARATR_LINESPACING */ OutRTF_SwLineSpacing, -/* RES_PARATR_ADJUST */ OutRTF_SwAdjust, -/* RES_PARATR_SPLIT */ OutRTF_SvxFmtSplit, -/* RES_PARATR_WIDOWS */ 0, // NOT USED!! OutRTF_SwWidows, -/* RES_PARATR_ORPHANS */ 0, // NOT USED!! OutRTF_SwOrphans, -/* RES_PARATR_TABSTOP */ OutRTF_SwTabStop, -/* RES_PARATR_HYPHENZONE*/ OutRTF_SwHypenZone, -/* RES_PARATR_DROP */ 0, -/* RES_PARATR_REGISTER */ 0, // neu: Registerhaltigkeit -/* RES_PARATR_NUMRULE */ OutRTF_SwNumRule, -/* RES_PARATR_SCRIPTSPACE */ OutRTF_SwScriptSpace, -/* RES_PARATR_HANGINGPUNCTUATION */ OutRTF_SwHangPunctuation, -/* RES_PARATR_FORBIDDEN_RULE*/ OutRTF_SwForbiddenRule, -/* RES_PARATR_VERTALIGN */ OutRTF_SwFontAlign, -/* RES_PARATR_SNAPTOGRID*/ 0, // new -/* RES_PARATR_CONNECT_TO_BORDER */ 0, // new -/* RES_PARATR_OUTLINELEVEL */ 0, // new - outlinelevel - -/* RES_PARATR_LIST_ID */ 0, // new -/* RES_PARATR_LIST_LEVEL */ 0, // new -/* RES_PARATR_LIST_ISRESTART */ 0, // new -/* RES_PARATR_LIST_RESTARTVALUE */ 0, // new -/* RES_PARATR_LIST_ISCOUNTED */ 0, // new - -/* RES_FILL_ORDER */ 0, // NOT USED!! OutRTF_SwFillOrder, -/* RES_FRM_SIZE */ OutRTF_SwFrmSize, -/* RES_PAPER_BIN */ 0, // NOT USED!! OutRTF_SwFmtPaperBin, -/* RES_LR_SPACE */ OutRTF_SwFmtLRSpace, -/* RES_UL_SPACE */ OutRTF_SwFmtULSpace, -/* RES_PAGEDESC */ 0, -/* RES_BREAK */ 0, -/* RES_CNTNT */ 0, -/* RES_HEADER */ OutRTF_SwFmtHeader, -/* RES_FOOTER */ OutRTF_SwFmtFooter, -/* RES_PRINT */ OutRTF_SwFmtPrint, -/* RES_OPAQUE */ OutRTF_SwFmtOpaque, -/* RES_PROTECT */ OutRTF_SwFmtProtect, -/* RES_SURROUND */ OutRTF_SwFmtSurround, -/* RES_VERT_ORIENT */ OutRTF_SwFmtVertOrient, -/* RES_HORI_ORIENT */ OutRTF_SwFmtHoriOrient, -/* RES_ANCHOR */ OutRTF_SwFmtAnchor, -/* RES_BACKGROUND */ OutRTF_SwFmtBackground, -/* RES_BOX */ OutRTF_SwFmtBox, -/* RES_SHADOW */ OutRTF_SwFmtShadow, -/* RES_FRMMACRO */ 0, // NOT USED!! OutRTF_SwFmtFrmMacro, -/* RES_COL */ OutRTF_SwFmtCol, -/* RES_KEEP */ OutRTF_SvxFmtKeep, -/* RES_URL */ 0, // URL -/* RES_EDIT_IN_READONLY */ 0, -/* RES_LAYOUT_SPLIT */ 0, -/* RES_FRMATR_DUMMY1 */ 0, // Dummy: -/* RES_FRMATR_DUMMY2 */ 0, // Dummy: -/* RES_AUTO_STYLE */ 0, // Dummy: -/* RES_FRMATR_DUMMY4 */ 0, // Dummy: -/* RES_FRMATR_DUMMY5 */ 0, // Dummy: -/* RES_FRMATR_DUMMY6 */ 0, // Dummy: -/* RES_FRAMEDIR*/ OutRTF_SvxFrmDir, -/* RES_FRMATR_DUMMY8 */ 0, // Dummy: -/* RES_FRMATR_DUMMY9 */ 0, // Dummy: -/* RES_FOLLOW_TEXT_FLOW */ 0, -/* RES_WRAP_INFLUENCE_ON_OBJPOS */ 0, -/* RES_FRMATR_DUMMY2 */ 0, // Dummy: -/* RES_AUTO_STYLE */ 0, // Dummy: -/* RES_FRMATR_DUMMY4 */ 0, // Dummy: -/* RES_FRMATR_DUMMY5 */ 0, // Dummy: - -/* RES_GRFATR_MIRRORGRF */ OutRTF_SwMirrorGrf, -/* RES_GRFATR_CROPGRF */ OutRTF_SwCropGrf, -/* RES_GRFATR_ROTATION */ 0, -/* RES_GRFATR_LUMINANCE */ 0, -/* RES_GRFATR_CONTRAST */ 0, -/* RES_GRFATR_CHANNELR */ 0, -/* RES_GRFATR_CHANNELG */ 0, -/* RES_GRFATR_CHANNELB */ 0, -/* RES_GRFATR_GAMMA */ 0, -/* RES_GRFATR_INVERT */ 0, -/* RES_GRFATR_TRANSPARENCY */ 0, -/* RES_GRFATR_DRWAMODE */ 0, -/* RES_GRFATR_DUMMY1 */ 0, -/* RES_GRFATR_DUMMY2 */ 0, -/* RES_GRFATR_DUMMY3 */ 0, -/* RES_GRFATR_DUMMY4 */ 0, -/* RES_GRFATR_DUMMY5 */ 0, - -/* RES_BOXATR_FORMAT */ 0, -/* RES_BOXATR_FORMULA */ 0, -/* RES_BOXATR_VALUE */ 0, - -/* RES_UNKNOWNATR_CONTAINER */ 0 -}; - -SwNodeFnTab aRTFNodeFnTab = { -/* RES_TXTNODE */ OutRTF_SwTxtNode, -/* RES_GRFNODE */ OutRTF_SwGrfNode, -/* RES_OLENODE */ OutRTF_SwOLENode -}; - -/* vi:set tabstop=4 shiftwidth=4 expandtab: */ diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx index 3d77f13667..1773d9b71e 100644 --- a/sw/source/filter/rtf/rtfnum.cxx +++ b/sw/source/filter/rtf/rtfnum.cxx @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -1129,332 +1128,3 @@ BOOL lcl_IsExportNumRule( const SwNumRule& rRule, BYTE* pEnd = 0 ) *pEnd = nEnd; return nLvl != nEnd; } - -void SwRTFWriter::OutRTFListTab() -{ - ByteString sOverrideList; - USHORT nId = 1, nTmplId = 1, n; - - // prepare the NodeNum to generate the NumString - SwNumberTree::tNumberVector aNumVector; - for( n = 0; n < MAXLEVEL; ++n ) - aNumVector.push_back(n); - BYTE aNumLvlPos[ MAXLEVEL ]; - - if( !pNumRuleTbl ) - BuildNumRuleTbl(); - - for( n = 0; n < pNumRuleTbl->Count(); ++n ) - { - const SwNumRule* pRule = (*pNumRuleTbl)[ n ]; - - // mit der ersten Rule wird auch die ListTable geschrieben - if( !sOverrideList.Len() ) - OutComment( *this, OOO_STRING_SVTOOLS_RTF_LISTTABLE ); - - Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LIST << OOO_STRING_SVTOOLS_RTF_LISTTEMPLATEID; - OutULong( nTmplId ); - ByteString sTmp; - - if( pRule->IsContinusNum() ) - Strm() << OOO_STRING_SVTOOLS_RTF_LISTSIMPLE; - - BYTE nLvl, nEnd; - lcl_IsExportNumRule( *pRule, &nEnd ); - - for( nLvl = 0; nLvl < nEnd; ++nLvl ) - { - const SwNumFmt& rFmt = pRule->Get( nLvl ); - Strm() << sNewLine; - if( nLvl > 8 ) // RTF-kennt nur 9 Ebenen - OutComment( *this, OOO_STRING_SVTOOLS_RTF_SOUTLVL ); - - Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LISTLEVEL << OOO_STRING_SVTOOLS_RTF_LEVELNFC; - - USHORT nVal = 0; - switch( rFmt.GetNumberingType() ) - { - case SVX_NUM_ROMAN_UPPER: nVal = 1; break; - case SVX_NUM_ROMAN_LOWER: nVal = 2; break; - case SVX_NUM_CHARS_UPPER_LETTER: - case SVX_NUM_CHARS_UPPER_LETTER_N: nVal = 3; break; - case SVX_NUM_CHARS_LOWER_LETTER: - case SVX_NUM_CHARS_LOWER_LETTER_N: nVal = 4; break; - - case SVX_NUM_BITMAP: - case SVX_NUM_CHAR_SPECIAL: nVal = 23; break; - } - OutLong( nVal ) << OOO_STRING_SVTOOLS_RTF_LEVELJC; - - switch( rFmt.GetNumAdjust() ) - { - case SVX_ADJUST_CENTER: nVal = 1; break; - case SVX_ADJUST_RIGHT: nVal = 2; break; - default: nVal = 0; break; - } - OutLong( nVal ) << OOO_STRING_SVTOOLS_RTF_LEVELSTARTAT; - OutLong( rFmt.GetStart() ) - << OOO_STRING_SVTOOLS_RTF_LEVELFOLLOW << "0{" << OOO_STRING_SVTOOLS_RTF_LEVELTEXT << ' '; - - BOOL bWriteBulletFont = FALSE; - memset( aNumLvlPos, 0, MAXLEVEL ); - if( SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType() || - SVX_NUM_BITMAP == rFmt.GetNumberingType() ) - { - Strm() << "\\'01"; - ByteString sNo( ByteString::CreateFromInt32( rFmt.GetBulletChar())); - Strm() << "\\u" << sNo.GetBuffer() << " ?"; - bWriteBulletFont = TRUE; - } - else if( SVX_NUM_NUMBER_NONE == rFmt.GetNumberingType() ) - { - String sOut( rFmt.GetPrefix() ); sOut += rFmt.GetSuffix(); - if( sOut.Len() ) - { - Strm() << "\\'"; - OutHex( sOut.Len() ); - RTFOutFuncs::Out_String( Strm(), sOut, - eDefaultEncoding, bWriteHelpFmt ); - } - } - else - { - memset( aNumLvlPos, 0, MAXLEVEL ); - BYTE* pLvlPos = aNumLvlPos; - // --> OD 2005-11-18 #128056# - // correction of refactoring done by cws swnumtree: - // - the numbering string has to be restrict to the level - // currently working on. - String sNumStr( pRule->MakeNumString( aNumVector, FALSE, TRUE, nLvl )); - // <-- - - // now search the nums in the string - for( BYTE i = 0; i <= nLvl; ++i ) - { - String sSrch( String::CreateFromInt32( i )); - xub_StrLen nFnd = sNumStr.Search( sSrch ); - if( STRING_NOTFOUND != nFnd ) - { - *pLvlPos = (BYTE)(nFnd + rFmt.GetPrefix().Len() + 1 ); - ++pLvlPos; - sNumStr.SetChar( nFnd, (sal_Unicode)i ); - } - } - - Strm() << "\\'"; - OutHex( sNumStr.Len() + rFmt.GetPrefix().Len() + - rFmt.GetSuffix().Len() ); - - if( rFmt.GetPrefix().Len() ) - RTFOutFuncs::Out_String( Strm(), rFmt.GetPrefix(), - eDefaultEncoding, bWriteHelpFmt ); - - - for( xub_StrLen x = 0; x < sNumStr.Len(); ++x ) - if( sNumStr.GetChar( x ) < 0x20 || - sNumStr.GetChar( x ) > 0xFF ) - { - Strm() << "\\'"; OutHex( sNumStr.GetChar( x ) ); - } - else - Strm() << (sal_Char)sNumStr.GetChar( x ); - - if( rFmt.GetSuffix().Len() ) - RTFOutFuncs::Out_String( Strm(), rFmt.GetSuffix(), - eDefaultEncoding, bWriteHelpFmt ); - } - - // write the levelnumbers - Strm() << ";}{" << OOO_STRING_SVTOOLS_RTF_LEVELNUMBERS; - for( BYTE i = 0; i <= nLvl && aNumLvlPos[ i ]; ++i ) - { - Strm() << "\\'"; OutHex( aNumLvlPos[ i ] ); - } - Strm() << ";}"; - - if( rFmt.GetCharFmt() ) - Out_SfxItemSet( aRTFAttrFnTab, *this, - rFmt.GetCharFmt()->GetAttrSet(), TRUE ); - - if( bWriteBulletFont ) - { - Strm() << OOO_STRING_SVTOOLS_RTF_F; - const Font* pFont = rFmt.GetBulletFont(); - if( !pFont ) - // --> OD 2006-06-27 #b6440955# - pFont = &numfunc::GetDefBulletFont(); - // <-- - OutULong( GetId( *pFont )); - } - - Strm() << OOO_STRING_SVTOOLS_RTF_FI; - OutLong( rFmt.GetFirstLineOffset() ) << OOO_STRING_SVTOOLS_RTF_LI; - OutLong( rFmt.GetAbsLSpace() ); - - Strm() << '}'; - - if( nLvl > 8 ) // RTF-kennt nur 9 Ebenen - Strm() << '}'; - } - - if( !pRule->IsAutoRule() ) - { - Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LISTNAME << ' '; - RTFOutFuncs::Out_String( Strm(), pRule->GetName(), eDefaultEncoding, - bWriteHelpFmt ) << ";}" ; - } - Strm() << OOO_STRING_SVTOOLS_RTF_LISTID; - OutULong( nId ) << '}' << sNewLine; - - sTmp = '{'; - ((((((( sTmp += OOO_STRING_SVTOOLS_RTF_LISTOVERRIDE ) += - OOO_STRING_SVTOOLS_RTF_LISTID ) += ByteString::CreateFromInt32( nId )) += - OOO_STRING_SVTOOLS_RTF_LISTOVERRIDECOUNT ) += '0' ) += - OOO_STRING_SVTOOLS_RTF_LS ) += ByteString::CreateFromInt32( n )) += '}'; - sOverrideList += sTmp; - - ++nId, ++nTmplId; - } - - if( sOverrideList.Len() ) - Strm() << "}{" << OOO_STRING_SVTOOLS_RTF_LISTOVERRIDETABLE - << sOverrideList.GetBuffer() << '}' << sNewLine; -} - -USHORT SwRTFWriter::GetId( const SwNumRuleItem& rItem ) const -{ - USHORT n, nId = USHRT_MAX; - if( !pNumRuleTbl ) - { - SwRTFWriter* pThis = (SwRTFWriter*)this; - pThis->BuildNumRuleTbl(); - } - const String& rNm = rItem.GetValue(); - for( n = pNumRuleTbl->Count(); n; ) - if( (*pNumRuleTbl)[ --n ]->GetName() == rNm ) - { - nId = n; - break; - } - - return nId; -} - -USHORT SwRTFWriter::GetNumRuleId( const SwNumRule& rRule ) -{ - if( !pNumRuleTbl ) - BuildNumRuleTbl(); - SwNumRulePtr pR = (SwNumRulePtr)&rRule; - return pNumRuleTbl->GetPos( pR ); -} - -void SwRTFWriter::BuildNumRuleTbl() -{ - const SwNumRuleTbl& rListTbl = pDoc->GetNumRuleTbl(); - if( !pNumRuleTbl ) - pNumRuleTbl = new SwNumRuleTbl( (BYTE)rListTbl.Count() ); - for( USHORT n = rListTbl.Count()+1; n; ) - { - SwNumRule* pRule; - --n; - if( n == rListTbl.Count() ) - pRule = (SwNumRule*)pDoc->GetOutlineNumRule(); - else - { - pRule = rListTbl[ n ]; - if( !pDoc->IsUsed( *pRule )) - continue; - } - - if( lcl_IsExportNumRule( *pRule )) - pNumRuleTbl->Insert( pRule, pNumRuleTbl->Count() ); - } -} - -BOOL SwRTFWriter::OutListNum( const SwTxtNode& rNd ) -{ - BOOL bRet = FALSE; - const SwNumRule* pRule = rNd.GetNumRule(); - - // --> OD 2008-03-18 #refactorlists# -// if( pRule && MAXLEVEL > rNd.GetActualListLevel() ) - if( pRule && rNd.IsInList() ) - // <-- - { - // --> OD 2008-03-18 #refactorlists# - ASSERT( rNd.GetActualListLevel() >= 0 && rNd.GetActualListLevel() < MAXLEVEL, - " - text node does not have valid list level. Serious defect -> please inform OD" ); - // <-- - - bOutFmtAttr = FALSE; - bOutListNumTxt = TRUE; - bRet = TRUE; - - const bool bExportNumRule = USHRT_MAX != GetNumRuleId( *pRule ); - const BYTE nLvl = static_cast< BYTE >(rNd.GetActualListLevel()); - const SwNumFmt* pFmt = pRule->GetNumFmt( nLvl ); - if( !pFmt ) - pFmt = &pRule->Get( nLvl ); - - const SfxItemSet& rNdSet = rNd.GetSwAttrSet(); - - SfxItemSet aSet( *rNdSet.GetPool(), rNdSet.GetRanges() ); - aSet.SetParent( &rNdSet ); - SvxLRSpaceItem aLR( (SvxLRSpaceItem&)rNdSet.Get( RES_LR_SPACE ) ); - aLR.SetTxtLeft( aLR.GetTxtLeft() + pFmt->GetAbsLSpace() ); - - aLR.SetTxtFirstLineOfst( pFmt->GetFirstLineOffset() ); - if ( bExportNumRule ) - Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LISTTEXT << OOO_STRING_SVTOOLS_RTF_PARD << OOO_STRING_SVTOOLS_RTF_PLAIN << ' '; - - aSet.Put( aLR ); - Out_SfxItemSet( aRTFAttrFnTab, *this, aSet, TRUE ); - - if( pFmt->GetCharFmt() ) - Out_SfxItemSet( aRTFAttrFnTab, *this, - pFmt->GetCharFmt()->GetAttrSet(), TRUE ); - - { - String sTxt; - if( SVX_NUM_CHAR_SPECIAL == pFmt->GetNumberingType() || SVX_NUM_BITMAP == pFmt->GetNumberingType() ) - sTxt = pFmt->GetBulletChar(); - else - sTxt = rNd.GetNumString(); - - if( bOutFmtAttr ) - { - Strm() << ' '; - bOutFmtAttr = FALSE; - } - - if (sTxt.Len()) - { - RTFOutFuncs::Out_String(Strm(), sTxt, eDefaultEncoding, - bWriteHelpFmt); - } - - if( bExportNumRule ) - { - if( OUTLINE_RULE != pRule->GetRuleType() ) - { - Strm() << OOO_STRING_SVTOOLS_RTF_TAB << '}' << OOO_STRING_SVTOOLS_RTF_ILVL; - if( nLvl > 8 ) // RTF-kennt nur 9 Ebenen - { - OutULong( 8 ); - OutComment( *this, OOO_STRING_SVTOOLS_RTF_SOUTLVL ); - OutULong( nLvl ) << '}'; - } - else - OutULong( nLvl ); - Strm() << ' '; - } - else - Strm() << OOO_STRING_SVTOOLS_RTF_TAB << '}'; - } - else if( sTxt.Len() ) - Strm() << OOO_STRING_SVTOOLS_RTF_TAB; - } - bOutListNumTxt = FALSE; - } - return bRet; -} diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx deleted file mode 100644 index f3b2383364..0000000000 --- a/sw/source/filter/rtf/wrtrtf.cxx +++ /dev/null @@ -1,1801 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // fuer SwPageDesc... -#include -#include -#include -#include -#include // fuer SwPageDesc ... -#include -#include -#include // ...Percent() -#include // ResId fuer Statusleiste -#include - -#include -#include - - -#if defined(UNX) -const sal_Char SwRTFWriter::sNewLine = '\012'; -#else -const sal_Char __FAR_DATA SwRTFWriter::sNewLine[] = "\015\012"; -#endif - -SV_DECL_VARARR( RTFColorTbl, Color, 5, 8 ) -SV_IMPL_VARARR( RTFColorTbl, Color ) - - -SwRTFWriter::SwRTFWriter( const String& rFltName, const String & rBaseURL ) : - eDefaultEncoding( - rtl_getTextEncodingFromWindowsCharset( - sw::ms::rtl_TextEncodingToWinCharset(DEF_ENCODING))), - eCurrentEncoding(eDefaultEncoding) -{ - SetBaseURL( rBaseURL ); - // schreibe Win-RTF-HelpFileFmt - bWriteHelpFmt = 'W' == rFltName.GetChar( 0 ); - // schreibe nur Gliederungs Absaetze - bOutOutlineOnly = 'O' == rFltName.GetChar( 0 ); - // enable non-standard tags for cut and paste - bNonStandard = '\0' == rFltName.GetChar( 0 ); -} - - -SwRTFWriter::~SwRTFWriter() -{} - - -ULONG SwRTFWriter::WriteStream() -{ - bOutPageAttr = bOutSection = TRUE; - - bOutStyleTab = bOutTable = bOutPageDesc = bOutPageDescTbl = - bAutoAttrSet = bOutListNumTxt = bOutLeftHeadFoot = bIgnoreNextPgBreak = - bTxtAttr = bAssociated = FALSE; - - nCurScript = 1; // latin - ask the doc?? - - nCurRedline = USHRT_MAX; - if(pDoc->GetRedlineTbl().Count()) - nCurRedline = 0; - - - pCurEndPosLst = 0; - nBkmkTabPos = -1; - pAktPageDesc = 0; - pAttrSet = 0; - pFlyFmt = 0; // kein FlyFrmFormat gesetzt - - pColTbl = new RTFColorTbl; - pNumRuleTbl = 0; - - BYTE nSz = (BYTE)Min( pDoc->GetSpzFrmFmts()->Count(), USHORT(255) ); - SwPosFlyFrms aFlyPos( nSz, nSz ); - - //Abkuerzung wenn nur Gliederung ausgegeben werden soll, und keine - //Gliederungsabsaetze ausserhalb des Body stehen. - if ( bOutOutlineOnly && - pDoc->GetNodes().GetOutLineNds().Count() && - pDoc->GetNodes().GetOutLineNds()[0]->GetIndex() > - pDoc->GetNodes().GetEndOfExtras().GetIndex() ) - { - nAktFlyPos = 0; - pFlyPos = 0; - MakeHeader(); - - const SwOutlineNodes &rOutLine = pDoc->GetNodes().GetOutLineNds(); - for ( USHORT i = 0; i < rOutLine.Count(); ++i ) - { - const SwNode *pNd = pDoc->GetNodes()[*rOutLine[i]]; - ASSERT( pNd->IsCntntNode(), "Outlinenode and no CntNode!?" ); - - SwCntntNode* pCNd = (SwCntntNode*)pNd; - - // erfrage den aktuellen PageDescriptor. - const SwPageDesc* pTmp = pCNd->GetSwAttrSet().GetPageDesc().GetPageDesc(); - if( pTmp ) - pAktPageDesc = pTmp; - pCurPam->GetPoint()->nContent.Assign( pCNd, 0 ); - Out( aRTFNodeFnTab, *pCNd, *this ); - } - } - else - { - long nMaxNode = pDoc->GetNodes().Count(); - - if( bShowProgress ) - ::StartProgress( STR_STATSTR_W4WWRITE, 0, nMaxNode, pDoc->GetDocShell() ); - - // Tabelle am Doc.-Anfang beachten - { - SwTableNode * pTNd = pCurPam->GetNode()->FindTableNode(); - if( pTNd && bWriteAll ) - { - // mit dem TabellenNode anfangen !! - pCurPam->GetPoint()->nNode = *pTNd; - - if( bWriteOnlyFirstTable ) - pCurPam->GetMark()->nNode = *pTNd->EndOfSectionNode(); - } - } - - // Tabelle fuer die freifliegenden Rahmen erzeugen, aber nur wenn - // das gesamte Dokument geschrieben wird - nAktFlyPos = 0; - pDoc->GetAllFlyFmts( aFlyPos, bWriteAll ? 0 : pOrigPam ); - - // sollten nur Rahmen vorhanden sein? - // (Moeglich, wenn eine Rahmen-Selektion ins Clipboard - // gestellt wurde) - if( bWriteAll && - // keine Laenge - *pCurPam->GetPoint() == *pCurPam->GetMark() && - // Rahmen vorhanden - pDoc->GetSpzFrmFmts()->Count() && !aFlyPos.Count() && - // nur ein Node im Array - pDoc->GetNodes().GetEndOfExtras().GetIndex() + 3 == - pDoc->GetNodes().GetEndOfContent().GetIndex() && - // und genau der ist selektiert - pDoc->GetNodes().GetEndOfContent().GetIndex() - 1 == - pCurPam->GetPoint()->nNode.GetIndex() ) - { - // dann den Inhalt vom Rahmen ausgeben. - // dieser steht immer an Position 0 !! - SwFrmFmt* pFmt = (*pDoc->GetSpzFrmFmts())[ 0 ]; - const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx(); - if( pIdx ) - { - SwPosFlyFrm* pFPos = new SwPosFlyFrm( pCurPam->GetPoint()->nNode, - pFmt, aFlyPos.Count() ); - aFlyPos.Insert( pFPos ); - } - } - - pFlyPos = &aFlyPos; - - // schreibe die StyleTabelle, allgemeine Angaben,Header/Footer/Footnotes - MakeHeader(); - - Out_SwDoc( pOrigPam ); - - if( bShowProgress ) - ::EndProgress( pDoc->GetDocShell() ); - } - - Strm() << '}'; - - // loesche die Tabelle mit den freifliegenden Rahmen - for( USHORT i = aFlyPos.Count(); i > 0; ) - delete aFlyPos[ --i ]; - - pFlyPos = 0; - delete pColTbl; - if( pNumRuleTbl ) - { - // don't destroy the numrule pointers in the DTOR. - pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() ); - delete pNumRuleTbl; - } - delete pRedlAuthors; - - // schreibe Win-RTF-HelpFileFmt - bOutOutlineOnly = bWriteHelpFmt = FALSE; - pAttrSet = 0; - - return 0; -} - - -void SwRTFWriter::Out_SwDoc( SwPaM* pPam ) -{ - BOOL bSaveWriteAll = bWriteAll; // sichern - // suche die naechste Bookmark-Position aus der Bookmark-Tabelle - nBkmkTabPos = bWriteAll ? FindPos_Bkmk( *pCurPam->GetPoint() ) : -1; - - // gebe alle Bereiche des Pams in das RTF-File aus. - do { - bWriteAll = bSaveWriteAll; - bFirstLine = TRUE; - - // suche den ersten am Pam-auszugebenen FlyFrame - // fehlt noch: - - while( pCurPam->GetPoint()->nNode < pCurPam->GetMark()->nNode || - (pCurPam->GetPoint()->nNode == pCurPam->GetMark()->nNode && - pCurPam->GetPoint()->nContent.GetIndex() <= pCurPam->GetMark()->nContent.GetIndex()) ) - { - SwNode& rNd = pCurPam->GetPoint()->nNode.GetNode(); - - if( &rNd == &pDoc->GetNodes().GetEndOfContent() ) - break; - - if( rNd.IsCntntNode() ) - { - SwCntntNode& rCNd = (SwCntntNode&)rNd; - - OutBreaks( rCNd.GetSwAttrSet() ); - OutFlyFrm(); - - if( !bFirstLine ) - pCurPam->GetPoint()->nContent.Assign( &rCNd, 0 ); - - if( !bOutOutlineOnly || - //( rCNd.IsTxtNode() && NO_NUMBERING != //#outline level,removed by zhaojianwei - //((SwTxtNode&)rCNd).GetTxtColl()->GetOutlineLevel() )) - ( rCNd.IsTxtNode() && //->add by zhaojianwei - ((SwTxtNode&)rCNd).GetTxtColl()->IsAssignedToListLevelOfOutlineStyle()))//<-end,zhaojianwei - Out( aRTFNodeFnTab, rCNd, *this ); - - } - else if( !bOutOutlineOnly ) - { - if (rNd.IsTableNode()) - { - bool bAllOk = false; - if (const SwTableNode *pNd = rNd.GetTableNode()) - { - if (const SwFrmFmt *pFmt = pNd->GetTable().GetFrmFmt()) - { - OutBreaks(pFmt->GetAttrSet()); - bAllOk = true; - } - OutRTF_SwTblNode(*this, *pNd); - } - ASSERT(bAllOk, "Unexpected missing properties from tables"); - } - else if( rNd.IsSectionNode() ) - { - OutBreaks( ((SwSectionNode&)rNd).GetSection().GetFmt() - ->GetAttrSet() ); - OutRTF_SwSectionNode( *this, (SwSectionNode&)rNd ); - } - else if( rNd.IsEndNode() ) - CheckEndNodeForSection( rNd ); - } - - ULONG nPos = pCurPam->GetPoint()->nNode++; // Bewegen - - if( bShowProgress ) - ::SetProgressState( nPos, pDoc->GetDocShell() ); // Wie weit ? - - /* sollen nur die Selectierten Bereiche gesichert werden, so - * duerfen nur die vollstaendigen Nodes gespeichert werde, - * d.H. der 1. und n. Node teilweise, der 2. bis n-1. Node - * vollstaendig. (vollstaendig heisst mit allen Formaten! ) - */ - bWriteAll = bSaveWriteAll || - pCurPam->GetPoint()->nNode != pCurPam->GetMark()->nNode; - bFirstLine = FALSE; - } - } while( CopyNextPam( &pPam ) ); // bis alle PaM's bearbeitet - - bWriteAll = bSaveWriteAll; // wieder auf alten Wert zurueck -} - - -// schreibe die StyleTabelle, algemeine Angaben,Header/Footer/Footnotes - - -void SwRTFWriter::MakeHeader() -{ - // baue den Vorspann wie Header, ColorTbl, FontTbl - Strm() << '{' << OOO_STRING_SVTOOLS_RTF_RTF << '1' - << OOO_STRING_SVTOOLS_RTF_ANSI; - if( bWriteAll ) - { - Strm() << OOO_STRING_SVTOOLS_RTF_DEFF; - OutULong( GetId( (SvxFontItem&)pDoc->GetAttrPool().GetDefaultItem( - RES_CHRATR_FONT ) )); - } - // JP 13.02.2001 - if this not exist, MS don't understand our ansi - // characters (0x80-0xff). - Strm() << "\\adeflang1025"; - - OutRTFFontTab(); - OutRTFColorTab(); - OutRTFStyleTab(); - OutRTFListTab(); - OutRTFRevTab(); - - Strm() << SwRTFWriter::sNewLine; // ein Trenner - - // wenn teilweise ausgegeben wird, die globalen Daten nicht speichern - if( !bWriteAll ) - return; - - // Ausgeben der Doc-Info/-Statistik - OutDocInfoStat(); - - // einige globale Daten Schreiben - { // Default-TabSize - const SvxTabStopItem& rTabs = (const SvxTabStopItem&) - pDoc->GetAttrPool().GetDefaultItem( RES_PARATR_TABSTOP ); - Strm() << OOO_STRING_SVTOOLS_RTF_DEFTAB; - OutLong( rTabs[0].GetTabPos() ); - if ( !pDoc->get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE) ) - Strm() << OOO_STRING_SVTOOLS_RTF_LYTPRTMET; - } - - // PageDescriptor ausgeben (??nur wenn das gesamte Dokument??) - OutPageDesc(); - - // gebe die Groesse und die Raender der Seite aus - if( pDoc->GetPageDescCnt() ) - { - //JP 06.04.99: Bug 64361 - suche den ersten SwFmtPageDesc. Ist - // keiner gesetzt, so ist der Standard gueltig - const SwFmtPageDesc* pSttPgDsc = 0; - { - const SwNode& rSttNd = *pDoc->GetNodes()[ - pDoc->GetNodes().GetEndOfExtras().GetIndex() + 2 ]; - const SfxItemSet* pSet = 0; - - if( rSttNd.IsCntntNode() ) - pSet = &rSttNd.GetCntntNode()->GetSwAttrSet(); - else if( rSttNd.IsTableNode() ) - pSet = &rSttNd.GetTableNode()->GetTable(). - GetFrmFmt()->GetAttrSet(); - else if( rSttNd.IsSectionNode() ) - pSet = &rSttNd.GetSectionNode()->GetSection(). - GetFmt()->GetAttrSet(); - - if( pSet ) - { - USHORT nPosInDoc; - pSttPgDsc = (SwFmtPageDesc*)&pSet->Get( RES_PAGEDESC ); - if( !pSttPgDsc->GetPageDesc() ) - pSttPgDsc = 0; - else if( pDoc->FindPageDescByName( pSttPgDsc-> - GetPageDesc()->GetName(), &nPosInDoc )) - { - // FALSE wegen schliessender Klammer !! - OutComment( *this, OOO_STRING_SVTOOLS_RTF_PGDSCNO, FALSE ); - OutULong( nPosInDoc ) << '}'; - } - } - } - const SwPageDesc& rPageDesc = pSttPgDsc ? *pSttPgDsc->GetPageDesc() - : const_cast(pDoc)->GetPageDesc( 0 ); - const SwFrmFmt &rFmtPage = rPageDesc.GetMaster(); - - { - if( rPageDesc.GetLandscape() ) - Strm() << OOO_STRING_SVTOOLS_RTF_LANDSCAPE; - - const SwFmtFrmSize& rSz = rFmtPage.GetFrmSize(); - // Clipboard-Dokument wird immer ohne Drucker angelegt, so ist - // der Std.PageDesc immer aug LONG_MAX !! Mappe dann auf DIN A4 - if( LONG_MAX == rSz.GetHeight() || LONG_MAX == rSz.GetWidth() ) - { - Strm() << OOO_STRING_SVTOOLS_RTF_PAPERH; - Size a4 = SvxPaperInfo::GetPaperSize(PAPER_A4); - OutULong( a4.Height() ) << OOO_STRING_SVTOOLS_RTF_PAPERW; - OutULong( a4.Width() ); - } - else - { - Strm() << OOO_STRING_SVTOOLS_RTF_PAPERH; - OutULong( rSz.GetHeight() ) << OOO_STRING_SVTOOLS_RTF_PAPERW; - OutULong( rSz.GetWidth() ); - } - } - - { - const SvxLRSpaceItem& rLR = rFmtPage.GetLRSpace(); - Strm() << OOO_STRING_SVTOOLS_RTF_MARGL; - OutLong( rLR.GetLeft() ) << OOO_STRING_SVTOOLS_RTF_MARGR; - OutLong( rLR.GetRight() ); - } - - { - const SvxULSpaceItem& rUL = rFmtPage.GetULSpace(); - Strm() << OOO_STRING_SVTOOLS_RTF_MARGT; - OutLong( rUL.GetUpper() ) << OOO_STRING_SVTOOLS_RTF_MARGB; - OutLong( rUL.GetLower() ); - } - - Strm() << OOO_STRING_SVTOOLS_RTF_SECTD << OOO_STRING_SVTOOLS_RTF_SBKNONE; - OutRTFPageDescription( rPageDesc, FALSE, TRUE ); // Changed bCheckForFirstPage to TRUE so headers - // following title page are correctly added - i13107 - if( pSttPgDsc ) - { - bIgnoreNextPgBreak = TRUE; - pAktPageDesc = &rPageDesc; - } - } - - - { - // schreibe die Fussnoten- und Endnoten-Info raus - const SwFtnInfo& rFtnInfo = pDoc->GetFtnInfo(); - - const char* pOut = FTNPOS_CHAPTER == rFtnInfo.ePos - ? OOO_STRING_SVTOOLS_RTF_ENDDOC - : OOO_STRING_SVTOOLS_RTF_FTNBJ; - Strm() << pOut << OOO_STRING_SVTOOLS_RTF_FTNSTART; - OutLong( rFtnInfo.nFtnOffset + 1 ); - - switch( rFtnInfo.eNum ) - { - case FTNNUM_PAGE: pOut = OOO_STRING_SVTOOLS_RTF_FTNRSTPG; break; - case FTNNUM_DOC: pOut = OOO_STRING_SVTOOLS_RTF_FTNRSTCONT; break; -// case FTNNUM_CHAPTER: - default: pOut = OOO_STRING_SVTOOLS_RTF_FTNRESTART; break; - } - Strm() << pOut; - - switch( rFtnInfo.aFmt.GetNumberingType() ) - { - case SVX_NUM_CHARS_LOWER_LETTER: - case SVX_NUM_CHARS_LOWER_LETTER_N: pOut = OOO_STRING_SVTOOLS_RTF_FTNNALC; break; - case SVX_NUM_CHARS_UPPER_LETTER: - case SVX_NUM_CHARS_UPPER_LETTER_N: pOut = OOO_STRING_SVTOOLS_RTF_FTNNAUC; break; - case SVX_NUM_ROMAN_LOWER: pOut = OOO_STRING_SVTOOLS_RTF_FTNNRLC; break; - case SVX_NUM_ROMAN_UPPER: pOut = OOO_STRING_SVTOOLS_RTF_FTNNRUC; break; - case SVX_NUM_CHAR_SPECIAL: pOut = OOO_STRING_SVTOOLS_RTF_FTNNCHI; break; -// case SVX_NUM_ARABIC: - default: pOut = OOO_STRING_SVTOOLS_RTF_FTNNAR; break; - } - Strm() << pOut; - - - const SwEndNoteInfo& rEndNoteInfo = pDoc->GetEndNoteInfo(); - - Strm() << OOO_STRING_SVTOOLS_RTF_AENDDOC << OOO_STRING_SVTOOLS_RTF_AFTNRSTCONT - << OOO_STRING_SVTOOLS_RTF_AFTNSTART; - OutLong( rEndNoteInfo.nFtnOffset + 1 ); - - switch( rEndNoteInfo.aFmt.GetNumberingType() ) - { - case SVX_NUM_CHARS_LOWER_LETTER: - case SVX_NUM_CHARS_LOWER_LETTER_N: pOut = OOO_STRING_SVTOOLS_RTF_AFTNNALC; break; - case SVX_NUM_CHARS_UPPER_LETTER: - case SVX_NUM_CHARS_UPPER_LETTER_N: pOut = OOO_STRING_SVTOOLS_RTF_AFTNNAUC; break; - case SVX_NUM_ROMAN_LOWER: pOut = OOO_STRING_SVTOOLS_RTF_AFTNNRLC; break; - case SVX_NUM_ROMAN_UPPER: pOut = OOO_STRING_SVTOOLS_RTF_AFTNNRUC; break; - case SVX_NUM_CHAR_SPECIAL: pOut = OOO_STRING_SVTOOLS_RTF_AFTNNCHI; break; -// case SVX_NUM_ARABIC: - default: pOut = OOO_STRING_SVTOOLS_RTF_AFTNNAR; break; - } - Strm() << pOut; - } - - if( pDoc->_GetDBDesc().sDataSource.getLength() ) - { - // stelle erstmal fest, ob ueberhaupt Datenbankfelder benutzt werden! - const SwFldTypes* pTypes = pDoc->GetFldTypes(); - for( USHORT nCnt = pTypes->Count(); nCnt >= INIT_FLDTYPES; ) - if( RES_DBFLD == (*pTypes)[ --nCnt ]->Which() && - (*pTypes)[ nCnt ]->GetDepends() ) - { - Strm() << '{' << OOO_STRING_SVTOOLS_RTF_FIELD; - OutComment( *this, OOO_STRING_SVTOOLS_RTF_FLDINST ) << " DATA "; - SwDBData aData = pDoc->GetDBData(); - String sOut(aData.sDataSource); - sOut += DB_DELIM; - sOut += (String)aData.sCommand; - RTFOutFuncs::Out_String( Strm(), sOut, - eDefaultEncoding, bWriteHelpFmt ); - Strm() << "}{" << OOO_STRING_SVTOOLS_RTF_FLDRSLT << " }}"; - break; - } - } - - pAttrSet = 0; - - Strm() << SwRTFWriter::sNewLine; // ein Trenner -} - -void SwRTFWriter::OutInfoDateTime( const sal_Char* i_pStr, - const util::DateTime& i_rDT ) -{ - Strm() << '{' << i_pStr << OOO_STRING_SVTOOLS_RTF_YR; - OutLong( Strm(), i_rDT.Year ) << OOO_STRING_SVTOOLS_RTF_MO; - OutLong( Strm(), i_rDT.Month ) << OOO_STRING_SVTOOLS_RTF_DY; - OutLong( Strm(), i_rDT.Day ) << OOO_STRING_SVTOOLS_RTF_HR; - OutLong( Strm(), i_rDT.Hours ) << OOO_STRING_SVTOOLS_RTF_MIN; - OutLong( Strm(), i_rDT.Minutes ) << '}'; -} - -bool CharsetSufficient(const String &rString, rtl_TextEncoding eChrSet) -{ - const sal_uInt32 nFlags = - RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR | - RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR; - rtl::OString sDummy; - rtl::OUString sStr(rString); - return sStr.convertToString(&sDummy, eChrSet, nFlags); -} - -void SwRTFWriter::OutUnicodeSafeRecord(const sal_Char *pToken, - const String &rContent) -{ - if (rContent.Len()) - { - bool bNeedUnicodeWrapper = !CharsetSufficient(rContent, eDefaultEncoding); - - if (bNeedUnicodeWrapper) - Strm() << '{' << OOO_STRING_SVTOOLS_RTF_UPR; - - Strm() << '{' << pToken << ' '; - OutRTF_AsByteString(*this, rContent, eDefaultEncoding); - Strm() << '}'; - - if (bNeedUnicodeWrapper) - { - OutComment(*this, OOO_STRING_SVTOOLS_RTF_UD); - Strm() << '{' << pToken << ' '; - RTFOutFuncs::Out_String(Strm(), rContent, eDefaultEncoding, - bWriteHelpFmt); - Strm() << "}}}"; - } - - } -} - -void SwRTFWriter::OutDocInfoStat() -{ - Strm() << '{' << OOO_STRING_SVTOOLS_RTF_INFO; - - SwDocShell *pDocShell(pDoc->GetDocShell()); - uno::Reference xDocProps; - if (pDocShell) { - uno::Reference xDPS( - pDocShell->GetModel(), uno::UNO_QUERY_THROW); - xDocProps.set(xDPS->getDocumentProperties()); - } - - // may be null (in case of copying) - if (xDocProps.is()) - { - OutUnicodeSafeRecord(OOO_STRING_SVTOOLS_RTF_TITLE, xDocProps->getTitle()); - OutUnicodeSafeRecord(OOO_STRING_SVTOOLS_RTF_SUBJECT, xDocProps->getSubject()); - - OutUnicodeSafeRecord(OOO_STRING_SVTOOLS_RTF_KEYWORDS, - ::comphelper::string::convertCommaSeparated(xDocProps->getKeywords())); - OutUnicodeSafeRecord(OOO_STRING_SVTOOLS_RTF_DOCCOMM, xDocProps->getDescription()); - - OutUnicodeSafeRecord(OOO_STRING_SVTOOLS_RTF_AUTHOR, xDocProps->getAuthor() ); - OutInfoDateTime(OOO_STRING_SVTOOLS_RTF_CREATIM, xDocProps->getCreationDate()); - - OutUnicodeSafeRecord(OOO_STRING_SVTOOLS_RTF_AUTHOR, xDocProps->getModifiedBy() ); - OutInfoDateTime(OOO_STRING_SVTOOLS_RTF_REVTIM, xDocProps->getModificationDate()); - - OutInfoDateTime(OOO_STRING_SVTOOLS_RTF_PRINTIM, xDocProps->getPrintDate()); - - } - - // fuer interne Zwecke - Versionsnummer rausschreiben - Strm() << '{' << OOO_STRING_SVTOOLS_RTF_COMMENT << " StarWriter}{" << OOO_STRING_SVTOOLS_RTF_VERN; - OutLong( Strm(), SUPD*10 ) << '}'; - - Strm() << '}'; -} - -static void InsColor( RTFColorTbl& rTbl, const Color& rCol ) -{ - USHORT n; - for( n = 0; n < rTbl.Count(); ++n ) - if( rTbl[n] == rCol ) - return; // schon vorhanden, zurueck - - n = COL_AUTO == rCol.GetColor() ? 0 : rTbl.Count(); - rTbl.Insert( rCol, n ); -} - -static void InsColorLine( RTFColorTbl& rTbl, const SvxBoxItem& rBox ) -{ - const SvxBorderLine* pLine = 0; - - if( rBox.GetTop() ) - InsColor( rTbl, (pLine = rBox.GetTop())->GetColor() ); - if( rBox.GetBottom() && pLine != rBox.GetBottom() ) - InsColor( rTbl, (pLine = rBox.GetBottom())->GetColor() ); - if( rBox.GetLeft() && pLine != rBox.GetLeft() ) - InsColor( rTbl, (pLine = rBox.GetLeft())->GetColor() ); - if( rBox.GetRight() && pLine != rBox.GetRight() ) - InsColor( rTbl, rBox.GetRight()->GetColor() ); -} - -void SwRTFWriter::OutRTFColorTab() -{ - ASSERT( pColTbl, "Wo ist meine Color-Tabelle?" ); - - // dann baue die ColorTabelle aus allen Attributen, die Colors - // enthalten und im Pool angemeldet sind auf. - USHORT n, nMaxItem; - const SfxItemPool& rPool = pDoc->GetAttrPool(); - - // das Charakter - Color Attribut - { - const SvxColorItem* pCol = (const SvxColorItem*)GetDfltAttr( - RES_CHRATR_COLOR ); - InsColor( *pColTbl, pCol->GetValue() ); - if( 0 != ( pCol = (const SvxColorItem*)rPool.GetPoolDefaultItem( - RES_CHRATR_COLOR ) )) - InsColor( *pColTbl, pCol->GetValue() ); - nMaxItem = rPool.GetItemCount(RES_CHRATR_COLOR); - for( n = 0; n < nMaxItem; ++n ) - { - if( 0 != (pCol = (const SvxColorItem*)rPool.GetItem( - RES_CHRATR_COLOR, n ) ) ) - InsColor( *pColTbl, pCol->GetValue() ); - } - - const SvxUnderlineItem* pUnder = (const SvxUnderlineItem*)GetDfltAttr( RES_CHRATR_UNDERLINE ); - InsColor( *pColTbl, pUnder->GetColor() ); - nMaxItem = rPool.GetItemCount(RES_CHRATR_UNDERLINE); - for( n = 0; n < nMaxItem;n++) - { - if( 0 != (pUnder = (const SvxUnderlineItem*)rPool.GetItem( RES_CHRATR_UNDERLINE, n ) ) ) - InsColor( *pColTbl, pUnder->GetColor() ); - - } - - const SvxOverlineItem* pOver = (const SvxOverlineItem*)GetDfltAttr( RES_CHRATR_OVERLINE ); - InsColor( *pColTbl, pOver->GetColor() ); - nMaxItem = rPool.GetItemCount(RES_CHRATR_OVERLINE); - for( n = 0; n < nMaxItem;n++) - { - if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem( RES_CHRATR_OVERLINE, n ) ) ) - InsColor( *pColTbl, pOver->GetColor() ); - - } - - } - - // das Frame Hintergrund - Attribut - static const USHORT aBrushIds[] = { - RES_BACKGROUND, RES_CHRATR_BACKGROUND, 0 }; - - for( const USHORT* pIds = aBrushIds; *pIds; ++pIds ) - { - const SvxBrushItem* pBkgrd = (const SvxBrushItem*)GetDfltAttr( *pIds ); - InsColor( *pColTbl, pBkgrd->GetColor() ); - if( 0 != ( pBkgrd = (const SvxBrushItem*)rPool.GetPoolDefaultItem( - *pIds ) )) - { - InsColor( *pColTbl, pBkgrd->GetColor() ); - } - nMaxItem = rPool.GetItemCount( *pIds ); - for( n = 0; n < nMaxItem; ++n ) - if( 0 != (pBkgrd = (const SvxBrushItem*)rPool.GetItem( - *pIds , n ) )) - { - InsColor( *pColTbl, pBkgrd->GetColor() ); - } - } - - // das Frame Schatten - Attribut - { - const SvxShadowItem* pShadow = (const SvxShadowItem*)GetDfltAttr( - RES_SHADOW ); - InsColor( *pColTbl, pShadow->GetColor() ); - if( 0 != ( pShadow = (const SvxShadowItem*)rPool.GetPoolDefaultItem( - RES_SHADOW ) )) - { - InsColor( *pColTbl, pShadow->GetColor() ); - } - nMaxItem = rPool.GetItemCount(RES_SHADOW); - for( n = 0; n < nMaxItem; ++n ) - if( 0 != (pShadow = (const SvxShadowItem*)rPool.GetItem( - RES_SHADOW, n ) ) ) - { - InsColor( *pColTbl, pShadow->GetColor() ); - } - } - - // das Frame Umrandungs - Attribut - { - // Box muesste noch gemacht werden, aber default nie eine Line gesetzt! - const SvxBoxItem* pBox; - if( 0 != ( pBox = (const SvxBoxItem*)rPool.GetPoolDefaultItem( - RES_BOX ) )) - InsColorLine( *pColTbl, *pBox ); - nMaxItem = rPool.GetItemCount(RES_BOX); - for( n = 0; n < nMaxItem; ++n ) - if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem( RES_BOX, n ) )) - InsColorLine( *pColTbl, *pBox ); - } - - // und raus damit - Strm() << SwRTFWriter::sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_COLORTBL; - - for( n = 0; n < pColTbl->Count(); n++ ) - { - const Color& rCol = (*pColTbl)[ n ]; - if( n || COL_AUTO != rCol.GetColor() ) - { - Strm() << OOO_STRING_SVTOOLS_RTF_RED; - OutULong( rCol.GetRed() ) << OOO_STRING_SVTOOLS_RTF_GREEN; - OutULong( rCol.GetGreen() ) << OOO_STRING_SVTOOLS_RTF_BLUE; - OutULong( rCol.GetBlue() ); - } - Strm() << ';'; - } - Strm() << '}'; -} - -bool FontCharsetSufficient(const String &rFntNm, const String &rAltNm, - rtl_TextEncoding eChrSet) -{ - bool bRet = CharsetSufficient(rFntNm, eChrSet); - if (bRet) - bRet = CharsetSufficient(rAltNm, eChrSet); - return bRet; -} - -static void _OutFont( SwRTFWriter& rWrt, const SvxFontItem& rFont, USHORT nNo ) -{ - rWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_F; - - const char* pStr = OOO_STRING_SVTOOLS_RTF_FNIL; - switch (rFont.GetFamily()) - { - case FAMILY_ROMAN: - pStr = OOO_STRING_SVTOOLS_RTF_FROMAN; - break; - case FAMILY_SWISS: - pStr = OOO_STRING_SVTOOLS_RTF_FSWISS; - break; - case FAMILY_MODERN: - pStr = OOO_STRING_SVTOOLS_RTF_FMODERN; - break; - case FAMILY_SCRIPT: - pStr = OOO_STRING_SVTOOLS_RTF_FSCRIPT; - break; - case FAMILY_DECORATIVE: - pStr = OOO_STRING_SVTOOLS_RTF_FDECOR; - break; - default: - break; - } - rWrt.OutULong(nNo) << pStr << OOO_STRING_SVTOOLS_RTF_FPRQ; - - USHORT nVal = 0; - switch (rFont.GetPitch()) - { - case PITCH_FIXED: - nVal = 1; - break; - case PITCH_VARIABLE: - nVal = 2; - break; - default: - nVal = 0; - break; - } - rWrt.OutULong(nVal); - - sw::util::FontMapExport aRes(rFont.GetFamilyName()); - - /* - #i10538# - In rtf the fontname is in the fontcharset, so if that isn't possible - then bump the charset up to unicode - */ - sal_uInt8 nChSet = 0; - rtl_TextEncoding eChrSet = rFont.GetCharSet(); - nChSet = sw::ms::rtl_TextEncodingToWinCharset(eChrSet); - eChrSet = rtl_getTextEncodingFromWindowsCharset(nChSet); - if (!FontCharsetSufficient(aRes.msPrimary, aRes.msSecondary, eChrSet)) - { - eChrSet = RTL_TEXTENCODING_UNICODE; - nChSet = sw::ms::rtl_TextEncodingToWinCharset(eChrSet); - eChrSet = rtl_getTextEncodingFromWindowsCharset(nChSet); - } - - rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FCHARSET; - rWrt.OutULong( nChSet ); - rWrt.Strm() << ' '; - if (aRes.HasDistinctSecondary()) - { - RTFOutFuncs::Out_Fontname(rWrt.Strm(), aRes.msPrimary, eChrSet, - rWrt.bWriteHelpFmt); - OutComment(rWrt, OOO_STRING_SVTOOLS_RTF_FALT) << ' '; - RTFOutFuncs::Out_Fontname(rWrt.Strm(), aRes.msSecondary, eChrSet, - rWrt.bWriteHelpFmt) << '}'; - } - else - { - RTFOutFuncs::Out_Fontname(rWrt.Strm(), aRes.msPrimary, eChrSet, - rWrt.bWriteHelpFmt); - } - rWrt.Strm() << ";}"; -} - -void SwRTFWriter::OutRTFFontTab() -{ - USHORT n = 0; - const SfxItemPool& rPool = pDoc->GetAttrPool(); - const SvxFontItem* pFont = (const SvxFontItem*)GetDfltAttr(RES_CHRATR_FONT); - - Strm() << SwRTFWriter::sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_FONTTBL; - _OutFont( *this, *pFont, n++ ); - - pFont = (const SvxFontItem*)rPool.GetPoolDefaultItem(RES_CHRATR_FONT); - if (pFont) - _OutFont(*this, *pFont, n++); - - PutNumFmtFontsInAttrPool(); - PutCJKandCTLFontsInAttrPool(); - - USHORT nMaxItem = rPool.GetItemCount(RES_CHRATR_FONT); - for (USHORT nGet = 0; nGet < nMaxItem; ++nGet) - { - pFont = (const SvxFontItem*)rPool.GetItem(RES_CHRATR_FONT, nGet); - if (pFont) - _OutFont(*this, *pFont, n++); - } - - Strm() << '}'; -} - -void RTF_WrtRedlineAuthor::Write(Writer &rWrt) -{ - SwRTFWriter & rRTFWrt = (SwRTFWriter&)rWrt; - - rRTFWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_REVTBL << ' '; - typedef std::vector::iterator myiter; - - for(std::vector::iterator aIter = maAuthors.begin(); aIter != maAuthors.end(); ++aIter) - { - rRTFWrt.Strm() << '{'; - // rWrt.bWriteHelpFmt - RTFOutFuncs::Out_String( rRTFWrt.Strm(), *aIter, rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ) << ";}"; - } - rRTFWrt.Strm() << '}' << SwRTFWriter::sNewLine; -} - -bool SwRTFWriter::OutRTFRevTab() -{ - // Writes the revision author table - int nRevAuthors = pDoc->GetRedlineTbl().Count(); - - pRedlAuthors = new RTF_WrtRedlineAuthor; - // RTF always seems to use Unknown as the default first entry - String sUnknown(RTL_CONSTASCII_STRINGPARAM("Unknown")); - pRedlAuthors->AddName(sUnknown); - - if (nRevAuthors < 1) - return false; - - // pull out all the redlines and make a vector of all the author names - for( USHORT i = 0; i < pDoc->GetRedlineTbl().Count(); ++i ) - { - const SwRedline* pRedl = pDoc->GetRedlineTbl()[ i ]; - const String sAuthor = SW_MOD()->GetRedlineAuthor( pRedl->GetAuthor() ); - pRedlAuthors->AddName(sAuthor); - } - - pRedlAuthors->Write(*this); - return true; -} - -//Takashi Ono for CJK -const rtl::OUString SwRTFWriter::XlateFmtName( const rtl::OUString &rName, SwGetPoolIdFromName eFlags ) -{ -#define RES_NONE RES_POOLCOLL_DOC_END - - static const RES_POOL_COLLFMT_TYPE aArr[]={ - RES_POOLCOLL_STANDARD, RES_POOLCOLL_HEADLINE1, RES_POOLCOLL_HEADLINE2, - RES_POOLCOLL_HEADLINE3, RES_POOLCOLL_HEADLINE4, RES_POOLCOLL_HEADLINE5, - RES_POOLCOLL_HEADLINE6, RES_POOLCOLL_HEADLINE7, RES_POOLCOLL_HEADLINE8, - RES_POOLCOLL_HEADLINE9, - - RES_POOLCOLL_TOX_IDX1, RES_POOLCOLL_TOX_IDX2, RES_POOLCOLL_TOX_IDX3, - RES_NONE, RES_NONE, RES_NONE, RES_NONE, RES_NONE, RES_NONE, - RES_POOLCOLL_TOX_CNTNT1, - - RES_POOLCOLL_TOX_CNTNT2, RES_POOLCOLL_TOX_CNTNT3, RES_POOLCOLL_TOX_CNTNT4, - RES_POOLCOLL_TOX_CNTNT5, RES_POOLCOLL_TOX_CNTNT6, RES_POOLCOLL_TOX_CNTNT7, - RES_POOLCOLL_TOX_CNTNT8, RES_POOLCOLL_TOX_CNTNT9, - RES_POOLCOLL_TEXT_IDENT, RES_POOLCOLL_FOOTNOTE, - - RES_NONE, RES_POOLCOLL_HEADER, RES_POOLCOLL_FOOTER, RES_POOLCOLL_TOX_IDXH, - RES_POOLCOLL_LABEL, RES_POOLCOLL_TOX_ILLUSH, RES_POOLCOLL_JAKETADRESS, RES_POOLCOLL_SENDADRESS, - RES_NONE, RES_NONE, - - RES_NONE, RES_NONE, RES_NONE, RES_POOLCOLL_ENDNOTE, RES_POOLCOLL_TOX_AUTHORITIESH, RES_NONE, RES_NONE, - RES_POOLCOLL_BUL_LEVEL1, RES_POOLCOLL_BUL_LEVEL1, RES_POOLCOLL_NUM_LEVEL1, - - RES_POOLCOLL_BUL_LEVEL2, RES_POOLCOLL_BUL_LEVEL3, RES_POOLCOLL_BUL_LEVEL4, RES_POOLCOLL_BUL_LEVEL5, - RES_POOLCOLL_BUL_LEVEL2, RES_POOLCOLL_BUL_LEVEL3, RES_POOLCOLL_BUL_LEVEL4, RES_POOLCOLL_BUL_LEVEL5, - RES_POOLCOLL_NUM_LEVEL2, RES_POOLCOLL_NUM_LEVEL3, RES_POOLCOLL_NUM_LEVEL4, RES_POOLCOLL_NUM_LEVEL5, - - RES_POOLCOLL_DOC_TITEL, RES_NONE, RES_POOLCOLL_SIGNATURE, RES_NONE, - RES_POOLCOLL_TEXT, RES_POOLCOLL_TEXT_MOVE, RES_NONE, RES_NONE, - - RES_NONE, RES_NONE, RES_NONE, RES_NONE, RES_POOLCOLL_DOC_SUBTITEL }; - - static const sal_Char *stiName[] = { - "Normal", "heading 1", "heading 2", - "heading 3", "heading 4", "heading 5", - "heading 6", "heading 7", "heading 8", - "heading 9", - - "index 1", "index 2", "index 3", - "index 4", "index 5", "index 6", - "index 7", "index 8", "index 9", - - "toc 1", "toc 2", "toc 3", - "toc 4", "toc 5", "toc 6", - "toc 7", "toc 8", "toc 9", - "Normal Indent", "footnote text", - - "annotation text", "header", "footer", "index heading", - "caption", "table of figures", "envelope address", "envelope return", - "footnote reference", "annotation reference", - - "line number", "page number", "endnote reference", "endnote text", "table of authorities", "macro", "toa heading", - "List", "List Bullet", "List Number", - - "List 2", "List 3", "List 4", "List 5", - "List Bullet 2", "List Bullet 3", "List Bullet 4", "List Bullet 5", - "List Number 2", "List Number 3", "List Number 4", "List Number 5", - - "Title", "Closing", "Signature", "Default Paragraph Font", - "Body Text", "Body Text Indent", "List Continue", - - "List Continue 2", "List Continue 3", "List Continue 4", "List Continue 5", "Message Header", "Subtitle"}; - - ASSERT( ( sizeof( aArr ) / sizeof( RES_POOL_COLLFMT_TYPE ) == 75 ), - "Style-UEbersetzungstabelle hat falsche Groesse" ); - ASSERT( ( sizeof( stiName ) / sizeof( *stiName ) == 75 ), - "Style-UEbersetzungstabelle hat falsche Groesse" ); - - sal_uInt16 idcol = ::SwStyleNameMapper::GetPoolIdFromUIName( rName, eFlags ); - if (idcol==USHRT_MAX) //#i40770# user defined style names get lost - return rName; - - for (size_t i = 0; i < sizeof( aArr ) / sizeof( *aArr ); i++) - { - if ( idcol == aArr[i] ) - { - return rtl::OUString::createFromAscii(stiName[i]); - } - } - return ::SwStyleNameMapper::GetProgName( idcol, String() ); -} - -void SwRTFWriter::OutRTFStyleTab() -{ - USHORT n; - - // das 0-Style ist das Default, wird nie ausgegeben !! - USHORT nArrLen = pDoc->GetTxtFmtColls()->Count(); - if( nArrLen <= 1 && pDoc->GetCharFmts()->Count() <= 1 ) - return; - - bOutStyleTab = TRUE; - Strm() << SwRTFWriter::sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_STYLESHEET; - - // das Default-TextStyle wird nicht mit ausgegeben !! - for( n = 1; n < nArrLen; ++n ) - { - const SwTxtFmtColl* pColl = (*pDoc->GetTxtFmtColls())[ n ]; - pAttrSet = &pColl->GetAttrSet(); - - Strm() << '{'; - // gebe Attribute aus - OutRTF_SwFmt( *this, *pColl ); - - if( pColl->DerivedFrom() ) - // suche die Id vom "Parent" Format - for( USHORT nBasedOn=1; nBasedOn < nArrLen; nBasedOn++) - if( (*pDoc->GetTxtFmtColls())[ nBasedOn ] == - pColl->DerivedFrom() ) - { - // die Ableitung vom Format - Strm() << OOO_STRING_SVTOOLS_RTF_SBASEDON; - OutULong( nBasedOn ); - break; - } - - if( pColl == &pColl->GetNextTxtFmtColl() ) - { - Strm() << OOO_STRING_SVTOOLS_RTF_SNEXT; - OutULong( n ); - } - else - // suche die Id vom "Naechsten" Format - for( USHORT nNext=1; nNext < nArrLen; nNext++) - if( (*pDoc->GetTxtFmtColls())[ nNext ] == - &pColl->GetNextTxtFmtColl() ) - { - // die Ableitung vom Format - Strm() << OOO_STRING_SVTOOLS_RTF_SNEXT; - OutULong( nNext ); - break; - } - - //if( NO_NUMBERING != pColl->GetOutlineLevel() )//#outline level,zhaojianwei - if(pColl->IsAssignedToListLevelOfOutlineStyle())//<-end,zhaojianwei - { - Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_SOUTLVL; - //OutULong( pColl->GetOutlineLevel() ) << '}';//#outline level,zhaojianwei - OutULong( pColl->GetAssignedOutlineStyleLevel() ) << '}';//<-end,zhaojianwei - } - - Strm() << ' '; - RTFOutFuncs::Out_String( Strm(), XlateFmtName( pColl->GetName(), nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ), eDefaultEncoding, - bWriteHelpFmt ) << ";}" << SwRTFWriter::sNewLine; - } - - USHORT nChrArrLen = pDoc->GetCharFmts()->Count(); - for( n = 1; n < nChrArrLen; ++n ) - { - const SwCharFmt* pFmt = (*pDoc->GetCharFmts())[ n ]; - pAttrSet = &pFmt->GetAttrSet(); - - Strm() << '{'; - // gebe Attribute aus - OutRTF_SwFmt( *this, *pFmt ); - - if( pFmt->DerivedFrom() ) - // suche die Id vom "Parent" Format - for( USHORT nBasedOn=1; nBasedOn < nChrArrLen; nBasedOn++) - if( (*pDoc->GetCharFmts())[ nBasedOn ] == - pFmt->DerivedFrom() ) - { - // die Ableitung vom Format - Strm() << OOO_STRING_SVTOOLS_RTF_SBASEDON; - OutULong( nArrLen + nBasedOn ); - break; - } - - Strm() << ' '; - RTFOutFuncs::Out_String( Strm(), XlateFmtName( pFmt->GetName(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ), eDefaultEncoding, - bWriteHelpFmt ) << ";}" << SwRTFWriter::sNewLine; - } - - Strm() << '}'; - bOutStyleTab = FALSE; -} - -bool ExportAsInline(const SwFlyFrmFmt& rFlyFrmFmt) -{ - //if not an inline element (hack in our limitations here as to only - //graphics like this!!!! - return rFlyFrmFmt.GetAnchor().GetAnchorId() == FLY_AS_CHAR; -} - -void SwRTFWriter::OutRTFFlyFrms(const SwFlyFrmFmt& rFlyFrmFmt) -{ - // ein FlyFrame wurde erkannt, gebe erstmal den aus - - // Hole vom Node und vom letzten Node die Position in der Section - const SwFmtCntnt& rFlyCntnt = rFlyFrmFmt.GetCntnt(); - - ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1; - ULONG nEnd = pDoc->GetNodes()[ nStt - 1 ]->EndOfSectionIndex(); - - if( nStt >= nEnd ) // kein Bereich, also kein gueltiger Node - return; - - if (!ExportAsInline(rFlyFrmFmt)) - Strm() << SwRTFWriter::sNewLine << OOO_STRING_SVTOOLS_RTF_PARD << OOO_STRING_SVTOOLS_RTF_PLAIN; - //If we are only exporting an inline graphic/object then we - //only need the its pFlyFmt for the duration of exporting it - //for floating objects its a little more complex at the moment - const SwFlyFrmFmt *pOldFlyFmt = pFlyFmt; - pFlyFmt = &rFlyFrmFmt; - - { - RTFSaveData aSaveData( *this, nStt, nEnd ); - Out_SwDoc( pCurPam ); - } - - if (!ExportAsInline(rFlyFrmFmt)) - Strm() << OOO_STRING_SVTOOLS_RTF_PARD << SwRTFWriter::sNewLine; -//#i46098#: else - pFlyFmt = pOldFlyFmt; -} - - - -void SwRTFWriter::OutRedline( xub_StrLen nCntntPos ) -{ - const SwRedline *pCurRedline = 0; - USHORT nCount = pDoc->GetRedlineTbl().Count(); - - if (nCurRedline < nCount) - { - pCurRedline = pDoc->GetRedlineTbl()[nCurRedline]; - if(pCurRedline) - { - const SwPosition* pStartPos = pCurRedline->Start(); - const SwPosition* pEndPos = pStartPos == pCurRedline->GetPoint() - ? pCurRedline->GetMark() - : pCurRedline->GetPoint(); - - USHORT nStart = pStartPos->nContent.GetIndex(); - USHORT nEnd = pEndPos->nContent.GetIndex(); - - ULONG nCurPam = pCurPam->GetPoint()->nNode.GetIndex(); - ULONG nStartIndex = pStartPos->nNode.GetIndex(); - ULONG nEndIndex = pEndPos->nNode.GetIndex(); - const String& rStr = pCurPam->GetNode()->GetTxtNode()->GetTxt(); - xub_StrLen nEnde = rStr.Len(); - - bool bSpanRedline = (nCurPam >= nStartIndex) && (nCurPam <= nEndIndex) && (nStartIndex != nEndIndex); - - if ((bSpanRedline && nCntntPos == 0) || - (nStartIndex == nCurPam && nStart == nCntntPos)) - { - // We are at the start of a redline just need to find out which type - Strm() << '{'; - if(pCurRedline->GetType() == nsRedlineType_t::REDLINE_INSERT) - { - Strm() << OOO_STRING_SVTOOLS_RTF_REVISED; - Strm() << OOO_STRING_SVTOOLS_RTF_REVAUTH; - String sName = SW_MOD()->GetRedlineAuthor(pCurRedline->GetAuthor()); - OutLong( pRedlAuthors->AddName(sName) ); - Strm() << OOO_STRING_SVTOOLS_RTF_REVDTTM; - OutLong( sw::ms::DateTime2DTTM(pCurRedline->GetTimeStamp()) ); - Strm() << ' '; - } - else if(pCurRedline->GetType() == nsRedlineType_t::REDLINE_DELETE) - { - Strm() << OOO_STRING_SVTOOLS_RTF_DELETED; - Strm() << OOO_STRING_SVTOOLS_RTF_REVAUTHDEL; - String sDelName = SW_MOD()->GetRedlineAuthor(pCurRedline->GetAuthor()); - OutLong( pRedlAuthors->AddName(sDelName) ); - Strm() << OOO_STRING_SVTOOLS_RTF_REVDTTMDEL; - OutLong( sw::ms::DateTime2DTTM(pCurRedline->GetTimeStamp()) ); - Strm() << ' '; - } - } - - // this is either then of the end of the node or the end of the redline - // time to close off this one - if( (bSpanRedline && nCntntPos == nEnde) || - (nEndIndex == nCurPam && nEnd == nCntntPos) ) - { - Strm() << '}'; - } - - // We have come to the end of a redline move to the next one - // and use resursion to see if another redline starts here - if (nEndIndex == nCurPam && nEnd == nCntntPos) - { - nCurRedline++; - OutRedline(nCntntPos); - } - } - } -} - -void SwRTFWriter::OutBookmarks( xub_StrLen nCntntPos) -{ - IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); - if (-1 == nBkmkTabPos) - return; - - const ::sw::mark::IMark* pBookmark = (pMarkAccess->getMarksBegin() + nBkmkTabPos)->get(); - if(!pBookmark) - return; - - const SwPosition* pStartPos = &pBookmark->GetMarkStart(); - const SwPosition* pEndPos = &pBookmark->GetMarkEnd(); - - ASSERT(pStartPos && pEndPos, "Impossible"); - if (!(pStartPos && pEndPos)) - return; - - if (pStartPos->nNode.GetIndex() == pCurPam->GetPoint()->nNode.GetIndex() && - pStartPos->nContent.GetIndex() == nCntntPos) - { - // zur Zeit umspannt das SwBookmark keinen Bereich also kann - // es hier vollstaendig ausgegeben werden. - - // erst die SWG spezifischen Daten: - const ::sw::mark::IBookmark* const pAsBookmark = dynamic_cast< const ::sw::mark::IBookmark* >(pBookmark); - if(pAsBookmark && (pAsBookmark->GetShortName().getLength() || pAsBookmark->GetKeyCode().GetCode())) - { - OutComment( *this, OOO_STRING_SVTOOLS_RTF_BKMKKEY ); - OutULong( ( pAsBookmark->GetKeyCode().GetCode() | - pAsBookmark->GetKeyCode().GetModifier() )); - if( !pAsBookmark->GetShortName().getLength() ) - Strm() << " " ; - else - { - Strm() << ' '; - OutRTF_AsByteString( *this, pAsBookmark->GetShortName(), eDefaultEncoding ); - } - Strm() << '}'; - } - OutComment( *this, OOO_STRING_SVTOOLS_RTF_BKMKSTART ) << ' '; - RTFOutFuncs::Out_String( Strm(), pBookmark->GetName(), - eDefaultEncoding, bWriteHelpFmt ) << '}'; - } - - if (pEndPos->nNode.GetIndex() == pCurPam->GetPoint()->nNode.GetIndex() && - pEndPos->nContent.GetIndex() == nCntntPos) - { - // zur Zeit umspannt das SwBookmark keinen Bereich also kann - // es hier vollstaendig ausgegeben werden. - - // erst die SWG spezifischen Daten: - const ::sw::mark::IBookmark* const pAsBookmark = dynamic_cast< const ::sw::mark::IBookmark* >(pBookmark); - if(pAsBookmark && (pAsBookmark->GetShortName().getLength() || pAsBookmark->GetKeyCode().GetCode())) - { - OutComment( *this, OOO_STRING_SVTOOLS_RTF_BKMKKEY ); - OutULong( ( pAsBookmark->GetKeyCode().GetCode() | - pAsBookmark->GetKeyCode().GetModifier() )); - if( !pAsBookmark->GetShortName().getLength() ) - Strm() << " " ; - else - { - Strm() << ' '; - OutRTF_AsByteString( *this, pAsBookmark->GetShortName(), eDefaultEncoding ); - } - Strm() << '}'; - } - OutComment( *this, OOO_STRING_SVTOOLS_RTF_BKMKEND ) << ' '; - - { - ::rtl::OUString aEmpty; - ::rtl::OUString & rBookmarkName = aEmpty; - - if (pAsBookmark) - rBookmarkName = pAsBookmark->GetName(); - - RTFOutFuncs::Out_String( Strm(), rBookmarkName, - eDefaultEncoding, bWriteHelpFmt ) << '}'; - } - - if(++nBkmkTabPos >= pMarkAccess->getMarksCount()) - nBkmkTabPos = -1; - else - pBookmark = (pMarkAccess->getMarksBegin() + nBkmkTabPos)->get(); - } -} - -void SwRTFWriter::OutFlyFrm() -{ - USHORT n; - - if( !pFlyPos ) - return; - - // gebe alle freifliegenden Rahmen die sich auf den akt. Absatz - // und evt. auf das aktuelle Zeichen beziehen, aus. - - // suche nach dem Anfang der FlyFrames - for( n = 0; n < pFlyPos->Count() && - (*pFlyPos)[n]->GetNdIndex().GetIndex() < - pCurPam->GetPoint()->nNode.GetIndex(); ++n ) - ; - if( n < pFlyPos->Count() ) - while( n < pFlyPos->Count() && - pCurPam->GetPoint()->nNode.GetIndex() == - (*pFlyPos)[n]->GetNdIndex().GetIndex() ) - { - // den Array-Iterator weiterschalten, damit nicht doppelt - // ausgegeben wird !! - OutRTFFlyFrms( (const SwFlyFrmFmt&)(*pFlyPos)[n++]->GetFmt() ); - } -} - - -USHORT SwRTFWriter::GetId( const Color& rColor ) const -{ - ASSERT( pColTbl, "Wo ist meine Color-Tabelle?" ); - for( USHORT n = 0; n < pColTbl->Count(); n++ ) - if( rColor == (*pColTbl)[ n ] ) - return n; - - ASSERT( FALSE, "Color nicht in der Tabelle" ); - return 0; -} - -USHORT SwRTFWriter::GetId( const SvxFontItem& rFont ) const -{ - const SfxItemPool& rPool = pDoc->GetAttrPool(); - const SvxFontItem* pFont = (const SvxFontItem*)GetDfltAttr( RES_CHRATR_FONT ); - if( rFont == *pFont ) - return 0; - - USHORT n = 1; - if( 0 != ( pFont = (const SvxFontItem*)rPool.GetPoolDefaultItem( - RES_CHRATR_FONT ))) - { - if( rFont == *pFont ) - return 1; - ++n; - } - - USHORT nMaxItem = rPool.GetItemCount( RES_CHRATR_FONT ); - for( USHORT nGet = 0; nGet < nMaxItem; ++nGet ) - if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem( - RES_CHRATR_FONT, nGet )) ) - { - if( rFont == *pFont ) - return n; - ++n; - } - - ASSERT( FALSE, "Font nicht in der Tabelle" ); - return 0; -} - -USHORT SwRTFWriter::GetId( const Font& rFont ) const -{ - return GetId( SvxFontItem( rFont.GetFamily(), rFont.GetName(), - rFont.GetStyleName(), rFont.GetPitch(), - rFont.GetCharSet(), - RES_CHRATR_FONT ) ); -} - -USHORT SwRTFWriter::GetId( const SwTxtFmtColl& rColl ) const -{ - // suche das angegebene Format - const SvPtrarr & rArr = *pDoc->GetTxtFmtColls(); - for( USHORT n = 0; n < rArr.Count(); n++ ) - if( (SwTxtFmtColl*)rArr[ n ] == &rColl ) - return n; - ASSERT( FALSE, "TextCollection nicht in der Tabelle" ); - return 0; -} - -USHORT SwRTFWriter::GetId( const SwCharFmt& rFmt ) const -{ - // suche das angegebene Format - const SvPtrarr & rArr = *pDoc->GetCharFmts(); - for( USHORT n = 0; n < rArr.Count(); n++ ) - if( (SwCharFmt*)rArr[ n ] == &rFmt ) - return n + pDoc->GetTxtFmtColls()->Count(); - ASSERT( FALSE, "CharDFFormat nicht in der Tabelle" ); - return 0; -} - -void SwRTFWriter::OutPageDesc() -{ - // Ausgabe der Page-Descriptoren - USHORT nSize = pDoc->GetPageDescCnt(); - if( !nSize ) - return; - - Strm() << SwRTFWriter::sNewLine; // ein Trenner - bOutPageDesc = bOutPageDescTbl = TRUE; - OutComment( *this, OOO_STRING_SVTOOLS_RTF_PGDSCTBL ); - for( USHORT n = 0; n < nSize; ++n ) - { - const SwPageDesc& rPageDesc = - const_cast(pDoc)->GetPageDesc( n ); - - Strm() << SwRTFWriter::sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_PGDSC; - OutULong( n ) << OOO_STRING_SVTOOLS_RTF_PGDSCUSE; - OutULong( rPageDesc.ReadUseOn() ); - - OutRTFPageDescription( rPageDesc, FALSE, FALSE ); - - // suche den Folge-PageDescriptor: - USHORT i = nSize; - while( i ) - if( rPageDesc.GetFollow() == - &const_cast(pDoc)->GetPageDesc( --i ) ) - break; - Strm() << OOO_STRING_SVTOOLS_RTF_PGDSCNXT; - OutULong( i ) << ' '; - RTFOutFuncs::Out_String( Strm(), XlateFmtName( rPageDesc.GetName(), nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC ), eDefaultEncoding, - bWriteHelpFmt ) << ";}"; - } - Strm() << '}' << SwRTFWriter::sNewLine; - bOutPageDesc = bOutPageDescTbl = FALSE; -} - -void SwRTFWriter::OutRTFBorder(const SvxBorderLine* aLine, const USHORT nSpace ) -{ - // M.M. This function writes out border lines in RTF similar to what - // WW8_BRC SwWW8Writer::TranslateBorderLine does in the winword filter - // Eventually it would be nice if all this functionality was in the one place - int nDistance = aLine->GetDistance(); - int nOutWidth = aLine->GetOutWidth(); - int nInWidth = aLine->GetInWidth(); - int nWidth = aLine->GetOutWidth(); - - if(nDistance == 0) // Single Line - Strm() << OOO_STRING_SVTOOLS_RTF_BRDRS; - else // Double Line - { - if(nOutWidth == nInWidth) - Strm() << OOO_STRING_SVTOOLS_RTF_BRDRDB; - else if (nOutWidth > nInWidth) - Strm() << OOO_STRING_SVTOOLS_RTF_BRDRTNTHSG; - else if (nOutWidth < nInWidth) - Strm() << OOO_STRING_SVTOOLS_RTF_BRDRTHTNSG; - } - Strm() << OOO_STRING_SVTOOLS_RTF_BRDRW; - OutULong(nWidth); - - Strm() << OOO_STRING_SVTOOLS_RTF_BRSP; - OutULong(nSpace); -} - -void SwRTFWriter::OutRTFBorders(SvxBoxItem aBox) -{ - const SvxBorderLine *pLine = aBox.GetTop(); - if(pLine) - { - Strm() << OOO_STRING_SVTOOLS_RTF_PGBRDRT; - OutRTFBorder(pLine, aBox.GetDistance(BOX_LINE_TOP)); - } - - pLine = aBox.GetBottom(); - if(pLine) - { - Strm() << OOO_STRING_SVTOOLS_RTF_PGBRDRB; - OutRTFBorder(pLine, aBox.GetDistance(BOX_LINE_BOTTOM)); - } - - pLine = aBox.GetRight(); - if(pLine) - { - Strm() << OOO_STRING_SVTOOLS_RTF_PGBRDRR; - OutRTFBorder(pLine, aBox.GetDistance(BOX_LINE_LEFT)); - } - - pLine = aBox.GetLeft(); - if(pLine) - { - Strm() << OOO_STRING_SVTOOLS_RTF_PGBRDRL; - OutRTFBorder(pLine, aBox.GetDistance(BOX_LINE_RIGHT)); - } -} - -void SwRTFWriter::OutRTFPageDescription( const SwPageDesc& rPgDsc, - BOOL bWriteReset, - BOOL bCheckForFirstPage ) -{ - // jetzt noch den Teil fuer alle anderen Applikationen: - const SwPageDesc *pSave = pAktPageDesc; - bool bOldOut = bOutPageDesc; - bool bOldHDFT = bOutLeftHeadFoot; - - // falls es einen Follow gibt, - pAktPageDesc = &rPgDsc; - if( bCheckForFirstPage && pAktPageDesc->GetFollow() && - pAktPageDesc->GetFollow() != pAktPageDesc ) - pAktPageDesc = pAktPageDesc->GetFollow(); - - bOutPageDesc = TRUE; - bOutLeftHeadFoot = FALSE; - - if( bWriteReset ) - { - if( bFirstLine && bWriteAll && - pCurPam->GetPoint()->nNode == pOrigPam->Start()->nNode ) - Strm() << OOO_STRING_SVTOOLS_RTF_SECTD << OOO_STRING_SVTOOLS_RTF_SBKNONE; - else - Strm() << OOO_STRING_SVTOOLS_RTF_SECT << OOO_STRING_SVTOOLS_RTF_SECTD; - } - - if( pAktPageDesc->GetLandscape() ) - Strm() << OOO_STRING_SVTOOLS_RTF_LNDSCPSXN; - - const SwFmt *pFmt = &pAktPageDesc->GetMaster(); //GetLeft(); - OutRTF_SwFmt( *this, *pFmt ); - - SvxBoxItem aBox = pFmt->GetAttrSet().GetBox(); - OutRTFBorders(pFmt->GetAttrSet().GetBox()); - - // falls es gesharte Heaer/Footer gibt, so gebe diese auch noch aus - if ( - (nsUseOnPage::PD_MIRROR & pAktPageDesc->GetUseOn()) && - (!pAktPageDesc->IsFooterShared() || !pAktPageDesc->IsHeaderShared()) - ) - { - bOutLeftHeadFoot = TRUE; - const SfxPoolItem* pHt; - if( !pAktPageDesc->IsHeaderShared() && - SFX_ITEM_SET == pAktPageDesc->GetLeft().GetAttrSet(). - GetItemState( RES_HEADER, FALSE, &pHt )) - OutRTF_SwFmtHeader( *this, *pHt ); - - if( !pAktPageDesc->IsFooterShared() && - SFX_ITEM_SET == pAktPageDesc->GetLeft().GetAttrSet(). - GetItemState( RES_FOOTER, FALSE, &pHt )) - OutRTF_SwFmtFooter( *this, *pHt ); - bOutLeftHeadFoot = FALSE; - } - - if( pAktPageDesc != &rPgDsc ) - { - pAktPageDesc = &rPgDsc; - Strm() << OOO_STRING_SVTOOLS_RTF_TITLEPG; - - // die Header/Footer der 1. Seite ausgeben - const SfxPoolItem* pHt; - if( SFX_ITEM_SET == pAktPageDesc->GetMaster().GetAttrSet(). - GetItemState( RES_HEADER, FALSE, &pHt )) - OutRTF_SwFmtHeader( *this, *pHt ); - - if( SFX_ITEM_SET == pAktPageDesc->GetMaster().GetAttrSet(). - GetItemState( RES_FOOTER, FALSE, &pHt )) - OutRTF_SwFmtFooter( *this, *pHt ); - } - - pAktPageDesc = pSave; - bOutPageDesc = bOldOut; - bOutLeftHeadFoot = bOldHDFT; -} - -BOOL SwRTFWriter::OutBreaks( const SfxItemSet& rSet ) -{ - // dann nie Seitenumbrueche ausgeben - BOOL bPgDscWrite = FALSE; - - if( !bOutOutlineOnly && bOutPageAttr && !bIgnoreNextPgBreak) - { - const SfxPoolItem *pItem; - if( SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, TRUE, &pItem ) - && ((SwFmtPageDesc*)pItem)->GetPageDesc() ) - { - const SwFmtPageDesc& rPgDsc = *(SwFmtPageDesc*)pItem; - for( USHORT nPos = pDoc->GetPageDescCnt(); nPos; ) - if( &const_cast(pDoc) - ->GetPageDesc( --nPos ) == rPgDsc.GetPageDesc() ) - { - pAktPageDesc = ((SwFmtPageDesc*)pItem)->GetPageDesc(); - // FALSE wegen schliessender Klammer !! - OutComment( *this, OOO_STRING_SVTOOLS_RTF_PGDSCNO, FALSE ); - OutULong( nPos ) << '}'; - - // nicht weiter, in Styles gibts keine SectionControls !! - if( !bOutStyleTab ) - OutRTFPageDescription( *rPgDsc.GetPageDesc(), - TRUE, TRUE ); - bPgDscWrite = TRUE; - break; - } - } - else if( SFX_ITEM_SET == rSet.GetItemState( RES_BREAK, TRUE, &pItem ) ) - { - const SvxFmtBreakItem &rBreak = *(SvxFmtBreakItem*)pItem; - if( bWriteHelpFmt ) - { - if( SVX_BREAK_PAGE_BEFORE == rBreak.GetBreak() || - SVX_BREAK_PAGE_AFTER == rBreak.GetBreak() || - SVX_BREAK_PAGE_BOTH == rBreak.GetBreak() ) - { - bOutFmtAttr = true; - Strm() << OOO_STRING_SVTOOLS_RTF_PAGE; - } - } - else - { - switch( rBreak.GetBreak() ) - { - case SVX_BREAK_COLUMN_BEFORE: - case SVX_BREAK_COLUMN_AFTER: - case SVX_BREAK_COLUMN_BOTH: - break; - case SVX_BREAK_PAGE_BEFORE: - bOutFmtAttr = true; - Strm() << OOO_STRING_SVTOOLS_RTF_PAGE; - break; - case SVX_BREAK_PAGE_AFTER: - OutComment(*this, OOO_STRING_SVTOOLS_RTF_PGBRK, false) << "0}"; - break; - case SVX_BREAK_PAGE_BOTH: - OutComment(*this, OOO_STRING_SVTOOLS_RTF_PGBRK, false) << "1}"; - break; - default: - break; - } - } - } - } - bIgnoreNextPgBreak = false; - return bPgDscWrite; -} - - -void SwRTFWriter::CheckEndNodeForSection( const SwNode& rNd ) -{ - const SwSectionNode* pSectNd = rNd.StartOfSectionNode()->GetSectionNode(); - if( pSectNd /*&& CONTENT_SECTION == pSectNd->GetSection().GetType()*/ ) - { - const SwSectionFmt* pSectFmt = pSectNd->GetSection().GetFmt(); - - // diese Section hatte den akt. Abschnitt bestimmt - // wer bestimmt den nachsten?? - SwNodeIndex aIdx( rNd, 1 ); - pSectNd = aIdx.GetNode().GetSectionNode(); - if( !( ( pSectNd || (aIdx.GetNode().IsEndNode() && - 0 != ( pSectNd = aIdx.GetNode().StartOfSectionNode()->GetSectionNode() )) ) - /*&& CONTENT_SECTION == pSectNd->GetSection().GetType()*/ )) - { - // wer bestimmt denn nun den neuen Abschnitt? - // PageDesc oder eine uebergeordnete Section? - SwSection* pParent = pSectFmt->GetParentSection(); -// while( pParent /*&& CONTENT_SECTION != pParent->GetType()*/ ) -// pParent = pParent->GetParent(); - - if( pParent /*&& CONTENT_SECTION == pParent->GetType()*/ ) - OutRTF_SwSectionNode( *this, *pParent-> - GetFmt()->GetSectionNode( TRUE ) ); - else - { - if (! bOutPageDesc) - { - Strm() << OOO_STRING_SVTOOLS_RTF_SECT << OOO_STRING_SVTOOLS_RTF_SECTD << OOO_STRING_SVTOOLS_RTF_SBKNONE; - OutRTFPageDescription( ( pAktPageDesc - ? *pAktPageDesc - : const_cast(pDoc) - ->GetPageDesc(0) ), - FALSE, TRUE ); - Strm() << SwRTFWriter::sNewLine; - } - } - } - // else - // weiter machen, der naechste definiert den neuen Abschnitt - } -} - -// Struktur speichert die aktuellen Daten des Writers zwischen, um -// einen anderen Dokument-Teil auszugeben, wie z.B. Header/Footer -RTFSaveData::RTFSaveData( SwRTFWriter& rWriter, ULONG nStt, ULONG nEnd ) - : rWrt( rWriter ), - pOldPam( rWrt.pCurPam ), pOldEnd( rWrt.GetEndPaM() ), - pOldFlyFmt( rWrt.pFlyFmt ), pOldPageDesc( rWrt.pAktPageDesc ), - pOldAttrSet( rWrt.GetAttrSet() ) -{ - bOldWriteAll = rWrt.bWriteAll; - bOldOutTable = rWrt.bOutTable; - bOldOutPageAttr = rWrt.bOutPageAttr; - bOldAutoAttrSet = rWrt.bAutoAttrSet; - bOldOutSection = rWrt.bOutSection; - - rWrt.pCurPam = rWrt.NewSwPaM( *rWrt.pDoc, nStt, nEnd ); - - // Tabelle in Sonderbereichen erkennen - if( nStt != rWrt.pCurPam->GetMark()->nNode.GetIndex() && - rWrt.pDoc->GetNodes()[ nStt ]->IsTableNode() ) - rWrt.pCurPam->GetMark()->nNode = nStt; - - rWrt.SetEndPaM( rWrt.pCurPam ); - rWrt.pCurPam->Exchange( ); - rWrt.bWriteAll = TRUE; - rWrt.bOutTable = FALSE; - rWrt.bOutPageAttr = FALSE; - rWrt.SetAttrSet( 0 ); - rWrt.bAutoAttrSet = FALSE; - rWrt.bOutSection = FALSE; -} - - -RTFSaveData::~RTFSaveData() -{ - delete rWrt.pCurPam; // Pam wieder loeschen - - rWrt.pCurPam = pOldPam; - rWrt.SetEndPaM( pOldEnd ); - rWrt.bWriteAll = bOldWriteAll; - rWrt.bOutTable = bOldOutTable; - rWrt.pFlyFmt = pOldFlyFmt; - rWrt.pAktPageDesc = pOldPageDesc; - rWrt.SetAttrSet( pOldAttrSet ); - rWrt.bAutoAttrSet = bOldAutoAttrSet; - rWrt.bOutPageAttr = bOldOutPageAttr; - rWrt.bOutSection = bOldOutSection; -} - -short SwRTFWriter::GetCurrentPageDirection() const -{ - const SwFrmFmt &rFmt = pAktPageDesc - ? pAktPageDesc->GetMaster() - : const_cast(pDoc) - ->GetPageDesc(0).GetMaster(); - const SvxFrameDirectionItem* pItem = &rFmt.GetFrmDir(); - - if (!pItem) - { - pItem = (const SvxFrameDirectionItem*) - &pDoc->GetAttrPool().GetDefaultItem(RES_FRAMEDIR); - } - return pItem->GetValue(); -} - -short SwRTFWriter::TrueFrameDirection(const SwFrmFmt &rFlyFmt) const -{ - const SwFrmFmt *pFlyFmt2 = &rFlyFmt; - const SvxFrameDirectionItem* pItem = 0; - while (pFlyFmt2) - { - pItem = &pFlyFmt2->GetFrmDir(); - if (FRMDIR_ENVIRONMENT == pItem->GetValue()) - { - pItem = 0; - const SwFmtAnchor* pAnchor = &pFlyFmt2->GetAnchor(); - if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) && - pAnchor->GetCntntAnchor() ) - { - pFlyFmt2 = pAnchor->GetCntntAnchor()->nNode. - GetNode().GetFlyFmt(); - } - else - pFlyFmt2 = 0; - } - else - pFlyFmt2 = 0; - } - - short nRet; - if (pItem) - nRet = pItem->GetValue(); - else - nRet = GetCurrentPageDirection(); - - ASSERT(nRet != FRMDIR_ENVIRONMENT, "leaving with environment direction"); - return nRet; -} - -/* vi:set tabstop=4 shiftwidth=4 expandtab: */ diff --git a/sw/source/filter/rtf/wrtrtf.hxx b/sw/source/filter/rtf/wrtrtf.hxx deleted file mode 100644 index 1c51a21dcf..0000000000 --- a/sw/source/filter/rtf/wrtrtf.hxx +++ /dev/null @@ -1,253 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _WRTRTF_HXX -#define _WRTRTF_HXX - -#include -#include -#include "../inc/msfilter.hxx" - -#include - -// einige Forward Deklarationen -class Color; -class Font; -class SvPtrarr; -class RTFColorTbl; -class SwFmt; -class SwFlyFrmFmt; -class SwPosFlyFrms; -class SwPageDesc; -class SwTableNode; -class SwTxtFmtColl; -class SwNumRule; -class SwNumRuleTbl; -class DateTime; -class RTFEndPosLst; -class SvxBorderLine; - -extern SwAttrFnTab aRTFAttrFnTab; -extern SwNodeFnTab aRTFNodeFnTab; - -// the default text encoding for the export, if it doesn't fit unicode will -// be used -#define DEF_ENCODING RTL_TEXTENCODING_ASCII_US - - -class RTF_WrtRedlineAuthor : public sw::util::WrtRedlineAuthor -{ - public: - virtual void Write(Writer &rWrt); -}; - -// der RTF-Writer - -class SwRTFWriter : public Writer -{ - friend class RTFEndPosLst; - - SvPtrarr* pFontRemoveLst; - RTFColorTbl* pColTbl; - SwPosFlyFrms* pFlyPos; // Pointer auf die aktuelle "FlyFrmTabelle" - RTFEndPosLst* pCurEndPosLst; - const SfxItemSet* pAttrSet; // akt. Format/Collection vom Node - // fuer den Zugriff auf einige Attribute - // z.B. Font-Size, LR-Space,.. - SwNumRuleTbl* pNumRuleTbl; // list of all exported numrules - RTF_WrtRedlineAuthor *pRedlAuthors; - - USHORT nAktFlyPos; // Index auf das naechste "FlyFrmFmt" - void OutRTFColorTab(); - void OutRTFFontTab(); - const rtl::OUString XlateFmtName( const rtl::OUString &rName, SwGetPoolIdFromName eFlags ); - void OutRTFStyleTab(); - void OutRTFListTab(); - bool OutRTFRevTab(); - - void MakeHeader(); - void OutUnicodeSafeRecord(const sal_Char *pToken, - const String &rContent); - void OutDocInfoStat(); - void OutInfoDateTime( const sal_Char*, - const ::com::sun::star::util::DateTime& ); - void CheckEndNodeForSection( const SwNode& rNd ); - - void BuildNumRuleTbl(); - - - -public: - // --- public Member -------------------------------------------------- - - USHORT nCurRedline; - - - const SwFlyFrmFmt* pFlyFmt; // liegt der Node in einem FlyFrame, - // ist das Format gesetzt, sonst 0 - const SwPageDesc* pAktPageDesc; // aktuell gesetzter PageDesc. - sal_Int32 nBkmkTabPos; // akt. Position in der Bookmark-Tabelle - USHORT nCurScript; // actual scripttype - rtl_TextEncoding eDefaultEncoding; - rtl_TextEncoding eCurrentEncoding; - -#if defined(UNX) - static const sal_Char sNewLine; // nur \012 oder \015 -#else - static const sal_Char __FAR_DATA sNewLine[]; // \015\012 -#endif - - - BOOL bFirstLine : 1; // wird die 1. Zeile ausgegeben ? - BOOL bOutFmtAttr : 1; // TRUE: beim Schreiben eines Formates - // existierte mindestens ein Attribut - BOOL bRTFFlySyntax : 1; // gebe nur original RTFSyntax aus - // (nur fuer die fliegenden Rahmen) - BOOL bOutPageDesc: 1; // gebe einen PageDescriptor aus - BOOL bOutPageDescTbl: 1; // gebe die PageDescriptor-Tabelle aus - BOOL bOutTable : 1; // gebe eine Tabelle aus - BOOL bTxtAttr : 1; // werden TextAttribute ausgegeben ? - BOOL bWriteHelpFmt : 1; // schreibe Win-RTF-HelpFileFmt - BOOL bOutStyleTab : 1; // gebe die StyleSheet-Tabelle aus - BOOL bOutPageAttr : 1; // PageDescAttribut ausgeben? - BOOL bAutoAttrSet : 1; // TRUE: pAttrSet ist harte Attributierung - // FALSE: pAttrSet ist vom Format/Collection - BOOL bOutOutlineOnly : 1; // TRUE: nur Gliederungs-Absaetze schreiben - BOOL bOutListNumTxt : 1; // TRUE: der ListNumText wird ausgegeben - BOOL bOutLeftHeadFoot : 1; // gebe vom PageDesc. den linkten - // Header/Footer aus - BOOL bOutSection : 1; // TRUE: Section PageDesc ausgeben - BOOL bIgnoreNextPgBreak : 1; // TRUE: naechsten PageDesc/Break ignorieren - BOOL bAssociated : 1; // use associated tokens - - BOOL bNonStandard : 1; // use non-standard tags (for cut and paste) - - // --- public Methoden ------------------------------------------------ - - SwRTFWriter( const String& rFilterName, const String& rBaseURL ); - virtual ~SwRTFWriter(); - virtual ULONG WriteStream(); - - void Out_SwDoc( SwPaM* ); // schreibe den makierten Bereich - - // gebe die evt. an der akt. Position stehenden FlyFrame aus. - void OutFlyFrm(); - void OutRTFFlyFrms( const SwFlyFrmFmt& ); - // gebe alle an der Position stehenden Bookmarks aus - void OutBookmarks( xub_StrLen nCntntPos ); - // gebe die PageDesc-Daten im normalen RTF-Format aus - void OutRTFPageDescription( const SwPageDesc&, BOOL , BOOL ); - void OutRTFBorders( SvxBoxItem aBox ); - void OutRTFBorder( const SvxBorderLine* aLine, const USHORT nSpace ); - BOOL OutBreaks( const SfxItemSet& rSet ); - void OutRedline( xub_StrLen nCntntPos ); - - // gebe die PageDescriptoren aus - USHORT GetId( const Color& ) const; - USHORT GetId( const SvxFontItem& ) const; - USHORT GetId( const Font& ) const; - USHORT GetId( const SwTxtFmtColl& ) const; - USHORT GetId( const SwCharFmt& ) const; - USHORT GetId( const SwNumRuleItem& rItem ) const; - - void OutPageDesc(); - - BOOL OutListNum( const SwTxtNode& rNd ); - USHORT GetNumRuleId( const SwNumRule& rRule ); - - // fuer RTFSaveData - SwPaM* GetEndPaM() { return pOrigPam; } - void SetEndPaM( SwPaM* pPam ) { pOrigPam = pPam; } - - const SfxPoolItem& GetItem( USHORT nWhich ) const; - - const SfxItemSet* GetAttrSet() const { return pAttrSet; } - void SetAttrSet( const SfxItemSet* p ) { pAttrSet = p; } - - const RTFEndPosLst* GetEndPosLst() const { return pCurEndPosLst; } - - void SetAssociatedFlag( BOOL b ) { bAssociated = b; } - BOOL IsAssociatedFlag() const { return bAssociated; } - - void SetCurrScriptType( USHORT n ) { nCurScript = n; } - USHORT GetCurrScriptType() const { return nCurScript; } - - short TrueFrameDirection(const SwFrmFmt &rFlyFmt) const; - short GetCurrentPageDirection() const; -}; - - -// Struktur speichert die aktuellen Daten des Writers zwischen, um -// einen anderen Dokument-Teil auszugeben, wie z.B. Header/Footer -// Mit den beiden USHORTs im CTOR wird ein neuer PaM erzeugt und auf -// die Position im Dokument gesetzt. -// Im Destructor werden alle Daten wieder restauriert und der angelegte -// Pam wieder geloescht. - -struct RTFSaveData -{ - SwRTFWriter& rWrt; - SwPaM* pOldPam, *pOldEnd; - const SwFlyFrmFmt* pOldFlyFmt; - const SwPageDesc* pOldPageDesc; - const SfxItemSet* pOldAttrSet; // akt. Attribute vom Node - - BOOL bOldWriteAll : 1; - BOOL bOldOutTable : 1; - BOOL bOldOutPageAttr : 1; - BOOL bOldAutoAttrSet : 1; - BOOL bOldOutSection : 1; - - RTFSaveData( SwRTFWriter&, ULONG nStt, ULONG nEnd ); - ~RTFSaveData(); -}; - - -// einige Funktions-Deklarationen -Writer& OutRTF_AsByteString( Writer& rWrt, const String& rStr, rtl_TextEncoding eEncoding); -Writer& OutRTF_SwFmt( Writer& rWrt, const SwFmt& ); -Writer& OutRTF_SwTblNode(Writer& , const SwTableNode&); -Writer& OutRTF_SwSectionNode( Writer& , SwSectionNode & ); - - -// Augabe von RTF-Bitmaps (steht im File "wrtpict.cxx") -//struct SvxRTFPictureType; -//class Bitmap; -//USHORT WriteRTFPict( const SwPictureType&, Bitmap&, SvStream& ); - -// Ausagbe von Footer-/Headers -Writer& OutRTF_SwFmtHeader( Writer& , const SfxPoolItem& ); -Writer& OutRTF_SwFmtFooter( Writer& , const SfxPoolItem& ); - -// Kommentar und zusaetzlichen String ausgeben -SvStream& OutComment( Writer& rWrt, const sal_Char* pStr ); - // zusaetzlich das bOutFmtAttr-Flag manipulieren -SvStream& OutComment( Writer& rWrt, const sal_Char* pStr, BOOL bSetFlag ); -bool ExportAsInline(const SwFlyFrmFmt& rFlyFrmFmt); - -#endif // _WRTRTF_HXX - - diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 784024d4c2..f46fffbb2d 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -1201,24 +1201,24 @@ void RtfExport::WriteHeaderFooter(const SwFrmFmt& rFmt, bool bHeader, const sal_ OSL_TRACE("%s end", __PRETTY_FUNCTION__); } -class SwRTFUNOWriter : public Writer +class SwRTFWriter : public Writer { public: - SwRTFUNOWriter( const String& rFilterName, const String& rBaseURL ); - virtual ~SwRTFUNOWriter(); + SwRTFWriter( const String& rFilterName, const String& rBaseURL ); + virtual ~SwRTFWriter(); virtual ULONG WriteStream(); }; -SwRTFUNOWriter::SwRTFUNOWriter( const String& /*rFltName*/, const String & rBaseURL ) +SwRTFWriter::SwRTFWriter( const String& /*rFltName*/, const String & rBaseURL ) { OSL_TRACE("%s", __PRETTY_FUNCTION__); SetBaseURL( rBaseURL ); } -SwRTFUNOWriter::~SwRTFUNOWriter() +SwRTFWriter::~SwRTFWriter() {} -ULONG SwRTFUNOWriter::WriteStream() +ULONG SwRTFWriter::WriteStream() { OSL_TRACE("%s", __PRETTY_FUNCTION__); RtfExport aExport( NULL, pDoc, new SwPaM( *pCurPam->End(), *pCurPam->Start() ), pCurPam, this ); @@ -1229,7 +1229,7 @@ ULONG SwRTFUNOWriter::WriteStream() extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL ExportRTF( const String& rFltName, const String& rBaseURL, WriterRef& xRet ) { OSL_TRACE("%s", __PRETTY_FUNCTION__); - xRet = new SwRTFUNOWriter( rFltName, rBaseURL ); + xRet = new SwRTFWriter( rFltName, rBaseURL ); } /* vi:set shiftwidth=4 expandtab: */ -- cgit v1.2.3 From 5b71502f05b4bf4402e44456a1d36e75f4892953 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 2 Aug 2010 16:00:15 +0200 Subject: sw34bf01: #i113325#: calcmove.cxx, pagechg.cxx: apply patch by cmc --- sw/source/core/layout/calcmove.cxx | 7 ++++--- sw/source/core/layout/pagechg.cxx | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 28d3a9b307..318beefcd6 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -1004,10 +1004,11 @@ BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) SwAnchoredObject* pObj = (*GetDrawObjs())[i]; const SwFrmFmt& rFmt = pObj->GetFrmFmt(); const BOOL bFly = pObj->ISA(SwFlyFrm); - if ( bFly && - WEIT_WECH == pObj->GetObjRect().Width()|| - rFmt.GetFrmSize().GetWidthPercent() ) + if ((bFly && (WEIT_WECH == pObj->GetObjRect().Width())) + || rFmt.GetFrmSize().GetWidthPercent()) + { continue; + } if ( FLY_AS_CHAR == rFmt.GetAnchor().GetAnchorId() ) { diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 8ca7c2db14..803e9df5bc 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -1827,10 +1827,11 @@ void SwRootFrm::ImplCalcBrowseWidth() SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i]; const SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt(); const BOOL bFly = pAnchoredObj->ISA(SwFlyFrm); - if ( bFly && - WEIT_WECH == pAnchoredObj->GetObjRect().Width()|| - rFmt.GetFrmSize().GetWidthPercent() ) + if ((bFly && (WEIT_WECH == pAnchoredObj->GetObjRect().Width())) + || rFmt.GetFrmSize().GetWidthPercent()) + { continue; + } long nWidth = 0; switch ( rFmt.GetAnchor().GetAnchorId() ) -- cgit v1.2.3 From 2249a653c7bec8661b6f09e0854f8ea6cf122fbc Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 2 Aug 2010 16:01:16 +0200 Subject: sw34bf01: #i113329#: frmtool.cxx: apply patch by cmc --- sw/source/core/layout/frmtool.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index b525043dc3..471cf61cd3 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1738,7 +1738,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, // die in den Fussnoten liegen, nicht etwa die (spaltigen) Bereiche, // in denen die Fussnoten(Container) liegen. // #109767# Table frame is in section, insert section in cell frame. - if( pSct && ( pFtnFrm && !pSct->IsInFtn() ) || pUpper->IsCellFrm() ) + if( pSct && ((pFtnFrm && !pSct->IsInFtn()) || pUpper->IsCellFrm()) ) pSct = NULL; if( pSct ) { // damit der SectionFrm nicht zerstoert wird durch pTmp->MoveFwd() -- cgit v1.2.3 From 7fb93f4afeba4f0e21a6c3478fe2395e8fc70ffe Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 4 Aug 2010 12:49:33 +0200 Subject: vmiklos01: #i113532# add README-rtf.txt from the issue --- sw/source/filter/ww8/README-rtf.txt | 223 ++++++++++++++++++++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100644 sw/source/filter/ww8/README-rtf.txt (limited to 'sw/source') diff --git a/sw/source/filter/ww8/README-rtf.txt b/sw/source/filter/ww8/README-rtf.txt new file mode 100644 index 0000000000..6b516188d5 --- /dev/null +++ b/sw/source/filter/ww8/README-rtf.txt @@ -0,0 +1,223 @@ + +--------------------------------------------------------------------- + +Summary of new features in RtfExport + +--------------------------------------------------------------------- +--------------------------------------------------------------------- + +Table of Contents + +1. Introduction + + 1.1. Terminology + 1.2. General + +2. List if fixed bugs +3. List of new features + + 3.1. Nested tables + 3.2. Character properties + 3.3. Sections + 3.4. Graphics + 3.5. Bookmarks + 3.6. Fields + 3.7. Drawing + 3.8. Form fields + 3.9. OLE objects + +4. Changes in the source code outside RTF + + +--------------------------------------------------------------------- + +1. Introduction + +--------------------------------------------------------------------- + +The biggest difference is that the new exporter is an UNO component, +and it?s based on the MSWord base classes, the vision here is that +this way much less code can achieve the same set of features, +reducing the amount of duplicated code. + + +1.1. Terminology + +-------------- + + * The "MSO OK, OOo KO" and similar abbreviations describe if the + given new feature is supported by the OOo RTF importer or it can + be tested using Microsoft Office. + * RtfExport refers to the new UNO-based exporter, RtfWriter refers + to the old built-in one. + + +1.2. General + +-------------- + +RtfWriter sometimes created documents where the first { is closed in +the middle of the document. MSO ignores this problem, but OOo stops +parsing the rest of the document if this happens, in other words +everything after such a bug is ignored. This can be reproduced by for +example parprops.odt, but it?s triggered in several other cases as +well. RtfExport has no automatic prevention for this, either - but +during development I primarily test the output with OOo, so hopefully +the bug will pop up less frequently. + + +--------------------------------------------------------------------- + +2. List if fixed bugs + +--------------------------------------------------------------------- + + * http://www.openoffice.org/issues/show_bug.cgi?id=51469 postit + fields + * http://www.openoffice.org/issues/show_bug.cgi?id=66619 page + margins + * http://www.openoffice.org/issues/show_bug.cgi?id=69856 page + numbers + * http://www.openoffice.org/issues/show_bug.cgi?id=81569 { and } in + document title + * http://www.openoffice.org/issues/show_bug.cgi?id=84703 redlines + * http://www.openoffice.org/issues/show_bug.cgi?id=91166 russian + chars + * http://www.openoffice.org/issues/show_bug.cgi?id=92673 bookmarks + across tables + * http://www.openoffice.org/issues/show_bug.cgi?id=100507 ole + object export + * http://www.openoffice.org/issues/show_bug.cgi?id=103993 same as # + 81569 just for doc comments + * http://www.openoffice.org/issues/show_bug.cgi?id=106677 + listoverride index starts at zero + * http://www.openoffice.org/issues/show_bug.cgi?id=38344 enhanced + character space + + +--------------------------------------------------------------------- + +3. List of new features + +--------------------------------------------------------------------- + + +3.1. Nested tables + +-------------- + +This was new in Word2000 and it?s now supported by RtfExport (MSO OK, +OOo KO) + + +3.2. Character properties + +-------------- + +The followings are now supported: + + * blinking (MSO OK, OOo KO) + * expanded spacing (MSO OK, OOo OK) + * pair kerning (MSO OK, OOo OK) + + +3.3. Sections + +-------------- + +RtfExport writes: + + * column breaks (MSO OK, OOo OK) + * special breaks (when the next page should be an odd or an even + page; MSO OK, OOo KO) + * the write-protected property of sections is experted properly + (MSO OK, OOo KO) + * better page numbers (inherited type from page styles, restarts; + MSO OK, OOo KO) + * line numbering (MSO OK, OOo KO) + + +3.4. Graphics + +-------------- + +PNG graphics are exported in WMF format as well, so that not only MSO +and OOo can display graphics from the output document, but Wordpad as +well. + + +3.5. Bookmarks + +-------------- + +Implicit bookmarks like reference to a footnote did not work in OOo +(one got an Error: Reference source not found message when opening +the result), this now works as expected. (MSO OK - the importer +previously autocorrected this as well, OO OK) + + +3.6. Fields + +-------------- + + * Table of contents is now written as a field, so it?s properly + read-only (MSO OK, OOo KO) + * Postit comments are now exported. (MSO OK, OOo KO) + + +3.7. Drawing + +-------------- + +Drawing objects for Word 97 through Word 2007 (shapes) are now +implemented: + + * basic shapes (rectangle, ellipse, etc.) + * lines, including free-form ones + * texts, including vertical ones and their (paragraph and + character) formatting + +(MSO OK, OOo KO) + + +3.8. Form fields + +-------------- + +All types supported by the RTF format are exported, namely: + + * text boxes + * check boxes + * list boxes + +(MSO OK, OOo KO) + + +3.9. OLE objects + +-------------- + +Their result is exported as a picture - RtfWriter did not export +anything. (MSO OK, OOo OK) + +For math, the native data is written as well, so you can edit the +object, too. (MSO OK, OOo KO) + + +--------------------------------------------------------------------- + +4. Changes in the source code outside RTF + +--------------------------------------------------------------------- + +These are refactorings I needed for RTF. To my best knowledge they do +not change the output of other filters from a user?s point of view. + + * The code that splits runs according to bookmarks is moved from + DocxExport to MSWordExportBase + * WW8_SdrAttrIter has been refactored to MSWord_SdrAttrIter + * MSWordExportBase::SubstituteBullet can avoid replacing bullets + * wwFontHelper::InitFontTable can really load all fonts + * An obvious typo in WW8AttributeOutput::CharTwoLines has been + fixed + -- cgit v1.2.3 From d7e7400f62736fb81108d2b551f5be65d41cd4e9 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 4 Aug 2010 12:53:57 +0200 Subject: vmiklos01: #i113532# add author to README-rtf.txt --- sw/source/filter/ww8/README-rtf.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/README-rtf.txt b/sw/source/filter/ww8/README-rtf.txt index 6b516188d5..2ae4872311 100644 --- a/sw/source/filter/ww8/README-rtf.txt +++ b/sw/source/filter/ww8/README-rtf.txt @@ -4,6 +4,10 @@ Summary of new features in RtfExport --------------------------------------------------------------------- + +Miklos Vajna + + --------------------------------------------------------------------- Table of Contents -- cgit v1.2.3 From 42b8b320bef0042fd4fbdedcb993dfd105cb6afc Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 13 Aug 2010 23:34:21 +0200 Subject: fs33a: make compile in non-pro build (removed seemingly dead assertion) --- sw/source/ui/lingu/olmenu.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 87d5c000d3..933959d172 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -823,7 +823,7 @@ void SwSpellPopup::Execute( USHORT nId ) else if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END) { OUString aWord( xSpellAlt->getWord() ); - DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" ); + //DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" ); PopupMenu *pMenu = GetPopupMenu(MN_ADD_TO_DIC); String aDicName ( pMenu->GetItemText(nId) ); -- cgit v1.2.3 From 613dc2897478cc7e9d14ac3a7b65c533b11382db Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 17 Aug 2010 11:58:52 +0200 Subject: vmiklos01: #i113532# Use OSL_THIS_FUNC instead of the non-portable __PRETTY_FUNCTION__ --- sw/source/filter/ww8/docxexportfilter.cxx | 2 +- sw/source/filter/ww8/rtfattributeoutput.cxx | 294 ++++++++++++++-------------- sw/source/filter/ww8/rtfexport.cxx | 70 +++---- sw/source/filter/ww8/rtfexportfilter.cxx | 2 +- sw/source/filter/ww8/rtfimportfilter.cxx | 2 +- sw/source/filter/ww8/rtfsdrexport.cxx | 32 +-- 6 files changed, 201 insertions(+), 201 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index 829bd76757..3ec1727fe2 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -187,7 +187,7 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceMan SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ ) { - OSL_TRACE("%s, pImplName is '%s'", __PRETTY_FUNCTION__, pImplName); + OSL_TRACE("%s, pImplName is '%s'", OSL_THIS_FUNC, pImplName); uno::Reference< lang::XSingleServiceFactory > xFactory; void* pRet = 0; diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 81cba2f0b9..140a2fd737 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -214,7 +214,7 @@ static OString OutBorderLine( RtfExport &rExport, const SvxBorderLine* pLine, void RtfAttributeOutput::RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); /* You would have thought that m_rExport.Strm() << (bIsRTL ? OOO_STRING_SVTOOLS_RTF_RTLCH : OOO_STRING_SVTOOLS_RTF_LTRCH); would be sufficent here , @@ -252,7 +252,7 @@ void RtfAttributeOutput::RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript ) void RtfAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); // Output table/table row/table cell starts if needed if ( pTextNodeInfo.get() ) @@ -299,7 +299,7 @@ void RtfAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextN void RtfAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); FinishTableRowCell( pTextNodeInfoInner ); @@ -329,14 +329,14 @@ void RtfAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTe void RtfAttributeOutput::EmptyParagraph() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_rExport.Strm() << m_rExport.sNewLine << OOO_STRING_SVTOOLS_RTF_PAR << ' '; } void RtfAttributeOutput::StartParagraphProperties( const SwTxtNode& rNode ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); OSL_ENSURE(m_aStyles.getLength() == 0, "m_aStyles is not empty"); // output page/section breaks @@ -373,14 +373,14 @@ void RtfAttributeOutput::StartParagraphProperties( const SwTxtNode& rNode ) void RtfAttributeOutput::EndParagraphProperties() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(m_aStylesEnd.makeStringAndClear()); m_rExport.Strm() << m_aStyles.makeStringAndClear(); } void RtfAttributeOutput::StartRun( const SwRedlineData* pRedlineData ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aRun.append('{'); @@ -392,7 +392,7 @@ void RtfAttributeOutput::StartRun( const SwRedlineData* pRedlineData ) void RtfAttributeOutput::EndRun() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aRun.append(m_rExport.sNewLine); m_aRun.append(m_aRunText.makeStringAndClear()); m_aRun.append('}'); @@ -400,20 +400,20 @@ void RtfAttributeOutput::EndRun() void RtfAttributeOutput::StartRunProperties() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); OSL_ENSURE(m_aStyles.getLength() == 0, "m_aStyles is not empty"); } void RtfAttributeOutput::EndRunProperties( const SwRedlineData* /*pRedlineData*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(m_aStylesEnd.makeStringAndClear()); m_aRun.append(m_aStyles.makeStringAndClear()); } void RtfAttributeOutput::RunText( const String& rText, rtl_TextEncoding eCharSet ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); RawText( rText, 0, eCharSet ); } @@ -429,23 +429,23 @@ OStringBuffer& RtfAttributeOutput::Styles() void RtfAttributeOutput::RawText( const String& rText, bool /*bForceUnicode*/, rtl_TextEncoding eCharSet ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aRunText.append(m_rExport.OutString(rText, eCharSet)); } void RtfAttributeOutput::StartRuby( const SwTxtNode& /*rNode*/, const SwFmtRuby& /*rRuby*/ ) { - OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); + OSL_TRACE("TODO: %s", OSL_THIS_FUNC); } void RtfAttributeOutput::EndRuby() { - OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); + OSL_TRACE("TODO: %s", OSL_THIS_FUNC); } bool RtfAttributeOutput::StartURL( const String& rUrl, const String& rTarget ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append('{'); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_FIELD); @@ -475,7 +475,7 @@ bool RtfAttributeOutput::StartURL( const String& rUrl, const String& rTarget ) bool RtfAttributeOutput::EndURL() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); // close the fldrslt group m_aRunText.append('}'); @@ -486,7 +486,7 @@ bool RtfAttributeOutput::EndURL() void RtfAttributeOutput::FieldVanish( const String& /*rTxt*/, ww::eField /*eType*/ ) { - OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); + OSL_TRACE("TODO: %s", OSL_THIS_FUNC); } void RtfAttributeOutput::Redline( const SwRedlineData* pRedline ) @@ -494,7 +494,7 @@ void RtfAttributeOutput::Redline( const SwRedlineData* pRedline ) if (!pRedline) return; - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if (pRedline->GetType() == nsRedlineType_t::REDLINE_INSERT) { @@ -516,12 +516,12 @@ void RtfAttributeOutput::Redline( const SwRedlineData* pRedline ) void RtfAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, USHORT /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t /*pTextNodeInfoInner*/ ) { - OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); + OSL_TRACE("TODO: %s", OSL_THIS_FUNC); } void RtfAttributeOutput::ParagraphStyle( USHORT nStyle ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); OString *pStyle = m_rExport.GetStyle(nStyle); OStringBuffer aStyle; @@ -537,7 +537,7 @@ void RtfAttributeOutput::ParagraphStyle( USHORT nStyle ) void RtfAttributeOutput::TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_INTBL); if ( m_nTableDepth > 1 ) @@ -549,14 +549,14 @@ void RtfAttributeOutput::TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t /* void RtfAttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfo*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); /* noop */ } void RtfAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( !m_pTableWrt ) InitTableHelper( pTableTextNodeInfoInner ); @@ -624,7 +624,7 @@ void RtfAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t void RtfAttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); /* * The function name is a bit misleading: given that we write borders @@ -680,7 +680,7 @@ void RtfAttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe void RtfAttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); const SwWriteTableRows& aRows = m_pTableWrt->GetRows( ); SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ]; @@ -701,7 +701,7 @@ void RtfAttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t void RtfAttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); const SwTableLine * pTabLine = pTabBox->GetUpper(); @@ -729,7 +729,7 @@ void RtfAttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTab void RtfAttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); const SwTableLine * pTabLine = pTabBox->GetUpper(); @@ -743,7 +743,7 @@ void RtfAttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pT void RtfAttributeOutput::TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); const SwTable * pTable = pTableTextNodeInfoInner->getTable(); const SwFrmFmt * pFrmFmt = pTable->GetFrmFmt(); @@ -756,7 +756,7 @@ void RtfAttributeOutput::TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTable void RtfAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); const SwWriteTableRows& aRows = m_pTableWrt->GetRows( ); SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ]; @@ -783,14 +783,14 @@ void RtfAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_ void RtfAttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t /*pNodeInfo*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); /* noop */ } void RtfAttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); // This is called when the nested table ends in a cell, and there's no // paragraph benhind that; so we must check for the ends of cell, rows, @@ -801,7 +801,7 @@ void RtfAttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer void RtfAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); const SwTable *pTable = pTableTextNodeInfoInner->getTable(); SwFrmFmt *pFmt = pTable->GetFrmFmt( ); @@ -831,12 +831,12 @@ void RtfAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t void RtfAttributeOutput::TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ ) { - OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); + OSL_TRACE("TODO: %s", OSL_THIS_FUNC); } void RtfAttributeOutput::TableRowEnd( sal_uInt32 /*nDepth*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); /* noop, see EndTableRow() */ } @@ -847,7 +847,7 @@ void RtfAttributeOutput::TableRowEnd( sal_uInt32 /*nDepth*/ ) void RtfAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); sal_uInt32 nPageSize = 0; bool bRelBoxSize = false; @@ -869,7 +869,7 @@ void RtfAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t void RtfAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); /* noop */ } @@ -877,7 +877,7 @@ void RtfAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t /*pTa void RtfAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { sal_uInt32 nCurrentDepth = pTableTextNodeInfoInner->getDepth(); - OSL_TRACE("%s, (depth is %d)", __PRETTY_FUNCTION__, (int)nCurrentDepth); + OSL_TRACE("%s, (depth is %d)", OSL_THIS_FUNC, (int)nCurrentDepth); TableDefinition(pTableTextNodeInfoInner); @@ -889,14 +889,14 @@ void RtfAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pT void RtfAttributeOutput::StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_bTableCellOpen = true; } void RtfAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); TableDefaultBorders(pTableTextNodeInfoInner); TableBackgrounds(pTableTextNodeInfoInner); @@ -905,7 +905,7 @@ void RtfAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Pointe void RtfAttributeOutput::EndTableCell( ) { - OSL_TRACE("%s, (depth is %d)", __PRETTY_FUNCTION__, (int)m_nTableDepth); + OSL_TRACE("%s, (depth is %d)", OSL_THIS_FUNC, (int)m_nTableDepth); if ( m_nTableDepth > 1 ) m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_NESTCELL); @@ -918,7 +918,7 @@ void RtfAttributeOutput::EndTableCell( ) void RtfAttributeOutput::EndTableRow( ) { - OSL_TRACE("%s, (depth is %d)", __PRETTY_FUNCTION__, (int)m_nTableDepth); + OSL_TRACE("%s, (depth is %d)", OSL_THIS_FUNC, (int)m_nTableDepth); if ( m_nTableDepth > 1 ) { @@ -932,7 +932,7 @@ void RtfAttributeOutput::EndTableRow( ) void RtfAttributeOutput::EndTable() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( m_nTableDepth > 0 ) m_nTableDepth--; @@ -947,7 +947,7 @@ void RtfAttributeOutput::EndTable() void RtfAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool /*bForceEmptyParagraph*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( pInner.get() ) { @@ -973,7 +973,7 @@ void RtfAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer void RtfAttributeOutput::StartStyles() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_rExport.Strm() << m_rExport.sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_COLORTBL; m_rExport.OutColorTable(); OSL_ENSURE(m_aStylesheet.getLength() == 0, "m_aStylesheet is not empty"); @@ -984,7 +984,7 @@ void RtfAttributeOutput::StartStyles() void RtfAttributeOutput::EndStyles( USHORT /*nNumberOfStyles*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_rExport.Strm() << '}'; m_rExport.Strm() << m_aStylesheet.makeStringAndClear(); m_rExport.Strm() << '}'; @@ -992,7 +992,7 @@ void RtfAttributeOutput::EndStyles( USHORT /*nNumberOfStyles*/ ) void RtfAttributeOutput::DefaultStyle( USHORT /*nStyle*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); /* noop, the default style is always 0 in RTF */ } @@ -1000,7 +1000,7 @@ void RtfAttributeOutput::DefaultStyle( USHORT /*nStyle*/ ) void RtfAttributeOutput::StartStyle( const String& rName, bool /*bPapFmt*/, USHORT nBase, USHORT nNext, USHORT /*nWwId*/, USHORT nId ) { - OSL_TRACE("%s, rName = '%s'", __PRETTY_FUNCTION__, + OSL_TRACE("%s, rName = '%s'", OSL_THIS_FUNC, OUStringToOString( OUString( rName ), m_rExport.eCurrentEncoding ).getStr()); m_aStylesheet.append('{'); @@ -1022,7 +1022,7 @@ void RtfAttributeOutput::StartStyle( const String& rName, bool /*bPapFmt*/, void RtfAttributeOutput::EndStyle() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(m_aStylesEnd.makeStringAndClear()); OString aStyles = m_aStyles.makeStringAndClear(); m_rExport.InsStyle(m_nStyleId, aStyles); @@ -1035,19 +1035,19 @@ void RtfAttributeOutput::EndStyle() void RtfAttributeOutput::StartStyleProperties( bool /*bParProp*/, USHORT /*nStyle*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); /* noop */ } void RtfAttributeOutput::EndStyleProperties( bool /*bParProp*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); /* noop */ } void RtfAttributeOutput::OutlineNumbering( BYTE nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( nLvl >= WW8ListManager::nMaxLevel ) nLvl = WW8ListManager::nMaxLevel - 1; @@ -1058,7 +1058,7 @@ void RtfAttributeOutput::OutlineNumbering( BYTE nLvl, const SwNumFmt& /*rNFmt*/, void RtfAttributeOutput::PageBreakBefore( bool bBreak ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if (bBreak) { @@ -1068,7 +1068,7 @@ void RtfAttributeOutput::PageBreakBefore( bool bBreak ) void RtfAttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); switch (nC) { @@ -1084,7 +1084,7 @@ void RtfAttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo void RtfAttributeOutput::StartSection() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_SECT OOO_STRING_SVTOOLS_RTF_SECTD); if (!m_bBufferSectionBreaks) @@ -1093,7 +1093,7 @@ void RtfAttributeOutput::StartSection() void RtfAttributeOutput::EndSection() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); /* * noop, \sect must go to StartSection or Word won't notice multiple @@ -1103,7 +1103,7 @@ void RtfAttributeOutput::EndSection() void RtfAttributeOutput::SectionFormProtection( bool bProtected ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_SECTUNLOCKED); m_aSectionBreaks.append((sal_Int32)!bProtected); @@ -1111,7 +1111,7 @@ void RtfAttributeOutput::SectionFormProtection( bool bProtected ) void RtfAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLineNumberInfo& rLnNumInfo ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LINEMOD; m_rExport.OutLong(rLnNumInfo.GetCountBy()); @@ -1123,7 +1123,7 @@ void RtfAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLin void RtfAttributeOutput::SectionTitlePage() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); /* * noop, handled in RtfExport::WriteHeaderFooter() @@ -1132,7 +1132,7 @@ void RtfAttributeOutput::SectionTitlePage() void RtfAttributeOutput::SectionPageBorders( const SwFrmFmt* pFmt, const SwFrmFmt* /*pFirstPageFmt*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); const SvxBoxItem& rBox = pFmt->GetBox(); const SvxBorderLine *pLine = rBox.GetTop(); @@ -1159,14 +1159,14 @@ void RtfAttributeOutput::SectionPageBorders( const SwFrmFmt* pFmt, const SwFrmFm void RtfAttributeOutput::SectionBiDi( bool bBiDi ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_rExport.Strm() << (bBiDi ? OOO_STRING_SVTOOLS_RTF_RTLSECT : OOO_STRING_SVTOOLS_RTF_LTRSECT); } void RtfAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if (nPageRestartNumber > 0) { @@ -1193,7 +1193,7 @@ void RtfAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRest void RtfAttributeOutput::SectionType( BYTE nBreakCode ) { - OSL_TRACE("%s, nBreakCode = %d", __PRETTY_FUNCTION__, nBreakCode); + OSL_TRACE("%s, nBreakCode = %d", OSL_THIS_FUNC, nBreakCode); /* * break code: 0 No break, 1 New column @@ -1215,7 +1215,7 @@ void RtfAttributeOutput::SectionType( BYTE nBreakCode ) void RtfAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &/*rRule*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LISTOVERRIDE; m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LISTID; @@ -1227,7 +1227,7 @@ void RtfAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &/*rRu void RtfAttributeOutput::StartAbstractNumbering( USHORT nId ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LIST << OOO_STRING_SVTOOLS_RTF_LISTTEMPLATEID; m_rExport.OutULong( nId ); @@ -1236,7 +1236,7 @@ void RtfAttributeOutput::StartAbstractNumbering( USHORT nId ) void RtfAttributeOutput::EndAbstractNumbering() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LISTID; m_rExport.OutULong( m_nListId ) << '}' << m_rExport.sNewLine; @@ -1255,7 +1255,7 @@ void RtfAttributeOutput::NumberingLevel( BYTE nLevel, sal_Int16 /*nListTabPos*/, const String &rNumberingString ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_rExport.Strm() << m_rExport.sNewLine; if( nLevel > 8 ) // RTF knows only 9 levels @@ -1343,7 +1343,7 @@ void RtfAttributeOutput::NumberingLevel( BYTE nLevel, void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eType*/, const String& rFldCmd, BYTE /*nMode*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); // NEEDSWORK this has beeen tested only with page numbers m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_FIELD); @@ -1396,7 +1396,7 @@ void RtfAttributeOutput::WriteHeaderFooter_Impl( const SwFrmFmt& rFmt, bool bHea void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Point& /*rNdTopLeft*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); const SwNode *pNode = rFrame.GetContent(); const SwGrfNode *pGrfNode = pNode ? pNode->GetGrfNode() : 0; @@ -1637,7 +1637,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi m_aRun.append("}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " "); } else - OSL_TRACE("%s unhandled form control: '%s'", __PRETTY_FUNCTION__, + OSL_TRACE("%s unhandled form control: '%s'", OSL_THIS_FUNC, OUStringToOString(xInfo->getImplementationName(), m_rExport.eCurrentEncoding).getStr()); m_aRun.append('}'); } @@ -1659,14 +1659,14 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi } break; default: - OSL_TRACE("%s: unknown type (%d)", __PRETTY_FUNCTION__, rFrame.GetWriterType()); + OSL_TRACE("%s: unknown type (%d)", OSL_THIS_FUNC, rFrame.GetWriterType()); break; } } void RtfAttributeOutput::CharCaseMap( const SvxCaseMapItem& rCaseMap ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); switch ( rCaseMap.GetValue() ) { @@ -1687,7 +1687,7 @@ void RtfAttributeOutput::CharCaseMap( const SvxCaseMapItem& rCaseMap ) void RtfAttributeOutput::CharColor( const SvxColorItem& rColor ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); const Color aColor( rColor.GetValue() ); @@ -1697,7 +1697,7 @@ void RtfAttributeOutput::CharColor( const SvxColorItem& rColor ) void RtfAttributeOutput::CharContour( const SvxContourItem& rContour ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_OUTL); if ( !rContour.GetValue() ) @@ -1706,7 +1706,7 @@ void RtfAttributeOutput::CharContour( const SvxContourItem& rContour ) void RtfAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); switch ( rCrossedOut.GetStrikeout() ) { @@ -1729,7 +1729,7 @@ void RtfAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut ) void RtfAttributeOutput::CharEscapement( const SvxEscapementItem& rEsc ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); const char * pUpDn; @@ -1779,7 +1779,7 @@ void RtfAttributeOutput::CharEscapement( const SvxEscapementItem& rEsc ) void RtfAttributeOutput::CharFont( const SvxFontItem& rFont) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_LOCH); m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_F); @@ -1789,7 +1789,7 @@ void RtfAttributeOutput::CharFont( const SvxFontItem& rFont) void RtfAttributeOutput::CharFontSize( const SvxFontHeightItem& rFontSize) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); switch ( rFontSize.Which() ) { @@ -1810,7 +1810,7 @@ void RtfAttributeOutput::CharFontSize( const SvxFontHeightItem& rFontSize) void RtfAttributeOutput::CharKerning( const SvxKerningItem& rKerning ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); // in quater points then in twips m_aStyles.append(OOO_STRING_SVTOOLS_RTF_EXPND); @@ -1821,7 +1821,7 @@ void RtfAttributeOutput::CharKerning( const SvxKerningItem& rKerning ) void RtfAttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); switch (rLanguage.Which()) { @@ -1842,7 +1842,7 @@ void RtfAttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage ) void RtfAttributeOutput::CharPosture( const SvxPostureItem& rPosture ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_I); if ( rPosture.GetPosture() == ITALIC_NONE ) @@ -1851,7 +1851,7 @@ void RtfAttributeOutput::CharPosture( const SvxPostureItem& rPosture ) void RtfAttributeOutput::CharShadow( const SvxShadowedItem& rShadow ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_SHAD); if ( !rShadow.GetValue() ) @@ -1860,7 +1860,7 @@ void RtfAttributeOutput::CharShadow( const SvxShadowedItem& rShadow ) void RtfAttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); const char* pStr = 0; const SfxPoolItem* pItem = m_rExport.HasItem( RES_CHRATR_WORDLINEMODE ); @@ -1936,7 +1936,7 @@ void RtfAttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline ) void RtfAttributeOutput::CharWeight( const SvxWeightItem& rWeight ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_B); if ( rWeight.GetWeight() != WEIGHT_BOLD ) @@ -1945,7 +1945,7 @@ void RtfAttributeOutput::CharWeight( const SvxWeightItem& rWeight ) void RtfAttributeOutput::CharAutoKern( const SvxAutoKernItem& rAutoKern) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_KERNING); m_aStyles.append((sal_Int32) (rAutoKern.GetValue() ? 1 : 0)); @@ -1953,7 +1953,7 @@ void RtfAttributeOutput::CharAutoKern( const SvxAutoKernItem& rAutoKern) void RtfAttributeOutput::CharAnimatedText( const SvxBlinkItem& rBlink ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_ANIMTEXT); m_aStyles.append((sal_Int32) (rBlink.GetValue() ? 2 : 0)); @@ -1961,7 +1961,7 @@ void RtfAttributeOutput::CharAnimatedText( const SvxBlinkItem& rBlink ) void RtfAttributeOutput::CharBackground( const SvxBrushItem& rBrush ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if( !rBrush.GetColor().GetTransparency() ) { @@ -1972,7 +1972,7 @@ void RtfAttributeOutput::CharBackground( const SvxBrushItem& rBrush ) void RtfAttributeOutput::CharFontCJK( const SvxFontItem& rFont ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_HICH); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_AF); @@ -1981,21 +1981,21 @@ void RtfAttributeOutput::CharFontCJK( const SvxFontItem& rFont ) void RtfAttributeOutput::CharFontSizeCJK( const SvxFontHeightItem& rFontSize ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); CharFontSize( rFontSize ); } void RtfAttributeOutput::CharLanguageCJK( const SvxLanguageItem& rLanguageItem ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); CharLanguage( rLanguageItem ); } void RtfAttributeOutput::CharPostureCJK( const SvxPostureItem& rPosture ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_I); if ( rPosture.GetPosture() == ITALIC_NONE ) @@ -2004,7 +2004,7 @@ void RtfAttributeOutput::CharPostureCJK( const SvxPostureItem& rPosture ) void RtfAttributeOutput::CharWeightCJK( const SvxWeightItem& rWeight ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_B); if ( rWeight.GetWeight() != WEIGHT_BOLD ) @@ -2013,7 +2013,7 @@ void RtfAttributeOutput::CharWeightCJK( const SvxWeightItem& rWeight ) void RtfAttributeOutput::CharFontCTL( const SvxFontItem& rFont ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_DBCH); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_AF); @@ -2022,21 +2022,21 @@ void RtfAttributeOutput::CharFontCTL( const SvxFontItem& rFont ) void RtfAttributeOutput::CharFontSizeCTL( const SvxFontHeightItem& rFontSize ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); CharFontSize( rFontSize ); } void RtfAttributeOutput::CharLanguageCTL( const SvxLanguageItem& rLanguageItem ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); CharLanguage( rLanguageItem ); } void RtfAttributeOutput::CharPostureCTL( const SvxPostureItem& rPosture) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_AI); if ( rPosture.GetPosture() == ITALIC_NONE ) @@ -2045,7 +2045,7 @@ void RtfAttributeOutput::CharPostureCTL( const SvxPostureItem& rPosture) void RtfAttributeOutput::CharWeightCTL( const SvxWeightItem& rWeight ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_AB); if ( rWeight.GetWeight() != WEIGHT_BOLD ) @@ -2054,7 +2054,7 @@ void RtfAttributeOutput::CharWeightCTL( const SvxWeightItem& rWeight ) void RtfAttributeOutput::CharRotate( const SvxCharRotateItem& rRotate) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_HORZVERT); m_aStyles.append((sal_Int32)(rRotate.IsFitToLine() ? 1 : 0)); @@ -2062,7 +2062,7 @@ void RtfAttributeOutput::CharRotate( const SvxCharRotateItem& rRotate) void RtfAttributeOutput::CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisMark ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); const sal_Char* pStr; switch( rEmphasisMark.GetEmphasisMark()) @@ -2076,7 +2076,7 @@ void RtfAttributeOutput::CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisM void RtfAttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if( rTwoLines.GetValue() ) { @@ -2102,7 +2102,7 @@ void RtfAttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines ) void RtfAttributeOutput::CharScaleWidth( const SvxCharScaleWidthItem& rScaleWidth ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_CHARSCALEX); m_aStyles.append((sal_Int32)rScaleWidth.GetValue()); @@ -2110,7 +2110,7 @@ void RtfAttributeOutput::CharScaleWidth( const SvxCharScaleWidthItem& rScaleWidt void RtfAttributeOutput::CharRelief( const SvxCharReliefItem& rRelief ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); const sal_Char* pStr; switch (rRelief.GetValue()) @@ -2132,7 +2132,7 @@ void RtfAttributeOutput::CharRelief( const SvxCharReliefItem& rRelief ) void RtfAttributeOutput::CharHidden( const SvxCharHiddenItem& rHidden ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_V); if ( !rHidden.GetValue() ) @@ -2141,7 +2141,7 @@ void RtfAttributeOutput::CharHidden( const SvxCharHiddenItem& rHidden ) void RtfAttributeOutput::TextINetFormat( const SwFmtINetFmt& rURL ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if( rURL.GetValue().Len() ) { @@ -2161,7 +2161,7 @@ void RtfAttributeOutput::TextINetFormat( const SwFmtINetFmt& rURL ) void RtfAttributeOutput::TextCharFormat( const SwFmtCharFmt& rCharFmt ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); USHORT nStyle = m_rExport.GetId( *rCharFmt.GetCharFmt() ); OString* pString = m_rExport.GetStyle(nStyle); @@ -2179,7 +2179,7 @@ void RtfAttributeOutput::WriteTextFootnoteNumStr(const SwFmtFtn& rFootnote) void RtfAttributeOutput::TextFootnote_Impl( const SwFmtFtn& rFootnote ) { - OSL_TRACE("%s start", __PRETTY_FUNCTION__); + OSL_TRACE("%s start", OSL_THIS_FUNC); m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_SUPER " "); WriteTextFootnoteNumStr(rFootnote); @@ -2208,12 +2208,12 @@ void RtfAttributeOutput::TextFootnote_Impl( const SwFmtFtn& rFootnote ) m_aRun.append("}"); m_aRun.append("}"); - OSL_TRACE("%s end", __PRETTY_FUNCTION__); + OSL_TRACE("%s end", OSL_THIS_FUNC); } void RtfAttributeOutput::ParaLineSpacing_Impl( short nSpace, short nMulti ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_SL); m_aStyles.append((sal_Int32)nSpace); @@ -2224,7 +2224,7 @@ void RtfAttributeOutput::ParaLineSpacing_Impl( short nSpace, short nMulti ) void RtfAttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); switch ( rAdjust.GetAdjust() ) { @@ -2248,7 +2248,7 @@ void RtfAttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust ) void RtfAttributeOutput::ParaSplit( const SvxFmtSplitItem& rSplit ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if( !rSplit.GetValue() ) m_aStyles.append(OOO_STRING_SVTOOLS_RTF_KEEP); @@ -2256,7 +2256,7 @@ void RtfAttributeOutput::ParaSplit( const SvxFmtSplitItem& rSplit ) void RtfAttributeOutput::ParaWidows( const SvxWidowsItem& rWidows ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if (rWidows.GetValue()) m_aStyles.append(OOO_STRING_SVTOOLS_RTF_WIDCTLPAR); @@ -2266,7 +2266,7 @@ void RtfAttributeOutput::ParaWidows( const SvxWidowsItem& rWidows ) void RtfAttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStop ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); long nOffset = ((SvxLRSpaceItem&)m_rExport.GetItem( RES_LR_SPACE )).GetTxtLeft(); for( USHORT n = 0; n < rTabStop.Count(); n++ ) @@ -2320,7 +2320,7 @@ void RtfAttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStop ) void RtfAttributeOutput::ParaHyphenZone( const SvxHyphenZoneItem& rHyphenZone ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); sal_Int32 nFlags = rHyphenZone.IsHyphen() ? 1 : 0; if( rHyphenZone.IsPageEnd() ) @@ -2340,7 +2340,7 @@ void RtfAttributeOutput::ParaHyphenZone( const SvxHyphenZoneItem& rHyphenZone ) void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nLvl, sal_Int32 nNumId ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( USHRT_MAX == nNumId || 0 == nNumId || 0 == pTxtNd) return; @@ -2427,7 +2427,7 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL void RtfAttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if (!rScriptSpace.GetValue( )) return; @@ -2450,7 +2450,7 @@ void RtfAttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace ) void RtfAttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); const char* pStr; switch ( rAlign.GetValue() ) @@ -2467,12 +2467,12 @@ void RtfAttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign ) void RtfAttributeOutput::ParaSnapToGrid( const SvxParaGridItem& /*rGrid*/ ) { - OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); + OSL_TRACE("TODO: %s", OSL_THIS_FUNC); } void RtfAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( m_rExport.bOutFlyFrmAttrs && m_rExport.bRTFFlySyntax ) { @@ -2504,12 +2504,12 @@ void RtfAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize ) void RtfAttributeOutput::FormatPaperBin( const SvxPaperBinItem& ) { - OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); + OSL_TRACE("TODO: %s", OSL_THIS_FUNC); } void RtfAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( !m_rExport.bOutFlyFrmAttrs ) { @@ -2546,7 +2546,7 @@ void RtfAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace ) void RtfAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( !m_rExport.bOutFlyFrmAttrs ) { @@ -2577,7 +2577,7 @@ void RtfAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace ) void RtfAttributeOutput::FormatSurround( const SwFmtSurround& rSurround ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( m_rExport.bOutFlyFrmAttrs && !m_rExport.bRTFFlySyntax ) { @@ -2593,7 +2593,7 @@ void RtfAttributeOutput::FormatSurround( const SwFmtSurround& rSurround ) void RtfAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& rFlyVert ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( m_rExport.bOutFlyFrmAttrs && m_rExport.bRTFFlySyntax ) { @@ -2631,7 +2631,7 @@ void RtfAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& rFlyVert void RtfAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHori ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( m_rExport.bOutFlyFrmAttrs && m_rExport.bRTFFlySyntax ) { @@ -2669,7 +2669,7 @@ void RtfAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHori void RtfAttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( !m_rExport.bRTFFlySyntax ) { @@ -2692,7 +2692,7 @@ void RtfAttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor ) void RtfAttributeOutput::FormatBackground( const SvxBrushItem& rBrush ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if( !rBrush.GetColor().GetTransparency() ) { @@ -2703,7 +2703,7 @@ void RtfAttributeOutput::FormatBackground( const SvxBrushItem& rBrush ) void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); static USHORT __READONLY_DATA aBorders[] = { BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT }; @@ -2756,7 +2756,7 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox ) void RtfAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_COLS; m_rExport.OutLong( nCols ); @@ -2789,7 +2789,7 @@ void RtfAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol, void RtfAttributeOutput::FormatKeep( const SvxFmtKeepItem& rItem ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if( rItem.GetValue() ) m_aStyles.append(OOO_STRING_SVTOOLS_RTF_KEEPN); @@ -2797,12 +2797,12 @@ void RtfAttributeOutput::FormatKeep( const SvxFmtKeepItem& rItem ) void RtfAttributeOutput::FormatTextGrid( const SwTextGridItem& /*rGrid*/ ) { - OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); + OSL_TRACE("TODO: %s", OSL_THIS_FUNC); } void RtfAttributeOutput::FormatLineNumbering( const SwFmtLineNumber& rNumbering ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( !rNumbering.IsCount( ) ) m_aStyles.append(OOO_STRING_SVTOOLS_RTF_NOLINE); @@ -2810,7 +2810,7 @@ void RtfAttributeOutput::FormatLineNumbering( const SwFmtLineNumber& rNumbering void RtfAttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDirection ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if (!m_rExport.bOutPageDescs) { @@ -2823,27 +2823,27 @@ void RtfAttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir void RtfAttributeOutput::WriteExpand( const SwField* /*pFld*/ ) { - OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); + OSL_TRACE("TODO: %s", OSL_THIS_FUNC); } void RtfAttributeOutput::RefField( const SwField& /*rFld*/, const String& /*rRef*/ ) { - OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); + OSL_TRACE("TODO: %s", OSL_THIS_FUNC); } void RtfAttributeOutput::HiddenField( const SwField& /*rFld*/ ) { - OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); + OSL_TRACE("TODO: %s", OSL_THIS_FUNC); } void RtfAttributeOutput::SetField( const SwField& /*rFld*/, ww::eField /*eType*/, const String& /*rCmd*/ ) { - OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); + OSL_TRACE("TODO: %s", OSL_THIS_FUNC); } void RtfAttributeOutput::PostitField( const SwField* pFld ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); const SwPostItField& rPFld = *(SwPostItField*)pFld; @@ -2879,12 +2879,12 @@ RtfAttributeOutput::RtfAttributeOutput( RtfExport &rExport ) m_bBufferSectionBreaks( false ), m_bBufferSectionHeaders( false ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); } RtfAttributeOutput::~RtfAttributeOutput() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); } MSWordExportBase& RtfAttributeOutput::GetExport() @@ -2897,7 +2897,7 @@ MSWordExportBase& RtfAttributeOutput::GetExport() /// Start the font. void RtfAttributeOutput::StartFont( const String& rFamilyName ) const { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_rExport.Strm() << OUStringToOString( OUString( rFamilyName ), m_rExport.eCurrentEncoding ).getStr(); } @@ -2905,7 +2905,7 @@ void RtfAttributeOutput::StartFont( const String& rFamilyName ) const /// End the font. void RtfAttributeOutput::EndFont() const { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_rExport.Strm() << ";}"; } @@ -2913,7 +2913,7 @@ void RtfAttributeOutput::EndFont() const /// Alternate name for the font. void RtfAttributeOutput::FontAlternateName( const String& rName ) const { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_FALT << ' '; m_rExport.Strm() << OUStringToOString( OUString( rName ), m_rExport.eCurrentEncoding ) << '}'; @@ -2922,7 +2922,7 @@ void RtfAttributeOutput::FontAlternateName( const String& rName ) const /// Font charset. void RtfAttributeOutput::FontCharset( sal_uInt8 nCharSet ) const { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_FCHARSET; m_rExport.OutULong( nCharSet ); @@ -2932,7 +2932,7 @@ void RtfAttributeOutput::FontCharset( sal_uInt8 nCharSet ) const /// Font family. void RtfAttributeOutput::FontFamilyType( FontFamily eFamily, const wwFont &rFont ) const { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_F; @@ -2963,7 +2963,7 @@ void RtfAttributeOutput::FontFamilyType( FontFamily eFamily, const wwFont &rFont /// Font pitch. void RtfAttributeOutput::FontPitchType( FontPitch ePitch ) const { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_FPRQ; @@ -3113,7 +3113,7 @@ static OString ExportPICT(const Size &rOrig, const Size &rRendered, const Size & void RtfAttributeOutput::FlyFrameOLEData( SwOLENode& rOLENode ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); uno::Reference < embed::XEmbeddedObject > xObj(const_cast(rOLENode).GetOLEObj().GetOleRef()); sal_Int64 nAspect = rOLENode.GetAspect(); @@ -3156,7 +3156,7 @@ void RtfAttributeOutput::FlyFrameOLEData( SwOLENode& rOLENode ) void RtfAttributeOutput::FlyFrameOLE( SwOLENode& rOLENode, const Size& rSize ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); SvMemoryStream aStream; const sal_uInt8* pGraphicAry = 0; @@ -3196,7 +3196,7 @@ void RtfAttributeOutput::FlyFrameOLE( SwOLENode& rOLENode, const Size& rSize ) void RtfAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); SvMemoryStream aStream; const sal_uInt8* pGraphicAry = 0; diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index f46fffbb2d..9bbd393b33 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -154,7 +154,7 @@ bool RtfExport::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich ) void RtfExport::AppendBookmarks( const SwTxtNode& rNode, xub_StrLen nAktPos, xub_StrLen nLen ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); std::vector< OUString > aStarts; std::vector< OUString > aEnds; @@ -182,7 +182,7 @@ void RtfExport::AppendBookmarks( const SwTxtNode& rNode, xub_StrLen nAktPos, xub void RtfExport::AppendBookmark( const OUString& rName, bool /*bSkip*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); std::vector aStarts; std::vector aEnds; @@ -195,7 +195,7 @@ void RtfExport::AppendBookmark( const OUString& rName, bool /*bSkip*/ ) void RtfExport::WriteChar( sal_Unicode ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); /* WriteChar() has nothing to do for rtf. */ } @@ -245,7 +245,7 @@ void RtfExport::BuildNumbering() void RtfExport::WriteNumbering() { - OSL_TRACE("%s start", __PRETTY_FUNCTION__); + OSL_TRACE("%s start", OSL_THIS_FUNC); if ( !pUsedNumTbl ) return; // no numbering is used @@ -258,12 +258,12 @@ void RtfExport::WriteNumbering() NumberingDefinitions(); Strm() << '}'; - OSL_TRACE("%s end", __PRETTY_FUNCTION__); + OSL_TRACE("%s end", OSL_THIS_FUNC); } void RtfExport::WriteRevTab() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); int nRevAuthors = pDoc->GetRedlineTbl().Count(); @@ -291,7 +291,7 @@ void RtfExport::WriteRevTab() void RtfExport::WriteHeadersFooters( BYTE nHeadFootFlags, const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE /*nBreakCode*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); // headers if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_EVEN ) @@ -316,19 +316,19 @@ void RtfExport::WriteHeadersFooters( BYTE nHeadFootFlags, void RtfExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, BYTE nMode ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_pAttrOutput->WriteField_Impl( pFld, eFldType, rFldCmd, nMode ); } void RtfExport::WriteFormData( const ::sw::mark::IFieldmark& /*rFieldmark*/ ) { - OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); + OSL_TRACE("TODO: %s", OSL_THIS_FUNC); } void RtfExport::WriteHyperlinkData( const ::sw::mark::IFieldmark& /*rFieldmark*/ ) { - OSL_TRACE("TODO: %s", __PRETTY_FUNCTION__); + OSL_TRACE("TODO: %s", OSL_THIS_FUNC); } void RtfExport::DoComboBox(const rtl::OUString& /*rName*/, @@ -337,21 +337,21 @@ void RtfExport::DoComboBox(const rtl::OUString& /*rName*/, const rtl::OUString& /*rSelected*/, uno::Sequence& /*rListItems*/) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); // this is handled in RtfAttributeOutput::OutputFlyFrame_Impl } void RtfExport::DoFormText(const SwInputField* /*pFld*/) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); // this is hanled in RtfAttributeOutput::OutputFlyFrame_Impl } ULONG RtfExport::ReplaceCr( BYTE ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); // Completely unused for Rtf export... only here for code sharing // purpose with binary export @@ -368,21 +368,21 @@ void RtfExport::WriteFonts() void RtfExport::WriteStyles() { - OSL_TRACE("%s start", __PRETTY_FUNCTION__); + OSL_TRACE("%s start", OSL_THIS_FUNC); pStyles->OutputStylesTable(); - OSL_TRACE("%s end", __PRETTY_FUNCTION__); + OSL_TRACE("%s end", OSL_THIS_FUNC); } void RtfExport::WriteMainText() { - OSL_TRACE("%s start", __PRETTY_FUNCTION__); + OSL_TRACE("%s start", OSL_THIS_FUNC); WriteText(); - OSL_TRACE("%s end", __PRETTY_FUNCTION__); + OSL_TRACE("%s end", OSL_THIS_FUNC); } void RtfExport::WriteInfo() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); Strm() << '{' << OOO_STRING_SVTOOLS_RTF_INFO; SwDocShell *pDocShell(pDoc->GetDocShell()); @@ -420,7 +420,7 @@ void RtfExport::WriteInfo() void RtfExport::WritePageDescTable() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); // Write page descriptions (page styles) USHORT nSize = pDoc->GetPageDescCnt(); @@ -677,7 +677,7 @@ void RtfExport::PrepareNewPageDesc( const SfxItemSet* pSet, const SwNode& rNd, const SwFmtPageDesc* pNewPgDescFmt, const SwPageDesc* pNewPgDesc ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); const SwSectionFmt* pFmt = GetSectionFormat( rNd ); const ULONG nLnNm = GetSectionLineNo( pSet, rNd ); @@ -695,7 +695,7 @@ bool RtfExport::DisallowInheritingOutlineNumbering( const SwFmt& rFmt ) { bool bRet( false ); - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if (SFX_ITEM_SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false)) { @@ -716,21 +716,21 @@ bool RtfExport::DisallowInheritingOutlineNumbering( const SwFmt& rFmt ) void RtfExport::OutputGrfNode( const SwGrfNode& ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); /* noop, see RtfAttributeOutput::FlyFrameGraphic */ } void RtfExport::OutputOLENode( const SwOLENode& ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); /* noop, see RtfAttributeOutput::FlyFrameOLE */ } void RtfExport::AppendSection( const SwPageDesc* pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_pSections->AppendSection( pPageDesc, pFmt, nLnNum ); AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() ); @@ -898,7 +898,7 @@ OString RtfExport::OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEn OString RtfExport::OutString(const String &rStr, rtl_TextEncoding eDestEnc) { - OSL_TRACE("%s, rStr = '%s'", __PRETTY_FUNCTION__, + OSL_TRACE("%s, rStr = '%s'", OSL_THIS_FUNC, OUStringToOString( OUString( rStr ), eCurrentEncoding ).getStr()); OStringBuffer aBuf; int nUCMode = 1; @@ -926,7 +926,7 @@ USHORT RtfExport::GetColor( const Color& rColor ) const { for (RtfColorTbl::const_iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); it++ ) if ((*it).second == rColor) { - OSL_TRACE("%s returning %d (%d,%d,%d)", __PRETTY_FUNCTION__, (*it).first, rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue()); + OSL_TRACE("%s returning %d (%d,%d,%d)", OSL_THIS_FUNC, (*it).first, rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue()); return (*it).first; } OSL_ENSURE( FALSE, "No such Color in m_aColTbl!" ); @@ -1105,7 +1105,7 @@ USHORT RtfExport::GetRedline( const String& rAuthor ) void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage ) { - OSL_TRACE("%s start", __PRETTY_FUNCTION__); + OSL_TRACE("%s start", OSL_THIS_FUNC); const SwPageDesc *pSave = pAktPageDesc; pAktPageDesc = &rPgDsc; @@ -1155,7 +1155,7 @@ void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, pAktPageDesc = pSave; //bOutPageDesc = bOldOut; - OSL_TRACE("%s end", __PRETTY_FUNCTION__); + OSL_TRACE("%s end", OSL_THIS_FUNC); } void RtfExport::WriteHeaderFooter(const SfxPoolItem& rItem, bool bHeader) @@ -1173,7 +1173,7 @@ void RtfExport::WriteHeaderFooter(const SfxPoolItem& rItem, bool bHeader) return; } - OSL_TRACE("%s start", __PRETTY_FUNCTION__); + OSL_TRACE("%s start", OSL_THIS_FUNC); Strm() << (bHeader ? OOO_STRING_SVTOOLS_RTF_HEADERY : OOO_STRING_SVTOOLS_RTF_FOOTERY); OutLong( pAktPageDesc->GetMaster(). @@ -1189,16 +1189,16 @@ void RtfExport::WriteHeaderFooter(const SfxPoolItem& rItem, bool bHeader) WriteHeaderFooterText(pAktPageDesc->GetMaster(), bHeader); Strm() << '}'; - OSL_TRACE("%s end", __PRETTY_FUNCTION__); + OSL_TRACE("%s end", OSL_THIS_FUNC); } void RtfExport::WriteHeaderFooter(const SwFrmFmt& rFmt, bool bHeader, const sal_Char* pStr) { - OSL_TRACE("%s start", __PRETTY_FUNCTION__); + OSL_TRACE("%s start", OSL_THIS_FUNC); m_pAttrOutput->WriteHeaderFooter_Impl( rFmt, bHeader, pStr ); - OSL_TRACE("%s end", __PRETTY_FUNCTION__); + OSL_TRACE("%s end", OSL_THIS_FUNC); } class SwRTFWriter : public Writer @@ -1211,7 +1211,7 @@ class SwRTFWriter : public Writer SwRTFWriter::SwRTFWriter( const String& /*rFltName*/, const String & rBaseURL ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); SetBaseURL( rBaseURL ); } @@ -1220,7 +1220,7 @@ SwRTFWriter::~SwRTFWriter() ULONG SwRTFWriter::WriteStream() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); RtfExport aExport( NULL, pDoc, new SwPaM( *pCurPam->End(), *pCurPam->Start() ), pCurPam, this ); aExport.ExportDocument( true ); return 0; @@ -1228,7 +1228,7 @@ ULONG SwRTFWriter::WriteStream() extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL ExportRTF( const String& rFltName, const String& rBaseURL, WriterRef& xRet ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); xRet = new SwRTFWriter( rFltName, rBaseURL ); } diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx index ba040b96ed..01e1de7d5e 100644 --- a/sw/source/filter/ww8/rtfexportfilter.cxx +++ b/sw/source/filter/ww8/rtfexportfilter.cxx @@ -54,7 +54,7 @@ RtfExportFilter::~RtfExportFilter() sal_Bool RtfExportFilter::filter( const uno::Sequence< beans::PropertyValue >& aDescriptor ) throw (uno::RuntimeException) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); MediaDescriptor aMediaDesc = aDescriptor; ::uno::Reference< io::XStream > xStream = diff --git a/sw/source/filter/ww8/rtfimportfilter.cxx b/sw/source/filter/ww8/rtfimportfilter.cxx index 58c09ac626..a7a294a231 100644 --- a/sw/source/filter/ww8/rtfimportfilter.cxx +++ b/sw/source/filter/ww8/rtfimportfilter.cxx @@ -59,7 +59,7 @@ RtfImportFilter::~RtfImportFilter() sal_Bool RtfImportFilter::filter( const uno::Sequence< beans::PropertyValue >& aDescriptor ) throw (uno::RuntimeException) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); MediaDescriptor aMediaDesc = aDescriptor; ::uno::Reference< io::XInputStream > xInputStream = diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index ac3baf2e48..ecc1218d43 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -90,7 +90,7 @@ RtfSdrExport::~RtfSdrExport() void RtfSdrExport::OpenContainer( UINT16 nEscherContainer, int nRecInstance ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); EscherEx::OpenContainer( nEscherContainer, nRecInstance ); @@ -106,7 +106,7 @@ void RtfSdrExport::OpenContainer( UINT16 nEscherContainer, int nRecInstance ) void RtfSdrExport::CloseContainer() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( mRecTypes.back() == ESCHER_SpContainer ) { @@ -123,21 +123,21 @@ void RtfSdrExport::CloseContainer() UINT32 RtfSdrExport::EnterGroup( const String& /*rShapeName*/, const Rectangle* /*pRect*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); return GenerateShapeId(); } void RtfSdrExport::LeaveGroup() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); /* noop */ } void RtfSdrExport::AddShape( UINT32 nShapeType, UINT32 nShapeFlags, UINT32 /*nShapeId*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); m_nShapeType = nShapeType; m_nShapeFlags = nShapeFlags; @@ -175,7 +175,7 @@ inline sal_Int32 impl_GetPointComponent( const sal_uInt8* &pVal, sal_uInt16 nPoi void RtfSdrExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( m_nShapeType == ESCHER_ShpInst_Nil ) return; @@ -342,7 +342,7 @@ void RtfSdrExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRe case 0x8000: // end break; default: - OSL_TRACE("%s: unhandled segment '%x' in the path", __PRETTY_FUNCTION__, nSeg); + OSL_TRACE("%s: unhandled segment '%x' in the path", OSL_THIS_FUNC, nSeg); break; } } @@ -359,7 +359,7 @@ void RtfSdrExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRe m_aShapeProps.insert(std::pair(OString("pSegmentInfo"), aSegmentInfo.makeStringAndClear())); } else - OSL_TRACE("%s: unhandled shape path, missing either pVertices or pSegmentInfo", __PRETTY_FUNCTION__); + OSL_TRACE("%s: unhandled shape path, missing either pVertices or pSegmentInfo", OSL_THIS_FUNC); } break; case ESCHER_Prop_shapePath: @@ -391,7 +391,7 @@ void RtfSdrExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRe m_aShapeProps.insert(std::pair(OString("txflTextFlow"), OString::valueOf(sal_Int32(it->nPropValue)))); break; default: - OSL_TRACE("%s: unhandled property: %d (value: %d)", __PRETTY_FUNCTION__, nId, it->nPropValue); + OSL_TRACE("%s: unhandled property: %d (value: %d)", OSL_THIS_FUNC, nId, it->nPropValue); break; } } @@ -399,7 +399,7 @@ void RtfSdrExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRe void RtfSdrExport::AddLineDimensions( const Rectangle& rRectangle ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); // We get the position relative to (the current?) character m_aShapeProps.insert(std::pair(OString("posrelh"), OString::valueOf(sal_Int32(3)))); @@ -427,7 +427,7 @@ void RtfSdrExport::AddLineDimensions( const Rectangle& rRectangle ) void RtfSdrExport::AddRectangleDimensions( rtl::OStringBuffer& rBuffer, const Rectangle& rRectangle ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); // We get the position relative to (the current?) character m_aShapeProps.insert(std::pair(OString("posrelh"), OString::valueOf(sal_Int32(3)))); @@ -440,7 +440,7 @@ void RtfSdrExport::AddRectangleDimensions( rtl::OStringBuffer& rBuffer, const Re void RtfSdrExport::AddShapeAttribute( sal_Int32 /*nAttribute*/, const rtl::OString& /*rValue*/ ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); /* noop */ } @@ -449,7 +449,7 @@ extern const char* pShapeTypes[]; sal_Int32 RtfSdrExport::StartShape() { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( m_nShapeType == ESCHER_ShpInst_Nil ) return -1; @@ -507,7 +507,7 @@ sal_Int32 RtfSdrExport::StartShape() void RtfSdrExport::WriteOutliner(const OutlinerParaObject& rParaObj) { - OSL_TRACE("%s start", __PRETTY_FUNCTION__); + OSL_TRACE("%s start", OSL_THIS_FUNC); const EditTextObject& rEditObj = rParaObj.GetTextObject(); MSWord_SdrAttrIter aAttrIter( m_rExport, rEditObj, TXT_HFTXTBOX ); @@ -555,12 +555,12 @@ void RtfSdrExport::WriteOutliner(const OutlinerParaObject& rParaObj) } m_rAttrOutput.RunText().append(OOO_STRING_SVTOOLS_RTF_PAR).append('}'); - OSL_TRACE("%s end", __PRETTY_FUNCTION__); + OSL_TRACE("%s end", OSL_THIS_FUNC); } void RtfSdrExport::EndShape( sal_Int32 nShapeElement ) { - OSL_TRACE("%s", __PRETTY_FUNCTION__); + OSL_TRACE("%s", OSL_THIS_FUNC); if ( nShapeElement >= 0 ) { -- cgit v1.2.3 From 364856b724ccd5d4e8e8136e2e399c32f357aac2 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 17 Aug 2010 16:46:36 +0200 Subject: cws sw33bf08: #i113584#, #i113587# transliteration fixed --- sw/inc/undobj.hxx | 6 +- sw/source/core/doc/docedt.cxx | 33 +++-- sw/source/core/txtnode/txtedt.cxx | 271 +++++++++++++++++++++++++++++++++----- sw/source/core/undo/unovwr.cxx | 136 +++++++++---------- 4 files changed, 326 insertions(+), 120 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index 0fe4953bba..c05cfcd9bb 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -27,9 +27,7 @@ #ifndef SW_UNDOBJ_HXX #define SW_UNDOBJ_HXX -// --> OD 2006-11-01 #130889# #include -// <-- #include #include @@ -1718,7 +1716,7 @@ public: struct _UndoTransliterate_Data; class SwUndoTransliterate : public SwUndo, public SwUndRng { - _UndoTransliterate_Data *pData, *pLastData; + std::vector< _UndoTransliterate_Data * > aChanges; sal_uInt32 nType; public: @@ -1732,7 +1730,7 @@ public: void AddChanges( SwTxtNode& rTNd, xub_StrLen nStart, xub_StrLen nLen, ::com::sun::star::uno::Sequence & rOffsets ); - BOOL HasData() const {return 0 != pData; } + BOOL HasData() const { return aChanges.size() > 0; } }; //-------------------------------------------------------------------- diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 08fc9681bf..6413ef7e0d 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -72,6 +73,8 @@ #include #include +#include + using ::rtl::OUString; using namespace ::com::sun::star; using namespace ::com::sun::star::linguistic2; @@ -2653,8 +2656,9 @@ bool SwDoc::DelFullPara( SwPaM& rPam ) } -void SwDoc::TransliterateText( const SwPaM& rPaM, - utl::TransliterationWrapper& rTrans ) +void SwDoc::TransliterateText( + const SwPaM& rPaM, + utl::TransliterationWrapper& rTrans ) { SwUndoTransliterate* pUndo; if( DoesUndo() ) @@ -2663,15 +2667,17 @@ void SwDoc::TransliterateText( const SwPaM& rPaM, pUndo = 0; const SwPosition* pStt = rPaM.Start(), - * pEnd = pStt == rPaM.GetPoint() ? rPaM.GetMark() - : rPaM.GetPoint(); - ULONG nSttNd = pStt->nNode.GetIndex(), nEndNd = pEnd->nNode.GetIndex(); + * pEnd = rPaM.End(); + ULONG nSttNd = pStt->nNode.GetIndex(), + nEndNd = pEnd->nNode.GetIndex(); xub_StrLen nSttCnt = pStt->nContent.GetIndex(), nEndCnt = pEnd->nContent.GetIndex(); SwTxtNode* pTNd = pStt->nNode.GetNode().GetTxtNode(); - if( pStt == pEnd && pTNd ) // no region ? + if( pStt == pEnd && pTNd ) // no selection? { + // set current word as 'area of effect' + Boundary aBndry; if( pBreakIt->GetBreakIter().is() ) aBndry = pBreakIt->GetBreakIter()->getWordBoundary( @@ -2687,21 +2693,24 @@ void SwDoc::TransliterateText( const SwPaM& rPaM, } } - if( nSttNd != nEndNd ) + if( nSttNd != nEndNd ) // is more than one text node involved? { + // iterate over all effected text nodes, the first and the last one + // may be incomplete because the selection starts and/or ends there + SwNodeIndex aIdx( pStt->nNode ); if( nSttCnt ) { aIdx++; if( pTNd ) - pTNd->TransliterateText( rTrans, nSttCnt, - pTNd->GetTxt().Len(), pUndo ); + pTNd->TransliterateText( rTrans, nSttCnt, pTNd->GetTxt().Len(), pUndo ); } for( ; aIdx.GetIndex() < nEndNd; aIdx++ ) + { if( 0 != ( pTNd = aIdx.GetNode().GetTxtNode() )) - pTNd->TransliterateText( rTrans, 0, pTNd->GetTxt().Len(), - pUndo ); + pTNd->TransliterateText( rTrans, 0, pTNd->GetTxt().Len(), pUndo ); + } if( nEndCnt && 0 != ( pTNd = pEnd->nNode.GetNode().GetTxtNode() )) pTNd->TransliterateText( rTrans, 0, nEndCnt, pUndo ); @@ -2721,6 +2730,8 @@ void SwDoc::TransliterateText( const SwPaM& rPaM, } SetModified(); } + + #define MAX_REDLINE_COUNT 250 // ----------------------------------------------------------------------------- void SwDoc::checkRedlining(RedlineMode_t& _rReadlineMode) diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index e3f5fdcae8..19af8908fa 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -36,6 +36,7 @@ #include // clock() #include #endif + #include #include #include @@ -46,9 +47,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -86,6 +84,15 @@ #include +#include +#include +#include +#include +#include + +#include + + using rtl::OUString; using namespace ::com::sun::star; using namespace ::com::sun::star::frame; @@ -1578,49 +1585,247 @@ void SwLinguStatistik::Flush() #endif + +struct TransliterationChgData +{ + xub_StrLen nStart; + xub_StrLen nLen; + String sChanged; + Sequence< sal_Int32 > aOffsets; +}; + // change text to Upper/Lower/Hiragana/Katagana/... -void SwTxtNode::TransliterateText( utl::TransliterationWrapper& rTrans, - xub_StrLen nStt, xub_StrLen nEnd, SwUndoTransliterate* pUndo ) +void SwTxtNode::TransliterateText( + utl::TransliterationWrapper& rTrans, + xub_StrLen nStt, xub_StrLen nEnd, + SwUndoTransliterate* pUndo ) { - if( nStt < nEnd ) + if (nStt < nEnd && pBreakIt->GetBreakIter().is()) { - SwLanguageIterator* pIter; - if( rTrans.needLanguageForTheMode() ) - pIter = new SwLanguageIterator( *this, nStt ); - else - pIter = 0; + // since we don't use Hiragana/Katakana or half-width/full-width transliterations here + // it is fine to use ANYWORD_IGNOREWHITESPACES. (ANY_WORD btw is broken and will + // occasionaly miss words in consecutive sentences). Also with ANYWORD_IGNOREWHITESPACES + // text like 'just-in-time' will be converted to 'Just-In-Time' which seems to be the + // proper thing to do. + const sal_Int16 nWordType = WordType::ANYWORD_IGNOREWHITESPACES; + + //! In order to have less trouble with changing text size, e.g. because + //! of ligatures or � (German small sz) being resolved, we need to process + //! the text replacements from end to start. + //! This way the offsets for the yet to be changed words will be + //! left unchanged by the already replaced text. + //! For this we temporarily save the changes to be done in this vector + std::vector< TransliterationChgData > aChanges; + TransliterationChgData aChgData; + + if (rTrans.getType() == (sal_uInt32)TransliterationModulesExtra::TITLE_CASE) + { + // for 'capitalize every word' we need to iterate over each word + + Boundary aSttBndry; + Boundary aEndBndry; + aSttBndry = pBreakIt->GetBreakIter()->getWordBoundary( + GetTxt(), nStt, + pBreakIt->GetLocale( GetLang( nStt ) ), + nWordType, + TRUE /*prefer forward direction*/); + aEndBndry = pBreakIt->GetBreakIter()->getWordBoundary( + GetTxt(), nEnd, + pBreakIt->GetLocale( GetLang( nEnd ) ), + nWordType, + FALSE /*prefer backward direction*/); + + // prevent backtracking to the previous word if selection is at word boundary + if (aSttBndry.endPos <= nStt) + { + aSttBndry = pBreakIt->GetBreakIter()->nextWord( + GetTxt(), aSttBndry.endPos, + pBreakIt->GetLocale( GetLang( aSttBndry.endPos ) ), + nWordType); + } + // prevent advancing to the next word if selection is at word boundary + if (aEndBndry.startPos >= nEnd) + { + aEndBndry = pBreakIt->GetBreakIter()->previousWord( + GetTxt(), aEndBndry.startPos, + pBreakIt->GetLocale( GetLang( aEndBndry.startPos ) ), + nWordType); + } - xub_StrLen nEndPos; - sal_uInt16 nLang; - do { - if( pIter ) + Boundary aCurWordBndry( aSttBndry ); + while (aCurWordBndry.startPos <= aEndBndry.startPos) { - nLang = pIter->GetLanguage(); - nEndPos = pIter->GetChgPos(); - if( nEndPos > nEnd ) - nEndPos = nEnd; + nStt = (xub_StrLen)aCurWordBndry.startPos; + nEnd = (xub_StrLen)aCurWordBndry.endPos; + sal_Int32 nLen = nEnd - nStt; + DBG_ASSERT( nLen > 0, "invalid word length of 0" ); +#if OSL_DEBUG_LEVEL > 1 + String aText( GetTxt().Copy( nStt, nLen ) ); +#endif + + Sequence aOffsets; + String sChgd( rTrans.transliterate( GetTxt(), GetLang( nStt ), nStt, nLen, &aOffsets )); + + if (!m_Text.Equals( sChgd, nStt, nLen )) + { + aChgData.nStart = nStt; + aChgData.nLen = nLen; + aChgData.sChanged = sChgd; + aChgData.aOffsets = aOffsets; + aChanges.push_back( aChgData ); + } + + aCurWordBndry = pBreakIt->GetBreakIter()->nextWord( + GetTxt(), nEnd, + pBreakIt->GetLocale( GetLang( nEnd ) ), + nWordType); } - else + } + else if (rTrans.getType() == (sal_uInt32)TransliterationModulesExtra::SENTENCE_CASE) + { + // for 'sentence case' we need to iterate sentence by sentence + + sal_Int32 nLastStart = pBreakIt->GetBreakIter()->beginOfSentence( + GetTxt(), nEnd, + pBreakIt->GetLocale( GetLang( nEnd ) ) ); + sal_Int32 nLastEnd = pBreakIt->GetBreakIter()->endOfSentence( + GetTxt(), nLastStart, + pBreakIt->GetLocale( GetLang( nLastStart ) ) ); + + // extend nStt, nEnd to the current sentence boundaries + sal_Int32 nCurrentStart = pBreakIt->GetBreakIter()->beginOfSentence( + GetTxt(), nStt, + pBreakIt->GetLocale( GetLang( nStt ) ) ); + sal_Int32 nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence( + GetTxt(), nCurrentStart, + pBreakIt->GetLocale( GetLang( nCurrentStart ) ) ); + + // prevent backtracking to the previous sentence if selection starts at end of a sentence + if (nCurrentEnd <= nStt) + { + // now nCurrentStart is probably located on a non-letter word. (unless we + // are in Asian text with no spaces...) + // Thus to get the real sentence start we should locate the next real word, + // that is one found by DICTIONARY_WORD + i18n::Boundary aBndry = pBreakIt->GetBreakIter()->nextWord( + GetTxt(), nCurrentEnd, + pBreakIt->GetLocale( GetLang( nCurrentEnd ) ), + i18n::WordType::DICTIONARY_WORD); + + // now get new current sentence boundaries + nCurrentStart = pBreakIt->GetBreakIter()->beginOfSentence( + GetTxt(), aBndry.startPos, + pBreakIt->GetLocale( GetLang( aBndry.startPos) ) ); + nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence( + GetTxt(), nCurrentStart, + pBreakIt->GetLocale( GetLang( nCurrentStart) ) ); + } + // prevent advancing to the next sentence if selection ends at start of a sentence + if (nLastStart >= nEnd) { - nLang = LANGUAGE_SYSTEM; - nEndPos = nEnd; + // now nCurrentStart is probably located on a non-letter word. (unless we + // are in Asian text with no spaces...) + // Thus to get the real sentence start we should locate the previous real word, + // that is one found by DICTIONARY_WORD + i18n::Boundary aBndry = pBreakIt->GetBreakIter()->previousWord( + GetTxt(), nLastStart, + pBreakIt->GetLocale( GetLang( nLastStart) ), + i18n::WordType::DICTIONARY_WORD); + nLastEnd = pBreakIt->GetBreakIter()->endOfSentence( + GetTxt(), aBndry.startPos, + pBreakIt->GetLocale( GetLang( aBndry.startPos) ) ); + if (nCurrentEnd > nLastEnd) + nCurrentEnd = nLastEnd; } - xub_StrLen nLen = nEndPos - nStt; - Sequence aOffsets; - String sChgd( rTrans.transliterate( m_Text, nLang, nStt, nLen, - &aOffsets )); - if( !m_Text.Equals( sChgd, nStt, nLen ) ) + while (nCurrentStart < nLastEnd) { - if ( pUndo ) + sal_Int32 nLen = nCurrentEnd - nCurrentStart; + DBG_ASSERT( nLen > 0, "invalid word length of 0" ); +#if OSL_DEBUG_LEVEL > 1 + String aText( GetTxt().Copy( nCurrentStart, nLen ) ); +#endif + + Sequence aOffsets; + String sChgd( rTrans.transliterate( GetTxt(), + GetLang( nCurrentStart ), nCurrentStart, nLen, &aOffsets )); + + if (!m_Text.Equals( sChgd, nStt, nLen )) { - pUndo->AddChanges( *this, nStt, nLen, aOffsets ); + aChgData.nStart = nCurrentStart; + aChgData.nLen = nLen; + aChgData.sChanged = sChgd; + aChgData.aOffsets = aOffsets; + aChanges.push_back( aChgData ); } - ReplaceTextOnly( nStt, nLen, sChgd, aOffsets ); + + Boundary aFirstWordBndry; + aFirstWordBndry = pBreakIt->GetBreakIter()->nextWord( + GetTxt(), nCurrentEnd, + pBreakIt->GetLocale( GetLang( nCurrentEnd ) ), + nWordType); + nCurrentStart = aFirstWordBndry.startPos; + nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence( + GetTxt(), nCurrentStart, + pBreakIt->GetLocale( GetLang( nCurrentStart ) ) ); } - nStt = nEndPos; - } while( nEndPos < nEnd && pIter && pIter->Next() ); - delete pIter; + } + else + { + // here we may transliterate over complete language portions... + + SwLanguageIterator* pIter; + if( rTrans.needLanguageForTheMode() ) + pIter = new SwLanguageIterator( *this, nStt ); + else + pIter = 0; + + xub_StrLen nEndPos; + sal_uInt16 nLang; + do { + if( pIter ) + { + nLang = pIter->GetLanguage(); + nEndPos = pIter->GetChgPos(); + if( nEndPos > nEnd ) + nEndPos = nEnd; + } + else + { + nLang = LANGUAGE_SYSTEM; + nEndPos = nEnd; + } + xub_StrLen nLen = nEndPos - nStt; + + Sequence aOffsets; + String sChgd( rTrans.transliterate( m_Text, nLang, nStt, nLen, &aOffsets )); + + if (!m_Text.Equals( sChgd, nStt, nLen )) + { + aChgData.nStart = nStt; + aChgData.nLen = nLen; + aChgData.sChanged = sChgd; + aChgData.aOffsets = aOffsets; + aChanges.push_back( aChgData ); + } + + nStt = nEndPos; + } while( nEndPos < nEnd && pIter && pIter->Next() ); + delete pIter; + } + + if (aChanges.size() > 0) + { + // now apply the changes from end to start to leave the offsets of the + // yet unchanged text parts remain the same. + for (size_t i = 0; i < aChanges.size(); ++i) + { + TransliterationChgData &rData = aChanges[ aChanges.size() - 1 - i ]; + if (pUndo) + pUndo->AddChanges( *this, rData.nStart, rData.nLen, rData.aOffsets ); + ReplaceTextOnly( rData.nStart, rData.nLen, rData.sChanged, rData.aOffsets ); + } + } } } diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx index 22f9db9706..744767ffcb 100644 --- a/sw/source/core/undo/unovwr.cxx +++ b/sw/source/core/undo/unovwr.cxx @@ -352,16 +352,14 @@ SwRewriter SwUndoOverwrite::GetRewriter() const struct _UndoTransliterate_Data { - String sText; - _UndoTransliterate_Data* pNext; - SwHistory* pHistory; - Sequence * pOffsets; - ULONG nNdIdx; - xub_StrLen nStart, nLen; - - _UndoTransliterate_Data( ULONG nNd, xub_StrLen nStt, xub_StrLen nStrLen, - const String& rTxt ) - : sText( rTxt ), pNext( 0 ), pHistory( 0 ), pOffsets( 0 ), + String sText; + SwHistory* pHistory; + Sequence< sal_Int32 >* pOffsets; + ULONG nNdIdx; + xub_StrLen nStart, nLen; + + _UndoTransliterate_Data( ULONG nNd, xub_StrLen nStt, xub_StrLen nStrLen, const String& rTxt ) + : sText( rTxt ), pHistory( 0 ), pOffsets( 0 ), nNdIdx( nNd ), nStart( nStt ), nLen( nStrLen ) {} ~_UndoTransliterate_Data() { delete pOffsets; delete pHistory; } @@ -369,22 +367,17 @@ struct _UndoTransliterate_Data void SetChangeAtNode( SwDoc& rDoc ); }; -SwUndoTransliterate::SwUndoTransliterate( const SwPaM& rPam, - const utl::TransliterationWrapper& rTrans ) - : SwUndo( UNDO_TRANSLITERATE ), SwUndRng( rPam ), - pData( 0 ), pLastData( 0 ), nType( rTrans.getType() ) +SwUndoTransliterate::SwUndoTransliterate( + const SwPaM& rPam, + const utl::TransliterationWrapper& rTrans ) + : SwUndo( UNDO_TRANSLITERATE ), SwUndRng( rPam ), nType( rTrans.getType() ) { } SwUndoTransliterate::~SwUndoTransliterate() { - _UndoTransliterate_Data* pD = pData; - while( pD ) - { - pData = pD; - pD = pD->pNext; - delete pData; - } + for (size_t i = 0; i < aChanges.size(); ++i) + delete aChanges[i]; } void SwUndoTransliterate::Undo( SwUndoIter& rUndoIter ) @@ -393,8 +386,12 @@ void SwUndoTransliterate::Undo( SwUndoIter& rUndoIter ) BOOL bUndo = rDoc.DoesUndo(); rDoc.DoUndo( FALSE ); - for( _UndoTransliterate_Data* pD = pData; pD; pD = pD->pNext ) - pD->SetChangeAtNode( rDoc ); + // since the changes were added to the vector from the end of the string/node towards + // the start, we need to revert them from the start towards the end now to keep the + // offset information of the undo data in sync with the changing text. + // Thus we need to iterate from the end of the vector to the start + for (sal_Int32 i = aChanges.size() - 1; i >= 0; --i) + aChanges[i]->SetChangeAtNode( rDoc ); rDoc.DoUndo( bUndo ); SetPaM( rUndoIter, TRUE ); @@ -413,8 +410,7 @@ void SwUndoTransliterate::Repeat( SwUndoIter& rUndoIter ) SwPaM& rPam = *rUndoIter.pAktPam; SwDoc& rDoc = rUndoIter.GetDoc(); - utl::TransliterationWrapper aTrans( - ::comphelper::getProcessServiceFactory(), nType ); + utl::TransliterationWrapper aTrans( ::comphelper::getProcessServiceFactory(), nType ); rDoc.TransliterateText( rPam, aTrans ); rUndoIter.pLastUndoObj = this; @@ -428,67 +424,63 @@ void SwUndoTransliterate::AddChanges( SwTxtNode& rTNd, _UndoTransliterate_Data* pNew = new _UndoTransliterate_Data( rTNd.GetIndex(), nStart, (xub_StrLen)nOffsLen, rTNd.GetTxt().Copy( nStart, nLen )); - if( pData ) - pLastData->pNext = pNew; - else - pData = pNew; - pLastData = pNew; + + aChanges.push_back( pNew ); const sal_Int32* pOffsets = rOffsets.getConstArray(); // where did we need less memory ? const sal_Int32* p = pOffsets; for( long n = 0; n < nOffsLen; ++n, ++p ) - if( *p != ( nStart + n )) + if( *p != ( nStart + n )) + { + // create the Offset array + pNew->pOffsets = new Sequence ( nLen ); + sal_Int32* pIdx = pNew->pOffsets->getArray(); + p = pOffsets; + long nMyOff, nNewVal = nStart; + for( n = 0, nMyOff = nStart; n < nOffsLen; ++p, ++n, ++nMyOff ) { - // create the Offset array - pNew->pOffsets = new Sequence ( nLen ); - sal_Int32* pIdx = pNew->pOffsets->getArray(); - p = pOffsets; - long nMyOff, nNewVal = nStart; - for( n = 0, nMyOff = nStart; n < nOffsLen; ++p, ++n, ++nMyOff ) + if( *p < nMyOff ) { - if( *p < nMyOff ) - { - // something is deleted - nMyOff = *p; - *(pIdx-1) = nNewVal++; - } - else if( *p > nMyOff ) - { - for( ; *p > nMyOff; ++nMyOff ) - *pIdx++ = nNewVal; - --nMyOff; - --n; - --p; - } - else - *pIdx++ = nNewVal++; + // something is deleted + nMyOff = *p; + *(pIdx-1) = nNewVal++; } - - // and then we need to save the attributes/bookmarks - // but this data must moved every time to the last in the chain! - _UndoTransliterate_Data* pD = pData; - while( pD != pNew ) + else if( *p > nMyOff ) { - if( pD->nNdIdx == pNew->nNdIdx && pD->pHistory ) - { - // same node and have a history? - pNew->pHistory = pD->pHistory; - pD->pHistory = 0; - break; // more can't exist - } - pD = pD->pNext; + for( ; *p > nMyOff; ++nMyOff ) + *pIdx++ = nNewVal; + --nMyOff; + --n; + --p; } + else + *pIdx++ = nNewVal++; + } - if( !pNew->pHistory ) + // and then we need to save the attributes/bookmarks + // but this data must moved every time to the last in the chain! + for (size_t i = 0; i + 1 < aChanges.size(); ++i) // check all changes but not the current one + { + _UndoTransliterate_Data* pD = aChanges[i]; + if( pD->nNdIdx == pNew->nNdIdx && pD->pHistory ) { - pNew->pHistory = new SwHistory; - SwRegHistory aRHst( rTNd, pNew->pHistory ); - pNew->pHistory->CopyAttr( rTNd.GetpSwpHints(), - pNew->nNdIdx, 0, rTNd.GetTxt().Len(), false ); + // same node and have a history? + pNew->pHistory = pD->pHistory; + pD->pHistory = 0; + break; // more can't exist } - break; } + + if( !pNew->pHistory ) + { + pNew->pHistory = new SwHistory; + SwRegHistory aRHst( rTNd, pNew->pHistory ); + pNew->pHistory->CopyAttr( rTNd.GetpSwpHints(), + pNew->nNdIdx, 0, rTNd.GetTxt().Len(), false ); + } + break; + } } void _UndoTransliterate_Data::SetChangeAtNode( SwDoc& rDoc ) -- cgit v1.2.3 From f585b7ba485fe9d86ba8855b6711ea541217a96a Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Mon, 23 Aug 2010 13:53:47 +0200 Subject: mib19: improved event handling: do not supreppress global events, when Application.EnableEvents symbol set to false --- sw/source/ui/vba/vbaeventshelper.cxx | 5 ----- sw/source/ui/vba/vbaeventshelper.hxx | 1 - 2 files changed, 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/vba/vbaeventshelper.cxx b/sw/source/ui/vba/vbaeventshelper.cxx index abe4abb6e7..b2270b009c 100755 --- a/sw/source/ui/vba/vbaeventshelper.cxx +++ b/sw/source/ui/vba/vbaeventshelper.cxx @@ -50,11 +50,6 @@ SwVbaEventsHelper::~SwVbaEventsHelper() { } -bool SwVbaEventsHelper::implEventsEnabled() throw (uno::RuntimeException) -{ - return true; -} - bool SwVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const uno::Sequence< uno::Any >& /*rArgs*/ ) throw (uno::RuntimeException) { diff --git a/sw/source/ui/vba/vbaeventshelper.hxx b/sw/source/ui/vba/vbaeventshelper.hxx index af1c06c034..7f951bdaa4 100755 --- a/sw/source/ui/vba/vbaeventshelper.hxx +++ b/sw/source/ui/vba/vbaeventshelper.hxx @@ -41,7 +41,6 @@ public: virtual ~SwVbaEventsHelper(); protected: - virtual bool implEventsEnabled() throw (css::uno::RuntimeException); virtual bool implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::uno::RuntimeException); virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException); virtual void implPostProcessEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, bool bSuccess, bool bCancel ) throw (css::uno::RuntimeException); -- cgit v1.2.3 From 4018f0b565bf50423e18e4b28a7c3f89fc5bd4c8 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 27 Aug 2010 12:25:34 +0200 Subject: dba33h: #i112652#: SwTblBoxValue: items with NaN should compare equal --- sw/source/core/attr/cellatr.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx index 7285d1520d..0cf721f208 100644 --- a/sw/source/core/attr/cellatr.cxx +++ b/sw/source/core/attr/cellatr.cxx @@ -28,9 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include +#include -#include #include // fuer RES_.. #include #include @@ -249,8 +250,12 @@ SwTblBoxValue::SwTblBoxValue( const double nVal ) int SwTblBoxValue::operator==( const SfxPoolItem& rAttr ) const { - ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" ); - return nValue == ((SwTblBoxValue&)rAttr).nValue; + ASSERT(SfxPoolItem::operator==(rAttr), "SwTblBoxValue: item not equal"); + SwTblBoxValue const& rOther( static_cast(rAttr) ); + // items with NaN should be equal to enable pooling + return ::rtl::math::isNan(nValue) + ? ::rtl::math::isNan(rOther.nValue) + : (nValue == rOther.nValue); } -- cgit v1.2.3 From 5bd0fb9624c34c5c988c756a679e07eb8ad3a97b Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 27 Aug 2010 12:26:50 +0200 Subject: dba33h: #i112652#: SwXCell::getValue(): do not filter out NaN --- sw/source/core/unocore/unotbl.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 9dd21a4e88..a9658fc7bc 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1009,12 +1009,9 @@ void SwXCell::setFormula(const OUString& rFormula) throw( uno::RuntimeException double SwXCell::getValue(void) throw( uno::RuntimeException ) { vos::OGuard aGuard(Application::GetSolarMutex()); - double fRet = lcl_getValue( *this ); - //lcl_getValue was changed thus it can return nan values, - //so I make this additional nan check here to not change the behaviour - //but maybe it would even be more correct to just return nan here? ... todo? - if( ::rtl::math::isNan( fRet ) ) - fRet = 0.0; + + double const fRet = lcl_getValue( *this ); + // #i112652# a table cell may contain NaN as a value, do not filter that return fRet; } /*-- 11.12.98 10:56:26--------------------------------------------------- -- cgit v1.2.3 From ed39b14d0aa9079300eabf67a8f56a2202a4dfb9 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 27 Aug 2010 13:02:34 +0200 Subject: masterfix OOO330: #i10000# new exception file unovwr.cxx --- sw/source/core/undo/makefile.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'sw/source') diff --git a/sw/source/core/undo/makefile.mk b/sw/source/core/undo/makefile.mk index d6e6766a0f..c381761adb 100644 --- a/sw/source/core/undo/makefile.mk +++ b/sw/source/core/undo/makefile.mk @@ -49,6 +49,7 @@ EXCEPTIONSFILES = \ $(SLO)$/unattr.obj \ $(SLO)$/undobj.obj \ $(SLO)$/undraw.obj \ + $(SLO)$/unovwr.obj \ $(SLO)$/untbl.obj SLOFILES = \ -- cgit v1.2.3 From b5eee53683056f96c5b446f0be52d0e92707609b Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 31 Aug 2010 18:59:45 +0200 Subject: vcl115: #i113242# better layout for SwInputWindow --- sw/source/ui/ribbar/inputwin.cxx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx index 3fe5e3edb5..2d61300860 100755 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -103,16 +103,23 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) SetDropdownClickHdl( LINK( this, SwInputWindow, DropdownClickHdl )); Size aSizeTbx = CalcWindowSizePixel(); + Size aEditSize = aEdit.GetSizePixel(); + Rectangle aItemRect( GetItemRect(FN_FORMULA_CALC) ); + long nMaxHeight = (aEditSize.Height() > aItemRect.GetHeight()) ? aEditSize.Height() : aItemRect.GetHeight(); + if( nMaxHeight+2 > aSizeTbx.Height() ) + aSizeTbx.Height() = nMaxHeight+2; Size aSize = GetSizePixel(); aSize.Height() = aSizeTbx.Height(); SetSizePixel( aSize ); - Size aPosSize = aPos.GetSizePixel(); - Size aEditSize = aEdit.GetSizePixel(); - aPosSize.Height() = aEditSize.Height() = GetItemRect(FN_FORMULA_CALC).GetHeight() - 2; - Point aPosPos = aPos.GetPosPixel(); - Point aEditPos= aEdit.GetPosPixel(); - aPosPos.Y() = aEditPos.Y() = GetItemRect( FN_FORMULA_CALC ).TopLeft().Y() + 1; + // align edit and item vcentered + Size aPosSize = aPos.GetSizePixel(); + aPosSize.Height() = nMaxHeight; + aEditSize.Height() = nMaxHeight; + Point aPosPos = aPos.GetPosPixel(); + Point aEditPos = aEdit.GetPosPixel(); + aPosPos.Y() = (aSize.Height() - nMaxHeight)/2 + 1; + aEditPos.Y() = (aSize.Height() - nMaxHeight)/2 + 1; aPos.SetPosSizePixel( aPosPos, aPosSize ); aEdit.SetPosSizePixel( aEditPos, aEditSize ); -- cgit v1.2.3 From a68783e96da3f22b5cb9961b9b17b82fb9f38afa Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 1 Sep 2010 14:59:07 +0200 Subject: dba33i: #i111146# migrated all SFX-based applications to use named views --- starmath/inc/starmath.hrc | 2 +- starmath/source/smres.src | 4 ---- starmath/source/view.cxx | 2 +- sw/source/ui/uiview/pview.cxx | 2 +- sw/source/ui/uiview/srcview.cxx | 2 +- sw/source/ui/uiview/view0.cxx | 2 +- sw/source/ui/web/wview.cxx | 2 +- 7 files changed, 6 insertions(+), 10 deletions(-) (limited to 'sw/source') diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc index 7d11b64aa0..34838682b0 100644 --- a/starmath/inc/starmath.hrc +++ b/starmath/inc/starmath.hrc @@ -107,7 +107,7 @@ #define RID_READSYMBOLERROR (RID_APP_START + 203) #define RID_NOMATHTYPEFACEWARNING (RID_APP_START + 204) #define RID_OBJECTNAME (RID_APP_START + 501) -#define RID_VIEWNAME (RID_APP_START + 502) + // free #define RID_UNDOEDITNAME (RID_APP_START + 503) #define RID_UNDOFORMATNAME (RID_APP_START + 504) #define RID_APPICO (RID_APP_START + 601) diff --git a/starmath/source/smres.src b/starmath/source/smres.src index 5761f1beb6..7270427e0b 100755 --- a/starmath/source/smres.src +++ b/starmath/source/smres.src @@ -1379,10 +1379,6 @@ String RID_OBJECTNAME { Text = "SMath3" ; }; -String RID_VIEWNAME -{ - Text = "StarMath" ; -}; String RID_UNDOEDITNAME { Text = "Edit" ; diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 0d9ea5812c..1e6e59ad17 100755 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -749,7 +749,7 @@ SFX_IMPL_INTERFACE(SmViewShell, SfxViewShell, SmResId(0)) } -SFX_IMPL_VIEWFACTORY(SmViewShell, SmResId(RID_VIEWNAME)) +SFX_IMPL_NAMED_VIEWFACTORY(SmViewShell, "Default") { SFX_VIEW_REGISTRATION(SmDocShell); } diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 6f10283478..4aaa2fd56c 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -108,7 +108,7 @@ using namespace ::com::sun::star; -SFX_IMPL_VIEWFACTORY(SwPagePreView, SW_RES(STR_NONAME)) +SFX_IMPL_NAMED_VIEWFACTORY(SwPagePreView, "PrintPreview") { SFX_VIEW_REGISTRATION(SwDocShell); SFX_VIEW_REGISTRATION(SwWebDocShell); diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index d418216a39..47067385dc 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -125,7 +125,7 @@ using ::com::sun::star::util::SearchOptions; -SFX_IMPL_VIEWFACTORY(SwSrcView, SW_RES(STR_NONAME)) +SFX_IMPL_NAMED_VIEWFACTORY(SwSrcView, "SourceView") { SFX_VIEW_REGISTRATION(SwWebDocShell); } diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx index f3e1253572..98b9589afa 100644 --- a/sw/source/ui/uiview/view0.cxx +++ b/sw/source/ui/uiview/view0.cxx @@ -105,7 +105,7 @@ using ::rtl::OUString; #include -SFX_IMPL_VIEWFACTORY(SwView, SW_RES(STR_NONAME)) +SFX_IMPL_NAMED_VIEWFACTORY(SwView, "Default") { if ( SvtModuleOptions().IsWriter() ) { diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx index 6899f6dedc..8fa1fc0bb7 100644 --- a/sw/source/ui/web/wview.cxx +++ b/sw/source/ui/web/wview.cxx @@ -93,7 +93,7 @@ #include -SFX_IMPL_VIEWFACTORY(SwWebView, SW_RES(STR_NONAME)) +SFX_IMPL_NAMED_VIEWFACTORY(SwWebView, "Default") { SFX_VIEW_REGISTRATION(SwWebDocShell); } -- cgit v1.2.3 From e73d93a2dc96f62823709f568e018b32eae78412 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 2 Sep 2010 11:59:37 +0200 Subject: cws tl82: #i114267# remove unused code --- sw/source/ui/uiview/pview.cxx | 490 +----------------------------------------- sw/source/ui/uiview/pview.src | 293 ------------------------- sw/source/ui/uiview/view.hrc | 1 - 3 files changed, 2 insertions(+), 782 deletions(-) mode change 100644 => 100755 sw/source/ui/uiview/pview.cxx mode change 100644 => 100755 sw/source/ui/uiview/pview.src mode change 100644 => 100755 sw/source/ui/uiview/view.hrc (limited to 'sw/source') diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx old mode 100644 new mode 100755 index 6f10283478..3e1bc337e3 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -171,7 +171,7 @@ void lcl_InvalidateZoomSlots(SfxBindings& rBindings) /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ - + // erstmal der Zoom-Dialog class SwPreViewZoomDlg : public SvxStandardDialog @@ -217,8 +217,7 @@ SwPreViewZoomDlg::SwPreViewZoomDlg( SwPagePreViewWin& rParent ) : Beschreibung: --------------------------------------------------------------------*/ - - SwPreViewZoomDlg::~SwPreViewZoomDlg() {} +SwPreViewZoomDlg::~SwPreViewZoomDlg() {} void SwPreViewZoomDlg::Apply() @@ -228,491 +227,6 @@ void SwPreViewZoomDlg::Apply() BYTE(aColEdit.GetValue()) ); } -/* */ -/* -----------------20.08.98 15:25------------------- - * Vorschau fuer den Seitendruck - * --------------------------------------------------*/ -struct PrintSettingsStruct; -class PrtPrvWindow : public Window -{ - const PrintSettingsStruct& rSettings; - - virtual void Paint(const Rectangle&); -public : - PrtPrvWindow(Window* pParent, const ResId& rResId, const PrintSettingsStruct& rSett) : - Window(pParent, rResId), rSettings(rSett){} -}; -/*-------------------------------------------------------------------- - Beschreibung: Optionen fuer das Drucken der Preview - --------------------------------------------------------------------*/ -struct PrintSettingsStruct -{ - Size aPageMaxSize; // groesste Seite - Size aPrtSize; // Papiergroesse - Size aPrvPrtSize; // Groesse innerhalb der LRTB-Raender - Size aGridSize; // Groesse fuer jede Seite, enthaelt je - // die Haelfte von H- und V-Distance - - long nLeft; - long nRight; - long nTop; - long nBottom; - long nHori; - long nVert; - - USHORT nRows; - USHORT nCols; - - BOOL bPrinterLandscape; // Ausrichtung -}; - -class SwPreviewPrintOptionsDialog : public SvxStandardDialog -{ - FixedLine aRowColFL; - FixedText aRowsFT; - NumericField aRowsNF; - FixedText aColsFT; - NumericField aColsNF; - - FixedLine aMarginFL; - FixedText aLSpaceFT; - MetricField aLSpaceMF; - FixedText aRSpaceFT; - MetricField aRSpaceMF; - FixedText aTSpaceFT; - MetricField aTSpaceMF; - FixedText aBSpaceFT; - MetricField aBSpaceMF; - FixedLine aDistanceFL; - FixedText aHSpaceFT; - MetricField aHSpaceMF; - FixedText aVSpaceFT; - MetricField aVSpaceMF; - - RadioButton aLandscapeRB; - RadioButton aPortraitRB; - FixedLine aOrientationFL; - - PrtPrvWindow aPreviewWin; - - OKButton aOkBtn; - CancelButton aCancelBtn; - HelpButton aHelpBtn; - - PushButton aStandardPB; - - SwPagePreView& rPreView; - SwPagePreViewWin& rParentWin; - PrintSettingsStruct aSettings; -/* Size aPageMaxSize; - Size aPrtSize; - - BOOL bOrientation; -*/ - BOOL bStandard; - - virtual void Apply(); - void FillControls(SwPagePreViewPrtData& rData); - - DECL_LINK( ModifyHdl, Edit* ); - DECL_LINK( StandardHdl, PushButton* ); - -public: - SwPreviewPrintOptionsDialog(SwPagePreViewWin& rParent, SwPagePreView& rView); - ~SwPreviewPrintOptionsDialog(); -}; - -/* -----------------19.08.98 13:35------------------- - * - * --------------------------------------------------*/ -SwPreviewPrintOptionsDialog::SwPreviewPrintOptionsDialog( SwPagePreViewWin& rParent, SwPagePreView& rView ) : - SvxStandardDialog( &rParent, SW_RES(DLG_PAGEPREVIEW_PRINTOPTIONS) ), - aRowColFL(this,SW_RES( FL_ROWCOL)), - aRowsFT(this,SW_RES( FT_ROWS)), - aRowsNF(this,SW_RES( NF_ROWS)), - aColsFT(this,SW_RES( FT_COLS)), - aColsNF(this,SW_RES( NF_COLS)), - aMarginFL(this,SW_RES( FL_MARGINS)), - aLSpaceFT(this,SW_RES( FT_LMARGIN)), - aLSpaceMF(this,SW_RES( MF_LMARGIN)), - aRSpaceFT(this,SW_RES( FT_RMARGIN)), - aRSpaceMF(this,SW_RES( MF_RMARGIN)), - aTSpaceFT(this,SW_RES( FT_TMARGIN)), - aTSpaceMF(this,SW_RES( MF_TMARGIN)), - aBSpaceFT(this,SW_RES( FT_BMARGIN)), - aBSpaceMF(this,SW_RES( MF_BMARGIN)), - aDistanceFL(this,SW_RES(FL_DISTANCE)), - aHSpaceFT(this,SW_RES( FT_HMARGIN)), - aHSpaceMF(this,SW_RES( MF_HMARGIN)), - aVSpaceFT(this,SW_RES( FT_VMARGIN)), - aVSpaceMF(this,SW_RES( MF_VMARGIN)), - aLandscapeRB(this,SW_RES( RB_LANDSCAPE)), - aPortraitRB(this,SW_RES( RB_PORTRAIT)), - aOrientationFL(this,SW_RES( FL_ORIENTATION)), - aPreviewWin(this,SW_RES( WIN_PREVIEW), aSettings), - aOkBtn(this,SW_RES(BT_OK)), - aCancelBtn(this,SW_RES(BT_CANCEL)), - aHelpBtn(this,SW_RES(BT_HELP)), - aStandardPB(this,SW_RES(PB_STANDARD)), - rPreView(rView), - rParentWin(rParent), - bStandard(TRUE) -{ - FreeResource(); - ViewShell& rViewSh = *rPreView.GetViewShell(); - // OD 18.12.2002 #103492# - aSettings.aPageMaxSize = rViewSh.PagePreviewLayout()->GetMaxPageSize(); - SfxPrinter* pPrinter = rViewSh.getIDocumentDeviceAccess()->getPrinter( true ); - aSettings.aPrtSize = pPrinter->GetPaperSize(); - //#97682# make sure that no division by zero occurs - if(!aSettings.aPrtSize.Width() || !aSettings.aPrtSize.Height()) - aSettings.aPrtSize = SvxPaperInfo::GetPaperSize(PAPER_A4); - aSettings.bPrinterLandscape = pPrinter->GetOrientation() == ORIENTATION_LANDSCAPE; - - - SwDocShell* pDocShell = rPreView.GetDocShell(); - const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(0 != PTR_CAST(SwWebDocShell, pDocShell)); - FieldUnit eFieldUnit = pUsrPref->GetMetric(); - ::SetFieldUnit( aLSpaceMF, eFieldUnit ); - ::SetFieldUnit( aRSpaceMF, eFieldUnit ); - ::SetFieldUnit( aTSpaceMF, eFieldUnit ); - ::SetFieldUnit( aBSpaceMF, eFieldUnit ); - ::SetFieldUnit( aHSpaceMF, eFieldUnit ); - ::SetFieldUnit( aVSpaceMF, eFieldUnit ); - - SwDoc* pDoc = pDocShell->GetDoc(); - SwPagePreViewPrtData aData; - if(pDoc->GetPreViewPrtData()) - { - aData = *pDoc->GetPreViewPrtData(); - bStandard = FALSE; - } - else - { - // Orientation der PreviewData an den Drucker anpassen - aData.SetLandscape(aSettings.bPrinterLandscape); - aData.SetRow(rParent.GetRow()); - aData.SetCol(rParent.GetCol()); - } - FillControls(aData); - - aLSpaceMF.SaveValue(); - aRSpaceMF.SaveValue(); - aTSpaceMF.SaveValue(); - aBSpaceMF.SaveValue(); - aHSpaceMF.SaveValue(); - aVSpaceMF.SaveValue(); - aRowsNF.SaveValue(); - aColsNF.SaveValue(); - aLandscapeRB.SaveValue(); - aPortraitRB.SaveValue(); - - aStandardPB.SetClickHdl(LINK(this, SwPreviewPrintOptionsDialog, StandardHdl)); - Link aLk = LINK(this, SwPreviewPrintOptionsDialog, ModifyHdl); - aLSpaceMF.SetUpHdl(aLk); - aRSpaceMF.SetUpHdl(aLk); - aTSpaceMF.SetUpHdl(aLk); - aBSpaceMF.SetUpHdl(aLk); - aHSpaceMF.SetUpHdl(aLk); - aVSpaceMF.SetUpHdl(aLk); - aRowsNF.SetUpHdl(aLk); - aColsNF.SetUpHdl(aLk); - aLSpaceMF.SetDownHdl(aLk); - aRSpaceMF.SetDownHdl(aLk); - aTSpaceMF.SetDownHdl(aLk); - aBSpaceMF.SetDownHdl(aLk); - aHSpaceMF.SetDownHdl(aLk); - aVSpaceMF.SetDownHdl(aLk); - aRowsNF.SetDownHdl(aLk); - aColsNF.SetDownHdl(aLk); - aLSpaceMF.SetLoseFocusHdl(aLk); - aRSpaceMF.SetLoseFocusHdl(aLk); - aTSpaceMF.SetLoseFocusHdl(aLk); - aBSpaceMF.SetLoseFocusHdl(aLk); - aHSpaceMF.SetLoseFocusHdl(aLk); - aVSpaceMF.SetLoseFocusHdl(aLk); - aRowsNF.SetLoseFocusHdl(aLk); - aColsNF.SetLoseFocusHdl(aLk); - aLandscapeRB.SetClickHdl(aLk); - aPortraitRB.SetClickHdl(aLk); - - ModifyHdl(0); - if(bStandard) - StandardHdl(&aStandardPB); -} - - -/* -----------------19.08.98 13:36------------------- - * - * --------------------------------------------------*/ -SwPreviewPrintOptionsDialog::~SwPreviewPrintOptionsDialog() -{ -} -/* -----------------12.11.98 11:32------------------- - * - * --------------------------------------------------*/ -void SwPreviewPrintOptionsDialog::FillControls(SwPagePreViewPrtData& rData) -{ - aLSpaceMF.SetValue(aLSpaceMF.Normalize(rData.GetLeftSpace() ), FUNIT_TWIP); - aRSpaceMF.SetValue(aRSpaceMF.Normalize(rData.GetRightSpace() ), FUNIT_TWIP); - aTSpaceMF.SetValue(aTSpaceMF.Normalize(rData.GetTopSpace() ), FUNIT_TWIP); - aBSpaceMF.SetValue(aBSpaceMF.Normalize(rData.GetBottomSpace()), FUNIT_TWIP); - aHSpaceMF.SetValue(aHSpaceMF.Normalize(rData.GetHorzSpace() ), FUNIT_TWIP); - aVSpaceMF.SetValue(aVSpaceMF.Normalize(rData.GetVertSpace() ), FUNIT_TWIP); - aRowsNF.SetValue(rData.GetRow()); - aColsNF.SetValue(rData.GetCol()); - aSettings.bPrinterLandscape ? aLandscapeRB.Check() : aPortraitRB.Check(); - // wenn Drucker und Einstellungen nicht uebereinstimmen, dann Seiten tauschen - if( rData.GetLandscape() != aSettings.bPrinterLandscape ) - { - Size aTmp(aSettings.aPrtSize.Height(), aSettings.aPrtSize.Width()); - aSettings.aPrtSize = aTmp; - aSettings.bPrinterLandscape = !aSettings.bPrinterLandscape; - // nochmal setzen, denn auch wenn nur die Default-Orientierung dem Drucker - // angepasst wurde, sollen die Einstellungen gespeichert werden - aSettings.bPrinterLandscape ? aLandscapeRB.Check() : aPortraitRB.Check(); - } - aLandscapeRB.SaveValue(); - aPortraitRB.SaveValue(); - - aSettings.nLeft = rData.GetLeftSpace() ; - aSettings.nRight = rData.GetRightSpace() ; - aSettings.nTop = rData.GetTopSpace() ; - aSettings.nBottom = rData.GetBottomSpace(); - aSettings.nHori = rData.GetHorzSpace() ; - aSettings.nVert = rData.GetVertSpace() ; - aSettings.nRows = rData.GetRow() ; - aSettings.nCols = rData.GetCol() ; - aSettings.aPrvPrtSize = aSettings.aPrtSize ; -} - -/* -----------------19.08.98 14:31------------------- - * - * --------------------------------------------------*/ -void SwPreviewPrintOptionsDialog::Apply() -{ - - SwDoc* pDoc = rPreView.GetDocShell()->GetDoc(); - if(bStandard) - pDoc->SetPreViewPrtData(0); - else if( aLSpaceMF.GetSavedValue() != aLSpaceMF.GetText() || - aRSpaceMF.GetSavedValue() != aRSpaceMF.GetText() || - aTSpaceMF.GetSavedValue() != aTSpaceMF.GetText() || - aBSpaceMF.GetSavedValue() != aBSpaceMF.GetText() || - aHSpaceMF.GetSavedValue() != aHSpaceMF.GetText() || - aVSpaceMF.GetSavedValue() != aVSpaceMF.GetText() || - aRowsNF.GetSavedValue() != aRowsNF.GetText() || - aColsNF.GetSavedValue() != aColsNF.GetText() || - aLandscapeRB.GetSavedValue() != aLandscapeRB.IsChecked() || - aPortraitRB.GetSavedValue() != aPortraitRB.IsChecked() ) - { - SwPagePreViewPrtData aData; - if(pDoc->GetPreViewPrtData()) - aData = *pDoc->GetPreViewPrtData(); - aData.SetLeftSpace( static_cast< ULONG >(aLSpaceMF.Denormalize(aLSpaceMF.GetValue(FUNIT_TWIP))) ); - aData.SetRightSpace( static_cast< ULONG >(aRSpaceMF.Denormalize(aRSpaceMF.GetValue(FUNIT_TWIP))) ); - aData.SetTopSpace( static_cast< ULONG >(aTSpaceMF.Denormalize(aTSpaceMF.GetValue(FUNIT_TWIP))) ); - aData.SetBottomSpace( static_cast< ULONG >(aBSpaceMF.Denormalize(aBSpaceMF.GetValue(FUNIT_TWIP))) ); - - aData.SetHorzSpace( static_cast< ULONG >(aHSpaceMF.Denormalize(aHSpaceMF.GetValue(FUNIT_TWIP))) ); - aData.SetVertSpace( static_cast< ULONG >(aVSpaceMF.Denormalize(aVSpaceMF.GetValue(FUNIT_TWIP))) ); - aData.SetRow((BYTE)aRowsNF.GetValue()); - aData.SetCol((BYTE)aColsNF.GetValue()); - aData.SetLandscape(aLandscapeRB.IsChecked()); - - ViewShell& rViewSh = *rPreView.GetViewShell(); - SfxPrinter* pPrinter = rViewSh.getIDocumentDeviceAccess()->getPrinter( true ); - if((pPrinter->GetOrientation() == ORIENTATION_LANDSCAPE) - != aData.GetLandscape()) - pPrinter->SetOrientation(aData.GetLandscape() ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT); - - - pDoc->SetPreViewPrtData(&aData); - - } -} -/* -----------------20.08.98 08:48------------------- - * - * --------------------------------------------------*/ -IMPL_LINK( SwPreviewPrintOptionsDialog, ModifyHdl, Edit*, pEdit ) -{ - if(bStandard && pEdit) - { - aLSpaceMF.SetUserValue(aLSpaceMF.GetValue()); - aRSpaceMF.SetUserValue(aRSpaceMF.GetValue()); - aTSpaceMF.SetUserValue(aTSpaceMF.GetValue()); - aBSpaceMF.SetUserValue(aBSpaceMF.GetValue()); - aHSpaceMF.SetUserValue(aHSpaceMF.GetValue()); - aVSpaceMF.SetUserValue(aVSpaceMF.GetValue()); - aRowsNF. SetUserValue(aRowsNF .GetValue()); - aColsNF. SetUserValue(aColsNF .GetValue()); - - bStandard = FALSE; - } - BOOL bOrientChanged = aSettings.bPrinterLandscape != aLandscapeRB.IsChecked();; - if(pEdit == &aLSpaceMF) - aSettings.nLeft = static_cast< long >(aLSpaceMF.Denormalize(aLSpaceMF.GetValue(FUNIT_TWIP))); - else if(pEdit == &aRSpaceMF) - aSettings.nRight = static_cast< long >(aRSpaceMF.Denormalize(aRSpaceMF.GetValue(FUNIT_TWIP))); - else if(pEdit == &aTSpaceMF) - aSettings.nTop = static_cast< long >(aTSpaceMF.Denormalize(aTSpaceMF.GetValue(FUNIT_TWIP))); - else if(pEdit == &aBSpaceMF) - aSettings.nBottom = static_cast< long >(aBSpaceMF.Denormalize(aBSpaceMF.GetValue(FUNIT_TWIP))); - else if(pEdit == &aHSpaceMF) - aSettings.nHori = static_cast< long >(aHSpaceMF.Denormalize(aHSpaceMF.GetValue(FUNIT_TWIP))); - else if(pEdit == &aVSpaceMF) - aSettings.nVert = static_cast< long >(aVSpaceMF.Denormalize(aVSpaceMF.GetValue(FUNIT_TWIP))); - else if(pEdit == &aRowsNF) - aSettings.nRows = (USHORT)aRowsNF.GetValue(); - else if(pEdit == &aColsNF) - aSettings.nCols = (USHORT)aColsNF.GetValue(); - else if(pEdit == (Edit*)&aLandscapeRB) - aSettings.bPrinterLandscape = aLandscapeRB.IsChecked(); - else if(pEdit == (Edit*)&aPortraitRB) - aSettings.bPrinterLandscape = aLandscapeRB.IsChecked(); - - if(bOrientChanged) - { - Size aTmp(aSettings.aPrtSize.Height(), aSettings.aPrtSize.Width()); - aSettings.aPrtSize = aTmp; - } - - - aSettings.aPrvPrtSize = Size(aSettings.aPrtSize.Width() - aSettings.nRight - aSettings.nLeft, - aSettings.aPrtSize.Height() - aSettings.nTop - aSettings.nBottom); - aSettings.aGridSize = Size(aSettings.aPrvPrtSize.Width() / aSettings.nCols, - aSettings.aPrvPrtSize.Height() / aSettings.nRows ); - // was fehlt noch: Orientation auswerten, minimalrand ausrechnen, Beispiel fuettern - - - //am Ende Maximalwerte setzen - long n20Percent = aSettings.aPrtSize.Width() / 5; - aLSpaceMF.SetMax(aLSpaceMF.Normalize(aSettings.aPrtSize.Width() - aSettings.nRight - n20Percent), FUNIT_TWIP); - aRSpaceMF.SetMax(aRSpaceMF.Normalize(aSettings.aPrtSize.Width() - aSettings.nLeft - n20Percent), FUNIT_TWIP); - n20Percent = aSettings.aPrtSize.Height() / 5; - aTSpaceMF.SetMax(aTSpaceMF.Normalize(aSettings.aPrtSize.Height() - aSettings.nBottom - n20Percent), FUNIT_TWIP); - aBSpaceMF.SetMax(aBSpaceMF.Normalize(aSettings.aPrtSize.Height() - aSettings.nTop - n20Percent), FUNIT_TWIP); - - long n80Percent = aSettings.aPrvPrtSize.Width() * 4 / 5; - aHSpaceMF.SetMax(aHSpaceMF.Normalize(n80Percent / aSettings.nRows), FUNIT_TWIP); - n80Percent = aSettings.aPrvPrtSize.Height()* 4 / 5; - aVSpaceMF.SetMax(aVSpaceMF.Normalize(n80Percent / aSettings.nCols), FUNIT_TWIP); - aHSpaceMF.Enable(aSettings.nCols > 1); - aVSpaceMF.Enable(aSettings.nRows > 1); - aRowsNF.SetMin(1);// nur damit auch nach Standard wieder der Inhalt angezeigt wird - aColsNF.SetMin(1); - - - aPreviewWin.Invalidate(); - return 0; -} -/* -----------------28.08.98 14:59------------------- - * - * --------------------------------------------------*/ -IMPL_LINK( SwPreviewPrintOptionsDialog, StandardHdl, PushButton*, EMPTYARG ) -{ - SetUpdateMode(TRUE); - SwPagePreViewPrtData aData; - aData.SetRow(rParentWin.GetRow()); - aData.SetCol(rParentWin.GetCol()); - FillControls(aData); - bStandard = TRUE; - aLSpaceMF.SetText(aEmptyStr); - aRSpaceMF.SetText(aEmptyStr); - aTSpaceMF.SetText(aEmptyStr); - aBSpaceMF.SetText(aEmptyStr); - aHSpaceMF.SetText(aEmptyStr); - aVSpaceMF.SetText(aEmptyStr); - aPreviewWin.Invalidate(); - SetUpdateMode(FALSE); - return 0; -} -/* -----------------20.08.98 15:28------------------- - * Preview anzeigen - * --------------------------------------------------*/ -void PrtPrvWindow::Paint(const Rectangle&) -{ - Size aWinSize(GetOutputSizePixel()); - long nWidth = rSettings.aPrtSize.Width(); - long nHeight = rSettings.aPrtSize.Height(); - BOOL bHoriValid = (aWinSize.Width() * 100 / aWinSize.Height()) < - (rSettings.aPrtSize.Width() * 100/ rSettings.aPrtSize.Height()); - Fraction aXScale( aWinSize.Width(), Max( nWidth , 1L ) ); - Fraction aYScale( aWinSize.Height(), Max( nHeight, 1L ) ); - MapMode aMapMode( GetMapMode() ); - aMapMode.SetScaleX( bHoriValid ? aXScale : aYScale); - aMapMode.SetScaleY( bHoriValid ? aXScale : aYScale); - SetMapMode( aMapMode ); - - aWinSize = GetOutputSize(); - - Point aOffset(0,0); - if(bHoriValid) - aOffset.Y() = (aWinSize.Height() - rSettings.aPrtSize.Height()) / 2; - else - aOffset.X() = (aWinSize.Width() - rSettings.aPrtSize.Width()) / 2;; - - - BOOL bUseSystemColors = SvtAccessibilityOptions().GetIsForPagePreviews() - && GetSettings().GetStyleSettings().GetHighContrastMode(); - - //der weisse Seitenhintergrund - Rectangle aRect(aOffset, rSettings.aPrtSize); - if(bUseSystemColors) - { - SetFillColor( GetSettings().GetStyleSettings().GetWindowColor() ); - SetLineColor( SwViewOption::GetFontColor() ); - } - else - { - SetFillColor( Color( COL_WHITE ) ); - SetLineColor(Color( COL_BLACK ) ); - } - - DrawRect(aRect); - - Point aTL(aOffset); - aTL.X() += rSettings.nLeft; - aTL.Y() += rSettings.nTop; - - Size aPrvPageSize((rSettings.aPrvPrtSize.Width() - (rSettings.nCols - 1) * rSettings.nHori) / rSettings.nCols, - (rSettings.aPrvPrtSize.Height() - (rSettings.nRows - 1) * rSettings.nVert) / rSettings.nRows); - // jetzt muss noch das unterschiedliche Groessenverhaeltnis berechnet werden, um es an - // der richtigen Seite abzuziehen. - //... - long nSourceScale = rSettings.aPageMaxSize.Width() * 100 / rSettings.aPageMaxSize.Height(); - long nDestScale = aPrvPageSize.Width() * 100 / aPrvPageSize.Height() ; - if(nSourceScale > nDestScale) // die Seite ist relativ breiter als das vorhandene Rechteck - { - aPrvPageSize.Height() = aPrvPageSize.Width() * 100 / nSourceScale; - } - else - { - aPrvPageSize.Width() = aPrvPageSize.Height() * nSourceScale / 100; - } - - if(bUseSystemColors) - SetFillColor( GetSettings().GetStyleSettings().GetWindowColor() ); - else - SetFillColor( Color( COL_GRAY ) ); - - - aRect = Rectangle(aTL, aPrvPageSize); - for(USHORT i = 0; i < rSettings.nRows; i++) - { - for(USHORT j = 0; j < rSettings.nCols; j++) - { - DrawRect(aRect); - aRect.Move(aPrvPageSize.Width() + rSettings.nHori, 0); - } - - aRect.Move( 0, aPrvPageSize.Height() + rSettings.nVert); - aRect.SetPos(Point(aTL.X(), aRect.TopLeft().Y())); - } - //rSettings; -} - -/* */ /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ diff --git a/sw/source/ui/uiview/pview.src b/sw/source/ui/uiview/pview.src old mode 100644 new mode 100755 index 57fb35d27a..4b97c83c43 --- a/sw/source/ui/uiview/pview.src +++ b/sw/source/ui/uiview/pview.src @@ -29,272 +29,7 @@ #include "pview.hrc" #include "helpid.h" #include "cmdid.h" -ModalDialog DLG_PAGEPREVIEW_PRINTOPTIONS -{ - HelpID = HID_DLG_PRV_PRT_OPTIONS ; - OutputSize = TRUE ; - SVLook = TRUE ; - Moveable = TRUE ; - Size = MAP_APPFONT ( 312 , 131 ) ; - FixedLine FL_ROWCOL - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 150 , 8 ) ; - - Text [ en-US ] = "Distribution"; - }; - FixedText FT_ROWS - { - Pos = MAP_APPFONT ( 12 , 15 ) ; - Size = MAP_APPFONT ( 30 , 10 ) ; - Left = TRUE ; - Text [ en-US ] = "Ro~ws"; - }; - NumericField NF_ROWS - { - Border = TRUE ; - Pos = MAP_APPFONT ( 45 , 14 ) ; - Size = MAP_APPFONT ( 36 , 12 ) ; - TabStop = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = PVIEW_MIN_ROW ; - Maximum = PVIEW_MAX_ROW ; - Value = 1 ; - First = PVIEW_MIN_COL ; - Last = PVIEW_MAX_COL ; - }; - FixedText FT_COLS - { - Pos = MAP_APPFONT ( 84 , 15 ) ; - Size = MAP_APPFONT ( 30 , 10 ) ; - Left = TRUE ; - Text [ en-US ] = "~Columns"; - }; - NumericField NF_COLS - { - Border = TRUE ; - Pos = MAP_APPFONT ( 117 , 14 ) ; - Size = MAP_APPFONT ( 36 , 12 ) ; - TabStop = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = PVIEW_MIN_COL ; - Maximum = PVIEW_MAX_COL ; - Value = 1 ; - First = PVIEW_MIN_COL ; - Last = PVIEW_MAX_COL ; - }; - FixedLine FL_MARGINS - { - Pos = MAP_APPFONT ( 6 , 32 ) ; - Size = MAP_APPFONT ( 150 , 8 ) ; - Text [ en-US ] = "Margins"; - }; - FixedText FT_LMARGIN - { - Pos = MAP_APPFONT ( 12 , 44 ) ; - Size = MAP_APPFONT ( 30 , 10 ) ; - Left = TRUE ; - Text [ en-US ] = "L~eft"; - }; - MetricField MF_LMARGIN - { - Border = TRUE ; - Pos = MAP_APPFONT ( 45 , 43 ) ; - Size = MAP_APPFONT ( 36 , 12 ) ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - DecimalDigits = 1 ; - Unit = FUNIT_CM ; - SpinSize = 10 ; - Minimum = 0 ; - Maximum = 9999 ; - First = 0 ; - Last = 2000 ; - }; - FixedText FT_RMARGIN - { - Pos = MAP_APPFONT ( 84 , 44 ) ; - Size = MAP_APPFONT ( 30 , 10 ) ; - Left = TRUE ; - Text [ en-US ] = "~Right"; - }; - MetricField MF_RMARGIN - { - Border = TRUE ; - Pos = MAP_APPFONT ( 117 , 43 ) ; - Size = MAP_APPFONT ( 36 , 12 ) ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - DecimalDigits = 1 ; - Unit = FUNIT_CM ; - SpinSize = 10 ; - Minimum = 0 ; - Maximum = 9999 ; - First = 0 ; - Last = 2000 ; - }; - FixedText FT_TMARGIN - { - Pos = MAP_APPFONT ( 12 , 59 ) ; - Size = MAP_APPFONT ( 30 , 10 ) ; - Left = TRUE ; - Text [ en-US ] = "~Top"; - }; - MetricField MF_TMARGIN - { - Border = TRUE ; - Pos = MAP_APPFONT ( 45 , 58 ) ; - Size = MAP_APPFONT ( 36 , 12 ) ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - DecimalDigits = 1 ; - Unit = FUNIT_CM ; - SpinSize = 10 ; - Minimum = 0 ; - Maximum = 9999 ; - First = 0 ; - Last = 2000 ; - }; - FixedText FT_BMARGIN - { - Pos = MAP_APPFONT ( 84 , 59 ) ; - Size = MAP_APPFONT ( 30 , 10 ) ; - Left = TRUE ; - Text [ en-US ] = "~Bottom"; - }; - MetricField MF_BMARGIN - { - Border = TRUE ; - Pos = MAP_APPFONT ( 117 , 58 ) ; - Size = MAP_APPFONT ( 36 , 12 ) ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - DecimalDigits = 1 ; - Unit = FUNIT_CM ; - SpinSize = 10 ; - Minimum = 0 ; - Maximum = 9999 ; - First = 0 ; - Last = 2000 ; - }; - FixedLine FL_DISTANCE - { - Pos = MAP_APPFONT ( 6 , 76 ) ; - Size = MAP_APPFONT ( 150 , 8 ) ; - - Text [ en-US ] = "Spacing"; - }; - FixedText FT_HMARGIN - { - Pos = MAP_APPFONT ( 12 , 88 ) ; - Size = MAP_APPFONT ( 30 , 10 ) ; - Left = TRUE ; - Text [ en-US ] = "Hori~zontal"; - }; - - MetricField MF_HMARGIN - { - Border = TRUE ; - Pos = MAP_APPFONT ( 45 , 87 ) ; - Size = MAP_APPFONT ( 36 , 12 ) ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - DecimalDigits = 1 ; - Unit = FUNIT_CM ; - SpinSize = 10 ; - Minimum = 0 ; - Maximum = 9999 ; - First = 0 ; - Last = 2000 ; - }; - FixedText FT_VMARGIN - { - Pos = MAP_APPFONT ( 84 , 88 ) ; - Size = MAP_APPFONT ( 32 , 10 ) ; - Left = TRUE ; - Text [ en-US ] = "~Vertically"; - }; - - MetricField MF_VMARGIN - { - Border = TRUE ; - Pos = MAP_APPFONT ( 117 , 87 ) ; - Size = MAP_APPFONT ( 36 , 12 ) ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - DecimalDigits = 1 ; - Unit = FUNIT_CM ; - SpinSize = 10 ; - Minimum = 0 ; - Maximum = 9999 ; - First = 0 ; - Last = 2000 ; - }; - FixedLine FL_ORIENTATION - { - Pos = MAP_APPFONT ( 6 , 102 ) ; - Size = MAP_APPFONT ( 150 , 8 ) ; - Text [ en-US ] = "Format"; - }; - RadioButton RB_LANDSCAPE - { - Pos = MAP_APPFONT ( 12 , 113 ) ; - Size = MAP_APPFONT ( 60 , 12 ) ; - TabStop = TRUE ; - Group = TRUE ; - Text [ en-US ] = "~Landscape"; - }; - RadioButton RB_PORTRAIT - { - Pos = MAP_APPFONT ( 84 , 113 ) ; - Size = MAP_APPFONT ( 60 , 12 ) ; - Text [ en-US ] = "P~ortrait"; - }; - Window WIN_PREVIEW - { - Pos = MAP_APPFONT ( 162 , 7 ) ; - Size = MAP_APPFONT ( 90 , 113 ) ; - }; - - OKButton BT_OK - { - Pos = MAP_APPFONT ( 258 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BT_CANCEL - { - Pos = MAP_APPFONT ( 258 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BT_HELP - { - Pos = MAP_APPFONT ( 258 , 49 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - PushButton PB_STANDARD - { - Pos = MAP_APPFONT ( 258 , 66 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Default"; - }; - Text [ en-US ] = "Print Options"; -}; ModalDialog DLG_PAGEPREVIEW_ZOOM { HelpID = HID_PPREV_ZOOM ; @@ -460,31 +195,3 @@ ToolBox RID_PVIEW_TOOLBOX Scroll = TRUE ; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sw/source/ui/uiview/view.hrc b/sw/source/ui/uiview/view.hrc old mode 100644 new mode 100755 index a2b828bb2c..e05b61e751 --- a/sw/source/ui/uiview/view.hrc +++ b/sw/source/ui/uiview/view.hrc @@ -77,7 +77,6 @@ #define DLG_SPECIAL_FORCED (RC_VIEW_BEGIN) #define DLG_PAGEPREVIEW_ZOOM (RC_VIEW_BEGIN + 1) -#define DLG_PAGEPREVIEW_PRINTOPTIONS (RC_VIEW_BEGIN + 2) // Ueberlaufpruefung ----------------------------------------------------- -- cgit v1.2.3 From 6152ec144dc8710abbafeaf352e1dcdb79adcdec Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 2 Sep 2010 12:01:28 +0200 Subject: cws tl82: warning-free code --- sw/source/ui/lingu/olmenu.cxx | 1 - 1 file changed, 1 deletion(-) mode change 100644 => 100755 sw/source/ui/lingu/olmenu.cxx (limited to 'sw/source') diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx old mode 100644 new mode 100755 index b5639ca6c6..98eaf8d466 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -823,7 +823,6 @@ void SwSpellPopup::Execute( USHORT nId ) else if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END) { OUString aWord( xSpellAlt->getWord() ); -// DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" ); PopupMenu *pMenu = GetPopupMenu(MN_ADD_TO_DIC); String aDicName ( pMenu->GetItemText(nId) ); -- cgit v1.2.3 From 58ca55008f8242679ffbe3f377a26539996c7829 Mon Sep 17 00:00:00 2001 From: os Date: Thu, 2 Sep 2010 16:05:08 +0200 Subject: component_* methods moved and exported --- sw/source/filter/ww8/rtfexportfilter.cxx | 89 ++++++++++++++++++++++++++++++++ sw/util/msword.map | 3 ++ 2 files changed, 92 insertions(+) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx index 01e1de7d5e..5b88918511 100644 --- a/sw/source/filter/ww8/rtfexportfilter.cxx +++ b/sw/source/filter/ww8/rtfexportfilter.cxx @@ -132,5 +132,94 @@ uno::Reference< uno::XInterface > SAL_CALL RtfExport_createInstance(const uno::R { return (cppu::OWeakObject*) new RtfExportFilter( rSMgr ); } +#ifdef __cplusplus +extern "C" +{ +#endif + +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ ) +{ + *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; +} + +SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, void* pRegistryKey ) +{ + sal_Bool bRet = sal_False; + + if( pRegistryKey ) + { + try + { + uno::Reference< registry::XRegistryKey > xNewKey1( + static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( + OUString::createFromAscii( IMPL_NAME_RTFEXPORT "/UNO/SERVICES/" ) ) ); + xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] ); + + bRet = sal_True; + } + catch( registry::InvalidRegistryException& ) + { + OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfexport)!" ); + } + +// try +// { +// uno::Reference< registry::XRegistryKey > xNewKey1( +// static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( +// OUString::createFromAscii( IMPL_NAME_RTFIMPORT "/UNO/SERVICES/" ) ) ); +// xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] ); + +// bRet = sal_True; +// } +// catch( registry::InvalidRegistryException& ) +// { +// OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfimport)!" ); +// } + } + + return bRet; +} + +// ------------------------ +// - component_getFactory - +// ------------------------ + +SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ ) +{ + OSL_TRACE("%s, pImplName is '%s'", OSL_THIS_FUNC, pImplName); + uno::Reference< lang::XSingleServiceFactory > xFactory; + void* pRet = 0; + + if ( rtl_str_compare( pImplName, IMPL_NAME_RTFEXPORT ) == 0 ) { + const OUString aServiceName( OUString::createFromAscii( IMPL_NAME_RTFEXPORT ) ); + + xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory( + reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), + RtfExport_getImplementationName(), + RtfExport_createInstance, + RtfExport_getSupportedServiceNames() ) ); + } +// else if ( rtl_str_compare( pImplName, IMPL_NAME_RTFIMPORT ) == 0 ) { +// const OUString aServiceName( OUString::createFromAscii( IMPL_NAME_RTFIMPORT ) ); + +// xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory( +// reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), +// RtfImport_getImplementationName(), +// RtfImport_createInstance, +// RtfImport_getSupportedServiceNames() ) ); +// } + + if ( xFactory.is() ) + { + xFactory->acquire(); + pRet = xFactory.get(); + } + + return pRet; +} + +#ifdef __cplusplus +} +#endif /* vi:set shiftwidth=4 expandtab: */ diff --git a/sw/util/msword.map b/sw/util/msword.map index 16b9d25b0b..d2a9d9b4f7 100755 --- a/sw/util/msword.map +++ b/sw/util/msword.map @@ -6,6 +6,9 @@ UDK_3_0_0 { ExportDOC; SaveOrDelMSVBAStorage_ww8; GetSaveWarningOfMSVBAStorage_ww8; + component_getImplementationEnvironment; + component_writeInfo; + component_getFactory; local: *; }; -- cgit v1.2.3 From 9bac3d90974ea2f310e4e4a575bc37bdf5bff479 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 3 Sep 2010 16:13:32 +0200 Subject: vmiklos01: #i113532# fix outline numbering --- sw/source/filter/ww8/rtfattributeoutput.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 140a2fd737..35d6444158 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -1052,7 +1052,9 @@ void RtfAttributeOutput::OutlineNumbering( BYTE nLvl, const SwNumFmt& /*rNFmt*/, if ( nLvl >= WW8ListManager::nMaxLevel ) nLvl = WW8ListManager::nMaxLevel - 1; - m_aStyles.append(OOO_STRING_SVTOOLS_RTF_LEVEL); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_ILVL); + m_aStyles.append((sal_Int32)nLvl); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_OUTLINELEVEL); m_aStyles.append((sal_Int32)nLvl); } @@ -2412,12 +2414,12 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL } else m_aStyles.append((sal_Int32)nLvl); - m_aStyles.append(OOO_STRING_SVTOOLS_RTF_LS); - m_aStyles.append((sal_Int32)m_rExport.GetId(*pRule)+1); - m_aStyles.append(' '); } else m_aStyles.append(OOO_STRING_SVTOOLS_RTF_TAB "}"); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_LS); + m_aStyles.append((sal_Int32)m_rExport.GetId(*pRule)+1); + m_aStyles.append(' '); } else if( sTxt.Len() ) m_aStyles.append(OOO_STRING_SVTOOLS_RTF_TAB); -- cgit v1.2.3 From c4de52a0fc4d328b2f405eaff7d4e3a3618d71a1 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 3 Sep 2010 16:55:02 +0200 Subject: vmiklos01: #i113532# fix numbering indents --- sw/source/filter/ww8/rtfattributeoutput.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 35d6444158..368e78253e 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -2375,9 +2375,8 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL } SvxLRSpaceItem aLR( (SvxLRSpaceItem&)rNdSet.Get( RES_LR_SPACE ) ); - aLR.SetTxtLeft( aLR.GetTxtLeft() + pFmt->GetAbsLSpace() ); + aLR.SetTxtLeft( aLR.GetTxtLeft() + pFmt->GetIndentAt() ); aLR.SetTxtFirstLineOfst( pFmt->GetFirstLineOffset() ); - FormatLRSpace(aLR); USHORT nStyle = m_rExport.GetId( *pFmt->GetCharFmt() ); OString* pString = m_rExport.GetStyle(nStyle); @@ -2424,6 +2423,7 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL else if( sTxt.Len() ) m_aStyles.append(OOO_STRING_SVTOOLS_RTF_TAB); } + FormatLRSpace(aLR); } } -- cgit v1.2.3 From d90e2a4ba7784c438bc6d1190aaf4e140d39d18b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 3 Sep 2010 17:53:47 +0200 Subject: dba34a: removed SvLBox'es (and friends) Set/GetWindowBits. They were used in parallel to Window's Set/GetStyle, with WB_* values which overlapped with existing (generic) WB_* bits. Since this overlapping has been removed, there's no need to have both Style and WindowBits at those classes. Should remove some source of confusion and error (and, well, perhaps introduce some new errors :) ). --- sw/source/ui/chrdlg/swuiccoll.cxx | 2 +- sw/source/ui/config/mailconfigpage.cxx | 2 +- sw/source/ui/config/optcomp.cxx | 2 +- sw/source/ui/dbui/addresslistdialog.cxx | 2 +- sw/source/ui/dbui/dbtree.cxx | 2 +- sw/source/ui/dbui/mailmergechildwindow.cxx | 2 +- sw/source/ui/dbui/mmaddressblockpage.cxx | 2 +- sw/source/ui/dbui/selectdbtabledialog.cxx | 2 +- sw/source/ui/dialog/uiregionsw.cxx | 2 +- sw/source/ui/envelp/label1.cxx | 2 +- sw/source/ui/fldui/changedb.cxx | 2 +- sw/source/ui/fldui/flddinf.cxx | 2 +- sw/source/ui/fldui/fldref.cxx | 2 +- sw/source/ui/index/cnttab.cxx | 4 ++-- sw/source/ui/misc/glosbib.cxx | 2 +- sw/source/ui/misc/glossary.cxx | 2 +- sw/source/ui/misc/redlndlg.cxx | 2 +- sw/source/ui/utlui/navipi.cxx | 4 ++-- 18 files changed, 20 insertions(+), 20 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx index 7fb20bf3f8..f5e8c1e4ef 100644 --- a/sw/source/ui/chrdlg/swuiccoll.cxx +++ b/sw/source/ui/chrdlg/swuiccoll.cxx @@ -109,7 +109,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet) aStyleLB.SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl)); aFilterLB.SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl)); - aTbLinks.SetWindowBits(WB_HSCROLL|WB_CLIPCHILDREN); + aTbLinks.SetStyle(aTbLinks.GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN); aTbLinks.SetSelectionMode( SINGLE_SELECTION ); aTbLinks.SetTabs( &nTabs[0], MAP_APPFONT ); aTbLinks.Resize(); // OS: Hack fuer richtige Selektion diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index e8752bd08f..c48a8b64fe 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -330,7 +330,7 @@ SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pPare m_aStatusLB.SetHelpId(HID_MM_TESTACCOUNTSETTINGS_TLB); static long nTabs[] = {2, 0, aSz.Width()/2 }; - m_aStatusLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); + m_aStatusLB.SetStyle( m_aStatusLB.GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aStatusLB.SetSelectionMode( SINGLE_SELECTION ); m_aStatusLB.SetTabs(&nTabs[0], MAP_PIXEL); short nEntryHeight = m_aStatusLB.GetEntryHeight(); diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index 53603031e1..0dbd938359 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -152,7 +152,7 @@ SwCompatibilityOptPage::SwCompatibilityOptPage( Window* pParent, const SfxItemSe pEntry->SetUserData( (void*)(ULONG)nResId ); } } - m_aOptionsLB.SetWindowBits( m_aOptionsLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION ); + m_aOptionsLB.SetStyle( m_aOptionsLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION ); m_aOptionsLB.SetHighlightRange(); FreeResource(); diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index c543cf702c..4ddc467655 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -219,7 +219,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) : m_aListLB.SetHelpId(HID_MM_ADDRESSLIST_TLB); static long nTabs[] = {2, 0, aSz.Width()/2 }; - m_aListLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); + m_aListLB.SetStyle( m_aListLB.GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aListLB.SetSelectionMode( SINGLE_SELECTION ); m_aListLB.SetTabs(&nTabs[0], MAP_PIXEL); m_aOK.SetClickHdl( LINK( this, SwAddressListDialog, OKHdl_Impl)); diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx index 4b31760592..ba6c6bd225 100644 --- a/sw/source/ui/dbui/dbtree.cxx +++ b/sw/source/ui/dbui/dbtree.cxx @@ -260,7 +260,7 @@ void SwDBTreeList::InitTreeList() if(!pImpl->HasContext() && pImpl->GetWrtShell()) return; SetSelectionMode(SINGLE_SELECTION); - SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); + SetStyle(GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); // Font nicht setzen, damit der Font des Controls uebernommen wird! SetSpaceBetweenEntries(0); SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE), diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx index e03b129034..94fd53a80f 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.cxx +++ b/sw/source/ui/dbui/mailmergechildwindow.cxx @@ -418,7 +418,7 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf m_aStatusLB.SetHelpId(HID_MM_MAILSTATUS_TLB); static long nTabs[] = {3, 0, nPos1, aSz.Width() }; - m_aStatusLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); + m_aStatusLB.SetStyle( m_aStatusLB.GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aStatusLB.SetSelectionMode( SINGLE_SELECTION ); m_aStatusLB.SetTabs(&nTabs[0], MAP_PIXEL); m_aStatusLB.SetSpaceBetweenEntries(3); diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index ae6b6b0cb0..c4ddc78ec7 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -1434,7 +1434,7 @@ DDListBox::DDListBox(SwCustomizeAddressBlockDialog* pParent, const ResId rResId) SvTreeListBox(pParent, rResId), m_pParentDialog(pParent) { - SetWindowBits( /*WB_HASBUTTONS|WB_HASBUTTONSATROOT|*/ + SetStyle( GetStyle() | /*WB_HASBUTTONS|WB_HASBUTTONSATROOT|*/ WB_CLIPCHILDREN ); // SetSpaceBetweenEntries(3); SetSelectionMode( SINGLE_SELECTION ); diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 51277a1fed..049b99e611 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -109,7 +109,7 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(Window* pParent, static long nTabs[] = {3, 0, aSz.Width()/2, aSz.Width() }; m_aTableLB.SetTabs(&nTabs[0], MAP_PIXEL); m_aTableLB.SetHelpId(HID_MM_SELECTDBTABLEDDIALOG_LISTBOX); - m_aTableLB.SetWindowBits( WB_CLIPCHILDREN ); + m_aTableLB.SetStyle( m_aTableLB.GetStyle() | WB_CLIPCHILDREN ); m_aTableLB.SetSpaceBetweenEntries(3); m_aTableLB.SetSelectionMode( SINGLE_SELECTION ); m_aTableLB.SetDragDropMode( 0 ); diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 440457f0b1..01c8abcbbe 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -432,7 +432,7 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh ) aTree.SetHelpId(HID_REGION_TREE); aTree.SetSelectionMode( MULTIPLE_SELECTION ); - aTree.SetWindowBits(WB_HASBUTTONSATROOT|WB_CLIPCHILDREN|WB_HSCROLL); + aTree.SetStyle(aTree.GetStyle()|WB_HASBUTTONSATROOT|WB_CLIPCHILDREN|WB_HSCROLL); aTree.SetSpaceBetweenEntries(0); if(bWeb) diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index 05c2cf90be..a9f6af7ba6 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -724,7 +724,7 @@ SwVisitingCardPage::SwVisitingCardPage(Window* pParent, const SfxItemSet& rSet) pExampleFrame(0) { FreeResource(); - aAutoTextLB.SetWindowBits( WB_HSCROLL ); + aAutoTextLB.SetStyle( aAutoTextLB.GetStyle() | WB_HSCROLL ); aAutoTextLB.SetSpaceBetweenEntries(0); aAutoTextLB.SetSelectionMode( SINGLE_SELECTION ); aAutoTextLB.SetHelpId(HID_BUSINESS_CARD_CONTENT); diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx index bd35309e68..17759f7a3b 100644 --- a/sw/source/ui/fldui/changedb.cxx +++ b/sw/source/ui/fldui/changedb.cxx @@ -115,7 +115,7 @@ SwChangeDBDlg::SwChangeDBDlg(SwView& rVw) : aAddDBPB.SetClickHdl(LINK(this, SwChangeDBDlg, AddDBHdl)); aUsedDBTLB.SetSelectionMode(MULTIPLE_SELECTION); - aUsedDBTLB.SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); + aUsedDBTLB.SetStyle(aUsedDBTLB.GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); aUsedDBTLB.SetSpaceBetweenEntries(0); aUsedDBTLB.SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE), diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index dabb6b91e5..9243037bb2 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -89,7 +89,7 @@ SwFldDokInfPage::SwFldDokInfPage(Window* pWindow, const SfxItemSet& rCoreSet ) : aTypeTLB.SetHelpId(HID_FIELD_DINF_TYPE); aTypeTLB.SetSelectionMode(SINGLE_SELECTION); - aTypeTLB.SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); + aTypeTLB.SetStyle(aTypeTLB.GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); // Font nicht setzen, damit der Font des Controls uebernommen wird! // Sonst bei falschem Font Bug an OV. aTypeTLB.SetSpaceBetweenEntries(0); diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 10ee25b477..5b7b70b5f9 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -124,7 +124,7 @@ SwFldRefPage::SwFldRefPage(Window* pParent, const SfxItemSet& rCoreSet ) : // --> OD 2007-11-21 #i83479# aSelectionToolTipLB.SetSelectHdl( LINK(this, SwFldRefPage, SubTypeHdl) ); aSelectionToolTipLB.SetDoubleClickHdl( LINK(this, SwFldRefPage, InsertHdl) ); - aSelectionToolTipLB.SetWindowBits( aSelectionToolTipLB.GetWindowBits() | WB_HSCROLL ); + aSelectionToolTipLB.SetStyle( aSelectionToolTipLB.GetStyle() | WB_HSCROLL ); aSelectionToolTipLB.SetSpaceBetweenEntries(1); aSelectionToolTipLB.SetHighlightRange(); // <-- diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 5d9a390600..fa8b13dd41 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -828,7 +828,7 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent, rHB.Show(); SwIndexTreeLB& rTLB = aHeaderTree.GetTreeListBox(); - rTLB.SetWindowBits(WB_CLIPCHILDREN|WB_SORT); + rTLB.SetStyle(rTLB.GetStyle()|WB_CLIPCHILDREN|WB_SORT); //aStylesTLB.SetSelectHdl(LINK(this, SwAddStylesDlg_Impl, SelectHdl)); rTLB.GetModel()->SetSortMode(SortAscending); for(i = 0; i < MAXLEVEL; ++i) @@ -2124,7 +2124,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet FreeResource(); sLevelStr = aLevelFT.GetText(); - aLevelLB.SetWindowBits( WB_HSCROLL ); + aLevelLB.SetStyle( aLevelLB.GetStyle() | WB_HSCROLL ); aLevelLB.SetSpaceBetweenEntries(0); aLevelLB.SetSelectionMode( SINGLE_SELECTION ); aLevelLB.SetHighlightRange(); // select full width diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 5374ddd2e2..ddb966aad2 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -107,7 +107,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, aGroupTLB.SetHelpId(HID_GLOS_GROUP_TREE); aGroupTLB.SetTabs( &nTabs[0], MAP_APPFONT ); - aGroupTLB.SetWindowBits(WB_HSCROLL|WB_CLIPCHILDREN|WB_SORT); + aGroupTLB.SetStyle(aGroupTLB.GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN|WB_SORT); aGroupTLB.SetSelectHdl(LINK(this, SwGlossaryGroupDlg, SelectHdl)); aGroupTLB.GetModel()->SetSortMode(SortAscending); aNewPB.SetClickHdl(LINK(this, SwGlossaryGroupDlg, NewHdl)); diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index faec81b639..b5c137a4e5 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -294,7 +294,7 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame, aInsertBtn.Enable(sal_False); aNameED.GrabFocus(); aCategoryBox.SetHelpId(HID_MD_GLOS_CATEGORY); - aCategoryBox.SetWindowBits(WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL|WB_VSCROLL|WB_CLIPCHILDREN|WB_SORT); + aCategoryBox.SetStyle(aCategoryBox.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL|WB_VSCROLL|WB_CLIPCHILDREN|WB_SORT); aCategoryBox.GetModel()->SetSortMode(SortAscending); aCategoryBox.SetHighlightRange(); // ueber volle Breite selektieren aCategoryBox.SetNodeDefaultImages( ); diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx index e2b7e6a151..2947edfcee 100644 --- a/sw/source/ui/misc/redlndlg.cxx +++ b/sw/source/ui/misc/redlndlg.cxx @@ -273,7 +273,7 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) : pActLB->SelectEntryPos(0); - pTable->SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); + pTable->SetStyle(pTable->GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); pTable->SetNodeDefaultImages(); pTable->SetSelectionMode(MULTIPLE_SELECTION); pTable->SetHighlightRange(1); diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 55276b7e33..4855d9a11f 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -865,7 +865,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, ((SfxDockingWindow*)pParent)->SetOutputSizePixel(aMinSize); aContentTree.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); - aContentTree.SetWindowBits( WB_HASBUTTONS|WB_HASBUTTONSATROOT| + aContentTree.SetStyle( aContentTree.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT| WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE ); aContentTree.SetSpaceBetweenEntries(3); aContentTree.SetSelectionMode( SINGLE_SELECTION ); @@ -879,7 +879,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, // TreeListBox fuer Globaldokument aGlobalTree.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); aGlobalTree.SetSelectionMode( MULTIPLE_SELECTION ); - aGlobalTree.SetWindowBits( WB_HASBUTTONS|WB_HASBUTTONSATROOT| + aGlobalTree.SetStyle( aGlobalTree.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT| WB_CLIPCHILDREN|WB_HSCROLL ); Size aGlblSize(aGlobalToolBox.CalcWindowSizePixel()); aGlobalToolBox.SetSizePixel(aGlblSize); -- cgit v1.2.3 From c059f34b9c43ca90e72a635d86bd029ddd5d4744 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 3 Sep 2010 19:02:39 +0200 Subject: vmiklos01: #i113532# implement missing character style support The change in RtfAttributeOutput::RTLAndCJKState() is needed as the RTF spec says: \csN must be prefixed with \* and must appear as the first item inside a group --- sw/source/filter/ww8/rtfattributeoutput.cxx | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 368e78253e..207c2d5d5b 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -225,21 +225,21 @@ void RtfAttributeOutput::RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript ) code that we're triggering ? */ if (bIsRTL) { - m_aRun.append(OOO_STRING_SVTOOLS_RTF_LTRCH); - m_aRun.append(' '); - m_aRun.append(OOO_STRING_SVTOOLS_RTF_RTLCH); + m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_LTRCH); + m_aStylesEnd.append(' '); + m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_RTLCH); } else { - m_aRun.append(OOO_STRING_SVTOOLS_RTF_RTLCH); - m_aRun.append(' '); - m_aRun.append(OOO_STRING_SVTOOLS_RTF_LTRCH); + m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_RTLCH); + m_aStylesEnd.append(' '); + m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_LTRCH); } switch (nScript) { case i18n::ScriptType::LATIN: - m_aRun.append(OOO_STRING_SVTOOLS_RTF_LOCH); + m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_LOCH); break; case i18n::ScriptType::ASIAN: - m_aRun.append(OOO_STRING_SVTOOLS_RTF_DBCH); + m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_DBCH); break; case i18n::ScriptType::COMPLEX: /* noop */ @@ -997,14 +997,17 @@ void RtfAttributeOutput::DefaultStyle( USHORT /*nStyle*/ ) /* noop, the default style is always 0 in RTF */ } -void RtfAttributeOutput::StartStyle( const String& rName, bool /*bPapFmt*/, +void RtfAttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT nBase, USHORT nNext, USHORT /*nWwId*/, USHORT nId ) { OSL_TRACE("%s, rName = '%s'", OSL_THIS_FUNC, OUStringToOString( OUString( rName ), m_rExport.eCurrentEncoding ).getStr()); m_aStylesheet.append('{'); - m_aStylesheet.append(OOO_STRING_SVTOOLS_RTF_S); + if (bPapFmt) + m_aStylesheet.append(OOO_STRING_SVTOOLS_RTF_S); + else + m_aStylesheet.append( OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_CS); m_aStylesheet.append( (sal_Int32)nId ); if ( nBase != 0x0FFF ) @@ -2166,6 +2169,8 @@ void RtfAttributeOutput::TextCharFormat( const SwFmtCharFmt& rCharFmt ) OSL_TRACE("%s", OSL_THIS_FUNC); USHORT nStyle = m_rExport.GetId( *rCharFmt.GetCharFmt() ); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_CS); + m_aStyles.append((sal_Int32)nStyle); OString* pString = m_rExport.GetStyle(nStyle); if (pString) m_aStyles.append(*pString); -- cgit v1.2.3 From fd518c4c8cd0cbef5a68a0e18cb4e181b76168de Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Sat, 4 Sep 2010 01:00:40 +0200 Subject: vmiklos01: #i113532# implement missing text frame support --- sw/source/filter/ww8/rtfattributeoutput.cxx | 54 +++++++++++++++++++++++++++-- sw/source/filter/ww8/rtfexport.cxx | 5 +++ sw/source/filter/ww8/rtfexport.hxx | 1 + 3 files changed, 57 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 207c2d5d5b..2c1e1e6f16 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -362,9 +362,12 @@ void RtfAttributeOutput::StartParagraphProperties( const SwTxtNode& rNode ) m_bBufferSectionBreaks = false; OStringBuffer aPar; - aPar.append(OOO_STRING_SVTOOLS_RTF_PARD); - aPar.append(OOO_STRING_SVTOOLS_RTF_PLAIN); - aPar.append(' '); + if (!m_rExport.bRTFFlySyntax) + { + aPar.append(OOO_STRING_SVTOOLS_RTF_PARD); + aPar.append(OOO_STRING_SVTOOLS_RTF_PLAIN); + aPar.append(' '); + } if (!m_bBufferSectionHeaders) m_rExport.Strm() << aPar.makeStringAndClear(); else @@ -1408,6 +1411,38 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi switch ( rFrame.GetWriterType() ) { + case sw::Frame::eTxtBox: + OSL_ENSURE(m_aRunText.getLength() == 0, "m_aRunText is not empty"); + m_rExport.mpParentFrame = &rFrame; + m_rExport.bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = true; + m_rExport.OutputFormat( rFrame.GetFrmFmt(), false, false, true ); + m_rExport.Strm() << m_aRunText.makeStringAndClear(); + m_rExport.Strm() << m_aStyles.makeStringAndClear(); + m_rExport.bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = false; + m_rExport.Strm() << "{" OOO_STRING_SVTOOLS_RTF_IGNORE; + m_rExport.OutputFormat( rFrame.GetFrmFmt(), false, false, true ); + m_rExport.Strm() << m_aRunText.makeStringAndClear(); + m_rExport.Strm() << m_aStyles.makeStringAndClear(); + m_rExport.Strm() << '}'; + + { + /* + * Save m_aRun as we should not loose the opening brace. + * OTOH, just drop the contents of m_aRunText in case something + * would be there, causing a problem later. + */ + OString aSave = m_aRun.makeStringAndClear(); + m_rExport.bRTFFlySyntax = true; + m_rExport.OutContent(*rFrame.GetContent()); + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_PARD; + m_rExport.bRTFFlySyntax = false; + m_aRun.append(aSave); + m_aRunText.setLength(0); + } + + m_rExport.mpParentFrame = NULL; + m_rExport.Strm() << RtfExport::sNewLine; + break; case sw::Frame::eGraphic: if (!rFrame.IsInline()) { @@ -2549,6 +2584,11 @@ void RtfAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace ) m_aStyles.append( (sal_Int32) rLRSpace.GetTxtFirstLineOfst() ); } } + else if (rLRSpace.GetLeft() == rLRSpace.GetRight() && m_rExport.bRTFFlySyntax) + { + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_DFRMTXTX; + m_rExport.OutLong( rLRSpace.GetLeft() ); + } } void RtfAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace ) @@ -2580,6 +2620,11 @@ void RtfAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace ) m_aStyles.append( (sal_Int32) rULSpace.GetLower() ); } } + else if (rULSpace.GetUpper() == rULSpace.GetLower() && m_rExport.bRTFFlySyntax) + { + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_DFRMTXTY; + m_rExport.OutLong( rULSpace.GetLower() ); + } } void RtfAttributeOutput::FormatSurround( const SwFmtSurround& rSurround ) @@ -2719,6 +2764,9 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox ) USHORT nDist = rBox.GetDistance(); + if ( m_rExport.bRTFFlySyntax ) + return; + if( rBox.GetTop() && rBox.GetBottom() && rBox.GetLeft() && rBox.GetRight() && *rBox.GetTop() == *rBox.GetBottom() && diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 9bbd393b33..eae26388ae 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -1103,6 +1103,11 @@ USHORT RtfExport::GetRedline( const String& rAuthor ) } } +void RtfExport::OutContent( const SwNode& rNode ) +{ + OutputContentNode(*rNode.GetCntntNode()); +} + void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage ) { OSL_TRACE("%s start", OSL_THIS_FUNC); diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx index 9e468d2804..4b4c2d7425 100644 --- a/sw/source/filter/ww8/rtfexport.hxx +++ b/sw/source/filter/ww8/rtfexport.hxx @@ -174,6 +174,7 @@ public: rtl::OString OutString(const String &rStr, rtl_TextEncoding eDestEnc); rtl::OString OutHex(ULONG nHex, BYTE nLen); void OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage ); + void OutContent( const SwNode& rNode ); USHORT GetColor( const Color& rColor ) const; void InsColor( const Color& rCol ); -- cgit v1.2.3 From 6a113d0e2fe55d021fbb8437b3671cb16e2a2fdd Mon Sep 17 00:00:00 2001 From: os Date: Mon, 6 Sep 2010 16:54:27 +0200 Subject: #i112518# prevent document modification while printing --- sw/source/ui/uno/unotxdoc.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sw/source') diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index e3f1322bed..862c2b321b 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -82,6 +82,7 @@ #include #include #include +#include #include #include @@ -2732,10 +2733,21 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( // since printing now also use the API for PDF export this option // should be set for printing as well ... pWrtShell->SetPDFExportOption( sal_True ); + bool bOrigStatus = pRenderDocShell->IsEnableSetModified(); + // check configuration: shall update of printing information in DocInfo set the document to "modified"? + bool bStateChanged = false; + if ( bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() ) + { + pRenderDocShell->EnableSetModified( sal_False ); + bStateChanged = true; + } + // --> FME 2005-05-23 #122919# Force field update before PDF export: pWrtShell->ViewShell::UpdateFlds(TRUE); // <-- + if( bStateChanged ) + pRenderDocShell->EnableSetModified( sal_True ); // there is some redundancy between those two function calls, but right now // there is no time to sort this out. -- cgit v1.2.3 From 8109a16225dd14ca66b4736be31c93f6c33c4b43 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 7 Sep 2010 15:23:10 +0200 Subject: sw33bf09: #i114210# method - correct determination of page number from renderer index --- sw/source/core/doc/doc.cxx | 12 +++++++++--- sw/source/ui/uno/unotxdoc.cxx | 5 ++++- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index a414c8fb9b..a470440968 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1714,16 +1714,22 @@ sal_uInt16 SwDoc::GetPageCount() const const Size SwDoc::GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const { Size aSize; - if( GetRootFrm() && nPageNum ) + if ( GetRootFrm() && nPageNum ) { const SwPageFrm* pPage = static_cast (GetRootFrm()->Lower()); - while( --nPageNum && pPage->GetNext() ) + while ( --nPageNum && pPage->GetNext() ) + { pPage = static_cast( pPage->GetNext() ); + } - if( !bSkipEmptyPages && pPage->IsEmptyPage() && pPage->GetNext() ) + // switch to next page for an empty page, if empty pages are not skipped + // in order to get a sensible page size for an empty page - e.g. for printing. + if ( !bSkipEmptyPages && pPage->IsEmptyPage() && pPage->GetNext() ) + { pPage = static_cast( pPage->GetNext() ); + } aSize = pPage->Frm().SSize(); } diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index e3f1322bed..12135db43f 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2844,7 +2844,10 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( uno::Sequence< beans::PropertyValue > aRenderer; if (m_pRenderData) { - const USHORT nPage = nRenderer + 1; + // --> TL, OD 2010-09-07 #i114210# + // determine the correct page number from the renderer index + const USHORT nPage = m_pRenderData->GetPagesToPrint()[ nRenderer ]; + // <-- // get paper tray to use ... sal_Int32 nPrinterPaperTray = -1; -- cgit v1.2.3 From 580cfec1454bf4713209a4ef9a07286765124bf7 Mon Sep 17 00:00:00 2001 From: os Date: Tue, 7 Sep 2010 15:45:17 +0200 Subject: rtf import registration --- sw/source/filter/ww8/rtfexportfilter.cxx | 49 ++++++++++++++++---------------- 1 file changed, 25 insertions(+), 24 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx index 5b88918511..ff4ed180d0 100644 --- a/sw/source/filter/ww8/rtfexportfilter.cxx +++ b/sw/source/filter/ww8/rtfexportfilter.cxx @@ -26,8 +26,9 @@ * ************************************************************************/ -#include "rtfexportfilter.hxx" -#include "rtfexport.hxx" +#include +#include +#include #include #include @@ -162,19 +163,19 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceMan OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfexport)!" ); } -// try -// { -// uno::Reference< registry::XRegistryKey > xNewKey1( -// static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( -// OUString::createFromAscii( IMPL_NAME_RTFIMPORT "/UNO/SERVICES/" ) ) ); -// xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] ); - -// bRet = sal_True; -// } -// catch( registry::InvalidRegistryException& ) -// { -// OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfimport)!" ); -// } + try + { + uno::Reference< registry::XRegistryKey > xNewKey1( + static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( + OUString::createFromAscii( IMPL_NAME_RTFIMPORT "/UNO/SERVICES/" ) ) ); + xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] ); + + bRet = sal_True; + } + catch( registry::InvalidRegistryException& ) + { + OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfimport)!" ); + } } return bRet; @@ -199,15 +200,15 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplN RtfExport_createInstance, RtfExport_getSupportedServiceNames() ) ); } -// else if ( rtl_str_compare( pImplName, IMPL_NAME_RTFIMPORT ) == 0 ) { -// const OUString aServiceName( OUString::createFromAscii( IMPL_NAME_RTFIMPORT ) ); - -// xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory( -// reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), -// RtfImport_getImplementationName(), -// RtfImport_createInstance, -// RtfImport_getSupportedServiceNames() ) ); -// } + else if ( rtl_str_compare( pImplName, IMPL_NAME_RTFIMPORT ) == 0 ) { + const OUString aServiceName( OUString::createFromAscii( IMPL_NAME_RTFIMPORT ) ); + + xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory( + reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), + RtfImport_getImplementationName(), + RtfImport_createInstance, + RtfImport_getSupportedServiceNames() ) ); + } if ( xFactory.is() ) { -- cgit v1.2.3 From 9762e906068c85314d5ce3069b5ddb6fad67bf99 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Wed, 8 Sep 2010 17:52:18 +0200 Subject: #b6983101#: applied patch and did some additional robustness checks --- sw/source/core/doc/number.cxx | 9 ++++++++- sw/source/filter/rtf/rtfnum.cxx | 8 ++++---- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index ed1d795f78..24c2d8dc08 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -101,8 +101,15 @@ const SwNumFmt& SwNumRule::Get( USHORT i ) const const SwNumFmt* SwNumRule::GetNumFmt( USHORT i ) const { + const SwNumFmt * pResult = NULL; + ASSERT_ID( i < MAXLEVEL && eRuleType < RULE_END, ERR_NUMLEVEL); - return aFmts[ i ]; + if ( i < MAXLEVEL && eRuleType < RULE_END) + { + pResult = aFmts[ i ]; + } + + return pResult; } // --> OD 2008-07-08 #i91400# diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx index 3d77f13667..e4702387fa 100644 --- a/sw/source/filter/rtf/rtfnum.cxx +++ b/sw/source/filter/rtf/rtfnum.cxx @@ -806,8 +806,8 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken ) // suche die Rule - steht unter Nummer 3 nListNo = 3; bContinus = FALSE; - nLevel = MAXLEVEL <= nTokenValue ? MAXLEVEL - 1 - : BYTE( nTokenValue - 1 ); + nLevel = MAXLEVEL <= (unsigned long) nTokenValue ? MAXLEVEL - 1 + : (!nTokenValue ? 0 : BYTE( nTokenValue - 1 )); } else { @@ -815,9 +815,9 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken ) { case RTF_PNLVL: nListNo = 3; bContinus = FALSE; - nLevel = MAXLEVEL <= nTokenValue + nLevel = MAXLEVEL <= (unsigned long) nTokenValue ? MAXLEVEL - 1 - : BYTE( nTokenValue-1 ); + : (!nTokenValue ? 0 : BYTE( nTokenValue-1 )); break; case RTF_PNLVLBODY: -- cgit v1.2.3 From fc99ab4bbfaabd7510348cd12b1224562905c5ac Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 9 Sep 2010 01:20:35 +0200 Subject: vmiklos01: #i113532# fix tables at the start of the document --- sw/source/filter/ww8/rtfexport.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index eae26388ae..7d2941af95 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -376,6 +376,7 @@ void RtfExport::WriteStyles() void RtfExport::WriteMainText() { OSL_TRACE("%s start", OSL_THIS_FUNC); + pCurPam->GetPoint()->nNode = pDoc->GetNodes().GetEndOfContent().StartOfSectionNode()->GetIndex(); WriteText(); OSL_TRACE("%s end", OSL_THIS_FUNC); } -- cgit v1.2.3 From 3d68fc7abfd02817924655a2609c1b8d489b2348 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 9 Sep 2010 15:37:37 +0200 Subject: sw34bf01: #i114198#: callnk.cxx : apply patch by cmc --- sw/source/core/crsr/callnk.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx index 9e37e408e3..e048f47d85 100644 --- a/sw/source/core/crsr/callnk.cxx +++ b/sw/source/core/crsr/callnk.cxx @@ -196,6 +196,10 @@ SwCallLink::~SwCallLink() { const SwNodeIndex* pIndex = pFlyFrm->GetFmt()->GetCntnt().GetCntntIdx(); ASSERT( pIndex, "Fly ohne Cntnt" ); + + if (!pIndex) + return; + const SwNode& rStNd = pIndex->GetNode(); if( rStNd.EndOfSectionNode()->StartOfSectionIndex() > nNode || -- cgit v1.2.3 From d6df29e552d74c83a038389d48fe1c9c116e5c1e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 9 Sep 2010 16:37:04 +0200 Subject: sw33bf09: #i114163#: SvXMLExportItemMapper::QueryXMLValue(): write proper value "auto" instead of "0" for style:page-number. --- sw/source/filter/xml/xmlexpit.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index e0a73cae15..7277d7a235 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -926,9 +926,15 @@ sal_Bool SvXMLExportItemMapper::QueryXMLValue( if( MID_PAGEDESC_PAGENUMOFFSET==nMemberId ) { - - rUnitConverter.convertNumber( - aOut, (sal_Int32)pPageDesc->GetNumOffset() ); + sal_Int32 const number(pPageDesc->GetNumOffset()); + if (0 >= number) + { + aOut.append(GetXMLToken(XML_AUTO)); + } + else // #i114163# positiveInteger only! + { + rUnitConverter.convertNumber(aOut, number); + } bOk = sal_True; } } -- cgit v1.2.3 From 5a5f19a418e2674d901b74223d6794f9a93940c5 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 9 Sep 2010 19:19:00 +0200 Subject: sw34bf01: #i114409#: sw: apply patch by dtardon: prevent deref. of dangling ptr if there is no other instance of SvtSysLocale hanging around somewhere --- sw/inc/calc.hxx | 2 ++ sw/source/core/bastyp/calc.cxx | 14 ++++++++------ sw/source/ui/docvw/AnnotationWin.cxx | 3 ++- sw/source/ui/docvw/SidebarWin.cxx | 3 ++- sw/source/ui/utlui/initui.cxx | 3 ++- sw/source/ui/utlui/uitool.cxx | 3 ++- 6 files changed, 18 insertions(+), 10 deletions(-) mode change 100755 => 100644 sw/source/ui/docvw/SidebarWin.cxx (limited to 'sw/source') diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx index 5b5a052861..f402b73fc7 100644 --- a/sw/inc/calc.hxx +++ b/sw/inc/calc.hxx @@ -28,6 +28,7 @@ #define _CALC_HXX #include +#include #ifndef __SBX_SBXVALUE //autogen #include @@ -185,6 +186,7 @@ class SwCalc xub_StrLen nCommandPos; SwDoc& rDoc; + SvtSysLocale m_aSysLocale; const LocaleDataWrapper* pLclData; CharClass* pCharClass; diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index 728b4c63d3..e52ca637ad 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -270,7 +270,7 @@ SwCalc::SwCalc( SwDoc& rD ) : aErrExpr( aEmptyStr, SwSbxValue(), 0 ), rDoc( rD ), - pLclData( &SvtSysLocale().GetLocaleData() ), + pLclData( m_aSysLocale.GetLocaleDataPtr() ), pCharClass( &GetAppCharClass() ), nListPor( 0 ), eError( CALC_NOERR ) @@ -419,7 +419,7 @@ SwCalc::~SwCalc() { for( USHORT n = 0; n < TBLSZ; ++n ) delete VarTable[n]; - if( pLclData != &SvtSysLocale().GetLocaleData() ) + if( pLclData != m_aSysLocale.GetLocaleDataPtr() ) delete pLclData; if( pCharClass != &GetAppCharClass() ) delete pCharClass; @@ -1617,9 +1617,10 @@ String SwCalc::GetDBName(const String& rName) BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, double& rVal, const LocaleDataWrapper* pLclData ) { + const SvtSysLocale aSysLocale; const LocaleDataWrapper* pLclD = pLclData; if( !pLclD ) - pLclD = &SvtSysLocale().GetLocaleData(); + pLclD = aSysLocale.GetLocaleDataPtr(); const xub_Unicode nCurrCmdPos = rCommandPos; rtl_math_ConversionStatus eStatus; @@ -1631,7 +1632,7 @@ BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, &eStatus, &pEnd ); rCommandPos = static_cast(pEnd - rCommand.GetBuffer()); - if( !pLclData && pLclD != &SvtSysLocale().GetLocaleData() ) + if( !pLclData && pLclD != &aSysLocale.GetLocaleData() ) delete (LocaleDataWrapper*)pLclD; return rtl_math_ConversionStatus_Ok == eStatus && nCurrCmdPos != rCommandPos; @@ -1640,7 +1641,8 @@ BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, double& rVal, SwDoc* pDoc ) { - const LocaleDataWrapper* pLclD = &SvtSysLocale().GetLocaleData(); + const SvtSysLocale aSysLocale; + const LocaleDataWrapper* pLclD = aSysLocale.GetLocaleDataPtr(); if( pDoc ) { @@ -1661,7 +1663,7 @@ BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, &eStatus, &pEnd ); rCommandPos = static_cast(pEnd - rCommand.GetBuffer()); - if( pLclD != &SvtSysLocale().GetLocaleData() ) + if( pLclD != &aSysLocale.GetLocaleData() ) delete (LocaleDataWrapper*)pLclD; return rtl_math_ConversionStatus_Ok == eStatus && nCurrCmdPos != rCommandPos; diff --git a/sw/source/ui/docvw/AnnotationWin.cxx b/sw/source/ui/docvw/AnnotationWin.cxx index 91ea1e13b0..08fb91dcc3 100644 --- a/sw/source/ui/docvw/AnnotationWin.cxx +++ b/sw/source/ui/docvw/AnnotationWin.cxx @@ -208,7 +208,8 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText) { //collect our old meta data SwSidebarWin* pWin = Mgr().GetNextPostIt(KEY_PAGEUP, this); - const LocaleDataWrapper& rLocalData = SvtSysLocale().GetLocaleData(); + const SvtSysLocale aSysLocale; + const LocaleDataWrapper& rLocalData = aSysLocale.GetLocaleData(); String aText = String(SW_RES(STR_REPLY)); SwRewriter aRewriter; aRewriter.AddRule(UNDO_ARG1, pWin->GetAuthor()); diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx old mode 100755 new mode 100644 index 8caf11c84d..ea95d1d0d3 --- a/sw/source/ui/docvw/SidebarWin.cxx +++ b/sw/source/ui/docvw/SidebarWin.cxx @@ -389,7 +389,8 @@ void SwSidebarWin::InitControls() void SwSidebarWin::CheckMetaText() { - const LocaleDataWrapper& rLocalData = SvtSysLocale().GetLocaleData(); + const SvtSysLocale aSysLocale; + const LocaleDataWrapper& rLocalData = aSysLocale.GetLocaleData(); String sMeta = GetAuthor(); if (sMeta.Len() == 0) { diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx index 65731de981..c4147c3910 100644 --- a/sw/source/ui/utlui/initui.cxx +++ b/sw/source/ui/utlui/initui.cxx @@ -260,7 +260,8 @@ ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( SvStringsDtor& rLst ) p->SearchAndReplace(C2S("%1"), C2S(",,")); p->SearchAndReplace(C2S("%2"), C2S("''")); #else - const LocaleDataWrapper& rLclD = SvtSysLocale().GetLocaleData(); + const SvtSysLocale aSysLocale; + const LocaleDataWrapper& rLclD = aSysLocale.GetLocaleData(); //unter richtigen Betriebssystemen funktioniert es auch so p->SearchAndReplace(C2S("%1"), rLclD.getDoubleQuotationMarkStart()); p->SearchAndReplace(C2S("%2"), rLclD.getDoubleQuotationMarkEnd()); diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx index c9e10d69c0..fb28ef5000 100644 --- a/sw/source/ui/utlui/uitool.cxx +++ b/sw/source/ui/utlui/uitool.cxx @@ -730,7 +730,8 @@ SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, USHORT *pPercent, String GetAppLangDateTimeString( const DateTime& rDT ) { - const LocaleDataWrapper& rAppLclData = SvtSysLocale().GetLocaleData(); + const SvtSysLocale aSysLocale; + const LocaleDataWrapper& rAppLclData = aSysLocale.GetLocaleData(); String sRet( rAppLclData.getDate( rDT )); ( sRet += ' ' ) += rAppLclData.getTime( rDT, FALSE, FALSE ); return sRet; -- cgit v1.2.3 From f65b7c1f4eaf30deaebacffecfd449fbf0827eb6 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 9 Sep 2010 19:21:48 +0200 Subject: sw34bf01: #i114412#: calc.cxx: apply patch by dtardon: remove dubious delete and refactor the remaining code a bit --- sw/source/core/bastyp/calc.cxx | 61 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 31 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index e52ca637ad..5953e39c9b 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -38,6 +38,7 @@ // #include #include #include +#include #include #include #include @@ -1608,44 +1609,50 @@ String SwCalc::GetDBName(const String& rName) //------------------------------------------------------------------------------ -/****************************************************************************** - * Methode : BOOL SwCalc::Str2Double( double& ) - * Beschreibung: - * Erstellt : OK 07.06.94 12:56 - * Aenderung : JP 27.10.98 - ******************************************************************************/ -BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, - double& rVal, const LocaleDataWrapper* pLclData ) +namespace { - const SvtSysLocale aSysLocale; - const LocaleDataWrapper* pLclD = pLclData; - if( !pLclD ) - pLclD = aSysLocale.GetLocaleDataPtr(); +BOOL +lcl_Str2Double( const String& rCommand, xub_StrLen& rCommandPos, double& rVal, + const LocaleDataWrapper* const pLclData ) +{ + OSL_ASSERT(pLclData); const xub_Unicode nCurrCmdPos = rCommandPos; rtl_math_ConversionStatus eStatus; const sal_Unicode* pEnd; rVal = rtl_math_uStringToDouble( rCommand.GetBuffer() + rCommandPos, rCommand.GetBuffer() + rCommand.Len(), - pLclD->getNumDecimalSep().GetChar(0), - pLclD->getNumThousandSep().GetChar(0), + pLclData->getNumDecimalSep().GetChar(0), + pLclData->getNumThousandSep().GetChar(0), &eStatus, &pEnd ); rCommandPos = static_cast(pEnd - rCommand.GetBuffer()); - if( !pLclData && pLclD != &aSysLocale.GetLocaleData() ) - delete (LocaleDataWrapper*)pLclD; - return rtl_math_ConversionStatus_Ok == eStatus && nCurrCmdPos != rCommandPos; } +} + +/****************************************************************************** + * Methode : BOOL SwCalc::Str2Double( double& ) + * Beschreibung: + * Erstellt : OK 07.06.94 12:56 + * Aenderung : JP 27.10.98 + ******************************************************************************/ +BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, + double& rVal, const LocaleDataWrapper* const pLclData ) +{ + const SvtSysLocale aSysLocale; + return lcl_Str2Double( rCommand, rCommandPos, rVal, + pLclData ? pLclData : aSysLocale.GetLocaleDataPtr() ); +} + BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, - double& rVal, SwDoc* pDoc ) + double& rVal, SwDoc* const pDoc ) { const SvtSysLocale aSysLocale; const LocaleDataWrapper* pLclD = aSysLocale.GetLocaleDataPtr(); if( pDoc ) { - LanguageType eLang = GetDocAppScriptLang( *pDoc ); if( eLang != SvxLocaleToLanguage( pLclD->getLocale() ) ) pLclD = new LocaleDataWrapper( @@ -1653,20 +1660,12 @@ BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, SvxCreateLocale( eLang ) ); } - const xub_Unicode nCurrCmdPos = rCommandPos; - rtl_math_ConversionStatus eStatus; - const sal_Unicode* pEnd; - rVal = rtl_math_uStringToDouble( rCommand.GetBuffer() + rCommandPos, - rCommand.GetBuffer() + rCommand.Len(), - pLclD->getNumDecimalSep().GetChar(0), - pLclD->getNumThousandSep().GetChar(0), - &eStatus, &pEnd ); - rCommandPos = static_cast(pEnd - rCommand.GetBuffer()); + BOOL bRet = lcl_Str2Double( rCommand, rCommandPos, rVal, pLclD ); - if( pLclD != &aSysLocale.GetLocaleData() ) - delete (LocaleDataWrapper*)pLclD; + if( pLclD != aSysLocale.GetLocaleDataPtr() ) + delete pLclD; - return rtl_math_ConversionStatus_Ok == eStatus && nCurrCmdPos != rCommandPos; + return bRet; } //------------------------------------------------------------------------------ -- cgit v1.2.3 From b23647194037e5e2ea7181bea3629c507226baa0 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 9 Sep 2010 20:11:57 +0200 Subject: sw34bf01: #i114412#: calc.cxx: change signature of Str2Double() for stupid Sun C++ and replace the other delete with an auto_ptr. --- sw/inc/calc.hxx | 8 ++++---- sw/source/core/bastyp/calc.cxx | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx index f402b73fc7..885cdcd75c 100644 --- a/sw/inc/calc.hxx +++ b/sw/inc/calc.hxx @@ -230,11 +230,11 @@ public: void SetCalcError( SwCalcError eErr ) { eError = eErr; } BOOL IsCalcError() const { return 0 != eError; } - static BOOL Str2Double( const String& rStr, xub_StrLen& rPos, + static bool Str2Double( const String& rStr, xub_StrLen& rPos, double& rVal, - const LocaleDataWrapper* pData = 0 ); - static BOOL Str2Double( const String& rStr, xub_StrLen& rPos, - double& rVal, SwDoc* pDoc ); + LocaleDataWrapper const*const pData = 0 ); + static bool Str2Double( const String& rStr, xub_StrLen& rPos, + double& rVal, SwDoc *const pDoc ); SW_DLLPUBLIC static BOOL IsValidVarName( const String& rStr, String* pValidName = 0 ); diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index 5953e39c9b..72f8b150e3 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -1612,7 +1612,7 @@ String SwCalc::GetDBName(const String& rName) namespace { -BOOL +static bool lcl_Str2Double( const String& rCommand, xub_StrLen& rCommandPos, double& rVal, const LocaleDataWrapper* const pLclData ) { @@ -1638,7 +1638,7 @@ lcl_Str2Double( const String& rCommand, xub_StrLen& rCommandPos, double& rVal, * Erstellt : OK 07.06.94 12:56 * Aenderung : JP 27.10.98 ******************************************************************************/ -BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, +bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, double& rVal, const LocaleDataWrapper* const pLclData ) { const SvtSysLocale aSysLocale; @@ -1646,24 +1646,24 @@ BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, pLclData ? pLclData : aSysLocale.GetLocaleDataPtr() ); } -BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, +bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, double& rVal, SwDoc* const pDoc ) { const SvtSysLocale aSysLocale; - const LocaleDataWrapper* pLclD = aSysLocale.GetLocaleDataPtr(); + ::std::auto_ptr pLclD; if( pDoc ) { LanguageType eLang = GetDocAppScriptLang( *pDoc ); if( eLang != SvxLocaleToLanguage( pLclD->getLocale() ) ) - pLclD = new LocaleDataWrapper( + { + pLclD.reset( new LocaleDataWrapper( ::comphelper::getProcessServiceFactory(), - SvxCreateLocale( eLang ) ); + SvxCreateLocale( eLang ) ) ); + } } - BOOL bRet = lcl_Str2Double( rCommand, rCommandPos, rVal, pLclD ); - - if( pLclD != aSysLocale.GetLocaleDataPtr() ) - delete pLclD; + bool const bRet = lcl_Str2Double( rCommand, rCommandPos, rVal, + (pLclD.get()) ? pLclD.get() : aSysLocale.GetLocaleDataPtr() ); return bRet; } -- cgit v1.2.3 From 83fe9554e7ccb85caf1b6de6bcfb43f612ba51a8 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Fri, 10 Sep 2010 11:45:14 +0200 Subject: #b6983098# applied patch --- sw/source/filter/ww8/ww8scan.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 8ca3f12911..36ef485a45 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -7179,8 +7179,16 @@ void WW8DopTypography::ReadFromMem(BYTE *&pData) for (i=0; i < nMaxLeading; ++i) rgxchLPunct[i] = Get_Short(pData); - rgxchFPunct[cchFollowingPunct]=0; - rgxchLPunct[cchLeadingPunct]=0; + if (cchFollowingPunct >= 0 && cchFollowingPunct < nMaxFollowing) + rgxchFPunct[cchFollowingPunct]=0; + else + rgxchFPunct[nMaxFollowing - 1]=0; + + if (cchLeadingPunct >= 0 && cchLeadingPunct < nMaxLeading) + rgxchLPunct[cchLeadingPunct]=0; + else + rgxchLPunct[nMaxLeading - 1]=0; + } void WW8DopTypography::WriteToMem(BYTE *&pData) const -- cgit v1.2.3 From 33bf4b92d583c2863f44a651b6632dc009b022db Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 10 Sep 2010 13:10:07 +0200 Subject: sb129: #i113189# change UNO components to use passive registration --- starmath/prj/d.lst | 2 + starmath/source/detreg.cxx | 23 ------- starmath/source/register.cxx | 86 ------------------------ starmath/util/makefile.mk | 14 ++++ starmath/util/sm.component | 61 ++++++++++++++++++ starmath/util/smd.component | 34 ++++++++++ sw/prj/d.lst | 3 + sw/source/filter/ww8/docxexportfilter.cxx | 24 ------- sw/source/ui/uno/detreg.cxx | 24 ------- sw/source/ui/uno/unofreg.cxx | 93 -------------------------- sw/source/ui/vba/service.cxx | 10 --- sw/util/makefile.mk | 20 ++++++ sw/util/sw.component | 104 ++++++++++++++++++++++++++++++ sw/util/swd.component | 36 +++++++++++ sw/util/vbaswobj.component | 43 ++++++++++++ 15 files changed, 317 insertions(+), 260 deletions(-) create mode 100644 starmath/util/sm.component create mode 100644 starmath/util/smd.component create mode 100644 sw/util/sw.component create mode 100644 sw/util/swd.component create mode 100644 sw/util/vbaswobj.component (limited to 'sw/source') diff --git a/starmath/prj/d.lst b/starmath/prj/d.lst index bc48875e81..78bae57498 100644 --- a/starmath/prj/d.lst +++ b/starmath/prj/d.lst @@ -19,3 +19,5 @@ mkdir: %_DEST%\inc%_EXT%\starmath ..\uiconfig\smath\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\smath\menubar\*.xml ..\uiconfig\smath\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\smath\toolbar\*.xml ..\uiconfig\smath\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\smath\statusbar\*.xml +..\%__SRC%\misc\sm.component %_DEST%\xml%_EXT%\sm.component +..\%__SRC%\misc\smd.component %_DEST%\xml%_EXT%\smd.component diff --git a/starmath/source/detreg.cxx b/starmath/source/detreg.cxx index 602c99bb1b..5d8c809b2b 100644 --- a/starmath/source/detreg.cxx +++ b/starmath/source/detreg.cxx @@ -48,29 +48,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } -sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, - void* pRegistryKey ) -{ - Reference< ::registry::XRegistryKey > - xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ; - - OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") ); - OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ); - - // Eigentliche Implementierung und ihre Services registrieren - sal_Int32 i; - Reference< ::registry::XRegistryKey > xNewKey; - - xNewKey = xKey->createKey( aDelimiter + SmFilterDetect::impl_getStaticImplementationName() + - aUnoServices ); - - Sequence< OUString > aServices = SmFilterDetect::impl_getStaticSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - return sal_True; -} - void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, void* /*pRegistryKey*/ ) diff --git a/starmath/source/register.cxx b/starmath/source/register.cxx index 7e393fe606..59fecfcb2f 100644 --- a/starmath/source/register.cxx +++ b/starmath/source/register.cxx @@ -118,92 +118,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } -sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, - void* pRegistryKey ) -{ - Reference< registry::XRegistryKey > - xKey( reinterpret_cast< registry::XRegistryKey* >( pRegistryKey ) ) ; - - OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") ); - OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ); - - // Eigentliche Implementierung und ihre Services registrieren - sal_Int32 i; - Reference< registry::XRegistryKey > xNewKey; - - xNewKey = xKey->createKey( aDelimiter + SmXMLImport_getImplementationName() + - aUnoServices ); - - Sequence< OUString > aServices = SmXMLImport_getSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - xNewKey = xKey->createKey( aDelimiter + SmXMLExport_getImplementationName() + - aUnoServices ); - - aServices = SmXMLExport_getSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - xNewKey = xKey->createKey( aDelimiter + SmXMLImportMeta_getImplementationName() + - aUnoServices ); - - aServices = SmXMLImportMeta_getSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - xNewKey = xKey->createKey( aDelimiter + SmXMLExportMetaOOO_getImplementationName() + - aUnoServices ); - - aServices = SmXMLExportMetaOOO_getSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - xNewKey = xKey->createKey( aDelimiter + SmXMLExportMeta_getImplementationName() + - aUnoServices ); - - aServices = SmXMLExportMeta_getSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - xNewKey = xKey->createKey( aDelimiter + SmXMLImportSettings_getImplementationName() + - aUnoServices ); - - aServices = SmXMLImportSettings_getSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - xNewKey = xKey->createKey( aDelimiter + SmXMLExportSettingsOOO_getImplementationName() + - aUnoServices ); - - aServices = SmXMLExportSettingsOOO_getSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - xNewKey = xKey->createKey( aDelimiter + SmXMLExportSettings_getImplementationName() + - aUnoServices ); - - aServices = SmXMLExportSettings_getSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - xNewKey = xKey->createKey( aDelimiter + SmXMLExportContent_getImplementationName() + - aUnoServices ); - - aServices = SmXMLExportContent_getSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - xNewKey = xKey->createKey( aDelimiter + SmDocument_getImplementationName() + - aUnoServices ); - - aServices = SmDocument_getSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - return sal_True; -} - void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, void* /*pRegistryKey*/ ) diff --git a/starmath/util/makefile.mk b/starmath/util/makefile.mk index 1ba52411d7..08f673452f 100644 --- a/starmath/util/makefile.mk +++ b/starmath/util/makefile.mk @@ -112,3 +112,17 @@ SHL1RES= $(RCTARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/sm.component $(MISC)/smd.component + +$(MISC)/sm.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + sm.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt sm.component + +$(MISC)/smd.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + smd.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt smd.component diff --git a/starmath/util/sm.component b/starmath/util/sm.component new file mode 100644 index 0000000000..8047662e29 --- /dev/null +++ b/starmath/util/sm.component @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/starmath/util/smd.component b/starmath/util/smd.component new file mode 100644 index 0000000000..9f56686448 --- /dev/null +++ b/starmath/util/smd.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/sw/prj/d.lst b/sw/prj/d.lst index d7e75a0956..0cb261c5f0 100644 --- a/sw/prj/d.lst +++ b/sw/prj/d.lst @@ -36,6 +36,7 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\statusbar ..\%__SRC%\bin\vbaswobj*.dll %_DEST%\bin%_EXT%\vbaswobj*.dll ..\%__SRC%\bin\sw*.res %_DEST%\bin%_EXT%\sw*.res ..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.* +..\%__SRC%\misc\swd.component %_DEST%\xml%_EXT%\swd.component ..\uiconfig\swriter\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\menubar\*.xml ..\uiconfig\swxform\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\menubar\*.xml @@ -57,3 +58,5 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\statusbar ..\uiconfig\swreport\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\statusbar\*.xml ..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.* +..\%__SRC%\misc\sw.component %_DEST%\xml%_EXT%\sw.component +..\%__SRC%\misc\vbaswobj.component %_DEST%\xml%_EXT%\vbaswobj.component diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index 3d7d44f50c..1fbbf83aa1 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -127,30 +127,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, void* pRegistryKey ) -{ - sal_Bool bRet = sal_False; - - if( pRegistryKey ) - { - try - { - uno::Reference< registry::XRegistryKey > xNewKey1( - static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( - OUString::createFromAscii( IMPL_NAME "/UNO/SERVICES/" ) ) ); - xNewKey1->createKey( DocxExport_getSupportedServiceNames().getConstArray()[0] ); - - bRet = sal_True; - } - catch( registry::InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - - return bRet; -} - // ------------------------ // - component_getFactory - // ------------------------ diff --git a/sw/source/ui/uno/detreg.cxx b/sw/source/ui/uno/detreg.cxx index 3a7741e2a5..06cd210b70 100644 --- a/sw/source/ui/uno/detreg.cxx +++ b/sw/source/ui/uno/detreg.cxx @@ -43,30 +43,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey ) -{ - Reference< ::registry::XRegistryKey > - xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ; - - OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") ); - OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ); - - // Eigentliche Implementierung und ihre Services registrieren - sal_Int32 i; - Reference< ::registry::XRegistryKey > xNewKey; - - xNewKey = xKey->createKey( aDelimiter + SwFilterDetect::impl_getStaticImplementationName() + - aUnoServices ); - - Sequence< OUString > aServices = SwFilterDetect::impl_getStaticSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - return sal_True; -} - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/sw/source/ui/uno/unofreg.cxx b/sw/source/ui/uno/unofreg.cxx index 8be7174c77..9ad0a44617 100644 --- a/sw/source/ui/uno/unofreg.cxx +++ b/sw/source/ui/uno/unofreg.cxx @@ -154,99 +154,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -static void lcl_uno_writeInfo( - registry::XRegistryKey * pRegistryKey, - const OUString& rImplementationName, - const uno::Sequence< OUString >& rServices ) -{ - uno::Reference< registry::XRegistryKey > xNewKey( - pRegistryKey->createKey( - OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + rImplementationName + OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ) ); - - for( sal_Int32 i = 0; i < rServices.getLength(); i++ ) - xNewKey->createKey( rServices.getConstArray()[i]); -} - -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * /*pServiceManager*/, - void * pRegistryKey ) -{ - if( pRegistryKey ) - { - try - { - registry::XRegistryKey *pKey = - reinterpret_cast< registry::XRegistryKey * >( pRegistryKey ); - - - // xml filter - lcl_uno_writeInfo( pKey, SwXMLImport_getImplementationName(), - SwXMLImport_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLImportStyles_getImplementationName(), - SwXMLImportStyles_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwXMLImportContent_getImplementationName(), - SwXMLImportContent_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLImportMeta_getImplementationName(), - SwXMLImportMeta_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLImportSettings_getImplementationName(), - SwXMLImportSettings_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportOOO_getImplementationName(), - SwXMLExportOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportStylesOOO_getImplementationName(), - SwXMLExportStylesOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwXMLExportContentOOO_getImplementationName(), - SwXMLExportContentOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportMetaOOO_getImplementationName(), - SwXMLExportMetaOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportSettingsOOO_getImplementationName(), - SwXMLExportSettingsOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExport_getImplementationName(), - SwXMLExport_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportStyles_getImplementationName(), - SwXMLExportStyles_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwXMLExportContent_getImplementationName(), - SwXMLExportContent_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportMeta_getImplementationName(), - SwXMLExportMeta_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportSettings_getImplementationName(), - SwXMLExportSettings_getSupportedServiceNames() ); - //API objects - lcl_uno_writeInfo( pKey, SwXAutoTextContainer_getImplementationName(), - SwXAutoTextContainer_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXModule_getImplementationName(), - SwXModule_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMailMerge_getImplementationName(), - SwXMailMerge_getSupportedServiceNames() ); - //Filter options - lcl_uno_writeInfo( pKey, SwXFilterOptions::getImplementationName_Static(), - SwXFilterOptions::getSupportedServiceNames_Static() ); - - // documents - lcl_uno_writeInfo( pKey, SwTextDocument_getImplementationName(), - SwTextDocument_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwWebDocument_getImplementationName(), - SwWebDocument_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwGlobalDocument_getImplementationName(), - SwGlobalDocument_getSupportedServiceNames() ); - - // module - lcl_uno_writeInfo( pKey, SwUnoModule_getImplementationName(), - SwUnoModule_getSupportedServiceNames() ); - // --> OD 2007-05-24 #i73788# - lcl_uno_writeInfo( pKey, - comp_FinalThreadManager::_getImplementationName(), - comp_FinalThreadManager::_getSupportedServiceNames() ); - // <-- - - } - catch (registry::InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_True; -} - static ::cppu::ImplementationEntry const entries[] = { { &comp_FinalThreadManager::_create, &comp_FinalThreadManager::_getImplementationName, diff --git a/sw/source/ui/vba/service.cxx b/sw/source/ui/vba/service.cxx index 8200e323b8..3fe4f316df 100644 --- a/sw/source/ui/vba/service.cxx +++ b/sw/source/ui/vba/service.cxx @@ -66,16 +66,6 @@ extern "C" *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - sal_Bool SAL_CALL component_writeInfo( - lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) - { - OSL_TRACE("In component_writeInfo"); - - // Component registration - return component_writeInfoHelper( pServiceManager, pRegistryKey, - globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl, vbaeventshelper::serviceDecl ); - } - void * SAL_CALL component_getFactory( const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk index ce1419b340..6fa4bd5432 100644 --- a/sw/util/makefile.mk +++ b/sw/util/makefile.mk @@ -374,3 +374,23 @@ SHL5LIBS=$(SLB)$/$(TARGET_VBA).lib .ENDIF # .IF "$(ENABLE_VBA)" == "YES" .INCLUDE : target.mk + +ALLTAR : $(MISC)/sw.component $(MISC)/swd.component $(MISC)/vbaswobj.component + +$(MISC)/sw.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + sw.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt sw.component + +$(MISC)/swd.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + swd.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt swd.component + +$(MISC)/vbaswobj.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + vbaswobj.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL5TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt vbaswobj.component diff --git a/sw/util/sw.component b/sw/util/sw.component new file mode 100644 index 0000000000..e76cec637d --- /dev/null +++ b/sw/util/sw.component @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sw/util/swd.component b/sw/util/swd.component new file mode 100644 index 0000000000..c89c007ec3 --- /dev/null +++ b/sw/util/swd.component @@ -0,0 +1,36 @@ + + + + + + + + + + diff --git a/sw/util/vbaswobj.component b/sw/util/vbaswobj.component new file mode 100644 index 0000000000..e6c6fe4a41 --- /dev/null +++ b/sw/util/vbaswobj.component @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 030a6efd8fcf480f765b721c3911c824c8c4fbec Mon Sep 17 00:00:00 2001 From: Joachim Lingner Date: Fri, 10 Sep 2010 17:05:00 +0200 Subject: jl158 #i114008# sed problem on solaris fixed --- sw/source/ui/lingu/olmenu.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 87d5c000d3..b5639ca6c6 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -823,7 +823,7 @@ void SwSpellPopup::Execute( USHORT nId ) else if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END) { OUString aWord( xSpellAlt->getWord() ); - DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" ); +// DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" ); PopupMenu *pMenu = GetPopupMenu(MN_ADD_TO_DIC); String aDicName ( pMenu->GetItemText(nId) ); -- cgit v1.2.3 From 82590ab0732ed2c549f00a725c86b02a9898e22a Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Fri, 10 Sep 2010 17:37:04 +0200 Subject: #b6983105# applied patch and verified --- sw/source/filter/ww8/ww8par3.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index fb565ea296..8f5031c21d 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1400,7 +1400,9 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) pLFOInfo->pNumRule->Set(aLFOLVL.nLevel, aNumFmt); } bLVLOk = true; - pLFOInfo->maOverrides[aLFOLVL.nLevel] = aLFOLVL; + + if (nMaxLevel > aLFOLVL.nLevel) + pLFOInfo->maOverrides[aLFOLVL.nLevel] = aLFOLVL; } if( !bLVLOk ) break; -- cgit v1.2.3 From e3bf4019a7e2635d3550c651152ea6cf2f5439c2 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Mon, 13 Sep 2010 14:42:35 +0200 Subject: sw33bf09: #i113730# - method : on insert/remove of child assure that group objects containing control objects are on the control layer --- sw/source/core/draw/dcontact.cxx | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 60798250b9..2af7adb394 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -1396,6 +1396,37 @@ void SwDrawContact::_Changed( const SdrObject& rObj, DisconnectFromLayout( false ); break; } + case SDRUSERCALL_CHILD_INSERTED : + case SDRUSERCALL_CHILD_REMOVED : + { + // --> AW, OD 2010-09-13 #i113730# + // force layer of controls for group objects containing control objects + if(dynamic_cast< SdrObjGroup* >(maAnchoredDrawObj.DrawObj())) + { + if(::CheckControlLayer(maAnchoredDrawObj.DrawObj())) + { + const IDocumentDrawModelAccess* pIDDMA = static_cast(pRegisteredIn)->getIDocumentDrawModelAccess(); + const SdrLayerID aCurrentLayer(maAnchoredDrawObj.DrawObj()->GetLayer()); + const SdrLayerID aControlLayerID(pIDDMA->GetControlsId()); + const SdrLayerID aInvisibleControlLayerID(pIDDMA->GetInvisibleControlsId()); + + if(aCurrentLayer != aControlLayerID && aCurrentLayer != aInvisibleControlLayerID) + { + if ( aCurrentLayer == pIDDMA->GetInvisibleHellId() || + aCurrentLayer == pIDDMA->GetInvisibleHeavenId() ) + { + maAnchoredDrawObj.DrawObj()->SetLayer(aInvisibleControlLayerID); + } + else + { + maAnchoredDrawObj.DrawObj()->SetLayer(aControlLayerID); + } + } + } + } + // fallthrough intended here + // <-- + } case SDRUSERCALL_MOVEONLY: case SDRUSERCALL_RESIZE: case SDRUSERCALL_CHILD_MOVEONLY : @@ -1403,8 +1434,6 @@ void SwDrawContact::_Changed( const SdrObject& rObj, case SDRUSERCALL_CHILD_CHGATTR : case SDRUSERCALL_CHILD_DELETE : case SDRUSERCALL_CHILD_COPY : - case SDRUSERCALL_CHILD_INSERTED : - case SDRUSERCALL_CHILD_REMOVED : { // --> OD 2004-08-04 #i31698# - improvement: // get instance only once -- cgit v1.2.3 From 59d1d8affd82700d5abfa5ac67d216930a892854 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 13 Sep 2010 15:04:50 +0200 Subject: cws tl82: #i114267# code clean-up --- sw/source/ui/uno/SwXDocumentSettings.cxx | 2 - sw/source/ui/uno/SwXPrintPreviewSettings.cxx | 375 --------------------------- sw/source/ui/uno/SwXPrintPreviewSettings.hxx | 89 ------- sw/source/ui/uno/makefile.mk | 1 - sw/source/ui/uno/unotxdoc.cxx | 5 +- 5 files changed, 1 insertion(+), 471 deletions(-) mode change 100644 => 100755 sw/source/ui/uno/SwXDocumentSettings.cxx delete mode 100644 sw/source/ui/uno/SwXPrintPreviewSettings.cxx delete mode 100644 sw/source/ui/uno/SwXPrintPreviewSettings.hxx mode change 100644 => 100755 sw/source/ui/uno/makefile.mk mode change 100644 => 100755 sw/source/ui/uno/unotxdoc.cxx (limited to 'sw/source') diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx old mode 100644 new mode 100755 index cbfe8617ad..36b7d7afd6 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -221,7 +220,6 @@ SwXDocumentSettings::SwXDocumentSettings ( SwXTextDocument * pModel ) , mpPrinter( NULL ) { registerSlave ( new SwXPrintSettings ( PRINT_SETTINGS_DOCUMENT, mpModel->GetDocShell()->GetDoc() ) ); - registerSlave ( new SwXPrintPreviewSettings ( mpModel->GetDocShell()->GetDoc() ) ); } SwXDocumentSettings::~SwXDocumentSettings() diff --git a/sw/source/ui/uno/SwXPrintPreviewSettings.cxx b/sw/source/ui/uno/SwXPrintPreviewSettings.cxx deleted file mode 100644 index ba39ed59a2..0000000000 --- a/sw/source/ui/uno/SwXPrintPreviewSettings.cxx +++ /dev/null @@ -1,375 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" -#include -#include -#include -#include -#ifndef _COM_SUN_STAR_BEANS_PropertyAttribute_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_BEANS_PropertyAttribute_HPP_ -#include -#endif -#include -#include -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::lang; -using namespace ::comphelper; -using ::rtl::OUString; - -enum SwPrintSettingsPropertyHandles -{ - HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN, - HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN, - HANDLE_PRINTSET_PREVIEW_TOP_MARGIN, - HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN, - HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING, - HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING, - HANDLE_PRINTSET_PREVIEW_NUM_ROWS, - HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS, - HANDLE_PRINTSET_PREVIEW_LANDSCAPE -}; - -static ChainablePropertySetInfo * lcl_createPrintPreviewSettingsInfo() -{ - static PropertyInfo aPrintPreviewSettingsMap_Impl[] = - { - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintLeftMargin" ), HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintRightMargin" ), HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintTopMargin" ), HANDLE_PRINTSET_PREVIEW_TOP_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintBottomMargin" ),HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintHorizontalSpacing" ),HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintVerticalSpacing" ), HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintNumRows" ), HANDLE_PRINTSET_PREVIEW_NUM_ROWS, CPPUTYPE_INT8, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintNumColumns" ), HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS, CPPUTYPE_INT8, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintLandscape" ), HANDLE_PRINTSET_PREVIEW_LANDSCAPE, CPPUTYPE_BOOLEAN, PropertyAttribute::MAYBEVOID, 0 }, - { 0, 0, 0, CPPUTYPE_UNKNOWN, 0, 0 } - }; - return new ChainablePropertySetInfo ( aPrintPreviewSettingsMap_Impl ); -} -SwXPrintPreviewSettings::SwXPrintPreviewSettings( SwDoc *pDoc) -: ChainablePropertySet ( lcl_createPrintPreviewSettingsInfo (), &Application::GetSolarMutex() ) -, mbPreviewDataChanged( sal_False ) -, mpDoc( pDoc) -{ -} -/*-- 17.12.98 12:54:05--------------------------------------------------- - - -----------------------------------------------------------------------*/ -SwXPrintPreviewSettings::~SwXPrintPreviewSettings() - throw() -{ -} - -Any SAL_CALL SwXPrintPreviewSettings::queryInterface( const Type& rType ) - throw(RuntimeException) -{ - return ::cppu::queryInterface ( rType , - // OWeakObject interfaces - dynamic_cast< XInterface* >( dynamic_cast< OWeakObject* >(this) ) , - dynamic_cast< XWeak* >( this ) , - // my own interfaces - dynamic_cast< XServiceInfo* >( this ) , - dynamic_cast< XPropertySet* >( this ) , - dynamic_cast< XMultiPropertySet* >( this ) ); -} -void SwXPrintPreviewSettings::acquire () - throw () -{ - OWeakObject::acquire(); -} -void SwXPrintPreviewSettings::release () - throw () -{ - OWeakObject::release(); -} - -void SwXPrintPreviewSettings::_preSetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - if ( mpDoc ) - { - const SwPagePreViewPrtData *pConstPrtData = mpDoc->GetPreViewPrtData(); - mpPreViewData = new SwPagePreViewPrtData; - if ( pConstPrtData ) - { - mpPreViewData->SetLeftSpace ( pConstPrtData->GetLeftSpace() ); - mpPreViewData->SetRightSpace ( pConstPrtData->GetRightSpace() ); - mpPreViewData->SetTopSpace ( pConstPrtData->GetTopSpace() ); - mpPreViewData->SetBottomSpace ( pConstPrtData->GetBottomSpace() ); - mpPreViewData->SetHorzSpace ( pConstPrtData->GetHorzSpace() ); - mpPreViewData->SetVertSpace ( pConstPrtData->GetVertSpace() ); - mpPreViewData->SetRow ( pConstPrtData->GetRow() ); - mpPreViewData->SetCol ( pConstPrtData->GetCol() ); - mpPreViewData->SetLandscape ( pConstPrtData->GetLandscape() ); - } - } -} - -void SwXPrintPreviewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, const uno::Any &rValue ) - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - switch( rInfo.mnHandle ) - { - case HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > (mpPreViewData->GetLeftSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetLeftSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > (mpPreViewData->GetRightSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetRightSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_TOP_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetTopSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetTopSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetBottomSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetBottomSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetHorzSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetHorzSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetVertSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetVertSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_ROWS: - { - sal_Int8 nVal = 0; - rValue >>= nVal; - if ( nVal != mpPreViewData->GetRow() ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetRow( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS: - { - sal_Int8 nVal = 0; - rValue >>= nVal; - if ( nVal != mpPreViewData->GetCol() ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetCol( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_LANDSCAPE: - { - sal_Bool bVal = *(sal_Bool*)rValue.getValue(); - if ( bVal != mpPreViewData->GetLandscape() ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetLandscape ( bVal ); - } - } - break; - default: - throw UnknownPropertyException(); - } -} -void SwXPrintPreviewSettings::_postSetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - if ( mbPreviewDataChanged ) - { - mpDoc->SetPreViewPrtData ( mpPreViewData ); - mbPreviewDataChanged = sal_False; - } - delete mpPreViewData; - mpPreViewData = NULL; -} - -void SwXPrintPreviewSettings::_preGetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - if (mpDoc) - mpConstPreViewData = mpDoc->GetPreViewPrtData(); -} -void SwXPrintPreviewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue ) - throw(UnknownPropertyException, WrappedTargetException ) -{ - sal_Bool bBool = TRUE; - sal_Bool bBoolVal; - switch( rInfo.mnHandle ) - { - case HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetLeftSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetRightSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_TOP_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetTopSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetBottomSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetHorzSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetVertSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_ROWS: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int8 > ( mpConstPreViewData->GetRow() ); - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int8 > ( mpConstPreViewData->GetCol() ); - } - break; - case HANDLE_PRINTSET_PREVIEW_LANDSCAPE: - { - if (mpConstPreViewData) - bBoolVal = mpConstPreViewData->GetLandscape(); - else - bBool = FALSE; - } - break; - default: - throw UnknownPropertyException(); - } - if(bBool) - rValue.setValue(&bBoolVal, ::getBooleanCppuType()); -} -void SwXPrintPreviewSettings::_postGetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - mpConstPreViewData = NULL; -} -/* -----------------------------06.04.00 11:02-------------------------------- - - ---------------------------------------------------------------------------*/ -OUString SwXPrintPreviewSettings::getImplementationName(void) throw( RuntimeException ) -{ - return OUString( RTL_CONSTASCII_USTRINGPARAM ( "SwXPrintPreviewSettings" ) ); -} -/* -----------------------------06.04.00 11:02-------------------------------- - - ---------------------------------------------------------------------------*/ -sal_Bool SwXPrintPreviewSettings::supportsService(const OUString& rServiceName) throw( RuntimeException ) -{ - return rServiceName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.text.PrintPreviewSettings") ); -} -/* -----------------------------06.04.00 11:02-------------------------------- - - ---------------------------------------------------------------------------*/ -Sequence< OUString > SwXPrintPreviewSettings::getSupportedServiceNames(void) throw( RuntimeException ) -{ - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.text.PrintPreviewSettings" ) ); - return aRet; -} - diff --git a/sw/source/ui/uno/SwXPrintPreviewSettings.hxx b/sw/source/ui/uno/SwXPrintPreviewSettings.hxx deleted file mode 100644 index 8cbc3e0567..0000000000 --- a/sw/source/ui/uno/SwXPrintPreviewSettings.hxx +++ /dev/null @@ -1,89 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SW_XPRINTPREVIEWSETTINGS_HXX_ -#define _SW_XPRINTPREVIEWSETTINGS_HXX_ - -#ifdef PRECOMPILED -#include "ui_pch.hxx" -#endif -#include -#ifndef _COM_SUN_STAR_TEXT_XTEXTDOCUMENT_HPP -#include -#endif -#include -#include - -class SwDoc; -class SwPagePreViewPrtData; - -class SwXPrintPreviewSettings :public comphelper::ChainablePropertySet, - public cppu::OWeakObject, - public com::sun::star::lang::XServiceInfo -{ - friend class SwXDocumentSettings; -protected: - sal_Bool mbPreviewDataChanged; - SwDoc* mpDoc; - SwPagePreViewPrtData *mpPreViewData; - const SwPagePreViewPrtData *mpConstPreViewData; - - virtual void _preSetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _postSetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - - virtual void _preGetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _postGetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual ~SwXPrintPreviewSettings() - throw(); -public: - SwXPrintPreviewSettings(SwDoc *pDoc); - - - // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) - throw (); - virtual void SAL_CALL release( ) - throw (); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) - throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) - throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) - throw( ::com::sun::star::uno::RuntimeException ); -}; -#endif diff --git a/sw/source/ui/uno/makefile.mk b/sw/source/ui/uno/makefile.mk old mode 100644 new mode 100755 index 0023fd52f5..ac4b6dde69 --- a/sw/source/ui/uno/makefile.mk +++ b/sw/source/ui/uno/makefile.mk @@ -55,7 +55,6 @@ SLO1FILES = \ $(SLO)$/dlelstnr.obj \ $(SLO)$/unofreg.obj \ $(SLO)$/SwXDocumentSettings.obj \ - $(SLO)$/SwXPrintPreviewSettings.obj \ $(SLO)$/SwXFilterOptions.obj\ $(SLO)$/RefreshListenerContainer.obj \ $(SLO)$/unomodule.obj \ diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx old mode 100644 new mode 100755 index e3f1322bed..017f526254 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -107,7 +107,6 @@ #include #include #include -#include #include #include #include @@ -1809,9 +1808,7 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic } else if (sCategory == C2U ("text") ) { - if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.PrintPreviewSettings") ) ) - xRet = Reference < XInterface > ( *new SwXPrintPreviewSettings ( pDocShell->GetDoc() ) ); - else if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentSettings") ) ) + if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentSettings") ) ) xRet = Reference < XInterface > ( *new SwXDocumentSettings ( this ) ); } else if (sCategory == C2U ("chart2") ) -- cgit v1.2.3 From 31632f2e367ba261c196cc0d92d0d33368973c37 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Mon, 13 Sep 2010 17:47:04 +0200 Subject: mib19: #163557# cleanup VBA XDocuments implementation, trigger Workbook_Open event when creating a new Excel workbook via Workbooks.Add --- sw/source/ui/vba/vbadocuments.cxx | 27 ++++----------------------- sw/source/ui/vba/vbadocuments.hxx | 5 ----- 2 files changed, 4 insertions(+), 28 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx index 094dde4c0d..5ea30844e8 100644 --- a/sw/source/ui/vba/vbadocuments.cxx +++ b/sw/source/ui/vba/vbadocuments.cxx @@ -120,7 +120,7 @@ SwVbaDocuments::Add( const uno::Any& Template, const uno::Any& /*NewTemplate*/, { return Open( sFileName, uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any()); } - uno::Reference xTextDoc( VbaDocumentsBase::Add() , uno::UNO_QUERY_THROW ); + uno::Reference xTextDoc( createDocument() , uno::UNO_QUERY_THROW ); if( xTextDoc.is() ) return getDocument( mxContext, xTextDoc, Application() ); @@ -131,7 +131,7 @@ SwVbaDocuments::Add( const uno::Any& Template, const uno::Any& /*NewTemplate*/, void SAL_CALL SwVbaDocuments::Close( const uno::Any& /*SaveChanges*/, const uno::Any& /*OriginalFormat*/, const uno::Any& /*RouteDocument*/ ) throw (uno::RuntimeException) { - VbaDocumentsBase::Close(); + closeDocuments(); } // #TODO# #FIXME# can any of the unused params below be used? @@ -150,7 +150,7 @@ SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& /*Confirm uno::Sequence< beans::PropertyValue > sProps(0); - uno::Reference xSpreadDoc( VbaDocumentsBase::Open( Filename, ReadOnly, sProps ), uno::UNO_QUERY_THROW ); + uno::Reference xSpreadDoc( openDocument( Filename, ReadOnly, sProps ), uno::UNO_QUERY_THROW ); uno::Any aRet = getDocument( mxContext, xSpreadDoc, Application() ); uno::Reference< word::XDocument > xDocument( aRet, uno::UNO_QUERY ); if ( xDocument.is() ) @@ -158,26 +158,7 @@ SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& /*Confirm return aRet; } - // VbaDocumentsBase / XDocumentsBase (to avoid warning C4266 for hiding function on wntmsci) -uno::Any SAL_CALL -SwVbaDocuments::Add() throw (uno::RuntimeException) -{ - return VbaDocumentsBase::Add(); -} - -void SAL_CALL -SwVbaDocuments::Close( ) throw (uno::RuntimeException) -{ - VbaDocumentsBase::Close(); -} - -uno::Any SAL_CALL -SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (uno::RuntimeException) -{ - return VbaDocumentsBase::Open( Filename, ReadOnly, rProps ); -} - -rtl::OUString& +rtl::OUString& SwVbaDocuments::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaDocuments") ); diff --git a/sw/source/ui/vba/vbadocuments.hxx b/sw/source/ui/vba/vbadocuments.hxx index 7f1c89510e..a7d977594e 100644 --- a/sw/source/ui/vba/vbadocuments.hxx +++ b/sw/source/ui/vba/vbadocuments.hxx @@ -56,11 +56,6 @@ public: virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Template, const css::uno::Any& NewTemplate, const css::uno::Any& DocumentType, const css::uno::Any& Visible ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ConfirmConversions, const css::uno::Any& ReadOnly, const css::uno::Any& AddToRecentFiles, const css::uno::Any& PasswordDocument, const css::uno::Any& PasswordTemplate, const css::uno::Any& Revert, const css::uno::Any& WritePasswordDocument, const css::uno::Any& WritePasswordTemplate, const css::uno::Any& Format, const css::uno::Any& Encoding, const css::uno::Any& Visible, const css::uno::Any& OpenAndRepair, const css::uno::Any& DocumentDirection, const css::uno::Any& NoEncodingDialog, const css::uno::Any& XMLTransform ) throw (css::uno::RuntimeException); virtual void SAL_CALL Close( const css::uno::Any& SaveChanges, const css::uno::Any& OriginalFormat, const css::uno::Any& RouteDocument ) throw (css::uno::RuntimeException); - - // VbaDocumentsBase / XDocumentsBase (to avoid warning C4266 for hiding function on wntmsci) - virtual css::uno::Any SAL_CALL Add() throw (css::uno::RuntimeException); - virtual void SAL_CALL Close( ) throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ReadOnly, const css::uno::Sequence< css::beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException); }; #endif /* SW_VBA_DOCUMENTS_HXX */ -- cgit v1.2.3 From ce6395d2e10d46d730a4d6e613cea3c5debb98c8 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 14 Sep 2010 16:34:12 +0200 Subject: sw33bf09: #i113730# - Assure that group objects containing control objects are on control layer --- sw/source/core/frmedt/feshview.cxx | 12 +++++++++--- sw/source/core/layout/fly.cxx | 27 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 2eb597f887..ca9e424133 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -603,7 +603,7 @@ bool SwFEShell::IsSelContainsControl() const // if we have one marked object, get the SdrObject and check // whether it contains a control const SdrObject* pSdrObject = pMarkList->GetMark( 0 )->GetMarkedSdrObj(); - bRet = CheckControlLayer( pSdrObject ); + bRet = ::CheckControlLayer( pSdrObject ); } return bRet; } @@ -998,8 +998,14 @@ void SwFEShell::ChangeOpaque( SdrLayerID nLayerId ) SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); // OD 21.08.2003 #i18447# - no change of layer for controls // or group objects containing controls. - const bool bControlObj = ::CheckControlLayer( pObj ); - //if ( pObj->GetLayer() != nLayerId && pObj->GetLayer() != nControls ) + // --> OD 2010-09-14 #i113730# + // consider that a member of a drawing group has been selected. + const SwContact* pContact = ::GetUserCall( pObj ); + ASSERT( pContact && pContact->GetMaster(), " - missing contact or missing master object at contact!" ); + const bool bControlObj = ( pContact && pContact->GetMaster() ) + ? ::CheckControlLayer( pContact->GetMaster() ) + : ::CheckControlLayer( pObj ); + // <-- if ( !bControlObj && pObj->GetLayer() != nLayerId ) { pObj->SetLayer( nLayerId ); diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index feee382b5e..7b09b9983e 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -51,6 +51,9 @@ #include #include +// --> OD 2010-09-14 #i113730# +#include +// <-- // OD 16.04.2003 #i13147# - for #include // OD 29.10.2003 #113049# @@ -2250,6 +2253,30 @@ void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj ) _rNewObj.ChgAnchorFrm( this ); } + // --> OD 2010-09-14 #i113730# + // Assure the control objects and group objects containing controls are on the control layer + if ( ::CheckControlLayer( _rNewObj.DrawObj() ) ) + { + const IDocumentDrawModelAccess* pIDDMA = GetUpper()->GetFmt()->getIDocumentDrawModelAccess(); + const SdrLayerID aCurrentLayer(_rNewObj.DrawObj()->GetLayer()); + const SdrLayerID aControlLayerID(pIDDMA->GetControlsId()); + const SdrLayerID aInvisibleControlLayerID(pIDDMA->GetInvisibleControlsId()); + + if(aCurrentLayer != aControlLayerID && aCurrentLayer != aInvisibleControlLayerID) + { + if ( aCurrentLayer == pIDDMA->GetInvisibleHellId() || + aCurrentLayer == pIDDMA->GetInvisibleHeavenId() ) + { + _rNewObj.DrawObj()->SetLayer(aInvisibleControlLayerID); + } + else + { + _rNewObj.DrawObj()->SetLayer(aControlLayerID); + } + } + } + // <-- + // no direct positioning needed, but invalidate the drawing object position _rNewObj.InvalidateObjPos(); -- cgit v1.2.3 From 666b9b0b694484d9711232db1c7b23863ff1c3a4 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 16 Sep 2010 15:24:15 +0200 Subject: dba33j: #i114522# method on moving anchor handle: Use adjusted position for hit test on handle, because hit test based on primitives now has problem with floating point operations (0 becomes -1,77e-15) --- sw/source/ui/docvw/edtwin.cxx | 47 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 9ab1e772a2..6578142a2e 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -193,15 +193,51 @@ class SwAnchorMarker SdrHdl* pHdl; Point aHdlPos; Point aLastPos; + // --> OD 2010-09-16 #i114522# + bool bTopRightHandle; + // <-- public: - SwAnchorMarker( SdrHdl* pH ) : - pHdl( pH ), aHdlPos( pH->GetPos() ), aLastPos( pH->GetPos() ) {} + SwAnchorMarker( SdrHdl* pH ) + : pHdl( pH ) + , aHdlPos( pH->GetPos() ) + , aLastPos( pH->GetPos() ) + // --> OD 2010-09-16 #i114522# + , bTopRightHandle( pH->GetKind() == HDL_ANCHOR_TR ) + // <-- + {} const Point& GetLastPos() const { return aLastPos; } void SetLastPos( const Point& rNew ) { aLastPos = rNew; } void SetPos( const Point& rNew ) { pHdl->SetPos( rNew ); } const Point& GetPos() { return pHdl->GetPos(); } const Point& GetHdlPos() { return aHdlPos; } - void ChgHdl( SdrHdl* pNew ) { pHdl = pNew; } + void ChgHdl( SdrHdl* pNew ) + { + pHdl = pNew; + // --> OD 2010-09-16 #i114522# + if ( pHdl ) + { + bTopRightHandle = (pHdl->GetKind() == HDL_ANCHOR_TR); + } + // <-- + } + // --> OD 2010-09-16 #i114522# + const Point GetPosForHitTest( const OutputDevice& rOut ) + { + Point aHitTestPos( GetPos() ); + aHitTestPos = rOut.LogicToPixel( aHitTestPos ); + if ( bTopRightHandle ) + { + aHitTestPos += Point( -1, 1 ); + } + else + { + aHitTestPos += Point( 1, 1 ); + } + aHitTestPos = rOut.PixelToLogic( aHitTestPos ); + + return aHitTestPos; + } + // <-- }; struct QuickHelpData @@ -3609,7 +3645,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) // So the pAnchorMarker has to find the right SdrHdl, if it's // the old one, it will find it with position aOld, if this one // is destroyed, it will find a new one at position GetHdlPos(). - Point aOld = pAnchorMarker->GetPos(); + // --> OD 2010-09-16 #i114522# +// const Point aOld = pAnchorMarker->GetPos(); + const Point aOld = pAnchorMarker->GetPosForHitTest( *(rSh.GetOut()) ); + // <-- Point aNew = rSh.FindAnchorPos( aDocPt ); SdrHdl* pHdl; if( (0!=( pHdl = pSdrView->PickHandle( aOld ) )|| -- cgit v1.2.3 From 2b7ea1436077482058e46ce9421de2bb016030dd Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Fri, 17 Sep 2010 19:06:31 +0200 Subject: svarray --- starmath/source/cfgitem.cxx | 81 +++++++++++++++++++--------------------- starmath/source/cfgitem.hxx | 16 +++----- sw/source/core/frmedt/tblsel.cxx | 15 ++++---- sw/source/filter/rtf/wrtrtf.cxx | 30 ++++++++------- sw/source/filter/rtf/wrtrtf.hxx | 3 +- sw/source/ui/docvw/srcedtw.cxx | 40 +++++++++----------- 6 files changed, 89 insertions(+), 96 deletions(-) (limited to 'sw/source') diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index c2f417d15e..b44bccb066 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -49,8 +49,6 @@ static const char* aRootName = "Office.Math"; #define SYMBOL_LIST "SymbolList" #define FONT_FORMAT_LIST "FontFormatList" -SV_IMPL_OBJARR( SmFntFmtListEntryArr, SmFntFmtListEntry ); - ///////////////////////////////////////////////////////////////// @@ -294,10 +292,9 @@ SmFontFormatList::SmFontFormatList() void SmFontFormatList::Clear() { - USHORT nCnt = aEntries.Count(); - if (nCnt) + if (!aEntries.empty()) { - aEntries.Remove( 0, nCnt ); + aEntries.clear(); SetModified( TRUE ); } } @@ -311,7 +308,7 @@ void SmFontFormatList::AddFontFormat( const String &rFntFmtId, if (!pFntFmt) { SmFntFmtListEntry aEntry( rFntFmtId, rFntFmt ); - aEntries.Insert( aEntry, aEntries.Count() ); + aEntries.push_back( aEntry ); SetModified( TRUE ); } } @@ -319,35 +316,32 @@ void SmFontFormatList::AddFontFormat( const String &rFntFmtId, void SmFontFormatList::RemoveFontFormat( const String &rFntFmtId ) { - USHORT nPos = 0xFFFF; - + // search for entry - USHORT nCnt = aEntries.Count(); - for (USHORT i = 0; i < nCnt && nPos == 0xFFFF; ++i) + for (size_t i = 0; i < aEntries.size(); ++i) { if (aEntries[i].aId == rFntFmtId) - nPos = i; - } - - // remove entry if found - if (nPos != 0xFFFF) - { - aEntries.Remove( nPos ); - SetModified( TRUE ); + { + // remove entry if found + aEntries.erase( aEntries.begin() + i ); + SetModified( TRUE ); + break; + } } } const SmFontFormat * SmFontFormatList::GetFontFormat( const String &rFntFmtId ) const { - SmFontFormat *pRes = 0; + const SmFontFormat *pRes = 0; - USHORT nCnt = aEntries.Count(); - USHORT i; - for (i = 0; i < nCnt && !pRes; ++i) + for (size_t i = 0; i < aEntries.size(); ++i) { if (aEntries[i].aId == rFntFmtId) + { pRes = &aEntries[i].aFntFmt; + break; + } } return pRes; @@ -355,11 +349,11 @@ const SmFontFormat * SmFontFormatList::GetFontFormat( const String &rFntFmtId ) -const SmFontFormat * SmFontFormatList::GetFontFormat( USHORT nPos ) const +const SmFontFormat * SmFontFormatList::GetFontFormat( size_t nPos ) const { - SmFontFormat *pRes = 0; - if (nPos < aEntries.Count()) - pRes = &aEntries[ nPos ].aFntFmt; + const SmFontFormat *pRes = 0; + if (nPos < aEntries.size()) + pRes = &aEntries[nPos].aFntFmt; return pRes; } @@ -368,12 +362,13 @@ const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt ) co { String aRes; - USHORT nCnt = aEntries.Count(); - USHORT i; - for (i = 0; i < nCnt && 0 == aRes.Len(); ++i) + for (size_t i = 0; i < aEntries.size(); ++i) { - if (aEntries[i].aFntFmt == rFntFmt) + if (aEntries[i].aFntFmt == rFntFmt) + { aRes = aEntries[i].aId; + break; + } } return aRes; @@ -392,10 +387,10 @@ const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt, BOO } -const String SmFontFormatList::GetFontFormatId( USHORT nPos ) const +const String SmFontFormatList::GetFontFormatId( size_t nPos ) const { String aRes; - if (nPos < aEntries.Count()) + if (nPos < aEntries.size()) aRes = aEntries[nPos].aId; return aRes; } @@ -409,12 +404,15 @@ const String SmFontFormatList::GetNewFontFormatId() const String aPrefix( RTL_CONSTASCII_STRINGPARAM( "Id" ) ); INT32 nCnt = GetCount(); - for (INT32 i = 1; i <= nCnt + 1 && 0 == aRes.Len(); ++i) + for (INT32 i = 1; i <= nCnt + 1; ++i) { String aTmpId( aPrefix ); aTmpId += String::CreateFromInt32( i ); if (!GetFontFormat( aTmpId )) + { aRes = aTmpId; + break; + } } DBG_ASSERT( 0 != aRes.Len(), "failed to create new FontFormatId" ); @@ -767,14 +765,14 @@ void SmMathConfig::SaveFontFormatList() Sequence< OUString > aNames = lcl_GetFontPropertyNames(); INT32 nSymbolProps = aNames.getLength(); - USHORT nCount = rFntFmtList.GetCount(); + size_t nCount = rFntFmtList.GetCount(); Sequence< PropertyValue > aValues( nCount * nSymbolProps ); PropertyValue *pValues = aValues.getArray(); PropertyValue *pVal = pValues; OUString aDelim( OUString::valueOf( (sal_Unicode) '/' ) ); - for (USHORT i = 0; i < nCount; ++i) + for (size_t i = 0; i < nCount; ++i) { String aFntFmtId( rFntFmtList.GetFontFormatId( i ) ); const SmFontFormat aFntFmt( *rFntFmtList.GetFontFormat( aFntFmtId ) ); @@ -826,13 +824,12 @@ void SmMathConfig::SaveFontFormatList() void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols ) { - size_t nCount = rSymbols.size(); - USHORT i; + size_t i; // build list of used font-formats only //!! font-format IDs may be different !! SmFontFormatList aUsedList; - for (i = 0; i < nCount; ++i) + for (i = 0; i < rSymbols.size(); ++i) { DBG_ASSERT( rSymbols[i].GetName().Len() > 0, "non named symbol" ); aUsedList.GetFontFormatId( SmFontFormat( rSymbols[i].GetFace() ) , TRUE ); @@ -845,14 +842,14 @@ void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols ) // remove unused font-formats from list SmFontFormatList &rFntFmtList = GetFontFormatList(); - USHORT nCnt = rFntFmtList.GetCount(); + size_t nCnt = rFntFmtList.GetCount(); SmFontFormat *pTmpFormat = new SmFontFormat[ nCnt ]; String *pId = new String [ nCnt ]; - INT32 k; + size_t k; for (k = 0; k < nCnt; ++k) { - pTmpFormat[k] = *rFntFmtList.GetFontFormat( (USHORT) k ); - pId[k] = rFntFmtList.GetFontFormatId( (USHORT) k ); + pTmpFormat[k] = *rFntFmtList.GetFontFormat( k ); + pId[k] = rFntFmtList.GetFontFormatId( k ); } for (k = 0; k < nCnt; ++k) { diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx index be28437dd0..824b65f85b 100644 --- a/starmath/source/cfgitem.hxx +++ b/starmath/source/cfgitem.hxx @@ -32,6 +32,7 @@ #ifndef _MATH_CFGITEM_HXX_ #define _MATH_CFGITEM_HXX_ +#include #include #include @@ -41,7 +42,6 @@ #include #include #include -#include #include #include @@ -82,14 +82,10 @@ struct SmFntFmtListEntry SmFntFmtListEntry( const String &rId, const SmFontFormat &rFntFmt ); }; - -SV_DECL_OBJARR( SmFntFmtListEntryArr, SmFntFmtListEntry, 8, 8 ) - - class SmFontFormatList { - SmFntFmtListEntryArr aEntries; - BOOL bModified; + std::deque aEntries; + BOOL bModified; // disallow copy-constructor and assignment-operator for now SmFontFormatList( const SmFontFormatList & ); @@ -103,12 +99,12 @@ public: void RemoveFontFormat( const String &rFntFmtId ); const SmFontFormat * GetFontFormat( const String &rFntFmtId ) const; - const SmFontFormat * GetFontFormat( USHORT nPos ) const; + const SmFontFormat * GetFontFormat( size_t nPos ) const; const String GetFontFormatId( const SmFontFormat &rFntFmt ) const; const String GetFontFormatId( const SmFontFormat &rFntFmt, BOOL bAdd ); - const String GetFontFormatId( USHORT nPos ) const; + const String GetFontFormatId( size_t nPos ) const; const String GetNewFontFormatId() const; - USHORT GetCount() const { return aEntries.Count(); } + size_t GetCount() const { return aEntries.size(); } BOOL IsModified() const { return bModified; } void SetModified( BOOL bVal ) { bModified = bVal; } diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 641d97c929..0dd2e17c17 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -55,6 +55,7 @@ // OD 26.08.2003 #i18103# #include #include +#include //siehe auch swtable.cxx #define COLFUZZY 20L @@ -152,8 +153,7 @@ struct _Sort_CellFrm : pFrm( &rCFrm ) {} }; -SV_DECL_VARARR( _Sort_CellFrms, _Sort_CellFrm, 16, 16 ) -SV_IMPL_VARARR( _Sort_CellFrms, _Sort_CellFrm ) +typedef std::deque< _Sort_CellFrm > _Sort_CellFrms; SV_IMPL_PTRARR( SwChartBoxes, SwTableBoxPtr ); SV_IMPL_PTRARR( SwChartLines, SwChartBoxes* ); @@ -616,9 +616,8 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, rUnion.Top() <= nFrmBottom && nFrmBottom <= nUnionBottom+ nYFuzzy ) - aCellFrms.Insert( - _Sort_CellFrm( *(SwCellFrm*)pCell ), - aCellFrms.Count() ); + aCellFrms.push_back( + _Sort_CellFrm( *(SwCellFrm*)pCell) ); else { bValidChartSel = FALSE; @@ -643,12 +642,12 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, // alle Zellen der (Teil-)Tabelle zusammen. Dann teste mal ob // all huebsch nebeneinander liegen. - USHORT n, nEnd, nCellCnt = 0; + size_t n, nCellCnt = 0; long nYPos = LONG_MAX; long nXPos = 0; long nHeight = 0; - for( n = 0, nEnd = aCellFrms.Count(); n < nEnd; ++n ) + for( n = 0 ; n < aCellFrms.size(); ++n ) { const _Sort_CellFrm& rCF = aCellFrms[ n ]; if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos ) @@ -699,7 +698,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, { nYPos = LONG_MAX; SwChartBoxes* pBoxes = 0; - for( n = 0, nEnd = aCellFrms.Count(); n < nEnd; ++n ) + for( n = 0; n < aCellFrms.size(); ++n ) { const _Sort_CellFrm& rCF = aCellFrms[ n ]; if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos ) diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx index 31c77c5f86..3a82ad9f8d 100644 --- a/sw/source/filter/rtf/wrtrtf.cxx +++ b/sw/source/filter/rtf/wrtrtf.cxx @@ -85,8 +85,6 @@ const sal_Char SwRTFWriter::sNewLine = '\012'; const sal_Char __FAR_DATA SwRTFWriter::sNewLine[] = "\015\012"; #endif -SV_DECL_VARARR( RTFColorTbl, Color, 5, 8 ) -SV_IMPL_VARARR( RTFColorTbl, Color ) SwRTFWriter::SwRTFWriter( const String& rFltName, const String & rBaseURL ) : @@ -638,13 +636,18 @@ void SwRTFWriter::OutDocInfoStat() static void InsColor( RTFColorTbl& rTbl, const Color& rCol ) { - USHORT n; - for( n = 0; n < rTbl.Count(); ++n ) + for( size_t n = 0; n < rTbl.size(); ++n ) if( rTbl[n] == rCol ) - return; // schon vorhanden, zurueck + return; // already exists, return - n = COL_AUTO == rCol.GetColor() ? 0 : rTbl.Count(); - rTbl.Insert( rCol, n ); + if ( COL_AUTO == rCol.GetColor() ) + { + rTbl.push_front( rCol ); + } + else + { + rTbl.push_back( rCol ); + } } static void InsColorLine( RTFColorTbl& rTbl, const SvxBoxItem& rBox ) @@ -663,11 +666,12 @@ static void InsColorLine( RTFColorTbl& rTbl, const SvxBoxItem& rBox ) void SwRTFWriter::OutRTFColorTab() { - ASSERT( pColTbl, "Wo ist meine Color-Tabelle?" ); + ASSERT( pColTbl, "Where's table color?" ); // dann baue die ColorTabelle aus allen Attributen, die Colors // enthalten und im Pool angemeldet sind auf. - USHORT n, nMaxItem; + size_t n; + USHORT nMaxItem; const SfxItemPool& rPool = pDoc->GetAttrPool(); // das Charakter - Color Attribut @@ -765,7 +769,7 @@ void SwRTFWriter::OutRTFColorTab() // und raus damit Strm() << SwRTFWriter::sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_COLORTBL; - for( n = 0; n < pColTbl->Count(); n++ ) + for( n = 0; n < pColTbl->size(); n++ ) { const Color& rCol = (*pColTbl)[ n ]; if( n || COL_AUTO != rCol.GetColor() ) @@ -1345,12 +1349,12 @@ void SwRTFWriter::OutFlyFrm() USHORT SwRTFWriter::GetId( const Color& rColor ) const { - ASSERT( pColTbl, "Wo ist meine Color-Tabelle?" ); - for( USHORT n = 0; n < pColTbl->Count(); n++ ) + ASSERT( pColTbl, "Where's color table?" ); + for( size_t n = 0; n < pColTbl->size(); n++ ) if( rColor == (*pColTbl)[ n ] ) return n; - ASSERT( FALSE, "Color nicht in der Tabelle" ); + ASSERT( FALSE, "Color not exists in the pColTbl table" ); return 0; } diff --git a/sw/source/filter/rtf/wrtrtf.hxx b/sw/source/filter/rtf/wrtrtf.hxx index 1c51a21dcf..2cf11d16e7 100644 --- a/sw/source/filter/rtf/wrtrtf.hxx +++ b/sw/source/filter/rtf/wrtrtf.hxx @@ -30,6 +30,7 @@ #include #include #include "../inc/msfilter.hxx" +#include #include @@ -37,7 +38,6 @@ class Color; class Font; class SvPtrarr; -class RTFColorTbl; class SwFmt; class SwFlyFrmFmt; class SwPosFlyFrms; @@ -57,6 +57,7 @@ extern SwNodeFnTab aRTFNodeFnTab; // be used #define DEF_ENCODING RTL_TEXTENCODING_ASCII_US +typedef std::deque RTFColorTbl; class RTF_WrtRedlineAuthor : public sw::util::WrtRedlineAuthor { diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx index 2ea48e2a7e..be71b1aa38 100644 --- a/sw/source/ui/docvw/srcedtw.cxx +++ b/sw/source/ui/docvw/srcedtw.cxx @@ -62,6 +62,8 @@ #ifndef _HELPID_H #include #endif +#include + struct SwTextPortion @@ -75,17 +77,8 @@ struct SwTextPortion #define MAX_HIGHLIGHTTIME 200 #define SYNTAX_HIGHLIGHT_TIMEOUT 200 -SV_DECL_VARARR(SwTextPortions, SwTextPortion,16,16) - -/* -----------------15.01.97 12.07------------------- - ---------------------------------------------------*/ +typedef std::deque SwTextPortions; -SV_IMPL_VARARR(SwTextPortions, SwTextPortion) - -/*-----------------15.01.97 12.08------------------- - ---------------------------------------------------*/ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) { @@ -101,11 +94,11 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) const USHORT nStrLen = rSource.Len(); - USHORT nInsert = 0; // Anzahl der eingefuegten Portions - USHORT nActPos = 0; //Position, an der '<' gefunden wurde - USHORT nOffset = 0; //Offset von nActPos zur '<' - USHORT nPortStart = USHRT_MAX; // fuer die TextPortion - USHORT nPortEnd = 0; // + USHORT nInsert = 0; // Number of inserted Portions + USHORT nActPos = 0; // Position, at the '<' was found + USHORT nOffset = 0; // Offset of nActPos for '<' + USHORT nPortStart = USHRT_MAX; // For the TextPortion + USHORT nPortEnd = 0; // SwTextPortion aText; while(nActPos < nStrLen) { @@ -122,7 +115,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) aText.nStart += 1; aText.nEnd = nActPos - 1; aText.eType = svtools::HTMLUNKNOWN; - aPortionList.Insert(aText, nInsert++); + aPortionList.push_back( aText ); + nInsert++; } sal_Unicode cFollowFirst = rSource.GetChar((xub_StrLen)(nActPos + 1)); sal_Unicode cFollowNext = rSource.GetChar((xub_StrLen)(nActPos + 2)); @@ -212,7 +206,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) aTextPortion.nStart = nPortStart + 1; aTextPortion.nEnd = nPortEnd; aTextPortion.eType = eFoundType; - aPortionList.Insert(aTextPortion, nInsert++); + aPortionList.push_back( aTextPortion ); + nInsert++; eFoundType = svtools::HTMLUNKNOWN; } @@ -226,7 +221,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) aText.nStart = nPortEnd + 1; aText.nEnd = nActPos - 1; aText.eType = svtools::HTMLUNKNOWN; - aPortionList.Insert(aText, nInsert++); + aPortionList.push_back( aText ); + nInsert++; } } @@ -749,7 +745,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff ) SwTextPortions aPortionList; lcl_Highlight(rSource, aPortionList); - USHORT nCount = aPortionList.Count(); + size_t nCount = aPortionList.size(); if ( !nCount ) return; @@ -757,7 +753,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff ) if ( rLast.nStart > rLast.nEnd ) // Nur bis Bug von MD behoeben { nCount--; - aPortionList.Remove( nCount); + aPortionList.pop_back(); if ( !nCount ) return; } @@ -777,7 +773,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff ) #ifdef DBG_UTIL USHORT nLine = aPortionList[0].nLine; #endif - for ( USHORT i = 0; i < nCount; i++ ) + for ( size_t i = 0; i < nCount; i++ ) { SwTextPortion& r = aPortionList[i]; DBG_ASSERT( r.nLine == nLine, "doch mehrere Zeilen ?" ); @@ -796,7 +792,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff ) } } - for ( USHORT i = 0; i < aPortionList.Count(); i++ ) + for ( size_t i = 0; i < aPortionList.size(); i++ ) { SwTextPortion& r = aPortionList[i]; if ( r.nStart > r.nEnd ) // Nur bis Bug von MD behoeben -- cgit v1.2.3 From 919bbc8131863c4164f7e8d9bce812ca0e4d3da4 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Mon, 20 Sep 2010 16:52:57 +0200 Subject: #b6986082# InsBoxen: Do not insert a new cell beyond the end --- sw/source/core/docnode/ndtbl.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 77d98ab890..7e81a41f18 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -334,7 +334,13 @@ BOOL SwNodes::InsBoxen( SwTableNode* pTblNd, new SwEndNode( aEndIdx, *pSttNd ); pPrvBox = new SwTableBox( pBoxFmt, *pSttNd, pLine ); - pLine->GetTabBoxes().C40_INSERT( SwTableBox, pPrvBox, nInsPos + n ); + + SwTableBoxes & rTabBoxes = pLine->GetTabBoxes(); + USHORT nRealInsPos = nInsPos + n; + if (nRealInsPos > rTabBoxes.Count()) + nRealInsPos = rTabBoxes.Count(); + + rTabBoxes.C40_INSERT( SwTableBox, pPrvBox, nRealInsPos ); //if( NO_NUMBERING == pTxtColl->GetOutlineLevel()//#outline level,zhaojianwei if( ! pTxtColl->IsAssignedToListLevelOfOutlineStyle()//<-end,zhaojianwei -- cgit v1.2.3 From 3dc54af91dfcec1ceafc167576ced4f329fc6796 Mon Sep 17 00:00:00 2001 From: os Date: Tue, 21 Sep 2010 17:00:42 +0200 Subject: background of paragraphs is \cbpat --- sw/source/filter/ww8/rtfattributeoutput.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 2c1e1e6f16..a46924568e 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -2748,7 +2748,7 @@ void RtfAttributeOutput::FormatBackground( const SvxBrushItem& rBrush ) if( !rBrush.GetColor().GetTransparency() ) { - m_aStyles.append(OOO_STRING_SVTOOLS_RTF_CHCBPAT); + m_aStyles.append(OOO_STRING_SVTOOLS_RTF_CBPAT); m_aStyles.append((sal_Int32)m_rExport.GetColor(rBrush.GetColor())); } } -- cgit v1.2.3 From ffb8ebdfd5ebdbd548569d1567ba99b78c2b371e Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Tue, 21 Sep 2010 22:45:53 +0200 Subject: svarray: #i112395#: replace SV_DECL_PTRARR_STACK with deque --- sw/source/filter/rtf/rtftbl.cxx | 7 +++---- sw/source/filter/rtf/swparrtf.cxx | 21 ++++++++++----------- 2 files changed, 13 insertions(+), 15 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx index 67dcd3f797..ba05a84f44 100644 --- a/sw/source/filter/rtf/rtftbl.cxx +++ b/sw/source/filter/rtf/rtftbl.cxx @@ -861,7 +861,7 @@ void SwRTFParser::ReadTable( int nToken ) //which were intended to be inside the tablerow are now left outside //the table after the row was placed before the current insertion point SvxRTFItemStack& rAttrStk = GetAttrStack(); - for (USHORT n = 0; n < rAttrStk.Count(); ++n) + for (size_t n = 0; n < rAttrStk.size(); ++n) { SvxRTFItemStackType* pStk = rAttrStk[n]; pStk->MoveFullNode(aOldPos, aNewPos); @@ -1002,11 +1002,10 @@ void SwRTFParser::NewTblLine() pPam->DeleteMark(); } - // alle Attribute, die schon auf den nachfolgen zeigen auf die neue - // Box umsetzen !! + // all attributes which will be displayed in new Box SvxRTFItemStack& rAttrStk = GetAttrStack(); const SvxRTFItemStackType* pStk; - for( USHORT n = 0; n < rAttrStk.Count(); ++n ) + for( size_t n = 0; n < rAttrStk.size(); ++n ) if( ( pStk = rAttrStk[ n ])->GetSttNodeIdx() == ULONG(nOldPos) && !pStk->GetSttCnt() ) ((SvxRTFItemStackType*)pStk)->SetStartPos( SwxPosition( pPam ) ); diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index e437f2450e..a94b878459 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -3548,14 +3548,13 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc ) { ASSERT( RTF_FOOTNOTE == nToken || RTF_FLY_INPARA == nToken || - pPageDesc, "PageDesc fehlt" ); + pPageDesc, "PageDesc is missing" ); bool bContainsParaCache = bContainsPara; - // alle wichtigen Sachen sichern + // backup all important data SwPosition aSavePos( *pPam->GetPoint() ); - SvxRTFItemStack aSaveStack; - aSaveStack.Insert( &GetAttrStack(), 0 ); - GetAttrStack().Remove( 0, GetAttrStack().Count() ); + SvxRTFItemStack aSaveStack(GetAttrStack()); + GetAttrStack().clear(); // save the fly array - after read, all flys may be set into // the header/footer @@ -3605,7 +3604,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc ) // wurde an der Position ein Escapement aufgespannt, so entferne // das jetzt. Fussnoten sind bei uns immer hochgestellt. - SvxRTFItemStackTypePtr pTmp = aSaveStack.Top(); + SvxRTFItemStackTypePtr pTmp = aSaveStack.back(); if( pTmp && pTmp->GetSttNodeIdx() == pPam->GetPoint()->nNode.GetIndex() && pTmp->GetSttCnt() == nPos ) @@ -3764,8 +3763,8 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc ) else SetNewGroup( FALSE ); // { - Klammer war kein Group-Start! mbIsFootnote = bOldIsFootnote; - GetAttrStack().Insert( &aSaveStack, 0 ); - + GetAttrStack() = aSaveStack; + aFlyArr.Insert( &aSaveArray, 0 ); aSaveArray.Remove( 0, aSaveArray.Count() ); bContainsPara = bContainsParaCache; @@ -4123,12 +4122,12 @@ void SwRTFParser::DelLastNode() if( pCNd && pCNd->StartOfSectionIndex()+2 < pCNd->EndOfSectionIndex() ) { - if( GetAttrStack().Count() ) + if( !GetAttrStack().empty() ) { // Attribut Stack-Eintraege, muessen ans Ende des vorherigen // Nodes verschoben werden. BOOL bMove = FALSE; - for( USHORT n = GetAttrStack().Count(); n; ) + for( size_t n = GetAttrStack().size(); n; ) { SvxRTFItemStackType* pStkEntry = (SvxRTFItemStackType*) GetAttrStack()[ --n ]; @@ -4180,7 +4179,7 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet ) // auf die neue Box umsetzen !! SvxRTFItemStack& rAttrStk = GetAttrStack(); const SvxRTFItemStackType* pStk; - for( USHORT n = 0; n < rAttrStk.Count(); ++n ) + for( size_t n = 0; n < rAttrStk.size(); ++n ) if( ( pStk = rAttrStk[ n ])->GetSttNodeIdx() == nOldPos && !pStk->GetSttCnt() ) ((SvxRTFItemStackType*)pStk)->SetStartPos( SwxPosition( pPam ) ); -- cgit v1.2.3 From 7ae7efbce1f86092e39bb32913877e24aaea77cb Mon Sep 17 00:00:00 2001 From: os Date: Wed, 22 Sep 2010 10:13:21 +0200 Subject: #i114662# missing search attributes added --- sw/source/core/unocore/unosrch.cxx | 62 +++++++++++++++++++++++++++++++++++++- sw/source/ui/uno/unotxdoc.cxx | 2 +- 2 files changed, 62 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx index 3038865007..b36fd80d18 100644 --- a/sw/source/core/unocore/unosrch.cxx +++ b/sw/source/core/unocore/unosrch.cxx @@ -185,7 +185,17 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, sal_Bool bIsValueSea *pContourItem = 0, *pCharColorItem = 0, *pCasemapItem = 0, - *pBrushItem = 0; + *pBrushItem = 0, + *pFontCJKItem = 0, + *pFontSizeCJKItem = 0, + *pCJKLangItem = 0, + *pCJKPostureItem = 0, + *pCJKWeightItem = 0, + *pFontCTLItem = 0, + *pFontSizeCTLItem = 0, + *pCTLLangItem = 0, + *pCTLPostureItem = 0, + *pCTLWeightItem = 0; PropertyEntryVector_t::const_iterator aIt = aPropertyEntries.begin(); for(sal_uInt32 i = 0; i < nArrLen; i++, ++aIt) @@ -370,6 +380,56 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, sal_Bool bIsValueSea pWLineItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); pTempItem = pWLineItem; break; + case RES_CHRATR_CJK_FONT: + if(!pFontCJKItem ) + pFontCJKItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pFontCJKItem; + break; + case RES_CHRATR_CJK_FONTSIZE: + if(!pFontSizeCJKItem ) + pFontSizeCJKItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pFontSizeCJKItem; + break; + case RES_CHRATR_CJK_LANGUAGE: + if(!pCJKLangItem ) + pCJKLangItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pCJKLangItem; + break; + case RES_CHRATR_CJK_POSTURE: + if(!pCJKPostureItem ) + pCJKPostureItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pCJKPostureItem; + break; + case RES_CHRATR_CJK_WEIGHT: + if(!pCJKWeightItem ) + pCJKWeightItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pCJKWeightItem; + break; + case RES_CHRATR_CTL_FONT: + if(!pFontCTLItem ) + pFontCTLItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pFontCTLItem; + break; + case RES_CHRATR_CTL_FONTSIZE: + if(!pFontSizeCTLItem ) + pFontSizeCTLItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pFontSizeCTLItem; + break; + case RES_CHRATR_CTL_LANGUAGE: + if(!pCTLLangItem ) + pCTLLangItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pCTLLangItem; + break; + case RES_CHRATR_CTL_POSTURE: + if(!pCTLPostureItem ) + pCTLPostureItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pCTLPostureItem; + break; + case RES_CHRATR_CTL_WEIGHT: + if(!pCTLWeightItem ) + pCTLWeightItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pCTLWeightItem; + break; } if(pTempItem) { diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index f2671d2acb..a4cfc74a33 100755 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -948,7 +948,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > RES_CHRATR_BEGIN, RES_CHRATR_END-1, RES_PARATR_BEGIN, RES_PARATR_END-1, RES_FRMATR_BEGIN, RES_FRMATR_END-1, - RES_TXTATR_INETFMT, RES_TXTATR_INETFMT, + RES_TXTATR_INETFMT, RES_TXTATR_CHARFMT, 0); pSearch->FillSearchItemSet(aSearch); BOOL bCancel; -- cgit v1.2.3 From f6f3be7f0bcdb2d87bd17aeb777d5d6f877623b1 Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Wed, 22 Sep 2010 21:33:27 +0200 Subject: svarray: #i112395#: remove svarray from swparrtf.hxx --- sw/source/filter/rtf/rtfnum.cxx | 29 +++++++++++++---------------- sw/source/filter/rtf/swparrtf.hxx | 9 ++------- 2 files changed, 15 insertions(+), 23 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx index 3d77f13667..cb2b416089 100644 --- a/sw/source/filter/rtf/rtfnum.cxx +++ b/sw/source/filter/rtf/rtfnum.cxx @@ -62,9 +62,6 @@ #define RTF_NUMRULE_NAME "RTF_Num" -SV_IMPL_VARARR( SwListArr, SwListEntry ) - - void lcl_ExpandNumFmts( SwNumRule& rRule ) { // dann noch das NumFormat in alle Ebenen setzen @@ -343,7 +340,7 @@ void SwRTFParser::ReadListTable() if( 1 == nNumOpenBrakets ) { if( aEntry.nListId ) - aListArr.Insert( aEntry, aListArr.Count() ); + aListArr.push_back( aEntry ); aEntry.Clear(); } } @@ -510,7 +507,7 @@ void SwRTFParser::ReadListOverrideTable() if( aEntry.nListId && aEntry.nListNo ) { int nMatch=-1; - for( USHORT n = aListArr.Count(); n; ) + for( size_t n = aListArr.size(); n; ) { if( aListArr[ --n ].nListId == aEntry.nListId) { @@ -529,7 +526,7 @@ void SwRTFParser::ReadListOverrideTable() { aEntry.nListDocPos=aListArr[nMatch2].nListDocPos; aEntry.nListTemplateId=aListArr[nMatch2].nListTemplateId; - aListArr.Insert(aEntry, aListArr.Count()); + aListArr.push_back( aEntry ); } if(pOrigRule) aListArr[nMatch2].nListDocPos = aEntry.nListDocPos; @@ -573,7 +570,7 @@ void SwRTFParser::ReadListOverrideTable() // dann erzeugen wir mal schnell eine Kopie von der NumRule, // denn diese wird jetzt mal kurz veraendert. if( aEntry.nListId ) - for( USHORT n = 0; n < aListArr.Count(); ++n ) + for( size_t n = 0; n < aListArr.size(); ++n ) if( aListArr[ n ].nListId == aEntry.nListId ) { pRule = pDoc->GetNumRuleTbl()[ @@ -590,7 +587,7 @@ void SwRTFParser::ReadListOverrideTable() // <-- pRule->SetAutoRule( FALSE ); nNumLvl = (BYTE)-1; - aListArr.Insert( aEntry, aListArr.Count() ); + aListArr.push_back( aEntry ); break; } @@ -671,11 +668,11 @@ void SwRTFParser::ReadListOverrideTable() // now decrement all position in the listtable, which will // behind the doc-rule position - for( USHORT n = aListArr.Count(); n; ) + for( size_t n = aListArr.size(); n; ) { SwListEntry& rEntry = aListArr[ --n ]; if( rEntry.nListDocPos == nRulePos ) - aListArr.Remove( n ); + aListArr.erase( aListArr.begin()+n ); else if( rEntry.nListDocPos > nRulePos ) --rEntry.nListDocPos; } @@ -699,11 +696,11 @@ SwNumRule* SwRTFParser::GetNumRuleOfListNo( long nListNo, BOOL bRemoveFromList ) { SwNumRule* pRet = 0; SwListEntry* pEntry; - for( USHORT n = aListArr.Count(); n; ) + for( size_t n = aListArr.size(); n; ) if( ( pEntry = &aListArr[ --n ])->nListNo == nListNo ) { if( bRemoveFromList ) - aListArr.Remove( n ); + aListArr.erase( aListArr.begin()+n ); else { pEntry->bRuleUsed = TRUE; @@ -743,14 +740,14 @@ void SwRTFParser::RemoveUnusedNumRules() { SwListEntry* pEntry; SvPtrarr aDelArr; - USHORT n; - for( n = aListArr.Count(); n; ) + size_t n; + for( n = aListArr.size(); n; ) { if( !( pEntry = &aListArr[ --n ])->bRuleUsed ) { // really *NOT* used by anyone else? BOOL unused=TRUE; - for(USHORT j = 0; j < aListArr.Count(); ++j) + for(size_t j = 0; j < aListArr.size(); ++j) { if (aListArr[n].nListNo==aListArr[j].nListNo) unused&=!aListArr[j].bRuleUsed; @@ -847,7 +844,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken ) RTL_CONSTASCII_STRINGPARAM( RTF_NUMRULE_NAME " 1" ))); SwListEntry aEntry( nListNo, 0, pDoc->MakeNumRule( sTmp )); aEntry.nListNo = nListNo; - aListArr.Insert( aEntry, aListArr.Count() ); + aListArr.push_back( aEntry ); pCurRule = pDoc->GetNumRuleTbl()[ aEntry.nListDocPos ]; // --> OD 2008-07-08 #i91400# pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, FALSE ), *pDoc ); diff --git a/sw/source/filter/rtf/swparrtf.hxx b/sw/source/filter/rtf/swparrtf.hxx index a5a943fa46..4eeb454d8f 100644 --- a/sw/source/filter/rtf/swparrtf.hxx +++ b/sw/source/filter/rtf/swparrtf.hxx @@ -29,9 +29,6 @@ #ifndef _SWPARRTF_HXX #define _SWPARRTF_HXX -#ifndef __SGI_STL_MAP -#include -#endif #ifndef __SGI_STL_DEQUE #include #endif @@ -47,9 +44,7 @@ #include #include #include -#ifndef __SGI_STL_ALGORITHM -#include -#endif + #include // fuer den Attribut Stack #include #include "../inc/msfilter.hxx" @@ -160,7 +155,7 @@ DECLARE_TABLE( SwRTFStyleTbl, SwTxtFmtColl* ) DECLARE_TABLE( SwRTFCharStyleTbl, SwCharFmt* ) typedef SwFlySave* SwFlySavePtr; SV_DECL_PTRARR_DEL( SwFlySaveArr, SwFlySavePtr, 0, 20 ) -SV_DECL_VARARR( SwListArr, SwListEntry, 0, 20 ) +typedef std::deque< SwListEntry > SwListArr; struct DocPageInformation { -- cgit v1.2.3 From 5f85d6dbd19244933e19f14d50e876f5540f11ad Mon Sep 17 00:00:00 2001 From: os Date: Thu, 23 Sep 2010 14:04:47 +0200 Subject: export InputFields as FORMTEXT --- sw/source/filter/ww8/rtfexport.cxx | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 7d2941af95..9097fefae9 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -342,11 +342,31 @@ void RtfExport::DoComboBox(const rtl::OUString& /*rName*/, // this is handled in RtfAttributeOutput::OutputFlyFrame_Impl } -void RtfExport::DoFormText(const SwInputField* /*pFld*/) +void RtfExport::DoFormText(const SwInputField* pFld ) { OSL_TRACE("%s", OSL_THIS_FUNC); - // this is hanled in RtfAttributeOutput::OutputFlyFrame_Impl + ::rtl::OUString sResult = pFld->ExpandField(pDoc->IsClipBoard()); + ::rtl::OUString sHelp( pFld->GetHelp() ); + ::rtl::OUString sName = pFld->GetPar2(); + ::rtl::OUString sStatus = pFld->GetToolTip(); + m_pAttrOutput->RunText().append("{" OOO_STRING_SVTOOLS_RTF_FIELD "{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FLDINST "{ FORMTEXT }"); + m_pAttrOutput->RunText().append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FORMFIELD " {" OOO_STRING_SVTOOLS_RTF_FFTYPE "0" ); + if( sHelp.getLength() ) + m_pAttrOutput->RunText().append( OOO_STRING_SVTOOLS_RTF_FFOWNHELP ); + if( sStatus.getLength() ) + m_pAttrOutput->RunText().append( OOO_STRING_SVTOOLS_RTF_FFOWNSTAT ); + m_pAttrOutput->RunText().append( OOO_STRING_SVTOOLS_RTF_FFTYPETXT "0" ); + + if( sName.getLength() ) + m_pAttrOutput->RunText().append( "{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFNAME " ").append( OutString( sName, eDefaultEncoding )).append( "}" ); + if( sHelp.getLength() ) + m_pAttrOutput->RunText().append( "{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFHELPTEXT " ").append( OutString( sHelp, eDefaultEncoding )).append( "}" ); + m_pAttrOutput->RunText().append( "{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFDEFTEXT " ").append( OutString( sResult, eDefaultEncoding )).append( "}" ); + if( sStatus.getLength() ) + m_pAttrOutput->RunText().append( "{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFSTATTEXT " ").append( OutString( sStatus, eDefaultEncoding )).append( "}"); + m_pAttrOutput->RunText().append( "}}}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " " ); + m_pAttrOutput->RunText().append( OutString( sResult, eDefaultEncoding )).append( "}}" ); } ULONG RtfExport::ReplaceCr( BYTE ) -- cgit v1.2.3 From b3e2728d93cb734e72db22b4eacb48ebfab51641 Mon Sep 17 00:00:00 2001 From: os Date: Thu, 23 Sep 2010 15:51:45 +0200 Subject: shape properties wzDescription and wzName support added --- sw/inc/unoframe.hxx | 2 +- sw/source/filter/rtf/makefile.mk | 3 +- sw/source/filter/rtf/rtffly.cxx | 23 ++++++++++++++- sw/source/filter/rtf/swparrtf.cxx | 19 +++++++++++- sw/source/filter/ww8/rtfattributeoutput.cxx | 46 ++++++++++++++++++++++------- sw/source/filter/ww8/rtfattributeoutput.hxx | 5 ++-- sw/source/filter/ww8/rtfexport.cxx | 2 +- sw/source/filter/ww8/rtfexport.hxx | 6 ++-- sw/source/filter/ww8/rtfsdrexport.cxx | 15 +++++++--- 9 files changed, 97 insertions(+), 24 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx index 000703870c..5406c9b2c2 100644 --- a/sw/inc/unoframe.hxx +++ b/sw/inc/unoframe.hxx @@ -161,7 +161,7 @@ public: void ResetDescriptor(); //copy text from a given source PaM void SetSelection(SwPaM& rCopySource); - static SdrObject *GetOrCreateSdrObject( SwFlyFrmFmt *pFmt ); + static SW_DLLPUBLIC SdrObject *GetOrCreateSdrObject( SwFlyFrmFmt *pFmt ); }; /*-----------------20.02.98 11:28------------------- diff --git a/sw/source/filter/rtf/makefile.mk b/sw/source/filter/rtf/makefile.mk index e8e6a598ed..405de430cf 100644 --- a/sw/source/filter/rtf/makefile.mk +++ b/sw/source/filter/rtf/makefile.mk @@ -46,7 +46,8 @@ CDEFS=$(CDEFS) -Dmydebug EXCEPTIONSFILES= \ $(SLO)$/rtffly.obj \ $(SLO)$/rtfnum.obj \ - $(SLO)$/swparrtf.obj + $(SLO)$/swparrtf.obj \ + $(SLO)$/rtffld.obj SLOFILES = \ diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx index 260762fbf2..d1d8efcac0 100644 --- a/sw/source/filter/rtf/rtffly.cxx +++ b/sw/source/filter/rtf/rtffly.cxx @@ -61,6 +61,7 @@ #include #include #include +#include #include #include #include @@ -1293,7 +1294,7 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf, aFlySet.Put(aSurroundItem); } - SwFrmFmt* pFlyFmt = pDoc->Insert( *pPam, + SwFlyFrmFmt* pFlyFmt = pDoc->Insert( *pPam, rGrfNm, aEmptyStr, // Name der Graphic !! pGrf, &aFlySet, // Attribute fuer den FlyFrm @@ -1305,6 +1306,26 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf, _SetPictureSize( *pGrfNd, pPos->nNode, (SfxItemSet&)pFlyFmt->GetAttrSet(), pPicType ); + if( pPicType ) + { + PictPropertyNameValuePairs::const_iterator aIt = pPicType->aPropertyPairs.begin(); + PictPropertyNameValuePairs::const_iterator aEnd = pPicType->aPropertyPairs.end(); + while( aIt != aEnd) + { + if( aIt->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "wzDescription") )) + { + SwXFrame::GetOrCreateSdrObject( pFlyFmt ); + pDoc->SetFlyFrmDescription( *(pFlyFmt), aIt->second ); + } + else if( aIt->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "wzName") )) + { + SwXFrame::GetOrCreateSdrObject( pFlyFmt ); + pDoc->SetFlyFrmTitle( *(pFlyFmt), aIt->second ); + } + ++aIt; + } + } + } if( pGrfAttrSet ) diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index 85a2aaaa8b..bb77c07fd5 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -1376,6 +1376,7 @@ void SwRTFParser::ReadShapeObject() String shpTxt; bool bshpTxt=false; int txflTextFlow=0; + ::rtl::OUString sDescription, sName; while (level>0 && IsParserWorking()) @@ -1433,7 +1434,14 @@ void SwRTFParser::ReadShapeObject() { txflTextFlow=aToken.ToInt32(); } - + else if (sn.EqualsAscii("wzDescription")) + { + sDescription = aToken; + } + else if(sn.EqualsAscii("wzName")) + { + sName = aToken; + } } break; case RTF_PICT: @@ -1459,6 +1467,7 @@ void SwRTFParser::ReadShapeObject() } SkipToken(-1); + SdrObject* pSdrObject = 0; switch(shapeType) { case 202: /* Text Box */ @@ -1478,6 +1487,7 @@ void SwRTFParser::ReadShapeObject() const Rectangle aRect(FRound(aRange.getMinX()), FRound(aRange.getMinY()), FRound(aRange.getMaxX()), FRound(aRange.getMaxY())); SdrRectObj* pStroke = new SdrRectObj(aRect); + pSdrObject = pStroke; pStroke->SetSnapRect(aRect); pDoc->GetOrCreateDrawModel(); // create model InsertShpObject(pStroke, this->nZOrder++); @@ -1525,6 +1535,7 @@ void SwRTFParser::ReadShapeObject() aLine.append(aPointRightBottom); SdrPathObj* pStroke = new SdrPathObj(OBJ_PLIN, ::basegfx::B2DPolyPolygon(aLine)); + pSdrObject = pStroke; //pStroke->SetSnapRect(aRect); InsertShpObject(pStroke, this->nZOrder++); @@ -1545,11 +1556,17 @@ void SwRTFParser::ReadShapeObject() const Rectangle aRect(FRound(aRange.getMinX()), FRound(aRange.getMinY()), FRound(aRange.getMaxX()), FRound(aRange.getMaxY())); SdrRectObj* pStroke = new SdrGrafObj(aGrf); + pSdrObject = pStroke; pStroke->SetSnapRect(aRect); InsertShpObject(pStroke, this->nZOrder++); } } + if( pSdrObject ) + { + pSdrObject->SetDescription(sDescription); + pSdrObject->SetTitle(sName); + } } extern void sw3io_ConvertFromOldField( SwDoc& rDoc, USHORT& rWhich, diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index a46924568e..99826184fe 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -1457,7 +1457,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi } if ( pGrfNode ) - FlyFrameGraphic( *pGrfNode, rFrame.GetLayoutSize() ); + FlyFrameGraphic( dynamic_cast( &rFrame.GetFrmFmt() ), *pGrfNode, rFrame.GetLayoutSize() ); break; case sw::Frame::eDrawing: { @@ -1694,7 +1694,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi { SwNodeIndex aIdx(*rFrmFmt.GetCntnt().GetCntntIdx(), 1); SwOLENode& rOLENd = *aIdx.GetNode().GetOLENode(); - FlyFrameOLE(rOLENd, rFrame.GetLayoutSize()); + FlyFrameOLE(dynamic_cast( &rFrmFmt ), rOLENd, rFrame.GetLayoutSize()); } } break; @@ -3107,9 +3107,23 @@ static OString WriteHex(OString sString) return aRet.makeStringAndClear(); } -static OString ExportPICT(const Size &rOrig, const Size &rRendered, const Size &rMapped, +void lcl_AppendSP( OStringBuffer& rBuffer, + const char cName[], + const ::rtl::OUString& rValue, + const RtfExport& rExport ) +{ + rBuffer.append( "{" OOO_STRING_SVTOOLS_RTF_SP "{" ); // "{\sp{" + rBuffer.append( OOO_STRING_SVTOOLS_RTF_SN " " );//" \sn " + rBuffer.append( cName ); //"PropName" + rBuffer.append( "}{" OOO_STRING_SVTOOLS_RTF_SV " " ); +// "}{ \sv " + rBuffer.append( rExport.OutString( rValue, rExport.eCurrentEncoding ) ); + rBuffer.append( "}}" ); +} + +static OString ExportPICT( const SwFlyFrmFmt* pFlyFrmFmt, const Size &rOrig, const Size &rRendered, const Size &rMapped, const SwCropGrf &rCr, const char *pBLIPType, const sal_uInt8 *pGraphicAry, - unsigned long nSize) + unsigned long nSize, const RtfExport& rExport ) { OStringBuffer aRet; bool bIsWMF = (const char *)pBLIPType == (const char *)OOO_STRING_SVTOOLS_RTF_WMETAFILE ? true : false; @@ -3117,6 +3131,18 @@ static OString ExportPICT(const Size &rOrig, const Size &rRendered, const Size & { aRet.append("{" OOO_STRING_SVTOOLS_RTF_PICT); + if( pFlyFrmFmt ) + { + String sDescription = pFlyFrmFmt->GetObjDescription(); + //write picture properties - wzDescription at first + //looks like: "{\*\picprop{\sp{\sn PropertyName}{\sv PropertyValue}}}" + aRet.append( "{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_PICPROP );//"{\*\picprop + lcl_AppendSP( aRet, "wzDescription", sDescription, rExport ); + String sName = pFlyFrmFmt->GetObjTitle(); + lcl_AppendSP( aRet, "wzName", sName, rExport ); + aRet.append( "}" ); //"}" + } + long nXCroppedSize = rOrig.Width()-(rCr.GetLeft() + rCr.GetRight()); long nYCroppedSize = rOrig.Height()-(rCr.GetTop() + rCr.GetBottom()); /* #127543#: Graphic with a zero height or width, typically copied from webpages, caused @@ -3209,7 +3235,7 @@ void RtfAttributeOutput::FlyFrameOLEData( SwOLENode& rOLENode ) } } -void RtfAttributeOutput::FlyFrameOLE( SwOLENode& rOLENode, const Size& rSize ) +void RtfAttributeOutput::FlyFrameOLE( const SwFlyFrmFmt* pFlyFrmFmt, SwOLENode& rOLENode, const Size& rSize ) { OSL_TRACE("%s", OSL_THIS_FUNC); @@ -3245,11 +3271,11 @@ void RtfAttributeOutput::FlyFrameOLE( SwOLENode& rOLENode, const Size& rSize ) nHeight-=nFontHeight/20; m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_DN).append(nHeight); m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_SHPPICT); - m_aRunText.append(ExportPICT(aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize)); + m_aRunText.append(ExportPICT( pFlyFrmFmt, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, m_rExport )); m_aRunText.append("}}}}"); } -void RtfAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize ) +void RtfAttributeOutput::FlyFrameGraphic( const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode& rGrfNode, const Size& rSize ) { OSL_TRACE("%s", OSL_THIS_FUNC); @@ -3322,7 +3348,7 @@ void RtfAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_SHPPICT); if (pBLIPType) - m_aRunText.append(ExportPICT(aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize)); + m_aRunText.append(ExportPICT( pFlyFrmFmt, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, m_rExport)); else { aStream.Seek(0); @@ -3332,7 +3358,7 @@ void RtfAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& nSize = aStream.Tell(); pGraphicAry = (sal_uInt8*)aStream.GetData(); - m_aRunText.append(ExportPICT(aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize)); + m_aRunText.append(ExportPICT(pFlyFrmFmt, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, m_rExport )); } if (!bIsWMF) @@ -3346,7 +3372,7 @@ void RtfAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& nSize = aStream.Tell(); pGraphicAry = (sal_uInt8*)aStream.GetData(); - m_aRunText.append(ExportPICT(aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize)); + m_aRunText.append(ExportPICT(pFlyFrmFmt, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, m_rExport )); m_aRunText.append('}'); } diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx index 4cb1b9c27e..ef1fe60c8b 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.hxx +++ b/sw/source/filter/ww8/rtfattributeoutput.hxx @@ -45,6 +45,7 @@ class RtfExport; class SwGrfNode; class SwOLENode; class SdrObject; +class SwFlyFrmFmt; class RtfAttributeOutput : public AttributeOutputBase { @@ -429,8 +430,8 @@ protected: private: /// Output graphic fly frames. - void FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize ); - void FlyFrameOLE( SwOLENode& rOLENode, const Size& rSize ); + void FlyFrameGraphic( const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode& rGrfNode, const Size& rSize ); + void FlyFrameOLE( const SwFlyFrmFmt* pFlyFrmFmt, SwOLENode& rOLENode, const Size& rSize ); void FlyFrameOLEData( SwOLENode& rOLENode ); /* diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 9097fefae9..6520220e13 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -920,7 +920,7 @@ OString RtfExport::OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEn OString RtfExport::OutString(const String &rStr, rtl_TextEncoding eDestEnc) { OSL_TRACE("%s, rStr = '%s'", OSL_THIS_FUNC, - OUStringToOString( OUString( rStr ), eCurrentEncoding ).getStr()); + OUStringToOString( OUString( rStr ), eDestEnc ).getStr()); OStringBuffer aBuf; int nUCMode = 1; for (xub_StrLen n = 0; n < rStr.Len(); ++n) diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx index 4b4c2d7425..a7f825f810 100644 --- a/sw/source/filter/ww8/rtfexport.hxx +++ b/sw/source/filter/ww8/rtfexport.hxx @@ -170,9 +170,9 @@ public: SvStream& OutLong( long nVal ); void OutUnicode(const sal_Char *pToken, const String &rContent); void OutDateTime(const sal_Char* pStr, const util::DateTime& rDT ); - rtl::OString OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEnc); - rtl::OString OutString(const String &rStr, rtl_TextEncoding eDestEnc); - rtl::OString OutHex(ULONG nHex, BYTE nLen); + static rtl::OString OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEnc); + static rtl::OString OutString(const String &rStr, rtl_TextEncoding eDestEnc); + static rtl::OString OutHex(ULONG nHex, BYTE nLen); void OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage ); void OutContent( const SwNode& rNode ); diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index ecc1218d43..51becb1c90 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -447,6 +447,13 @@ void RtfSdrExport::AddShapeAttribute( sal_Int32 /*nAttribute*/, const rtl::OStri extern const char* pShapeTypes[]; +void lcl_AppendSP( ::rtl::OStringBuffer& rRunText, const char cName[], const ::rtl::OString& rValue) +{ + rRunText.append('{').append(OOO_STRING_SVTOOLS_RTF_SP) + .append('{').append(OOO_STRING_SVTOOLS_RTF_SN " ").append(cName).append('}') + .append('{').append(OOO_STRING_SVTOOLS_RTF_SV " ").append(rValue).append('}') + .append('}'); +} sal_Int32 RtfSdrExport::StartShape() { OSL_TRACE("%s", OSL_THIS_FUNC); @@ -466,10 +473,10 @@ sal_Int32 RtfSdrExport::StartShape() m_rAttrOutput.RunText().append(OOO_STRING_SVTOOLS_RTF_SHPBYIGNORE); for(std::map::reverse_iterator i = m_aShapeProps.rbegin(); i != m_aShapeProps.rend(); i++) - m_rAttrOutput.RunText().append('{').append(OOO_STRING_SVTOOLS_RTF_SP) - .append('{').append(OOO_STRING_SVTOOLS_RTF_SN " ").append((*i).first).append('}') - .append('{').append(OOO_STRING_SVTOOLS_RTF_SV " ").append((*i).second).append('}') - .append('}'); + lcl_AppendSP(m_rAttrOutput.RunText(), (*i).first, (*i).second ); + + lcl_AppendSP(m_rAttrOutput.RunText(), "wzDescription", RtfExport::OutString( m_pSdrObject->GetDescription(), m_rExport.eCurrentEncoding)); + lcl_AppendSP(m_rAttrOutput.RunText(), "wzName", RtfExport::OutString( m_pSdrObject->GetTitle(), m_rExport.eCurrentEncoding)); // now check if we have some text const SdrTextObj* pTxtObj = PTR_CAST(SdrTextObj, m_pSdrObject); -- cgit v1.2.3 From af9c43154a0a6d2e27e31bd2032a0310d2fad5d6 Mon Sep 17 00:00:00 2001 From: os Date: Fri, 24 Sep 2010 11:50:20 +0200 Subject: header/footer postion fixed --- sw/source/filter/ww8/rtfattributeoutput.cxx | 30 +++++++++++++++++++++++------ sw/source/filter/ww8/rtfexport.cxx | 3 --- 2 files changed, 24 insertions(+), 9 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 99826184fe..d0426b169c 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -2599,15 +2599,33 @@ void RtfAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace ) { if( m_rExport.bOutPageDescs ) { - if( rULSpace.GetUpper() ) + + ASSERT( m_rExport.GetCurItemSet(), "Impossible" ); + if ( !m_rExport.GetCurItemSet() ) + return; + + HdFtDistanceGlue aDistances( *m_rExport.GetCurItemSet() ); + + if ( aDistances.HasHeader() ) { - m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_MARGTSXN); - m_aSectionBreaks.append((sal_Int32)rULSpace.GetUpper()); + if( aDistances.dyaTop ) + { + m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_MARGTSXN); + m_aSectionBreaks.append((sal_Int32)aDistances.dyaTop); + } + m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_HEADERY); + m_aSectionBreaks.append((sal_Int32)aDistances.dyaHdrTop); } - if( rULSpace.GetLower() ) + + if( aDistances.HasFooter() ) { - m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_MARGBSXN); - m_aSectionBreaks.append((sal_Int32)rULSpace.GetLower()); + if( aDistances.dyaBottom ) + { + m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_MARGBSXN); + m_aSectionBreaks.append((sal_Int32)aDistances.dyaBottom); + } + m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_FOOTERY); + m_aSectionBreaks.append((sal_Int32)aDistances.dyaHdrBottom); } if (!m_bBufferSectionBreaks) m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear(); diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 6520220e13..640cd77905 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -1201,9 +1201,6 @@ void RtfExport::WriteHeaderFooter(const SfxPoolItem& rItem, bool bHeader) OSL_TRACE("%s start", OSL_THIS_FUNC); - Strm() << (bHeader ? OOO_STRING_SVTOOLS_RTF_HEADERY : OOO_STRING_SVTOOLS_RTF_FOOTERY); - OutLong( pAktPageDesc->GetMaster(). - GetULSpace().GetUpper() ); const sal_Char* pStr = (bHeader ? OOO_STRING_SVTOOLS_RTF_HEADER : OOO_STRING_SVTOOLS_RTF_FOOTER); /* is this a title page? */ if( pAktPageDesc->GetFollow() && pAktPageDesc->GetFollow() != pAktPageDesc ) -- cgit v1.2.3 From 4b82ed9f751b76629d8f10891eaa56c126edc2e8 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 27 Sep 2010 23:21:07 +0200 Subject: dba34a: #i31275# allow 'select as you type' aka 'quick selection' for tree list boxes (SvLBox derivees, to be precise), and enable this for Base main window, and the stylist --- sw/source/ui/utlui/content.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'sw/source') diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index 418d9ace33..e6c98ed02e 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -952,6 +952,7 @@ SwContentTree::SwContentTree(Window* pParent, const ResId& rResId) : aUpdTimer.SetTimeout(1000); Clear(); EnableContextMenuHandling(); + SetStyle( GetStyle() | WB_QUICK_SEARCH ); } /*************************************************************************** -- cgit v1.2.3 From 583987103023202d9d255da0ed35553a630cf3a7 Mon Sep 17 00:00:00 2001 From: os Date: Tue, 28 Sep 2010 12:05:10 +0200 Subject: #i114781# envelope dialog preview fixed --- sw/source/ui/envelp/envlop1.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 12b0f1f38f..2c68ee52a6 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -103,9 +103,9 @@ void SwEnvPreview::Paint(const Rectangle &) USHORT nPageW = (USHORT) Max(rItem.lWidth, rItem.lHeight), nPageH = (USHORT) Min(rItem.lWidth, rItem.lHeight); - float fx = static_cast< float >(GetOutputSizePixel().Width () / nPageW), - fy = static_cast< float >(GetOutputSizePixel().Height() / nPageH), - f = static_cast< float >(0.8 * ( fx < fy ? fx : fy )); + float fx = (float)GetOutputSizePixel().Width () / (float)nPageW, + fy = (float)GetOutputSizePixel().Height() / (float)nPageH, + f = 0.8f * ( fx < fy ? fx : fy ); Color aBack = rSettings.GetWindowColor( ); Color aFront = SwViewOption::GetFontColor(); -- cgit v1.2.3 From fecd223f51a3d15de40664ccd9766778d44dbc9b Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 30 Sep 2010 15:50:55 +0200 Subject: sw34refactor1: clean up doccorr.cxx: replace implementations of 2 PaMCorrAbs variants with call to third variant. --- sw/source/core/doc/doccorr.cxx | 211 ++++++++++++----------------------------- 1 file changed, 63 insertions(+), 148 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx index b3b5682eba..1b239f12a6 100644 --- a/sw/source/core/doc/doccorr.cxx +++ b/sw/source/core/doc/doccorr.cxx @@ -73,9 +73,9 @@ namespace { - // find the relevant section in which the SwUnoCrsr may wander. returns NULL if - // no restrictions apply - const SwStartNode* lcl_FindUnoCrsrSection( const SwNode& rNode ) + // find the relevant section in which the SwUnoCrsr may wander. + // returns NULL if no restrictions apply + static const SwStartNode* lcl_FindUnoCrsrSection( const SwNode& rNode ) { const SwStartNode* pStartNode = rNode.StartOfSectionNode(); while( ( pStartNode != NULL ) && @@ -86,45 +86,28 @@ namespace return pStartNode; } - static inline void lcl_PaMCorrAbs1(SwPaM * pPam, - SwNode const * const pOldNode, - const SwPosition& rNewPos, - const xub_StrLen nOffset) - { - for(int nb = 0; nb < 2; ++nb) - if(&((pPam)->GetBound(BOOL(nb)).nNode.GetNode()) == pOldNode) - { - (pPam)->GetBound(BOOL(nb)) = rNewPos; - (pPam)->GetBound(BOOL(nb)).nContent += nOffset; - } - }; - - static inline bool lcl_PaMCorrAbs2(SwPaM* pPam, - const SwPosition& rNewPos, - ULONG nSttNode, - ULONG nEndNode) + static inline bool lcl_PosCorrAbs(SwPosition & rPos, + const SwPosition& rStart, + const SwPosition& rEnd, + const SwPosition& rNewPos) { - bool bRet = false; - - for(int nb = 0; nb < 2; ++nb) - if((pPam)->GetBound(BOOL(nb)).nNode >= nSttNode && - (pPam)->GetBound(BOOL(nb)).nNode <= nEndNode) - { - (pPam)->GetBound(BOOL(nb)) = rNewPos; - bRet = true; - } - return bRet; + if ((rStart <= rPos) && (rPos <= rEnd)) + { + rPos = rNewPos; + return true; + } + return false; }; - static inline void lcl_PaMCorrAbs3(SwPaM * pPam, + static inline bool lcl_PaMCorrAbs(SwPaM & rPam, const SwPosition& rStart, const SwPosition& rEnd, const SwPosition& rNewPos) { - for(int nb = 0; nb < 2; ++nb) - if(rStart <= (pPam)->GetBound(BOOL(nb)) && - (pPam)->GetBound(BOOL(nb)) <= rEnd ) - (pPam)->GetBound(BOOL(nb)) = rNewPos; + bool bRet = false; + bRet |= lcl_PosCorrAbs(rPam.GetBound(true ), rStart, rEnd, rNewPos); + bRet |= lcl_PosCorrAbs(rPam.GetBound(false), rStart, rEnd, rNewPos); + return bRet; }; static inline void lcl_PaMCorrRel1(SwPaM * pPam, @@ -147,49 +130,12 @@ void PaMCorrAbs( const SwNodeIndex &rOldNode, const SwPosition &rNewPos, const xub_StrLen nOffset) { - const SwNode* pOldNode = &rOldNode.GetNode(); - const SwPosition aNewPos( rNewPos ); - const SwDoc* pDoc = pOldNode->GetDoc(); - SwCrsrShell* pShell = pDoc->GetEditShell(); - - if( pShell ) - { - FOREACHSHELL_START( pShell ) - SwPaM *_pStkCrsr = PCURSH->GetStkCrsr(); - if( _pStkCrsr ) - do { - lcl_PaMCorrAbs1( _pStkCrsr, pOldNode, aNewPos, nOffset ); - } while ( (_pStkCrsr != 0 ) && - ((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) ); - - FOREACHPAM_START( PCURSH->_GetCrsr() ) - lcl_PaMCorrAbs1( PCURCRSR, pOldNode, aNewPos, nOffset ); - FOREACHPAM_END() - - if( PCURSH->IsTableMode() ) - lcl_PaMCorrAbs1( PCURSH->GetTblCrs(), pOldNode, aNewPos, nOffset ); - - FOREACHSHELL_END( pShell ) - } - - { - SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl(); - for( USHORT n = 0; n < rTbl.Count(); ++n ) - { - FOREACHPAM_START( rTbl[ n ] ) - lcl_PaMCorrAbs1( PCURCRSR, pOldNode, aNewPos, nOffset ); - FOREACHPAM_END() - - SwUnoTableCrsr* pUnoTblCrsr = - dynamic_cast(rTbl[ n ]); - if( pUnoTblCrsr ) - { - FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() ) - lcl_PaMCorrAbs1( PCURCRSR, pOldNode, aNewPos, nOffset ); - FOREACHPAM_END() - } - } - } + SwCntntNode *const pCntntNode( rOldNode.GetNode().GetCntntNode() ); + SwPaM const aPam(rOldNode, 0, + rOldNode, (pCntntNode) ? pCntntNode->Len() : 0); + SwPosition aNewPos(rNewPos); + aNewPos.nContent += nOffset; + return ::PaMCorrAbs(aPam, aNewPos); } @@ -197,65 +143,75 @@ void PaMCorrAbs( const SwNodeIndex &rStartNode, const SwNodeIndex &rEndNode, const SwPosition &rNewPos ) { - const ULONG nSttNode = rStartNode.GetIndex(); - const ULONG nEndNode = rEndNode.GetIndex(); - const SwPosition aNewPos( rNewPos ); - SwDoc* pDoc = rStartNode.GetNode().GetDoc(); + SwCntntNode *const pCntntNode( rEndNode.GetNode().GetCntntNode() ); + SwPaM const aPam(rStartNode, 0, + rEndNode, (pCntntNode) ? pCntntNode->Len() : 0); + return ::PaMCorrAbs(aPam, rNewPos); +} + + +void PaMCorrAbs( const SwPaM& rRange, + const SwPosition& rNewPos ) +{ + SwPosition const aStart( *rRange.Start() ); + SwPosition const aEnd( *rRange.End() ); + SwPosition const aNewPos( rNewPos ); + SwDoc *const pDoc = aStart.nNode.GetNode().GetDoc(); + SwCrsrShell *const pShell = pDoc->GetEditShell(); - SwCrsrShell* pShell = pDoc->GetEditShell(); if( pShell ) { FOREACHSHELL_START( pShell ) SwPaM *_pStkCrsr = PCURSH->GetStkCrsr(); if( _pStkCrsr ) do { - lcl_PaMCorrAbs2( _pStkCrsr, aNewPos, nSttNode, nEndNode ); + lcl_PaMCorrAbs( *_pStkCrsr, aStart, aEnd, aNewPos ); } while ( (_pStkCrsr != 0 ) && ((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) ); FOREACHPAM_START( PCURSH->_GetCrsr() ) - lcl_PaMCorrAbs2( PCURCRSR, aNewPos, nSttNode, nEndNode ); + lcl_PaMCorrAbs( *PCURCRSR, aStart, aEnd, aNewPos ); FOREACHPAM_END() if( PCURSH->IsTableMode() ) - lcl_PaMCorrAbs2( PCURSH->GetTblCrs(), aNewPos, nSttNode, nEndNode ); + lcl_PaMCorrAbs( *PCURSH->GetTblCrs(), aStart, aEnd, aNewPos ); FOREACHSHELL_END( pShell ) } - { - SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl(); + SwUnoCrsrTbl& rTbl = const_cast(pDoc->GetUnoCrsrTbl()); + for( USHORT n = 0; n < rTbl.Count(); ++n ) { - bool bChange = false; + SwUnoCrsr *const pUnoCursor = rTbl[ n ]; - SwUnoCrsr* pUnoCursor = rTbl[ n ]; + bool bChange = false; // has the UNO cursor been corrected? // determine whether the UNO cursor will leave it's designated // section - bool bLeaveSection = + bool const bLeaveSection = pUnoCursor->IsRemainInSection() && ( lcl_FindUnoCrsrSection( aNewPos.nNode.GetNode() ) != lcl_FindUnoCrsrSection( pUnoCursor->GetPoint()->nNode.GetNode() ) ); FOREACHPAM_START( pUnoCursor ) - bChange |= lcl_PaMCorrAbs2(PCURCRSR, aNewPos, nSttNode, nEndNode); + bChange |= lcl_PaMCorrAbs( *PCURCRSR, aStart, aEnd, aNewPos ); FOREACHPAM_END() - SwUnoTableCrsr* pUnoTblCrsr = - dynamic_cast(pUnoCursor); + SwUnoTableCrsr *const pUnoTblCrsr = + dynamic_cast(rTbl[ n ]); if( pUnoTblCrsr ) { FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() ) bChange |= - lcl_PaMCorrAbs2( PCURCRSR, aNewPos, nSttNode, nEndNode ); + lcl_PaMCorrAbs( *PCURCRSR, aStart, aEnd, aNewPos ); FOREACHPAM_END() } // if a UNO cursor leaves its designated section, we must inform // (and invalidate) said cursor - if( bChange && bLeaveSection ) + if (bChange && bLeaveSection) { // the UNO cursor has left its section. We need to notify it! SwMsgPoolItem aHint( RES_UNOCURSOR_LEAVES_SECTION ); @@ -265,72 +221,31 @@ void PaMCorrAbs( const SwNodeIndex &rStartNode, } } - -void PaMCorrAbs( const SwPaM& rRange, - const SwPosition& rNewPos ) -{ - SwPosition aStart( *rRange.Start() ); - SwPosition aEnd( *rRange.End() ); - SwPosition aNewPos( rNewPos ); - SwDoc* pDoc = aStart.nNode.GetNode().GetDoc(); - SwCrsrShell* pShell = pDoc->GetEditShell(); - - if( pShell ) - { - FOREACHSHELL_START( pShell ) - SwPaM *_pStkCrsr = PCURSH->GetStkCrsr(); - if( _pStkCrsr ) - do { - lcl_PaMCorrAbs3( _pStkCrsr, aStart, aEnd, aNewPos ); - } while ( (_pStkCrsr != 0 ) && - ((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) ); - - FOREACHPAM_START( PCURSH->_GetCrsr() ) - lcl_PaMCorrAbs3( PCURCRSR, aStart, aEnd, aNewPos ); - FOREACHPAM_END() - - if( PCURSH->IsTableMode() ) - lcl_PaMCorrAbs3( PCURSH->GetTblCrs(), aStart, aEnd, aNewPos ); - - FOREACHSHELL_END( pShell ) - } - { - SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl(); - for( USHORT n = 0; n < rTbl.Count(); ++n ) - { - FOREACHPAM_START( rTbl[ n ] ) - lcl_PaMCorrAbs3( PCURCRSR, aStart, aEnd, aNewPos ); - FOREACHPAM_END() - - SwUnoTableCrsr* pUnoTblCrsr = - dynamic_cast(rTbl[ n ]); - if( pUnoTblCrsr ) - { - FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() ) - lcl_PaMCorrAbs3( PCURCRSR, aStart, aEnd, aNewPos ); - FOREACHPAM_END() - } - } - } -} - void SwDoc::CorrAbs(const SwNodeIndex& rOldNode, const SwPosition& rNewPos, const xub_StrLen nOffset, BOOL bMoveCrsr) { + SwCntntNode *const pCntntNode( rOldNode.GetNode().GetCntntNode() ); + SwPaM const aPam(rOldNode, 0, + rOldNode, (pCntntNode) ? pCntntNode->Len() : 0); + SwPosition aNewPos(rNewPos); + aNewPos.nContent += nOffset; + getIDocumentMarkAccess()->correctMarksAbsolute(rOldNode, rNewPos, nOffset); - { // fix readlines + { // fix redlines SwRedlineTbl& rTbl = *pRedlineTbl; for( USHORT n = 0; n < rTbl.Count(); ++n ) { // is on position ?? - lcl_PaMCorrAbs1( rTbl[ n ], &rOldNode.GetNode(), SwPosition(rNewPos), nOffset ); + lcl_PaMCorrAbs(*rTbl[ n ], *aPam.Start(), *aPam.End(), aNewPos); } } if(bMoveCrsr) - ::PaMCorrAbs(rOldNode, rNewPos, nOffset); + { + ::PaMCorrAbs(aPam, aNewPos); + } } void SwDoc::CorrAbs(const SwPaM& rRange, -- cgit v1.2.3 From bf67f35a80c237e8c554b22ead96b243930f8dbb Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 30 Sep 2010 15:51:57 +0200 Subject: sw34refactor1: remove all but one overloads of PaMCorrAbs. --- sw/source/core/doc/doccorr.cxx | 32 ++++++-------------------------- sw/source/core/doc/docnew.cxx | 4 ++-- sw/source/core/docnode/ndtbl.cxx | 14 ++++++++------ sw/source/core/frmedt/fecopy.cxx | 11 +++++++---- sw/source/core/inc/mvsave.hxx | 24 +++--------------------- 5 files changed, 26 insertions(+), 59 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx index 1b239f12a6..4b4d89fcda 100644 --- a/sw/source/core/doc/doccorr.cxx +++ b/sw/source/core/doc/doccorr.cxx @@ -126,29 +126,6 @@ namespace } } -void PaMCorrAbs( const SwNodeIndex &rOldNode, - const SwPosition &rNewPos, - const xub_StrLen nOffset) -{ - SwCntntNode *const pCntntNode( rOldNode.GetNode().GetCntntNode() ); - SwPaM const aPam(rOldNode, 0, - rOldNode, (pCntntNode) ? pCntntNode->Len() : 0); - SwPosition aNewPos(rNewPos); - aNewPos.nContent += nOffset; - return ::PaMCorrAbs(aPam, aNewPos); -} - - -void PaMCorrAbs( const SwNodeIndex &rStartNode, - const SwNodeIndex &rEndNode, - const SwPosition &rNewPos ) -{ - SwCntntNode *const pCntntNode( rEndNode.GetNode().GetCntntNode() ); - SwPaM const aPam(rStartNode, 0, - rEndNode, (pCntntNode) ? pCntntNode->Len() : 0); - return ::PaMCorrAbs(aPam, rNewPos); -} - void PaMCorrAbs( const SwPaM& rRange, const SwPosition& rNewPos ) @@ -267,12 +244,15 @@ void SwDoc::CorrAbs(const SwNodeIndex& rStartNode, const SwPosition& rNewPos, BOOL bMoveCrsr) { - SwPosition aNewPos(rNewPos); - _DelBookmarks(rStartNode, rEndNode); if(bMoveCrsr) - ::PaMCorrAbs(rStartNode, rEndNode, rNewPos); + { + SwCntntNode *const pCntntNode( rEndNode.GetNode().GetCntntNode() ); + SwPaM const aPam(rStartNode, 0, + rEndNode, (pCntntNode) ? pCntntNode->Len() : 0); + ::PaMCorrAbs(aPam, rNewPos); + } } diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 3b81863ea5..4576a9da08 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -835,8 +835,8 @@ void SwDoc::ClearDoc() pFirstNd->SetAttr( SwFmtPageDesc( pDummyPgDsc )); SwPosition aPos( *pFirstNd, SwIndex( pFirstNd )); - ::PaMCorrAbs( aSttIdx, SwNodeIndex( GetNodes().GetEndOfContent() ), - aPos ); + SwPaM const tmpPaM(aSttIdx, SwNodeIndex(GetNodes().GetEndOfContent())); + ::PaMCorrAbs(tmpPaM, aPos); } GetNodes().Delete( aSttIdx, diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 77d98ab890..75e66edc84 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -2120,9 +2120,10 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn ) *aSavePaM.GetMark() = SwPosition( *pTblNd ); aSavePaM.Move( fnMoveBackward, fnGoNode ); } - ::PaMCorrAbs( SwNodeIndex( *pTblNd ), - SwNodeIndex( *pTblNd->EndOfSectionNode() ), - *aSavePaM.GetMark() ); + { + SwPaM const tmpPaM(*pTblNd, *pTblNd->EndOfSectionNode()); + ::PaMCorrAbs(tmpPaM, *aSavePaM.GetMark()); + } // harte SeitenUmbrueche am nachfolgenden Node verschieben BOOL bSavePageBreak = FALSE, bSavePageDesc = FALSE; @@ -2176,9 +2177,10 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn ) *aSavePaM.GetMark() = SwPosition( *pTblNd ); aSavePaM.Move( fnMoveBackward, fnGoNode ); } - ::PaMCorrAbs( SwNodeIndex( *pTblNd ), - SwNodeIndex( *pTblNd->EndOfSectionNode() ), - *aSavePaM.GetMark() ); + { + SwPaM const tmpPaM(*pTblNd, *pTblNd->EndOfSectionNode()); + ::PaMCorrAbs(tmpPaM, *aSavePaM.GetMark()); + } // harte SeitenUmbrueche am nachfolgenden Node verschieben SwCntntNode* pNextNd = GetNodes()[ pTblNd->EndOfSectionIndex()+1 ]->GetCntntNode(); diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 19377c4e06..5bfdc29fab 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -885,9 +885,8 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) SwCntntNode* pCNd = GetDoc()->GetNodes().GoNext( &aNdIdx ); SwPosition aPos( aNdIdx, SwIndex( pCNd, 0 )); // #i59539: Don't remove all redline - ::PaMCorrAbs( SwNodeIndex( *pDestNd ), - SwNodeIndex( *pDestNd->EndOfSectionNode() ), - aPos ); + SwPaM const tmpPaM(*pDestNd, *pDestNd->EndOfSectionNode()); + ::PaMCorrAbs(tmpPaM, aPos); } bRet = GetDoc()->InsCopyOfTbl( aDestPos, aBoxes, &pSrcNd->GetTable(), @@ -902,7 +901,11 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) SwCntntNode* pCNd = GetDoc()->GetNodes().GoNext( &aNdIdx ); SwPosition aPos( aNdIdx, SwIndex( pCNd, 0 )); // #i59539: Don't remove all redline - ::PaMCorrAbs( PCURCRSR->GetPoint()->nNode, aPos ); + SwNode & rNode(PCURCRSR->GetPoint()->nNode.GetNode()); + SwCntntNode *const pCntntNode( rNode.GetCntntNode() ); + SwPaM const tmpPam(rNode, 0, + rNode, (pCntntNode) ? pCntntNode->Len() : 0); + ::PaMCorrAbs(tmpPam, aPos); } break; // aus der "while"-Schleife heraus diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx index 0f821849cb..25e9a6fe6a 100644 --- a/sw/source/core/inc/mvsave.hxx +++ b/sw/source/core/inc/mvsave.hxx @@ -24,14 +24,11 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _MVSAVE_HXX -#define _MVSAVE_HXX - +#ifndef SW_MVSAVE_HXX +#define SW_MVSAVE_HXX #include -#ifndef _KEYCOD_HXX //autogen #include -#endif #include #include #include @@ -150,25 +147,10 @@ public: // Crsr verschieben kann // die Funktionen rufen nicht die SwDoc::Corr - Methoden! - // Setzt alle PaMs an OldPos auf NewPos + Offset -void PaMCorrAbs( const SwPosition &rOldPos, - const SwPosition &rNewPos, - const xub_StrLen nOffset = 0 ); - - // Setzt alle PaMs in OldNode auf NewPos + Offset -void PaMCorrAbs( const SwNodeIndex &rOldNode, - const SwPosition &rNewPos, - const xub_StrLen nOffset = 0 ); - // Setzt alle PaMs im Bereich vom Range nach NewPos void PaMCorrAbs( const SwPaM& rRange, const SwPosition& rNewPos ); - // Setzt alle PaMs im Bereich von [StartNode, EndNode] nach NewPos -void PaMCorrAbs( const SwNodeIndex &rStartNode, - const SwNodeIndex &rEndNode, - const SwPosition &rNewPos ); - // Setzt alle PaMs in OldNode auf relative Pos void PaMCorrRel( const SwNodeIndex &rOldNode, const SwPosition &rNewPos, @@ -227,5 +209,5 @@ public: }; -#endif // _MVSAVE_HXX +#endif // SW_MVSAVE_HXX -- cgit v1.2.3 From 658f394bc9517aff1244be90a6dcb1623fcbfc55 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 30 Sep 2010 15:55:00 +0200 Subject: sw34refactor1: SwXTextView: remove unused parameter from BuildTmpSelectionDoc() --- sw/source/ui/inc/unotxvw.hxx | 2 +- sw/source/ui/uiview/view.cxx | 3 +-- sw/source/ui/uno/unotxvw.cxx | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx index 828016c6e3..e074e37dda 100644 --- a/sw/source/ui/inc/unotxvw.hxx +++ b/sw/source/ui/inc/unotxvw.hxx @@ -156,7 +156,7 @@ public: void Invalidate(); // temporary document used for PDF export of selections/multi-selections - SfxObjectShellRef BuildTmpSelectionDoc( SfxObjectShellRef& ); + SfxObjectShellRef BuildTmpSelectionDoc(); }; /* -----------------17.09.98 12:52------------------- diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 8d750d9234..28af75a7d8 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -1912,8 +1912,7 @@ SfxObjectShellRef & SwView::GetOrCreateTmpSelectionDoc() if (!rxTmpDoc.Is()) { SwXTextView *pImpl = GetViewImpl()->GetUNOObject_Impl(); - rxTmpDoc = pImpl->BuildTmpSelectionDoc( - GetViewImpl()->GetEmbeddedObjRef() ); + rxTmpDoc = pImpl->BuildTmpSelectionDoc(); } return rxTmpDoc; } diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 8ba286f926..1394f60fd2 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -903,7 +903,7 @@ void SAL_CALL SwXTextView::setRubyList( /*-- 29.12.02 15:45:29--------------------------------------------------- -----------------------------------------------------------------------*/ -SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ ) +SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc() { SwWrtShell& rOldSh = m_pView->GetWrtShell(); SfxPrinter *pPrt = rOldSh.getIDocumentDeviceAccess()->getPrinter( false ); -- cgit v1.2.3 From 4cf789b22fc9b22cc8971272ac11be3e780a4791 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 30 Sep 2010 16:01:37 +0200 Subject: sw34refactor1: remove obsolete (printer refactoring) ViewShell::CreatePrtDoc() --- sw/inc/viewsh.hxx | 10 +-- sw/source/core/view/vprint.cxx | 138 +++-------------------------------------- 2 files changed, 12 insertions(+), 136 deletions(-) mode change 100755 => 100644 sw/source/core/view/vprint.cxx (limited to 'sw/source') diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index c89351b614..e699778761 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -24,8 +24,9 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _VIEWSH_HXX -#define _VIEWSH_HXX +#ifndef SW_VIEWSH_HXX +#define SW_VIEWSH_HXX + #include #include #include @@ -368,8 +369,7 @@ public: static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions, OutputDevice* pOleOut, const Rectangle& rRect ); - // creates temporary doc with selected text for PDF export - SwDoc * CreatePrtDoc( SfxObjectShellRef& ); + /// fill temporary doc with selected text for Print or PDF export SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt ); //Wird intern fuer die Shell gerufen die Druckt. Formatiert die Seiten. @@ -633,4 +633,4 @@ inline const SfxItemPool& ViewShell::GetAttrPool() const -#endif //_VIEWSH_HXX +#endif // SW_VIEWSH_HXX diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx old mode 100755 new mode 100644 index c37036e42a..fc96f0dd30 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -369,107 +369,6 @@ void ViewShell::CalcPagesForPrint( USHORT nMax ) /******************************************************************************/ -SwDoc * ViewShell::CreatePrtDoc( SfxObjectShellRef &rDocShellRef) -{ - ASSERT( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only"); - SwFEShell* pFESh = (SwFEShell*)this; - // Wir bauen uns ein neues Dokument - SwDoc *pPrtDoc = new SwDoc; - pPrtDoc->acquire(); - pPrtDoc->SetRefForDocShell( (SfxObjectShellRef*)&(long&)rDocShellRef ); - pPrtDoc->LockExpFlds(); - - const SfxPoolItem* pCpyItem; - const SfxItemPool& rPool = GetAttrPool(); - for( USHORT nWh = POOLATTR_BEGIN; nWh < POOLATTR_END; ++nWh ) - if( 0 != ( pCpyItem = rPool.GetPoolDefaultItem( nWh ) ) ) - pPrtDoc->GetAttrPool().SetPoolDefaultItem( *pCpyItem ); - - // JP 29.07.99 - Bug 67951 - set all Styles from the SourceDoc into - // the PrintDoc - will be replaced! - pPrtDoc->ReplaceStyles( *GetDoc() ); - - SwShellCrsr *pActCrsr = pFESh->_GetCrsr(); - SwShellCrsr *pFirstCrsr = dynamic_cast(pActCrsr->GetNext()); - if( !pActCrsr->HasMark() ) // bei Multiselektion kann der aktuelle Cursor leer sein - { - pActCrsr = dynamic_cast(pActCrsr->GetPrev()); - } - - Point aSelPoint; - if( pFESh->IsTableMode() ) - { - SwShellTableCrsr* pShellTblCrsr = pFESh->GetTableCrsr(); - - const SwCntntNode* pCntntNode = pShellTblCrsr->GetNode()->GetCntntNode(); - const SwCntntFrm *pCntntFrm = pCntntNode ? pCntntNode->GetFrm( 0, pShellTblCrsr->Start() ) : 0; - if( pCntntFrm ) - { - SwRect aCharRect; - SwCrsrMoveState aTmpState( MV_NONE ); - pCntntFrm->GetCharRect( aCharRect, *pShellTblCrsr->Start(), &aTmpState ); - aSelPoint = Point( aCharRect.Left(), aCharRect.Top() ); - } - } - else - { - aSelPoint = pFirstCrsr->GetSttPos(); - } - - const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aSelPoint ); - ASSERT( pPage, "no page found!" ); - - // get page descriptor - fall back to the first one if pPage could not be found - const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDescByName( - pPage->GetPageDesc()->GetName() ) : &pPrtDoc->_GetPageDesc( (sal_uInt16)0 ); - - if( !pFESh->IsTableMode() && pActCrsr->HasMark() ) - { // Am letzten Absatz die Absatzattribute richten: - SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() ); - SwTxtNode* pTxtNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx )->GetTxtNode(); - SwCntntNode *pLastNd = - pActCrsr->GetCntntNode( (*pActCrsr->GetMark()) <= (*pActCrsr->GetPoint()) ); - // Hier werden die Absatzattribute des ersten Absatzes uebertragen - if( pLastNd && pLastNd->IsTxtNode() ) - ((SwTxtNode*)pLastNd)->CopyCollFmt( *pTxtNd ); - } - - // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!) -// if( aDocShellRef.Is() ) -// SwDataExchange::InitOle( aDocShellRef, pPrtDoc ); - // und fuellen es mit dem selektierten Bereich - pFESh->Copy( pPrtDoc ); - - //Jetzt noch am ersten Absatz die Seitenvorlage setzen - { - SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() ); - SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx ); // gehe zum 1. ContentNode - if( pFESh->IsTableMode() ) - { - SwTableNode* pTNd = pCNd->FindTableNode(); - if( pTNd ) - pTNd->GetTable().GetFrmFmt()->SetFmtAttr( SwFmtPageDesc( pPageDesc ) ); - } - else - { - pCNd->SetAttr( SwFmtPageDesc( pPageDesc ) ); - if( pFirstCrsr->HasMark() ) - { - SwTxtNode *pTxtNd = pCNd->GetTxtNode(); - if( pTxtNd ) - { - SwCntntNode *pFirstNd = - pFirstCrsr->GetCntntNode( (*pFirstCrsr->GetMark()) > (*pFirstCrsr->GetPoint()) ); - // Hier werden die Absatzattribute des ersten Absatzes uebertragen - if( pFirstNd && pFirstNd->IsTxtNode() ) - ((SwTxtNode*)pFirstNd)->CopyCollFmt( *pTxtNd ); - } - } - } - } - return pPrtDoc; -} - SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) { ASSERT( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only"); @@ -608,32 +507,15 @@ sal_Bool ViewShell::PrintOrPDFExport( //!! (h?ngt mit OLE Objekten im Dokument zusammen.) SfxObjectShellRef aDocShellRef; - //! Note: Since for PDF export of (multi-)selection a temporary - //! document is created that contains only the selects parts, - //! and thus that document is to printed in whole the, - //! rPrintData.bPrintSelection parameter will be false. - BOOL bSelection = rPrintData.bPrintSelection; - - // PDF export for (multi-)selection has already generated a temporary document - // with the selected text. (see XRenderable implementation in unotxdoc.cxx) - // Thus we like to go in the 'else' part here in that case. - // Is is implemented this way because PDF export calls this Prt function + // Print/PDF export for (multi-)selection has already generated a + // temporary document with the selected text. + // (see XRenderable implementation in unotxdoc.cxx) + // It is implemented this way because PDF export calls this Prt function // once per page and we do not like to always have the temporary document - // to be created that often here in the 'then' part. - if ( bSelection ) - { - pOutDevDoc = CreatePrtDoc( aDocShellRef ); + // to be created that often here. + pOutDevDoc = GetDoc(); + pShell = new ViewShell( *this, 0, pOutDev ); - // eine ViewShell darauf - pShell = new ViewShell( *pOutDevDoc, 0, pOpt, pOutDev ); - pOutDevDoc->SetRefForDocShell( 0 ); - } - else - { - pOutDevDoc = GetDoc(); - pShell = new ViewShell( *this, 0, pOutDev ); - } - SdrView *pDrawView = pShell->GetDrawView(); if (pDrawView) { @@ -705,12 +587,6 @@ sal_Bool ViewShell::PrintOrPDFExport( delete pShell; - if (bSelection ) - { - if ( !pOutDevDoc->release() ) - delete pOutDevDoc; - } - // restore settings of OutputDevice (should be done always now since the // output device is now provided by a call from outside the Writer) pOutDev->Pop(); -- cgit v1.2.3 From 486709f6d2c5d552673f32fd5b592d58947c2e6e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 30 Sep 2010 16:03:07 +0200 Subject: sw34refactor1: remove obsolete (due to printer refactoring) class SwPrtOptions: remove SwPrtOptions instances with SwPrintData. replace SwPrtOptions::MakeOptions() with sw::InitPrintOptionsFromApplication(). move some constants from swprtopt.hxx to printdata.hxx. remove swprtopt.hxx. --- sw/inc/dbmgr.hxx | 1 - sw/inc/printdata.hxx | 34 +++++++++---- sw/inc/swprtopt.hxx | 102 ------------------------------------- sw/inc/unotxdoc.hxx | 7 ++- sw/inc/viewsh.hxx | 6 +-- sw/source/core/doc/doc.cxx | 1 - sw/source/core/doc/notxtfrm.cxx | 4 +- sw/source/core/inc/cellfrm.hxx | 7 +-- sw/source/core/inc/flyfrm.hxx | 7 +-- sw/source/core/inc/frame.hxx | 10 ++-- sw/source/core/inc/layfrm.hxx | 9 ++-- sw/source/core/inc/notxtfrm.hxx | 7 +-- sw/source/core/inc/rootfrm.hxx | 10 ++-- sw/source/core/inc/tabfrm.hxx | 9 ++-- sw/source/core/inc/txtfrm.hxx | 8 +-- sw/source/core/inc/viewimp.hxx | 13 ++--- sw/source/core/layout/paintfrm.cxx | 28 +++------- sw/source/core/layout/unusedf.cxx | 4 +- sw/source/core/text/frmpaint.cxx | 6 +-- sw/source/core/view/printdata.cxx | 30 ++++------- sw/source/core/view/vdraw.cxx | 8 +-- sw/source/core/view/viewpg.cxx | 10 ++-- sw/source/core/view/vprint.cxx | 7 ++- sw/source/ui/app/docsh.cxx | 4 +- sw/source/ui/config/optpage.cxx | 26 +--------- sw/source/ui/config/prtopt.cxx | 3 +- sw/source/ui/dbui/dbmgr.cxx | 3 -- sw/source/ui/inc/view.hxx | 1 - sw/source/ui/uiview/pview.cxx | 22 ++------ sw/source/ui/uiview/view.cxx | 18 +++---- sw/source/ui/uiview/viewprt.cxx | 1 - sw/source/ui/uno/unotxdoc.cxx | 22 ++++---- 32 files changed, 133 insertions(+), 295 deletions(-) mode change 100755 => 100644 sw/inc/printdata.hxx delete mode 100644 sw/inc/swprtopt.hxx mode change 100755 => 100644 sw/inc/unotxdoc.hxx mode change 100755 => 100644 sw/source/core/doc/doc.cxx mode change 100755 => 100644 sw/source/ui/app/docsh.cxx mode change 100755 => 100644 sw/source/ui/config/optpage.cxx (limited to 'sw/source') diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index 594d1fefac..24cd087d70 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -73,7 +73,6 @@ struct SwDBFormatData class SwView; class SwWrtShell; -class SwPrtOptions; class SfxProgress; class ListBox; class Button; diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx old mode 100755 new mode 100644 index 773fdaa3aa..a2561e0c63 --- a/sw/inc/printdata.hxx +++ b/sw/inc/printdata.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _SW_PRINTDATA_HXX -#define _SW_PRINTDATA_HXX +#ifndef SW_PRINTDATA_HXX +#define SW_PRINTDATA_HXX #include @@ -45,7 +45,6 @@ class _SetGetExpFlds; class SwViewOption; class OutputDevice; class SwViewOptionAdjust_Impl; -class SwPrtOptions; class SwWrtShell; class SfxViewShell; @@ -248,8 +247,8 @@ class SwRenderData // the view options to be applied for printing SwViewOptionAdjust_Impl * m_pViewOptionAdjust; - SwPrtOptions * m_pPrtOptions; - + SwPrintData * m_pPrtOptions; + public: // PostIt relevant data @@ -269,14 +268,14 @@ public: bool IsViewOptionAdjust() const { return m_pViewOptionAdjust != 0; } bool NeedNewViewOptionAdjust( const SwWrtShell& ) const; void ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &rViewOptions ); - void ViewOptionAdjust( const SwPrtOptions *pPrtOptions ); + void ViewOptionAdjust( SwPrintData const*const pPrtOptions ); void ViewOptionAdjustStop(); bool HasSwPrtOptions() const { return m_pPrtOptions != 0; } - void SetSwPrtOptions( SwPrtOptions * pOpt ) { m_pPrtOptions = pOpt; } - const SwPrtOptions * GetSwPrtOptions() const { return m_pPrtOptions; } - SwPrtOptions & GetSwPrtOptionsRef() { return *m_pPrtOptions; } - void MakeSwPrtOptions( SwPrtOptions &rOptions, const SwDocShell *pDocShell, + void SetSwPrtOptions(SwPrintData *const pOpt) { m_pPrtOptions = pOpt; } + SwPrintData const* GetSwPrtOptions() const { return m_pPrtOptions; } + SwPrintData & GetSwPrtOptionsRef() { return *m_pPrtOptions; } + void MakeSwPrtOptions( SwPrintData & rOptions, const SwDocShell *pDocShell, const SwPrintUIOptions *pOpt, const SwRenderData *pData, bool bIsPDFExport ); @@ -320,4 +319,17 @@ public: //////////////////////////////////////////////////////////// -#endif //_SW_PRINTDATA_HXX +// last remnants of swprtopt.hxx: + +#define POSTITS_NONE 0 +#define POSTITS_ONLY 1 +#define POSTITS_ENDDOC 2 +#define POSTITS_ENDPAGE 3 + +namespace sw { + +void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb); + +} // namespace sw + +#endif // SW_PRINTDATA_HXX diff --git a/sw/inc/swprtopt.hxx b/sw/inc/swprtopt.hxx deleted file mode 100644 index b2c83b8ab1..0000000000 --- a/sw/inc/swprtopt.hxx +++ /dev/null @@ -1,102 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SWPRTOPT_HXX -#define _SWPRTOPT_HXX - -#include -#include - -#include -#include -#include -#include - -#define POSTITS_NONE 0 -#define POSTITS_ONLY 1 -#define POSTITS_ENDDOC 2 -#define POSTITS_ENDPAGE 3 - - -class PrintDialog; -class SfxPrinter; - - -//////////////////////////////////////////////////////////// - - -class SwPrtOptions : public SwPrintData -{ - USHORT nJobNo; - String sJobName; - -public: - MultiSelection aMulti; - Point aOffset; - ULONG nMergeCnt; // Anzahl der Serienbriefe - ULONG nMergeAct; // Aktueller Serienbriefnr. - USHORT nCopyCount; - - BOOL bCollate, - bPrintSelection, // Markierung drucken - bJobStartet; - - SwPrtOptions( const String& rJobName ) : - nJobNo( 1 ), - sJobName( rJobName ), - aOffset( Point(0,0) ), - nMergeCnt( 0 ), - nMergeAct( 0 ), - bCollate(FALSE), - bPrintSelection (FALSE), - bJobStartet(FALSE) - {} - - const String& MakeNextJobName(); // steht in vprint.cxx - const String& GetJobName() const { return sJobName; } - -#if defined(TCPP) - // seit neuestem (SV 223) kann der keinen mehr generieren - inline SwPrtOptions(const SwPrtOptions& rNew) {*this = rNew;} -#endif - - - SwPrtOptions& operator=(const SwPrintData& rData) - { - SwPrintData::operator=(rData); - return *this; - } - - // get print options - void MakeOptions( BOOL bWeb ); -}; - - -//////////////////////////////////////////////////////////// - -#endif //_SWPRTOPT_HXX - diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx old mode 100755 new mode 100644 index e9c1e38b76..bf3cd0bd49 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -129,7 +129,6 @@ class SfxViewFrame; class SwPrintUIOptions; class SwPrintData; class SwRenderData; -class SwPrtOptions; class SwWrtShell; @@ -605,9 +604,9 @@ class SwViewOptionAdjust_Impl public: SwViewOptionAdjust_Impl( SwWrtShell& rSh, const SwViewOption &rViewOptions ); ~SwViewOptionAdjust_Impl(); - - void AdjustViewOptions( const SwPrtOptions *pPrtOptions ); - + + void AdjustViewOptions( SwPrintData const*const pPrtOptions ); + bool checkShell( const SwWrtShell& rCompare ) const { return &rCompare == &m_rShell; } }; diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index e699778761..752644ad10 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -68,7 +68,6 @@ class SfxItemPool; class SfxViewShell; class SwViewOption; class SwViewImp; -class SwPrtOptions; class SwPrintData; class SwPagePreViewPrtData; class Window; @@ -358,7 +357,8 @@ public: // printing of one page. // bIsPDFExport == true is: do PDF Export (no printing!) - sal_Bool PrintOrPDFExport( OutputDevice *pOutDev, const SwPrtOptions &rPrintData, + sal_Bool PrintOrPDFExport( OutputDevice *pOutDev, + SwPrintData const& rPrintData, sal_Int32 nRenderer /* offset in vector of pages to print */ ); // printing of one brochure page @@ -467,7 +467,7 @@ public: input parameter - constant reference to print options, to which the view option will be adjusted. */ - void AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions ); + void AdjustOptionsForPagePreview( SwPrintData const& rPrintOptions ); sal_Bool IsViewLocked() const { return bViewLocked; } void LockView( sal_Bool b ) { bViewLocked = b; } diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx old mode 100755 new mode 100644 index 14124b6fcf..f7d897773b --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -100,7 +100,6 @@ #include #include #include -#include #include // fuer den dflt - Printer in SetJob #include // StatLine-String #include diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 3c1d88c700..c0117e686c 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -71,9 +71,7 @@ #include #include #include -#ifndef _COMCORE_HRC #include -#endif #include #include #include @@ -266,7 +264,7 @@ void lcl_ClearArea( const SwFrm &rFrm, |* *************************************************************************/ -void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/ ) const +void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { if ( Frm().IsEmpty() ) return; diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx index fb479fc865..8b45aa5e2d 100644 --- a/sw/source/core/inc/cellfrm.hxx +++ b/sw/source/core/inc/cellfrm.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _CELLFRM_HXX -#define _CELLFRM_HXX +#ifndef SW_CELLFRM_HXX +#define SW_CELLFRM_HXX #include @@ -48,7 +48,8 @@ public: virtual BOOL GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0 ) const; virtual void Modify( SfxPoolItem*, SfxPoolItem* ); - virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const; + virtual void Paint( SwRect const&, + SwPrintData const*const pPrintData = NULL ) const; virtual void CheckDirection( BOOL bVert ); // --> OD 2010-02-17 #i103961# diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx index 1ea99ac067..5734a0b1e3 100644 --- a/sw/source/core/inc/flyfrm.hxx +++ b/sw/source/core/inc/flyfrm.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _FLYFRM_HXX -#define _FLYFRM_HXX +#ifndef SW_FLYFRM_HXX +#define SW_FLYFRM_HXX #include "layfrm.hxx" @@ -158,7 +158,8 @@ public: virtual void Modify( SfxPoolItem*, SfxPoolItem* ); // erfrage vom Client Informationen virtual BOOL GetInfo( SfxPoolItem& ) const; - virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const; + virtual void Paint( SwRect const&, + SwPrintData const*const pPrintData = NULL ) const; virtual Size ChgSize( const Size& aNewSize ); virtual BOOL GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0 ) const; diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 6d61b3ab08..5707183769 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -24,8 +24,9 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _FRAME_HXX -#define _FRAME_HXX +#ifndef SW_FRAME_HXX +#define SW_FRAME_HXX + #include #include "swtypes.hxx" // fuer SwTwips #include "swrect.hxx" @@ -53,7 +54,7 @@ class SvxBrushItem; class SwSelectionList; struct SwPosition; struct SwCrsrMoveState; -class SwPrtOptions; +class SwPrintData; // --> OD 2004-07-06 #i28701# class SwSortedObjs; @@ -822,7 +823,8 @@ public: SwCrsrMoveState* = 0 ) const; virtual BOOL GetCharRect( SwRect &, const SwPosition&, SwCrsrMoveState* = 0 ) const; - virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const; + virtual void Paint( SwRect const&, + SwPrintData const*const pPrintData = NULL ) const; // der "kurze Dienstweg" zwischen den Frames und der Formatierung. // Wer den void* falsch Casted ist selbst schuld! diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx index 9ade91ac84..16744a335f 100644 --- a/sw/source/core/inc/layfrm.hxx +++ b/sw/source/core/inc/layfrm.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _LAYFRM_HXX -#define _LAYFRM_HXX +#ifndef SW_LAYFRM_HXX +#define SW_LAYFRM_HXX #include "frame.hxx" @@ -105,7 +105,8 @@ public: SwLayoutFrm( SwFrmFmt* ); ~SwLayoutFrm(); - virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const; + virtual void Paint( SwRect const&, + SwPrintData const*const pPrintData = NULL ) const; const SwFrm *Lower() const { return pLower; } SwFrm *Lower() { return pLower; } const SwCntntFrm *ContainsCntnt() const; @@ -206,4 +207,4 @@ inline SwFrm* SwLayoutFrm::GetLastLower() return const_cast(static_cast(this)->GetLastLower()); } -#endif //_LAYFRM_HXX +#endif // SW_LAYFRM_HXX diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx index 0da68a3a53..ec18c44050 100644 --- a/sw/source/core/inc/notxtfrm.hxx +++ b/sw/source/core/inc/notxtfrm.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _NOTXTFRM_HXX -#define _NOTXTFRM_HXX +#ifndef SW_NOTXTFRM_HXX +#define SW_NOTXTFRM_HXX #include @@ -56,7 +56,8 @@ public: ~SwNoTxtFrm(); virtual void Modify( SfxPoolItem*, SfxPoolItem* ); - virtual void Paint(const SwRect&, const SwPrtOptions *pPrintData = NULL ) const; + virtual void Paint( SwRect const&, + SwPrintData const*const pPrintData = NULL ) const; virtual BOOL GetCharRect( SwRect &, const SwPosition&, SwCrsrMoveState* = 0) const; BOOL GetCrsrOfst(SwPosition* pPos, Point& aPoint, diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx index 5de7604ae7..50dbd394b4 100644 --- a/sw/source/core/inc/rootfrm.hxx +++ b/sw/source/core/inc/rootfrm.hxx @@ -24,8 +24,9 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _ROOTFRM_HXX -#define _ROOTFRM_HXX +#ifndef SW_ROOTFRM_HXX +#define SW_ROOTFRM_HXX + #include "layfrm.hxx" class SwCntntFrm; @@ -197,7 +198,8 @@ public: virtual BOOL GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0 ) const; - virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const; + virtual void Paint( SwRect const&, + SwPrintData const*const pPrintData = NULL ) const; virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE ); virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE ); #ifdef DBG_UTIL @@ -365,5 +367,5 @@ inline void SwRootFrm::SetVirtPageNum( const BOOL bOf) const ((SwRootFrm*)this)->bIsVirtPageNum = bOf; } -#endif //_ROOTFRM_HXX +#endif // SW_ROOTFRM_HXX diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx index 0383152d00..787b5fba8c 100644 --- a/sw/source/core/inc/tabfrm.hxx +++ b/sw/source/core/inc/tabfrm.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _TABFRM_HXX -#define _TABFRM_HXX +#ifndef SW_TABFRM_HXX +#define SW_TABFRM_HXX #include #include "layfrm.hxx" @@ -129,7 +129,8 @@ public: virtual void Modify( SfxPoolItem*, SfxPoolItem* ); virtual BOOL GetInfo( SfxPoolItem &rHnt ) const; - virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const; + virtual void Paint( SwRect const&, + SwPrintData const*const pPrintData = NULL ) const; virtual void CheckDirection( BOOL bVert ); virtual void Cut(); @@ -230,4 +231,4 @@ inline SwTabFrm *SwTabFrm::GetFollow() return (SwTabFrm*)SwFlowFrm::GetFollow(); } -#endif //_TABFRM_HXX +#endif // SW_TABFRM_HXX diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index bdaadecf64..9dc3ece46a 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -24,8 +24,9 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _TXTFRM_HXX -#define _TXTFRM_HXX +#ifndef SW_TXTFRM_HXX +#define SW_TXTFRM_HXX + #include #include #include "cntfrm.hxx" @@ -292,7 +293,8 @@ public: void PaintExtraData( const SwRect & rRect ) const; //Seitennummer usw. SwRect Paint(); - virtual void Paint( const SwRect &, const SwPrtOptions *pPrintData = NULL ) const; + virtual void Paint( SwRect const&, + SwPrintData const*const pPrintData = NULL ) const; virtual void Modify( SfxPoolItem*, SfxPoolItem* ); virtual sal_Bool GetInfo( SfxPoolItem & ) const; diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx index 7b4a87a53b..6387bde937 100644 --- a/sw/source/core/inc/viewimp.hxx +++ b/sw/source/core/inc/viewimp.hxx @@ -24,8 +24,10 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _VIEWIMP_HXX -#define _VIEWIMP_HXX +#ifndef SW_VIEWIMP_HXX +#define SW_VIEWIMP_HXX + +#include #include #include @@ -53,10 +55,9 @@ struct SdrPaintProcRec; class SwAccessibleMap; class SdrObject; class Fraction; -class SwPrtOptions; +class SwPrintData; class SwPagePreviewLayout; struct PrevwPage; -#include class SwTxtFrm; class SwViewImp @@ -215,7 +216,7 @@ public: // and . // OD 25.06.2003 #108784# - correct type of 1st parameter void PaintLayer( const SdrLayerID _nLayerID, - const SwPrtOptions *pPrintData, + SwPrintData const*const pPrintData, const SwRect& _rRect, const Color* _pPageBackgrdColor = 0, const bool _bIsPageRightToLeft = false ) const; @@ -360,5 +361,5 @@ inline void SwViewImp::AddAccessibleObj( const SdrObject *pObj ) SwRect aEmptyRect; MoveAccessible( 0, pObj, aEmptyRect ); } -#endif //_VIEWIMP_HXX +#endif // SW_VIEWIMP_HXX diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 3c6d08242b..886fafedc8 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -30,12 +30,7 @@ #include - -#include - -#ifndef _SOUND_HXX //autogen #include -#endif #include #define _SVSTDARR_LONGS #include @@ -49,19 +44,15 @@ // --> collapsing borders FME 2005-05-27 #i29550# #include // <-- -#ifndef _GRAPH_HXX //autogen #include -#endif #include -#include - +#include +#include #include #include #include -#ifndef _COMCORE_HRC #include -#endif #include #include #include @@ -89,15 +80,11 @@ #include #include #include -#ifndef _LINEINFO_HXX #include -#endif #include #include // OD 20.12.2002 #94627# -#ifndef _DOCSH_HXX #include -#endif // OD 28.02.2003 #b4779636#, #107692# #include // OD 02.07.2003 #108784# @@ -2735,7 +2722,8 @@ void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori ) |* |*************************************************************************/ -void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) const +void +SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const { ASSERT( Lower() && Lower()->IsPageFrm(), "Lower der Root keine Seite." ); @@ -3185,7 +3173,7 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect ) } } -void SwLayoutFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const +void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { ViewShell *pSh = GetShell(); @@ -3473,7 +3461,7 @@ BOOL SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh ) /************************************************************************* |* SwCellFrm::Paint( const SwRect& ) const |*************************************************************************/ -void SwCellFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const +void SwCellFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { if ( GetLayoutRowSpan() >= 1 ) SwLayoutFrm::Paint( rRect ); @@ -3492,7 +3480,7 @@ void SwCellFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ void MA_FASTCALL lcl_PaintLowerBorders( const SwLayoutFrm *pLay, const SwRect &rRect, const SwPageFrm *pPage ); -void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const +void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { //wegen der Ueberlappung von Rahmen und Zeichenobjekten muessen die //Flys ihre Umrandung (und die der Innenliegenden) direkt ausgeben. @@ -3727,7 +3715,7 @@ void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ |* |*************************************************************************/ -void SwTabFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const +void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { if ( pGlobalShell->GetViewOptions()->IsTable() ) { diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx index 1c5d00a744..a3dd5eda4c 100644 --- a/sw/source/core/layout/unusedf.cxx +++ b/sw/source/core/layout/unusedf.cxx @@ -28,8 +28,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - - #include "rootfrm.hxx" #include "cntfrm.hxx" #include "flyfrm.hxx" @@ -41,7 +39,7 @@ void SwFrm::Format( const SwBorderAttrs * ) ASSERT( FALSE, "Format() der Basisklasse gerufen." ); } -void SwFrm::Paint(const SwRect &, const SwPrtOptions * ) const +void SwFrm::Paint(SwRect const&, SwPrintData const*const) const { ASSERT( FALSE, "Paint() der Basisklasse gerufen." ); } diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index e8fc5b382b..142c53450a 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -38,12 +38,8 @@ #include #include -#ifndef _FMTLINE_HXX #include -#endif -#ifndef _LINEINFO_HXX #include -#endif #include #include #include // ViewShell @@ -596,7 +592,7 @@ sal_Bool SwTxtFrm::PaintEmpty( const SwRect &rRect, sal_Bool bCheck ) const * SwTxtFrm::Paint() *************************************************************************/ -void SwTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/ ) const +void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { ResetRepaint(); diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index 5d8cb3f043..9410da39e2 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -40,7 +40,6 @@ #include #include #include -#include #include #include @@ -125,9 +124,9 @@ void SwRenderData::ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &r } m_pViewOptionAdjust = new SwViewOptionAdjust_Impl( rSh, rViewOptions ); } - -void SwRenderData::ViewOptionAdjust( const SwPrtOptions *pPrtOptions ) + +void SwRenderData::ViewOptionAdjust(SwPrintData const*const pPrtOptions) { m_pViewOptionAdjust->AdjustViewOptions( pPrtOptions ); } @@ -139,24 +138,24 @@ void SwRenderData::ViewOptionAdjustStop() { delete m_pViewOptionAdjust; m_pViewOptionAdjust = 0; - } + } } -void SwRenderData::MakeSwPrtOptions( - SwPrtOptions &rOptions, +void SwRenderData::MakeSwPrtOptions( + SwPrintData & rOptions, const SwDocShell *pDocShell, const SwPrintUIOptions *pOpt, - const SwRenderData *pData, + const SwRenderData *pData, bool bIsPDFExport ) { if (!pDocShell || !pOpt || !pData) return; - + // get default print options const TypeId aSwWebDocShellTypeId = TYPE(SwWebDocShell); BOOL bWeb = pDocShell->IsA( aSwWebDocShellTypeId ); - rOptions.MakeOptions( bWeb ); + ::sw::InitPrintOptionsFromApplication(rOptions, bWeb); // get print options to use from provided properties rOptions.bPrintGraphic = pOpt->IsPrintGraphics(); @@ -183,19 +182,8 @@ void SwRenderData::MakeSwPrtOptions( //! function will destroy the pointers rOptions.SetPrintUIOptions( pOpt ); rOptions.SetRenderData( pData ); - - // rOptions.aMulti is not used anymore in the XRenderable API - // Thus we set it to a dummy value here. - rOptions.aMulti = MultiSelection( Range( 1, 1 ) ); - - //! Note: Since for PDF export of (multi-)selection a temporary - //! document is created that contains only the selects parts, - //! and thus that document is to printed in whole the, - //! rOptions.bPrintSelection parameter will be false. - if (bIsPDFExport) - rOptions.bPrintSelection = FALSE; } - + ////////////////////////////////////////////////////////////////////// diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx index 20e12f2e3c..1162567480 100644 --- a/sw/source/core/view/vdraw.cxx +++ b/sw/source/core/view/vdraw.cxx @@ -52,7 +52,7 @@ #include "viewimp.hxx" #include "dflyobj.hxx" #include "viewopt.hxx" -#include "swprtopt.hxx" +#include "printdata.hxx" #include "dcontact.hxx" #include "dview.hxx" #include "flyfrm.hxx" @@ -179,7 +179,7 @@ void SwViewImp::UnlockPaint() // outliner of the draw view for painting layers and . // OD 25.06.2003 #108784# - correct type of 1st parameter void SwViewImp::PaintLayer( const SdrLayerID _nLayerID, - const SwPrtOptions * _pPrintData, + SwPrintData const*const pPrintData, const SwRect& , const Color* _pPageBackgrdColor, const bool _bIsPageRightToLeft ) const @@ -226,11 +226,11 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID, } pOutDev->Push( PUSH_LINECOLOR ); // #114231# - if (_pPrintData) + if (pPrintData) { // hide drawings but not form controls (form controls are handled elsewhere) SdrView &rSdrView = const_cast< SdrView & >(GetPageView()->GetView()); - rSdrView.setHideDraw( !_pPrintData->IsPrintDraw() ); + rSdrView.setHideDraw( !pPrintData->IsPrintDraw() ); } GetPageView()->DrawLayer(_nLayerID, pOutDev); pOutDev->Pop(); diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx index 91f89299e8..dc56548152 100644 --- a/sw/source/core/view/viewpg.cxx +++ b/sw/source/core/view/viewpg.cxx @@ -41,19 +41,15 @@ #include #include #include -#include // SwPrtOptions +#include #include #include #include #include #include -#ifndef _STATSTR_HRC #include // Text fuer SfxProgress -#endif -#ifndef _COMCORE_HRC #include -#endif #include #include @@ -77,7 +73,7 @@ void ViewShell::ShowPreViewSelection( sal_uInt16 nSelPage ) OD 09.01.2003 #i6467# */ -void ViewShell::AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions ) +void ViewShell::AdjustOptionsForPagePreview(SwPrintData const& rPrintOptions) { if ( !IsPreView() ) { @@ -85,7 +81,7 @@ void ViewShell::AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions return; } - PrepareForPrint( _rPrintOptions ); + PrepareForPrint( rPrintOptions ); return; } diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index fc96f0dd30..f4f7abbe29 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -71,7 +71,7 @@ #include // PostItFld /-Type #include #include -#include // SwPrtOptions +#include // SwPrintData #include #include // fuer RES_POOLPAGE_JAKET #include // Ansteuern der Statusleiste @@ -481,7 +481,7 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) sal_Bool ViewShell::PrintOrPDFExport( OutputDevice *pOutDev, - const SwPrtOptions &rPrintData, + SwPrintData const& rPrintData, sal_Int32 nRenderer /* the index in the vector of pages to be printed */ ) { //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -564,6 +564,8 @@ sal_Bool ViewShell::PrintOrPDFExport( rPrintData.GetRenderData().m_pPostItShell : pShell; ::SetSwVisArea( pViewSh2, pStPage->Frm() ); +// FIXME disabled because rPrintData.aOffset is always (0,0) +#if 0 // wenn wir einen Umschlag drucken wird ein Offset beachtet if( pStPage->GetFmt()->GetPoolFmtId() == RES_POOLPAGE_JAKET ) { @@ -573,6 +575,7 @@ sal_Bool ViewShell::PrintOrPDFExport( aTmp.SetOrigin( aNewOrigin ); pOutDev->SetMapMode( aTmp ); } +#endif pShell->InitPrt( pOutDev ); diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx old mode 100755 new mode 100644 index a5a8bad22c..7eb83ecbf6 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -65,7 +65,7 @@ #include #include #include -#include +#include #include #include // fuer die aktuelle Sicht #include @@ -895,7 +895,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup, pDev->SetLineColor(); pDev->SetBackground(); BOOL bWeb = 0 != PTR_CAST(SwWebDocShell, this); - SwPrtOptions aOpts( aEmptyStr ); + SwPrintData aOpts; ViewShell::PrtOle2( pDoc, SW_MOD()->GetUsrPref(bWeb), aOpts, pDev, aRect ); pDev->Pop(); diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx old mode 100755 new mode 100644 index 8d3943834c..9907d16191 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -27,20 +27,16 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #ifdef SW_DLLIMPLEMENTATION #undef SW_DLLIMPLEMENTATION #endif - #include -#ifndef _CMDID_H #include -#endif #include -#ifndef _SVSTDARR_HXX #define _SVSTDARR_STRINGSDTOR #include -#endif #include #include #include @@ -55,15 +51,9 @@ #include #include #include -#ifndef _VIEW_HXX #include -#endif -#ifndef _DOCSH_HXX #include -#endif -#ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED #include -#endif #include #include #include @@ -72,27 +62,15 @@ #include #include #include -#include -#ifndef _MODCFG_HXX +#include #include -#endif -#ifndef _SRCVIEW_HXX #include -#endif #include #include -#ifndef _GLOBALS_HRC #include -#endif -#ifndef _CONFIG_HRC #include -#endif -#ifndef _REDLOPT_HRC #include -#endif -#ifndef _OPTDLG_HRC #include -#endif #include #include #include diff --git a/sw/source/ui/config/prtopt.cxx b/sw/source/ui/config/prtopt.cxx index b6631686df..188db077cf 100644 --- a/sw/source/ui/config/prtopt.cxx +++ b/sw/source/ui/config/prtopt.cxx @@ -28,16 +28,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include -#include #include #include #include #include + using namespace utl; using rtl::OUString; using namespace com::sun::star::uno; diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index d550c3b3af..4a3b133798 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -62,10 +62,8 @@ #include #include #include -#ifndef _SVSTDARR_HXX #define _SVSTDARR_STRINGSDTOR #include -#endif #include #include #include @@ -86,7 +84,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 85b33fda78..a5e5ff1918 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -83,7 +83,6 @@ class CommandEvent; class InsCaptionOpt; class SvGlobalName; class SvtAccessibilityOptions; -class SwPrtOptions; class SwTransferable; class SwMailMergeConfigItem; class SwTxtNode; // #i23726# diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 4aaa2fd56c..87325d4470 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -28,8 +28,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - - #include #include #include @@ -54,10 +52,7 @@ #include #include #include -#ifndef _SVX_SVXIDS_HRC //autogen #include -#endif - #include #include @@ -73,27 +68,16 @@ #include #include #include -#include +#include #include #include #include - -#ifndef _HELPID_H #include -#endif -#ifndef _CMDID_H #include -#endif -#ifndef _GLOBALS_HRC #include -#endif -#ifndef _POPUP_HRC #include -#endif -#ifndef _PVIEW_HRC #include -#endif #define SwPagePreView #include @@ -105,6 +89,7 @@ #include #include + using namespace ::com::sun::star; @@ -1778,8 +1763,7 @@ void SwPagePreView::Init(const SwViewOption * pPrefs) GetViewShell()->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions()); // OD 09.01.2003 #i6467# - adjust view shell option to the same as for print - SwPrtOptions aPrintOptions( GetViewFrame()->GetObjectShell()->GetTitle(0) ); - aPrintOptions.MakeOptions( false ); + SwPrintData const aPrintOptions = *SW_MOD()->GetPrtOptions(false); GetViewShell()->AdjustOptionsForPagePreview( aPrintOptions ); IDocumentSettingAccess* pIDSA = pESh->getIDocumentSettingAccess(); diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 28af75a7d8..1722c0ac13 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -94,7 +94,6 @@ #include #include #include -#include #include #include //#include @@ -1926,17 +1925,12 @@ void SwView::AddTransferable(SwTransferable& rTransferable) /* --------------------------------------------------*/ -void SwPrtOptions::MakeOptions( BOOL bWeb ) -{ - *this = *SW_MOD()->GetPrtOptions(bWeb); - - nCopyCount = 1; - bCollate = FALSE; - bPrintSelection = FALSE; - bJobStartet = FALSE; +namespace sw { - aMulti.SetTotalRange( Range( 0, RANGE_MAX ) ); - aMulti.SelectAll(); - aMulti.Select( 0, FALSE ); +void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb) +{ + o_rData = *SW_MOD()->GetPrtOptions(bWeb); } +} // namespace sw + diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx index 88ad18947b..45e9272250 100644 --- a/sw/source/ui/uiview/viewprt.cxx +++ b/sw/source/ui/uiview/viewprt.cxx @@ -70,7 +70,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index e3f1322bed..95c7511476 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include @@ -2718,14 +2718,15 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( m_pRenderData->ViewOptionAdjustStart( *pWrtShell, *pWrtShell->GetViewOptions() ); } - m_pRenderData->SetSwPrtOptions( new SwPrtOptions( C2U( bIsPDFExport ? "PDF export" : "Printing" ) ) ); + m_pRenderData->SetSwPrtOptions( new SwPrintData ); m_pRenderData->MakeSwPrtOptions( m_pRenderData->GetSwPrtOptionsRef(), pRenderDocShell, m_pPrintUIOptions, m_pRenderData, bIsPDFExport ); - + if (pView->IsA(aSwViewTypeId)) { // PDF export should not make use of the SwPrtOptions - const SwPrtOptions *pPrtOptions = bIsPDFExport? NULL : m_pRenderData->GetSwPrtOptions(); + const SwPrintData *pPrtOptions = (bIsPDFExport) + ? NULL : m_pRenderData->GetSwPrtOptions(); m_pRenderData->ViewOptionAdjust( pPrtOptions ); } @@ -3064,19 +3065,20 @@ void SAL_CALL SwXTextDocument::render( SwWrtShell* pWrtShell = pView->IsA(aSwViewTypeId) ? ((SwView*)pView)->GetWrtShellPtr() : 0; - + if (bIsPDFExport && bFirstPage && pWrtShell) { SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPageRange, bIsSkipEmptyPages, sal_False ); } // <-- - - const SwPrtOptions &rSwPrtOptions = *m_pRenderData->GetSwPrtOptions(); + + SwPrintData const& rSwPrtOptions = + *m_pRenderData->GetSwPrtOptions(); if (bPrintProspect) pVwSh->PrintProspect( pOut, rSwPrtOptions, nRenderer ); else // normal printing and PDF export pVwSh->PrintOrPDFExport( pOut, rSwPrtOptions, nRenderer ); - + // --> FME 2004-10-08 #i35176# // // After printing the last page, we take care for the links coming @@ -4094,8 +4096,8 @@ SwViewOptionAdjust_Impl::~SwViewOptionAdjust_Impl() } -void SwViewOptionAdjust_Impl::AdjustViewOptions( - const SwPrtOptions *pPrtOptions ) +void +SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions) { // to avoid unnecessary reformatting the view options related to the content // below should only change if necessary, that is if respective content is present -- cgit v1.2.3 From d975d40b58c071f0b1c807ef6ca397743152d275 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 30 Sep 2010 19:02:32 +0200 Subject: sw34refactor1: #i112508#: sw: remove unused code (patch by cmc) --- sw/inc/editsh.hxx | 4 ---- sw/inc/pagepreviewlayout.hxx | 3 --- sw/inc/unotbl.hxx | 2 -- sw/source/core/doc/docbm.cxx | 4 ++-- sw/source/core/edit/editsh.cxx | 26 -------------------------- sw/source/core/edit/edtox.cxx | 19 ------------------- sw/source/core/inc/MarkManager.hxx | 4 ++-- sw/source/core/unocore/unotbl.cxx | 11 ----------- sw/source/core/view/pagepreviewlayout.cxx | 6 ------ sw/source/ui/inc/wrtsh.hxx | 3 --- sw/source/ui/wrtsh/wrtsh2.cxx | 11 ++--------- 11 files changed, 6 insertions(+), 87 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index b5c4a23922..2d7a87ef9b 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -201,7 +201,6 @@ public: // change text to Upper/Lower/Hiragana/Katagana/... void TransliterateText( sal_uInt32 nType ); - void TransliterateText( const String& rModuleName ); // count words in current selection void CountWords( SwDocStat& rStat ) const; @@ -416,9 +415,6 @@ public: const SwTOXType* GetTOXType(TOXTypes eTyp, USHORT nId) const; void InsertTOXType(const SwTOXType& rTyp); - // new field stuff - BOOL UpdateField(sw::mark::IFieldmark &fieldBM); - //AutoMark file const String& GetTOIAutoMarkURL() const; void SetTOIAutoMarkURL(const String& rSet); diff --git a/sw/inc/pagepreviewlayout.hxx b/sw/inc/pagepreviewlayout.hxx index 589e2850b1..01d83afae5 100644 --- a/sw/inc/pagepreviewlayout.hxx +++ b/sw/inc/pagepreviewlayout.hxx @@ -557,9 +557,6 @@ public: */ sal_uInt16 GetColOfPage( sal_uInt16 _nPageNum ) const; - // OD 18.12.2002 #103492# - Size GetMaxPageSize() const; - // OD 18.12.2002 #103492# Size GetPrevwDocSize() const; diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index ab6f6c60d7..d0b4f3043d 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -421,8 +421,6 @@ public: virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } - - static SwXTextTable* GetImplementation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xRef ); }; /* -----------------27.04.98 16:41------------------- diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 23ecd3feb5..4c3c50b014 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -305,7 +305,7 @@ namespace sw { namespace mark MarkManager::MarkManager(SwDoc& rDoc) : m_pDoc(&rDoc) { } - +#if OSL_DEBUG_LEVEL > 1 void MarkManager::dumpFieldmarks( ) const { const_iterator_t pIt = m_vFieldmarks.begin(); @@ -316,7 +316,7 @@ namespace sw { namespace mark ::rtl::OUStringToOString(str, RTL_TEXTENCODING_UTF8).getStr()); } } - +#endif ::sw::mark::IMark* MarkManager::makeMark(const SwPaM& rPaM, const ::rtl::OUString& rName, const IDocumentMarkAccess::MarkType eType) diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index e3ebcbcdf4..8ef9460b89 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -1184,32 +1184,6 @@ void SwEditShell::TransliterateText( sal_uInt32 nType ) EndAllAction(); } -void SwEditShell::TransliterateText( const String& rModuleName ) -{ - utl::TransliterationWrapper aTrans(::comphelper::getProcessServiceFactory(), 0 ); - aTrans.loadModuleByImplName( rModuleName, LANGUAGE_SYSTEM ); - StartAllAction(); - SET_CURR_SHELL( this ); - - SwPaM* pCrsr = GetCrsr(); - if( pCrsr->GetNext() != pCrsr ) - { - GetDoc()->StartUndo(UNDO_EMPTY, NULL); - FOREACHPAM_START( this ) - - if( PCURCRSR->HasMark() ) - GetDoc()->TransliterateText( *PCURCRSR, aTrans ); - - FOREACHPAM_END() - GetDoc()->EndUndo(UNDO_EMPTY, NULL); - } - else - GetDoc()->TransliterateText( *pCrsr, aTrans ); - - EndAllAction(); -} - - void SwEditShell::CountWords( SwDocStat& rStat ) const { FOREACHPAM_START( this ) diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index a2c5cfd363..a792e6f3f2 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -234,25 +234,6 @@ BOOL SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet ) return bRet; } -BOOL SwEditShell::UpdateField( sw::mark::IFieldmark &fieldBM) -{ -// SwDocShell* pDocSh = pDoc->GetDocShell(); - //@TODO implement me...; add undo etc... - if ( pDoc && fieldBM.IsExpanded( ) ) { - SwPosition aSttPos = fieldBM.GetMarkStart( ); - aSttPos.nContent++; - - SwPosition aEndPos = fieldBM.GetMarkEnd( ); - aEndPos.nContent--; - - SwPaM aPaM( aSttPos, aEndPos ); - pDoc->DeleteRange(aPaM); - pDoc->InsertString(aPaM, String::CreateFromAscii("Implement me ;-)") ); - } - return TRUE; -} - - /*-------------------------------------------------------------------- Beschreibung: Aktuelles Verzeichnis vor oder in dem der Cursor steht diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx index c663844a9c..c2abd94431 100644 --- a/sw/source/core/inc/MarkManager.hxx +++ b/sw/source/core/inc/MarkManager.hxx @@ -39,9 +39,9 @@ namespace sw { namespace mark { public: MarkManager(/*[in/out]*/ SwDoc& rDoc); - +#if OSL_DEBUG_LEVEL > 1 void dumpFieldmarks( ) const; - +#endif // IDocumentMarkAccess virtual ::sw::mark::IMark* makeMark(const SwPaM& rPaM, const ::rtl::OUString& rName, IDocumentMarkAccess::MarkType eMark); diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index a9658fc7bc..c173e0f41b 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -2285,17 +2285,6 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc) rDoc.SetAttr( aSet, *rTbl.GetFrmFmt() ); } } -/* -----------------------------11.07.00 12:14-------------------------------- - - ---------------------------------------------------------------------------*/ -SwXTextTable* SwXTextTable::GetImplementation(uno::Reference< XInterface> xRef ) -{ - uno::Reference xTunnel( xRef, uno::UNO_QUERY); - if(xTunnel.is()) - return reinterpret_cast< SwXTextTable * >( - sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething(SwXTextTable::getUnoTunnelId()) )); - return 0; -} /* -----------------------------10.03.00 18:02-------------------------------- ---------------------------------------------------------------------------*/ diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index 7b538316bf..2ad35fadaa 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -1450,12 +1450,6 @@ sal_uInt16 SwPagePreviewLayout::GetColOfPage( sal_uInt16 _nPageNum ) const return nCol; } -Size SwPagePreviewLayout::GetMaxPageSize() const -{ - ASSERT( PreviewLayoutValid(), "PagePreviewLayout not valid" ); - return maMaxPageSize; -} - Size SwPagePreviewLayout::GetPrevwDocSize() const { ASSERT( PreviewLayoutValid(), "PagePreviewLayout not valid" ); diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx index 14b26c0391..f7f423a440 100644 --- a/sw/source/ui/inc/wrtsh.hxx +++ b/sw/source/ui/inc/wrtsh.hxx @@ -320,9 +320,6 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)(); void InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0); BOOL UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0); - // new fields - BOOL UpdateField( sw::mark::IFieldmark &fieldBM); - // Numerierung und Bullets /** Turns on numbering or bullets. diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx index ac874a9791..1874426528 100644 --- a/sw/source/ui/wrtsh/wrtsh2.cxx +++ b/sw/source/ui/wrtsh/wrtsh2.cxx @@ -239,15 +239,8 @@ BOOL SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet) return bResult; } -BOOL SwWrtShell::UpdateField( sw::mark::IFieldmark &fieldBM ) -{ - return SwEditShell::UpdateField(fieldBM); -} - - - - // ein Klick aus das angegebene Feld. Der Cursor steht auf diesem. - // Fuehre die vor definierten Aktionen aus. +// handler for click on the field given as parameter. +// the cursor is positioned on the field. void SwWrtShell::ClickToField( const SwField& rFld ) -- cgit v1.2.3 From 8b26360996a5f937b9fe59c36498f6d86285f135 Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Thu, 30 Sep 2010 21:28:31 +0200 Subject: svarray: #i112395#: SvArray update --- sw/source/core/layout/layact.cxx | 2 +- sw/source/core/undo/untbl.cxx | 4 ++-- sw/source/filter/rtf/rtftbl.cxx | 47 +++++++++++++++++++++------------------ sw/source/filter/rtf/swparrtf.cxx | 1 - sw/source/filter/ww8/wrtww8.cxx | 2 +- sw/source/filter/xml/xmltbli.cxx | 6 ++--- 6 files changed, 32 insertions(+), 30 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index ffc647a0bf..3ef0580f00 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -2420,7 +2420,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) : #endif bVis = ((SwCrsrShell*)pSh)->GetCharRect().IsOver(pSh->VisArea()); } - aBools.Insert( bVis, aBools.Count() ); + aBools.push_back( bVis ); pSh = (ViewShell*)pSh->GetNext(); } while ( pSh != pImp->GetShell() ); diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index aaf0efd655..c6ae8d2463 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -1745,7 +1745,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd, ( nNodes != ( pSourceBox->GetSttNd()->EndOfSectionIndex() - pSourceBox->GetSttIdx() ) ) && ( nNodes - 1 > nLineDiff ); - aMvBoxes.Insert( bNodesMoved, nInsPos ); + aMvBoxes.insert( aMvBoxes.begin() + nInsPos, bNodesMoved ); } } } @@ -1805,7 +1805,7 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter ) } Ptrs.pDelSects->DeleteAndDestroy( 0, Ptrs.pDelSects->Count() ); } - else if( aMvBoxes.Count() ) + else if( !aMvBoxes.empty() ) { // dann muessen Nodes verschoben und nicht geloescht werden! // Dafuer brauchen wir aber ein temp Array diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx index ba05a84f44..902cc80b9c 100644 --- a/sw/source/filter/rtf/rtftbl.cxx +++ b/sw/source/filter/rtf/rtftbl.cxx @@ -165,10 +165,10 @@ void SwRTFParser::ReadTable( int nToken ) enum Limits {eMAXCELLS=64000}; - SvBools aMergeBackup; - int nCount = aMergeBoxes.Count(); - for (USHORT i = 0; i < nCount; ++i) - aMergeBackup.Insert(aMergeBoxes[i], i); + SvBools aMergeBackup(aMergeBoxes); + //size_t nCount = aMergeBoxes.size(); + //for (size_t i = 0; i < nCount; ++i) + // aMergeBackup.push_back( aMergeBoxes[i] ); // kein TROWD aber ein TabellenToken -> zwischen TROWD und Tab.Token // waren andere Zeichen (siehe Bug 27445.rtf) @@ -177,9 +177,9 @@ void SwRTFParser::ReadTable( int nToken ) if( RTF_TROWD == nToken ) nToken = GetNextToken(); // RTF_TROWD ueberlesen - // Flags fuer die gemergten Boxen loeschen - aMergeBoxes.Remove( 0, aMergeBoxes.Count() ); - aMergeBoxes.Insert( (BOOL)FALSE, USHORT(0) ); + // Flag for delete merged boxes + aMergeBoxes.clear(); + aMergeBoxes.push_back( (BOOL)FALSE ); nAktBox = 0; // wenn schon in einer Tabellen, dann splitte oder benutze @@ -223,7 +223,7 @@ void SwRTFParser::ReadTable( int nToken ) sal_Int16 eVerOrient = text::VertOrientation::NONE; long nLineHeight = 0; - USHORT nBoxCnt = aMergeBoxes.Count()-1; + size_t nBoxCnt = aMergeBoxes.size()-1; SwBoxFrmFmts aBoxFmts; SwTableBoxFmt* pBoxFmt = pDoc->MakeTableBoxFmt(); SvxFrameDirection eDir = FRMDIR_HORI_LEFT_TOP; @@ -292,7 +292,7 @@ void SwRTFParser::ReadTable( int nToken ) // the first cell cannot be merged with earlier ones. if (nBoxCnt != 0) { - aMergeBoxes[ nBoxCnt ] = TRUE; + aMergeBoxes.back() = TRUE; } break; @@ -300,7 +300,7 @@ void SwRTFParser::ReadTable( int nToken ) if (!bTrowdRead) { SwTableBoxFmt* pFmt = pBoxFmt; SwTwips nSize = nTokenValue - nTblSz; - if( aMergeBoxes[ nBoxCnt ] ) + if( aMergeBoxes.back() ) { // neue Zellen lesen und noch keine Formate vorhanden, // dann benutze das der vorhergebende @@ -336,7 +336,8 @@ void SwRTFParser::ReadTable( int nToken ) nSize = COL_DFLT_WIDTH; pFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nSize, 0 )); nTblSz = nTokenValue; - aMergeBoxes.Insert( (BOOL)FALSE, ++nBoxCnt ); + aMergeBoxes.push_back( (BOOL)FALSE ); + ++nBoxCnt; SvxBoxItem aBox(pFmt->GetBox()); @@ -483,7 +484,7 @@ void SwRTFParser::ReadTable( int nToken ) default: if( ( nToken & ~(0xff | RTF_TABLEDEF)) == RTF_SHADINGDEF ) { - if( aMergeBoxes[ nBoxCnt ] ) + if( aMergeBoxes.back() ) break; ReadBackgroundAttr( nToken, (SfxItemSet&)pBoxFmt->GetAttrSet(), TRUE ); @@ -491,7 +492,7 @@ void SwRTFParser::ReadTable( int nToken ) else if( ( nToken & ~(0xff | RTF_TABLEDEF) ) == RTF_BRDRDEF || IsBorderToken(nToken)) { - if( aMergeBoxes[ nBoxCnt ] ) + if( aMergeBoxes.back() ) break; SfxItemSet& rSet = (SfxItemSet&)pBoxFmt->GetAttrSet(); @@ -512,7 +513,7 @@ void SwRTFParser::ReadTable( int nToken ) if( text::VertOrientation::NONE != eVerOrient ) { - if( !aMergeBoxes[ nBoxCnt ] ) + if( !aMergeBoxes.back() ) pBoxFmt->SetFmtAttr( SwFmtVertOrient( 0, eVerOrient )); eVerOrient = text::VertOrientation::NONE; } @@ -523,13 +524,15 @@ void SwRTFParser::ReadTable( int nToken ) // das letzte temp. BoxFmt loeschen delete pBoxFmt; - // es wurde keine einzige Box erkannt + // It has been recognized as not single box if( nAktBox == nBoxCnt || ( bReadNewCell && !pTableNode )) { - int nC = aMergeBackup.Count(); - for (USHORT i = 0; i < nC; ++i) - aMergeBoxes.Insert(aMergeBackup[i], i); - SkipToken( -1 ); // zum Letzen gueltigen zurueck + //size_t nC = aMergeBackup.size(); + //aMergeBoxes.clear(); + //for (size_t i = 0; i < nC; ++i) + // aMergeBoxes.push_back( aMergeBackup[i] ); + aMergeBoxes = aMergeBackup; + SkipToken( -1 ); // go back to the last valid return; } @@ -885,8 +888,8 @@ void SwRTFParser::GotoNextBox() SwTableBoxes& rBoxes = pLine->GetTabBoxes(); SwTableBox* pBox = rBoxes[ rBoxes.Count()-1 ]; - if( ++nAktBox >= aMergeBoxes.Count() ) - nAktBox = aMergeBoxes.Count()-1; + if( ++nAktBox >= aMergeBoxes.size() ) + nAktBox = aMergeBoxes.size()-1; if( !aMergeBoxes[ nAktBox ] ) { @@ -906,7 +909,7 @@ void SwRTFParser::GotoNextBox() } } - if( bMove && nAktBox + 1 == aMergeBoxes.Count() ) + if( bMove && nAktBox + 1 == aMergeBoxes.size() ) // dann hinter die Tabelle pPam->Move( fnMoveForward, fnGoNode ); } diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index a94b878459..a27847ae65 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -188,7 +188,6 @@ SwRTFParser::SwRTFParser(SwDoc* pD, maCharStyleMapper(*pD), maSegments(*this), maInsertedTables(*pD), - aMergeBoxes(0, 5), aTblFmts(0, 10), mpBookmarkStart(0), mpRedlineStack(0), diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index f541d57b93..55123e288a 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1284,7 +1284,7 @@ void WW8_WrtBookmarks::Append( WW8_CP nStartCp, const String& rNm, const ::sw:: aSttCps.Insert(nStartCp, nPos); aEndCps.Insert(nStartCp, nPos); - aFieldMarks.Insert(BOOL(false), nPos); + aFieldMarks.insert(aFieldMarks.begin() + nPos, BOOL(false)); maSwBkmkNms.insert(aIter, rNm); } else diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index c3beb63cc0..ab5e1acb99 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -1539,14 +1539,14 @@ void SwXMLTableContext::InsertColumn( sal_Int32 nWidth2, sal_Bool bRelWidth2, else if( nWidth2 > USHRT_MAX ) nWidth2 = USHRT_MAX; aColumnWidths.Insert( (sal_uInt16)nWidth2, aColumnWidths.Count() ); - aColumnRelWidths.Insert( bRelWidth2, aColumnRelWidths.Count() ); + aColumnRelWidths.push_back( bRelWidth2 ); if( (pDfltCellStyleName && pDfltCellStyleName->getLength() > 0) || pColumnDefaultCellStyleNames ) { if( !pColumnDefaultCellStyleNames ) { pColumnDefaultCellStyleNames = new SvStringsDtor; - sal_uInt16 nCount = aColumnRelWidths.Count() - 1; + size_t nCount = aColumnRelWidths.size() - 1; while( nCount-- ) pColumnDefaultCellStyleNames->Insert( new String, pColumnDefaultCellStyleNames->Count() ); @@ -1649,7 +1649,7 @@ void SwXMLTableContext::InsertCell( const OUString& rStyleName, for( i=GetColumnCount(); iCount(); i++ ) -- cgit v1.2.3 From a2dfde62f36d996bc69f5c972aa5a08cac99fe7a Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Thu, 30 Sep 2010 21:54:31 +0200 Subject: svarray: #i112395#: change SvBools from vector to deque --- sw/source/filter/rtf/rtftbl.cxx | 7 ------- 1 file changed, 7 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx index 902cc80b9c..a4c564048c 100644 --- a/sw/source/filter/rtf/rtftbl.cxx +++ b/sw/source/filter/rtf/rtftbl.cxx @@ -166,9 +166,6 @@ void SwRTFParser::ReadTable( int nToken ) enum Limits {eMAXCELLS=64000}; SvBools aMergeBackup(aMergeBoxes); - //size_t nCount = aMergeBoxes.size(); - //for (size_t i = 0; i < nCount; ++i) - // aMergeBackup.push_back( aMergeBoxes[i] ); // kein TROWD aber ein TabellenToken -> zwischen TROWD und Tab.Token // waren andere Zeichen (siehe Bug 27445.rtf) @@ -527,10 +524,6 @@ void SwRTFParser::ReadTable( int nToken ) // It has been recognized as not single box if( nAktBox == nBoxCnt || ( bReadNewCell && !pTableNode )) { - //size_t nC = aMergeBackup.size(); - //aMergeBoxes.clear(); - //for (size_t i = 0; i < nC; ++i) - // aMergeBoxes.push_back( aMergeBackup[i] ); aMergeBoxes = aMergeBackup; SkipToken( -1 ); // go back to the last valid return; -- cgit v1.2.3 From 231f183893bb777f1748690f33712b2e0fe9894f Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Fri, 1 Oct 2010 15:13:01 +0200 Subject: sw33bf11: #i114875# - method - consider brochure print correctly in fix for issue i114210 --- sw/source/ui/uno/unotxdoc.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 0ea6f0fc6b..46bb39c8a3 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2858,7 +2858,11 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( { // --> TL, OD 2010-09-07 #i114210# // determine the correct page number from the renderer index - const USHORT nPage = m_pRenderData->GetPagesToPrint()[ nRenderer ]; + // --> OD 2010-10-01 #i114875 + // consider brochure print + const USHORT nPage = bPrintProspect + ? nRenderer + 1 + : m_pRenderData->GetPagesToPrint()[ nRenderer ]; // <-- // get paper tray to use ... -- cgit v1.2.3 From 67bc17ab3a3cd3837d7553454e47a9ce797f2bda Mon Sep 17 00:00:00 2001 From: os Date: Mon, 4 Oct 2010 12:00:23 +0200 Subject: #i114819# NearestBookmark(): prevent duplicated exports at the same position --- sw/source/filter/ww8/wrtw8nds.cxx | 33 +++++++++++++++++++++------------ sw/source/filter/ww8/wrtww8.hxx | 2 +- 2 files changed, 22 insertions(+), 13 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 6f1c4adc28..5370c54af8 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1654,7 +1654,7 @@ xub_StrLen MSWordExportBase::GetNextPos( SwAttrIter* aAttrIter, const SwTxtNode& GetSortedBookmarks( rNode, nAktPos, nNextPos - nAktPos ); xub_StrLen nNextBookmark = nNextPos; - NearestBookmark( nNextPos ); + NearestBookmark( nNextPos, nAktPos, false ); return std::min( nNextPos, nNextBookmark ); } @@ -1663,8 +1663,9 @@ void MSWordExportBase::UpdatePosition( SwAttrIter* aAttrIter, xub_StrLen nAktPos { xub_StrLen nNextPos; - // either no bookmark, or it is not at the current position - if ( !NearestBookmark( nNextPos ) || nNextPos > nAktPos ) + // go to next attribute if no bookmark is found of if the bookmark is behind the next attribute position + bool bNextBookmark = NearestBookmark( nNextPos, nAktPos, true ); + if( !bNextBookmark || nNextPos < aAttrIter->WhereNext() ) aAttrIter->NextPos(); } @@ -1709,25 +1710,33 @@ public: } }; -bool MSWordExportBase::NearestBookmark( xub_StrLen& rNearest ) +bool MSWordExportBase::NearestBookmark( xub_StrLen& rNearest, const xub_StrLen nAktPos, bool bNextPositionOnly ) { bool bHasBookmark = false; if ( m_rSortedMarksStart.size( ) > 0 ) { IMark* pMarkStart = m_rSortedMarksStart.front(); - rNearest = pMarkStart->GetMarkStart().nContent.GetIndex(); - bHasBookmark = true; + xub_StrLen nNext = pMarkStart->GetMarkStart().nContent.GetIndex(); + if( !bNextPositionOnly || (nNext > nAktPos )) + { + rNearest = nNext; + bHasBookmark = true; + } } if ( m_rSortedMarksEnd.size( ) > 0 ) { IMark* pMarkEnd = m_rSortedMarksEnd[0]; - if ( !bHasBookmark ) - rNearest = pMarkEnd->GetMarkEnd().nContent.GetIndex(); - else - rNearest = std::min( rNearest, pMarkEnd->GetMarkEnd().nContent.GetIndex() ); - bHasBookmark = true; + xub_StrLen nNext = pMarkEnd->GetMarkEnd().nContent.GetIndex(); + if( !bNextPositionOnly || nNext > nAktPos ) + { + if ( !bHasBookmark ) + rNearest = nNext; + else + rNearest = std::min( rNearest, nNext ); + bHasBookmark = true; + } } return bHasBookmark; @@ -1752,7 +1761,7 @@ void MSWordExportBase::GetSortedBookmarks( const SwTxtNode& rNode, xub_StrLen nA if ( nStart > nAktPos ) aSortedStart.push_back( pMark ); - if ( nEnd > nAktPos ) + if ( nEnd > nAktPos && nEnd <= ( nAktPos + nLen ) ) aSortedEnd.push_back( pMark ); } diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index c4d594f80e..1dc6d265ed 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -801,7 +801,7 @@ protected: /// Find the nearest bookmark from the current position. /// /// Returns false when there is no bookmark. - bool NearestBookmark( xub_StrLen& rNearest ); + bool NearestBookmark( xub_StrLen& rNearest, const xub_StrLen nAktPos, bool bNextPositionOnly ); void GetSortedBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, xub_StrLen nLen ); -- cgit v1.2.3 From 1092b66e3d8dc1e89444e0b1a4ad731486e60197 Mon Sep 17 00:00:00 2001 From: os Date: Mon, 4 Oct 2010 13:19:22 +0200 Subject: fixed warnings --- sw/source/filter/ww8/rtfsdrexport.hxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx b/sw/source/filter/ww8/rtfsdrexport.hxx index 7ff0fe3dcd..775e348eef 100644 --- a/sw/source/filter/ww8/rtfsdrexport.hxx +++ b/sw/source/filter/ww8/rtfsdrexport.hxx @@ -79,11 +79,13 @@ protected: /// Start the shape for which we just collected the information. /// /// Returns the element's tag number, -1 means we wrote nothing. + using EscherEx::StartShape; virtual sal_Int32 StartShape(); /// End the shape. /// /// The parameter is just what we got from StartShape(). + using EscherEx::EndShape; virtual void EndShape( sal_Int32 nShapeElement ); virtual void Commit( EscherPropertyContainer& rProps, const Rectangle& rRect ); @@ -93,6 +95,7 @@ private: virtual void OpenContainer( UINT16 nEscherContainer, int nRecInstance = 0 ); virtual void CloseContainer(); + using EscherEx::EnterGroup; virtual UINT32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 ); virtual void LeaveGroup(); -- cgit v1.2.3 From 682fec61bbc3a26b2bf376598a86456930381244 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 4 Oct 2010 17:01:57 +0200 Subject: sw34bf01: #i103634# #i112425#: set clipboard flag for temp PDF export docs --- sw/source/ui/uno/unotxvw.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 8ba286f926..4422ec87d4 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -910,7 +910,10 @@ SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ SwDocShell* pDocSh; SfxObjectShellRef xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) ); xDocSh->DoInitNew( 0 ); - rOldSh.FillPrtDoc(pDocSh->GetDoc(), pPrt); + SwDoc *const pTempDoc( pDocSh->GetDoc() ); + // #i103634#, #i112425#: do not expand numbering and fields on PDF export + pTempDoc->SetClipBoard(true); + rOldSh.FillPrtDoc(pTempDoc, pPrt); SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); SwView* pDocView = (SwView*) pDocFrame->GetViewShell(); pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//Damit SelectShell gerufen wird. -- cgit v1.2.3 From 8d9fd6a2f50dd448dff0a55810470d7368c5a1d6 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 4 Oct 2010 17:14:34 +0200 Subject: sw34bf01: #i85766# #i112425#: prevent expansion of fields in temp documents: SwField subclasses: make Expand()/Copy() methods private, like in SwField. SwField+subclasses: replace method GetCntnt(BOOL) with GetFieldName(). SwTblField: refactor Expand() and GetCntnt(BOOL): create new private method. --- sw/inc/authfld.hxx | 10 ++-- sw/inc/chpfld.hxx | 13 ++--- sw/inc/dbfld.hxx | 18 +++---- sw/inc/ddefld.hxx | 13 ++--- sw/inc/docufld.hxx | 27 +++++----- sw/inc/expfld.hxx | 41 +++++++++------ sw/inc/fldbas.hxx | 15 ++---- sw/inc/flddat.hxx | 12 ++--- sw/inc/flddropdown.hxx | 43 +++++++--------- sw/inc/inetfld.hxx | 13 ++--- sw/inc/reffld.hxx | 13 ++--- sw/inc/usrfld.hxx | 13 ++--- sw/source/core/doc/doc.cxx | 2 +- sw/source/core/fields/dbfld.cxx | 47 ++++++----------- sw/source/core/fields/docufld.cxx | 65 +++++++++++------------ sw/source/core/fields/expfld.cxx | 78 ++++++++++++---------------- sw/source/core/fields/fldbas.cxx | 29 ++++------- sw/source/core/fields/macrofld.cxx | 19 +++---- sw/source/core/fields/reffld.cxx | 11 +--- sw/source/core/fields/tblcalc.cxx | 48 ++++++++--------- sw/source/core/fields/usrfld.cxx | 21 ++++---- sw/source/core/inc/txmsrt.hxx | 22 ++++---- sw/source/core/text/itratr.cxx | 7 ++- sw/source/core/text/txtfld.cxx | 83 ++++++++++++++++++++++++------ sw/source/core/tox/txmsrt.cxx | 25 +++++---- sw/source/core/unocore/unofield.cxx | 15 +++--- sw/source/filter/ww8/wrtw8esh.cxx | 3 +- sw/source/filter/ww8/ww8atr.cxx | 6 +-- sw/source/ui/docvw/edtwin2.cxx | 2 +- sw/source/ui/fldui/DropDownFieldDialog.cxx | 12 +---- sw/source/ui/fldui/inpdlg.cxx | 14 ++--- 31 files changed, 366 insertions(+), 374 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx index de3a149e15..72c6f2fd2a 100644 --- a/sw/inc/authfld.hxx +++ b/sw/inc/authfld.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _AUTHFLD_HXX -#define _AUTHFLD_HXX +#ifndef SW_AUTHFLD_HXX +#define SW_AUTHFLD_HXX #include "swdllapi.h" #include @@ -166,6 +166,10 @@ class SwAuthorityField : public SwField { long m_nHandle; mutable long m_nTempSequencePos; + + virtual String Expand() const; + virtual SwField* Copy() const; + public: SwAuthorityField(SwAuthorityFieldType* pType, const String& rFieldContents); SwAuthorityField(SwAuthorityFieldType* pType, long nHandle); @@ -173,8 +177,6 @@ public: const String& GetFieldText(ToxAuthorityField eField) const; - virtual String Expand() const; - virtual SwField* Copy() const; virtual void SetPar1(const String& rStr); virtual SwFieldType* ChgTyp( SwFieldType* ); diff --git a/sw/inc/chpfld.hxx b/sw/inc/chpfld.hxx index 8c9784e147..ece9fa7e3c 100644 --- a/sw/inc/chpfld.hxx +++ b/sw/inc/chpfld.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _CHPFLD_HXX -#define _CHPFLD_HXX +#ifndef SW_CHPFLD_HXX +#define SW_CHPFLD_HXX #include "fldbas.hxx" @@ -69,6 +69,10 @@ class SW_DLLPUBLIC SwChapterField : public SwField friend class SwChapterFieldType; BYTE nLevel; String sTitle, sNumber, sPre, sPost; + + virtual String Expand() const; + virtual SwField* Copy() const; + public: SwChapterField(SwChapterFieldType*, sal_uInt32 nFmt = 0); @@ -82,9 +86,6 @@ public: // <-- void ChangeExpansion(const SwTxtNode &rNd, BOOL bSrchNum); - virtual String Expand() const; - virtual SwField* Copy() const; - inline BYTE GetLevel() const; inline void SetLevel(BYTE); @@ -99,4 +100,4 @@ inline void SwChapterField::SetLevel(BYTE nLev) { nLevel = nLev; } inline const String& SwChapterField::GetNumber() const { return sNumber; } inline const String& SwChapterField::GetTitle() const { return sTitle; } -#endif // _CHPFLD_HXX +#endif // SW_CHPFLD_HXX diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx index ae287f7954..167ecda8af 100644 --- a/sw/inc/dbfld.hxx +++ b/sw/inc/dbfld.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _DBFLD_HXX -#define _DBFLD_HXX +#ifndef SW_DBFLD_HXX +#define SW_DBFLD_HXX #include "swdllapi.h" #include "fldbas.hxx" @@ -79,6 +79,9 @@ class SW_DLLPUBLIC SwDBField : public SwValueField BOOL bValidValue : 1; BOOL bInitialized : 1; + virtual String Expand() const; + virtual SwField* Copy() const; + public: SwDBField(SwDBFieldType*, ULONG nFmt = 0); virtual ~SwDBField(); @@ -87,14 +90,11 @@ public: // Der aktuelle Text inline void SetExpansion(const String& rStr); - virtual String Expand() const; - virtual SwField* Copy() const; virtual USHORT GetSubType() const; virtual void SetSubType(USHORT nType); - // Name oder Inhalt - virtual String GetCntnt(BOOL bName = FALSE) const; + virtual String GetFieldName() const; // fuer Berechnungen in Ausdruecken void ChgValue( double d, BOOL bVal ); @@ -157,8 +157,8 @@ public: SwDBData GetDBData(SwDoc* pDoc); void SetDBData(const SwDBData& rDBData); // #111840# - // Name oder Inhalt - virtual String GetCntnt(BOOL bName = FALSE) const; + virtual String GetFieldName() const; + virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const; virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich ); virtual USHORT GetSubType() const; @@ -335,4 +335,4 @@ inline void SwDBSetNumberField::SetSetNumber(long nNum) { nNumber = nNum; } -#endif // _DBFLD_HXX +#endif // SW_DBFLD_HXX diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx index 52a9af6285..91647ea9b2 100644 --- a/sw/inc/ddefld.hxx +++ b/sw/inc/ddefld.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _DDEFLD_HXX -#define _DDEFLD_HXX +#ifndef SW_DDEFLD_HXX +#define SW_DDEFLD_HXX #include #include "swdllapi.h" @@ -97,13 +97,14 @@ public: class SwDDEField : public SwField { +private: + virtual String Expand() const; + virtual SwField* Copy() const; + public: SwDDEField(SwDDEFieldType*); ~SwDDEField(); - virtual String Expand() const; - virtual SwField* Copy() const; - // ueber Typen Parameter ermitteln // Name kann nicht geaendert werden virtual const String& GetPar1() const; @@ -114,4 +115,4 @@ public: }; -#endif // _DDEFLD_HXX +#endif // SW_DDEFLD_HXX diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx index 4b3986243e..f9f41b964b 100644 --- a/sw/inc/docufld.hxx +++ b/sw/inc/docufld.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _DOCUFLD_HXX -#define _DOCUFLD_HXX +#ifndef SW_DOCUFLD_HXX +#define SW_DOCUFLD_HXX #include @@ -363,6 +363,9 @@ class SwHiddenTxtField : public SwField BOOL bIsHidden : 1; // ist es nicht sichtbar? BOOL bValid : 1; // DB-Feld evaluiert? + virtual String Expand() const; + virtual SwField* Copy() const; + public: SwHiddenTxtField( SwHiddenTxtFieldType*, BOOL bConditional, @@ -377,9 +380,7 @@ public: const String& rFalse, USHORT nSubType = TYP_HIDDENTXTFLD); - virtual String GetCntnt(BOOL bName = FALSE) const; - virtual String Expand() const; - virtual SwField* Copy() const; + virtual String GetFieldName() const; void Evaluate(SwDoc*); @@ -463,6 +464,9 @@ class SW_DLLPUBLIC SwMacroField : public SwField String aText; BOOL bIsScriptURL; + virtual String Expand() const; + virtual SwField* Copy() const; + public: // Direkte Eingabe alten Wert loeschen SwMacroField( SwMacroFieldType*, const String& rLibAndName, @@ -473,9 +477,7 @@ public: String GetMacroName() const; SvxMacro GetSvxMacro() const; - virtual String GetCntnt(BOOL bName = FALSE) const; - virtual String Expand() const; - virtual SwField* Copy() const; + virtual String GetFieldName() const; // Library und FileName virtual const String& GetPar1() const; @@ -571,6 +573,9 @@ class SW_DLLPUBLIC SwDocInfoField : public SwValueField String aContent; String aName; + virtual String Expand() const; + virtual SwField* Copy() const; + public: SwDocInfoField(SwDocInfoFieldType*, USHORT nSub, const String& rName, sal_uInt32 nFmt=0); SwDocInfoField(SwDocInfoFieldType*, USHORT nSub, const String& rName, const String& rValue, sal_uInt32 nFmt=0); @@ -578,9 +583,7 @@ public: virtual void SetSubType(USHORT); virtual USHORT GetSubType() const; virtual void SetLanguage(USHORT nLng); - virtual String Expand() const; - virtual String GetCntnt(BOOL bName = FALSE) const; - virtual SwField* Copy() const; + virtual String GetFieldName() const; String GetName() const { return aName; } void SetName( const String& rName ) { aName = rName; } inline void SetExpansion(const String& rStr) { aContent = rStr; } @@ -833,4 +836,4 @@ public: }; -#endif // _DOCUFLD_HXX +#endif // SW_DOCUFLD_HXX diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx index 46fd26cf77..7e6ca81322 100644 --- a/sw/inc/expfld.hxx +++ b/sw/inc/expfld.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _EXPFLD_HXX -#define _EXPFLD_HXX +#ifndef SW_EXPFLD_HXX +#define SW_EXPFLD_HXX #include #include "swdllapi.h" @@ -98,6 +98,9 @@ class SW_DLLPUBLIC SwGetExpField : public SwFormulaField bool bLateInitialization; // #i82544# + virtual String Expand() const; + virtual SwField* Copy() const; + public: SwGetExpField( SwGetExpFieldType*, const String& rFormel, USHORT nSubType = nsSwGetSetExpType::GSE_EXPR, ULONG nFmt = 0); @@ -105,9 +108,6 @@ public: virtual void SetValue( const double& rVal ); virtual void SetLanguage(USHORT nLng); - virtual String Expand() const; - virtual SwField* Copy() const; - inline const String& GetExpStr() const; inline void ChgExpStr(const String& rExpand); @@ -119,7 +119,7 @@ public: // (wird nur von der Formatierung aufgerufen!!) void ChangeExpansion( const SwFrm&, const SwTxtFld& ); - virtual String GetCntnt(BOOL bName = FALSE) const; + virtual String GetFieldName() const; // Die Formel aendern virtual String GetPar2() const; @@ -234,14 +234,14 @@ class SW_DLLPUBLIC SwSetExpField : public SwFormulaField USHORT nSeqNo; USHORT nSubType; + virtual String Expand() const; + virtual SwField* Copy() const; + public: SwSetExpField(SwSetExpFieldType*, const String& rFormel, ULONG nFmt = 0); virtual void SetValue( const double& rVal ); - virtual String Expand() const; - virtual SwField* Copy() const; - inline const String& GetExpStr() const; inline void ChgExpStr( const String& rExpand ); @@ -252,7 +252,8 @@ public: inline void SetInputFlag(BOOL bInp); inline BOOL GetInputFlag() const; - virtual String GetCntnt(BOOL bName = FALSE) const; + virtual String GetFieldName() const; + virtual USHORT GetSubType() const; virtual void SetSubType(USHORT nType); @@ -319,15 +320,17 @@ class SW_DLLPUBLIC SwInputField : public SwField String aHelp; String aToolTip; USHORT nSubType; + + virtual String Expand() const; + virtual SwField* Copy() const; + public: // Direkte Eingabe ueber Dialog alten Wert loeschen SwInputField(SwInputFieldType*, const String& rContent , const String& rPrompt, USHORT nSubType = 0, ULONG nFmt = 0); - virtual String GetCntnt(BOOL bName = FALSE) const; - virtual String Expand() const; - virtual SwField* Copy() const; + virtual String GetFieldName() const; // Content virtual const String& GetPar1() const; @@ -405,9 +408,14 @@ class SwTblField : public SwValueField, public SwTableFormula String sExpand; USHORT nSubType; + virtual String Expand() const; + virtual SwField* Copy() const; + // suche den TextNode, in dem das Feld steht virtual const SwNode* GetNodeOfFormula() const; + String GetCommand(); + public: SwTblField( SwTblFieldType*, const String& rFormel, USHORT nSubType = 0, ULONG nFmt = 0); @@ -415,8 +423,6 @@ public: virtual void SetValue( const double& rVal ); virtual USHORT GetSubType() const; virtual void SetSubType(USHORT nType); - virtual String Expand() const; - virtual SwField* Copy() const; const String& GetExpStr() const { return sExpand; } void ChgExpStr(const String& rStr) { sExpand = rStr; } @@ -424,7 +430,8 @@ public: // berechne sich selbst void CalcField( SwTblCalcPara& rCalcPara ); - virtual String GetCntnt(BOOL bName = FALSE) const; + virtual String GetFieldName() const; + // Die Formel virtual String GetPar2() const; virtual void SetPar2(const String& rStr); @@ -433,4 +440,4 @@ public: }; -#endif // _EXPFLD_HXX +#endif // SW_EXPFLD_HXX diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index 500a4f1b80..d9cf51ee26 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -24,10 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _FLDBAS_HXX -#define _FLDBAS_HXX - -#ifndef FIELDIDS_ONLY // SWG-Testreader!! +#ifndef SW_FLDBAS_HXX +#define SW_FLDBAS_HXX #include #include @@ -40,7 +38,6 @@ class SwDoc; class SvStringsDtor; class SvNumberFormatter; -#endif // FIELDIDS_ONLY /*-------------------------------------------------------------------- Beschreibung: die ID's fuer die Feldtypen @@ -236,8 +233,6 @@ enum SwDateTimeSubType TIMEFLD = 4 }; -#ifndef FIELDIDS_ONLY // SWG-Testreader!! - extern USHORT __FAR_DATA aTypeTab[]; @@ -336,8 +331,7 @@ public: */ String ExpandField(bool const bInClipboard) const; - // liefert den Namen oder den Inhalt - virtual String GetCntnt(BOOL bName = FALSE) const; + virtual String GetFieldName() const; SwField * CopyField() const; @@ -461,5 +455,4 @@ public: String GetExpandedFormula() const; }; -#endif // FIELDIDS_ONLY -#endif // _FLDBAS_HXX +#endif // SW_FLDBAS_HXX diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx index 6bc30d8c2d..0212821eaf 100644 --- a/sw/inc/flddat.hxx +++ b/sw/inc/flddat.hxx @@ -25,8 +25,8 @@ * ************************************************************************/ -#ifndef _FLDDAT_HXX -#define _FLDDAT_HXX +#ifndef SW_FLDDAT_HXX +#define SW_FLDDAT_HXX #include @@ -115,6 +115,9 @@ class SW_DLLPUBLIC SwDateTimeField : public SwValueField USHORT nSubType; long nOffset; // Offset in Minuten + virtual String Expand() const; + virtual SwField* Copy() const; + public: SwDateTimeField(SwDateTimeFieldType* pType, USHORT nSubType = DATEFLD, ULONG nFmt = 0, USHORT nLng = 0); @@ -138,11 +141,8 @@ public: void SetDateTime(const DateTime& rDT); static double GetDateTime(SwDoc* pDoc, const DateTime& rDT); - virtual String Expand() const; - virtual SwField* Copy() const; - virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nMId ) const; virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nMId ); }; -#endif // _FLDDAT_HXX +#endif // SW_FLDDAT_HXX diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx index 4a7bcf0d8a..9a6d8076f6 100644 --- a/sw/inc/flddropdown.hxx +++ b/sw/inc/flddropdown.hxx @@ -24,19 +24,14 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _FLDDROPDOWN_HXX -#define _FLDDROPDOWN_HXX +#ifndef SW_FLDDROPDOWN_HXX +#define SW_FLDDROPDOWN_HXX -#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX #include "com/sun/star/uno/Sequence.hxx" -#endif #include "swdllapi.h" #include "fldbas.hxx" -#ifndef INCLUDED_VECTOR #include -#define INCLUDED_VECTOR -#endif /** Field type for dropdown boxes. @@ -95,6 +90,23 @@ class SW_DLLPUBLIC SwDropDownField : public SwField */ String aToolTip; + /** + Expands the field. + + The expanded value of the field is the value of the selected + item. If no item is selected, an empty string is returned. + + @return the expanded value of the field + */ + virtual String Expand() const; + + /** + Creates a copy of this field. + + @return the copy of this field + */ + virtual SwField * Copy() const; + public: /** Constructor @@ -115,23 +127,6 @@ public: */ virtual ~SwDropDownField(); - /** - Expands the field. - - The expanded value of the field is the value of the selected - item. If no item is selected, an empty string is returned. - - @return the expanded value of the field - */ - virtual String Expand() const; - - /** - Creates a copy of this field. - - @return the copy of this field - */ - virtual SwField * Copy() const; - /** Returns the selected value. diff --git a/sw/inc/inetfld.hxx b/sw/inc/inetfld.hxx index cca9ce5466..3c647fb28a 100644 --- a/sw/inc/inetfld.hxx +++ b/sw/inc/inetfld.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _INETFLD_HXX -#define _INETFLD_HXX +#ifndef SW_INETFLD_HXX +#define SW_INETFLD_HXX #include "fldbas.hxx" @@ -69,15 +69,16 @@ class SwINetField : public SwField String sText; SvxMacroTableDtor* pMacroTbl; + virtual String Expand() const; + virtual SwField* Copy() const; + public: // Direkte Eingabe alten Wert loeschen SwINetField( SwINetFieldType* pTyp, USHORT nFmt, const String& rURL, const String& rText ); virtual ~SwINetField(); - virtual String GetCntnt(BOOL bName = FALSE) const; - virtual String Expand() const; - virtual SwField* Copy() const; + virtual String GetFieldName() const; // URL virtual const String& GetPar1() const; @@ -105,5 +106,5 @@ public: }; -#endif // _INETFLD_HXX +#endif // SW_INETFLD_HXX diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx index 581933917e..7bae45868b 100644 --- a/sw/inc/reffld.hxx +++ b/sw/inc/reffld.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _REFFLD_HXX -#define _REFFLD_HXX +#ifndef SW_REFFLD_HXX +#define SW_REFFLD_HXX #include @@ -99,6 +99,9 @@ private: USHORT nSubType; USHORT nSeqNo; + virtual String Expand() const; + virtual SwField* Copy() const; + // --> OD 2007-08-24 #i81002# String MakeRefNumStr( const SwTxtNode& rTxtNodeOfField, const SwTxtNode& rTxtNodeOfReferencedItem, @@ -110,9 +113,7 @@ public: virtual ~SwGetRefField(); - virtual String GetCntnt(BOOL bName = FALSE) const; - virtual String Expand() const; - virtual SwField* Copy() const; + virtual String GetFieldName() const; const String& GetSetRefName() const { return sSetRefName; } @@ -158,5 +159,5 @@ public: }; -#endif // _REFFLD_HXX +#endif // SW_REFFLD_HXX diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx index 0af250bf61..e4e4f90485 100644 --- a/sw/inc/usrfld.hxx +++ b/sw/inc/usrfld.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _USRFLD_HXX -#define _USRFLD_HXX +#ifndef SW_USRFLD_HXX +#define SW_USRFLD_HXX #include "swdllapi.h" #include "fldbas.hxx" @@ -106,6 +106,9 @@ class SW_DLLPUBLIC SwUserField : public SwValueField { USHORT nSubType; + virtual String Expand() const; + virtual SwField* Copy() const; + public: SwUserField(SwUserFieldType*, USHORT nSub = 0, sal_uInt32 nFmt = 0); @@ -115,9 +118,7 @@ public: virtual double GetValue() const; virtual void SetValue( const double& rVal ); - virtual String Expand() const; - virtual SwField* Copy() const; - virtual String GetCntnt(BOOL bName = FALSE) const; + virtual String GetFieldName() const; // Name kann nicht geaendert werden virtual const String& GetPar1() const; @@ -129,4 +130,4 @@ public: virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId ); }; -#endif // _USRFLD_HXX +#endif // SW_USRFLD_HXX diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index d25e4bd169..c789e6d2df 100755 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -2442,7 +2442,7 @@ BOOL SwDoc::ConvertFieldsToText() nWhich != RES_REFPAGEGETFLD&& nWhich != RES_REFPAGESETFLD)) { - String sText = pField->GetCntnt(); + String sText = pField->ExpandField( this->IsClipBoard() ); //database fields should not convert their command into text if( RES_DBFLD == pCurType->Which() && !static_cast(pField)->IsInitialized()) sText.Erase(); diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx index 92ad0ed940..20760cc751 100644 --- a/sw/source/core/fields/dbfld.cxx +++ b/sw/source/core/fields/dbfld.cxx @@ -28,7 +28,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include #include @@ -44,15 +43,11 @@ #include #include #include -#ifndef _DBMGR_HXX #include -#endif #include #include #include -#ifndef _UNOFLDMID_H #include -#endif using namespace ::com::sun::star::sdbc; @@ -281,27 +276,23 @@ SwField* SwDBField::Copy() const return pTmp; } -String SwDBField::GetCntnt(BOOL bName) const +String SwDBField::GetFieldName() const { - if(bName) - { - const String& rDBName = ((SwDBFieldType*)GetTyp())->GetName(); + const String& rDBName = static_cast(GetTyp())->GetName(); //TODO/CLEANUP //Funktion tut nichts! //String sContent( SFX_APP()->LocalizeDBName(INI2NATIONAL, // rDBName.GetToken(0, DB_DELIM))); - String sContent( rDBName.GetToken(0, DB_DELIM) ); + String sContent( rDBName.GetToken(0, DB_DELIM) ); - if (sContent.Len() > 1) - { - sContent += DB_DELIM; - sContent += rDBName.GetToken(1, DB_DELIM); - sContent += DB_DELIM; - sContent += rDBName.GetToken(2, DB_DELIM); - } - return lcl_DBTrennConv(sContent); + if (sContent.Len() > 1) + { + sContent += DB_DELIM; + sContent += rDBName.GetToken(1, DB_DELIM); + sContent += DB_DELIM; + sContent += rDBName.GetToken(2, DB_DELIM); } - return Expand(); + return lcl_DBTrennConv(sContent); } //------------------------------------------------------------------------------ @@ -547,19 +538,15 @@ void SwDBNameInfField::SetDBData(const SwDBData & rDBData) //------------------------------------------------------------------------------ -String SwDBNameInfField::GetCntnt(BOOL bName) const +String SwDBNameInfField::GetFieldName() const { - String sStr(SwField::GetCntnt(bName)); - - if(bName) + String sStr( SwField::GetFieldName() ); + if (aDBData.sDataSource.getLength()) { - if (aDBData.sDataSource.getLength()) - { - sStr += ':'; - sStr += String(aDBData.sDataSource); - sStr += DB_DELIM; - sStr += String(aDBData.sCommand); - } + sStr += ':'; + sStr += String(aDBData.sDataSource); + sStr += DB_DELIM; + sStr += String(aDBData.sCommand); } return lcl_DBTrennConv(sStr); } diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 66245b33b3..3869b10c2c 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -1198,30 +1198,30 @@ String SwDocInfoField::Expand() const /* --------------------------------------------------------------------------- ---------------------------------------------------------------------------*/ -String SwDocInfoField::GetCntnt(sal_Bool bName) const +String SwDocInfoField::GetFieldName() const { - if ( bName ) - { - String aStr(SwFieldType::GetTypeStr(GetTypeId())); - aStr += ':'; + String aStr(SwFieldType::GetTypeStr(GetTypeId())); + aStr += ':'; - sal_uInt16 nSub = nSubType & 0xff; + sal_uInt16 const nSub = nSubType & 0xff; - switch(nSub) - { - case DI_CUSTOM: - aStr += aName; - break; + switch (nSub) + { + case DI_CUSTOM: + aStr += aName; + break; - default: - aStr += *ViewShell::GetShellRes()->aDocInfoLst[ nSub - DI_SUBTYPE_BEGIN ]; - break; - } - if( IsFixed() ) - ( aStr += ' ' ) += ViewShell::GetShellRes()->aFixedStr; - return aStr; + default: + aStr += *ViewShell::GetShellRes() + ->aDocInfoLst[ nSub - DI_SUBTYPE_BEGIN ]; + break; } - return Expand(); + if (IsFixed()) + { + aStr += ' '; + aStr += ViewShell::GetShellRes()->aFixedStr; + } + return aStr; } /* --------------------------------------------------------------------------- @@ -1517,25 +1517,20 @@ void SwHiddenTxtField::Evaluate(SwDoc* pDoc) /* --------------------------------------------------------------------------- ---------------------------------------------------------------------------*/ -String SwHiddenTxtField::GetCntnt(sal_Bool bName) const +String SwHiddenTxtField::GetFieldName() const { - if ( bName ) - { - String aStr(SwFieldType::GetTypeStr(nSubType)); - aStr += ' '; - aStr += aCond; - aStr += ' '; - aStr += aTRUETxt; + String aStr(SwFieldType::GetTypeStr(nSubType)); + aStr += ' '; + aStr += aCond; + aStr += ' '; + aStr += aTRUETxt; - if(nSubType == TYP_CONDTXTFLD) - { -static char __READONLY_DATA cTmp[] = " : "; - aStr.AppendAscii(cTmp); - aStr += aFALSETxt; - } - return aStr; + if (nSubType == TYP_CONDTXTFLD) + { + aStr.AppendAscii(" : "); + aStr += aFALSETxt; } - return Expand(); + return aStr; } /* --------------------------------------------------------------------------- diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 07c8839898..7bbd73a34e 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -305,18 +305,15 @@ String SwGetExpField::Expand() const return sExpand; } -String SwGetExpField::GetCntnt(BOOL bName) const -{ - if ( bName ) - { - String aStr( SwFieldType::GetTypeStr( static_cast(nsSwGetSetExpType::GSE_FORMULA & nSubType - ? TYP_FORMELFLD - : TYP_GETFLD ) )); - aStr += ' '; - aStr += GetFormula(); - return aStr; - } - return Expand(); +String SwGetExpField::GetFieldName() const +{ + String aStr( SwFieldType::GetTypeStr( + static_cast(((nsSwGetSetExpType::GSE_FORMULA & nSubType) != 0) + ? TYP_FORMELFLD + : TYP_GETFLD ) )); + aStr += ' '; + aStr += GetFormula(); + return aStr; } SwField* SwGetExpField::Copy() const @@ -834,35 +831,28 @@ String SwSetExpField::Expand() const } /*-------------------------------------------------------------------- - Beschreibung: liefert den Namen oder den Inhalt + @return the field name --------------------------------------------------------------------*/ -String SwSetExpField::GetCntnt(BOOL bName) const +String SwSetExpField::GetFieldName() const { - if( bName ) - { - USHORT nStrType; - - if( IsSequenceFld() ) - nStrType = TYP_SEQFLD; - else if( bInput ) - nStrType = TYP_SETINPFLD; - else - nStrType = TYP_SETFLD; + USHORT const nStrType( (IsSequenceFld()) + ? TYP_SEQFLD + : (bInput) + ? TYP_SETINPFLD + : TYP_SETFLD ); - String aStr( SwFieldType::GetTypeStr( nStrType ) ); - aStr += ' '; - aStr += GetTyp()->GetName(); + String aStr( SwFieldType::GetTypeStr( nStrType ) ); + aStr += ' '; + aStr += GetTyp()->GetName(); - if( TYP_SEQFLD != nStrType ) - { - // Sequence nicht die Formel ausgeben - aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " = " )); - aStr += GetFormula(); - } - return aStr; + // Sequence: without formula + if (TYP_SEQFLD != nStrType) + { + aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " = " ) ); + aStr += GetFormula(); } - return Expand(); + return aStr; } SwField* SwSetExpField::Copy() const @@ -1021,20 +1011,16 @@ SwInputField::SwInputField(SwInputFieldType* pTyp, const String& rContent, { } -String SwInputField::GetCntnt(BOOL bName) const +String SwInputField::GetFieldName() const { - if ( bName ) + String aStr(SwField::GetFieldName()); + if ((nSubType & 0x00ff) == INP_USR) { - String aStr(SwField::GetCntnt(bName)); - if ((nSubType & 0x00ff) == INP_USR) - { - aStr += GetTyp()->GetName(); - aStr += ' '; - aStr += aContent; - } - return aStr; + aStr += GetTyp()->GetName(); + aStr += ' '; + aStr += aContent; } - return Expand(); + return aStr; } SwField* SwInputField::Copy() const diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index 7abd94ebf5..a91b9212a8 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -28,16 +28,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - -// #include #include #include #include #include #include -#ifndef _UNOFLDMID_H #include -#endif #include #include #include @@ -53,9 +49,7 @@ #include #include #include -#ifndef _COMCORE_HRC #include -#endif #include #ifdef MAC @@ -272,21 +266,20 @@ USHORT SwField::GetTypeId() const Beschreibung: liefert den Namen oder den Inhalt --------------------------------------------------------------------*/ -String SwField::GetCntnt( BOOL bName ) const +String SwField::GetFieldName() const { - String sRet; - if( bName ) + USHORT nTypeId = GetTypeId(); + if (RES_DATETIMEFLD == GetTyp()->Which()) { - USHORT nTypeId = GetTypeId(); - if( RES_DATETIMEFLD == GetTyp()->Which() ) - nTypeId = static_cast(GetSubType() & DATEFLD ? TYP_DATEFLD : TYP_TIMEFLD); - - sRet = SwFieldType::GetTypeStr( nTypeId ); - if( IsFixed() ) - ( sRet += ' ' ) += ViewShell::GetShellRes()->aFixedStr; + nTypeId = static_cast( + ((GetSubType() & DATEFLD) != 0) ? TYP_DATEFLD : TYP_TIMEFLD); + } + String sRet = SwFieldType::GetTypeStr( nTypeId ); + if (IsFixed()) + { + sRet += ' '; + sRet += ViewShell::GetShellRes()->aFixedStr; } - else - sRet = Expand(); return sRet; } diff --git a/sw/source/core/fields/macrofld.cxx b/sw/source/core/fields/macrofld.cxx index 1471d46b29..57584fc90f 100644 --- a/sw/source/core/fields/macrofld.cxx +++ b/sw/source/core/fields/macrofld.cxx @@ -28,20 +28,19 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include #include #include -#ifndef _UNOFLDMID_H #include -#endif #include #include #include #include + using namespace ::com::sun::star; using ::rtl::OUString; + /*-------------------------------------------------------------------- Beschreibung: MacroFeldtypen --------------------------------------------------------------------*/ @@ -79,16 +78,12 @@ SwField* SwMacroField::Copy() const return new SwMacroField((SwMacroFieldType*)GetTyp(), aMacro, aText); } -String SwMacroField::GetCntnt(BOOL bName) const +String SwMacroField::GetFieldName() const { - if(bName) - { - String aStr(GetTyp()->GetName()); - aStr += ' '; - aStr += aMacro; - return aStr; - } - return Expand(); + String aStr(GetTyp()->GetName()); + aStr += ' '; + aStr += aMacro; + return aStr; } String SwMacroField::GetLibName() const diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index d0c39fbd91..c31c494575 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -62,18 +62,12 @@ // <-- #include #include -#ifndef _UNOFLDMID_H #include -#endif #include #include #include -#ifndef _POOLFMT_HRC #include -#endif -#ifndef _COMCORE_HRC #include -#endif #include #include @@ -280,11 +274,8 @@ String SwGetRefField::Expand() const } -String SwGetRefField::GetCntnt(BOOL bName) const +String SwGetRefField::GetFieldName() const { - if( !bName ) - return Expand(); - String aStr(GetTyp()->GetName()); aStr += ' '; aStr += sSetRefName; diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx index 5b43ea2627..50b4ab266f 100644 --- a/sw/source/core/fields/tblcalc.cxx +++ b/sw/source/core/fields/tblcalc.cxx @@ -37,9 +37,8 @@ #include #include #include // fuer _SetGetExpFld -#ifndef _UNOFLDMID_H #include -#endif + using namespace ::com::sun::star; using ::rtl::OUString; @@ -91,22 +90,12 @@ SwField* SwTblField::Copy() const } -String SwTblField::GetCntnt(BOOL bName) const +String SwTblField::GetFieldName() const { - if( bName ) - { - String aStr(GetTyp()->GetName()); - aStr += ' '; - - USHORT nOldSubType = nSubType; - SwTblField* pThis = (SwTblField*)this; - pThis->nSubType |= nsSwExtendedSubType::SUB_CMD; - aStr += Expand(); - pThis->nSubType = nOldSubType; - - return aStr; - } - return Expand(); + String aStr(GetTyp()->GetName()); + aStr += ' '; + aStr += const_cast(this)->GetCommand(); + return aStr; } // suche den TextNode, in dem das Feld steht @@ -127,21 +116,28 @@ const SwNode* SwTblField::GetNodeOfFormula() const return 0; } +String SwTblField::GetCommand() +{ + if (EXTRNL_NAME != GetNameType()) + { + SwNode const*const pNd = GetNodeOfFormula(); + SwTableNode const*const pTblNd = (pNd) ? pNd->FindTableNode() : 0; + if (pTblNd) + { + PtrToBoxNm( &pTblNd->GetTable() ); + } + } + return (EXTRNL_NAME == GetNameType()) + ? SwTableFormula::GetFormula() + : String(); +} String SwTblField::Expand() const { String aStr; if (nSubType & nsSwExtendedSubType::SUB_CMD) { - if( EXTRNL_NAME != GetNameType() ) - { - const SwNode* pNd = GetNodeOfFormula(); - const SwTableNode* pTblNd = pNd ? pNd->FindTableNode() : 0; - if( pTblNd ) - ((SwTblField*)this)->PtrToBoxNm( &pTblNd->GetTable() ); - } - if( EXTRNL_NAME == GetNameType() ) - aStr = SwTableFormula::GetFormula(); + aStr = const_cast(this)->GetCommand(); } else { diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx index aff0e3801d..ec771cac18 100644 --- a/sw/source/core/fields/usrfld.cxx +++ b/sw/source/core/fields/usrfld.cxx @@ -40,12 +40,12 @@ #include #include #include -#ifndef _UNOFLDMID_H #include -#endif + using namespace ::com::sun::star; using ::rtl::OUString; + /*-------------------------------------------------------------------- Beschreibung: Benutzerfelder --------------------------------------------------------------------*/ @@ -72,17 +72,14 @@ SwField* SwUserField::Copy() const return pTmp; } -String SwUserField::GetCntnt(sal_Bool bName) const +String SwUserField::GetFieldName() const { - if ( bName ) - { String aStr(SwFieldType::GetTypeStr(TYP_USERFLD)); - aStr += ' '; - aStr += GetTyp()->GetName(); - aStr.AppendAscii(" = "); - aStr += ((SwUserFieldType*)GetTyp())->GetContent(); - return aStr; - } - return Expand(); + String aStr(SwFieldType::GetTypeStr(TYP_USERFLD)); + aStr += ' '; + aStr += GetTyp()->GetName(); + aStr.AppendAscii(" = "); + aStr += static_cast(GetTyp())->GetContent(); + return aStr; } double SwUserField::GetValue() const diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx index ca494527fc..3a11e267db 100644 --- a/sw/source/core/inc/txmsrt.hxx +++ b/sw/source/core/inc/txmsrt.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _TXMSRT_HXX -#define _TXMSRT_HXX +#ifndef SW_TXMSRT_HXX +#define SW_TXMSRT_HXX #include #include @@ -154,7 +154,7 @@ private: String sSortTxt; String sSortTxtReading; - virtual void _GetText( String&, String& ) = 0; + virtual void GetText_Impl( String&, String& ) const = 0; }; inline void SwTOXSortTabBase::GetTxt( String& rSortTxt, @@ -163,7 +163,7 @@ inline void SwTOXSortTabBase::GetTxt( String& rSortTxt, if( !bValidTxt ) { SwTOXSortTabBase* pThis = (SwTOXSortTabBase*)this; - pThis->_GetText( pThis->sSortTxt, pThis->sSortTxtReading ); + pThis->GetText_Impl( pThis->sSortTxt, pThis->sSortTxtReading ); pThis->bValidTxt = TRUE; } @@ -194,7 +194,7 @@ struct SwTOXIndex : public SwTOXSortTabBase virtual BOOL operator<( const SwTOXSortTabBase& ); private: - virtual void _GetText( String&, String& ); + virtual void GetText_Impl( String&, String& ) const; BYTE nKeyLevel; }; @@ -211,7 +211,7 @@ struct SwTOXCustom : public SwTOXSortTabBase virtual BOOL operator<( const SwTOXSortTabBase& ); private: - virtual void _GetText( String&, String& ); + virtual void GetText_Impl( String&, String& ) const; String aKey; String sReading; @@ -231,7 +231,7 @@ struct SwTOXContent : public SwTOXSortTabBase virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT nAuthField = 0 ) const; virtual USHORT GetLevel() const; private: - virtual void _GetText( String&, String& ); + virtual void GetText_Impl( String&, String& ) const; }; @@ -248,7 +248,7 @@ struct SwTOXPara : public SwTOXSortTabBase virtual String GetURL() const; private: - virtual void _GetText( String&, String& ); + virtual void GetText_Impl( String&, String& ) const; SwTOXElement eType; USHORT m_nLevel; @@ -267,7 +267,7 @@ struct SwTOXTable : public SwTOXSortTabBase virtual String GetURL() const; private: - virtual void _GetText( String&, String& ); + virtual void GetText_Impl( String&, String& ) const; USHORT nLevel; }; @@ -277,7 +277,7 @@ struct SwTOXAuthority : public SwTOXSortTabBase private: SwFmtFld& m_rField; virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT nAuthField = 0 ) const; - virtual void _GetText( String&, String& ); + virtual void GetText_Impl( String&, String& ) const; public: SwTOXAuthority( const SwCntntNode& rNd, SwFmtFld& rField, const SwTOXInternational& rIntl ); @@ -291,4 +291,4 @@ public: }; -#endif // _TXMSRT_HXX +#endif // SW_TXMSRT_HXX diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index f95a173669..0699ae3a77 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -779,7 +779,9 @@ void SwTxtNode::GetMinMaxSize( ULONG nIndex, ULONG& rMin, ULONG &rMax, case RES_TXTATR_FIELD : { SwField *pFld = (SwField*)pHint->GetFld().GetFld(); - const String aTxt = pFld->GetCntnt( FALSE ); + SwDoc const*const pDoc(GetDoc()); + const String aTxt = + pFld->ExpandField(pDoc->IsClipBoard()); if( lcl_MinMaxString( aArg, aIter.GetFnt(), aTxt, 0, aTxt.Len() ) ) nAdd = 20; @@ -974,7 +976,8 @@ USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd ) case RES_TXTATR_FIELD : { SwField *pFld = (SwField*)pHint->GetFld().GetFld(); - const String aTxt = pFld->GetCntnt( FALSE ); + SwDoc const*const pDoc( GetDoc() ); + String const aTxt = pFld->ExpandField(pDoc->IsClipBoard()); SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aTxt, 0, aTxt.Len() ); nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width(); diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index 64d20d0d4c..9a65a390de 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -106,6 +106,8 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, } ViewShell *pSh = rInf.GetVsh(); + SwDoc *const pDoc( (pSh) ? pSh->GetDoc() : 0 ); + bool const bInClipboard( (pDoc) ? pDoc->IsClipBoard() : true ); sal_Bool bPlaceHolder = sal_False; switch( pFld->GetTyp()->Which() ) @@ -117,16 +119,26 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, case RES_COMBINED_CHARS: { - String sStr( pFld->GetCntnt( bName )); if( bName ) - pRet = new SwFldPortion( sStr ); + { + String const sName( pFld->GetFieldName() ); + pRet = new SwFldPortion(sName); + } else - pRet = new SwCombinedPortion( sStr ); + { + String const sContent( pFld->ExpandField(bInClipboard) ); + pRet = new SwCombinedPortion(sContent); + } } break; case RES_HIDDENTXTFLD: - pRet = new SwHiddenPortion(pFld->GetCntnt( bName )); + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwHiddenPortion(str); + } break; case RES_CHAPTERFLD: @@ -135,13 +147,25 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, ((SwChapterField*)pFld)->ChangeExpansion( pFrame, &((SwTxtFld*)pHint)->GetTxtNode() ); } - pRet = new SwFldPortion( pFld->GetCntnt( bName ) ); + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwFldPortion( str ); + } break; case RES_DOCSTATFLD: if( !bName && pSh && !pSh->Imp()->IsUpdateExpFlds() ) + { ((SwDocStatField*)pFld)->ChangeExpansion( pFrame ); - pRet = new SwFldPortion( pFld->GetCntnt( bName ) ); + } + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwFldPortion( str ); + } break; case RES_PAGENUMBERFLD: @@ -153,7 +177,6 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, const SwRootFrm* pTmpRootFrm = pSh->GetLayout(); const sal_Bool bVirt = pTmpRootFrm->IsVirtPageNum(); - SwDoc* pDoc = pSh->GetDoc(); MSHORT nVirtNum = pFrame->GetVirtPageNum(); MSHORT nNumPages = pTmpRootFrm->GetPageNum(); sal_Int16 nNumFmt = -1; @@ -163,7 +186,12 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, pPageNr->ChangeExpansion( pDoc, nVirtNum, nNumPages, bVirt, nNumFmt > -1 ? &nNumFmt : 0); } - pRet = new SwFldPortion( pFld->GetCntnt( bName ) ); + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwFldPortion( str ); + } break; } case RES_GETEXPFLD: @@ -183,7 +211,12 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, pExpFld->ChgBodyTxtFlag( sal_True ); } } - pRet = new SwFldPortion( pFld->GetCntnt( bName ) ); + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwFldPortion( str ); + } break; } case RES_DBFLD: @@ -207,13 +240,25 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, } */ } - pRet = new SwFldPortion( pFld->GetCntnt( bName ) ); + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwFldPortion(str); + } break; } case RES_REFPAGEGETFLD: if( !bName && pSh && !pSh->Imp()->IsUpdateExpFlds() ) + { ((SwRefPageGetField*)pFld)->ChangeExpansion( pFrame, (SwTxtFld*)pHint ); - pRet = new SwFldPortion( pFld->GetCntnt( bName ) ); + } + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwFldPortion(str); + } break; case RES_JUMPEDITFLD: @@ -224,9 +269,12 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, break; default: - { - pRet = new SwFldPortion(pFld->GetCntnt( bName ) ); - } + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwFldPortion(str); + } } if( bNewFlyPor ) @@ -249,7 +297,12 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, else pTmpFnt->SetDiffFnt( &pChFmt->GetAttrSet(), pFrm->GetTxtNode()->getIDocumentSettingAccess() ); } - pRet = new SwFldPortion( pFld->GetCntnt( bName ), pTmpFnt, bPlaceHolder ); + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwFldPortion(str, pTmpFnt, bPlaceHolder); + } } return pRet; diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index e3d80b4af6..0a4936a7ce 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -51,9 +51,7 @@ #include #include -#ifndef _COMCORE_HRC #include -#endif #include extern BOOL IsFrameBehind( const SwTxtNode& rMyNd, xub_StrLen nMySttPos, @@ -403,7 +401,7 @@ BOOL SwTOXIndex::operator<( const SwTOXSortTabBase& rCmpBase ) // -void SwTOXIndex::_GetText( String& rTxt, String& rTxtReading ) +void SwTOXIndex::GetText_Impl( String& rTxt, String& rTxtReading ) const { ASSERT(pTxtMark, "pTxtMark == 0, Kein Stichwort"); const SwTOXMark& rTOXMark = pTxtMark->GetTOXMark(); @@ -530,7 +528,7 @@ USHORT SwTOXCustom::GetLevel() const } -void SwTOXCustom::_GetText( String& rTxt, String &rTxtReading ) +void SwTOXCustom::GetText_Impl( String& rTxt, String &rTxtReading ) const { rTxt = aKey; rTxtReading = sReading; @@ -553,7 +551,7 @@ SwTOXContent::SwTOXContent( const SwTxtNode& rNd, const SwTxtTOXMark* pMark, // Der Text des Inhalts // -void SwTOXContent::_GetText( String& rTxt, String& rTxtReading ) +void SwTOXContent::GetText_Impl( String& rTxt, String& rTxtReading ) const { const xub_StrLen* pEnd = pTxtMark->GetEnd(); if( pEnd && !pTxtMark->GetTOXMark().IsAlternativeText() ) @@ -612,7 +610,7 @@ SwTOXPara::SwTOXPara( const SwCntntNode& rNd, SwTOXElement eT, USHORT nLevel ) } -void SwTOXPara::_GetText( String& rTxt, String& ) +void SwTOXPara::GetText_Impl( String& rTxt, String& ) const { const SwCntntNode* pNd = aTOXSources[0].pNd; switch( eType ) @@ -801,7 +799,7 @@ SwTOXTable::SwTOXTable( const SwCntntNode& rNd ) } -void SwTOXTable::_GetText( String& rTxt, String& ) +void SwTOXTable::GetText_Impl( String& rTxt, String& ) const { const SwNode* pNd = aTOXSources[0].pNd; if( pNd && 0 != ( pNd = pNd->FindTableNode() ) ) @@ -868,11 +866,16 @@ USHORT SwTOXAuthority::GetLevel() const /*-- 15.09.99 14:28:08--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwTOXAuthority::_GetText( String& rTxt, String& ) +static String lcl_GetText(SwFmtFld const& rField) { bool const isClipBoard( - m_rField.GetTxtFld()->GetTxtNode().GetDoc()->IsClipBoard()); - rTxt = m_rField.GetFld()->ExpandField(isClipBoard); + rField.GetTxtFld()->GetTxtNode().GetDoc()->IsClipBoard()); + return rField.GetFld()->ExpandField(isClipBoard); +} + +void SwTOXAuthority::GetText_Impl( String& rTxt, String& ) const +{ + rTxt = lcl_GetText(m_rField); } /* -----------------21.09.99 12:50------------------- @@ -885,7 +888,7 @@ void SwTOXAuthority::FillText( SwTxtNode& rNd, String sText; if(AUTH_FIELD_IDENTIFIER == nAuthField) { - sText = pField->Expand(); + sText = lcl_GetText(m_rField); const SwAuthorityFieldType* pType = (const SwAuthorityFieldType*)pField->GetTyp(); sal_Unicode cChar = pType->GetPrefix(); if(cChar && cChar != ' ') diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 72a9a7a08d..b7eb0b4c3a 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -1267,13 +1267,16 @@ uno::Reference< beans::XPropertySet > SwXTextField::getTextFieldMaster(void) th OUString SwXTextField::getPresentation(sal_Bool bShowCommand) throw( uno::RuntimeException ) { vos::OGuard aGuard(Application::GetSolarMutex()); - OUString sRet; - const SwField* pField = GetField(); - if(pField) - sRet = pField->GetCntnt(bShowCommand); - else + + SwField const*const pField = GetField(); + if (!pField) + { throw uno::RuntimeException(); - return sRet; + } + ::rtl::OUString const ret( (bShowCommand) + ? pField->GetFieldName() + : pField->ExpandField( GetDoc()->IsClipBoard() ) ); + return ret; } /* -----------------18.02.99 13:39------------------- * diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 72dbabefd9..392ad1383b 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -343,7 +343,8 @@ void WW8Export::DoFormText(const SwInputField * pFld) OutputField(0, ww::eFORMTEXT, aEmptyStr, WRITEFIELD_CMD_END); - SwWW8Writer::WriteString16(Strm(), pFld->Expand(), false); + String const fieldStr( pFld->ExpandField(pDoc->IsClipBoard()) ); + SwWW8Writer::WriteString16(Strm(), fieldStr, false); static BYTE aArr2[] = { 0x03, 0x6a, 0x00, 0x00, 0x00, 0x00, // sprmCPicLocation diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 1e5d01101f..d4a78322e4 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -2773,12 +2773,12 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) static String sQuotes('\"'); const SwDocInfoField * pDocInfoField = dynamic_cast (pFld); - + if (pDocInfoField != NULL) { - String sFieldname = pDocInfoField->GetCntnt(TRUE); + String sFieldname = pDocInfoField->GetFieldName(); xub_StrLen nIndex = sFieldname.Search(':'); - + if (nIndex != sFieldname.Len()) sFieldname = sFieldname.Copy(nIndex + 1); diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx index 8aa6c2e766..5dd0d7ca58 100644 --- a/sw/source/ui/docvw/edtwin2.cxx +++ b/sw/source/ui/docvw/edtwin2.cxx @@ -340,7 +340,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) break; case RES_DBFLD: - sTxt = ((SwDBField*)pFld)->GetCntnt(TRUE); + sTxt = pFld->GetFieldName(); break; case RES_USERFLD: diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx index a32e6634b2..823ce5570c 100644 --- a/sw/source/ui/fldui/DropDownFieldDialog.cxx +++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx @@ -32,21 +32,14 @@ #undef SW_DLLIMPLEMENTATION #endif - #include #include #include -#ifndef _MSGBOX_HXX #include -#endif #include #include -#ifndef _FLDUI_HRC #include -#endif -#ifndef _SW_DROPDOWNFIELDDIALOG_HRC #include -#endif using namespace ::com::sun::star; @@ -124,13 +117,12 @@ void sw::DropDownFieldDialog::Apply() { rSh.StartAllAction(); - SwDropDownField * pCopy = (SwDropDownField *) pDropField->Copy(); + ::std::auto_ptr const pCopy( + static_cast( pDropField->CopyField() ) ); pCopy->SetPar1(sSelect); rSh.SwEditShell::UpdateFlds(*pCopy); - delete pCopy; - rSh.SetUndoNoResetModified(); rSh.EndAllAction(); } diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx index 002b312af8..3ef4dc7431 100644 --- a/sw/source/ui/fldui/inpdlg.cxx +++ b/sw/source/ui/fldui/inpdlg.cxx @@ -32,13 +32,7 @@ #undef SW_DLLIMPLEMENTATION #endif - - -#define _INPDLG_CXX - -#ifndef _MSGBOX_HXX //autogen #include -#endif #include #include #include @@ -48,12 +42,8 @@ #include #include -#ifndef _FLDUI_HRC #include -#endif -#ifndef _INPDLG_HRC #include -#endif /*-------------------------------------------------------------------- @@ -128,7 +118,9 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS, //values are formatted - formulas are not CharClass aCC( SvxCreateLocale( pSetFld->GetLanguage() )); if( aCC.isNumeric( sFormula )) - aStr = pSetFld->Expand(); + { + aStr = pSetFld->ExpandField(false/*no dialogs for clipboard*/); + } else aStr = sFormula; aLabelED.SetText( pSetFld->GetPromptText() ); -- cgit v1.2.3 From dec9cd2be0b303d95c5c9207fbeebebe7687be41 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 4 Oct 2010 17:19:06 +0200 Subject: sw34bf01: #i103634#: prevent expansion of numbering rules in temp documents: SwTxtFormatter::NewNumberPortion(): remove workaround for #b6432095#; instead, call GetNumString(), and use the temp doc cache there. SwTxtNode::GetNumString(): add fix for #b6432095# to expand also numbering rules with type NONE here so it is not limited to text formatting. --- sw/source/core/text/txtfld.cxx | 8 +------- sw/source/core/txtnode/ndtxt.cxx | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 12 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index 9a65a390de..d427aaa083 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -541,13 +541,7 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const } else { - // --> OD 2006-06-02 #b6432095# - // use method instead of - // method , because for levels with - // numbering none the prefix and the suffix strings have to be provided. -// XubString aTxt( pTxtNd->GetNumString() ); - XubString aTxt( pNumRule->MakeNumString( *(pTxtNd->GetNum()) ) ); - // <-- + XubString aTxt( pTxtNd->GetNumString() ); // --> OD 2008-01-23 #newlistlevelattrs# if ( aTxt.Len() > 0 ) { diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 4046cbc59f..793f758bfb 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -99,6 +99,10 @@ #include // <-- + +using namespace ::com::sun::star; + + SV_DECL_PTRARR( TmpHints, SwTxtAttr*, 0, 4 ) TYPEINIT1( SwTxtNode, SwCntntNode ) @@ -2834,13 +2838,19 @@ XubString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings, cons } const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L; if ( pRule && - IsCountedInList() && - pRule->Get( static_cast(GetActualListLevel()) ).IsTxtFmt() ) + IsCountedInList() ) { - return pRule->MakeNumString( GetNum()->GetNumberVector(), + SvxNumberType const& rNumberType( + pRule->Get( static_cast(GetActualListLevel()) ) ); + if (rNumberType.IsTxtFmt() || + // #b6432095# + (style::NumberingType::NUMBER_NONE == rNumberType.GetNumberingType())) + { + return pRule->MakeNumString( GetNum()->GetNumberVector(), _bInclPrefixAndSuffixStrings ? TRUE : FALSE, FALSE, _nRestrictToThisLevel ); + } } return aEmptyStr; @@ -5080,8 +5090,6 @@ bool SwTxtNode::IsInContent() const #include -using namespace ::com::sun::star; - uno::Reference< rdf::XMetadatable > SwTxtNode::MakeUnoObject() { -- cgit v1.2.3 From 2db323722e91756f7ff27c16c29c0f1ac224778a Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Mon, 4 Oct 2010 20:43:33 +0200 Subject: svarray: #i112395#: SvBytes replace with STL --- sw/source/core/layout/laycache.cxx | 14 +++++++------- sw/source/core/text/porlay.cxx | 27 +++++++++++++++------------ sw/source/core/undo/unnum.cxx | 17 ++++++++--------- 3 files changed, 30 insertions(+), 28 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index 58bd439634..d14318f52b 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -1238,12 +1238,12 @@ SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, BOOL bWrtMd ) : BOOL SwLayCacheIoImpl::OpenRec( BYTE cType ) { BOOL bRes = TRUE; - UINT16 nLvl = aRecTypes.Count(); + size_t nLvl = aRecTypes.size(); ASSERT( nLvl == aRecSizes.Count(), "OpenRec: Level" ); UINT32 nPos = pStream->Tell(); if( bWriteMode ) { - aRecTypes.Insert( cType, nLvl ); + aRecTypes.push_back( cType ); aRecSizes.Insert( nPos, nLvl ); *pStream << (UINT32) 0; } @@ -1252,7 +1252,7 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType ) UINT32 nVal; *pStream >> nVal; BYTE cRecTyp = (BYTE)nVal; - aRecTypes.Insert( cRecTyp, nLvl ); + aRecTypes.push_back( cRecTyp ); sal_uInt32 nSize = nVal >> 8; aRecSizes.Insert( nPos + nSize, nLvl ); if( !nVal || cRecTyp != cType || @@ -1261,7 +1261,7 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType ) ASSERT( nVal, "OpenRec: Record-Header is 0" ); ASSERT( cRecTyp == cType, "OpenRec: Wrong Record Type" ); - aRecTypes[nLvl] = 0; + aRecTypes.back() = 0; aRecSizes[nLvl] = pStream->Tell(); bRes = sal_False; bError = TRUE; @@ -1275,7 +1275,7 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType ) BOOL SwLayCacheIoImpl::CloseRec( BYTE ) { BOOL bRes = TRUE; - UINT16 nLvl = aRecTypes.Count(); + size_t nLvl = aRecTypes.size(); ASSERT( nLvl == aRecSizes.Count(), "CloseRec: wrong Level" ); ASSERT( nLvl, "CloseRec: no levels" ); if( nLvl ) @@ -1287,7 +1287,7 @@ BOOL SwLayCacheIoImpl::CloseRec( BYTE ) UINT32 nBgn = aRecSizes[nLvl]; pStream->Seek( nBgn ); UINT32 nSize = nPos - nBgn; - UINT32 nVal = ( nSize << 8 ) | aRecTypes[nLvl]; + UINT32 nVal = ( nSize << 8 ) | aRecTypes.back(); *pStream << nVal; pStream->Seek( nPos ); if( pStream->GetError() != SVSTREAM_OK ) @@ -1307,7 +1307,7 @@ BOOL SwLayCacheIoImpl::CloseRec( BYTE ) bRes = FALSE; } - aRecTypes.Remove( nLvl, 1 ); + aRecTypes.pop_back(); aRecSizes.Remove( nLvl, 1 ); } diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 34dbba9e9f..ea26919892 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -917,7 +917,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) // remove invalid entries from script information arrays const USHORT nScriptRemove = aScriptChg.Count() - nCnt; aScriptChg.Remove( nCnt, nScriptRemove ); - aScriptType.Remove( nCnt, nScriptRemove ); + aScriptType.erase( aScriptType.begin() + nCnt, aScriptType.end() ); // get the start of the last compression group USHORT nLastCompression = nChg; @@ -936,7 +936,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) const USHORT nCompRemove = aCompChg.Count() - nCntComp; aCompChg.Remove( nCntComp, nCompRemove ); aCompLen.Remove( nCntComp, nCompRemove ); - aCompType.Remove( nCntComp, nCompRemove ); + aCompType.erase( aCompType.begin() + nCntComp, aCompType.end() ); // get the start of the last kashida group USHORT nLastKashida = nChg; @@ -982,7 +982,8 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) if ( nScript != nNextScript ) { aScriptChg.Insert( nEnd, nCnt ); - aScriptType.Insert( nScript, nCnt++ ); + aScriptType.insert( aScriptType.begin() + nCnt, nScript ); + nCnt++; nScript = nNextScript; } } @@ -1043,7 +1044,8 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) { aScriptChg.Insert( nChg, nCnt ); } - aScriptType.Insert( nScript, nCnt++ ); + aScriptType.insert( aScriptType.begin() + nCnt, nScript ); + nCnt++; // if current script is asian, we search for compressable characters // in this range @@ -1089,7 +1091,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) { aCompChg.Insert( nPrevChg, nCntComp ); BYTE nTmpType = ePrevState; - aCompType.Insert( nTmpType, nCntComp ); + aCompType.insert( aCompType.begin() + nCntComp, nTmpType ); aCompLen.Insert( nLastCompression - nPrevChg, nCntComp++ ); } } @@ -1110,7 +1112,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) { aCompChg.Insert( nPrevChg, nCntComp ); BYTE nTmpType = ePrevState; - aCompType.Insert( nTmpType, nCntComp ); + aCompType.insert( aCompType.begin() + nCntComp, nTmpType ); aCompLen.Insert( nLastCompression - nPrevChg, nCntComp++ ); } } @@ -1308,7 +1310,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) // remove invalid entries from direction information arrays const USHORT nDirRemove = aDirChg.Count(); aDirChg.Remove( 0, nDirRemove ); - aDirType.Remove( 0, nDirRemove ); + aDirType.clear(); // Perform Unicode Bidi Algorithm for text direction information bool bPerformUBA = UBIDI_LTR != nDefaultDir; @@ -1361,7 +1363,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) if ( nStart > 0 && nStartPosOfGroup < nStart ) { aScriptChg.Insert( nStart, nScriptIdx ); - aScriptType.Insert( nScriptTypeOfGroup, nScriptIdx ); + aScriptType.insert( aScriptType.begin() + nScriptIdx, nScriptTypeOfGroup ); ++nScriptIdx; } @@ -1369,12 +1371,12 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) while ( nScriptIdx < aScriptChg.Count() && GetScriptChg( nScriptIdx ) <= nEnd ) { aScriptChg.Remove( nScriptIdx, 1 ); - aScriptType.Remove( nScriptIdx, 1 ); + aScriptType.erase( aScriptType.begin() + nScriptIdx ); } // Insert a new entry in ScriptArray for the end of the RTL run: aScriptChg.Insert( nEnd, nScriptIdx ); - aScriptType.Insert( i18n::ScriptType::COMPLEX, nScriptIdx ); + aScriptType.insert( aScriptType.begin() + nScriptIdx, i18n::ScriptType::COMPLEX ); #if OSL_DEBUG_LEVEL > 1 BYTE nScriptType; @@ -1403,7 +1405,7 @@ void SwScriptInfo::UpdateBidiInfo( const String& rTxt ) // remove invalid entries from direction information arrays const USHORT nDirRemove = aDirChg.Count(); aDirChg.Remove( 0, nDirRemove ); - aDirType.Remove( 0, nDirRemove ); + aDirType.clear(); // // Bidi functions from icu 2.0 @@ -1426,7 +1428,8 @@ void SwScriptInfo::UpdateBidiInfo( const String& rTxt ) { ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir ); aDirChg.Insert( (USHORT)nEnd, nCntDir ); - aDirType.Insert( (BYTE)nCurrDir, nCntDir++ ); + aDirType.push_back( (BYTE)nCurrDir ); + nCntDir++; nStart = nEnd; } diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx index 11a92c6385..a18c14212d 100644 --- a/sw/source/core/undo/unnum.cxx +++ b/sw/source/core/undo/unnum.cxx @@ -197,13 +197,12 @@ void SwUndoInsNum::SaveOldNumRule( const SwNumRule& rOld ) pOldNumRule = new SwNumRule( rOld ); } -/* */ +/* */ SwUndoDelNum::SwUndoDelNum( const SwPaM& rPam ) : SwUndo( UNDO_DELNUM ), SwUndRng( rPam ), - aNodeIdx( BYTE( nEndNode - nSttNode > 255 ? 255 : nEndNode - nSttNode )), - aLevels( BYTE( nEndNode - nSttNode > 255 ? 255 : nEndNode - nSttNode )) + aNodeIdx( BYTE( nEndNode - nSttNode > 255 ? 255 : nEndNode - nSttNode )) { pHistory = new SwHistory; } @@ -229,7 +228,7 @@ void SwUndoDelNum::Undo( SwUndoIter& rUndoIter ) for( USHORT n = 0; n < aNodeIdx.Count(); ++n ) { SwTxtNode* pNd = rDoc.GetNodes()[ aNodeIdx[ n ] ]->GetTxtNode(); - ASSERT( pNd, "wo ist der TextNode geblieben?" ); + ASSERT( pNd, "Where is TextNode gone?" ); pNd->SetAttrListLevel(aLevels[ n ] ); if( pNd->GetCondFmtColl() ) @@ -261,12 +260,12 @@ void SwUndoDelNum::AddNode( const SwTxtNode& rNd, BOOL ) USHORT nIns = aNodeIdx.Count(); aNodeIdx.Insert( rNd.GetIndex(), nIns ); - aLevels.Insert( static_cast(rNd.GetActualListLevel()), nIns ); + aLevels.insert( aLevels.begin() + nIns, static_cast(rNd.GetActualListLevel()) ); } } -/* */ +/* */ SwUndoMoveNum::SwUndoMoveNum( const SwPaM& rPam, long nOff, BOOL bIsOutlMv ) @@ -325,7 +324,7 @@ void SwUndoMoveNum::Repeat( SwUndoIter& rUndoIter ) rUndoIter.GetDoc().MoveParagraph( *rUndoIter.pAktPam, nOffset, FALSE ); } -/* */ +/* */ SwUndoNumUpDown::SwUndoNumUpDown( const SwPaM& rPam, short nOff ) @@ -356,7 +355,7 @@ void SwUndoNumUpDown::Repeat( SwUndoIter& rUndoIter ) rUndoIter.GetDoc().NumUpDown( *rUndoIter.pAktPam, 1 == nOffset ); } -/* */ +/* */ // #115901# SwUndoNumOrNoNum::SwUndoNumOrNoNum( const SwNodeIndex& rIdx, BOOL bOldNum, @@ -402,7 +401,7 @@ void SwUndoNumOrNoNum::Repeat( SwUndoIter& rUndoIter ) TRUE); } -/* */ +/* */ SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, BOOL bFlg ) : SwUndo( UNDO_SETNUMRULESTART ), -- cgit v1.2.3 From 7e69c6007abcaf9be3d9e6d737b3d74bd734894a Mon Sep 17 00:00:00 2001 From: os Date: Tue, 5 Oct 2010 09:39:37 +0200 Subject: new: HasInvisibleContent; fixed: EmbedAllLinks --- sw/inc/doc.hxx | 1 + sw/source/core/doc/doc.cxx | 110 +++++++++++++++++++++++++++++++++------------ 2 files changed, 83 insertions(+), 28 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index ab413e18fd..dc3e18d4e5 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1897,6 +1897,7 @@ public: // loesche den nicht sichtbaren ::com::sun::star::ucb::Content aus dem Document, wie z.B.: // versteckte Bereiche, versteckte Absaetze sal_Bool RemoveInvisibleContent(); + sal_Bool HasInvisibleContent() const; //restore the invisible content if it's available on the undo stack sal_Bool RestoreInvisibleContent(); // replace fields by text - mailmerge support diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index d25e4bd169..3df5747cff 100755 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -2387,6 +2387,56 @@ BOOL SwDoc::RemoveInvisibleContent() EndUndo( UNDO_UI_DELETE_INVISIBLECNTNT, NULL ); return bRet; } +/*-- 25.08.2010 14:18:12--------------------------------------------------- + + -----------------------------------------------------------------------*/ +BOOL SwDoc::HasInvisibleContent() const +{ + BOOL bRet = sal_False; + + SwClientIter aIter( *GetSysFldType( RES_HIDDENPARAFLD ) ); + if( aIter.First( TYPE( SwFmtFld ) ) ) + bRet = sal_True; + + // + // Search for any hidden paragraph (hidden text attribute) + // + if( ! bRet ) + { + SwTxtNode* pTxtNd; + for( ULONG n = GetNodes().Count(); !bRet && (n > 0); ) + { + SwTxtNode* pTxtNd = GetNodes()[ --n ]->GetTxtNode(); + if ( pTxtNd ) + { + bool bRemoved = false; + SwPaM aPam( *pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().Len() ); + if( pTxtNd->HasHiddenCharAttribute( true ) || ( pTxtNd->HasHiddenCharAttribute( false ) ) ) + { + bRet = sal_True; + } + } + } + } + + if( ! bRet ) + { + const SwSectionFmts& rSectFmts = GetSections(); + USHORT n; + + for( n = rSectFmts.Count(); !bRet && (n > 0); ) + { + SwSectionFmt* pSectFmt = rSectFmts[ --n ]; + // don't add sections in Undo/Redo + if( !pSectFmt->IsInNodesArr()) + continue; + SwSection* pSect = pSectFmt->GetSection(); + if( pSect->IsHidden() ) + bRet = sal_True; + } + } + return bRet; +} /*-- 11.06.2004 08:34:04--------------------------------------------------- -----------------------------------------------------------------------*/ @@ -2501,26 +2551,17 @@ bool SwDoc::LinksUpdated() const } // embedded alle lokalen Links (Bereiche/Grafiken) -bool SwDoc::EmbedAllLinks() +::sfx2::SvBaseLink* lcl_FindNextRemovableLink( const ::sfx2::SvBaseLinks& rLinks, sfx2::LinkManager& rLnkMgr ) { - BOOL bRet = FALSE; - sfx2::LinkManager& rLnkMgr = GetLinkManager(); - const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks(); - if( rLnks.Count() ) + for( USHORT n = 0; n < rLinks.Count(); ++n ) { - BOOL bDoesUndo = DoesUndo(); - DoUndo( FALSE ); - - for( USHORT n = 0; n < rLnks.Count(); ++n ) + ::sfx2::SvBaseLink* pLnk = &(*rLinks[ n ]); + if( pLnk && + ( OBJECT_CLIENT_GRF == pLnk->GetObjType() || + OBJECT_CLIENT_FILE == pLnk->GetObjType() ) && + pLnk->ISA( SwBaseLink ) ) { - ::sfx2::SvBaseLink* pLnk = &(*rLnks[ n ]); - if( pLnk && - ( OBJECT_CLIENT_GRF == pLnk->GetObjType() || - OBJECT_CLIENT_FILE == pLnk->GetObjType() ) && - pLnk->ISA( SwBaseLink ) ) - { ::sfx2::SvBaseLinkRef xLink = pLnk; - USHORT nCount = rLnks.Count(); String sFName; rLnkMgr.GetDisplayNames( xLink, 0, &sFName, 0, 0 ); @@ -2528,20 +2569,33 @@ bool SwDoc::EmbedAllLinks() INetURLObject aURL( sFName ); if( INET_PROT_FILE == aURL.GetProtocol() || INET_PROT_CID == aURL.GetProtocol() ) - { - // dem Link sagen, das er aufgeloest wird! - xLink->Closed(); + return pLnk; + } + } + return 0; +} +bool SwDoc::EmbedAllLinks() +{ + BOOL bRet = FALSE; + sfx2::LinkManager& rLnkMgr = GetLinkManager(); + const ::sfx2::SvBaseLinks& rLinks = rLnkMgr.GetLinks(); + if( rLinks.Count() ) + { + BOOL bDoesUndo = DoesUndo(); + DoUndo( FALSE ); - // falls einer vergessen hat sich auszutragen - if( xLink.Is() ) - rLnkMgr.Remove( xLink ); + ::sfx2::SvBaseLink* pLnk = 0; + while( 0 != (pLnk = lcl_FindNextRemovableLink( rLinks, rLnkMgr ) ) ) + { + ::sfx2::SvBaseLinkRef xLink = pLnk; + // dem Link sagen, das er aufgeloest wird! + xLink->Closed(); - if( nCount != rLnks.Count() + 1 ) - n = 0; // wieder von vorne anfangen, es wurden - // mehrere Links entfernt - bRet = TRUE; - } - } + // falls einer vergessen hat sich auszutragen + if( xLink.Is() ) + rLnkMgr.Remove( xLink ); + + bRet = TRUE; } DelAllUndoObj(); -- cgit v1.2.3 From dfb3feb2eafd7800fcf7b46bff8ad7af1838a74b Mon Sep 17 00:00:00 2001 From: os Date: Tue, 5 Oct 2010 09:47:37 +0200 Subject: #i114081# SID_MAIL_PREPAREEXPORT re-implemented --- sw/sdi/_docsh.sdi | 5 +++++ sw/source/ui/app/docsh.cxx | 17 +++++++++++++++++ sw/source/ui/app/docsh2.cxx | 16 ++++++++++++++-- 3 files changed, 36 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/sdi/_docsh.sdi b/sw/sdi/_docsh.sdi index 4de71ca760..84dbad5152 100644 --- a/sw/sdi/_docsh.sdi +++ b/sw/sdi/_docsh.sdi @@ -132,6 +132,11 @@ interface BaseTextDocument ExecMethod = Execute; StateMethod = GetState; ] + SID_MAIL_PREPAREEXPORT + [ + ExecMethod = Execute ; + StateMethod = GetState; + ] } diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index a5a8bad22c..fb50d68da6 100755 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -1147,6 +1147,23 @@ void SwDocShell::GetState(SfxItemSet& rSet) rSet.Put( SvxFontListItem( pFontList, SID_ATTR_CHAR_FONTLIST ) ); } break; + case SID_MAIL_PREPAREEXPORT: + { + //check if linked content or possibly hidden content is available + //pDoc->UpdateFlds( NULL, false ); + sfx2::LinkManager& rLnkMgr = pDoc->GetLinkManager(); + const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks(); + sal_Bool bRet = sal_False; + if( rLnks.Count() ) + bRet = sal_True; + else + { + //sections with hidden flag, hidden character attribute, hidden paragraph/text or conditional text fields + bRet = pDoc->HasInvisibleContent(); + } + rSet.Put( SfxBoolItem( nWhich, bRet ) ); + } + break; default: DBG_ASSERT(!this,"Hier darfst Du nicht hinein!"); diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index cea9d745d7..f7ce9ef002 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -284,7 +284,7 @@ USHORT SwDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) EndListening( *this ); return nRet; -} +} /*-------------------------------------------------------------------- Beschreibung: Organizer @@ -1169,7 +1169,19 @@ void SwDocShell::Execute(SfxRequest& rReq) } break; - case SID_MAIL_EXPORT_FINISHED: + case SID_MAIL_PREPAREEXPORT: + { + //pWrtShell is not set in page preview + if(pWrtShell) + pWrtShell->StartAllAction(); + pDoc->UpdateFlds( NULL, false ); + pDoc->EmbedAllLinks(); + pDoc->RemoveInvisibleContent(); + if(pWrtShell) + pWrtShell->EndAllAction(); + } + break; + case SID_MAIL_EXPORT_FINISHED: { if(pWrtShell) pWrtShell->StartAllAction(); -- cgit v1.2.3 From 7a75987811f6918fbdaa48ae4647bad33914afdd Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 5 Oct 2010 11:23:32 +0200 Subject: sw34bf02: #i114861# method - do not handle a "noop" modify --- sw/source/core/txtnode/ndtxt.cxx | 11 ++++++++--- sw/source/core/undo/rolbck.cxx | 8 +++++++- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 4046cbc59f..18c9a0d90d 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -2566,9 +2566,14 @@ void SwTxtNode::NumRuleChgd() } SetInSwFntCache( FALSE ); - SvxLRSpaceItem& rLR = (SvxLRSpaceItem&)GetSwAttrSet().GetLRSpace(); - - SwModify::Modify( &rLR, &rLR ); + // Sending "noop" modify in order to cause invalidations of registered + // instances to get the list style change respectively the change + // in the list tree reflected in the layout. + // Important note: + { + SvxLRSpaceItem& rLR = (SvxLRSpaceItem&)GetSwAttrSet().GetLRSpace(); + SwModify::Modify( &rLR, &rLR ); + } } // -> #i27615# diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index 9526112d0e..8beea93a9b 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -1389,7 +1389,13 @@ SwRegHistory::SwRegHistory( const SwNode& rNd, SwHistory* pHst ) void SwRegHistory::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) { - if ( m_pHistory && ( pOld || pNew ) ) + // --> OD 2010-10-05 #i114861# + // Do not handle a "noop" modify + // - e.g. uses such a "noop" modify +// if ( m_pHistory && ( pOld || pNew ) ) + if ( m_pHistory && ( pOld || pNew ) && + pOld != pNew ) + // <-- { if ( pNew->Which() < POOLATTR_END ) { -- cgit v1.2.3 From 564d1b1236edb65dfeeb7fa5ad24bc88c374d210 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 5 Oct 2010 16:30:33 +0200 Subject: sw34bf02: #i114929# methods and - on reset of indentation/list-counted attribute assure that all paragraphs are covered --- sw/source/core/doc/docnum.cxx | 71 +++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 37 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 95ba6541c4..bb15b47941 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -1092,7 +1092,23 @@ void SwDoc::SetNumRule( const SwPaM& rPam, { SvUShortsSort aResetAttrsArray; aResetAttrsArray.Insert( RES_LR_SPACE ); - ResetAttrs( rPam, sal_True, &aResetAttrsArray ); + // --> OD 2010-10-05 #i114929# + // On a selection setup a corresponding Point-and-Mark in order to get + // the indentation attribute reset on all paragraphs touched by the selection + if ( rPam.HasMark() && + rPam.End()->nNode.GetNode().GetTxtNode() ) + { + SwPaM aPam( rPam.Start()->nNode, + rPam.End()->nNode ); + aPam.Start()->nContent = 0; + aPam.End()->nContent = rPam.End()->nNode.GetNode().GetTxtNode()->Len(); + ResetAttrs( aPam, FALSE, &aResetAttrsArray ); + } + else + { + ResetAttrs( rPam, FALSE, &aResetAttrsArray ); + } + // <-- } // <-- @@ -1104,22 +1120,27 @@ void SwDoc::SetNumRule( const SwPaM& rPam, void SwDoc::SetCounted(const SwPaM & rPam, bool bCounted) { - // --> OD 2008-04-03 #refactorlists# -// ULONG nStartPos = rPam.Start()->nNode.GetIndex(); -// ULONG nEndPos = rPam.End()->nNode.GetIndex(); - -// for (ULONG n = nStartPos; n <= nEndPos; n++) -// { -// SwTxtNode * pNd = GetNodes()[n]->GetTxtNode(); - -// if (pNd) -// pNd->SetCountedInList(bCounted); -// } if ( bCounted ) { SvUShortsSort aResetAttrsArray; aResetAttrsArray.Insert( RES_PARATR_LIST_ISCOUNTED ); - ResetAttrs( rPam, sal_True, &aResetAttrsArray ); + // --> OD 2010-10-05 #i114929# + // On a selection setup a corresponding Point-and-Mark in order to get + // the list-is-counted attribute reset on all paragraphs touched by the selection + if ( rPam.HasMark() && + rPam.End()->nNode.GetNode().GetTxtNode() ) + { + SwPaM aPam( rPam.Start()->nNode, + rPam.End()->nNode ); + aPam.Start()->nContent = 0; + aPam.End()->nContent = rPam.End()->nNode.GetNode().GetTxtNode()->Len(); + ResetAttrs( aPam, FALSE, &aResetAttrsArray ); + } + else + { + ResetAttrs( rPam, FALSE, &aResetAttrsArray ); + } + // <-- } else { @@ -1128,30 +1149,6 @@ void SwDoc::SetCounted(const SwPaM & rPam, bool bCounted) } } -//void SwDoc::ReplaceNumRule(const SwPaM & rPaM, const SwNumRule & rNumRule) -//{ -// if (DoesUndo()) -// StartUndo(UNDO_START, NULL); - -// ULONG nStt = rPaM.Start()->nNode.GetIndex(); -// ULONG nEnd = rPaM.End()->nNode.GetIndex(); - -// for (ULONG n = nStt; n <= nEnd; n++) -// { -// SwTxtNode * pCNd = GetNodes()[n]->GetTxtNode(); - -// if (pCNd && NULL != pCNd->GetNumRule()) -// { -// SwPaM aPam(*pCNd); - -// InsertPoolItem(aPam, SwNumRuleItem(rNumRule.GetName()), 0); -// } -// } - -// if (DoesUndo()) -// EndUndo(UNDO_START, NULL); -//} - void SwDoc::SetNumRuleStart( const SwPosition& rPos, BOOL bFlag ) { SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode(); -- cgit v1.2.3 From 568569cdcd1a8c816b56d545a14671177db56624 Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Tue, 5 Oct 2010 20:01:23 +0200 Subject: svarray: #i112395#: SvXub_StrLens --- sw/source/core/inc/scriptinfo.hxx | 72 +++++++++++++------------- sw/source/core/layout/laycache.cxx | 2 +- sw/source/core/layout/layhelp.hxx | 4 +- sw/source/core/text/porlay.cxx | 97 ++++++++++++++++++----------------- sw/source/core/text/pormulti.cxx | 102 ++++++++++++++++++------------------- sw/source/filter/html/htmlatr.cxx | 9 ++-- sw/source/filter/html/htmlgrin.cxx | 17 +++---- sw/source/filter/html/swhtml.cxx | 2 +- sw/source/filter/html/swhtml.hxx | 4 +- sw/source/ui/chrdlg/drpcps.cxx | 14 ++--- 10 files changed, 162 insertions(+), 161 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx index efeb702ad9..f0160e80e7 100644 --- a/sw/source/core/inc/scriptinfo.hxx +++ b/sw/source/core/inc/scriptinfo.hxx @@ -139,24 +139,24 @@ public: inline BYTE GetDefaultDir() const { return nDefaultDir; }; // array operations, nCnt refers to array position - inline USHORT CountScriptChg() const; - inline xub_StrLen GetScriptChg( const USHORT nCnt ) const; + inline size_t CountScriptChg() const; + inline xub_StrLen GetScriptChg( const size_t nCnt ) const; inline BYTE GetScriptType( const USHORT nCnt ) const; - inline USHORT CountDirChg() const; - inline xub_StrLen GetDirChg( const USHORT nCnt ) const; - inline BYTE GetDirType( const USHORT nCnt ) const; + inline size_t CountDirChg() const; + inline xub_StrLen GetDirChg( const size_t nCnt ) const; + inline BYTE GetDirType( const size_t nCnt ) const; - inline USHORT CountKashida() const; - inline xub_StrLen GetKashida( const USHORT nCnt ) const; + inline size_t CountKashida() const; + inline xub_StrLen GetKashida( const size_t nCnt ) const; - inline USHORT CountCompChg() const; - inline xub_StrLen GetCompStart( const USHORT nCnt ) const; - inline xub_StrLen GetCompLen( const USHORT nCnt ) const; - inline BYTE GetCompType( const USHORT nCnt ) const; + inline size_t CountCompChg() const; + inline xub_StrLen GetCompStart( const size_t nCnt ) const; + inline xub_StrLen GetCompLen( const size_t nCnt ) const; + inline BYTE GetCompType( const size_t nCnt ) const; - inline USHORT CountHiddenChg() const; - inline xub_StrLen GetHiddenChg( const USHORT nCnt ) const; + inline size_t CountHiddenChg() const; + inline xub_StrLen GetHiddenChg( const size_t nCnt ) const; static void CalcHiddenRanges( const SwTxtNode& rNode, MultiSelection& rHiddenMulti ); @@ -356,59 +356,61 @@ inline void SwScriptInfo::SetInvalidity( const xub_StrLen nPos ) if ( nPos < nInvalidityPos ) nInvalidityPos = nPos; }; -inline USHORT SwScriptInfo::CountScriptChg() const { return aScriptChg.Count(); } -inline xub_StrLen SwScriptInfo::GetScriptChg( const USHORT nCnt ) const +inline size_t SwScriptInfo::CountScriptChg() const { return aScriptChg.size(); } +inline xub_StrLen SwScriptInfo::GetScriptChg( const size_t nCnt ) const { - ASSERT( nCnt < aScriptChg.Count(),"No ScriptChange today!"); + ASSERT( nCnt < aScriptChg.size(),"No ScriptChange today!"); return aScriptChg[ nCnt ]; } inline BYTE SwScriptInfo::GetScriptType( const xub_StrLen nCnt ) const { - ASSERT( nCnt < aScriptChg.Count(),"No ScriptType today!"); + ASSERT( nCnt < aScriptType.Count(),"No ScriptType today!"); return aScriptType[ nCnt ]; } -inline USHORT SwScriptInfo::CountDirChg() const { return aDirChg.Count(); } -inline xub_StrLen SwScriptInfo::GetDirChg( const USHORT nCnt ) const +inline size_t SwScriptInfo::CountDirChg() const { return aDirChg.size(); } +inline xub_StrLen SwScriptInfo::GetDirChg( const size_t nCnt ) const { - ASSERT( nCnt < aDirChg.Count(),"No DirChange today!"); + ASSERT( nCnt < aDirChg.size(),"No DirChange today!"); return aDirChg[ nCnt ]; } -inline BYTE SwScriptInfo::GetDirType( const xub_StrLen nCnt ) const +inline BYTE SwScriptInfo::GetDirType( const size_t nCnt ) const { - ASSERT( nCnt < aDirChg.Count(),"No DirType today!"); + //TODO Check of the solution of the error + ASSERT( nCnt < aDirType.size(),"No DirType today!"); return aDirType[ nCnt ]; } -inline USHORT SwScriptInfo::CountKashida() const { return aKashida.Count(); } -inline xub_StrLen SwScriptInfo::GetKashida( const USHORT nCnt ) const +inline size_t SwScriptInfo::CountKashida() const { return aKashida.size(); } +inline xub_StrLen SwScriptInfo::GetKashida( const size_t nCnt ) const { - ASSERT( nCnt < aKashida.Count(),"No Kashidas today!"); + ASSERT( nCnt < aKashida.size(),"No Kashidas today!"); return aKashida[ nCnt ]; } -inline USHORT SwScriptInfo::CountCompChg() const { return aCompChg.Count(); }; -inline xub_StrLen SwScriptInfo::GetCompStart( const USHORT nCnt ) const +inline size_t SwScriptInfo::CountCompChg() const { return aCompChg.size(); }; +inline xub_StrLen SwScriptInfo::GetCompStart( const size_t nCnt ) const { - ASSERT( nCnt < aCompChg.Count(),"No CompressionStart today!"); + ASSERT( nCnt < aCompChg.size(),"No CompressionStart today!"); return aCompChg[ nCnt ]; } -inline xub_StrLen SwScriptInfo::GetCompLen( const USHORT nCnt ) const +inline xub_StrLen SwScriptInfo::GetCompLen( const size_t nCnt ) const { - ASSERT( nCnt < aCompChg.Count(),"No CompressionLen today!"); + //TODO Check solution of the error + ASSERT( nCnt < aCompLen.size(),"No CompressionLen today!"); return aCompLen[ nCnt ]; } -inline BYTE SwScriptInfo::GetCompType( const USHORT nCnt ) const +inline BYTE SwScriptInfo::GetCompType( const size_t nCnt ) const { - ASSERT( nCnt < aCompChg.Count(),"No CompressionType today!"); + ASSERT( nCnt < aCompType.size(),"No CompressionType today!"); return aCompType[ nCnt ]; } -inline USHORT SwScriptInfo::CountHiddenChg() const { return aHiddenChg.Count(); }; -inline xub_StrLen SwScriptInfo::GetHiddenChg( const USHORT nCnt ) const +inline size_t SwScriptInfo::CountHiddenChg() const { return aHiddenChg.size(); }; +inline xub_StrLen SwScriptInfo::GetHiddenChg( const size_t nCnt ) const { - ASSERT( nCnt < aHiddenChg.Count(),"No HiddenChg today!"); + ASSERT( nCnt < aHiddenChg.size(),"No HiddenChg today!"); return aHiddenChg[ nCnt ]; } diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index d14318f52b..b0148cb96d 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -102,7 +102,7 @@ void SwLayCacheImpl::Insert( USHORT nType, ULONG nIndex, xub_StrLen nOffset ) { aType.Insert( nType, aType.Count() ); SvULongs::Insert( nIndex, SvULongs::Count() ); - aOffset.Insert( nOffset, aOffset.Count() ); + aOffset.push_back( nOffset ); } BOOL SwLayCacheImpl::Read( SvStream& rStream ) diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx index 5965d0b9ab..fe4290322d 100644 --- a/sw/source/core/layout/layhelp.hxx +++ b/sw/source/core/layout/layhelp.hxx @@ -71,11 +71,11 @@ class SwLayCacheImpl : public SvULongs void Insert( USHORT nType, ULONG nIndex, xub_StrLen nOffset ); public: - SwLayCacheImpl() : SvULongs( 20, 10 ), aOffset( 20, 10 ), aType( 20, 10 ) {} + SwLayCacheImpl() : SvULongs( 20, 10 ), aType( 20, 10 ) {} BOOL Read( SvStream& rStream ); ULONG GetBreakIndex( USHORT nIdx ) const { return GetObject( nIdx ); } - xub_StrLen GetBreakOfst( USHORT nIdx ) const { return aOffset[ nIdx ]; } + xub_StrLen GetBreakOfst( size_t nIdx ) const { return aOffset[ nIdx ]; } USHORT GetBreakType( USHORT nIdx ) const { return aType[ nIdx ]; } USHORT GetFlyCount() const { return aFlyCache.Count(); } diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index ea26919892..ec28e28568 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -805,8 +805,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) MultiSelection aHiddenMulti( aRange ); CalcHiddenRanges( rNode, aHiddenMulti ); - aHiddenChg.Remove( 0, aHiddenChg.Count() ); - USHORT nHiddenIdx = 0; + aHiddenChg.clear(); USHORT i = 0; for( i = 0; i < aHiddenMulti.GetRangeCount(); ++i ) { @@ -814,8 +813,8 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) const xub_StrLen nStart = (xub_StrLen)rRange.Min(); const xub_StrLen nEnd = (xub_StrLen)rRange.Max() + 1; - aHiddenChg.Insert( nStart, nHiddenIdx++ ); - aHiddenChg.Insert( nEnd, nHiddenIdx++ ); + aHiddenChg.push_back( nStart ); + aHiddenChg.push_back( nEnd ); } // @@ -915,9 +914,9 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) // // remove invalid entries from script information arrays - const USHORT nScriptRemove = aScriptChg.Count() - nCnt; - aScriptChg.Remove( nCnt, nScriptRemove ); - aScriptType.erase( aScriptType.begin() + nCnt, aScriptType.end() ); + const size_t nScriptRemove = aScriptChg.size() - nCnt; + aScriptChg.erase( aScriptChg.begin() + nCnt, aScriptChg.end() ); + aScriptType.erase( aScriptType.begin() + nCnt, aScriptType.begin() + (nCnt + nScriptRemove) ); // get the start of the last compression group USHORT nLastCompression = nChg; @@ -933,9 +932,9 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) } // remove invalid entries from compression information arrays - const USHORT nCompRemove = aCompChg.Count() - nCntComp; - aCompChg.Remove( nCntComp, nCompRemove ); - aCompLen.Remove( nCntComp, nCompRemove ); + const size_t nCompRemove = aCompChg.size() - nCntComp; + aCompChg.erase( aCompChg.begin() + nCntComp, aCompChg.end() ); + aCompLen.erase( aCompLen.begin() + nCntComp, aCompLen.begin() + (nCntComp + nCompRemove) ); aCompType.erase( aCompType.begin() + nCntComp, aCompType.end() ); // get the start of the last kashida group @@ -947,7 +946,8 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) } // remove invalid entries from kashida array - aKashida.Remove( nCntKash, aKashida.Count() - nCntKash ); + //FIXME Is it correct? + aKashida.erase( aKashida.begin() + nCntKash, aKashida.end() - nCntKash ); // // TAKE CARE OF WEAK CHARACTERS: WE MUST FIND AN APPROPRIATE @@ -981,7 +981,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) if ( nScript != nNextScript ) { - aScriptChg.Insert( nEnd, nCnt ); + aScriptChg.insert( aScriptChg.begin() + nCnt, nEnd ); aScriptType.insert( aScriptType.begin() + nCnt, nScript ); nCnt++; nScript = nNextScript; @@ -992,7 +992,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) // UPDATE THE SCRIPT INFO ARRAYS: // - while ( nChg < rTxt.Len() || ( !aScriptChg.Count() && !rTxt.Len() ) ) + while ( nChg < rTxt.Len() || ( aScriptChg.empty() && !rTxt.Len() ) ) { ASSERT( i18n::ScriptType::WEAK != nScript, "Inserting WEAK into SwScriptInfo structure" ); @@ -1033,16 +1033,16 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) if (nType == U_NON_SPACING_MARK || nType == U_ENCLOSING_MARK || nType == U_COMBINING_SPACING_MARK ) { - aScriptChg.Insert( nChg - 1, nCnt ); + aScriptChg.insert( aScriptChg.begin() + nCnt, nChg - 1 ); } else { - aScriptChg.Insert( nChg, nCnt ); + aScriptChg.insert( aScriptChg.begin() + nCnt, nChg ); } } else { - aScriptChg.Insert( nChg, nCnt ); + aScriptChg.insert( aScriptChg.begin() + nCnt, nChg ); } aScriptType.insert( aScriptType.begin() + nCnt, nScript ); nCnt++; @@ -1089,10 +1089,11 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) if ( CHARCOMPRESS_PUNCTUATION_KANA == aCompEnum || ePrevState != KANA ) { - aCompChg.Insert( nPrevChg, nCntComp ); + aCompChg.insert( aCompChg.begin() + nCntComp, nPrevChg ); BYTE nTmpType = ePrevState; aCompType.insert( aCompType.begin() + nCntComp, nTmpType ); - aCompLen.Insert( nLastCompression - nPrevChg, nCntComp++ ); + aCompLen.insert( aCompLen.begin() + nCntComp, nLastCompression - nPrevChg ); + nCntComp++; } } @@ -1110,10 +1111,11 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) if ( CHARCOMPRESS_PUNCTUATION_KANA == aCompEnum || ePrevState != KANA ) { - aCompChg.Insert( nPrevChg, nCntComp ); + aCompChg.insert( aCompChg.begin() + nCntComp, nPrevChg ); BYTE nTmpType = ePrevState; aCompType.insert( aCompType.begin() + nCntComp, nTmpType ); - aCompLen.Insert( nLastCompression - nPrevChg, nCntComp++ ); + aCompLen.insert( aCompLen.begin() + nCntComp, nLastCompression - nPrevChg ); + nCntComp++; } } } @@ -1279,7 +1281,10 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) } // end of current word if ( STRING_LEN != nKashidaPos ) - aKashida.Insert( nKashidaPos, nCntKash++ ); + { + aKashida.insert( aKashida.begin() + nCntKash, nKashidaPos); + nCntKash++; + } } // end of kashida search } @@ -1294,7 +1299,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) // check kashida data long nTmpKashidaPos = -1; sal_Bool bWrongKash = sal_False; - for (i = 0; i < aKashida.Count(); ++i ) + for (i = 0; i < aKashida.size(); ++i ) { long nCurrKashidaPos = GetKashida( i ); if ( nCurrKashidaPos <= nTmpKashidaPos ) @@ -1308,8 +1313,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) #endif // remove invalid entries from direction information arrays - const USHORT nDirRemove = aDirChg.Count(); - aDirChg.Remove( 0, nDirRemove ); + aDirChg.clear(); aDirType.clear(); // Perform Unicode Bidi Algorithm for text direction information @@ -1330,7 +1334,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) // 1. All text in RTL runs will use the CTL font // #i89825# change the script type also to CTL (hennerdrewes) // 2. Text in embedded LTR runs that does not have any strong LTR characters (numbers!) - for ( USHORT nDirIdx = 0; nDirIdx < aDirChg.Count(); ++nDirIdx ) + for ( size_t nDirIdx = 0; nDirIdx < aDirChg.size(); ++nDirIdx ) { const BYTE nCurrDirType = GetDirType( nDirIdx ); // nStart ist start of RTL run: @@ -1342,7 +1346,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) ( nCurrDirType > UBIDI_LTR && !lcl_HasStrongLTR( rTxt, nStart, nEnd ) ) ) // non-strong text in embedded LTR run { // nScriptIdx points into the ScriptArrays: - USHORT nScriptIdx = 0; + size_t nScriptIdx = 0; // Skip entries in ScriptArray which are not inside the RTL run: // Make nScriptIdx become the index of the script group with @@ -1362,20 +1366,20 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) // we have to insert a new script change: if ( nStart > 0 && nStartPosOfGroup < nStart ) { - aScriptChg.Insert( nStart, nScriptIdx ); + aScriptChg.insert( aScriptChg.begin() + nScriptIdx, nStart ); aScriptType.insert( aScriptType.begin() + nScriptIdx, nScriptTypeOfGroup ); ++nScriptIdx; } // Remove entries in ScriptArray which end inside the RTL run: - while ( nScriptIdx < aScriptChg.Count() && GetScriptChg( nScriptIdx ) <= nEnd ) + while ( nScriptIdx < aScriptChg.size() && GetScriptChg( nScriptIdx ) <= nEnd ) { - aScriptChg.Remove( nScriptIdx, 1 ); + aScriptChg.erase( aScriptChg.begin() + nScriptIdx ); aScriptType.erase( aScriptType.begin() + nScriptIdx ); } // Insert a new entry in ScriptArray for the end of the RTL run: - aScriptChg.Insert( nEnd, nScriptIdx ); + aScriptChg.insert( aScriptChg.begin() + nScriptIdx, nEnd ); aScriptType.insert( aScriptType.begin() + nScriptIdx, i18n::ScriptType::COMPLEX ); #if OSL_DEBUG_LEVEL > 1 @@ -1386,7 +1390,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) (void) nLastScriptChg; (void) nLastScriptType; - for ( USHORT i2 = 0; i2 < aScriptChg.Count(); ++i2 ) + for ( size_t i2 = 0; i2 < aScriptChg.size(); ++i2 ) { nScriptChg = GetScriptChg( i2 ); nScriptType = GetScriptType( i2 ); @@ -1403,8 +1407,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) void SwScriptInfo::UpdateBidiInfo( const String& rTxt ) { // remove invalid entries from direction information arrays - const USHORT nDirRemove = aDirChg.Count(); - aDirChg.Remove( 0, nDirRemove ); + aDirChg.clear(); aDirType.clear(); // @@ -1422,14 +1425,12 @@ void SwScriptInfo::UpdateBidiInfo( const String& rTxt ) int32_t nEnd; UBiDiLevel nCurrDir; // counter for direction information arrays - USHORT nCntDir = 0; for ( USHORT nIdx = 0; nIdx < nCount; ++nIdx ) { ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir ); - aDirChg.Insert( (USHORT)nEnd, nCntDir ); + aDirChg.push_back( (USHORT)nEnd ); aDirType.push_back( (BYTE)nCurrDir ); - nCntDir++; nStart = nEnd; } @@ -2014,7 +2015,7 @@ sal_Bool SwScriptInfo::IsArabicText( const XubString& rTxt, xub_StrLen nStt, xub sal_Bool SwScriptInfo::IsKashidaValid ( xub_StrLen nKashPos ) const { - for ( xub_StrLen i = 0; i < aKashidaInvalid.Count(); ++i ) + for ( size_t i = 0; i < aKashidaInvalid.size(); ++i ) { if ( aKashidaInvalid [ i ] == nKashPos ) return false; @@ -2026,13 +2027,13 @@ sal_Bool SwScriptInfo::IsKashidaValid ( xub_StrLen nKashPos ) const * SwScriptInfo::ClearKashidaInvalid() *************************************************************************/ -void SwScriptInfo::ClearKashidaInvalid ( xub_StrLen nKashPos ) +void SwScriptInfo::ClearKashidaInvalid ( xub_StrLen nKashPos ) { - for ( xub_StrLen i = 0; i < aKashidaInvalid.Count(); ++i ) + for ( size_t i = 0; i < aKashidaInvalid.size(); ++i ) { if ( aKashidaInvalid [ i ] == nKashPos ) { - aKashidaInvalid.Remove (i, 1); + aKashidaInvalid.erase ( aKashidaInvalid.begin() + i ); return; } } @@ -2088,7 +2089,7 @@ bool SwScriptInfo::MarkOrClearKashidaInvalid ( xub_StrLen nStt, xub_StrLen nLen, void SwScriptInfo::MarkKashidaInvalid ( xub_StrLen nKashPos ) { - aKashidaInvalid.Insert( nKashPos, aKashidaInvalid.Count() ); + aKashidaInvalid.push_back( nKashPos ); } /************************************************************************* @@ -2125,8 +2126,8 @@ USHORT SwScriptInfo::GetKashidaPositions ( xub_StrLen nStt, xub_StrLen nLen, void SwScriptInfo::SetNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen ) { - aNoKashidaLine.Insert( nStt, aNoKashidaLine.Count()); - aNoKashidaLineEnd.Insert( nStt+nLen, aNoKashidaLineEnd.Count()); + aNoKashidaLine.push_back( nStt ); + aNoKashidaLineEnd.push_back( nStt+nLen ); } /************************************************************************* @@ -2136,7 +2137,7 @@ void SwScriptInfo::SetNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen ) bool SwScriptInfo::IsKashidaLine ( xub_StrLen nCharIdx ) const { - for( xub_StrLen i = 0; i < aNoKashidaLine.Count(); ++i ) + for( size_t i = 0; i < aNoKashidaLine.size(); ++i ) { if( nCharIdx >= aNoKashidaLine[ i ] && nCharIdx < aNoKashidaLineEnd[ i ]) return false; @@ -2149,13 +2150,13 @@ bool SwScriptInfo::IsKashidaLine ( xub_StrLen nCharIdx ) const void SwScriptInfo::ClearNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen ) { - xub_StrLen i = 0; - while( i < aNoKashidaLine.Count()) + size_t i = 0; + while( i < aNoKashidaLine.size()) { if( nStt + nLen >= aNoKashidaLine[ i ] && nStt < aNoKashidaLineEnd [ i ] ) { - aNoKashidaLine.Remove(i, 1); - aNoKashidaLineEnd.Remove(i, 1); + aNoKashidaLine.erase(aNoKashidaLine.begin() + i); + aNoKashidaLineEnd.erase(aNoKashidaLineEnd.begin() + i); } else ++i; diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index f071c96127..70d04f6f35 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -1022,10 +1022,10 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, { pRet->pItem = NULL; pRet->pAttr = (*pHints)[n2Lines]; - aEnd.Insert( *pRet->pAttr->GetEnd(), 0 ); + aEnd.push_front( *pRet->pAttr->GetEnd() ); if( pItem ) { - aEnd[ 0 ] = GetTxt().Len(); + aEnd.front() = GetTxt().Len(); bOn = ((SvxTwoLinesItem*)pItem)->GetEndBracket() == p2Lines->GetEndBracket() && ((SvxTwoLinesItem*)pItem)->GetStartBracket() == @@ -1036,7 +1036,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, { pRet->pItem = pItem; pRet->pAttr = NULL; - aEnd.Insert( GetTxt().Len(), 0 ); + aEnd.push_front( GetTxt().Len() ); } pRet->nId = SW_MC_DOUBLE; pRet->nLevel = GetTxtFrm()->IsRightToLeft() ? 1 : 0; @@ -1070,23 +1070,23 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, // If the start of the next atribute is behind the end of // the last attribute on the aEnd-stack, this is the endposition // on the stack is the end of the 2-line portion. - if( !bOn || aEnd[ aEnd.Count()-1 ] < *pTmp->GetStart() ) + if( !bOn || aEnd.back() < *pTmp->GetStart() ) break; // At this moment, bOn is TRUE and the next attribute starts // behind rPos, so we could move rPos to the next startpoint rPos = *pTmp->GetStart(); // We clean up the aEnd-stack, endpositions equal to rPos are // superfluous. - while( aEnd.Count() && aEnd[ aEnd.Count()-1 ] <= rPos ) + while( !aEnd.empty() && aEnd.back() <= rPos ) { bOn = !bOn; - aEnd.Remove( aEnd.Count()-1, 1 ); + aEnd.pop_back(); } // If the endstack is empty, we simulate an attribute with // state TRUE and endposition rPos - if( !aEnd.Count() ) + if( aEnd.empty() ) { - aEnd.Insert( rPos, 0 ); + aEnd.push_front( rPos ); bOn = sal_True; } } @@ -1098,8 +1098,8 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, if( bTwo == bOn ) { // .. with the same state, so the last attribute could // be continued. - if( aEnd[ aEnd.Count()-1 ] < *pTmp->GetEnd() ) - aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd(); + if( aEnd.back() < *pTmp->GetEnd() ) + aEnd.back() = *pTmp->GetEnd(); } else { // .. with a different state. @@ -1107,17 +1107,17 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, // If this is smaller than the last on the stack, we put // it on the stack. If it has the same endposition, the last // could be removed. - if( aEnd[ aEnd.Count()-1 ] > *pTmp->GetEnd() ) - aEnd.Insert( *pTmp->GetEnd(), aEnd.Count() ); - else if( aEnd.Count() > 1 ) - aEnd.Remove( aEnd.Count()-1, 1 ); + if( aEnd.back() > *pTmp->GetEnd() ) + aEnd.push_back( *pTmp->GetEnd() ); + else if( aEnd.size() > 1 ) + aEnd.pop_back(); else - aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd(); + aEnd.back() = *pTmp->GetEnd(); } } } - if( bOn && aEnd.Count() ) - rPos = aEnd[ aEnd.Count()-1 ]; + if( bOn && !aEnd.empty() ) + rPos = aEnd.back(); return pRet; } if( nRotate < nCount || ( pRotItem && pRotItem == pRotate && @@ -1133,7 +1133,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, // The bOn flag signs the state of the last 2-line attribute in the // aEnd-stack, which could interrupts the winning rotation attribute. sal_Bool bOn = pItem ? sal_True : sal_False; - aEnd.Insert( GetTxt().Len(), 0 ); + aEnd.push_front( GetTxt().Len() ); // n2Lines is the index of the last 2-line-attribute, which contains // the actual position. i = 0; @@ -1145,17 +1145,17 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, continue; if( n2Start < *pTmp->GetStart() ) { - if( bOn || aEnd[ aEnd.Count()-1 ] < *pTmp->GetStart() ) + if( bOn || aEnd.back() < *pTmp->GetStart() ) break; n2Start = *pTmp->GetStart(); - while( aEnd.Count() && aEnd[ aEnd.Count()-1 ] <= n2Start ) + while( !aEnd.empty() && aEnd.back() <= n2Start ) { bOn = !bOn; - aEnd.Remove( aEnd.Count()-1, 1 ); + aEnd.pop_back(); } - if( !aEnd.Count() ) + if( aEnd.empty() ) { - aEnd.Insert( n2Start, 0 ); + aEnd.push_front( n2Start ); bOn = sal_False; } } @@ -1170,36 +1170,36 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, { if( bTwo == bOn ) { - if( aEnd[ aEnd.Count()-1 ] < *pTmp->GetEnd() ) - aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd(); + if( aEnd.back() < *pTmp->GetEnd() ) + aEnd.back() = *pTmp->GetEnd(); } else { bOn = bTwo; - if( aEnd[ aEnd.Count()-1 ] > *pTmp->GetEnd() ) - aEnd.Insert( *pTmp->GetEnd(), aEnd.Count() ); - else if( aEnd.Count() > 1 ) - aEnd.Remove( aEnd.Count()-1, 1 ); + if( aEnd.back() > *pTmp->GetEnd() ) + aEnd.push_back( *pTmp->GetEnd() ); + else if( aEnd.size() > 1 ) + aEnd.pop_back(); else - aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd(); + aEnd.back() = *pTmp->GetEnd(); } } } - if( !bOn && aEnd.Count() ) - n2Start = aEnd[ aEnd.Count()-1 ]; + if( !bOn && !aEnd.empty() ) + n2Start = aEnd.back(); - if( aEnd.Count() ) - aEnd.Remove( 0, aEnd.Count() ); + if( !aEnd.empty() ) + aEnd.clear(); bOn = sal_True; if( nRotate < nCount ) { pRet->pItem = NULL; pRet->pAttr = (*pHints)[nRotate]; - aEnd.Insert( *pRet->pAttr->GetEnd(), 0 ); + aEnd.push_front( *pRet->pAttr->GetEnd() ); if( pRotItem ) { - aEnd[ 0 ] = GetTxt().Len(); + aEnd.front() = GetTxt().Len(); bOn = ((SvxCharRotateItem*)pRotItem)->GetValue() == pRotate->GetValue(); } @@ -1208,7 +1208,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, { pRet->pItem = pRotItem; pRet->pAttr = NULL; - aEnd.Insert( GetTxt().Len(), 0 ); + aEnd.push_front( GetTxt().Len() ); } i = 0; while( i < nCount ) @@ -1218,17 +1218,17 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, continue; if( rPos < *pTmp->GetStart() ) { - if( !bOn || aEnd[ aEnd.Count()-1 ] < *pTmp->GetStart() ) + if( !bOn || aEnd.back() < *pTmp->GetStart() ) break; rPos = *pTmp->GetStart(); - while( aEnd.Count() && aEnd[ aEnd.Count()-1 ] <= rPos ) + while( !aEnd.empty() && aEnd.back() <= rPos ) { bOn = !bOn; - aEnd.Remove( aEnd.Count()-1, 1 ); + aEnd.pop_back(); } - if( !aEnd.Count() ) + if( aEnd.empty() ) { - aEnd.Insert( rPos, 0 ); + aEnd.push_front( rPos ); bOn = sal_True; } } @@ -1241,23 +1241,23 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, { if( bTwo == bOn ) { - if( aEnd[ aEnd.Count()-1 ] < *pTmp->GetEnd() ) - aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd(); + if( aEnd.back() < *pTmp->GetEnd() ) + aEnd.back() = *pTmp->GetEnd(); } else { bOn = bTwo; - if( aEnd[ aEnd.Count()-1 ] > *pTmp->GetEnd() ) - aEnd.Insert( *pTmp->GetEnd(), aEnd.Count() ); - else if( aEnd.Count() > 1 ) - aEnd.Remove( aEnd.Count()-1, 1 ); + if( aEnd.back() > *pTmp->GetEnd() ) + aEnd.push_back( *pTmp->GetEnd() ); + else if( aEnd.size() > 1 ) + aEnd.pop_back(); else - aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd(); + aEnd.back() = *pTmp->GetEnd(); } } } - if( bOn && aEnd.Count() ) - rPos = aEnd[ aEnd.Count()-1 ]; + if( bOn && !aEnd.empty() ) + rPos = aEnd.back(); if( rPos > n2Start ) rPos = n2Start; return pRet; diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index d0f73494bb..58f3457ba0 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -1797,7 +1797,7 @@ HTMLEndPosLst::HTMLEndPosLst( SwDoc *pD, SwDoc* pTempl, { sal_uInt16 nScript = pBreakIt->GetBreakIter()->getScriptType( rText, nPos ); nPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( rText, nPos, nScript ); - aScriptChgLst.Insert( nPos, aScriptChgLst.Count() ); + aScriptChgLst.push_back( nPos ); aScriptLst.Insert( nScript, aScriptLst.Count() ); } } @@ -1995,9 +1995,8 @@ void HTMLEndPosLst::Insert( const SfxPoolItem& rItem, if( bDependsOnScript ) { - sal_uInt16 nScriptChgs = aScriptChgLst.Count(); xub_StrLen nPos = nStart; - for( sal_uInt16 i=0; i < nScriptChgs; i++ ) + for( size_t i=0; i < aScriptChgLst.size(); i++ ) { xub_StrLen nChgPos = aScriptChgLst[i]; if( nPos >= nChgPos ) @@ -2080,8 +2079,8 @@ sal_uInt16 HTMLEndPosLst::GetScriptAtPos( xub_StrLen nPos , { sal_uInt16 nRet = CSS1_OUTMODE_ANY_SCRIPT; - sal_uInt16 nScriptChgs = aScriptChgLst.Count(); - sal_uInt16 i=0; + size_t nScriptChgs = aScriptChgLst.size(); + size_t i=0; while( i < nScriptChgs && nPos >= aScriptChgLst[i] ) i++; ASSERT( i < nScriptChgs, "script list is to short" ); diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 707b62c2cf..910b1bcdd6 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -166,7 +166,7 @@ void SwHTMLParser::ConnectImageMaps() } -/* */ +/* */ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri, sal_Int16 eHoriOri, @@ -302,12 +302,11 @@ void SwHTMLParser::RegisterFlyFrm( SwFrmFmt *pFlyFmt ) SURROUND_THROUGHT == pFlyFmt->GetSurround().GetSurround() ) { aMoveFlyFrms.Insert( pFlyFmt, aMoveFlyFrms.Count() ); - aMoveFlyCnts.Insert( pPam->GetPoint()->nContent.GetIndex(), - aMoveFlyCnts.Count() ); + aMoveFlyCnts.push_back( pPam->GetPoint()->nContent.GetIndex() ); } } -/* */ +/* */ void SwHTMLParser::GetDefaultScriptType( ScriptType& rType, String& rTypeStr ) const @@ -319,7 +318,7 @@ void SwHTMLParser::GetDefaultScriptType( ScriptType& rType, rTypeStr = GetScriptTypeString( pHeaderAttrs ); } -/* */ +/* */ void SwHTMLParser::InsertImage() { @@ -816,7 +815,7 @@ IMAGE_SETEVENT: InsertBookmark( aId ); } -/* */ +/* */ void SwHTMLParser::InsertBodyOptions() { @@ -1047,7 +1046,7 @@ void SwHTMLParser::InsertBodyOptions() InsertBookmark( aId ); } -/* */ +/* */ void SwHTMLParser::NewAnchor() { @@ -1268,7 +1267,7 @@ void SwHTMLParser::EndAnchor() EndTag( HTML_ANCHOR_OFF ); } -/* */ +/* */ void SwHTMLParser::InsertBookmark( const String& rName ) { @@ -1324,7 +1323,7 @@ BOOL SwHTMLParser::HasCurrentParaBookmarks( BOOL bIgnoreStack ) const return bHasMarks; } -/* */ +/* */ void SwHTMLParser::StripTrailingPara() { diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index a15300b76c..6da1f4d4f1 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -2881,7 +2881,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable, pFrmFmt->MakeFrms(); aMoveFlyFrms.Remove( n, 1 ); - aMoveFlyCnts.Remove( n, 1 ); + aMoveFlyCnts.erase( aMoveFlyCnts.begin() + n ); } } while( aFields.Count() ) diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 7f5fb3cdbe..caacc864a9 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -406,8 +406,8 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient _HTMLAttrs aParaAttrs; // vorlauefige Absatz-Attribute _HTMLAttrTable aAttrTab; // "offene" Attribute _HTMLAttrContexts aContexts;// der aktuelle Attribut/Token-Kontext - SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, deren Anker verschoben wird - SvXub_StrLens aMoveFlyCnts;// und deren Content-Positionen + SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, the anchor is moved + SvXub_StrLens aMoveFlyCnts;// and the Content-Positions SwApplet_Impl *pAppletImpl; // das aktuelle Applet diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index d05fe5976e..f69fcc577f 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -364,10 +364,10 @@ void SwDropCapsPict::DrawPrev( const Point& rPt ) Font aOldFont = mpPrinter->GetFont(); USHORT nScript; - USHORT nIdx = 0; + size_t nIdx = 0; xub_StrLen nStart = 0; xub_StrLen nEnd; - USHORT nCnt = maScriptChg.Count(); + size_t nCnt = maScriptChg.size(); if( nCnt ) { @@ -406,10 +406,10 @@ void SwDropCapsPict::CheckScript( void ) return; maScriptText = maText; - USHORT nCnt = maScriptChg.Count(); + size_t nCnt = maScriptChg.size(); if( nCnt ) { - maScriptChg.Remove( 0, nCnt ); + maScriptChg.clear(); maScriptType.Remove( 0, nCnt ); maTextWidth.Remove( 0, nCnt ); nCnt = 0; @@ -436,7 +436,7 @@ void SwDropCapsPict::CheckScript( void ) do { nChg = (xub_StrLen)xBreak->endOfScript( maText, nChg, nScript ); - maScriptChg.Insert( nChg, nCnt ); + maScriptChg.push_back( nChg ); maScriptType.Insert( nScript, nCnt ); maTextWidth.Insert( ULONG(0), nCnt++ ); @@ -453,10 +453,10 @@ Size SwDropCapsPict::CalcTextSize( void ) InitPrinter(); USHORT nScript; - USHORT nIdx = 0; + size_t nIdx = 0; xub_StrLen nStart = 0; xub_StrLen nEnd; - USHORT nCnt = maScriptChg.Count(); + size_t nCnt = maScriptChg.size(); if( nCnt ) { nEnd = maScriptChg[ nIdx ]; -- cgit v1.2.3 From 5cea5ea4a2b8302123cfc6391f7f61d8f77871fd Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 7 Oct 2010 11:26:03 +0200 Subject: sw34bf01: #i112425#: fix wntmsci12 warning --- sw/source/core/fields/expfld.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 7bbd73a34e..bb4d56728d 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -836,13 +836,13 @@ String SwSetExpField::Expand() const String SwSetExpField::GetFieldName() const { - USHORT const nStrType( (IsSequenceFld()) + SwFldTypesEnum const nStrType( (IsSequenceFld()) ? TYP_SEQFLD : (bInput) ? TYP_SETINPFLD : TYP_SETFLD ); - String aStr( SwFieldType::GetTypeStr( nStrType ) ); + String aStr( SwFieldType::GetTypeStr( static_cast(nStrType) ) ); aStr += ' '; aStr += GetTyp()->GetName(); -- cgit v1.2.3 From e474e54a5177db18c3f844bf867cb2aef9e0c00d Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Thu, 7 Oct 2010 20:14:31 +0200 Subject: svarray: #i112395#: fix bug, remove SvXub_StrLensSort and plains --- sw/source/core/inc/scriptinfo.hxx | 2 -- sw/source/core/text/porlay.cxx | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx index f0160e80e7..fb9f59654a 100644 --- a/sw/source/core/inc/scriptinfo.hxx +++ b/sw/source/core/inc/scriptinfo.hxx @@ -376,7 +376,6 @@ inline xub_StrLen SwScriptInfo::GetDirChg( const size_t nCnt ) const } inline BYTE SwScriptInfo::GetDirType( const size_t nCnt ) const { - //TODO Check of the solution of the error ASSERT( nCnt < aDirType.size(),"No DirType today!"); return aDirType[ nCnt ]; } @@ -396,7 +395,6 @@ inline xub_StrLen SwScriptInfo::GetCompStart( const size_t nCnt ) const } inline xub_StrLen SwScriptInfo::GetCompLen( const size_t nCnt ) const { - //TODO Check solution of the error ASSERT( nCnt < aCompLen.size(),"No CompressionLen today!"); return aCompLen[ nCnt ]; } diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index ec28e28568..2aff9ba362 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -946,8 +946,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) } // remove invalid entries from kashida array - //FIXME Is it correct? - aKashida.erase( aKashida.begin() + nCntKash, aKashida.end() - nCntKash ); + aKashida.erase( aKashida.begin() + nCntKash, aKashida.end() ); // // TAKE CARE OF WEAK CHARACTERS: WE MUST FIND AN APPROPRIATE -- cgit v1.2.3 From 8faef1b156cecd57fc4f4730f459f205cb5cda69 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 11 Oct 2010 17:56:12 +0200 Subject: CWS changehid: generate former auto hids into src files --- starmath/source/smres.src | 56 +++++++++++++++++ sw/source/ui/chrdlg/ccoll.src | 5 ++ sw/source/ui/chrdlg/chardlg.src | 8 +++ sw/source/ui/chrdlg/drpcps.src | 7 +++ sw/source/ui/chrdlg/numpara.src | 8 +++ sw/source/ui/chrdlg/swbreak.src | 6 ++ sw/source/ui/config/mailconfigpage.src | 22 +++++++ sw/source/ui/config/optcomp.src | 3 + sw/source/ui/config/optdlg.src | 80 ++++++++++++++++++++++++ sw/source/ui/config/optload.src | 18 ++++++ sw/source/ui/config/redlopt.src | 8 +++ sw/source/ui/dbui/addresslistdialog.src | 5 ++ sw/source/ui/dbui/createaddresslistdialog.src | 13 ++++ sw/source/ui/dbui/customizeaddresslistdialog.src | 7 +++ sw/source/ui/dbui/dbinsdlg.src | 21 +++++++ sw/source/ui/dbui/dbui.src | 1 + sw/source/ui/dbui/mailmergechildwindow.src | 1 + sw/source/ui/dbui/mailmergewizard.src | 1 + sw/source/ui/dbui/mmaddressblockpage.src | 23 +++++++ sw/source/ui/dbui/mmdocselectpage.src | 8 +++ sw/source/ui/dbui/mmgreetingspage.src | 6 ++ sw/source/ui/dbui/mmlayoutpage.src | 6 ++ sw/source/ui/dbui/mmmergepage.src | 6 ++ sw/source/ui/dbui/mmoutputpage.src | 27 ++++++++ sw/source/ui/dbui/mmoutputtypepage.src | 2 + sw/source/ui/dbui/mmpreparemergepage.src | 7 +++ sw/source/ui/dbui/selectdbtabledialog.src | 1 + sw/source/ui/dialog/abstract.src | 2 + sw/source/ui/dialog/ascfldlg.src | 6 ++ sw/source/ui/dialog/docstdlg.src | 1 + sw/source/ui/dialog/regionsw.src | 42 +++++++++++++ sw/source/ui/dochdl/selglos.src | 1 + sw/source/ui/envelp/envfmt.src | 9 +++ sw/source/ui/envelp/envlop.src | 7 +++ sw/source/ui/envelp/envprt.src | 5 ++ sw/source/ui/envelp/label.src | 44 +++++++++++++ sw/source/ui/envelp/labfmt.src | 11 ++++ sw/source/ui/envelp/labprt.src | 6 ++ sw/source/ui/envelp/mailmrge.src | 27 ++++++++ sw/source/ui/fldui/DropDownFieldDialog.src | 3 + sw/source/ui/fldui/changedb.src | 2 + sw/source/ui/fldui/flddb.src | 8 +++ sw/source/ui/fldui/flddinf.src | 3 + sw/source/ui/fldui/flddok.src | 8 +++ sw/source/ui/fldui/fldfunc.src | 15 +++++ sw/source/ui/fldui/fldref.src | 5 ++ sw/source/ui/fldui/fldvar.src | 9 +++ sw/source/ui/fldui/inpdlg.src | 3 + sw/source/ui/fldui/javaedit.src | 9 +++ sw/source/ui/frmdlg/column.src | 15 +++++ sw/source/ui/frmdlg/cption.src | 13 ++++ sw/source/ui/frmdlg/frmpage.src | 44 +++++++++++++ sw/source/ui/frmdlg/wrap.src | 14 +++++ sw/source/ui/index/cnttab.src | 72 +++++++++++++++++++++ sw/source/ui/index/idxmrk.src | 1 + sw/source/ui/index/multmrk.src | 1 + sw/source/ui/misc/bookmark.src | 2 + sw/source/ui/misc/docfnote.src | 26 ++++++++ sw/source/ui/misc/glosbib.src | 5 ++ sw/source/ui/misc/glossary.src | 13 ++++ sw/source/ui/misc/insfnote.src | 9 +++ sw/source/ui/misc/linenum.src | 11 ++++ sw/source/ui/misc/num.src | 12 ++++ sw/source/ui/misc/outline.src | 10 +++ sw/source/ui/misc/pgfnote.src | 8 +++ sw/source/ui/misc/pggrid.src | 13 ++++ sw/source/ui/misc/srtdlg.src | 23 +++++++ sw/source/ui/table/chartins.src | 6 ++ sw/source/ui/table/colwd.src | 2 + sw/source/ui/table/convert.src | 12 ++++ sw/source/ui/table/instable.src | 9 +++ sw/source/ui/table/mergetbl.src | 2 + sw/source/ui/table/rowht.src | 2 + sw/source/ui/table/splittbl.src | 4 ++ sw/source/ui/table/tabledlg.src | 40 ++++++++++++ sw/source/ui/table/tautofmt.src | 11 ++++ sw/source/ui/uiview/pview.src | 2 + sw/source/ui/utlui/gloslst.src | 1 + sw/source/ui/utlui/unotools.src | 1 + 79 files changed, 966 insertions(+) mode change 100755 => 100644 starmath/source/smres.src mode change 100755 => 100644 sw/source/ui/config/optdlg.src mode change 100755 => 100644 sw/source/ui/uiview/pview.src (limited to 'sw/source') diff --git a/starmath/source/smres.src b/starmath/source/smres.src old mode 100755 new mode 100644 index be7f734a45..2678f58f66 --- a/starmath/source/smres.src +++ b/starmath/source/smres.src @@ -43,6 +43,7 @@ ModalDialog RID_FONTDIALOG { + HelpID = "starmath:ModalDialog:RID_FONTDIALOG"; Moveable = TRUE ; OutputSize = TRUE ; SVLook = TRUE ; @@ -57,6 +58,7 @@ ModalDialog RID_FONTDIALOG }; ComboBox 1 { + HelpID = "starmath:ComboBox:RID_FONTDIALOG:1"; Pos = MAP_APPFONT ( 6 , 17 ) ; Size = MAP_APPFONT ( 111 , 60 ) ; TabStop = TRUE ; @@ -65,6 +67,7 @@ ModalDialog RID_FONTDIALOG }; CheckBox 1 { + HelpID = "starmath:CheckBox:RID_FONTDIALOG:1"; TabStop = TRUE ; Pos = MAP_APPFONT ( 60 , 84 ) ; Size = MAP_APPFONT ( 33 , 10 ) ; @@ -72,6 +75,7 @@ ModalDialog RID_FONTDIALOG }; CheckBox 2 { + HelpID = "starmath:CheckBox:RID_FONTDIALOG:2"; TabStop = TRUE ; Pos = MAP_APPFONT ( 60 , 97 ) ; Size = MAP_APPFONT ( 33 , 10 ) ; @@ -122,6 +126,7 @@ ModalDialog RID_FONTSIZEDIALOG }; MetricField 1 { + HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:1"; Border = TRUE ; Pos = MAP_APPFONT ( 57 , 6 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -142,6 +147,7 @@ ModalDialog RID_FONTSIZEDIALOG }; MetricField 4 { + HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:4"; Border = TRUE ; Pos = MAP_APPFONT ( 57 , 36 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -163,6 +169,7 @@ ModalDialog RID_FONTSIZEDIALOG }; MetricField 5 { + HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:5"; Border = TRUE ; Pos = MAP_APPFONT ( 57 , 51 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -184,6 +191,7 @@ ModalDialog RID_FONTSIZEDIALOG }; MetricField 6 { + HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:6"; Border = TRUE ; Pos = MAP_APPFONT ( 57 , 66 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -205,6 +213,7 @@ ModalDialog RID_FONTSIZEDIALOG }; MetricField 7 { + HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:7"; Border = TRUE ; Pos = MAP_APPFONT ( 57 , 81 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -226,6 +235,7 @@ ModalDialog RID_FONTSIZEDIALOG }; MetricField 8 { + HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:8"; Border = TRUE ; Pos = MAP_APPFONT ( 57 , 96 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -259,6 +269,7 @@ ModalDialog RID_FONTSIZEDIALOG }; PushButton 1 { + HelpID = "starmath:PushButton:RID_FONTSIZEDIALOG:1"; TabStop = TRUE ; Pos = MAP_APPFONT ( 114 , 45 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -295,6 +306,7 @@ ModalDialog RID_FONTTYPEDIALOG }; ListBox 1 { + HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:1"; Border = TRUE ; Pos = MAP_APPFONT ( 54 , 18 ) ; Size = MAP_APPFONT ( 150 , 69 ) ; @@ -310,6 +322,7 @@ ModalDialog RID_FONTTYPEDIALOG }; ListBox 2 { + HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:2"; Border = TRUE ; Pos = MAP_APPFONT ( 54 , 33 ) ; Size = MAP_APPFONT ( 150 , 69 ) ; @@ -325,6 +338,7 @@ ModalDialog RID_FONTTYPEDIALOG }; ListBox 3 { + HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:3"; Border = TRUE ; Pos = MAP_APPFONT ( 54 , 48 ) ; Size = MAP_APPFONT ( 150 , 69 ) ; @@ -340,6 +354,7 @@ ModalDialog RID_FONTTYPEDIALOG }; ListBox 4 { + HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:4"; Border = TRUE ; Pos = MAP_APPFONT ( 54 , 63 ) ; Size = MAP_APPFONT ( 150 , 69 ) ; @@ -355,6 +370,7 @@ ModalDialog RID_FONTTYPEDIALOG }; ListBox 5 { + HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:5"; Border = TRUE ; Pos = MAP_APPFONT ( 54 , 96 ) ; Size = MAP_APPFONT ( 150 , 69 ) ; @@ -370,6 +386,7 @@ ModalDialog RID_FONTTYPEDIALOG }; ListBox 6 { + HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:6"; Border = TRUE ; Pos = MAP_APPFONT ( 54 , 111 ) ; Size = MAP_APPFONT ( 150 , 69 ) ; @@ -385,6 +402,7 @@ ModalDialog RID_FONTTYPEDIALOG }; ListBox 7 { + HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:7"; Border = TRUE ; Pos = MAP_APPFONT ( 54 , 126 ) ; Size = MAP_APPFONT ( 150 , 69 ) ; @@ -406,6 +424,7 @@ ModalDialog RID_FONTTYPEDIALOG }; MenuButton 1 { + HelpID = "starmath:MenuButton:RID_FONTTYPEDIALOG:1"; TabStop = TRUE ; ButtonMenu = Menu , RID_FONTMENU ; Pos = MAP_APPFONT ( 225 , 48 ) ; @@ -414,6 +433,7 @@ ModalDialog RID_FONTTYPEDIALOG }; PushButton 2 { + HelpID = "starmath:PushButton:RID_FONTTYPEDIALOG:2"; TabStop = TRUE ; Pos = MAP_APPFONT ( 225 , 66 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -437,6 +457,7 @@ ModalDialog RID_DISTANCEDIALOG }; MetricField 1 { + HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:1"; Border = TRUE ; TabStop = TRUE ; Left = TRUE ; @@ -457,6 +478,7 @@ ModalDialog RID_DISTANCEDIALOG }; MetricField 2 { + HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:2"; Border = TRUE ; TabStop = TRUE ; Left = TRUE ; @@ -469,6 +491,7 @@ ModalDialog RID_DISTANCEDIALOG }; CheckBox 1 { + HelpID = "starmath:CheckBox:RID_DISTANCEDIALOG:1"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 55 ) ; Size = MAP_APPFONT ( 110 , 12 ) ; @@ -484,6 +507,7 @@ ModalDialog RID_DISTANCEDIALOG }; MetricField 3 { + HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:3"; Border = TRUE ; TabStop = TRUE ; Left = TRUE ; @@ -504,6 +528,7 @@ ModalDialog RID_DISTANCEDIALOG }; MetricField 4 { + HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:4"; Border = TRUE ; TabStop = TRUE ; Left = TRUE ; @@ -529,6 +554,7 @@ ModalDialog RID_DISTANCEDIALOG }; PushButton 1 { + HelpID = "starmath:PushButton:RID_DISTANCEDIALOG:1"; TabStop = TRUE ; Pos = MAP_APPFONT ( 184 , 69 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -536,6 +562,7 @@ ModalDialog RID_DISTANCEDIALOG }; MenuButton 1 { + HelpID = "starmath:MenuButton:RID_DISTANCEDIALOG:1"; TabStop = TRUE ; ButtonMenu = Menu , RID_DISTANCEMENU ; Pos = MAP_APPFONT ( 184 , 51 ) ; @@ -925,6 +952,7 @@ ModalDialog RID_ALIGNDIALOG Text [ en-US ] = "Alignment" ; RadioButton 1 { + HelpID = "starmath:RadioButton:RID_ALIGNDIALOG:1"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 17 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -932,6 +960,7 @@ ModalDialog RID_ALIGNDIALOG }; RadioButton 2 { + HelpID = "starmath:RadioButton:RID_ALIGNDIALOG:2"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 31 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -939,6 +968,7 @@ ModalDialog RID_ALIGNDIALOG }; RadioButton 3 { + HelpID = "starmath:RadioButton:RID_ALIGNDIALOG:3"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 44 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -965,6 +995,7 @@ ModalDialog RID_ALIGNDIALOG }; PushButton 1 { + HelpID = "starmath:PushButton:RID_ALIGNDIALOG:1"; TabStop = TRUE ; Pos = MAP_APPFONT ( 83 , 46 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -974,6 +1005,7 @@ ModalDialog RID_ALIGNDIALOG TabPage RID_PRINTOPTIONPAGE { + HelpID = "starmath:TabPage:RID_PRINTOPTIONPAGE"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 260 , 185 ) ; @@ -986,6 +1018,7 @@ TabPage RID_PRINTOPTIONPAGE }; CheckBox CB_TITLEROW { + HelpID = "starmath:CheckBox:RID_PRINTOPTIONPAGE:CB_TITLEROW"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; @@ -993,6 +1026,7 @@ TabPage RID_PRINTOPTIONPAGE }; CheckBox CB_EQUATION_TEXT { + HelpID = "starmath:CheckBox:RID_PRINTOPTIONPAGE:CB_EQUATION_TEXT"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; @@ -1000,6 +1034,7 @@ TabPage RID_PRINTOPTIONPAGE }; CheckBox CB_FRAME { + HelpID = "starmath:CheckBox:RID_PRINTOPTIONPAGE:CB_FRAME"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 42 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; @@ -1013,6 +1048,7 @@ TabPage RID_PRINTOPTIONPAGE }; RadioButton RB_ORIGINAL_SIZE { + HelpID = "starmath:RadioButton:RID_PRINTOPTIONPAGE:RB_ORIGINAL_SIZE"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 69 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; @@ -1020,6 +1056,7 @@ TabPage RID_PRINTOPTIONPAGE }; RadioButton RB_FIT_TO_PAGE { + HelpID = "starmath:RadioButton:RID_PRINTOPTIONPAGE:RB_FIT_TO_PAGE"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 83 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; @@ -1027,6 +1064,7 @@ TabPage RID_PRINTOPTIONPAGE }; RadioButton RB_ZOOM { + HelpID = "starmath:RadioButton:RID_PRINTOPTIONPAGE:RB_ZOOM"; Pos = MAP_APPFONT ( 12 , 97 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "~Scaling" ; @@ -1034,6 +1072,7 @@ TabPage RID_PRINTOPTIONPAGE }; MetricField MF_ZOOM { + HelpID = "starmath:MetricField:RID_PRINTOPTIONPAGE:MF_ZOOM"; Border = TRUE ; Pos = MAP_APPFONT ( 18 , 111 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -1054,6 +1093,7 @@ TabPage RID_PRINTOPTIONPAGE }; CheckBox CB_IGNORE_SPACING { + HelpID = "starmath:CheckBox:RID_PRINTOPTIONPAGE:CB_IGNORE_SPACING"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 140 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; @@ -1063,6 +1103,7 @@ TabPage RID_PRINTOPTIONPAGE ModalDialog RID_SYMBOLDIALOG { + HelpID = "starmath:ModalDialog:RID_SYMBOLDIALOG"; OutputSize = TRUE ; SVLook = TRUE ; Closeable = TRUE; // Close Button in Window Leiste explizit einbauen @@ -1078,6 +1119,7 @@ ModalDialog RID_SYMBOLDIALOG }; ListBox 1 { + HelpID = "starmath:ListBox:RID_SYMBOLDIALOG:1"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 17 ) ; Size = MAP_APPFONT ( 92, 57 ) ; @@ -1109,6 +1151,7 @@ ModalDialog RID_SYMBOLDIALOG }; PushButton 2 { + HelpID = "starmath:PushButton:RID_SYMBOLDIALOG:2"; TabStop = TRUE ; Pos = MAP_APPFONT ( 177 , 6 ) ; Size = MAP_APPFONT ( 56 , 14 ) ; @@ -1117,6 +1160,7 @@ ModalDialog RID_SYMBOLDIALOG }; PushButton 3 { + HelpID = "starmath:PushButton:RID_SYMBOLDIALOG:3"; Pos = MAP_APPFONT ( 177 , 24 ) ; Size = MAP_APPFONT ( 56 , 14 ) ; TabStop = TRUE ; @@ -1124,6 +1168,7 @@ ModalDialog RID_SYMBOLDIALOG }; PushButton 1 { + HelpID = "starmath:PushButton:RID_SYMBOLDIALOG:1"; TabStop = TRUE ; Pos = MAP_APPFONT ( 177 , 42 ) ; Size = MAP_APPFONT ( 56 , 14 ) ; @@ -1133,6 +1178,7 @@ ModalDialog RID_SYMBOLDIALOG ModalDialog RID_SYMDEFINEDIALOG { + HelpID = "starmath:ModalDialog:RID_SYMDEFINEDIALOG"; Moveable = TRUE ; OutputSize = TRUE ; SVLook = TRUE ; @@ -1147,6 +1193,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; ComboBox 1 { + HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:1"; Pos = MAP_APPFONT ( 59 , 6 ) ; Size = MAP_APPFONT ( 80 , 100 ) ; TabStop = TRUE ; @@ -1162,6 +1209,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; ComboBox 2 { + HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:2"; Pos = MAP_APPFONT ( 210 , 6 ) ; Size = MAP_APPFONT ( 80 , 100 ) ; TabStop = TRUE ; @@ -1186,6 +1234,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; ComboBox 4 { + HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:4"; Pos = MAP_APPFONT ( 80 , 115 ) ; Size = MAP_APPFONT ( 100 , 100 ) ; TabStop = TRUE ; @@ -1201,6 +1250,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; ComboBox 5 { + HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:5"; Pos = MAP_APPFONT ( 80 , 130 ) ; Size = MAP_APPFONT ( 100 , 100 ) ; TabStop = TRUE ; @@ -1216,6 +1266,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; ListBox 1 { + HelpID = "starmath:ListBox:RID_SYMDEFINEDIALOG:1"; Border = TRUE ; Pos = MAP_APPFONT ( 80 , 145 ) ; Size = MAP_APPFONT ( 100 , 100 ) ; @@ -1232,6 +1283,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; ListBox LB_FONTS_SUBSET { + HelpID = "starmath:ListBox:RID_SYMDEFINEDIALOG:LB_FONTS_SUBSET"; Border = TRUE ; Pos = MAP_APPFONT ( 80 , 160 ) ; Size = MAP_APPFONT ( 100 , 100 ) ; @@ -1248,6 +1300,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; ComboBox 3 { + HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:3"; Border = TRUE; Pos = MAP_APPFONT ( 80 , 175 ) ; Size = MAP_APPFONT ( 100 , 100 ) ; @@ -1314,6 +1367,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; PushButton 1 { + HelpID = "starmath:PushButton:RID_SYMDEFINEDIALOG:1"; TabStop = TRUE ; Pos = MAP_APPFONT ( 305 , 195 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -1321,6 +1375,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; PushButton 2 { + HelpID = "starmath:PushButton:RID_SYMDEFINEDIALOG:2"; TabStop = TRUE ; Pos = MAP_APPFONT ( 245 , 195 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -1328,6 +1383,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; PushButton 3 { + HelpID = "starmath:PushButton:RID_SYMDEFINEDIALOG:3"; TabStop = TRUE ; Pos = MAP_APPFONT ( 185 , 195 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; diff --git a/sw/source/ui/chrdlg/ccoll.src b/sw/source/ui/chrdlg/ccoll.src index 0d8baf2b2b..41dcaa9852 100644 --- a/sw/source/ui/chrdlg/ccoll.src +++ b/sw/source/ui/chrdlg/ccoll.src @@ -45,6 +45,7 @@ TabPage TP_CONDCOLL }; CheckBox CB_CONDITION { + HelpID = "sw:CheckBox:TP_CONDCOLL:CB_CONDITION"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -84,6 +85,7 @@ TabPage TP_CONDCOLL }; ListBox LB_STYLE { + HelpID = "sw:ListBox:TP_CONDCOLL:LB_STYLE"; Pos = MAP_APPFONT ( 188 , 39 ) ; Size = MAP_APPFONT ( 60 , 108 ) ; TabStop = TRUE ; @@ -94,6 +96,7 @@ TabPage TP_CONDCOLL }; ListBox LB_FILTER { + HelpID = "sw:ListBox:TP_CONDCOLL:LB_FILTER"; Pos = MAP_APPFONT ( 188 , 150 ) ; Size = MAP_APPFONT ( 60 , 50 ) ; DropDown = TRUE ; @@ -104,6 +107,7 @@ TabPage TP_CONDCOLL }; PushButton PB_REMOVE { + HelpID = "sw:PushButton:TP_CONDCOLL:PB_REMOVE"; Pos = MAP_APPFONT ( 129 , 165 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; TabStop = TRUE ; @@ -112,6 +116,7 @@ TabPage TP_CONDCOLL }; PushButton PB_ASSIGN { + HelpID = "sw:PushButton:TP_CONDCOLL:PB_ASSIGN"; Pos = MAP_APPFONT ( 185 , 165 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/chrdlg/chardlg.src b/sw/source/ui/chrdlg/chardlg.src index e6a6a82729..ba39ec72a8 100644 --- a/sw/source/ui/chrdlg/chardlg.src +++ b/sw/source/ui/chrdlg/chardlg.src @@ -120,6 +120,7 @@ TabPage TP_CHAR_URL }; Edit ED_URL { + HelpID = "sw:Edit:TP_CHAR_URL:ED_URL"; Pos = MAP_APPFONT ( 88 , 15 ) ; Size = MAP_APPFONT ( 104 , 12 ) ; Border = TRUE ; @@ -127,6 +128,7 @@ TabPage TP_CHAR_URL }; PushButton PB_URL { + HelpID = "sw:PushButton:TP_CHAR_URL:PB_URL"; Pos = MAP_APPFONT ( 198 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -140,6 +142,7 @@ TabPage TP_CHAR_URL }; Edit ED_TEXT { + HelpID = "sw:Edit:TP_CHAR_URL:ED_TEXT"; Pos = MAP_APPFONT ( 88 , 31 ) ; Size = MAP_APPFONT ( 104 , 12 ) ; Border = TRUE ; @@ -154,6 +157,7 @@ TabPage TP_CHAR_URL }; Edit ED_NAME { + HelpID = "sw:Edit:TP_CHAR_URL:ED_NAME"; Pos = MAP_APPFONT ( 88 , 47 ) ; Size = MAP_APPFONT ( 104 , 12 ) ; Border = TRUE ; @@ -168,6 +172,7 @@ TabPage TP_CHAR_URL }; ComboBox LB_TARGET { + HelpID = "sw:ComboBox:TP_CHAR_URL:LB_TARGET"; Pos = MAP_APPFONT ( 88 , 63 ) ; Size = MAP_APPFONT ( 104 , 60 ) ; TabStop = TRUE ; @@ -177,6 +182,7 @@ TabPage TP_CHAR_URL }; PushButton PB_EVENT { + HelpID = "sw:PushButton:TP_CHAR_URL:PB_EVENT"; Pos = MAP_APPFONT ( 12 , 79 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -196,6 +202,7 @@ TabPage TP_CHAR_URL }; ListBox LB_VISITED { + HelpID = "sw:ListBox:TP_CHAR_URL:LB_VISITED"; Pos = MAP_APPFONT ( 88 , 113 ) ; Size = MAP_APPFONT ( 104 , 60 ) ; Border = TRUE ; @@ -212,6 +219,7 @@ TabPage TP_CHAR_URL }; ListBox LB_NOT_VISITED { + HelpID = "sw:ListBox:TP_CHAR_URL:LB_NOT_VISITED"; Pos = MAP_APPFONT ( 88 , 129 ) ; Size = MAP_APPFONT ( 104 , 60 ) ; Border = TRUE ; diff --git a/sw/source/ui/chrdlg/drpcps.src b/sw/source/ui/chrdlg/drpcps.src index ae3da330c4..edf373fcd3 100644 --- a/sw/source/ui/chrdlg/drpcps.src +++ b/sw/source/ui/chrdlg/drpcps.src @@ -59,12 +59,14 @@ TabPage TP_DROPCAPS Hide = TRUE ; CheckBox CB_SWITCH { + HelpID = "sw:CheckBox:TP_DROPCAPS:CB_SWITCH"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Display drop caps" ; }; CheckBox CB_WORD { + HelpID = "sw:CheckBox:TP_DROPCAPS:CB_WORD"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "~Whole word" ; @@ -77,6 +79,7 @@ TabPage TP_DROPCAPS }; NumericField FLD_DROPCAPS { + HelpID = "sw:NumericField:TP_DROPCAPS:FLD_DROPCAPS"; Border = TRUE ; First = 1 ; Last = 9 ; @@ -98,6 +101,7 @@ TabPage TP_DROPCAPS }; NumericField FLD_LINES { + HelpID = "sw:NumericField:TP_DROPCAPS:FLD_LINES"; Border = TRUE ; First = 2 ; Last = 9 ; @@ -119,6 +123,7 @@ TabPage TP_DROPCAPS }; MetricField FLD_DISTANCE { + HelpID = "sw:MetricField:TP_DROPCAPS:FLD_DISTANCE"; Border = TRUE ; DecimalDigits = 2 ; First = 0 ; @@ -155,6 +160,7 @@ TabPage TP_DROPCAPS }; Edit EDT_TEXT { + HelpID = "sw:Edit:TP_DROPCAPS:EDT_TEXT"; Border = TRUE ; Left = TRUE ; Pos = MAP_APPFONT ( 143 , 100 ) ; @@ -171,6 +177,7 @@ TabPage TP_DROPCAPS }; ListBox BOX_TEMPLATE { + HelpID = "sw:ListBox:TP_DROPCAPS:BOX_TEMPLATE"; Border = TRUE ; DropDown = TRUE ; Pos = MAP_APPFONT ( 143 , 116 ) ; diff --git a/sw/source/ui/chrdlg/numpara.src b/sw/source/ui/chrdlg/numpara.src index 14ed11fa0a..591333766b 100644 --- a/sw/source/ui/chrdlg/numpara.src +++ b/sw/source/ui/chrdlg/numpara.src @@ -51,6 +51,7 @@ TabPage TP_NUMPARA }; ListBox LB_OUTLINE_LEVEL { + HelpID = "sw:ListBox:TP_NUMPARA:LB_OUTLINE_LEVEL"; Pos = MAP_APPFONT ( 130 , 14 ) ; Size = MAP_APPFONT ( 118 , 65 ) ; DropDown = TRUE ; @@ -98,6 +99,7 @@ TabPage TP_NUMPARA }; ListBox LB_NUMBER_STYLE { + HelpID = "sw:ListBox:TP_NUMPARA:LB_NUMBER_STYLE"; Pos = MAP_APPFONT ( 130 , 41 ) ; Size = MAP_APPFONT ( 118 , 65 ) ; DropDown = TRUE ; @@ -109,6 +111,7 @@ TabPage TP_NUMPARA }; TriStateBox CB_NEW_START { + HelpID = "sw:TriStateBox:TP_NUMPARA:CB_NEW_START"; Pos = MAP_APPFONT ( 12 , 58 ) ; Size = MAP_APPFONT ( 160 , 10 ) ; Hide = TRUE ; @@ -117,6 +120,7 @@ TabPage TP_NUMPARA }; TriStateBox CB_NUMBER_NEW_START { + HelpID = "sw:TriStateBox:TP_NUMPARA:CB_NUMBER_NEW_START"; Pos = MAP_APPFONT ( 21 , 73 ) ; Size = MAP_APPFONT ( 103 , 10 ) ; Hide = TRUE ; @@ -125,6 +129,7 @@ TabPage TP_NUMPARA }; NumericField NF_NEW_START { + HelpID = "sw:NumericField:TP_NUMPARA:NF_NEW_START"; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 72 ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -148,6 +153,7 @@ TabPage TP_NUMPARA }; TriStateBox CB_COUNT_PARA { + HelpID = "sw:TriStateBox:TP_NUMPARA:CB_COUNT_PARA"; Pos = MAP_APPFONT ( 12 , 100 ) ; Size = MAP_APPFONT ( 160 , 10 ) ; TabStop = TRUE ; @@ -155,6 +161,7 @@ TabPage TP_NUMPARA }; TriStateBox CB_RESTART_PARACOUNT { + HelpID = "sw:TriStateBox:TP_NUMPARA:CB_RESTART_PARACOUNT"; Pos = MAP_APPFONT ( 12 , 116 ) ; Size = MAP_APPFONT ( 160 , 10 ) ; TabStop = TRUE ; @@ -169,6 +176,7 @@ TabPage TP_NUMPARA }; NumericField NF_RESTART_PARA { + HelpID = "sw:NumericField:TP_NUMPARA:NF_RESTART_PARA"; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 130 ) ; Size = MAP_APPFONT ( 26 , 12 ) ; diff --git a/sw/source/ui/chrdlg/swbreak.src b/sw/source/ui/chrdlg/swbreak.src index d2c42fba0d..1ed8491a31 100644 --- a/sw/source/ui/chrdlg/swbreak.src +++ b/sw/source/ui/chrdlg/swbreak.src @@ -63,6 +63,7 @@ ModalDialog DLG_BREAK }; RadioButton RB_LINE { + HelpID = "sw:RadioButton:DLG_BREAK:RB_LINE"; Pos = MAP_APPFONT ( 12 , 15 ) ; Size = MAP_APPFONT ( 63 , 10 ) ; Text [ en-US ] = "~Line break" ; @@ -71,6 +72,7 @@ ModalDialog DLG_BREAK }; RadioButton RB_PAGE { + HelpID = "sw:RadioButton:DLG_BREAK:RB_PAGE"; Pos = MAP_APPFONT ( 12 , 39 ) ; Size = MAP_APPFONT ( 63 , 10 ) ; Text [ en-US ] = "~Page break" ; @@ -79,6 +81,7 @@ ModalDialog DLG_BREAK }; RadioButton RB_COL { + HelpID = "sw:RadioButton:DLG_BREAK:RB_COL"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 69 , 10 ) ; Text [ en-US ] = "~Column break" ; @@ -100,6 +103,7 @@ ModalDialog DLG_BREAK }; ListBox LB_COLL { + HelpID = "sw:ListBox:DLG_BREAK:LB_COLL"; Pos = MAP_APPFONT ( 12 , 62 ) ; Size = MAP_APPFONT ( 75 , 50 ) ; TabStop = TRUE ; @@ -112,6 +116,7 @@ ModalDialog DLG_BREAK }; CheckBox CB_PAGENUM { + HelpID = "sw:CheckBox:DLG_BREAK:CB_PAGENUM"; Pos = MAP_APPFONT ( 12 , 79 ) ; Size = MAP_APPFONT ( 84 , 10 ) ; /* ### ACHTUNG: Neuer Text in Resource? Seitennummer ~ändern : Seitennummer ~õndern */ @@ -120,6 +125,7 @@ ModalDialog DLG_BREAK }; NumericField ED_PAGENUM { + HelpID = "sw:NumericField:DLG_BREAK:ED_PAGENUM"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 94 ) ; Size = MAP_APPFONT ( 31 , 12 ) ; diff --git a/sw/source/ui/config/mailconfigpage.src b/sw/source/ui/config/mailconfigpage.src index f76f01ccab..1673f1952e 100644 --- a/sw/source/ui/config/mailconfigpage.src +++ b/sw/source/ui/config/mailconfigpage.src @@ -53,6 +53,7 @@ TabPage TP_MAILCONFIG }; Edit ED_DISPLAYNAME { + HelpID = "sw:Edit:TP_MAILCONFIG:ED_DISPLAYNAME"; Pos = MAP_APPFONT ( 88 , 14 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; Border = TRUE; @@ -65,12 +66,14 @@ TabPage TP_MAILCONFIG }; Edit ED_ADDRESS { + HelpID = "sw:Edit:TP_MAILCONFIG:ED_ADDRESS"; Pos = MAP_APPFONT ( 88 , 29 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; Border = TRUE; }; CheckBox CB_REPLYTO { + HelpID = "sw:CheckBox:TP_MAILCONFIG:CB_REPLYTO"; Pos = MAP_APPFONT ( 12 , 45 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text[ en-US ] = "Send replies to ~different e-mail address"; @@ -83,6 +86,7 @@ TabPage TP_MAILCONFIG }; Edit ED_REPLYTO { + HelpID = "sw:Edit:TP_MAILCONFIG:ED_REPLYTO"; Pos = MAP_APPFONT ( 88 , 58 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; Border = TRUE; @@ -101,6 +105,7 @@ TabPage TP_MAILCONFIG }; Edit ED_SERVER { + HelpID = "sw:Edit:TP_MAILCONFIG:ED_SERVER"; Pos = MAP_APPFONT ( 88 , 87 ) ; Size = MAP_APPFONT ( 105 , 12 ) ; Border = TRUE; @@ -114,6 +119,7 @@ TabPage TP_MAILCONFIG }; NumericField NF_PORT { + HelpID = "sw:NumericField:TP_MAILCONFIG:NF_PORT"; Pos = MAP_APPFONT ( 223 , 87 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; Border = TRUE; @@ -127,12 +133,14 @@ TabPage TP_MAILCONFIG }; CheckBox CB_SECURE { + HelpID = "sw:CheckBox:TP_MAILCONFIG:CB_SECURE"; Pos = MAP_APPFONT ( 12 , 104 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text[ en-US ] = "~Use secure connection (SSL)"; }; PushButton PB_AUTHENTICATION { + HelpID = "sw:PushButton:TP_MAILCONFIG:PB_AUTHENTICATION"; Pos = MAP_APPFONT ( 88 , 118 ) ; Size = MAP_APPFONT ( 105 , 14 ) ; Text[ en-US ] = "Server Au~thentication"; @@ -144,6 +152,7 @@ TabPage TP_MAILCONFIG }; PushButton PB_TEST { + HelpID = "sw:PushButton:TP_MAILCONFIG:PB_TEST"; Pos = MAP_APPFONT ( 88 , 164 ) ; Size = MAP_APPFONT ( 105 , 14 ) ; Text[ en-US ] = "Test S~ettings..."; @@ -179,6 +188,7 @@ ModalDialog DLG_MM_TESTACCOUNTSETTINGS }; MultiLineEdit ED_ERROR { + HelpID = "sw:MultiLineEdit:DLG_MM_TESTACCOUNTSETTINGS:ED_ERROR"; Pos = MAP_APPFONT ( 6 , 79 ) ; Size = MAP_APPFONT ( 238 , 60 ) ; Border = TRUE; @@ -191,6 +201,7 @@ ModalDialog DLG_MM_TESTACCOUNTSETTINGS }; PushButton PB_STOP { + HelpID = "sw:PushButton:DLG_MM_TESTACCOUNTSETTINGS:PB_STOP"; Pos = MAP_APPFONT ( 85 , 156 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Stop"; @@ -268,12 +279,14 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION CheckBox CB_AUTHENTICATION { + HelpID = "sw:CheckBox:DLG_MM_SERVERAUTHENTICATION:CB_AUTHENTICATION"; Pos = MAP_APPFONT ( 6 , 3 ) ; Size = MAP_APPFONT ( 238 , 10 ) ; Text[ en-US ] = "The outgoing mail server (SMTP) requires au~thentication"; }; RadioButton RB_SEP_AUTHENTICATION { + HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_SEP_AUTHENTICATION"; Pos = MAP_APPFONT ( 12 , 17 ) ; Size = MAP_APPFONT ( 232 , 10 ) ; Text[ en-US ] = "The outgoing mail server (SMTP) requires ~separate authentication"; @@ -292,6 +305,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_USERNAME { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_USERNAME"; Pos = MAP_APPFONT ( 78 , 42 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; @@ -304,6 +318,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_OUTPASSWORD { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_OUTPASSWORD"; Pos = MAP_APPFONT ( 78 , 57 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; @@ -311,6 +326,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; RadioButton RB_SMPTAFTERPOP { + HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_SMPTAFTERPOP"; Pos = MAP_APPFONT ( 12 , 73 ) ; Size = MAP_APPFONT ( 232 , 20 ) ; WordBreak = TRUE; @@ -330,6 +346,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_SERVER { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_SERVER"; Pos = MAP_APPFONT ( 78 , 108 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; @@ -343,6 +360,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; NumericField NF_PORT { + HelpID = "sw:NumericField:DLG_MM_SERVERAUTHENTICATION:NF_PORT"; Pos = MAP_APPFONT ( 219 , 108 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; Border = TRUE; @@ -362,12 +380,14 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; RadioButton RB_POP3 { + HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_POP3"; Pos = MAP_APPFONT ( 78 , 125 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text[ en-US ] = "~POP 3"; }; RadioButton RB_IMAP { + HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_IMAP"; Pos = MAP_APPFONT ( 78 , 138 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text[ en-US ] = "~IMAP"; @@ -380,6 +400,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_INUSERNAME { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_INUSERNAME"; Pos = MAP_APPFONT ( 78 , 150 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; @@ -392,6 +413,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_INPASSWORD { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_INPASSWORD"; Pos = MAP_APPFONT ( 78 , 165 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; diff --git a/sw/source/ui/config/optcomp.src b/sw/source/ui/config/optcomp.src index 3682b49477..fee89d732d 100644 --- a/sw/source/ui/config/optcomp.src +++ b/sw/source/ui/config/optcomp.src @@ -50,6 +50,7 @@ TabPage TP_OPTCOMPATIBILITY_PAGE }; ListBox LB_FORMATTING { + HelpID = "sw:ListBox:TP_OPTCOMPATIBILITY_PAGE:LB_FORMATTING"; Pos = MAP_APPFONT ( 12 , 25 ) ; Size = MAP_APPFONT ( 118 , 24 ) ; DropDown = TRUE; @@ -70,12 +71,14 @@ TabPage TP_OPTCOMPATIBILITY_PAGE }; PushButton PB_RESET { + HelpID = "sw:PushButton:TP_OPTCOMPATIBILITY_PAGE:PB_RESET"; Pos = MAP_APPFONT ( 125 , 165 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Reset"; }; PushButton PB_DEFAULT { + HelpID = "sw:PushButton:TP_OPTCOMPATIBILITY_PAGE:PB_DEFAULT"; Pos = MAP_APPFONT ( 188 , 165 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "Use as ~Default"; diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src old mode 100755 new mode 100644 index a2573ed3c1..9f7b76401b --- a/sw/source/ui/config/optdlg.src +++ b/sw/source/ui/config/optdlg.src @@ -56,18 +56,21 @@ TabPage TP_CONTENT_OPT }; CheckBox CB_CROSS { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_CROSS"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Guides ~while moving"; }; CheckBox CB_HANDLE { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HANDLE"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Sim~ple handles"; }; CheckBox CB_BIGHANDLE { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_BIGHANDLE"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Large handles"; @@ -81,54 +84,63 @@ TabPage TP_CONTENT_OPT }; CheckBox CB_HSCROLL { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HSCROLL"; Pos = MAP_APPFONT ( 136 , 14 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "H~orizontal scrollbar" ; }; CheckBox CB_VSCROLL { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VSCROLL"; Pos = MAP_APPFONT ( 136 , 27 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Vertical scrollbar" ; }; CheckBox CB_ANY_RULER { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_ANY_RULER"; Pos = MAP_APPFONT ( 136 , 40 ) ; Size = MAP_APPFONT ( 65 , 10 ) ; Text [ en-US ] = "R~uler" ; }; CheckBox CB_HRULER { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HRULER"; Pos = MAP_APPFONT ( 142 , 53 ) ; Size = MAP_APPFONT ( 62 , 10 ) ; Text [ en-US ] = "Hori~zontal ruler" ; }; ListBox LB_HMETRIC { + HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_HMETRIC"; Pos = MAP_APPFONT ( 206 , 51 ) ; Size = MAP_APPFONT ( 45 , 60 ) ; DropDown = TRUE; }; CheckBox CB_VRULER { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VRULER"; Pos = MAP_APPFONT ( 142 , 66 ) ; Size = MAP_APPFONT ( 62 , 10 ) ; Text [ en-US ] = "Verti~cal ruler" ; }; CheckBox CB_VRULER_RIGHT { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VRULER_RIGHT"; Pos = MAP_APPFONT ( 148 , 79 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "Right-aligned"; }; ListBox LB_VMETRIC { + HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_VMETRIC"; Pos = MAP_APPFONT ( 206 , 64 ) ; Size = MAP_APPFONT ( 45 , 60 ) ; DropDown = TRUE; }; CheckBox CB_SMOOTH_SCROLL { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_SMOOTH_SCROLL"; Pos = MAP_APPFONT ( 136 , 79 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "S~mooth scroll" ; @@ -142,6 +154,7 @@ TabPage TP_CONTENT_OPT }; CheckBox CB_GRF { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_GRF"; Pos = MAP_APPFONT ( 12 , 67 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Graphics and objects" ; @@ -150,24 +163,28 @@ TabPage TP_CONTENT_OPT }; CheckBox CB_TBL { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_TBL"; Pos = MAP_APPFONT ( 12 , 80 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Tables " ; }; CheckBox CB_DRWFAST { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_DRWFAST"; Pos = MAP_APPFONT ( 12 , 93 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Dra~wings and controls" ; }; CheckBox CB_FIELD { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_FIELD"; Pos = MAP_APPFONT ( 12 , 106 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Field codes" ; }; CheckBox CB_POSTIT { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_POSTIT"; Pos = MAP_APPFONT ( 12 , 119 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Comments" ; @@ -188,6 +205,7 @@ TabPage TP_CONTENT_OPT }; ListBox LB_METRIC { + HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_METRIC"; Pos = MAP_APPFONT ( 199, 133 ) ; Size = MAP_APPFONT ( 50 , 50 ) ; Border = TRUE ; @@ -214,6 +232,7 @@ TabPage TP_OPTPRINT_PAGE }; CheckBox CB_PGRF /*functionally merged with CB_PDRAW*/ { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PGRF"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Pictures and objects" ; @@ -224,6 +243,7 @@ TabPage TP_OPTPRINT_PAGE removed, tables now always get printed CheckBox CB_PTAB { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PTAB"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Tables" ; @@ -233,6 +253,7 @@ TabPage TP_OPTPRINT_PAGE functionally merged with CB_PGRF (pictures and graphics) CheckBox CB_PDRAW { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PDRAW"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Dra~wings" ; @@ -240,30 +261,35 @@ TabPage TP_OPTPRINT_PAGE */ CheckBox CB_CTRLFLD { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_CTRLFLD"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Form control~s" ; }; CheckBox CB_BACKGROUND { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_BACKGROUND"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Page ba~ckground" ; }; CheckBox CB_BLACK_FONT { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_BLACK_FONT"; Pos = MAP_APPFONT ( 12 , 53 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Print text in blac~k" ; }; CheckBox CB_HIDDEN_TEXT { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_HIDDEN_TEXT"; Pos = MAP_APPFONT ( 12 , 66 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Hidden te~xt" ; }; CheckBox CB_TEXT_PLACEHOLDER { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_TEXT_PLACEHOLDER"; Pos = MAP_APPFONT ( 12 , 79 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Text ~placeholder" ; @@ -283,6 +309,7 @@ TabPage TP_OPTPRINT_PAGE }; CheckBox CB_LEFTP { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_LEFTP"; Pos = MAP_APPFONT ( 96 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Left pages" ; @@ -291,6 +318,7 @@ TabPage TP_OPTPRINT_PAGE }; CheckBox CB_RIGHTP { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_RIGHTP"; Pos = MAP_APPFONT ( 96 , 27 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Right pages" ; @@ -299,6 +327,7 @@ TabPage TP_OPTPRINT_PAGE removed, noe handled by the new print dialog (i.e. vcl) itself CheckBox CB_REVERSE { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_REVERSE"; Pos = MAP_APPFONT ( 96 , 40 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Re~versed" ; @@ -306,12 +335,14 @@ TabPage TP_OPTPRINT_PAGE */ CheckBox CB_PROSPECT { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PROSPECT"; Pos = MAP_APPFONT ( 96 , 40 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Broch~ure" ; }; CheckBox CB_PROSPECT_RTL { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PROSPECT_RTL"; Pos = MAP_APPFONT ( 103 , 53 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Right to Left" ; @@ -319,6 +350,7 @@ TabPage TP_OPTPRINT_PAGE }; RadioButton RB_NO { + HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_NO"; Pos = MAP_APPFONT ( 180 , 14 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "~None" ; @@ -327,18 +359,21 @@ TabPage TP_OPTPRINT_PAGE }; RadioButton RB_ONLY { + HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_ONLY"; Pos = MAP_APPFONT ( 180 , 27 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "Comments ~only" ; }; RadioButton RB_END { + HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_END"; Pos = MAP_APPFONT ( 180 , 40 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "End of docu~ment" ; }; RadioButton RB_PAGEEND { + HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_PAGEEND"; Pos = MAP_APPFONT ( 180 , 53 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "~End of page" ; @@ -365,6 +400,7 @@ TabPage TP_OPTPRINT_PAGE }; CheckBox CB_PRINTEMPTYPAGES { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PRINTEMPTYPAGES"; Pos = MAP_APPFONT ( 12 , 106 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; TabStop = TRUE ; @@ -373,6 +409,7 @@ TabPage TP_OPTPRINT_PAGE /* CheckBox CB_SINGLEJOBS { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_SINGLEJOBS"; Pos = MAP_APPFONT ( 12 , 119 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; TabStop = TRUE ; @@ -381,6 +418,7 @@ TabPage TP_OPTPRINT_PAGE */ CheckBox CB_PAPERFROMSETUP { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PAPERFROMSETUP"; Pos = MAP_APPFONT ( 12 , 119 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; TabStop = TRUE ; @@ -395,6 +433,7 @@ TabPage TP_OPTPRINT_PAGE }; ListBox LB_FAX { + HelpID = "sw:ListBox:TP_OPTPRINT_PAGE:LB_FAX"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 132 ) ; Size = MAP_APPFONT ( 184 , 70 ) ; @@ -437,6 +476,7 @@ TabPage TP_STD_FONT }; MetricBox LB_STANDARD_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_STANDARD_SIZE"; Pos = MAP_APPFONT ( 204 , 25 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -444,6 +484,7 @@ TabPage TP_STD_FONT }; MetricBox LB_TITLE_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_TITLE_SIZE"; Pos = MAP_APPFONT ( 204 , 42 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -451,6 +492,7 @@ TabPage TP_STD_FONT }; MetricBox LB_LIST_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_LIST_SIZE"; Pos = MAP_APPFONT ( 204 , 59 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -458,6 +500,7 @@ TabPage TP_STD_FONT }; MetricBox LB_LABEL_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_LABEL_SIZE"; Pos = MAP_APPFONT ( 204 , 76 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -465,6 +508,7 @@ TabPage TP_STD_FONT }; MetricBox LB_INDEX_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_INDEX_SIZE"; Pos = MAP_APPFONT ( 204 , 93 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -507,6 +551,7 @@ TabPage TP_STD_FONT }; ComboBox LB_STANDARD { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_STANDARD"; Pos = MAP_APPFONT ( 63 , 25 ) ; Size = MAP_APPFONT ( 135 , 73 ) ; TabStop = TRUE ; @@ -515,6 +560,7 @@ TabPage TP_STD_FONT }; ComboBox LB_TITLE { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_TITLE"; Pos = MAP_APPFONT ( 63 , 42 ) ; Size = MAP_APPFONT ( 135, 73 ) ; TabStop = TRUE ; @@ -523,6 +569,7 @@ TabPage TP_STD_FONT }; ComboBox LB_LIST { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_LIST"; Pos = MAP_APPFONT ( 63 , 59 ) ; Size = MAP_APPFONT ( 135 , 73 ) ; TabStop = TRUE ; @@ -531,6 +578,7 @@ TabPage TP_STD_FONT }; ComboBox LB_LABEL { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_LABEL"; Pos = MAP_APPFONT ( 63 , 76 ) ; Size = MAP_APPFONT ( 135 , 73 ) ; TabStop = TRUE ; @@ -539,6 +587,7 @@ TabPage TP_STD_FONT }; ComboBox LB_IDX { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_IDX"; Pos = MAP_APPFONT ( 63 , 94 ) ; Size = MAP_APPFONT ( 135, 73 ) ; TabStop = TRUE ; @@ -547,12 +596,14 @@ TabPage TP_STD_FONT }; CheckBox CB_DOCONLY { + HelpID = "sw:CheckBox:TP_STD_FONT:CB_DOCONLY"; Pos = MAP_APPFONT ( 12 , 111 ) ; Size = MAP_APPFONT ( 147 , 10 ) ; Text [ en-US ] = "C~urrent document only" ; }; PushButton PB_STANDARD { + HelpID = "sw:PushButton:TP_STD_FONT:PB_STANDARD"; Pos = MAP_APPFONT ( 204 , 165 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Default" ; @@ -588,6 +639,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_HEADER { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_HEADER"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 107 , 10 ) ; TabStop = TRUE ; @@ -595,6 +647,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_REPEAT_HEADER { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_REPEAT_HEADER"; Pos = MAP_APPFONT ( 21 , 27 ) ; Size = MAP_APPFONT ( 99 , 10 ) ; TabStop = TRUE ; @@ -602,6 +655,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_DONT_SPLIT { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_DONT_SPLIT"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 107 , 10 ) ; TabStop = TRUE ; @@ -609,6 +663,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_BORDER { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_BORDER"; Pos = MAP_APPFONT ( 12 , 53 ) ; Size = MAP_APPFONT ( 107 , 10 ) ; TabStop = TRUE ; @@ -628,6 +683,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_NUMFORMATTING { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_NUMFORMATTING"; Pos = MAP_APPFONT ( 131 , 14 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; TabStop = TRUE ; @@ -635,6 +691,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_NUMFMT_FORMATTING { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_NUMFMT_FORMATTING"; Pos = MAP_APPFONT ( 140 , 27 ) ; Size = MAP_APPFONT ( 114 , 10 ) ; TabStop = TRUE ; @@ -642,6 +699,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_NUMALIGNMENT { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_NUMALIGNMENT"; Pos = MAP_APPFONT ( 140 , 40 ) ; Size = MAP_APPFONT ( 114 , 10 ) ; TabStop = TRUE ; @@ -667,6 +725,7 @@ TabPage TP_OPTTABLE_PAGE }; MetricField MF_ROWMOVE { + HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_ROWMOVE"; Border = TRUE ; Pos = MAP_APPFONT ( 83 , 91 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -689,6 +748,7 @@ TabPage TP_OPTTABLE_PAGE }; MetricField MF_COLMOVE { + HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_COLMOVE"; Border = TRUE ; Pos = MAP_APPFONT ( 83 , 106 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -717,6 +777,7 @@ TabPage TP_OPTTABLE_PAGE }; MetricField MF_ROWINSERT { + HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_ROWINSERT"; Border = TRUE ; Pos = MAP_APPFONT ( 211 , 91 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -739,6 +800,7 @@ TabPage TP_OPTTABLE_PAGE }; MetricField MF_COLINSERT { + HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_COLINSERT"; Border = TRUE ; Pos = MAP_APPFONT ( 211 , 106 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -761,6 +823,7 @@ TabPage TP_OPTTABLE_PAGE }; RadioButton RB_FIX { + HelpID = "sw:RadioButton:TP_OPTTABLE_PAGE:RB_FIX"; Pos = MAP_APPFONT ( 21 , 133 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Fixed" ; @@ -774,6 +837,7 @@ TabPage TP_OPTTABLE_PAGE }; RadioButton RB_FIXPROP { + HelpID = "sw:RadioButton:TP_OPTTABLE_PAGE:RB_FIXPROP"; Pos = MAP_APPFONT ( 21 , 151 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Fi~xed, proportional" ; @@ -787,6 +851,7 @@ TabPage TP_OPTTABLE_PAGE }; RadioButton RB_VAR { + HelpID = "sw:RadioButton:TP_OPTTABLE_PAGE:RB_VAR"; Pos = MAP_APPFONT ( 21 , 169 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Variable" ; @@ -820,6 +885,7 @@ TabPage TP_OPTSHDWCRSR }; CheckBox CB_PARA { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_PARA"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Pa~ragraph end" ; @@ -828,48 +894,56 @@ TabPage TP_OPTSHDWCRSR }; CheckBox CB_SHYPH { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_SHYPH"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Custom h~yphens" ; }; CheckBox CB_SPACE { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_SPACE"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Spac~es" ; }; CheckBox CB_HSPACE { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_HSPACE"; Pos = MAP_APPFONT ( 12 , 53 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Non-breaking s~paces" ; }; CheckBox CB_TAB { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_TAB"; Pos = MAP_APPFONT ( 12 , 66 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Ta~bs" ; }; CheckBox CB_BREAK { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_BREAK"; Pos = MAP_APPFONT ( 12 , 79 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Brea~ks" ; }; CheckBox CB_CHAR_HIDDEN { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_CHAR_HIDDEN"; Pos = MAP_APPFONT ( 12 , 92 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Hidden text" ; }; CheckBox CB_FLD_HIDDEN { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_FLD_HIDDEN"; Pos = MAP_APPFONT ( 12 , 105 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Fields: Hidden te~xt" ; }; CheckBox CB_FLD_HIDDEN_PARA { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_FLD_HIDDEN_PARA"; Pos = MAP_APPFONT ( 12 , 118 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Fields: Hidden p~aragraphs" ; @@ -888,6 +962,7 @@ TabPage TP_OPTSHDWCRSR }; CheckBox CB_SHDWCRSONOFF { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_SHDWCRSONOFF"; Pos = MAP_APPFONT ( 136 , 14 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -903,6 +978,7 @@ TabPage TP_OPTSHDWCRSR }; RadioButton RB_SHDWCRSFILLMARGIN { + HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLMARGIN"; Pos = MAP_APPFONT ( 145 , 39 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -911,18 +987,21 @@ TabPage TP_OPTSHDWCRSR }; RadioButton RB_SHDWCRSFILLINDENT { + HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLINDENT"; Pos = MAP_APPFONT ( 145 , 52 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "~Left paragraph margin" ; }; RadioButton RB_SHDWCRSFILLTAB { + HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLTAB"; Pos = MAP_APPFONT ( 145 , 66 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "~Tabs" ; }; RadioButton RB_SHDWCRSFILLSPACE { + HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLSPACE"; Pos = MAP_APPFONT ( 145 , 79 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "Tabs a~nd spaces" ; @@ -935,6 +1014,7 @@ TabPage TP_OPTSHDWCRSR }; CheckBox CB_ALLOW_IN_PROT { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_ALLOW_IN_PROT"; Pos = MAP_APPFONT ( 136 , 107 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/config/optload.src b/sw/source/ui/config/optload.src index 618c0db35b..9fad441773 100644 --- a/sw/source/ui/config/optload.src +++ b/sw/source/ui/config/optload.src @@ -53,6 +53,7 @@ TabPage TP_OPTLOAD_PAGE }; RadioButton RB_ALWAYS { + HelpID = "sw:RadioButton:TP_OPTLOAD_PAGE:RB_ALWAYS"; Pos = MAP_APPFONT ( 18 , 26 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; TabStop = TRUE ; @@ -60,6 +61,7 @@ TabPage TP_OPTLOAD_PAGE }; RadioButton RB_REQUEST { + HelpID = "sw:RadioButton:TP_OPTLOAD_PAGE:RB_REQUEST"; Pos = MAP_APPFONT ( 18 , 39 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; TabStop = TRUE ; @@ -67,6 +69,7 @@ TabPage TP_OPTLOAD_PAGE }; RadioButton RB_NEVER { + HelpID = "sw:RadioButton:TP_OPTLOAD_PAGE:RB_NEVER"; Pos = MAP_APPFONT ( 18 , 52 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; TabStop = TRUE ; @@ -80,12 +83,14 @@ TabPage TP_OPTLOAD_PAGE }; CheckBox CB_AUTO_UPDATE_FIELDS { + HelpID = "sw:CheckBox:TP_OPTLOAD_PAGE:CB_AUTO_UPDATE_FIELDS"; Pos = MAP_APPFONT ( 136 , 26) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "~Fields"; }; CheckBox CB_AUTO_UPDATE_CHARTS { + HelpID = "sw:CheckBox:TP_OPTLOAD_PAGE:CB_AUTO_UPDATE_CHARTS"; Pos = MAP_APPFONT ( 136 , 39) ; Size = MAP_APPFONT ( 109 , 10 ) ; Text [ en-US ] = "~Charts"; @@ -104,6 +109,7 @@ TabPage TP_OPTLOAD_PAGE }; ListBox LB_METRIC { + HelpID = "sw:ListBox:TP_OPTLOAD_PAGE:LB_METRIC"; Pos = MAP_APPFONT ( 130, 77 ) ; Size = MAP_APPFONT ( 50 , 50 ) ; Border = TRUE ; @@ -118,6 +124,7 @@ TabPage TP_OPTLOAD_PAGE }; MetricField MF_TAB { + HelpID = "sw:MetricField:TP_OPTLOAD_PAGE:MF_TAB"; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 93 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; @@ -134,6 +141,7 @@ TabPage TP_OPTLOAD_PAGE }; CheckBox CB_USE_SQUARE_PAGE_MODE { + HelpID = "sw:CheckBox:TP_OPTLOAD_PAGE:CB_USE_SQUARE_PAGE_MODE"; Pos = MAP_APPFONT ( 12 , 111) ; Size = MAP_APPFONT ( 248 , 10 ) ; Text [ en-US ] = "Use square page mode for text grid"; @@ -173,6 +181,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox LB_ORDER { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_ORDER"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 141 ) ; Size = MAP_APPFONT ( 106 , 60 ) ; @@ -222,6 +231,7 @@ TabPage TP_OPTCAPTION_PAGE }; ComboBox BOX_CATEGORY { + HelpID = "sw:ComboBox:TP_OPTCAPTION_PAGE:BOX_CATEGORY"; Pos = MAP_APPFONT ( 189 , 14 ) ; Size = MAP_APPFONT ( 59 , 61 ) ; DropDown = TRUE ; @@ -237,6 +247,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox BOX_FORMAT { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:BOX_FORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 189 , 29 ) ; Size = MAP_APPFONT ( 59 , 61 ) ; @@ -252,6 +263,7 @@ TabPage TP_OPTCAPTION_PAGE }; Edit ED_NUM_SEP { + HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:ED_NUM_SEP"; Pos = MAP_APPFONT ( 189 , 44 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -268,6 +280,7 @@ TabPage TP_OPTCAPTION_PAGE }; Edit EDT_TEXT { + HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:EDT_TEXT"; Pos = MAP_APPFONT ( 189 , 59 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -283,6 +296,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox BOX_POS { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:BOX_POS"; Pos = MAP_APPFONT ( 189 , 74 ) ; Size = MAP_APPFONT ( 59 , 61 ) ; DropDown = TRUE ; @@ -304,6 +318,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox LB_LEVEL { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 189 , 100 ) ; Size = MAP_APPFONT ( 59 , 60 ) ; @@ -322,6 +337,7 @@ TabPage TP_OPTCAPTION_PAGE }; Edit ED_SEPARATOR { + HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:ED_SEPARATOR"; Pos = MAP_APPFONT ( 189 , 115 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -342,6 +358,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox LB_CHARSTYLE { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_CHARSTYLE"; Border = TRUE ; Pos = MAP_APPFONT ( 189 , 141 ) ; Size = MAP_APPFONT ( 59 , 60 ) ; @@ -354,6 +371,7 @@ TabPage TP_OPTCAPTION_PAGE }; CheckBox CB_APPLYBORDER { + HelpID = "sw:CheckBox:TP_OPTCAPTION_PAGE:CB_APPLYBORDER"; Pos = MAP_APPFONT ( 125 , 158 ) ; Size = MAP_APPFONT ( 124 , 10 ) ; Text [ en-US ] = "Apply border and shadow" ; diff --git a/sw/source/ui/config/redlopt.src b/sw/source/ui/config/redlopt.src index 2d5da19772..35211f60a7 100644 --- a/sw/source/ui/config/redlopt.src +++ b/sw/source/ui/config/redlopt.src @@ -65,6 +65,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_INS_ATTR { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_INS_ATTR"; Pos = MAP_APPFONT ( 90 , 25 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -92,6 +93,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_INS_COL { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_INS_COL"; Pos = MAP_APPFONT ( 90 , 40 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -118,6 +120,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_DEL_ATTR { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_DEL_ATTR"; Pos = MAP_APPFONT ( 90 , 67 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -131,6 +134,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_DEL_COL { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_DEL_COL"; Pos = MAP_APPFONT ( 90 , 82 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -157,6 +161,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_CHG_ATTR { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_CHG_ATTR"; Pos = MAP_APPFONT ( 90 , 111 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -170,6 +175,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_CHG_COL { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_CHG_COL"; Pos = MAP_APPFONT ( 90 , 126 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -196,6 +202,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_MARKPOS { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_MARKPOS"; Pos = MAP_APPFONT ( 90 , 155 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -217,6 +224,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_LC_COL { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_LC_COL"; Pos = MAP_APPFONT ( 90 , 170 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/dbui/addresslistdialog.src b/sw/source/ui/dbui/addresslistdialog.src index 64fcaf7806..a9f933ecda 100644 --- a/sw/source/ui/dbui/addresslistdialog.src +++ b/sw/source/ui/dbui/addresslistdialog.src @@ -61,30 +61,35 @@ ModalDialog DLG_MM_ADDRESSLISTDIALOG }; PushButton PB_LOADLIST { + HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_LOADLIST"; Pos = MAP_APPFONT ( 194 , 43 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Add..."; }; PushButton PB_CREATELIST { + HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_CREATELIST"; Pos = MAP_APPFONT ( 194 , 60 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Create..."; }; PushButton PB_FILTER { + HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_FILTER"; Pos = MAP_APPFONT ( 194 , 77 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Filter..."; }; PushButton PB_EDIT { + HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_EDIT"; Pos = MAP_APPFONT ( 194 , 94 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Edit..."; }; PushButton PB_TABLE { + HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_TABLE"; Pos = MAP_APPFONT ( 194 , 111 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "Change ~Table..."; diff --git a/sw/source/ui/dbui/createaddresslistdialog.src b/sw/source/ui/dbui/createaddresslistdialog.src index c1c0c1c748..dabce5ecc9 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.src +++ b/sw/source/ui/dbui/createaddresslistdialog.src @@ -70,24 +70,28 @@ ModalDialog DLG_MM_CREATEADDRESSLIST }; PushButton PB_NEW { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_NEW"; Pos = MAP_APPFONT ( 262 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~New"; }; PushButton PB_DELETE { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_DELETE"; Pos = MAP_APPFONT ( 262 , 32 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete"; }; PushButton PB_FIND { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_FIND"; Pos = MAP_APPFONT ( 262 , 50 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Find..."; }; PushButton PB_CUSTOMIZE { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_CUSTOMIZE"; Pos = MAP_APPFONT ( 262 , 68 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "C~ustomize..."; @@ -100,18 +104,21 @@ ModalDialog DLG_MM_CREATEADDRESSLIST }; PushButton PB_START { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_START"; Pos = MAP_APPFONT ( 100 , 180 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = "|<"; }; PushButton PB_PREV { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_PREV"; Pos = MAP_APPFONT ( 123 , 180 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = "<"; }; NumericField NF_SETNO { + HelpID = "sw:NumericField:DLG_MM_CREATEADDRESSLIST:NF_SETNO"; Pos = MAP_APPFONT ( 146 , 180 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Border = TRUE; @@ -125,12 +132,14 @@ ModalDialog DLG_MM_CREATEADDRESSLIST }; PushButton PB_NEXT { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_NEXT"; Pos = MAP_APPFONT ( 169 , 180 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = ">"; }; PushButton PB_END { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_END"; Pos = MAP_APPFONT ( 192 , 180 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = ">|"; @@ -185,18 +194,21 @@ ModelessDialog DLG_MM_FIND_ENTRY }; Edit ED_FIND { + HelpID = "sw:Edit:DLG_MM_FIND_ENTRY:ED_FIND"; Pos = MAP_APPFONT ( 6 , 14) ; Size = MAP_APPFONT ( 120 , 12 ) ; Border = TRUE; }; CheckBox CB_FINDONLY { + HelpID = "sw:CheckBox:DLG_MM_FIND_ENTRY:CB_FINDONLY"; Pos = MAP_APPFONT ( 6 , 32 ) ; Size = MAP_APPFONT ( 120 , 10 ) ; Text [ en-US ] = "Find ~only in"; }; ListBox LB_FINDONLY { + HelpID = "sw:ListBox:DLG_MM_FIND_ENTRY:LB_FINDONLY"; Pos = MAP_APPFONT ( 12 , 45 ) ; Size = MAP_APPFONT ( 114 , 50 ) ; Border = TRUE; @@ -204,6 +216,7 @@ ModelessDialog DLG_MM_FIND_ENTRY }; PushButton PB_FIND { + HelpID = "sw:PushButton:DLG_MM_FIND_ENTRY:PB_FIND"; Pos = MAP_APPFONT ( 132 , 3 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; DefButton = TRUE; diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.src b/sw/source/ui/dbui/customizeaddresslistdialog.src index 05892d90ec..b5a6881970 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.src +++ b/sw/source/ui/dbui/customizeaddresslistdialog.src @@ -50,30 +50,35 @@ ModalDialog DLG_MM_CUSTOMIZE_ADDRESS_LIST }; ListBox LB_FIELDS { + HelpID = "sw:ListBox:DLG_MM_CUSTOMIZE_ADDRESS_LIST:LB_FIELDS"; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 112 , 120 ) ; Border = TRUE; }; PushButton PB_ADD { + HelpID = "sw:PushButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_ADD"; Pos = MAP_APPFONT ( 144 , 3 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Add..."; }; PushButton PB_DELETE { + HelpID = "sw:PushButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_DELETE"; Pos = MAP_APPFONT ( 144 , 20 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete"; }; PushButton PB_RENAME { + HelpID = "sw:PushButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_RENAME"; Pos = MAP_APPFONT ( 144 , 37 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Rename..."; }; ImageButton PB_UP { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_UP"; Pos = MAP_APPFONT ( 124 , 58 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; SYMBOL = IMAGEBUTTON_ARROW_UP; @@ -81,6 +86,7 @@ ModalDialog DLG_MM_CUSTOMIZE_ADDRESS_LIST }; ImageButton PB_DOWN { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_DOWN"; Pos = MAP_APPFONT ( 124 , 75 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; SYMBOL = IMAGEBUTTON_ARROW_DOWN; @@ -129,6 +135,7 @@ ModalDialog DLG_MM_ADD_RENAME_ENTRY }; Edit ED_FIELDNAME { + HelpID = "sw:Edit:DLG_MM_ADD_RENAME_ENTRY:ED_FIELDNAME"; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 120 , 12 ) ; Border = TRUE; diff --git a/sw/source/ui/dbui/dbinsdlg.src b/sw/source/ui/dbui/dbinsdlg.src index d08305dde1..5a3292d1d0 100644 --- a/sw/source/ui/dbui/dbinsdlg.src +++ b/sw/source/ui/dbui/dbinsdlg.src @@ -46,6 +46,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_AS_TABLE { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_AS_TABLE"; Pos = MAP_APPFONT ( 80 , 6 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; TabStop = TRUE ; @@ -54,6 +55,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_AS_FIELD { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_AS_FIELD"; Pos = MAP_APPFONT ( 145 , 6 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; TabStop = TRUE ; @@ -61,6 +63,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_AS_TEXT { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_AS_TEXT"; Pos = MAP_APPFONT ( 210 , 6 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; TabStop = TRUE ; @@ -106,6 +109,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_DBFMT_FROM_DB { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_DBFMT_FROM_DB"; Pos = MAP_APPFONT ( 15 , 128 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; TabStop = TRUE ; @@ -114,12 +118,14 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_DBFMT_FROM_USR { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_DBFMT_FROM_USR"; Pos = MAP_APPFONT ( 15 , 143 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; TabStop = TRUE ; }; ListBox LB_DBFMT_FROM_USR { + HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_DBFMT_FROM_USR"; Border = TRUE ; Pos = MAP_APPFONT ( 30 , 142 ) ; Size = MAP_APPFONT ( 75 , 44 ) ; @@ -130,6 +136,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL /* -------------- Page Text / Fields -------------------------------- */ ListBox LB_TXT_DB_COLUMN { + HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_TXT_DB_COLUMN"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 41 ) ; Size = MAP_APPFONT ( 93 , 70 ) ; @@ -138,6 +145,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ImageButton IB_DBCOL_TOEDIT { + HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_TOEDIT"; Pos = MAP_APPFONT ( 111 , 41 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -153,6 +161,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; MultiLineEdit ED_DB_TEXT { + HelpID = "sw:MultiLineEdit:DLG_AP_INSERT_DB_SEL:ED_DB_TEXT"; Border = TRUE ; Pos = MAP_APPFONT ( 137 , 41 ) ; Size = MAP_APPFONT ( 142 , 70 ) ; @@ -172,6 +181,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ListBox LB_DB_PARA_COLL { + HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_DB_PARA_COLL"; Border = TRUE ; Pos = MAP_APPFONT ( 182 , 127 ) ; Size = MAP_APPFONT ( 97 , 59 ) ; @@ -183,6 +193,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL /* -------------- Page Table ---------------------------------------- */ ListBox LB_TBL_DB_COLUMN { + HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_TBL_DB_COLUMN"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 41 ) ; Size = MAP_APPFONT ( 93 , 70 ) ; @@ -190,6 +201,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ImageButton IB_DBCOL_ALL_TO { + HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_ALL_TO"; Pos = MAP_APPFONT ( 111 , 41 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -204,6 +216,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ImageButton IB_DBCOL_ONE_TO { + HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_ONE_TO"; Pos = MAP_APPFONT ( 111 , 56 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -218,6 +231,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ImageButton IB_DBCOL_ONE_FROM { + HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_ONE_FROM"; Pos = MAP_APPFONT ( 111 , 84 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -232,6 +246,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ImageButton IB_DBCOL_ALL_FROM { + HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_ALL_FROM"; Pos = MAP_APPFONT ( 111 , 99 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -253,6 +268,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ListBox LB_TABLE_COL { + HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_TABLE_COL"; Border = TRUE ; Pos = MAP_APPFONT ( 137 , 41 ) ; Size = MAP_APPFONT ( 75 , 70 ) ; @@ -265,6 +281,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; CheckBox CB_TABLE_HEADON { + HelpID = "sw:CheckBox:DLG_AP_INSERT_DB_SEL:CB_TABLE_HEADON"; Pos = MAP_APPFONT ( 111 , 128 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -273,6 +290,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_HEADL_COLNMS { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_HEADL_COLNMS"; Pos = MAP_APPFONT ( 120 , 142 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; TabStop = TRUE ; @@ -281,6 +299,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_HEADL_EMPTY { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_HEADL_EMPTY"; Pos = MAP_APPFONT ( 120 , 155 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; TabStop = TRUE ; @@ -288,6 +307,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; PushButton PB_TBL_FORMAT { + HelpID = "sw:PushButton:DLG_AP_INSERT_DB_SEL:PB_TBL_FORMAT"; Pos = MAP_APPFONT ( 214 , 128 ) ; Size = MAP_APPFONT ( 65 , 12 ) ; Text [ en-US ] = "Pr~operties..." ; @@ -295,6 +315,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; PushButton PB_TBL_AUTOFMT { + HelpID = "sw:PushButton:DLG_AP_INSERT_DB_SEL:PB_TBL_AUTOFMT"; Pos = MAP_APPFONT ( 214 , 144 ) ; Size = MAP_APPFONT ( 65 , 12 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/dbui/dbui.src b/sw/source/ui/dbui/dbui.src index 8d073412ab..49ddd67948 100644 --- a/sw/source/ui/dbui/dbui.src +++ b/sw/source/ui/dbui/dbui.src @@ -31,6 +31,7 @@ #include "helpid.h" ModalDialog DLG_DBSELECTION { + HelpID = "sw:ModalDialog:DLG_DBSELECTION"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 168 , 132 ) ; diff --git a/sw/source/ui/dbui/mailmergechildwindow.src b/sw/source/ui/dbui/mailmergechildwindow.src index 187f50b584..9e8253c917 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.src +++ b/sw/source/ui/dbui/mailmergechildwindow.src @@ -258,6 +258,7 @@ ModalDialog DLG_MM_SENDWARNING }; MultiLineEdit ED_DETAILS { + HelpID = "sw:MultiLineEdit:DLG_MM_SENDWARNING:ED_DETAILS"; Pos = MAP_APPFONT ( 40 , 50 ) ; Size = MAP_APPFONT ( 194 , 50 ) ; Border = TRUE; diff --git a/sw/source/ui/dbui/mailmergewizard.src b/sw/source/ui/dbui/mailmergewizard.src index ad7d574800..2756f5ff7a 100644 --- a/sw/source/ui/dbui/mailmergewizard.src +++ b/sw/source/ui/dbui/mailmergewizard.src @@ -30,6 +30,7 @@ ModalDialog DLG_MAILMERGEWIZARD { + HelpID = "sw:ModalDialog:DLG_MAILMERGEWIZARD"; OutputSize = TRUE ; SVLook = TRUE ; Text [ en-US ] = "Mail Merge Wizard" ; diff --git a/sw/source/ui/dbui/mmaddressblockpage.src b/sw/source/ui/dbui/mmaddressblockpage.src index 7052b27f25..d06ced7e29 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.src +++ b/sw/source/ui/dbui/mmaddressblockpage.src @@ -63,6 +63,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; PushButton PB_ADDRESSLIST { + HelpID = "sw:PushButton:DLG_MM_ADDRESSBLOCK_PAGE:PB_ADDRESSLIST"; Pos = MAP_APPFONT ( 154 , 27 ) ; Size = MAP_APPFONT ( 100 , 14 ) ; Text[ en-US ] = "Select A~ddress List..."; @@ -91,6 +92,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; CheckBox CB_ADDRESS { + HelpID = "sw:CheckBox:DLG_MM_ADDRESSBLOCK_PAGE:CB_ADDRESS"; Pos = MAP_APPFONT ( 16 , 66 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text[ en-US ] = "~This document shall contain an address block"; @@ -103,6 +105,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; PushButton PB_SETTINGS { + HelpID = "sw:PushButton:DLG_MM_ADDRESSBLOCK_PAGE:PB_SETTINGS"; Pos = MAP_APPFONT ( 194 , 110 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Group = FALSE; @@ -110,6 +113,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; CheckBox CB_HIDE_EMPTY_PARA { + HelpID = "sw:CheckBox:DLG_MM_ADDRESSBLOCK_PAGE:CB_HIDE_EMPTY_PARA"; Pos = MAP_APPFONT ( 24 , 127 ) ; Size = MAP_APPFONT ( 230 , 10 ) ; Text[ en-US ] = "~Suppress lines with just empty fields"; @@ -134,6 +138,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; PushButton PB_ASSIGN { + HelpID = "sw:PushButton:DLG_MM_ADDRESSBLOCK_PAGE:PB_ASSIGN"; Pos = MAP_APPFONT ( 194 , 151 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text[ en-US ] = "Match ~Fields..."; @@ -169,6 +174,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; ImageButton IB_PREVSET { + HelpID = "sw:ImageButton:DLG_MM_ADDRESSBLOCK_PAGE:IB_PREVSET"; Pos = MAP_APPFONT ( 167 , 238 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; SYMBOL = IMAGEBUTTON_PREV; @@ -176,6 +182,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; ImageButton IB_NEXTSET { + HelpID = "sw:ImageButton:DLG_MM_ADDRESSBLOCK_PAGE:IB_NEXTSET"; Pos = MAP_APPFONT ( 178 , 238 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; SYMBOL = IMAGEBUTTON_NEXT ; @@ -215,18 +222,21 @@ ModalDialog DLG_MM_SELECTADDRESSBLOCK }; PushButton PB_NEW { + HelpID = "sw:PushButton:DLG_MM_SELECTADDRESSBLOCK:PB_NEW"; Pos = MAP_APPFONT ( 204 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~New..."; }; PushButton PB_CUSTOMIZE { + HelpID = "sw:PushButton:DLG_MM_SELECTADDRESSBLOCK:PB_CUSTOMIZE"; Pos = MAP_APPFONT ( 204 , 31 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Edit..."; }; PushButton PB_DELETE { + HelpID = "sw:PushButton:DLG_MM_SELECTADDRESSBLOCK:PB_DELETE"; Pos = MAP_APPFONT ( 204 , 48 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Group = FALSE; @@ -241,24 +251,28 @@ ModalDialog DLG_MM_SELECTADDRESSBLOCK }; RadioButton RB_NEVER { + HelpID = "sw:RadioButton:DLG_MM_SELECTADDRESSBLOCK:RB_NEVER"; Pos = MAP_APPFONT ( 12 , 131 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "N~ever include the country/region"; }; RadioButton RB_ALWAYS { + HelpID = "sw:RadioButton:DLG_MM_SELECTADDRESSBLOCK:RB_ALWAYS"; Pos = MAP_APPFONT ( 12 , 145 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "~Always include the country/region"; }; RadioButton RB_DEPENDENT { + HelpID = "sw:RadioButton:DLG_MM_SELECTADDRESSBLOCK:RB_DEPENDENT"; Pos = MAP_APPFONT ( 12 , 159 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "Only ~include the country/region if it is not:"; }; Edit ED_COUNTRY { + HelpID = "sw:Edit:DLG_MM_SELECTADDRESSBLOCK:ED_COUNTRY"; Pos = MAP_APPFONT ( 18 , 172 ) ; Size = MAP_APPFONT ( 180 , 12 ) ; Border = TRUE; @@ -337,6 +351,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ImageButton IB_INSERTFIELD { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_INSERTFIELD"; Pos = MAP_APPFONT ( 80 , 29 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_RIGHT; @@ -348,6 +363,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ImageButton IB_REMOVEFIELD { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_REMOVEFIELD"; Pos = MAP_APPFONT ( 80 , 46 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_LEFT; @@ -369,12 +385,14 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; MultiLineEdit ED_DRAG { + HelpID = "sw:MultiLineEdit:DLG_MM_CUSTOMIZEADDRESSBLOCK:ED_DRAG"; Pos = MAP_APPFONT ( 106 , 14 ) ; Size = MAP_APPFONT ( 160 , 60 ) ; Border = TRUE; }; ImageButton IB_UP { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_UP"; Pos = MAP_APPFONT ( 285 , 14 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_UP; @@ -382,6 +400,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ImageButton IB_LEFT { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_LEFT"; Pos = MAP_APPFONT ( 270 , 29 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_LEFT; @@ -389,6 +408,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ImageButton IB_RIGHT { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_RIGHT"; Pos = MAP_APPFONT ( 300 , 29 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_RIGHT; @@ -396,6 +416,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ImageButton IB_DOWN { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_DOWN"; Pos = MAP_APPFONT ( 285 , 48 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_DOWN; @@ -410,6 +431,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ComboBox CB_FIELD { + HelpID = "sw:ComboBox:DLG_MM_CUSTOMIZEADDRESSBLOCK:CB_FIELD"; Pos = MAP_APPFONT ( 106 , 89 ) ; Size = MAP_APPFONT ( 160 , 50 ) ; Border = TRUE; @@ -560,6 +582,7 @@ ModalDialog DLG_MM_ASSIGNFIELDS }; ListBox LB_FIELDS { + HelpID = "sw:ListBox:DLG_MM_ASSIGNFIELDS:LB_FIELDS"; Pos = MAP_APPFONT ( 83 , 4 ) ; Size = MAP_APPFONT ( 74 , 50 ) ; TabStop = TRUE; diff --git a/sw/source/ui/dbui/mmdocselectpage.src b/sw/source/ui/dbui/mmdocselectpage.src index ace679af4f..9f6c1df5df 100644 --- a/sw/source/ui/dbui/mmdocselectpage.src +++ b/sw/source/ui/dbui/mmdocselectpage.src @@ -47,48 +47,56 @@ TabPage DLG_MM_DOCSELECT_PAGE }; RadioButton RB_CURRENTDOC { + HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_CURRENTDOC"; Pos = MAP_APPFONT ( 12 , 48 ) ; Size = MAP_APPFONT ( 190 , 10 ) ; Text[ en-US ] = "Use the current ~document"; }; RadioButton RB_NEWDOC { + HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_NEWDOC"; Pos = MAP_APPFONT ( 12 , 66 ) ; Size = MAP_APPFONT ( 190 , 10 ) ; Text[ en-US ] = "Create a ne~w document"; }; RadioButton RB_LOADDOC { + HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_LOADDOC"; Pos = MAP_APPFONT ( 12 , 84) ; Size = MAP_APPFONT ( 190 , 10 ) ; Text[ en-US ] = "Start from ~existing document"; }; PushButton PB_LOADDOC { + HelpID = "sw:PushButton:DLG_MM_DOCSELECT_PAGE:PB_LOADDOC"; Pos = MAP_APPFONT ( 204 , 80) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "B~rowse..."; }; RadioButton RB_LOADTEMPLATE { + HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_LOADTEMPLATE"; Pos = MAP_APPFONT ( 12 , 103 ) ; Size = MAP_APPFONT ( 190 , 10 ) ; Text[ en-US ] = "Start from a t~emplate"; }; PushButton PB_BROWSETEMPLATE { + HelpID = "sw:PushButton:DLG_MM_DOCSELECT_PAGE:PB_BROWSETEMPLATE"; Pos = MAP_APPFONT ( 204 , 99 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "B~rowse..."; }; RadioButton RB_RECENTDOC { + HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_RECENTDOC"; Pos = MAP_APPFONT ( 12 , 120) ; Size = MAP_APPFONT ( 190 , 10 ) ; Text[ en-US ] = "Start fro~m a recently saved starting document"; }; ListBox LB_RECENTDOC { + HelpID = "sw:ListBox:DLG_MM_DOCSELECT_PAGE:LB_RECENTDOC"; Pos = MAP_APPFONT ( 20 , 134 ) ; Size = MAP_APPFONT ( 180 , 50 ) ; DropDown = TRUE; diff --git a/sw/source/ui/dbui/mmgreetingspage.src b/sw/source/ui/dbui/mmgreetingspage.src index fff77d9240..5cae953a35 100644 --- a/sw/source/ui/dbui/mmgreetingspage.src +++ b/sw/source/ui/dbui/mmgreetingspage.src @@ -144,6 +144,7 @@ TabPage DLG_MM_GREETINGS_PAGE }; CheckBox CB_GREETINGLINE { + HelpID = "sw:CheckBox:DLG_MM_GREETINGS_PAGE:CB_GREETINGLINE"; Pos = MAP_APPFONT ( 12 , 27 ); Size = MAP_APPFONT ( 242 , 10 ); Text[ en-US ] = "This document should contain a salutation"; @@ -163,6 +164,7 @@ TabPage DLG_MM_GREETINGS_PAGE }; PushButton PB_ASSIGN { + HelpID = "sw:PushButton:DLG_MM_GREETINGS_PAGE:PB_ASSIGN"; Pos = MAP_APPFONT ( 204 , 179 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Match fields..."; @@ -175,6 +177,7 @@ TabPage DLG_MM_GREETINGS_PAGE }; ImageButton IB_PREVSET { + HelpID = "sw:ImageButton:DLG_MM_GREETINGS_PAGE:IB_PREVSET"; Pos = MAP_APPFONT ( 177 , 204 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; SYMBOL = IMAGEBUTTON_PREV; @@ -182,6 +185,7 @@ TabPage DLG_MM_GREETINGS_PAGE }; ImageButton IB_NEXTSET { + HelpID = "sw:ImageButton:DLG_MM_GREETINGS_PAGE:IB_NEXTSET"; Pos = MAP_APPFONT ( 188 , 204 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; SYMBOL = IMAGEBUTTON_NEXT ; @@ -208,6 +212,7 @@ ModalDialog DLG_MM_MAILBODY Text [ en-US ] = "E-Mail Message"; CheckBox CB_GREETINGLINE { + HelpID = "sw:CheckBox:DLG_MM_MAILBODY:CB_GREETINGLINE"; Pos = MAP_APPFONT ( 6 , 3 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text[ en-US ] = "This e-mail should contain a salutation"; @@ -221,6 +226,7 @@ ModalDialog DLG_MM_MAILBODY }; MultiLineEdit MLE_BODY { + HelpID = "sw:MultiLineEdit:DLG_MM_MAILBODY:MLE_BODY"; Pos = MAP_APPFONT ( 12, 151 ) ; Size = MAP_APPFONT ( 180 , 50 ) ; Border = TRUE; diff --git a/sw/source/ui/dbui/mmlayoutpage.src b/sw/source/ui/dbui/mmlayoutpage.src index 07582a45ef..94e1387306 100644 --- a/sw/source/ui/dbui/mmlayoutpage.src +++ b/sw/source/ui/dbui/mmlayoutpage.src @@ -48,6 +48,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; CheckBox CB_ALIGN { + HelpID = "sw:CheckBox:DLG_MM_LAYOUT_PAGE:CB_ALIGN"; Pos = MAP_APPFONT ( 6 , 40 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text[ en-US ] = "Align to text body"; @@ -60,6 +61,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; MetricField MF_LEFT { + HelpID = "sw:MetricField:DLG_MM_LAYOUT_PAGE:MF_LEFT"; Pos = MAP_APPFONT ( 78 , 52 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -83,6 +85,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; MetricField MF_TOP { + HelpID = "sw:MetricField:DLG_MM_LAYOUT_PAGE:MF_TOP"; Pos = MAP_APPFONT ( 78 , 67 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -112,6 +115,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; PushButton MF_UP { + HelpID = "sw:PushButton:DLG_MM_LAYOUT_PAGE:MF_UP"; Pos = MAP_APPFONT ( 68 , 96 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Up"; @@ -124,6 +128,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; PushButton PB_DOWN { + HelpID = "sw:PushButton:DLG_MM_LAYOUT_PAGE:PB_DOWN"; Pos = MAP_APPFONT ( 68 , 113 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Down"; @@ -143,6 +148,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; ListBox LB_ZOOM { + HelpID = "sw:ListBox:DLG_MM_LAYOUT_PAGE:LB_ZOOM"; Pos = MAP_APPFONT ( 204 , 182 ) ; Size = MAP_APPFONT ( 50 , 50 ) ; Border = TRUE; diff --git a/sw/source/ui/dbui/mmmergepage.src b/sw/source/ui/dbui/mmmergepage.src index fd9fffc0de..8480e97e0e 100644 --- a/sw/source/ui/dbui/mmmergepage.src +++ b/sw/source/ui/dbui/mmmergepage.src @@ -49,6 +49,7 @@ TabPage DLG_MM_MERGE_PAGE }; PushButton PB_EDIT { + HelpID = "sw:PushButton:DLG_MM_MERGE_PAGE:PB_EDIT"; Pos = MAP_APPFONT ( 70 , 67 ) ; Size = MAP_APPFONT ( 120 , 14 ) ; Text [ en-US ] = "~Edit individual document..."; @@ -67,30 +68,35 @@ TabPage DLG_MM_MERGE_PAGE }; Edit ED_FIND { + HelpID = "sw:Edit:DLG_MM_MERGE_PAGE:ED_FIND"; Pos = MAP_APPFONT ( 55 ,114 ) ; Size = MAP_APPFONT ( 140 , 12 ) ; Border = TRUE; }; PushButton PB_FIND { + HelpID = "sw:PushButton:DLG_MM_MERGE_PAGE:PB_FIND"; Pos = MAP_APPFONT ( 198 ,113 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Find..."; }; CheckBox CB_WHOLEWORDS { + HelpID = "sw:CheckBox:DLG_MM_MERGE_PAGE:CB_WHOLEWORDS"; Pos = MAP_APPFONT ( 55 , 131 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; Text [ en-US ] = "Whole wor~ds only"; }; CheckBox CB_BACKWARDS { + HelpID = "sw:CheckBox:DLG_MM_MERGE_PAGE:CB_BACKWARDS"; Pos = MAP_APPFONT ( 55 , 144 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; Text [ en-US ] = "Back~wards"; }; CheckBox CB_MATCHCASE { + HelpID = "sw:CheckBox:DLG_MM_MERGE_PAGE:CB_MATCHCASE"; Pos = MAP_APPFONT ( 55 , 157 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; Text [ en-US ] = "Ma~tch case"; diff --git a/sw/source/ui/dbui/mmoutputpage.src b/sw/source/ui/dbui/mmoutputpage.src index 29e54bbb40..4801706083 100644 --- a/sw/source/ui/dbui/mmoutputpage.src +++ b/sw/source/ui/dbui/mmoutputpage.src @@ -48,24 +48,28 @@ TabPage DLG_MM_OUTPUT_PAGE }; RadioButton RB_SAVESTARTDOC { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SAVESTARTDOC"; Pos = MAP_APPFONT ( 45 , 40 ) ; Size = MAP_APPFONT ( 209 , 10 ) ; Text[ en-US ] = "~Save starting document"; }; RadioButton RB_SAVEMERGEDDOC { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SAVEMERGEDDOC"; Pos = MAP_APPFONT ( 45 , 53 ) ; Size = MAP_APPFONT ( 209 , 10 ) ; Text[ en-US ] = "Save ~merged document" ; }; RadioButton RB_PRINT { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_PRINT"; Pos = MAP_APPFONT ( 45 , 66 ) ; Size = MAP_APPFONT ( 209 , 10 ) ; Text[ en-US ] = "~Print merged document"; }; RadioButton RB_SENDMAIL { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SENDMAIL"; Pos = MAP_APPFONT ( 45 , 79 ) ; Size = MAP_APPFONT ( 209 , 10 ) ; Text[ en-US ] = "Send merged document as ~E-Mail"; @@ -77,30 +81,35 @@ TabPage DLG_MM_OUTPUT_PAGE }; PushButton PB_SAVESTARTDOC { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_SAVESTARTDOC"; Pos = MAP_APPFONT ( 55 , 108 ) ; Size = MAP_APPFONT ( 100 , 14 ) ; Text[ en-US ] = "Save starting ~document"; }; RadioButton RB_SAVEASONE { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SAVEASONE"; Pos = MAP_APPFONT ( 45 , 109 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "S~ave as single document"; }; RadioButton RB_SAVEINDIVIDUAL { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SAVEINDIVIDUAL"; Pos = MAP_APPFONT ( 45, 123 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "Sa~ve as individual documents"; }; RadioButton RB_FROM { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_FROM"; Pos = MAP_APPFONT ( 45 , 137 ) ; Size = MAP_APPFONT ( 30 , 10 ) ; Text[ en-US ] = "~From"; }; NumericField NF_FROM { + HelpID = "sw:NumericField:DLG_MM_OUTPUT_PAGE:NF_FROM"; Pos = MAP_APPFONT ( 78 , 136 ) ; Size = MAP_APPFONT ( 20 , 10 ) ; Border = TRUE; @@ -120,6 +129,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; NumericField NF_TO { + HelpID = "sw:NumericField:DLG_MM_OUTPUT_PAGE:NF_TO"; Pos = MAP_APPFONT ( 124 , 136 ) ; Size = MAP_APPFONT ( 20 , 10 ) ; Border = TRUE; @@ -132,6 +142,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; PushButton PB_SAVENOW { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_SAVENOW"; Pos = MAP_APPFONT ( 45 , 150 ) ; Size = MAP_APPFONT ( 80 , 14 ) ; Text[ en-US ] = "Save Do~cuments"; @@ -144,6 +155,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; ListBox LB_PRINT { + HelpID = "sw:ListBox:DLG_MM_OUTPUT_PAGE:LB_PRINT"; Pos = MAP_APPFONT ( 45 , 109 ) ; Size = MAP_APPFONT ( 147 , 50 ) ; Border = TRUE; @@ -152,18 +164,21 @@ TabPage DLG_MM_OUTPUT_PAGE }; PushButton PB_PRINTERSETTINGS { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_PRINTERSETTINGS"; Pos = MAP_APPFONT ( 198 , 108 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "P~roperties..."; }; RadioButton RB_PRINTALL { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_PRINTALL"; Pos = MAP_APPFONT ( 45 , 126 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "Print ~all documents"; }; PushButton PB_PRINTNOW { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_PRINTNOW"; Pos = MAP_APPFONT ( 45 , 155 ) ; Size = MAP_APPFONT ( 80 , 14 ) ; Text[ en-US ] = "Prin~t Documents"; @@ -177,6 +192,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; ListBox LB_MAILTO { + HelpID = "sw:ListBox:DLG_MM_OUTPUT_PAGE:LB_MAILTO"; Pos = MAP_APPFONT ( 45 , 109 ) ; Size = MAP_APPFONT ( 147 , 50 ) ; DropDown = TRUE; @@ -184,6 +200,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; PushButton PB_COPYTO { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_COPYTO"; Pos = MAP_APPFONT ( 198 , 108 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Copy to..."; @@ -196,6 +213,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; Edit ED_SUBJECT { + HelpID = "sw:Edit:DLG_MM_OUTPUT_PAGE:ED_SUBJECT"; Pos = MAP_APPFONT ( 45 , 125 ) ; Size = MAP_APPFONT ( 147 , 12 ) ; Border = TRUE; @@ -208,6 +226,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; ListBox LB_SENDAS { + HelpID = "sw:ListBox:DLG_MM_OUTPUT_PAGE:LB_SENDAS"; Pos = MAP_APPFONT ( 45 , 141 ) ; Size = MAP_APPFONT (147 , 70 ) ; DropDown = TRUE; @@ -231,6 +250,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; PushButton PB_SENDAS { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_SENDAS"; Pos = MAP_APPFONT ( 198 , 140 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "Pr~operties..."; @@ -243,18 +263,21 @@ TabPage DLG_MM_OUTPUT_PAGE }; Edit ED_ATTACHMENT { + HelpID = "sw:Edit:DLG_MM_OUTPUT_PAGE:ED_ATTACHMENT"; Pos = MAP_APPFONT ( 45 , 168 ) ; Size = MAP_APPFONT ( 147 , 12 ) ; Border = TRUE; }; RadioButton RB_SENDALL { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SENDALL"; Pos = MAP_APPFONT ( 45 , 184 ) ; Size = MAP_APPFONT ( 153 , 10 ) ; Text[ en-US ] = "S~end all documents"; }; PushButton PB_SENDDOCUMENTS { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_SENDDOCUMENTS"; Pos = MAP_APPFONT ( 45 , 212 ) ; Size = MAP_APPFONT ( 80 , 14 ) ; Text[ en-US ] = "Se~nd documents"; @@ -321,6 +344,7 @@ ModalDialog DLG_MM_COPYTO }; Edit ED_CC { + HelpID = "sw:Edit:DLG_MM_COPYTO:ED_CC"; Pos = MAP_APPFONT ( 40 , 15 ) ; Size = MAP_APPFONT ( 204 , 12 ) ; Border = TRUE; @@ -333,6 +357,7 @@ ModalDialog DLG_MM_COPYTO }; Edit ED_BCC { + HelpID = "sw:Edit:DLG_MM_COPYTO:ED_BCC"; Pos = MAP_APPFONT ( 40 , 31 ) ; Size = MAP_APPFONT ( 204 , 12 ) ; Border = TRUE; @@ -396,6 +421,7 @@ ModalDialog DLG_MM_SAVEWARNING }; Edit ED_FILENAME { + HelpID = "sw:Edit:DLG_MM_SAVEWARNING:ED_FILENAME"; Pos = MAP_APPFONT ( 40 , 50 ) ; Size = MAP_APPFONT ( 154 , 12 ) ; Border = TRUE; @@ -439,6 +465,7 @@ ModalDialog DLG_MM_QUERY }; Edit ED_TEXT { + HelpID = "sw:Edit:DLG_MM_QUERY:ED_TEXT"; Pos = MAP_APPFONT ( 40 , 39 ) ; Size = MAP_APPFONT ( 194 , 12 ) ; Border = TRUE; diff --git a/sw/source/ui/dbui/mmoutputtypepage.src b/sw/source/ui/dbui/mmoutputtypepage.src index a6dd74cc7a..72d7e39365 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.src +++ b/sw/source/ui/dbui/mmoutputtypepage.src @@ -48,12 +48,14 @@ TabPage DLG_MM_OUTPUTTYPE_PAGE }; RadioButton RB_LETTER { + HelpID = "sw:RadioButton:DLG_MM_OUTPUTTYPE_PAGE:RB_LETTER"; Pos = MAP_APPFONT ( 12 , 43 ) ; Size = MAP_APPFONT ( 240 , 10 ) ; Text[ en-US ] = "~Letter"; }; RadioButton RB_MAIL { + HelpID = "sw:RadioButton:DLG_MM_OUTPUTTYPE_PAGE:RB_MAIL"; Pos = MAP_APPFONT ( 12 , 57 ) ; Size = MAP_APPFONT ( 240 , 10 ) ; Text[ en-US ] = "~E-mail message"; diff --git a/sw/source/ui/dbui/mmpreparemergepage.src b/sw/source/ui/dbui/mmpreparemergepage.src index b1ecd375d4..c763cfa465 100644 --- a/sw/source/ui/dbui/mmpreparemergepage.src +++ b/sw/source/ui/dbui/mmpreparemergepage.src @@ -57,6 +57,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE PushButton PB_FIRST { + HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_FIRST"; Pos = MAP_APPFONT ( 75 , 55 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = "|<" ; @@ -64,6 +65,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; PushButton PB_PREV { + HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_PREV"; Pos = MAP_APPFONT ( 98 , 55 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = "<" ; @@ -71,6 +73,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; NumericField ED_RECORD { + HelpID = "sw:NumericField:DLG_MM_PREPAREMERGE_PAGE:ED_RECORD"; Pos = MAP_APPFONT ( 121 , 56 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; Border = TRUE ; @@ -83,6 +86,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; PushButton PB_NEXT { + HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_NEXT"; Pos = MAP_APPFONT ( 144 , 55 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = ">" ; @@ -90,6 +94,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; PushButton PB_LAST { + HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_LAST"; Pos = MAP_APPFONT ( 167 , 55 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = ">|" ; @@ -97,6 +102,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; CheckBox CB_EXCLUDE { + HelpID = "sw:CheckBox:DLG_MM_PREPAREMERGE_PAGE:CB_EXCLUDE"; Pos = MAP_APPFONT ( 75, 77 ) ; Size = MAP_APPFONT ( 179 , 10 ) ; Text[ en-US ] = "E~xclude this recipient"; @@ -116,6 +122,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; PushButton PB_EDIT { + HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_EDIT"; Pos = MAP_APPFONT ( 90 , 185 ) ; Size = MAP_APPFONT ( 80 , 14 ) ; Text[ en-US ] = "~Edit Document..."; diff --git a/sw/source/ui/dbui/selectdbtabledialog.src b/sw/source/ui/dbui/selectdbtabledialog.src index 467cb8333e..61d68f6fde 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.src +++ b/sw/source/ui/dbui/selectdbtabledialog.src @@ -54,6 +54,7 @@ ModalDialog DLG_MM_SELECTDBTABLEDDIALOG }; PushButton PB_PREVIEW { + HelpID = "sw:PushButton:DLG_MM_SELECTDBTABLEDDIALOG:PB_PREVIEW"; Pos = MAP_APPFONT ( 6 , 84 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Preview"; diff --git a/sw/source/ui/dialog/abstract.src b/sw/source/ui/dialog/abstract.src index ab5a86394b..a29b7e6339 100644 --- a/sw/source/ui/dialog/abstract.src +++ b/sw/source/ui/dialog/abstract.src @@ -53,6 +53,7 @@ ModalDialog DLG_INSERT_ABSTRACT }; NumericField NF_LEVEL { + HelpID = "sw:NumericField:DLG_INSERT_ABSTRACT:NF_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 153 , 12 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -75,6 +76,7 @@ ModalDialog DLG_INSERT_ABSTRACT }; NumericField NF_PARA { + HelpID = "sw:NumericField:DLG_INSERT_ABSTRACT:NF_PARA"; Border = TRUE ; Pos = MAP_APPFONT ( 153 , 27 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; diff --git a/sw/source/ui/dialog/ascfldlg.src b/sw/source/ui/dialog/ascfldlg.src index f10fed8a87..66be6d35c9 100644 --- a/sw/source/ui/dialog/ascfldlg.src +++ b/sw/source/ui/dialog/ascfldlg.src @@ -50,6 +50,7 @@ ModalDialog DLG_ASCII_FILTER }; ListBox LB_CHARSET { + HelpID = "sw:ListBox:DLG_ASCII_FILTER:LB_CHARSET"; Pos = MAP_APPFONT ( 80 , 14 ) ; Size = MAP_APPFONT ( 90 , 61 ) ; TabStop = TRUE ; @@ -64,6 +65,7 @@ ModalDialog DLG_ASCII_FILTER }; ListBox LB_FONT { + HelpID = "sw:ListBox:DLG_ASCII_FILTER:LB_FONT"; Pos = MAP_APPFONT ( 80 , 30 ) ; Size = MAP_APPFONT ( 90 , 61 ) ; TabStop = TRUE ; @@ -78,6 +80,7 @@ ModalDialog DLG_ASCII_FILTER }; ListBox LB_LANGUAGE { + HelpID = "sw:ListBox:DLG_ASCII_FILTER:LB_LANGUAGE"; Pos = MAP_APPFONT ( 80 , 46 ) ; Size = MAP_APPFONT ( 90 , 61 ) ; TabStop = TRUE ; @@ -92,6 +95,7 @@ ModalDialog DLG_ASCII_FILTER }; RadioButton RB_CRLF { + HelpID = "sw:RadioButton:DLG_ASCII_FILTER:RB_CRLF"; Pos = MAP_APPFONT ( 80 , 64 ) ; Size = MAP_APPFONT ( 40 , 10 ) ; TabStop = TRUE ; @@ -100,6 +104,7 @@ ModalDialog DLG_ASCII_FILTER }; RadioButton RB_CR { + HelpID = "sw:RadioButton:DLG_ASCII_FILTER:RB_CR"; Pos = MAP_APPFONT ( 121 , 64 ) ; Size = MAP_APPFONT ( 20 , 10 ) ; // TabStop = TRUE ; @@ -107,6 +112,7 @@ ModalDialog DLG_ASCII_FILTER }; RadioButton RB_LF { + HelpID = "sw:RadioButton:DLG_ASCII_FILTER:RB_LF"; Pos = MAP_APPFONT ( 155 , 64 ) ; Size = MAP_APPFONT ( 20 , 10 ) ; // TabStop = TRUE ; diff --git a/sw/source/ui/dialog/docstdlg.src b/sw/source/ui/dialog/docstdlg.src index 5926321d88..3cce7454c5 100644 --- a/sw/source/ui/dialog/docstdlg.src +++ b/sw/source/ui/dialog/docstdlg.src @@ -140,6 +140,7 @@ TabPage TP_DOC_STAT }; PushButton PB_PDATE { + HelpID = "sw:PushButton:TP_DOC_STAT:PB_PDATE"; Pos = MAP_APPFONT ( 204 , 94 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Update" ; diff --git a/sw/source/ui/dialog/regionsw.src b/sw/source/ui/dialog/regionsw.src index b7b1a4639a..833426fd8a 100644 --- a/sw/source/ui/dialog/regionsw.src +++ b/sw/source/ui/dialog/regionsw.src @@ -102,6 +102,7 @@ ModalDialog MD_EDIT_REGION }; Edit ED_RANAME { + HelpID = "sw:Edit:MD_EDIT_REGION:ED_RANAME"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 71 , 12 ) ; @@ -124,6 +125,7 @@ ModalDialog MD_EDIT_REGION }; TriStateBox CB_FILE { + HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_FILE"; Pos = MAP_APPFONT ( 98 , 14 ) ; Size = MAP_APPFONT ( 59 , 10 ) ; TabStop = TRUE ; @@ -131,6 +133,7 @@ ModalDialog MD_EDIT_REGION }; CheckBox CB_DDE { + HelpID = "sw:CheckBox:MD_EDIT_REGION:CB_DDE"; Pos = MAP_APPFONT ( 98 , 28 ) ; Size = MAP_APPFONT ( 30 , 10 ) ; Disable = TRUE ; @@ -152,6 +155,7 @@ ModalDialog MD_EDIT_REGION }; Edit ED_FILE { + HelpID = "sw:Edit:MD_EDIT_REGION:ED_FILE"; Border = TRUE ; Pos = MAP_APPFONT ( 165 , 42 ) ; Size = MAP_APPFONT ( 68 , 12 ) ; @@ -160,6 +164,7 @@ ModalDialog MD_EDIT_REGION }; PushButton PB_FILE { + HelpID = "sw:PushButton:MD_EDIT_REGION:PB_FILE"; Pos = MAP_APPFONT ( 239 , 42 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; TabStop = TRUE ; @@ -175,6 +180,7 @@ ModalDialog MD_EDIT_REGION }; ComboBox LB_SUBREG { + HelpID = "sw:ComboBox:MD_EDIT_REGION:LB_SUBREG"; Pos = MAP_APPFONT ( 165 , 57 ) ; Size = MAP_APPFONT ( 68 , 50 ) ; Disable = TRUE ; @@ -191,6 +197,7 @@ ModalDialog MD_EDIT_REGION }; TriStateBox CB_PROTECT { + HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_PROTECT"; Pos = MAP_APPFONT ( 98 , 86 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; TabStop = TRUE ; @@ -200,6 +207,7 @@ ModalDialog MD_EDIT_REGION }; CheckBox CB_PASSWD { + HelpID = "sw:CheckBox:MD_EDIT_REGION:CB_PASSWD"; Pos = MAP_APPFONT ( 107 , 100 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -207,6 +215,7 @@ ModalDialog MD_EDIT_REGION }; PushButton PB_PASSWD { + HelpID = "sw:PushButton:MD_EDIT_REGION:PB_PASSWD"; Pos = MAP_APPFONT ( 239 , 98 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; TabStop = TRUE ; @@ -221,6 +230,7 @@ ModalDialog MD_EDIT_REGION }; TriStateBox CB_HIDE { + HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_HIDE"; Pos = MAP_APPFONT ( 98 , 127 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; TabStop = TRUE ; @@ -236,6 +246,7 @@ ModalDialog MD_EDIT_REGION }; Edit ED_CONDITION { + HelpID = "sw:Edit:MD_EDIT_REGION:ED_CONDITION"; Border = TRUE ; Pos = MAP_APPFONT ( 165 , 141) ; Size = MAP_APPFONT ( 86 , 12 ) ; @@ -252,6 +263,7 @@ ModalDialog MD_EDIT_REGION }; TriStateBox CB_EDIT_IN_READONLY { + HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_EDIT_IN_READONLY"; Pos = MAP_APPFONT ( 98 , 170 ) ; Size = MAP_APPFONT ( 156 , 10 ) ; TabStop = TRUE ; @@ -275,6 +287,7 @@ ModalDialog MD_EDIT_REGION }; PushButton PB_OPTIONS { + HelpID = "sw:PushButton:MD_EDIT_REGION:PB_OPTIONS"; Pos = MAP_APPFONT ( 263 , 40 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -283,6 +296,7 @@ ModalDialog MD_EDIT_REGION }; PushButton CB_DISMISS { + HelpID = "sw:PushButton:MD_EDIT_REGION:CB_DISMISS"; Pos = MAP_APPFONT ( 263 , 57 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Disable = TRUE ; @@ -412,6 +426,7 @@ TabPage TP_INSERT_SECTION }; ComboBox ED_RNAME { + HelpID = "sw:ComboBox:TP_INSERT_SECTION:ED_RNAME"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 69 , 140 ) ; TabStop = TRUE ; @@ -427,6 +442,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_FILE { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_FILE"; Pos = MAP_APPFONT ( 96 , 14 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; TabStop = TRUE ; @@ -434,6 +450,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_DDE { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_DDE"; Pos = MAP_APPFONT ( 96 , 28) ; Size = MAP_APPFONT ( 60 , 10 ) ; Disable = TRUE ; @@ -455,6 +472,7 @@ TabPage TP_INSERT_SECTION }; Edit ED_FILE { + HelpID = "sw:Edit:TP_INSERT_SECTION:ED_FILE"; Border = TRUE ; Pos = MAP_APPFONT ( 160 , 42 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; @@ -463,6 +481,7 @@ TabPage TP_INSERT_SECTION }; PushButton PB_FILE { + HelpID = "sw:PushButton:TP_INSERT_SECTION:PB_FILE"; Pos = MAP_APPFONT ( 239 , 42 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; Disable = TRUE ; @@ -478,6 +497,7 @@ TabPage TP_INSERT_SECTION }; ComboBox LB_SUBREG { + HelpID = "sw:ComboBox:TP_INSERT_SECTION:LB_SUBREG"; Pos = MAP_APPFONT ( 160 , 58 ) ; Size = MAP_APPFONT ( 76 , 50 ) ; DropDown = TRUE ; @@ -494,6 +514,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_PROTECT { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_PROTECT"; Pos = MAP_APPFONT ( 96 , 87 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -501,6 +522,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_PASSWD { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_PASSWD"; Pos = MAP_APPFONT ( 105 , 101 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -508,6 +530,7 @@ TabPage TP_INSERT_SECTION }; PushButton PB_PASSWD { + HelpID = "sw:PushButton:TP_INSERT_SECTION:PB_PASSWD"; Pos = MAP_APPFONT ( 239 , 99 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; TabStop = TRUE ; @@ -522,6 +545,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_HIDE { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_HIDE"; Pos = MAP_APPFONT ( 96 , 128 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; CB_HIDE_TEXT @@ -535,6 +559,7 @@ TabPage TP_INSERT_SECTION }; Edit ED_CONDITION { + HelpID = "sw:Edit:TP_INSERT_SECTION:ED_CONDITION"; Border = TRUE ; Pos = MAP_APPFONT ( 160 , 142 ) ; Size = MAP_APPFONT ( 91 , 12 ) ; @@ -551,6 +576,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_EDIT_IN_READONLY { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_EDIT_IN_READONLY"; Pos = MAP_APPFONT ( 96 , 170 ) ; Size = MAP_APPFONT ( 158 , 10 ) ; CB_EDIT_IN_READONLY_TEXT @@ -615,6 +641,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_FTN_AT_TXTEND { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_FTN_AT_TXTEND"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; TabStop = TRUE ; @@ -623,6 +650,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_FTN_NUM { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_FTN_NUM"; Pos = MAP_APPFONT ( 18 , 29 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -637,6 +665,7 @@ TabPage TP_SECTION_FTNENDNOTES }; NumericField FLD_FTN_OFFSET { + HelpID = "sw:NumericField:TP_SECTION_FTNENDNOTES:FLD_FTN_OFFSET"; Pos = MAP_APPFONT ( 90 , 44 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Spin = TRUE ; @@ -649,6 +678,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_FTN_NUM_FMT { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_FTN_NUM_FMT"; Pos = MAP_APPFONT ( 24 , 61 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -663,6 +693,7 @@ TabPage TP_SECTION_FTNENDNOTES }; Edit ED_FTN_PREFIX { + HelpID = "sw:Edit:TP_SECTION_FTNENDNOTES:ED_FTN_PREFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 90 , 74 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -672,6 +703,7 @@ TabPage TP_SECTION_FTNENDNOTES }; ListBox LB_FTN_NUMVIEW { + HelpID = "sw:ListBox:TP_SECTION_FTNENDNOTES:LB_FTN_NUMVIEW"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , 74 ) ; Size = MAP_APPFONT ( 62 , 50 ) ; @@ -688,6 +720,7 @@ TabPage TP_SECTION_FTNENDNOTES }; Edit ED_FTN_SUFFIX { + HelpID = "sw:Edit:TP_SECTION_FTNENDNOTES:ED_FTN_SUFFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 219 , 74 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -706,6 +739,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_END_AT_TXTEND { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_END_AT_TXTEND"; Pos = MAP_APPFONT ( 12 , 103 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -713,6 +747,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_END_NUM { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_END_NUM"; Pos = MAP_APPFONT ( 16 , 118 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -727,6 +762,7 @@ TabPage TP_SECTION_FTNENDNOTES }; NumericField FLD_END_OFFSET { + HelpID = "sw:NumericField:TP_SECTION_FTNENDNOTES:FLD_END_OFFSET"; Pos = MAP_APPFONT ( 90 , 133 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Spin = TRUE ; @@ -739,6 +775,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_END_NUM_FMT { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_END_NUM_FMT"; Pos = MAP_APPFONT ( 24 , 150 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -754,6 +791,7 @@ TabPage TP_SECTION_FTNENDNOTES }; Edit ED_END_PREFIX { + HelpID = "sw:Edit:TP_SECTION_FTNENDNOTES:ED_END_PREFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 90 , 163 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -763,6 +801,7 @@ TabPage TP_SECTION_FTNENDNOTES }; ListBox LB_END_NUMVIEW { + HelpID = "sw:ListBox:TP_SECTION_FTNENDNOTES:LB_END_NUMVIEW"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , 163 ) ; Size = MAP_APPFONT ( 62 , 50 ) ; @@ -780,6 +819,7 @@ TabPage TP_SECTION_FTNENDNOTES }; Edit ED_END_SUFFIX { + HelpID = "sw:Edit:TP_SECTION_FTNENDNOTES:ED_END_SUFFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 219 , 163 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -811,6 +851,7 @@ TabPage TP_SECTION_INDENTS }; MetricField MF_BEFORE { + HelpID = "sw:MetricField:TP_SECTION_INDENTS:MF_BEFORE"; Border = TRUE ; Pos = MAP_APPFONT ( 135 , 14 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -834,6 +875,7 @@ TabPage TP_SECTION_INDENTS }; MetricField MF_AFTER { + HelpID = "sw:MetricField:TP_SECTION_INDENTS:MF_AFTER"; Border = TRUE ; Pos = MAP_APPFONT ( 135 , 30 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; diff --git a/sw/source/ui/dochdl/selglos.src b/sw/source/ui/dochdl/selglos.src index b398a3a7e3..5a79079fe7 100644 --- a/sw/source/ui/dochdl/selglos.src +++ b/sw/source/ui/dochdl/selglos.src @@ -68,6 +68,7 @@ ModalDialog DLG_SEL_GLOS }; ListBox LB_GLOS { + HelpID = "sw:ListBox:DLG_SEL_GLOS:LB_GLOS"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 140 , 74 ) ; diff --git a/sw/source/ui/envelp/envfmt.src b/sw/source/ui/envelp/envfmt.src index 16987430b7..ccca0c6b44 100644 --- a/sw/source/ui/envelp/envfmt.src +++ b/sw/source/ui/envelp/envfmt.src @@ -57,6 +57,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_ADDR_LEFT { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_ADDR_LEFT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 25 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -81,6 +82,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_ADDR_TOP { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_ADDR_TOP"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 41 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -105,6 +107,7 @@ TabPage TP_ENV_FMT }; MenuButton BTN_ADDR_EDIT { + HelpID = "sw:MenuButton:TP_ENV_FMT:BTN_ADDR_EDIT"; Pos = MAP_APPFONT ( 194 , 24 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -132,6 +135,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_SEND_LEFT { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SEND_LEFT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 78 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -156,6 +160,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_SEND_TOP { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SEND_TOP"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 94 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -180,6 +185,7 @@ TabPage TP_ENV_FMT }; MenuButton BTN_SEND_EDIT { + HelpID = "sw:MenuButton:TP_ENV_FMT:BTN_SEND_EDIT"; Pos = MAP_APPFONT ( 194 , 77 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "Edit" ; @@ -200,6 +206,7 @@ TabPage TP_ENV_FMT }; ListBox BOX_SIZE_FORMAT { + HelpID = "sw:ListBox:TP_ENV_FMT:BOX_SIZE_FORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 120 ) ; Size = MAP_APPFONT ( 40 , 72 ) ; @@ -215,6 +222,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_SIZE_WIDTH { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SIZE_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 136 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -239,6 +247,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_SIZE_HEIGHT { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SIZE_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 152 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; diff --git a/sw/source/ui/envelp/envlop.src b/sw/source/ui/envelp/envlop.src index 2c025633b0..8f27ff976d 100644 --- a/sw/source/ui/envelp/envlop.src +++ b/sw/source/ui/envelp/envlop.src @@ -86,6 +86,7 @@ TabPage TP_ENV_ENV }; MultiLineEdit EDT_ADDR { + HelpID = "sw:MultiLineEdit:TP_ENV_ENV:EDT_ADDR"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 17 ) ; Size = MAP_APPFONT ( 124 , 66 ) ; @@ -103,6 +104,7 @@ TabPage TP_ENV_ENV }; ListBox LB_DATABASE { + HelpID = "sw:ListBox:TP_ENV_ENV:LB_DATABASE"; Border = TRUE ; Pos = MAP_APPFONT ( 162 , 17 ) ; Size = MAP_APPFONT ( 82 , 50 ) ; @@ -117,6 +119,7 @@ TabPage TP_ENV_ENV }; ListBox LB_TABLE { + HelpID = "sw:ListBox:TP_ENV_ENV:LB_TABLE"; Border = TRUE ; Pos = MAP_APPFONT ( 162 , 44 ) ; Size = MAP_APPFONT ( 82 , 50 ) ; @@ -125,6 +128,7 @@ TabPage TP_ENV_ENV }; ImageButton BTN_INSERT { + HelpID = "sw:ImageButton:TP_ENV_ENV:BTN_INSERT"; Pos = MAP_APPFONT ( 137 , 71 ) ; Size = MAP_APPFONT ( 18 , 12 ) ; SYMBOL = IMAGEBUTTON_ARROW_LEFT ; @@ -138,6 +142,7 @@ TabPage TP_ENV_ENV }; ListBox LB_DBFIELD { + HelpID = "sw:ListBox:TP_ENV_ENV:LB_DBFIELD"; Border = TRUE ; Pos = MAP_APPFONT ( 162 , 71 ) ; Size = MAP_APPFONT ( 82 , 50 ) ; @@ -146,6 +151,7 @@ TabPage TP_ENV_ENV }; CheckBox BOX_SEND { + HelpID = "sw:CheckBox:TP_ENV_ENV:BOX_SEND"; Pos = MAP_APPFONT ( 6 , 105 ) ; Size = MAP_APPFONT ( 124 , 8 ) ; Text [ en-US ] = "~Sender" ; @@ -153,6 +159,7 @@ TabPage TP_ENV_ENV }; MultiLineEdit EDT_SEND { + HelpID = "sw:MultiLineEdit:TP_ENV_ENV:EDT_SEND"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 116) ; Size = MAP_APPFONT ( 124 , 63 ) ; diff --git a/sw/source/ui/envelp/envprt.src b/sw/source/ui/envelp/envprt.src index d7c2d24733..6b5801b0cf 100644 --- a/sw/source/ui/envelp/envprt.src +++ b/sw/source/ui/envelp/envprt.src @@ -80,6 +80,7 @@ TabPage TP_ENV_PRT }; RadioButton BTN_TOP { + HelpID = "sw:RadioButton:TP_ENV_PRT:BTN_TOP"; Pos = MAP_APPFONT ( 18 , 42 ) ; Size = MAP_APPFONT ( 179 , 10 ) ; Text [ en-US ] = "~Print from top" ; @@ -89,6 +90,7 @@ TabPage TP_ENV_PRT }; RadioButton BTN_BOTTOM { + HelpID = "sw:RadioButton:TP_ENV_PRT:BTN_BOTTOM"; Pos = MAP_APPFONT ( 18 , 56 ) ; Size = MAP_APPFONT ( 179 , 10 ) ; Text [ en-US ] = "Print from ~bottom" ; @@ -103,6 +105,7 @@ TabPage TP_ENV_PRT }; MetricField FLD_RIGHT { + HelpID = "sw:MetricField:TP_ENV_PRT:FLD_RIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 86 , 72 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -127,6 +130,7 @@ TabPage TP_ENV_PRT }; MetricField FLD_DOWN { + HelpID = "sw:MetricField:TP_ENV_PRT:FLD_DOWN"; Border = TRUE ; Pos = MAP_APPFONT ( 86 , 88 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -157,6 +161,7 @@ TabPage TP_ENV_PRT }; PushButton BTN_PRTSETUP { + HelpID = "sw:PushButton:TP_ENV_PRT:BTN_PRTSETUP"; Pos = MAP_APPFONT ( 198 , 114 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/envelp/label.src b/sw/source/ui/envelp/label.src index f2200a0c44..dbcea27b94 100644 --- a/sw/source/ui/envelp/label.src +++ b/sw/source/ui/envelp/label.src @@ -110,6 +110,7 @@ TabPage TP_LAB_LAB }; CheckBox BOX_ADDR { + HelpID = "sw:CheckBox:TP_LAB_LAB:BOX_ADDR"; Pos = MAP_APPFONT ( 67 , 14 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; TabStop = TRUE ; @@ -117,6 +118,7 @@ TabPage TP_LAB_LAB }; MultiLineEdit EDT_WRITING { + HelpID = "sw:MultiLineEdit:TP_LAB_LAB:EDT_WRITING"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 105 , 89 ) ; @@ -134,6 +136,7 @@ TabPage TP_LAB_LAB }; ListBox LB_DATABASE { + HelpID = "sw:ListBox:TP_LAB_LAB:LB_DATABASE"; Border = TRUE ; Pos = MAP_APPFONT ( 149 , 27 ) ; Size = MAP_APPFONT ( 99 , 70 ) ; @@ -148,6 +151,7 @@ TabPage TP_LAB_LAB }; ListBox LB_TABLE { + HelpID = "sw:ListBox:TP_LAB_LAB:LB_TABLE"; Border = TRUE ; Pos = MAP_APPFONT ( 149 , 56 ) ; Size = MAP_APPFONT ( 99 , 70 ) ; @@ -156,6 +160,7 @@ TabPage TP_LAB_LAB }; ImageButton BTN_INSERT { + HelpID = "sw:ImageButton:TP_LAB_LAB:BTN_INSERT"; Pos = MAP_APPFONT ( 124 , 92 ) ; Size = MAP_APPFONT ( 18 , 12 ) ; SYMBOL = IMAGEBUTTON_ARROW_LEFT ; @@ -169,6 +174,7 @@ TabPage TP_LAB_LAB }; ListBox LB_DBFIELD { + HelpID = "sw:ListBox:TP_LAB_LAB:LB_DBFIELD"; Border = TRUE ; Pos = MAP_APPFONT ( 149 , 92 ) ; Size = MAP_APPFONT ( 99 , 70 ) ; @@ -184,6 +190,7 @@ TabPage TP_LAB_LAB }; RadioButton BTN_CONT { + HelpID = "sw:RadioButton:TP_LAB_LAB:BTN_CONT"; Pos = MAP_APPFONT ( 12 , 137 ) ; Size = MAP_APPFONT ( 65 , 10 ) ; TabStop = TRUE ; @@ -192,6 +199,7 @@ TabPage TP_LAB_LAB }; RadioButton BTN_SHEET { + HelpID = "sw:RadioButton:TP_LAB_LAB:BTN_SHEET"; Pos = MAP_APPFONT ( 12 , 153 ) ; Size = MAP_APPFONT ( 65 , 10 ) ; Text [ en-US ] = "~Sheet" ; @@ -205,6 +213,7 @@ TabPage TP_LAB_LAB }; ListBox BOX_MAKE { + HelpID = "sw:ListBox:TP_LAB_LAB:BOX_MAKE"; Border = TRUE ; Pos = MAP_APPFONT ( 124 , 136 ) ; Size = MAP_APPFONT ( 124 , 90 ) ; @@ -220,6 +229,7 @@ TabPage TP_LAB_LAB }; ListBox BOX_TYPE { + HelpID = "sw:ListBox:TP_LAB_LAB:BOX_TYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 124 , 152 ) ; Size = MAP_APPFONT ( 124 , 90 ) ; @@ -255,6 +265,7 @@ FloatingWindow DLG_SYNC_BTN Hide = TRUE ; PushButton BTN_SYNC { + HelpID = "sw:PushButton:DLG_SYNC_BTN:BTN_SYNC"; Pos = MAP_APPFONT ( 1 , 1 ) ; Size = MAP_APPFONT ( WIDTH - 1 , HEIGHT - 1 ) ; Text [ en-US ] = "Synchronize Labels" ; @@ -291,6 +302,7 @@ TabPage TP_VISITING_CARDS }; ListBox LB_AUTO_TEXT_GROUP { + HelpID = "sw:ListBox:TP_VISITING_CARDS:LB_AUTO_TEXT_GROUP"; Pos = MAP_APPFONT ( 12 , 164) ; Size = MAP_APPFONT ( 109 , 50 ) ; Border = TRUE ; @@ -332,18 +344,21 @@ TabPage TP_PRIVATE_DATA }; Edit ED_FIRSTNAME { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_FIRSTNAME"; Pos = MAP_APPFONT ( 105 , 14 ) ; Size = MAP_APPFONT ( 55 , 12 ) ; Border = TRUE ; }; Edit ED_NAME { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_NAME"; Pos = MAP_APPFONT ( 163 , 14 ) ; Size = MAP_APPFONT ( 55 , 12 ) ; Border = TRUE ; }; Edit ED_SHORTCUT { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_SHORTCUT"; Pos = MAP_APPFONT ( 221 , 14 ) ; Size = MAP_APPFONT ( 27 , 12 ) ; Border = TRUE ; @@ -356,18 +371,21 @@ TabPage TP_PRIVATE_DATA }; Edit ED_FIRSTNAME_2 { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_FIRSTNAME_2"; Pos = MAP_APPFONT ( 105 , 30 ) ; Size = MAP_APPFONT ( 55 , 12 ) ; Border = TRUE ; }; Edit ED_NAME_2 { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_NAME_2"; Pos = MAP_APPFONT ( 163 , 30 ) ; Size = MAP_APPFONT ( 55 , 12 ) ; Border = TRUE ; }; Edit ED_SHORTCUT_2 { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_SHORTCUT_2"; Pos = MAP_APPFONT ( 221 , 30 ) ; Size = MAP_APPFONT ( 27 , 12 ) ; Border = TRUE ; @@ -380,6 +398,7 @@ TabPage TP_PRIVATE_DATA }; Edit ED_STREET { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_STREET"; Pos = MAP_APPFONT ( 105 , 46 ) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -392,12 +411,14 @@ TabPage TP_PRIVATE_DATA }; Edit ED_ZIP { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_ZIP"; Pos = MAP_APPFONT ( 105 , 62 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; Border = TRUE ; }; Edit ED_CITY { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_CITY"; Pos = MAP_APPFONT ( 158 , 62 ) ; Size = MAP_APPFONT ( 90 , 12 ) ; Border = TRUE ; @@ -410,12 +431,14 @@ TabPage TP_PRIVATE_DATA }; Edit ED_COUNTRY { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_COUNTRY"; Pos = MAP_APPFONT ( 105 , 78 ) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_STATE { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_STATE"; Pos = MAP_APPFONT ( 179 , 78 ) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -428,12 +451,14 @@ TabPage TP_PRIVATE_DATA }; Edit ED_TITLE { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_TITLE"; Pos = MAP_APPFONT ( 105 , 94 ) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_PROFESSION { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_PROFESSION"; Pos = MAP_APPFONT ( 179 , 94 ) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -446,12 +471,14 @@ TabPage TP_PRIVATE_DATA }; Edit ED_PHONE { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_PHONE"; Pos = MAP_APPFONT ( 105 , 110 ) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_MOBILE { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_MOBILE"; Pos = MAP_APPFONT ( 179 , 110 ) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -464,6 +491,7 @@ TabPage TP_PRIVATE_DATA }; Edit ED_FAX { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_FAX"; Pos = MAP_APPFONT ( 105 , 126 ) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -476,12 +504,14 @@ TabPage TP_PRIVATE_DATA }; Edit ED_WWW { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_WWW"; Pos = MAP_APPFONT ( 105 , 142) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_MAIL { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_MAIL"; Pos = MAP_APPFONT ( 179 , 142) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -506,6 +536,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_COMP { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_COMP"; Pos = MAP_APPFONT ( 105 , 14) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -518,6 +549,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_COMP_EXT { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_COMP_EXT"; Pos = MAP_APPFONT ( 105 , 30) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -530,6 +562,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_SLOGAN { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_SLOGAN"; Pos = MAP_APPFONT ( 105 , 46) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -542,6 +575,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_STREET { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_STREET"; Pos = MAP_APPFONT ( 105 , 62) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -554,12 +588,14 @@ TabPage TP_BUSINESS_DATA }; Edit ED_ZIP { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_ZIP"; Pos = MAP_APPFONT ( 105 , 78) ; Size = MAP_APPFONT ( 50 , 12 ) ; Border = TRUE ; }; Edit ED_CITY { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_CITY"; Pos = MAP_APPFONT ( 158 , 78) ; Size = MAP_APPFONT ( 90 , 12 ) ; Border = TRUE ; @@ -572,12 +608,14 @@ TabPage TP_BUSINESS_DATA }; Edit ED_COUNTRY { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_COUNTRY"; Pos = MAP_APPFONT ( 105 , 94) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_STATE { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_STATE"; Pos = MAP_APPFONT ( 179 , 94) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -590,6 +628,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_POSITION { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_POSITION"; Pos = MAP_APPFONT ( 105 , 110) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -602,12 +641,14 @@ TabPage TP_BUSINESS_DATA }; Edit ED_PHONE { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_PHONE"; Pos = MAP_APPFONT ( 105 , 126) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_MOBILE { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_MOBILE"; Pos = MAP_APPFONT ( 179 , 126) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -620,6 +661,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_FAX { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_FAX"; Pos = MAP_APPFONT ( 105 , 142) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -632,12 +674,14 @@ TabPage TP_BUSINESS_DATA }; Edit ED_WWW { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_WWW"; Pos = MAP_APPFONT ( 105 , 158) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_MAIL { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_MAIL"; Pos = MAP_APPFONT ( 179 , 158) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; diff --git a/sw/source/ui/envelp/labfmt.src b/sw/source/ui/envelp/labfmt.src index 8d39f44b58..107791b2e8 100644 --- a/sw/source/ui/envelp/labfmt.src +++ b/sw/source/ui/envelp/labfmt.src @@ -61,6 +61,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_HDIST { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_HDIST"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 17 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -81,6 +82,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_VDIST { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_VDIST"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 33 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -101,6 +103,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_WIDTH { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 49 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -121,6 +124,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_HEIGHT { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 65 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -141,6 +145,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_LEFT { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_LEFT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 81 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -163,6 +168,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_UPPER { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_UPPER"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 97 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -185,6 +191,7 @@ TabPage TP_LAB_FMT }; NumericField FLD_COLUMNS { + HelpID = "sw:NumericField:TP_LAB_FMT:FLD_COLUMNS"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 113 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -204,6 +211,7 @@ TabPage TP_LAB_FMT }; NumericField FLD_ROWS { + HelpID = "sw:NumericField:TP_LAB_FMT:FLD_ROWS"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 129 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -216,6 +224,7 @@ TabPage TP_LAB_FMT }; PushButton PB_SAVE { + HelpID = "sw:PushButton:TP_LAB_FMT:PB_SAVE"; Pos = MAP_APPFONT ( 50 , 148 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Save..."; @@ -270,6 +279,7 @@ ModalDialog DLG_SAVE_LABEL }; ComboBox CB_MAKE { + HelpID = "sw:ComboBox:DLG_SAVE_LABEL:CB_MAKE"; Pos = MAP_APPFONT ( 65 , 15 ) ; Size = MAP_APPFONT ( 100 , 50 ) ; Border = TRUE; @@ -284,6 +294,7 @@ ModalDialog DLG_SAVE_LABEL }; Edit ED_TYPE { + HelpID = "sw:Edit:DLG_SAVE_LABEL:ED_TYPE"; Pos = MAP_APPFONT ( 65 , 30 ) ; Size = MAP_APPFONT ( 100 , 12 ) ; Border = TRUE; diff --git a/sw/source/ui/envelp/labprt.src b/sw/source/ui/envelp/labprt.src index b6452f56ce..7e1b5c4c58 100644 --- a/sw/source/ui/envelp/labprt.src +++ b/sw/source/ui/envelp/labprt.src @@ -37,6 +37,7 @@ TabPage TP_LAB_PRT Hide = TRUE ; RadioButton BTN_PAGE { + HelpID = "sw:RadioButton:TP_LAB_PRT:BTN_PAGE"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; TabStop = TRUE ; @@ -45,6 +46,7 @@ TabPage TP_LAB_PRT }; RadioButton BTN_SINGLE { + HelpID = "sw:RadioButton:TP_LAB_PRT:BTN_SINGLE"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Single label" ; @@ -58,6 +60,7 @@ TabPage TP_LAB_PRT }; NumericField FLD_COL { + HelpID = "sw:NumericField:TP_LAB_PRT:FLD_COL"; Border = TRUE ; Pos = MAP_APPFONT ( 160 , 27 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -77,6 +80,7 @@ TabPage TP_LAB_PRT }; NumericField FLD_ROW { + HelpID = "sw:NumericField:TP_LAB_PRT:FLD_ROW"; Border = TRUE ; Pos = MAP_APPFONT ( 224 , 27 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -89,6 +93,7 @@ TabPage TP_LAB_PRT }; CheckBox CB_SYNCHRON { + HelpID = "sw:CheckBox:TP_LAB_PRT:CB_SYNCHRON"; Pos = MAP_APPFONT ( 12 , 43 ) ; Size = MAP_APPFONT ( 120 , 10 ) ; TabStop = TRUE ; @@ -109,6 +114,7 @@ TabPage TP_LAB_PRT }; PushButton BTN_PRTSETUP { + HelpID = "sw:PushButton:TP_LAB_PRT:BTN_PRTSETUP"; Pos = MAP_APPFONT ( 198 , 70 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/envelp/mailmrge.src b/sw/source/ui/envelp/mailmrge.src index 5e77d797fa..48eedbf3ce 100644 --- a/sw/source/ui/envelp/mailmrge.src +++ b/sw/source/ui/envelp/mailmrge.src @@ -49,6 +49,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_ALL { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_ALL"; Pos = MAP_APPFONT ( 12 , 97 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "~All" ; @@ -56,6 +57,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_MARKED { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_MARKED"; Pos = MAP_APPFONT ( 12 , 110 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "~Selected records" ; @@ -63,6 +65,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_FROM { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_FROM"; Pos = MAP_APPFONT ( 12 , 123 ) ; Size = MAP_APPFONT ( 33 , 10 ) ; Text [ en-US ] = "~From:" ; @@ -70,6 +73,7 @@ ModalDialog DLG_MAILMERGE }; NumericField NF_FROM { + HelpID = "sw:NumericField:DLG_MAILMERGE:NF_FROM"; Border = TRUE ; Pos = MAP_APPFONT ( 48 , 122 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -87,6 +91,7 @@ ModalDialog DLG_MAILMERGE }; NumericField NF_TO { + HelpID = "sw:NumericField:DLG_MAILMERGE:NF_TO"; Border = TRUE ; Pos = MAP_APPFONT ( 105 , 122 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -103,6 +108,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_PRINTER { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_PRINTER"; Pos = MAP_APPFONT ( 144 , 97 ) ; Size = MAP_APPFONT ( 53 , 10 ) ; Check = TRUE ; @@ -111,6 +117,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_MAILING { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_MAILING"; Pos = MAP_APPFONT ( 200 , 97 ) ; Size = MAP_APPFONT ( 53 , 10 ) ; TabStop = TRUE ; @@ -118,6 +125,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_FILE { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_FILE"; Pos = MAP_APPFONT ( 256 , 97 ) ; Size = MAP_APPFONT ( 56 , 10 ) ; TabStop = TRUE ; @@ -125,6 +133,7 @@ ModalDialog DLG_MAILMERGE }; CheckBox CB_SINGLE_JOBS { + HelpID = "sw:CheckBox:DLG_MAILMERGE:CB_SINGLE_JOBS"; Pos = MAP_APPFONT ( 150 , 112 ) ; Size = MAP_APPFONT ( 142 , 10 ) ; TabStop = TRUE ; @@ -138,6 +147,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_SAVE_SINGLE_DOC { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_SAVE_SINGLE_DOC"; Pos = MAP_APPFONT ( 150, 139 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; TabStop = TRUE ; @@ -145,6 +155,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_SAVE_INDIVIDUAL { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_SAVE_INDIVIDUAL"; Pos = MAP_APPFONT ( 150, 152 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; TabStop = TRUE ; @@ -152,6 +163,7 @@ ModalDialog DLG_MAILMERGE }; CheckBox RB_GENERATE_FROM_DATABASE { + HelpID = "sw:CheckBox:DLG_MAILMERGE:RB_GENERATE_FROM_DATABASE"; Pos = MAP_APPFONT ( 156, 168 ) ; Size = MAP_APPFONT ( 144 , 10 ) ; TabStop = TRUE ; @@ -165,6 +177,7 @@ ModalDialog DLG_MAILMERGE }; ListBox LB_COLUMN { + HelpID = "sw:ListBox:DLG_MAILMERGE:LB_COLUMN"; Border = TRUE ; Pos = MAP_APPFONT ( 205 , 182 ) ; Size = MAP_APPFONT ( 103 , 84 ) ; @@ -179,6 +192,7 @@ ModalDialog DLG_MAILMERGE }; Edit ED_PATH { + HelpID = "sw:Edit:DLG_MAILMERGE:ED_PATH"; Pos = MAP_APPFONT ( 205 , 198 ) ; Size = MAP_APPFONT ( 86 , 12 ) ; Border = TRUE ; @@ -186,6 +200,7 @@ ModalDialog DLG_MAILMERGE }; PushButton PB_PATH { + HelpID = "sw:PushButton:DLG_MAILMERGE:PB_PATH"; Pos = MAP_APPFONT ( 294 , 198 ) ; Size = MAP_APPFONT ( 14 , 12 ) ; // Soll Groesse des Edits haben (12)! @@ -200,6 +215,7 @@ ModalDialog DLG_MAILMERGE }; ListBox LB_FILTER { + HelpID = "sw:ListBox:DLG_MAILMERGE:LB_FILTER"; Border = TRUE ; Pos = MAP_APPFONT ( 205 , 214 ) ; Size = MAP_APPFONT ( 103 , 84 ) ; @@ -209,6 +225,7 @@ ModalDialog DLG_MAILMERGE }; ListBox LB_ADDRESSFLD { + HelpID = "sw:ListBox:DLG_MAILMERGE:LB_ADDRESSFLD"; Border = TRUE ; Pos = MAP_APPFONT ( 220 , 110 ) ; Size = MAP_APPFONT ( 74 , 84 ) ; @@ -226,6 +243,7 @@ ModalDialog DLG_MAILMERGE }; Edit ED_SUBJECT { + HelpID = "sw:Edit:DLG_MAILMERGE:ED_SUBJECT"; Border = TRUE ; Pos = MAP_APPFONT ( 220 , 127 ) ; Size = MAP_APPFONT ( 88 , 12 ) ; @@ -241,6 +259,7 @@ ModalDialog DLG_MAILMERGE }; Edit ED_ATTACH { + HelpID = "sw:Edit:DLG_MAILMERGE:ED_ATTACH"; Border = TRUE ; Pos = MAP_APPFONT ( 220 , 140 ) ; Size = MAP_APPFONT ( 72 , 12 ) ; @@ -250,6 +269,7 @@ ModalDialog DLG_MAILMERGE }; PushButton PB_ATTACH { + HelpID = "sw:PushButton:DLG_MAILMERGE:PB_ATTACH"; Pos = MAP_APPFONT ( 294 , 140 ) ; Size = MAP_APPFONT ( 14 , 12 ) ; // Soll Groesse des Edits haben (12)! @@ -266,6 +286,7 @@ ModalDialog DLG_MAILMERGE }; CheckBox CB_FORMAT_HTML { + HelpID = "sw:CheckBox:DLG_MAILMERGE:CB_FORMAT_HTML"; Pos = MAP_APPFONT ( 220 , 156 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Disable = TRUE ; @@ -275,6 +296,7 @@ ModalDialog DLG_MAILMERGE }; CheckBox CB_FORMAT_RTF { + HelpID = "sw:CheckBox:DLG_MAILMERGE:CB_FORMAT_RTF"; Pos = MAP_APPFONT ( 220 , 169 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Disable = TRUE ; @@ -283,6 +305,7 @@ ModalDialog DLG_MAILMERGE }; CheckBox CB_FORMAT_SW { + HelpID = "sw:CheckBox:DLG_MAILMERGE:CB_FORMAT_SW"; Pos = MAP_APPFONT ( 220, 182 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Disable = TRUE ; @@ -340,6 +363,7 @@ ModalDialog DLG_MERGE_CREATE }; RadioButton RB_THISDOC { + HelpID = "sw:RadioButton:DLG_MERGE_CREATE:RB_THISDOC"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Check = TRUE; @@ -348,6 +372,7 @@ ModalDialog DLG_MERGE_CREATE }; RadioButton RB_TEMPLATE { + HelpID = "sw:RadioButton:DLG_MERGE_CREATE:RB_TEMPLATE"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; TabStop = TRUE ; @@ -387,6 +412,7 @@ ModalDialog DLG_MERGE_FIELD_CONNECTIONS }; RadioButton RB_USEEXISTING { + HelpID = "sw:RadioButton:DLG_MERGE_FIELD_CONNECTIONS:RB_USEEXISTING"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Check = TRUE; @@ -395,6 +421,7 @@ ModalDialog DLG_MERGE_FIELD_CONNECTIONS }; RadioButton RB_CREATENEW { + HelpID = "sw:RadioButton:DLG_MERGE_FIELD_CONNECTIONS:RB_CREATENEW"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/fldui/DropDownFieldDialog.src b/sw/source/ui/fldui/DropDownFieldDialog.src index 25f6c4ac15..2d5c98cfe5 100644 --- a/sw/source/ui/fldui/DropDownFieldDialog.src +++ b/sw/source/ui/fldui/DropDownFieldDialog.src @@ -45,6 +45,7 @@ ModalDialog DLG_FLD_DROPDOWN }; ListBox LB_LISTITEMS { + HelpID = "sw:ListBox:DLG_FLD_DROPDOWN:LB_LISTITEMS"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 115 , 99 ) ; @@ -67,6 +68,7 @@ ModalDialog DLG_FLD_DROPDOWN }; PushButton PB_NEXT { + HelpID = "sw:PushButton:DLG_FLD_DROPDOWN:PB_NEXT"; Pos = MAP_APPFONT ( 139 , 40 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -81,6 +83,7 @@ ModalDialog DLG_FLD_DROPDOWN }; PushButton PB_EDIT { + HelpID = "sw:PushButton:DLG_FLD_DROPDOWN:PB_EDIT"; Pos = MAP_APPFONT ( 139 , 99 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/fldui/changedb.src b/sw/source/ui/fldui/changedb.src index a461a1d7ac..8c4e21d5b3 100644 --- a/sw/source/ui/fldui/changedb.src +++ b/sw/source/ui/fldui/changedb.src @@ -31,6 +31,7 @@ ModalDialog DLG_CHANGE_DB { + HelpID = "sw:ModalDialog:DLG_CHANGE_DB"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 286 , 175 ) ; @@ -74,6 +75,7 @@ ModalDialog DLG_CHANGE_DB }; PushButton PB_ADDDB { + HelpID = "sw:PushButton:DLG_CHANGE_DB:PB_ADDDB"; Pos = MAP_APPFONT ( 118 , 90 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "Browse..." ; diff --git a/sw/source/ui/fldui/flddb.src b/sw/source/ui/fldui/flddb.src index e7bc8b99f9..d88d8790ba 100644 --- a/sw/source/ui/fldui/flddb.src +++ b/sw/source/ui/fldui/flddb.src @@ -43,6 +43,7 @@ TabPage TP_FLD_DB }; ListBox LB_DBTYPE { + HelpID = "sw:ListBox:TP_FLD_DB:LB_DBTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 76 , 104 ) ; @@ -67,6 +68,7 @@ TabPage TP_FLD_DB }; Edit ED_DBCONDITION { + HelpID = "sw:Edit:TP_FLD_DB:ED_DBCONDITION"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 137 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; @@ -82,6 +84,7 @@ TabPage TP_FLD_DB }; Edit ED_DBSETNUMBER { + HelpID = "sw:Edit:TP_FLD_DB:ED_DBSETNUMBER"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 167 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; @@ -110,6 +113,7 @@ TabPage TP_FLD_DB }; PushButton PB_ADDDB { + HelpID = "sw:PushButton:TP_FLD_DB:PB_ADDDB"; Pos = MAP_APPFONT ( 198 , 121) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "Browse..." ; @@ -117,6 +121,7 @@ TabPage TP_FLD_DB RadioButton RB_DBOWNFORMAT { + HelpID = "sw:RadioButton:TP_FLD_DB:RB_DBOWNFORMAT"; Pos = MAP_APPFONT ( 94 , 153 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Check = TRUE ; @@ -124,12 +129,14 @@ TabPage TP_FLD_DB }; RadioButton RB_DBFORMAT { + HelpID = "sw:RadioButton:TP_FLD_DB:RB_DBFORMAT"; Pos = MAP_APPFONT ( 94 , 166 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "User-defined" ; }; ListBox LB_DBNUMFORMAT { + HelpID = "sw:ListBox:TP_FLD_DB:LB_DBNUMFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 195 , 164 ) ; Size = MAP_APPFONT ( 53 , 60 ) ; @@ -139,6 +146,7 @@ TabPage TP_FLD_DB }; ListBox LB_DBFORMAT { + HelpID = "sw:ListBox:TP_FLD_DB:LB_DBFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 195 , 163 ) ; Size = MAP_APPFONT ( 53 , 60 ) ; diff --git a/sw/source/ui/fldui/flddinf.src b/sw/source/ui/fldui/flddinf.src index 9f65b88fa3..8f68883456 100644 --- a/sw/source/ui/fldui/flddinf.src +++ b/sw/source/ui/fldui/flddinf.src @@ -57,6 +57,7 @@ TabPage TP_FLD_DOKINF }; ListBox LB_DOKINFSELECTION { + HelpID = "sw:ListBox:TP_FLD_DOKINF:LB_DOKINFSELECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 16 ) ; Size = MAP_APPFONT ( 76 , 163 ) ; @@ -78,6 +79,7 @@ TabPage TP_FLD_DOKINF }; ListBox LB_DOKINFFORMAT { + HelpID = "sw:ListBox:TP_FLD_DOKINF:LB_DOKINFFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 16 ) ; Size = MAP_APPFONT ( 84 , 148 ) ; @@ -86,6 +88,7 @@ TabPage TP_FLD_DOKINF }; CheckBox CB_DOKINFFIXEDCONTENT { + HelpID = "sw:CheckBox:TP_FLD_DOKINF:CB_DOKINFFIXEDCONTENT"; Pos = MAP_APPFONT ( 170 , 170 ) ; Size = MAP_APPFONT ( 72 , 10 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/fldui/flddok.src b/sw/source/ui/fldui/flddok.src index 6a60f8b53f..4723a55425 100644 --- a/sw/source/ui/fldui/flddok.src +++ b/sw/source/ui/fldui/flddok.src @@ -43,6 +43,7 @@ TabPage TP_FLD_DOK }; ListBox LB_DOKTYPE { + HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -59,6 +60,7 @@ TabPage TP_FLD_DOK }; ListBox LB_DOKSELECTION { + HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKSELECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 15 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -73,6 +75,7 @@ TabPage TP_FLD_DOK }; ListBox LB_DOKFORMAT { + HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 151 ) ; @@ -83,6 +86,7 @@ TabPage TP_FLD_DOK }; ListBox LB_DOKNUMFORMAT { + HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKNUMFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 151 ) ; @@ -100,6 +104,7 @@ TabPage TP_FLD_DOK }; Edit ED_DOKVALUE { + HelpID = "sw:Edit:TP_FLD_DOK:ED_DOKVALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 167 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -109,6 +114,7 @@ TabPage TP_FLD_DOK }; NumericField ED_DOKLEVEL { + HelpID = "sw:NumericField:TP_FLD_DOK:ED_DOKLEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 167 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -125,6 +131,7 @@ TabPage TP_FLD_DOK }; NumericField ED_DOKDATEOFF { + HelpID = "sw:NumericField:TP_FLD_DOK:ED_DOKDATEOFF"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 167 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -138,6 +145,7 @@ TabPage TP_FLD_DOK }; CheckBox CB_DOKFIXEDCONTENT { + HelpID = "sw:CheckBox:TP_FLD_DOK:CB_DOKFIXEDCONTENT"; Pos = MAP_APPFONT ( 170 , 170 ) ; Size = MAP_APPFONT ( 72 , 10 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/fldui/fldfunc.src b/sw/source/ui/fldui/fldfunc.src index ca67c448fb..aa5e42b078 100644 --- a/sw/source/ui/fldui/fldfunc.src +++ b/sw/source/ui/fldui/fldfunc.src @@ -43,6 +43,7 @@ TabPage TP_FLD_FUNC }; ListBox LB_FUNCTYPE { + HelpID = "sw:ListBox:TP_FLD_FUNC:LB_FUNCTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -60,6 +61,7 @@ TabPage TP_FLD_FUNC }; ListBox LB_FUNCSELECTION { + HelpID = "sw:ListBox:TP_FLD_FUNC:LB_FUNCSELECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 14 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -77,6 +79,7 @@ TabPage TP_FLD_FUNC }; ListBox LB_FUNCFORMAT { + HelpID = "sw:ListBox:TP_FLD_FUNC:LB_FUNCFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 14 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -91,6 +94,7 @@ TabPage TP_FLD_FUNC }; Edit ED_FUNCNAME { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCNAME"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -106,6 +110,7 @@ TabPage TP_FLD_FUNC }; Edit ED_FUNCVALUE { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCVALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 41 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -122,6 +127,7 @@ TabPage TP_FLD_FUNC }; Edit ED_FUNCCOND1 { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCCOND1"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 41 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -139,6 +145,7 @@ TabPage TP_FLD_FUNC }; Edit ED_FUNCCOND2 { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCCOND2"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 68 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -148,6 +155,7 @@ TabPage TP_FLD_FUNC }; PushButton BT_FUNCMACRO { + HelpID = "sw:PushButton:TP_FLD_FUNC:BT_FUNCMACRO"; Pos = MAP_APPFONT ( 204 , 165 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Macro..." ; @@ -163,6 +171,7 @@ TabPage TP_FLD_FUNC }; Edit ED_LISTITEM { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_LISTITEM"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -172,6 +181,7 @@ TabPage TP_FLD_FUNC }; PushButton PB_LISTADD { + HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTADD"; Pos = MAP_APPFONT ( 170 , 29 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Hide = TRUE; @@ -186,6 +196,7 @@ TabPage TP_FLD_FUNC }; ListBox LB_LISTITEMS { + HelpID = "sw:ListBox:TP_FLD_FUNC:LB_LISTITEMS"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 57 ) ; Size = MAP_APPFONT ( 83 , 44 ) ; @@ -195,6 +206,7 @@ TabPage TP_FLD_FUNC }; PushButton PB_LISTREMOVE { + HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTREMOVE"; Pos = MAP_APPFONT ( 203 , 104 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Hide = TRUE; @@ -202,6 +214,7 @@ TabPage TP_FLD_FUNC }; PushButton PB_LISTUP { + HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTUP"; Pos = MAP_APPFONT ( 203 , 121 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Hide = TRUE; @@ -209,6 +222,7 @@ TabPage TP_FLD_FUNC }; PushButton PB_LISTDOWN { + HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTDOWN"; Pos = MAP_APPFONT ( 203 , 138 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Hide = TRUE; @@ -223,6 +237,7 @@ TabPage TP_FLD_FUNC }; Edit ED_LISTNAME { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_LISTNAME"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 167 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; diff --git a/sw/source/ui/fldui/fldref.src b/sw/source/ui/fldui/fldref.src index 8abf02e980..c3aa0f737e 100644 --- a/sw/source/ui/fldui/fldref.src +++ b/sw/source/ui/fldui/fldref.src @@ -43,6 +43,7 @@ TabPage TP_FLD_REF }; ListBox LB_REFTYPE { + HelpID = "sw:ListBox:TP_FLD_REF:LB_REFTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -58,6 +59,7 @@ TabPage TP_FLD_REF }; ListBox LB_REFSELECTION { + HelpID = "sw:ListBox:TP_FLD_REF:LB_REFSELECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 14 ) ; Size = MAP_APPFONT ( 166 , 73 ) ; @@ -82,6 +84,7 @@ TabPage TP_FLD_REF }; ListBox LB_REFFORMAT { + HelpID = "sw:ListBox:TP_FLD_REF:LB_REFFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 104 ) ; Size = MAP_APPFONT ( 76 , 75 ) ; @@ -98,6 +101,7 @@ TabPage TP_FLD_REF }; Edit ED_REFNAME { + HelpID = "sw:Edit:TP_FLD_REF:ED_REFNAME"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 104 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -114,6 +118,7 @@ TabPage TP_FLD_REF }; Edit ED_REFVALUE { + HelpID = "sw:Edit:TP_FLD_REF:ED_REFVALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 136 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; diff --git a/sw/source/ui/fldui/fldvar.src b/sw/source/ui/fldui/fldvar.src index eda28b7fb4..4c42c971d2 100644 --- a/sw/source/ui/fldui/fldvar.src +++ b/sw/source/ui/fldui/fldvar.src @@ -44,6 +44,7 @@ TabPage TP_FLD_VAR }; ListBox LB_VARTYPE { + HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 76 , 135 ) ; @@ -60,6 +61,7 @@ TabPage TP_FLD_VAR }; ListBox LB_VARSELECTION { + HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARSELECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 14 ) ; Size = MAP_APPFONT ( 76 , 135 ) ; @@ -75,6 +77,7 @@ TabPage TP_FLD_VAR }; ListBox LB_VARFORMAT { + HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 123 ) ; @@ -83,6 +86,7 @@ TabPage TP_FLD_VAR }; ListBox LB_VARNUMFORMAT { + HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARNUMFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 123 ) ; @@ -91,6 +95,7 @@ TabPage TP_FLD_VAR }; CheckBox CB_VARINVISIBLE { + HelpID = "sw:CheckBox:TP_FLD_VAR:CB_VARINVISIBLE"; Pos = MAP_APPFONT ( 170 , 141 ) ; Size = MAP_APPFONT ( 84 , 10 ) ; Text [ en-US ] = "Invisi~ble" ; @@ -112,6 +117,7 @@ TabPage TP_FLD_VAR }; ListBox LB_VARCHAPTERLEVEL { + HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARCHAPTERLEVEL"; Border = TRUE ; Hide = TRUE ; Pos = MAP_APPFONT ( 208 , 123 ) ; @@ -132,6 +138,7 @@ TabPage TP_FLD_VAR }; Edit ED_VARSEPARATOR { + HelpID = "sw:Edit:TP_FLD_VAR:ED_VARSEPARATOR"; Pos = MAP_APPFONT ( 208 , 138 ) ; Size = MAP_APPFONT ( 46 , 12 ) ; Border = TRUE ; @@ -148,6 +155,7 @@ TabPage TP_FLD_VAR }; Edit ED_VARNAME { + HelpID = "sw:Edit:TP_FLD_VAR:ED_VARNAME"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 166 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; @@ -163,6 +171,7 @@ TabPage TP_FLD_VAR }; Edit ED_VARVALUE { + HelpID = "sw:Edit:TP_FLD_VAR:ED_VARVALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 166 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; diff --git a/sw/source/ui/fldui/inpdlg.src b/sw/source/ui/fldui/inpdlg.src index f615b68f48..8cd70d8247 100644 --- a/sw/source/ui/fldui/inpdlg.src +++ b/sw/source/ui/fldui/inpdlg.src @@ -46,6 +46,7 @@ ModalDialog DLG_FLD_INPUT };*/ Edit ED_LABEL { + HelpID = "sw:Edit:DLG_FLD_INPUT:ED_LABEL"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; @@ -56,6 +57,7 @@ ModalDialog DLG_FLD_INPUT }; MultiLineEdit ED_EDIT { + HelpID = "sw:MultiLineEdit:DLG_FLD_INPUT:ED_EDIT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 32 ) ; Size = MAP_APPFONT ( 115 , 72 ) ; @@ -83,6 +85,7 @@ ModalDialog DLG_FLD_INPUT }; PushButton PB_NEXT { + HelpID = "sw:PushButton:DLG_FLD_INPUT:PB_NEXT"; Pos = MAP_APPFONT ( 139 , 40 ) ; Size = MAP_APPFONT ( 50 , 15 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/fldui/javaedit.src b/sw/source/ui/fldui/javaedit.src index ffeb2b84e8..cbcc83f055 100644 --- a/sw/source/ui/fldui/javaedit.src +++ b/sw/source/ui/fldui/javaedit.src @@ -33,6 +33,7 @@ // RID_SVXDLG_POSTIT ----------------------------------------------------- ModalDialog DLG_JAVAEDIT { + HelpID = "sw:ModalDialog:DLG_JAVAEDIT"; OutputSize = TRUE ; SvLook = TRUE ; Size = MAP_APPFONT ( 248 , 157 ) ; @@ -45,6 +46,7 @@ ModalDialog DLG_JAVAEDIT }; Edit ED_TYPE { + HelpID = "sw:Edit:DLG_JAVAEDIT:ED_TYPE"; Border = TRUE ; Text = "JavaScript" ; // Nicht uebersetzen!!! @@ -54,6 +56,7 @@ ModalDialog DLG_JAVAEDIT }; RadioButton RB_URL { + HelpID = "sw:RadioButton:DLG_JAVAEDIT:RB_URL"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 55 , 10 ) ; TabStop = TRUE ; @@ -61,6 +64,7 @@ ModalDialog DLG_JAVAEDIT }; Edit ED_URL { + HelpID = "sw:Edit:DLG_JAVAEDIT:ED_URL"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 27 ) ; Size = MAP_APPFONT ( 87 , 12 ) ; @@ -68,6 +72,7 @@ ModalDialog DLG_JAVAEDIT }; PushButton PB_URL { + HelpID = "sw:PushButton:DLG_JAVAEDIT:PB_URL"; Pos = MAP_APPFONT ( 163 , 26 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Text = "~..." ; @@ -75,6 +80,7 @@ ModalDialog DLG_JAVAEDIT }; RadioButton RB_EDIT { + HelpID = "sw:RadioButton:DLG_JAVAEDIT:RB_EDIT"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 140 , 10 ) ; Text [ en-US ] = "~Text" ; @@ -83,6 +89,7 @@ ModalDialog DLG_JAVAEDIT }; MultiLineEdit ED_EDIT { + HelpID = "sw:MultiLineEdit:DLG_JAVAEDIT:ED_EDIT"; Border = TRUE ; Pos = MAP_APPFONT ( 23 , 54 ) ; Size = MAP_APPFONT ( 155 , 91 ) ; @@ -116,12 +123,14 @@ ModalDialog DLG_JAVAEDIT }; ImageButton BTN_PREV { + HelpID = "sw:ImageButton:DLG_JAVAEDIT:BTN_PREV"; Pos = MAP_APPFONT ( 191 , 60 ) ; Size = MAP_APPFONT ( 24 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_LEFT ; }; ImageButton BTN_NEXT { + HelpID = "sw:ImageButton:DLG_JAVAEDIT:BTN_NEXT"; Pos = MAP_APPFONT ( 217 , 60 ) ; Size = MAP_APPFONT ( 24 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_RIGHT ; diff --git a/sw/source/ui/frmdlg/column.src b/sw/source/ui/frmdlg/column.src index 449fbbf121..537cf1ce9c 100644 --- a/sw/source/ui/frmdlg/column.src +++ b/sw/source/ui/frmdlg/column.src @@ -46,6 +46,7 @@ TabPage TP_COLUMN }; NumericField ED_NUMBER { + HelpID = "sw:NumericField:TP_COLUMN:ED_NUMBER"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 30 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -68,6 +69,7 @@ TabPage TP_COLUMN }; CheckBox CB_BALANCECOLS { + HelpID = "sw:CheckBox:TP_COLUMN:CB_BALANCECOLS"; Pos = MAP_APPFONT ( 7 , 46 ) ; Size = MAP_APPFONT ( 163 , 10 ) ; Hide = TRUE; @@ -93,6 +95,7 @@ TabPage TP_COLUMN }; ImageButton BTN_DOWN { + HelpID = "sw:ImageButton:TP_COLUMN:BTN_DOWN"; Disable = TRUE ; Pos = MAP_APPFONT ( 62 , 69 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; @@ -122,6 +125,7 @@ TabPage TP_COLUMN }; ImageButton BTN_UP { + HelpID = "sw:ImageButton:TP_COLUMN:BTN_UP"; Disable = TRUE ; Pos = MAP_APPFONT ( 238 , 69 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; @@ -137,6 +141,7 @@ TabPage TP_COLUMN }; MetricField ED_1 { + HelpID = "sw:MetricField:TP_COLUMN:ED_1"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 87 , 83 ) ; @@ -155,6 +160,7 @@ TabPage TP_COLUMN }; MetricField ED_2 { + HelpID = "sw:MetricField:TP_COLUMN:ED_2"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 137 , 83 ) ; @@ -173,6 +179,7 @@ TabPage TP_COLUMN }; MetricField ED_3 { + HelpID = "sw:MetricField:TP_COLUMN:ED_3"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 187 , 83 ) ; @@ -198,6 +205,7 @@ TabPage TP_COLUMN }; MetricField ED_DIST1 { + HelpID = "sw:MetricField:TP_COLUMN:ED_DIST1"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 112 , 99 ) ; @@ -216,6 +224,7 @@ TabPage TP_COLUMN }; MetricField ED_DIST2 { + HelpID = "sw:MetricField:TP_COLUMN:ED_DIST2"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 162 , 99 ) ; @@ -234,6 +243,7 @@ TabPage TP_COLUMN }; CheckBox CB_AUTO_WIDTH { + HelpID = "sw:CheckBox:TP_COLUMN:CB_AUTO_WIDTH"; Pos = MAP_APPFONT ( 87 , 115 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "Auto~Width" ; @@ -255,6 +265,7 @@ TabPage TP_COLUMN }; ListBox LB_STYLE { + HelpID = "sw:ListBox:TP_COLUMN:LB_STYLE"; Pos = MAP_APPFONT ( 50 , 138 ) ; Size = MAP_APPFONT ( 60 , 66 ) ; TabStop = TRUE ; @@ -273,6 +284,7 @@ TabPage TP_COLUMN }; MetricField ED_HEIGHT { + HelpID = "sw:MetricField:TP_COLUMN:ED_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 50 , 154 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; @@ -297,6 +309,7 @@ TabPage TP_COLUMN }; ListBox LB_POSITION { + HelpID = "sw:ListBox:TP_COLUMN:LB_POSITION"; Pos = MAP_APPFONT ( 50 , 170 ) ; Size = MAP_APPFONT ( 60 , 40 ) ; TabStop = TRUE ; @@ -337,6 +350,7 @@ TabPage TP_COLUMN }; ListBox LB_TEXTDIRECTION { + HelpID = "sw:ListBox:TP_COLUMN:LB_TEXTDIRECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 127 , 149 ) ; Size = MAP_APPFONT ( 127 , 50 ) ; @@ -385,6 +399,7 @@ ModalDialog DLG_COLUMN }; ListBox LB_APPLY_TO { + HelpID = "sw:ListBox:DLG_COLUMN:LB_APPLY_TO"; Pos = MAP_APPFONT ( 260 , 74 ) ; Size = MAP_APPFONT ( 50 , 66 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/frmdlg/cption.src b/sw/source/ui/frmdlg/cption.src index da651a4573..30be09080a 100644 --- a/sw/source/ui/frmdlg/cption.src +++ b/sw/source/ui/frmdlg/cption.src @@ -61,6 +61,7 @@ ModalDialog DLG_CAPTION }; PushButton BTN_AUTOCAPTION { + HelpID = "sw:PushButton:DLG_CAPTION:BTN_AUTOCAPTION"; Pos = MAP_APPFONT ( 194 , 63 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -68,6 +69,7 @@ ModalDialog DLG_CAPTION }; PushButton BTN_OPTION { + HelpID = "sw:PushButton:DLG_CAPTION:BTN_OPTION"; Pos = MAP_APPFONT ( 194 , 80 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -83,6 +85,7 @@ ModalDialog DLG_CAPTION }; Edit EDT_TEXT { + HelpID = "sw:Edit:DLG_CAPTION:EDT_TEXT"; Pos = MAP_APPFONT ( 6 , 17 ) ; Size = MAP_APPFONT ( 182 , 12 ) ; Border = TRUE ; @@ -104,6 +107,7 @@ ModalDialog DLG_CAPTION }; ComboBox BOX_CATEGORY { + HelpID = "sw:ComboBox:DLG_CAPTION:BOX_CATEGORY"; Pos = MAP_APPFONT ( 82 , 46 ) ; Size = MAP_APPFONT ( 106 , 61 ) ; DropDown = TRUE ; @@ -119,6 +123,7 @@ ModalDialog DLG_CAPTION }; ListBox BOX_FORMAT { + HelpID = "sw:ListBox:DLG_CAPTION:BOX_FORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 82 , 63 ) ; Size = MAP_APPFONT ( 106 , 83 ) ; @@ -135,6 +140,7 @@ ModalDialog DLG_CAPTION }; Edit ED_NUM_SEP { + HelpID = "sw:Edit:DLG_CAPTION:ED_NUM_SEP"; Pos = MAP_APPFONT ( 82 , 63 ) ; Size = MAP_APPFONT ( 106 , 12 ) ; Border = TRUE ; @@ -152,6 +158,7 @@ ModalDialog DLG_CAPTION }; Edit EDT_SEP { + HelpID = "sw:Edit:DLG_CAPTION:EDT_SEP"; Pos = MAP_APPFONT ( 82 , 80 ) ; Size = MAP_APPFONT ( 106 , 12 ) ; Border = TRUE ; @@ -168,6 +175,7 @@ ModalDialog DLG_CAPTION }; ListBox BOX_POS { + HelpID = "sw:ListBox:DLG_CAPTION:BOX_POS"; Pos = MAP_APPFONT ( 82 , 97 ) ; Size = MAP_APPFONT ( 106 , 61 ) ; DropDown = TRUE ; @@ -244,6 +252,7 @@ ModalDialog DLG_SEQUENCE_OPTION }; ListBox LB_LEVEL { + HelpID = "sw:ListBox:DLG_SEQUENCE_OPTION:LB_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 18 ) ; Size = MAP_APPFONT ( 72 , 60 ) ; @@ -262,6 +271,7 @@ ModalDialog DLG_SEQUENCE_OPTION }; Edit ED_SEPARATOR { + HelpID = "sw:Edit:DLG_SEQUENCE_OPTION:ED_SEPARATOR"; Pos = MAP_APPFONT ( 65 , 34 ) ; Size = MAP_APPFONT ( 72 , 12 ) ; Border = TRUE ; @@ -282,6 +292,7 @@ ModalDialog DLG_SEQUENCE_OPTION }; ListBox LB_CHARSTYLE { + HelpID = "sw:ListBox:DLG_SEQUENCE_OPTION:LB_CHARSTYLE"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 68 ) ; Size = MAP_APPFONT ( 72 , 60 ) ; @@ -294,6 +305,7 @@ ModalDialog DLG_SEQUENCE_OPTION }; CheckBox CB_APPLYBAS { + HelpID = "sw:CheckBox:DLG_SEQUENCE_OPTION:CB_APPLYBAS"; Pos = MAP_APPFONT ( 12 , 84 ) ; Size = MAP_APPFONT ( 136 , 10 ) ; TabStop = TRUE ; @@ -313,6 +325,7 @@ ModalDialog DLG_SEQUENCE_OPTION }; ListBox LB_ORDER { + HelpID = "sw:ListBox:DLG_SEQUENCE_OPTION:LB_ORDER"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 114 ) ; Size = MAP_APPFONT ( 72 , 60 ) ; diff --git a/sw/source/ui/frmdlg/frmpage.src b/sw/source/ui/frmdlg/frmpage.src index 5ce84d4552..f832061dc7 100644 --- a/sw/source/ui/frmdlg/frmpage.src +++ b/sw/source/ui/frmdlg/frmpage.src @@ -243,6 +243,7 @@ TabPage TP_FRM_STD }; MetricField ED_WIDTH { + HelpID = "sw:MetricField:TP_FRM_STD:ED_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( SWFRMPG_COL_3 , SWFRMPG_ROW_1 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_3) , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -261,6 +262,7 @@ TabPage TP_FRM_STD }; CheckBox CB_REL_WIDTH { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_REL_WIDTH"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_3 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_2) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -268,6 +270,7 @@ TabPage TP_FRM_STD }; CheckBox CB_AUTOWIDTH { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_AUTOWIDTH"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_4 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_2) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -289,6 +292,7 @@ TabPage TP_FRM_STD }; MetricField ED_HEIGHT { + HelpID = "sw:MetricField:TP_FRM_STD:ED_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( SWFRMPG_COL_3 , SWFRMPG_ROW_5 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_3) , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -306,6 +310,7 @@ TabPage TP_FRM_STD }; CheckBox CB_REL_HEIGHT { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_REL_HEIGHT"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_7 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_2) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -313,6 +318,7 @@ TabPage TP_FRM_STD }; CheckBox CB_AUTOHEIGHT { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_AUTOHEIGHT"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_8 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_2) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -320,6 +326,7 @@ TabPage TP_FRM_STD }; CheckBox CB_FIXEDRATIO { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_FIXEDRATIO"; Pos = MAP_APPFONT ( SWFRMPG_COL_1 , SWFRMPG_ROW_9 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_1) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -327,6 +334,7 @@ TabPage TP_FRM_STD }; PushButton BT_REALSIZE { + HelpID = "sw:PushButton:TP_FRM_STD:BT_REALSIZE"; Pos = MAP_APPFONT ( 35 , 86 ) ; Size = MAP_APPFONT ( 70 , 14 ) ; TabStop = TRUE ; @@ -347,30 +355,35 @@ TabPage TP_FRM_STD }; RadioButton RB_ANCHOR_PAGE { + HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_PAGE"; Pos = MAP_APPFONT ( 122 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "To ~page"; }; RadioButton RB_ANCHOR_PARA { + HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_PARA"; Pos = MAP_APPFONT ( 122 , 28 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "To paragrap~h"; }; RadioButton RB_ANCHOR_AT_CHAR { + HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_AT_CHAR"; Pos = MAP_APPFONT ( 122 , 42 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "To cha~racter"; }; RadioButton RB_ANCHOR_AS_CHAR { + HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_AS_CHAR"; Pos = MAP_APPFONT ( 122 , 56 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~As character" ; }; RadioButton RB_ANCHOR_FRAME { + HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_FRAME"; Pos = MAP_APPFONT ( 122 , 70 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "To ~frame"; @@ -395,6 +408,7 @@ TabPage TP_FRM_STD }; ListBox DLB_HORIZONTAL { + HelpID = "sw:ListBox:TP_FRM_STD:DLB_HORIZONTAL"; Pos = MAP_APPFONT ( 49 , SWFRMPG_ROW_11 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; TabStop = TRUE ; @@ -409,6 +423,7 @@ TabPage TP_FRM_STD }; MetricField ED_AT_HORZ_POS { + HelpID = "sw:MetricField:TP_FRM_STD:ED_AT_HORZ_POS"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , SWFRMPG_ROW_11 ) ; Size = MAP_APPFONT ( 35 , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -433,6 +448,7 @@ TabPage TP_FRM_STD }; ListBox LB_HORI_RELATION { + HelpID = "sw:ListBox:TP_FRM_STD:LB_HORI_RELATION"; Pos = MAP_APPFONT ( 183 , SWFRMPG_ROW_11 ) ; Size = MAP_APPFONT ( 65 , 60 ) ; TabStop = TRUE ; @@ -440,6 +456,7 @@ TabPage TP_FRM_STD }; CheckBox CB_MIRROR { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_MIRROR"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_13 ) ; Size = MAP_APPFONT ( (260-SWFRMPG_COL_2-1) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -454,6 +471,7 @@ TabPage TP_FRM_STD }; ListBox DLB_VERTICAL { + HelpID = "sw:ListBox:TP_FRM_STD:DLB_VERTICAL"; Pos = MAP_APPFONT ( 49 , SWFRMPG_ROW_14 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; TabStop = TRUE ; @@ -468,6 +486,7 @@ TabPage TP_FRM_STD }; MetricField ED_AT_VERT_POS { + HelpID = "sw:MetricField:TP_FRM_STD:ED_AT_VERT_POS"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , SWFRMPG_ROW_14 ) ; Size = MAP_APPFONT ( 35 , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -492,6 +511,7 @@ TabPage TP_FRM_STD }; ListBox LB_VERT_RELATION { + HelpID = "sw:ListBox:TP_FRM_STD:LB_VERT_RELATION"; Pos = MAP_APPFONT ( 183 , SWFRMPG_ROW_14 ) ; Size = MAP_APPFONT ( 65 , 60 ) ; TabStop = TRUE ; @@ -499,6 +519,7 @@ TabPage TP_FRM_STD }; CheckBox CB_FOLLOWTEXTFLOW { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_FOLLOWTEXTFLOW"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_16 ) ; Size = MAP_APPFONT ( (260-SWFRMPG_COL_2-1) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -540,6 +561,7 @@ TabPage TP_GRF_EXT }; Edit ED_CONNECT { + HelpID = "sw:Edit:TP_GRF_EXT:ED_CONNECT"; Pos = MAP_APPFONT ( 13 , 109 ) ; Size = MAP_APPFONT ( 200 , 12 ) ; Text [ en-US ] = "[None]" ; @@ -549,6 +571,7 @@ TabPage TP_GRF_EXT }; PushButton PB_BROWSE { + HelpID = "sw:PushButton:TP_GRF_EXT:PB_BROWSE"; Disable = TRUE ; Pos = MAP_APPFONT ( 230 , 109 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; @@ -558,6 +581,7 @@ TabPage TP_GRF_EXT }; CheckBox CB_VERT { + HelpID = "sw:CheckBox:TP_GRF_EXT:CB_VERT"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 48 , 10 ) ; TabStop = TRUE ; @@ -566,6 +590,7 @@ TabPage TP_GRF_EXT }; CheckBox CB_HOR { + HelpID = "sw:CheckBox:TP_GRF_EXT:CB_HOR"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; TabStop = TRUE ; @@ -573,6 +598,7 @@ TabPage TP_GRF_EXT }; RadioButton RB_MIRROR_ALL_PAGES { + HelpID = "sw:RadioButton:TP_GRF_EXT:RB_MIRROR_ALL_PAGES"; Pos = MAP_APPFONT ( 18 , 42 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -580,6 +606,7 @@ TabPage TP_GRF_EXT }; RadioButton RB_MIRROR_LEFT_PAGES { + HelpID = "sw:RadioButton:TP_GRF_EXT:RB_MIRROR_LEFT_PAGES"; Pos = MAP_APPFONT ( 18 , 56 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -587,6 +614,7 @@ TabPage TP_GRF_EXT }; RadioButton RB_MIRROR_RIGHT_PAGES { + HelpID = "sw:RadioButton:TP_GRF_EXT:RB_MIRROR_RIGHT_PAGES"; Pos = MAP_APPFONT ( 18 , 70 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -624,6 +652,7 @@ TabPage TP_FRM_URL }; Edit ED_URL { + HelpID = "sw:Edit:TP_FRM_URL:ED_URL"; Pos = MAP_APPFONT ( 45 , 14 ) ; Size = MAP_APPFONT ( 149 , 12 ) ; Left = TRUE ; @@ -638,6 +667,7 @@ TabPage TP_FRM_URL }; Edit ED_NAME { + HelpID = "sw:Edit:TP_FRM_URL:ED_NAME"; Pos = MAP_APPFONT ( 45 , 30 ) ; Size = MAP_APPFONT ( 149 , 12 ) ; Left = TRUE ; @@ -652,6 +682,7 @@ TabPage TP_FRM_URL }; ComboBox CB_FRAME { + HelpID = "sw:ComboBox:TP_FRM_URL:CB_FRAME"; Pos = MAP_APPFONT ( 45 , 46 ) ; Size = MAP_APPFONT ( 89 , 50 ) ; Left = TRUE ; @@ -660,6 +691,7 @@ TabPage TP_FRM_URL }; PushButton PB_SEARCH { + HelpID = "sw:PushButton:TP_FRM_URL:PB_SEARCH"; Pos = MAP_APPFONT ( 198 , 13 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -673,12 +705,14 @@ TabPage TP_FRM_URL }; CheckBox CB_SERVER { + HelpID = "sw:CheckBox:TP_FRM_URL:CB_SERVER"; Pos = MAP_APPFONT ( 12 , 75 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; Text [ en-US ] = "~Server-side image map"; }; CheckBox CB_CLIENT { + HelpID = "sw:CheckBox:TP_FRM_URL:CB_CLIENT"; Pos = MAP_APPFONT ( 12 , 89 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; Text [ en-US ] = "~Client-side image map"; @@ -705,6 +739,7 @@ TabPage TP_FRM_ADD }; Edit ED_NAME { + HelpID = "sw:Edit:TP_FRM_ADD:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 91 , 14 ) ; Size = MAP_APPFONT ( 157 , 12 ) ; @@ -718,6 +753,7 @@ TabPage TP_FRM_ADD }; Edit ED_ALT_NAME { + HelpID = "sw:Edit:TP_FRM_ADD:ED_ALT_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 91 , 30 ) ; Size = MAP_APPFONT ( 157 , 12 ) ; @@ -731,6 +767,7 @@ TabPage TP_FRM_ADD }; ListBox LB_PREV { + HelpID = "sw:ListBox:TP_FRM_ADD:LB_PREV"; Border = TRUE ; Pos = MAP_APPFONT ( 91 , 46 ) ; Size = MAP_APPFONT ( 157 , 50 ) ; @@ -749,6 +786,7 @@ TabPage TP_FRM_ADD }; ListBox LB_NEXT { + HelpID = "sw:ListBox:TP_FRM_ADD:LB_NEXT"; Border = TRUE ; Pos = MAP_APPFONT ( 91 , 62 ) ; Size = MAP_APPFONT ( 157 , 50 ) ; @@ -767,6 +805,7 @@ TabPage TP_FRM_ADD }; CheckBox CB_PROTECT_CONTENT { + HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PROTECT_CONTENT"; Pos = MAP_APPFONT ( 12 , 91 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -774,6 +813,7 @@ TabPage TP_FRM_ADD }; CheckBox CB_PROTECT_FRAME { + HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PROTECT_FRAME"; Pos = MAP_APPFONT ( 12 , 105 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -781,6 +821,7 @@ TabPage TP_FRM_ADD }; CheckBox CB_PROTECT_SIZE { + HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PROTECT_SIZE"; Pos = MAP_APPFONT ( 12 , 119 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -794,6 +835,7 @@ TabPage TP_FRM_ADD }; CheckBox CB_EDIT_IN_READONLY { + HelpID = "sw:CheckBox:TP_FRM_ADD:CB_EDIT_IN_READONLY"; Pos = MAP_APPFONT ( 12 , 146 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; @@ -801,6 +843,7 @@ TabPage TP_FRM_ADD }; CheckBox CB_PRINT_FRAME { + HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PRINT_FRAME"; Pos = MAP_APPFONT ( 12 , 160 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; @@ -823,6 +866,7 @@ TabPage TP_FRM_ADD }; ListBox LB_TEXTFLOW { + HelpID = "sw:ListBox:TP_FRM_ADD:LB_TEXTFLOW"; Border = TRUE ; Pos = MAP_APPFONT ( 81 , 172 ) ; Size = MAP_APPFONT ( 167 , 50 ) ; diff --git a/sw/source/ui/frmdlg/wrap.src b/sw/source/ui/frmdlg/wrap.src index 6810f55e1a..1680f3d93b 100644 --- a/sw/source/ui/frmdlg/wrap.src +++ b/sw/source/ui/frmdlg/wrap.src @@ -44,6 +44,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_NO_WRAP { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_NO_WRAP"; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -52,6 +53,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_WRAP_LEFT { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_LEFT"; Pos = MAP_APPFONT ( 65 , 14 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -60,6 +62,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_WRAP_RIGHT { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_RIGHT"; Pos = MAP_APPFONT ( 121 , 14 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -68,6 +71,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_WRAP_PARALLEL { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_PARALLEL"; Pos = MAP_APPFONT ( 177 , 14 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -76,6 +80,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_WRAP_THROUGH { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_THROUGH"; Pos = MAP_APPFONT ( 6 , 57 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -84,6 +89,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_WRAP_IDEAL { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_IDEAL"; Pos = MAP_APPFONT ( 65 , 57 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -93,18 +99,21 @@ TabPage TP_FRM_WRAP CheckBox CB_ANCHOR_ONLY { + HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_ANCHOR_ONLY"; Pos = MAP_APPFONT ( 139 , 111 ) ; Size = MAP_APPFONT ( 109 , 10 ) ; Text [ en-US ] = "~First paragraph" ; }; CheckBox CB_TRANSPARENT { + HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_TRANSPARENT"; Pos = MAP_APPFONT ( 139 , 125 ) ; Size = MAP_APPFONT ( 109 , 10 ) ; Text [ en-US ] = "In bac~kground" ; }; CheckBox CB_OUTLINE { + HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_OUTLINE"; Pos = MAP_APPFONT ( 139 , 139 ) ; Size = MAP_APPFONT ( 109 , 10 ) ; Hide = TRUE ; @@ -112,6 +121,7 @@ TabPage TP_FRM_WRAP }; CheckBox CB_ONLYOUTSIDE { + HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_ONLYOUTSIDE"; Pos = MAP_APPFONT ( 139 , 153 ) ; Size = MAP_APPFONT ( 109 , 10 ) ; Hide = TRUE ; @@ -138,6 +148,7 @@ TabPage TP_FRM_WRAP }; MetricField ED_LEFT_MARGIN { + HelpID = "sw:MetricField:TP_FRM_WRAP:ED_LEFT_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 81 , 111 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -160,6 +171,7 @@ TabPage TP_FRM_WRAP }; MetricField ED_RIGHT_MARGIN { + HelpID = "sw:MetricField:TP_FRM_WRAP:ED_RIGHT_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 81 , 127 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -182,6 +194,7 @@ TabPage TP_FRM_WRAP }; MetricField ED_TOP_MARGIN { + HelpID = "sw:MetricField:TP_FRM_WRAP:ED_TOP_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 81 , 143 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -204,6 +217,7 @@ TabPage TP_FRM_WRAP }; MetricField ED_BOTTOM_MARGIN { + HelpID = "sw:MetricField:TP_FRM_WRAP:ED_BOTTOM_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 81 , 159 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src index 8220ed42ba..4532c50658 100644 --- a/sw/source/ui/index/cnttab.src +++ b/sw/source/ui/index/cnttab.src @@ -132,6 +132,7 @@ TabPage TP_TOX_SELECT }; Edit ED_TITLE { + HelpID = "sw:Edit:TP_TOX_SELECT:ED_TITLE"; Pos = MAP_APPFONT ( 45 , 14 ) ; Size = MAP_APPFONT ( 203 , 12 ) ; Border = TRUE; @@ -144,6 +145,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_TYPE { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_TYPE"; Pos = MAP_APPFONT ( 45 , 30 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -161,6 +163,7 @@ TabPage TP_TOX_SELECT }; CheckBox CB_READONLY { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_READONLY"; Pos = MAP_APPFONT ( 51 , 46 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; Check = TRUE; @@ -180,6 +183,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_AREA { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_AREA"; Pos = MAP_APPFONT ( 45 , 70 ) ; Size = MAP_APPFONT ( 80 , 12 ) ; TabStop = TRUE ; @@ -198,6 +202,7 @@ TabPage TP_TOX_SELECT }; NumericField NF_LEVEL { + HelpID = "sw:NumericField:TP_TOX_SELECT:NF_LEVEL"; Pos = MAP_APPFONT ( 231 , 72 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; Border = TRUE ; @@ -218,6 +223,7 @@ TabPage TP_TOX_SELECT }; CheckBox CB_FROMHEADINGS { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMHEADINGS"; Pos = MAP_APPFONT ( 12 , 99 ) ; Size = MAP_APPFONT ( 95 , 10 ) ; Check = TRUE; @@ -234,6 +240,7 @@ TabPage TP_TOX_SELECT */ CheckBox CB_ADDSTYLES { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_ADDSTYLES"; Pos = MAP_APPFONT ( 12 , 115 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; Text [ en-US ] = "~Additional Styles"; @@ -244,6 +251,7 @@ TabPage TP_TOX_SELECT }; PushButton PB_ADDSTYLES { + HelpID = "sw:PushButton:TP_TOX_SELECT:PB_ADDSTYLES"; Pos = MAP_APPFONT ( 115 , 114 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; Text = "..." ; @@ -251,6 +259,7 @@ TabPage TP_TOX_SELECT }; CheckBox CB_TOXMARKS { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_TOXMARKS"; Pos = MAP_APPFONT ( 12 , 131 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Inde~x marks"; @@ -258,6 +267,7 @@ TabPage TP_TOX_SELECT RadioButton RB_FROMCAPTIONS { + HelpID = "sw:RadioButton:TP_TOX_SELECT:RB_FROMCAPTIONS"; Pos = MAP_APPFONT ( 12 , 98 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Captions"; @@ -270,6 +280,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_CAPTIONSEQUENCE { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_CAPTIONSEQUENCE"; Pos = MAP_APPFONT ( 55 , 112 ) ; Size = MAP_APPFONT ( 70 , 40 ) ; DropDown = TRUE; @@ -283,6 +294,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_DISPLAYTYPE { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_DISPLAYTYPE"; Pos = MAP_APPFONT ( 55 , 128 ) ; Size = MAP_APPFONT ( 70 , 40 ) ; DropDown = TRUE; @@ -296,54 +308,63 @@ TabPage TP_TOX_SELECT }; RadioButton RB_FROMOBJECTNAMES { + HelpID = "sw:RadioButton:TP_TOX_SELECT:RB_FROMOBJECTNAMES"; Pos = MAP_APPFONT ( 156 , 98 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Object names"; }; CheckBox CB_COLLECTSAME { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_COLLECTSAME"; Pos = MAP_APPFONT ( 12 , 98 ) ; Size = MAP_APPFONT ( 121 , 10 ) ; Text [ en-US ] = "Combine identical entries"; }; CheckBox CB_USEFF { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_USEFF"; Pos = MAP_APPFONT ( 18 , 111 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "Combine identical entries with p or ~pp"; }; CheckBox CB_USE_DASH { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_USE_DASH"; Pos = MAP_APPFONT ( 18 , 124 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "Combine with -"; }; CheckBox CB_CASESENSITIVE { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_CASESENSITIVE"; Pos = MAP_APPFONT ( 18 , 137 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "Case sensitive"; }; CheckBox CB_INITIALCAPS { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_INITIALCAPS"; Pos = MAP_APPFONT ( 136 , 98 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "AutoCapitalize entries"; }; CheckBox CB_KEYASENTRY { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_KEYASENTRY"; Pos = MAP_APPFONT ( 136, 111 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "Keys as separate entries"; }; CheckBox CB_FROMFILE { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMFILE"; Pos = MAP_APPFONT ( 136 , 124 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "~Concordance file"; }; MenuButton MB_AUTOMARK { + HelpID = "sw:MenuButton:TP_TOX_SELECT:MB_AUTOMARK"; Pos = MAP_APPFONT ( 136 , 137 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -372,30 +393,35 @@ TabPage TP_TOX_SELECT }; CheckBox CB_FROMTABLES { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMTABLES"; Pos = MAP_APPFONT ( 112 , 99 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; Text [ en-US ] = "Tables"; }; CheckBox CB_FROMFRAMES { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMFRAMES"; Pos = MAP_APPFONT ( 182 , 99 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; Text [ en-US ] = "Te~xt frames"; }; CheckBox CB_FROMGRAPHICS { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMGRAPHICS"; Pos = MAP_APPFONT ( 112 , 113 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; Text [ en-US ] = "Graphics"; }; CheckBox CB_FROMOLE { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMOLE"; Pos = MAP_APPFONT ( 182 , 113 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; Text [ en-US ] = "OLE objects"; }; CheckBox CB_LEVELFROMCHAPTER { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_LEVELFROMCHAPTER"; Pos = MAP_APPFONT ( 118 , 127 ) ; Size = MAP_APPFONT ( 103 , 10 ) ; Text [ en-US ] = "Use level from source chapter"; @@ -443,6 +469,7 @@ TabPage TP_TOX_SELECT }; CheckBox CB_SEQUENCE { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_SEQUENCE"; Pos = MAP_APPFONT ( 12, 70) ; Size = MAP_APPFONT ( 100, 10 ) ; Text [ en-US ] = "~Number entries"; @@ -455,6 +482,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_BRACKET { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_BRACKET"; Pos = MAP_APPFONT ( 75, 84) ; Size = MAP_APPFONT ( 40, 50 ) ; Border = TRUE; @@ -495,6 +523,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_LANGUAGE { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_LANGUAGE"; Pos = MAP_APPFONT ( 47, 164) ; Size = MAP_APPFONT ( 80, 50 ) ; Border = TRUE; @@ -508,6 +537,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_SORTALG { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_SORTALG"; Pos = MAP_APPFONT ( 201, 164) ; Size = MAP_APPFONT ( 50, 50 ) ; Border = TRUE; @@ -549,6 +579,7 @@ TabPage TP_TOX_ENTRY Size = MAP_APPFONT ( 136, 12 ) ; ImageButton WIN_LEFT_SCROLL { + HelpID = "sw:ImageButton:TP_TOX_ENTRY:WIN_LEFT_SCROLL"; Pos = MAP_APPFONT ( 0, 0 ) ; Size = MAP_APPFONT ( 10, 12 ) ; Symbol = IMAGEBUTTON_ARROW_LEFT; @@ -563,6 +594,7 @@ TabPage TP_TOX_ENTRY }; ImageButton WIN_RIGHT_SCROLL { + HelpID = "sw:ImageButton:TP_TOX_ENTRY:WIN_RIGHT_SCROLL"; Pos = MAP_APPFONT ( 126, 0 ) ; Size = MAP_APPFONT ( 10, 12 ) ; Symbol = IMAGEBUTTON_ARROW_RIGHT; @@ -649,48 +681,56 @@ TabPage TP_TOX_ENTRY }; PushButton PB_ALL_LEVELS { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ALL_LEVELS"; Pos = MAP_APPFONT ( 209 , 14 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "~All"; }; PushButton PB_ENTRYNO { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ENTRYNO"; Pos = MAP_APPFONT ( 37 , 32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "Chapter no."; }; PushButton PB_ENTRY { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ENTRY"; Pos = MAP_APPFONT ( 80, 32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "Entry text"; }; PushButton PB_CHAPTERINFO { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_CHAPTERINFO"; Pos = MAP_APPFONT ( 123 , 32 ) ; Size = MAP_APPFONT ( 40, 14) ; Text [ en-US ] = "~Chapter info"; }; PushButton PB_PAGENO { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_PAGENO"; Pos = MAP_APPFONT ( 166 , 32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "Page no."; }; PushButton PB_TAB { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_TAB"; Pos = MAP_APPFONT ( 209 ,32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "Tab stop"; }; PushButton PB_HYPERLINK { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_HYPERLINK"; Pos = MAP_APPFONT ( 209 , 32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "H~yperlink"; }; ListBox LB_AUTHFIELD { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_AUTHFIELD"; Pos = MAP_APPFONT ( 37 , 33 ) ; Size = MAP_APPFONT ( 59, 60 ) ; DropDown = TRUE; @@ -699,12 +739,14 @@ TabPage TP_TOX_ENTRY }; PushButton PB_AUTHINSERT { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_AUTHINSERT"; Pos = MAP_APPFONT ( 99 , 32 ) ; Size = MAP_APPFONT ( 39, 14 ) ; Text [ en-US ] = "~Insert"; }; PushButton PB_AUTHREMOVE { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_AUTHREMOVE"; Pos = MAP_APPFONT ( 142 , 32 ) ; Size = MAP_APPFONT ( 39, 14 ) ; Text [ en-US ] = "~Remove"; @@ -717,6 +759,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_CHARSTYLE { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_CHARSTYLE"; Pos = MAP_APPFONT ( 100 , 53 ) ; Size = MAP_APPFONT ( 93, 60 ) ; TabStop = TRUE ; @@ -724,6 +767,7 @@ TabPage TP_TOX_ENTRY }; PushButton PB_EDITSTYLE { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_EDITSTYLE"; Pos = MAP_APPFONT ( 199 , 52 ) ; Size = MAP_APPFONT ( 50, 14 ) ; Text [ en-US ] = "~Edit..."; @@ -736,6 +780,7 @@ TabPage TP_TOX_ENTRY }; ComboBox CB_FILLCHAR { + HelpID = "sw:ComboBox:TP_TOX_ENTRY:CB_FILLCHAR"; Pos = MAP_APPFONT ( 100 , 69 ) ; Size = MAP_APPFONT ( 40, 40 ) ; TabStop = TRUE ; @@ -749,6 +794,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_CHAPTERENTRY { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_CHAPTERENTRY"; Pos = MAP_APPFONT ( 100 , 69 ) ; Size = MAP_APPFONT ( 93, 40 ) ; TabStop = TRUE ; @@ -769,6 +815,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_ENTRY_NO { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_ENTRY_NO"; Pos = MAP_APPFONT ( 100 , 69 ) ; Size = MAP_APPFONT ( 93, 40 ) ; TabStop = TRUE ; @@ -788,6 +835,7 @@ TabPage TP_TOX_ENTRY }; NumericField NF_LEVEL_OL { + HelpID = "sw:NumericField:TP_TOX_ENTRY:NF_LEVEL_OL"; Pos = MAP_APPFONT ( 100 , 85 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; Border = TRUE ; @@ -809,6 +857,7 @@ TabPage TP_TOX_ENTRY }; MetricField MF_TABPOS { + HelpID = "sw:MetricField:TP_TOX_ENTRY:MF_TABPOS"; Pos = MAP_APPFONT ( 100 , 85 ) ; Size = MAP_APPFONT ( 40, 12 ) ; Border = TRUE ; @@ -827,6 +876,7 @@ TabPage TP_TOX_ENTRY }; CheckBox CB_AUTORIGHT { + HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_AUTORIGHT"; Pos = MAP_APPFONT ( 143 , 86 ) ; Size = MAP_APPFONT ( 100, 10 ) ; Text [ en-US ] = "Align right"; @@ -839,6 +889,7 @@ TabPage TP_TOX_ENTRY }; CheckBox CB_RELTOSTYLE { + HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_RELTOSTYLE"; Pos = MAP_APPFONT ( 37 , 110 ) ; Size = MAP_APPFONT ( 200, 10 ) ; Text [ en-US ] = "Tab position relati~ve to Paragraph Style indent"; @@ -851,6 +902,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_MAIN_ENTRY_STYLE { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_MAIN_ENTRY_STYLE"; Pos = MAP_APPFONT ( 157 , 110 ) ; Size = MAP_APPFONT ( 92, 80 ) ; TabStop = TRUE ; @@ -860,12 +912,14 @@ TabPage TP_TOX_ENTRY CheckBox CB_ALPHADELIM { + HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_ALPHADELIM"; Pos = MAP_APPFONT ( 37 , 126 ) ; Size = MAP_APPFONT ( 105, 10 ) ; Text [ en-US ] = "Alphabetical delimiter"; }; CheckBox CB_COMMASEPARATED { + HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_COMMASEPARATED"; Pos = MAP_APPFONT ( 37 , 140 ) ; Size = MAP_APPFONT ( 105, 10 ) ; Text [ en-US ] = "Key separated by commas"; @@ -878,12 +932,14 @@ TabPage TP_TOX_ENTRY }; RadioButton RB_DOCPOS { + HelpID = "sw:RadioButton:TP_TOX_ENTRY:RB_DOCPOS"; Pos = MAP_APPFONT ( 40 , 113) ; Size = MAP_APPFONT ( 94, 10 ) ; Text [ en-US ] = "Document ~position "; }; RadioButton RB_SORTCONTENT { + HelpID = "sw:RadioButton:TP_TOX_ENTRY:RB_SORTCONTENT"; Pos = MAP_APPFONT ( 136 , 113 ) ; Size = MAP_APPFONT ( 90, 10 ) ; Text [ en-US ] = "~Content"; @@ -902,6 +958,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_FIRSTKEY { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_FIRSTKEY"; Pos = MAP_APPFONT ( 60 , 138 ) ; Size = MAP_APPFONT ( 159, 50 ) ; Border = TRUE; @@ -919,6 +976,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTUP1 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP1"; Pos = MAP_APPFONT ( 222 , 138 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -932,6 +990,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTDOWN1 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN1"; Pos = MAP_APPFONT ( 237 , 138 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -944,6 +1003,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTUP2 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP2"; Pos = MAP_APPFONT ( 222 , 153 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -957,6 +1017,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTDOWN2 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN2"; Pos = MAP_APPFONT ( 237 , 153 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -969,6 +1030,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTUP3 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP3"; Pos = MAP_APPFONT ( 222 , 168 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -982,6 +1044,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTDOWN3 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN3"; Pos = MAP_APPFONT ( 237 ,168 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -1000,6 +1063,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_SECONDKEY { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_SECONDKEY"; Pos = MAP_APPFONT ( 60 , 153 ) ; Size = MAP_APPFONT ( 159, 50 ) ; Border = TRUE; @@ -1013,6 +1077,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_THIRDKEY { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_THIRDKEY"; Pos = MAP_APPFONT ( 60 , 168 ) ; Size = MAP_APPFONT ( 159, 50 ) ; Border = TRUE; @@ -1052,6 +1117,7 @@ TabPage TP_TOX_STYLES }; ListBox LB_LEVEL { + HelpID = "sw:ListBox:TP_TOX_STYLES:LB_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 25 ) ; Size = MAP_APPFONT ( 102 , 131 ) ; @@ -1067,6 +1133,7 @@ TabPage TP_TOX_STYLES }; ListBox LB_PARALAY { + HelpID = "sw:ListBox:TP_TOX_STYLES:LB_PARALAY"; Border = TRUE ; Pos = MAP_APPFONT ( 142 , 25 ) ; Size = MAP_APPFONT ( 101 , 131 ) ; @@ -1076,6 +1143,7 @@ TabPage TP_TOX_STYLES }; PushButton BT_STD { + HelpID = "sw:PushButton:TP_TOX_STYLES:BT_STD"; Pos = MAP_APPFONT ( 64 , 162 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -1083,6 +1151,7 @@ TabPage TP_TOX_STYLES }; ImageButton BT_ASSIGN { + HelpID = "sw:ImageButton:TP_TOX_STYLES:BT_ASSIGN"; Pos = MAP_APPFONT ( 118 , 28 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -1097,6 +1166,7 @@ TabPage TP_TOX_STYLES }; PushButton BT_EDIT_STYLE { + HelpID = "sw:PushButton:TP_TOX_STYLES:BT_EDIT_STYLE"; Pos = MAP_APPFONT ( 193 , 162 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -1136,6 +1206,7 @@ ModalDialog DLG_ADD_IDX_STYLES }; ImageButton PB_LEFT { + HelpID = "sw:ImageButton:DLG_ADD_IDX_STYLES:PB_LEFT"; Pos = MAP_APPFONT ( 12 , 182 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; TabStop = TRUE ; @@ -1150,6 +1221,7 @@ ModalDialog DLG_ADD_IDX_STYLES }; ImageButton PB_RIGHT { + HelpID = "sw:ImageButton:DLG_ADD_IDX_STYLES:PB_RIGHT"; Pos = MAP_APPFONT ( 65 , 182 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/index/idxmrk.src b/sw/source/ui/index/idxmrk.src index bafa022fe1..e0a1a4df9c 100644 --- a/sw/source/ui/index/idxmrk.src +++ b/sw/source/ui/index/idxmrk.src @@ -392,6 +392,7 @@ ModalDialog DLG_NEW_USER_IDX }; Edit ED_NAME { + HelpID = "sw:Edit:DLG_NEW_USER_IDX:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 55 , 15 ) ; Size = MAP_APPFONT ( 78 , 12 ) ; diff --git a/sw/source/ui/index/multmrk.src b/sw/source/ui/index/multmrk.src index 358dcba124..d5d11ed530 100644 --- a/sw/source/ui/index/multmrk.src +++ b/sw/source/ui/index/multmrk.src @@ -65,6 +65,7 @@ ModalDialog DLG_MULTMRK }; ListBox LB_TOX { + HelpID = "sw:ListBox:DLG_MULTMRK:LB_TOX"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 37 ) ; Size = MAP_APPFONT ( 100 , 49 ) ; diff --git a/sw/source/ui/misc/bookmark.src b/sw/source/ui/misc/bookmark.src index 3cbef13472..39529dd67c 100644 --- a/sw/source/ui/misc/bookmark.src +++ b/sw/source/ui/misc/bookmark.src @@ -54,6 +54,7 @@ ModalDialog DLG_INSERT_BOOKMARK }; ComboBox CB_BOOKMARK { + HelpID = "sw:ComboBox:DLG_INSERT_BOOKMARK:CB_BOOKMARK"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 99 , 76 ) ; TABSTOP = TRUE ; @@ -62,6 +63,7 @@ ModalDialog DLG_INSERT_BOOKMARK }; PushButton BT_DELETE { + HelpID = "sw:PushButton:DLG_INSERT_BOOKMARK:BT_DELETE"; Pos = MAP_APPFONT ( 123 , 40 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */ diff --git a/sw/source/ui/misc/docfnote.src b/sw/source/ui/misc/docfnote.src index bdb4d55eb2..bc983676d7 100644 --- a/sw/source/ui/misc/docfnote.src +++ b/sw/source/ui/misc/docfnote.src @@ -78,6 +78,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_NUMVIEW { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_NUMVIEW"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 14 ) ; Size = MAP_APPFONT ( 59 , 72 ) ; @@ -94,6 +95,7 @@ TabPage TP_FOOTNOTEOPTION }; NumericField FLD_OFFSET { + HelpID = "sw:NumericField:TP_FOOTNOTEOPTION:FLD_OFFSET"; Pos = MAP_APPFONT ( 189 , 14 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Spin = TRUE ; @@ -112,6 +114,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_NUMCOUNT { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_NUMCOUNT"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 29 ) ; Size = MAP_APPFONT ( 59 , 50 ) ; @@ -135,6 +138,7 @@ TabPage TP_FOOTNOTEOPTION }; Edit ED_PREFIX { + HelpID = "sw:Edit:TP_FOOTNOTEOPTION:ED_PREFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 44 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; @@ -151,6 +155,7 @@ TabPage TP_FOOTNOTEOPTION }; Edit ED_SUFFIX { + HelpID = "sw:Edit:TP_FOOTNOTEOPTION:ED_SUFFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 189 , 44 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; @@ -166,6 +171,7 @@ TabPage TP_FOOTNOTEOPTION }; RadioButton RB_POS_PAGE { + HelpID = "sw:RadioButton:TP_FOOTNOTEOPTION:RB_POS_PAGE"; Pos = MAP_APPFONT ( 65 , 62 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text [ en-US ] = "~End of page" ; @@ -174,6 +180,7 @@ TabPage TP_FOOTNOTEOPTION }; RadioButton RB_POS_CHAPTER { + HelpID = "sw:RadioButton:TP_FOOTNOTEOPTION:RB_POS_CHAPTER"; Pos = MAP_APPFONT ( 65 , 75 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text [ en-US ] = "En~d of document" ; @@ -193,6 +200,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_PARA_TEMPL { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_PARA_TEMPL"; Border = TRUE ; Pos = MAP_APPFONT ( 48 , 100 ) ; Size = MAP_APPFONT ( 58 , 80 ) ; @@ -210,6 +218,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_PAGE_TEMPL { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_PAGE_TEMPL"; Border = TRUE ; Pos = MAP_APPFONT ( 48 , 116) ; Size = MAP_APPFONT ( 58 , 80 ) ; @@ -232,6 +241,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_ANCHR_CHARFMT { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_ANCHR_CHARFMT"; Border = TRUE ; Pos = MAP_APPFONT ( 186 , 100 ) ; Size = MAP_APPFONT ( 65 , 72 ) ; @@ -248,6 +258,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_TEXT_CHARFMT { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_TEXT_CHARFMT"; Border = TRUE ; Pos = MAP_APPFONT ( 186 , 116 ) ; Size = MAP_APPFONT ( 65 , 72 ) ; @@ -270,6 +281,7 @@ TabPage TP_FOOTNOTEOPTION }; Edit ED_CONT { + HelpID = "sw:Edit:TP_FOOTNOTEOPTION:ED_CONT"; Border = TRUE ; Pos = MAP_APPFONT ( 88, 145 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; @@ -286,6 +298,7 @@ TabPage TP_FOOTNOTEOPTION }; Edit ED_CONT_FROM { + HelpID = "sw:Edit:TP_FOOTNOTEOPTION:ED_CONT_FROM"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 161 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; @@ -316,6 +329,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_NUMVIEW { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_NUMVIEW"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 14 ) ; Size = MAP_APPFONT ( 59 , 72 ) ; @@ -343,6 +357,7 @@ TabPage TP_ENDNOTEOPTION }; NumericField FLD_OFFSET { + HelpID = "sw:NumericField:TP_ENDNOTEOPTION:FLD_OFFSET"; Pos = MAP_APPFONT ( 189 , 14 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Spin = TRUE ; @@ -361,6 +376,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_NUMCOUNT { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_NUMCOUNT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 62 , 72 ) ; @@ -376,6 +392,7 @@ TabPage TP_ENDNOTEOPTION }; Edit ED_PREFIX { + HelpID = "sw:Edit:TP_ENDNOTEOPTION:ED_PREFIX"; Pos = MAP_APPFONT ( 65 , 30 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -392,6 +409,7 @@ TabPage TP_ENDNOTEOPTION }; Edit ED_SUFFIX { + HelpID = "sw:Edit:TP_ENDNOTEOPTION:ED_SUFFIX"; Pos = MAP_APPFONT ( 189 , 30 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -407,6 +425,7 @@ TabPage TP_ENDNOTEOPTION }; RadioButton RB_POS_PAGE { + HelpID = "sw:RadioButton:TP_ENDNOTEOPTION:RB_POS_PAGE"; Pos = MAP_APPFONT ( 12 , 104 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; Text [ en-US ] = "End ~of page" ; @@ -415,6 +434,7 @@ TabPage TP_ENDNOTEOPTION }; RadioButton RB_POS_CHAPTER { + HelpID = "sw:RadioButton:TP_ENDNOTEOPTION:RB_POS_CHAPTER"; Pos = MAP_APPFONT ( 12 , 118 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; Text [ en-US ] = "End of ~document" ; @@ -434,6 +454,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_PARA_TEMPL { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_PARA_TEMPL"; Border = TRUE ; Pos = MAP_APPFONT ( 51 , 56 ) ; Size = MAP_APPFONT ( 67 , 72 ) ; @@ -451,6 +472,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_PAGE_TEMPL { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_PAGE_TEMPL"; Border = TRUE ; Pos = MAP_APPFONT ( 51 , 72 ) ; Size = MAP_APPFONT ( 67 , 72 ) ; @@ -472,6 +494,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_ANCHR_CHARFMT { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_ANCHR_CHARFMT"; Border = TRUE ; Pos = MAP_APPFONT ( 186 , 56 ) ; Size = MAP_APPFONT ( 65 , 72 ) ; @@ -488,6 +511,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_TEXT_CHARFMT { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_TEXT_CHARFMT"; Border = TRUE ; Pos = MAP_APPFONT ( 186 , 72 ) ; Size = MAP_APPFONT ( 65 , 72 ) ; @@ -511,6 +535,7 @@ TabPage TP_ENDNOTEOPTION }; Edit ED_CONT { + HelpID = "sw:Edit:TP_ENDNOTEOPTION:ED_CONT"; Border = TRUE ; Pos = MAP_APPFONT ( 137 , 101 ) ; Size = MAP_APPFONT ( 114 , 12 ) ; @@ -527,6 +552,7 @@ TabPage TP_ENDNOTEOPTION }; Edit ED_CONT_FROM { + HelpID = "sw:Edit:TP_ENDNOTEOPTION:ED_CONT_FROM"; Border = TRUE ; Pos = MAP_APPFONT ( 137 , 116 ) ; Size = MAP_APPFONT ( 114 , 12 ) ; diff --git a/sw/source/ui/misc/glosbib.src b/sw/source/ui/misc/glosbib.src index 75a03eb85e..9bd9489977 100644 --- a/sw/source/ui/misc/glosbib.src +++ b/sw/source/ui/misc/glosbib.src @@ -38,6 +38,7 @@ ModalDialog DLG_BIB_BASE Text [ en-US ] = "Edit Categories" ; PushButton PB_NEW { + HelpID = "sw:PushButton:DLG_BIB_BASE:PB_NEW"; Disable = TRUE ; Pos = MAP_APPFONT ( 293 , 66 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -46,6 +47,7 @@ ModalDialog DLG_BIB_BASE }; PushButton PB_DELETE { + HelpID = "sw:PushButton:DLG_BIB_BASE:PB_DELETE"; Pos = MAP_APPFONT ( 293 , 83 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */ @@ -55,6 +57,7 @@ ModalDialog DLG_BIB_BASE }; PushButton PB_RENAME { + HelpID = "sw:PushButton:DLG_BIB_BASE:PB_RENAME"; Disable = TRUE ; Pos = MAP_APPFONT ( 293 , 100 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -88,6 +91,7 @@ ModalDialog DLG_BIB_BASE }; Edit ED_NAME { + HelpID = "sw:Edit:DLG_BIB_BASE:ED_NAME"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 159 , 12 ) ; TabStop = TRUE ; @@ -102,6 +106,7 @@ ModalDialog DLG_BIB_BASE }; ListBox LB_PATH { + HelpID = "sw:ListBox:DLG_BIB_BASE:LB_PATH"; Pos = MAP_APPFONT ( 174 , 14 ) ; Size = MAP_APPFONT ( 107 , 50 ) ; DropDown = TRUE ; diff --git a/sw/source/ui/misc/glossary.src b/sw/source/ui/misc/glossary.src index 3ff9050164..5ad32faa2f 100644 --- a/sw/source/ui/misc/glossary.src +++ b/sw/source/ui/misc/glossary.src @@ -40,6 +40,7 @@ ModalDialog DLG_GLOSSARY Moveable = TRUE ; CheckBox CB_INSERT_TIP { + HelpID = "sw:CheckBox:DLG_GLOSSARY:CB_INSERT_TIP"; Pos = MAP_APPFONT ( 12 , 12 ) ; Size = MAP_APPFONT ( 200 , 12 ) ; TabStop = TRUE ; @@ -54,6 +55,7 @@ ModalDialog DLG_GLOSSARY }; Edit ED_NAME { + HelpID = "sw:Edit:DLG_GLOSSARY:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 55 , 29 ) ; Size = MAP_APPFONT ( 85 , 12 ) ; @@ -70,6 +72,7 @@ ModalDialog DLG_GLOSSARY }; Edit ED_SHORTNAME { + HelpID = "sw:Edit:DLG_GLOSSARY:ED_SHORTNAME"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 203 , 29 ) ; @@ -98,6 +101,7 @@ ModalDialog DLG_GLOSSARY }; CheckBox CB_FILE_REL { + HelpID = "sw:CheckBox:DLG_GLOSSARY:CB_FILE_REL"; Pos = MAP_APPFONT ( 14 , 145 ) ; Size = MAP_APPFONT ( 90 , 12 ) ; TabStop = TRUE ; @@ -105,6 +109,7 @@ ModalDialog DLG_GLOSSARY }; CheckBox CB_NET_REL { + HelpID = "sw:CheckBox:DLG_GLOSSARY:CB_NET_REL"; Pos = MAP_APPFONT ( 109 , 145 ) ; Size = MAP_APPFONT ( 90 , 12 ) ; Text [ en-US ] = "Inte~rnet" ; @@ -122,6 +127,7 @@ ModalDialog DLG_GLOSSARY }; CheckBox CB_SHOW_EXAMPLE { + HelpID = "sw:CheckBox:DLG_GLOSSARY:CB_SHOW_EXAMPLE"; Pos = MAP_APPFONT ( 231 , 145 ) ; Size = MAP_APPFONT ( 82 , 12 ) ; Text [ en-US ] = "Sho~w preview"; @@ -151,6 +157,7 @@ ModalDialog DLG_GLOSSARY }; MenuButton PB_EDIT { + HelpID = "sw:MenuButton:DLG_GLOSSARY:PB_EDIT"; Pos = MAP_APPFONT ( 319 , 60 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "AutoTe~xt" ; @@ -158,6 +165,7 @@ ModalDialog DLG_GLOSSARY }; PushButton PB_BIB { + HelpID = "sw:PushButton:DLG_GLOSSARY:PB_BIB"; Pos = MAP_APPFONT ( 319 , 77 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "C~ategories..." ; @@ -165,6 +173,7 @@ ModalDialog DLG_GLOSSARY }; PushButton PB_PATH { + HelpID = "sw:PushButton:DLG_GLOSSARY:PB_PATH"; Pos = MAP_APPFONT ( 319 , 94 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -308,6 +317,7 @@ ModalDialog DLG_RENAME_GLOS }; Edit ED_ON { + HelpID = "sw:Edit:DLG_RENAME_GLOS:ED_ON"; ReadOnly = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 44 , 12 ) ; @@ -322,6 +332,7 @@ ModalDialog DLG_RENAME_GLOS }; Edit ED_OS { + HelpID = "sw:Edit:DLG_RENAME_GLOS:ED_OS"; ReadOnly = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 200 , 12 ) ; @@ -336,6 +347,7 @@ ModalDialog DLG_RENAME_GLOS }; Edit ED_NN { + HelpID = "sw:Edit:DLG_RENAME_GLOS:ED_NN"; TabStop = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 44 , 27 ) ; @@ -350,6 +362,7 @@ ModalDialog DLG_RENAME_GLOS }; Edit ED_NS { + HelpID = "sw:Edit:DLG_RENAME_GLOS:ED_NS"; TabStop = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 200 , 27 ) ; diff --git a/sw/source/ui/misc/insfnote.src b/sw/source/ui/misc/insfnote.src index fda4b92b0d..c462e01188 100644 --- a/sw/source/ui/misc/insfnote.src +++ b/sw/source/ui/misc/insfnote.src @@ -31,6 +31,7 @@ // #define DLG_INS_FOOTNOTE 257 ModalDialog DLG_INS_FOOTNOTE { + HelpID = "sw:ModalDialog:DLG_INS_FOOTNOTE"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 160 , 100 ) ; @@ -39,6 +40,7 @@ ModalDialog DLG_INS_FOOTNOTE Moveable = TRUE ; Edit ED_NUMBER_CHAR { + HelpID = "sw:Edit:DLG_INS_FOOTNOTE:ED_NUMBER_CHAR"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 69 , 27 ) ; @@ -71,6 +73,7 @@ ModalDialog DLG_INS_FOOTNOTE }; ImageButton BT_PREV { + HelpID = "sw:ImageButton:DLG_INS_FOOTNOTE:BT_PREV"; Pos = MAP_APPFONT ( 104 , 82 ) ; Size = MAP_APPFONT ( 24 , 14 ) ; TabStop = TRUE ; @@ -79,6 +82,7 @@ ModalDialog DLG_INS_FOOTNOTE }; ImageButton BT_NEXT { + HelpID = "sw:ImageButton:DLG_INS_FOOTNOTE:BT_NEXT"; Pos = MAP_APPFONT ( 130 , 82 ) ; Size = MAP_APPFONT ( 24 , 14 ) ; TabStop = TRUE ; @@ -87,6 +91,7 @@ ModalDialog DLG_INS_FOOTNOTE }; RadioButton RB_NUMBER_AUTO { + HelpID = "sw:RadioButton:DLG_INS_FOOTNOTE:RB_NUMBER_AUTO"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 79 , 10 ) ; Text [ en-US ] = "~Automatic" ; @@ -96,6 +101,7 @@ ModalDialog DLG_INS_FOOTNOTE }; RadioButton RB_NUMBER_CHAR { + HelpID = "sw:RadioButton:DLG_INS_FOOTNOTE:RB_NUMBER_CHAR"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 54 , 10 ) ; Text [ en-US ] = "~Character" ; @@ -108,12 +114,14 @@ ModalDialog DLG_INS_FOOTNOTE }; PushButton BT_NUMBER_CHAR { + HelpID = "sw:PushButton:DLG_INS_FOOTNOTE:BT_NUMBER_CHAR"; Pos = MAP_APPFONT ( 69 , 42 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; Text = "..." ; }; RadioButton RB_TYPE_FTN { + HelpID = "sw:RadioButton:DLG_INS_FOOTNOTE:RB_TYPE_FTN"; Pos = MAP_APPFONT ( 12 , 70 ) ; Size = MAP_APPFONT ( 79 , 10 ) ; TabStop = TRUE ; @@ -123,6 +131,7 @@ ModalDialog DLG_INS_FOOTNOTE }; RadioButton RB_TYPE_ENDNOTE { + HelpID = "sw:RadioButton:DLG_INS_FOOTNOTE:RB_TYPE_ENDNOTE"; Pos = MAP_APPFONT ( 12 , 83 ) ; Size = MAP_APPFONT ( 79 , 10 ) ; Text [ en-US ] = "~Endnote" ; diff --git a/sw/source/ui/misc/linenum.src b/sw/source/ui/misc/linenum.src index 61cee918d7..feb17ca5bb 100644 --- a/sw/source/ui/misc/linenum.src +++ b/sw/source/ui/misc/linenum.src @@ -47,6 +47,7 @@ TabPage TP_LINENUMBERING Size = MAP_APPFONT ( 260 , 185 ) ; CheckBox CB_NUMBERING_ON { + HelpID = "sw:CheckBox:TP_LINENUMBERING:CB_NUMBERING_ON"; Pos = MAP_APPFONT ( 12 , 6 ) ; Size = MAP_APPFONT ( 242 , 8 ) ; TabStop = TRUE ; @@ -60,6 +61,7 @@ TabPage TP_LINENUMBERING }; ListBox LB_CHAR_STYLE { + HelpID = "sw:ListBox:TP_LINENUMBERING:LB_CHAR_STYLE"; Pos = MAP_APPFONT ( 100 , 30 ) ; Size = MAP_APPFONT ( 148 , 80 ) ; TabStop = TRUE ; @@ -74,6 +76,7 @@ TabPage TP_LINENUMBERING }; ListBox LB_FORMAT { + HelpID = "sw:ListBox:TP_LINENUMBERING:LB_FORMAT"; Pos = MAP_APPFONT ( 100 , 44 ) ; Size = MAP_APPFONT ( 148 , 80 ) ; TabStop = TRUE ; @@ -87,6 +90,7 @@ TabPage TP_LINENUMBERING }; ListBox LB_POS { + HelpID = "sw:ListBox:TP_LINENUMBERING:LB_POS"; Pos = MAP_APPFONT ( 100 , 60 ) ; Size = MAP_APPFONT ( 148 , 60 ) ; TabStop = TRUE ; @@ -107,6 +111,7 @@ TabPage TP_LINENUMBERING }; MetricField MF_OFFSET { + HelpID = "sw:MetricField:TP_LINENUMBERING:MF_OFFSET"; Pos = MAP_APPFONT ( 100 , 76 ) ; Size = MAP_APPFONT ( 45 , 12 ) ; Border = TRUE ; @@ -130,6 +135,7 @@ TabPage TP_LINENUMBERING }; NumericField NF_NUM_INVERVAL { + HelpID = "sw:NumericField:TP_LINENUMBERING:NF_NUM_INVERVAL"; Pos = MAP_APPFONT ( 100 , 92 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Border = TRUE ; @@ -163,6 +169,7 @@ TabPage TP_LINENUMBERING }; Edit ED_DIVISOR { + HelpID = "sw:Edit:TP_LINENUMBERING:ED_DIVISOR"; Pos = MAP_APPFONT ( 45 , 121 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; Left = TRUE ; @@ -177,6 +184,7 @@ TabPage TP_LINENUMBERING }; NumericField NF_DIV_INTERVAL { + HelpID = "sw:NumericField:TP_LINENUMBERING:NF_DIV_INTERVAL"; Pos = MAP_APPFONT ( 45 , 137 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Border = TRUE ; @@ -205,6 +213,7 @@ TabPage TP_LINENUMBERING }; CheckBox CB_COUNT_EMPTYLINES { + HelpID = "sw:CheckBox:TP_LINENUMBERING:CB_COUNT_EMPTYLINES"; Pos = MAP_APPFONT ( 139 , 121 ) ; Size = MAP_APPFONT ( 110 , 10 ) ; TabStop = TRUE ; @@ -212,6 +221,7 @@ TabPage TP_LINENUMBERING }; CheckBox CB_COUNT_FRAMELINES { + HelpID = "sw:CheckBox:TP_LINENUMBERING:CB_COUNT_FRAMELINES"; Pos = MAP_APPFONT ( 139 , 135 ) ; Size = MAP_APPFONT ( 110 , 10 ) ; TabStop = TRUE ; @@ -219,6 +229,7 @@ TabPage TP_LINENUMBERING }; CheckBox CB_RESTART_PAGE { + HelpID = "sw:CheckBox:TP_LINENUMBERING:CB_RESTART_PAGE"; Pos = MAP_APPFONT ( 139 , 149 ); Size = MAP_APPFONT ( 110 , 10 ); TabStop = TRUE; diff --git a/sw/source/ui/misc/num.src b/sw/source/ui/misc/num.src index 0fbc45eb1c..9bf1cf54f9 100644 --- a/sw/source/ui/misc/num.src +++ b/sw/source/ui/misc/num.src @@ -53,6 +53,7 @@ TabPage TP_NUM_POSITION }; MultiListBox LB_LEVEL { + HelpID = "sw:MultiListBox:TP_NUM_POSITION:LB_LEVEL"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 26 , 163 ) ; TabStop = TRUE ; @@ -75,6 +76,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_BORDERDIST { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_BORDERDIST"; Pos = MAP_APPFONT ( 198 , 25 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -93,6 +95,7 @@ TabPage TP_NUM_POSITION }; CheckBox CB_RELATIVE { + HelpID = "sw:CheckBox:TP_NUM_POSITION:CB_RELATIVE"; Pos = MAP_APPFONT ( 198 , 41 ) ; Size = MAP_APPFONT ( 52 , 10 ) ; Text [ en-US ] = "Relati~ve" ; @@ -105,6 +108,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_INDENT { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_INDENT"; Pos = MAP_APPFONT ( 198 , 57 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -129,6 +133,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_NUMDIST { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_NUMDIST"; Pos = MAP_APPFONT ( 198 , 73 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Left = TRUE ; @@ -153,6 +158,7 @@ TabPage TP_NUM_POSITION }; ListBox LB_ALIGN { + HelpID = "sw:ListBox:TP_NUM_POSITION:LB_ALIGN"; Pos = MAP_APPFONT ( 198 , 89 ) ; Size = MAP_APPFONT ( 40 , 40 ) ; TabStop = TRUE ; @@ -172,6 +178,7 @@ TabPage TP_NUM_POSITION }; ListBox LB_LABEL_FOLLOWED_BY { + HelpID = "sw:ListBox:TP_NUM_POSITION:LB_LABEL_FOLLOWED_BY"; Pos = MAP_APPFONT ( 198 , 25 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; TabStop = TRUE ; @@ -192,6 +199,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_LISTTAB { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_LISTTAB"; Pos = MAP_APPFONT ( 198 , 41 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -215,6 +223,7 @@ TabPage TP_NUM_POSITION }; ListBox LB_ALIGN_2 { + HelpID = "sw:ListBox:TP_NUM_POSITION:LB_ALIGN_2"; Pos = MAP_APPFONT ( 198 , 57 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; TabStop = TRUE ; @@ -228,6 +237,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_ALIGNED_AT { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_ALIGNED_AT"; Pos = MAP_APPFONT ( 198 , 73 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Left = TRUE ; @@ -252,6 +262,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_INDENT_AT { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_INDENT_AT"; Pos = MAP_APPFONT ( 198 , 89 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Left = TRUE ; @@ -270,6 +281,7 @@ TabPage TP_NUM_POSITION }; PushButton PB_STANDARD { + HelpID = "sw:PushButton:TP_NUM_POSITION:PB_STANDARD"; Pos = MAP_APPFONT ( 198 , 165 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "Default" ; diff --git a/sw/source/ui/misc/outline.src b/sw/source/ui/misc/outline.src index 64dd97494a..f54025127d 100644 --- a/sw/source/ui/misc/outline.src +++ b/sw/source/ui/misc/outline.src @@ -65,6 +65,7 @@ ModalDialog DLG_NUM_NAMES }; ListBox LB_FORM { + HelpID = "sw:ListBox:DLG_NUM_NAMES:LB_FORM"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 29 ) ; Size = MAP_APPFONT ( 84 , 42 ) ; @@ -85,6 +86,7 @@ ModalDialog DLG_NUM_NAMES }; Edit ED_FORM { + HelpID = "sw:Edit:DLG_NUM_NAMES:ED_FORM"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -211,6 +213,7 @@ TabPage TP_OUTLINE_NUM Hide = TRUE; ListBox LB_LEVEL { + HelpID = "sw:ListBox:TP_OUTLINE_NUM:LB_LEVEL"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 23 , 129 ) ; TabStop = TRUE ; @@ -233,6 +236,7 @@ TabPage TP_OUTLINE_NUM }; ListBox LB_COLL { + HelpID = "sw:ListBox:TP_OUTLINE_NUM:LB_COLL"; Border = TRUE ; Pos = MAP_APPFONT ( 50 , 25 ) ; Size = MAP_APPFONT ( 120 , 75 ) ; @@ -251,6 +255,7 @@ TabPage TP_OUTLINE_NUM }; ListBox LB_NUMBER { + HelpID = "sw:ListBox:TP_OUTLINE_NUM:LB_NUMBER"; Pos = MAP_APPFONT ( 104 , 41 ) ; Size = MAP_APPFONT ( 66 , 65 ) ; TabStop = TRUE ; @@ -266,6 +271,7 @@ TabPage TP_OUTLINE_NUM }; ListBox LB_CHARFMT { + HelpID = "sw:ListBox:TP_OUTLINE_NUM:LB_CHARFMT"; TabStop = TRUE ; DropDown = TRUE ; Pos = MAP_APPFONT ( 104 , 57 ) ; @@ -279,6 +285,7 @@ TabPage TP_OUTLINE_NUM }; NumericField NF_ALL_LEVEL { + HelpID = "sw:NumericField:TP_OUTLINE_NUM:NF_ALL_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 104 , 73 ) ; Size = MAP_APPFONT ( 66 , 12 ) ; @@ -308,6 +315,7 @@ TabPage TP_OUTLINE_NUM }; Edit ED_PREFIX { + HelpID = "sw:Edit:TP_OUTLINE_NUM:ED_PREFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 104 , 100 ) ; Size = MAP_APPFONT ( 66 , 12 ) ; @@ -324,6 +332,7 @@ TabPage TP_OUTLINE_NUM }; Edit ED_SUFFIX { + HelpID = "sw:Edit:TP_OUTLINE_NUM:ED_SUFFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 104 , 115 ) ; Size = MAP_APPFONT ( 66 , 12 ) ; @@ -340,6 +349,7 @@ TabPage TP_OUTLINE_NUM }; NumericField ED_START { + HelpID = "sw:NumericField:TP_OUTLINE_NUM:ED_START"; Border = TRUE ; Pos = MAP_APPFONT ( 104 , 131 ) ; Size = MAP_APPFONT ( 66 , 12 ) ; diff --git a/sw/source/ui/misc/pgfnote.src b/sw/source/ui/misc/pgfnote.src index 18acc28267..eebc13ca5d 100644 --- a/sw/source/ui/misc/pgfnote.src +++ b/sw/source/ui/misc/pgfnote.src @@ -35,6 +35,7 @@ TabPage TP_FOOTNOTE_PAGE Hide = TRUE; RadioButton RB_MAXHEIGHT_PAGE { + HelpID = "sw:RadioButton:TP_FOOTNOTE_PAGE:RB_MAXHEIGHT_PAGE"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 132 , 10 ) ; Text [ en-US ] = "~Not larger than page area" ; @@ -43,12 +44,14 @@ TabPage TP_FOOTNOTE_PAGE }; RadioButton RB_MAXHEIGHT { + HelpID = "sw:RadioButton:TP_FOOTNOTE_PAGE:RB_MAXHEIGHT"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 132 , 10 ) ; Text [ en-US ] = "Maximum footnote ~height" ; }; MetricField ED_MAXHEIGHT { + HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_MAXHEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 148 , 26 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; @@ -75,6 +78,7 @@ TabPage TP_FOOTNOTE_PAGE }; MetricField ED_DIST { + HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_DIST"; Border = TRUE ; Pos = MAP_APPFONT ( 148 , 42 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; @@ -105,6 +109,7 @@ TabPage TP_FOOTNOTE_PAGE }; ListBox DLB_LINEPOS { + HelpID = "sw:ListBox:TP_FOOTNOTE_PAGE:DLB_LINEPOS"; Pos = MAP_APPFONT ( 148 , 71 ) ; Size = MAP_APPFONT ( 57 , 40 ) ; TabStop = TRUE ; @@ -128,6 +133,7 @@ TabPage TP_FOOTNOTE_PAGE }; ListBox DLB_LINETYPE { + HelpID = "sw:ListBox:TP_FOOTNOTE_PAGE:DLB_LINETYPE"; Pos = MAP_APPFONT ( 148 , 87 ) ; Size = MAP_APPFONT ( 57 , 50 ) ; TabStop = TRUE ; @@ -145,6 +151,7 @@ TabPage TP_FOOTNOTE_PAGE }; MetricField ED_LINEWIDTH { + HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_LINEWIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 148 , 103 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; @@ -168,6 +175,7 @@ TabPage TP_FOOTNOTE_PAGE }; MetricField ED_LINEDIST { + HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_LINEDIST"; Border = TRUE ; Pos = MAP_APPFONT ( 148 , 119 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; diff --git a/sw/source/ui/misc/pggrid.src b/sw/source/ui/misc/pggrid.src index 76bd70201d..a39ca828f9 100644 --- a/sw/source/ui/misc/pggrid.src +++ b/sw/source/ui/misc/pggrid.src @@ -41,24 +41,28 @@ TabPage TP_TEXTGRID_PAGE }; RadioButton RB_NOGRID { + HelpID = "sw:RadioButton:TP_TEXTGRID_PAGE:RB_NOGRID"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 158 , 10 ) ; Text [ en-US ] = "No grid" ; }; RadioButton RB_LINESGRID { + HelpID = "sw:RadioButton:TP_TEXTGRID_PAGE:RB_LINESGRID"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 158 , 10 ) ; Text [ en-US ] = "Grid (lines only)" ; }; RadioButton RB_CHARSGRID { + HelpID = "sw:RadioButton:TP_TEXTGRID_PAGE:RB_CHARSGRID"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 158 , 10 ) ; Text [ en-US ] = "Grid (lines and characters)" ; }; CheckBox CB_SNAPTOCHARS { + HelpID = "sw:CheckBox:TP_TEXTGRID_PAGE:CB_SNAPTOCHARS"; Pos = MAP_APPFONT ( 14 , 53 ) ; Size = MAP_APPFONT ( 158 , 10 ) ; Text [ en-US ] = "~Snap to characters" ; @@ -83,6 +87,7 @@ TabPage TP_TEXTGRID_PAGE }; NumericField NF_LINESPERPAGE { + HelpID = "sw:NumericField:TP_TEXTGRID_PAGE:NF_LINESPERPAGE"; Pos = MAP_APPFONT ( 74 , 80 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; Border = TRUE ; @@ -105,6 +110,7 @@ TabPage TP_TEXTGRID_PAGE }; MetricField MF_TEXTSIZE { + HelpID = "sw:MetricField:TP_TEXTGRID_PAGE:MF_TEXTSIZE"; Pos = MAP_APPFONT ( 216 , 80 ) ; Size = MAP_APPFONT ( 35 , 12 ) ; Border = TRUE ; @@ -128,6 +134,7 @@ TabPage TP_TEXTGRID_PAGE }; NumericField NF_CHARSPERLINE { + HelpID = "sw:NumericField:TP_TEXTGRID_PAGE:NF_CHARSPERLINE"; Pos = MAP_APPFONT ( 74 , 96 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; Border = TRUE ; @@ -151,6 +158,7 @@ TabPage TP_TEXTGRID_PAGE }; MetricField MF_CHARWIDTH { + HelpID = "sw:MetricField:TP_TEXTGRID_PAGE:MF_CHARWIDTH"; Pos = MAP_APPFONT ( 216 , 96 ) ; Size = MAP_APPFONT ( 35 , 12 ) ; Border = TRUE ; @@ -174,6 +182,7 @@ TabPage TP_TEXTGRID_PAGE }; MetricField MF_RUBYSIZE { + HelpID = "sw:MetricField:TP_TEXTGRID_PAGE:MF_RUBYSIZE"; Pos = MAP_APPFONT ( 216 , 96 ) ; Size = MAP_APPFONT ( 35 , 12 ) ; Border = TRUE ; @@ -191,6 +200,7 @@ TabPage TP_TEXTGRID_PAGE }; CheckBox CB_RUBYBELOW { + HelpID = "sw:CheckBox:TP_TEXTGRID_PAGE:CB_RUBYBELOW"; Pos = MAP_APPFONT ( 14 , 112 ) ; Size = MAP_APPFONT ( 237 , 10 ) ; Text [ en-US ] = "Ruby text below/left from base text" ; @@ -203,12 +213,14 @@ TabPage TP_TEXTGRID_PAGE }; CheckBox CB_DISPLAY { + HelpID = "sw:CheckBox:TP_TEXTGRID_PAGE:CB_DISPLAY"; Pos = MAP_APPFONT ( 12 , 139 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Display grid" ; }; CheckBox CB_PRINT { + HelpID = "sw:CheckBox:TP_TEXTGRID_PAGE:CB_PRINT"; Pos = MAP_APPFONT ( 18 , 154 ) ; Size = MAP_APPFONT ( 112 , 10 ) ; Text [ en-US ] = "Print grid" ; @@ -221,6 +233,7 @@ TabPage TP_TEXTGRID_PAGE }; ListBox LB_COLOR { + HelpID = "sw:ListBox:TP_TEXTGRID_PAGE:LB_COLOR"; Pos = MAP_APPFONT ( 191 , 137 ) ; Size = MAP_APPFONT ( 60 , 50 ) ; TabStop = TRUE; diff --git a/sw/source/ui/misc/srtdlg.src b/sw/source/ui/misc/srtdlg.src index 6e6b3c5d34..ddacdac459 100644 --- a/sw/source/ui/misc/srtdlg.src +++ b/sw/source/ui/misc/srtdlg.src @@ -80,6 +80,7 @@ ModalDialog DLG_SORTING }; CheckBox CB_KEY1 { + HelpID = "sw:CheckBox:DLG_SORTING:CB_KEY1"; Pos = MAP_APPFONT ( 12 , 25 ) ; Size = MAP_APPFONT ( 49 , 8 ) ; /* ### ACHTUNG: Neuer Text in Resource? Schlüssel ~1 : Schl³ssel ~1 */ @@ -88,6 +89,7 @@ ModalDialog DLG_SORTING }; NumericField ED_KEY1 { + HelpID = "sw:NumericField:DLG_SORTING:ED_KEY1"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 23 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; @@ -109,6 +111,7 @@ ModalDialog DLG_SORTING }; ListBox DLB_KEY1 { + HelpID = "sw:ListBox:DLG_SORTING:DLB_KEY1"; Pos = MAP_APPFONT ( 96 , 23 ) ; Size = MAP_APPFONT ( 55 , 45 ) ; TabStop = TRUE ; @@ -118,6 +121,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_UP { + HelpID = "sw:RadioButton:DLG_SORTING:RB_UP"; Pos = MAP_APPFONT ( 155 , 23 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "~Ascending" ; @@ -126,6 +130,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_DN { + HelpID = "sw:RadioButton:DLG_SORTING:RB_DN"; Pos = MAP_APPFONT ( 155 , 35 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "~Descending" ; @@ -133,6 +138,7 @@ ModalDialog DLG_SORTING }; CheckBox CB_KEY2 { + HelpID = "sw:CheckBox:DLG_SORTING:CB_KEY2"; Pos = MAP_APPFONT ( 12 , 52 ) ; Size = MAP_APPFONT ( 49 , 8 ) ; /* ### ACHTUNG: Neuer Text in Resource? Schlüssel ~2 : Schl³ssel ~2 */ @@ -140,6 +146,7 @@ ModalDialog DLG_SORTING }; NumericField ED_KEY2 { + HelpID = "sw:NumericField:DLG_SORTING:ED_KEY2"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 50 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; @@ -156,6 +163,7 @@ ModalDialog DLG_SORTING }; ListBox DLB_KEY2 { + HelpID = "sw:ListBox:DLG_SORTING:DLB_KEY2"; Pos = MAP_APPFONT ( 96 , 50 ) ; Size = MAP_APPFONT ( 55 , 45 ) ; TabStop = TRUE ; @@ -165,6 +173,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_UP2 { + HelpID = "sw:RadioButton:DLG_SORTING:RB_UP2"; Pos = MAP_APPFONT ( 155 , 50 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "Ascending" ; @@ -173,6 +182,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_DN2 { + HelpID = "sw:RadioButton:DLG_SORTING:RB_DN2"; Pos = MAP_APPFONT ( 155 , 62 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "Descending" ; @@ -180,6 +190,7 @@ ModalDialog DLG_SORTING }; CheckBox CB_KEY3 { + HelpID = "sw:CheckBox:DLG_SORTING:CB_KEY3"; Pos = MAP_APPFONT ( 12 , 81 ) ; Size = MAP_APPFONT ( 49 , 8 ) ; /* ### ACHTUNG: Neuer Text in Resource? Schlüssel ~3 : Schl³ssel ~3 */ @@ -187,6 +198,7 @@ ModalDialog DLG_SORTING }; NumericField ED_KEY3 { + HelpID = "sw:NumericField:DLG_SORTING:ED_KEY3"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 79 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; @@ -203,6 +215,7 @@ ModalDialog DLG_SORTING }; ListBox DLB_KEY3 { + HelpID = "sw:ListBox:DLG_SORTING:DLB_KEY3"; Pos = MAP_APPFONT ( 96 , 79 ) ; Size = MAP_APPFONT ( 55 , 45 ) ; TabStop = TRUE ; @@ -212,6 +225,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_UP3 { + HelpID = "sw:RadioButton:DLG_SORTING:RB_UP3"; Pos = MAP_APPFONT ( 155 , 79 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "Ascending" ; @@ -220,6 +234,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_DN3 { + HelpID = "sw:RadioButton:DLG_SORTING:RB_DN3"; Pos = MAP_APPFONT ( 155 , 91 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "Descending" ; @@ -233,6 +248,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_COL { + HelpID = "sw:RadioButton:DLG_SORTING:RB_COL"; Pos = MAP_APPFONT ( 12 , 120 ) ; Size = MAP_APPFONT ( 38 , 10 ) ; Text [ en-US ] = "Col~umns" ; @@ -240,6 +256,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_ROW { + HelpID = "sw:RadioButton:DLG_SORTING:RB_ROW"; Pos = MAP_APPFONT ( 12 , 133 ) ; Size = MAP_APPFONT ( 34 , 10 ) ; Text [ en-US ] = "~Rows" ; @@ -254,6 +271,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_TAB { + HelpID = "sw:RadioButton:DLG_SORTING:RB_TAB"; Pos = MAP_APPFONT ( 113 , 120 ) ; Size = MAP_APPFONT ( 44 , 9 ) ; Text [ en-US ] = "~Tabs" ; @@ -262,6 +280,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_TABCH { + HelpID = "sw:RadioButton:DLG_SORTING:RB_TABCH"; Pos = MAP_APPFONT ( 113 , 133 ) ; Size = MAP_APPFONT ( 38 , 10 ) ; Text [ en-US ] = "~Character" ; @@ -269,6 +288,7 @@ ModalDialog DLG_SORTING }; Edit ED_TABCH { + HelpID = "sw:Edit:DLG_SORTING:ED_TABCH"; Border = TRUE ; Pos = MAP_APPFONT ( 180 , 133 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; @@ -291,6 +311,7 @@ ModalDialog DLG_SORTING }; PushButton PB_DELIM { + HelpID = "sw:PushButton:DLG_SORTING:PB_DELIM"; Pos = MAP_APPFONT ( 195 , 133 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; TabStop = TRUE ; @@ -304,6 +325,7 @@ ModalDialog DLG_SORTING }; ListBox LB_LANG { + HelpID = "sw:ListBox:DLG_SORTING:LB_LANG"; Pos = MAP_APPFONT ( 12 , 158 ) ; Size = MAP_APPFONT ( 83 , 61 ) ; TabStop = TRUE ; @@ -318,6 +340,7 @@ ModalDialog DLG_SORTING }; CheckBox CB_CASE { + HelpID = "sw:CheckBox:DLG_SORTING:CB_CASE"; Pos = MAP_APPFONT ( 113 , 159 ) ; Size = MAP_APPFONT ( 147 , 10 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/table/chartins.src b/sw/source/ui/table/chartins.src index 6c30097791..92e20c682b 100644 --- a/sw/source/ui/table/chartins.src +++ b/sw/source/ui/table/chartins.src @@ -50,12 +50,14 @@ ModelessDialog DLG_INSERT_CHART }; Edit ED_RANGE { + HelpID = "sw:Edit:DLG_INSERT_CHART:ED_RANGE"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 14 ) ; Size = MAP_APPFONT ( 229 , 12 ) ; }; CheckBox CB_FIRST_ROW { + HelpID = "sw:CheckBox:DLG_INSERT_CHART:CB_FIRST_ROW"; Pos = MAP_APPFONT ( 12 , 32 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; TabStop = TRUE ; @@ -64,6 +66,7 @@ ModelessDialog DLG_INSERT_CHART }; CheckBox CB_FIRST_COL { + HelpID = "sw:CheckBox:DLG_INSERT_CHART:CB_FIRST_COL"; Pos = MAP_APPFONT ( 12 , 46 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; TabStop = TRUE ; @@ -96,6 +99,7 @@ ModelessDialog DLG_INSERT_CHART }; PushButton BT_PREV { + HelpID = "sw:PushButton:DLG_INSERT_CHART:BT_PREV"; Pos = MAP_APPFONT ( 130 , 151 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; // ### ACHTUNG: Neuer Text in Resource? << ~Zurück : << Zurück @@ -106,6 +110,7 @@ ModelessDialog DLG_INSERT_CHART }; PushButton BT_NEXT { + HelpID = "sw:PushButton:DLG_INSERT_CHART:BT_NEXT"; Pos = MAP_APPFONT ( 185 , 151 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Disable = TRUE ; @@ -114,6 +119,7 @@ ModelessDialog DLG_INSERT_CHART }; PushButton BT_FINISH { + HelpID = "sw:PushButton:DLG_INSERT_CHART:BT_FINISH"; Pos = MAP_APPFONT ( 240 , 151 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/table/colwd.src b/sw/source/ui/table/colwd.src index 7c3dd9c547..1df5fe2cfc 100644 --- a/sw/source/ui/table/colwd.src +++ b/sw/source/ui/table/colwd.src @@ -66,6 +66,7 @@ ModalDialog DLG_COL_WIDTH }; MetricField ED_WIDTH { + HelpID = "sw:MetricField:DLG_COL_WIDTH:ED_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 51 , 30 ) ; Size = MAP_APPFONT ( 38 , 12 ) ; @@ -97,6 +98,7 @@ ModalDialog DLG_COL_WIDTH }; NumericField ED_COL { + HelpID = "sw:NumericField:DLG_COL_WIDTH:ED_COL"; Border = TRUE ; Pos = MAP_APPFONT ( 51 , 14 ) ; Size = MAP_APPFONT ( 38 , 12 ) ; diff --git a/sw/source/ui/table/convert.src b/sw/source/ui/table/convert.src index 317a9d43ac..13e9b9e860 100644 --- a/sw/source/ui/table/convert.src +++ b/sw/source/ui/table/convert.src @@ -39,6 +39,7 @@ ModalDialog DLG_CONV_TEXT_TABLE SVLOOK = TRUE ; RadioButton CB_TAB { + HelpID = "sw:RadioButton:DLG_CONV_TEXT_TABLE:CB_TAB"; Pos = MAP_APPFONT ( 12 , 17 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; Text [ en-US ] = "~Tabs" ; @@ -48,6 +49,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; RadioButton CB_SEMI { + HelpID = "sw:RadioButton:DLG_CONV_TEXT_TABLE:CB_SEMI"; Pos = MAP_APPFONT ( 75 , 17 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; Text [ en-US ] = "~Semicolons" ; @@ -55,6 +57,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; RadioButton CB_PARA { + HelpID = "sw:RadioButton:DLG_CONV_TEXT_TABLE:CB_PARA"; Pos = MAP_APPFONT ( 12 , 33 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; Text [ en-US ] = "~Paragraph" ; @@ -62,12 +65,14 @@ ModalDialog DLG_CONV_TEXT_TABLE }; RadioButton RB_OTHER { + HelpID = "sw:RadioButton:DLG_CONV_TEXT_TABLE:RB_OTHER"; Pos = MAP_APPFONT ( 75 , 33 ) ; Size = MAP_APPFONT ( 45 , 10 ) ; Text [ en-US ] = "~Other: " ; }; Edit ED_OTHER { + HelpID = "sw:Edit:DLG_CONV_TEXT_TABLE:ED_OTHER"; Border = TRUE ; Left = TRUE ; Pos = MAP_APPFONT ( 123 , 32 ) ; @@ -77,6 +82,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; CheckBox CB_KEEPCOLUMN { + HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_KEEPCOLUMN"; Pos = MAP_APPFONT ( 12 , 49 ) ; Size = MAP_APPFONT ( 128 , 10 ) ; Check = TRUE; @@ -92,6 +98,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; CheckBox CB_HEADER { + HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_HEADER"; Pos = MAP_APPFONT ( 12 , 84 ) ; Size = MAP_APPFONT ( 123 , 10 ) ; TabStop = TRUE ; @@ -99,6 +106,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; CheckBox CB_REPEAT_HEADER { + HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_REPEAT_HEADER"; Pos = MAP_APPFONT ( 22 , 97 ) ; Size = MAP_APPFONT ( 113 , 10 ) ; Text [ en-US ] = "Repeat heading"; @@ -112,6 +120,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; NumericField NF_REPEAT_HEADER { + HelpID = "sw:NumericField:DLG_CONV_TEXT_TABLE:NF_REPEAT_HEADER"; Border = TRUE ; Pos = MAP_APPFONT ( 191 , 112 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -130,6 +139,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; CheckBox CB_DONT_SPLIT { + HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_DONT_SPLIT"; Pos = MAP_APPFONT ( 12 , 126 ) ; Size = MAP_APPFONT ( 123 , 10 ) ; TabStop = TRUE ; @@ -137,6 +147,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; CheckBox CB_BORDER { + HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_BORDER"; Pos = MAP_APPFONT ( 12 , 139 ) ; Size = MAP_APPFONT ( 123 , 10 ) ; TabStop = TRUE ; @@ -173,6 +184,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; PushButton BT_AUTOFORMAT { + HelpID = "sw:PushButton:DLG_CONV_TEXT_TABLE:BT_AUTOFORMAT"; Pos = MAP_APPFONT ( 12 , 152 ) ; Size = MAP_APPFONT ( 86 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/table/instable.src b/sw/source/ui/table/instable.src index ef3a5ceb50..e5a636d3b8 100644 --- a/sw/source/ui/table/instable.src +++ b/sw/source/ui/table/instable.src @@ -40,6 +40,7 @@ ModalDialog DLG_INSERT_TABLE Moveable = TRUE ; Edit ED_NAME { + HelpID = "sw:Edit:DLG_INSERT_TABLE:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 53 , 6 ) ; Size = MAP_APPFONT ( 158, 12 ) ; @@ -60,6 +61,7 @@ ModalDialog DLG_INSERT_TABLE }; NumericField ED_COL { + HelpID = "sw:NumericField:DLG_INSERT_TABLE:ED_COL"; Border = TRUE ; Pos = MAP_APPFONT ( 53 , 32 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -82,6 +84,7 @@ ModalDialog DLG_INSERT_TABLE }; NumericField ED_ROW { + HelpID = "sw:NumericField:DLG_INSERT_TABLE:ED_ROW"; Border = TRUE ; Pos = MAP_APPFONT ( 53 , 48 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -103,6 +106,7 @@ ModalDialog DLG_INSERT_TABLE }; CheckBox CB_HEADER { + HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_HEADER"; Pos = MAP_APPFONT ( 12 , 74 ) ; Size = MAP_APPFONT (113 , 10 ) ; TabStop = TRUE ; @@ -110,6 +114,7 @@ ModalDialog DLG_INSERT_TABLE }; CheckBox CB_REPEAT_HEADER { + HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_REPEAT_HEADER"; Pos = MAP_APPFONT ( 21 , 88 ) ; Size = MAP_APPFONT ( 104 , 10 ) ; TabStop = TRUE ; @@ -123,6 +128,7 @@ ModalDialog DLG_INSERT_TABLE }; NumericField NF_REPEAT_HEADER { + HelpID = "sw:NumericField:DLG_INSERT_TABLE:NF_REPEAT_HEADER"; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 104 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -141,6 +147,7 @@ ModalDialog DLG_INSERT_TABLE }; CheckBox CB_DONT_SPLIT { + HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_DONT_SPLIT"; Pos = MAP_APPFONT ( 12 , 118 ) ; Size = MAP_APPFONT ( 113 , 10 ) ; Text [ en-US ] = "Don't split table"; @@ -148,6 +155,7 @@ ModalDialog DLG_INSERT_TABLE }; CheckBox CB_BORDER { + HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_BORDER"; Pos = MAP_APPFONT ( 12 , 132 ) ; Size = MAP_APPFONT ( 113 , 10 ) ; TabStop = TRUE ; @@ -155,6 +163,7 @@ ModalDialog DLG_INSERT_TABLE }; PushButton BT_AUTOFORMAT { + HelpID = "sw:PushButton:DLG_INSERT_TABLE:BT_AUTOFORMAT"; Pos = MAP_APPFONT ( 12 , 146 ) ; Size = MAP_APPFONT ( 86 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/table/mergetbl.src b/sw/source/ui/table/mergetbl.src index dac3e66d1b..de6fa33159 100644 --- a/sw/source/ui/table/mergetbl.src +++ b/sw/source/ui/table/mergetbl.src @@ -63,6 +63,7 @@ ModalDialog DLG_MERGE_TABLE }; RadioButton RB_MERGE_PREV { + HelpID = "sw:RadioButton:DLG_MERGE_TABLE:RB_MERGE_PREV"; Pos = MAP_APPFONT ( 12 , 15 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Check = TRUE ; @@ -71,6 +72,7 @@ ModalDialog DLG_MERGE_TABLE }; RadioButton RB_MERGE_NEXT { + HelpID = "sw:RadioButton:DLG_MERGE_TABLE:RB_MERGE_NEXT"; Pos = MAP_APPFONT ( 12 , 30 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Text [ en-US ] = "Join with ~next table"; diff --git a/sw/source/ui/table/rowht.src b/sw/source/ui/table/rowht.src index 23194a76a7..6d537f415a 100644 --- a/sw/source/ui/table/rowht.src +++ b/sw/source/ui/table/rowht.src @@ -59,6 +59,7 @@ ModalDialog DLG_ROW_HEIGHT }; MetricField ED_HEIGHT { + HelpID = "sw:MetricField:DLG_ROW_HEIGHT:ED_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 16 ) ; Size = MAP_APPFONT ( 38 , 12 ) ; @@ -76,6 +77,7 @@ ModalDialog DLG_ROW_HEIGHT }; CheckBox CB_AUTOHEIGHT { + HelpID = "sw:CheckBox:DLG_ROW_HEIGHT:CB_AUTOHEIGHT"; Pos = MAP_APPFONT ( 12 , 34 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; /* ### ACHTUNG: Neuer Text in Resource? ~dynamisch anpassen : auto. H~öhe */ diff --git a/sw/source/ui/table/splittbl.src b/sw/source/ui/table/splittbl.src index a1bc6100de..d785f9ea06 100644 --- a/sw/source/ui/table/splittbl.src +++ b/sw/source/ui/table/splittbl.src @@ -63,6 +63,7 @@ ModalDialog DLG_SPLIT_TABLE }; RadioButton RB_CNTNT { + HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_CNTNT"; Pos = MAP_APPFONT ( 12 , 15 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Check = TRUE ; @@ -71,18 +72,21 @@ ModalDialog DLG_SPLIT_TABLE }; RadioButton RB_BOX_PARA { + HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_BOX_PARA"; Pos = MAP_APPFONT ( 12 , 30 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Text [ en-US ] = "C~ustom heading (apply Style)" ; }; RadioButton RB_BOX_NOPARA { + HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_BOX_NOPARA"; Pos = MAP_APPFONT ( 12 , 45 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Text [ en-US ] = "Cu~stom heading" ; }; RadioButton RB_BORDER { + HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_BORDER"; Pos = MAP_APPFONT ( 12 , 60 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Text [ en-US ] = "~No heading" ; diff --git a/sw/source/ui/table/tabledlg.src b/sw/source/ui/table/tabledlg.src index 0dd3607c2d..b3d52ec516 100644 --- a/sw/source/ui/table/tabledlg.src +++ b/sw/source/ui/table/tabledlg.src @@ -98,6 +98,7 @@ TabPage TP_FORMAT_TABLE }; Edit ED_NAME { + HelpID = "sw:Edit:TP_FORMAT_TABLE:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 75 , 14 ) ; Size = MAP_APPFONT ( 112 , 12 ) ; @@ -111,6 +112,7 @@ TabPage TP_FORMAT_TABLE }; MetricField ED_WIDTH { + HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 75 , 30 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -129,6 +131,7 @@ TabPage TP_FORMAT_TABLE }; CheckBox CB_REL_WIDTH { + HelpID = "sw:CheckBox:TP_FORMAT_TABLE:CB_REL_WIDTH"; Pos = MAP_APPFONT ( 118 , 32 ) ; Size = MAP_APPFONT ( 69 , 10 ) ; TabStop = TRUE ; @@ -142,6 +145,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_FULL { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_FULL"; Pos = MAP_APPFONT ( 202 , 14 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; TabStop = TRUE ; @@ -149,6 +153,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_LEFT { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_LEFT"; Pos = MAP_APPFONT ( 202 , 28 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "~Left" ; @@ -156,6 +161,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_FROM_LEFT { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_FROM_LEFT"; Pos = MAP_APPFONT ( 202 , 42 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; TabStop = TRUE ; @@ -163,6 +169,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_RIGHT { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_RIGHT"; Pos = MAP_APPFONT ( 202 , 56 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "R~ight" ; @@ -170,6 +177,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_CENTER { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_CENTER"; Pos = MAP_APPFONT ( 202 , 70 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "~Center" ; @@ -177,6 +185,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_FREE { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_FREE"; Pos = MAP_APPFONT ( 202 , 84 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; TabStop = TRUE ; @@ -202,6 +211,7 @@ TabPage TP_FORMAT_TABLE }; MetricField ED_LEFT_DIST { + HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_LEFT_DIST"; Pos = MAP_APPFONT ( 147 , 59 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -226,6 +236,7 @@ TabPage TP_FORMAT_TABLE MetricField ED_RIGHT_DIST { + HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_RIGHT_DIST"; Pos = MAP_APPFONT ( 147 , 75 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -249,6 +260,7 @@ TabPage TP_FORMAT_TABLE }; MetricField ED_TOP_DIST { + HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_TOP_DIST"; Pos = MAP_APPFONT ( 147 , 91 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -272,6 +284,7 @@ TabPage TP_FORMAT_TABLE }; MetricField ED_BOTTOM_DIST { + HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_BOTTOM_DIST"; Border = TRUE ; Pos = MAP_APPFONT ( 147 , 107 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -303,6 +316,7 @@ TabPage TP_FORMAT_TABLE }; ListBox LB_TEXTDIRECTION { + HelpID = "sw:ListBox:TP_FORMAT_TABLE:LB_TEXTDIRECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 75 , 136 ) ; Size = MAP_APPFONT ( 176 , 50 ) ; @@ -329,6 +343,7 @@ TabPage TP_TABLE_COLUMN Hide = TRUE; CheckBox CB_MOD_TBL { + HelpID = "sw:CheckBox:TP_TABLE_COLUMN:CB_MOD_TBL"; Pos = MAP_APPFONT ( 6 , 6 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; TabStop = TRUE ; @@ -336,6 +351,7 @@ TabPage TP_TABLE_COLUMN }; CheckBox CB_PROP { + HelpID = "sw:CheckBox:TP_TABLE_COLUMN:CB_PROP"; Pos = MAP_APPFONT ( 6 , 20 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; TabStop = TRUE ; @@ -349,6 +365,7 @@ TabPage TP_TABLE_COLUMN }; MetricField ED_SPACE { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:ED_SPACE"; ReadOnly = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 95 , 34 ) ; @@ -365,6 +382,7 @@ TabPage TP_TABLE_COLUMN }; ImageButton COL_BTN_DOWN { + HelpID = "sw:ImageButton:TP_TABLE_COLUMN:COL_BTN_DOWN"; Disable = TRUE ; Pos = MAP_APPFONT ( 12 , 65 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; @@ -373,6 +391,7 @@ TabPage TP_TABLE_COLUMN }; ImageButton COL_BTN_UP { + HelpID = "sw:ImageButton:TP_TABLE_COLUMN:COL_BTN_UP"; Disable = TRUE ; Pos = MAP_APPFONT ( 234 , 65 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; @@ -391,6 +410,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_1 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_1"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 13 , 81 ) ; @@ -418,6 +438,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_2 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_2"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 52 , 81 ) ; @@ -445,6 +466,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_3 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_3"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 91 , 81 ) ; @@ -472,6 +494,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_4 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_4"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 81 ) ; @@ -499,6 +522,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_5 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_5"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 169 , 81 ) ; @@ -526,6 +550,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_6 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_6"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 208 , 81 ) ; @@ -568,6 +593,7 @@ TabPage TP_TABLE_TEXTFLOW }; CheckBox CB_PAGEBREAK { + HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_PAGEBREAK"; // Disable = TRUE; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 90 , 8 ) ; @@ -577,6 +603,7 @@ TabPage TP_TABLE_TEXTFLOW }; RadioButton RB_BREAKPAGE { + HelpID = "sw:RadioButton:TP_TABLE_TEXTFLOW:RB_BREAKPAGE"; Pos = MAP_APPFONT ( 105 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Page" ; @@ -585,6 +612,7 @@ TabPage TP_TABLE_TEXTFLOW }; RadioButton RB_BREAKCOLUMN { + HelpID = "sw:RadioButton:TP_TABLE_TEXTFLOW:RB_BREAKCOLUMN"; // Disable = TRUE; Pos = MAP_APPFONT ( 178 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; @@ -593,6 +621,7 @@ TabPage TP_TABLE_TEXTFLOW }; RadioButton RB_PAGEBREAKBEFORE { + HelpID = "sw:RadioButton:TP_TABLE_TEXTFLOW:RB_PAGEBREAKBEFORE"; // Disable = TRUE; Pos = MAP_APPFONT ( 105 , 28 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; @@ -602,6 +631,7 @@ TabPage TP_TABLE_TEXTFLOW }; RadioButton RB_PAGEBREAKAFTER { + HelpID = "sw:RadioButton:TP_TABLE_TEXTFLOW:RB_PAGEBREAKAFTER"; // Disable = TRUE; Pos = MAP_APPFONT ( 178 , 28 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; @@ -609,6 +639,7 @@ TabPage TP_TABLE_TEXTFLOW }; CheckBox CB_PAGECOLL { + HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_PAGECOLL"; // Disable = TRUE; Pos = MAP_APPFONT ( 12 , 44 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; @@ -618,6 +649,7 @@ TabPage TP_TABLE_TEXTFLOW }; ListBox LB_PAGECOLL { + HelpID = "sw:ListBox:TP_TABLE_TEXTFLOW:LB_PAGECOLL"; Pos = MAP_APPFONT ( 105 , 42 ) ; Size = MAP_APPFONT ( 61 , 50 ) ; TabStop = TRUE ; @@ -631,6 +663,7 @@ TabPage TP_TABLE_TEXTFLOW }; NumericField NF_PAGENUM { + HelpID = "sw:NumericField:TP_TABLE_TEXTFLOW:NF_PAGENUM"; Border = TRUE ; Pos = MAP_APPFONT ( 222 , 42 ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -646,6 +679,7 @@ TabPage TP_TABLE_TEXTFLOW }; CheckBox CB_SPLIT { + HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_SPLIT"; Pos = MAP_APPFONT ( 12 , 58 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; @@ -653,6 +687,7 @@ TabPage TP_TABLE_TEXTFLOW }; TriStateBox CB_SPLIT_ROW { + HelpID = "sw:TriStateBox:TP_TABLE_TEXTFLOW:CB_SPLIT_ROW"; Pos = MAP_APPFONT ( 21 , 71 ) ; Size = MAP_APPFONT ( 227 , 10 ) ; TabStop = TRUE ; @@ -660,6 +695,7 @@ TabPage TP_TABLE_TEXTFLOW }; CheckBox CB_KEEP { + HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_KEEP"; Pos = MAP_APPFONT ( 12 , 85 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; Text [ en-US ] = "~Keep with next paragraph" ; @@ -667,6 +703,7 @@ TabPage TP_TABLE_TEXTFLOW }; CheckBox CB_HEADLINE { + HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_HEADLINE"; Pos = MAP_APPFONT ( 12 , 99 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; @@ -680,6 +717,7 @@ TabPage TP_TABLE_TEXTFLOW }; NumericField NF_REPEAT_HEADER { + HelpID = "sw:NumericField:TP_TABLE_TEXTFLOW:NF_REPEAT_HEADER"; Border = TRUE ; Pos = MAP_APPFONT ( 131 , 113 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -704,6 +742,7 @@ TabPage TP_TABLE_TEXTFLOW }; ListBox LB_TEXTDIRECTION { + HelpID = "sw:ListBox:TP_TABLE_TEXTFLOW:LB_TEXTDIRECTION"; Pos = MAP_APPFONT ( 85 , 130 ) ; Size = MAP_APPFONT ( 163 , 50 ) ; DropDown = TRUE; @@ -730,6 +769,7 @@ TabPage TP_TABLE_TEXTFLOW }; ListBox LB_VERTORIENT { + HelpID = "sw:ListBox:TP_TABLE_TEXTFLOW:LB_VERTORIENT"; Pos = MAP_APPFONT ( 85 , 162 ) ; Size = MAP_APPFONT ( 61 , 50 ) ; DropDown = TRUE; diff --git a/sw/source/ui/table/tautofmt.src b/sw/source/ui/table/tautofmt.src index ab314e0932..ec6eaad812 100644 --- a/sw/source/ui/table/tautofmt.src +++ b/sw/source/ui/table/tautofmt.src @@ -43,6 +43,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; ListBox LB_FORMAT { + HelpID = "sw:ListBox:DLG_AUTOFMT_TABLE:LB_FORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 65 , 100 ) ; @@ -56,6 +57,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; CheckBox BTN_NUMFORMAT { + HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_NUMFORMAT"; Hide = TRUE ; Pos = MAP_APPFONT ( 12 , 131 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -64,6 +66,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; CheckBox BTN_BORDER { + HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_BORDER"; Hide = TRUE ; Pos = MAP_APPFONT ( 12 , 147 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -72,6 +75,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; CheckBox BTN_FONT { + HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_FONT"; Hide = TRUE ; Pos = MAP_APPFONT ( 85 , 131 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -80,6 +84,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; CheckBox BTN_PATTERN { + HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_PATTERN"; Hide = TRUE ; Pos = MAP_APPFONT ( 85 , 147 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -88,6 +93,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; CheckBox BTN_ALIGNMENT { + HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_ALIGNMENT"; Hide = TRUE ; Pos = MAP_APPFONT ( 150 , 131 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -116,6 +122,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; MoreButton BTN_MORE { + HelpID = "sw:MoreButton:DLG_AUTOFMT_TABLE:BTN_MORE"; Pos = MAP_APPFONT ( 255 , 101 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~More" ; @@ -125,6 +132,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; PushButton BTN_ADD { + HelpID = "sw:PushButton:DLG_AUTOFMT_TABLE:BTN_ADD"; Pos = MAP_APPFONT ( 255 , 64 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Add" ; @@ -132,6 +140,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; PushButton BTN_REMOVE { + HelpID = "sw:PushButton:DLG_AUTOFMT_TABLE:BTN_REMOVE"; Pos = MAP_APPFONT ( 255 , 81 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete" ; @@ -139,6 +148,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; PushButton BTN_RENAME { + HelpID = "sw:PushButton:DLG_AUTOFMT_TABLE:BTN_RENAME"; Pos = MAP_APPFONT ( 255 , 123 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -219,6 +229,7 @@ ModalDialog DLG_SWDLG_STRINPUT HelpID = HID_SWDLG_STRINPUT ; Edit ED_INPUT { + HelpID = "sw:Edit:DLG_SWDLG_STRINPUT:ED_INPUT"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 24 ) ; Size = MAP_APPFONT ( 104 , 12 ) ; diff --git a/sw/source/ui/uiview/pview.src b/sw/source/ui/uiview/pview.src old mode 100755 new mode 100644 index 4f9fbe7f9b..99b325b3ce --- a/sw/source/ui/uiview/pview.src +++ b/sw/source/ui/uiview/pview.src @@ -54,6 +54,7 @@ ModalDialog DLG_PAGEPREVIEW_ZOOM }; NumericField ED_COL { + HelpID = "sw:NumericField:DLG_PAGEPREVIEW_ZOOM:ED_COL"; Border = TRUE ; Size = MAP_APPFONT ( 28 , 12 ) ; Pos = MAP_APPFONT ( 48 , 34 ) ; @@ -69,6 +70,7 @@ ModalDialog DLG_PAGEPREVIEW_ZOOM }; NumericField ED_ROW { + HelpID = "sw:NumericField:DLG_PAGEPREVIEW_ZOOM:ED_ROW"; Border = TRUE ; Pos = MAP_APPFONT ( 48 , 13 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; diff --git a/sw/source/ui/utlui/gloslst.src b/sw/source/ui/utlui/gloslst.src index 1ccf855ffe..db34b8c5ae 100644 --- a/sw/source/ui/utlui/gloslst.src +++ b/sw/source/ui/utlui/gloslst.src @@ -68,6 +68,7 @@ ModalDialog DLG_GLOSSARY_DECIDE_DLG }; ListBox LB_LIST { + HelpID = "sw:ListBox:DLG_GLOSSARY_DECIDE_DLG:LB_LIST"; Pos = MAP_APPFONT ( 12 , 15 ) ; Size = MAP_APPFONT ( 81 , 40 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/utlui/unotools.src b/sw/source/ui/utlui/unotools.src index aa4be8804c..c6a4443a39 100644 --- a/sw/source/ui/utlui/unotools.src +++ b/sw/source/ui/utlui/unotools.src @@ -44,6 +44,7 @@ ModalDialog DLG_RENAME_XNAMED }; Edit ED_NEW_NAME { + HelpID = "sw:Edit:DLG_RENAME_XNAMED:ED_NEW_NAME"; Pos = MAP_APPFONT ( 65 , 13 ) ; Size = MAP_APPFONT ( 87 , 12 ) ; Border = TRUE; -- cgit v1.2.3 From 404cb9054fbf7d8d83da8b6d099dbab39b49ac54 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 12 Oct 2010 20:41:33 +0200 Subject: vmiklos01: #i113532# fix for nested tables This fixes exporting documents when a nested table cell contains a table again (so we have 3 tables). --- sw/source/filter/ww8/rtfattributeoutput.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index d0426b169c..e92cb5344f 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -931,6 +931,9 @@ void RtfAttributeOutput::EndTableRow( ) } else m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_ROW); + + // Cleans the table helper + delete m_pTableWrt, m_pTableWrt = NULL; } void RtfAttributeOutput::EndTable() @@ -943,9 +946,6 @@ void RtfAttributeOutput::EndTable() // We closed the table; if it is a nested table, the cell that contains it // still continues m_bTableCellOpen = true; - - // Cleans the table helper - delete m_pTableWrt, m_pTableWrt = NULL; } void RtfAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool /*bForceEmptyParagraph*/ ) -- cgit v1.2.3 From 124e3b3f527965107f899c23dc10a00115a36cc5 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 12 Oct 2010 21:25:34 +0200 Subject: vmiklos01: #i113532# backed out changeset b6c31fdf8791 It just worked around a segmentation fault but it was not the real solution. See next commit. --- sw/source/filter/ww8/rtfattributeoutput.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index e92cb5344f..d0426b169c 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -931,9 +931,6 @@ void RtfAttributeOutput::EndTableRow( ) } else m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_ROW); - - // Cleans the table helper - delete m_pTableWrt, m_pTableWrt = NULL; } void RtfAttributeOutput::EndTable() @@ -946,6 +943,9 @@ void RtfAttributeOutput::EndTable() // We closed the table; if it is a nested table, the cell that contains it // still continues m_bTableCellOpen = true; + + // Cleans the table helper + delete m_pTableWrt, m_pTableWrt = NULL; } void RtfAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool /*bForceEmptyParagraph*/ ) -- cgit v1.2.3 From 56af6c187fced3ea24d6957d64f2e1184d7c5772 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 12 Oct 2010 21:26:21 +0200 Subject: vmiklos01: #i113532# fix for nested tables The case when the original and the nested table has different cell / row number is now handled. This is done by invalidating the table writer before starting a new table and after finishing one. This is needed to prevent a crash when exporting such tables and also to produce correct output, which conforms to the specification. --- sw/source/filter/ww8/rtfattributeoutput.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index d0426b169c..ef0e3b85d8 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -284,6 +284,8 @@ void RtfAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextN { ww8::WW8TableNodeInfoInner::Pointer_t pInner( pTextNodeInfo->getInnerForDepth( nDepth ) ); + delete m_pTableWrt, m_pTableWrt = NULL; + StartTable( pInner ); StartTableRow( pInner ); StartTableCell( pInner ); @@ -937,8 +939,10 @@ void RtfAttributeOutput::EndTable() { OSL_TRACE("%s", OSL_THIS_FUNC); - if ( m_nTableDepth > 0 ) + if ( m_nTableDepth > 0 ) { m_nTableDepth--; + delete m_pTableWrt, m_pTableWrt = NULL; + } // We closed the table; if it is a nested table, the cell that contains it // still continues -- cgit v1.2.3 From 998cdfb1bd63c9ecf1fd3fe0ae7ec560f6608ef8 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 13 Oct 2010 01:36:49 +0200 Subject: vmiklos01: #i113532# fix for nested tables When the first cell of a table contains an other table, the definition of the outer table has to be written after the inner table. Introduce a stack to handle this. --- sw/source/filter/ww8/rtfattributeoutput.cxx | 36 +++++++++++++++++++++++++---- sw/source/filter/ww8/rtfattributeoutput.hxx | 15 ++++++++++++ 2 files changed, 46 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index ef0e3b85d8..dcab8af823 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -284,8 +284,7 @@ void RtfAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextN { ww8::WW8TableNodeInfoInner::Pointer_t pInner( pTextNodeInfo->getInnerForDepth( nDepth ) ); - delete m_pTableWrt, m_pTableWrt = NULL; - + m_bLastTable = (nDepth == pTextNodeInfo->getDepth()); StartTable( pInner ); StartTableRow( pInner ); StartTableCell( pInner ); @@ -550,6 +549,7 @@ void RtfAttributeOutput::TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t /* m_aStyles.append(OOO_STRING_SVTOOLS_RTF_ITAP); m_aStyles.append((sal_Int32)m_nTableDepth); } + m_bWroteCellInfo = true; } void RtfAttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfo*/ ) @@ -876,7 +876,8 @@ void RtfAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t /*pTa { OSL_TRACE("%s", OSL_THIS_FUNC); - /* noop */ + // To trigger calling InitTableHelper() + delete m_pTableWrt, m_pTableWrt = NULL; } void RtfAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) @@ -886,6 +887,9 @@ void RtfAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pT TableDefinition(pTableTextNodeInfoInner); + if (!m_bLastTable) + m_aTables.push_back(m_aRowDefs.makeStringAndClear()); + // We'll write the table definition for nested tables later if ( nCurrentDepth > 1 ) return; @@ -912,6 +916,12 @@ void RtfAttributeOutput::EndTableCell( ) { OSL_TRACE("%s, (depth is %d)", OSL_THIS_FUNC, (int)m_nTableDepth); + if (!m_bWroteCellInfo) + { + m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_INTBL); + m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_ITAP); + m_aAfterRuns.append((sal_Int32)m_nTableDepth); + } if ( m_nTableDepth > 1 ) m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_NESTCELL); else @@ -919,6 +929,7 @@ void RtfAttributeOutput::EndTableCell( ) m_bTableCellOpen = false; m_bTblAfterCell = true; + m_bWroteCellInfo = false; } void RtfAttributeOutput::EndTableRow( ) @@ -928,11 +939,24 @@ void RtfAttributeOutput::EndTableRow( ) if ( m_nTableDepth > 1 ) { m_aAfterRuns.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_NESTTABLEPROPRS); - m_aAfterRuns.append(m_aRowDefs.makeStringAndClear()); + if (m_aRowDefs.getLength() > 0) + m_aAfterRuns.append(m_aRowDefs.makeStringAndClear()); + else if (m_aTables.size() > 0) + { + m_aAfterRuns.append(m_aTables.back()); + m_aTables.pop_back(); + } m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_NESTROW "}" "{" OOO_STRING_SVTOOLS_RTF_NONESTTABLES OOO_STRING_SVTOOLS_RTF_PAR "}"); } else + { + if (m_aTables.size() > 0) + { + m_aAfterRuns.append(m_aTables.back()); + m_aTables.pop_back(); + } m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_ROW); + } } void RtfAttributeOutput::EndTable() @@ -2954,7 +2978,9 @@ RtfAttributeOutput::RtfAttributeOutput( RtfExport &rExport ) m_bTblAfterCell( false ), m_nColBreakNeeded( false ), m_bBufferSectionBreaks( false ), - m_bBufferSectionHeaders( false ) + m_bBufferSectionHeaders( false ), + m_bLastTable( true ), + m_bWroteCellInfo( false ) { OSL_TRACE("%s", OSL_THIS_FUNC); } diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx index ef1fe60c8b..0d153b843f 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.hxx +++ b/sw/source/filter/ww8/rtfattributeoutput.hxx @@ -540,6 +540,21 @@ private: bool m_bBufferSectionHeaders; rtl::OStringBuffer m_aSectionHeaders; + /* + * Support for starting multiple tables at the same cell. + * If the current table is the last started one. + */ + bool m_bLastTable; + /* + * List of already started but not yet defined tables (need to be defined + * after the nested tables). + */ + std::vector< rtl::OString > m_aTables; + /* + * If cell info is already output. + */ + bool m_bWroteCellInfo; + public: RtfAttributeOutput( RtfExport &rExport ); -- cgit v1.2.3 From 673dd652ec422cb92efc7a2d8b380fe26dfa23d7 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 14 Oct 2010 14:14:03 +0200 Subject: sw34bf01: #i114412#: calc.cxx: fix stupid crash regression (thanks cmc) --- sw/source/core/bastyp/calc.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index 72f8b150e3..1d71600a24 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -1654,7 +1654,8 @@ bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, if( pDoc ) { LanguageType eLang = GetDocAppScriptLang( *pDoc ); - if( eLang != SvxLocaleToLanguage( pLclD->getLocale() ) ) + if (eLang != + SvxLocaleToLanguage(aSysLocale.GetLocaleData().getLocale())) { pLclD.reset( new LocaleDataWrapper( ::comphelper::getProcessServiceFactory(), -- cgit v1.2.3 From edbb655d91856d23585b8577b8e2a60d65b4162b Mon Sep 17 00:00:00 2001 From: os Date: Fri, 15 Oct 2010 14:46:14 +0200 Subject: locked rtf files after import: delete stream --- sw/source/filter/ww8/rtfimportfilter.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfimportfilter.cxx b/sw/source/filter/ww8/rtfimportfilter.cxx index a7a294a231..d44a42db4f 100644 --- a/sw/source/filter/ww8/rtfimportfilter.cxx +++ b/sw/source/filter/ww8/rtfimportfilter.cxx @@ -97,7 +97,9 @@ sal_Bool RtfImportFilter::filter( const uno::Sequence< beans::PropertyValue >& a } RtfReader aReader; - return aReader.Read(pStream, *pDoc, aURL, *pCurPam) == 0; + sal_Bool bRet = aReader.Read(pStream, *pDoc, aURL, *pCurPam) == 0; + delete pStream; + return bRet; } -- cgit v1.2.3 From 279e3896524bc3fdfafa915194d266572c36d484 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Sun, 17 Oct 2010 03:42:19 +0200 Subject: vmiklos01: #i113532# fix non-text frames Previously the exporter just crashed when the document contained a non-text frame (e.g. table). Fix this by properly calling MSWordExportBase::WriteText() instead of our custom method that handled text frames only. --- sw/source/filter/ww8/rtfattributeoutput.cxx | 11 ++++++++++- sw/source/filter/ww8/rtfexport.cxx | 5 ----- sw/source/filter/ww8/rtfexport.hxx | 1 - 3 files changed, 10 insertions(+), 7 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index dcab8af823..aa5e9be8ed 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -1461,7 +1461,16 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi */ OString aSave = m_aRun.makeStringAndClear(); m_rExport.bRTFFlySyntax = true; - m_rExport.OutContent(*rFrame.GetContent()); + + const SwFrmFmt& rFrmFmt = rFrame.GetFrmFmt( ); + const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx(); + ULONG nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0; + ULONG nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0; + m_rExport.SaveData( nStt, nEnd ); + m_rExport.mpParentFrame = &rFrame; + m_rExport.WriteText( ); + m_rExport.RestoreData(); + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_PARD; m_rExport.bRTFFlySyntax = false; m_aRun.append(aSave); diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 640cd77905..554243b448 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -1124,11 +1124,6 @@ USHORT RtfExport::GetRedline( const String& rAuthor ) } } -void RtfExport::OutContent( const SwNode& rNode ) -{ - OutputContentNode(*rNode.GetCntntNode()); -} - void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage ) { OSL_TRACE("%s start", OSL_THIS_FUNC); diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx index a7f825f810..fe626203c5 100644 --- a/sw/source/filter/ww8/rtfexport.hxx +++ b/sw/source/filter/ww8/rtfexport.hxx @@ -174,7 +174,6 @@ public: static rtl::OString OutString(const String &rStr, rtl_TextEncoding eDestEnc); static rtl::OString OutHex(ULONG nHex, BYTE nLen); void OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage ); - void OutContent( const SwNode& rNode ); USHORT GetColor( const Color& rColor ) const; void InsColor( const Color& rCol ); -- cgit v1.2.3 From 997951b0c5e4242fb4e7dc466eded9eb5eef718f Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Mon, 18 Oct 2010 22:00:21 +0200 Subject: svarray: #i112395# #i84159# increase max number of pools to 2^32 --- sw/source/core/crsr/crstrvl.cxx | 8 +++---- sw/source/core/doc/doc.cxx | 26 +++++++++++----------- sw/source/core/doc/docbasic.cxx | 4 ++-- sw/source/core/doc/docfld.cxx | 26 +++++++++++----------- sw/source/core/doc/docfmt.cxx | 6 ++--- sw/source/core/doc/doctxm.cxx | 4 ++-- sw/source/core/doc/visiturl.cxx | 4 ++-- sw/source/core/docnode/node.cxx | 4 ++-- sw/source/core/edit/edfld.cxx | 6 ++--- sw/source/core/fields/docufld.cxx | 6 ++--- sw/source/core/layout/trvlfrm.cxx | 6 ++--- sw/source/core/unocore/unostyle.cxx | 6 ++--- sw/source/core/view/vprint.cxx | 6 ++--- sw/source/filter/html/htmlfly.cxx | 8 +++---- sw/source/filter/rtf/wrtrtf.cxx | 44 ++++++++++++++++++------------------- sw/source/filter/writer/writer.cxx | 6 ++--- sw/source/filter/ww8/wrtww8.cxx | 8 +++---- sw/source/filter/xml/xmlexp.cxx | 4 ++-- sw/source/filter/xml/xmlfonte.cxx | 6 ++--- 19 files changed, 94 insertions(+), 94 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index fce9273ef3..758ba82d0f 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -484,10 +484,10 @@ BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors ) { const SfxPoolItem* pItem; const SwTableBox* pTBox; - USHORT n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount( RES_BOXATR_FORMULA ); + sal_uInt32 n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount2( RES_BOXATR_FORMULA ); for( n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem( + if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem2( RES_BOXATR_FORMULA, n ) ) && 0 != (pTBox = ((SwTblBoxFormula*)pItem)->GetTableBox() ) && pTBox->GetSttNd() && @@ -556,10 +556,10 @@ BOOL SwCrsrShell::GotoNxtPrvTOXMark( BOOL bNext ) const SwCntntFrm* pCFrm; const SwTxtNode* pTxtNd; const SwTxtTOXMark* pTxtTOX; - USHORT n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount( RES_TXTATR_TOXMARK ); + sal_uInt32 n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount2( RES_TXTATR_TOXMARK ); for( n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem( + if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem2( RES_TXTATR_TOXMARK, n ) ) && 0 != (pTxtTOX = ((SwTOXMark*)pItem)->GetTxtTOXMark() ) && ( pTxtNd = &pTxtTOX->GetTxtNode())->GetNodes().IsDocNodes() && diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index d25e4bd169..ee909d8c54 100755 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1834,10 +1834,10 @@ void SwDoc::DocInfoChgd( ) const SwFmtRefMark* SwDoc::GetRefMark( const String& rName ) const { const SfxPoolItem* pItem; - USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_REFMARK ); - for( USHORT n = 0; n < nMaxItems; ++n ) + sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK ); + for( sal_uInt32 n = 0; n < nMaxItems; ++n ) { - if( 0 == (pItem = GetAttrPool().GetItem( RES_TXTATR_REFMARK, n ) )) + if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n ) )) continue; const SwFmtRefMark* pFmtRef = (SwFmtRefMark*)pItem; @@ -1856,10 +1856,10 @@ const SwFmtRefMark* SwDoc::GetRefMark( USHORT nIndex ) const const SwTxtRefMark* pTxtRef; const SwFmtRefMark* pRet = 0; - USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_REFMARK ); - USHORT nCount = 0; - for( USHORT n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_REFMARK, n )) && + sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK ); + sal_uInt32 nCount = 0; + for( sal_uInt32 n = 0; n < nMaxItems; ++n ) + if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n )) && 0 != (pTxtRef = ((SwFmtRefMark*)pItem)->GetTxtRefMark()) && &pTxtRef->GetTxtNode().GetNodes() == &GetNodes() ) { @@ -1882,10 +1882,10 @@ USHORT SwDoc::GetRefMarks( SvStringsDtor* pNames ) const const SfxPoolItem* pItem; const SwTxtRefMark* pTxtRef; - USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_REFMARK ); - USHORT nCount = 0; - for( USHORT n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_REFMARK, n )) && + sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK ); + sal_uInt32 nCount = 0; + for( sal_uInt32 n = 0; n < nMaxItems; ++n ) + if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n )) && 0 != (pTxtRef = ((SwFmtRefMark*)pItem)->GetTxtRefMark()) && &pTxtRef->GetTxtNode().GetNodes() == &GetNodes() ) { @@ -2126,9 +2126,9 @@ const SwFmtINetFmt* SwDoc::FindINetAttr( const String& rName ) const const SwFmtINetFmt* pItem; const SwTxtINetFmt* pTxtAttr; const SwTxtNode* pTxtNd; - USHORT n, nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_INETFMT ); + sal_uInt32 n, nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT ); for( n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = (SwFmtINetFmt*)GetAttrPool().GetItem( + if( 0 != (pItem = (SwFmtINetFmt*)GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) ) && pItem->GetName().Equals( rName ) && 0 != ( pTxtAttr = pItem->GetTxtINetFmt()) && diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx index fc88148156..2cba12edf5 100644 --- a/sw/source/core/doc/docbasic.cxx +++ b/sw/source/core/doc/docbasic.cxx @@ -167,9 +167,9 @@ USHORT SwDoc::CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent, if( bCheckPtr ) { const SfxPoolItem* pItem; - USHORT n, nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_INETFMT ); + sal_uInt32 n, nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT ); for( n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_INETFMT, n ) ) + if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) ) && rCallEvent.PTR.pINetAttr == pItem ) { bCheckPtr = FALSE; // als Flag missbrauchen diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 9d907b9896..86f81c6daf 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -436,7 +436,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt ) "Was ist das fuer ein MessageItem?" ); SwFieldType* pFldType(0); - USHORT i; + sal_uInt32 i; for( i = 0; i < pFldTypes->Count(); ++i ) { @@ -507,9 +507,9 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt ) // und dann noch alle Tabellen Box Formeln abklappern const SfxPoolItem* pItem; - USHORT nMaxItems = GetAttrPool().GetItemCount( RES_BOXATR_FORMULA ); + sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_BOXATR_FORMULA ); for( i = 0; i < nMaxItems; ++i ) - if( 0 != (pItem = GetAttrPool().GetItem( RES_BOXATR_FORMULA, i ) ) && + if( 0 != (pItem = GetAttrPool().GetItem2( RES_BOXATR_FORMULA, i ) ) && ((SwTblBoxFormula*)pItem)->GetDefinedIn() ) { ((SwTblBoxFormula*)pItem)->ChangeState( pHt ); @@ -609,7 +609,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt ) // dann berechene noch die Formeln an den Boxen for( i = 0; i < nMaxItems; ++i ) - if( 0 != (pItem = GetAttrPool().GetItem( RES_BOXATR_FORMULA, i ) ) && + if( 0 != (pItem = GetAttrPool().GetItem2( RES_BOXATR_FORMULA, i ) ) && ((SwTblBoxFormula*)pItem)->GetDefinedIn() && !((SwTblBoxFormula*)pItem)->IsValid() ) { @@ -1732,7 +1732,7 @@ String lcl_DBDataToString(const SwDBData& rData) void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList, const SvStringsDtor* pAllDBNames ) { - USHORT n; + sal_uInt32 n; SvStringsDtor aUsedDBNames; SvStringsDtor aAllDBNames; @@ -1757,10 +1757,10 @@ void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList, } const SfxPoolItem* pItem; - USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_FIELD ); + sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_FIELD ); for( n = 0; n < nMaxItems; ++n ) { - if( 0 == (pItem = GetAttrPool().GetItem( RES_TXTATR_FIELD, n ) )) + if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) )) continue; const SwFmtFld* pFmtFld = (SwFmtFld*)pItem; @@ -1916,7 +1916,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames, aNewDBData.nCommandType = (short)rNewName.GetToken(2, DB_DELIM).ToInt32(); String sFormel; - USHORT n; + sal_uInt32 n; SwSectionFmts& rArr = GetSections(); for( n = rArr.Count(); n; ) @@ -1932,11 +1932,11 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames, } const SfxPoolItem* pItem; - USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_FIELD ); + sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_FIELD ); for( n = 0; n < nMaxItems; ++n ) { - if( 0 == (pItem = GetAttrPool().GetItem( RES_TXTATR_FIELD, n ) )) + if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) )) continue; SwFmtFld* pFmtFld = (SwFmtFld*)pItem; @@ -2329,7 +2329,7 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode ) SwSectionNode* pSectNd; USHORT nArrStt = 0; ULONG nSttCntnt = rDoc.GetNodes().GetEndOfExtras().GetIndex(); - USHORT n; + sal_uInt32 n; for( n = rArr.Count(); n; ) { @@ -2378,10 +2378,10 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode ) USHORT nWhich, n; const String* pFormel = 0; const SfxPoolItem* pItem; - USHORT nMaxItems = rDoc.GetAttrPool().GetItemCount( RES_TXTATR_FIELD ); + sal_uInt32 nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_TXTATR_FIELD ); for( n = 0; n < nMaxItems; ++n ) { - if( 0 == (pItem = rDoc.GetAttrPool().GetItem( RES_TXTATR_FIELD, n )) ) + if( 0 == (pItem = rDoc.GetAttrPool().GetItem2( RES_TXTATR_FIELD, n )) ) continue; const SwFmtFld* pFmtFld = (SwFmtFld*)pItem; diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 2afa2fa9e9..914bde9119 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1347,9 +1347,9 @@ void SwDoc::SetDefault( const SfxItemSet& rSet ) nOldWidth = ((SvxTabStopItem&)aOld.Get(RES_PARATR_TABSTOP))[ 0 ].GetTabPos(); int bChg = FALSE; - USHORT nMaxItems = GetAttrPool().GetItemCount( RES_PARATR_TABSTOP ); - for( USHORT n = 0; n < nMaxItems; ++n ) - if( 0 != (pTmpItem = GetAttrPool().GetItem( RES_PARATR_TABSTOP, n ) )) + sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_PARATR_TABSTOP ); + for( sal_uInt32 n = 0; n < nMaxItems; ++n ) + if( 0 != (pTmpItem = GetAttrPool().GetItem2( RES_PARATR_TABSTOP, n ) )) bChg |= lcl_SetNewDefTabStops( nOldWidth, nNewWidth, *(SvxTabStopItem*)pTmpItem ); diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 4eda348cd3..4c80d17be0 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -110,9 +110,9 @@ USHORT SwDoc::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const const SwTxtTOXMark* pMark; const SfxPoolItem* pItem; const SwTOXType* pTOXType; - USHORT i, nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_TOXMARK ); + sal_uInt32 i, nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_TOXMARK ); for( i = 0; i < nMaxItems; ++i ) - if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_TOXMARK, i ) ) && + if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_TOXMARK, i ) ) && 0!= ( pTOXType = ((SwTOXMark*)pItem)->GetTOXType()) && TOX_INDEX == pTOXType->GetType() && 0 != ( pMark = ((SwTOXMark*)pItem)->GetTxtTOXMark() ) && diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx index 3d8b05a717..6deb411a35 100644 --- a/sw/source/core/doc/visiturl.cxx +++ b/sw/source/core/doc/visiturl.cxx @@ -71,9 +71,9 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint ) const SwFmtINetFmt* pItem; const SwTxtINetFmt* pTxtAttr; const SwTxtNode* pTxtNd; - USHORT n, nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_TXTATR_INETFMT ); + sal_uInt32 n, nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT ); for( n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem( + if( 0 != (pItem = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) ) && ( pItem->GetValue() == sURL || ( sBkmk.Len() && pItem->GetValue() == sBkmk )) && diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index d1e3446c72..3b792dc788 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -740,9 +740,9 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay, SwFindNearestNode aInfo( *pNd ); // dann ueber alle Nodes aller PageDesc const SfxPoolItem* pItem; - USHORT i, nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_PAGEDESC ); + sal_uInt32 i, nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_PAGEDESC ); for( i = 0; i < nMaxItems; ++i ) - if( 0 != (pItem = pDoc->GetAttrPool().GetItem( RES_PAGEDESC, i ) ) && + if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_PAGEDESC, i ) ) && ((SwFmtPageDesc*)pItem)->GetDefinedIn() ) { const SwModify* pMod = ((SwFmtPageDesc*)pItem)->GetDefinedIn(); diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx index 8c5b02794e..3b8b252c9c 100644 --- a/sw/source/core/edit/edfld.cxx +++ b/sw/source/core/edit/edfld.cxx @@ -342,11 +342,11 @@ SwTxtFld* lcl_FindInputFld( SwDoc* pDoc, SwField& rFld ) ((SwSetExpField&)rFld).GetInputFlag() ) ) { const SfxPoolItem* pItem; - USHORT n, nMaxItems = - pDoc->GetAttrPool().GetItemCount( RES_TXTATR_FIELD ); + sal_uInt32 n, nMaxItems = + pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_FIELD ); for( n = 0; n < nMaxItems; ++n ) if( 0 != (pItem = - pDoc->GetAttrPool().GetItem( RES_TXTATR_FIELD, n ) ) + pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) ) && ((SwFmtFld*)pItem)->GetFld() == &rFld ) { pTFld = ((SwFmtFld*)pItem)->GetTxtFld(); diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 66245b33b3..14b4ffbd19 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -171,9 +171,9 @@ void SwPageNumberFieldType::ChangeExpansion( SwDoc* pDoc, sal_uInt16 nPage, // es NIE zurueck const SfxItemPool &rPool = pDoc->GetAttrPool(); const SwFmtPageDesc *pDesc; - sal_uInt16 nMaxItems = rPool.GetItemCount( RES_PAGEDESC ); - for( sal_uInt16 n = 0; n < nMaxItems; ++n ) - if( 0 != (pDesc = (SwFmtPageDesc*)rPool.GetItem( RES_PAGEDESC, n ) ) + sal_uInt32 nMaxItems = rPool.GetItemCount2( RES_PAGEDESC ); + for( sal_uInt32 n = 0; n < nMaxItems; ++n ) + if( 0 != (pDesc = (SwFmtPageDesc*)rPool.GetItem2( RES_PAGEDESC, n ) ) && pDesc->GetNumOffset() && pDesc->GetDefinedIn() ) { if( pDesc->GetDefinedIn()->ISA( SwCntntNode )) diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 380a6bfba2..5ff8118f11 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -1811,10 +1811,10 @@ USHORT SwFrm::GetVirtPageNum() const const SwFrm *pFrm = 0; const SfxItemPool &rPool = pPage->GetFmt()->GetDoc()->GetAttrPool(); const SfxPoolItem* pItem; - USHORT nMaxItems = rPool.GetItemCount( RES_PAGEDESC ); - for( USHORT n = 0; n < nMaxItems; ++n ) + sal_uInt32 nMaxItems = rPool.GetItemCount2( RES_PAGEDESC ); + for( sal_uInt32 n = 0; n < nMaxItems; ++n ) { - if( 0 == (pItem = rPool.GetItem( RES_PAGEDESC, n ) )) + if( 0 == (pItem = rPool.GetItem2( RES_PAGEDESC, n ) )) continue; const SwFmtPageDesc *pDesc = (SwFmtPageDesc*)pItem; diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index b68fea70a9..a93d84296a 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -3993,11 +3993,11 @@ SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc* pInitDoc, IStyleAccess::SwAut { std::set< std::pair< USHORT, USHORT > > aRubyMap; SwAttrPool& rAttrPool = pDoc->GetAttrPool(); - USHORT nCount = rAttrPool.GetItemCount( RES_TXTATR_CJK_RUBY ); + sal_uInt32 nCount = rAttrPool.GetItemCount2( RES_TXTATR_CJK_RUBY ); - for ( USHORT nI = 0; nI < nCount; ++nI ) + for ( sal_uInt32 nI = 0; nI < nCount; ++nI ) { - const SwFmtRuby* pItem = static_cast(rAttrPool.GetItem( RES_TXTATR_CJK_RUBY, nI )); + const SwFmtRuby* pItem = static_cast(rAttrPool.GetItem2( RES_TXTATR_CJK_RUBY, nI )); if ( pItem && pItem->GetTxtRuby() ) { std::pair< USHORT, USHORT > aPair( pItem->GetPosition(), pItem->GetAdjustment() ); diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index c37036e42a..1ab619a0f7 100755 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -788,9 +788,9 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat BOOL ViewShell::IsAnyFieldInDoc() const { const SfxPoolItem* pItem; - USHORT nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_TXTATR_FIELD ); - for( USHORT n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = pDoc->GetAttrPool().GetItem( RES_TXTATR_FIELD, n ))) + sal_uInt32 nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_FIELD ); + for( sal_uInt32 n = 0; n < nMaxItems; ++n ) + if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ))) { const SwFmtFld* pFmtFld = (SwFmtFld*)pItem; const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld(); diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index e11a5cdf43..7e07c5835b 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -1835,10 +1835,10 @@ void SwHTMLWriter::CollectLinkTargets() const SwTxtINetFmt* pTxtAttr; const SwTxtNode* pTxtNd; - USHORT n, nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_TXTATR_INETFMT ); + sal_uInt32 n, nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT ); for( n = 0; n < nMaxItems; ++n ) { - if( 0 != (pINetFmt = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem( + if( 0 != (pINetFmt = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) ) && 0 != ( pTxtAttr = pINetFmt->GetTxtINetFmt()) && 0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) && @@ -1849,10 +1849,10 @@ void SwHTMLWriter::CollectLinkTargets() } const SwFmtURL *pURL; - nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_URL ); + nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_URL ); for( n = 0; n < nMaxItems; ++n ) { - if( 0 != (pURL = (SwFmtURL*)pDoc->GetAttrPool().GetItem( + if( 0 != (pURL = (SwFmtURL*)pDoc->GetAttrPool().GetItem2( RES_URL, n ) ) ) { AddLinkTarget( pURL->GetURL() ); diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx index 3a82ad9f8d..c9a67deeb5 100644 --- a/sw/source/filter/rtf/wrtrtf.cxx +++ b/sw/source/filter/rtf/wrtrtf.cxx @@ -668,13 +668,13 @@ void SwRTFWriter::OutRTFColorTab() { ASSERT( pColTbl, "Where's table color?" ); - // dann baue die ColorTabelle aus allen Attributen, die Colors - // enthalten und im Pool angemeldet sind auf. + // Build the color table from all attributes. The Colors + // included and registered in the pool are on. size_t n; - USHORT nMaxItem; + sal_uInt32 nMaxItem; const SfxItemPool& rPool = pDoc->GetAttrPool(); - // das Charakter - Color Attribut + // the character - Color attribute { const SvxColorItem* pCol = (const SvxColorItem*)GetDfltAttr( RES_CHRATR_COLOR ); @@ -682,30 +682,30 @@ void SwRTFWriter::OutRTFColorTab() if( 0 != ( pCol = (const SvxColorItem*)rPool.GetPoolDefaultItem( RES_CHRATR_COLOR ) )) InsColor( *pColTbl, pCol->GetValue() ); - nMaxItem = rPool.GetItemCount(RES_CHRATR_COLOR); + nMaxItem = rPool.GetItemCount2(RES_CHRATR_COLOR); for( n = 0; n < nMaxItem; ++n ) { - if( 0 != (pCol = (const SvxColorItem*)rPool.GetItem( + if( 0 != (pCol = (const SvxColorItem*)rPool.GetItem2( RES_CHRATR_COLOR, n ) ) ) InsColor( *pColTbl, pCol->GetValue() ); } const SvxUnderlineItem* pUnder = (const SvxUnderlineItem*)GetDfltAttr( RES_CHRATR_UNDERLINE ); InsColor( *pColTbl, pUnder->GetColor() ); - nMaxItem = rPool.GetItemCount(RES_CHRATR_UNDERLINE); + nMaxItem = rPool.GetItemCount2(RES_CHRATR_UNDERLINE); for( n = 0; n < nMaxItem;n++) { - if( 0 != (pUnder = (const SvxUnderlineItem*)rPool.GetItem( RES_CHRATR_UNDERLINE, n ) ) ) + if( 0 != (pUnder = (const SvxUnderlineItem*)rPool.GetItem2( RES_CHRATR_UNDERLINE, n ) ) ) InsColor( *pColTbl, pUnder->GetColor() ); } const SvxOverlineItem* pOver = (const SvxOverlineItem*)GetDfltAttr( RES_CHRATR_OVERLINE ); InsColor( *pColTbl, pOver->GetColor() ); - nMaxItem = rPool.GetItemCount(RES_CHRATR_OVERLINE); + nMaxItem = rPool.GetItemCount2(RES_CHRATR_OVERLINE); for( n = 0; n < nMaxItem;n++) { - if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem( RES_CHRATR_OVERLINE, n ) ) ) + if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem2( RES_CHRATR_OVERLINE, n ) ) ) InsColor( *pColTbl, pOver->GetColor() ); } @@ -725,9 +725,9 @@ void SwRTFWriter::OutRTFColorTab() { InsColor( *pColTbl, pBkgrd->GetColor() ); } - nMaxItem = rPool.GetItemCount( *pIds ); + nMaxItem = rPool.GetItemCount2( *pIds ); for( n = 0; n < nMaxItem; ++n ) - if( 0 != (pBkgrd = (const SvxBrushItem*)rPool.GetItem( + if( 0 != (pBkgrd = (const SvxBrushItem*)rPool.GetItem2( *pIds , n ) )) { InsColor( *pColTbl, pBkgrd->GetColor() ); @@ -744,9 +744,9 @@ void SwRTFWriter::OutRTFColorTab() { InsColor( *pColTbl, pShadow->GetColor() ); } - nMaxItem = rPool.GetItemCount(RES_SHADOW); + nMaxItem = rPool.GetItemCount2(RES_SHADOW); for( n = 0; n < nMaxItem; ++n ) - if( 0 != (pShadow = (const SvxShadowItem*)rPool.GetItem( + if( 0 != (pShadow = (const SvxShadowItem*)rPool.GetItem2( RES_SHADOW, n ) ) ) { InsColor( *pColTbl, pShadow->GetColor() ); @@ -760,9 +760,9 @@ void SwRTFWriter::OutRTFColorTab() if( 0 != ( pBox = (const SvxBoxItem*)rPool.GetPoolDefaultItem( RES_BOX ) )) InsColorLine( *pColTbl, *pBox ); - nMaxItem = rPool.GetItemCount(RES_BOX); + nMaxItem = rPool.GetItemCount2(RES_BOX); for( n = 0; n < nMaxItem; ++n ) - if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem( RES_BOX, n ) )) + if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem2( RES_BOX, n ) )) InsColorLine( *pColTbl, *pBox ); } @@ -888,10 +888,10 @@ void SwRTFWriter::OutRTFFontTab() PutNumFmtFontsInAttrPool(); PutCJKandCTLFontsInAttrPool(); - USHORT nMaxItem = rPool.GetItemCount(RES_CHRATR_FONT); - for (USHORT nGet = 0; nGet < nMaxItem; ++nGet) + sal_uInt32 nMaxItem = rPool.GetItemCount2(RES_CHRATR_FONT); + for (sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet) { - pFont = (const SvxFontItem*)rPool.GetItem(RES_CHRATR_FONT, nGet); + pFont = (const SvxFontItem*)rPool.GetItem2(RES_CHRATR_FONT, nGet); if (pFont) _OutFont(*this, *pFont, n++); } @@ -1374,9 +1374,9 @@ USHORT SwRTFWriter::GetId( const SvxFontItem& rFont ) const ++n; } - USHORT nMaxItem = rPool.GetItemCount( RES_CHRATR_FONT ); - for( USHORT nGet = 0; nGet < nMaxItem; ++nGet ) - if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem( + sal_uInt32 nMaxItem = rPool.GetItemCount2( RES_CHRATR_FONT ); + for( sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet ) + if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem2( RES_CHRATR_FONT, nGet )) ) { if( rFont == *pFont ) diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 8e7f67997c..03c07448bd 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -487,9 +487,9 @@ void Writer::_AddFontItems( SfxItemPool& rPool, USHORT nW ) if( 0 != ( pFont = (const SvxFontItem*)rPool.GetPoolDefaultItem( nW )) ) _AddFontItem( rPool, *pFont ); - USHORT nMaxItem = rPool.GetItemCount( nW ); - for( USHORT nGet = 0; nGet < nMaxItem; ++nGet ) - if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem( nW, nGet )) ) + sal_uInt32 nMaxItem = rPool.GetItemCount2( nW ); + for( sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet ) + if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem2( nW, nGet )) ) _AddFontItem( rPool, *pFont ); } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 55123e288a..0012641b9f 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2859,10 +2859,10 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc) const SwTxtINetFmt* pTxtAttr; const SwTxtNode* pTxtNd; - USHORT n, nMaxItems = rDoc.GetAttrPool().GetItemCount( RES_TXTATR_INETFMT ); + sal_uInt32 n, nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT ); for( n = 0; n < nMaxItems; ++n ) { - if( 0 != (pINetFmt = (SwFmtINetFmt*)rDoc.GetAttrPool().GetItem( + if( 0 != (pINetFmt = (SwFmtINetFmt*)rDoc.GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) ) && 0 != ( pTxtAttr = pINetFmt->GetTxtINetFmt()) && 0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) && @@ -2873,10 +2873,10 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc) } const SwFmtURL *pURL; - nMaxItems = rDoc.GetAttrPool().GetItemCount( RES_URL ); + nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_URL ); for( n = 0; n < nMaxItems; ++n ) { - if( 0 != (pURL = (SwFmtURL*)rDoc.GetAttrPool().GetItem( + if( 0 != (pURL = (SwFmtURL*)rDoc.GetAttrPool().GetItem2( RES_URL, n ) ) ) { AddLinkTarget( pURL->GetURL() ); diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 1250b589b0..c4412887f0 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -244,10 +244,10 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass ) for( sal_uInt16 j=0; j < nWhichIds; j++ ) { sal_uInt16 nWhichId = aWhichIds[j]; - sal_uInt16 i=0, nItems = rPool.GetItemCount( nWhichId ); + sal_uInt32 i=0, nItems = rPool.GetItemCount2( nWhichId ); for( i = 0; i < nItems; ++i ) { - if( 0 != (pItem = rPool.GetItem( nWhichId , i ) ) ) + if( 0 != (pItem = rPool.GetItem2( nWhichId , i ) ) ) { const SvXMLAttrContainerItem *pUnknown = PTR_CAST( SvXMLAttrContainerItem, pItem ); diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx index c7bfacf509..308d839b7d 100644 --- a/sw/source/filter/xml/xmlfonte.cxx +++ b/sw/source/filter/xml/xmlfonte.cxx @@ -80,10 +80,10 @@ SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl( Add( rFont.GetFamilyName(), rFont.GetStyleName(), static_cast< sal_uInt16 >(rFont.GetFamily()), static_cast< sal_uInt16 >(rFont.GetPitch()), rFont.GetCharSet() ); - sal_uInt16 nItems = rPool.GetItemCount( nWhichId ); - for( sal_uInt16 j = 0; j < nItems; ++j ) + sal_uInt32 nItems = rPool.GetItemCount2( nWhichId ); + for( sal_uInt32 j = 0; j < nItems; ++j ) { - if( 0 != (pItem = rPool.GetItem( nWhichId, j ) ) ) + if( 0 != (pItem = rPool.GetItem2( nWhichId, j ) ) ) { const SvxFontItem *pFont = (const SvxFontItem *)pItem; -- cgit v1.2.3 From 35b876013e9d301edd97ee4bd2a91f784727827d Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 20 Oct 2010 03:34:15 +0200 Subject: vmiklos01: #i66619# fix title pages --- sw/source/filter/ww8/rtfexport.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 554243b448..c64bff6036 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -1163,6 +1163,7 @@ void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, if( pAktPageDesc != &rPgDsc ) { pAktPageDesc = &rPgDsc; + Strm() << OOO_STRING_SVTOOLS_RTF_TITLEPG; if( pAktPageDesc->GetMaster().GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem ) == SFX_ITEM_SET ) WriteHeaderFooter(*pItem, true); -- cgit v1.2.3 From 78b2fe8dd7f6bae160dce712dc7a38e698328785 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 20 Oct 2010 04:22:38 +0200 Subject: vmiklos01: #i113532# fix order of entries in the revtbl --- sw/source/filter/ww8/rtfexport.cxx | 18 ++++++++++++++++-- sw/source/filter/ww8/rtfexport.hxx | 1 + 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index c64bff6036..7c8cbcb8f4 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -283,8 +283,14 @@ void RtfExport::WriteRevTab() // Now write the table Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_REVTBL << ' '; - for(std::map::iterator aIter = m_aRedlineTbl.begin(); aIter != m_aRedlineTbl.end(); ++aIter) - Strm() << '{' << OutString((*aIter).first, eDefaultEncoding) << ";}"; + for(USHORT i = 0; i < m_aRedlineTbl.size(); ++i) + { + const String* pAuthor = GetRedline(i); + Strm() << '{'; + if (pAuthor) + Strm() << OutString(*pAuthor, eDefaultEncoding); + Strm() << ";}"; + } Strm() << '}' << sNewLine; } @@ -1124,6 +1130,14 @@ USHORT RtfExport::GetRedline( const String& rAuthor ) } } +const String* RtfExport::GetRedline( USHORT nId ) +{ + for(std::map::iterator aIter = m_aRedlineTbl.begin(); aIter != m_aRedlineTbl.end(); ++aIter) + if ((*aIter).second == nId) + return &(*aIter).first; + return NULL; +} + void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage ) { OSL_TRACE("%s start", OSL_THIS_FUNC); diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx index fe626203c5..2c7d736800 100644 --- a/sw/source/filter/ww8/rtfexport.hxx +++ b/sw/source/filter/ww8/rtfexport.hxx @@ -180,6 +180,7 @@ public: void InsColorLine( const SvxBoxItem& rBox ); void OutColorTable(); USHORT GetRedline( const String& rAuthor ); + const String* GetRedline( USHORT nId ); void InsStyle( USHORT nId, const rtl::OString& rStyle ); rtl::OString* GetStyle( USHORT nId ); -- cgit v1.2.3 From ee9890798d172dabcbfaf902871697084210340a Mon Sep 17 00:00:00 2001 From: os Date: Wed, 20 Oct 2010 08:23:11 +0200 Subject: HackIsWW8OrHigher returns false now to fix encoding problems --- sw/source/filter/ww8/rtfexport.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx index 2c7d736800..9b866f673d 100644 --- a/sw/source/filter/ww8/rtfexport.hxx +++ b/sw/source/filter/ww8/rtfexport.hxx @@ -82,7 +82,7 @@ public: virtual RtfSdrExport& SdrExporter() const; /// Hack, unfortunately necessary at some places for now. - virtual bool HackIsWW8OrHigher() const { return true; } + virtual bool HackIsWW8OrHigher() const { return false; } /// Guess the script (asian/western). virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich ); -- cgit v1.2.3 From 89101a1b807c9dad136847b6ad893373497a4e22 Mon Sep 17 00:00:00 2001 From: os Date: Wed, 20 Oct 2010 09:47:51 +0200 Subject: GetSortedBookmarks: don't insert bookmarks from different nodes --- sw/source/filter/ww8/wrtw8nds.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 5370c54af8..f0906c4adc 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1758,10 +1758,10 @@ void MSWordExportBase::GetSortedBookmarks( const SwTxtNode& rNode, xub_StrLen nA xub_StrLen nStart = pMark->GetMarkStart().nContent.GetIndex(); xub_StrLen nEnd = pMark->GetMarkEnd().nContent.GetIndex(); - if ( nStart > nAktPos ) + if ( nStart > nAktPos && ( pMark->GetMarkStart().nNode == rNode.GetIndex()) ) aSortedStart.push_back( pMark ); - if ( nEnd > nAktPos && nEnd <= ( nAktPos + nLen ) ) + if ( nEnd > nAktPos && nEnd <= ( nAktPos + nLen ) && (pMark->GetMarkEnd().nNode == rNode.GetIndex()) ) aSortedEnd.push_back( pMark ); } -- cgit v1.2.3 From 5cd5e7d25205d19d7d3c2111127004a5048bb4b5 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 20 Oct 2010 10:32:29 +0200 Subject: cws tlmath01: #i972# baseline to baseline alignment for Math --- starmath/inc/node.hxx | 7 ++ starmath/source/node.cxx | 49 +++++++---- starmath/source/unomodel.cxx | 21 ++++- sw/inc/fesh.hxx | 9 ++ sw/inc/swcli.hxx | 2 + sw/source/core/frmedt/fefly1.cxx | 97 +++++++++++++++++++++- sw/source/core/inc/flyfrm.hxx | 7 ++ sw/source/core/inc/flyfrms.hxx | 3 + sw/source/core/layout/fly.cxx | 1 + sw/source/core/layout/flyincnt.cxx | 7 ++ .../ascharanchoredobjectposition.cxx | 4 + sw/source/ui/config/usrpref.cxx | 90 ++++++++++---------- sw/source/ui/inc/usrpref.hxx | 9 ++ sw/source/ui/uiview/swcli.cxx | 17 ++++ sw/source/ui/wrtsh/wrtsh1.cxx | 44 ++++++---- 15 files changed, 292 insertions(+), 75 deletions(-) (limited to 'sw/source') diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index 156a3c1f24..d4aa6eac26 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -180,6 +180,9 @@ public: const SmNode * FindTokenAt(USHORT nRow, USHORT nCol) const; const SmNode * FindRectClosestTo(const Point &rPoint) const; + // --> 4.7.2010 #i972# + virtual long GetFormulaBaseline() const { return (long)0; } //dummy, used in SmTableNode + // <-- }; @@ -456,6 +459,9 @@ public: class SmTableNode : public SmStructureNode { + // --> 4.7.2010 #i972# + long nFormulaBaseline; + // <-- public: SmTableNode(const SmToken &rNodeToken) : SmStructureNode(NTABLE, rNodeToken) @@ -465,6 +471,7 @@ public: virtual SmNode * GetLeftMost(); virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat); + long GetFormulaBaseline() const { return nFormulaBaseline; } }; diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 1bb3b6a925..c37b223177 100755 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -763,7 +763,7 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat) } Point aPos; - SmRect::operator = (SmRect(nMaxWidth, 0)); + SmRect::operator = (SmRect(nMaxWidth, 1)); for (i = 0; i < nSize; i++) { if (NULL != (pNode = GetSubNode(i))) { const SmRect &rNodeRect = pNode->GetRect(); @@ -779,6 +779,22 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat) ExtendBy(rNodeRect, nSize > 1 ? RCP_NONE : RCP_ARG); } } + // --> 4.7.2010 #i972# + if (HasBaseline()) + nFormulaBaseline = GetBaseline(); + else + { + SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE); + aTmpDev.SetFont(GetFont()); + + SmRect aRect = (SmRect(aTmpDev, &rFormat, C2S("a"), + GetFont().GetBorderWidth())); + nFormulaBaseline = GetAlignM(); + // move from middle position by constant - distance + // between middle and baseline for single letter + nFormulaBaseline+= aRect.GetBaseline() - aRect.GetAlignM(); + } + // <-- } @@ -818,20 +834,21 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat) SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE); aTmpDev.SetFont(GetFont()); - // provide an empty rectangle with alignment parameters for the "current" - // font (in order to make "a^1 {}_2^3 a_4" work correct, that is, have the - // same sub-/supscript positions.) - //! be sure to use a character that has explicitly defined HiAttribut - //! line in rect.cxx such as 'a' in order to make 'vec a' look same to - //! 'vec {a}'. - SmRect::operator = (SmRect(aTmpDev, &rFormat, C2S("a"), - GetFont().GetBorderWidth())); - // make sure that the rectangle occupies (almost) no space - SetWidth(1); - SetItalicSpaces(0, 0); - if (nSize < 1) + { + // provide an empty rectangle with alignment parameters for the "current" + // font (in order to make "a^1 {}_2^3 a_4" work correct, that is, have the + // same sub-/supscript positions.) + //! be sure to use a character that has explicitly defined HiAttribut + //! line in rect.cxx such as 'a' in order to make 'vec a' look same to + //! 'vec {a}'. + SmRect::operator = (SmRect(aTmpDev, &rFormat, C2S("a"), + GetFont().GetBorderWidth())); + // make sure that the rectangle occupies (almost) no space + SetWidth(1); + SetItalicSpaces(0, 0); return; + } // make distance depend on font size long nDist = (rFormat.GetDistance(DIS_HORIZONTAL) * GetFont().GetSize().Height()) / 100L; @@ -839,7 +856,11 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat) nDist = 0; Point aPos; - for (i = 0; i < nSize; i++) + // copy the first node into LineNode and extend by the others + if (NULL != (pNode = GetSubNode(0))) + SmRect::operator = (pNode->GetRect()); + + for (i = 1; i < nSize; i++) if (NULL != (pNode = GetSubNode(i))) { aPos = pNode->AlignTo(*this, RP_RIGHT, RHA_CENTER, RVA_BASELINE); diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 77b404b2ee..e817416ccc 100755 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -238,7 +238,8 @@ enum SmModelPropertyHandles // --> PB 2004-08-25 #i33095# Security Options HANDLE_LOAD_READONLY, // <-- - HANDLE_DIALOG_LIBRARIES // #i73329# + HANDLE_DIALOG_LIBRARIES, // #i73329# + HANDLE_BASELINE // 3.7.2010 #i972# }; PropertySetInfo * lcl_createModelPropertyInfo () @@ -310,6 +311,9 @@ PropertySetInfo * lcl_createModelPropertyInfo () // --> PB 2004-08-25 #i33095# Security Options { RTL_CONSTASCII_STRINGPARAM( "LoadReadonly" ), HANDLE_LOAD_READONLY, &::getBooleanCppuType(), PROPERTY_NONE, 0 }, // <-- + // --> 3.7.2010 #i972# + { RTL_CONSTASCII_STRINGPARAM( "BaseLine"), HANDLE_BASELINE, &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, 0}, + // <-- { NULL, 0, 0, NULL, 0, 0 } }; PropertySetInfo *pInfo = new PropertySetInfo ( aModelPropertyInfoMap ); @@ -955,6 +959,21 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu break; } // <-- + // --> 3.7.2010 #i972# + case HANDLE_BASELINE: + { + if ( !pDocSh->pTree ) + pDocSh->Parse(); + if ( pDocSh->pTree ) + { + if ( !pDocSh->IsFormulaArranged() ) + pDocSh->ArrangeFormula(); + + *pValue <<= static_cast( pDocSh->pTree->GetFormulaBaseline() ); + } + } + break; + // <-- } } } diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 90785a008c..ec2b578829 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -550,6 +550,15 @@ public: BOOL ReplaceSdrObj( const String& rGrfName, const String& rFltName, const Graphic* pGrf = 0 ); + // --> #i972# + // for starmath formulas anchored 'as char' it alignes it baseline to baseline + // changing the previous vertical orientation + void AlignFormulaToBaseline( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& xObj, SwFlyFrm * pFly = 0 ); + + // aligns all formulas with anchor 'as char' to baseline + void AlignAllFormulasToBaseline(); + // <-- + //------------------------------------------ //Auskunft ueber naechstliegenden Inhalt zum uebergebenen Point diff --git a/sw/inc/swcli.hxx b/sw/inc/swcli.hxx index de9a6ea61c..66eee66666 100644 --- a/sw/inc/swcli.hxx +++ b/sw/inc/swcli.hxx @@ -53,6 +53,8 @@ public: void SetInDoVerb( BOOL bFlag ) { bInDoVerb = bFlag; } BOOL IsCheckForOLEInCaption() const { return bOldCheckForOLEInCaption; } + + virtual void FormatChanged(); }; #endif diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index f220f409d6..09a8481956 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -73,6 +73,9 @@ #include // <-- #include +// --> 3.7.2010 #i972# +#include +// <-- // --> OD 2009-12-29 #i89920# #include #include @@ -1522,6 +1525,9 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < pFly->ChgRelPos( aTmp ); } } + + pFly->SetLastFlyFrmPrtRectPos( pFly->Prt().Pos() ); //stores the value of last Prt rect + EndAllAction(); return aResult; @@ -2153,4 +2159,93 @@ void SwFEShell::SetObjDescription( const String& rDescription ) } } } -// <-- + + +void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedObject >& xObj, SwFlyFrm * pFly ) +{ +#if OSL_DEBUG_LEVEL > 1 + SvGlobalName aCLSID( xObj->getClassID() ); + const bool bStarMath = ( SotExchange::IsMath( aCLSID ) != 0 ); + ASSERT( bStarMath, "AlignFormulaToBaseline should only be called for Math objects" ); + + if ( !bStarMath ) + return; +#endif + + if (!pFly) + pFly = FindFlyFrm( xObj ); + ASSERT( pFly , "No fly frame!" ); + SwFrmFmt * pFrmFmt = pFly ? pFly->GetFmt() : 0; + + // baseline to baseline alignment should only be applied to formulas anchored as char + if ( pFly && pFrmFmt && FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId() ) + { + // get baseline from Math object + uno::Any aBaseline; + if( svt::EmbeddedObjectRef::TryRunningState( xObj ) ) + { + uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY ); + if ( xSet.is() ) + { + try + { + aBaseline = xSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BaseLine") ) ); + } + catch ( uno::Exception& ) + { + ASSERT( FALSE , "Baseline could not be retrieved from Starmath!" ); + } + } + } + + sal_Int32 nBaseline = ::comphelper::getINT32(aBaseline); + const MapMode aSourceMapMode( MAP_100TH_MM ); + const MapMode aTargetMapMode( MAP_TWIP ); + nBaseline = OutputDevice::LogicToLogic( nBaseline, aSourceMapMode.GetMapUnit(), aTargetMapMode.GetMapUnit() ); + + //TLMATH01 ??? is nBaseline really always > 0 ? + ASSERT( nBaseline > 0, "Wrong value of Baseline while retrieving from Starmath!" ); + //nBaseline must be moved by aPrt position + nBaseline += pFly->GetLastFlyFrmPrtRectPos().Y(); + + const SwFmtVertOrient &rVert = pFrmFmt->GetVertOrient(); + SwFmtVertOrient aVert( rVert ); + aVert.SetPos( -nBaseline ); + aVert.SetVertOrient( com::sun::star::text::VertOrientation::NONE ); + + pFrmFmt->LockModify(); + pFrmFmt->SetFmtAttr( aVert ); + pFrmFmt->UnlockModify(); + pFly->InvalidatePos(); + } +} + + +void SwFEShell::AlignAllFormulasToBaseline() +{ + StartAllAction(); + + SwStartNode *pStNd; + SwNodeIndex aIdx( *GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 ); + while ( 0 != (pStNd = aIdx.GetNode().GetStartNode()) ) + { + ++aIdx; + SwOLENode *pOleNode = dynamic_cast< SwOLENode * >( &aIdx.GetNode() ); + if ( pOleNode ) + { + const uno::Reference < embed::XEmbeddedObject > & xObj( pOleNode->GetOLEObj().GetOleRef() ); + if (xObj.is()) + { + SvGlobalName aCLSID( xObj->getClassID() ); + if ( SotExchange::IsMath( aCLSID ) ) + AlignFormulaToBaseline( xObj ); + } + } + + aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 ); + } + + EndAllAction(); +} + + diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx index 1ea99ac067..a6e5e658b6 100644 --- a/sw/source/core/inc/flyfrm.hxx +++ b/sw/source/core/inc/flyfrm.hxx @@ -77,6 +77,9 @@ protected: // OD 2004-05-27 #i26791# - moved to // Point aRelPos; //Die Relative Position zum Master + Point aLastFlyFrmPrtRectPos; // it stores the previous position of Prt rectangle from RequestObjectResize + // so it can be used to move frames of non-resizable objects to align them correctly + // when they get borders (this is done in SwWrtShell::CalcAndGetScale) private: BOOL bLocked :1; //Cntnt-gebundene Flys muessen derart blockiert werden @@ -283,5 +286,9 @@ public: @author OD */ virtual bool IsFormatPossible() const; + + const Point GetLastFlyFrmPrtRectPos() const { return aLastFlyFrmPrtRectPos; } + void SetLastFlyFrmPrtRectPos( Point aPoint ) { aLastFlyFrmPrtRectPos = aPoint; } + }; #endif diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx index 4f9987eec5..cc15bb4c46 100644 --- a/sw/source/core/inc/flyfrms.hxx +++ b/sw/source/core/inc/flyfrms.hxx @@ -188,6 +188,7 @@ class SwFlyInCntFrm : public SwFlyFrm BOOL bInvalidLayout :1; BOOL bInvalidCntnt :1; + bool bPosCalculated; protected: virtual void NotifyBackground( SwPageFrm *pPage, @@ -237,6 +238,8 @@ public: // format of the anchor frame virtual void _ActionOnInvalidation( const InvalidationType _nInvalid ); // <-- + + void SetPosCalculated( bool bNew ) { bPosCalculated = bNew; } }; inline void SwFlyInCntFrm::InvalidateLayout() const diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 7b09b9983e..054c05406f 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -122,6 +122,7 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) : // aRelPos(), pPrevLink( 0 ), pNextLink( 0 ), + aLastFlyFrmPrtRectPos(), bInCnt( FALSE ), bAtCnt( FALSE ), bLayout( FALSE ), diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx index 7956827165..afed16428d 100644 --- a/sw/source/core/layout/flyincnt.cxx +++ b/sw/source/core/layout/flyincnt.cxx @@ -56,6 +56,7 @@ SwFlyInCntFrm::SwFlyInCntFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) : SwFlyFrm( pFmt, pAnch ) { bInCnt = bInvalidLayout = bInvalidCntnt = TRUE; + bPosCalculated = FALSE; SwTwips nRel = pFmt->GetVertOrient().GetPos(); // OD 2004-05-27 #i26791# - member moved to Point aRelPos; @@ -203,6 +204,12 @@ void SwFlyInCntFrm::MakeObjPos() if ( !bValidPos ) { bValidPos = TRUE; + // --> let the position be set, only if it was calculated in + // SwAsCharAnchoredObjectPosition::CalcPosition + //TLMATH01_ ???? + if ( !bPosCalculated ) + return; + // <-- SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt(); const SwFmtVertOrient &rVert = pFmt->GetVertOrient(); //Und ggf. noch die aktuellen Werte im Format updaten, dabei darf diff --git a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx index f8b2db9b55..c7fc984dd6 100644 --- a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx @@ -328,7 +328,11 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() { // set new anchor position and relative position SwFlyInCntFrm* pFlyInCntFrm = &(const_cast(rFlyInCntFrm)); + // --> let SwFlyInCnt::MakeObjPos set position only at this place using bPosCalculated + pFlyInCntFrm->SetPosCalculated( TRUE ); pFlyInCntFrm->SetRefPoint( aAnchorPos, aRelAttr, aRelPos ); + pFlyInCntFrm->SetPosCalculated( FALSE ); + // <-- if( nObjWidth != (pFlyInCntFrm->Frm().*fnRect->fnGetWidth)() ) { // recalculate object bound rectangle, if object width has changed. diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx index 2571361b6d..c5525ecdf3 100644 --- a/sw/source/ui/config/usrpref.cxx +++ b/sw/source/ui/config/usrpref.cxx @@ -245,27 +245,29 @@ Sequence SwLayoutViewConfig::GetPropertyNames() { static const char* aPropNames[] = { - "Line/Guide", // 0 - "Line/SimpleControlPoint", // 1 - "Line/LargeControlPoint", // 2 - "Window/HorizontalScroll", // 3 - "Window/VerticalScroll", // 4 - "Window/ShowRulers", // 5 - "Window/HorizontalRuler", // 6 - "Window/VerticalRuler", // 7 - "Window/HorizontalRulerUnit", // 8 - "Window/VerticalRulerUnit", // 9 - "Window/SmoothScroll", //10 - "Zoom/Value", //11 - "Zoom/Type", //12 - "Other/MeasureUnit", //13 - "Other/TabStop", //14 - "Window/IsVerticalRulerRight", //15 - "ViewLayout/Columns", //16 - "ViewLayout/BookMode", //17 - "Other/IsSquaredPageMode" //18 + "Line/Guide", // 0 + "Line/SimpleControlPoint", // 1 + "Line/LargeControlPoint", // 2 + "Window/HorizontalScroll", // 3 + "Window/VerticalScroll", // 4 + "Window/ShowRulers", // 5 + "Window/HorizontalRuler", // 6 + "Window/VerticalRuler", // 7 + "Window/HorizontalRulerUnit", // 8 + "Window/VerticalRulerUnit", // 9 + "Window/SmoothScroll", //10 + "Zoom/Value", //11 + "Zoom/Type", //12 + "Other/IsAlignMathObjectsToBaseline" //13 + "Other/MeasureUnit", //14 + // below properties are not available in WriterWeb + "Other/TabStop", //15 + "Window/IsVerticalRulerRight", //16 + "ViewLayout/Columns", //17 + "ViewLayout/BookMode", //18 + "Other/IsSquaredPageMode" //19 }; - const int nCount = bWeb ? 14 : 19; + const int nCount = bWeb ? 15 : 20; Sequence aNames(nCount); OUString* pNames = aNames.getArray(); for(int i = 0; i < nCount; i++) @@ -305,16 +307,16 @@ void SwLayoutViewConfig::Commit() sal_Bool bSet; switch(nProp) { - case 0: bSet = rParent.IsCrossHair(); break;// "Line/Guide", - case 1: bSet = rParent.IsSolidMarkHdl(); break;// "Line/SimpleControlPoint", - case 2: bSet = rParent.IsBigMarkHdl(); break;// "Line/LargeControlPoint", - case 3: bSet = rParent.IsViewHScrollBar(); break;// "Window/HorizontalScroll", - case 4: bSet = rParent.IsViewVScrollBar(); break;// "Window/VerticalScroll", - case 5: bSet = rParent.IsViewAnyRuler(); break; // "Window/ShowRulers" + case 0: bSet = rParent.IsCrossHair(); break; // "Line/Guide", + case 1: bSet = rParent.IsSolidMarkHdl(); break; // "Line/SimpleControlPoint", + case 2: bSet = rParent.IsBigMarkHdl(); break; // "Line/LargeControlPoint", + case 3: bSet = rParent.IsViewHScrollBar(); break; // "Window/HorizontalScroll", + case 4: bSet = rParent.IsViewVScrollBar(); break; // "Window/VerticalScroll", + case 5: bSet = rParent.IsViewAnyRuler(); break; // "Window/ShowRulers" // #i14593# use IsView*Ruler(TRUE) instead of IsView*Ruler() // this preserves the single ruler states even if "Window/ShowRulers" is off - case 6: bSet = rParent.IsViewHRuler(TRUE); break;// "Window/HorizontalRuler", - case 7: bSet = rParent.IsViewVRuler(TRUE); break;// "Window/VerticalRuler", + case 6: bSet = rParent.IsViewHRuler(TRUE); break; // "Window/HorizontalRuler", + case 7: bSet = rParent.IsViewVRuler(TRUE); break; // "Window/VerticalRuler", case 8: if(rParent.bIsHScrollMetricSet) pValues[nProp] <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit" @@ -323,15 +325,16 @@ void SwLayoutViewConfig::Commit() if(rParent.bIsVScrollMetricSet) pValues[nProp] <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit" break; - case 10: bSet = rParent.IsSmoothScroll(); break;// "Window/SmoothScroll", - case 11: pValues[nProp] <<= (sal_Int32)rParent.GetZoom(); break;// "Zoom/Value", + case 10: bSet = rParent.IsSmoothScroll(); break; // "Window/SmoothScroll", + case 11: pValues[nProp] <<= (sal_Int32)rParent.GetZoom(); break; // "Zoom/Value", case 12: pValues[nProp] <<= (sal_Int32)rParent.GetZoomType(); break;// "Zoom/Type", - case 13: pValues[nProp] <<= (sal_Int32)rParent.GetMetric(); break;// "Other/MeasureUnit", - case 14: pValues[nProp] <<= static_cast(TWIP_TO_MM100(rParent.GetDefTab())); break;// "Other/TabStop", - case 15: bSet = rParent.IsVRulerRight(); break;// "Window/IsVerticalRulerRight", - case 16: pValues[nProp] <<= (sal_Int32)rParent.GetViewLayoutColumns(); break;// "ViewLayout/Columns", - case 17: bSet = rParent.IsViewLayoutBookMode(); break;// "ViewLayout/BookMode", - case 18: bSet = rParent.IsSquaredPageMode(); break;// "Other/IsSquaredPageMode", + case 13: bSet = rParent.IsAlignMathObjectsToBaseline(); break; // "Other/IsAlignMathObjectsToBaseline" + case 14: pValues[nProp] <<= (sal_Int32)rParent.GetMetric(); break; // "Other/MeasureUnit", + case 15: pValues[nProp] <<= static_cast(TWIP_TO_MM100(rParent.GetDefTab())); break;// "Other/TabStop", + case 16: bSet = rParent.IsVRulerRight(); break; // "Window/IsVerticalRulerRight", + case 17: pValues[nProp] <<= (sal_Int32)rParent.GetViewLayoutColumns(); break;// "ViewLayout/Columns", + case 18: bSet = rParent.IsViewLayoutBookMode(); break; // "ViewLayout/BookMode", + case 19: bSet = rParent.IsSquaredPageMode(); break; // "Other/IsSquaredPageMode", } if(nProp < 8 || nProp == 10 || nProp == 15 || nProp == 17 || nProp == 18 ) pValues[nProp].setValue(&bSet, ::getBooleanCppuType()); @@ -395,30 +398,33 @@ void SwLayoutViewConfig::Load() rParent.SetZoomType( static_cast< SvxZoomType >(nVal) ); } break;// "Zoom/Type", - case 13: + + case 13: rParent.SetAlignMathObjectsToBaseline(bSet); break;// "Other/IsAlignMathObjectsToBaseline" + + case 14: { sal_Int32 nUnit = 0; pValues[nProp] >>= nUnit; rParent.SetMetric((FieldUnit)nUnit, TRUE); } break;// "Other/MeasureUnit", - case 14: + case 15: { sal_Int32 nTab = 0; pValues[nProp] >>= nTab; rParent.SetDefTab(MM100_TO_TWIP(nTab), TRUE); } break;// "Other/TabStop", - case 15: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight", - case 16: + case 16: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight", + case 17: { sal_Int32 nColumns = 0; pValues[nProp] >>= nColumns; rParent.SetViewLayoutColumns( static_cast(nColumns) ); } break;// "ViewLayout/Columns", - case 17: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode", - case 18: rParent.SetDefaultPageMode(bSet,TRUE); break;// "Other/IsSquaredPageMode", + case 18: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode", + case 19: rParent.SetDefaultPageMode(bSet,TRUE); break;// "Other/IsSquaredPageMode", } } } diff --git a/sw/source/ui/inc/usrpref.hxx b/sw/source/ui/inc/usrpref.hxx index 9f3f3e4f39..21b3e64405 100644 --- a/sw/source/ui/inc/usrpref.hxx +++ b/sw/source/ui/inc/usrpref.hxx @@ -147,6 +147,8 @@ class SwMasterUsrPref : public SwViewOption sal_Int32 nDefTab; //default tab stop distance sal_Bool bIsSquaredPageMode; //default page mode for text grid + sal_Bool bIsAlignMathObjectsToBaseline; + SwContentViewConfig aContentConfig; SwLayoutViewConfig aLayoutConfig; SwGridConfig aGridConfig; @@ -271,6 +273,13 @@ public: aLayoutConfig.SetModified(); } + sal_Bool IsAlignMathObjectsToBaseline() const { return bIsAlignMathObjectsToBaseline; } + void SetAlignMathObjectsToBaseline( sal_Bool bVal, sal_Bool bNoModify = sal_False ) + { + bIsAlignMathObjectsToBaseline = bVal; + if(!bNoModify) + aLayoutConfig.SetModified(); + } }; #endif diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx index 996ab9b235..d4ea02dea7 100644 --- a/sw/source/ui/uiview/swcli.cxx +++ b/sw/source/ui/uiview/swcli.cxx @@ -169,3 +169,20 @@ void SwOleClient::MakeVisible() const SwWrtShell &rSh = ((SwView*)GetViewShell())->GetWrtShell(); rSh.MakeObjVisible( GetObject() ); } + +// --> #i972# +void SwOleClient::FormatChanged() +{ + const uno::Reference < embed::XEmbeddedObject >& xObj = GetObject(); + + SvGlobalName aCLSID( xObj->getClassID() ); + if ( SotExchange::IsMath( aCLSID ) ) + { + SwView * pView = dynamic_cast< SwView * >( GetViewShell() ); + if (pView) + pView->GetWrtShell().AlignFormulaToBaseline( xObj ); + } +} +// <-- + + diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index b3087f78fb..235ed4ff37 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -42,9 +42,7 @@ #include #include #include -#ifndef _SOUND_HXX //autogen #include -#endif #include #include #include @@ -61,27 +59,21 @@ #include #include +#include <../../core/inc/flyfrm.hxx> + #include #include #include #include #include #include -#ifndef _WDOCSH_HXX #include -#endif -#ifndef _BASESH_HXX #include -#endif #include #include -#ifndef _VIEW_HXX #include -#endif #include -#ifndef _CMDID_H #include -#endif #include #include #include @@ -89,9 +81,7 @@ #include // fuer Undo-Ids #include #include -#ifndef _WVIEW_HXX #include -#endif #include #include #include @@ -100,15 +90,12 @@ #include #include #include -#ifndef _WRTSH_HRC #include -#endif #include #include #include #include #include -//#include #include // -> #111827# @@ -493,7 +480,8 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName if ( xObj.is() ) { - if( InsertOleObject( xObj ) && bActivate && bDoVerb ) + BOOL bActivate2 = InsertOleObject( xObj ); + if( bActivate && bDoVerb ) { SfxInPlaceClient* pClient = GetView().FindIPClient( xObj.GetObject(), &GetView().GetEditWin() ); if ( !pClient ) @@ -517,7 +505,8 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName //#50270# Error brauchen wir nicht handeln, das erledigt das //DoVerb in der SfxViewShell - pClient->DoVerb( SVVERB_SHOW ); + if ( bActivate2 ) + pClient->DoVerb( SVVERB_SHOW ); // TODO/LATER: set document name - should be done in Client //if ( !ERRCODE_TOERROR( nErr ) ) @@ -614,6 +603,11 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm aFrmMgr.SetSize( aSz ); SwFlyFrmFmt *pFmt = SwFEShell::InsertObject( xRef, &aFrmMgr.GetAttrSet() ); + // --> #i972# + if ( bStarMath ) //sets baseline + AlignFormulaToBaseline( xRef.GetObject() ); + // <-- + if (pFlyFrmFmt) *pFlyFrmFmt = pFmt; @@ -774,6 +768,8 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, if ( (embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY & nMisc) || bLinkingChart // TODO/LATER: ResizeOnPrinterChange //|| SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE & xObj->GetMiscStatus() + || nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE // non-resizable objects need to be + // set the size back by this method ) { pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj ); @@ -884,6 +880,20 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, if ( bUseObjectSize ) { + // --> this moves non-resizable object so that when adding borders the baseline remains the same + const SwFlyFrm *pFly = GetCurrFlyFrm(); + if ( pFly ) + { + const Point aPoint = pFly->GetLastFlyFrmPrtRectPos(); + SwRect aRect( pFlyPrtRect ? *pFlyPrtRect + : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() )); + aArea += aPoint - aRect.Pos(); + } + else + { + ASSERT( FALSE , "Could not find fly frame." ); + } + // <-- aArea.Width ( _aVisArea.Width() ); aArea.Height( _aVisArea.Height() ); RequestObjectResize( aArea, xObj.GetObject() ); -- cgit v1.2.3 From 09c6d4f2339420dd4fc562a4a43d2751554cf563 Mon Sep 17 00:00:00 2001 From: os Date: Wed, 20 Oct 2010 13:10:40 +0200 Subject: export all attributes of parent styles in RTF --- sw/source/filter/ww8/rtfattributeoutput.cxx | 2 +- sw/source/filter/ww8/rtfexport.cxx | 1 + sw/source/filter/ww8/writerhelper.cxx | 16 ++++++++++++++-- sw/source/filter/ww8/writerhelper.hxx | 2 +- sw/source/filter/ww8/wrtw8nds.cxx | 4 ++-- sw/source/filter/ww8/wrtw8num.cxx | 2 +- sw/source/filter/ww8/wrtww8.cxx | 1 + sw/source/filter/ww8/wrtww8.hxx | 4 +++- sw/source/filter/ww8/ww8atr.cxx | 23 ++++++++++++----------- 9 files changed, 36 insertions(+), 19 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index aa5e9be8ed..6c68271e56 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -1364,7 +1364,7 @@ void RtfAttributeOutput::NumberingLevel( BYTE nLevel, m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_F; m_rExport.OutULong(m_rExport.maFontHelper.GetId(*pFont)); } - m_rExport.OutputItemSet( *pOutSet, false, true, i18n::ScriptType::LATIN ); + m_rExport.OutputItemSet( *pOutSet, false, true, i18n::ScriptType::LATIN, m_rExport.mbExportModeRTF ); m_rExport.Strm() << m_aStyles.makeStringAndClear(); } diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 7c8cbcb8f4..f4196f98ee 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -776,6 +776,7 @@ RtfExport::RtfExport( RtfExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCurren eCurrentEncoding(eDefaultEncoding), bRTFFlySyntax(false) { + mbExportModeRTF = true; // the attribute output for the document m_pAttrOutput = new RtfAttributeOutput( *this ); // that just causes problems for RTF diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 652d8a4a12..2680ca7690 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -466,9 +466,21 @@ namespace sw } //SetLayer boilerplate end - void GetPoolItems(const SfxItemSet &rSet, PoolItems &rItems) + void GetPoolItems(const SfxItemSet &rSet, PoolItems &rItems, bool bExportParentItemSet ) { - if (rSet.Count()) + if( bExportParentItemSet ) + { + USHORT nTotal = rSet.TotalCount(); + for( USHORT nItem =0; nItem < nTotal; ++nItem ) + { + const SfxPoolItem* pItem = 0; + if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetWhichByPos( nItem ), true, &pItem ) ) + { + rItems[pItem->Which()] = pItem; + } + } + } + else if( rSet.Count()) { SfxItemIter aIter(rSet); if (const SfxPoolItem *pItem = aIter.GetCurItem()) diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx index 94ea0bf08d..1606d0d0df 100644 --- a/sw/source/filter/ww8/writerhelper.hxx +++ b/sw/source/filter/ww8/writerhelper.hxx @@ -590,7 +590,7 @@ namespace sw @author Caolán McNamara */ - void GetPoolItems(const SfxItemSet &rSet, PoolItems &rItems); + void GetPoolItems(const SfxItemSet &rSet, PoolItems &rItems, bool bExportParentItemSet ); const SfxPoolItem *SearchPoolItems(const PoolItems &rItems, sal_uInt16 eType); diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index f0906c4adc..8099c3037f 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -540,7 +540,7 @@ void SwAttrIter::OutAttr( xub_StrLen nSwPos ) ClearOverridesFromSet( *pCharFmtItem, aExportSet ); sw::PoolItems aExportItems; - GetPoolItems( aExportSet, aExportItems ); + GetPoolItems( aExportSet, aExportItems, false ); sw::cPoolItemIter aEnd = aRangeItems.end(); for ( sw::cPoolItemIter aI = aRangeItems.begin(); aI != aEnd; ++aI ) @@ -2310,7 +2310,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) pOutFmtNode = &rNode; // Pap-Attrs, so script is not necessary - OutputItemSet( *pNewSet, true, false, i18n::ScriptType::LATIN); + OutputItemSet( *pNewSet, true, false, i18n::ScriptType::LATIN, false); pStyAttr = 0; pOutFmtNode = pOldMod; diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index da139872e5..0fc020a84b 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -268,7 +268,7 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/, m_rWW8Export.InsUInt16( nFontID ); } - m_rWW8Export.OutputItemSet( *pOutSet, false, true, i18n::ScriptType::LATIN ); + m_rWW8Export.OutputItemSet( *pOutSet, false, true, i18n::ScriptType::LATIN, m_rWW8Export.mbExportModeRTF ); m_rWW8Export.pO = pOldpO; } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 43016e4641..55ed0a378b 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3372,6 +3372,7 @@ MSWordExportBase::MSWordExportBase( SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM mnHdFtIndex(0), pAktPageDesc(0), pPapPlc(0), pChpPlc(0), pChpIter(0), pStyles( NULL ), bHasHdr(false), bHasFtr(false), bSubstituteBullets(true), + mbExportModeRTF( false ), pDoc( pDocument ), pCurPam( pCurrentPam ), pOrigPam( pOriginalPam ) diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 1dc6d265ed..d170acbd7f 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -547,6 +547,8 @@ public: BYTE bHasHdr : 1; BYTE bHasFtr : 1; BYTE bSubstituteBullets : 1; // true: SubstituteBullet() gets called + + bool mbExportModeRTF; SwDoc *pDoc; SwPaM *pCurPam, *pOrigPam; @@ -597,7 +599,7 @@ public: void AppendWordBookmark( const String& rName ); /// Use OutputItem() on an item set according to the parameters. - void OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, USHORT nScript ); + void OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, USHORT nScript, bool bExportParentItemSet ); short GetDefaultFrameDirection( ) const; diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index cde7c02ce4..73d585ad85 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -271,20 +271,21 @@ void MSWordExportBase::ExportPoolItemsToCHP( sw::PoolItems &rItems, USHORT nScri * - gebe die Attribute aus; ohne Parents! */ -void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, USHORT nScript ) +void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, USHORT nScript, + bool bExportParentItemSet ) { - if ( rSet.Count() ) + if( bExportParentItemSet || rSet.Count() ) { const SfxPoolItem* pItem; pISet = &rSet; // fuer Doppel-Attribute // If frame dir is set, but not adjust, then force adjust as well - if ( bPapFmt && SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, false ) ) + if ( bPapFmt && SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, bExportParentItemSet ) ) { // No explicit adjust set ? - if ( SFX_ITEM_SET != rSet.GetItemState( RES_PARATR_ADJUST, false ) ) + if ( SFX_ITEM_SET != rSet.GetItemState( RES_PARATR_ADJUST, bExportParentItemSet ) ) { - if ( 0 != ( pItem = rSet.GetItem( RES_PARATR_ADJUST ) ) ) + if ( 0 != ( pItem = rSet.GetItem( RES_PARATR_ADJUST, bExportParentItemSet ) ) ) { // then set the adjust used by the parent format AttrOutput().OutputItem( *pItem ); @@ -292,7 +293,7 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool } } - if ( bPapFmt && SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, false, &pItem ) ) + if ( bPapFmt && SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, bExportParentItemSet, &pItem ) ) { AttrOutput().OutputItem( *pItem ); @@ -307,7 +308,7 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool } sw::PoolItems aItems; - GetPoolItems( rSet, aItems ); + GetPoolItems( rSet, aItems, bExportParentItemSet ); if ( bChpFmt ) ExportPoolItemsToCHP(aItems, nScript); @@ -783,7 +784,7 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF aSet.Put( aLR ); CorrectTabStopInSet( aSet, rNFmt.GetAbsLSpace() ); OutputItemSet( aSet, bPapFmt, bChpFmt, - i18n::ScriptType::LATIN); + i18n::ScriptType::LATIN, mbExportModeRTF); bCallOutSet = false; } } @@ -801,7 +802,7 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF ItemGet(aSet, RES_LR_SPACE)); aSet.Put( aLR ); OutputItemSet( aSet, bPapFmt, bChpFmt, - com::sun::star::i18n::ScriptType::LATIN); + com::sun::star::i18n::ScriptType::LATIN, mbExportModeRTF); bCallOutSet = false; } // <-- @@ -841,7 +842,7 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF bOutFlyFrmAttrs = true; //script doesn't matter if not exporting chp OutputItemSet(aSet, true, false, - i18n::ScriptType::LATIN); + i18n::ScriptType::LATIN, mbExportModeRTF); bOutFlyFrmAttrs = false; bCallOutSet = false; @@ -855,7 +856,7 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF if( bCallOutSet ) OutputItemSet( rFmt.GetAttrSet(), bPapFmt, bChpFmt, - i18n::ScriptType::LATIN); + i18n::ScriptType::LATIN, mbExportModeRTF); pOutFmtNode = pOldMod; } -- cgit v1.2.3 From f84d7f255d17109f28e84348e8fcc6332b4c1a7a Mon Sep 17 00:00:00 2001 From: os Date: Wed, 20 Oct 2010 16:01:16 +0200 Subject: form control export: check sequence length --- sw/source/filter/ww8/rtfattributeoutput.cxx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 6c68271e56..3925a60c49 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -1662,14 +1662,20 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFTYPE "2"); // 2 = list xPropSet->getPropertyValue(C2U("DefaultSelection")) >>= aIntSeq; - m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFDEFRES); - // a dropdown list can have only one 'selected item by default' - m_aRun.append((sal_Int32)aIntSeq[0]); + if( aIntSeq.getLength() ) + { + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFDEFRES); + // a dropdown list can have only one 'selected item by default' + m_aRun.append((sal_Int32)aIntSeq[0]); + } xPropSet->getPropertyValue(C2U("SelectedItems")) >>= aIntSeq; - m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFRES); - // a dropdown list can have only one 'currently selected item' - m_aRun.append((sal_Int32)aIntSeq[0]); + if( aIntSeq.getLength() ) + { + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFRES); + // a dropdown list can have only one 'currently selected item' + m_aRun.append((sal_Int32)aIntSeq[0]); + } sName = C2U("Name"); if (xPropSetInfo->hasPropertyByName(sName)) -- cgit v1.2.3 From 172da5c9ba2c856df3180d70ade18bb83140a02a Mon Sep 17 00:00:00 2001 From: os Date: Wed, 20 Oct 2010 17:41:22 +0200 Subject: output of \ffhaslistbox moved --- sw/source/filter/ww8/rtfattributeoutput.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 3925a60c49..066a4e9903 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -1660,6 +1660,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi m_aRun.append(OUStringToOString(OUString(FieldString(ww::eFORMDROPDOWN)), m_rExport.eCurrentEncoding)); m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FORMFIELD "{"); m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFTYPE "2"); // 2 = list + m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFHASLISTBOX); xPropSet->getPropertyValue(C2U("DefaultSelection")) >>= aIntSeq; if( aIntSeq.getLength() ) @@ -1706,7 +1707,6 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi m_aRun.append('}'); } - m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFHASLISTBOX); xPropSet->getPropertyValue(C2U("StringItemList")) >>= aStrSeq; sal_uInt32 nListItems = aStrSeq.getLength(); -- cgit v1.2.3 From d7666f0862d063cb682db6aff448e7b84aa4ccad Mon Sep 17 00:00:00 2001 From: os Date: Fri, 22 Oct 2010 10:24:33 +0200 Subject: store fline(0) if no border is set, drop export of fLineDrawDash --- sw/source/filter/ww8/rtfsdrexport.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index 51becb1c90..9953ffb871 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -222,8 +222,9 @@ void RtfSdrExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRe m_aShapeProps.insert(std::pair(OString("fNoFillHitTest"), OString::valueOf(sal_Int32(1)))); break; case ESCHER_Prop_fNoLineDrawDash: - if (it->nPropValue) - m_aShapeProps.insert(std::pair(OString("fNoLineDrawDash"), OString::valueOf(sal_Int32(1)))); + // for some reason the value is set to 0x90000 if lines are switched off + if( it->nPropValue == 0x90000 ) + m_aShapeProps.insert(std::pair(OString("fLine"), OString::valueOf(sal_Int32(0)))); break; case ESCHER_Prop_lineColor: m_aShapeProps.insert(std::pair(OString("lineColor"), OString::valueOf(sal_Int32(it->nPropValue)))); -- cgit v1.2.3 From b0c1ecbd6141211d5be695579d7d3fe4adcb0490 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 22 Oct 2010 10:48:39 +0200 Subject: CWS changehid: #i113152#: arguments shall be checked only for plugins --- sw/source/ui/shells/textsh.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 39b156cee1..0326473a08 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -292,17 +292,13 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) pName = &aName; } - SFX_REQUEST_ARG( rReq, pClassItem, SfxStringItem, FN_PARAM_1, sal_False ); SFX_REQUEST_ARG( rReq, pClassLocationItem, SfxStringItem, FN_PARAM_2, sal_False ); SFX_REQUEST_ARG( rReq, pCommandsItem, SfxStringItem, FN_PARAM_3, sal_False ); //TODO/LATER: recording currently not working, need code for Commandlist svt::EmbeddedObjectRef xObj; - if( pClassItem || pClassLocationItem || pCommandsItem ) + if( nSlot == SID_INSERT_PLUGIN && ( pClassLocationItem || pCommandsItem ) ) { - String sClass; String sClassLocation; - if(pClassItem) - sClass = pClassItem->GetValue(); if(pClassLocationItem) sClassLocation = pClassLocationItem->GetValue(); -- cgit v1.2.3 From 3b2522df246ff7e0bfd5662ecbe5a6e135165a76 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 22 Oct 2010 17:53:18 +0200 Subject: sw34bf01: #i85766# #i112425#: prevent expansion of fields in actual documents: because various fields only expand to correct values with "special handling" that is only done in text formatting, use the clipboard value cache even in _real_ documents. --- sw/inc/fldbas.hxx | 8 ++++++-- sw/inc/txtfld.hxx | 3 +-- sw/source/core/crsr/crstrvl.cxx | 3 +-- sw/source/core/crsr/findtxt.cxx | 3 +-- sw/source/core/doc/doc.cxx | 2 +- sw/source/core/edit/edattr.cxx | 2 +- sw/source/core/edit/edfld.cxx | 3 +-- sw/source/core/fields/cellfml.cxx | 2 +- sw/source/core/fields/fldbas.cxx | 7 ++++--- sw/source/core/text/itratr.cxx | 7 ++----- sw/source/core/tox/txmsrt.cxx | 4 +--- sw/source/core/txtnode/atrfld.cxx | 5 ++--- sw/source/core/txtnode/ndtxt.cxx | 7 +++---- sw/source/core/txtnode/thints.cxx | 3 +-- sw/source/core/unocore/unofield.cxx | 2 +- sw/source/filter/ascii/ascatr.cxx | 2 +- sw/source/filter/html/htmlfldw.cxx | 2 +- sw/source/filter/rtf/rtfatr.cxx | 6 +++--- sw/source/filter/ww8/wrtw8esh.cxx | 2 +- sw/source/filter/ww8/ww8atr.cxx | 10 +++++----- sw/source/ui/docvw/edtwin2.cxx | 3 +-- sw/source/ui/fldui/inpdlg.cxx | 2 +- 22 files changed, 40 insertions(+), 48 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index d9cf51ee26..64869db8d5 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -326,10 +326,14 @@ public: virtual SwFieldType* ChgTyp( SwFieldType* ); /** expand the field. - @param bInClipboard field is in clipboard document? + @param bCached return cached field value. + @remark most callers should use the cached field value. + this is because various fields need special handing + (ChangeExpansion()) to return correct values, and only + SwTxtFormatter::NewFldPortion() sets things up properly. @return the generated text (suitable for display) */ - String ExpandField(bool const bInClipboard) const; + String ExpandField(bool const bCached) const; virtual String GetFieldName() const; diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx index 6ba1e25966..262f716b3c 100644 --- a/sw/inc/txtfld.hxx +++ b/sw/inc/txtfld.hxx @@ -41,8 +41,7 @@ class SwTxtFld : public SwTxtAttr SwTxtNode * m_pTxtNode; public: - SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStart, - bool const bInClipboard); + SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStart); virtual ~SwTxtFld(); void CopyFld( SwTxtFld *pDest ) const; diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index fce9273ef3..8b76742797 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -717,8 +717,7 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext, SwFmtFld* pFmtFld = new SwFmtFld( SwDateTimeField( (SwDateTimeFieldType*)pDoc->GetSysFldType( RES_DATETIMEFLD ) ) ); - pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex(), - pDoc->IsClipBoard() ); + pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex() ); pTxtFld->ChgTxtNode( pTNd ); } diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index 814fd21bbf..6c3404e4de 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -143,8 +143,7 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart, // hinterher alle am Stringende (koenten ja 'normale' 0x7f drinstehen BOOL bEmpty = RES_TXTATR_FIELD != pHt->Which() || !(static_cast(pHt) - ->GetFld().GetFld()->ExpandField( - rNd.GetDoc()->IsClipBoard()).Len()); + ->GetFld().GetFld()->ExpandField(true).Len()); if ( bEmpty && nStart == nAkt ) { rArr.Insert( nAkt, rArr.Count() ); diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 163d43b50b..1e38190089 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -2451,7 +2451,7 @@ BOOL SwDoc::ConvertFieldsToText() nWhich != RES_REFPAGEGETFLD&& nWhich != RES_REFPAGESETFLD)) { - String sText = pField->ExpandField( this->IsClipBoard() ); + String sText = pField->ExpandField(true); //database fields should not convert their command into text if( RES_DBFLD == pCurType->Which() && !static_cast(pField)->IsInitialized()) sText.Erase(); diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index b639c37a23..701f013f0a 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -457,7 +457,7 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos, const SwField* const pFld = pAttr->GetFld().GetFld(); if (pFld) { - sExp += pFld->ExpandField(rTNd.GetDoc()->IsClipBoard()); + sExp += pFld->ExpandField(true); } } } diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx index 8c5b02794e..dcec24e2c8 100644 --- a/sw/source/core/edit/edfld.cxx +++ b/sw/source/core/edit/edfld.cxx @@ -224,8 +224,7 @@ void SwEditShell::FieldToText( SwFieldType* pType ) *pFmtFld->GetTxtFld()->GetStart() ); // Feldinhalt durch Text ersetzen - String const aEntry( - pFmtFld->GetFld()->ExpandField(GetDoc()->IsClipBoard()) ); + String const aEntry( pFmtFld->GetFld()->ExpandField(true) ); pPaM->SetMark(); pPaM->Move( fnMoveForward ); GetDoc()->DeleteRange( *pPaM ); diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index fb98a31c93..b93d14ae5c 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -203,7 +203,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const break; default: - String const value(pFld->ExpandField(pDoc->IsClipBoard())); + String const value(pFld->ExpandField(true)); nRet = rCalcPara.rCalc.Calculate(value).GetDouble(); } } diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index 1475956373..af78843912 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -427,9 +427,9 @@ BOOL SwField::IsFixed() const return bRet; } -String SwField::ExpandField(bool const bInClipboard) const +String SwField::ExpandField(bool const bCached) const { - if (!bInClipboard) // #i85766# do not expand fields in clipboard documents + if (!bCached) // #i85766# do not expand fields in clipboard documents { m_Cache = Expand(); } @@ -440,7 +440,8 @@ SwField * SwField::CopyField() const { SwField *const pNew = Copy(); // #i85766# cache expansion of source (for clipboard) - pNew->m_Cache = Expand(); + // use this->cache, not this->Expand(): only text formatting calls Expand() + pNew->m_Cache = m_Cache; return pNew; } diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index 1a6a398e56..c335380347 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -779,9 +779,7 @@ void SwTxtNode::GetMinMaxSize( ULONG nIndex, ULONG& rMin, ULONG &rMax, case RES_TXTATR_FIELD : { SwField *pFld = (SwField*)pHint->GetFld().GetFld(); - SwDoc const*const pDoc(GetDoc()); - const String aTxt = - pFld->ExpandField(pDoc->IsClipBoard()); + const String aTxt = pFld->ExpandField(true); if( lcl_MinMaxString( aArg, aIter.GetFnt(), aTxt, 0, aTxt.Len() ) ) nAdd = 20; @@ -984,8 +982,7 @@ USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd ) case RES_TXTATR_FIELD : { SwField *pFld = (SwField*)pHint->GetFld().GetFld(); - SwDoc const*const pDoc( GetDoc() ); - String const aTxt = pFld->ExpandField(pDoc->IsClipBoard()); + String const aTxt = pFld->ExpandField(true); SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aTxt, 0, aTxt.Len() ); nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width(); diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index 0a4936a7ce..ce3b8f90bb 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -868,9 +868,7 @@ USHORT SwTOXAuthority::GetLevel() const -----------------------------------------------------------------------*/ static String lcl_GetText(SwFmtFld const& rField) { - bool const isClipBoard( - rField.GetTxtFld()->GetTxtNode().GetDoc()->IsClipBoard()); - return rField.GetFld()->ExpandField(isClipBoard); + return rField.GetFld()->ExpandField(true); } void SwTOXAuthority::GetText_Impl( String& rTxt, String& ) const diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index a2fbd39f9f..ffe85c51d1 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -259,10 +259,9 @@ BOOL SwFmtFld::IsProtect() const |* *************************************************************************/ -SwTxtFld::SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStartPos, - bool const bInClipboard) +SwTxtFld::SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStartPos) : SwTxtAttr( rAttr, nStartPos ) - , m_aExpand( rAttr.GetFld()->ExpandField(bInClipboard) ) + , m_aExpand( rAttr.GetFld()->ExpandField(true) ) , m_pTxtNode( 0 ) { rAttr.pTxtAttr = this; diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 793f758bfb..2e1775bf19 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3067,8 +3067,7 @@ void SwTxtNode::Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt, { const XubString aExpand( static_cast(pAttr)->GetFld() - .GetFld()->ExpandField( - GetDoc()->IsClipBoard())); + .GetFld()->ExpandField(true)); rTxt.Insert( aExpand, nPos ); nPos = nPos + aExpand.Len(); nEndPos = nEndPos + aExpand.Len(); @@ -3217,7 +3216,7 @@ BOOL SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, { XubString const aExpand( static_cast(pHt)->GetFld().GetFld() - ->ExpandField(GetDoc()->IsClipBoard())); + ->ExpandField(true)); if( aExpand.Len() ) { aDestIdx++; // dahinter einfuegen; @@ -3315,7 +3314,7 @@ const ModelToViewHelper::ConversionMap* { const XubString aExpand( static_cast(pAttr)->GetFld().GetFld() - ->ExpandField(GetDoc()->IsClipBoard())); + ->ExpandField(true)); if ( aExpand.Len() > 0 ) { const xub_StrLen nFieldPos = *pAttr->GetStart(); diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index b86595b102..c622a8ea34 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1043,8 +1043,7 @@ SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr, pNew = new SwTxtINetFmt( (SwFmtINetFmt&)rNew, nStt, nEnd ); break; case RES_TXTATR_FIELD: - pNew = new SwTxtFld( static_cast(rNew), nStt, - rDoc.IsClipBoard() ); + pNew = new SwTxtFld( static_cast(rNew), nStt ); break; case RES_TXTATR_FLYCNT: { diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index b7eb0b4c3a..fd4fbdc5eb 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -1275,7 +1275,7 @@ OUString SwXTextField::getPresentation(sal_Bool bShowCommand) throw( uno::Runtim } ::rtl::OUString const ret( (bShowCommand) ? pField->GetFieldName() - : pField->ExpandField( GetDoc()->IsClipBoard() ) ); + : pField->ExpandField(true) ); return ret; } /* -----------------18.02.99 13:39------------------- diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index 280ecf1166..4d52488de5 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -125,7 +125,7 @@ BOOL SwASC_AttrIter::OutAttr( xub_StrLen nSwPos ) { case RES_TXTATR_FIELD: sOut = static_cast(pHt)->GetFld().GetFld() - ->ExpandField(rWrt.pDoc->IsClipBoard()); + ->ExpandField(true); break; case RES_TXTATR_FTN: diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx index 32234b7929..a60fd36daf 100644 --- a/sw/source/filter/html/htmlfldw.cxx +++ b/sw/source/filter/html/htmlfldw.cxx @@ -305,7 +305,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, } // Inhalt des Feldes ausgeben - String const sExpand( pFld->ExpandField(rWrt.pDoc->IsClipBoard()) ); + String const sExpand( pFld->ExpandField(true) ); sal_Bool bNeedsCJKProcessing = sal_False; if( sExpand.Len() ) { diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx index 9504336434..77f3cafb61 100644 --- a/sw/source/filter/rtf/rtfatr.cxx +++ b/sw/source/filter/rtf/rtfatr.cxx @@ -2903,7 +2903,7 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt ) case RES_HIDDENTXTFLD: if( TYP_CONDTXTFLD == ((SwHiddenTxtField*)pFld)->GetSubType() ) RTFOutFuncs::Out_String( rWrt.Strm(), - pFld->ExpandField(rWrt.pDoc->IsClipBoard()), + pFld->ExpandField(true), rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); else { @@ -2960,7 +2960,7 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt ) if( ' ' != cCh ) // vorweg immer einen Trenner rWrt.Strm() << ' '; RTFOutFuncs::Out_String( rWrt.Strm(), - pFld->ExpandField(rWrt.pDoc->IsClipBoard()), + pFld->ExpandField(true), rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); } break; @@ -2970,7 +2970,7 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt ) { rWrt.Strm() << "}{" << OOO_STRING_SVTOOLS_RTF_FLDRSLT << ' '; RTFOutFuncs::Out_String( rWrt.Strm(), - pFld->ExpandField(rWrt.pDoc->IsClipBoard()), + pFld->ExpandField(true), rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); rWrt.Strm() << "}}"; rRTFWrt.bOutFmtAttr = FALSE; diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 392ad1383b..70f5ab5a89 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -343,7 +343,7 @@ void WW8Export::DoFormText(const SwInputField * pFld) OutputField(0, ww::eFORMTEXT, aEmptyStr, WRITEFIELD_CMD_END); - String const fieldStr( pFld->ExpandField(pDoc->IsClipBoard()) ); + String const fieldStr( pFld->ExpandField(true) ); SwWW8Writer::WriteString16(Strm(), fieldStr, false); static BYTE aArr2[] = { diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index d4a78322e4..024ba63e4a 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -1743,9 +1743,9 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c, aItems.GetData()); } -String lcl_GetExpandedField(const SwField &rFld, SwDoc const& rDoc) +String lcl_GetExpandedField(const SwField &rFld) { - String sRet(rFld.ExpandField(rDoc.IsClipBoard())); + String sRet(rFld.ExpandField(true)); //replace LF 0x0A with VT 0x0B sRet.SearchAndReplaceAll(0x0A, 0x0B); @@ -1871,7 +1871,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType, { String sOut; if( pFld ) - sOut = lcl_GetExpandedField(*pFld, *pDoc); + sOut = lcl_GetExpandedField(*pFld); else sOut = rFldCmd; if( sOut.Len() ) @@ -2598,7 +2598,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef) sStr.APPEND_CONST_ASC( "\" " ); m_rWW8Export.OutputField( &rFld, ww::eREF, sStr, WRITEFIELD_START | WRITEFIELD_CMD_START | WRITEFIELD_CMD_END ); - String sVar = lcl_GetExpandedField( rFld, *GetExport().pDoc ); + String sVar = lcl_GetExpandedField( rFld ); if ( sVar.Len() ) { if ( m_rWW8Export.IsUnicode() ) @@ -2614,7 +2614,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef) void WW8AttributeOutput::WriteExpand( const SwField* pFld ) { - String sExpand( lcl_GetExpandedField( *pFld, *GetExport().pDoc ) ); + String sExpand( lcl_GetExpandedField( *pFld ) ); if ( m_rWW8Export.IsUnicode() ) SwWW8Writer::WriteString16( m_rWW8Export.Strm(), sExpand, false ); else diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx index 5dd0d7ca58..f84c74f0a2 100644 --- a/sw/source/ui/docvw/edtwin2.cxx +++ b/sw/source/ui/docvw/edtwin2.cxx @@ -304,8 +304,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) { USHORT nOldSubType = pFld->GetSubType(); ((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD); - sTxt = - pFld->ExpandField(rSh.GetDoc()->IsClipBoard()); + sTxt = pFld->ExpandField(true); ((SwField*)pFld)->SetSubType(nOldSubType); } break; diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx index 3ef4dc7431..a197147021 100644 --- a/sw/source/ui/fldui/inpdlg.cxx +++ b/sw/source/ui/fldui/inpdlg.cxx @@ -119,7 +119,7 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS, CharClass aCC( SvxCreateLocale( pSetFld->GetLanguage() )); if( aCC.isNumeric( sFormula )) { - aStr = pSetFld->ExpandField(false/*no dialogs for clipboard*/); + aStr = pSetFld->ExpandField(true); } else aStr = sFormula; -- cgit v1.2.3 From a2e96f8c9705dc899b2e1671259dc34b3f1023bc Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Sat, 23 Oct 2010 15:48:00 +0200 Subject: svarray: #i112395#: fix warnings, enable exceptions, etc. --- starmath/source/cfgitem.cxx | 3 ++- sw/source/core/doc/docfld.cxx | 32 ++++++++++++------------ sw/source/core/frmedt/makefile.mk | 2 +- sw/source/core/inc/scriptinfo.hxx | 2 +- sw/source/core/layout/makefile.mk | 1 + sw/source/core/undo/makefile.mk | 1 + sw/source/filter/html/htmlatr.cxx | 7 +++--- sw/source/filter/html/makefile.mk | 2 ++ sw/source/filter/rtf/makefile.mk | 1 + sw/source/filter/rtf/rtftbl.cxx | 51 ++++++++++++++++++++++++--------------- sw/source/filter/rtf/swparrtf.cxx | 4 +-- sw/source/filter/rtf/swparrtf.hxx | 2 +- sw/source/ui/chrdlg/makefile.mk | 3 +++ 13 files changed, 68 insertions(+), 43 deletions(-) (limited to 'sw/source') diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index 10eafd370a..5973e8b0d6 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -815,7 +815,8 @@ void SmMathConfig::SaveFontFormatList() pVal->Value <<= (INT16) aFntFmt.nItalic; pVal++; } - DBG_ASSERT( pVal - pValues == nCount * nSymbolProps, "properties missing" ); + DBG_ASSERT( static_cast(pVal - pValues) == (nCount * nSymbolProps), + "properties missing" ); ReplaceSetProperties( A2OU( FONT_FORMAT_LIST ) , aValues ); rFntFmtList.SetModified( FALSE ); diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 86f81c6daf..38a16bd695 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -436,9 +436,8 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt ) "Was ist das fuer ein MessageItem?" ); SwFieldType* pFldType(0); - sal_uInt32 i; - for( i = 0; i < pFldTypes->Count(); ++i ) + for (USHORT i = 0; i < pFldTypes->Count(); ++i) { if( RES_TABLEFLD == ( pFldType = (*pFldTypes)[i] )->Which() ) { @@ -508,12 +507,14 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt ) // und dann noch alle Tabellen Box Formeln abklappern const SfxPoolItem* pItem; sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_BOXATR_FORMULA ); - for( i = 0; i < nMaxItems; ++i ) + for (sal_uInt32 i = 0; i < nMaxItems; ++i) + { if( 0 != (pItem = GetAttrPool().GetItem2( RES_BOXATR_FORMULA, i ) ) && ((SwTblBoxFormula*)pItem)->GetDefinedIn() ) { ((SwTblBoxFormula*)pItem)->ChangeState( pHt ); } + } // alle Felder/Boxen sind jetzt invalide, also kann das Rechnen anfangen @@ -608,7 +609,8 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt ) } // dann berechene noch die Formeln an den Boxen - for( i = 0; i < nMaxItems; ++i ) + for (sal_uInt32 i = 0; i < nMaxItems; ++i ) + { if( 0 != (pItem = GetAttrPool().GetItem2( RES_BOXATR_FORMULA, i ) ) && ((SwTblBoxFormula*)pItem)->GetDefinedIn() && !((SwTblBoxFormula*)pItem)->IsValid() ) @@ -685,6 +687,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt ) } } } + } if( pCalc ) delete pCalc; @@ -1732,7 +1735,6 @@ String lcl_DBDataToString(const SwDBData& rData) void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList, const SvStringsDtor* pAllDBNames ) { - sal_uInt32 n; SvStringsDtor aUsedDBNames; SvStringsDtor aAllDBNames; @@ -1743,7 +1745,7 @@ void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList, } SwSectionFmts& rArr = GetSections(); - for( n = rArr.Count(); n; ) + for (USHORT n = rArr.Count(); n; ) { SwSection* pSect = rArr[ --n ]->GetSection(); @@ -1758,7 +1760,7 @@ void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList, const SfxPoolItem* pItem; sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_FIELD ); - for( n = 0; n < nMaxItems; ++n ) + for (sal_uInt32 n = 0; n < nMaxItems; ++n) { if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) )) continue; @@ -1916,10 +1918,9 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames, aNewDBData.nCommandType = (short)rNewName.GetToken(2, DB_DELIM).ToInt32(); String sFormel; - sal_uInt32 n; SwSectionFmts& rArr = GetSections(); - for( n = rArr.Count(); n; ) + for (USHORT n = rArr.Count(); n; ) { SwSection* pSect = rArr[ --n ]->GetSection(); @@ -1934,7 +1935,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames, const SfxPoolItem* pItem; sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_FIELD ); - for( n = 0; n < nMaxItems; ++n ) + for (sal_uInt32 n = 0; n < nMaxItems; ++n ) { if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) )) continue; @@ -2329,9 +2330,8 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode ) SwSectionNode* pSectNd; USHORT nArrStt = 0; ULONG nSttCntnt = rDoc.GetNodes().GetEndOfExtras().GetIndex(); - sal_uInt32 n; - for( n = rArr.Count(); n; ) + for (USHORT n = rArr.Count(); n; ) { SwSection* pSect = rArr[ --n ]->GetSection(); if( pSect && pSect->IsHidden() && pSect->GetCondition().Len() && @@ -2351,13 +2351,13 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode ) // erst alle anzeigen, damit die Frames vorhanden sind. Mit deren // Position wird das BodyAnchor ermittelt. // Dafuer erst den ContentBereich, dann die Sonderbereiche!!! - for( n = nArrStt; n < aTmpArr.Count(); ++n ) + for (USHORT n = nArrStt; n < aTmpArr.Count(); ++n) { pSectNd = rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode(); ASSERT( pSectNd, "Wo ist mein SectionNode" ); pSectNd->GetSection().SetCondHidden( FALSE ); } - for( n = 0; n < nArrStt; ++n ) + for (USHORT n = 0; n < nArrStt; ++n) { pSectNd = rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode(); ASSERT( pSectNd, "Wo ist mein SectionNode" ); @@ -2365,8 +2365,10 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode ) } // so, erst jetzt alle sortiert in die Liste eintragen - for( n = 0; n < aTmpArr.Count(); ++n ) + for (USHORT n = 0; n < aTmpArr.Count(); ++n) + { GetBodyNode( *rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode() ); + } } String sTrue( String::CreateFromAscii( diff --git a/sw/source/core/frmedt/makefile.mk b/sw/source/core/frmedt/makefile.mk index 8b277f8994..45344a44f5 100644 --- a/sw/source/core/frmedt/makefile.mk +++ b/sw/source/core/frmedt/makefile.mk @@ -62,9 +62,9 @@ SLOFILES = $(EXCEPTIONSFILES) \ $(SLO)$/feflyole.obj \ $(SLO)$/feshview.obj \ $(SLO)$/fetab.obj \ - $(SLO)$/tblsel.obj EXCEPTIONSFILES=\ + $(SLO)$/tblsel.obj \ $(SLO)$/fecopy.obj \ $(SLO)$/fefly1.obj \ $(SLO)$/fews.obj diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx index fb9f59654a..910385285d 100644 --- a/sw/source/core/inc/scriptinfo.hxx +++ b/sw/source/core/inc/scriptinfo.hxx @@ -364,7 +364,7 @@ inline xub_StrLen SwScriptInfo::GetScriptChg( const size_t nCnt ) const } inline BYTE SwScriptInfo::GetScriptType( const xub_StrLen nCnt ) const { - ASSERT( nCnt < aScriptType.Count(),"No ScriptType today!"); + ASSERT( nCnt < aScriptType.size(),"No ScriptType today!"); return aScriptType[ nCnt ]; } diff --git a/sw/source/core/layout/makefile.mk b/sw/source/core/layout/makefile.mk index 7019203aa2..076069b513 100644 --- a/sw/source/core/layout/makefile.mk +++ b/sw/source/core/layout/makefile.mk @@ -49,6 +49,7 @@ CDEFS+=-DDEBUG EXCEPTIONSFILES = \ $(SLO)$/anchoreddrawobject.obj \ $(SLO)$/flycnt.obj \ + $(SLO)$/layact.obj \ $(SLO)$/laycache.obj \ $(SLO)$/layouter.obj \ $(SLO)$/movedfwdfrmsbyobjpos.obj \ diff --git a/sw/source/core/undo/makefile.mk b/sw/source/core/undo/makefile.mk index c381761adb..35771fa444 100644 --- a/sw/source/core/undo/makefile.mk +++ b/sw/source/core/undo/makefile.mk @@ -49,6 +49,7 @@ EXCEPTIONSFILES = \ $(SLO)$/unattr.obj \ $(SLO)$/undobj.obj \ $(SLO)$/undraw.obj \ + $(SLO)$/unnum.obj \ $(SLO)$/unovwr.obj \ $(SLO)$/untbl.obj diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 58f3457ba0..13164ee383 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -1250,8 +1250,9 @@ class HTMLEndPosLst SvXub_StrLens aScriptChgLst; // positions where script changes // 0 is not contained in this list, // but the text length - SvUShorts aScriptLst; // the script that is valif up to the position - // contained in aScriptChgList at the same index + // the script that is valif up to the position + // contained in aScriptChgList at the same index + ::std::vector aScriptLst; SwDoc *pDoc; // das aktuelle Dokument SwDoc* pTemplate; // die HTML-Vorlage (oder 0) @@ -1798,7 +1799,7 @@ HTMLEndPosLst::HTMLEndPosLst( SwDoc *pD, SwDoc* pTempl, sal_uInt16 nScript = pBreakIt->GetBreakIter()->getScriptType( rText, nPos ); nPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( rText, nPos, nScript ); aScriptChgLst.push_back( nPos ); - aScriptLst.Insert( nScript, aScriptLst.Count() ); + aScriptLst.push_back( nScript ); } } diff --git a/sw/source/filter/html/makefile.mk b/sw/source/filter/html/makefile.mk index b99cc67894..495a415d02 100644 --- a/sw/source/filter/html/makefile.mk +++ b/sw/source/filter/html/makefile.mk @@ -71,7 +71,9 @@ SLOFILES = \ $(SLO)$/SwAppletImpl.obj \ EXCEPTIONSFILES = \ + $(SLO)$/htmlatr.obj \ $(SLO)$/htmlfld.obj \ + $(SLO)$/htmlgrin.obj \ $(SLO)$/htmlplug.obj \ $(SLO)$/htmlsect.obj \ $(SLO)$/swhtml.obj \ diff --git a/sw/source/filter/rtf/makefile.mk b/sw/source/filter/rtf/makefile.mk index 2ff764d730..5be61050a5 100644 --- a/sw/source/filter/rtf/makefile.mk +++ b/sw/source/filter/rtf/makefile.mk @@ -46,6 +46,7 @@ CDEFS=$(CDEFS) -Dmydebug EXCEPTIONSFILES= \ $(SLO)$/rtffly.obj \ $(SLO)$/rtfnum.obj \ + $(SLO)$/rtftbl.obj \ $(SLO)$/swparrtf.obj \ $(SLO)$/wrtrtf.obj diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx index a4c564048c..aee78ae585 100644 --- a/sw/source/filter/rtf/rtftbl.cxx +++ b/sw/source/filter/rtf/rtftbl.cxx @@ -177,7 +177,7 @@ void SwRTFParser::ReadTable( int nToken ) // Flag for delete merged boxes aMergeBoxes.clear(); aMergeBoxes.push_back( (BOOL)FALSE ); - nAktBox = 0; + m_nCurrentBox = 0; // wenn schon in einer Tabellen, dann splitte oder benutze // die bisherigen Boxen weiter @@ -191,11 +191,11 @@ void SwRTFParser::ReadTable( int nToken ) // very robust to avoid crashes like bug 127425 + crash reports 118743 if( pLine ) { - USHORT nTmpBox = nAktBox; + USHORT nTmpBox = m_nCurrentBox; if( nTmpBox > pLine->GetTabBoxes().Count() ) nTmpBox = pLine->GetTabBoxes().Count(); - for( USHORT n = nTmpBox; n; ) + for (USHORT n = nTmpBox; n; ) { const SwTableBox *pTmp = pLine->GetTabBoxes()[ --n ]; if( pTmp ) @@ -294,7 +294,8 @@ void SwRTFParser::ReadTable( int nToken ) break; case RTF_CELLX: - if (!bTrowdRead) { + if (!bTrowdRead && (aMergeBoxes.size() < (SAL_MAX_UINT16 - 1))) + { SwTableBoxFmt* pFmt = pBoxFmt; SwTwips nSize = nTokenValue - nTblSz; if( aMergeBoxes.back() ) @@ -305,9 +306,12 @@ void SwRTFParser::ReadTable( int nToken ) { SwTableLines& rLns = pTableNode->GetTable().GetTabLines(); SwTableLine* pLine = rLns[ rLns.Count()-1 ]; - if(nAktBox!=0) - --nAktBox; - pFmt = (SwTableBoxFmt*)pLine->GetTabBoxes()[ nAktBox ]->GetFrmFmt(); + if (m_nCurrentBox != 0) + { + --m_nCurrentBox; + } + pFmt = static_cast( + pLine->GetTabBoxes()[ m_nCurrentBox ]->GetFrmFmt()); } else pFmt = aBoxFmts[ aBoxFmts.Count()-1 ]; @@ -522,7 +526,7 @@ void SwRTFParser::ReadTable( int nToken ) delete pBoxFmt; // It has been recognized as not single box - if( nAktBox == nBoxCnt || ( bReadNewCell && !pTableNode )) + if ((m_nCurrentBox == nBoxCnt) || ( bReadNewCell && !pTableNode )) { aMergeBoxes = aMergeBackup; SkipToken( -1 ); // go back to the last valid @@ -632,7 +636,9 @@ void SwRTFParser::ReadTable( int nToken ) aBoxFmts.Remove( 0, n ); if( aBoxFmts.Count() ) // es muessen noch neue zugefuegt werden - nAktBox = n; + { + m_nCurrentBox = n; + } else // es mussen noch Boxen geloescht werden { // remove ContentIndex of other Bound @@ -742,7 +748,7 @@ void SwRTFParser::ReadTable( int nToken ) ((SfxItemSet&)pFmt->GetAttrSet()).Put( aL ); } - nAktBox = 0; + m_nCurrentBox = 0; pOldTblNd = pTableNode; { @@ -794,12 +800,14 @@ void SwRTFParser::ReadTable( int nToken ) aBoxFmts[ nStt ], // Formate fuer den TextNode der Box pColl, 0, - nAktBox + nStt, 1 ); + m_nCurrentBox + nStt, 1 ); } } if( bChkExistTbl ) - nAktBox = 0; + { + m_nCurrentBox = 0; + } maInsertedTables.InsertTable(*pTableNode, *pPam); @@ -811,7 +819,8 @@ void SwRTFParser::ReadTable( int nToken ) if (pNewLine) { SwTableBoxes &rBoxes = pNewLine->GetTabBoxes(); - if (SwTableBox* pBox = (nAktBox < rBoxes.Count() ? rBoxes[nAktBox] : 0)) + if (SwTableBox* pBox = ((m_nCurrentBox < rBoxes.Count()) + ? rBoxes[m_nCurrentBox] : 0)) { if (const SwStartNode *pStart = pBox->GetSttNd()) { @@ -881,16 +890,19 @@ void SwRTFParser::GotoNextBox() SwTableBoxes& rBoxes = pLine->GetTabBoxes(); SwTableBox* pBox = rBoxes[ rBoxes.Count()-1 ]; - if( ++nAktBox >= aMergeBoxes.size() ) - nAktBox = aMergeBoxes.size()-1; + if (++m_nCurrentBox >= aMergeBoxes.size()) + { + OSL_ENSURE(aMergeBoxes.size() < SAL_MAX_UINT16, "too many boxes?"); + m_nCurrentBox = static_cast(aMergeBoxes.size()-1); + } - if( !aMergeBoxes[ nAktBox ] ) + if (!aMergeBoxes[ m_nCurrentBox ]) { int bMove = TRUE; if( pBox->GetSttIdx() > pPam->GetPoint()->nNode.GetIndex() ) { USHORT nRealBox = 0; - for( USHORT nTmp = 0; nTmp < nAktBox; ++nTmp ) + for (USHORT nTmp = 0; nTmp < m_nCurrentBox; ++nTmp) if( !aMergeBoxes[ nTmp ] ) ++nRealBox; @@ -902,7 +914,8 @@ void SwRTFParser::GotoNextBox() } } - if( bMove && nAktBox + 1 == aMergeBoxes.size() ) + if (bMove && + (static_cast(m_nCurrentBox + 1) == aMergeBoxes.size())) // dann hinter die Tabelle pPam->Move( fnMoveForward, fnGoNode ); } @@ -968,7 +981,7 @@ void SwRTFParser::NewTblLine() ULONG nOldPos = pPam->GetPoint()->nNode.GetIndex(); pPam->GetPoint()->nNode = *pBox->GetSttNd(); pPam->Move( fnMoveForward ); - nAktBox = 0; + m_nCurrentBox = 0; // alle Nodes in den Boxen auf die "default" Vorlage setzten { diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index a27847ae65..c1d5b6ca2c 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -204,7 +204,7 @@ SwRTFParser::SwRTFParser(SwDoc* pD, sBaseURL( rBaseURL ), nAktPageDesc(0), nAktFirstPageDesc(0), - nAktBox(0), + m_nCurrentBox(0), nInsTblRow(USHRT_MAX), nNewNumSectDef(USHRT_MAX), nRowsToRepeat(0), @@ -1758,7 +1758,7 @@ void SwRTFParser::NextToken( int nToken ) if (!CantUseTables()) { // aus der Line raus - nAktBox = 0; + m_nCurrentBox = 0; pTableNode = 0; // noch in der Tabelle drin? SwNodeIndex& rIdx = pPam->GetPoint()->nNode; diff --git a/sw/source/filter/rtf/swparrtf.hxx b/sw/source/filter/rtf/swparrtf.hxx index 4eeb454d8f..4c8373f759 100644 --- a/sw/source/filter/rtf/swparrtf.hxx +++ b/sw/source/filter/rtf/swparrtf.hxx @@ -318,7 +318,7 @@ class SwRTFParser : public SvxRTFParser String sBaseURL; USHORT nAktPageDesc, nAktFirstPageDesc; - USHORT nAktBox; // akt. Box + USHORT m_nCurrentBox; USHORT nInsTblRow; // beim nach \row kein \pard -> neue Line anlegen USHORT nNewNumSectDef; // jeder SectionWechsel kann neue Rules definieren USHORT nRowsToRepeat; diff --git a/sw/source/ui/chrdlg/makefile.mk b/sw/source/ui/chrdlg/makefile.mk index 42aad1aedd..6b05d0fbfb 100644 --- a/sw/source/ui/chrdlg/makefile.mk +++ b/sw/source/ui/chrdlg/makefile.mk @@ -30,6 +30,9 @@ PRJ=..$/..$/.. PRJNAME=sw TARGET=chrdlg LIBTARGET=NO + +ENABLE_EXCEPTIONS=TRUE + # --- Settings ----------------------------------------------------- .INCLUDE : $(PRJ)$/inc$/swpre.mk -- cgit v1.2.3 From e60ddfc29cbdc9586bf6ef224b63ab7eb5714e78 Mon Sep 17 00:00:00 2001 From: os Date: Wed, 27 Oct 2010 08:17:18 +0200 Subject: crash on access to TableNodeInfoInner prevented --- sw/source/filter/ww8/rtfattributeoutput.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 066a4e9903..e46083b4b6 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -264,7 +264,8 @@ void RtfAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextN if ( m_nTableDepth > 0 && !m_bTableCellOpen ) { ww8::WW8TableNodeInfoInner::Pointer_t pDeepInner( pTextNodeInfo->getInnerForDepth( m_nTableDepth ) ); - if ( pDeepInner->getCell() == 0 ) + OSL_ENSURE( pDeepInner, "TableNodeInfoInner not found"); + if ( pDeepInner && pDeepInner->getCell() == 0 ) StartTableRow( pDeepInner ); StartTableCell( pDeepInner ); -- cgit v1.2.3 From 248b4b95dfae321d4f0e25c430ce39dd2dad9f03 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 29 Oct 2010 15:36:30 +0200 Subject: CWS gnumake2: resolve conflicts and make sources buildable on Linux --- starmath/source/smres.src | 74 -------- starmath/source/view.cxx | 8 - sw/AllLangResTarget_sw.mk | 1 - sw/Library_sw.mk | 1 - sw/Library_vbaswobj.mk | 1 + sw/inc/pch/precompiled_sw.hxx | 4 - sw/prj/build.lst | 91 +--------- sw/source/ui/app/mn.src | 53 +++--- sw/source/ui/inc/swmn.hrc | 379 ---------------------------------------- sw/source/ui/uiview/pview.cxx | 5 - sw/source/ui/uiview/srcview.cxx | 7 - sw/source/ui/uiview/view0.cxx | 5 - sw/source/ui/vba/service.cxx | 15 +- sw/source/ui/web/web.src | 5 +- sw/source/ui/web/wview.cxx | 5 - 15 files changed, 32 insertions(+), 622 deletions(-) delete mode 100644 sw/source/ui/inc/swmn.hrc (limited to 'sw/source') diff --git a/starmath/source/smres.src b/starmath/source/smres.src index c83e2ce366..0ce3cbce24 100644 --- a/starmath/source/smres.src +++ b/starmath/source/smres.src @@ -1743,77 +1743,6 @@ String RID_ERR_RIGHTEXPECTED Text [ en-US ] = "'RIGHT' expected" ; }; -<<<<<<< local -ToolBox RID_MATH_TOOLBOX -{ - HelpId = RID_MATH_TOOLBOX ; - Customize = TRUE ; - LineSpacing = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - Scroll = TRUE ; - HideWhenDeactivate = TRUE ; - Border = TRUE ; - SVLook = TRUE ; - Align = BOXALIGN_LEFT ; - Size = MAP_APPFONT ( 0 , 0 ) ; - MenuStrings = TRUE ; - ItemList = - { - ToolBoxItem - { - Identifier = SID_ZOOMIN ; - HelpID = SID_ZOOMIN ; - Text [ en-US ] = "Zoom In" ; - }; - ToolBoxItem - { - Identifier = SID_ZOOMOUT ; - HelpID = SID_ZOOMOUT ; - Text [ en-US ] = "Zoom Out" ; - }; - ToolBoxItem - { - Identifier = SID_VIEW100 ; - HelpID = SID_VIEW100 ; - Text [ en-US ] = "Zoom 100%" ; - }; - ToolBoxItem - { - Identifier = SID_ADJUST ; - HelpID = SID_ADJUST ; - Text [ en-US ] = "Entire Formula" ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_DRAW ; - HelpID = SID_DRAW ; - Text [ en-US ] = "Refresh" ; - }; - ToolBoxItem - { - Identifier = SID_FORMULACURSOR ; - HelpID = SID_FORMULACURSOR ; - Text [ en-US ] = "Formula Cursor"; - }; - ToolBoxItem - { - Identifier = SID_SYMBOLS_CATALOGUE ; - HelpID = SID_SYMBOLS_CATALOGUE ; - Text [ en-US ] = "Symbols" ; - }; - }; -}; - -======= ->>>>>>> other String RID_MATH_TOOLBOX { Text [ en-US ] = "Main Toolbar" ; @@ -1838,9 +1767,6 @@ StringArray RID_PRINTUIOPTIONS < "Adjusts the formula to the page format used in the printout."; >; < "~Scaling"; >; < "Reduces or enlarges the size of the printed formula by a specified enlargement factor."; >; -// < "Miscellaneous options"; >; -// < "Ig~nore ~~ and ` at the end of the line"; >; -// < "Specfies that these space wildcards will be removed if they are at the end of a line."; >; }; }; diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 1afdcc2a71..bd58487f78 100755 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -738,10 +738,6 @@ SFX_IMPL_INTERFACE(SmViewShell, SfxViewShell, SmResId(0)) SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_TOOLS | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_FULLSCREEN | SFX_VISIBILITY_SERVER, SmResId(RID_MATH_TOOLBOX )); - //Dummy-Objectbar, damit es bei aktivieren nicht staendig zuppelt. -// Wegen #58705# entfernt (RID wurde nirgends verwendet) -// SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_SERVER, -// SmResId(RID_DRAW_OBJECTBAR) ); SFX_CHILDWINDOW_REGISTRATION(SID_TASKPANE); SFX_CHILDWINDOW_REGISTRATION(SmToolBoxWrapper::GetChildWindowId()); @@ -749,11 +745,7 @@ SFX_IMPL_INTERFACE(SmViewShell, SfxViewShell, SmResId(0)) } -<<<<<<< local -SFX_IMPL_VIEWFACTORY(SmViewShell) -======= SFX_IMPL_NAMED_VIEWFACTORY(SmViewShell, "Default") ->>>>>>> other { SFX_VIEW_REGISTRATION(SmDocShell); } diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk index d25c4fb3fb..11c3a988d4 100644 --- a/sw/AllLangResTarget_sw.mk +++ b/sw/AllLangResTarget_sw.mk @@ -153,7 +153,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\ sw/source/ui/misc/insrule.src \ sw/source/ui/misc/autocorr.src \ sw/source/ui/ribbar/tbxanchr.src \ - sw/source/ui/ribbar/tblctrl.src \ sw/source/ui/ribbar/workctrl.src \ sw/source/ui/ribbar/inputwin.src \ sw/source/ui/shells/shells.src \ diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk index 8a613a3e9f..a743f0ec61 100644 --- a/sw/Library_sw.mk +++ b/sw/Library_sw.mk @@ -676,7 +676,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\ sw/source/ui/uno/RefreshListenerContainer \ sw/source/ui/uno/SwXDocumentSettings \ sw/source/ui/uno/SwXFilterOptions \ - sw/source/ui/uno/SwXPrintPreviewSettings \ sw/source/ui/uno/dlelstnr \ sw/source/ui/uno/unoatxt \ sw/source/ui/uno/unodefaults \ diff --git a/sw/Library_vbaswobj.mk b/sw/Library_vbaswobj.mk index 4c3e0b37c7..2eacaf32c4 100644 --- a/sw/Library_vbaswobj.mk +++ b/sw/Library_vbaswobj.mk @@ -79,6 +79,7 @@ $(eval $(call gb_Library_add_exception_objects,vbaswobj,\ sw/source/ui/vba/vbaautotextentry \ sw/source/ui/vba/vbarange \ sw/source/ui/vba/vbadocumentproperties \ + sw/source/ui/vba/vbaeventshelper \ sw/source/ui/vba/vbastyle \ sw/source/ui/vba/vbapane \ sw/source/ui/vba/vbaglobals \ diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 484c3ebae4..6e50601870 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -920,12 +920,8 @@ #include "vcl/group.hxx" #include "vcl/help.hxx" #include "vcl/image.hxx" -<<<<<<< local #include "vcl/button.hxx" #include "vcl/imgcons.hxx" -======= -#include "vcl/imagebtn.hxx" ->>>>>>> other #include "vcl/inputctx.hxx" #include "vcl/jobset.hxx" #include "vcl/keycod.hxx" diff --git a/sw/prj/build.lst b/sw/prj/build.lst index 821015ba15..192a3ad99e 100644 --- a/sw/prj/build.lst +++ b/sw/prj/build.lst @@ -1,89 +1,12 @@ -<<<<<<< local sw sw : l10n connectivity OOo:writerperfect svx stoc uui writerfilter filter oovbaapi cui vbahelper NULL sw sw usr1 - all sw_mkout NULL sw sw\prj nmake - all sw_prj NULL -======= -sw sw : filter l10n connectivity OOo:writerperfect vbahelper svx stoc writerfilter NULL -sw sw usr1 - all sw_mkout NULL -sw sw\inc nmake - all sw_inc NULL -sw sw\uiconfig\layout nmake - all sw_layout NULL -sw sw\prj get - all sw_prj NULL -sw sw\source\ui\inc nmake - all sw_uinc NULL -sw sw\source\core\inc get - all sw_cinc NULL -sw sw\source\filter\inc get - all sw_finc NULL -sw sw\res get - all sw_res NULL -sw sw\win\res get - all sw_wres NULL -sw sw\win\imglst get - all sw_wimg NULL -sw sw\sdi nmake - all sw_sdi NULL -sw sw\source\core\bastyp nmake - all sw_bast sw_inc NULL -sw sw\source\ui\app nmake - all sw_app sw_sdi sw_uinc sw_inc NULL -sw sw\source\ui\cctrl nmake - all sw_cctrl sw_inc NULL -sw sw\source\ui\chrdlg nmake - all sw_chrdl sw_inc NULL -sw sw\source\ui\config nmake - all sw_conf sw_inc NULL -sw sw\source\ui\dbui nmake - all sw_dbui sw_inc NULL -sw sw\source\ui\dialog nmake - all sw_dlg sw_inc NULL -sw sw\source\ui\dochdl nmake - all sw_dchdl sw_inc NULL -sw sw\source\ui\docvw nmake - all sw_dcvw sw_inc NULL -sw sw\source\ui\envelp nmake - all sw_envlp sw_inc NULL -sw sw\source\ui\fldui nmake - all sw_fldui sw_inc NULL -sw sw\source\ui\fmtui nmake - all sw_fmtui sw_inc NULL -sw sw\source\ui\frmdlg nmake - all sw_frmdl sw_inc NULL -sw sw\source\ui\globdoc nmake - all sw_globd sw_uinc sw_inc NULL -sw sw\source\ui\index nmake - all sw_index sw_inc NULL -sw sw\source\ui\lingu nmake - all sw_ling sw_inc NULL -sw sw\source\ui\misc nmake - all sw_misc sw_sdi sw_inc NULL -sw sw\source\ui\ribbar nmake - all sw_rbbar sw_inc NULL -sw sw\source\ui\shells nmake - all sw_shell sw_uinc sw_sdi sw_inc NULL -sw sw\source\ui\smartmenu nmake - all sw_smartmenu sw_inc NULL -sw sw\source\ui\table nmake - all sw_table sw_inc NULL -sw sw\source\ui\uiview nmake - all sw_uivw sw_sdi sw_inc NULL -sw sw\source\ui\uno nmake - all sw_uiuno sw_sdi sw_inc NULL -sw sw\source\ui\vba nmake - all sw_vba sw_inc NULL -sw sw\source\ui\utlui nmake - all sw_utlui sw_inc NULL -sw sw\source\ui\web nmake - all sw_web sw_uinc sw_sdi sw_inc NULL -sw sw\source\ui\wrtsh nmake - all sw_wrtsh sw_inc NULL -sw sw\source\core\attr nmake - all sw_attr sw_inc NULL -sw sw\source\core\crsr nmake - all sw_crsr sw_inc NULL -sw sw\source\core\doc nmake - all sw_doc sw_inc NULL -sw sw\source\core\docnode nmake - all sw_dcnd sw_inc NULL -sw sw\source\core\draw nmake - all sw_draw sw_inc NULL -sw sw\source\core\edit nmake - all sw_edit sw_inc NULL -sw sw\source\core\except nmake - all sw_excpt sw_inc NULL -sw sw\source\core\fields nmake - all sw_fld sw_inc NULL -sw sw\source\core\frmedt nmake - all sw_frmed sw_inc NULL -sw sw\source\core\graphic nmake - all sw_grph sw_inc NULL -sw sw\source\core\layout nmake - all sw_layo sw_inc NULL -sw sw\source\core\ole nmake - all sw_ole sw_inc NULL -sw sw\source\core\para nmake - all sw_para sw_inc NULL -sw sw\source\core\sw3io nmake - all sw_sw3io sw_inc NULL -sw sw\source\core\swg nmake - all sw_swg sw_inc NULL -sw sw\source\core\text nmake - all sw_text sw_inc NULL -sw sw\source\core\tox nmake - all sw_tox sw_inc NULL -sw sw\source\core\txtnode nmake - all sw_txtnd sw_inc NULL -sw sw\source\core\undo nmake - all sw_undo sw_inc NULL -sw sw\source\core\view nmake - all sw_view sw_inc NULL -sw sw\source\core\unocore nmake - all sw_uco sw_inc NULL -sw sw\source\core\objectpositioning nmake - all sw_objpos sw_inc NULL -sw sw\source\core\access nmake - all sw_acc sw_inc NULL -sw sw\source\core\SwNumberTree nmake - all sw_NumberTree sw_inc NULL -sw sw\source\core\table nmake - all sw_tablecore sw_inc NULL -sw sw\source\filter\ascii nmake - all sw_ascii sw_inc NULL -sw sw\source\filter\basflt nmake - all sw_bsflt sw_inc NULL -sw sw\source\filter\html nmake - all sw_html sw_inc NULL -sw sw\source\filter\rtf nmake - all sw_rtf sw_inc NULL -sw sw\source\filter\writer nmake - all sw_wrtr sw_inc NULL -sw sw\source\filter\ww1 nmake - all sw_ww1 sw_inc NULL -sw sw\source\filter\ww8 nmake - all sw_ww8 sw_inc NULL -sw sw\source\filter\xml nmake - all sw_xml sw_inc NULL -sw sw\source\ui nmake - all sw_ui sw_app sw_cctrl sw_chrdl sw_conf sw_dbui sw_dchdl sw_dcvw sw_dlg sw_envlp sw_fldui sw_fmtui sw_frmdl sw_globd sw_index sw_ling sw_misc sw_rbbar sw_shell sw_table sw_uiuno sw_uivw sw_utlui sw_web sw_wrtsh sw_smartmenu sw_vba NULL -sw sw\source\core nmake - all sw_core sw_attr sw_bast sw_crsr sw_dcnd sw_doc sw_draw sw_edit sw_excpt sw_fld sw_frmed sw_grph sw_layo sw_ole sw_para sw_sw3io sw_swg sw_text sw_tox sw_txtnd sw_uco sw_undo sw_view sw_acc sw_objpos sw_NumberTree sw_tablecore NULL -sw sw\source\filter nmake - all sw_flt sw_ascii sw_bsflt sw_html sw_rtf sw_wrtr sw_ww1 sw_ww8 sw_xml NULL -sw sw\util nmake - all sw_util sw_core sw_flt sw_sdi sw_ui NULL -sw sw\qa\complex\accessibility nmake - all sw_qa_complex_accessibility sw_util NULL -sw sw\qa\complex\checkColor nmake - all sw_qa_complex_checkColor sw_util NULL + +sw sw\qa\complex\accessibility nmake - all sw_qa_complex_accessibility sw_prj NULL +sw sw\qa\complex\checkColor nmake - all sw_qa_complex_checkColor sw_prj NULL # fails -# sw sw\qa\complex\indeterminateState nmake - all sw_qa_complex_indeterminateState sw_util NULL -# sw sw\qa\complex\writer nmake - all sw_qa_complex_writer sw_util NULL -sw sw\qa\unoapi nmake - all sw_qa_unoapi sw_util NULL ->>>>>>> other +# sw sw\qa\complex\indeterminateState nmake - all sw_qa_complex_indeterminateState sw_prj NULL +# sw sw\qa\complex\writer nmake - all sw_qa_complex_writer sw_prj NULL +sw sw\qa\unoapi nmake - all sw_qa_unoapi sw_prj NULL + diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src index 1065daf0f2..8b190ae518 100644 --- a/sw/source/ui/app/mn.src +++ b/sw/source/ui/app/mn.src @@ -35,7 +35,6 @@ /* --------------------- F O R M A T --------------------------------- */ -<<<<<<< local #define SEPARATOR MenuItem { Separator = TRUE; } //define for ITEM_FORMAT_NUMBERING @@ -54,7 +53,7 @@ MenuItem\ {\ Identifier = FN_FORMAT_PAGE_DLG ; \ - HelpID = FN_FORMAT_PAGE_DLG ; \ + HelpId = CMD_FN_FORMAT_PAGE_DLG ; \ Text [ en-US ] = "Pa~ge..." ; \ }; @@ -71,7 +70,6 @@ MenuItem\ {\ Identifier = MN_FORMAT_STYLE ; \ - HelpID = MN_FORMAT_STYLE ; \ Command = ".uno:StyleMenu" ; \ Text [ en-US ] = "St~yle" ; \ SubMenu = Menu\ @@ -110,13 +108,13 @@ MenuItem\ {\ Identifier = FN_SET_SUPER_SCRIPT ; \ - HelpID = FN_SET_SUPER_SCRIPT ; \ + HelpId = CMD_FN_SET_SUPER_SCRIPT ; \ Text [ en-US ] = "Superscript" ; \ };\ MenuItem\ {\ Identifier = FN_SET_SUB_SCRIPT ; \ - HelpID = FN_SET_SUB_SCRIPT ; \ + HelpId = CMD_FN_SET_SUB_SCRIPT ; \ Text [ en-US ] = "Subscript" ; \ };\ };\ @@ -125,10 +123,8 @@ MenuItem\ {\ Identifier = MN_FORMAT_ALGN ; \ - HelpID = MN_FORMAT_ALGN ; \ Command = ".uno:AlignTextMenu" ; \ Text [ en-US ] = "A~lignment" ; \ - RadioCheck = TRUE ; \ SubMenu = Menu\ {\ ItemList = \ @@ -151,7 +147,7 @@ MenuItem\ {\ Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \ - HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; \ + HelpId = CMD_SID_ATTR_PARA_ADJUST_BLOCK ; \ RadioCheck = TRUE ; \ Text [ en-US ] = "Justified" ; \ };\ @@ -161,7 +157,6 @@ MenuItem\ {\ Identifier = MN_FORMAT_LINESPACE ; \ - HelpID = MN_FORMAT_LINESPACE ; \ Command = ".uno:LineSpacingMenu" ; \ Text [ en-US ] = "Line Spacing" ; \ _MenuItemFlags = MIB_RADIOCHECK ; \ @@ -206,21 +201,21 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem \ { \ Identifier = FN_EDIT_FIELD ; \ - HelpID = FN_EDIT_FIELD ; \ + HelpId = CMD_FN_EDIT_FIELD ; \ Text [ en-US ] = "Fields..." ; \ }; #define _MN_EDIT_FOOTNOTE \ MenuItem \ { \ Identifier = FN_EDIT_FOOTNOTE ; \ - HelpID = FN_EDIT_FOOTNOTE ; \ + HelpId = CMD_FN_EDIT_FOOTNOTE ; \ Text [ en-US ] = "Footnote/Endnote~..." ; \ }; #define _MN_EDIT_IDX_ENTRY_DLG \ MenuItem \ { \ Identifier = FN_EDIT_IDX_ENTRY_DLG ; \ - HelpID = FN_EDIT_IDX_ENTRY_DLG ; \ + HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG ; \ Text [ en-US ] = "Inde~x Entry..." ; \ }; @@ -228,13 +223,13 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem \ { \ Identifier = FN_REDLINE_ACCEPT_DIRECT; \ - HelpID = FN_REDLINE_ACCEPT_DIRECT ; \ + HelpId = CMD_FN_REDLINE_ACCEPT_DIRECT ; \ Text [ en-US ] = "Accept Change" ; \ };\ MenuItem \ { \ Identifier = FN_REDLINE_REJECT_DIRECT ; \ - HelpID = FN_REDLINE_REJECT_DIRECT ; \ + HelpId = CMD_FN_REDLINE_REJECT_DIRECT ; \ Text [ en-US ] = "Reject Change" ; \ }; \ SEPARATOR ; @@ -242,7 +237,7 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem \ { \ Identifier = FN_EDIT_AUTH_ENTRY_DLG ; \ - HelpID = FN_EDIT_AUTH_ENTRY_DLG ; \ + HelpId = CMD_FN_EDIT_AUTH_ENTRY_DLG ; \ Text [ en-US ] = "~Bibliography Entry..."; \ }; \ SEPARATOR ; @@ -255,19 +250,19 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem \ { \ Identifier = FN_EDIT_HYPERLINK ; \ - HelpID = FN_EDIT_HYPERLINK ; \ + HelpId = CMD_FN_EDIT_HYPERLINK ; \ Text [ en-US ] = "Edit Hyperlink..."; \ }; \ MenuItem \ { \ Identifier = FN_COPY_HYPERLINK_LOCATION; \ - HelpID = FN_COPY_HYPERLINK_LOCATION; \ + HelpId = CMD_FN_COPY_HYPERLINK_LOCATION; \ Text [ en-US ] = "Copy Hyperlink ~Location"; \ }; \ MenuItem \ { \ Identifier = FN_REMOVE_HYPERLINK ; \ - HelpID = FN_REMOVE_HYPERLINK ; \ + HelpId = CMD_FN_REMOVE_HYPERLINK ; \ Text [ en-US ] = "Remo~ve Hyperlink"; \ }; @@ -281,7 +276,7 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem\ {\ Identifier = FN_EDIT_HYPERLINK ; \ - HelpID = FN_EDIT_HYPERLINK ; \ + HelpId = CMD_FN_EDIT_HYPERLINK ; \ Text [ en-US ] = "~Edit Hyperlink" ; \ }; @@ -304,7 +299,7 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem\ {\ Identifier = FN_FORMAT_RESET ; \ - HelpID = FN_FORMAT_RESET ; \ + HelpId = CMD_FN_FORMAT_RESET ; \ Text [ en-US ] = "~Default Formatting" ; \ }; @@ -313,25 +308,25 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem \ { \ Identifier = FN_NUMBER_NEWSTART; \ - HelpId = FN_NUMBER_NEWSTART; \ + HelpId = CMD_FN_NUMBER_NEWSTART; \ Text[ en-US ] = "Restart Numbering"; \ }; \ MenuItem \ { \ Identifier = FN_NUM_CONTINUE; \ - HelpId = FN_NUM_CONTINUE; \ + HelpId = CMD_FN_NUM_CONTINUE; \ Text[ en-US ] = "Continue previous numbering"; \ }; \ MenuItem \ { \ Identifier = FN_NUM_BULLET_UP; \ - HelpId = FN_NUM_BULLET_UP; \ + HelpId = CMD_FN_NUM_BULLET_UP; \ Text[ en-US ] = "Up One Level"; \ }; \ MenuItem \ { \ Identifier = FN_NUM_BULLET_DOWN; \ - HelpId = FN_NUM_BULLET_DOWN; \ + HelpId = CMD_FN_NUM_BULLET_DOWN; \ Text[ en-US ] = "Down One Level"; \ }; @@ -354,19 +349,19 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml MenuItem \ { \ Identifier = FN_UPDATE_CUR_TOX ; \ - HelpID = FN_UPDATE_CUR_TOX ; \ + HelpId = CMD_FN_UPDATE_CUR_TOX ; \ Text [ en-US ] = "~Update Index/Table"; \ }; \ MenuItem \ { \ Identifier = FN_EDIT_CURRENT_TOX; \ - HelpID = FN_EDIT_CURRENT_TOX; \ + HelpId = CMD_FN_EDIT_CURRENT_TOX; \ Text [ en-US ] = "~Edit Index/Table"; \ }; \ MenuItem \ { \ Identifier = FN_REMOVE_CUR_TOX; \ - HelpID = FN_REMOVE_CUR_TOX; \ + HelpId = CMD_FN_REMOVE_CUR_TOX; \ Text [ en-US ] = "Delete Index/Table"; \ }; \ SEPARATOR ; @@ -375,10 +370,6 @@ location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml _DEFAULT_TEXT_EDIT_ELEMENTS \ }; \ }; -======= -#include "swmn.hrc" -#include "helpid.h" ->>>>>>> other /*------------------------------------------------------------------------ Beschreibung: Menu Window diff --git a/sw/source/ui/inc/swmn.hrc b/sw/source/ui/inc/swmn.hrc deleted file mode 100644 index 911309c8a5..0000000000 --- a/sw/source/ui/inc/swmn.hrc +++ /dev/null @@ -1,379 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SWMN_HRC -#define _SWMN_HRC - -#include -#include -#include "cmdid.h" -#include "app.hrc" -#include "globals.hrc" -#include "helpid.h" -#include "popup.hrc" -//#include "cfgid.h" - -/* --------------------- F O R M A T --------------------------------- */ - -#define SEPARATOR MenuItem { Separator = TRUE; } - -//define for ITEM_FORMAT_NUMBERING -#define DEFINE_SLOTID_FOR_NUMBER_BULLETS FN_NUMBER_BULLETS -#define MN_NUMBERING ITEM_FORMAT_NUMBERING - -#define MN_TXT\ - MenuItem\ - {\ - ITEM_FORMAT_CHAR_DLG\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_PARA_DLG\ - };\ - MenuItem\ - {\ - Identifier = FN_FORMAT_PAGE_DLG ; \ - HelpId = CMD_FN_FORMAT_PAGE_DLG ; \ - Text [ en-US ] = "Pa~ge..." ; \ - }; - - -#define MN_TEXT_ATTR\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_FONT\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_FONTHEIGHT\ - };\ - MenuItem\ - {\ - Identifier = MN_FORMAT_STYLE ; \ - Command = ".uno:StyleMenu" ; \ - Text [ en-US ] = "St~yle" ; \ - SubMenu = Menu\ - {\ - ItemList = \ - {\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_WEIGHT\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_POSTURE\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_OVERLINE\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_UNDERLINE\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_STRIKEOUT\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_SHADOWED\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_CONTOUR\ - };\ - SEPARATOR ; \ - MenuItem\ - {\ - Identifier = FN_SET_SUPER_SCRIPT ; \ - HelpId = CMD_FN_SET_SUPER_SCRIPT ; \ - Text [ en-US ] = "Superscript" ; \ - };\ - MenuItem\ - {\ - Identifier = FN_SET_SUB_SCRIPT ; \ - HelpId = CMD_FN_SET_SUB_SCRIPT ; \ - Text [ en-US ] = "Subscript" ; \ - };\ - };\ - };\ - };\ - MenuItem\ - {\ - Identifier = MN_FORMAT_ALGN ; \ - Command = ".uno:AlignTextMenu" ; \ - Text [ en-US ] = "A~lignment" ; \ - SubMenu = Menu\ - {\ - ItemList = \ - {\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_ATTR_PARA_ADJUST_LEFT\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_ATTR_PARA_ADJUST_RIGHT\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_ATTR_PARA_ADJUST_CENTER\ - };\ - MenuItem\ - {\ - Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \ - HelpId = CMD_SID_ATTR_PARA_ADJUST_BLOCK ; \ - RadioCheck = TRUE ; \ - Text [ en-US ] = "Justified" ; \ - };\ - };\ - };\ - };\ - MenuItem\ - {\ - Identifier = MN_FORMAT_LINESPACE ; \ - Command = ".uno:LineSpacingMenu" ; \ - Text [ en-US ] = "Line Spacing" ; \ - _MenuItemFlags = MIB_RADIOCHECK ; \ - SubMenu = Menu\ - {\ - ItemList = \ - {\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_PARA_LINESPACE_10\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_PARA_LINESPACE_15\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_PARA_LINESPACE_20\ - };\ - };\ - };\ - }; - -/* --------------------- M E N U --------------------------------- */ - -/* - - -The application menu bar resource has become obsolete. You can now find the menu bar at the following -location: /uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml - - -*/ - -/* --------------------- D O C U M E N T -------------------------- */ - - -#define _MN_EDIT_FIELD \ - MenuItem \ - { \ - Identifier = FN_EDIT_FIELD ; \ - HelpId = CMD_FN_EDIT_FIELD ; \ - Text [ en-US ] = "Fields..." ; \ - }; -#define _MN_EDIT_FOOTNOTE \ - MenuItem \ - { \ - Identifier = FN_EDIT_FOOTNOTE ; \ - HelpId = CMD_FN_EDIT_FOOTNOTE ; \ - Text [ en-US ] = "Footnote/Endnote~..." ; \ - }; - #define _MN_EDIT_IDX_ENTRY_DLG \ - MenuItem \ - { \ - Identifier = FN_EDIT_IDX_ENTRY_DLG ; \ - HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG ; \ - Text [ en-US ] = "Inde~x Entry..." ; \ - }; - -#define _MN_EDIT_REDLINE \ - MenuItem \ - { \ - Identifier = FN_REDLINE_ACCEPT_DIRECT; \ - HelpId = CMD_FN_REDLINE_ACCEPT_DIRECT ; \ - Text [ en-US ] = "Accept Change" ; \ - };\ - MenuItem \ - { \ - Identifier = FN_REDLINE_REJECT_DIRECT ; \ - HelpId = CMD_FN_REDLINE_REJECT_DIRECT ; \ - Text [ en-US ] = "Reject Change" ; \ - }; \ - SEPARATOR ; -#define _MN_EDIT_BIB_ENTRY_DLG \ - MenuItem \ - { \ - Identifier = FN_EDIT_AUTH_ENTRY_DLG ; \ - HelpId = CMD_FN_EDIT_AUTH_ENTRY_DLG ; \ - Text [ en-US ] = "~Bibliography Entry..."; \ - }; \ - SEPARATOR ; - -#define _MN_EDIT_OPEN_HYPERLINK \ - MenuItem \ - { \ - ITEM_OPEN_HYPERLINK \ - };\ - MenuItem \ - { \ - Identifier = FN_EDIT_HYPERLINK ; \ - HelpId = CMD_FN_EDIT_HYPERLINK ; \ - Text [ en-US ] = "Edit Hyperlink..."; \ - }; \ - MenuItem \ - { \ - Identifier = FN_COPY_HYPERLINK_LOCATION; \ - HelpId = CMD_FN_COPY_HYPERLINK_LOCATION; \ - Text [ en-US ] = "Copy Hyperlink ~Location"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_REMOVE_HYPERLINK ; \ - HelpId = CMD_FN_REMOVE_HYPERLINK ; \ - Text [ en-US ] = "Remo~ve Hyperlink"; \ - }; - -#define _MN_EDIT_OPEN_SMARTTAGMENU \ - MenuItem \ - { \ - ITEM_OPEN_SMARTTAGMENU \ - }; - -#define _MN_EDIT__HYPERLINK \ - MenuItem\ - {\ - Identifier = FN_EDIT_HYPERLINK ; \ - HelpId = CMD_FN_EDIT_HYPERLINK ; \ - Text [ en-US ] = "~Edit Hyperlink" ; \ - }; - -#define _DEFAULT_TEXT_EDIT_ELEMENTS \ - _MN_EDIT_FIELD \ - _MN_EDIT_FOOTNOTE \ - _MN_EDIT_IDX_ENTRY_DLG \ - _MN_EDIT_BIB_ENTRY_DLG \ - _MN_EDIT_REDLINE \ - MenuItem \ - { \ - ITEM_POPUP_TEMPLATE_EDIT \ - }; \ - SEPARATOR ; \ - _MN_EDIT_OPEN_HYPERLINK \ - _MN_EDIT_OPEN_SMARTTAGMENU - - -#define MN_RESET\ - MenuItem\ - {\ - Identifier = FN_FORMAT_RESET ; \ - HelpId = CMD_FN_FORMAT_RESET ; \ - Text [ en-US ] = "~Default Formatting" ; \ - }; - -#define _NUMBERING_RELATED_MENU \ - SEPARATOR ; \ - MenuItem \ - { \ - Identifier = FN_NUMBER_NEWSTART; \ - HelpId = CMD_FN_NUMBER_NEWSTART; \ - Text[ en-US ] = "Restart Numbering"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_NUM_CONTINUE; \ - HelpId = CMD_FN_NUM_CONTINUE; \ - Text[ en-US ] = "Continue previous numbering"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_NUM_BULLET_UP; \ - HelpId = CMD_FN_NUM_BULLET_UP; \ - Text[ en-US ] = "Up One Level"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_NUM_BULLET_DOWN; \ - HelpId = CMD_FN_NUM_BULLET_DOWN; \ - Text[ en-US ] = "Down One Level"; \ - }; - -#define BASE_TEXT_POPUPMENU_BEGIN \ -{ \ - ItemList = \ - { \ - MN_RESET \ - _NUMBERING_RELATED_MENU \ - SEPARATOR ; \ - MN_TEXT_ATTR \ - SEPARATOR ; \ - MN_TXT \ - MN_NUMBERING \ - ITEM_TRANSLITERATE_MENU \ - SEPARATOR ; - -// not in Writer/Web -#define BASE_TEXT_POPUPMENU_NOWEB \ - MenuItem \ - { \ - Identifier = FN_UPDATE_CUR_TOX ; \ - HelpId = CMD_FN_UPDATE_CUR_TOX ; \ - Text [ en-US ] = "~Update Index/Table"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_EDIT_CURRENT_TOX; \ - HelpId = CMD_FN_EDIT_CURRENT_TOX; \ - Text [ en-US ] = "~Edit Index/Table"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_REMOVE_CUR_TOX; \ - HelpId = CMD_FN_REMOVE_CUR_TOX; \ - Text [ en-US ] = "Delete Index/Table"; \ - }; \ - SEPARATOR ; - -#define BASE_TEXT_POPUPMENU_END \ - _DEFAULT_TEXT_EDIT_ELEMENTS \ - }; \ -}; - -#endif - diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 0b08e824c5..7c12bd504f 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -107,12 +107,7 @@ using namespace ::com::sun::star; - -<<<<<<< local -SFX_IMPL_VIEWFACTORY(SwPagePreView) -======= SFX_IMPL_NAMED_VIEWFACTORY(SwPagePreView, "PrintPreview") ->>>>>>> other { SFX_VIEW_REGISTRATION(SwDocShell); SFX_VIEW_REGISTRATION(SwWebDocShell); diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index d629949c21..7276bb2ab1 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -125,18 +125,11 @@ using ::com::sun::star::util::SearchOptions; #define BMARGPRN 1000 #define BORDERPRN 300 - - -<<<<<<< local -SFX_IMPL_VIEWFACTORY(SwSrcView) -======= SFX_IMPL_NAMED_VIEWFACTORY(SwSrcView, "SourceView") ->>>>>>> other { SFX_VIEW_REGISTRATION(SwWebDocShell); } - SFX_IMPL_INTERFACE( SwSrcView, SfxViewShell, SW_RES(0) ) { SFX_POPUPMENU_REGISTRATION(SW_RES(MN_SRCVIEW_POPUPMENU)); diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx index 7f3c6a0cb5..0f99832662 100644 --- a/sw/source/ui/uiview/view0.cxx +++ b/sw/source/ui/uiview/view0.cxx @@ -104,12 +104,7 @@ using ::rtl::OUString; #include - -<<<<<<< local -SFX_IMPL_VIEWFACTORY(SwView) -======= SFX_IMPL_NAMED_VIEWFACTORY(SwView, "Default") ->>>>>>> other { if ( SvtModuleOptions().IsWriter() ) { diff --git a/sw/source/ui/vba/service.cxx b/sw/source/ui/vba/service.cxx index 1297eadba2..6e607e861e 100644 --- a/sw/source/ui/vba/service.cxx +++ b/sw/source/ui/vba/service.cxx @@ -66,21 +66,7 @@ extern "C" *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -<<<<<<< local - SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) - { - OSL_TRACE("In component_writeInfo"); - - // Component registration - return component_writeInfoHelper( pServiceManager, pRegistryKey, - globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl ); - } - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( -======= - void * SAL_CALL component_getFactory( ->>>>>>> other const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) { @@ -91,3 +77,4 @@ extern "C" return pRet; } } + diff --git a/sw/source/ui/web/web.src b/sw/source/ui/web/web.src index 81102bb020..01fcf69716 100644 --- a/sw/source/ui/web/web.src +++ b/sw/source/ui/web/web.src @@ -79,8 +79,5 @@ String RID_WEBOLE_TOOLBOX { Text [ en-US ] = "Object/Web" ; }; -<<<<<<< local -======= -/************************************************************************* ->>>>>>> other + diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx index a78c955bc2..4a0f2506c2 100644 --- a/sw/source/ui/web/wview.cxx +++ b/sw/source/ui/web/wview.cxx @@ -93,16 +93,11 @@ #include -<<<<<<< local -SFX_IMPL_VIEWFACTORY(SwWebView) -======= SFX_IMPL_NAMED_VIEWFACTORY(SwWebView, "Default") ->>>>>>> other { SFX_VIEW_REGISTRATION(SwWebDocShell); } - SFX_IMPL_INTERFACE( SwWebView, SwView, SW_RES(RID_WEBTOOLS_TOOLBOX) ) { SFX_CHILDWINDOW_REGISTRATION(SfxTemplateDialogWrapper::GetChildWindowId()); -- cgit v1.2.3 From c050254f27c1e99a924629247795fde554522b04 Mon Sep 17 00:00:00 2001 From: os Date: Mon, 1 Nov 2010 12:20:46 +0100 Subject: #i115314# FN_INSERT_FRAME: keep WrtShell locally to prevent crash after sub shell dispose --- sw/source/ui/shells/textsh.cxx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 0326473a08..b84e729bb8 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -627,16 +627,18 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) DBG_ASSERT(pDlg, "Dialogdiet fail!"); if(pDlg->Execute() && pDlg->GetOutputItemSet()) { - GetShell().LockPaint(); - GetShell().StartAllAction(); - GetShell().StartUndo(UNDO_INSERT); + //local variable necessary at least after call of .AutoCaption() because this could be deleted at this point + SwWrtShell& rShell = GetShell(); + rShell.LockPaint(); + rShell.StartAllAction(); + rShell.StartUndo(UNDO_INSERT); const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); aMgr.SetAttrSet(*pOutSet); // beim ClickToEditFeld erst die Selektion loeschen - if( GetShell().IsInClickToEdit() ) - GetShell().DelRight(); + if( rShell.IsInClickToEdit() ) + rShell.DelRight(); aMgr.InsertFlyFrm(); @@ -647,8 +649,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) //FN_INSERT_FRAME USHORT nAnchor = (USHORT)aMgr.GetAnchor(); rReq.AppendItem(SfxUInt16Item(nSlot, nAnchor)); - rReq.AppendItem(SfxPointItem(FN_PARAM_1, GetShell().GetObjAbsPos())); - rReq.AppendItem(SvxSizeItem(FN_PARAM_2, GetShell().GetObjSize())); + rReq.AppendItem(SfxPointItem(FN_PARAM_1, rShell.GetObjAbsPos())); + rReq.AppendItem(SvxSizeItem(FN_PARAM_2, rShell.GetObjSize())); rReq.Done(); } @@ -659,10 +661,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_FRAME)); - GetShell().EndUndo(UNDO_INSERT, &aRewriter); + rShell.EndUndo(UNDO_INSERT, &aRewriter); } - GetShell().EndAllAction(); - GetShell().UnlockPaint(); + rShell.EndAllAction(); + rShell.UnlockPaint(); } DELETEZ(pDlg); -- cgit v1.2.3 From a40657824cbb3c08de5ef55d587b74451a782d00 Mon Sep 17 00:00:00 2001 From: os Date: Mon, 1 Nov 2010 14:16:03 +0100 Subject: #i110287# omit caption separator if caption text is empty --- sw/source/core/doc/doclay.cxx | 5 ++++- sw/source/ui/frmdlg/cption.cxx | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index b42b5f808e..3086529999 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -1474,7 +1474,10 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co aTxt += ' '; } xub_StrLen nIdx = aTxt.Len(); - aTxt += rSeparator; + if( rTxt.Len() > 0 ) + { + aTxt += rSeparator; + } xub_StrLen nSepIdx = aTxt.Len(); aTxt += rTxt; diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index 5e7167b6bc..d226f4760c 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -382,6 +382,7 @@ IMPL_LINK(SwCaptionDialog, CaptionHdl, PushButton*, EMPTYARG) void SwCaptionDialog::DrawSample() { String aStr; + String sCaption = aTextEdit.GetText(); // Nummer String sFldTypeName = aCategoryBox.GetText(); @@ -436,9 +437,12 @@ void SwCaptionDialog::DrawSample() } } - aStr += aSepEdit.GetText(); + if( sCaption.Len() > 0 ) + { + aStr += aSepEdit.GetText(); + } } - aStr += aTextEdit.GetText(); + aStr += sCaption; // do preview! aPrevWin.SetPreviewText( aStr ); } -- cgit v1.2.3 From dd764a7636276f6652b44b5c81d8d7fe04098160 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 2 Nov 2010 17:03:34 +0100 Subject: vcl117: #i115056# change direct help texts to help ids to allow for proper help content --- starmath/source/smres.src | 9 --- starmath/source/unomodel.cxx | 34 ++++---- sw/source/core/view/printdata.cxx | 160 +++++++++++++++++++------------------- sw/source/ui/config/optdlg.src | 15 ---- 4 files changed, 98 insertions(+), 120 deletions(-) (limited to 'sw/source') diff --git a/starmath/source/smres.src b/starmath/source/smres.src index 2678f58f66..4b3f9886e4 100644 --- a/starmath/source/smres.src +++ b/starmath/source/smres.src @@ -1755,21 +1755,12 @@ StringArray RID_PRINTUIOPTIONS < "%PRODUCTNAME %s"; >; < "Contents"; >; < "~Title"; >; - < "Specifies whether you want the name of the document to be included in the printout"; >; < "~Formula text"; >; - < "Specifies whether to include the contents of the 'Commands' window at the bottom of the printout."; >; < "B~orders"; >; - < "Applies a thin border to the formula area in the printout."; >; < "Size"; >; < "O~riginal size"; >; - < "Prints the formula without adjusting the current font size."; >; < "Fit to ~page"; >; - < "Adjusts the formula to the page format used in the printout."; >; < "~Scaling"; >; - < "Reduces or enlarges the size of the printed formula by a specified enlargement factor."; >; -// < "Miscellaneous options"; >; -// < "Ig~nore ~~ and ` at the end of the line"; >; -// < "Specfies that these space wildcards will be removed if they are at the end of a line."; >; }; }; diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 77b404b2ee..e24ecb752f 100755 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -81,8 +81,8 @@ using namespace ::com::sun::star::script; SmPrintUIOptions::SmPrintUIOptions() { ResStringArray aLocalizedStrings( SmResId( RID_PRINTUIOPTIONS ) ); - DBG_ASSERT( aLocalizedStrings.Count() >= 15, "resource incomplete" ); - if( aLocalizedStrings.Count() < 15 ) // bad resource ? + DBG_ASSERT( aLocalizedStrings.Count() >= 9, "resource incomplete" ); + if( aLocalizedStrings.Count() < 9 ) // bad resource ? return; SmModule *pp = SM_MOD(); @@ -107,35 +107,35 @@ SmPrintUIOptions::SmPrintUIOptions() // create a bool option for title row (matches to SID_PRINTTITLE) m_aUIProperties[2].Value = getBoolControlOpt( aLocalizedStrings.GetString( 2 ), - aLocalizedStrings.GetString( 3 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TitleRow:CheckBox" ) ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_TITLE_ROW ) ), pConfig->IsPrintTitle() ); // create a bool option for formula text (matches to SID_PRINTTEXT) - m_aUIProperties[3].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ), - aLocalizedStrings.GetString( 5 ), + m_aUIProperties[3].Value = getBoolControlOpt( aLocalizedStrings.GetString( 3 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:FormulaText:CheckBox" ) ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_FORMULA_TEXT ) ), pConfig->IsPrintFormulaText() ); // create a bool option for border (matches to SID_PRINTFRAME) - m_aUIProperties[4].Value = getBoolControlOpt( aLocalizedStrings.GetString( 6 ), - aLocalizedStrings.GetString( 7 ), + m_aUIProperties[4].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:Border:CheckBox" ) ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_BORDER ) ), pConfig->IsPrintFrame() ); // create subgroup for print format - m_aUIProperties[5].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 8 ), rtl::OUString() ); + m_aUIProperties[5].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 5 ), rtl::OUString() ); // create a radio button group for print format (matches to SID_PRINTSIZE) Sequence< rtl::OUString > aChoices( 3 ); - aChoices[0] = aLocalizedStrings.GetString( 9 ); - aChoices[1] = aLocalizedStrings.GetString( 11 ); - aChoices[2] = aLocalizedStrings.GetString( 13 ); - Sequence< rtl::OUString > aHelpTexts( 3 ); - aHelpTexts[0] = aLocalizedStrings.GetString( 10 ); - aHelpTexts[1] = aLocalizedStrings.GetString( 12 ); - aHelpTexts[2] = aLocalizedStrings.GetString( 14 ); + aChoices[0] = aLocalizedStrings.GetString( 6 ); + aChoices[1] = aLocalizedStrings.GetString( 7 ); + aChoices[2] = aLocalizedStrings.GetString( 8 ); + Sequence< rtl::OUString > aHelpIds( 3 ); + aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:0" ) ); + aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:1" ) ); + aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:2" ) ); OUString aPrintFormatProp( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_PRINT_FORMAT ) ); m_aUIProperties[6].Value = getChoiceControlOpt( rtl::OUString(), - aHelpTexts, + aHelpIds, aPrintFormatProp, aChoices, static_cast< sal_Int32 >(pConfig->GetPrintSize()) ); @@ -143,7 +143,7 @@ SmPrintUIOptions::SmPrintUIOptions() // create a numeric box for scale dependent on PrintFormat = "Scaling" (matches to SID_PRINTZOOM) vcl::PrinterOptionsHelper::UIControlOptions aRangeOpt( aPrintFormatProp, 2, sal_True ); m_aUIProperties[ 7 ].Value = getRangeControlOpt( rtl::OUString(), - aLocalizedStrings.GetString( 14 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintScale:NumericField," ) ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_PRINT_SCALE ) ), pConfig->GetPrintZoomFactor(), // initial value 10, // min value diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index 5d8cb3f043..06b179e8c5 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -210,8 +210,8 @@ SwPrintUIOptions::SwPrintUIOptions( { ResStringArray aLocalizedStrings( SW_RES( STR_PRINTOPTUI ) ); - DBG_ASSERT( aLocalizedStrings.Count() >= 44, "resource incomplete" ); - if( aLocalizedStrings.Count() < 44 ) // bad resource ? + DBG_ASSERT( aLocalizedStrings.Count() >= 30, "resource incomplete" ); + if( aLocalizedStrings.Count() < 30 ) // bad resource ? return; // printing HTML sources does not have any valid UI options. @@ -246,79 +246,79 @@ SwPrintUIOptions::SwPrintUIOptions( // create a bool option for background bool bDefaultVal = rDefaultPrintData.IsPrintPageBackground(); m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 2 ), - aLocalizedStrings.GetString( 3 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPageBackground" ) ), - bDefaultVal ); + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintPageBackground:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPageBackground" ) ), + bDefaultVal ); // create a bool option for pictures/graphics AND OLE and drawing objects as well bDefaultVal = rDefaultPrintData.IsPrintGraphic() || rDefaultPrintData.IsPrintDraw(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ), - aLocalizedStrings.GetString( 5 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPicturesAndObjects" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 3 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintPicturesAndObjects:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPicturesAndObjects" ) ), + bDefaultVal ); if (!bWeb) { // create a bool option for hidden text bDefaultVal = rDefaultPrintData.IsPrintHiddenText(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 6 ), - aLocalizedStrings.GetString( 7 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintHiddenText" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintHiddenText:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintHiddenText" ) ), + bDefaultVal ); // create a bool option for place holder bDefaultVal = rDefaultPrintData.IsPrintTextPlaceholder(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 8 ), - aLocalizedStrings.GetString( 9 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintTextPlaceholder" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 5 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintTextPlaceholder:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintTextPlaceholder" ) ), + bDefaultVal ); } // create a bool option for controls bDefaultVal = rDefaultPrintData.IsPrintControl(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 10 ), - aLocalizedStrings.GetString( 11 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintControls" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 6 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintControls:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintControls" ) ), + bDefaultVal ); // create sub section for Color - m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 12 ), rtl::OUString() ); + m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 7 ), rtl::OUString() ); // create a bool option for printing text with black font color bDefaultVal = rDefaultPrintData.IsPrintBlackFont(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 13 ), - aLocalizedStrings.GetString( 14 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintBlackFonts" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 8 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintBlackFonts:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintBlackFonts" ) ), + bDefaultVal ); if (!bWeb) { // create subgroup for misc options - m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 15 ) ), rtl::OUString() ); + m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 9 ) ), rtl::OUString() ); // create a bool option for printing automatically inserted blank pages bDefaultVal = rDefaultPrintData.IsPrintEmptyPages(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 16 ), - aLocalizedStrings.GetString( 17 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintEmptyPages" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 10 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintEmptyPages:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintEmptyPages" ) ), + bDefaultVal ); } // create a bool option for paper tray bDefaultVal = rDefaultPrintData.IsPaperFromSetup(); vcl::PrinterOptionsHelper::UIControlOptions aPaperTrayOpt; aPaperTrayOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OptionsPageOptGroup" ) ); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 18 ), - aLocalizedStrings.GetString( 19 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPaperFromSetup" ) ), - bDefaultVal, - aPaperTrayOpt - ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 11 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintPaperFromSetup:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPaperFromSetup" ) ), + bDefaultVal, + aPaperTrayOpt + ); // print range selection vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt; aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) ); aPrintRangeOpt.mbInternalOnly = sal_True; - m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 37 ) ), + m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 26 ) ), rtl::OUString(), aPrintRangeOpt ); @@ -327,18 +327,18 @@ SwPrintUIOptions::SwPrintUIOptions( rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ); uno::Sequence< rtl::OUString > aChoices( 3 ); uno::Sequence< sal_Bool > aChoicesDisabled( 3 ); - uno::Sequence< rtl::OUString > aHelpText( 3 ); - aChoices[0] = aLocalizedStrings.GetString( 38 ); + uno::Sequence< rtl::OUString > aHelpIds( 3 ); + aChoices[0] = aLocalizedStrings.GetString( 27 ); aChoicesDisabled[0] = sal_False; - aHelpText[0] = aLocalizedStrings.GetString( 39 ); - aChoices[1] = aLocalizedStrings.GetString( 40 ); + aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ) ); + aChoices[1] = aLocalizedStrings.GetString( 28 ); aChoicesDisabled[1] = sal_False; - aHelpText[1] = aLocalizedStrings.GetString( 41 ); - aChoices[2] = aLocalizedStrings.GetString( 42 ); + aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ) ); + aChoices[2] = aLocalizedStrings.GetString( 29 ); aChoicesDisabled[2] = sal_Bool(! bHasSelection); - aHelpText[2] = aLocalizedStrings.GetString( 43 ); + aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2" ) ); m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(), - aHelpText, + aHelpIds, aPrintRangeName, aChoices, bHasSelection ? 2 /*enable 'Selection' radio button*/ : 0 /* enable 'All pages' */, @@ -348,7 +348,7 @@ SwPrintUIOptions::SwPrintUIOptions( // create a an Edit dependent on "Pages" selected vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True ); m_aUIProperties[nIdx++].Value = getEditControlOpt( rtl::OUString(), - rtl::OUString(), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PageRange:Edit" ) ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ), rtl::OUString(), aPageRangeOpt @@ -356,31 +356,31 @@ SwPrintUIOptions::SwPrintUIOptions( // print content selection vcl::PrinterOptionsHelper::UIControlOptions aContentsOpt; aContentsOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobPage" ) ); - m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 20 ) ), + m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 12 ) ), rtl::OUString(), aContentsOpt ); // create a list box for notes content const sal_Int16 nPrintPostIts = rDefaultPrintData.GetPrintPostIts(); aChoices.realloc( 4 ); - aChoices[0] = aLocalizedStrings.GetString( 21 ); - aChoices[1] = aLocalizedStrings.GetString( 22 ); - aChoices[2] = aLocalizedStrings.GetString( 23 ); - aChoices[3] = aLocalizedStrings.GetString( 24 ); - aHelpText.realloc( 2 ); - aHelpText[0] = aLocalizedStrings.GetString( 25 ); - aHelpText[1] = aLocalizedStrings.GetString( 25 ); + aChoices[0] = aLocalizedStrings.GetString( 13 ); + aChoices[1] = aLocalizedStrings.GetString( 14 ); + aChoices[2] = aLocalizedStrings.GetString( 15 ); + aChoices[3] = aLocalizedStrings.GetString( 16 ); + aHelpIds.realloc( 2 ); + aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintAnnotationMode:FixedText" ) ); + aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintAnnotationMode:ListBox" ) ); vcl::PrinterOptionsHelper::UIControlOptions aAnnotOpt( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ), 0, sal_False ); aAnnotOpt.mbEnabled = bHasPostIts; - m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 26 ), - aHelpText, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintAnnotationMode" ) ), - aChoices, - nPrintPostIts, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), - uno::Sequence< sal_Bool >(), - aAnnotOpt - ); + m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 17 ), + aHelpIds, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintAnnotationMode" ) ), + aChoices, + nPrintPostIts, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), + uno::Sequence< sal_Bool >(), + aAnnotOpt + ); // create subsection for Page settings vcl::PrinterOptionsHelper::UIControlOptions aPageSetOpt; @@ -388,16 +388,16 @@ SwPrintUIOptions::SwPrintUIOptions( if (!bWeb) { - m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 27 ) ), + m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 18 ) ), rtl::OUString(), aPageSetOpt ); uno::Sequence< rtl::OUString > aRLChoices( 3 ); - aRLChoices[0] = aLocalizedStrings.GetString( 28 ); - aRLChoices[1] = aLocalizedStrings.GetString( 29 ); - aRLChoices[2] = aLocalizedStrings.GetString( 30 ); + aRLChoices[0] = aLocalizedStrings.GetString( 19 ); + aRLChoices[1] = aLocalizedStrings.GetString( 20 ); + aRLChoices[2] = aLocalizedStrings.GetString( 21 ); uno::Sequence< rtl::OUString > aRLHelp( 1 ); - aRLHelp[0] = aLocalizedStrings.GetString( 31 ); + aRLHelp[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintLeftRightPages:ListBox" ) ); // create a choice option for all/left/right pages // 0 : all pages (left & right) // 1 : left pages @@ -409,7 +409,7 @@ SwPrintUIOptions::SwPrintUIOptions( nPagesChoice = 1; else if (!rDefaultPrintData.IsPrintLeftPage() && rDefaultPrintData.IsPrintRightPage()) nPagesChoice = 2; - m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 32 ), + m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 22 ), aRLHelp, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintLeftRightPages" ) ), aRLChoices, @@ -421,27 +421,29 @@ SwPrintUIOptions::SwPrintUIOptions( // create a bool option for brochure bDefaultVal = rDefaultPrintData.IsPrintProspect(); rtl::OUString aBrochurePropertyName( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 33 ), - aLocalizedStrings.GetString( 34 ), - aBrochurePropertyName, - bDefaultVal, - aPageSetOpt - ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 23 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintProspect:CheckBox" ) ), + aBrochurePropertyName, + bDefaultVal, + aPageSetOpt + ); if (bCTL) { // create a bool option for brochure RTL dependent on brochure uno::Sequence< rtl::OUString > aBRTLChoices( 2 ); - aBRTLChoices[0] = aLocalizedStrings.GetString( 35 ); - aBRTLChoices[1] = aLocalizedStrings.GetString( 36 ); + aBRTLChoices[0] = aLocalizedStrings.GetString( 24 ); + aBRTLChoices[1] = aLocalizedStrings.GetString( 25 ); vcl::PrinterOptionsHelper::UIControlOptions aBrochureRTLOpt( aBrochurePropertyName, -1, sal_True ); + uno::Sequence< rtl::OUString > aBRTLHelpIds( 1 ); + aBRTLHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintProspectRTL:ListBox" ) ); aBrochureRTLOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutPage" ) ); // RTL brochure choices // 0 : left-to-right // 1 : right-to-left const sal_Int16 nBRTLChoice = rDefaultPrintData.IsPrintProspectRTL() ? 1 : 0; m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( rtl::OUString(), - uno::Sequence< rtl::OUString >(), + aBRTLHelpIds, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspectRTL" ) ), aBRTLChoices, nBRTLChoice, diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src index 9f7b76401b..4cee8e0fd1 100644 --- a/sw/source/ui/config/optdlg.src +++ b/sw/source/ui/config/optdlg.src @@ -1023,7 +1023,6 @@ TabPage TP_OPTSHDWCRSR }; }; - StringArray STR_PRINTOPTUI { ItemList [en-US] = @@ -1031,47 +1030,33 @@ StringArray STR_PRINTOPTUI < "%PRODUCTNAME %s"; >; < "Contents"; >; < "Page ba~ckground"; >; - < "Specifies whether to include colors and objects that are inserted to the background of the page (Format - Page - Background) in the printed document."; >; < "P~ictures and other graphic objects"; >; - < "Specifies whether the graphics and drawing or OLE objects of your text document are printed"; >; < "Hidden te~xt"; >; - < "Enable this option to print text that is marked as hidden."; >; < "~Text placeholders"; >; - < "Enable this option to print text placeholders. Disable this option to leave the text placeholders blank in the printout."; >; < "Form control~s"; >; - < "Specifies whether the form control fields of the text document are printed"; >; < "Color"; >; < "Print text in blac~k"; >; - < "Specifies whether to always print text in black."; >; < "Pages"; >; < "Print ~automatically inserted blank pages"; >; - < "If this option is enabled automatically inserted blank pages are printed. This is best if you are printing double-sided. For example, in a book, a \"chapter\" paragraph style has been set to always start with an odd numbered page. If the previous chapter ends on an odd page, %PRODUCTNAME inserts an even numbered blank page. This option controls whether to print that even numbered page or not"; >; < "~Use only paper tray from printer preferences"; >; - < "For printers with multiple trays this option specifies whether the paper tray used is specified by the system settings of the printer."; >; < "Print"; >; < "None (document only)"; >; < "Comments only"; >; < "Place at end of document"; >; < "Place at end of page"; >; - < "Specify where to print comments (if any)."; >; < "~Comments"; >; < "Page sides";>; < "All pages"; >; < "Back sides / left pages"; >; < "Front sides / right pages"; >; - < "Specify which pages to include in the output"; >; < "Include"; >; < "Broch~ure"; >; - < "Select the Brochure option to print the document in brochure format."; >; < "Left-to-right script"; >; < "Right-to-left script"; >; < "Range and copies"; >; < "~All pages"; >; - < "Print the whole document."; >; < "Pa~ges"; >; - < "Print a range of pages of the document."; >; < "~Selection"; >; - < "Print only the selected parts of the document"; >; }; }; -- cgit v1.2.3 From ff1a30817c27e818d389ebb552a6f57fa1254103 Mon Sep 17 00:00:00 2001 From: os Date: Wed, 3 Nov 2010 08:22:33 +0100 Subject: unused variables removed --- sw/source/core/doc/doc.cxx | 2 -- 1 file changed, 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 6a37e53379..cd9f0ad756 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -2412,13 +2412,11 @@ BOOL SwDoc::HasInvisibleContent() const // if( ! bRet ) { - SwTxtNode* pTxtNd; for( ULONG n = GetNodes().Count(); !bRet && (n > 0); ) { SwTxtNode* pTxtNd = GetNodes()[ --n ]->GetTxtNode(); if ( pTxtNd ) { - bool bRemoved = false; SwPaM aPam( *pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().Len() ); if( pTxtNd->HasHiddenCharAttribute( true ) || ( pTxtNd->HasHiddenCharAttribute( false ) ) ) { -- cgit v1.2.3 From 207e1c2e924c8193ad3a9f89ff7c475f5b91ff94 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 3 Nov 2010 14:59:06 +0100 Subject: cws tl88: #i115354# crash when opening File/Print dialog fixed --- sw/source/core/doc/doc.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sw/source') diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index a470440968..4cd360128c 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -631,6 +631,8 @@ void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup ) SwPrintData* SwDoc::getPrintData() const { + if(!pPrtData) + ((SwDoc*)this)->pPrtData = new SwPrintData; return pPrtData; } -- cgit v1.2.3 From 460265095250e9dc37843c2687fb983e006c05a9 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 3 Nov 2010 15:50:00 +0100 Subject: cws tlmath01: #i972# Math baseline alignment --- starmath/inc/node.hxx | 5 +- starmath/source/document.cxx | 9 ++ starmath/source/node.cxx | 20 +++- sw/inc/IDocumentSettingAccess.hxx | 5 +- sw/inc/cmdid.h | 3 + sw/inc/doc.hxx | 3 +- sw/inc/fesh.hxx | 4 + sw/inc/frmfmt.hxx | 10 ++ sw/inc/ndole.hxx | 3 +- sw/inc/swabstdlg.hxx | 3 +- sw/source/core/doc/doc.cxx | 6 +- sw/source/core/doc/docnew.cxx | 1 + sw/source/core/draw/dview.cxx | 10 +- sw/source/core/frmedt/fefly1.cxx | 30 +++++- sw/source/core/frmedt/feshview.cxx | 29 +++--- sw/source/core/inc/flyfrm.hxx | 15 ++- sw/source/core/inc/flyfrms.hxx | 5 +- sw/source/core/inc/layfrm.hxx | 6 +- sw/source/core/layout/fly.cxx | 14 ++- sw/source/core/layout/flyincnt.cxx | 9 +- sw/source/core/layout/ssfrm.cxx | 13 +++ .../ascharanchoredobjectposition.cxx | 6 +- sw/source/core/ole/ndole.cxx | 4 +- sw/source/ui/app/appopt.cxx | 83 ++++++++--------- sw/source/ui/app/docshini.cxx | 7 +- sw/source/ui/config/cfgitems.cxx | 1 - sw/source/ui/config/makefile.mk | 3 +- sw/source/ui/config/optdlg.hrc | 15 +-- sw/source/ui/config/optdlg.src | 12 +++ sw/source/ui/config/optpage.cxx | 58 ++++++------ sw/source/ui/config/usrpref.cxx | 102 +++++++-------------- sw/source/ui/dialog/swdlgfact.hxx | 2 - sw/source/ui/frmdlg/frmdlg.cxx | 5 +- sw/source/ui/frmdlg/frmpage.cxx | 40 ++++++-- sw/source/ui/inc/frmdlg.hxx | 3 +- sw/source/ui/inc/frmpage.hxx | 17 ++-- sw/source/ui/inc/optpage.hxx | 11 ++- sw/source/ui/shells/frmsh.cxx | 18 ++-- sw/source/ui/uiview/swcli.cxx | 21 ++--- sw/source/ui/uno/SwXDocumentSettings.cxx | 16 +++- sw/source/ui/wrtsh/wrtsh1.cxx | 29 +++--- 41 files changed, 379 insertions(+), 277 deletions(-) mode change 100755 => 100644 sw/source/ui/config/optdlg.src mode change 100755 => 100644 sw/source/ui/config/optpage.cxx (limited to 'sw/source') diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index d4aa6eac26..d97b2b99fd 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -180,8 +180,9 @@ public: const SmNode * FindTokenAt(USHORT nRow, USHORT nCol) const; const SmNode * FindRectClosestTo(const Point &rPoint) const; + // --> 4.7.2010 #i972# - virtual long GetFormulaBaseline() const { return (long)0; } //dummy, used in SmTableNode + virtual long GetFormulaBaseline() const; // <-- }; @@ -471,7 +472,7 @@ public: virtual SmNode * GetLeftMost(); virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat); - long GetFormulaBaseline() const { return nFormulaBaseline; } + virtual long GetFormulaBaseline() const; }; diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 94bd3e51e3..ba7ee7ad3b 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -38,6 +38,8 @@ #include #include #include +#include +#include #include #include #include @@ -180,7 +182,14 @@ void SmDocShell::SetText(const String& rBuffer) { pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_TEXT); if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() ) + { + // have SwOleClient::FormatChanged() to align the modified formula properly + // even if the vis area does not change (e.g. when formula text changes from + // "{a over b + c} over d" to "d over {a over b + c}" + SFX_APP()->NotifyEvent(SfxEventHint( SFX_EVENT_VISAREACHANGED, GlobalEventConfig::GetEventName(STR_EVENT_VISAREACHANGED), this)); + Repaint(); + } else pViewSh->GetGraphicWindow().Invalidate(); } diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index c37b223177..3f0c892b36 100755 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -573,6 +573,13 @@ const SmNode * SmNode::FindNodeWithAccessibleIndex(xub_StrLen nAccIdx) const return pResult; } + +long SmNode::GetFormulaBaseline() const +{ + DBG_ASSERT( 0, "This dummy implementation should not have been called." ); + return 0; +} + /////////////////////////////////////////////////////////////////////////// SmStructureNode::SmStructureNode( const SmStructureNode &rNode ) : @@ -792,7 +799,7 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat) nFormulaBaseline = GetAlignM(); // move from middle position by constant - distance // between middle and baseline for single letter - nFormulaBaseline+= aRect.GetBaseline() - aRect.GetAlignM(); + nFormulaBaseline += aRect.GetBaseline() - aRect.GetAlignM(); } // <-- } @@ -804,6 +811,12 @@ SmNode * SmTableNode::GetLeftMost() } +long SmTableNode::GetFormulaBaseline() const +{ + return nFormulaBaseline; +} + + /**************************************************************************/ @@ -865,9 +878,8 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat) { aPos = pNode->AlignTo(*this, RP_RIGHT, RHA_CENTER, RVA_BASELINE); - // no horizontal space before first node - if (i) - aPos.X() += nDist; + // add horizontal space to the left for each but the first sub node + aPos.X() += nDist; pNode->MoveTo(aPos); ExtendBy( *pNode, RCP_XOR ); diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx index 58a6df6401..8817dec6de 100644 --- a/sw/inc/IDocumentSettingAccess.hxx +++ b/sw/inc/IDocumentSettingAccess.hxx @@ -89,7 +89,8 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd GLOBAL_DOCUMENT_SAVE_LINKS, LABEL_DOCUMENT, PURGE_OLE, - KERN_ASIAN_PUNCTUATION + KERN_ASIAN_PUNCTUATION, + MATH_BASELINE_ALIGNMENT }; public: @@ -209,4 +210,4 @@ protected: virtual ~IDocumentSettingAccess() {}; }; - #endif // IDOCUMENTSETTINGACCESS_HXX_INCLUDED + #endif // IDOCUMENTSETTINGACCESS_HXX_INCLUDED \ No newline at end of file diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 894d622cad..90433510cf 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -908,6 +908,9 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr #define FN_UNO_META (FN_EXTRA2 + 112) #define FN_UNO_NESTED_TEXT_CONTENT (FN_EXTRA2 + 113) +// #i972: bool items to be passed to SwFrmPage for evaluation +#define FN_OLE_IS_MATH (FN_EXTRA2 + 114) +#define FN_MATH_BASELINE_ALIGNMENT (FN_EXTRA2 + 115) /*-------------------------------------------------------------------- Bereich: Hilfe --------------------------------------------------------------------*/ diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 14e25abd0a..722896cd5f 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -588,6 +588,7 @@ private: bool mbUseFormerTextWrapping : 1; // FME 2005-05-11 #108724# bool mbConsiderWrapOnObjPos : 1; // OD 2004-05-05 #i28701# // TRUE: object positioning algorithm has consider the wrapping style of // the floating screen objects as given by its attribute 'WrapInfluenceOnObjPos' + bool mbMathBaselineAlignment : 1; // TL 2010-10-29 #i972# // non-ui-compatibility flags: bool mbOldNumbering : 1; // HBRINKM #111955# @@ -2220,4 +2221,4 @@ namespace docfunc bool HasOutlineStyleToBeWrittenAsNormalListStyle( SwDoc& rDoc ); } // <-- -#endif //_DOC_HXX +#endif //_DOC_HXX \ No newline at end of file diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index ec2b578829..2bcf5fedd0 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -29,6 +29,7 @@ #include #include +#include #include #include "swdllapi.h" @@ -435,6 +436,9 @@ public: void SetFlyName( const String& rName ); const String& GetFlyName() const; + // get reference to OLE object (if there is one) for selected FlyFrame + const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef() const; + // erezeuge eindeutige Namen fuer Rahmen String GetUniqueGrfName() const; String GetUniqueOLEName() const; diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx index 2dcd4c865e..858d7ffb5c 100644 --- a/sw/inc/frmfmt.hxx +++ b/sw/inc/frmfmt.hxx @@ -32,6 +32,7 @@ // <-- #include +#include #include @@ -153,6 +154,12 @@ class SW_DLLPUBLIC SwFlyFrmFmt: public SwFrmFmt { friend class SwDoc; + // #i972: + // it stores the previous position of Prt rectangle from RequestObjectResize + // so it can be used to move frames of non-resizable objects to align them correctly + // when they get borders (this is done in SwWrtShell::CalcAndGetScale) + Point m_aLastFlyFrmPrtRectPos; + //Beide nicht vorhanden. SwFlyFrmFmt( const SwFlyFrmFmt &rCpy ); SwFlyFrmFmt &operator=( const SwFlyFrmFmt &rCpy ); @@ -219,6 +226,9 @@ public: */ sal_Bool IsBackgroundBrushInherited() const; + const Point & GetLastFlyFrmPrtRectPos() const { return m_aLastFlyFrmPrtRectPos; } + void SetLastFlyFrmPrtRectPos( const Point &rPoint ) { m_aLastFlyFrmPrtRectPos = rPoint; } + DECL_FIXEDMEMPOOL_NEWDEL(SwFlyFrmFmt) }; diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx index 798603d95e..40052cdb9f 100644 --- a/sw/inc/ndole.hxx +++ b/sw/inc/ndole.hxx @@ -67,7 +67,7 @@ public: String GetDescription(); #ifndef _FESHVIEW_ONLY_INLINE_NEEDED - com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef(); + const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef(); svt::EmbeddedObjectRef& GetObject(); const String& GetCurrentPersistName() const { return aName; } BOOL IsOleRef() const; //Damit das Objekt nicht unnoetig geladen werden muss. @@ -168,4 +168,3 @@ inline const SwOLENode *SwNode::GetOLENode() const } #endif // _NDOLE_HXX - diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 1c2198981a..f4491844a6 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -494,5 +494,4 @@ public: virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId ) = 0; virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId ) = 0; }; -#endif - +#endif \ No newline at end of file diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 291b845e5b..deb291aa36 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -207,6 +207,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const case PURGE_OLE: return mbPurgeOLE; case KERN_ASIAN_PUNCTUATION: return mbKernAsianPunctuation; case DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT: return mbDoNotResetParaAttrsForNumFont; + case MATH_BASELINE_ALIGNMENT: return mbMathBaselineAlignment; default: ASSERT(false, "Invalid setting id"); } @@ -305,7 +306,7 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) case UNIX_FORCE_ZERO_EXT_LEADING: mbUnixForceZeroExtLeading = value; break; - case PROTECT_FORM: + case PROTECT_FORM: mbProtectForm = value; break; @@ -346,6 +347,9 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) case DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT: mbDoNotResetParaAttrsForNumFont = value; break; + case MATH_BASELINE_ALIGNMENT: + mbMathBaselineAlignment = value; + break; default: ASSERT(false, "Invalid setting id"); } diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 3b81863ea5..019275d53a 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -366,6 +366,7 @@ SwDoc::SwDoc() : mbUseFormerObjectPos = aOptions.IsUseObjectPositioning(); mbUseFormerTextWrapping = aOptions.IsUseOurTextWrapping(); mbConsiderWrapOnObjPos = aOptions.IsConsiderWrappingStyle(); + mbMathBaselineAlignment = false; // default for *old* documents is 'off' mbAddFlyOffsets = false; // hidden mbOldNumbering = false; // hidden mbUseHiResolutionVirtualDevice = true; // hidden diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index f709decc3e..d6189a6b82 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include "swtypes.hxx" #include "pagefrm.hxx" @@ -991,6 +992,14 @@ void SwDrawView::CheckPossibilities() bSzProtect |= ( embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT ) ) ? TRUE : FALSE; // <-- + + // #i972: protect position if it is a Math object anchored 'as char' and baseline alignment is activated + SwDoc* pDoc = Imp().GetShell()->GetDoc(); + const bool bProtectMathPos = SotExchange::IsMath( xObj->getClassID() ) + && FLY_AS_CHAR == pFly->GetFmt()->GetAnchor().GetAnchorId() + && pDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + if (bProtectMathPos) + bMoveProtect = true; } } } @@ -1112,4 +1121,3 @@ const SdrMarkList& SwDrawView::GetMarkedObjectList() const - diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 09a8481956..7b965669ad 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -27,6 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include #include #include @@ -69,6 +70,8 @@ #include #include #include +#include +#include // --> OD 2006-03-06 #125892# #include // <-- @@ -1526,7 +1529,10 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < } } - pFly->SetLastFlyFrmPrtRectPos( pFly->Prt().Pos() ); //stores the value of last Prt rect + SwFlyFrmFmt *pFlyFrmFmt = pFly->GetFmt(); + ASSERT( pFlyFrmFmt, "fly frame format missing!" ); + if ( pFlyFrmFmt ) + pFlyFrmFmt->SetLastFlyFrmPrtRectPos( pFly->Prt().Pos() ); //stores the value of last Prt rect EndAllAction(); @@ -1593,6 +1599,20 @@ const String& SwFEShell::GetFlyName() const } +const uno::Reference < embed::XEmbeddedObject > SwFEShell::GetOleRef() const +{ + uno::Reference < embed::XEmbeddedObject > xObj; + SwFlyFrm * pFly = FindFlyFrm(); + if (pFly && pFly->Lower() && pFly->Lower()->IsNoTxtFrm()) + { + SwOLENode *pNd = ((SwNoTxtFrm*)pFly->Lower())->GetNode()->GetOLENode(); + if (pNd) + xObj = pNd->GetOLEObj().GetOleRef(); + } + return xObj; +} + + String SwFEShell::GetUniqueGrfName() const { return GetDoc()->GetUniqueGrfName(); @@ -2203,10 +2223,12 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO const MapMode aTargetMapMode( MAP_TWIP ); nBaseline = OutputDevice::LogicToLogic( nBaseline, aSourceMapMode.GetMapUnit(), aTargetMapMode.GetMapUnit() ); - //TLMATH01 ??? is nBaseline really always > 0 ? ASSERT( nBaseline > 0, "Wrong value of Baseline while retrieving from Starmath!" ); //nBaseline must be moved by aPrt position - nBaseline += pFly->GetLastFlyFrmPrtRectPos().Y(); + const SwFlyFrmFmt *pFlyFrmFmt = pFly->GetFmt(); + ASSERT( pFlyFrmFmt, "fly frame format missing!" ); + if ( pFlyFrmFmt ) + nBaseline += pFlyFrmFmt->GetLastFlyFrmPrtRectPos().Y(); const SwFmtVertOrient &rVert = pFrmFmt->GetVertOrient(); SwFmtVertOrient aVert( rVert ); @@ -2247,5 +2269,3 @@ void SwFEShell::AlignAllFormulasToBaseline() EndAllAction(); } - - diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index af73e87a7d..afeca868ce 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -27,7 +27,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include + #include "hintids.hxx" #include @@ -48,9 +50,9 @@ #include #include -#ifndef _POOLFMT_HRC +#include +#include #include // fuer InitFldTypes -#endif #include #include #include @@ -2573,26 +2575,32 @@ BYTE SwFEShell::IsSelObjProtected( USHORT eType ) const nChk |= ( pObj->IsMoveProtect() ? FLYPROTECT_POS : 0 ) | ( pObj->IsResizeProtect()? FLYPROTECT_SIZE : 0 ); - if( FLYPROTECT_CONTENT & eType && pObj->ISA(SwVirtFlyDrawObj) ) + if( pObj->ISA(SwVirtFlyDrawObj) ) { SwFlyFrm *pFly = ((SwVirtFlyDrawObj*)pObj)->GetFlyFrm(); - if ( pFly->GetFmt()->GetProtect().IsCntntProtected() ) + if ( (FLYPROTECT_CONTENT & eType) && pFly->GetFmt()->GetProtect().IsCntntProtected() ) nChk |= FLYPROTECT_CONTENT; if ( pFly->Lower() && pFly->Lower()->IsNoTxtFrm() ) { SwOLENode *pNd = ((SwCntntFrm*)pFly->Lower())->GetNode()->GetOLENode(); - if ( pNd ) + uno::Reference < embed::XEmbeddedObject > xObj( pNd ? pNd->GetOLEObj().GetOleRef() : 0 ); + if ( xObj.is() ) { - uno::Reference < embed::XEmbeddedObject > xObj = pNd->GetOLEObj().GetOleRef(); - // TODO/LATER: use correct aspect - if ( xObj.is() && - embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT ) ) + const bool bNeverResize = (embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT )); + if ( (FLYPROTECT_CONTENT & eType) && bNeverResize ) { nChk |= FLYPROTECT_SIZE; nChk |= FLYPROTECT_FIXED; } + + // set FLYPROTECT_POS if it is a Math object anchored 'as char' and baseline alignment is activated + const bool bProtectMathPos = SotExchange::IsMath( xObj->getClassID() ) + && FLY_AS_CHAR == pFly->GetFmt()->GetAnchor().GetAnchorId() + && pDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + if ((FLYPROTECT_POS & eType) && bProtectMathPos) + nChk |= FLYPROTECT_POS; } } } @@ -3233,5 +3241,4 @@ Point SwFEShell::GetRelativePagePosition(const Point& rDocPos) aRet = rDocPos - pPage->Frm().TopLeft(); } return aRet; -} - +} \ No newline at end of file diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx index a6e5e658b6..f7db9e5108 100644 --- a/sw/source/core/inc/flyfrm.hxx +++ b/sw/source/core/inc/flyfrm.hxx @@ -28,9 +28,9 @@ #define _FLYFRM_HXX #include "layfrm.hxx" +#include "frmfmt.hxx" class SwPageFrm; -class SwFlyFrmFmt; class SwFmtFrmSize; struct SwCrsrMoveState; class SwBorderAttrs; @@ -77,9 +77,6 @@ protected: // OD 2004-05-27 #i26791# - moved to // Point aRelPos; //Die Relative Position zum Master - Point aLastFlyFrmPrtRectPos; // it stores the previous position of Prt rectangle from RequestObjectResize - // so it can be used to move frames of non-resizable objects to align them correctly - // when they get borders (this is done in SwWrtShell::CalcAndGetScale) private: BOOL bLocked :1; //Cntnt-gebundene Flys muessen derart blockiert werden @@ -286,9 +283,11 @@ public: @author OD */ virtual bool IsFormatPossible() const; - - const Point GetLastFlyFrmPrtRectPos() const { return aLastFlyFrmPrtRectPos; } - void SetLastFlyFrmPrtRectPos( Point aPoint ) { aLastFlyFrmPrtRectPos = aPoint; } - + + // overwriting "SwFrmFmt *SwLayoutFrm::GetFmt" to provide the correct derived return type. + // (This is in order to skip on the otherwise necessary casting of the result to + // 'SwFlyFrmFmt *' after calls to this function. The casting is now done in this function.) + virtual const SwFlyFrmFmt *GetFmt() const; + virtual SwFlyFrmFmt *GetFmt(); }; #endif diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx index cc15bb4c46..e8a349330c 100644 --- a/sw/source/core/inc/flyfrms.hxx +++ b/sw/source/core/inc/flyfrms.hxx @@ -188,7 +188,6 @@ class SwFlyInCntFrm : public SwFlyFrm BOOL bInvalidLayout :1; BOOL bInvalidCntnt :1; - bool bPosCalculated; protected: virtual void NotifyBackground( SwPageFrm *pPage, @@ -238,8 +237,6 @@ public: // format of the anchor frame virtual void _ActionOnInvalidation( const InvalidationType _nInvalid ); // <-- - - void SetPosCalculated( bool bNew ) { bPosCalculated = bNew; } }; inline void SwFlyInCntFrm::InvalidateLayout() const @@ -259,4 +256,4 @@ inline void SwFlyInCntFrm::ValidateCntnt() const ((SwFlyInCntFrm*)this)->bInvalidCntnt = FALSE; } -#endif +#endif \ No newline at end of file diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx index 9ade91ac84..1fec968434 100644 --- a/sw/source/core/inc/layfrm.hxx +++ b/sw/source/core/inc/layfrm.hxx @@ -123,9 +123,9 @@ public: // <-- BOOL IsAnLower( const SwFrm * ) const; - const SwFrmFmt *GetFmt() const { return (const SwFrmFmt*)GetDep(); } - SwFrmFmt *GetFmt() { return (SwFrmFmt*)GetDep(); } - void SetFrmFmt( SwFrmFmt* ); + virtual const SwFrmFmt *GetFmt() const; + virtual SwFrmFmt *GetFmt(); + void SetFrmFmt( SwFrmFmt* ); //Verschieben der Ftns aller Lower - ab dem StartCntnt. //TRUE wenn mindestens eine Ftn verschoben wurde. diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 054c05406f..db4f3f29c1 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -122,7 +122,6 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) : // aRelPos(), pPrevLink( 0 ), pNextLink( 0 ), - aLastFlyFrmPrtRectPos(), bInCnt( FALSE ), bAtCnt( FALSE ), bLayout( FALSE ), @@ -1274,6 +1273,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos ) aHori.SetPos( nTmpX ); aSet.Put( aHori ); } + SetCurrRelPos( rNewPos ); pFmt->GetDoc()->SetAttr( aSet, *pFmt ); } } @@ -2852,3 +2852,15 @@ bool SwFlyFrm::IsFormatPossible() const return SwAnchoredObject::IsFormatPossible() && !IsLocked() && !IsColLocked(); } + +const SwFlyFrmFmt * SwFlyFrm::GetFmt() const +{ + return static_cast< const SwFlyFrmFmt * >( GetDep() ); +} + +SwFlyFrmFmt * SwFlyFrm::GetFmt() +{ + return static_cast< SwFlyFrmFmt * >( GetDep() ); +} + + \ No newline at end of file diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx index afed16428d..941be73c15 100644 --- a/sw/source/core/layout/flyincnt.cxx +++ b/sw/source/core/layout/flyincnt.cxx @@ -56,7 +56,6 @@ SwFlyInCntFrm::SwFlyInCntFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) : SwFlyFrm( pFmt, pAnch ) { bInCnt = bInvalidLayout = bInvalidCntnt = TRUE; - bPosCalculated = FALSE; SwTwips nRel = pFmt->GetVertOrient().GetPos(); // OD 2004-05-27 #i26791# - member moved to Point aRelPos; @@ -204,12 +203,6 @@ void SwFlyInCntFrm::MakeObjPos() if ( !bValidPos ) { bValidPos = TRUE; - // --> let the position be set, only if it was calculated in - // SwAsCharAnchoredObjectPosition::CalcPosition - //TLMATH01_ ???? - if ( !bPosCalculated ) - return; - // <-- SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt(); const SwFmtVertOrient &rVert = pFmt->GetVertOrient(); //Und ggf. noch die aktuellen Werte im Format updaten, dabei darf @@ -364,4 +357,4 @@ void SwFlyInCntFrm::MakeAll() // <-- } Unlock(); -} +} \ No newline at end of file diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index b9a6365435..2f0bb91e7b 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -414,6 +414,19 @@ SwFrm::~SwFrm() #endif } +/*************************************************************************/ + +const SwFrmFmt * SwLayoutFrm::GetFmt() const +{ + return static_cast< const SwFlyFrmFmt * >( GetDep() ); +} + +SwFrmFmt * SwLayoutFrm::GetFmt() +{ + return static_cast< SwFlyFrmFmt * >( GetDep() ); +} + + /************************************************************************* |* |* SwLayoutFrm::SetFrmFmt() diff --git a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx index c7fc984dd6..d6e88cd1e0 100644 --- a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx @@ -328,11 +328,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() { // set new anchor position and relative position SwFlyInCntFrm* pFlyInCntFrm = &(const_cast(rFlyInCntFrm)); - // --> let SwFlyInCnt::MakeObjPos set position only at this place using bPosCalculated - pFlyInCntFrm->SetPosCalculated( TRUE ); pFlyInCntFrm->SetRefPoint( aAnchorPos, aRelAttr, aRelPos ); - pFlyInCntFrm->SetPosCalculated( FALSE ); - // <-- if( nObjWidth != (pFlyInCntFrm->Frm().*fnRect->fnGetWidth)() ) { // recalculate object bound rectangle, if object width has changed. @@ -458,4 +454,4 @@ SwRect SwAsCharAnchoredObjectPosition::GetObjBoundRectInclSpacing() const sal_uInt8 SwAsCharAnchoredObjectPosition::GetLineAlignment() const { return mnLineAlignment; -} +} \ No newline at end of file diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index a901d3c7c7..2b2575542c 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -781,7 +781,7 @@ BOOL SwOLEObj::IsOleRef() const return xOLERef.is(); } -uno::Reference < embed::XEmbeddedObject > SwOLEObj::GetOleRef() +const uno::Reference < embed::XEmbeddedObject > SwOLEObj::GetOleRef() { if( !xOLERef.is() ) { @@ -1015,4 +1015,4 @@ void SwOLELRUCache::RemoveObj( SwOLEObj& rObj ) SvPtrarr::Remove( nPos ); if( !Count() ) DELETEZ( pOLELRU_Cache ); -} +} \ No newline at end of file diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx index a248ac8aff..087dc0a07c 100644 --- a/sw/source/ui/app/appopt.cxx +++ b/sw/source/ui/app/appopt.cxx @@ -27,19 +27,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include -#ifndef _CMDID_H -#include // Funktion-Ids -#endif - -#include #define _SVSTDARR_STRINGSDTOR #include -#ifndef _MSGBOX_HXX //autogen +#include + +#include +#include // Funktion-Ids #include -#endif #include #include #include @@ -47,9 +43,7 @@ #include #include #include -#ifndef _SVX_TSTPITEM_HXX //autogen #include -#endif #include #include #include @@ -59,37 +53,25 @@ #include #include #include -#ifndef _VIEW_HXX #include -#endif +#include #include -#ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED #include -#endif #include #include // fuer ::GetGlossaries() #include //fuer UpdateFields -#ifndef _WVIEW_HXX #include -#endif #include #include -#ifndef _PVIEW_HXX #include -#endif #include -#ifndef _MODCFG_HXX #include -#endif #include #include #include #include #include - -#ifndef _GLOBALS_HRC #include -#endif #include // globale Konstanten z.B. #include #include "swabstdlg.hxx" @@ -334,8 +316,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) /*--------------------------------------------------------------------- Seite Dokumentansicht auswerten -----------------------------------------------------------------------*/ - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_DOCDISP, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_DOCDISP, FALSE, &pItem )) { const SwDocDisplayItem* pDocDispItem = (const SwDocDisplayItem*)pItem; @@ -364,23 +345,20 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) Elemente - Item auswerten -----------------------------------------------------------------------*/ - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_ELEM, FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ELEM, FALSE, &pItem ) ) { const SwElemItem* pElemItem = (const SwElemItem*)pItem; pElemItem->FillViewOptions( aViewOpt ); } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, - FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, FALSE, &pItem ) ) { SFX_APP()->SetOptions(rSet); const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; ::SetDfltMetric((FieldUnit)pMetricItem->GetValue(), !bTextDialog); } - if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, - FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, FALSE, &pItem ) ) { const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue(); @@ -389,8 +367,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) pAppView->ChangeTabMetric(eUnit); } - if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, - FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, FALSE, &pItem ) ) { const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue(); @@ -399,8 +376,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) pAppView->ChangeVLinealMetric(eUnit); } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, - FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem ) ) { USHORT nTabDist = ((const SfxUInt16Item*)pItem)->GetValue(); pPref->SetDefTab(nTabDist); @@ -427,8 +403,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) Seite Rastereinstellungen auswerten ----------------------------------------------------------------------*/ - if( SFX_ITEM_SET == rSet.GetItemState( - SID_ATTR_GRID_OPTIONS, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, FALSE, &pItem )) { const SvxGridItem* pGridItem = (const SvxGridItem*)pItem; @@ -458,8 +433,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) // Writer Drucker Zusatzeinstellungen auswerten //---------------------------------------------------------------------------- - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_ADDPRINTER, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, FALSE, &pItem )) { SwPrintOptions* pOpt = GetPrtOptions(!bTextDialog); if (pOpt) @@ -473,16 +447,25 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) } - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) { ((SwShadowCursorItem*)pItem)->FillViewOptions( aViewOpt ); if(pBindings) pBindings->Invalidate(FN_SHADOWCURSOR); } - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem )) + if( pAppView ) + { + SwWrtShell &rWrtSh = pAppView->GetWrtShell(); + const bool bAlignFormulas = rWrtSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + pPref->SetAlignMathObjectsToBaseline( bAlignFormulas ); + + // don't align formulas in documents that are currently loading + if (bAlignFormulas && !rWrtSh.GetDoc()->IsInReading()) + rWrtSh.AlignAllFormulasToBaseline(); + } + + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem )) { aViewOpt.SetCursorInProtectedArea(((const SfxBoolItem*)pItem)->GetValue()); } @@ -510,8 +493,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) } #endif // dann an der akt. View und Shell die entsp. Elemente setzen - ApplyUsrPref( aViewOpt, pAppView, - bTextDialog? VIEWOPT_DEST_TEXT : VIEWOPT_DEST_WEB); + ApplyUsrPref( aViewOpt, pAppView, bTextDialog? VIEWOPT_DEST_TEXT : VIEWOPT_DEST_WEB); } /* -----------------12.02.99 12:28------------------- * @@ -609,6 +591,15 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS if ( fnCreatePage ) pRet = (*fnCreatePage)( pParent, rSet ); } + if (pRet && nId == RID_SW_TP_OPTSHDWCRSR) + { + SwView* pCurrView = GetView(); + if(pCurrView) + { + aSet.Put( SwWrtShellItem( SID_WRT_SHELL, pCurrView->GetWrtShellPtr() ) ); + pRet->PageCreated(aSet); + } + } } break; #ifdef DBG_UTIL @@ -653,5 +644,3 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS return pRet; } - - diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx index 4b0e3575a6..f9ee757b23 100644 --- a/sw/source/ui/app/docshini.cxx +++ b/sw/source/ui/app/docshini.cxx @@ -336,6 +336,12 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) pColl->SetFmtAttr( aFontHeight ); } } + + // the default for documents created via 'File/New' should be 'on' + // (old documents, where this property was not yet implemented, will get the + // value 'false' in the SwDoc c-tor) + pDoc->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT, + SW_MOD()->GetUsrPref( bWeb )->IsAlignMathObjectsToBaseline() ); } /* #106748# If the default frame direction of a document is RTL @@ -823,4 +829,3 @@ void SwDocShell::SubInitNew() IDocumentDeviceAccess* SwDocShell::getIDocumentDeviceAccess() { return pDoc; } const IDocumentSettingAccess* SwDocShell::getIDocumentSettingAccess() const { return pDoc; } IDocumentChartDataProviderAccess* SwDocShell::getIDocumentChartDataProviderAccess() { return pDoc; } - diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx index 352819a184..6fa2666579 100644 --- a/sw/source/ui/config/cfgitems.cxx +++ b/sw/source/ui/config/cfgitems.cxx @@ -458,4 +458,3 @@ int SwTestItem::operator==( const SfxPoolItem& rAttr ) const #endif - diff --git a/sw/source/ui/config/makefile.mk b/sw/source/ui/config/makefile.mk index 4b8ed01ca9..c093b18ce0 100644 --- a/sw/source/ui/config/makefile.mk +++ b/sw/source/ui/config/makefile.mk @@ -83,5 +83,4 @@ LIB1OBJFILES = \ # --- Targets ------------------------------------------------------- -.INCLUDE : target.mk - +.INCLUDE : target.mk \ No newline at end of file diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc index 31f2e7041f..d58d1b6ac4 100644 --- a/sw/source/ui/config/optdlg.hrc +++ b/sw/source/ui/config/optdlg.hrc @@ -30,7 +30,7 @@ #define FL_NOPRINT 2 #define FL_WINDOW 3 -#define CB_GRF 1 +#define CB_GRF 1 #define CB_TBL 2 #define CB_DRWFAST 3 #define CB_FIELD 4 @@ -39,10 +39,10 @@ #define CB_SPACE 7 #define CB_HSPACE 8 #define CB_SHYPH 9 -#define CB_FLD_HIDDEN 10 +#define CB_FLD_HIDDEN 10 #define CB_BREAK 11 #define CB_ANY_RULER 12 -#define CB_CROSS 14 +#define CB_CROSS 14 #define CB_HSCROLL 15 #define CB_VSCROLL 16 #define CB_HRULER 17 @@ -50,7 +50,7 @@ #define FL_LINE 22 #define CB_POSTIT 23 #define CB_VRULER_RIGHT 24 -#define CB_BIGHANDLE 25 +#define CB_BIGHANDLE 25 #define FL_SETTINGS 26 #define LB_METRIC 27 @@ -191,7 +191,7 @@ #define FL_TABLE_SEPARATOR 139 #define CB_PROSPECT_RTL 140 -#define FL_SHDWCRSFLAG 1 +#define FL_SHDWCRSFLAG 1 #define CB_SHDWCRSONOFF 2 #define FL_SHDWCRSMODE 3 #define FT_SHDWCRSFILLMODE 4 @@ -201,5 +201,8 @@ #define RB_SHDWCRSFILLSPACE 8 #define CB_ALLOW_IN_PROT 12 #define FL_CRSR_OPT 13 -#define FL_SEPARATOR_SHDW 14 +#define FL_SEPARATOR_SHDW 14 +#define FL_LAYOUT_OPTIONS 15 +#define CB_MATH_BASELINE_ALIGNMENT 16 + diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src old mode 100755 new mode 100644 index a2573ed3c1..b5195005b4 --- a/sw/source/ui/config/optdlg.src +++ b/sw/source/ui/config/optdlg.src @@ -941,6 +941,18 @@ TabPage TP_OPTSHDWCRSR Group = TRUE ; Text [ en-US ] = "Enable"; }; + FixedLine FL_LAYOUT_OPTIONS + { + Pos = MAP_APPFONT ( 6 , 133 ) ; + Size = MAP_APPFONT ( 118 , 8 ) ; + Text [ en-US ] = "Layout assistance"; + }; + CheckBox CB_MATH_BASELINE_ALIGNMENT + { + Pos = MAP_APPFONT ( 12 , 144 ) ; + Size = MAP_APPFONT ( 236 , 10 ) ; + Text [ en-US ] = "Math baseline alignment"; + }; }; diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx old mode 100755 new mode 100644 index 8d3943834c..b15c3db5e3 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -31,16 +31,15 @@ #undef SW_DLLIMPLEMENTATION #endif - -#include -#ifndef _CMDID_H -#include -#endif -#include #ifndef _SVSTDARR_HXX #define _SVSTDARR_STRINGSDTOR #include #endif + +#include +#include +#include +#include #include #include #include @@ -55,15 +54,9 @@ #include #include #include -#ifndef _VIEW_HXX #include -#endif -#ifndef _DOCSH_HXX #include -#endif -#ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED #include -#endif #include #include #include @@ -73,26 +66,14 @@ #include #include #include -#ifndef _MODCFG_HXX #include -#endif -#ifndef _SRCVIEW_HXX #include -#endif #include #include -#ifndef _GLOBALS_HRC #include -#endif -#ifndef _CONFIG_HRC #include -#endif -#ifndef _REDLOPT_HRC #include -#endif -#ifndef _OPTDLG_HRC #include -#endif #include #include #include @@ -1510,6 +1491,7 @@ IMPL_LINK(SwTableOptionsTabPage, CheckBoxHdl, CheckBox*, EMPTYARG) aRepeatHeaderCB.Enable(aHeaderCB.IsChecked()); return 0; } + void SwTableOptionsTabPage::PageCreated (SfxAllItemSet aSet) { SFX_ITEMSET_ARG (&aSet,pWrtSh,SwWrtShellItem,SID_WRT_SHELL,sal_False); @@ -1547,15 +1529,17 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( Window* pParent, aFillTabRB( this, SW_RES( RB_SHDWCRSFILLTAB )), aFillSpaceRB( this, SW_RES( RB_SHDWCRSFILLSPACE )), aCrsrOptFL ( this, SW_RES( FL_CRSR_OPT)), - aCrsrInProtCB( this, SW_RES( CB_ALLOW_IN_PROT )) + aCrsrInProtCB( this, SW_RES( CB_ALLOW_IN_PROT )), + m_aLayoutOptionsFL( this, SW_RES( FL_LAYOUT_OPTIONS ) ), + m_aMathBaselineAlignmentCB( this, SW_RES( CB_MATH_BASELINE_ALIGNMENT ) ), + m_pWrtShell( NULL ) { FreeResource(); const SfxPoolItem* pItem = 0; - SwShadowCursorItem aOpt; + SwShadowCursorItem aOpt; if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) aOpt = *(SwShadowCursorItem*)pItem; - aOnOffCB.Check( aOpt.IsOn() ); BYTE eMode = aOpt.GetMode(); @@ -1600,6 +1584,15 @@ SfxTabPage* SwShdwCrsrOptionsTabPage::Create( Window* pParent, const SfxItemSet& return new SwShdwCrsrOptionsTabPage( pParent, rSet ); } + +void SwShdwCrsrOptionsTabPage::PageCreated( SfxAllItemSet aSet ) +{ + SFX_ITEMSET_ARG (&aSet,pWrtSh,SwWrtShellItem,SID_WRT_SHELL,sal_False); + if (pWrtSh) + SetWrtShell(pWrtSh->GetValue()); +} + + BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) { SwShadowCursorItem aOpt; @@ -1625,6 +1618,10 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) bRet = TRUE; } + m_pWrtShell->GetDoc()->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT, + m_aMathBaselineAlignmentCB.IsChecked() ); + bRet |= m_aMathBaselineAlignmentCB.IsChecked() != m_aMathBaselineAlignmentCB.GetSavedValue(); + if( aCrsrInProtCB.IsChecked() != aCrsrInProtCB.GetSavedValue()) { rSet.Put(SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED, aCrsrInProtCB.IsChecked())); @@ -1658,11 +1655,10 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem = 0; - SwShadowCursorItem aOpt; + SwShadowCursorItem aOpt; if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) aOpt = *(SwShadowCursorItem*)pItem; - aOnOffCB.Check( aOpt.IsOn() ); BYTE eMode = aOpt.GetMode(); @@ -1671,6 +1667,9 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet ) aFillTabRB.Check( FILL_TAB == eMode ); aFillSpaceRB.Check( FILL_SPACE == eMode ); + m_aMathBaselineAlignmentCB.Check( m_pWrtShell->GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) ); + m_aMathBaselineAlignmentCB.SaveValue(); + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem )) aCrsrInProtCB.Check(((const SfxBoolItem*)pItem)->GetValue()); aCrsrInProtCB.SaveValue(); @@ -2615,4 +2614,3 @@ IMPL_LINK_INLINE_END( SwTestTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) #endif - diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx index c5525ecdf3..46cd317ed1 100644 --- a/sw/source/ui/config/usrpref.cxx +++ b/sw/source/ui/config/usrpref.cxx @@ -258,7 +258,7 @@ Sequence SwLayoutViewConfig::GetPropertyNames() "Window/SmoothScroll", //10 "Zoom/Value", //11 "Zoom/Type", //12 - "Other/IsAlignMathObjectsToBaseline" //13 + "Other/IsAlignMathObjectsToBaseline", //13 "Other/MeasureUnit", //14 // below properties are not available in WriterWeb "Other/TabStop", //15 @@ -304,40 +304,38 @@ void SwLayoutViewConfig::Commit() for(int nProp = 0; nProp < aNames.getLength(); nProp++) { - sal_Bool bSet; + Any &rVal = pValues[nProp]; switch(nProp) { - case 0: bSet = rParent.IsCrossHair(); break; // "Line/Guide", - case 1: bSet = rParent.IsSolidMarkHdl(); break; // "Line/SimpleControlPoint", - case 2: bSet = rParent.IsBigMarkHdl(); break; // "Line/LargeControlPoint", - case 3: bSet = rParent.IsViewHScrollBar(); break; // "Window/HorizontalScroll", - case 4: bSet = rParent.IsViewVScrollBar(); break; // "Window/VerticalScroll", - case 5: bSet = rParent.IsViewAnyRuler(); break; // "Window/ShowRulers" + case 0: rVal <<= (sal_Bool) rParent.IsCrossHair(); break; // "Line/Guide", + case 1: rVal <<= (sal_Bool) rParent.IsSolidMarkHdl(); break; // "Line/SimpleControlPoint", + case 2: rVal <<= (sal_Bool) rParent.IsBigMarkHdl(); break; // "Line/LargeControlPoint", + case 3: rVal <<= (sal_Bool) rParent.IsViewHScrollBar(); break; // "Window/HorizontalScroll", + case 4: rVal <<= (sal_Bool) rParent.IsViewVScrollBar(); break; // "Window/VerticalScroll", + case 5: rVal <<= (sal_Bool) rParent.IsViewAnyRuler(); break; // "Window/ShowRulers" // #i14593# use IsView*Ruler(TRUE) instead of IsView*Ruler() // this preserves the single ruler states even if "Window/ShowRulers" is off - case 6: bSet = rParent.IsViewHRuler(TRUE); break; // "Window/HorizontalRuler", - case 7: bSet = rParent.IsViewVRuler(TRUE); break; // "Window/VerticalRuler", + case 6: rVal <<= (sal_Bool) rParent.IsViewHRuler(TRUE); break; // "Window/HorizontalRuler", + case 7: rVal <<= (sal_Bool) rParent.IsViewVRuler(TRUE); break; // "Window/VerticalRuler", case 8: if(rParent.bIsHScrollMetricSet) - pValues[nProp] <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit" + rVal <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit" break; case 9: if(rParent.bIsVScrollMetricSet) - pValues[nProp] <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit" + rVal <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit" break; - case 10: bSet = rParent.IsSmoothScroll(); break; // "Window/SmoothScroll", - case 11: pValues[nProp] <<= (sal_Int32)rParent.GetZoom(); break; // "Zoom/Value", - case 12: pValues[nProp] <<= (sal_Int32)rParent.GetZoomType(); break;// "Zoom/Type", - case 13: bSet = rParent.IsAlignMathObjectsToBaseline(); break; // "Other/IsAlignMathObjectsToBaseline" - case 14: pValues[nProp] <<= (sal_Int32)rParent.GetMetric(); break; // "Other/MeasureUnit", - case 15: pValues[nProp] <<= static_cast(TWIP_TO_MM100(rParent.GetDefTab())); break;// "Other/TabStop", - case 16: bSet = rParent.IsVRulerRight(); break; // "Window/IsVerticalRulerRight", - case 17: pValues[nProp] <<= (sal_Int32)rParent.GetViewLayoutColumns(); break;// "ViewLayout/Columns", - case 18: bSet = rParent.IsViewLayoutBookMode(); break; // "ViewLayout/BookMode", - case 19: bSet = rParent.IsSquaredPageMode(); break; // "Other/IsSquaredPageMode", + case 10: rVal <<= (sal_Bool) rParent.IsSmoothScroll(); break; // "Window/SmoothScroll", + case 11: rVal <<= (sal_Int32)rParent.GetZoom(); break; // "Zoom/Value", + case 12: rVal <<= (sal_Int32)rParent.GetZoomType(); break; // "Zoom/Type", + case 13: rVal <<= (sal_Bool) rParent.IsAlignMathObjectsToBaseline(); break; // "Other/IsAlignMathObjectsToBaseline" + case 14: rVal <<= (sal_Int32)rParent.GetMetric(); break; // "Other/MeasureUnit", + case 15: rVal <<= static_cast(TWIP_TO_MM100(rParent.GetDefTab())); break;// "Other/TabStop", + case 16: rVal <<= (sal_Bool) rParent.IsVRulerRight(); break; // "Window/IsVerticalRulerRight", + case 17: rVal <<= (sal_Int32)rParent.GetViewLayoutColumns(); break; // "ViewLayout/Columns", + case 18: rVal <<= (sal_Bool) rParent.IsViewLayoutBookMode(); break; // "ViewLayout/BookMode", + case 19: rVal <<= (sal_Bool) rParent.IsSquaredPageMode(); break; // "Other/IsSquaredPageMode", } - if(nProp < 8 || nProp == 10 || nProp == 15 || nProp == 17 || nProp == 18 ) - pValues[nProp].setValue(&bSet, ::getBooleanCppuType()); } PutProperties(aNames, aValues); } @@ -356,7 +354,11 @@ void SwLayoutViewConfig::Load() { if(pValues[nProp].hasValue()) { - sal_Bool bSet = nProp < 8 || nProp == 10 || nProp == 17 || nProp == 18 ? *(sal_Bool*)pValues[nProp].getValue() : sal_False; + sal_Int32 nInt32Val = 0; + sal_Bool bSet = sal_False; + pValues[nProp] >>= nInt32Val; + pValues[nProp] >>= bSet; + switch(nProp) { case 0: rParent.SetCrossHair(bSet); break;// "Line/Guide", @@ -370,59 +372,23 @@ void SwLayoutViewConfig::Load() case 8: { rParent.bIsHScrollMetricSet = sal_True; - sal_Int32 nUnit = 0; - pValues[nProp] >>= nUnit; - rParent.eHScrollMetric = ((FieldUnit)nUnit); // "Window/HorizontalRulerUnit" + rParent.eHScrollMetric = ((FieldUnit)nInt32Val); // "Window/HorizontalRulerUnit" } break; case 9: { rParent.bIsVScrollMetricSet = sal_True; - sal_Int32 nUnit = 0; - pValues[nProp] >>= nUnit; - rParent.eVScrollMetric = ((FieldUnit)nUnit); // "Window/VerticalRulerUnit" + rParent.eVScrollMetric = ((FieldUnit)nInt32Val); // "Window/VerticalRulerUnit" } break; case 10: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll", - case 11: - { - sal_Int32 nVal = 0; - pValues[nProp] >>= nVal; - rParent.SetZoom( static_cast< USHORT >(nVal) ); - } - break;// "Zoom/Value", - case 12: - { - sal_Int32 nVal = 0; - pValues[nProp] >>= nVal; - rParent.SetZoomType( static_cast< SvxZoomType >(nVal) ); - } - break;// "Zoom/Type", - + case 11: rParent.SetZoom( static_cast< USHORT >(nInt32Val) ); break;// "Zoom/Value", + case 12: rParent.SetZoomType( static_cast< SvxZoomType >(nInt32Val) ); break;// "Zoom/Type", case 13: rParent.SetAlignMathObjectsToBaseline(bSet); break;// "Other/IsAlignMathObjectsToBaseline" - - case 14: - { - sal_Int32 nUnit = 0; - pValues[nProp] >>= nUnit; - rParent.SetMetric((FieldUnit)nUnit, TRUE); - } - break;// "Other/MeasureUnit", - case 15: - { - sal_Int32 nTab = 0; - pValues[nProp] >>= nTab; - rParent.SetDefTab(MM100_TO_TWIP(nTab), TRUE); - } - break;// "Other/TabStop", + case 14: rParent.SetMetric((FieldUnit)nInt32Val, TRUE); break;// "Other/MeasureUnit", + case 15: rParent.SetDefTab(MM100_TO_TWIP(nInt32Val), TRUE); break;// "Other/TabStop", case 16: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight", - case 17: - { - sal_Int32 nColumns = 0; - pValues[nProp] >>= nColumns; - rParent.SetViewLayoutColumns( static_cast(nColumns) ); - } - break;// "ViewLayout/Columns", + case 17: rParent.SetViewLayoutColumns( static_cast(nInt32Val) ); break;// "ViewLayout/Columns", case 18: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode", case 19: rParent.SetDefaultPageMode(bSet,TRUE); break;// "Other/IsSquaredPageMode", } diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 8c3355bb6b..63266f7359 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -582,5 +582,3 @@ struct SwDialogsResMgr }; #endif - - diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index 413845f1eb..9486079a62 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -93,7 +93,8 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame, aTmp += *pStr; aTmp += ')'; } - AddTabPage(TP_FRM_STD, SwFrmPage::Create, 0); + + AddTabPage(TP_FRM_STD, SwFrmPage::Create, 0); AddTabPage(TP_FRM_ADD, SwFrmAddPage::Create, 0); AddTabPage(TP_FRM_WRAP, SwWrapTabPage::Create, 0); AddTabPage(TP_FRM_URL, SwFrmURLPage::Create, 0); @@ -216,4 +217,4 @@ void SwFrmDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) } break; } -} +} \ No newline at end of file diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 7939957c71..09db4cb7c7 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -677,7 +677,10 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : nOldV(text::VertOrientation::TOP), nOldVRel(text::RelOrientation::PRINT_AREA), pVMap( 0 ), - pHMap( 0 ) + pHMap( 0 ), + m_bAllowVertPositioning( true ), + m_bIsMathOLE( false ), + m_bIsMathBaselineAlignment( false ) { FreeResource(); SetExchangeSupport(); @@ -785,6 +788,11 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) const SwFmtAnchor& rAnchor = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR); + m_bIsMathOLE = ((const SfxBoolItem&)rSet.Get( FN_OLE_IS_MATH )).GetValue(); + m_bIsMathBaselineAlignment = ((const SfxBoolItem&)rSet.Get( FN_MATH_BASELINE_ALIGNMENT )).GetValue(); + EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment + && FLY_AS_CHAR == rAnchor.GetAnchorId()) ); + if (bFormat) { // Bei Formaten keine Ankerbearbeitung @@ -1280,8 +1288,8 @@ void SwFrmPage::InitPos(RndStdIds eId, if ( nY != LONG_MAX ) aAtVertPosED.SetValue( aAtVertPosED.Normalize(nY), FUNIT_TWIP ); } - aAtVertPosFT.Enable( bEnable ); - aAtVertPosED.Enable( bEnable ); + aAtVertPosFT.Enable( bEnable && m_bAllowVertPositioning ); + aAtVertPosED.Enable( bEnable && m_bAllowVertPositioning ); UpdateExample(); } @@ -1488,8 +1496,10 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap, } } - _rLB.Enable(_rLB.GetEntryCount() != 0); - _rFT.Enable(_rLB.GetEntryCount() != 0); + const bool bEnable = _rLB.GetEntryCount() != 0 + && (&_rLB != &aVertRelationLB || m_bAllowVertPositioning); + _rLB.Enable( bEnable ); + _rFT.Enable( bEnable ); RelHdl(&_rLB); @@ -1850,6 +1860,10 @@ IMPL_LINK( SwFrmPage, AnchorTypeHdl, RadioButton *, EMPTYARG ) PosHdl(&aHorizontalDLB); PosHdl(&aVerticalDLB); } + + EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment + && FLY_AS_CHAR == eId) ); + return 0; } @@ -1875,7 +1889,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) } else { - BOOL bEnable = text::VertOrientation::NONE == nAlign; + BOOL bEnable = text::VertOrientation::NONE == nAlign && m_bAllowVertPositioning; aAtVertPosED.Enable( bEnable ); aAtVertPosFT.Enable( bEnable ); } @@ -2304,6 +2318,19 @@ void SwFrmPage::SetFormatUsed(BOOL bFmt) } } + +void SwFrmPage::EnableVerticalPositioning( bool bEnable ) +{ + m_bAllowVertPositioning = bEnable; + aVerticalFT.Enable( bEnable ); + aVerticalDLB.Enable( bEnable ); + aAtVertPosFT.Enable( bEnable ); + aAtVertPosED.Enable( bEnable ); + aVertRelationFT.Enable( bEnable ); + aVertRelationLB.Enable( bEnable ); +} + + /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ @@ -3246,4 +3273,3 @@ IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox) } return 0; } - diff --git a/sw/source/ui/inc/frmdlg.hxx b/sw/source/ui/inc/frmdlg.hxx index fa39f4b293..97e0b991e7 100644 --- a/sw/source/ui/inc/frmdlg.hxx +++ b/sw/source/ui/inc/frmdlg.hxx @@ -41,6 +41,7 @@ class SwFrmDlg : public SfxTabDialog BOOL m_bFormat; BOOL m_bNew; BOOL m_bHTMLMode; + bool m_bEnableVertPos; const SfxItemSet& m_rSet; USHORT m_nDlgType; SwWrtShell* m_pWrtShell; @@ -63,4 +64,4 @@ public: }; -#endif // _FRMDLG_HXX +#endif // _FRMDLG_HXX \ No newline at end of file diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx index a858c23199..03ed313c9e 100644 --- a/sw/source/ui/inc/frmpage.hxx +++ b/sw/source/ui/inc/frmpage.hxx @@ -28,27 +28,17 @@ #ifndef _FRMPAGE_HXX #define _FRMPAGE_HXX -#ifndef _FIXED_HXX //autogen #include -#endif -#ifndef _BUTTON_HXX //autogen #include -#endif -#ifndef _LSTBOX_HXX //autogen #include -#endif -#ifndef _FIELD_HXX //autogen #include -#endif #include #include #include #include #include #include -#ifndef _GLOBALS_HRC #include -#endif namespace sfx2{class FileDialogHelper;} @@ -142,6 +132,10 @@ class SwFrmPage: public SfxTabPage FrmMap* pVMap; FrmMap* pHMap; + bool m_bAllowVertPositioning; + bool m_bIsMathOLE; + bool m_bIsMathBaselineAlignment; + virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet *pSet); @@ -205,6 +199,7 @@ public: void SetFormatUsed(BOOL bFmt); void SetFrmType(USHORT nType) { nDlgType = nType; } inline BOOL IsInGraficMode( void ) { return nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE; } + void EnableVerticalPositioning( bool bEnable ); }; class SwGrfExtPage: public SfxTabPage @@ -341,4 +336,4 @@ public: }; -#endif // _FRMPAGE_HXX +#endif // _FRMPAGE_HXX \ No newline at end of file diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx index 60e15f866b..fa0af2e473 100644 --- a/sw/source/ui/inc/optpage.hxx +++ b/sw/source/ui/inc/optpage.hxx @@ -353,6 +353,12 @@ class SwShdwCrsrOptionsTabPage : public SfxTabPage FixedLine aCrsrOptFL; CheckBox aCrsrInProtCB; + FixedLine m_aLayoutOptionsFL; + CheckBox m_aMathBaselineAlignmentCB; + + SwWrtShell * m_pWrtShell; + + SwShdwCrsrOptionsTabPage( Window* pParent, const SfxItemSet& rSet ); ~SwShdwCrsrOptionsTabPage(); @@ -362,6 +368,9 @@ public: virtual BOOL FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); + + void SetWrtShell( SwWrtShell * pSh ) { m_pWrtShell = pSh; } + virtual void PageCreated( SfxAllItemSet aSet ); }; /*----------------------------------------------------------------------- @@ -498,5 +507,3 @@ private: }; #endif //PRODUCT #endif - - diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index b2dfee2fa4..9a3b4f6ba5 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -52,7 +52,7 @@ #include // <-- - +#include #include #include #include @@ -78,6 +78,7 @@ #include #include +#include #include #include #include @@ -408,14 +409,13 @@ void SwFrameShell::Execute(SfxRequest &rReq) SID_HTML_MODE, SID_HTML_MODE, FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME, FN_PARAM_CHAIN_PREVIOUS, FN_PARAM_CHAIN_NEXT, + FN_OLE_IS_MATH, FN_OLE_IS_MATH, + FN_MATH_BASELINE_ALIGNMENT, FN_MATH_BASELINE_ALIGNMENT, 0); const SwViewOption* pVOpt = rSh.GetViewOptions(); if(nSel & nsSelectionType::SEL_OLE) - { - aSet.Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, - pVOpt->IsKeepRatio())); - } + aSet.Put( SfxBoolItem(FN_KEEP_ASPECT_RATIO, pVOpt->IsKeepRatio()) ); aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell()))); aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName())); if( nSel & nsSelectionType::SEL_OLE ) @@ -446,6 +446,12 @@ void SwFrameShell::Execute(SfxRequest &rReq) if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != 0xff) rSize.SetHeight(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height()); + // disable vertical positioning for Math Objects anchored 'as char' if baseline alignment is activated + aSet.Put( SfxBoolItem( FN_MATH_BASELINE_ALIGNMENT, + rSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) ) ); + const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() ); + aSet.Put( SfxBoolItem( FN_OLE_IS_MATH, xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) ); + UINT16 nDefPage = 0; if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, FALSE, &pItem) == SFX_ITEM_SET) nDefPage = ((SfxUInt16Item *)pItem)->GetValue(); @@ -1145,4 +1151,4 @@ void SwFrameShell::StateInsert(SfxItemSet &rSet) if ((nSel & nsSelectionType::SEL_GRF) || (nSel & nsSelectionType::SEL_OLE)) rSet.DisableItem(FN_INSERT_FRAME); -} +} \ No newline at end of file diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx index d4ea02dea7..f3e8b6f2c5 100644 --- a/sw/source/ui/uiview/swcli.cxx +++ b/sw/source/ui/uiview/swcli.cxx @@ -27,16 +27,17 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include +#include #include +#include #include -#ifndef _VIEW_HXX #include -#endif #include #include +#include +#include #include @@ -173,16 +174,14 @@ void SwOleClient::MakeVisible() // --> #i972# void SwOleClient::FormatChanged() { - const uno::Reference < embed::XEmbeddedObject >& xObj = GetObject(); - - SvGlobalName aCLSID( xObj->getClassID() ); - if ( SotExchange::IsMath( aCLSID ) ) + const uno::Reference < embed::XEmbeddedObject >& xObj( GetObject() ); + SwView * pView = dynamic_cast< SwView * >( GetViewShell() ); + if ( pView && xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) { - SwView * pView = dynamic_cast< SwView * >( GetViewShell() ); - if (pView) - pView->GetWrtShell().AlignFormulaToBaseline( xObj ); + SwWrtShell & rWrtSh = pView->GetWrtShell(); + if (rWrtSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT )) + rWrtSh.AlignFormulaToBaseline( xObj ); } } // <-- - diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index 36b7d7afd6..b19a36cba5 100755 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -123,7 +123,8 @@ enum SwDocumentSettingsPropertyHandles // --> OD 2008-06-05 #i89181# HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, // <-- - HANDLE_MODIFYPASSWORDINFO + HANDLE_MODIFYPASSWORDINFO, + HANDLE_MATH_BASELINE_ALIGNMENT }; MasterPropertySetInfo * lcl_createSettingsInfo() @@ -178,6 +179,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo() // --> OD 2008-06-05 #i89181# { RTL_CONSTASCII_STRINGPARAM("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, CPPUTYPE_BOOLEAN, 0, 0}, { RTL_CONSTASCII_STRINGPARAM("ModifyPasswordInfo"), HANDLE_MODIFYPASSWORDINFO, CPPUTYPE_PROPERTYVALUE, 0, 0}, + { RTL_CONSTASCII_STRINGPARAM("MathBaselineAlignment"), HANDLE_MATH_BASELINE_ALIGNMENT, CPPUTYPE_BOOLEAN, 0, 0}, /* * As OS said, we don't have a view when we need to set this, so I have to @@ -686,6 +688,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf uno::Reference< uno::XInterface >() ); } break; + case HANDLE_MATH_BASELINE_ALIGNMENT: + { + sal_Bool bTmp = *(sal_Bool*)rValue.getValue(); + mpDoc->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT, bTmp ); + } + break; default: throw UnknownPropertyException(); } @@ -1018,6 +1026,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf rValue <<= mpDocSh->GetModifyPasswordInfo(); } break; + case HANDLE_MATH_BASELINE_ALIGNMENT: + { + sal_Bool bTmp = mpDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + rValue.setValue( &bTmp, ::getBooleanCppuType() ); + } + break; default: throw UnknownPropertyException(); diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 235ed4ff37..6822a7ec3a 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -27,6 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include #include #include @@ -58,13 +59,11 @@ #include #include #include - -#include <../../core/inc/flyfrm.hxx> - #include #include #include #include +#include #include #include #include @@ -74,6 +73,7 @@ #include #include #include +#include #include #include #include @@ -480,8 +480,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName if ( xObj.is() ) { - BOOL bActivate2 = InsertOleObject( xObj ); - if( bActivate && bDoVerb ) + if( InsertOleObject( xObj ) && bActivate && bDoVerb ) { SfxInPlaceClient* pClient = GetView().FindIPClient( xObj.GetObject(), &GetView().GetEditWin() ); if ( !pClient ) @@ -505,8 +504,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName //#50270# Error brauchen wir nicht handeln, das erledigt das //DoVerb in der SfxViewShell - if ( bActivate2 ) - pClient->DoVerb( SVVERB_SHOW ); + pClient->DoVerb( SVVERB_SHOW ); // TODO/LATER: set document name - should be done in Client //if ( !ERRCODE_TOERROR( nErr ) ) @@ -604,7 +602,7 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm SwFlyFrmFmt *pFmt = SwFEShell::InsertObject( xRef, &aFrmMgr.GetAttrSet() ); // --> #i972# - if ( bStarMath ) //sets baseline + if ( bStarMath && pDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) ) AlignFormulaToBaseline( xRef.GetObject() ); // <-- @@ -881,17 +879,14 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, if ( bUseObjectSize ) { // --> this moves non-resizable object so that when adding borders the baseline remains the same - const SwFlyFrm *pFly = GetCurrFlyFrm(); - if ( pFly ) + const SwFlyFrmFmt *pFlyFrmFmt = dynamic_cast< const SwFlyFrmFmt * >( GetFlyFrmFmt() ); + ASSERT( pFlyFrmFmt, "Could not find fly frame." ); + if ( pFlyFrmFmt ) { - const Point aPoint = pFly->GetLastFlyFrmPrtRectPos(); + const Point &rPoint = pFlyFrmFmt->GetLastFlyFrmPrtRectPos(); SwRect aRect( pFlyPrtRect ? *pFlyPrtRect : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() )); - aArea += aPoint - aRect.Pos(); - } - else - { - ASSERT( FALSE , "Could not find fly frame." ); + aArea += rPoint - aRect.Pos(); // adjust area by diff of printing area position in order to keep baseline alignment correct. } // <-- aArea.Width ( _aVisArea.Width() ); @@ -1878,4 +1873,4 @@ String SwWrtShell::GetSelDescr() const } return aResult; -} +} \ No newline at end of file -- cgit v1.2.3 From c73c61ed202bac23215a99dcde19383e75878e5b Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 4 Nov 2010 09:22:42 +0100 Subject: cws tlmath01: warning-free code (adding LF at EOF) --- sw/inc/IDocumentSettingAccess.hxx | 2 +- sw/inc/doc.hxx | 2 +- sw/inc/swabstdlg.hxx | 3 ++- sw/source/core/frmedt/feshview.cxx | 3 ++- sw/source/core/inc/flyfrms.hxx | 2 +- sw/source/core/layout/fly.cxx | 1 - sw/source/core/layout/flyincnt.cxx | 3 ++- sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx | 3 ++- sw/source/core/ole/ndole.cxx | 3 ++- sw/source/ui/frmdlg/frmdlg.cxx | 3 ++- sw/source/ui/inc/frmdlg.hxx | 2 +- sw/source/ui/inc/frmpage.hxx | 2 +- sw/source/ui/shells/frmsh.cxx | 3 ++- sw/source/ui/wrtsh/wrtsh1.cxx | 3 ++- 14 files changed, 21 insertions(+), 14 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx index 8817dec6de..a380a2e1b7 100644 --- a/sw/inc/IDocumentSettingAccess.hxx +++ b/sw/inc/IDocumentSettingAccess.hxx @@ -210,4 +210,4 @@ protected: virtual ~IDocumentSettingAccess() {}; }; - #endif // IDOCUMENTSETTINGACCESS_HXX_INCLUDED \ No newline at end of file +#endif // IDOCUMENTSETTINGACCESS_HXX_INCLUDED diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 722896cd5f..db05966c78 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -2221,4 +2221,4 @@ namespace docfunc bool HasOutlineStyleToBeWrittenAsNormalListStyle( SwDoc& rDoc ); } // <-- -#endif //_DOC_HXX \ No newline at end of file +#endif //_DOC_HXX diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index f4491844a6..7dc67c6fd7 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -494,4 +494,5 @@ public: virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId ) = 0; virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId ) = 0; }; -#endif \ No newline at end of file + +#endif diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index afeca868ce..87f736acd1 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -3241,4 +3241,5 @@ Point SwFEShell::GetRelativePagePosition(const Point& rDocPos) aRet = rDocPos - pPage->Frm().TopLeft(); } return aRet; -} \ No newline at end of file +} + diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx index e8a349330c..4f9987eec5 100644 --- a/sw/source/core/inc/flyfrms.hxx +++ b/sw/source/core/inc/flyfrms.hxx @@ -256,4 +256,4 @@ inline void SwFlyInCntFrm::ValidateCntnt() const ((SwFlyInCntFrm*)this)->bInvalidCntnt = FALSE; } -#endif \ No newline at end of file +#endif diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index db4f3f29c1..58efef39b4 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -2863,4 +2863,3 @@ SwFlyFrmFmt * SwFlyFrm::GetFmt() return static_cast< SwFlyFrmFmt * >( GetDep() ); } - \ No newline at end of file diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx index 941be73c15..e6a9c1472e 100644 --- a/sw/source/core/layout/flyincnt.cxx +++ b/sw/source/core/layout/flyincnt.cxx @@ -357,4 +357,5 @@ void SwFlyInCntFrm::MakeAll() // <-- } Unlock(); -} \ No newline at end of file +} + diff --git a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx index d6e88cd1e0..6d42785291 100644 --- a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx @@ -454,4 +454,5 @@ SwRect SwAsCharAnchoredObjectPosition::GetObjBoundRectInclSpacing() const sal_uInt8 SwAsCharAnchoredObjectPosition::GetLineAlignment() const { return mnLineAlignment; -} \ No newline at end of file +} + diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 2b2575542c..479842ce5a 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -1015,4 +1015,5 @@ void SwOLELRUCache::RemoveObj( SwOLEObj& rObj ) SvPtrarr::Remove( nPos ); if( !Count() ) DELETEZ( pOLELRU_Cache ); -} \ No newline at end of file +} + diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index 9486079a62..52280136a8 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -217,4 +217,5 @@ void SwFrmDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) } break; } -} \ No newline at end of file +} + diff --git a/sw/source/ui/inc/frmdlg.hxx b/sw/source/ui/inc/frmdlg.hxx index 97e0b991e7..43be092b58 100644 --- a/sw/source/ui/inc/frmdlg.hxx +++ b/sw/source/ui/inc/frmdlg.hxx @@ -64,4 +64,4 @@ public: }; -#endif // _FRMDLG_HXX \ No newline at end of file +#endif // _FRMDLG_HXX diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx index 03ed313c9e..1f097d1c29 100644 --- a/sw/source/ui/inc/frmpage.hxx +++ b/sw/source/ui/inc/frmpage.hxx @@ -336,4 +336,4 @@ public: }; -#endif // _FRMPAGE_HXX \ No newline at end of file +#endif // _FRMPAGE_HXX diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 9a3b4f6ba5..66043b2eb5 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -1151,4 +1151,5 @@ void SwFrameShell::StateInsert(SfxItemSet &rSet) if ((nSel & nsSelectionType::SEL_GRF) || (nSel & nsSelectionType::SEL_OLE)) rSet.DisableItem(FN_INSERT_FRAME); -} \ No newline at end of file +} + diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 6822a7ec3a..dbcf23f7b8 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -1873,4 +1873,5 @@ String SwWrtShell::GetSelDescr() const } return aResult; -} \ No newline at end of file +} + -- cgit v1.2.3 From bf68ddb4b3074bceb12b145502569ec8fac07a05 Mon Sep 17 00:00:00 2001 From: os Date: Thu, 4 Nov 2010 11:21:05 +0100 Subject: #i105063# moving cursor to linebreak (dtardon) --- sw/source/core/text/frmcrsr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index 343efedd4d..e165346c54 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -780,7 +780,7 @@ sal_Bool SwTxtFrm::RightMargin(SwPaM *pPam, sal_Bool bAPI) const if( aLine.GetCurr()->GetLen() && CH_BREAK == aInf.GetTxt().GetChar( nRightMargin - 1 ) ) --nRightMargin; - if( !bAPI && (aLine.GetNext() || pFrm->GetFollow()) ) + else if( !bAPI && (aLine.GetNext() || pFrm->GetFollow()) ) { while( nRightMargin > aLine.GetStart() && ' ' == aInf.GetTxt().GetChar( nRightMargin - 1 ) ) -- cgit v1.2.3 From ac0328e2afd3d11d239143a338548b5bd7c362a3 Mon Sep 17 00:00:00 2001 From: os Date: Thu, 4 Nov 2010 13:05:15 +0100 Subject: #i101078# gcc 4.3.2 warnings --- sw/inc/fmtcol.hxx | 2 +- sw/source/core/doc/docfld.cxx | 12 ++++++------ sw/source/core/doc/docftn.cxx | 4 ++-- sw/source/core/doc/tblrwcl.cxx | 8 ++++---- sw/source/core/edit/edsect.cxx | 4 ++-- sw/source/core/frmedt/feshview.cxx | 6 ++++-- sw/source/core/frmedt/tblsel.cxx | 4 ++-- sw/source/core/layout/calcmove.cxx | 4 ++-- sw/source/core/layout/frmtool.cxx | 2 +- sw/source/core/layout/layact.cxx | 2 +- sw/source/core/layout/pagechg.cxx | 4 ++-- sw/source/core/layout/paintfrm.cxx | 8 ++++---- sw/source/core/layout/trvlfrm.cxx | 22 ++++++++++++---------- sw/source/core/layout/wsfrm.cxx | 2 +- sw/source/core/table/swtable.cxx | 2 +- sw/source/core/unocore/unostyle.cxx | 12 ++++++------ sw/source/core/unocore/unotbl.cxx | 12 ++++++------ sw/source/filter/ascii/ascatr.cxx | 4 ++-- sw/source/filter/html/htmlctxt.cxx | 2 +- sw/source/filter/ww8/ww8par.cxx | 2 +- sw/source/ui/frmdlg/frmpage.cxx | 2 +- sw/source/ui/index/cnttab.cxx | 12 ++++++------ sw/source/ui/misc/glosdoc.cxx | 2 +- sw/source/ui/misc/outline.cxx | 4 ++-- sw/source/ui/shells/frmsh.cxx | 6 +++--- sw/source/ui/shells/tabsh.cxx | 16 ++++++++-------- sw/source/ui/shells/textsh.cxx | 2 +- sw/source/ui/shells/textsh1.cxx | 4 ++-- sw/source/ui/shells/txtattr.cxx | 4 ++-- sw/source/ui/uiview/view.cxx | 4 ++-- sw/source/ui/uiview/viewtab.cxx | 22 +++++++++++----------- sw/source/ui/utlui/content.cxx | 10 +++++----- 32 files changed, 105 insertions(+), 101 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx index 549af2040f..29a9f80f74 100644 --- a/sw/inc/fmtcol.hxx +++ b/sw/inc/fmtcol.hxx @@ -113,7 +113,7 @@ public: void SetAttrOutlineLevel( int ); int GetAttrOutlineLevel() const; int GetAssignedOutlineStyleLevel() const; - inline bool IsAssignedToListLevelOfOutlineStyle() const + inline const bool IsAssignedToListLevelOfOutlineStyle() const { return mbAssignedToOutlineStyle; } diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 9d907b9896..381ea5e32d 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -2464,9 +2464,9 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode ) { SwDBData aDBData(((SwDBNumSetField*)pFld)->GetDBData(&rDoc)); - if( bIsDBMgr && - rDoc.GetNewDBMgr()->OpenDataSource( aDBData.sDataSource, aDBData.sCommand )&& - GETFLD_ALL == eGetMode || + if( (bIsDBMgr && + rDoc.GetNewDBMgr()->OpenDataSource( aDBData.sDataSource, aDBData.sCommand )&& + GETFLD_ALL == eGetMode) || ( GETFLD_CALC & eGetMode && ((SwDBNumSetField*)pFld)->IsCondValid())) pFormel = &pFld->GetPar1(); @@ -2476,9 +2476,9 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode ) { SwDBData aDBData(((SwDBNextSetField*)pFld)->GetDBData(&rDoc)); - if( bIsDBMgr && - rDoc.GetNewDBMgr()->OpenDataSource( aDBData.sDataSource, aDBData.sCommand )&& - GETFLD_ALL == eGetMode || + if( (bIsDBMgr && + rDoc.GetNewDBMgr()->OpenDataSource( aDBData.sDataSource, aDBData.sCommand )&& + GETFLD_ALL == eGetMode) || ( GETFLD_CALC & eGetMode && ((SwDBNextSetField*)pFld)->IsCondValid() )) pFormel = &pFld->GetPar1(); diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx index 9af54315b2..ee7c28c8b3 100644 --- a/sw/source/core/doc/docftn.cxx +++ b/sw/source/core/doc/docftn.cxx @@ -333,8 +333,8 @@ void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo) } BOOL bNumChg = rInfo.nFtnOffset != GetEndNoteInfo().nFtnOffset; - BOOL bExtra = !bNumChg && - rInfo.aFmt.GetNumberingType() != GetEndNoteInfo().aFmt.GetNumberingType()|| + BOOL bExtra = (!bNumChg && rInfo.aFmt.GetNumberingType() != GetEndNoteInfo().aFmt.GetNumberingType() ) + || rInfo.GetPrefix() != GetEndNoteInfo().GetPrefix() || rInfo.GetSuffix() != GetEndNoteInfo().GetSuffix(); BOOL bFtnDesc = rInfo.GetPageDesc( *this ) != diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 5d93e0371d..677e433199 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -2924,10 +2924,10 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, if( rParam.bLeft ? ((nDist + nWidth / 2 ) <= rParam.nSide && (TBLFIX_CHGABS != rParam.nMode || - n < rBoxes.Count() && + (n < rBoxes.Count() && (nDist + nWidth + rBoxes[ n+1 ]-> GetFrmFmt()->GetFrmSize().GetWidth() / 2) - > rParam.nSide )) + > rParam.nSide) )) : (nDist + nWidth / 2 ) > rParam.nSide ) { @@ -2989,10 +2989,10 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, if( nLowerDiff || (rParam.bLeft ? ((nDist + nWidth / 2 ) <= rParam.nSide && (TBLFIX_CHGABS != rParam.nMode || - n < rBoxes.Count() && + (n < rBoxes.Count() && (nDist + nWidth + rBoxes[ n+1 ]-> GetFrmFmt()->GetFrmSize().GetWidth() / 2) - > rParam.nSide )) + > rParam.nSide) )) : (nDist + nWidth / 2 ) > rParam.nSide )) { if( !nLowerDiff ) diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index fa1c234c0a..82fcb3603a 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -143,8 +143,8 @@ BOOL SwEditShell::IsAnySectionInDoc( BOOL bChkReadOnly, BOOL bChkHidden, BOOL bC const SwSectionFmt* pFmt = rFmts[ n ]; if( pFmt->IsInNodesArr() && (bChkTOX || - (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION - && TOX_HEADER_SECTION != eTmpType )) + ( (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION + && TOX_HEADER_SECTION != eTmpType ) ) ) { const SwSection& rSect = *rFmts[ n ]->GetSection(); if( (!bChkReadOnly && !bChkHidden ) || diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index af73e87a7d..062ffbe450 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -1475,10 +1475,12 @@ const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT /*GOTOOBJ_...*/ eT break; } - if( (bNext? (aPos.Y() < aCurPos.Y()) : // nur unter mir + if( ( + (bNext? (aPos.Y() < aCurPos.Y()) : // nur unter mir (aPos.Y() > aCurPos.Y())) && // " reverse (bNext? (aBestPos.Y() > aCurPos.Y()) : // naeher drunter - (aBestPos.Y() < aCurPos.Y())) || // " reverse + (aBestPos.Y() < aCurPos.Y())) + ) || // " reverse (aBestPos.Y() == aCurPos.Y() && (bNext? (aBestPos.X() > aCurPos.X()) : // weiter links (aBestPos.X() < aCurPos.X())))) // " reverse diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 641d97c929..0d8b77cfbc 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -1747,8 +1747,8 @@ void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, (!pTmp->IsCellFrm() || ( ( ! bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() < nSX && (pTmp->Frm().*fnRect->fnGetRight)()< nSX2 ) || - bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() > nSX && - (pTmp->Frm().*fnRect->fnGetRight)()> nSX2 ) ) ) + ( bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() > nSX && + (pTmp->Frm().*fnRect->fnGetRight)()> nSX2 ) ) ) ) pTmp = pTmp->GetNextLayoutLeaf(); if ( pTmp ) diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 28d3a9b307..b0cc3d3f89 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -1004,8 +1004,8 @@ BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) SwAnchoredObject* pObj = (*GetDrawObjs())[i]; const SwFrmFmt& rFmt = pObj->GetFrmFmt(); const BOOL bFly = pObj->ISA(SwFlyFrm); - if ( bFly && - WEIT_WECH == pObj->GetObjRect().Width()|| + if ( ( bFly && + WEIT_WECH == pObj->GetObjRect().Width() ) || rFmt.GetFrmSize().GetWidthPercent() ) continue; diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index b525043dc3..66cb6ab1b5 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1738,7 +1738,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, // die in den Fussnoten liegen, nicht etwa die (spaltigen) Bereiche, // in denen die Fussnoten(Container) liegen. // #109767# Table frame is in section, insert section in cell frame. - if( pSct && ( pFtnFrm && !pSct->IsInFtn() ) || pUpper->IsCellFrm() ) + if( (pSct && ( pFtnFrm && !pSct->IsInFtn() )) || pUpper->IsCellFrm() ) pSct = NULL; if( pSct ) { // damit der SectionFrm nicht zerstoert wird durch pTmp->MoveFwd() diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 2d1291a7b2..412c72e4dd 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1077,7 +1077,7 @@ static bool lcl_IsInvaLay( const SwFrm *pFrm, long nBottom ) { if ( !pFrm->IsValid() || - (pFrm->IsCompletePaint() && pFrm->Frm().Top() < nBottom) + (pFrm->IsCompletePaint() && ( pFrm->Frm().Top() < nBottom ) ) ) { return true; diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 8ced3ab17a..ceae451242 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -1827,8 +1827,8 @@ void SwRootFrm::ImplCalcBrowseWidth() SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i]; const SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt(); const BOOL bFly = pAnchoredObj->ISA(SwFlyFrm); - if ( bFly && - WEIT_WECH == pAnchoredObj->GetObjRect().Width()|| + if ( ( bFly && + WEIT_WECH == pAnchoredObj->GetObjRect().Width() ) || rFmt.GetFrmSize().GetWidthPercent() ) continue; diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 3c6d08242b..5a61fd1042 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -533,7 +533,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut ) if ( rL2.GetTab() != rL1.GetTab() || rL2.IsPainted() || rL2.IsLocked() || - bVert == rL2.Height() > rL2.Width() ) + (bVert == (rL2.Height() > rL2.Width())) ) continue; long nL2a, nL2b, nL2c, nL2d; @@ -707,7 +707,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects ) if ( rLine.IsLocked () ) continue; - if ( !bVerticalSubs == rLine.Height() > rLine.Width() ) //gleiche Ausrichtung? + if ( (!bVerticalSubs == (rLine.Height() > rLine.Width())) ) //gleiche Ausrichtung? continue; if ( aSubsRect.IsOver( rLine ) ) @@ -912,7 +912,7 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut, SwLineRect &rLk = operator[](k); if ( rLi.SSize() == rLk.SSize() ) { - if ( bVerticalSubs == rLk.Height() > rLk.Width() ) + if ( (bVerticalSubs == (rLk.Height() > rLk.Width())) ) { if ( bVerticalSubs ) { @@ -6263,7 +6263,7 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage, void SwPageFrm::RefreshExtraData( const SwRect &rRect ) const { const SwLineNumberInfo &rInfo = GetFmt()->GetDoc()->GetLineNumberInfo(); - BOOL bLineInFly = rInfo.IsPaintLineNumbers() && rInfo.IsCountInFlys() + BOOL bLineInFly = (rInfo.IsPaintLineNumbers() && rInfo.IsCountInFlys()) || (sal_Int16)SW_MOD()->GetRedlineMarkPos() != text::HoriOrientation::NONE; SwRect aRect( rRect ); diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 380a6bfba2..c76b90163a 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -581,8 +581,8 @@ const SwCntntFrm * MA_FASTCALL lcl_MissProtectedFrames( const SwCntntFrm *pCnt, if ( !pCell || ( ( bInReadOnly || !pCell->GetFmt()->GetProtect().IsCntntProtected() ) && ( !bMissHeadline || !lcl_IsInRepeatedHeadline( pCell ) ) && - ( !bMissFollowFlowLine || !pCell->IsInFollowFlowRow() ) ) && - !pCell->IsCoveredCell() ) + ( !bMissFollowFlowLine || !pCell->IsInFollowFlowRow() ) && + !pCell->IsCoveredCell() ) ) bProtect = FALSE; else pCnt = (*fnNxtPrv)( pCnt ); @@ -701,14 +701,14 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart, const long nPrtLeft = bRTL ? (pTable->*fnRect->fnGetPrtRight)() : (pTable->*fnRect->fnGetPrtLeft)(); - if ( bRTL != nX < nPrtLeft ) + if ( (bRTL != (nX < nPrtLeft)) ) nX = nPrtLeft; else { const long nPrtRight = bRTL ? (pTable->*fnRect->fnGetPrtLeft)() : (pTable->*fnRect->fnGetPrtRight)(); - if ( bRTL != nX > nPrtRight ) + if ( (bRTL != (nX > nPrtRight)) ) nX = nPrtRight; } } @@ -2308,12 +2308,14 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode ) (aTmp.*fnRectX->fnSetTop)( nTmp ); if( (aEndRect.*fnRectX->fnGetTop)() != (pEnd2Pos->aPortion.*fnRectX->fnGetTop)() ) - if( bPorR2L ) - (aTmp.*fnRectX->fnSetLeft)( - (pEnd2Pos->aPortion.*fnRectX->fnGetLeft)() ); - else - (aTmp.*fnRectX->fnSetRight)( - (pEnd2Pos->aPortion.*fnRectX->fnGetRight)() ); + { + if( bPorR2L ) + (aTmp.*fnRectX->fnSetLeft)( + (pEnd2Pos->aPortion.*fnRectX->fnGetLeft)() ); + else + (aTmp.*fnRectX->fnSetRight)( + (pEnd2Pos->aPortion.*fnRectX->fnGetRight)() ); + } aTmp.Intersection( aEndFrm ); Sub( aRegion, aTmp ); } diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index f710de93c9..938753d923 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -3125,7 +3125,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) // Finally adjust the columns if width is set to auto // Possible optimisation: execute this code earlier in this function and // return??? - if ( ( bVert && bHeightChgd || ! bVert && bWidthChgd ) && + if ( ( (bVert && bHeightChgd) || (! bVert && bWidthChgd) ) && Lower()->IsColumnFrm() ) { // get column attribute diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 9144738a68..2ede651d6d 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -2410,7 +2410,7 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) BOOL bNewIsTxtFmt = pNumFmtr->IsTextFormat( nNewFmt ) || NUMBERFORMAT_TEXT == nNewFmt; - if( !bNewIsTxtFmt && nOldFmt != nNewFmt || pNewFml ) + if( (!bNewIsTxtFmt && nOldFmt != nNewFmt) || pNewFml ) { BOOL bChgTxt = TRUE; double fVal = 0; diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index b68fea70a9..bc537daf6c 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1894,8 +1894,8 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, if( pCharStyleNames[i] != SwXNumberingRules::GetInvalidStyle() && ((pCharStyleNames[i].Len() && !pFmt->GetCharFmt()) || - pCharStyleNames[i].Len() && - pFmt->GetCharFmt()->GetName() != pCharStyleNames[i] )) + (pCharStyleNames[i].Len() && + pFmt->GetCharFmt()->GetName() != pCharStyleNames[i]) )) { SwCharFmt* pCharFmt = 0; @@ -1927,8 +1927,8 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, //jetzt nochmal fuer Fonts if(pBulletFontNames[i] != SwXNumberingRules::GetInvalidStyle() && ((pBulletFontNames[i].Len() && !pFmt->GetBulletFont()) || - pBulletFontNames[i].Len() && - pFmt->GetBulletFont()->GetName() != pBulletFontNames[i] )) + (pBulletFontNames[i].Len() && + pFmt->GetBulletFont()->GetName() != pBulletFontNames[i]) )) { const SvxFontListItem* pFontListItem = (const SvxFontListItem* )pDoc->GetDocShell() @@ -3609,8 +3609,8 @@ MakeObject: { const SwPageDesc& rDesc = aBase.GetOldPageDesc(); const SwFrmFmt* pFrmFmt = 0; - sal_Bool bShare = bHeader && rDesc.IsHeaderShared()|| - !bHeader && rDesc.IsFooterShared(); + sal_Bool bShare = (bHeader && rDesc.IsHeaderShared())|| + (!bHeader && rDesc.IsFooterShared()); // TextLeft returns the left content if there is one, // Text and TextRight return the master content. // TextRight does the same as Text and is for diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index a9658fc7bc..beff13cf8a 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -700,7 +700,7 @@ void lcl_SetTblSeparators(const uno::Any& rVal, SwTable* pTable, SwTableBox* pBo { aCols[i] = pArray[i].Position; if(pArray[i].IsVisible == aCols.IsHidden(i) || - !bRow && aCols.IsHidden(i) || + (!bRow && aCols.IsHidden(i)) || long(aCols[i] - long(nLastValue)) < 0 || UNO_TABLE_COLUMN_SUM < aCols[i] ) { @@ -3439,10 +3439,10 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const SwFrmFmt* pBoxFmt = pBox->GetFrmFmt(); const SvxBoxItem& rBox = pBoxFmt->GetBox(); if( - aTableBorderDistances.IsLeftDistanceValid && nLeftDistance != rBox.GetDistance( BOX_LINE_LEFT ) || - aTableBorderDistances.IsRightDistanceValid && nRightDistance != rBox.GetDistance( BOX_LINE_RIGHT ) || - aTableBorderDistances.IsTopDistanceValid && nTopDistance != rBox.GetDistance( BOX_LINE_TOP ) || - aTableBorderDistances.IsBottomDistanceValid && nBottomDistance != rBox.GetDistance( BOX_LINE_BOTTOM )) + (aTableBorderDistances.IsLeftDistanceValid && nLeftDistance != rBox.GetDistance( BOX_LINE_LEFT )) || + (aTableBorderDistances.IsRightDistanceValid && nRightDistance != rBox.GetDistance( BOX_LINE_RIGHT )) || + (aTableBorderDistances.IsTopDistanceValid && nTopDistance != rBox.GetDistance( BOX_LINE_TOP )) || + (aTableBorderDistances.IsBottomDistanceValid && nBottomDistance != rBox.GetDistance( BOX_LINE_BOTTOM ))) { SvxBoxItem aSetBox( rBox ); SwFrmFmt* pSetBoxFmt = pBox->ClaimFrmFmt(); @@ -3755,7 +3755,7 @@ void SwXTextTable::setName(const OUString& rName) throw( uno::RuntimeException ) vos::OGuard aGuard(Application::GetSolarMutex()); SwFrmFmt* pFmt = GetFrmFmt(); String sNewTblName(rName); - if(!pFmt && !bIsDescriptor || + if((!pFmt && !bIsDescriptor) || !sNewTblName.Len() || STRING_NOTFOUND != sNewTblName.Search('.') || STRING_NOTFOUND != sNewTblName.Search(' ') ) diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index 280ecf1166..83eb67440e 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -205,8 +205,8 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode ) } while( nStrPos < nEnde ); if( !bLastNd || - ( !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd ) - && !nStrPos && nEnde == nNodeEnde ) + ( ( !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd ) + && !nStrPos && nEnde == nNodeEnde ) ) rWrt.Strm().WriteUnicodeOrByteText( ((SwASCWriter&)rWrt).GetLineEnd()); return rWrt; diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index d8fd133f43..04e84b7322 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -192,7 +192,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos ) nOldEndCnt = pPam->GetPoint()->nContent.GetIndex(); } - if( RES_PARATR_BEGIN <= nWhich && bMoveBack || + if( (RES_PARATR_BEGIN <= nWhich && bMoveBack) || pAttr->GetSttParaIdx() < pOldEndPara->GetIndex() || (pAttr->GetSttPara() == *pOldEndPara && pAttr->GetSttCnt() != nOldEndCnt) ) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 04341abb38..6828524ef6 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -3575,7 +3575,7 @@ void wwSectionManager::InsertSegments() bool bThisAndNextAreCompatible = (aNext != aEnd) ? ((aIter->GetPageWidth() == aNext->GetPageWidth()) && (aIter->GetPageHeight() == aNext->GetPageHeight()) && (aIter->IsLandScape() == aNext->IsLandScape())) : true; - if ((aNext != aEnd && aNext->IsContinous() && bThisAndNextAreCompatible) || bProtected) + if (((aNext != aEnd && aNext->IsContinous() && bThisAndNextAreCompatible) || bProtected)) { bIgnoreCols = true; if ((aIter->NoCols() > 1) || bProtected) diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 7939957c71..8d371558d4 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -1080,7 +1080,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet) aWidthED .GetValue() == aWidthED .GetMin() && aHeightED.GetValue() == aHeightED.GetMin()); - if ((bNew && !bFormat) || (bValueModified || bCheckChanged) && bLegalValue) + if ((bNew && !bFormat) || ((bValueModified || bCheckChanged) && bLegalValue)) { sal_Int64 nNewWidth = aWidthED.DenormalizePercent(aWidthED.GetRealValue(FUNIT_TWIP)); sal_Int64 nNewHeight = aHeightED.DenormalizePercent(aHeightED.GetRealValue(FUNIT_TWIP)); diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 5d9a390600..5f47169c33 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1826,8 +1826,8 @@ void SwTOXEdit::KeyInput( const KeyEvent& rKEvt ) { const Selection& rSel = GetSelection(); sal_uInt16 nTextLen = GetText().Len(); - if(rSel.A() == rSel.B() && - !rSel.A() || rSel.A() == nTextLen ) + if( (rSel.A() == rSel.B() && + !rSel.A() ) || rSel.A() == nTextLen ) { sal_Bool bCall = sal_False; KeyCode aCode = rKEvt.GetKeyCode(); @@ -3804,8 +3804,8 @@ IMPL_LINK(SwTokenWindow, EditResize, Edit*, pEdit) IMPL_LINK(SwTokenWindow, NextItemHdl, SwTOXEdit*, pEdit) { sal_uInt16 nPos = (sal_uInt16)aControlList.GetPos(pEdit); - if(nPos && !pEdit->IsNextControl() || - nPos < aControlList.Count() - 1 && pEdit->IsNextControl()) + if( (nPos && !pEdit->IsNextControl()) || + (nPos < aControlList.Count() - 1 && pEdit->IsNextControl())) { aControlList.Seek(nPos); Control* pNextPrev = pEdit->IsNextControl() ? aControlList.Next() : aControlList.Prev(); @@ -3840,8 +3840,8 @@ IMPL_LINK(SwTokenWindow, TbxFocusHdl, SwTOXEdit*, pEdit) IMPL_LINK(SwTokenWindow, NextItemBtnHdl, SwTOXButton*, pBtn ) { sal_uInt16 nPos = (sal_uInt16)aControlList.GetPos(pBtn); - if(nPos && !pBtn->IsNextControl() || - nPos < aControlList.Count() - 1 && pBtn->IsNextControl()) + if( (nPos && !pBtn->IsNextControl()) || + (nPos < aControlList.Count() - 1 && pBtn->IsNextControl())) { aControlList.Seek(nPos); sal_Bool bNext = pBtn->IsNextControl(); diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx index 8c13ab80fd..11b50fde12 100644 --- a/sw/source/ui/misc/glosdoc.cxx +++ b/sw/source/ui/misc/glosdoc.cxx @@ -523,7 +523,7 @@ void SwGlossaries::UpdateGlosPath(sal_Bool bFull) aDirArr.DeleteAndDestroy(0, aDirArr.Count()); if(!nTokenCount || - m_sErrPath.Len() && (bPathChanged || m_sOldErrPath != m_sErrPath) ) + (m_sErrPath.Len() && (bPathChanged || m_sOldErrPath != m_sErrPath)) ) { m_sOldErrPath = m_sErrPath; // Falscher Pfad, d.h. AutoText-Verzeichnis existiert nicht diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index d0bc7b5b38..ed3343129b 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -617,8 +617,8 @@ void SwOutlineSettingsTabPage::Update() bSameSuffix &= aNumFmtArr[i]->GetSuffix() == aNumFmtArr[0]->GetSuffix(); bSameComplete &= aNumFmtArr[i]->GetIncludeUpperLevels() == aNumFmtArr[0]->GetIncludeUpperLevels(); const SwCharFmt* pFmt = aNumFmtArr[i]->GetCharFmt(); - bSameCharFmt &= !pFirstFmt && !pFmt - || pFirstFmt && pFmt && pFmt->GetName() == pFirstFmt->GetName(); + bSameCharFmt &= (!pFirstFmt && !pFmt) + || (pFirstFmt && pFmt && pFmt->GetName() == pFirstFmt->GetName()); } } CheckForStartValue_Impl(aNumFmtArr[0]->GetNumberingType()); diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index b2dfee2fa4..8c757273f0 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -711,7 +711,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_HORZ_LEFT: if ( (eFrmType & FRMTYPE_FLY_INCNT) || bProtect || - (nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER)&& bHtmlMode ) + ((nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER)&& bHtmlMode) ) rSet.DisableItem( nWhich ); break; case FN_FRAME_ALIGN_VERT_ROW_TOP: @@ -721,7 +721,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_VERT_CHAR_CENTER: case FN_FRAME_ALIGN_VERT_CHAR_BOTTOM: if ( !(eFrmType & FRMTYPE_FLY_INCNT) || bProtect - || bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich ) + || (bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich) ) rSet.DisableItem( nWhich ); break; @@ -732,7 +732,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_VERT_TOP: case FN_FRAME_ALIGN_VERT_CENTER: case FN_FRAME_ALIGN_VERT_BOTTOM: - if ( bProtect || bHtmlMode && eFrmType & FRMTYPE_FLY_ATCNT) + if ( bProtect || (bHtmlMode && eFrmType & FRMTYPE_FLY_ATCNT) ) rSet.DisableItem( nWhich ); else { diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx index 486737089d..9d4a860e18 100644 --- a/sw/source/ui/shells/tabsh.cxx +++ b/sw/source/ui/shells/tabsh.cxx @@ -220,7 +220,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh ) // Tabellenvariante, wenn mehrere Tabellenzellen selektiert rSh.GetCrsr(); //Damit GetCrsrCnt() auch das Richtige liefert - aBoxInfo.SetTable (rSh.IsTableMode() && rSh.GetCrsrCnt() > 1 || + aBoxInfo.SetTable ((rSh.IsTableMode() && rSh.GetCrsrCnt() > 1) || !bTableSel); // Abstandsfeld immer anzeigen aBoxInfo.SetDist ((BOOL) TRUE); @@ -663,7 +663,7 @@ void SwTableShell::Execute(SfxRequest &rReq) else aCoreSet.InvalidateItem( RES_BACKGROUND ); - if ( !pDlg && rReq.GetArgs() || pDlg->Execute() == RET_OK ) + if ( (!pDlg && rReq.GetArgs()) || pDlg->Execute() == RET_OK ) { const SfxItemSet* pOutSet = pDlg ? pDlg->GetOutputItemSet() : rReq.GetArgs(); if ( pDlg ) @@ -1330,9 +1330,9 @@ void SwTableShell::GetState(SfxItemSet &rSet) case FN_TABLE_VERT_BOTTOM: { USHORT nAlign = rSh.GetBoxAlign(); - BOOL bSet = nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE|| - nSlot == FN_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER || - nSlot == FN_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM; + BOOL bSet = (nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE) || + (nSlot == FN_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER) || + (nSlot == FN_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM); rSet.Put(SfxBoolItem(nSlot, bSet)); } break; @@ -1342,9 +1342,9 @@ void SwTableShell::GetState(SfxItemSet &rSet) case FN_TABLE_MODE_VARIABLE : { TblChgMode nMode = rSh.GetTblChgMode(); - BOOL bSet = nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS || - nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP || - nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS; + BOOL bSet = (nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS) || + (nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP) || + (nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS); rSet.Put(SfxBoolItem(nSlot, bSet)); } break; diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index b84e729bb8..8117200882 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -902,7 +902,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) } break; case FN_INSERT_HRULER : - if(rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel() || bCrsrInHidden ) + if((rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel()) || bCrsrInHidden ) rSet.DisableItem(nWhich); break; case FN_FORMAT_COLUMN : diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 8640319d7f..63d767fe24 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -1743,8 +1743,8 @@ void SwTextShell::ChangeHeaderOrFooter( if( !rStyleName.Len() || rStyleName == sTmp ) { if( bShowWarning && !bOn && GetActiveView() && GetActiveView() == &GetView() && - (bHeader && aDesc.GetMaster().GetHeader().IsActive() || - !bHeader && aDesc.GetMaster().GetFooter().IsActive())) + ((bHeader && aDesc.GetMaster().GetHeader().IsActive()) || + (!bHeader && aDesc.GetMaster().GetFooter().IsActive()))) { bShowWarning = FALSE; //Actions have to be closed while the dialog is showing diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx index 10547000c5..0993657adc 100644 --- a/sw/source/ui/shells/txtattr.cxx +++ b/sw/source/ui/shells/txtattr.cxx @@ -119,8 +119,8 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq) eEscape = nWhich == FN_SET_SUPER_SCRIPT ? SVX_ESCAPEMENT_SUPERSCRIPT: SVX_ESCAPEMENT_SUBSCRIPT; - if( nWhich == FN_SET_SUB_SCRIPT && nTmpEsc < 0 || - nWhich == FN_SET_SUPER_SCRIPT && nTmpEsc > 0 ) + if( (nWhich == FN_SET_SUB_SCRIPT && nTmpEsc < 0) || + (nWhich == FN_SET_SUPER_SCRIPT && nTmpEsc > 0) ) eEscape = SVX_ESCAPEMENT_OFF; SfxBindings& rBind = GetView().GetViewFrame()->GetBindings(); diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 8d750d9234..7d87a182a2 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -1180,8 +1180,8 @@ bool lcl_IsOwnDocument( SwView& rView ) String Created = xDocProps->getAuthor(); String Changed = xDocProps->getModifiedBy(); String FullName = SW_MOD()->GetUserOptions().GetFullName(); - return FullName.Len() && - (Changed.Len() && Changed == FullName ) || + return (FullName.Len() && + (Changed.Len() && Changed == FullName )) || (!Changed.Len() && Created.Len() && Created == FullName ); } diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index d80233ef3e..c7049866d5 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -529,7 +529,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aUL.SetLower( (USHORT)aLongULSpace.GetLower() ); aDesc.GetMaster().SetFmtAttr( aUL ); - if( bHead && pHeaderFmt || !bHead && pFooterFmt ) + if( (bHead && pHeaderFmt) || (!bHead && pFooterFmt) ) { SwFmtFrmSize aSz( bHead ? pHeaderFmt->GetFrmSize() : pFooterFmt->GetFrmSize() ); @@ -694,7 +694,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxColumnItem aColItem((const SvxColumnItem&)rReq. GetArgs()->Get(nSlot)); - if( bSetTabColFromDoc || !bSect && rSh.GetTableFmt() ) + if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) ) { ASSERT(aColItem.Count(), "ColDesc ist leer!!"); @@ -826,7 +826,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxColumnItem aColItem((const SvxColumnItem&)rReq. GetArgs()->Get(nSlot)); - if( bSetTabColFromDoc || !bSect && rSh.GetTableFmt() ) + if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) ) { ASSERT(aColItem.Count(), "ColDesc ist leer!!"); @@ -1078,8 +1078,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) (nSelType & nsSelectionType::SEL_FRM) || (nSelType & nsSelectionType::SEL_OLE) || SFX_ITEM_AVAILABLE > aCoreSet.GetItemState(RES_LR_SPACE)|| - !bVerticalWriting && (SID_ATTR_TABSTOP_VERTICAL == nWhich)|| - bVerticalWriting && (RES_PARATR_TABSTOP == nWhich) + (!bVerticalWriting && (SID_ATTR_TABSTOP_VERTICAL == nWhich))|| + (bVerticalWriting && (RES_PARATR_TABSTOP == nWhich)) ) rSet.DisableItem( nWhich ); else @@ -1106,8 +1106,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) nSelType & nsSelectionType::SEL_FRM || nSelType & nsSelectionType::SEL_OLE || nFrmType == FRMTYPE_DRAWOBJ || - !bVerticalWriting && (SID_ATTR_PARA_LRSPACE_VERTICAL == nWhich)|| - bVerticalWriting && (SID_ATTR_PARA_LRSPACE == nWhich) + (!bVerticalWriting && (SID_ATTR_PARA_LRSPACE_VERTICAL == nWhich))|| + (bVerticalWriting && (SID_ATTR_PARA_LRSPACE == nWhich)) ) { rSet.DisableItem(nWhich); @@ -1282,9 +1282,9 @@ void SwView::StateTabWin(SfxItemSet& rSet) BOOL bTableVertical = bHasTable && rSh.IsTableVertical(); - if((SID_RULER_BORDERS_VERTICAL == nWhich) && + if( ( (SID_RULER_BORDERS_VERTICAL == nWhich) && ((bHasTable && !bTableVertical)|| - (!bVerticalWriting && !bFrmSelection && !bHasTable ) || (bFrmSelection && !bFrameHasVerticalColumns)) || + (!bVerticalWriting && !bFrmSelection && !bHasTable ) || (bFrmSelection && !bFrameHasVerticalColumns)) ) || ((SID_RULER_BORDERS == nWhich) && ((bHasTable && bTableVertical)|| (bVerticalWriting && !bFrmSelection&& !bHasTable) || bFrameHasVerticalColumns))) @@ -1501,8 +1501,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) BOOL bFrameRTL; BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection; - if((SID_RULER_ROWS == nWhich) && - ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) || + if( ( (SID_RULER_ROWS == nWhich) && + ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) ) || ((SID_RULER_ROWS_VERTICAL == nWhich) && ((bVerticalWriting && !bFrmSelection) || bFrameHasVerticalColumns))) rSet.DisableItem(nWhich); diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index 418d9ace33..5ebd38ac74 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -2070,7 +2070,7 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier) SvLBoxEntry* pFirstEntry = FirstSelected(); if (pFirstEntry && lcl_IsContent(pFirstEntry)) { - if(bIsRoot && nRootType == CONTENT_TYPE_OUTLINE || + if((bIsRoot && nRootType == CONTENT_TYPE_OUTLINE) || ((SwContent*)pFirstEntry->GetUserData())->GetParent()->GetType() == CONTENT_TYPE_OUTLINE) { @@ -2088,8 +2088,8 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier) if( nMove ) { short nDir = nCmd == FN_ITEM_UP ? -1 : 1; - if( !bModifier && (nDir == -1 && nActPos > 0 || - nDir == 1 && nActPos < GetEntryCount() - 2 ) ) + if( !bModifier && ((nDir == -1 && nActPos > 0) || + (nDir == 1 && nActPos < GetEntryCount() - 2 )) ) { pShell->MoveOutlinePara( nDir ); //Cursor wieder an die aktuelle Position setzen @@ -2761,8 +2761,8 @@ sal_Bool SwContentTree::Select( SvLBoxEntry* pEntry, sal_Bool bSelect ) sal_Bool bEnable = sal_False; SvLBoxEntry* pParentEntry = GetParent(pEntry); if(!bIsLastReadOnly && (!IsVisible() || - (bIsRoot && nRootType == CONTENT_TYPE_OUTLINE && pParentEntry || - lcl_IsContent(pEntry) && ((SwContentType*)pParentEntry->GetUserData())->GetType() == CONTENT_TYPE_OUTLINE))) + ((bIsRoot && nRootType == CONTENT_TYPE_OUTLINE && pParentEntry) || + (lcl_IsContent(pEntry) && ((SwContentType*)pParentEntry->GetUserData())->GetType() == CONTENT_TYPE_OUTLINE)))) bEnable = sal_True; SwNavigationPI* pNavi = GetParentWindow(); pNavi->aContentToolBox.EnableItem(FN_ITEM_UP , bEnable); -- cgit v1.2.3 From d5c11a30ced5b7abd026f368c8a0588bc6391f97 Mon Sep 17 00:00:00 2001 From: os Date: Thu, 4 Nov 2010 13:28:24 +0100 Subject: #i104053# patch: use of page styles in dialogs fixed --- sw/source/ui/chrdlg/break.cxx | 2 +- sw/source/ui/misc/docfnote.cxx | 2 +- sw/source/ui/table/tabledlg.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index fbc2e0cd8c..ce476cebed 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -200,7 +200,7 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) : } String aFmtName; - for(i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_REGISTER; ++i) + for(i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i) if(LISTBOX_ENTRY_NOTFOUND == aPageCollBox.GetEntryPos( aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ))) ::InsertStringSorted(aFmtName, aPageCollBox, 1 ); diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index b6f075b6b4..9c6b18a831 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -265,7 +265,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) } // Seite - for( i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_LANDSCAPE; ++i ) + for( i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i ) aPageTemplBox.InsertEntry(SwStyleNameMapper::GetUIName( i, aEmptyStr )); USHORT nCount = pSh->GetPageDescCnt(); diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 53eb804c59..8578dc3b99 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1643,7 +1643,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) } String aFmtName; - for(i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_REGISTER; ++i) + for(i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i) if( LISTBOX_ENTRY_NOTFOUND == aPageCollLB.GetEntryPos( aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ) )) aPageCollLB.InsertEntry( aFmtName ); -- cgit v1.2.3 From 056dd16e0c9bad2be989ab6530f0f99a8f1cd04d Mon Sep 17 00:00:00 2001 From: os Date: Thu, 4 Nov 2010 15:45:06 +0100 Subject: #i52088# patch: sorting of index entries with and without primary key --- sw/source/core/doc/doctxm.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 4eda348cd3..7f04c56378 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -2380,8 +2380,7 @@ Range SwTOXBaseSection::GetKeyRange(const String& rStr, const String& rStrReadin if( rIntl.IsEqual( sMyString, sMyStringReading, pBase->GetLocale(), sToCompare, sToCompareReading, rNew.GetLocale() ) && - pBase->GetLevel() == nLevel && - pBase->GetType() == TOX_SORT_CUSTOM ) + pBase->GetLevel() == nLevel ) break; } if(i == nMax) -- cgit v1.2.3 From 42fb610a5aa41403a6b9d138b99a9ab117bd630b Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Thu, 4 Nov 2010 17:56:39 +0100 Subject: pl08: #163778# use EncryptionData from MediaDescriptor --- sw/source/filter/ww8/wrtww8.cxx | 92 +++++++++++++---------- sw/source/filter/ww8/wrtww8.hxx | 7 +- sw/source/filter/ww8/ww8par.cxx | 161 ++++++++++++++++++++++++++++------------ sw/source/ui/app/docsh.cxx | 18 +---- 4 files changed, 176 insertions(+), 102 deletions(-) mode change 100755 => 100644 sw/source/ui/app/docsh.cxx (limited to 'sw/source') diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 2cf3a421e2..5f7959fe06 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -112,6 +112,8 @@ #include "dbgoutsw.hxx" #include +#include +#include #include #include #include @@ -2995,20 +2997,54 @@ void MSWordExportBase::ExportDocument( bool bWriteAll ) pDoc->SetRedlineMode( (RedlineMode_t)(mnRedlineMode) ); } -String SwWW8Writer::GetPassword() +bool SwWW8Writer::InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec ) { - String sUniPassword; + uno::Sequence< beans::NamedValue > aEncryptionData; + if ( mpMedium ) { - SfxItemSet* pSet = mpMedium->GetItemSet(); + SFX_ITEMSET_ARG( mpMedium->GetItemSet(), pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False ); + if ( pEncryptionDataItem && ( pEncryptionDataItem->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) ) + { + OSL_ENSURE( false, "Unexpected EncryptionData!" ); + aEncryptionData.realloc( 0 ); + } + + if ( !aEncryptionData.getLength() ) + { + // try to generate the encryption data based on password + SFX_ITEMSET_ARG( mpMedium->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False ); + if ( pPasswordItem && pPasswordItem->GetValue().Len() && pPasswordItem->GetValue().Len() <= 15 ) + { + // Generate random number with a seed of time as salt. + TimeValue aTime; + osl_getSystemTime( &aTime ); + rtlRandomPool aRandomPool = rtl_random_createPool (); + rtl_random_addBytes ( aRandomPool, &aTime, 8 ); - const SfxPoolItem* pPasswordItem = NULL; - if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_PASSWORD, sal_True, &pPasswordItem ) ) - if( pPasswordItem != NULL ) - sUniPassword = ( (const SfxStringItem*)pPasswordItem )->GetValue(); + sal_uInt8 pDocId[ 16 ]; + rtl_random_getBytes( aRandomPool, pDocId, 16 ); + + rtl_random_destroyPool( aRandomPool ); + + sal_Unicode aPassword[16]; + memset( aPassword, 0, sizeof( aPassword ) ); + for ( xub_StrLen nChar = 0; nChar < pPasswordItem->GetValue().Len(); ++nChar ) + aPassword[nChar] = pPasswordItem->GetValue().GetChar(nChar); + + rCodec.InitKey( aPassword, pDocId ); + aEncryptionData = rCodec.GetEncryptionData(); + + mpMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) ); + } + } + + if ( aEncryptionData.getLength() ) + mpMedium->GetItemSet()->ClearItem( SID_PASSWORD ); } - return sUniPassword; + // nonempty encryption data means hier that the codec was successfuly initialized + return ( aEncryptionData.getLength() != 0 ); } void WW8Export::ExportDocument_Impl() @@ -3042,8 +3078,6 @@ void WW8Export::ExportDocument_Impl() Strm().SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - String sUniPassword( GetWriter().GetPassword() ); - utl::TempFile aTempMain; aTempMain.EnableKillingFile(); utl::TempFile aTempTable; @@ -3051,13 +3085,10 @@ void WW8Export::ExportDocument_Impl() utl::TempFile aTempData; aTempData.EnableKillingFile(); - bool bEncrypt = false; - - xub_StrLen nLen = sUniPassword.Len(); - if ( nLen > 0 && nLen <= 15) // Password has been set + msfilter::MSCodec_Std97 aCtx; + bool bEncrypt = m_pWriter ? m_pWriter->InitStd97CodecUpdateMedium( aCtx ) : false; + if ( bEncrypt ) { - bEncrypt =true; - GetWriter().SetStream( aTempMain.GetStream( STREAM_READWRITE | STREAM_SHARE_DENYWRITE ) ); @@ -3121,24 +3152,6 @@ void WW8Export::ExportDocument_Impl() if ( bEncrypt ) { - // Generate random number with a seed of time as salt. - TimeValue aTime; - osl_getSystemTime( &aTime ); - rtlRandomPool aRandomPool = rtl_random_createPool (); - rtl_random_addBytes ( aRandomPool, &aTime, 8 ); - - sal_uInt8 aDocId[ 16 ] = {0}; - rtl_random_getBytes( aRandomPool, aDocId, 16 ); - - rtl_random_destroyPool( aRandomPool ); - - sal_Unicode aPassword[16] = {0}; - for (xub_StrLen nChar = 0; nChar < nLen; ++nChar ) - aPassword[nChar] = sUniPassword.GetChar(nChar); - - msfilter::MSCodec_Std97 aCtx; - aCtx.InitKey(aPassword, aDocId); - SvStream *pStrmTemp, *pTableStrmTemp, *pDataStrmTemp; pStrmTemp = &xWwStrm; pTableStrmTemp = &xTableStrm; @@ -3155,11 +3168,14 @@ void WW8Export::ExportDocument_Impl() sal_uInt32 nEncType = 0x10001; *pTableStrmTemp << nEncType; - sal_uInt8 pSaltData[16] = {0}; - sal_uInt8 pSaltDigest[16] = {0}; - aCtx.GetEncryptKey( aDocId, pSaltData, pSaltDigest ); + sal_uInt8 pDocId[16]; + aCtx.GetDocId( pDocId ); + + sal_uInt8 pSaltData[16]; + sal_uInt8 pSaltDigest[16]; + aCtx.GetEncryptKey( pDocId, pSaltData, pSaltDigest ); - pTableStrmTemp->Write( aDocId, 16 ); + pTableStrmTemp->Write( pDocId, 16 ); pTableStrmTemp->Write( pSaltData, 16 ); pTableStrmTemp->Write( pSaltDigest, 16 ); diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 43211a962e..2449271db5 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -52,6 +52,11 @@ #include // einige Forward Deklarationen +namespace msfilter +{ + class MSCodec_Std97; +} + class SwAttrIter; class AttributeOutputBase; class DocxAttributeOutput; @@ -855,7 +860,7 @@ public: static void WriteString_xstz(SvStream& rStrm, const String& rStr, bool bAddZero); - String GetPassword(); + bool InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec ); using StgWriter::Write; virtual ULONG Write( SwPaM&, SfxMedium&, const String* = 0 ); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 04341abb38..f6f1855950 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -29,16 +29,20 @@ #include "precompiled_sw.hxx" /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */ -#include #include #include + +#include #include #include #include +#include #include #include #include +#include +#include #include #include #include @@ -107,6 +111,7 @@ #include #include +#include #include #include @@ -4344,6 +4349,90 @@ namespace return aPassw; } + uno::Sequence< beans::NamedValue > InitXorWord95Codec( ::msfilter::MSCodec_XorWord95& rCodec, SfxMedium& rMedium, WW8Fib* pWwFib ) + { + uno::Sequence< beans::NamedValue > aEncryptionData; + SFX_ITEMSET_ARG( rMedium.GetItemSet(), pEncryptionData, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False ); + if ( pEncryptionData && ( pEncryptionData->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) ) + aEncryptionData.realloc( 0 ); + + if ( !aEncryptionData.getLength() ) + { + String sUniPassword = QueryPasswordForMedium( rMedium ); + + ByteString sPassword(sUniPassword, WW8Fib::GetFIBCharset( pWwFib->chseTables ) ); + + xub_StrLen nLen = sPassword.Len(); + if( nLen <= 15 ) + { + sal_uInt8 pPassword[16]; + memset( pPassword, 0, sizeof( pPassword ) ); + + for (xub_StrLen nChar = 0; nChar < sPassword.Len(); ++nChar ) + pPassword[nChar] = sPassword.GetChar(nChar); + + rCodec.InitKey( pPassword ); + aEncryptionData = rCodec.GetEncryptionData(); + + // the export supports RC4 algorithm only, so we have to generate the related EncryptionData as well, + // so that Save can export the document without asking for a password; + // as result there will be EncryptionData for both algorithms in the MediaDescriptor + ::msfilter::MSCodec_Std97 aCodec97; + + // Generate random number with a seed of time as salt. + TimeValue aTime; + osl_getSystemTime( &aTime ); + rtlRandomPool aRandomPool = rtl_random_createPool(); + rtl_random_addBytes ( aRandomPool, &aTime, 8 ); + + sal_uInt8 pDocId[ 16 ]; + rtl_random_getBytes( aRandomPool, pDocId, 16 ); + + rtl_random_destroyPool( aRandomPool ); + + sal_uInt16 pStd97Pass[16]; + memset( pStd97Pass, 0, sizeof( pStd97Pass ) ); + for (xub_StrLen nChar = 0; nChar < nLen; ++nChar ) + pStd97Pass[nChar] = sUniPassword.GetChar(nChar); + + aCodec97.InitKey( pStd97Pass, pDocId ); + + // merge the EncryptionData, there should be no conflicts + ::comphelper::SequenceAsHashMap aEncryptionHash( aEncryptionData ); + aEncryptionHash.update( ::comphelper::SequenceAsHashMap( aCodec97.GetEncryptionData() ) ); + aEncryptionHash >> aEncryptionData; + } + } + + return aEncryptionData; + } + + uno::Sequence< beans::NamedValue > InitStd97Codec( ::msfilter::MSCodec_Std97& rCodec, sal_uInt8 pDocId[16], SfxMedium& rMedium ) + { + uno::Sequence< beans::NamedValue > aEncryptionData; + SFX_ITEMSET_ARG( rMedium.GetItemSet(), pEncryptionData, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False ); + if ( pEncryptionData && ( pEncryptionData->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) ) + aEncryptionData.realloc( 0 ); + + if ( !aEncryptionData.getLength() ) + { + String sUniPassword = QueryPasswordForMedium( rMedium ); + + xub_StrLen nLen = sUniPassword.Len(); + if ( nLen <= 15 ) + { + sal_Unicode pPassword[16]; + memset( pPassword, 0, sizeof( pPassword ) ); + for (xub_StrLen nChar = 0; nChar < nLen; ++nChar ) + pPassword[nChar] = sUniPassword.GetChar(nChar); + + rCodec.InitKey( pPassword, pDocId ); + aEncryptionData = rCodec.GetEncryptionData(); + } + } + + return aEncryptionData; + } } ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss) @@ -4397,31 +4486,22 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss) if (bDecrypt) { nErrRet = ERRCODE_SVX_WRONGPASS; - switch (eAlgo) + SfxMedium* pMedium = mpDocShell->GetMedium(); + + if ( pMedium ) { - default: - nErrRet = ERRCODE_SVX_READ_FILTER_CRYPT; - break; - case XOR: + switch (eAlgo) { - String sUniPassword = - QueryPasswordForMedium(*(mpDocShell->GetMedium())); - - ByteString sPassword(sUniPassword, - WW8Fib::GetFIBCharset(pWwFib->chseTables)); - - xub_StrLen nLen = sPassword.Len(); - // DR: do not cut a wrong (too long) password - if( nLen <= 15 ) + default: + nErrRet = ERRCODE_SVX_READ_FILTER_CRYPT; + break; + case XOR: { - sal_uInt8 aPassword[16] = {0}; - - for (xub_StrLen nChar = 0; nChar < sPassword.Len(); ++nChar ) - aPassword[nChar] = sPassword.GetChar(nChar); - msfilter::MSCodec_XorWord95 aCtx; - aCtx.InitKey(aPassword); - if (aCtx.VerifyKey(pWwFib->nKey, pWwFib->nHash)) + uno::Sequence< beans::NamedValue > aEncryptionData = InitXorWord95Codec( aCtx, *pMedium, pWwFib ); + + // if initialization has failed the EncryptionData should be empty + if ( aEncryptionData.getLength() && aCtx.VerifyKey( pWwFib->nKey, pWwFib->nHash ) ) { nErrRet = 0; pTempMain = MakeTemp(aDecryptMain); @@ -4453,22 +4533,15 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss) DecryptXOR(aCtx, *pDataStream, aDecryptData); pDataStream = &aDecryptData; } + + pMedium->GetItemSet()->ClearItem( SID_PASSWORD ); + pMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) ); } } - } - break; - case RC4: - { - String sUniPassword = - QueryPasswordForMedium(*(mpDocShell->GetMedium())); - - xub_StrLen nLen = sUniPassword.Len(); - // DR: do not cut a wrong (too long) password - if (nLen <= 15) + break; + case RC4: { - sal_Unicode aPassword[16] = {0}; - for (xub_StrLen nChar = 0; nChar < nLen; ++nChar ) - aPassword[nChar] = sUniPassword.GetChar(nChar); + msfilter::MSCodec_Std97 aCtx; sal_uInt8 aDocId[ 16 ]; pTableStream->Read(aDocId, 16); @@ -4477,9 +4550,9 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss) sal_uInt8 aSaltHash[ 16 ]; pTableStream->Read(aSaltHash, 16); - msfilter::MSCodec_Std97 aCtx; - aCtx.InitKey(aPassword, aDocId); - if (aCtx.VerifyKey(aSaltData, aSaltHash)) + // if initialization has failed the EncryptionData should be empty + uno::Sequence< beans::NamedValue > aEncryptionData = InitStd97Codec( aCtx, aDocId, *pMedium ); + if ( aEncryptionData.getLength() && aCtx.VerifyKey( aSaltData, aSaltHash ) ) { nErrRet = 0; @@ -4498,17 +4571,13 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss) DecryptRC4(aCtx, *pDataStream, aDecryptData); pDataStream = &aDecryptData; } - SfxMedium* pMedium = mpDocShell->GetMedium(); - if ( pMedium ) - { - SfxItemSet* pSet = pMedium->GetItemSet(); - if ( pSet ) - pSet->Put( SfxStringItem(SID_PASSWORD, sUniPassword) ); - } + + pMedium->GetItemSet()->ClearItem( SID_PASSWORD ); + pMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) ); } } + break; } - break; } if (nErrRet == 0) diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx old mode 100755 new mode 100644 index a5a8bad22c..43618b55d8 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -209,23 +209,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, return 0; } } - if(rMedium.IsStorage()) - { - //SvStorageRef aStor( rMedium.GetStorage() ); - const SfxItemSet* pSet = rMedium.GetItemSet(); - const SfxPoolItem *pItem; - if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pItem)) - { - DBG_ASSERT(pItem->IsA( TYPE(SfxStringItem) ), "Fehler Parametertype"); - comphelper::OStorageHelper::SetCommonStoragePassword( rMedium.GetStorage(), ((const SfxStringItem *)pItem)->GetValue() ); - } - // Fuer's Dokument-Einfuegen noch die FF-Version, wenn's der - // eigene Filter ist. - ASSERT( /*pRead != ReadSw3 || */pRead != ReadXML || pFlt->GetVersion(), - "Am Filter ist keine FF-Version gesetzt" ); - //if( (pRead == ReadSw3 || pRead == ReadXML) && pFlt->GetVersion() ) - // aStor->SetVersion( (long)pFlt->GetVersion() ); - } + // #i30171# set the UpdateDocMode at the SwDocShell SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False); nUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE; -- cgit v1.2.3 From 43918d69d49b4b1f034c533fc1e8c607d1ff5d77 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 4 Nov 2010 18:49:17 +0100 Subject: vcl117: #i115056# remove now unused svtools PrintDialog --- starmath/inc/view.hxx | 2 +- starmath/source/view.cxx | 2 +- sw/source/ui/inc/pview.hxx | 1 - sw/source/ui/inc/view.hxx | 2 -- sw/source/ui/uiview/pview.cxx | 13 ------------- sw/source/ui/uiview/view.cxx | 1 - sw/source/ui/uiview/viewfunc.hxx | 2 -- sw/source/ui/uiview/viewprt.cxx | 37 ------------------------------------- 8 files changed, 2 insertions(+), 58 deletions(-) mode change 100755 => 100644 sw/source/ui/uiview/pview.cxx (limited to 'sw/source') diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx index 76f64c60c8..5303cb034d 100644 --- a/starmath/inc/view.hxx +++ b/starmath/inc/view.hxx @@ -244,7 +244,7 @@ protected: const String& rText, USHORT MaxWidth); - virtual USHORT Print(SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog = 0); + virtual USHORT Print(SfxProgress &rProgress, BOOL bIsAPI); virtual SfxPrinter *GetPrinter(BOOL bCreate = FALSE); virtual USHORT SetPrinter(SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false); diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index f0286bd161..32044dc8eb 100755 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1160,7 +1160,7 @@ void SmViewShell::Impl_Print( rOutDev.Pop(); } -USHORT SmViewShell::Print(SfxProgress & /*rProgress*/, BOOL /*bIsAPI*/, PrintDialog * /*pPrintDialog*/) +USHORT SmViewShell::Print(SfxProgress & /*rProgress*/, BOOL /*bIsAPI*/) { RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Print" ); DBG_ASSERT( 0, "SmViewShell::Print: no longer used with new UI print dialog. Should be removed!!" ); diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx index b2a72cca4f..5da44cc7e4 100644 --- a/sw/source/ui/inc/pview.hxx +++ b/sw/source/ui/inc/pview.hxx @@ -223,7 +223,6 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell SW_DLLPRIVATE virtual USHORT SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ); SW_DLLPRIVATE virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions ); - SW_DLLPRIVATE virtual PrintDialog* CreatePrintDialog( Window *pParent ); SW_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, BOOL bInner ); diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 85b33fda78..11f66f1746 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -57,7 +57,6 @@ class SvxRuler; class SvxLRSpaceItem; class SwDocShell; class SwScrollbar; -class PrintDialog; class SvxVCBrowser; class SvBorder; class Ruler; @@ -356,7 +355,6 @@ class SW_DLLPUBLIC SwView: public SfxViewShell // Methoden fuers Printing SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE ); - SW_DLLPRIVATE virtual PrintDialog* CreatePrintDialog( Window* pParent ); SfxTabPage* CreatePrintOptionsPage( Window* pParent, const SfxItemSet& rSet); // fuer Readonly-Umschaltung diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx old mode 100755 new mode 100644 index 11c62d4d69..bd171adedb --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -2002,18 +2001,6 @@ SfxTabPage* SwPagePreView::CreatePrintOptionsPage( Window *pParent, --------------------------------------------------------------------*/ -PrintDialog* SwPagePreView::CreatePrintDialog( Window *pParent ) -{ - PrintDialog *pDlg = ::CreatePrintDialog( pParent, 1, 0 ); - pDlg->DisableRange( PRINTDIALOG_SELECTION ); - return pDlg; -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - - // OD 18.12.2002 #103492# - no longer needed ?? Size SwPagePreView::GetOptimalSizePixel() const { diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 8d750d9234..d0ad9047b5 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/ui/uiview/viewfunc.hxx b/sw/source/ui/uiview/viewfunc.hxx index 09502fa6dd..95ef9a124d 100644 --- a/sw/source/ui/uiview/viewfunc.hxx +++ b/sw/source/ui/uiview/viewfunc.hxx @@ -30,7 +30,6 @@ class ImageButton; class Point; -class PrintDialog; class SfxItemSet; class SfxPrinter; class SfxTabPage; @@ -42,7 +41,6 @@ class Window; class SwWrtShell; // folgende Funktionen stehen im viewprt.cxx -PrintDialog* CreatePrintDialog( Window* , USHORT, SwWrtShell* ); void SetPrinter( IDocumentDeviceAccess*, SfxPrinter*, BOOL bWeb ); SfxTabPage* CreatePrintOptionsPage( Window*, const SfxItemSet& ); void SetAppPrintOptions( ViewShell* pSh, BOOL bWeb ); diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx index 88ad18947b..aa5addd145 100644 --- a/sw/source/ui/uiview/viewprt.cxx +++ b/sw/source/ui/uiview/viewprt.cxx @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include @@ -183,42 +182,6 @@ SfxTabPage* __EXPORT SwView::CreatePrintOptionsPage(Window* pParent, return ::CreatePrintOptionsPage( pParent, rSet, FALSE ); } -/*-------------------------------------------------------------------- - Beschreibung: Druckerdialog - --------------------------------------------------------------------*/ - -PrintDialog* CreatePrintDialog( Window* pParent, USHORT nPg, SwWrtShell* pSh ) -{ - PrintDialog *pDlg = new PrintDialog( pParent, false ); -// pDlg->ChangeFirstPage( 1 ); - - if ( !nPg ) - nPg = 1; -// pDlg->ChangeLastPage( nPg ); -// pDlg->ChangeMaxPage( 9999 ); - pDlg->EnableRange( PRINTDIALOG_FROMTO ); - - if (pSh && (pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected())) - pDlg->EnableRange( PRINTDIALOG_SELECTION ); - - pDlg->SetRangeText( String::CreateFromInt32(nPg) ); - pDlg->EnableRange( PRINTDIALOG_RANGE ); - pDlg->EnableCollate(); - return pDlg; -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -PrintDialog* __EXPORT SwView::CreatePrintDialog( Window* pParent ) -{ - // AMA: Hier sollte vielleicht die virtuelle Seitennummer angezeigt werden, - // aber nur, wenn das Drucken virtuelle Seitennummern und nicht wie - // bisher (auch beim SWG 2.0) physikalische beachtet werden. - return ::CreatePrintDialog( pParent, GetWrtShell().GetPhyPageNum(), &GetWrtShell() ); -} - /*-------------------------------------------------------------------- Beschreibung: Print-Dispatcher --------------------------------------------------------------------*/ -- cgit v1.2.3 From 0ad3e6c4292643318f8a899bddfdf624a395b267 Mon Sep 17 00:00:00 2001 From: os Date: Fri, 5 Nov 2010 08:55:21 +0100 Subject: #i97951# type change USHORT->sal_uInt32 to prevent overflow in column width calculation --- sw/source/filter/html/htmltabw.cxx | 12 ++++++----- sw/source/filter/inc/wrtswtbl.hxx | 36 ++++++++++++++++---------------- sw/source/filter/writer/wrtswtbl.cxx | 40 ++++++++++++++++++------------------ sw/source/filter/xml/xmltble.cxx | 34 +++++++++++++++--------------- 4 files changed, 62 insertions(+), 60 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index f7b577ca7d..0853b69b1d 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -98,7 +98,7 @@ class SwHTMLWrtTable : public SwWriteTable sal_Bool bTop, sal_Bool bBottom, sal_Bool bLeft, sal_Bool bRight ); public: - SwHTMLWrtTable( const SwTableLines& rLines, long nWidth, sal_uInt16 nBWidth, + SwHTMLWrtTable( const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth, sal_Bool bRel, USHORT nNumOfRowsToRepeat, sal_uInt16 nLeftSub=0, sal_uInt16 nRightSub=0 ); SwHTMLWrtTable( const SwHTMLTableLayout *pLayoutInfo ); @@ -111,7 +111,7 @@ public: SwHTMLWrtTable::SwHTMLWrtTable( const SwTableLines& rLines, long nWidth, - sal_uInt16 nBWidth, sal_Bool bRel, USHORT nNumOfRowsToRepeat, + sal_uInt32 nBWidth, sal_Bool bRel, USHORT nNumOfRowsToRepeat, sal_uInt16 nLSub, sal_uInt16 nRSub ) : SwWriteTable( rLines, nWidth, nBWidth, bRel, MAX_DEPTH, nLSub, nRSub, nNumOfRowsToRepeat ) { @@ -337,7 +337,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, #ifndef PURE_HTML long nWidth = 0; - sal_uInt16 nPrcWidth = USHRT_MAX; + sal_uInt32 nPrcWidth = ULONG_MAX; if( bOutWidth ) { if( bLayoutExport ) @@ -471,7 +471,9 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, } else { - sal_uInt16 nTWidth, nBWidth, nLSub, nRSub; + sal_uInt16 nTWidth; + sal_uInt32 nBWidth; + sal_uInt16 nLSub, nRSub; if( HasRelWidths() ) { nTWidth = 100; @@ -845,7 +847,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign, ByteString sOutStr( '<' ); sOutStr += OOO_STRING_SVTOOLS_HTML_col; - sal_uInt16 nWidth; + sal_uInt32 nWidth; sal_Bool bRel; if( bLayoutExport ) { diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx index f97a68c840..03e7f13231 100644 --- a/sw/source/filter/inc/wrtswtbl.hxx +++ b/sw/source/filter/inc/wrtswtbl.hxx @@ -61,7 +61,7 @@ class SwWriteTableCell long nHeight; // fixe/Mindest-Hoehe der Zeile - USHORT nWidthOpt; // Breite aus Option; + sal_uInt32 nWidthOpt; // Breite aus Option; USHORT nRow; // Start-Zeile USHORT nCol; // Start-Spalte @@ -99,7 +99,7 @@ public: nWidthOpt = nWidth; bPrcWidthOpt = bPrc; } - USHORT GetWidthOpt() const { return nWidthOpt; } + sal_uInt32 GetWidthOpt() const { return nWidthOpt; } BOOL HasPrcWidthOpt() const { return bPrcWidthOpt; } }; @@ -180,9 +180,9 @@ SV_DECL_PTRARR_SORT_DEL( SwWriteTableRows, SwWriteTableRowPtr, 5, 5 ) class SwWriteTableCol { - USHORT nPos; // End Position der Spalte + sal_uInt32 nPos; // End Position der Spalte - USHORT nWidthOpt; + sal_uInt32 nWidthOpt; BOOL bRelWidthOpt : 1; BOOL bOutWidth : 1; // Spaltenbreite ausgeben? @@ -191,9 +191,9 @@ public: BOOL bLeftBorder : 1; // Welche Umrandungen sind da? BOOL bRightBorder : 1; - SwWriteTableCol( USHORT nPosition ); + SwWriteTableCol( sal_uInt32 nPosition ); - USHORT GetPos() const { return nPos; } + sal_uInt32 GetPos() const { return nPos; } void SetLeftBorder( BOOL bBorder ) { bLeftBorder = bBorder; } BOOL HasLeftBorder() const { return bLeftBorder; } @@ -207,11 +207,11 @@ public: inline int operator==( const SwWriteTableCol& rCol ) const; inline int operator<( const SwWriteTableCol& rCol ) const; - void SetWidthOpt( USHORT nWidth, BOOL bRel ) + void SetWidthOpt( sal_uInt32 nWidth, BOOL bRel ) { nWidthOpt = nWidth; bRelWidthOpt = bRel; } - USHORT GetWidthOpt() const { return nWidthOpt; } + sal_uInt32 GetWidthOpt() const { return nWidthOpt; } BOOL HasRelWidthOpt() const { return bRelWidthOpt; } }; @@ -248,14 +248,14 @@ protected: USHORT nBorder; // Dicke der ausseren Umrandung USHORT nInnerBorder; // Dicke der inneren Umrandung - USHORT nBaseWidth; // Bezugsgroesse fur Breiten SwFmtFrmSize + sal_uInt32 nBaseWidth; // Bezugsgroesse fur Breiten SwFmtFrmSize USHORT nHeadEndRow; // letzte Zeile des Tabellen-Kopfes USHORT nLeftSub; USHORT nRightSub; - long nTabWidth; // Absolute/Relative Breite der Tabelle + sal_uInt32 nTabWidth; // Absolute/Relative Breite der Tabelle BOOL bRelWidths : 1; // Breiten relativ ausgeben? BOOL bUseLayoutHeights : 1; // Layout zur Hoehenbestimmung nehmen? @@ -271,16 +271,16 @@ protected: virtual BOOL ShouldExpandSub( const SwTableBox *pBox, BOOL bExpandedBefore, USHORT nDepth ) const; - void CollectTableRowsCols( long nStartRPos, USHORT nStartCPos, + void CollectTableRowsCols( long nStartRPos, sal_uInt32 nStartCPos, long nParentLineHeight, - USHORT nParentLineWidth, + sal_uInt32 nParentLineWidth, const SwTableLines& rLines, USHORT nDepth ); void FillTableRowsCols( long nStartRPos, USHORT nStartRow, - USHORT nStartCPos, USHORT nStartCol, + sal_uInt32 nStartCPos, USHORT nStartCol, long nParentLineHeight, - USHORT nParentLineWidth, + sal_uInt32 nParentLineWidth, const SwTableLines& rLines, const SvxBrushItem* pLineBrush, USHORT nDepth, @@ -292,14 +292,14 @@ protected: USHORT nRowSpan, USHORT nColSpan, USHORT &rTopBorder, USHORT &rBottomBorder ); - USHORT GetBaseWidth() const { return nBaseWidth; } + sal_uInt32 GetBaseWidth() const { return nBaseWidth; } BOOL HasRelWidths() const { return bRelWidths; } public: - static long GetBoxWidth( const SwTableBox *pBox ); + static sal_uInt32 GetBoxWidth( const SwTableBox *pBox ); - USHORT GetRawWidth( USHORT nCol, USHORT nColSpan ) const; + sal_uInt32 GetRawWidth( USHORT nCol, USHORT nColSpan ) const; USHORT GetAbsWidth( USHORT nCol, USHORT nColSpan ) const; USHORT GetRelWidth( USHORT nCol, USHORT nColSpan ) const; USHORT GetPrcWidth( USHORT nCol, USHORT nColSpan ) const; @@ -317,7 +317,7 @@ protected: public: - SwWriteTable( const SwTableLines& rLines, long nWidth, USHORT nBWidth, + SwWriteTable( const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth, BOOL bRel, USHORT nMaxDepth = USHRT_MAX, USHORT nLeftSub=0, USHORT nRightSub=0, sal_uInt32 nNumOfRowsToRepeat=0 ); SwWriteTable( const SwHTMLTableLayout *pLayoutInfo ); diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx index a2eb11638d..ef33d356e6 100644 --- a/sw/source/filter/writer/wrtswtbl.cxx +++ b/sw/source/filter/writer/wrtswtbl.cxx @@ -92,7 +92,7 @@ SwWriteTableCell *SwWriteTableRow::AddCell( const SwTableBox *pBox, //----------------------------------------------------------------------- -SwWriteTableCol::SwWriteTableCol(USHORT nPosition) +SwWriteTableCol::SwWriteTableCol(sal_uInt32 nPosition) : nPos(nPosition), nWidthOpt(0), bRelWidthOpt(false), bOutWidth(true), bLeftBorder(true), bRightBorder(true) { @@ -100,13 +100,13 @@ SwWriteTableCol::SwWriteTableCol(USHORT nPosition) //----------------------------------------------------------------------- -long SwWriteTable::GetBoxWidth( const SwTableBox *pBox ) +sal_uInt32 SwWriteTable::GetBoxWidth( const SwTableBox *pBox ) { const SwFrmFmt *pFmt = pBox->GetFrmFmt(); const SwFmtFrmSize& aFrmSize= (const SwFmtFrmSize&)pFmt->GetFmtAttr( RES_FRM_SIZE ); - return aFrmSize.GetSize().Width(); + return sal::static_int_cast(aFrmSize.GetSize().Width()); } long SwWriteTable::GetLineHeight( const SwTableLine *pLine ) @@ -306,9 +306,9 @@ USHORT SwWriteTable::MergeBoxBorders( const SwTableBox *pBox, } -USHORT SwWriteTable::GetRawWidth( USHORT nCol, USHORT nColSpan ) const +sal_uInt32 SwWriteTable::GetRawWidth( USHORT nCol, USHORT nColSpan ) const { - USHORT nWidth = aCols[nCol+nColSpan-1]->GetPos(); + sal_uInt32 nWidth = aCols[nCol+nColSpan-1]->GetPos(); if( nCol > 0 ) nWidth = nWidth - aCols[nCol-1]->GetPos(); @@ -352,7 +352,7 @@ USHORT SwWriteTable::GetRightSpace( USHORT nCol, USHORT nColSpan ) const USHORT SwWriteTable::GetAbsWidth( USHORT nCol, USHORT nColSpan ) const { - long nWidth = GetRawWidth( nCol, nColSpan ); + sal_uInt32 nWidth = GetRawWidth( nCol, nColSpan ); if( nBaseWidth != nTabWidth ) { nWidth *= nTabWidth; @@ -419,9 +419,9 @@ BOOL SwWriteTable::ShouldExpandSub(const SwTableBox *pBox, BOOL /*bExpandedBefor } void SwWriteTable::CollectTableRowsCols( long nStartRPos, - USHORT nStartCPos, + sal_uInt32 nStartCPos, long nParentLineHeight, - USHORT nParentLineWidth, + sal_uInt32 nParentLineWidth, const SwTableLines& rLines, USHORT nDepth ) { @@ -429,7 +429,7 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos, USHORT nLines = rLines.Count(); #ifdef DBG_UTIL - USHORT nEndCPos = 0; + sal_uInt32 nEndCPos = 0; #endif long nRPos = nStartRPos; @@ -484,16 +484,16 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos, const SwTableBoxes& rBoxes = pLine->GetTabBoxes(); USHORT nBoxes = rBoxes.Count(); - USHORT nCPos = nStartCPos; + sal_uInt32 nCPos = nStartCPos; for( USHORT nBox=0; nBoxGetTabBoxes(); sal_uInt16 nBoxes = rBoxes.Count(); - sal_uInt16 nCPos = 0U; + sal_uInt32 nCPos = 0U; for( sal_uInt16 nBox=0U; nBoxGetColumns(); - sal_uInt16 nCPos = 0U; + sal_uInt32 nCPos = 0U; sal_uInt16 nColumns = rCols.Count(); for( sal_uInt16 nColumn=0U; nColumnGetPos(); sal_uInt32 nWidth = nCPos - nOldCPos; @@ -634,7 +634,7 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines, nColAbsWidth += (nBaseWidth/2UL); nColAbsWidth /= nBaseWidth; } - pColumn->SetWidthOpt( (sal_uInt16)nColAbsWidth, sal_False ); + pColumn->SetWidthOpt( nColAbsWidth, sal_False ); } ULONG nExpPos = 0; @@ -678,16 +678,16 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines, const SwTableBoxes& rBoxes = pLine->GetTabBoxes(); sal_uInt16 nBoxes = rBoxes.Count(); - sal_uInt16 nCPos = 0U; + sal_uInt32 nCPos = 0U; sal_uInt16 nCol = 0U; for( sal_uInt16 nBox=0U; nBoxGetWidth(); + nCPos = pLines->GetWidth(); // Und ihren Index @@ -959,7 +959,7 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine, const SwTableBoxes& rBoxes = rLine.GetTabBoxes(); sal_uInt16 nBoxes = rBoxes.Count(); - sal_uInt16 nCPos = 0U; + sal_uInt32 nCPos = 0U; sal_uInt16 nCol = 0U; for( sal_uInt16 nBox=0U; nBox Date: Fri, 5 Nov 2010 09:14:59 +0100 Subject: cws tlmath01: #i972# Math baseline alignment --- sw/source/ui/shells/basesh.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sw/source') diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 025403cc08..69c9675669 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -1080,6 +1080,14 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSh.SetFlyFrmAttr(aSet); } + // if new anchor is 'as char' and it is a Math object and the usual + // pre-conditionsd are met then align the formula to the baseline of the text + const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() ); + const bool bDoMathBaselineAlignment = xObj.is() && SotExchange::IsMath( xObj->getClassID() ) + && FLY_AS_CHAR == eSet && rSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + if (bDoMathBaselineAlignment) + rSh.AlignFormulaToBaseline( xObj ); + USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); if( nHtmlMode ) { -- cgit v1.2.3 From 73a3cf5dd779f4e4dad2bb767bcc4ebd82df8932 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 5 Nov 2010 09:15:46 +0100 Subject: cws tlmath01: #i972# Math baseline alignment --- sw/source/ui/shells/basesh.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 69c9675669..ee845c932b 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -1081,7 +1081,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) } // if new anchor is 'as char' and it is a Math object and the usual - // pre-conditionsd are met then align the formula to the baseline of the text + // pre-conditions are met then align the formula to the baseline of the text const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() ); const bool bDoMathBaselineAlignment = xObj.is() && SotExchange::IsMath( xObj->getClassID() ) && FLY_AS_CHAR == eSet && rSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); -- cgit v1.2.3 From aa552beb9a39f79beb56c41f0c4ee12597a98b3e Mon Sep 17 00:00:00 2001 From: os Date: Fri, 5 Nov 2010 11:26:52 +0100 Subject: #i112413# for statement fixed --- sw/source/ui/envelp/mailmrge.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index a80438afe8..76595d5543 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -779,7 +779,7 @@ bool SwMailMergeDlg::ExecQryShell() m_aSelection.realloc(nEnd - nStart + 1); Any* pSelection = m_aSelection.getArray(); - for (sal_Int32 i = nStart; i != nEnd; ++i, ++pSelection) + for (sal_Int32 i = nStart; i <= nEnd; ++i, ++pSelection) *pSelection <<= i; } else if (aAllRB.IsChecked() ) -- cgit v1.2.3 From 121066e8f6199bd8c35165abe1d74895397cbfb5 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 5 Nov 2010 15:22:13 +0100 Subject: cws tlmath01: outdated include removed --- sw/source/ui/config/optpage.cxx | 1 - 1 file changed, 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 7cea0fe2cc..126cc68852 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -54,7 +54,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3 From 762440bbd5cd71c5ddfcb045f86479addec2826b Mon Sep 17 00:00:00 2001 From: os Date: Mon, 8 Nov 2010 13:07:04 +0100 Subject: #i112630# detect pdf filter by mimetype instead of calling GetFiltet4Extension() --- sw/source/ui/dbui/mmoutputpage.cxx | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 9ede2af8a0..a8beecdc98 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -1106,8 +1106,6 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) if(nRet != RET_OK && nRet != RET_YES) return 0; } - //create the send dialog - SwSendMailDialog* pDlg = new SwSendMailDialog( pButton, rConfigItem ); //add the documents sal_uInt32 nBegin = 0; sal_uInt32 nEnd = 0; @@ -1133,7 +1131,26 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) switch( nDocType ) { case MM_DOCTYPE_OOO : break; - case MM_DOCTYPE_PDF : bIsPDF = true; break; + case MM_DOCTYPE_PDF : bIsPDF = true; + { + //the method SwIOSystemGetFilterOfFormat( ) returns the template filter + //because it uses the same user data :-( + SfxFilterMatcher aMatcher( pFilterContainer->GetName() ); + SfxFilterMatcherIter aIter( &aMatcher ); + const SfxFilter* pFilter = aIter.First(); + String sFilterMime( String::CreateFromAscii( "application/pdf" )); + while ( pFilter ) + { + if( pFilter->GetMimeType() == sFilterMime && pFilter->CanExport() ) + { + pSfxFlt = pFilter; + break; + } + pFilter = aIter.Next(); + } + + } + break; case MM_DOCTYPE_WORD: { //the method SwIOSystemGetFilterOfFormat( ) returns the template filter @@ -1239,6 +1256,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) uno::Reference< frame::XStorable > xStore( pTargetView->GetDocShell()->GetModel(), uno::UNO_QUERY); xStore->storeToURL( sTargetTempURL, aValues ); + //create the send dialog + SwSendMailDialog* pDlg = new SwSendMailDialog( pButton, rConfigItem ); pDlg->SetDocumentCount( nEnd ); pDlg->ShowDialog(); //help to force painting the dialog -- cgit v1.2.3 From fd5999e86a9623bf9496abda944976932e889caf Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Mon, 8 Nov 2010 13:47:01 +0100 Subject: dr77: optimizations in generation of XML tokens, XML namespaces, property names; code cleanup --- sw/source/filter/ww8/docxattributeoutput.cxx | 3 ++- sw/source/filter/ww8/docxexport.cxx | 3 ++- sw/source/filter/ww8/docxfootnotes.hxx | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 291a6a7e3f..96b329d14a 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -32,7 +32,7 @@ #include "wrtww8.hxx" #include "ww8par.hxx" -#include +#include #include #include #include @@ -128,6 +128,7 @@ using rtl::OUString; using rtl::OUStringBuffer; using rtl::OUStringToOString; +using namespace oox; using namespace docx; using namespace sax_fastparser; using namespace nsSwDocInfoSubType; diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 8752ff2f3c..7f1f4ba1ff 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include @@ -62,6 +62,7 @@ using namespace ::comphelper; using namespace ::com::sun::star; +using namespace ::oox; using oox::vml::VMLExport; diff --git a/sw/source/filter/ww8/docxfootnotes.hxx b/sw/source/filter/ww8/docxfootnotes.hxx index e31b3ce65b..fb18168b3a 100644 --- a/sw/source/filter/ww8/docxfootnotes.hxx +++ b/sw/source/filter/ww8/docxfootnotes.hxx @@ -30,7 +30,6 @@ #include -#include #include #include #include -- cgit v1.2.3 From 747364d91cc39f906970e49d99970ffcf774404e Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 9 Nov 2010 15:20:35 +0100 Subject: vcl117: #i115477# clean up unused methods --- sw/source/filter/ascii/parasc.cxx | 20 ++++--------- sw/source/ui/app/docshini.cxx | 41 +++++++++----------------- sw/source/ui/config/optpage.cxx | 62 +++++++++++++++++---------------------- sw/source/ui/dialog/ascfldlg.cxx | 22 ++++++++++---- 4 files changed, 64 insertions(+), 81 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 7e7e224fc5..278df2bc68 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -54,6 +54,8 @@ #include // ...Percent() #include +#include "vcl/metric.hxx" + #define ASC_BUFFLEN 4096 class SwASCIIParser @@ -129,24 +131,14 @@ SwASCIIParser::SwASCIIParser(SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn, } if( rOpt.GetFontName().Len() ) { - bool bDelete = false; - const SfxFont* pFnt = 0; + Font aTextFont( rOpt.GetFontName(), Size( 0, 10 ) ); if( pDoc->getPrinter( false ) ) - pFnt = pDoc->getPrinter( false )->GetFontByName( rOpt.GetFontName() ); - - if( !pFnt ) - { - pFnt = new SfxFont( FAMILY_DONTKNOW, rOpt.GetFontName() ); - bDelete = true; - } - SvxFontItem aFont( pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), RES_CHRATR_FONT ); + aTextFont = pDoc->getPrinter( false )->GetFontMetric( aTextFont ); + SvxFontItem aFont( aTextFont.GetFamily(), aTextFont.GetName(), + aEmptyStr, aTextFont.GetPitch(), aTextFont.GetCharSet(), RES_CHRATR_FONT ); pItemSet->Put( aFont ); pItemSet->Put( aFont, RES_CHRATR_CJK_FONT ); pItemSet->Put( aFont, RES_CHRATR_CTL_FONT ); - - if( bDelete ) - delete (SfxFont*)pFnt; } } diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx index 4b0e3575a6..b82dd8ccd2 100644 --- a/sw/source/ui/app/docshini.cxx +++ b/sw/source/ui/app/docshini.cxx @@ -210,21 +210,15 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) if(!pStdFont->IsFontDefault(nFontId)) { sEntry = pStdFont->GetFontFor(nFontId); - sal_Bool bDelete = sal_False; - const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(sEntry): 0; - if(!pFnt) + + Font aFont( sEntry, Size( 0, 10 ) ); + if( pPrt ) { - pFnt = new SfxFont( FAMILY_DONTKNOW, sEntry, PITCH_DONTKNOW, - ::gsl_getSystemTextEncoding() ); - bDelete = sal_True; - } - pFontItem = new SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich); - if(bDelete) - { - delete (SfxFont*) pFnt; - bDelete = sal_False; + aFont = pPrt->GetFontMetric( aFont ); } + + pFontItem = new SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich); } else { @@ -303,25 +297,18 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) if(!pStdFont->IsFontDefault(aFontIdPoolId[nIdx])) { sEntry = pStdFont->GetFontFor(aFontIdPoolId[nIdx]); - sal_Bool bDelete = sal_False; - const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(sEntry): 0; - if(!pFnt) - { - pFnt = new SfxFont( FAMILY_DONTKNOW, sEntry, PITCH_DONTKNOW, - ::gsl_getSystemTextEncoding() ); - bDelete = sal_True; - } + + Font aFont( sEntry, Size( 0, 10 ) ); + if( pPrt ) + aFont = pPrt->GetFontMetric( aFont ); + pColl = pDoc->GetTxtCollFromPool(aFontIdPoolId[nIdx + 1]); if( !bHTMLTemplSet || SFX_ITEM_SET != pColl->GetAttrSet().GetItemState( nFontWhich, sal_False ) ) { - pColl->SetFmtAttr(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich)); - } - if(bDelete) - { - delete (SfxFont*) pFnt; + pColl->SetFmtAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); } } sal_Int32 nFontHeight = pStdFont->GetFontHeight( static_cast< sal_Int8 >(aFontIdPoolId[nIdx]), 0, eLanguage ); diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 9907d16191..eceb7b1b1f 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -721,20 +721,12 @@ void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType, SfxPrinter* pPrt, const String& rStyle, USHORT nFontWhich) { - BOOL bDelete = FALSE; - const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(rStyle): 0; - if(!pFnt) - { - pFnt = new SfxFont(FAMILY_DONTKNOW, rStyle); - bDelete = TRUE; - } + Font aFont( rStyle, Size( 0, 10 ) ); + if( pPrt ) + aFont = pPrt->GetFontMetric( aFont ); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(nType); - pColl->SetFmtAttr(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich)); - if(bDelete) - { - delete (SfxFont*) pFnt; - } + pColl->SetFmtAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); } /*-- 11.10.2005 15:47:52--------------------------------------------------- @@ -817,22 +809,13 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& ) FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONTSIZE : RES_CHRATR_CTL_FONTSIZE); if(sStandard != sShellStd) { - BOOL bDelete = FALSE; - const SfxFont* pFnt = pPrinter ? pPrinter->GetFontByName(sStandard): 0; - if(!pFnt) - { - pFnt = new SfxFont(FAMILY_DONTKNOW, sStandard); - bDelete = TRUE; - } - pWrtShell->SetDefault(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich)); + Font aFont( sStandard, Size( 0, 10 ) ); + if( pPrinter ) + aFont = pPrinter->GetFontMetric( aFont ); + pWrtShell->SetDefault(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD); pColl->ResetFmtAttr(nFontWhich); - if(bDelete) - { - delete (SfxFont*) pFnt; - bDelete = FALSE; - } // lcl_SetColl(pWrtShell, RES_POOLCOLL_STANDARD, pPrinter, sStandard); bMod = TRUE; } @@ -938,15 +921,24 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) // #i94536# prevent duplication of font entries when 'reset' button is pressed if( !aStandardBox.GetEntryCount() ) { - const USHORT nCount = pPrt->GetFontCount(); - for (USHORT i = 0; i < nCount; ++i) + // get the set of disctinct available family names + std::set< String > aFontNames; + int nFontNames = pPrt->GetDevFontCount(); + for( int i = 0; i < nFontNames; i++ ) + { + FontInfo aInf( pPrt->GetDevFont( i ) ); + aFontNames.insert( aInf.GetName() ); + } + + // insert to listboxes + for( std::set< String >::const_iterator it = aFontNames.begin(); + it != aFontNames.end(); ++it ) { - const String &rString = pPrt->GetFont(i)->GetName(); - aStandardBox.InsertEntry( rString ); - aTitleBox .InsertEntry( rString ); - aListBox .InsertEntry( rString ); - aLabelBox .InsertEntry( rString ); - aIdxBox .InsertEntry( rString ); + aStandardBox.InsertEntry( *it ); + aTitleBox .InsertEntry( *it ); + aListBox .InsertEntry( *it ); + aLabelBox .InsertEntry( *it ); + aIdxBox .InsertEntry( *it ); } } if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_STDFONTS, FALSE, &pItem)) diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index 60b930162d..f8333902be 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -58,6 +58,8 @@ #include #endif +#include "vcl/metric.hxx" + using namespace ::com::sun::star; @@ -179,12 +181,22 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh, pPrt = new SfxPrinter( pSet ); bDelPrinter = TRUE; } - - const USHORT nCount = pPrt->GetFontCount(); - for (USHORT i = 0; i < nCount; ++i) + + + // get the set of disctinct available family names + std::set< String > aFontNames; + int nFontNames = pPrt->GetDevFontCount(); + for( int i = 0; i < nFontNames; i++ ) + { + FontInfo aInf( pPrt->GetDevFont( i ) ); + aFontNames.insert( aInf.GetName() ); + } + + // insert to listbox + for( std::set< String >::const_iterator it = aFontNames.begin(); + it != aFontNames.end(); ++it ) { - const String &rStr = pPrt->GetFont(i)->GetName(); - aFontLB.InsertEntry( rStr ); + aFontLB.InsertEntry( *it ); } if( !aOpt.GetFontName().Len() ) -- cgit v1.2.3 From 3c3d2003336b6b2655473fcd7a998b8ee9742b09 Mon Sep 17 00:00:00 2001 From: Thomas Benisch Date: Tue, 9 Nov 2010 17:27:08 +0100 Subject: chartextensibility: #i113619# Pasting a chart into a spreadsheet is not notified --- sw/source/ui/wrtsh/wrtsh1.cxx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'sw/source') diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index b3087f78fb..4388b45353 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #if STLPORT_VERSION>=321 #include // prevent conflict between exception and std::exception @@ -617,6 +618,31 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm if (pFlyFrmFmt) *pFlyFrmFmt = pFmt; + if ( SotExchange::IsChart( aCLSID ) ) + { + uno::Reference< embed::XEmbeddedObject > xEmbeddedObj( xRef.GetObject(), uno::UNO_QUERY ); + if ( xEmbeddedObj.is() ) + { + bool bDisableDataTableDialog = false; + svt::EmbeddedObjectRef::TryRunningState( xEmbeddedObj ); + uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY ); + if ( xProps.is() && + ( xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ) ) >>= bDisableDataTableDialog ) && + bDisableDataTableDialog ) + { + xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ), + uno::makeAny( sal_False ) ); + xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableComplexChartTypes" ) ), + uno::makeAny( sal_False ) ); + uno::Reference< util::XModifiable > xModifiable( xProps, uno::UNO_QUERY ); + if ( xModifiable.is() ) + { + xModifiable->setModified( sal_True ); + } + } + } + } + EndAllAction(); GetView().AutoCaption(OLE_CAP, &aCLSID); -- cgit v1.2.3 From 486e151d3c5f7d55dd46700ab109e486b310c261 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 10 Nov 2010 10:49:59 +0100 Subject: vcl117: add exceptions to ascfldlg.cxx --- sw/source/ui/dialog/makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/dialog/makefile.mk b/sw/source/ui/dialog/makefile.mk index 758ea00fcb..5d4685ffb9 100644 --- a/sw/source/ui/dialog/makefile.mk +++ b/sw/source/ui/dialog/makefile.mk @@ -50,12 +50,12 @@ SRC1FILES = \ wordcountdialog.src EXCEPTIONSFILES = \ + $(SLO)$/ascfldlg.obj \ $(SLO)$/SwSpellDialogChildWindow.obj SLOFILES = \ $(SLO)$/abstract.obj \ $(SLO)$/addrdlg.obj \ - $(SLO)$/ascfldlg.obj \ $(SLO)$/docstdlg.obj \ $(SLO)$/macassgn.obj \ $(SLO)$/SwSpellDialogChildWindow.obj \ -- cgit v1.2.3 From 7a05585b58cbca7cf0499017c9e735c89bfea972 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 10 Nov 2010 11:25:27 +0100 Subject: vcl117: add exceptions to optpage.cxx --- sw/source/ui/config/makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/config/makefile.mk b/sw/source/ui/config/makefile.mk index 4b8ed01ca9..af5f8a5bc1 100644 --- a/sw/source/ui/config/makefile.mk +++ b/sw/source/ui/config/makefile.mk @@ -51,6 +51,7 @@ SRC1FILES = \ EXCEPTIONSFILES = \ $(SLO)$/mailconfigpage.obj \ $(SLO)$/optcomp.obj \ + $(SLO)$/optpage.obj \ $(SLO)$/optload.obj SLOFILES = \ @@ -61,7 +62,6 @@ SLOFILES = \ $(SLO)$/dbconfig.obj \ $(SLO)$/fontcfg.obj \ $(SLO)$/modcfg.obj \ - $(SLO)$/optpage.obj \ $(SLO)$/prtopt.obj \ $(SLO)$/uinums.obj \ $(SLO)$/usrpref.obj \ -- cgit v1.2.3 From f3b40acc79ef058e215356aa88590c0ec0b08327 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 12 Nov 2010 10:24:26 +0100 Subject: cws tlmath01: #i972# fixed crash with WriterWeb 'Formatting Aids' tab page --- sw/source/ui/app/appopt.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx index 087dc0a07c..ae6e4720b2 100644 --- a/sw/source/ui/app/appopt.cxx +++ b/sw/source/ui/app/appopt.cxx @@ -591,7 +591,7 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS if ( fnCreatePage ) pRet = (*fnCreatePage)( pParent, rSet ); } - if (pRet && nId == RID_SW_TP_OPTSHDWCRSR) + if (pRet && (nId == RID_SW_TP_OPTSHDWCRSR || nId == RID_SW_TP_HTML_OPTSHDWCRSR)) { SwView* pCurrView = GetView(); if(pCurrView) -- cgit v1.2.3 From 22090dae4497c4f3632b09c952a3fa3a2092842f Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 12 Nov 2010 10:40:17 +0100 Subject: cws tlmath01: #i972# insert frame crash fixed --- sw/source/ui/frmdlg/frmpage.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 384d3af40f..50e9754450 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -680,7 +680,7 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : pHMap( 0 ), m_bAllowVertPositioning( true ), m_bIsMathOLE( false ), - m_bIsMathBaselineAlignment( false ) + m_bIsMathBaselineAlignment( true ) { FreeResource(); SetExchangeSupport(); @@ -785,11 +785,14 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) SetMetric( aAtHorzPosED, aMetric ); SetMetric( aAtVertPosED, aMetric ); + const SfxPoolItem* pItem = NULL; const SwFmtAnchor& rAnchor = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR); - m_bIsMathOLE = ((const SfxBoolItem&)rSet.Get( FN_OLE_IS_MATH )).GetValue(); - m_bIsMathBaselineAlignment = ((const SfxBoolItem&)rSet.Get( FN_MATH_BASELINE_ALIGNMENT )).GetValue(); + if (SFX_ITEM_SET == rSet.GetItemState(FN_OLE_IS_MATH, FALSE, &pItem)) + m_bIsMathOLE = ((const SfxBoolItem*)pItem)->GetValue(); + if (SFX_ITEM_SET == rSet.GetItemState(FN_MATH_BASELINE_ALIGNMENT, FALSE, &pItem)) + m_bIsMathBaselineAlignment = ((const SfxBoolItem*)pItem)->GetValue(); EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment && FLY_AS_CHAR == rAnchor.GetAnchorId()) ); @@ -820,7 +823,6 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) if ( nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE ) { ASSERT(pSh , "shell not found"); - const SfxPoolItem* pItem; //OS: nur fuer die Variante Einfuegen/Grafik/Eigenschaften if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_GRF_REALSIZE, FALSE, &pItem)) aGrfSize = ((const SvxSizeItem*)pItem)->GetSize(); -- cgit v1.2.3 From df4c3c290e4b48de3139d7a0be9b3d684efd1c90 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Fri, 12 Nov 2010 10:40:36 +0100 Subject: #i10000# some additional fixes for CWS vmiklos01 --- sw/source/filter/ww8/rtfattributeoutput.cxx | 2 +- sw/source/filter/ww8/rtfexport.cxx | 28 ++++++++++++++-------------- sw/source/filter/ww8/wrtw8sty.cxx | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index e46083b4b6..09b2bbabcd 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -1388,7 +1388,7 @@ void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eTyp m_aRunText.append(m_rExport.OutString(rFldCmd, m_rExport.eCurrentEncoding)); m_aRunText.append("}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " "); if (pFld) - m_aRunText.append(m_rExport.OutString(pFld->GetCntnt(), m_rExport.eDefaultEncoding)); + m_aRunText.append(m_rExport.OutString(pFld->ExpandField(true), m_rExport.eDefaultEncoding)); m_aRunText.append("}}"); } diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index f4196f98ee..b6192e1027 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -525,10 +525,10 @@ void RtfExport::ExportDocument_Impl() // protected section in the document. { const SfxItemPool& rPool = pDoc->GetAttrPool(); - USHORT nMaxItem = rPool.GetItemCount(RES_PROTECT); + USHORT nMaxItem = rPool.GetItemCount2(RES_PROTECT); for( USHORT n = 0; n < nMaxItem; ++n ) { - const SvxProtectItem* pProtect = (const SvxProtectItem*)rPool.GetItem(RES_PROTECT, n); + const SvxProtectItem* pProtect = (const SvxProtectItem*)rPool.GetItem2(RES_PROTECT, n); if (pProtect && pProtect->IsCntntProtected()) { Strm() << OOO_STRING_SVTOOLS_RTF_FORMPROT; @@ -1008,30 +1008,30 @@ void RtfExport::OutColorTable() if( 0 != ( pCol = (const SvxColorItem*)rPool.GetPoolDefaultItem( RES_CHRATR_COLOR ) )) InsColor( pCol->GetValue() ); - nMaxItem = rPool.GetItemCount(RES_CHRATR_COLOR); + nMaxItem = rPool.GetItemCount2(RES_CHRATR_COLOR); for( n = 0; n < nMaxItem; ++n ) { - if( 0 != (pCol = (const SvxColorItem*)rPool.GetItem( + if( 0 != (pCol = (const SvxColorItem*)rPool.GetItem2( RES_CHRATR_COLOR, n ) ) ) InsColor( pCol->GetValue() ); } const SvxUnderlineItem* pUnder = (const SvxUnderlineItem*)GetDfltAttr( RES_CHRATR_UNDERLINE ); InsColor( pUnder->GetColor() ); - nMaxItem = rPool.GetItemCount(RES_CHRATR_UNDERLINE); + nMaxItem = rPool.GetItemCount2(RES_CHRATR_UNDERLINE); for( n = 0; n < nMaxItem;n++) { - if( 0 != (pUnder = (const SvxUnderlineItem*)rPool.GetItem( RES_CHRATR_UNDERLINE, n ) ) ) + if( 0 != (pUnder = (const SvxUnderlineItem*)rPool.GetItem2( RES_CHRATR_UNDERLINE, n ) ) ) InsColor( pUnder->GetColor() ); } const SvxOverlineItem* pOver = (const SvxOverlineItem*)GetDfltAttr( RES_CHRATR_OVERLINE ); InsColor( pOver->GetColor() ); - nMaxItem = rPool.GetItemCount(RES_CHRATR_OVERLINE); + nMaxItem = rPool.GetItemCount2(RES_CHRATR_OVERLINE); for( n = 0; n < nMaxItem;n++) { - if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem( RES_CHRATR_OVERLINE, n ) ) ) + if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem2( RES_CHRATR_OVERLINE, n ) ) ) InsColor( pOver->GetColor() ); } @@ -1051,9 +1051,9 @@ void RtfExport::OutColorTable() { InsColor( pBkgrd->GetColor() ); } - nMaxItem = rPool.GetItemCount( *pIds ); + nMaxItem = rPool.GetItemCount2( *pIds ); for( n = 0; n < nMaxItem; ++n ) - if( 0 != (pBkgrd = (const SvxBrushItem*)rPool.GetItem( + if( 0 != (pBkgrd = (const SvxBrushItem*)rPool.GetItem2( *pIds , n ) )) { InsColor( pBkgrd->GetColor() ); @@ -1070,9 +1070,9 @@ void RtfExport::OutColorTable() { InsColor( pShadow->GetColor() ); } - nMaxItem = rPool.GetItemCount(RES_SHADOW); + nMaxItem = rPool.GetItemCount2(RES_SHADOW); for( n = 0; n < nMaxItem; ++n ) - if( 0 != (pShadow = (const SvxShadowItem*)rPool.GetItem( + if( 0 != (pShadow = (const SvxShadowItem*)rPool.GetItem2( RES_SHADOW, n ) ) ) { InsColor( pShadow->GetColor() ); @@ -1085,9 +1085,9 @@ void RtfExport::OutColorTable() if( 0 != ( pBox = (const SvxBoxItem*)rPool.GetPoolDefaultItem( RES_BOX ) )) InsColorLine( *pBox ); - nMaxItem = rPool.GetItemCount(RES_BOX); + nMaxItem = rPool.GetItemCount2(RES_BOX); for( n = 0; n < nMaxItem; ++n ) - if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem( RES_BOX, n ) )) + if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem2( RES_BOX, n ) )) InsColorLine( *pBox ); } diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 5d0cc8db0a..8a8b12ceb6 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -784,9 +784,9 @@ void wwFontHelper::InitFontTable(bool bWrtWW8,const SwDoc& rDoc) const USHORT aTypes[] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT, 0 }; for (const USHORT* pId = aTypes; *pId; ++pId) { - USHORT nMaxItem = rPool.GetItemCount( *pId ); + USHORT nMaxItem = rPool.GetItemCount2( *pId ); for( USHORT nGet = 0; nGet < nMaxItem; ++nGet ) - if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem( + if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem2( *pId, nGet )) ) { GetId(wwFont(pFont->GetFamilyName(), pFont->GetPitch(), -- cgit v1.2.3 From a95378f24a77a87243d78dac0cc63079c6e01da4 Mon Sep 17 00:00:00 2001 From: os Date: Wed, 17 Nov 2010 07:36:16 +0100 Subject: #i115608# #i115583# msword library component registration added --- sw/prj/d.lst | 1 + sw/source/filter/ww8/rtfexportfilter.cxx | 39 -------------------------------- sw/util/msword.component | 37 ++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 39 deletions(-) create mode 100644 sw/util/msword.component (limited to 'sw/source') diff --git a/sw/prj/d.lst b/sw/prj/d.lst index 0cb261c5f0..38c4f5046f 100644 --- a/sw/prj/d.lst +++ b/sw/prj/d.lst @@ -37,6 +37,7 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\statusbar ..\%__SRC%\bin\sw*.res %_DEST%\bin%_EXT%\sw*.res ..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.* ..\%__SRC%\misc\swd.component %_DEST%\xml%_EXT%\swd.component +..\%__SRC%\misc\msword.component %_DEST%\xml%_EXT%\msword.component ..\uiconfig\swriter\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\menubar\*.xml ..\uiconfig\swxform\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\menubar\*.xml diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx index 7bfac5c49b..2a4fb03522 100644 --- a/sw/source/filter/ww8/rtfexportfilter.cxx +++ b/sw/source/filter/ww8/rtfexportfilter.cxx @@ -143,45 +143,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, void* pRegistryKey ) -{ - sal_Bool bRet = sal_False; - - if( pRegistryKey ) - { - try - { - uno::Reference< registry::XRegistryKey > xNewKey1( - static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( - OUString::createFromAscii( IMPL_NAME_RTFEXPORT "/UNO/SERVICES/" ) ) ); - xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] ); - - bRet = sal_True; - } - catch( registry::InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfexport)!" ); - } - - try - { - uno::Reference< registry::XRegistryKey > xNewKey1( - static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( - OUString::createFromAscii( IMPL_NAME_RTFIMPORT "/UNO/SERVICES/" ) ) ); - xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] ); - - bRet = sal_True; - } - catch( registry::InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfimport)!" ); - } - } - - return bRet; -} - - // ------------------------ // - component_getFactory - // ------------------------ diff --git a/sw/util/msword.component b/sw/util/msword.component new file mode 100644 index 0000000000..84ae7aaf96 --- /dev/null +++ b/sw/util/msword.component @@ -0,0 +1,37 @@ + + + + + + + + + + + -- cgit v1.2.3 From dbafc85ab0c9a83b427360dceed312c1578744c3 Mon Sep 17 00:00:00 2001 From: os Date: Fri, 19 Nov 2010 08:02:17 +0100 Subject: SfxItemPool access --- sw/source/filter/ww8/rtfexport.cxx | 26 ++++++++++++++++---------- sw/source/filter/ww8/wrtw8sty.cxx | 10 ++++++---- 2 files changed, 22 insertions(+), 14 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index b6192e1027..8f70fcf7bf 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -525,8 +525,8 @@ void RtfExport::ExportDocument_Impl() // protected section in the document. { const SfxItemPool& rPool = pDoc->GetAttrPool(); - USHORT nMaxItem = rPool.GetItemCount2(RES_PROTECT); - for( USHORT n = 0; n < nMaxItem; ++n ) + sal_uInt32 const nMaxItem = rPool.GetItemCount2(RES_PROTECT); + for (sal_uInt32 n = 0; n < nMaxItem; ++n) { const SvxProtectItem* pProtect = (const SvxProtectItem*)rPool.GetItem2(RES_PROTECT, n); if (pProtect && pProtect->IsCntntProtected()) @@ -997,7 +997,7 @@ void RtfExport::OutColorTable() { // Build the table from rPool since the colors provided to // RtfAttributeOutput callbacks are too late. - USHORT n, nMaxItem; + sal_uInt32 nMaxItem; const SfxItemPool& rPool = pDoc->GetAttrPool(); // char color @@ -1009,7 +1009,7 @@ void RtfExport::OutColorTable() RES_CHRATR_COLOR ) )) InsColor( pCol->GetValue() ); nMaxItem = rPool.GetItemCount2(RES_CHRATR_COLOR); - for( n = 0; n < nMaxItem; ++n ) + for (sal_uInt32 n = 0; n < nMaxItem; ++n) { if( 0 != (pCol = (const SvxColorItem*)rPool.GetItem2( RES_CHRATR_COLOR, n ) ) ) @@ -1019,7 +1019,7 @@ void RtfExport::OutColorTable() const SvxUnderlineItem* pUnder = (const SvxUnderlineItem*)GetDfltAttr( RES_CHRATR_UNDERLINE ); InsColor( pUnder->GetColor() ); nMaxItem = rPool.GetItemCount2(RES_CHRATR_UNDERLINE); - for( n = 0; n < nMaxItem;n++) + for (sal_uInt32 n = 0; n < nMaxItem; ++n) { if( 0 != (pUnder = (const SvxUnderlineItem*)rPool.GetItem2( RES_CHRATR_UNDERLINE, n ) ) ) InsColor( pUnder->GetColor() ); @@ -1029,7 +1029,7 @@ void RtfExport::OutColorTable() const SvxOverlineItem* pOver = (const SvxOverlineItem*)GetDfltAttr( RES_CHRATR_OVERLINE ); InsColor( pOver->GetColor() ); nMaxItem = rPool.GetItemCount2(RES_CHRATR_OVERLINE); - for( n = 0; n < nMaxItem;n++) + for (sal_uInt32 n = 0; n < nMaxItem; ++n) { if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem2( RES_CHRATR_OVERLINE, n ) ) ) InsColor( pOver->GetColor() ); @@ -1052,12 +1052,14 @@ void RtfExport::OutColorTable() InsColor( pBkgrd->GetColor() ); } nMaxItem = rPool.GetItemCount2( *pIds ); - for( n = 0; n < nMaxItem; ++n ) + for (sal_uInt32 n = 0; n < nMaxItem; ++n) + { if( 0 != (pBkgrd = (const SvxBrushItem*)rPool.GetItem2( *pIds , n ) )) { InsColor( pBkgrd->GetColor() ); } + } } // shadow color @@ -1071,12 +1073,14 @@ void RtfExport::OutColorTable() InsColor( pShadow->GetColor() ); } nMaxItem = rPool.GetItemCount2(RES_SHADOW); - for( n = 0; n < nMaxItem; ++n ) + for (sal_uInt32 n = 0; n < nMaxItem; ++n) + { if( 0 != (pShadow = (const SvxShadowItem*)rPool.GetItem2( RES_SHADOW, n ) ) ) { InsColor( pShadow->GetColor() ); } + } } // frame border color @@ -1086,12 +1090,14 @@ void RtfExport::OutColorTable() RES_BOX ) )) InsColorLine( *pBox ); nMaxItem = rPool.GetItemCount2(RES_BOX); - for( n = 0; n < nMaxItem; ++n ) + for (sal_uInt32 n = 0; n < nMaxItem; ++n) + { if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem2( RES_BOX, n ) )) InsColorLine( *pBox ); + } } - for( n = 0; n < m_aColTbl.size(); n++ ) + for (size_t n = 0; n < m_aColTbl.size(); ++n) { const Color& rCol = m_aColTbl[ n ]; if( n || COL_AUTO != rCol.GetColor() ) diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 8a8b12ceb6..0d995f7266 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -784,14 +784,16 @@ void wwFontHelper::InitFontTable(bool bWrtWW8,const SwDoc& rDoc) const USHORT aTypes[] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT, 0 }; for (const USHORT* pId = aTypes; *pId; ++pId) { - USHORT nMaxItem = rPool.GetItemCount2( *pId ); - for( USHORT nGet = 0; nGet < nMaxItem; ++nGet ) - if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem2( - *pId, nGet )) ) + sal_uInt32 const nMaxItem = rPool.GetItemCount2( *pId ); + for (sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet) + { + pFont = (const SvxFontItem*)rPool.GetItem2( *pId, nGet ); + if (0 != pFont) { GetId(wwFont(pFont->GetFamilyName(), pFont->GetPitch(), pFont->GetFamily(), pFont->GetCharSet(),bWrtWW8)); } + } } } -- cgit v1.2.3 From fdc44aa3461261b8d59ead29fc44c79708e40568 Mon Sep 17 00:00:00 2001 From: os Date: Fri, 19 Nov 2010 14:24:51 +0100 Subject: #i112395# rtf import fixed --- sw/source/filter/rtf/swparrtf.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index e1958adcd1..4f9b38f93c 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -3641,7 +3641,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc ) // wurde an der Position ein Escapement aufgespannt, so entferne // das jetzt. Fussnoten sind bei uns immer hochgestellt. - SvxRTFItemStackTypePtr pTmp = aSaveStack.back(); + SvxRTFItemStackTypePtr pTmp = aSaveStack.empty() ? 0 : aSaveStack.back(); if( pTmp && pTmp->GetSttNodeIdx() == pPam->GetPoint()->nNode.GetIndex() && pTmp->GetSttCnt() == nPos ) -- cgit v1.2.3 From a29a28d62190e5a76cd858f8d63d23e875b1dd0e Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 19 Nov 2010 21:45:41 +0100 Subject: gnumake2: removing old dmake file in migrated modules --- sw/inc/makefile.mk | 49 ---- sw/qa/complex/accessibility/makefile.mk | 50 ---- sw/qa/complex/checkColor/makefile.mk | 50 ---- sw/qa/complex/indeterminateState/makefile.mk | 50 ---- sw/qa/complex/writer/makefile.mk | 56 ---- sw/qa/core/makefile.mk | 69 ----- sw/qa/unoapi/makefile.mk | 48 ---- sw/sdi/makefile.mk | 106 ------- sw/source/core/SwNumberTree/makefile.mk | 50 ---- sw/source/core/access/makefile.mk | 100 ------- sw/source/core/attr/makefile.mk | 55 ---- sw/source/core/bastyp/makefile.mk | 79 ------ sw/source/core/crsr/makefile.mk | 83 ------ sw/source/core/doc/makefile.mk | 92 ------- sw/source/core/docnode/makefile.mk | 82 ------ sw/source/core/draw/makefile.mk | 60 ---- sw/source/core/edit/makefile.mk | 71 ----- sw/source/core/except/makefile.mk | 60 ---- sw/source/core/fields/makefile.mk | 94 ------- sw/source/core/frmedt/makefile.mk | 76 ------ sw/source/core/graphic/makefile.mk | 53 ---- sw/source/core/inc/makefile.mk | 26 -- sw/source/core/layout/makefile.mk | 113 -------- sw/source/core/makefile.mk | 110 -------- sw/source/core/objectpositioning/makefile.mk | 59 ---- sw/source/core/ole/makefile.mk | 55 ---- sw/source/core/para/makefile.mk | 54 ---- sw/source/core/sw3io/makefile.mk | 49 ---- sw/source/core/swg/makefile.mk | 62 ----- sw/source/core/table/makefile.mk | 48 ---- sw/source/core/text/makefile.mk | 119 -------- sw/source/core/tox/makefile.mk | 57 ---- sw/source/core/txtnode/makefile.mk | 86 ------ sw/source/core/undo/makefile.mk | 86 ------ sw/source/core/unocore/makefile.mk | 124 --------- sw/source/core/view/makefile.mk | 61 ----- sw/source/filter/ascii/makefile.mk | 56 ---- sw/source/filter/basflt/makefile.mk | 58 ---- sw/source/filter/html/makefile.mk | 83 ------ sw/source/filter/inc/makefile.mk | 26 -- sw/source/filter/makefile.mk | 67 ----- sw/source/filter/rtf/makefile.mk | 65 ----- sw/source/filter/writer/makefile.mk | 54 ---- sw/source/filter/ww1/makefile.mk | 94 ------- sw/source/filter/ww8/dump/makefile.mk | 122 --------- sw/source/filter/ww8/makefile.mk | 105 ------- sw/source/filter/xml/makefile.mk | 94 ------- sw/source/ui/app/makefile.mk | 101 ------- sw/source/ui/cctrl/makefile.mk | 59 ---- sw/source/ui/chrdlg/makefile.mk | 69 ----- sw/source/ui/config/makefile.mk | 87 ------ sw/source/ui/dbui/makefile.mk | 122 --------- sw/source/ui/dialog/makefile.mk | 85 ------ sw/source/ui/dochdl/makefile.mk | 65 ----- sw/source/ui/docvw/makefile.mk | 69 ----- sw/source/ui/envelp/makefile.mk | 80 ------ sw/source/ui/fldui/makefile.mk | 94 ------- sw/source/ui/fmtui/makefile.mk | 51 ---- sw/source/ui/frmdlg/makefile.mk | 79 ------ sw/source/ui/globdoc/makefile.mk | 51 ---- sw/source/ui/inc/makefile.mk | 42 --- sw/source/ui/index/makefile.mk | 68 ----- sw/source/ui/lingu/makefile.mk | 56 ---- sw/source/ui/makefile.mk | 101 ------- sw/source/ui/misc/makefile.mk | 96 ------- sw/source/ui/ribbar/makefile.mk | 70 ----- sw/source/ui/shells/makefile.mk | 94 ------- sw/source/ui/smartmenu/makefile.mk | 53 ---- sw/source/ui/table/makefile.mk | 81 ------ sw/source/ui/uiview/makefile.mk | 90 ------ sw/source/ui/uno/makefile.mk | 81 ------ sw/source/ui/utlui/makefile.mk | 79 ------ sw/source/ui/vba/makefile.mk | 99 ------- sw/source/ui/web/makefile.mk | 59 ---- sw/source/ui/wrtsh/makefile.mk | 62 ----- sw/uiconfig/layout/makefile.mk | 46 ---- sw/util/makefile.mk | 394 --------------------------- 77 files changed, 5949 deletions(-) delete mode 100644 sw/inc/makefile.mk delete mode 100644 sw/qa/complex/accessibility/makefile.mk delete mode 100755 sw/qa/complex/checkColor/makefile.mk delete mode 100755 sw/qa/complex/indeterminateState/makefile.mk delete mode 100755 sw/qa/complex/writer/makefile.mk delete mode 100644 sw/qa/core/makefile.mk delete mode 100644 sw/qa/unoapi/makefile.mk delete mode 100644 sw/sdi/makefile.mk delete mode 100644 sw/source/core/SwNumberTree/makefile.mk delete mode 100644 sw/source/core/access/makefile.mk delete mode 100644 sw/source/core/attr/makefile.mk delete mode 100644 sw/source/core/bastyp/makefile.mk delete mode 100644 sw/source/core/crsr/makefile.mk delete mode 100644 sw/source/core/doc/makefile.mk delete mode 100644 sw/source/core/docnode/makefile.mk delete mode 100644 sw/source/core/draw/makefile.mk delete mode 100644 sw/source/core/edit/makefile.mk delete mode 100644 sw/source/core/except/makefile.mk delete mode 100644 sw/source/core/fields/makefile.mk delete mode 100644 sw/source/core/frmedt/makefile.mk delete mode 100644 sw/source/core/graphic/makefile.mk delete mode 100644 sw/source/core/inc/makefile.mk delete mode 100644 sw/source/core/layout/makefile.mk delete mode 100644 sw/source/core/makefile.mk delete mode 100644 sw/source/core/objectpositioning/makefile.mk delete mode 100644 sw/source/core/ole/makefile.mk delete mode 100644 sw/source/core/para/makefile.mk delete mode 100644 sw/source/core/sw3io/makefile.mk delete mode 100644 sw/source/core/swg/makefile.mk delete mode 100644 sw/source/core/table/makefile.mk delete mode 100644 sw/source/core/text/makefile.mk delete mode 100644 sw/source/core/tox/makefile.mk delete mode 100644 sw/source/core/txtnode/makefile.mk delete mode 100644 sw/source/core/undo/makefile.mk delete mode 100644 sw/source/core/unocore/makefile.mk delete mode 100755 sw/source/core/view/makefile.mk delete mode 100644 sw/source/filter/ascii/makefile.mk delete mode 100644 sw/source/filter/basflt/makefile.mk delete mode 100644 sw/source/filter/html/makefile.mk delete mode 100644 sw/source/filter/inc/makefile.mk delete mode 100644 sw/source/filter/makefile.mk delete mode 100644 sw/source/filter/rtf/makefile.mk delete mode 100644 sw/source/filter/writer/makefile.mk delete mode 100644 sw/source/filter/ww1/makefile.mk delete mode 100644 sw/source/filter/ww8/dump/makefile.mk delete mode 100644 sw/source/filter/ww8/makefile.mk delete mode 100644 sw/source/filter/xml/makefile.mk delete mode 100644 sw/source/ui/app/makefile.mk delete mode 100644 sw/source/ui/cctrl/makefile.mk delete mode 100644 sw/source/ui/chrdlg/makefile.mk delete mode 100644 sw/source/ui/config/makefile.mk delete mode 100644 sw/source/ui/dbui/makefile.mk delete mode 100644 sw/source/ui/dialog/makefile.mk delete mode 100644 sw/source/ui/dochdl/makefile.mk delete mode 100644 sw/source/ui/docvw/makefile.mk delete mode 100644 sw/source/ui/envelp/makefile.mk delete mode 100644 sw/source/ui/fldui/makefile.mk delete mode 100644 sw/source/ui/fmtui/makefile.mk delete mode 100644 sw/source/ui/frmdlg/makefile.mk delete mode 100644 sw/source/ui/globdoc/makefile.mk delete mode 100644 sw/source/ui/inc/makefile.mk delete mode 100644 sw/source/ui/index/makefile.mk delete mode 100644 sw/source/ui/lingu/makefile.mk delete mode 100644 sw/source/ui/makefile.mk delete mode 100644 sw/source/ui/misc/makefile.mk delete mode 100644 sw/source/ui/ribbar/makefile.mk delete mode 100644 sw/source/ui/shells/makefile.mk delete mode 100644 sw/source/ui/smartmenu/makefile.mk delete mode 100644 sw/source/ui/table/makefile.mk delete mode 100644 sw/source/ui/uiview/makefile.mk delete mode 100644 sw/source/ui/uno/makefile.mk delete mode 100644 sw/source/ui/utlui/makefile.mk delete mode 100644 sw/source/ui/vba/makefile.mk delete mode 100644 sw/source/ui/web/makefile.mk delete mode 100644 sw/source/ui/wrtsh/makefile.mk delete mode 100644 sw/uiconfig/layout/makefile.mk delete mode 100644 sw/util/makefile.mk (limited to 'sw/source') diff --git a/sw/inc/makefile.mk b/sw/inc/makefile.mk deleted file mode 100644 index b5efd14c81..0000000000 --- a/sw/inc/makefile.mk +++ /dev/null @@ -1,49 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=.. - -PRJNAME=sw -TARGET=inc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" # && ( "$(PRJNAME)"!="sw" || "$(BUILD_SPECIAL)"!="TRUE" ) -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" - diff --git a/sw/qa/complex/accessibility/makefile.mk b/sw/qa/complex/accessibility/makefile.mk deleted file mode 100644 index 06e7c6a704..0000000000 --- a/sw/qa/complex/accessibility/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = sw -TARGET = qa_complex_accessibility - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/accessibility -JAVATESTFILES = AccessibleRelationSet.java -JAVAFILES = $(JAVATESTFILES) -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END diff --git a/sw/qa/complex/checkColor/makefile.mk b/sw/qa/complex/checkColor/makefile.mk deleted file mode 100755 index e5b368083a..0000000000 --- a/sw/qa/complex/checkColor/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = sw -TARGET = qa_complex_checkColor - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/checkColor -JAVATESTFILES = CheckChangeColor.java -JAVAFILES = $(JAVATESTFILES) -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END diff --git a/sw/qa/complex/indeterminateState/makefile.mk b/sw/qa/complex/indeterminateState/makefile.mk deleted file mode 100755 index d19915b1e2..0000000000 --- a/sw/qa/complex/indeterminateState/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = sw -TARGET = qa_complex_indeterminateState - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/indeterminateState -JAVATESTFILES = CheckIndeterminateState.java -JAVAFILES = $(JAVATESTFILES) -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END diff --git a/sw/qa/complex/writer/makefile.mk b/sw/qa/complex/writer/makefile.mk deleted file mode 100755 index 550e9d64fd..0000000000 --- a/sw/qa/complex/writer/makefile.mk +++ /dev/null @@ -1,56 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = sw -TARGET = qa_complex_writer - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/writer -JAVATESTFILES = \ - CheckBookmarks.java \ - CheckCrossReferences.java \ - CheckFlies.java \ - CheckIndexedPropertyValues.java \ - CheckNamedPropertyValues.java \ - TextPortionEnumerationTest.java -JAVAFILES = $(JAVATESTFILES) TestDocument.java -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END diff --git a/sw/qa/core/makefile.mk b/sw/qa/core/makefile.mk deleted file mode 100644 index 00ebfda884..0000000000 --- a/sw/qa/core/makefile.mk +++ /dev/null @@ -1,69 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME=sw -TARGET=test-bigptrarray -# this is removed at the moment because we need some enhancements -# TESTDIR=TRUE - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -CFLAGSCXX += $(CPPUNIT_CFLAGS) - -# BEGIN ---------------------------------------------------------------- -# auto generated Target:testjob by codegen.pl - -.IF "$(GUI)" == "WNT" - CFLAGS+=/Ob1 -.ENDIF - -SHL1OBJS=$(SLO)$/Test-BigPtrArray.obj \ - $(SLO)$/bparr.obj - -SHL1TARGET=$(TARGET) -SHL1STDLIBS=$(SALLIB) $(TOOLSLIB) $(CPPUNITLIB) $(TESTSHL2LIB) - -SHL1IMPLIB= i$(SHL1TARGET) - -# SHL1DEF= $(MISC)$/$(SHL1TARGET).def - -DEF1NAME =$(SHL1TARGET) - -# DEF1EXPORTFILE= export.exp -SHL1VERSIONMAP = export.map - -# END ------------------------------------------------------------------ - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk -.INCLUDE : _cppunit.mk diff --git a/sw/qa/unoapi/makefile.mk b/sw/qa/unoapi/makefile.mk deleted file mode 100644 index f5102c2c9c..0000000000 --- a/sw/qa/unoapi/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -#***********************************************************************/ - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../.. -PRJNAME = sw -TARGET = qa_unoapi - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = org/openoffice/sw/qa/unoapi -JAVATESTFILES = Test.java -JAVAFILES = $(JAVATESTFILES) -JARFILES = OOoRunner.jar ridl.jar test.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END diff --git a/sw/sdi/makefile.mk b/sw/sdi/makefile.mk deleted file mode 100644 index e539c7a055..0000000000 --- a/sw/sdi/makefile.mk +++ /dev/null @@ -1,106 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -# wx mktyplib nur unter Windows aufrufbar -# VMB.386 und WXSRVR.EXE muessen geladen sein! (n:\mscwini\bin) - -PRJ=.. - -PRJNAME=sw -TARGET=swslots - -# --- Settings ----------------------------------------------------- -.IF "$(L10N_framework)"=="" -SVSDIINC=$(PRJ)$/source$/ui$/inc -.ENDIF - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(L10N_framework)"=="" -SDI1NAME=$(TARGET) -SDI1EXPORT=swriter -#SIDHRCNAME=swslots.hrc - -# --- Files -------------------------------------------------------- -SVSDI1DEPEND= \ - $(SOLARINCXDIR)$/sfx2/sfx.sdi \ - $(SOLARINCXDIR)$/sfx2/sfxitems.sdi \ - $(SOLARINCXDIR)$/svx/svx.sdi \ - $(SOLARINCXDIR)$/svx/svxitems.sdi \ - $(SOLARINCXDIR)$/svx/xoitems.sdi \ - switems.sdi\ - swriter.sdi\ - _docsh.sdi\ - docsh.sdi\ - wdocsh.sdi\ - wrtapp.sdi\ - _basesh.sdi\ - basesh.sdi\ - _textsh.sdi\ - textsh.sdi\ - wtextsh.sdi\ - _drwbase.sdi\ - drwbassh.sdi\ - wdrwbase.sdi\ - formsh.sdi\ - _formsh.sdi\ - wformsh.sdi\ - drawsh.sdi\ - drwtxtsh.sdi\ - _listsh.sdi\ - listsh.sdi\ - wlistsh.sdi\ - _frmsh.sdi\ - frmsh.sdi\ - wfrmsh.sdi\ - _tabsh.sdi\ - tabsh.sdi\ - wtabsh.sdi\ - _grfsh.sdi\ - grfsh.sdi\ - wgrfsh.sdi\ - _olesh.sdi\ - olesh.sdi\ - wolesh.sdi\ - beziersh.sdi\ - _viewsh.sdi\ - viewsh.sdi\ - wviewsh.sdi\ - _mediash.sdi\ - mediash.sdi\ - _annotsh.sdi\ - annotsh.sdi\ - swslots.hrc \ - $(INC)$/globals.hrc \ - $(INC)$/cmdid.h -.ENDIF - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/sw/source/core/SwNumberTree/makefile.mk b/sw/source/core/SwNumberTree/makefile.mk deleted file mode 100644 index d67a3f321a..0000000000 --- a/sw/source/core/SwNumberTree/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=SwNumberTree - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/SwNumberTree.obj \ - $(SLO)$/SwNodeNum.obj - -EXCEPTIONSFILES = \ - $(SLO)$/SwNumberTree.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/access/makefile.mk b/sw/source/core/access/makefile.mk deleted file mode 100644 index 72871314f7..0000000000 --- a/sw/source/core/access/makefile.mk +++ /dev/null @@ -1,100 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=access - -# --- Settings ----------------------------------------------------- -#ENABLE_EXCEPTIONS=TRUE - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/acccell.obj \ - $(SLO)$/acccontext.obj \ - $(SLO)$/accdoc.obj \ - $(SLO)$/accembedded.obj \ - $(SLO)$/accfootnote.obj \ - $(SLO)$/accframe.obj \ - $(SLO)$/accframebase.obj \ - $(SLO)$/accfrmobj.obj \ - $(SLO)$/accfrmobjmap.obj \ - $(SLO)$/accfrmobjslist.obj \ - $(SLO)$/accgraphic.obj \ - $(SLO)$/accheaderfooter.obj \ - $(SLO)$/acchyperlink.obj \ - $(SLO)$/acchypertextdata.obj \ - $(SLO)$/accmap.obj \ - $(SLO)$/accnotextframe.obj \ - $(SLO)$/accpage.obj \ - $(SLO)$/accpara.obj \ - $(SLO)$/accportions.obj \ - $(SLO)$/accpreview.obj \ - $(SLO)$/accselectionhelper.obj \ - $(SLO)$/acctable.obj \ - $(SLO)$/acctextframe.obj \ - $(SLO)$/textmarkuphelper.obj \ - $(SLO)$/parachangetrackinginfo.obj - -EXCEPTIONSFILES= \ - $(SLO)$/acccell.obj \ - $(SLO)$/acccontext.obj \ - $(SLO)$/accdoc.obj \ - $(SLO)$/accembedded.obj \ - $(SLO)$/accfootnote.obj \ - $(SLO)$/accframe.obj \ - $(SLO)$/accframebase.obj \ - $(SLO)$/accfrmobj.obj \ - $(SLO)$/accfrmobjmap.obj \ - $(SLO)$/accfrmobjslist.obj \ - $(SLO)$/accgraphic.obj \ - $(SLO)$/accheaderfooter.obj \ - $(SLO)$/acchyperlink.obj \ - $(SLO)$/acchypertextdata.obj \ - $(SLO)$/accmap.obj \ - $(SLO)$/accnotextframe.obj \ - $(SLO)$/accpage.obj \ - $(SLO)$/accpara.obj \ - $(SLO)$/accportions.obj \ - $(SLO)$/accpreview.obj \ - $(SLO)$/accselectionhelper.obj \ - $(SLO)$/acctable.obj \ - $(SLO)$/acctextframe.obj \ - $(SLO)$/textmarkuphelper.obj \ - $(SLO)$/parachangetrackinginfo.obj - -# --- Targets ------------------------------------------------------- - - -.INCLUDE : target.mk - diff --git a/sw/source/core/attr/makefile.mk b/sw/source/core/attr/makefile.mk deleted file mode 100644 index a3827d4776..0000000000 --- a/sw/source/core/attr/makefile.mk +++ /dev/null @@ -1,55 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=attr - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/calbck.obj \ - $(SLO)$/cellatr.obj \ - $(SLO)$/fmtfollowtextflow.obj \ - $(SLO)$/fmtwrapinfluenceonobjpos.obj \ - $(SLO)$/format.obj \ - $(SLO)$/hints.obj \ - $(SLO)$/swatrset.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/bastyp/makefile.mk b/sw/source/core/bastyp/makefile.mk deleted file mode 100644 index 8333dabd5f..0000000000 --- a/sw/source/core/bastyp/makefile.mk +++ /dev/null @@ -1,79 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=bastyp - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - bparr.cxx \ - breakit.cxx \ - calc.cxx \ - checkit.cxx \ - index.cxx \ - init.cxx \ - ring.cxx \ - swcache.cxx \ - swrect.cxx \ - swregion.cxx \ - swtypes.cxx \ - tabcol.cxx \ - SwSmartTagMgr.cxx - -SLOFILES = \ - $(SLO)$/bparr.obj \ - $(SLO)$/breakit.obj \ - $(SLO)$/calc.obj \ - $(SLO)$/checkit.obj \ - $(SLO)$/index.obj \ - $(SLO)$/init.obj \ - $(SLO)$/ring.obj \ - $(SLO)$/swcache.obj \ - $(SLO)$/swrect.obj \ - $(SLO)$/swregion.obj \ - $(SLO)$/swtypes.obj \ - $(SLO)$/tabcol.obj \ - $(SLO)$/SwSmartTagMgr.obj - -EXCEPTIONSFILES = \ - $(SLO)$/tabcol.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/crsr/makefile.mk b/sw/source/core/crsr/makefile.mk deleted file mode 100644 index a2571901c0..0000000000 --- a/sw/source/core/crsr/makefile.mk +++ /dev/null @@ -1,83 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=crsr - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS+=-Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/crbm.obj \ - $(SLO)$/crsrsh.obj \ - $(SLO)$/bookmrk.obj \ - $(SLO)$/viscrs.obj - -SLOFILES = \ - $(SLO)$/BlockCursor.obj \ - $(SLO)$/bookmrk.obj \ - $(SLO)$/callnk.obj \ - $(SLO)$/crbm.obj \ - $(SLO)$/crsrsh.obj \ - $(SLO)$/crstrvl.obj \ - $(SLO)$/crstrvl1.obj \ - $(SLO)$/findattr.obj \ - $(SLO)$/findcoll.obj \ - $(SLO)$/findfmt.obj \ - $(SLO)$/findtxt.obj \ - $(SLO)$/pam.obj \ - $(SLO)$/paminit.obj \ - $(SLO)$/swcrsr.obj \ - $(SLO)$/trvlcol.obj \ - $(SLO)$/trvlfnfl.obj \ - $(SLO)$/trvlreg.obj \ - $(SLO)$/trvltbl.obj \ - $(SLO)$/unocrsr.obj \ - $(SLO)$/viscrs.obj \ - $(SLO)$/crossrefbookmark.obj - -.IF "$(mydebug)" != "" -SLOFILES += \ - $(SLO)$/pamio.obj -.ENDIF - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/sw/source/core/doc/makefile.mk b/sw/source/core/doc/makefile.mk deleted file mode 100644 index 5a65b2de24..0000000000 --- a/sw/source/core/doc/makefile.mk +++ /dev/null @@ -1,92 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=doc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES = \ - $(SLO)$/SwStyleNameMapper.obj \ - $(SLO)$/acmplwrd.obj \ - $(SLO)$/dbgoutsw.obj \ - $(SLO)$/doc.obj \ - $(SLO)$/docbm.obj \ - $(SLO)$/doccomp.obj \ - $(SLO)$/docdraw.obj \ - $(SLO)$/docedt.obj \ - $(SLO)$/docfmt.obj \ - $(SLO)$/docglbl.obj \ - $(SLO)$/docglos.obj \ - $(SLO)$/doclay.obj \ - $(SLO)$/docxforms.obj \ - $(SLO)$/docnew.obj \ - $(SLO)$/docnum.obj \ - $(SLO)$/docsort.obj \ - $(SLO)$/doctxm.obj \ - $(SLO)$/number.obj \ - $(SLO)$/swstylemanager.obj \ - $(SLO)$/tblcpy.obj \ - $(SLO)$/tblrwcl.obj \ - $(SLO)$/list.obj - -SLOFILES = $(EXCEPTIONSFILES) \ - $(SLO)$/docbasic.obj \ - $(SLO)$/docchart.obj \ - $(SLO)$/doccorr.obj \ - $(SLO)$/docdde.obj \ - $(SLO)$/docdesc.obj \ - $(SLO)$/docfld.obj \ - $(SLO)$/docfly.obj \ - $(SLO)$/docftn.obj \ - $(SLO)$/docredln.obj \ - $(SLO)$/docruby.obj \ - $(SLO)$/docstat.obj \ - $(SLO)$/extinput.obj \ - $(SLO)$/fmtcol.obj \ - $(SLO)$/ftnidx.obj \ - $(SLO)$/gctable.obj \ - $(SLO)$/lineinfo.obj \ - $(SLO)$/notxtfrm.obj \ - $(SLO)$/poolfmt.obj \ - $(SLO)$/sortopt.obj \ - $(SLO)$/swserv.obj \ - $(SLO)$/tblafmt.obj \ - $(SLO)$/visiturl.obj \ - $(SLO)$/htmltbl.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/docnode/makefile.mk b/sw/source/core/docnode/makefile.mk deleted file mode 100644 index d3e5df64b6..0000000000 --- a/sw/source/core/docnode/makefile.mk +++ /dev/null @@ -1,82 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=docnode - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/cancellablejob.obj \ - $(SLO)$/finalthreadmanager.obj \ - $(SLO)$/ndcopy.obj \ - $(SLO)$/ndtbl.obj \ - $(SLO)$/node.obj \ - $(SLO)$/observablethread.obj \ - $(SLO)$/retrieveinputstream.obj \ - $(SLO)$/retrievedinputstreamdata.obj \ - $(SLO)$/swbaslnk.obj \ - $(SLO)$/threadmanager.obj - -SLOFILES = \ - $(SLO)$/ndindex.obj \ - $(SLO)$/ndcopy.obj \ - $(SLO)$/ndnotxt.obj \ - $(SLO)$/ndnum.obj \ - $(SLO)$/ndsect.obj \ - $(SLO)$/ndtbl.obj \ - $(SLO)$/ndtbl1.obj \ - $(SLO)$/node.obj \ - $(SLO)$/node2lay.obj \ - $(SLO)$/nodes.obj \ - $(SLO)$/section.obj \ - $(SLO)$/swbaslnk.obj \ - $(SLO)$/retrievedinputstreamdata.obj \ - $(SLO)$/observablethread.obj \ - $(SLO)$/cancellablejob.obj \ - $(SLO)$/retrieveinputstream.obj \ - $(SLO)$/retrieveinputstreamconsumer.obj \ - $(SLO)$/threadlistener.obj \ - $(SLO)$/threadmanager.obj \ - $(SLO)$/swthreadmanager.obj \ - $(SLO)$/swthreadjoiner.obj \ - $(SLO)$/pausethreadstarting.obj \ - $(SLO)$/finalthreadmanager.obj - - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/draw/makefile.mk b/sw/source/core/draw/makefile.mk deleted file mode 100644 index a57b1b530e..0000000000 --- a/sw/source/core/draw/makefile.mk +++ /dev/null @@ -1,60 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=draw - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/dview.obj \ - $(SLO)$/dcontact.obj \ - $(SLO)$/dflyobj.obj \ - $(SLO)$/drawdoc.obj \ - $(SLO)$/dobjfac.obj \ - $(SLO)$/dpage.obj - -EXCEPTIONSFILES= \ - $(SLO)$/dview.obj \ - $(SLO)$/dcontact.obj \ - $(SLO)$/drawdoc.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/edit/makefile.mk b/sw/source/core/edit/makefile.mk deleted file mode 100644 index a7820b4058..0000000000 --- a/sw/source/core/edit/makefile.mk +++ /dev/null @@ -1,71 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=edit - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES=\ - $(SLO)$/eddel.obj \ - $(SLO)$/edlingu.obj \ - $(SLO)$/edfldexp.obj \ - $(SLO)$/edtab.obj - -SLOFILES = \ - $(EXCEPTIONSFILES)\ - $(SLO)$/acorrect.obj \ - $(SLO)$/autofmt.obj \ - $(SLO)$/edatmisc.obj \ - $(SLO)$/edattr.obj \ - $(SLO)$/edfcol.obj \ - $(SLO)$/edfld.obj \ - $(SLO)$/edfmt.obj \ - $(SLO)$/edglbldc.obj \ - $(SLO)$/edglss.obj \ - $(SLO)$/editsh.obj \ - $(SLO)$/ednumber.obj \ - $(SLO)$/edredln.obj \ - $(SLO)$/edtox.obj \ - $(SLO)$/edundo.obj \ - $(SLO)$/edws.obj \ - $(SLO)$/edsect.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/except/makefile.mk b/sw/source/core/except/makefile.mk deleted file mode 100644 index 19450849b5..0000000000 --- a/sw/source/core/except/makefile.mk +++ /dev/null @@ -1,60 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=except - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk - -# hier kein PCH! -prjpch= -PRJPCH= - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = - -.IF "$(dbgutil)"!="" -CXXFILES += \ - errhdl.cxx \ - dbgloop.cxx - -SLOFILES += \ - $(SLO)$/errhdl.obj \ - $(SLO)$/dbgloop.obj -.ENDIF -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/fields/makefile.mk b/sw/source/core/fields/makefile.mk deleted file mode 100644 index 280fff6aae..0000000000 --- a/sw/source/core/fields/makefile.mk +++ /dev/null @@ -1,94 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=fields - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - authfld.cxx \ - cellfml.cxx \ - chpfld.cxx \ - dbfld.cxx \ - ddefld.cxx \ - ddetbl.cxx \ - docufld.cxx \ - expfld.cxx \ - fldbas.cxx \ - flddat.cxx \ - flddropdown.cxx \ - scrptfld.cxx \ - macrofld.cxx \ - fldlst.cxx \ - postithelper.cxx \ - reffld.cxx \ - tblcalc.cxx \ - usrfld.cxx - - - -SLOFILES = \ - $(SLO)$/textapi.obj \ - $(SLO)$/authfld.obj \ - $(SLO)$/cellfml.obj \ - $(SLO)$/chpfld.obj \ - $(SLO)$/dbfld.obj \ - $(SLO)$/ddefld.obj \ - $(SLO)$/ddetbl.obj \ - $(SLO)$/docufld.obj \ - $(SLO)$/expfld.obj \ - $(SLO)$/fldbas.obj \ - $(SLO)$/flddat.obj \ - $(SLO)$/flddropdown.obj \ - $(SLO)$/fldlst.obj \ - $(SLO)$/scrptfld.obj \ - $(SLO)$/macrofld.obj \ - $(SLO)$/postithelper.obj \ - $(SLO)$/reffld.obj \ - $(SLO)$/tblcalc.obj \ - $(SLO)$/usrfld.obj - -EXCEPTIONSFILES = \ - $(SLO)$/flddropdown.obj \ - $(SLO)$/postithelper.obj \ - $(SLO)$/docufld.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/frmedt/makefile.mk b/sw/source/core/frmedt/makefile.mk deleted file mode 100644 index 8b277f8994..0000000000 --- a/sw/source/core/frmedt/makefile.mk +++ /dev/null @@ -1,76 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=frmedt - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - - -.IF "$(mydebug)" != "" -CDEFS+=-Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - fecopy.cxx \ - fedesc.cxx \ - fefly1.cxx \ - feflyole.cxx \ - feshview.cxx \ - fetab.cxx \ - fews.cxx \ - tblsel.cxx - - - -SLOFILES = $(EXCEPTIONSFILES) \ - $(SLO)$/fedesc.obj \ - $(SLO)$/feflyole.obj \ - $(SLO)$/feshview.obj \ - $(SLO)$/fetab.obj \ - $(SLO)$/tblsel.obj - -EXCEPTIONSFILES=\ - $(SLO)$/fecopy.obj \ - $(SLO)$/fefly1.obj \ - $(SLO)$/fews.obj - - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/graphic/makefile.mk b/sw/source/core/graphic/makefile.mk deleted file mode 100644 index bb637de666..0000000000 --- a/sw/source/core/graphic/makefile.mk +++ /dev/null @@ -1,53 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=graphic - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/grfatr.obj \ - $(SLO)$/ndgrf.obj - -EXCEPTIONSFILES= \ - $(SLO)$/ndgrf.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/inc/makefile.mk b/sw/source/core/inc/makefile.mk deleted file mode 100644 index 1b35ca4954..0000000000 --- a/sw/source/core/inc/makefile.mk +++ /dev/null @@ -1,26 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* diff --git a/sw/source/core/layout/makefile.mk b/sw/source/core/layout/makefile.mk deleted file mode 100644 index 7019203aa2..0000000000 --- a/sw/source/core/layout/makefile.mk +++ /dev/null @@ -1,113 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=layout - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS+=-Dmydebug -.ENDIF - -.IF "$(madebug)" != "" -CDEFS+=-DDEBUG -.ENDIF - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES = \ - $(SLO)$/anchoreddrawobject.obj \ - $(SLO)$/flycnt.obj \ - $(SLO)$/laycache.obj \ - $(SLO)$/layouter.obj \ - $(SLO)$/movedfwdfrmsbyobjpos.obj \ - $(SLO)$/newfrm.obj \ - $(SLO)$/objectformatter.obj \ - $(SLO)$/objstmpconsiderwrapinfl.obj \ - $(SLO)$/paintfrm.obj \ - $(SLO)$/softpagebreak.obj \ - $(SLO)$/sortedobjsimpl.obj \ - $(SLO)$/pagechg.obj - - -SLOFILES = \ - $(SLO)$/atrfrm.obj \ - $(SLO)$/anchoredobject.obj \ - $(SLO)$/anchoreddrawobject.obj \ - $(SLO)$/calcmove.obj \ - $(SLO)$/colfrm.obj \ - $(SLO)$/findfrm.obj \ - $(SLO)$/flowfrm.obj \ - $(SLO)$/fly.obj \ - $(SLO)$/flycnt.obj \ - $(SLO)$/flyincnt.obj \ - $(SLO)$/flylay.obj \ - $(SLO)$/flypos.obj \ - $(SLO)$/frmtool.obj \ - $(SLO)$/ftnfrm.obj \ - $(SLO)$/hffrm.obj \ - $(SLO)$/layact.obj \ - $(SLO)$/laycache.obj \ - $(SLO)$/layouter.obj \ - $(SLO)$/movedfwdfrmsbyobjpos.obj \ - $(SLO)$/newfrm.obj \ - $(SLO)$/objectformatter.obj \ - $(SLO)$/objectformattertxtfrm.obj \ - $(SLO)$/objectformatterlayfrm.obj \ - $(SLO)$/objstmpconsiderwrapinfl.obj \ - $(SLO)$/pagechg.obj \ - $(SLO)$/pagedesc.obj \ - $(SLO)$/paintfrm.obj \ - $(SLO)$/sectfrm.obj \ - $(SLO)$/softpagebreak.obj \ - $(SLO)$/sortedobjs.obj \ - $(SLO)$/sortedobjsimpl.obj \ - $(SLO)$/ssfrm.obj \ - $(SLO)$/swselectionlist.obj \ - $(SLO)$/tabfrm.obj \ - $(SLO)$/trvlfrm.obj \ - $(SLO)$/unusedf.obj \ - $(SLO)$/virtoutp.obj \ - $(SLO)$/wsfrm.obj - -.IF "$(dbgutil)"!="" -SLOFILES += \ - $(SLO)$/dbg_lay.obj -.ENDIF - - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/makefile.mk b/sw/source/core/makefile.mk deleted file mode 100644 index 2701445fb8..0000000000 --- a/sw/source/core/makefile.mk +++ /dev/null @@ -1,110 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=sw - -TARGET=core - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(CALLTARGETS)"=="core" -RC_SUBDIRS= -.ENDIF - -# --- Files -------------------------------------------------------- - - -SUBLIBS1= \ - $(SLB)$/access.lib \ - $(SLB)$/graphic.lib \ - $(SLB)$/para.lib \ - $(SLB)$/attr.lib \ - $(SLB)$/edit.lib \ - $(SLB)$/crsr.lib \ - $(SLB)$/view.lib - - -SUBLIBS2= \ - $(SLB)$/draw.lib \ - $(SLB)$/sw3io.lib \ - $(SLB)$/swg.lib \ - $(SLB)$/layout.lib \ - $(SLB)$/text.lib \ - $(SLB)$/doc.lib \ - $(SLB)$/txtnode.lib - -SUBLIBS3= \ - $(SLB)$/docnode.lib \ - $(SLB)$/unocore.lib \ - $(SLB)$/objectpositioning.lib \ - $(SLB)$/SwNumberTree.lib \ - $(SLB)$/tablecore.lib - -.IF "$(dbgutil)"!="" -SUBLIBS3+= \ - $(SLB)$/except.lib -.ENDIF - -SUBLIBS4= \ - $(SLB)$/frmedt.lib \ - $(SLB)$/ole.lib \ - $(SLB)$/fields.lib \ - $(SLB)$/tox.lib \ - $(SLB)$/undo.lib \ - $(SLB)$/bastyp.lib -#------------------------------------------------------------------------- - -################################################################ - -LIB1TARGET=$(SLB)$/core1.lib -LIB1FILES= \ - $(SUBLIBS1) - -LIB2TARGET=$(SLB)$/core2.lib -LIB2FILES= \ - $(SUBLIBS2) - -LIB3TARGET=$(SLB)$/core3.lib -LIB3FILES= \ - $(SUBLIBS3) - -LIB4TARGET=$(SLB)$/core4.lib -LIB4FILES= \ - $(SUBLIBS4) - -.INCLUDE : target.mk - -################################################################ - -#------------------------------------------------------------------------- - - diff --git a/sw/source/core/objectpositioning/makefile.mk b/sw/source/core/objectpositioning/makefile.mk deleted file mode 100644 index 4192414d9b..0000000000 --- a/sw/source/core/objectpositioning/makefile.mk +++ /dev/null @@ -1,59 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=objectpositioning - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS+=-Dmydebug -.ENDIF - -.IF "$(madebug)" != "" -CDEFS+=-DDEBUG -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/anchoredobjectposition.obj \ - $(SLO)$/ascharanchoredobjectposition.obj \ - $(SLO)$/tolayoutanchoredobjectposition.obj \ - $(SLO)$/tocntntanchoredobjectposition.obj \ - $(SLO)$/environmentofanchoredobject.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/ole/makefile.mk b/sw/source/core/ole/makefile.mk deleted file mode 100644 index 8aaf9ed419..0000000000 --- a/sw/source/core/ole/makefile.mk +++ /dev/null @@ -1,55 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=ole - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - ndole.cxx - -SLOFILES = \ - $(SLO)$/ndole.obj - -EXCEPTIONSFILES = \ - $(SLO)$/ndole.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/para/makefile.mk b/sw/source/core/para/makefile.mk deleted file mode 100644 index 7005bf0e98..0000000000 --- a/sw/source/core/para/makefile.mk +++ /dev/null @@ -1,54 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=para - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - paratr.cxx - - - -SLOFILES = \ - $(SLO)$/paratr.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/sw3io/makefile.mk b/sw/source/core/sw3io/makefile.mk deleted file mode 100644 index 01a50f5df7..0000000000 --- a/sw/source/core/sw3io/makefile.mk +++ /dev/null @@ -1,49 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=sw3io - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/swacorr.obj \ - $(SLO)$/sw3convert.obj - - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/swg/makefile.mk b/sw/source/core/swg/makefile.mk deleted file mode 100644 index c7aa25ec5d..0000000000 --- a/sw/source/core/swg/makefile.mk +++ /dev/null @@ -1,62 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=swg - -#ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- -SLOFILES = \ - $(SLO)$/swblocks.obj \ - $(SLO)$/SwXMLBlockImport.obj \ - $(SLO)$/SwXMLSectionList.obj \ - $(SLO)$/SwXMLBlockExport.obj \ - $(SLO)$/SwXMLBlockListContext.obj \ - $(SLO)$/SwXMLTextBlocks.obj \ - $(SLO)$/SwXMLTextBlocks1.obj - -EXCEPTIONSFILES = \ - $(SLO)$/SwXMLBlockImport.obj \ - $(SLO)$/SwXMLSectionList.obj \ - $(SLO)$/SwXMLBlockExport.obj \ - $(SLO)$/SwXMLBlockListContext.obj \ - $(SLO)$/SwXMLTextBlocks.obj \ - $(SLO)$/SwXMLTextBlocks1.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/table/makefile.mk b/sw/source/core/table/makefile.mk deleted file mode 100644 index d63101e30a..0000000000 --- a/sw/source/core/table/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=tablecore -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/swtable.obj \ - $(SLO)$/swnewtable.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/text/makefile.mk b/sw/source/core/text/makefile.mk deleted file mode 100644 index 0076a17487..0000000000 --- a/sw/source/core/text/makefile.mk +++ /dev/null @@ -1,119 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=text - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS+=-Dmydebug -.ENDIF - -.IF "$(ENABLE_GRAPHITE)" == "TRUE" -CFLAGS+=-DENABLE_GRAPHITE -.ENDIF -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/atrstck.obj \ - $(SLO)$/EnhancedPDFExportHelper.obj \ - $(SLO)$/frmcrsr.obj \ - $(SLO)$/frmform.obj \ - $(SLO)$/frminf.obj \ - $(SLO)$/frmpaint.obj \ - $(SLO)$/guess.obj \ - $(SLO)$/inftxt.obj \ - $(SLO)$/itradj.obj \ - $(SLO)$/itratr.obj \ - $(SLO)$/itrcrsr.obj \ - $(SLO)$/itrform2.obj \ - $(SLO)$/itrpaint.obj \ - $(SLO)$/itrtxt.obj \ - $(SLO)$/porexp.obj \ - $(SLO)$/porfld.obj \ - $(SLO)$/porfly.obj \ - $(SLO)$/porglue.obj \ - $(SLO)$/porlay.obj \ - $(SLO)$/porlin.obj \ - $(SLO)$/pormulti.obj \ - $(SLO)$/porref.obj \ - $(SLO)$/porrst.obj \ - $(SLO)$/portox.obj \ - $(SLO)$/portxt.obj \ - $(SLO)$/redlnitr.obj \ - $(SLO)$/txtcache.obj \ - $(SLO)$/txtdrop.obj \ - $(SLO)$/txtfld.obj \ - $(SLO)$/txtfly.obj \ - $(SLO)$/txtfrm.obj \ - $(SLO)$/txtftn.obj \ - $(SLO)$/txthyph.obj \ - $(SLO)$/txtinit.obj \ - $(SLO)$/txtpaint.obj \ - $(SLO)$/txttab.obj \ - $(SLO)$/widorp.obj \ - $(SLO)$/blink.obj \ - $(SLO)$/noteurl.obj \ - $(SLO)$/SwGrammarMarkUp.obj \ - $(SLO)$/wrong.obj - -.IF "$(dbgutil)"!="" -SLOFILES += \ - $(SLO)$/txtio.obj -.ENDIF - -EXCEPTIONSFILES = \ - $(SLO)$/EnhancedPDFExportHelper.obj \ - $(SLO)$/inftxt.obj \ - $(SLO)$/itradj.obj \ - $(SLO)$/itrcrsr.obj \ - $(SLO)$/porlay.obj \ - $(SLO)$/pormulti.obj \ - $(SLO)$/SwGrammarMarkUp.obj \ - $(SLO)$/txtfly.obj \ - $(SLO)$/wrong.obj - - -.IF "$(CPUNAME)" == "SPARC" -.IF "$(OS)" == "NETBSD" -NOOPTFILES = \ - $(SLO)$/txtftn.obj -.ENDIF -.ENDIF - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/tox/makefile.mk b/sw/source/core/tox/makefile.mk deleted file mode 100644 index 60de374491..0000000000 --- a/sw/source/core/tox/makefile.mk +++ /dev/null @@ -1,57 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=tox - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS+=-Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/tox.obj \ - $(SLO)$/toxhlp.obj \ - $(SLO)$/txmsrt.obj - -EXCEPTIONSFILES= \ - $(SLO)$/toxhlp.obj \ - $(SLO)$/tox.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/txtnode/makefile.mk b/sw/source/core/txtnode/makefile.mk deleted file mode 100644 index f03f96c426..0000000000 --- a/sw/source/core/txtnode/makefile.mk +++ /dev/null @@ -1,86 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=txtnode - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS+=-Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/atrfld.obj \ - $(SLO)$/atrflyin.obj \ - $(SLO)$/atrftn.obj \ - $(SLO)$/atrref.obj \ - $(SLO)$/atrtox.obj \ - $(SLO)$/chrfmt.obj \ - $(SLO)$/fmtatr2.obj \ - $(SLO)$/fntcap.obj \ - $(SLO)$/fntcache.obj \ - $(SLO)$/swfntcch.obj \ - $(SLO)$/SwGrammarContact.obj \ - $(SLO)$/modeltoviewhelper.obj \ - $(SLO)$/ndhints.obj \ - $(SLO)$/ndtxt.obj \ - $(SLO)$/swfont.obj \ - $(SLO)$/thints.obj \ - $(SLO)$/txatbase.obj \ - $(SLO)$/txatritr.obj \ - $(SLO)$/txtatr2.obj \ - $(SLO)$/txtedt.obj - - -EXCEPTIONSFILES = \ - $(SLO)$/fmtatr2.obj \ - $(SLO)$/atrtox.obj \ - $(SLO)$/atrflyin.obj \ - $(SLO)$/docnew.obj \ - $(SLO)$/fntcache.obj \ - $(SLO)$/ndtxt.obj \ - $(SLO)$/thints.obj \ - $(SLO)$/txtedt.obj - - -.IF "$(dbutil)" != "" -OFILES+=$(SLO)$/dbchratr.$(QBJX) -.ENDIF - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/undo/makefile.mk b/sw/source/core/undo/makefile.mk deleted file mode 100644 index c381761adb..0000000000 --- a/sw/source/core/undo/makefile.mk +++ /dev/null @@ -1,86 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=undo - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - undo.src - -EXCEPTIONSFILES = \ - $(SLO)$/SwRewriter.obj \ - $(SLO)$/unattr.obj \ - $(SLO)$/undobj.obj \ - $(SLO)$/undraw.obj \ - $(SLO)$/unovwr.obj \ - $(SLO)$/untbl.obj - -SLOFILES = \ - $(SLO)$/SwRewriter.obj \ - $(SLO)$/SwUndoField.obj \ - $(SLO)$/SwUndoPageDesc.obj \ - $(SLO)$/SwUndoFmt.obj \ - $(SLO)$/SwUndoTOXChange.obj \ - $(SLO)$/docundo.obj \ - $(SLO)$/rolbck.obj \ - $(SLO)$/unattr.obj \ - $(SLO)$/unbkmk.obj \ - $(SLO)$/undel.obj \ - $(SLO)$/undobj.obj \ - $(SLO)$/undobj1.obj \ - $(SLO)$/undoflystrattr.obj \ - $(SLO)$/undraw.obj \ - $(SLO)$/unfmco.obj \ - $(SLO)$/unins.obj \ - $(SLO)$/unmove.obj \ - $(SLO)$/unnum.obj \ - $(SLO)$/unoutl.obj \ - $(SLO)$/unovwr.obj \ - $(SLO)$/unredln.obj \ - $(SLO)$/unsect.obj \ - $(SLO)$/unsort.obj \ - $(SLO)$/unspnd.obj \ - $(SLO)$/untbl.obj \ - $(SLO)$/untblk.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/unocore/makefile.mk b/sw/source/core/unocore/makefile.mk deleted file mode 100644 index 09e6371ada..0000000000 --- a/sw/source/core/unocore/makefile.mk +++ /dev/null @@ -1,124 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=unocore - -# --- Settings ----------------------------------------------------- -#ENABLE_EXCEPTIONS=TRUE - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- -EXCEPTIONSFILES= \ - $(SLO)$/swunohelper.obj\ - $(SLO)$/SwXTextDefaults.obj\ - $(SLO)$/unobkm.obj\ - $(SLO)$/unochart.obj\ - $(SLO)$/unoevent.obj\ - $(SLO)$/unocrsrhelper.obj\ - $(SLO)$/unoevtlstnr.obj\ - $(SLO)$/unoftn.obj\ - $(SLO)$/unorefmk.obj\ - $(SLO)$/unosect.obj\ - $(SLO)$/unosett.obj\ - $(SLO)$/unocoll.obj\ - $(SLO)$/unodraw.obj\ - $(SLO)$/unofield.obj\ - $(SLO)$/unoframe.obj\ - $(SLO)$/unoidx.obj\ - $(SLO)$/unoobj.obj\ - $(SLO)$/unoobj2.obj\ - $(SLO)$/unoparagraph.obj\ - $(SLO)$/unoport.obj\ - $(SLO)$/unoredline.obj\ - $(SLO)$/unoredlines.obj\ - $(SLO)$/unosrch.obj\ - $(SLO)$/unostyle.obj\ - $(SLO)$/unotbl.obj \ - $(SLO)$/unoflatpara.obj\ - $(SLO)$/unotextmarkup.obj\ - $(SLO)$/TextCursorHelper.obj \ - $(SLO)$/unotext.obj - -.IF "$(GUI)$(COM)$(CPU)" == "WNTMSCI" -EXCEPTIONSNOOPTFILES =$(SLO)$/unoportenum.obj -.ELSE -EXCEPTIONSFILES +=$(SLO)$/unoportenum.obj -.ENDIF - - -SRS1NAME=$(TARGET) -SRC1FILES = \ - unocore.src - -SLOFILES = \ - $(SLO)$/swunohelper.obj\ - $(SLO)$/SwXTextDefaults.obj\ - $(SLO)$/unoportenum.obj\ - $(SLO)$/unobkm.obj\ - $(SLO)$/unochart.obj\ - $(SLO)$/unoevent.obj\ - $(SLO)$/unocrsrhelper.obj\ - $(SLO)$/unoevtlstnr.obj\ - $(SLO)$/unoftn.obj\ - $(SLO)$/unorefmk.obj\ - $(SLO)$/unosect.obj\ - $(SLO)$/unosett.obj\ - $(SLO)$/unocoll.obj\ - $(SLO)$/unodraw.obj\ - $(SLO)$/unofield.obj\ - $(SLO)$/unoframe.obj\ - $(SLO)$/unoidx.obj\ - $(SLO)$/unoobj.obj\ - $(SLO)$/unoobj2.obj\ - $(SLO)$/unoparagraph.obj\ - $(SLO)$/unoport.obj\ - $(SLO)$/unoredline.obj\ - $(SLO)$/unoredlines.obj\ - $(SLO)$/unosrch.obj\ - $(SLO)$/unostyle.obj\ - $(SLO)$/unotbl.obj \ - $(SLO)$/unoflatpara.obj\ - $(SLO)$/unotextmarkup.obj\ - $(SLO)$/TextCursorHelper.obj \ - $(SLO)$/unotext.obj\ - $(SLO)$/unomap.obj\ - $(SLO)$/unoprnms.obj\ - $(SLO)$/XMLRangeHelper.obj - - - -# --- Targets ------------------------------------------------------- - - -.INCLUDE : target.mk - diff --git a/sw/source/core/view/makefile.mk b/sw/source/core/view/makefile.mk deleted file mode 100755 index 0ac0e0d106..0000000000 --- a/sw/source/core/view/makefile.mk +++ /dev/null @@ -1,61 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=view -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/vdraw.obj \ - $(SLO)$/viewimp.obj \ - $(SLO)$/viewsh.obj \ - $(SLO)$/pagepreviewlayout.obj \ - $(SLO)$/printdata.obj \ - $(SLO)$/viewpg.obj \ - $(SLO)$/vnew.obj \ - $(SLO)$/vprint.obj - - - -EXCEPTIONSFILES = \ - $(SLO)$/pagepreviewlayout.obj - - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/filter/ascii/makefile.mk b/sw/source/filter/ascii/makefile.mk deleted file mode 100644 index e2bd2bef25..0000000000 --- a/sw/source/filter/ascii/makefile.mk +++ /dev/null @@ -1,56 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=ascii - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - ascatr.cxx \ - parasc.cxx \ - wrtasc.cxx - - - -SLOFILES = \ - $(SLO)$/ascatr.obj \ - $(SLO)$/parasc.obj \ - $(SLO)$/wrtasc.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/filter/basflt/makefile.mk b/sw/source/filter/basflt/makefile.mk deleted file mode 100644 index 7713d12657..0000000000 --- a/sw/source/filter/basflt/makefile.mk +++ /dev/null @@ -1,58 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=basflt - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS+=-Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/docfact.obj \ - $(SLO)$/fltini.obj \ - $(SLO)$/shellio.obj \ - $(SLO)$/iodetect.obj - -EXCEPTIONSFILES = \ - $(SLO)$/fltini.obj \ - $(SLO)$/iodetect.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/filter/html/makefile.mk b/sw/source/filter/html/makefile.mk deleted file mode 100644 index b99cc67894..0000000000 --- a/sw/source/filter/html/makefile.mk +++ /dev/null @@ -1,83 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=html - - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS=$(CDEFS) -Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/css1atr.obj \ - $(SLO)$/css1kywd.obj \ - $(SLO)$/htmlatr.obj \ - $(SLO)$/htmlbas.obj \ - $(SLO)$/htmlcss1.obj \ - $(SLO)$/htmlctxt.obj \ - $(SLO)$/htmldraw.obj \ - $(SLO)$/htmlfld.obj \ - $(SLO)$/htmlfldw.obj \ - $(SLO)$/htmlfly.obj \ - $(SLO)$/htmlflyt.obj \ - $(SLO)$/htmlform.obj \ - $(SLO)$/htmlforw.obj \ - $(SLO)$/htmlftn.obj \ - $(SLO)$/htmlgrin.obj \ - $(SLO)$/htmlnum.obj \ - $(SLO)$/htmlplug.obj \ - $(SLO)$/htmlsect.obj \ - $(SLO)$/htmltab.obj \ - $(SLO)$/htmltabw.obj \ - $(SLO)$/parcss1.obj \ - $(SLO)$/svxcss1.obj \ - $(SLO)$/swhtml.obj \ - $(SLO)$/wrthtml.obj \ - $(SLO)$/SwAppletImpl.obj \ - -EXCEPTIONSFILES = \ - $(SLO)$/htmlfld.obj \ - $(SLO)$/htmlplug.obj \ - $(SLO)$/htmlsect.obj \ - $(SLO)$/swhtml.obj \ - $(SLO)$/wrthtml.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/filter/inc/makefile.mk b/sw/source/filter/inc/makefile.mk deleted file mode 100644 index 1b35ca4954..0000000000 --- a/sw/source/filter/inc/makefile.mk +++ /dev/null @@ -1,26 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* diff --git a/sw/source/filter/makefile.mk b/sw/source/filter/makefile.mk deleted file mode 100644 index c2b343eb8b..0000000000 --- a/sw/source/filter/makefile.mk +++ /dev/null @@ -1,67 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sw -TARGET=filter - -.IF "$(CALLTARGETS)"=="filter" -RC_SUBDIRS= -.ENDIF - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - - -SUBLIBS= \ - $(SLB)$/ascii.lib \ - $(SLB)$/basflt.lib \ - $(SLB)$/html.lib \ - $(SLB)$/writer.lib \ - $(SLB)$/ww1.lib \ - $(SLB)$/xml.lib - -# ----------------------------------------------------------- - - -################################################################ - -LIB1TARGET=$(SLB)$/filter.lib -LIB1FILES= \ - $(SUBLIBS) - -.INCLUDE : target.mk - -################################################################ - - diff --git a/sw/source/filter/rtf/makefile.mk b/sw/source/filter/rtf/makefile.mk deleted file mode 100644 index 2ff764d730..0000000000 --- a/sw/source/filter/rtf/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=rtf - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -MAKING_LIBMSWORD=TRUE -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS=$(CDEFS) -Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/rtffly.obj \ - $(SLO)$/rtfnum.obj \ - $(SLO)$/swparrtf.obj \ - $(SLO)$/wrtrtf.obj - - -SLOFILES = \ - $(SLO)$/rtfatr.obj \ - $(SLO)$/rtffld.obj \ - $(SLO)$/rtffly.obj \ - $(SLO)$/rtfnum.obj \ - $(SLO)$/rtftbl.obj \ - $(SLO)$/swparrtf.obj \ - $(SLO)$/wrtrtf.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/filter/writer/makefile.mk b/sw/source/filter/writer/makefile.mk deleted file mode 100644 index d08caa9eb4..0000000000 --- a/sw/source/filter/writer/makefile.mk +++ /dev/null @@ -1,54 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=writer - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - writer.cxx \ - wrt_fn.cxx \ - wrtswtbl.cxx - -SLOFILES = \ - $(SLO)$/writer.obj \ - $(SLO)$/wrt_fn.obj \ - $(SLO)$/wrtswtbl.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/filter/ww1/makefile.mk b/sw/source/filter/ww1/makefile.mk deleted file mode 100644 index 4f751cbaea..0000000000 --- a/sw/source/filter/ww1/makefile.mk +++ /dev/null @@ -1,94 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=ww1 - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS=$(CDEFS) -Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/w1filter.obj \ - $(SLO)$/fltshell.obj - -SLOFILES = \ - $(SLO)$/w1par.obj \ - $(SLO)$/w1class.obj \ - $(SLO)$/w1filter.obj \ - $(SLO)$/w1sprm.obj \ - $(SLO)$/fltshell.obj \ - - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -run: alltar - -#copy all relevant files to a backupdir -bak: - copy ..\inc\fltshell.hxx backup - copy *.?xx backup - copy makefile* backup - copy vcs.cfg backup - copy ..\..\..\dump1\src\dump1.cxx backup - copy ..\..\..\dump1\src\makefile backup\makefile.dmp - copy ..\..\..\WNTMSCI\bin\makefile backup\makefile.bin - copy ..\..\..\UTIL\makefile backup\makefile.utl - copy s:\solenv\inc\wnt.mak backup - -# remove this filter from libs to avoid annoying effects -upgrade: - attrib -r *.?xx - attrib -r makefile.* - del ..\..\..\WNMSCI\LIB\ww1.lib - del ..\..\..\WNMSCI\DBO\w1*.obj - del ..\..\..\WNMSCI\DBO\fltshell.obj - del ..\..\..\WNMSCI\MISC - lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\fltshell.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib - lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\w1sprm.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib - lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\w1filter.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib - lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\w1class.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib - lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\w1par.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib - copy backup\makefile.bin ..\..\..\WNTMSCI\bin\makefile - diff backup\makefile.utl ..\..\..\UTIL\makefile - diff s:\solenv\inc\wnt.mak backup - -zip: bak - pkzip c:\temp\ww1 backup\*.* - diff --git a/sw/source/filter/ww8/dump/makefile.mk b/sw/source/filter/ww8/dump/makefile.mk deleted file mode 100644 index 695eddc9d1..0000000000 --- a/sw/source/filter/ww8/dump/makefile.mk +++ /dev/null @@ -1,122 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=. - -PRJNAME=DUMP8 -TARGET=dump8 - -# --- Settings --------------------------------------------------- - -.INCLUDE : settings.mk - -CXXFILES= dump8.cxx dump8a.cxx ww8dout.cxx ww8darr.cxx ww8scan.cxx msvbasic.cxx - -OBJFILES= $(OBJ)$/dump8.obj $(OBJ)$/dump8a.obj $(OBJ)$/ww8dout.obj \ - $(OBJ)$/ww8darr.obj $(OBJ)$/ww8scan.obj $(OBJ)$/msvbasic.obj - - -.IF "$(depend)" == "" - -CFLAGS+= -DDUMP - -# --- DUMP8 EXE -------------------------------------------------------- - -# IENV=$(IENV);..\RES - -APP1TARGET=$(PRJNAME) - -# RESLIB1NAME=vu -# RESLIB1SRSFILES=$(SRS)$/main.srs - -APP1LIBS=$(LIB1TARGET) - -.IF "$(GUI)" == "WNT" -APP1STDLIBS= $(SVTOOLLIB) $(SVLLIB) $(TOOLSLIB) $(SVLIB) $(SVMEMLIB) $(SO2LIB) -# irtl.lib -.IF "$(SO3)" == "" -APP1STDLIBS+= sdstor.lib -.ELSE -APP1STDLIBS+= $(SOTLIB) -.ENDIF -.IF "$(COMEX)"=="10" -APP1STDLIBS+= $(OLE32LIB) $(OLEAUT32LIB) $(UUIDLIB) $(SHELL32LIB) $(ADVAPI32LIB) libci.lib -.ELSE -APP1STDLIBS+= $(OLE32LIB) $(OLEAUT32LIB) $(UUIDLIB) $(SHELL32LIB) $(ADVAPI32LIB) libci.lib msvcirt.lib -.ENDIF -.ELSE -.IF "$(GUI)" == "OS2" -APP1STDLIBS=sdstor.lib $(SO2LIB) $(SVTOOLLIB) $(SVLIB) tools.lib $(SVMEMLIB) $(SVXLIB) -.ELSE -APP1STDLIBS=$(SVTOOLLIB) tools.lib $(SVLIB) $(SVMEMLIB) sdstor.lib $(SO2LIB) $(SVXLIB) -APP1STDLIBS+= ole2 compobj storage shell -.ENDIF -.ENDIF -.IF "$(GUI)"=="WNT" -APP1DEPN= $(L)$/svtool.lib $(L)$/itools.lib $(SVLIBDEPEND) $(L)$/svmem.lib $(L)$/so2.lib -.ELSE -APP1DEPN= $(L)$/svtool.lib $(L)$/tools.lib $(SVLIBDEPEND) $(L)$/svmem.lib $(L)$/so2.lib -.ENDIF -APP1OBJS= $(OBJ)$/dump8.obj $(OBJ)$/dump8a.obj $(OBJ)$/ww8dout.obj \ - $(OBJ)$/ww8darr.obj $(OBJ)$/ww8scan.obj $(OBJ)/msvbasic.obj - -APP1DEF= $(MISC)$/$(PRJNAME).def - - -#------------------------------------------------------------------------- -# OS/2 -#------------------------------------------------------------------------- - -.IF "$(GUI)" == "OS2" - -ALL: \ - $(SRS)$/main.srs \ - ALLTAR - -$(MISC)$/$(PRJNAME).def: makefile - echo NAME VIEWER WINDOWAPI >$@ - echo DESCRIPTION 'Storage Viewer (C)1995 STAR DIVISION GmbH' >>$@ - echo EXETYPE OS2 >>$@ - echo PROTMODE >>$@ - echo STUB 'OS2STUB.EXE' >>$@ - echo CODE LOADONCALL >>$@ - echo DATA PRELOAD MULTIPLE >>$@ - echo HEAPSIZE 4096 >>$@ - echo STACKSIZE 30000 >>$@ - -.ENDIF # GUI == OS2 - -#------------------------------------------------------------------------- -# Windows NT -#------------------------------------------------------------------------- - -# --- Targets ----------------------------------------------------------- - -.ENDIF - -.INCLUDE : target.mk - diff --git a/sw/source/filter/ww8/makefile.mk b/sw/source/filter/ww8/makefile.mk deleted file mode 100644 index b25887e3e2..0000000000 --- a/sw/source/filter/ww8/makefile.mk +++ /dev/null @@ -1,105 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=ww8 - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -MAKING_LIBMSWORD=TRUE -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS=$(CDEFS) -Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES = \ - $(SLO)$/wrtww8gr.obj \ - $(SLO)$/ww8par2.obj \ - $(SLO)$/ww8par3.obj \ - $(SLO)$/ww8par5.obj \ - $(SLO)$/tracer.obj \ - $(SLO)$/fields.obj \ - $(SLO)$/styles.obj \ - $(SLO)$/ww8graf.obj \ - $(SLO)$/ww8graf2.obj \ - $(SLO)$/wrtw8esh.obj \ - $(SLO)$/wrtw8nds.obj \ - $(SLO)$/wrtw8num.obj \ - $(SLO)$/wrtw8sty.obj \ - $(SLO)$/wrtww8.obj \ - $(SLO)$/ww8atr.obj \ - $(SLO)$/ww8par.obj \ - $(SLO)$/ww8par6.obj \ - $(SLO)$/writerhelper.obj \ - $(SLO)$/writerwordglue.obj \ - $(SLO)$/ww8scan.obj \ - $(SLO)$/WW8TableInfo.obj \ - $(SLO)$/WW8FFData.obj \ - $(SLO)$/WW8Sttbf.obj \ - $(SLO)$/WW8FibData.obj - - -SLOFILES = \ - $(SLO)$/wrtw8esh.obj \ - $(SLO)$/wrtw8nds.obj \ - $(SLO)$/wrtw8num.obj \ - $(SLO)$/wrtw8sty.obj \ - $(SLO)$/wrtww8.obj \ - $(SLO)$/wrtww8gr.obj \ - $(SLO)$/ww8atr.obj \ - $(SLO)$/ww8graf.obj \ - $(SLO)$/ww8graf2.obj \ - $(SLO)$/ww8par.obj \ - $(SLO)$/ww8par2.obj \ - $(SLO)$/ww8par3.obj \ - $(SLO)$/ww8par4.obj \ - $(SLO)$/ww8par5.obj \ - $(SLO)$/ww8par6.obj \ - $(SLO)$/ww8glsy.obj \ - $(SLO)$/tracer.obj \ - $(SLO)$/fields.obj \ - $(SLO)$/styles.obj \ - $(SLO)$/ww8scan.obj \ - $(SLO)$/writerhelper.obj \ - $(SLO)$/writerwordglue.obj \ - $(SLO)$/WW8TableInfo.obj \ - $(SLO)$/WW8FFData.obj \ - $(SLO)$/WW8Sttbf.obj \ - $(SLO)$/WW8FibData.obj - - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/filter/xml/makefile.mk b/sw/source/filter/xml/makefile.mk deleted file mode 100644 index c1191fe3fa..0000000000 --- a/sw/source/filter/xml/makefile.mk +++ /dev/null @@ -1,94 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=xml - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS=$(CDEFS) -Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/swxml.obj \ - $(SLO)$/xmlimp.obj \ - $(SLO)$/wrtxml.obj \ - $(SLO)$/xmlexp.obj \ - $(SLO)$/xmltext.obj \ - $(SLO)$/xmltexte.obj \ - $(SLO)$/xmltexti.obj \ - $(SLO)$/xmltbli.obj \ - $(SLO)$/xmltble.obj \ - $(SLO)$/xmlfmt.obj \ - $(SLO)$/xmlfmte.obj \ - $(SLO)$/xmlmeta.obj \ - $(SLO)$/xmlscript.obj \ - $(SLO)$/xmlitemm.obj \ - $(SLO)$/xmlitemi.obj \ - $(SLO)$/xmliteme.obj \ - $(SLO)$/xmlithlp.obj \ - $(SLO)$/xmlbrsh.obj \ - $(SLO)$/xmlfonte.obj \ - $(SLO)$/XMLRedlineImportHelper.obj \ - $(SLO)$/xmlitem.obj \ - $(SLO)$/xmlitmpr.obj \ - $(SLO)$/xmlimpit.obj \ - $(SLO)$/xmlexpit.obj - -EXCEPTIONSFILES= \ - $(SLO)$/swxml.obj \ - $(SLO)$/xmlimp.obj \ - $(SLO)$/wrtxml.obj \ - $(SLO)$/xmlexp.obj \ - $(SLO)$/xmltext.obj \ - $(SLO)$/xmltexti.obj \ - $(SLO)$/xmltexte.obj \ - $(SLO)$/xmltbli.obj \ - $(SLO)$/xmltble.obj \ - $(SLO)$/xmlfmt.obj \ - $(SLO)$/xmlfmte.obj \ - $(SLO)$/xmlmeta.obj \ - $(SLO)$/xmlscript.obj \ - $(SLO)$/xmlitemi.obj \ - $(SLO)$/xmliteme.obj \ - $(SLO)$/xmlithlp.obj \ - $(SLO)$/xmlbrsh.obj \ - $(SLO)$/xmlfonte.obj \ - $(SLO)$/XMLRedlineImportHelper.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/sw/source/ui/app/makefile.mk b/sw/source/ui/app/makefile.mk deleted file mode 100644 index 88f9ff9d63..0000000000 --- a/sw/source/ui/app/makefile.mk +++ /dev/null @@ -1,101 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=app - -LIBTARGET=NO - -# future: DEMO\... - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES =\ - app.src \ - mn.src \ - error.src - - -SLOFILES = \ - $(SLO)$/appenv.obj \ - $(SLO)$/apphdl.obj \ - $(SLO)$/applab.obj \ - $(SLO)$/appopt.obj \ - $(SLO)$/docsh.obj \ - $(SLO)$/docsh2.obj \ - $(SLO)$/docshdrw.obj \ - $(SLO)$/docshini.obj \ - $(SLO)$/docst.obj \ - $(SLO)$/docstyle.obj \ - $(SLO)$/mainwn.obj \ - $(SLO)$/swmodule.obj \ - $(SLO)$/swmodul1.obj \ - $(SLO)$/swdll.obj \ - $(SLO)$/swwait.obj - -EXCEPTIONSFILES= \ - $(SLO)$/docsh.obj \ - $(SLO)$/docst.obj \ - $(SLO)$/docshini.obj \ - $(SLO)$/swmodule.obj \ - $(SLO)$/swmodul1.obj \ - $(SLO)$/apphdl.obj \ - $(SLO)$/docsh2.obj - -LIB1TARGET= $(SLB)$/app.lib - -LIB1OBJFILES= \ - $(SLO)$/appenv.obj \ - $(SLO)$/apphdl.obj \ - $(SLO)$/applab.obj \ - $(SLO)$/appopt.obj \ - $(SLO)$/docsh.obj \ - $(SLO)$/docsh2.obj \ - $(SLO)$/docshdrw.obj \ - $(SLO)$/docshini.obj \ - $(SLO)$/docst.obj \ - $(SLO)$/docstyle.obj \ - $(SLO)$/mainwn.obj \ - $(SLO)$/swmodul1.obj \ - $(SLO)$/swwait.obj - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -$(SRS)$/app.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - diff --git a/sw/source/ui/cctrl/makefile.mk b/sw/source/ui/cctrl/makefile.mk deleted file mode 100644 index 33ba83f34d..0000000000 --- a/sw/source/ui/cctrl/makefile.mk +++ /dev/null @@ -1,59 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=cctrl - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - actctrl.cxx \ - popbox.cxx \ - swlbox.cxx - -SLOFILES = \ - $(SLO)$/actctrl.obj \ - $(SLO)$/popbox.obj \ - $(SLO)$/swlbox.obj - -EXCEPTIONSFILES = \ - $(SLO)$/popbox.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/chrdlg/makefile.mk b/sw/source/ui/chrdlg/makefile.mk deleted file mode 100644 index 42aad1aedd..0000000000 --- a/sw/source/ui/chrdlg/makefile.mk +++ /dev/null @@ -1,69 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=chrdlg -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - swbreak.src \ - chardlg.src \ - chrdlg.src \ - drpcps.src \ - ccoll.src \ - paradlg.src \ - numpara.src - -SLOFILES = \ - $(SLO)$/break.obj \ - $(SLO)$/chardlg.obj \ - $(SLO)$/drpcps.obj \ - $(SLO)$/ccoll.obj \ - $(SLO)$/swuiccoll.obj \ - $(SLO)$/pardlg.obj \ - $(SLO)$/tblnumfm.obj \ - $(SLO)$/numpara.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/ccoll.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/config/makefile.mk b/sw/source/ui/config/makefile.mk deleted file mode 100644 index 4b8ed01ca9..0000000000 --- a/sw/source/ui/config/makefile.mk +++ /dev/null @@ -1,87 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=config -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- -IMGLST_SRS=$(SRS)$/config.srs -BMP_IN=$(PRJ)$/win/imglst - -SRS1NAME=$(TARGET) -SRC1FILES = \ - mailconfigpage.src \ - optdlg.src \ - optload.src \ - optcomp.src \ - redlopt.src - -EXCEPTIONSFILES = \ - $(SLO)$/mailconfigpage.obj \ - $(SLO)$/optcomp.obj \ - $(SLO)$/optload.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/barcfg.obj \ - $(SLO)$/caption.obj \ - $(SLO)$/cfgitems.obj \ - $(SLO)$/dbconfig.obj \ - $(SLO)$/fontcfg.obj \ - $(SLO)$/modcfg.obj \ - $(SLO)$/optpage.obj \ - $(SLO)$/prtopt.obj \ - $(SLO)$/uinums.obj \ - $(SLO)$/usrpref.obj \ - $(SLO)$/viewopt.obj - -LIB1TARGET= $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/barcfg.obj \ - $(SLO)$/caption.obj \ - $(SLO)$/cfgitems.obj \ - $(SLO)$/dbconfig.obj \ - $(SLO)$/fontcfg.obj \ - $(SLO)$/modcfg.obj \ - $(SLO)$/prtopt.obj \ - $(SLO)$/uinums.obj \ - $(SLO)$/usrpref.obj \ - $(SLO)$/viewopt.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/dbui/makefile.mk b/sw/source/ui/dbui/makefile.mk deleted file mode 100644 index c2477b02ca..0000000000 --- a/sw/source/ui/dbui/makefile.mk +++ /dev/null @@ -1,122 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=dbui -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- -IMGLST_SRS=$(SRS)$/dbui.srs -BMP_IN=$(PRJ)$/win/imglst - - -SRS1NAME=$(TARGET) -SRC1FILES = \ - addresslistdialog.src \ - createaddresslistdialog.src \ - customizeaddresslistdialog.src \ - dbinsdlg.src \ - dbui.src \ - dbtablepreviewdialog.src \ - mailmergechildwindow.src \ - mailmergewizard.src \ - mmdocselectpage.src \ - mmlayoutpage.src \ - mmoutputpage.src \ - mmoutputtypepage.src \ - mmaddressblockpage.src \ - mmgreetingspage.src \ - mmmergepage.src \ - mmpreparemergepage.src \ - selectdbtabledialog.src \ - -EXCEPTIONSFILES= \ - $(SLO)$/addresslistdialog.obj \ - $(SLO)$/createaddresslistdialog.obj \ - $(SLO)$/customizeaddresslistdialog.obj \ - $(SLO)$/dbinsdlg.obj \ - $(SLO)$/dbmgr.obj \ - $(SLO)$/dbtablepreviewdialog.obj \ - $(SLO)$/dbtree.obj \ - $(SLO)$/maildispatcher.obj \ - $(SLO)$/mailmergechildwindow.obj \ - $(SLO)$/mailmergehelper.obj \ - $(SLO)$/mmaddressblockpage.obj \ - $(SLO)$/mmconfigitem.obj \ - $(SLO)$/mmlayoutpage.obj \ - $(SLO)$/mmgreetingspage.obj \ - $(SLO)$/mmoutputpage.obj - -SLOFILES = \ - $(SLO)$/addresslistdialog.obj \ - $(SLO)$/createaddresslistdialog.obj \ - $(SLO)$/customizeaddresslistdialog.obj \ - $(SLO)$/dbinsdlg.obj \ - $(SLO)$/dbmgr.obj \ - $(SLO)$/dbtree.obj \ - $(SLO)$/dbtablepreviewdialog.obj \ - $(SLO)$/maildispatcher.obj \ - $(SLO)$/mailmergehelper.obj \ - $(SLO)$/mailmergewizard.obj \ - $(SLO)$/mailmergechildwindow.obj \ - $(SLO)$/mmconfigitem.obj \ - $(SLO)$/mmdocselectpage.obj \ - $(SLO)$/mmlayoutpage.obj \ - $(SLO)$/mmoutputpage.obj \ - $(SLO)$/mmoutputtypepage.obj \ - $(SLO)$/mmaddressblockpage.obj \ - $(SLO)$/mmgreetingspage.obj \ - $(SLO)$/mmmergepage.obj \ - $(SLO)$/mmpreparemergepage.obj \ - $(SLO)$/dbui.obj \ - $(SLO)$/selectdbtabledialog.obj \ - $(SLO)$/swdbtoolsclient.obj - - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/dbmgr.obj \ - $(SLO)$/dbtree.obj \ - $(SLO)$/dbui.obj \ - $(SLO)$/maildispatcher.obj \ - $(SLO)$/mailmergehelper.obj \ - $(SLO)$/mailmergechildwindow.obj \ - $(SLO)$/mmconfigitem.obj \ - $(SLO)$/swdbtoolsclient.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/dialog/makefile.mk b/sw/source/ui/dialog/makefile.mk deleted file mode 100644 index 26047ad636..0000000000 --- a/sw/source/ui/dialog/makefile.mk +++ /dev/null @@ -1,85 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=dialog -LIBTARGET=no - -# future: DEMO\dialog.srs - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - abstract.src \ - ascfldlg.src \ - dialog.src \ - docstdlg.src \ - regionsw.src \ - wordcountdialog.src - -EXCEPTIONSFILES = \ - $(SLO)$/SwSpellDialogChildWindow.obj - -SLOFILES = \ - $(SLO)$/abstract.obj \ - $(SLO)$/addrdlg.obj \ - $(SLO)$/ascfldlg.obj \ - $(SLO)$/docstdlg.obj \ - $(SLO)$/macassgn.obj \ - $(SLO)$/SwSpellDialogChildWindow.obj \ - $(SLO)$/regionsw.obj \ - $(SLO)$/uiregionsw.obj \ - $(SLO)$/swabstdlg.obj \ - $(SLO)$/swuiexp.obj \ - $(SLO)$/swwrtshitem.obj \ - $(SLO)$/swdialmgr.obj \ - $(SLO)$/wordcountdialog.obj \ - $(SLO)$/swdlgfact.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/regionsw.obj \ - $(SLO)$/swabstdlg.obj \ - $(SLO)$/SwSpellDialogChildWindow.obj \ - $(SLO)$/swwrtshitem.obj - -# $(SLO)$/macassgn.obj \ - -# --- Tagets ------------------------------------------------------- -.INCLUDE : target.mk - - - diff --git a/sw/source/ui/dochdl/makefile.mk b/sw/source/ui/dochdl/makefile.mk deleted file mode 100644 index 48400052f5..0000000000 --- a/sw/source/ui/dochdl/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=dochdl -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - dochdl.src \ - selglos.src - -SLOFILES = \ - $(SLO)$/gloshdl.obj \ - $(SLO)$/selglos.obj \ - $(SLO)$/swdtflvr.obj - -EXCEPTIONSFILES = \ - $(SLO)$/swdtflvr.obj - -# $(SLO)$/dataex.obj \ - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/gloshdl.obj \ - $(SLO)$/swdtflvr.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/docvw/makefile.mk b/sw/source/ui/docvw/makefile.mk deleted file mode 100644 index a2914b2f86..0000000000 --- a/sw/source/ui/docvw/makefile.mk +++ /dev/null @@ -1,69 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=docvw -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - access.src \ - docvw.src \ - annotation.src - -SLOFILES = \ - $(SLO)$/edtdd.obj \ - $(SLO)$/edtwin.obj \ - $(SLO)$/edtwin2.obj \ - $(SLO)$/edtwin3.obj \ - $(SLO)$/romenu.obj \ - $(SLO)$/srcedtw.obj \ - $(SLO)$/PostItMgr.obj \ - $(SLO)$/frmsidebarwincontainer.obj \ - $(SLO)$/AnchorOverlayObject.obj \ - $(SLO)$/ShadowOverlayObject.obj \ - $(SLO)$/SidebarWin.obj \ - $(SLO)$/SidebarWinAcc.obj \ - $(SLO)$/AnnotationWin.obj \ - $(SLO)$/AnnotationMenuButton.obj \ - $(SLO)$/SidebarTxtControl.obj \ - $(SLO)$/SidebarTxtControlAcc.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/envelp/makefile.mk b/sw/source/ui/envelp/makefile.mk deleted file mode 100644 index 3010601b0a..0000000000 --- a/sw/source/ui/envelp/makefile.mk +++ /dev/null @@ -1,80 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=envelp -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES =\ - envelp.src \ - envfmt.src \ - envlop.src \ - envprt.src \ - label.src \ - labfmt.src \ - labprt.src \ - mailmrge.src - -SLOFILES = \ - $(SLO)$/envfmt.obj \ - $(SLO)$/envimg.obj \ - $(SLO)$/envlop1.obj \ - $(SLO)$/envprt.obj \ - $(SLO)$/labelcfg.obj \ - $(SLO)$/label1.obj \ - $(SLO)$/labelexp.obj \ - $(SLO)$/labfmt.obj \ - $(SLO)$/labprt.obj \ - $(SLO)$/labimg.obj \ - $(SLO)$/mailmrge.obj \ - $(SLO)$/syncbtn.obj - -EXCEPTIONSFILES= \ - $(SLO)$/labelexp.obj \ - $(SLO)$/mailmrge.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/envimg.obj \ - $(SLO)$/labelcfg.obj \ - $(SLO)$/labimg.obj \ - $(SLO)$/syncbtn.obj -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/fldui/makefile.mk b/sw/source/ui/fldui/makefile.mk deleted file mode 100644 index ee9dbff9cf..0000000000 --- a/sw/source/ui/fldui/makefile.mk +++ /dev/null @@ -1,94 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. -LIBTARGET=no -PRJNAME=sw -TARGET=fldui - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - changedb.src \ - DropDownFieldDialog.src\ - flddb.src \ - flddinf.src \ - flddok.src \ - fldfunc.src \ - fldref.src \ - fldtdlg.src \ - fldui.src \ - fldvar.src \ - javaedit.src \ - inpdlg.src - -SLOFILES = \ - $(SLO)$/changedb.obj \ - $(SLO)$/DropDownFieldDialog.obj \ - $(SLO)$/flddb.obj \ - $(SLO)$/flddinf.obj \ - $(SLO)$/flddok.obj \ - $(SLO)$/fldedt.obj \ - $(SLO)$/fldfunc.obj \ - $(SLO)$/fldmgr.obj \ - $(SLO)$/fldpage.obj \ - $(SLO)$/fldref.obj \ - $(SLO)$/fldtdlg.obj \ - $(SLO)$/fldvar.obj \ - $(SLO)$/javaedit.obj \ - $(SLO)$/inpdlg.obj \ - $(SLO)$/fldwrap.obj \ - $(SLO)$/xfldui.obj \ - $(SLO)$/FldRefTreeListBox.obj - - -EXCEPTIONSFILES = \ - $(SLO)$/fldtdlg.obj \ - $(SLO)$/fldedt.obj \ - $(SLO)$/flddinf.obj \ - $(SLO)$/xfldui.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/fldmgr.obj \ - $(SLO)$/fldwrap.obj \ - $(SLO)$/xfldui.obj - -# $(SLO)$/DropDownFieldDialog.obj \ - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/fmtui/makefile.mk b/sw/source/ui/fmtui/makefile.mk deleted file mode 100644 index 37ad48df00..0000000000 --- a/sw/source/ui/fmtui/makefile.mk +++ /dev/null @@ -1,51 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=fmtui -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - tmpdlg.src - -SLOFILES = \ - $(SLO)$/tmpdlg.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/frmdlg/makefile.mk b/sw/source/ui/frmdlg/makefile.mk deleted file mode 100644 index a7addb0b94..0000000000 --- a/sw/source/ui/frmdlg/makefile.mk +++ /dev/null @@ -1,79 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=frmdlg -LIBTARGET=no - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - column.src \ - cption.src \ - frmpage.src \ - frmui.src \ - wrap.src - -SLOFILES = \ - $(SLO)$/colmgr.obj \ - $(SLO)$/column.obj \ - $(SLO)$/colex.obj \ - $(SLO)$/cption.obj \ - $(SLO)$/frmdlg.obj \ - $(SLO)$/frmmgr.obj \ - $(SLO)$/frmpage.obj \ - $(SLO)$/pattern.obj \ - $(SLO)$/uiborder.obj \ - $(SLO)$/wrap.obj - -EXCEPTIONSFILES = \ - $(SLO)$/frmpage.obj \ - $(SLO)$/cption.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/colmgr.obj \ - $(SLO)$/colex.obj \ - $(SLO)$/frmmgr.obj - - - - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/globdoc/makefile.mk b/sw/source/ui/globdoc/makefile.mk deleted file mode 100644 index d75eb7af88..0000000000 --- a/sw/source/ui/globdoc/makefile.mk +++ /dev/null @@ -1,51 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=globdoc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - globdoc.src - -SLOFILES = \ - $(SLO)$/globdoc.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/inc/makefile.mk b/sw/source/ui/inc/makefile.mk deleted file mode 100644 index cb9b968dcc..0000000000 --- a/sw/source/ui/inc/makefile.mk +++ /dev/null @@ -1,42 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=uiinc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -LOCALIZE_ME=swmn_tmpl.hrc toolbox_tmpl.hrc - -.INCLUDE : target.mk - diff --git a/sw/source/ui/index/makefile.mk b/sw/source/ui/index/makefile.mk deleted file mode 100644 index 647b579e53..0000000000 --- a/sw/source/ui/index/makefile.mk +++ /dev/null @@ -1,68 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=index -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - cnttab.src \ - idxmrk.src \ - multmrk.src - -EXCEPTIONSFILES = \ - $(SLO)$/cnttab.obj \ - $(SLO)$/cntex.obj - -SLOFILES = \ - $(SLO)$/cnttab.obj \ - $(SLO)$/cntex.obj \ - $(SLO)$/idxmrk.obj \ - $(SLO)$/swuiidxmrk.obj \ - $(SLO)$/multmrk.obj \ - $(SLO)$/toxmgr.obj - -LIB1TARGET= $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/idxmrk.obj \ - $(SLO)$/toxmgr.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/lingu/makefile.mk b/sw/source/ui/lingu/makefile.mk deleted file mode 100644 index 617910a610..0000000000 --- a/sw/source/ui/lingu/makefile.mk +++ /dev/null @@ -1,56 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=lingu - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/olmenu.obj \ - -SLOFILES = \ - $(SLO)$/hyp.obj \ - $(SLO)$/olmenu.obj \ - $(SLO)$/sdrhhcwrap.obj \ - $(SLO)$/hhcwrp.obj - -SRS1NAME=$(TARGET) -SRC1FILES = \ - olmenu.src - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/makefile.mk b/sw/source/ui/makefile.mk deleted file mode 100644 index b331a2a007..0000000000 --- a/sw/source/ui/makefile.mk +++ /dev/null @@ -1,101 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sw -TARGET=ui - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(GUI)" != "OS2" -.IF "$(GUI)" != "WNT" -.IF "$(COM)" != "BLC" -.IF "$(COM)" != "WTC" -LIBFLAGS=/NOI /NOE /PAGE:256 -.ENDIF -.ENDIF -.ENDIF -.ENDIF - -# --- Files -------------------------------------------------------- - -# andere Label als Verzeichnisnamen fuer VC++/NT - -SUBLIBS1= \ - $(SLB)$/app.lib \ - $(SLB)$/cctrl.lib \ - $(SLB)$/chrdlg.lib \ - $(SLB)$/config.lib \ - $(SLB)$/dbui.lib \ - $(SLB)$/dialog.lib \ - $(SLB)$/dochdl.lib \ - $(SLB)$/docvw.lib \ - $(SLB)$/envelp.lib \ - $(SLB)$/fldui.lib \ - $(SLB)$/frmdlg.lib \ - $(SLB)$/globdoc.lib - -SUBLIBS2= \ - $(SLB)$/index.lib \ - $(SLB)$/lingu.lib \ - $(SLB)$/misc.lib \ - $(SLB)$/ribbar.lib \ - $(SLB)$/shells.lib \ - $(SLB)$/smartmenu.lib \ - $(SLB)$/table.lib \ - $(SLB)$/unoidl.lib \ - $(SLB)$/utlui.lib \ - $(SLB)$/web.lib \ - $(SLB)$/uiview.lib \ - $(SLB)$/wrtsh.lib - -# ----------------------------------------------------------- - -################################################################ - -LIB1TARGET=$(SLB)$/ui1.lib -LIB1FILES= \ - $(SUBLIBS1) - -LIB2TARGET=$(SLB)$/ui2.lib -LIB2FILES= \ - $(SUBLIBS2) - -.INCLUDE : target.mk - -################################################################ - -kill: - @$(RM) $(SLB)$/ui.lst - @$(RM) $(SLB)$/ui.lib - - diff --git a/sw/source/ui/misc/makefile.mk b/sw/source/ui/misc/makefile.mk deleted file mode 100644 index 72d9f80aec..0000000000 --- a/sw/source/ui/misc/makefile.mk +++ /dev/null @@ -1,96 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=misc -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES=\ - bookmark.src \ - docfnote.src \ - glossary.src \ - glosbib.src \ - insfnote.src \ - insrule.src \ - linenum.src \ - num.src \ - numberingtypelistbox.src \ - outline.src \ - pgfnote.src \ - pggrid.src \ - redlndlg.src \ - srtdlg.src - -EXCEPTIONSFILES = \ - $(SLO)$/glossary.obj \ - $(SLO)$/glosdoc.obj \ - $(SLO)$/glshell.obj \ - $(SLO)$/numberingtypelistbox.obj \ - $(SLO)$/outline.obj \ - $(SLO)$/redlndlg.obj - - -SLOFILES = \ - $(SLO)$/bookmark.obj \ - $(SLO)$/docfnote.obj \ - $(SLO)$/glosbib.obj \ - $(SLO)$/glosdoc.obj \ - $(SLO)$/glossary.obj \ - $(SLO)$/glshell.obj \ - $(SLO)$/insfnote.obj \ - $(SLO)$/insrule.obj \ - $(SLO)$/linenum.obj \ - $(SLO)$/num.obj \ - $(SLO)$/numberingtypelistbox.obj \ - $(SLO)$/outline.obj \ - $(SLO)$/pgfnote.obj \ - $(SLO)$/pggrid.obj \ - $(SLO)$/redlndlg.obj \ - $(SLO)$/swmodalredlineacceptdlg.obj \ - $(SLO)$/srtdlg.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/glosdoc.obj \ - $(SLO)$/glshell.obj \ - $(SLO)$/numberingtypelistbox.obj \ - $(SLO)$/redlndlg.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/ribbar/makefile.mk b/sw/source/ui/ribbar/makefile.mk deleted file mode 100644 index 2adb59eec1..0000000000 --- a/sw/source/ui/ribbar/makefile.mk +++ /dev/null @@ -1,70 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=ribbar - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - tbxanchr.src \ - inputwin.src \ - workctrl.src - -EXCEPTIONSFILES = \ - $(SLO)$/tblctrl.obj \ - $(SLO)$/tbxanchr.obj \ - $(SLO)$/workctrl.obj - -SLOFILES = \ - $(SLO)$/inputwin.obj \ - $(SLO)$/tbxanchr.obj \ - $(SLO)$/conrect.obj \ - $(SLO)$/conform.obj \ - $(SLO)$/conpoly.obj \ - $(SLO)$/conarc.obj \ - $(SLO)$/concustomshape.obj \ - $(SLO)$/dselect.obj \ - $(SLO)$/drawbase.obj \ - $(SLO)$/tblctrl.obj \ - $(SLO)$/workctrl.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(SRS)$/ribbar.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk deleted file mode 100644 index dce62a2c93..0000000000 --- a/sw/source/ui/shells/makefile.mk +++ /dev/null @@ -1,94 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=shells - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - shells.src - -SLOFILES = \ - $(SLO)$/langhelper.obj \ - $(SLO)$/annotsh.obj \ - $(SLO)$/basesh.obj \ - $(SLO)$/beziersh.obj \ - $(SLO)$/drawdlg.obj \ - $(SLO)$/drawsh.obj \ - $(SLO)$/drformsh.obj \ - $(SLO)$/drwbassh.obj \ - $(SLO)$/drwtxtex.obj \ - $(SLO)$/drwtxtsh.obj \ - $(SLO)$/frmsh.obj \ - $(SLO)$/grfsh.obj \ - $(SLO)$/grfshex.obj \ - $(SLO)$/mediash.obj \ - $(SLO)$/listsh.obj \ - $(SLO)$/olesh.obj \ - $(SLO)$/slotadd.obj \ - $(SLO)$/tabsh.obj \ - $(SLO)$/textdrw.obj \ - $(SLO)$/textfld.obj \ - $(SLO)$/textglos.obj \ - $(SLO)$/textidx.obj \ - $(SLO)$/textsh.obj \ - $(SLO)$/textsh1.obj \ - $(SLO)$/textsh2.obj \ - $(SLO)$/txtattr.obj \ - $(SLO)$/txtcrsr.obj \ - $(SLO)$/txtnum.obj - -EXCEPTIONSFILES = \ - $(SLO)$/basesh.obj \ - $(SLO)$/annotsh.obj \ - $(SLO)$/drwtxtsh.obj \ - $(SLO)$/textsh.obj \ - $(SLO)$/textsh2.obj \ - $(SLO)$/grfshex.obj \ - $(SLO)$/drawsh.obj \ - $(SLO)$/drwtxtsh.obj \ - $(SLO)$/frmsh.obj \ - $(SLO)$/drwtxtex.obj \ - $(SLO)$/slotadd.obj \ - $(SLO)$/textsh1.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(SRS)$/shells.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - diff --git a/sw/source/ui/smartmenu/makefile.mk b/sw/source/ui/smartmenu/makefile.mk deleted file mode 100644 index 1950430cf3..0000000000 --- a/sw/source/ui/smartmenu/makefile.mk +++ /dev/null @@ -1,53 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=smartmenu - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES = \ - $(SLO)$/stmenu.obj - -SLOFILES = \ - $(SLO)$/stmenu.obj - -SRS1NAME=$(TARGET) -SRC1FILES = \ - stmenu.src - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/table/makefile.mk b/sw/source/ui/table/makefile.mk deleted file mode 100644 index 8b2ba850d1..0000000000 --- a/sw/source/ui/table/makefile.mk +++ /dev/null @@ -1,81 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=table -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/chartins.obj\ - -SRS1NAME=$(TARGET) -SRC1FILES = \ - colwd.src \ - convert.src \ - chartins.src \ - instable.src \ - mergetbl.src \ - rowht.src \ - splittbl.src \ - table.src \ - tabledlg.src \ - tautofmt.src - -SLOFILES = \ - $(SLO)$/colwd.obj \ - $(SLO)$/convert.obj \ - $(SLO)$/chartins.obj \ - $(SLO)$/instable.obj \ - $(SLO)$/mergetbl.obj \ - $(SLO)$/rowht.obj \ - $(SLO)$/splittbl.obj \ - $(SLO)$/tabledlg.obj \ - $(SLO)$/tablemgr.obj \ - $(SLO)$/swtablerep.obj \ - $(SLO)$/tautofmt.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/chartins.obj \ - $(SLO)$/swtablerep.obj \ - $(SLO)$/tablemgr.obj - - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/uiview/makefile.mk b/sw/source/ui/uiview/makefile.mk deleted file mode 100644 index 337ee85da5..0000000000 --- a/sw/source/ui/uiview/makefile.mk +++ /dev/null @@ -1,90 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=uiview - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - view.src \ - pview.src - -EXCEPTIONSFILES= \ - $(SLO)$/formatclipboard.obj \ - $(SLO)$/srcview.obj \ - $(SLO)$/swcli.obj \ - $(SLO)$/uivwimp.obj \ - $(SLO)$/view.obj \ - $(SLO)$/view0.obj \ - $(SLO)$/view1.obj \ - $(SLO)$/view2.obj \ - $(SLO)$/viewdraw.obj \ - $(SLO)$/viewport.obj \ - $(SLO)$/viewprt.obj \ - $(SLO)$/viewsrch.obj \ - $(SLO)$/viewling.obj \ - $(SLO)$/viewmdi.obj \ - -SLOFILES = \ - $(SLO)$/view0.obj \ - $(SLO)$/view.obj \ - $(SLO)$/view1.obj \ - $(SLO)$/view2.obj \ - $(SLO)$/viewcoll.obj \ - $(SLO)$/viewdlg2.obj \ - $(SLO)$/viewdlg.obj \ - $(SLO)$/viewdraw.obj \ - $(SLO)$/viewling.obj \ - $(SLO)$/viewmdi.obj \ - $(SLO)$/pview.obj \ - $(SLO)$/viewport.obj \ - $(SLO)$/viewstat.obj \ - $(SLO)$/viewtab.obj \ - $(SLO)$/viewprt.obj \ - $(SLO)$/viewsrch.obj \ - $(SLO)$/scroll.obj \ - $(SLO)$/swcli.obj \ - $(SLO)$/srcview.obj \ - $(SLO)$/uivwimp.obj \ - $(SLO)$/formatclipboard.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(SRS)$/uiview.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - diff --git a/sw/source/ui/uno/makefile.mk b/sw/source/ui/uno/makefile.mk deleted file mode 100644 index ac4b6dde69..0000000000 --- a/sw/source/ui/uno/makefile.mk +++ /dev/null @@ -1,81 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=unoidl -ENABLE_EXCEPTIONS=TRUE -LIBTARGET=no - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(DVO_XFORMS)" != "" -CDEFS+=-DDVO_XFORMS -.ENDIF - -# --- Files -------------------------------------------------------- - -SLO1FILES = \ - $(SLO)$/unodefaults.obj\ - $(SLO)$/unodispatch.obj\ - $(SLO)$/unotxdoc.obj\ - $(SLO)$/unoatxt.obj \ - $(SLO)$/unomailmerge.obj \ - $(SLO)$/unomod.obj \ - $(SLO)$/unotxvw.obj \ - $(SLO)$/dlelstnr.obj \ - $(SLO)$/unofreg.obj \ - $(SLO)$/SwXDocumentSettings.obj \ - $(SLO)$/SwXFilterOptions.obj\ - $(SLO)$/RefreshListenerContainer.obj \ - $(SLO)$/unomodule.obj \ - $(SLO)$/unodoc.obj - -SLO2FILES = \ - $(SLO)$/swdetect.obj \ - $(SLO)$/swdet2.obj \ - $(SLO)$/detreg.obj - -SLOFILES = \ - $(SLO1FILES) \ - $(SLO2FILES) - -LIB1TARGET = \ - $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO1FILES) - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/utlui/makefile.mk b/sw/source/ui/utlui/makefile.mk deleted file mode 100644 index cded61eee3..0000000000 --- a/sw/source/ui/utlui/makefile.mk +++ /dev/null @@ -1,79 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=utlui - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - - -SRS1NAME=$(TARGET) -SRC1FILES = \ - initui.src \ - gloslst.src \ - navipi.src \ - poolfmt.src \ - attrdesc.src \ - unotools.src \ - utlui.src - -EXCEPTIONSFILES= \ - $(SLO)$/bookctrl.obj \ - $(SLO)$/glbltree.obj \ - $(SLO)$/navipi.obj \ - $(SLO)$/unotools.obj \ - $(SLO)$/content.obj \ - $(SLO)$/swrenamexnameddlg.obj - -SLOFILES = $(EXCEPTIONSFILES) \ - $(SLO)$/condedit.obj \ - $(SLO)$/gloslst.obj \ - $(SLO)$/initui.obj \ - $(SLO)$/navicfg.obj \ - $(SLO)$/numfmtlb.obj \ - $(SLO)$/prcntfld.obj \ - $(SLO)$/textcontrolcombo.obj \ - $(SLO)$/tmplctrl.obj \ - $(SLO)$/uitool.obj \ - $(SLO)$/uiitems.obj \ - $(SLO)$/attrdesc.obj \ - $(SLO)$/shdwcrsr.obj \ - $(SLO)$/zoomctrl.obj \ - $(SLO)$/viewlayoutctrl.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/vba/makefile.mk b/sw/source/ui/vba/makefile.mk deleted file mode 100644 index 9c2b40d1a9..0000000000 --- a/sw/source/ui/vba/makefile.mk +++ /dev/null @@ -1,99 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=vbaswobj -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -DLLPRE = - -.IF "$(ENABLE_VBA)"!="YES" -dummy: - @echo "not building vba..." -.ENDIF - -INCPRE=$(INCCOM)$/$(TARGET) -CDEFS+=-DVBA_OOBUILD_HACK -# ------------------------------------------------------------------ - -SLOFILES= \ - $(SLO)$/vbaglobals.obj \ - $(SLO)$/vbaapplication.obj \ - $(SLO)$/vbadocument.obj \ - $(SLO)$/vbawindow.obj \ - $(SLO)$/vbasystem.obj \ - $(SLO)$/vbarangehelper.obj \ - $(SLO)$/vbarange.obj \ - $(SLO)$/vbabookmark.obj \ - $(SLO)$/vbabookmarks.obj \ - $(SLO)$/vbavariable.obj \ - $(SLO)$/vbavariables.obj \ - $(SLO)$/vbaview.obj \ - $(SLO)$/wordvbahelper.obj \ - $(SLO)$/service.obj \ - $(SLO)$/vbadocumentproperties.obj \ - $(SLO)$/vbapane.obj \ - $(SLO)$/vbapanes.obj \ - $(SLO)$/vbaoptions.obj \ - $(SLO)$/vbaselection.obj \ - $(SLO)$/vbatemplate.obj \ - $(SLO)$/vbaparagraphformat.obj \ - $(SLO)$/vbaautotextentry.obj \ - $(SLO)$/vbaparagraph.obj \ - $(SLO)$/vbafind.obj \ - $(SLO)$/vbareplacement.obj \ - $(SLO)$/vbastyle.obj \ - $(SLO)$/vbastyles.obj \ - $(SLO)$/vbafont.obj \ - $(SLO)$/vbapalette.obj \ - $(SLO)$/vbainformationhelper.obj \ - $(SLO)$/vbatable.obj \ - $(SLO)$/vbatables.obj \ - $(SLO)$/vbafield.obj \ - $(SLO)$/vbaborders.obj \ - $(SLO)$/vbadocuments.obj \ - $(SLO)$/vbaheaderfooter.obj \ - $(SLO)$/vbaheaderfooterhelper.obj \ - $(SLO)$/vbaaddin.obj \ - $(SLO)$/vbaaddins.obj \ - $(SLO)$/vbadialogs.obj \ - $(SLO)$/vbadialog.obj \ - $(SLO)$/vbawrapformat.obj \ - $(SLO)$/vbapagesetup.obj \ - $(SLO)$/vbasection.obj \ - $(SLO)$/vbasections.obj \ - $(SLO)$/vbaeventshelper.obj \ - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/sw/source/ui/web/makefile.mk b/sw/source/ui/web/makefile.mk deleted file mode 100644 index 2b1eb7590b..0000000000 --- a/sw/source/ui/web/makefile.mk +++ /dev/null @@ -1,59 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=web - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - web.src - -SLOFILES = \ - $(SLO)$/wformsh.obj \ - $(SLO)$/wgrfsh.obj \ - $(SLO)$/wlistsh.obj \ - $(SLO)$/wolesh.obj \ - $(SLO)$/wtabsh.obj \ - $(SLO)$/wfrmsh.obj \ - $(SLO)$/wtextsh.obj \ - $(SLO)$/wdocsh.obj \ - $(SLO)$/wview.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/wrtsh/makefile.mk b/sw/source/ui/wrtsh/makefile.mk deleted file mode 100644 index baeb3acd25..0000000000 --- a/sw/source/ui/wrtsh/makefile.mk +++ /dev/null @@ -1,62 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=wrtsh - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - wrtsh.src - -SLOFILES = \ - $(SLO)$/move.obj \ - $(SLO)$/select.obj \ - $(SLO)$/wrtsh1.obj \ - $(SLO)$/wrtsh2.obj \ - $(SLO)$/wrtsh3.obj \ - $(SLO)$/wrtsh4.obj \ - $(SLO)$/delete.obj \ - $(SLO)$/wrtundo.obj - -EXCEPTIONSFILES = \ - $(SLO)$/wrtsh1.obj \ - $(SLO)$/wrtsh2.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/uiconfig/layout/makefile.mk b/sw/uiconfig/layout/makefile.mk deleted file mode 100644 index 9437db7a00..0000000000 --- a/sw/uiconfig/layout/makefile.mk +++ /dev/null @@ -1,46 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=../.. -PRJNAME=sw -TARGET=layout - -.INCLUDE : settings.mk - -.IF "$(ENABLE_LAYOUT)" == "TRUE" - -all: ALLTAR - -XML_FILES=wordcount.xml - -.INCLUDE : layout.mk - -.ELSE # ENABLE_LAYOUT != TRUE -all .PHONY: -.ENDIF # ENABLE_LAYOUT != TRUE - -.INCLUDE : target.mk diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk deleted file mode 100644 index 0163270b05..0000000000 --- a/sw/util/makefile.mk +++ /dev/null @@ -1,394 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=sw -TARGET=sw -GEN_HID=TRUE -GEN_HID_OTHER=TRUE -USE_DEFFILE=TRUE - -# --- Settings ------------------------------------------------------------ - -.INCLUDE : settings.mk - -# --- Allgemein ----------------------------------------------------------- - -sw_res_files= \ - $(SRS)$/app.srs \ - $(SRS)$/dialog.srs \ - $(SRS)$/chrdlg.srs \ - $(SRS)$/config.srs \ - $(SRS)$/dbui.srs \ - $(SRS)$/dochdl.srs \ - $(SRS)$/docvw.srs \ - $(SRS)$/envelp.srs \ - $(SRS)$/fldui.srs \ - $(SRS)$/fmtui.srs \ - $(SRS)$/frmdlg.srs \ - $(SRS)$/globdoc.srs \ - $(SRS)$/index.srs \ - $(SRS)$/lingu.srs \ - $(SRS)$/misc.srs \ - $(SRS)$/ribbar.srs \ - $(SRS)$/shells.srs \ - $(SRS)$/smartmenu.srs \ - $(SRS)$/table.srs \ - $(SRS)$/uiview.srs \ - $(SRS)$/undo.srs \ - $(SRS)$/unocore.srs \ - $(SRS)$/utlui.srs \ - $(SRS)$/web.srs \ - $(SRS)$/wrtsh.srs - -RESLIB1NAME=sw -RESLIB1IMAGES=$(PRJ)$/imglst $(PRJ)$/res -RESLIB1SRSFILES= \ - $(sw_res_files) - -SWLIBFILES = \ - $(SLB)$/core1.lib \ - $(SLB)$/core2.lib \ - $(SLB)$/core3.lib \ - $(SLB)$/core4.lib \ - $(SLB)$/filter.lib \ - $(SLB)$/ui1.lib \ - $(SLB)$/ui2.lib - -SHL1TARGET= $(TARGET)$(DLLPOSTFIX) -SHL1USE_EXPORTS=name -SHL1IMPLIB= _$(TARGET) -SHL1LIBS= $(SLB)$/swall.lib $(SWLIBFILES) - -LIB1TARGET =$(SLB)$/swall.lib - -LIB1OBJFILES= $(OUT)$/slo$/swmodule.obj \ - $(OUT)$/slo$/swdll.obj - -# dynamic libraries -SHL1STDLIBS+= \ - $(LNGLIB) \ - $(SVXCORELIB) \ - $(EDITENGLIB) \ - $(SVXLIB) \ - $(SFXLIB) \ - $(XMLOFFLIB) \ - $(BASICLIB) \ - $(BASEGFXLIB) \ - $(DRAWINGLAYERLIB) \ - $(SVTOOLLIB) \ - $(TKLIB) \ - $(VCLLIB) \ - $(SVLLIB) \ - $(SOTLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(I18NISOLANGLIB) \ - $(COMPHELPERLIB) \ - $(UCBHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(VOSLIB) \ - $(SALLIB) \ - $(SALHELPERLIB) \ - $(ICUUCLIB) \ - $(I18NUTILLIB) \ - $(AVMEDIALIB) - -.IF "$(GUI)"=="WNT" -SHL1STDLIBS+= $(ADVAPI32LIB) -.ENDIF # WNT - - -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -SHL1BASE= 0x1e000000 -DEF1NAME =$(SHL1TARGET) -DEFLIB1NAME=swall $(SWLIBFILES:b) - -SHL2TARGET= swd$(DLLPOSTFIX) -SHL2IMPLIB= swdimp -SHL2VERSIONMAP=$(SOLARENV)/src/component.map -SHL2DEF=$(MISC)$/$(SHL2TARGET).def -DEF2NAME= $(SHL2TARGET) - -SHL2STDLIBS= \ - $(SFX2LIB) \ - $(SVTOOLLIB) \ - $(UNOTOOLSLIB) \ - $(SVLLIB) \ - $(VCLLIB) \ - $(SOTLIB) \ - $(TOOLSLIB) \ - $(UCBHELPERLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -SHL2OBJS= $(SLO)$/swdetect.obj \ - $(SLO)$/swdet2.obj \ - $(SLO)$/detreg.obj \ - $(SLO)$/iodetect.obj - -.IF "$(dbgutil)"!="" -SHL2OBJS+= \ - $(SLO)$/errhdl.obj -.ENDIF - -SHL2DEPN+= makefile.mk - -# add for swui -SHL3TARGET= swui$(DLLPOSTFIX) -SHL3IMPLIB= swuiimp -SHL3VERSIONMAP= swui.map -SHL3DEF=$(MISC)$/$(SHL3TARGET).def -SHL3DEPN=$(SHL1TARGETN) -DEF3NAME= $(SHL3TARGET) - -SHL3STDLIBS= \ - $(ISWLIB) \ - $(SVXCORELIB) \ - $(EDITENGLIB) \ - $(SVXLIB) \ - $(SFX2LIB) \ - $(SVTOOLLIB) \ - $(TKLIB) \ - $(VCLLIB) \ - $(SOTLIB) \ - $(SVLLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(I18NISOLANGLIB) \ - $(COMPHELPERLIB) \ - $(UCBHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) \ - $(SOTLIB) - -SHL3LIBS= $(SLB)$/swui.lib -LIB3TARGET = $(SLB)$/swui.lib - -LIB3OBJFILES = \ - $(SLO)$/swuiexp.obj \ - $(SLO)$/SwRewriter.obj \ - $(SLO)$/swdlgfact.obj \ - $(SLO)$/addrdlg.obj \ - $(SLO)$/ascfldlg.obj \ - $(SLO)$/break.obj \ - $(SLO)$/bookmark.obj \ - $(SLO)$/changedb.obj \ - $(SLO)$/chardlg.obj \ - $(SLO)$/convert.obj \ - $(SLO)$/cption.obj \ - $(SLO)$/dbinsdlg.obj \ - $(SLO)$/docfnote.obj \ - $(SLO)$/docstdlg.obj \ - $(SLO)$/envlop1.obj \ - $(SLO)$/envfmt.obj \ - $(SLO)$/envprt.obj \ - $(SLO)$/label1.obj \ - $(SLO)$/labfmt.obj \ - $(SLO)$/labelexp.obj \ - $(SLO)$/labprt.obj \ - $(SLO)$/drpcps.obj \ - $(SLO)$/pardlg.obj \ - $(SLO)$/pattern.obj \ - $(SLO)$/pggrid.obj \ - $(SLO)$/pgfnote.obj \ - $(SLO)$/rowht.obj \ - $(SLO)$/selglos.obj \ - $(SLO)$/splittbl.obj \ - $(SLO)$/srtdlg.obj \ - $(SLO)$/tautofmt.obj \ - $(SLO)$/tblnumfm.obj \ - $(SLO)$/uiborder.obj \ - $(SLO)$/wrap.obj \ - $(SLO)$/colwd.obj \ - $(SLO)$/tabledlg.obj \ - $(SLO)$/fldtdlg.obj \ - $(SLO)$/fldedt.obj \ - $(SLO)$/fldpage.obj \ - $(SLO)$/flddb.obj \ - $(SLO)$/flddinf.obj \ - $(SLO)$/flddok.obj \ - $(SLO)$/fldfunc.obj \ - $(SLO)$/fldref.obj \ - $(SLO)$/FldRefTreeListBox.obj \ - $(SLO)$/fldvar.obj \ - $(SLO)$/swrenamexnameddlg.obj \ - $(SLO)$/swmodalredlineacceptdlg.obj \ - $(SLO)$/abstract.obj \ - $(SLO)$/frmdlg.obj \ - $(SLO)$/tmpdlg.obj \ - $(SLO)$/frmpage.obj \ - $(SLO)$/glosbib.obj \ - $(SLO)$/glossary.obj \ - $(SLO)$/inpdlg.obj \ - $(SLO)$/insfnote.obj \ - $(SLO)$/instable.obj \ - $(SLO)$/insrule.obj \ - $(SLO)$/javaedit.obj \ - $(SLO)$/linenum.obj \ - $(SLO)$/mailmrge.obj \ - $(SLO)$/multmrk.obj \ - $(SLO)$/mergetbl.obj \ - $(SLO)$/outline.obj \ - $(SLO)$/num.obj \ - $(SLO)$/column.obj \ - $(SLO)$/cnttab.obj \ - $(SLO)$/cntex.obj \ - $(SLO)$/uiregionsw.obj \ - $(SLO)$/optload.obj \ - $(SLO)$/optcomp.obj \ - $(SLO)$/optpage.obj \ - $(SLO)$/swuiccoll.obj \ - $(SLO)$/numpara.obj \ - $(SLO)$/swdialmgr.obj \ - $(SLO)$/swuiidxmrk.obj \ - $(SLO)$/DropDownFieldDialog.obj \ - $(SLO)$/macassgn.obj \ - $(SLO)$/wordcountdialog.obj \ - $(SLO)$/mailconfigpage.obj \ - $(SLO)$/addresslistdialog.obj \ - $(SLO)$/createaddresslistdialog.obj \ - $(SLO)$/customizeaddresslistdialog.obj \ - $(SLO)$/dbtablepreviewdialog.obj \ - $(SLO)$/mailmergewizard.obj \ - $(SLO)$/mmdocselectpage.obj \ - $(SLO)$/mmlayoutpage.obj \ - $(SLO)$/mmoutputpage.obj \ - $(SLO)$/mmoutputtypepage.obj \ - $(SLO)$/mmaddressblockpage.obj \ - $(SLO)$/mmgreetingspage.obj \ - $(SLO)$/mmmergepage.obj \ - $(SLO)$/mmpreparemergepage.obj \ - $(SLO)$/selectdbtabledialog.obj - -.IF "$(GUI)$(COM)" == "WNTMSC" -.IF "$(ENABLE_PCH)" != "" && ( "$(PRJNAME)"!="sw" || "$(BUILD_SPECIAL)"!="TRUE" ) -#target sw -SHL1OBJS += $(SLO)$/pchname.obj \ - $(SLO)$/pchname_ex.obj -#target swd -SHL2OBJS += $(SLO)$/pchname.obj \ - $(SLO)$/pchname_ex.obj -#target swui -SHL3OBJS += $(SLO)$/pchname.obj \ - $(SLO)$/pchname_ex.obj -.ENDIF # "$(ENABLE_PCH)" != "" -.ENDIF # "$(GUI)$(COM)" == "WNTMSC" - -SHL4TARGET=msword$(DLLPOSTFIX) -SHL4VERSIONMAP=msword.map -SHL4LIBS=$(SLB)$/rtf.lib $(SLB)$/ww8.lib -SHL4DEPN=$(SHL1TARGETN) -SHL4DEF=$(MISC)$/$(SHL4TARGET).def -DEF4NAME=$(SHL4TARGET) - -SHL4STDLIBS= \ - $(ISWLIB) \ - $(SVXCORELIB) \ - $(EDITENGLIB) \ - $(MSFILTERLIB) \ - $(SFXLIB) \ - $(BASEGFXLIB) \ - $(SVTOOLLIB) \ - $(TKLIB) \ - $(VCLLIB) \ - $(SVLLIB) \ - $(SOTLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(I18NISOLANGLIB) \ - $(COMPHELPERLIB) \ - $(UCBHELPERLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALLIB) \ - $(ICUUCLIB) \ - $(BASICLIB) \ - $(I18NUTILLIB) - -.IF "$(ENABLE_VBA)" == "YES" -#target vba -TARGET_VBA=vbaswobj -SHL5TARGET=$(TARGET_VBA)$(DLLPOSTFIX).uno -SHL5IMPLIB= i$(TARGET_VBA) - -SHL5VERSIONMAP=$(SOLARENV)/src/component.map -SHL5DEF=$(MISC)$/$(SHL5TARGET).def -DEF5NAME=$(SHL5TARGET) -SHL5STDLIBS= \ - $(ISWLIB) \ - $(CPPUHELPERLIB) \ - $(VCLLIB) \ - $(CPPULIB) \ - $(COMPHELPERLIB) \ - $(SVLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(SALLIB)\ - $(VBAHELPERLIB) \ - $(BASICLIB) \ - $(SFXLIB) \ - $(SVXLIB) \ - $(SVTOOLLIB) \ - $(SVLLIB) \ - $(VCLLIB) \ - $(TKLIB) \ - $(I18NISOLANGLIB) \ - $(EDITENGLIB) \ - $(SVXCORELIB) \ - $(MSFILTERLIB) - -SHL5DEPN=$(SHL1TARGETN) -SHL5LIBS=$(SLB)$/$(TARGET_VBA).lib -.ENDIF # .IF "$(ENABLE_VBA)" == "YES" - -.INCLUDE : target.mk - -ALLTAR : $(MISC)/sw.component $(MISC)/swd.component $(MISC)/vbaswobj.component - -$(MISC)/sw.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - sw.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt sw.component - -$(MISC)/swd.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - swd.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt swd.component - -$(MISC)/vbaswobj.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - vbaswobj.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL5TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt vbaswobj.component -- cgit v1.2.3 From de17cc85bd95ddd48c566dda481b11a9f85ccacf Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 22 Nov 2010 11:50:12 +0100 Subject: vcl117: fix SLOFILES --- sw/source/ui/dialog/makefile.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'sw/source') diff --git a/sw/source/ui/dialog/makefile.mk b/sw/source/ui/dialog/makefile.mk index 5d4685ffb9..860cfed040 100644 --- a/sw/source/ui/dialog/makefile.mk +++ b/sw/source/ui/dialog/makefile.mk @@ -56,6 +56,7 @@ EXCEPTIONSFILES = \ SLOFILES = \ $(SLO)$/abstract.obj \ $(SLO)$/addrdlg.obj \ + $(SLO)$/ascfldlg.obj \ $(SLO)$/docstdlg.obj \ $(SLO)$/macassgn.obj \ $(SLO)$/SwSpellDialogChildWindow.obj \ -- cgit v1.2.3 From 67eafadf0d53917412c1e397371fbdc57b09483f Mon Sep 17 00:00:00 2001 From: os Date: Mon, 22 Nov 2010 16:46:59 +0100 Subject: #b7001883# exit if sprm array is invalid --- sw/source/filter/ww8/ww8par.cxx | 9 ++++++++- sw/source/filter/ww8/ww8scan.cxx | 17 +++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 04341abb38..016a9c848e 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4919,7 +4919,14 @@ ULONG WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const St } SwWW8ImplReader* pRdr = new SwWW8ImplReader(nVersion, pStg, pIn, rDoc, rBaseURL, bNew); - nRet = pRdr->LoadDoc( rPam ); + try + { + nRet = pRdr->LoadDoc( rPam ); + } + catch( const std::exception& ) + { + nRet = ERR_WW8_NO_WW8_FILE_ERR; + } delete pRdr; if( refStrm.Is() ) diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 36ef485a45..0784a182d5 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -892,11 +892,18 @@ void WW8SprmIter::SetSprms(const BYTE* pSprms_, long nLen_) const BYTE* WW8SprmIter::operator ++( int ) { - if (nRemLen > 0) + if (nRemLen > 0 ) { - pSprms += nAktSize; - nRemLen -= nAktSize; - UpdateMyMembers(); + if( nRemLen >= nAktSize ) + { + pSprms += nAktSize; + nRemLen -= nAktSize; + UpdateMyMembers(); + } + else + { + throw( ::std::exception() ); + } } return pSprms; } @@ -3247,6 +3254,8 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p) Otherwise our cool fastsave algorithm can be brought to bear on the problem. */ + if( !pPieceIter ) + return; ULONG nOldPos = pPieceIter->GetIdx(); bool bOk = pPieceIter->SeekPos(nOrigCp); pPieceIter->SetIdx( nOldPos ); -- cgit v1.2.3 From b32fe12a03fab682d32710beea0224887884a03f Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 23 Nov 2010 18:41:04 +0100 Subject: vcl117: removed obsolete header --- starmath/source/document.cxx | 2 +- starmath/source/math_pch.cxx | 833 -------------------------------------- sw/inc/modcfg.hxx | 2 +- sw/inc/swmodule.hxx | 2 +- sw/source/filter/xml/xmliteme.cxx | 2 +- sw/source/ui/inc/uitool.hxx | 2 +- sw/source/ui/inc/usrpref.hxx | 2 +- 7 files changed, 6 insertions(+), 839 deletions(-) delete mode 100644 starmath/source/math_pch.cxx (limited to 'sw/source') diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 94bd3e51e3..5b7bf49fed 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -76,7 +76,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/starmath/source/math_pch.cxx b/starmath/source/math_pch.cxx deleted file mode 100644 index 95eb42a8f4..0000000000 --- a/starmath/source/math_pch.cxx +++ /dev/null @@ -1,833 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_starmath.hxx" - -#define SMDLL 1 - -#include "starmath.hrc" - -#define ITEMID_FONT 1 -#define ITEMID_FONTHEIGHT 2 -#define ITEMID_LRSPACE 3 -#define ITEMID_WEIGHT 4 - -//--------- ab hier die "generierten" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef _SMART_COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTOR_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_FRAME_XDISPATCH_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_FRAME_XSTATUSLISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_FRAME_FEATURESTATEEVENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_FRAME_DISPATCHDESCRIPTOR_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_FRAME_XFRAMEACTIONLISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_FRAME_XFRAME_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_FRAME_FRAMEACTIONEVENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_FRAME_FRAMEACTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_UTIL_XURLTRANSFORMER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_TASK_XSTATUSINDICATORFACTORY_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_TASK_XSTATUSINDICATORSUPPLIER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_TASK_XSTATUSINDICATOR_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_FRAME_XBROWSEHISTORYREGISTRY_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_IO_BUFFERSIZEEXCEEDEDEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_IO_NOTCONNECTEDEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_IO_IOEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_IO_UNEXPECTEDEOFEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_IO_WRONGFORMATEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_SERVICENOTREGISTEREDEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_NULLPOINTEREXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_CLASSNOTFOUNDEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_NOSUCHMETHODEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_SECURITYEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_NOSUCHFIELDEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_ARRAYINDEXOUTOFBOUNDSEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_ILLEGALACCESSEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_INDEXOUTOFBOUNDSEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_NOSUPPORTEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_WRAPPEDTARGETEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_REFLECTION_PARAMINFO_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_REFLECTION_XIDLARRAY_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_REFLECTION_XIDLCLASSPROVIDER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_REFLECTION_FIELDACCESSMODE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_REFLECTION_XIDLCLASS_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_REFLECTION_XIDLFIELD_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_REFLECTION_PARAMMODE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_REFLECTION_METHODMODE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_REFLECTION_XIDLMEMBER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_REFLECTION_XIDLREFLECTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_REFLECTION_XIDLMETHOD_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_REFLECTION_INVOCATIONTARGETEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_PROPERTYVALUES_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_XPROPERTYSET_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_PROPERTYVALUE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_PROPERTYSTATE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_XMULTIPROPERTYSET_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_XFASTPROPERTYSET_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_XVETOABLECHANGELISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_XPROPERTYSTATE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_XPROPERTYSTATECHANGELISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_XPROPERTIESCHANGELISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_XPROPERTYACCESS_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_XPROPERTYCONTAINER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_PROPERTYSTATECHANGEEVENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_PROPERTYCHANGEEVENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_UNKNOWNPROPERTYEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_INTROSPECTIONEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_PROPERTYEXISTEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_ILLEGALTYPEEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_BEANS_PROPERTYVETOEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_CONTAINER_XHIERARCHICALNAMEACCESS_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_CONTAINER_XNAMEACCESS_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_CONTAINER_XCONTENTENUMERATIONACCESS_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_CONTAINER_XENUMERATION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_CONTAINER_XELEMENTACCESS_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_CONTAINER_XINDEXACCESS_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_XEVENTLISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_EVENTOBJECT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_SCRIPT_XALLLISTENERADAPTERSERVICE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_SCRIPT_XALLLISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_SCRIPT_ALLEVENTOBJECT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_CONTAINER_XCOMPONENTENUMERATION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_XCOMPONENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_CONTAINER_XCOMPONENTENUMERATIONACCESS_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_LISTENEREXISTEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_CONTAINER_ELEMENTEXISTEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_LANG_INVALIDLISTENEREXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_CONTAINER_NOSUCHELEMENTEXCEPTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XKEYLISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XPAINTLISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_KEYEVENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_KEYMODIFIER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XMOUSEMOTIONLISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_FOCUSEVENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XWINDOWLISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XACTIVATELISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_MOUSEEVENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XTOPWINDOWLISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_PAINTEVENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_INPUTEVENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_KEYGROUP_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_KEY_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_WINDOWEVENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XMOUSELISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_KEYFUNCTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_FOCUSCHANGEREASON_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_MOUSEBUTTON_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XFOCUSLISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XADJUSTMENTLISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XACTIONLISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XTEXTLISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XSPINLISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XITEMLISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XVCLCONTAINERLISTENER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XFILEDIALOG_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XTEXTCOMPONENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XLISTBOX_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XPROGRESSMONITOR_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_TEXTALIGN_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XSCROLLBAR_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XVCLCONTAINERPEER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XTABCONTROLLERMODEL_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XMESSAGEBOX_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XTEXTEDITFIELD_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_STYLE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XTIMEFIELD_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XVCLWINDOWPEER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XCONTROLMODEL_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XSPINFIELD_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XUNOCONTROLCONTAINER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XTEXTLAYOUTCONSTRAINS_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XNUMERICFIELD_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XBUTTON_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XTEXTAREA_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XIMAGEBUTTON_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XFIXEDTEXT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XCONTROLCONTAINER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XDIALOG_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_SCROLLBARORIENTATION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XRADIOBUTTON_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XCURRENCYFIELD_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XPATTERNFIELD_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_VCLWINDOWPEERATTRIBUTE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XTABCONTROLLER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XVCLCONTAINER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XDATEFIELD_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XCOMBOBOX_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XCONTROL_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XCHECKBOX_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_MESSAGEBOXCOMMAND_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XLAYOUTCONSTRAINS_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XPROGRESSBAR_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_SIMPLEFONTMETRIC_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_FONTWEIGHT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_FONTSLANT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_CHARSET_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_FONTDESCRIPTOR_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_FONTWIDTH_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XFONT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_FONTTYPE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_FONTUNDERLINE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_FONTSTRIKEOUT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_FONTFAMILY_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_FONTPITCH_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XTOPWINDOW_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XWINDOW_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_POSSIZE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_VCLCONTAINEREVENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_ITEMEVENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_SPINEVENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_TEXTEVENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_ADJUSTMENTTYPE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_ACTIONEVENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_ADJUSTMENTEVENT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_RECTANGLE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_SELECTION_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_SIZE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_WINDOWDESCRIPTOR_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_INVALIDATESTYLE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XTOOLKIT_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XWINDOWPEER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_WINDOWCLASS_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XSYSTEMDEPENDENTWINDOWPEER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_WINDOWATTRIBUTE_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XPOINTER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_SYSTEMPOINTER_HXX_ -#include -#endif -#ifndef _SMART_COM_SUN_STAR_AWT_XVIEW_HXX_ -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx index 0dd9594a75..28a4e4b2ee 100644 --- a/sw/inc/modcfg.hxx +++ b/sw/inc/modcfg.hxx @@ -28,7 +28,7 @@ #define _MODOPT_HXX #include -#include +#include #include #include #include diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx index e0ee17fc05..c6cba4fd9b 100644 --- a/sw/inc/swmodule.hxx +++ b/sw/inc/swmodule.hxx @@ -28,7 +28,7 @@ #define _SWMODULE_HXX #include #include -#include +#include #include #include #include diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx index 01fcdb5460..72ecdeb322 100644 --- a/sw/source/filter/xml/xmliteme.cxx +++ b/sw/source/filter/xml/xmliteme.cxx @@ -40,7 +40,7 @@ #include "xmlbrshe.hxx" #include #include -#include +#include #include #include #include "fmtornt.hxx" diff --git a/sw/source/ui/inc/uitool.hxx b/sw/source/ui/inc/uitool.hxx index 65abd12ea6..702f3e18fc 100644 --- a/sw/source/ui/inc/uitool.hxx +++ b/sw/source/ui/inc/uitool.hxx @@ -27,7 +27,7 @@ #ifndef _UITOOL_HXX #define _UITOOL_HXX -#include +#include #include #include #include "swdllapi.h" diff --git a/sw/source/ui/inc/usrpref.hxx b/sw/source/ui/inc/usrpref.hxx index 9f3f3e4f39..e6f96cabb2 100644 --- a/sw/source/ui/inc/usrpref.hxx +++ b/sw/source/ui/inc/usrpref.hxx @@ -32,7 +32,7 @@ #include #include #include "viewopt.hxx" -#include +#include /* -----------------------------28.09.00 09:45-------------------------------- -- cgit v1.2.3 From 3468b82b20ecde2e8ef3e9635927df98f3b0b94e Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Wed, 1 Dec 2010 13:03:57 +0100 Subject: gnumake2: remove warnings --- sw/source/core/doc/tblrwcl.cxx | 2 +- sw/source/filter/html/htmlform.cxx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 5d93e0371d..c1787b4267 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -3113,7 +3113,7 @@ void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam, const SwFmtFrmSize& rOldSz, USHORT& rDelWidth, SwTwips nDist ) { - long nDiff; + long nDiff = 0; BOOL bSetSize = FALSE; switch( rParam.nMode ) diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 06d9e29ca8..833e91caa9 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -1351,7 +1351,7 @@ void SwHTMLParser::NewForm( sal_Bool bAppend ) { const HTMLOption *pOption = (*pHTMLOptions)[--i]; ScriptType eScriptType2 = eDfltScriptType; - sal_uInt16 nEvent; + sal_uInt16 nEvent = 0; sal_Bool bSetEvent = sal_False; switch( pOption->GetToken() ) @@ -1525,7 +1525,7 @@ void SwHTMLParser::InsertInput() { const HTMLOption *pOption = (*pHTMLOptions)[--i]; ScriptType eScriptType2 = eDfltScriptType; - sal_uInt16 nEvent; + sal_uInt16 nEvent = 0; sal_Bool bSetEvent = sal_False; switch( pOption->GetToken() ) @@ -2017,7 +2017,7 @@ void SwHTMLParser::NewTextArea() { const HTMLOption *pOption = (*pHTMLOptions)[--i]; ScriptType eScriptType2 = eDfltScriptType; - sal_uInt16 nEvent; + sal_uInt16 nEvent = 0; sal_Bool bSetEvent = sal_False; switch( pOption->GetToken() ) @@ -2308,7 +2308,7 @@ void SwHTMLParser::NewSelect() { const HTMLOption *pOption = (*pHTMLOptions)[--i]; ScriptType eScriptType2 = eDfltScriptType; - sal_uInt16 nEvent; + sal_uInt16 nEvent = 0; sal_Bool bSetEvent = sal_False; switch( pOption->GetToken() ) -- cgit v1.2.3 From 1aa84b073fffd86cc3f3e17ec4f5bc831efdcbff Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 6 Dec 2010 14:04:50 +0100 Subject: masterfix DEV300: #i10000# changed ULONG_MAX to SAL_MAX_UINT32 --- sw/source/filter/html/htmltabw.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index 0853b69b1d..ff436c9208 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -70,6 +70,7 @@ #endif #include #endif +#include //#define MAX_DEPTH (USHRT_MAX) #define MAX_DEPTH (3) @@ -337,7 +338,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, #ifndef PURE_HTML long nWidth = 0; - sal_uInt32 nPrcWidth = ULONG_MAX; + sal_uInt32 nPrcWidth = SAL_MAX_UINT32; if( bOutWidth ) { if( bLayoutExport ) -- cgit v1.2.3 From 3d3c6abcae5bd8fd319276fed2bf0b67f1635ba2 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 9 Dec 2010 11:30:23 +0100 Subject: vcl117: more HelpID cleanup --- starmath/source/unomodel.cxx | 2 +- sw/source/core/view/printdata.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 2eb9b070bc..67843c9a9d 100755 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -100,7 +100,7 @@ SmPrintUIOptions::SmPrintUIOptions() String aAppGroupname( aLocalizedStrings.GetString( 0 ) ); aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), aOpt.GetModuleName( SvtModuleOptions::E_SMATH ) ); - m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() ); + m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TabPage:AppPage" ) ) ); // create subgroup for print options m_aUIProperties[1].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() ); diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index ee0e6a29a2..39e44110a8 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -226,7 +226,7 @@ SwPrintUIOptions::SwPrintUIOptions( String aAppGroupname( aLocalizedStrings.GetString( 0 ) ); aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), aModOpt.GetModuleName( SvtModuleOptions::E_SWRITER ) ); - m_aUIProperties[ nIdx++ ].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() ); + m_aUIProperties[ nIdx++ ].Value = getGroupControlOpt( aAppGroupname, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TabPage:AppPage" ) ) ); // create sub section for Contents m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() ); -- cgit v1.2.3 From da058ddf15326404d0455ae36814876f65faee18 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Mon, 3 Jan 2011 13:40:23 +0100 Subject: fwk162: #i115902# review usage of SfxObjectShellRef, SfxObjecShellLock; remove unused some methods --- sw/inc/doc.hxx | 16 +++++++--------- sw/inc/unomailmerge.hxx | 2 +- sw/source/core/doc/docglbl.cxx | 4 ++-- sw/source/core/doc/docnew.cxx | 21 ++++++++++++++------- sw/source/core/docnode/ndtbl.cxx | 7 ------- sw/source/core/docnode/section.cxx | 10 +++++++--- sw/source/core/fields/expfld.cxx | 16 ++++++++++++---- sw/source/core/ole/ndole.cxx | 18 ++++++++---------- sw/source/core/unocore/unocrsrhelper.cxx | 1 + sw/source/core/view/vprint.cxx | 8 ++------ sw/source/filter/basflt/shellio.cxx | 6 +----- sw/source/filter/ww8/ww8glsy.cxx | 2 +- sw/source/ui/app/appenv.cxx | 2 +- sw/source/ui/app/apphdl.cxx | 2 +- sw/source/ui/app/applab.cxx | 2 +- sw/source/ui/app/docsh.cxx | 23 +++-------------------- sw/source/ui/app/docsh2.cxx | 2 +- sw/source/ui/dbui/dbmgr.cxx | 21 +++++++++++++++------ sw/source/ui/dbui/mmoutputpage.cxx | 6 ++++-- sw/source/ui/dochdl/swdtflvr.cxx | 12 ++++++------ sw/source/ui/inc/swdtflvr.hxx | 2 +- sw/source/ui/inc/uivwimp.hxx | 7 ++----- sw/source/ui/inc/unotxvw.hxx | 2 +- sw/source/ui/inc/view.hxx | 6 +++--- sw/source/ui/uiview/view.cxx | 6 +++--- sw/source/ui/uiview/view2.cxx | 5 +++-- sw/source/ui/uno/unomailmerge.cxx | 1 + sw/source/ui/uno/unotxdoc.cxx | 10 +++++++--- sw/source/ui/uno/unotxvw.cxx | 4 ++-- 29 files changed, 111 insertions(+), 113 deletions(-) (limited to 'sw/source') diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 297f6dcc9b..a0c82e9016 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -74,6 +74,7 @@ class SwList; #include #include #include +#include #include #include #include "comphelper/implementationreference.hxx" @@ -94,8 +95,6 @@ class SwList; #include -class SfxObjectShell; -class SfxObjectShellRef; class SvxForbiddenCharactersTable; class SwExtTextInput; class DateTime; @@ -358,9 +357,8 @@ class SW_DLLPUBLIC SwDoc : SvxMacroTableDtor *pMacroTable; // Tabelle der dokumentglobalen Macros SwDocShell *pDocShell; // Ptr auf die SfxDocShell vom Doc - SfxObjectShellRef* pDocShRef; // fuers Kopieren von OLE-Nodes (wenn keine - // DocShell gesetzt ist, muss dieser - // Ref-Pointer gesetzt sein!!!!) + SfxObjectShellLock xTmpDocShell; // A temporary shell that is used to copy OLE-Nodes + sfx2::LinkManager *pLinkMgr; // Liste von Verknuepften (Grafiken/DDE/OLE) SwAutoCorrExceptWord *pACEWord; // fuer die automatische Uebernahme von @@ -1834,10 +1832,10 @@ public: const SwDocShell* GetDocShell() const { return pDocShell; } void SetDocShell( SwDocShell* pDSh ); - // falls beim Kopieren von OLE-Nodes eine DocShell angelegt werden muss, - // dann MUSS der Ref-Pointer besetzt sein!!!! - SfxObjectShellRef* GetRefForDocShell() { return pDocShRef; } - void SetRefForDocShell( SfxObjectShellRef* p ) { pDocShRef = p; } + // in case during copying of embedded object a new shell is created, + // it should be set here and cleaned later + void SetTmpDocShell( SfxObjectShellLock rLock ) { xTmpDocShell = rLock; } + SfxObjectShellLock GetTmpDocShell() { return xTmpDocShell; } // fuer die TextBausteine - diese habe nur ein SvPersist zur // Verfuegung diff --git a/sw/inc/unomailmerge.hxx b/sw/inc/unomailmerge.hxx index 47dc5000f1..eb41894529 100644 --- a/sw/inc/unomailmerge.hxx +++ b/sw/inc/unomailmerge.hxx @@ -41,7 +41,7 @@ #include #include #include -#include // SfxObjectShellRef +#include #include diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index ef72c98ce7..83d4670ef4 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -254,7 +254,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, String sFileName; if( pSttNd->GetIndex() + 1 < aEndIdx.GetIndex() ) { - SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); + SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); if( xDocSh->DoInitNew( 0 ) ) { SwDoc* pDoc = ((SwDocShell*)(&xDocSh))->GetDoc(); @@ -605,7 +605,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel ) String sFileName; if( pSttNd->GetIndex() + 1 < aEndIdx.GetIndex() ) { - SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); + SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); if( xDocSh->DoInitNew( 0 ) ) { SwDoc* pDoc = ((SwDocShell*)(&xDocSh))->GetDoc(); diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 33819154ef..68cde3b2f5 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -254,7 +254,6 @@ SwDoc::SwDoc() : pFtnIdxs( new SwFtnIdxs ), pDocStat( new SwDocStat ), pDocShell( 0 ), - pDocShRef( 0 ), pLinkMgr( new sfx2::LinkManager( 0 ) ), pACEWord( 0 ), pURLStateChgd( 0 ), @@ -1149,15 +1148,23 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const // COMPATIBILITY FLAGS END // pRet->ReplaceStyles( * const_cast< SwDoc*>( this )); - SfxObjectShellRef aDocShellRef = const_cast< SwDocShell* >( GetDocShell() ); - pRet->SetRefForDocShell( boost::addressof(aDocShellRef) ); - SfxObjectShellRef xRetShell = new SwDocShell( pRet, SFX_CREATE_MODE_STANDARD ); + + // we have to use pointer here, since the callee has to decide whether SfxObjectShellLock or SfxObjectShellRef should be used + // sometimes the object will be returned with refcount set to 0 ( if no DoInitNew is done ) + SfxObjectShell* pRetShell = new SwDocShell( pRet, SFX_CREATE_MODE_STANDARD ); if( bCallInitNew ) - xRetShell->DoInitNew(); + { + // it could happen that DoInitNew creates model, that increases the refcount of the object + pRetShell->DoInitNew(); + } + //copy content pRet->Paste( *this ); - pRet->SetRefForDocShell( 0 ); - return xRetShell; + + // remove the temporary shell if it is there as it was done before + pRet->SetTmpDocShell( (SfxObjectShell*)NULL ); + + return pRetShell; } /*-- 08.05.2009 10:52:40--------------------------------------------------- copy document content - code from SwFEShell::Paste( SwDoc* , BOOL ) diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 426163198e..d34936a20d 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -4376,7 +4376,6 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes, } SwDoc* pCpyDoc = (SwDoc*)pSrcTblNd->GetDoc(); - SfxObjectShellRef* pRefForDocSh = 0; BOOL bDelCpyDoc = pCpyDoc == this; if( bDelCpyDoc ) @@ -4384,13 +4383,10 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes, // kopiere die Tabelle erstmal in ein temp. Doc pCpyDoc = new SwDoc; pCpyDoc->acquire(); - pRefForDocSh = new SfxObjectShellRef(); - pCpyDoc->SetRefForDocShell( pRefForDocSh ); SwPosition aPos( SwNodeIndex( pCpyDoc->GetNodes().GetEndOfContent() )); if( !pSrcTblNd->GetTable().MakeCopy( pCpyDoc, aPos, rBoxes, TRUE, TRUE )) { - delete pRefForDocSh; if( pCpyDoc->release() == 0 ) delete pCpyDoc; @@ -4403,8 +4399,6 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes, } aPos.nNode -= 1; // auf den EndNode der Tabelle pSrcTblNd = aPos.nNode.GetNode().FindTableNode(); - - pCpyDoc->SetRefForDocShell( NULL ); } const SwStartNode* pSttNd = rInsPos.nNode.GetNode().FindTableBoxStartNode(); @@ -4443,7 +4437,6 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes, if( bDelCpyDoc ) { - delete pRefForDocSh; if( pCpyDoc->release() == 0 ) delete pCpyDoc; } diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 34e4f88874..b3caca1d23 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -1319,9 +1319,10 @@ void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) // Der Return-Wert gibt an, was mit der Shell zu geschehen hat: // 0 - Fehler, konnte DocShell nicht finden // 1 - DocShell ist ein existieren Document -// 2 - DocShell wurde neu angelegt, muss also wieder geschlossen werden +// 2 - DocShell wurde neu angelegt, muss also wieder geschlossen werden ( will be assigned to xLockRef additionaly ) int lcl_FindDocShell( SfxObjectShellRef& xDocSh, + SfxObjectShellLock& xLockRef, const String& rFileName, const String& rPasswd, String& rFilter, @@ -1407,7 +1408,9 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh, // ohne Filter geht gar nichts pMed->SetFilter( pSfxFlt ); - xDocSh = new SwDocShell( SFX_CREATE_MODE_INTERNAL ); + // if the new shell is created, SfxObjectShellLock should be used to let it be closed later for sure + xLockRef = new SwDocShell( SFX_CREATE_MODE_INTERNAL ); + xDocSh = (SfxObjectShell*)xLockRef; if( xDocSh->DoLoad( pMed ) ) return 2; } @@ -1504,6 +1507,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType, RedlineMode_t eOldRedlineMode = nsRedlineMode_t::REDLINE_NONE; SfxObjectShellRef xDocSh; + SfxObjectShellLock xLockRef; int nRet; if( !sFileName.Len() ) { @@ -1512,7 +1516,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType, } else { - nRet = lcl_FindDocShell( xDocSh, sFileName, + nRet = lcl_FindDocShell( xDocSh, xLockRef, sFileName, rSection.GetLinkFilePassword(), sFilter, 0, pDoc->GetDocShell() ); if( nRet ) diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index bb4d56728d..497b65b68c 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -76,10 +76,18 @@ sal_Int16 lcl_SubTypeToAPI(USHORT nSubType) sal_Int16 nRet = 0; switch(nSubType) { - case nsSwGetSetExpType::GSE_EXPR : nRet = SetVariableType::VAR /*0*/; break; - case nsSwGetSetExpType::GSE_SEQ : nRet = SetVariableType::SEQUENCE /*1*/; break; - case nsSwGetSetExpType::GSE_FORMULA : nRet = SetVariableType::FORMULA /*2*/; break; - case nsSwGetSetExpType::GSE_STRING : nRet = SetVariableType::STRING /*3*/; break; + case nsSwGetSetExpType::GSE_EXPR: + nRet = SetVariableType::VAR; // 0 + break; + case nsSwGetSetExpType::GSE_SEQ: + nRet = SetVariableType::SEQUENCE; // 1 + break; + case nsSwGetSetExpType::GSE_FORMULA: + nRet = SetVariableType::FORMULA; // 2 + break; + case nsSwGetSetExpType::GSE_STRING: + nRet = SetVariableType::STRING; // 3 + break; } return nRet; } diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 479842ce5a..aba6ad89f8 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -437,16 +437,14 @@ Size SwOLENode::GetTwipSize() const SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const { // Falls bereits eine SvPersist-Instanz existiert, nehmen wir diese - SfxObjectShell* p = pDoc->GetPersist(); - if( !p ) + SfxObjectShell* pPersistShell = pDoc->GetPersist(); + if( !pPersistShell ) { - // TODO/LATER: reicht hier nicht ein EmbeddedObjectContainer? Was passiert mit - // diesem Dokument? - ASSERT( pDoc->GetRefForDocShell(), - "wo ist die Ref-Klasse fuer die DocShell?") - p = new SwDocShell( pDoc, SFX_CREATE_MODE_INTERNAL ); - *pDoc->GetRefForDocShell() = p; - p->DoInitNew( NULL ); + // TODO/LATER: is EmbeddedObjectContainer not enough? + // the created document will be closed by pDoc ( should use SfxObjectShellLock ) + pPersistShell = new SwDocShell( pDoc, SFX_CREATE_MODE_INTERNAL ); + pDoc->SetTmpDocShell( pPersistShell ); + pPersistShell->DoInitNew( NULL ); } // Wir hauen das Ding auf SvPersist-Ebene rein @@ -454,7 +452,7 @@ SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const ::rtl::OUString aNewName/*( Sw3Io::UniqueName( p->GetStorage(), "Obj" ) )*/; SfxObjectShell* pSrc = GetDoc()->GetPersist(); - p->GetEmbeddedObjectContainer().CopyAndGetEmbeddedObject( + pPersistShell->GetEmbeddedObjectContainer().CopyAndGetEmbeddedObject( pSrc->GetEmbeddedObjectContainer(), pSrc->GetEmbeddedObjectContainer().GetEmbeddedObject( aOLEObj.aName ), aNewName ); diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 35df91a570..e00a231e5d 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -935,6 +935,7 @@ void InsertFile(SwUnoCrsr* pUnoCrsr, if( !pMed ) return; + // this sourcecode is not responsible for the lifetime of the shell, SfxObjectShellLock should not be used SfxObjectShellRef aRef( pDocSh ); pDocSh->RegisterTransfer( *pMed ); diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index d7c0aadc9d..ae0b8d97b5 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -443,8 +443,8 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) } // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!) -// if( aDocShellRef.Is() ) -// SwDataExchange::InitOle( aDocShellRef, pPrtDoc ); +//REMOVE // if( aDocShellRef.Is() ) +//REMOVE // SwDataExchange::InitOle( aDocShellRef, pPrtDoc ); // und fuellen es mit dem selektierten Bereich pFESh->Copy( pPrtDoc ); @@ -503,10 +503,6 @@ sal_Bool ViewShell::PrintOrPDFExport( ViewShell *pShell; SwDoc *pOutDevDoc; - //!! muss warum auch immer hier in diesem scope existieren !! - //!! (h?ngt mit OLE Objekten im Dokument zusammen.) - SfxObjectShellRef aDocShellRef; - // Print/PDF export for (multi-)selection has already generated a // temporary document with the selected text. // (see XRenderable implementation in unotxdoc.cxx) diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index 6d9b813706..30767ba90b 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -530,7 +530,7 @@ SwDoc* Reader::GetTemplateDoc() { SwDocShell *pDocSh = new SwDocShell ( SFX_CREATE_MODE_INTERNAL ); - SfxObjectShellRef xDocSh = pDocSh; + SfxObjectShellLock xDocSh = pDocSh; if( pDocSh->DoInitNew( 0 ) ) { pTemplate = pDocSh->GetDoc(); @@ -805,15 +805,12 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName ) SwPaM * pPam; SwDoc *pDoc = 0; - SfxObjectShellRef* pRefForDocSh = 0; if ( pShell && !bWriteAll && pShell->IsTableMode() ) { bWriteAll = TRUE; pDoc = new SwDoc; pDoc->acquire(); - pRefForDocSh = new SfxObjectShellRef(); - pDoc->SetRefForDocShell( pRefForDocSh ); // kopiere Teile aus einer Tabelle: lege eine Tabelle mit der Breite // von der Originalen an und kopiere die selectierten Boxen. @@ -971,7 +968,6 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName ) if ( pDoc ) { - delete pRefForDocSh; if ( !pDoc->release() ) delete pDoc; bWriteAll = FALSE; diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx index 20b51cc662..babb68bf93 100644 --- a/sw/source/filter/ww8/ww8glsy.cxx +++ b/sw/source/filter/ww8/ww8glsy.cxx @@ -219,7 +219,7 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool bSaveRelFile ) if ( 0 != (nStrings = static_cast< USHORT >(aStrings.size()))) { - SfxObjectShellRef xDocSh(new SwDocShell(SFX_CREATE_MODE_INTERNAL)); + SfxObjectShellLock xDocSh(new SwDocShell(SFX_CREATE_MODE_INTERNAL)); if (xDocSh->DoInitNew(0)) { SwDoc *pD = ((SwDocShell*)(&xDocSh))->GetDoc(); diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx index 3896cbbe0d..b66be1e2a9 100644 --- a/sw/source/ui/app/appenv.cxx +++ b/sw/source/ui/app/appenv.cxx @@ -189,7 +189,7 @@ static USHORT nTitleNo = 0; pOldSh = pMyDocSh ? pMyDocSh->GetWrtShell() : 0; // Neues Dokument erzeugen (kein Show!) - SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); + SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xDocSh->DoInitNew( 0 ); pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); pNewView = (SwView*) pFrame->GetViewShell(); diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index f61b6434f1..0804edbb3c 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -968,7 +968,7 @@ void NewXForms( SfxRequest& rReq ) // copied & excerpted from SwModule::InsertLab(..) // create new document - SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD) ); + SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD) ); xDocSh->DoInitNew( 0 ); // initialize XForms diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index e597547d89..46d02d702a 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -209,7 +209,7 @@ static sal_uInt16 nBCTitleNo = 0; aLabCfg.Commit(); // Neues Dokument erzeugen. - SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD)); + SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD)); xDocSh->DoInitNew( 0 ); // Drucker diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index a397788b23..46d1083b3b 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -484,7 +484,9 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium ) // will set the wrong class id. SvGlobalName aClassName; String aAppName, aLongUserName, aUserName; - SfxObjectShellRef xDocSh = + + // The document is closed explicitly, but using SfxObjectShellLock is still more correct here + SfxObjectShellLock xDocSh = new SwGlobalDocShell( SFX_CREATE_MODE_INTERNAL ); // the global document can not be a template xDocSh->SetupStorage( xStor, SotStorage::GetVersion( xStor ), sal_False ); @@ -717,25 +719,6 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) GetDoc()->set(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS, bIsGlblDocSaveLinksSave); } - if( bRet && nMyType != nSaveType ) - { - SvGlobalName aClassName; - String aAppName, aLongUserName, aUserName; - SfxObjectShellRef xDocSh; - switch( nSaveType ) - { - case 0: - xDocSh = new SwDocShell( SFX_CREATE_MODE_INTERNAL ); - break; - case 1: - xDocSh = new SwWebDocShell( SFX_CREATE_MODE_INTERNAL ); - break; - case 2: - xDocSh = new SwGlobalDocShell( SFX_CREATE_MODE_INTERNAL ); - break; - } - } - return bRet; } diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 3f1884987f..874c4f175d 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1013,7 +1013,7 @@ void SwDocShell::Execute(SfxRequest& rReq) BYTE nLevel = pDlg->GetLevel(); BYTE nPara = pDlg->GetPara(); SwDoc* pSmryDoc = new SwDoc(); - SfxObjectShellRef xDocSh( new SwDocShell( pSmryDoc, SFX_CREATE_MODE_STANDARD)); + SfxObjectShellLock xDocSh( new SwDocShell( pSmryDoc, SFX_CREATE_MODE_STANDARD)); xDocSh->DoInitNew( 0 ); BOOL bImpress = FN_ABSTRACT_STARIMPRESS == nWhich; diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 052b48ba71..b5991365a4 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -938,7 +938,11 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, // in case of creating a single resulting file this has to be created here SwWrtShell* pTargetShell = 0; - SfxObjectShellRef xTargetDocShell; + + // the shell will be explicitly closed at the end of the method, but it is + // still more safe to use SfxObjectShellLock here + SfxObjectShellLock xTargetDocShell; + SwView* pTargetView = 0; std::auto_ptr< utl::TempFile > aTempFile; String sModifiedStartingPageDesc; @@ -1062,8 +1066,9 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, for (USHORT i = 0; i < 10; i++) Application::Reschedule(); - // Neues Dokument erzeugen und speichern - SfxObjectShellRef xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); + // Create and save new document + // The SfxObjectShell will be closed explicitly later but it is more safe to use SfxObjectShellLock here + SfxObjectShellLock xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); SfxMedium* pWorkMed = new SfxMedium( sSourceDocumentURL, STREAM_STD_READ, TRUE ); pWorkMed->SetFilter( pSfxFlt ); @@ -2543,6 +2548,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, if(xResSet.is()) aDescriptor[daCursor] <<= xResSet; + // SfxObjectShellRef is ok, since there should be no control over the document lifetime here SfxObjectShellRef xDocShell = rSh.GetView().GetViewFrame()->GetObjectShell(); SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), xDocShell)); { @@ -2573,7 +2579,9 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, } else { - SfxObjectShellRef xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); + // the shell will be explicitly closed, but it is more safe to use SfxObjectShellLock here + // especially for the case that the loading has failed + SfxObjectShellLock xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); SfxMedium* pWorkMed = new SfxMedium( sTempURL, STREAM_STD_READ, TRUE ); pWorkMed->SetFilter( pSfxFlt ); if( xWorkDocSh->DoLoad(pWorkMed) ) @@ -2868,7 +2876,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, try { // create a target docshell to put the merged document into - SfxObjectShellRef xTargetDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); + SfxObjectShellLock xTargetDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTargetDocShell->DoInitNew( 0 ); SfxViewFrame* pTargetFrame = SfxViewFrame::LoadHiddenDocument( *xTargetDocShell, 0 ); @@ -2916,7 +2924,8 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, } // copy the source document - SfxObjectShellRef xWorkDocSh; + // the copy will be closed later, but it is more safe to use SfxObjectShellLock here + SfxObjectShellLock xWorkDocSh; if(nDocNo == 1 ) { uno::Reference< util::XCloneable > xClone( rSourceView.GetDocShell()->GetModel(), uno::UNO_QUERY); diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 9ede2af8a0..fd83d5a665 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -853,7 +853,8 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) aSaveMonitor.aPrintInfo.SetText(sStat); //now extract a document from the target document - SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); + // the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here + SfxObjectShellLock xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTempDocShell->DoInitNew( 0 ); SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); // pTempFrame->GetFrame().Appear(); @@ -1252,7 +1253,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) SwDocMergeInfo& rInfo = rConfigItem.GetDocumentMergeInfo(nDoc); //now extract a document from the target document - SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); + // the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here + SfxObjectShellLock xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTempDocShell->DoInitNew( 0 ); SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); // pTempFrame->GetFrame().Appear(); diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index 211e5d0f73..db789ec828 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -454,14 +454,14 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor ) pClpDocFac = new SwDocFac; SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac); - pTmpDoc->SetRefForDocShell( boost::addressof(aDocShellRef) ); pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen pWrtShell->Copy( pTmpDoc ); // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!) + aDocShellRef = pTmpDoc->GetTmpDocShell(); if( aDocShellRef.Is() ) SwTransferable::InitOle( aDocShellRef, *pTmpDoc ); - pTmpDoc->SetRefForDocShell( 0 ); + pTmpDoc->SetTmpDocShell( (SfxObjectShell*)NULL ); if( nSelectionType & nsSelectionType::SEL_TXT && !pWrtShell->HasMark() ) { @@ -869,7 +869,6 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut ) SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac); - pTmpDoc->SetRefForDocShell( boost::addressof(aDocShellRef) ); pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen pWrtShell->Copy( pTmpDoc ); @@ -892,9 +891,10 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut ) } // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!) + aDocShellRef = pTmpDoc->GetTmpDocShell(); if( aDocShellRef.Is() ) SwTransferable::InitOle( aDocShellRef, *pTmpDoc ); - pTmpDoc->SetRefForDocShell( 0 ); + pTmpDoc->SetTmpDocShell( (SfxObjectShell*)NULL ); if( pWrtShell->IsObjSelected() ) eBufferType = TRNSFR_DRAWING; @@ -1052,15 +1052,15 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, SwCntntNode* pCNd = rNds.GoNext( &aNodeIdx ); // gehe zum 1. ContentNode SwPaM aPam( *pCNd ); - pCDoc->SetRefForDocShell( boost::addressof(aDocShellRef) ); pCDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen pCDoc->InsertGlossary( rGlossary, rStr, aPam, 0 ); // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!) + aDocShellRef = pCDoc->GetTmpDocShell(); if( aDocShellRef.Is() ) SwTransferable::InitOle( aDocShellRef, *pCDoc ); - pCDoc->SetRefForDocShell( 0 ); + pCDoc->SetTmpDocShell( (SfxObjectShell*)NULL ); eBufferType = TRNSFR_DOCUMENT; diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx index 2fc7d153f8..eb69d8fd67 100644 --- a/sw/source/ui/inc/swdtflvr.hxx +++ b/sw/source/ui/inc/swdtflvr.hxx @@ -65,7 +65,7 @@ namespace nsTransferBufferType class SwTransferable : public TransferableHelper { friend class SwView_Impl; - SfxObjectShellRef aDocShellRef; + SfxObjectShellLock aDocShellRef; TransferableDataHelper aOleData; TransferableObjectDescriptor aObjDesc; ::sfx2::SvBaseLinkRef refDdeLink; diff --git a/sw/source/ui/inc/uivwimp.hxx b/sw/source/ui/inc/uivwimp.hxx index d8131f51de..ece0bd023f 100644 --- a/sw/source/ui/inc/uivwimp.hxx +++ b/sw/source/ui/inc/uivwimp.hxx @@ -111,8 +111,7 @@ class SwView_Impl // temporary document for printing text of selection / multi selection // in PDF export. - SfxObjectShellRef xTmpSelDocSh; - SfxObjectShellRef aEmbeddedObjRef; + SfxObjectShellLock xTmpSelDocSh; SwView* pView; SwScannerEventListener* pScanEvtLstnr; @@ -148,9 +147,7 @@ public: void AddClipboardListener(); - SfxObjectShellRef & GetTmpSelectionDoc() { return xTmpSelDocSh; } - - SfxObjectShellRef& GetEmbeddedObjRef() { return *boost::addressof(aEmbeddedObjRef); } + SfxObjectShellLock& GetTmpSelectionDoc() { return xTmpSelDocSh; } void AddTransferable(SwTransferable& rTransferable); diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx index e074e37dda..4086201956 100644 --- a/sw/source/ui/inc/unotxvw.hxx +++ b/sw/source/ui/inc/unotxvw.hxx @@ -156,7 +156,7 @@ public: void Invalidate(); // temporary document used for PDF export of selections/multi-selections - SfxObjectShellRef BuildTmpSelectionDoc(); + SfxObjectShellLock BuildTmpSelectionDoc(); }; /* -----------------17.09.98 12:52------------------- diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index a5e5ff1918..1081bf5e6b 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -32,7 +32,7 @@ #include #include #include -#include // SfxObjectShellRef <-> SV_DECL_REF(SfxObjectShell) +#include #include #include #include @@ -643,8 +643,8 @@ public: void NotifyDBChanged(); - SfxObjectShellRef & GetTmpSelectionDoc(); - SfxObjectShellRef & GetOrCreateTmpSelectionDoc(); + SfxObjectShellLock & GetTmpSelectionDoc(); + SfxObjectShellLock & GetOrCreateTmpSelectionDoc(); void AddTransferable(SwTransferable& rTransferable); diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 1722c0ac13..887775ed4c 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -1898,16 +1898,16 @@ void SwView::NotifyDBChanged() /* -----------------------------28.10.02 13:25-------------------------------- ---------------------------------------------------------------------------*/ -SfxObjectShellRef & SwView::GetTmpSelectionDoc() +SfxObjectShellLock & SwView::GetTmpSelectionDoc() { return GetViewImpl()->GetTmpSelectionDoc(); } /* -----------------------------31.10.02 13:25-------------------------------- ---------------------------------------------------------------------------*/ -SfxObjectShellRef & SwView::GetOrCreateTmpSelectionDoc() +SfxObjectShellLock & SwView::GetOrCreateTmpSelectionDoc() { - SfxObjectShellRef &rxTmpDoc = GetViewImpl()->GetTmpSelectionDoc(); + SfxObjectShellLock &rxTmpDoc = GetViewImpl()->GetTmpSelectionDoc(); if (!rxTmpDoc.Is()) { SwXTextView *pImpl = GetViewImpl()->GetUNOObject_Impl(); diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 5471f9775a..7f57fa3846 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -2142,14 +2142,15 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion ) else { SfxObjectShellRef xDocSh; + SfxObjectShellLock xLockRef; -extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh, +extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh, SfxObjectShellLock& xLockRef, const String& rFileName, const String& rPasswd, String& rFilter, INT16 nVersion, SwDocShell* pDestSh ); String sFltNm; - int nRet = lcl_FindDocShell( xDocSh, pMedium->GetName(), aEmptyStr, + int nRet = lcl_FindDocShell( xDocSh, xLockRef, pMedium->GetName(), aEmptyStr, sFltNm, nVersion, pDocSh ); if( nRet ) { diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index 08c720d0b3..17e4c43981 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -201,6 +201,7 @@ static BOOL LoadFromURL_impl( } else { + // SfxObjectShellRef is ok here, since the document will be explicitly closed SfxObjectShellRef xTmpDocSh = pTmpDocShell; CloseModelAndDocSh( xTmpModel, xTmpDocSh ); } diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 7752e74d28..fc8ebe6c05 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2591,7 +2591,7 @@ SwDoc * SwXTextDocument::GetRenderDoc( const TypeId aSwViewTypeId = TYPE(SwView); if (rpView && rpView->IsA(aSwViewTypeId)) { - SfxObjectShellRef xDocSh(((SwView*)rpView)->GetOrCreateTmpSelectionDoc()); + SfxObjectShellLock xDocSh(((SwView*)rpView)->GetOrCreateTmpSelectionDoc()); if (xDocSh.Is()) { pDoc = ((SwDocShell*)&xDocSh)->GetDoc(); @@ -3170,8 +3170,12 @@ uno::Reference< util::XCloneable > SwXTextDocument::createClone( ) throw (uno:: ::vos::OGuard aGuard(Application::GetSolarMutex()); if(!IsValid()) throw RuntimeException(); - //create a new document - hidden - copy the storage and return it - SfxObjectShell* pShell = pDocShell->GetDoc()->CreateCopy(false); + + // create a new document - hidden - copy the storage and return it + // SfxObjectShellRef is used here, since the model should control object lifetime after creation + // and thus SfxObjectShellLock is not allowed here + // the model holds reference to the shell, so the shell will not destructed at the end of method + SfxObjectShellRef pShell = pDocShell->GetDoc()->CreateCopy(false); uno::Reference< frame::XModel > xNewModel = pShell->GetModel(); uno::Reference< embed::XStorage > xNewStorage = ::comphelper::OStorageHelper::GetTemporaryStorage( ); uno::Sequence< beans::PropertyValue > aTempMediaDescriptor; diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 3ec786f45d..b65c4b2955 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -903,12 +903,12 @@ void SAL_CALL SwXTextView::setRubyList( /*-- 29.12.02 15:45:29--------------------------------------------------- -----------------------------------------------------------------------*/ -SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc() +SfxObjectShellLock SwXTextView::BuildTmpSelectionDoc() { SwWrtShell& rOldSh = m_pView->GetWrtShell(); SfxPrinter *pPrt = rOldSh.getIDocumentDeviceAccess()->getPrinter( false ); SwDocShell* pDocSh; - SfxObjectShellRef xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) ); + SfxObjectShellLock xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) ); xDocSh->DoInitNew( 0 ); SwDoc *const pTempDoc( pDocSh->GetDoc() ); // #i103634#, #i112425#: do not expand numbering and fields on PDF export -- cgit v1.2.3 From bcc55a6f95a4d516dc4480b90a75182f89b48984 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 7 Jan 2011 15:19:05 +0100 Subject: fwk162: #i115902# review usage of SfxObjectShellRef, SfxObjecShellLock --- sw/source/ui/dbui/dbmgr.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index b5991365a4..c93145a640 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1508,7 +1508,8 @@ ULONG SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource, if(!xSource.is()) { uno::Reference xChild(xConnection, UNO_QUERY); - xSource = uno::Reference(xChild->getParent(), UNO_QUERY); + if ( xChild.is() ) + xSource = uno::Reference(xChild->getParent(), UNO_QUERY); } if(xSource.is() && xConnection.is() && xColumn.is() && pNFmtr) { @@ -2876,7 +2877,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, try { // create a target docshell to put the merged document into - SfxObjectShellLock xTargetDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); + SfxObjectShellRef xTargetDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTargetDocShell->DoInitNew( 0 ); SfxViewFrame* pTargetFrame = SfxViewFrame::LoadHiddenDocument( *xTargetDocShell, 0 ); -- cgit v1.2.3